dreamcontext 0.6.0 → 0.7.1

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 (148) hide show
  1. package/README.md +2 -1
  2. package/agents/sleep-product.md +19 -2
  3. package/agents/sleep-state.md +43 -22
  4. package/agents/sleep-tasks.md +38 -0
  5. package/dist/agents/sleep-product.md +19 -2
  6. package/dist/agents/sleep-state.md +43 -22
  7. package/dist/agents/sleep-tasks.md +38 -0
  8. package/dist/dashboard/assets/{BrainCanvas3D-LLqVeXtb.js → BrainCanvas3D-Bb8WCKrn.js} +21 -21
  9. package/dist/dashboard/assets/{_baseUniq-DW0uA0ty.js → _baseUniq-BatmaIH2.js} +1 -1
  10. package/dist/dashboard/assets/ar-SA-G6X2FPQ2-D5ja_wjH.js +10 -0
  11. package/dist/dashboard/assets/{arc-fVUGtlbL.js → arc-DqjLlF-x.js} +1 -1
  12. package/dist/dashboard/assets/{architectureDiagram-Q4EWVU46-Dz2PKBsS.js → architectureDiagram-Q4EWVU46-u9hbL6uu.js} +1 -1
  13. package/dist/dashboard/assets/az-AZ-76LH7QW2-CCrmRwql.js +1 -0
  14. package/dist/dashboard/assets/bg-BG-XCXSNQG7-ByFwPOzm.js +5 -0
  15. package/dist/dashboard/assets/{blockDiagram-DXYQGD6D-ByWKxzhL.js → blockDiagram-DXYQGD6D-dX-e3JNh.js} +1 -1
  16. package/dist/dashboard/assets/bn-BD-2XOGV67Q-CqnEIuTG.js +5 -0
  17. package/dist/dashboard/assets/{c4Diagram-AHTNJAMY-dpHsVM3D.js → c4Diagram-AHTNJAMY-DAT2Y4Ei.js} +1 -1
  18. package/dist/dashboard/assets/ca-ES-6MX7JW3Y-DxUow-Oi.js +8 -0
  19. package/dist/dashboard/assets/channel-JlaJkLX7.js +1 -0
  20. package/dist/dashboard/assets/{chunk-4BX2VUAB-HEXb6Yg5.js → chunk-4BX2VUAB-ng6_uP1b.js} +1 -1
  21. package/dist/dashboard/assets/{chunk-4TB4RGXK-DeVy5g6H.js → chunk-4TB4RGXK-JyQRd6F4.js} +1 -1
  22. package/dist/dashboard/assets/{chunk-55IACEB6-DGy3ZgDZ.js → chunk-55IACEB6-WENWKOcW.js} +1 -1
  23. package/dist/dashboard/assets/{chunk-EDXVE4YY-CYJehjz4.js → chunk-EDXVE4YY-BupZpcZ0.js} +1 -1
  24. package/dist/dashboard/assets/{chunk-FMBD7UC4-DKTOmvgZ.js → chunk-FMBD7UC4-6-Dp_BQr.js} +1 -1
  25. package/dist/dashboard/assets/{chunk-OYMX7WX6-mmtWyiDA.js → chunk-OYMX7WX6-CRMXMXMR.js} +1 -1
  26. package/dist/dashboard/assets/{chunk-QZHKN3VN-DSdV0iwY.js → chunk-QZHKN3VN-CdV3chea.js} +1 -1
  27. package/dist/dashboard/assets/{chunk-YZCP3GAM-DbY-KoDn.js → chunk-YZCP3GAM-DGd7UTQr.js} +1 -1
  28. package/dist/dashboard/assets/classDiagram-6PBFFD2Q-BBVZgLT7.js +1 -0
  29. package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-BBVZgLT7.js +1 -0
  30. package/dist/dashboard/assets/clone-DSjY5D8g.js +1 -0
  31. package/dist/dashboard/assets/{cose-bilkent-S5V4N54A-p0t1DY88.js → cose-bilkent-S5V4N54A-86wk8_0k.js} +1 -1
  32. package/dist/dashboard/assets/cs-CZ-2BRQDIVT-Vsx90G3k.js +11 -0
  33. package/dist/dashboard/assets/da-DK-5WZEPLOC-BqlSmIrC.js +5 -0
  34. package/dist/dashboard/assets/{dagre-KV5264BT-DYE0WzHM.js → dagre-KV5264BT-BsnIu1de.js} +1 -1
  35. package/dist/dashboard/assets/de-DE-XR44H4JA-D1X2JmBd.js +8 -0
  36. package/dist/dashboard/assets/{diagram-5BDNPKRD-D9EiQCOP.js → diagram-5BDNPKRD-BfKZpkO_.js} +1 -1
  37. package/dist/dashboard/assets/{diagram-G4DWMVQ6-poDXSAfu.js → diagram-G4DWMVQ6-BGEdOZis.js} +1 -1
  38. package/dist/dashboard/assets/{diagram-MMDJMWI5-CHZ7wgN1.js → diagram-MMDJMWI5-4PK6U-9k.js} +1 -1
  39. package/dist/dashboard/assets/{diagram-TYMM5635-DVk6fYG7.js → diagram-TYMM5635-Co4XFxnB.js} +1 -1
  40. package/dist/dashboard/assets/directory-open-01563666-DWU9wJ6I.js +1 -0
  41. package/dist/dashboard/assets/directory-open-4ed118d0-CunoC1EB.js +1 -0
  42. package/dist/dashboard/assets/el-GR-BZB4AONW-JfJ7Iw6d.js +10 -0
  43. package/dist/dashboard/assets/{erDiagram-SMLLAGMA-D2sqkGin.js → erDiagram-SMLLAGMA-tggQbGeM.js} +1 -1
  44. package/dist/dashboard/assets/es-ES-U4NZUMDT-CrTG5SH1.js +9 -0
  45. package/dist/dashboard/assets/eu-ES-A7QVB2H4-CLi-f2S4.js +11 -0
  46. package/dist/dashboard/assets/extends-CF3RwP-h.js +1 -0
  47. package/dist/dashboard/assets/fa-IR-HGAKTJCU-B78t-ifl.js +8 -0
  48. package/dist/dashboard/assets/fi-FI-Z5N7JZ37-BiYGo0tM.js +6 -0
  49. package/dist/dashboard/assets/file-open-002ab408-DIuFHtCF.js +1 -0
  50. package/dist/dashboard/assets/file-open-7c801643-684qeFg4.js +1 -0
  51. package/dist/dashboard/assets/file-save-3189631c-C1wFhQhH.js +1 -0
  52. package/dist/dashboard/assets/file-save-745eba88-Bb9F9Kg7.js +1 -0
  53. package/dist/dashboard/assets/{flowDiagram-DWJPFMVM-DrMlKBYA.js → flowDiagram-DWJPFMVM-DfOOuTHa.js} +1 -1
  54. package/dist/dashboard/assets/fr-FR-RHASNOE6-CHuvxlm9.js +9 -0
  55. package/dist/dashboard/assets/{ganttDiagram-T4ZO3ILL-Cf4FbEFp.js → ganttDiagram-T4ZO3ILL-CqRBfUlO.js} +1 -1
  56. package/dist/dashboard/assets/{gitGraphDiagram-UUTBAWPF-BsbOq1C9.js → gitGraphDiagram-UUTBAWPF-DCooi0ou.js} +1 -1
  57. package/dist/dashboard/assets/gl-ES-HMX3MZ6V-DloFVgGH.js +10 -0
  58. package/dist/dashboard/assets/{graph-CUxxgCtS.js → graph-CbTgvSod.js} +1 -1
  59. package/dist/dashboard/assets/he-IL-6SHJWFNN-sKyHtCj5.js +10 -0
  60. package/dist/dashboard/assets/hi-IN-IWLTKZ5I-BDBktoGz.js +4 -0
  61. package/dist/dashboard/assets/hu-HU-A5ZG7DT2-CI0m6WdK.js +7 -0
  62. package/dist/dashboard/assets/id-ID-SAP4L64H-o3oCWYJ1.js +10 -0
  63. package/dist/dashboard/assets/image-blob-reduce.esm-D6s-rqMO.js +7 -0
  64. package/dist/dashboard/assets/index-BMwAG0PF.css +1 -0
  65. package/dist/dashboard/assets/index-BzUItYQF.js +19 -0
  66. package/dist/dashboard/assets/index-CIMJcxbn.js +480 -0
  67. package/dist/dashboard/assets/{infoDiagram-42DDH7IO-DTkMnZiD.js → infoDiagram-42DDH7IO-DvXAiIKM.js} +1 -1
  68. package/dist/dashboard/assets/{ishikawaDiagram-UXIWVN3A-CahQ348K.js → ishikawaDiagram-UXIWVN3A-B3k3F-SR.js} +1 -1
  69. package/dist/dashboard/assets/it-IT-JPQ66NNP-B69FvIBl.js +11 -0
  70. package/dist/dashboard/assets/ja-JP-DBVTYXUO-09Dz5R3w.js +8 -0
  71. package/dist/dashboard/assets/{journeyDiagram-VCZTEJTY-BDY2Nslc.js → journeyDiagram-VCZTEJTY-3sYlQlzX.js} +1 -1
  72. package/dist/dashboard/assets/kaa-6HZHGXH3-SFvv5G_m.js +1 -0
  73. package/dist/dashboard/assets/kab-KAB-ZGHBKWFO-Cj4UcDfk.js +8 -0
  74. package/dist/dashboard/assets/{kanban-definition-6JOO6SKY-CgrwoTjI.js → kanban-definition-6JOO6SKY-cGLqpTJv.js} +1 -1
  75. package/dist/dashboard/assets/kk-KZ-P5N5QNE5-BVT_-IeJ.js +1 -0
  76. package/dist/dashboard/assets/km-KH-HSX4SM5Z-BpH_zneK.js +11 -0
  77. package/dist/dashboard/assets/ko-KR-MTYHY66A-BWtVfnIt.js +9 -0
  78. package/dist/dashboard/assets/ku-TR-6OUDTVRD-DKg1sGxW.js +9 -0
  79. package/dist/dashboard/assets/{layout-IaUxkFkm.js → layout-gKZamora.js} +1 -1
  80. package/dist/dashboard/assets/{linear-shc0iNFn.js → linear-DOSQ02II.js} +1 -1
  81. package/dist/dashboard/assets/lt-LT-XHIRWOB4-DFICvEvq.js +3 -0
  82. package/dist/dashboard/assets/lv-LV-5QDEKY6T-CeIp3POy.js +7 -0
  83. package/dist/dashboard/assets/min-BD9nuOyV.js +1 -0
  84. package/dist/dashboard/assets/{mindmap-definition-QFDTVHPH-GmO0JRtA.js → mindmap-definition-QFDTVHPH-DNg9-qbI.js} +7 -7
  85. package/dist/dashboard/assets/mr-IN-CRQNXWMA-CMiofriy.js +13 -0
  86. package/dist/dashboard/assets/my-MM-5M5IBNSE-WhbW1bUQ.js +1 -0
  87. package/dist/dashboard/assets/nb-NO-T6EIAALU-kvj3GRtN.js +10 -0
  88. package/dist/dashboard/assets/nl-NL-IS3SIHDZ-BdYOVmBV.js +8 -0
  89. package/dist/dashboard/assets/nn-NO-6E72VCQL-BAI1MQoO.js +8 -0
  90. package/dist/dashboard/assets/oc-FR-POXYY2M6-ChavJGTr.js +8 -0
  91. package/dist/dashboard/assets/pa-IN-N4M65BXN-AWmvLRaa.js +4 -0
  92. package/dist/dashboard/assets/percentages-BXMCSKIN-QYboYPU4.js +215 -0
  93. package/dist/dashboard/assets/pica-DzAIGpll.js +7 -0
  94. package/dist/dashboard/assets/{pieDiagram-DEJITSTG-Bfm_toYA.js → pieDiagram-DEJITSTG-C4ZFpuC0.js} +1 -1
  95. package/dist/dashboard/assets/pl-PL-T2D74RX3-C06LuJit.js +9 -0
  96. package/dist/dashboard/assets/pt-BR-5N22H2LF-DP-AXG39.js +9 -0
  97. package/dist/dashboard/assets/pt-PT-UZXXM6DQ-T-2COPG-.js +9 -0
  98. package/dist/dashboard/assets/{quadrantDiagram-34T5L4WZ-DIjTM3lm.js → quadrantDiagram-34T5L4WZ-yvEQRUmq.js} +1 -1
  99. package/dist/dashboard/assets/{requirementDiagram-MS252O5E-B9AEoGYh.js → requirementDiagram-MS252O5E-BkjbZkw1.js} +1 -1
  100. package/dist/dashboard/assets/ro-RO-JPDTUUEW-V8ShMmhj.js +11 -0
  101. package/dist/dashboard/assets/roundRect-0PYZxl1G.js +1 -0
  102. package/dist/dashboard/assets/ru-RU-B4JR7IUQ-Bk5QWjQg.js +9 -0
  103. package/dist/dashboard/assets/{sankeyDiagram-XADWPNL6-C_O5XLXm.js → sankeyDiagram-XADWPNL6-_6wZr0Q4.js} +1 -1
  104. package/dist/dashboard/assets/{sequenceDiagram-FGHM5R23-CHSxSvmJ.js → sequenceDiagram-FGHM5R23-B03MUCIO.js} +1 -1
  105. package/dist/dashboard/assets/si-LK-N5RQ5JYF-DrLyNjX_.js +1 -0
  106. package/dist/dashboard/assets/sk-SK-C5VTKIMK-MG2XJDav.js +6 -0
  107. package/dist/dashboard/assets/sl-SI-NN7IZMDC-DyF2jYcb.js +6 -0
  108. package/dist/dashboard/assets/{stateDiagram-FHFEXIEX-B0URrhHw.js → stateDiagram-FHFEXIEX-DW9W8hRb.js} +1 -1
  109. package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-DGLHFCvB.js +1 -0
  110. package/dist/dashboard/assets/subset-shared.chunk-DxnLkUkc.js +84 -0
  111. package/dist/dashboard/assets/subset-worker.chunk-BCGTROg4.js +1 -0
  112. package/dist/dashboard/assets/sv-SE-XGPEYMSR-BJOlh7Ta.js +10 -0
  113. package/dist/dashboard/assets/ta-IN-2NMHFXQM-DbvdzD_M.js +9 -0
  114. package/dist/dashboard/assets/th-TH-HPSO5L25-BZoStbWu.js +2 -0
  115. package/dist/dashboard/assets/{timeline-definition-GMOUNBTQ-CycU2gVC.js → timeline-definition-GMOUNBTQ-Cq3P6C9q.js} +1 -1
  116. package/dist/dashboard/assets/tr-TR-DEFEU3FU-D0q3dp6Y.js +7 -0
  117. package/dist/dashboard/assets/uk-UA-QMV73CPH-KQC76_Jh.js +6 -0
  118. package/dist/dashboard/assets/{vennDiagram-DHZGUBPP-DcU2536G.js → vennDiagram-DHZGUBPP-BO3azTdL.js} +1 -1
  119. package/dist/dashboard/assets/vi-VN-M7AON7JQ-BsyXHyOP.js +5 -0
  120. package/dist/dashboard/assets/{wardley-RL74JXVD-BWqqaX3S.js → wardley-RL74JXVD-BjaWFGf-.js} +1 -1
  121. package/dist/dashboard/assets/{wardleyDiagram-NUSXRM2D-CUnIHJgd.js → wardleyDiagram-NUSXRM2D-D0Ghwhzw.js} +1 -1
  122. package/dist/dashboard/assets/{xychartDiagram-5P7HB3ND-b9fcOYTj.js → xychartDiagram-5P7HB3ND-D1QYeAFg.js} +1 -1
  123. package/dist/dashboard/assets/zh-CN-LNUGB5OW-Cg54ea9D.js +10 -0
  124. package/dist/dashboard/assets/zh-HK-E62DVLB3-N7JXSzdg.js +1 -0
  125. package/dist/dashboard/assets/zh-TW-RAJ6MFWO-CTX6fzNp.js +9 -0
  126. package/dist/dashboard/index.html +2 -2
  127. package/dist/index.js +2519 -1270
  128. package/dist/skill-packs/excalidraw/SKILL.md +82 -3
  129. package/dist/skill-packs/video-watching/SKILL.md +54 -13
  130. package/dist/skill-packs/video-watching/scripts/build_frame_index.py +61 -10
  131. package/dist/skill-packs/video-watching/scripts/transcribe.sh +147 -54
  132. package/dist/templates/init/data-structures/default.md +26 -24
  133. package/package.json +1 -1
  134. package/skill/SKILL.md +48 -12
  135. package/skill-packs/excalidraw/SKILL.md +82 -3
  136. package/skill-packs/video-watching/SKILL.md +54 -13
  137. package/skill-packs/video-watching/scripts/build_frame_index.py +61 -10
  138. package/skill-packs/video-watching/scripts/transcribe.sh +147 -54
  139. package/dist/dashboard/assets/channel-zrLwggBX.js +0 -1
  140. package/dist/dashboard/assets/classDiagram-6PBFFD2Q-BvejNiwH.js +0 -1
  141. package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-BvejNiwH.js +0 -1
  142. package/dist/dashboard/assets/clone-BFVdml6g.js +0 -1
  143. package/dist/dashboard/assets/index-CqSkXBSu.css +0 -1
  144. package/dist/dashboard/assets/index-flRpQtDj.js +0 -476
  145. package/dist/dashboard/assets/min-BIL7YgTN.js +0 -1
  146. package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-FdAb9MBo.js +0 -1
  147. package/dist/skill-packs/video-watching/scripts/gap_fill.py +0 -45
  148. package/skill-packs/video-watching/scripts/gap_fill.py +0 -45
@@ -0,0 +1,480 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-KV5264BT-BsnIu1de.js","assets/graph-CbTgvSod.js","assets/_baseUniq-BatmaIH2.js","assets/layout-gKZamora.js","assets/min-BD9nuOyV.js","assets/clone-DSjY5D8g.js","assets/cose-bilkent-S5V4N54A-86wk8_0k.js","assets/cytoscape.esm-D_LviqZs.js","assets/c4Diagram-AHTNJAMY-DAT2Y4Ei.js","assets/chunk-YZCP3GAM-DGd7UTQr.js","assets/flowDiagram-DWJPFMVM-DfOOuTHa.js","assets/chunk-FMBD7UC4-6-Dp_BQr.js","assets/chunk-55IACEB6-WENWKOcW.js","assets/chunk-EDXVE4YY-BupZpcZ0.js","assets/channel-JlaJkLX7.js","assets/erDiagram-SMLLAGMA-tggQbGeM.js","assets/gitGraphDiagram-UUTBAWPF-DCooi0ou.js","assets/chunk-4BX2VUAB-ng6_uP1b.js","assets/chunk-QZHKN3VN-CdV3chea.js","assets/wardley-RL74JXVD-BjaWFGf-.js","assets/ganttDiagram-T4ZO3ILL-CqRBfUlO.js","assets/linear-DOSQ02II.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-42DDH7IO-DvXAiIKM.js","assets/pieDiagram-DEJITSTG-C4ZFpuC0.js","assets/arc-DqjLlF-x.js","assets/quadrantDiagram-34T5L4WZ-yvEQRUmq.js","assets/xychartDiagram-5P7HB3ND-D1QYeAFg.js","assets/requirementDiagram-MS252O5E-BkjbZkw1.js","assets/sequenceDiagram-FGHM5R23-B03MUCIO.js","assets/classDiagram-6PBFFD2Q-BBVZgLT7.js","assets/chunk-4TB4RGXK-JyQRd6F4.js","assets/classDiagram-v2-HSJHXN6E-BBVZgLT7.js","assets/stateDiagram-FHFEXIEX-DW9W8hRb.js","assets/chunk-OYMX7WX6-CRMXMXMR.js","assets/stateDiagram-v2-QKLJ7IA2-DGLHFCvB.js","assets/journeyDiagram-VCZTEJTY-3sYlQlzX.js","assets/timeline-definition-GMOUNBTQ-Cq3P6C9q.js","assets/mindmap-definition-QFDTVHPH-DNg9-qbI.js","assets/kanban-definition-6JOO6SKY-cGLqpTJv.js","assets/diagram-TYMM5635-Co4XFxnB.js","assets/diagram-MMDJMWI5-4PK6U-9k.js","assets/blockDiagram-DXYQGD6D-dX-e3JNh.js","assets/diagram-5BDNPKRD-BfKZpkO_.js","assets/architectureDiagram-Q4EWVU46-u9hbL6uu.js","assets/diagram-G4DWMVQ6-BGEdOZis.js","assets/wardleyDiagram-NUSXRM2D-D0Ghwhzw.js","assets/percentages-BXMCSKIN-QYboYPU4.js","assets/extends-CF3RwP-h.js","assets/BrainCanvas3D-Bb8WCKrn.js"])))=>i.map(i=>d[i]);
2
+ var e4=Object.defineProperty;var _2=r=>{throw TypeError(r)};var r4=(r,e,i)=>e in r?e4(r,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[e]=i;var ne=(r,e,i)=>r4(r,typeof e!="symbol"?e+"":e,i),E0=(r,e,i)=>e.has(r)||_2("Cannot "+i);var et=(r,e,i)=>(E0(r,e,"read from private field"),i?i.call(r):e.get(r)),ae=(r,e,i)=>e.has(r)?_2("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,i),zt=(r,e,i,n)=>(E0(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),Ne=(r,e,i)=>(E0(r,e,"access private method"),i);var cp=(r,e,i,n)=>({set _(a){zt(r,e,a,i)},get _(){return et(r,e,n)}});function i4(r,e){for(var i=0;i<e.length;i++){const n=e[i];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in r)){const o=Object.getOwnPropertyDescriptor(n,a);o&&Object.defineProperty(r,a,o.get?o:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function i(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(a){if(a.ep)return;a.ep=!0;const o=i(a);fetch(a.href,o)}})();var lst=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dd(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function cst(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var e=r.default;if(typeof e=="function"){var i=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var a=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(i,n,a.get?a:{enumerable:!0,get:function(){return r[n]}})}),i}var A0={exports:{}},mu={};/**
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 C2;function n4(){if(C2)return mu;C2=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(n,a,o){var c=null;if(o!==void 0&&(c=""+o),a.key!==void 0&&(c=""+a.key),"key"in a){o={};for(var h in a)h!=="key"&&(o[h]=a[h])}else o=a;return a=o.ref,{$$typeof:r,type:n,key:c,ref:a!==void 0?a:null,props:o}}return mu.Fragment=e,mu.jsx=i,mu.jsxs=i,mu}var k2;function a4(){return k2||(k2=1,A0.exports=n4()),A0.exports}var x=a4(),N0={exports:{}},xe={};/**
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 w2;function s4(){if(w2)return xe;w2=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function m(G){return G===null||typeof G!="object"?null:(G=b&&G[b]||G["@@iterator"],typeof G=="function"?G:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,C={};function w(G,J,lt){this.props=G,this.context=J,this.refs=C,this.updater=lt||v}w.prototype.isReactComponent={},w.prototype.setState=function(G,J){if(typeof G!="object"&&typeof G!="function"&&G!=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,G,J,"setState")},w.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function T(){}T.prototype=w.prototype;function E(G,J,lt){this.props=G,this.context=J,this.refs=C,this.updater=lt||v}var N=E.prototype=new T;N.constructor=E,_(N,w.prototype),N.isPureReactComponent=!0;var O=Array.isArray;function B(){}var A={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function P(G,J,lt){var st=lt.ref;return{$$typeof:r,type:G,key:J,ref:st!==void 0?st:null,props:lt}}function j(G,J){return P(G.type,J,G.props)}function $(G){return typeof G=="object"&&G!==null&&G.$$typeof===r}function X(G){var J={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(lt){return J[lt]})}var W=/\/+/g;function F(G,J){return typeof G=="object"&&G!==null&&G.key!=null?X(""+G.key):J.toString(36)}function U(G){switch(G.status){case"fulfilled":return G.value;case"rejected":throw G.reason;default:switch(typeof G.status=="string"?G.then(B,B):(G.status="pending",G.then(function(J){G.status==="pending"&&(G.status="fulfilled",G.value=J)},function(J){G.status==="pending"&&(G.status="rejected",G.reason=J)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function D(G,J,lt,st,vt){var kt=typeof G;(kt==="undefined"||kt==="boolean")&&(G=null);var Mt=!1;if(G===null)Mt=!0;else switch(kt){case"bigint":case"string":case"number":Mt=!0;break;case"object":switch(G.$$typeof){case r:case e:Mt=!0;break;case f:return Mt=G._init,D(Mt(G._payload),J,lt,st,vt)}}if(Mt)return vt=vt(G),Mt=st===""?"."+F(G,0):st,O(vt)?(lt="",Mt!=null&&(lt=Mt.replace(W,"$&/")+"/"),D(vt,J,lt,"",function(pt){return pt})):vt!=null&&($(vt)&&(vt=j(vt,lt+(vt.key==null||G&&G.key===vt.key?"":(""+vt.key).replace(W,"$&/")+"/")+Mt)),J.push(vt)),1;Mt=0;var it=st===""?".":st+":";if(O(G))for(var xt=0;xt<G.length;xt++)st=G[xt],kt=it+F(st,xt),Mt+=D(st,J,lt,kt,vt);else if(xt=m(G),typeof xt=="function")for(G=xt.call(G),xt=0;!(st=G.next()).done;)st=st.value,kt=it+F(st,xt++),Mt+=D(st,J,lt,kt,vt);else if(kt==="object"){if(typeof G.then=="function")return D(U(G),J,lt,st,vt);throw J=String(G),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return Mt}function z(G,J,lt){if(G==null)return G;var st=[],vt=0;return D(G,st,"","",function(kt){return J.call(lt,kt,vt++)}),st}function H(G){if(G._status===-1){var J=G._result;J=J(),J.then(function(lt){(G._status===0||G._status===-1)&&(G._status=1,G._result=lt)},function(lt){(G._status===0||G._status===-1)&&(G._status=2,G._result=lt)}),G._status===-1&&(G._status=0,G._result=J)}if(G._status===1)return G._result.default;throw G._result}var V=typeof reportError=="function"?reportError:function(G){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof G=="object"&&G!==null&&typeof G.message=="string"?String(G.message):String(G),error:G});if(!window.dispatchEvent(J))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",G);return}console.error(G)},Q={map:z,forEach:function(G,J,lt){z(G,function(){J.apply(this,arguments)},lt)},count:function(G){var J=0;return z(G,function(){J++}),J},toArray:function(G){return z(G,function(J){return J})||[]},only:function(G){if(!$(G))throw Error("React.Children.only expected to receive a single React element child.");return G}};return xe.Activity=g,xe.Children=Q,xe.Component=w,xe.Fragment=i,xe.Profiler=a,xe.PureComponent=E,xe.StrictMode=n,xe.Suspense=u,xe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,xe.__COMPILER_RUNTIME={__proto__:null,c:function(G){return A.H.useMemoCache(G)}},xe.cache=function(G){return function(){return G.apply(null,arguments)}},xe.cacheSignal=function(){return null},xe.cloneElement=function(G,J,lt){if(G==null)throw Error("The argument must be a React element, but you passed "+G+".");var st=_({},G.props),vt=G.key;if(J!=null)for(kt in J.key!==void 0&&(vt=""+J.key),J)!L.call(J,kt)||kt==="key"||kt==="__self"||kt==="__source"||kt==="ref"&&J.ref===void 0||(st[kt]=J[kt]);var kt=arguments.length-2;if(kt===1)st.children=lt;else if(1<kt){for(var Mt=Array(kt),it=0;it<kt;it++)Mt[it]=arguments[it+2];st.children=Mt}return P(G.type,vt,st)},xe.createContext=function(G){return G={$$typeof:c,_currentValue:G,_currentValue2:G,_threadCount:0,Provider:null,Consumer:null},G.Provider=G,G.Consumer={$$typeof:o,_context:G},G},xe.createElement=function(G,J,lt){var st,vt={},kt=null;if(J!=null)for(st in J.key!==void 0&&(kt=""+J.key),J)L.call(J,st)&&st!=="key"&&st!=="__self"&&st!=="__source"&&(vt[st]=J[st]);var Mt=arguments.length-2;if(Mt===1)vt.children=lt;else if(1<Mt){for(var it=Array(Mt),xt=0;xt<Mt;xt++)it[xt]=arguments[xt+2];vt.children=it}if(G&&G.defaultProps)for(st in Mt=G.defaultProps,Mt)vt[st]===void 0&&(vt[st]=Mt[st]);return P(G,kt,vt)},xe.createRef=function(){return{current:null}},xe.forwardRef=function(G){return{$$typeof:h,render:G}},xe.isValidElement=$,xe.lazy=function(G){return{$$typeof:f,_payload:{_status:-1,_result:G},_init:H}},xe.memo=function(G,J){return{$$typeof:d,type:G,compare:J===void 0?null:J}},xe.startTransition=function(G){var J=A.T,lt={};A.T=lt;try{var st=G(),vt=A.S;vt!==null&&vt(lt,st),typeof st=="object"&&st!==null&&typeof st.then=="function"&&st.then(B,V)}catch(kt){V(kt)}finally{J!==null&&lt.types!==null&&(J.types=lt.types),A.T=J}},xe.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},xe.use=function(G){return A.H.use(G)},xe.useActionState=function(G,J,lt){return A.H.useActionState(G,J,lt)},xe.useCallback=function(G,J){return A.H.useCallback(G,J)},xe.useContext=function(G){return A.H.useContext(G)},xe.useDebugValue=function(){},xe.useDeferredValue=function(G,J){return A.H.useDeferredValue(G,J)},xe.useEffect=function(G,J){return A.H.useEffect(G,J)},xe.useEffectEvent=function(G){return A.H.useEffectEvent(G)},xe.useId=function(){return A.H.useId()},xe.useImperativeHandle=function(G,J,lt){return A.H.useImperativeHandle(G,J,lt)},xe.useInsertionEffect=function(G,J){return A.H.useInsertionEffect(G,J)},xe.useLayoutEffect=function(G,J){return A.H.useLayoutEffect(G,J)},xe.useMemo=function(G,J){return A.H.useMemo(G,J)},xe.useOptimistic=function(G,J){return A.H.useOptimistic(G,J)},xe.useReducer=function(G,J,lt){return A.H.useReducer(G,J,lt)},xe.useRef=function(G){return A.H.useRef(G)},xe.useState=function(G){return A.H.useState(G)},xe.useSyncExternalStore=function(G,J,lt){return A.H.useSyncExternalStore(G,J,lt)},xe.useTransition=function(){return A.H.useTransition()},xe.version="19.2.4",xe}var S2;function o1(){return S2||(S2=1,N0.exports=s4()),N0.exports}var K=o1();const BN=Dd(K),hst=i4({__proto__:null,default:BN},[K]);var M0={exports:{}},yu={},B0={exports:{}},L0={};/**
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 T2;function o4(){return T2||(T2=1,(function(r){function e(D,z){var H=D.length;D.push(z);t:for(;0<H;){var V=H-1>>>1,Q=D[V];if(0<a(Q,z))D[V]=z,D[H]=Q,H=V;else break t}}function i(D){return D.length===0?null:D[0]}function n(D){if(D.length===0)return null;var z=D[0],H=D.pop();if(H!==z){D[0]=H;t:for(var V=0,Q=D.length,G=Q>>>1;V<G;){var J=2*(V+1)-1,lt=D[J],st=J+1,vt=D[st];if(0>a(lt,H))st<Q&&0>a(vt,lt)?(D[V]=vt,D[st]=H,V=st):(D[V]=lt,D[J]=H,V=J);else if(st<Q&&0>a(vt,H))D[V]=vt,D[st]=H,V=st;else break t}}return z}function a(D,z){var H=D.sortIndex-z.sortIndex;return H!==0?H:D.id-z.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;r.unstable_now=function(){return o.now()}}else{var c=Date,h=c.now();r.unstable_now=function(){return c.now()-h}}var u=[],d=[],f=1,g=null,b=3,m=!1,v=!1,_=!1,C=!1,w=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function N(D){for(var z=i(d);z!==null;){if(z.callback===null)n(d);else if(z.startTime<=D)n(d),z.sortIndex=z.expirationTime,e(u,z);else break;z=i(d)}}function O(D){if(_=!1,N(D),!v)if(i(u)!==null)v=!0,B||(B=!0,X());else{var z=i(d);z!==null&&U(O,z.startTime-D)}}var B=!1,A=-1,L=5,P=-1;function j(){return C?!0:!(r.unstable_now()-P<L)}function $(){if(C=!1,B){var D=r.unstable_now();P=D;var z=!0;try{t:{v=!1,_&&(_=!1,T(A),A=-1),m=!0;var H=b;try{e:{for(N(D),g=i(u);g!==null&&!(g.expirationTime>D&&j());){var V=g.callback;if(typeof V=="function"){g.callback=null,b=g.priorityLevel;var Q=V(g.expirationTime<=D);if(D=r.unstable_now(),typeof Q=="function"){g.callback=Q,N(D),z=!0;break e}g===i(u)&&n(u),N(D)}else n(u);g=i(u)}if(g!==null)z=!0;else{var G=i(d);G!==null&&U(O,G.startTime-D),z=!1}}break t}finally{g=null,b=H,m=!1}z=void 0}}finally{z?X():B=!1}}}var X;if(typeof E=="function")X=function(){E($)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,F=W.port2;W.port1.onmessage=$,X=function(){F.postMessage(null)}}else X=function(){w($,0)};function U(D,z){A=w(function(){D(r.unstable_now())},z)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(D){D.callback=null},r.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<D?Math.floor(1e3/D):5},r.unstable_getCurrentPriorityLevel=function(){return b},r.unstable_next=function(D){switch(b){case 1:case 2:case 3:var z=3;break;default:z=b}var H=b;b=z;try{return D()}finally{b=H}},r.unstable_requestPaint=function(){C=!0},r.unstable_runWithPriority=function(D,z){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var H=b;b=D;try{return z()}finally{b=H}},r.unstable_scheduleCallback=function(D,z,H){var V=r.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?V+H:V):H=V,D){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=H+Q,D={id:f++,callback:z,priorityLevel:D,startTime:H,expirationTime:Q,sortIndex:-1},H>V?(D.sortIndex=H,e(d,D),i(u)===null&&D===i(d)&&(_?(T(A),A=-1):_=!0,U(O,H-V))):(D.sortIndex=Q,e(u,D),v||m||(v=!0,B||(B=!0,X()))),D},r.unstable_shouldYield=j,r.unstable_wrapCallback=function(D){var z=b;return function(){var H=b;b=z;try{return D.apply(this,arguments)}finally{b=H}}}})(L0)),L0}var E2;function l4(){return E2||(E2=1,B0.exports=o4()),B0.exports}var O0={exports:{}},Bi={};/**
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 A2;function c4(){if(A2)return Bi;A2=1;var r=o1();function e(u){var d="https://react.dev/errors/"+u;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)d+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+u+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var n={d:{f:i,r:function(){throw Error(e(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(u,d,f){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:g==null?null:""+g,children:u,containerInfo:d,implementation:f}}var c=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(u,d){if(u==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Bi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,Bi.createPortal=function(u,d){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(e(299));return o(u,d,null,f)},Bi.flushSync=function(u){var d=c.T,f=n.p;try{if(c.T=null,n.p=2,u)return u()}finally{c.T=d,n.p=f,n.d.f()}},Bi.preconnect=function(u,d){typeof u=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,n.d.C(u,d))},Bi.prefetchDNS=function(u){typeof u=="string"&&n.d.D(u)},Bi.preinit=function(u,d){if(typeof u=="string"&&d&&typeof d.as=="string"){var f=d.as,g=h(f,d.crossOrigin),b=typeof d.integrity=="string"?d.integrity:void 0,m=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;f==="style"?n.d.S(u,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:m}):f==="script"&&n.d.X(u,{crossOrigin:g,integrity:b,fetchPriority:m,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Bi.preinitModule=function(u,d){if(typeof u=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var f=h(d.as,d.crossOrigin);n.d.M(u,{crossOrigin:f,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&n.d.M(u)},Bi.preload=function(u,d){if(typeof u=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var f=d.as,g=h(f,d.crossOrigin);n.d.L(u,f,{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})}},Bi.preloadModule=function(u,d){if(typeof u=="string")if(d){var f=h(d.as,d.crossOrigin);n.d.m(u,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:f,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else n.d.m(u)},Bi.requestFormReset=function(u){n.d.r(u)},Bi.unstable_batchedUpdates=function(u,d){return u(d)},Bi.useFormState=function(u,d,f){return c.H.useFormState(u,d,f)},Bi.useFormStatus=function(){return c.H.useHostTransitionStatus()},Bi.version="19.2.4",Bi}var N2;function h4(){if(N2)return O0.exports;N2=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),O0.exports=c4(),O0.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 M2;function u4(){if(M2)return yu;M2=1;var r=l4(),e=o1(),i=h4();function n(s){var l="https://react.dev/errors/"+s;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)l+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function o(s){var l=s,p=s;if(s.alternate)for(;l.return;)l=l.return;else{s=l;do l=s,(l.flags&4098)!==0&&(p=l.return),s=l.return;while(s)}return l.tag===3?p:null}function c(s){if(s.tag===13){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function h(s){if(s.tag===31){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function u(s){if(o(s)!==s)throw Error(n(188))}function d(s){var l=s.alternate;if(!l){if(l=o(s),l===null)throw Error(n(188));return l!==s?null:s}for(var p=s,y=l;;){var k=p.return;if(k===null)break;var S=k.alternate;if(S===null){if(y=k.return,y!==null){p=y;continue}break}if(k.child===S.child){for(S=k.child;S;){if(S===p)return u(k),s;if(S===y)return u(k),l;S=S.sibling}throw Error(n(188))}if(p.return!==y.return)p=k,y=S;else{for(var R=!1,q=k.child;q;){if(q===p){R=!0,p=k,y=S;break}if(q===y){R=!0,y=k,p=S;break}q=q.sibling}if(!R){for(q=S.child;q;){if(q===p){R=!0,p=S,y=k;break}if(q===y){R=!0,y=S,p=k;break}q=q.sibling}if(!R)throw Error(n(189))}}if(p.alternate!==y)throw Error(n(190))}if(p.tag!==3)throw Error(n(188));return p.stateNode.current===p?s:l}function f(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s;for(s=s.child;s!==null;){if(l=f(s),l!==null)return l;s=s.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),m=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),E=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),$=Symbol.iterator;function X(s){return s===null||typeof s!="object"?null:(s=$&&s[$]||s["@@iterator"],typeof s=="function"?s:null)}var W=Symbol.for("react.client.reference");function F(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===W?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case _:return"Fragment";case w:return"Profiler";case C:return"StrictMode";case O:return"Suspense";case B:return"SuspenseList";case P:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case v:return"Portal";case E:return s.displayName||"Context";case T:return(s._context.displayName||"Context")+".Consumer";case N:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case A:return l=s.displayName||null,l!==null?l:F(s.type)||"Memo";case L:l=s._payload,s=s._init;try{return F(s(l))}catch{}}return null}var U=Array.isArray,D=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},V=[],Q=-1;function G(s){return{current:s}}function J(s){0>Q||(s.current=V[Q],V[Q]=null,Q--)}function lt(s,l){Q++,V[Q]=s.current,s.current=l}var st=G(null),vt=G(null),kt=G(null),Mt=G(null);function it(s,l){switch(lt(kt,l),lt(vt,s),lt(st,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?Hw(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=Hw(l),s=Gw(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}J(st),lt(st,s)}function xt(){J(st),J(vt),J(kt)}function pt(s){s.memoizedState!==null&&lt(Mt,s);var l=st.current,p=Gw(l,s.type);l!==p&&(lt(vt,s),lt(st,p))}function Et(s){vt.current===s&&(J(st),J(vt)),Mt.current===s&&(J(Mt),du._currentValue=H)}var Ut,Gt;function ie(s){if(Ut===void 0)try{throw Error()}catch(p){var l=p.stack.trim().match(/\n( *(at )?)/);Ut=l&&l[1]||"",Gt=-1<p.stack.indexOf(`
43
+ at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
44
+ `+Ut+s+Gt}var Dt=!1;function Jt(s,l){if(!s||Dt)return"";Dt=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var y={DetermineComponentFrameRoot:function(){try{if(l){var St=function(){throw Error()};if(Object.defineProperty(St.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(St,[])}catch(mt){var ft=mt}Reflect.construct(s,[],St)}else{try{St.call()}catch(mt){ft=mt}s.call(St.prototype)}}else{try{throw Error()}catch(mt){ft=mt}(St=s())&&typeof St.catch=="function"&&St.catch(function(){})}}catch(mt){if(mt&&ft&&typeof mt.stack=="string")return[mt.stack,ft.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var k=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");k&&k.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var S=y.DetermineComponentFrameRoot(),R=S[0],q=S[1];if(R&&q){var Z=R.split(`
45
+ `),ut=q.split(`
46
+ `);for(k=y=0;y<Z.length&&!Z[y].includes("DetermineComponentFrameRoot");)y++;for(;k<ut.length&&!ut[k].includes("DetermineComponentFrameRoot");)k++;if(y===Z.length||k===ut.length)for(y=Z.length-1,k=ut.length-1;1<=y&&0<=k&&Z[y]!==ut[k];)k--;for(;1<=y&&0<=k;y--,k--)if(Z[y]!==ut[k]){if(y!==1||k!==1)do if(y--,k--,0>k||Z[y]!==ut[k]){var Ct=`
47
+ `+Z[y].replace(" at new "," at ");return s.displayName&&Ct.includes("<anonymous>")&&(Ct=Ct.replace("<anonymous>",s.displayName)),Ct}while(1<=y&&0<=k);break}}}finally{Dt=!1,Error.prepareStackTrace=p}return(p=s?s.displayName||s.name:"")?ie(p):""}function Le(s,l){switch(s.tag){case 26:case 27:case 5:return ie(s.type);case 16:return ie("Lazy");case 13:return s.child!==l&&l!==null?ie("Suspense Fallback"):ie("Suspense");case 19:return ie("SuspenseList");case 0:case 15:return Jt(s.type,!1);case 11:return Jt(s.type.render,!1);case 1:return Jt(s.type,!0);case 31:return ie("Activity");default:return""}}function hr(s){try{var l="",p=null;do l+=Le(s,p),p=s,s=s.return;while(s);return l}catch(y){return`
48
+ Error generating stack: `+y.message+`
49
+ `+y.stack}}var qr=Object.prototype.hasOwnProperty,ve=r.unstable_scheduleCallback,Ee=r.unstable_cancelCallback,Ge=r.unstable_shouldYield,Ar=r.unstable_requestPaint,Me=r.unstable_now,Nr=r.unstable_getCurrentPriorityLevel,yr=r.unstable_ImmediatePriority,ii=r.unstable_UserBlockingPriority,di=r.unstable_NormalPriority,$i=r.unstable_LowPriority,Ur=r.unstable_IdlePriority,aa=r.log,sa=r.unstable_setDisableYieldValue,Yr=null,Cr=null;function yi(s){if(typeof aa=="function"&&sa(s),Cr&&typeof Cr.setStrictMode=="function")try{Cr.setStrictMode(Yr,s)}catch{}}var kr=Math.clz32?Math.clz32:zi,On=Math.log,Vr=Math.LN2;function zi(s){return s>>>=0,s===0?32:31-(On(s)/Vr|0)|0}var Ae=256,bi=262144,xi=4194304;function Or(s){var l=s&42;if(l!==0)return l;switch(s&-s){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 s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function tt(s,l,p){var y=s.pendingLanes;if(y===0)return 0;var k=0,S=s.suspendedLanes,R=s.pingedLanes;s=s.warmLanes;var q=y&134217727;return q!==0?(y=q&~S,y!==0?k=Or(y):(R&=q,R!==0?k=Or(R):p||(p=q&~s,p!==0&&(k=Or(p))))):(q=y&~S,q!==0?k=Or(q):R!==0?k=Or(R):p||(p=y&~s,p!==0&&(k=Or(p)))),k===0?0:l!==0&&l!==k&&(l&S)===0&&(S=k&-k,p=l&-l,S>=p||S===32&&(p&4194048)!==0)?l:k}function _t(s,l){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function Ot(s,l){switch(s){case 1:case 2:case 4:case 8:case 64:return l+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 l+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 le(){var s=xi;return xi<<=1,(xi&62914560)===0&&(xi=4194304),s}function Qe(s){for(var l=[],p=0;31>p;p++)l.push(s);return l}function ue(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Pt(s,l,p,y,k,S){var R=s.pendingLanes;s.pendingLanes=p,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=p,s.entangledLanes&=p,s.errorRecoveryDisabledLanes&=p,s.shellSuspendCounter=0;var q=s.entanglements,Z=s.expirationTimes,ut=s.hiddenUpdates;for(p=R&~p;0<p;){var Ct=31-kr(p),St=1<<Ct;q[Ct]=0,Z[Ct]=-1;var ft=ut[Ct];if(ft!==null)for(ut[Ct]=null,Ct=0;Ct<ft.length;Ct++){var mt=ft[Ct];mt!==null&&(mt.lane&=-536870913)}p&=~St}y!==0&&It(s,y,0),S!==0&&k===0&&s.tag!==0&&(s.suspendedLanes|=S&~(R&~l))}function It(s,l,p){s.pendingLanes|=l,s.suspendedLanes&=~l;var y=31-kr(l);s.entangledLanes|=l,s.entanglements[y]=s.entanglements[y]|1073741824|p&261930}function se(s,l){var p=s.entangledLanes|=l;for(s=s.entanglements;p;){var y=31-kr(p),k=1<<y;k&l|s[y]&l&&(s[y]|=l),p&=~k}}function Je(s,l){var p=l&-l;return p=(p&42)!==0?1:sr(p),(p&(s.suspendedLanes|l))!==0?0:p}function sr(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=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:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function en(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Pi(){var s=z.p;return s!==0?s:(s=window.event,s===void 0?32:p2(s.type))}function Kr(s,l){var p=z.p;try{return z.p=s,l()}finally{z.p=p}}var Xr=Math.random().toString(36).slice(2),pr="__reactFiber$"+Xr,Rr="__reactProps$"+Xr,yn="__reactContainer$"+Xr,Rn="__reactEvents$"+Xr,bn="__reactListeners$"+Xr,xn="__reactHandles$"+Xr,vi="__reactResources$"+Xr,Dn="__reactMarker$"+Xr;function Ta(s){delete s[pr],delete s[Rr],delete s[Rn],delete s[bn],delete s[xn]}function ni(s){var l=s[pr];if(l)return l;for(var p=s.parentNode;p;){if(l=p[yn]||p[pr]){if(p=l.alternate,l.child!==null||p!==null&&p.child!==null)for(s=Qw(s);s!==null;){if(p=s[pr])return p;s=Qw(s)}return l}s=p,p=s.parentNode}return null}function qi(s){if(s=s[pr]||s[yn]){var l=s.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return s}return null}function rn(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s.stateNode;throw Error(n(33))}function ai(s){var l=s[vi];return l||(l=s[vi]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function tr(s){s[Dn]=!0}var Ht=new Set,Y={};function bt(s,l){ct(s,l),ct(s+"Capture",l)}function ct(s,l){for(Y[s]=l,s=0;s<l.length;s++)Ht.add(l[s])}var Bt=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]*$"),Ft={},te={};function Oe(s){return qr.call(te,s)?!0:qr.call(Ft,s)?!1:Bt.test(s)?te[s]=!0:(Ft[s]=!0,!1)}function er(s,l,p){if(Oe(l))if(p===null)s.removeAttribute(l);else{switch(typeof p){case"undefined":case"function":case"symbol":s.removeAttribute(l);return;case"boolean":var y=l.toLowerCase().slice(0,5);if(y!=="data-"&&y!=="aria-"){s.removeAttribute(l);return}}s.setAttribute(l,""+p)}}function Pe(s,l,p){if(p===null)s.removeAttribute(l);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(l);return}s.setAttribute(l,""+p)}}function Mr(s,l,p,y){if(y===null)s.removeAttribute(p);else{switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(p);return}s.setAttributeNS(l,p,""+y)}}function ye(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Dr(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Fn(s,l,p){var y=Object.getOwnPropertyDescriptor(s.constructor.prototype,l);if(!s.hasOwnProperty(l)&&typeof y<"u"&&typeof y.get=="function"&&typeof y.set=="function"){var k=y.get,S=y.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return k.call(this)},set:function(R){p=""+R,S.call(this,R)}}),Object.defineProperty(s,l,{enumerable:y.enumerable}),{getValue:function(){return p},setValue:function(R){p=""+R},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function oa(s){if(!s._valueTracker){var l=Dr(s)?"checked":"value";s._valueTracker=Fn(s,l,""+s[l])}}function zs(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var p=l.getValue(),y="";return s&&(y=Dr(s)?s.checked?"true":"false":s.value),s=y,s!==p?(l.setValue(s),!0):!1}function Qa(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var Po=/[\n"\\]/g;function _i(s){return s.replace(Po,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function jn(s,l,p,y,k,S,R,q){s.name="",R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?s.type=R:s.removeAttribute("type"),l!=null?R==="number"?(l===0&&s.value===""||s.value!=l)&&(s.value=""+ye(l)):s.value!==""+ye(l)&&(s.value=""+ye(l)):R!=="submit"&&R!=="reset"||s.removeAttribute("value"),l!=null?Nt(s,R,ye(l)):p!=null?Nt(s,R,ye(p)):y!=null&&s.removeAttribute("value"),k==null&&S!=null&&(s.defaultChecked=!!S),k!=null&&(s.checked=k&&typeof k!="function"&&typeof k!="symbol"),q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"?s.name=""+ye(q):s.removeAttribute("name")}function dt(s,l,p,y,k,S,R,q){if(S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(s.type=S),l!=null||p!=null){if(!(S!=="submit"&&S!=="reset"||l!=null)){oa(s);return}p=p!=null?""+ye(p):"",l=l!=null?""+ye(l):p,q||l===s.value||(s.value=l),s.defaultValue=l}y=y??k,y=typeof y!="function"&&typeof y!="symbol"&&!!y,s.checked=q?s.checked:!!y,s.defaultChecked=!!y,R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(s.name=R),oa(s)}function Nt(s,l,p){l==="number"&&Qa(s.ownerDocument)===s||s.defaultValue===""+p||(s.defaultValue=""+p)}function At(s,l,p,y){if(s=s.options,l){l={};for(var k=0;k<p.length;k++)l["$"+p[k]]=!0;for(p=0;p<s.length;p++)k=l.hasOwnProperty("$"+s[p].value),s[p].selected!==k&&(s[p].selected=k),k&&y&&(s[p].defaultSelected=!0)}else{for(p=""+ye(p),l=null,k=0;k<s.length;k++){if(s[k].value===p){s[k].selected=!0,y&&(s[k].defaultSelected=!0);return}l!==null||s[k].disabled||(l=s[k])}l!==null&&(l.selected=!0)}}function $t(s,l,p){if(l!=null&&(l=""+ye(l),l!==s.value&&(s.value=l),p==null)){s.defaultValue!==l&&(s.defaultValue=l);return}s.defaultValue=p!=null?""+ye(p):""}function we(s,l,p,y){if(l==null){if(y!=null){if(p!=null)throw Error(n(92));if(U(y)){if(1<y.length)throw Error(n(93));y=y[0]}p=y}p==null&&(p=""),l=p}p=ye(l),s.defaultValue=p,y=s.textContent,y===p&&y!==""&&y!==null&&(s.value=y),oa(s)}function jt(s,l){if(l){var p=s.firstChild;if(p&&p===s.lastChild&&p.nodeType===3){p.nodeValue=l;return}}s.textContent=l}var We=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 Be(s,l,p){var y=l.indexOf("--")===0;p==null||typeof p=="boolean"||p===""?y?s.setProperty(l,""):l==="float"?s.cssFloat="":s[l]="":y?s.setProperty(l,p):typeof p!="number"||p===0||We.has(l)?l==="float"?s.cssFloat=p:s[l]=(""+p).trim():s[l]=p+"px"}function Fe(s,l,p){if(l!=null&&typeof l!="object")throw Error(n(62));if(s=s.style,p!=null){for(var y in p)!p.hasOwnProperty(y)||l!=null&&l.hasOwnProperty(y)||(y.indexOf("--")===0?s.setProperty(y,""):y==="float"?s.cssFloat="":s[y]="");for(var k in l)y=l[k],l.hasOwnProperty(k)&&p[k]!==y&&Be(s,k,y)}else for(var S in l)l.hasOwnProperty(S)&&Be(s,S,l[S])}function Mi(s){if(s.indexOf("-")===-1)return!1;switch(s){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 In=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"]]),Ps=/^[\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 qs(s){return Ps.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Rt(){}var Xt=null;function _e(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var je=null,Br=null;function $n(s){var l=qi(s);if(l&&(s=l.stateNode)){var p=s[Rr]||null;t:switch(s=l.stateNode,l.type){case"input":if(jn(s,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name),l=p.name,p.type==="radio"&&l!=null){for(p=s;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll('input[name="'+_i(""+l)+'"][type="radio"]'),l=0;l<p.length;l++){var y=p[l];if(y!==s&&y.form===s.form){var k=y[Rr]||null;if(!k)throw Error(n(90));jn(y,k.value,k.defaultValue,k.defaultValue,k.checked,k.defaultChecked,k.type,k.name)}}for(l=0;l<p.length;l++)y=p[l],y.form===s.form&&zs(y)}break t;case"textarea":$t(s,p.value,p.defaultValue);break t;case"select":l=p.value,l!=null&&At(s,!!p.multiple,l,!1)}}}var Ah=!1;function Jd(s,l,p){if(Ah)return s(l,p);Ah=!0;try{var y=s(l);return y}finally{if(Ah=!1,(je!==null||Br!==null)&&(Pf(),je&&(l=je,s=Br,Br=je=null,$n(l),s)))for(l=0;l<s.length;l++)$n(s[l])}}function Nh(s,l){var p=s.stateNode;if(p===null)return null;var y=p[Rr]||null;if(y===null)return null;p=y[l];t:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(s=s.type,y=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!y;break t;default:s=!1}if(s)return null;if(p&&typeof p!="function")throw Error(n(231,l,typeof p));return p}var Ja=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Em=!1;if(Ja)try{var Mh={};Object.defineProperty(Mh,"passive",{get:function(){Em=!0}}),window.addEventListener("test",Mh,Mh),window.removeEventListener("test",Mh,Mh)}catch{Em=!1}var Us=null,Am=null,tf=null;function G_(){if(tf)return tf;var s,l=Am,p=l.length,y,k="value"in Us?Us.value:Us.textContent,S=k.length;for(s=0;s<p&&l[s]===k[s];s++);var R=p-s;for(y=1;y<=R&&l[p-y]===k[S-y];y++);return tf=k.slice(s,1<y?1-y:void 0)}function ef(s){var l=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&l===13&&(s=13)):s=l,s===10&&(s=13),32<=s||s===13?s:0}function rf(){return!0}function W_(){return!1}function nn(s){function l(p,y,k,S,R){this._reactName=p,this._targetInst=k,this.type=y,this.nativeEvent=S,this.target=R,this.currentTarget=null;for(var q in s)s.hasOwnProperty(q)&&(p=s[q],this[q]=p?p(S):S[q]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?rf:W_,this.isPropagationStopped=W_,this}return g(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=rf)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=rf)},persist:function(){},isPersistent:rf}),l}var qo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nf=nn(qo),Bh=g({},qo,{view:0,detail:0}),JD=nn(Bh),Nm,Mm,Lh,af=g({},Bh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lm,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Lh&&(Lh&&s.type==="mousemove"?(Nm=s.screenX-Lh.screenX,Mm=s.screenY-Lh.screenY):Mm=Nm=0,Lh=s),Nm)},movementY:function(s){return"movementY"in s?s.movementY:Mm}}),Y_=nn(af),tF=g({},af,{dataTransfer:0}),eF=nn(tF),rF=g({},Bh,{relatedTarget:0}),Bm=nn(rF),iF=g({},qo,{animationName:0,elapsedTime:0,pseudoElement:0}),nF=nn(iF),aF=g({},qo,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),sF=nn(aF),oF=g({},qo,{data:0}),V_=nn(oF),lF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cF={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"},hF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function uF(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=hF[s])?!!l[s]:!1}function Lm(){return uF}var dF=g({},Bh,{key:function(s){if(s.key){var l=lF[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=ef(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?cF[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lm,charCode:function(s){return s.type==="keypress"?ef(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?ef(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),fF=nn(dF),pF=g({},af,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),K_=nn(pF),gF=g({},Bh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lm}),mF=nn(gF),yF=g({},qo,{propertyName:0,elapsedTime:0,pseudoElement:0}),bF=nn(yF),xF=g({},af,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),vF=nn(xF),_F=g({},qo,{newState:0,oldState:0}),CF=nn(_F),kF=[9,13,27,32],Om=Ja&&"CompositionEvent"in window,Oh=null;Ja&&"documentMode"in document&&(Oh=document.documentMode);var wF=Ja&&"TextEvent"in window&&!Oh,X_=Ja&&(!Om||Oh&&8<Oh&&11>=Oh),Z_=" ",Q_=!1;function J_(s,l){switch(s){case"keyup":return kF.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tC(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Vl=!1;function SF(s,l){switch(s){case"compositionend":return tC(l);case"keypress":return l.which!==32?null:(Q_=!0,Z_);case"textInput":return s=l.data,s===Z_&&Q_?null:s;default:return null}}function TF(s,l){if(Vl)return s==="compositionend"||!Om&&J_(s,l)?(s=G_(),tf=Am=Us=null,Vl=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return X_&&l.locale!=="ko"?null:l.data;default:return null}}var EF={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 eC(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!EF[s.type]:l==="textarea"}function rC(s,l,p,y){je?Br?Br.push(y):Br=[y]:je=y,l=Vf(l,"onChange"),0<l.length&&(p=new nf("onChange","change",null,p,y),s.push({event:p,listeners:l}))}var Rh=null,Dh=null;function AF(s){Iw(s,0)}function sf(s){var l=rn(s);if(zs(l))return s}function iC(s,l){if(s==="change")return l}var nC=!1;if(Ja){var Rm;if(Ja){var Dm="oninput"in document;if(!Dm){var aC=document.createElement("div");aC.setAttribute("oninput","return;"),Dm=typeof aC.oninput=="function"}Rm=Dm}else Rm=!1;nC=Rm&&(!document.documentMode||9<document.documentMode)}function sC(){Rh&&(Rh.detachEvent("onpropertychange",oC),Dh=Rh=null)}function oC(s){if(s.propertyName==="value"&&sf(Dh)){var l=[];rC(l,Dh,s,_e(s)),Jd(AF,l)}}function NF(s,l,p){s==="focusin"?(sC(),Rh=l,Dh=p,Rh.attachEvent("onpropertychange",oC)):s==="focusout"&&sC()}function MF(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return sf(Dh)}function BF(s,l){if(s==="click")return sf(l)}function LF(s,l){if(s==="input"||s==="change")return sf(l)}function OF(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var vn=typeof Object.is=="function"?Object.is:OF;function Fh(s,l){if(vn(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var p=Object.keys(s),y=Object.keys(l);if(p.length!==y.length)return!1;for(y=0;y<p.length;y++){var k=p[y];if(!qr.call(l,k)||!vn(s[k],l[k]))return!1}return!0}function lC(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function cC(s,l){var p=lC(s);s=0;for(var y;p;){if(p.nodeType===3){if(y=s+p.textContent.length,s<=l&&y>=l)return{node:p,offset:l-s};s=y}t:{for(;p;){if(p.nextSibling){p=p.nextSibling;break t}p=p.parentNode}p=void 0}p=lC(p)}}function hC(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?hC(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function uC(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var l=Qa(s.document);l instanceof s.HTMLIFrameElement;){try{var p=typeof l.contentWindow.location.href=="string"}catch{p=!1}if(p)s=l.contentWindow;else break;l=Qa(s.document)}return l}function Fm(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}var RF=Ja&&"documentMode"in document&&11>=document.documentMode,Kl=null,jm=null,jh=null,Im=!1;function dC(s,l,p){var y=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Im||Kl==null||Kl!==Qa(y)||(y=Kl,"selectionStart"in y&&Fm(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),jh&&Fh(jh,y)||(jh=y,y=Vf(jm,"onSelect"),0<y.length&&(l=new nf("onSelect","select",null,l,p),s.push({event:l,listeners:y}),l.target=Kl)))}function Uo(s,l){var p={};return p[s.toLowerCase()]=l.toLowerCase(),p["Webkit"+s]="webkit"+l,p["Moz"+s]="moz"+l,p}var Xl={animationend:Uo("Animation","AnimationEnd"),animationiteration:Uo("Animation","AnimationIteration"),animationstart:Uo("Animation","AnimationStart"),transitionrun:Uo("Transition","TransitionRun"),transitionstart:Uo("Transition","TransitionStart"),transitioncancel:Uo("Transition","TransitionCancel"),transitionend:Uo("Transition","TransitionEnd")},$m={},fC={};Ja&&(fC=document.createElement("div").style,"AnimationEvent"in window||(delete Xl.animationend.animation,delete Xl.animationiteration.animation,delete Xl.animationstart.animation),"TransitionEvent"in window||delete Xl.transitionend.transition);function Ho(s){if($m[s])return $m[s];if(!Xl[s])return s;var l=Xl[s],p;for(p in l)if(l.hasOwnProperty(p)&&p in fC)return $m[s]=l[p];return s}var pC=Ho("animationend"),gC=Ho("animationiteration"),mC=Ho("animationstart"),DF=Ho("transitionrun"),FF=Ho("transitionstart"),jF=Ho("transitioncancel"),yC=Ho("transitionend"),bC=new Map,zm="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(" ");zm.push("scrollEnd");function la(s,l){bC.set(s,l),bt(l,[s])}var of=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},zn=[],Zl=0,Pm=0;function lf(){for(var s=Zl,l=Pm=Zl=0;l<s;){var p=zn[l];zn[l++]=null;var y=zn[l];zn[l++]=null;var k=zn[l];zn[l++]=null;var S=zn[l];if(zn[l++]=null,y!==null&&k!==null){var R=y.pending;R===null?k.next=k:(k.next=R.next,R.next=k),y.pending=k}S!==0&&xC(p,k,S)}}function cf(s,l,p,y){zn[Zl++]=s,zn[Zl++]=l,zn[Zl++]=p,zn[Zl++]=y,Pm|=y,s.lanes|=y,s=s.alternate,s!==null&&(s.lanes|=y)}function qm(s,l,p,y){return cf(s,l,p,y),hf(s)}function Go(s,l){return cf(s,null,null,l),hf(s)}function xC(s,l,p){s.lanes|=p;var y=s.alternate;y!==null&&(y.lanes|=p);for(var k=!1,S=s.return;S!==null;)S.childLanes|=p,y=S.alternate,y!==null&&(y.childLanes|=p),S.tag===22&&(s=S.stateNode,s===null||s._visibility&1||(k=!0)),s=S,S=S.return;return s.tag===3?(S=s.stateNode,k&&l!==null&&(k=31-kr(p),s=S.hiddenUpdates,y=s[k],y===null?s[k]=[l]:y.push(l),l.lane=p|536870912),S):null}function hf(s){if(50<au)throw au=0,Zy=null,Error(n(185));for(var l=s.return;l!==null;)s=l,l=s.return;return s.tag===3?s.stateNode:null}var Ql={};function IF(s,l,p,y){this.tag=s,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _n(s,l,p,y){return new IF(s,l,p,y)}function Um(s){return s=s.prototype,!(!s||!s.isReactComponent)}function ts(s,l){var p=s.alternate;return p===null?(p=_n(s.tag,l,s.key,s.mode),p.elementType=s.elementType,p.type=s.type,p.stateNode=s.stateNode,p.alternate=s,s.alternate=p):(p.pendingProps=l,p.type=s.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=s.flags&65011712,p.childLanes=s.childLanes,p.lanes=s.lanes,p.child=s.child,p.memoizedProps=s.memoizedProps,p.memoizedState=s.memoizedState,p.updateQueue=s.updateQueue,l=s.dependencies,p.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},p.sibling=s.sibling,p.index=s.index,p.ref=s.ref,p.refCleanup=s.refCleanup,p}function vC(s,l){s.flags&=65011714;var p=s.alternate;return p===null?(s.childLanes=0,s.lanes=l,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=p.childLanes,s.lanes=p.lanes,s.child=p.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=p.memoizedProps,s.memoizedState=p.memoizedState,s.updateQueue=p.updateQueue,s.type=p.type,l=p.dependencies,s.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),s}function uf(s,l,p,y,k,S){var R=0;if(y=s,typeof s=="function")Um(s)&&(R=1);else if(typeof s=="string")R=Uj(s,p,st.current)?26:s==="html"||s==="head"||s==="body"?27:5;else t:switch(s){case P:return s=_n(31,p,l,k),s.elementType=P,s.lanes=S,s;case _:return Wo(p.children,k,S,l);case C:R=8,k|=24;break;case w:return s=_n(12,p,l,k|2),s.elementType=w,s.lanes=S,s;case O:return s=_n(13,p,l,k),s.elementType=O,s.lanes=S,s;case B:return s=_n(19,p,l,k),s.elementType=B,s.lanes=S,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case E:R=10;break t;case T:R=9;break t;case N:R=11;break t;case A:R=14;break t;case L:R=16,y=null;break t}R=29,p=Error(n(130,s===null?"null":typeof s,"")),y=null}return l=_n(R,p,l,k),l.elementType=s,l.type=y,l.lanes=S,l}function Wo(s,l,p,y){return s=_n(7,s,y,l),s.lanes=p,s}function Hm(s,l,p){return s=_n(6,s,null,l),s.lanes=p,s}function _C(s){var l=_n(18,null,null,0);return l.stateNode=s,l}function Gm(s,l,p){return l=_n(4,s.children!==null?s.children:[],s.key,l),l.lanes=p,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}var CC=new WeakMap;function Pn(s,l){if(typeof s=="object"&&s!==null){var p=CC.get(s);return p!==void 0?p:(l={value:s,source:l,stack:hr(l)},CC.set(s,l),l)}return{value:s,source:l,stack:hr(l)}}var Jl=[],tc=0,df=null,Ih=0,qn=[],Un=0,Hs=null,Ea=1,Aa="";function es(s,l){Jl[tc++]=Ih,Jl[tc++]=df,df=s,Ih=l}function kC(s,l,p){qn[Un++]=Ea,qn[Un++]=Aa,qn[Un++]=Hs,Hs=s;var y=Ea;s=Aa;var k=32-kr(y)-1;y&=~(1<<k),p+=1;var S=32-kr(l)+k;if(30<S){var R=k-k%5;S=(y&(1<<R)-1).toString(32),y>>=R,k-=R,Ea=1<<32-kr(l)+k|p<<k|y,Aa=S+s}else Ea=1<<S|p<<k|y,Aa=s}function Wm(s){s.return!==null&&(es(s,1),kC(s,1,0))}function Ym(s){for(;s===df;)df=Jl[--tc],Jl[tc]=null,Ih=Jl[--tc],Jl[tc]=null;for(;s===Hs;)Hs=qn[--Un],qn[Un]=null,Aa=qn[--Un],qn[Un]=null,Ea=qn[--Un],qn[Un]=null}function wC(s,l){qn[Un++]=Ea,qn[Un++]=Aa,qn[Un++]=Hs,Ea=l.id,Aa=l.overflow,Hs=s}var Ci=null,br=null,qe=!1,Gs=null,Hn=!1,Vm=Error(n(519));function Ws(s){var l=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $h(Pn(l,s)),Vm}function SC(s){var l=s.stateNode,p=s.type,y=s.memoizedProps;switch(l[pr]=s,l[Rr]=y,p){case"dialog":De("cancel",l),De("close",l);break;case"iframe":case"object":case"embed":De("load",l);break;case"video":case"audio":for(p=0;p<ou.length;p++)De(ou[p],l);break;case"source":De("error",l);break;case"img":case"image":case"link":De("error",l),De("load",l);break;case"details":De("toggle",l);break;case"input":De("invalid",l),dt(l,y.value,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name,!0);break;case"select":De("invalid",l);break;case"textarea":De("invalid",l),we(l,y.value,y.defaultValue,y.children)}p=y.children,typeof p!="string"&&typeof p!="number"&&typeof p!="bigint"||l.textContent===""+p||y.suppressHydrationWarning===!0||qw(l.textContent,p)?(y.popover!=null&&(De("beforetoggle",l),De("toggle",l)),y.onScroll!=null&&De("scroll",l),y.onScrollEnd!=null&&De("scrollend",l),y.onClick!=null&&(l.onclick=Rt),l=!0):l=!1,l||Ws(s,!0)}function TC(s){for(Ci=s.return;Ci;)switch(Ci.tag){case 5:case 31:case 13:Hn=!1;return;case 27:case 3:Hn=!0;return;default:Ci=Ci.return}}function ec(s){if(s!==Ci)return!1;if(!qe)return TC(s),qe=!0,!1;var l=s.tag,p;if((p=l!==3&&l!==27)&&((p=l===5)&&(p=s.type,p=!(p!=="form"&&p!=="button")||d0(s.type,s.memoizedProps)),p=!p),p&&br&&Ws(s),TC(s),l===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));br=Zw(s)}else if(l===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));br=Zw(s)}else l===27?(l=br,so(s.type)?(s=y0,y0=null,br=s):br=l):br=Ci?Wn(s.stateNode.nextSibling):null;return!0}function Yo(){br=Ci=null,qe=!1}function Km(){var s=Gs;return s!==null&&(ln===null?ln=s:ln.push.apply(ln,s),Gs=null),s}function $h(s){Gs===null?Gs=[s]:Gs.push(s)}var Xm=G(null),Vo=null,rs=null;function Ys(s,l,p){lt(Xm,l._currentValue),l._currentValue=p}function is(s){s._currentValue=Xm.current,J(Xm)}function Zm(s,l,p){for(;s!==null;){var y=s.alternate;if((s.childLanes&l)!==l?(s.childLanes|=l,y!==null&&(y.childLanes|=l)):y!==null&&(y.childLanes&l)!==l&&(y.childLanes|=l),s===p)break;s=s.return}}function Qm(s,l,p,y){var k=s.child;for(k!==null&&(k.return=s);k!==null;){var S=k.dependencies;if(S!==null){var R=k.child;S=S.firstContext;t:for(;S!==null;){var q=S;S=k;for(var Z=0;Z<l.length;Z++)if(q.context===l[Z]){S.lanes|=p,q=S.alternate,q!==null&&(q.lanes|=p),Zm(S.return,p,s),y||(R=null);break t}S=q.next}}else if(k.tag===18){if(R=k.return,R===null)throw Error(n(341));R.lanes|=p,S=R.alternate,S!==null&&(S.lanes|=p),Zm(R,p,s),R=null}else R=k.child;if(R!==null)R.return=k;else for(R=k;R!==null;){if(R===s){R=null;break}if(k=R.sibling,k!==null){k.return=R.return,R=k;break}R=R.return}k=R}}function rc(s,l,p,y){s=null;for(var k=l,S=!1;k!==null;){if(!S){if((k.flags&524288)!==0)S=!0;else if((k.flags&262144)!==0)break}if(k.tag===10){var R=k.alternate;if(R===null)throw Error(n(387));if(R=R.memoizedProps,R!==null){var q=k.type;vn(k.pendingProps.value,R.value)||(s!==null?s.push(q):s=[q])}}else if(k===Mt.current){if(R=k.alternate,R===null)throw Error(n(387));R.memoizedState.memoizedState!==k.memoizedState.memoizedState&&(s!==null?s.push(du):s=[du])}k=k.return}s!==null&&Qm(l,s,p,y),l.flags|=262144}function ff(s){for(s=s.firstContext;s!==null;){if(!vn(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Ko(s){Vo=s,rs=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function ki(s){return EC(Vo,s)}function pf(s,l){return Vo===null&&Ko(s),EC(s,l)}function EC(s,l){var p=l._currentValue;if(l={context:l,memoizedValue:p,next:null},rs===null){if(s===null)throw Error(n(308));rs=l,s.dependencies={lanes:0,firstContext:l},s.flags|=524288}else rs=rs.next=l;return p}var $F=typeof AbortController<"u"?AbortController:function(){var s=[],l=this.signal={aborted:!1,addEventListener:function(p,y){s.push(y)}};this.abort=function(){l.aborted=!0,s.forEach(function(p){return p()})}},zF=r.unstable_scheduleCallback,PF=r.unstable_NormalPriority,Zr={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Jm(){return{controller:new $F,data:new Map,refCount:0}}function zh(s){s.refCount--,s.refCount===0&&zF(PF,function(){s.controller.abort()})}var Ph=null,ty=0,ic=0,nc=null;function qF(s,l){if(Ph===null){var p=Ph=[];ty=0,ic=i0(),nc={status:"pending",value:void 0,then:function(y){p.push(y)}}}return ty++,l.then(AC,AC),l}function AC(){if(--ty===0&&Ph!==null){nc!==null&&(nc.status="fulfilled");var s=Ph;Ph=null,ic=0,nc=null;for(var l=0;l<s.length;l++)(0,s[l])()}}function UF(s,l){var p=[],y={status:"pending",value:null,reason:null,then:function(k){p.push(k)}};return s.then(function(){y.status="fulfilled",y.value=l;for(var k=0;k<p.length;k++)(0,p[k])(l)},function(k){for(y.status="rejected",y.reason=k,k=0;k<p.length;k++)(0,p[k])(void 0)}),y}var NC=D.S;D.S=function(s,l){dw=Me(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&qF(s,l),NC!==null&&NC(s,l)};var Xo=G(null);function ey(){var s=Xo.current;return s!==null?s:gr.pooledCache}function gf(s,l){l===null?lt(Xo,Xo.current):lt(Xo,l.pool)}function MC(){var s=ey();return s===null?null:{parent:Zr._currentValue,pool:s}}var ac=Error(n(460)),ry=Error(n(474)),mf=Error(n(542)),yf={then:function(){}};function BC(s){return s=s.status,s==="fulfilled"||s==="rejected"}function LC(s,l,p){switch(p=s[p],p===void 0?s.push(l):p!==l&&(l.then(Rt,Rt),l=p),l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,RC(s),s;default:if(typeof l.status=="string")l.then(Rt,Rt);else{if(s=gr,s!==null&&100<s.shellSuspendCounter)throw Error(n(482));s=l,s.status="pending",s.then(function(y){if(l.status==="pending"){var k=l;k.status="fulfilled",k.value=y}},function(y){if(l.status==="pending"){var k=l;k.status="rejected",k.reason=y}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,RC(s),s}throw Qo=l,ac}}function Zo(s){try{var l=s._init;return l(s._payload)}catch(p){throw p!==null&&typeof p=="object"&&typeof p.then=="function"?(Qo=p,ac):p}}var Qo=null;function OC(){if(Qo===null)throw Error(n(459));var s=Qo;return Qo=null,s}function RC(s){if(s===ac||s===mf)throw Error(n(483))}var sc=null,qh=0;function bf(s){var l=qh;return qh+=1,sc===null&&(sc=[]),LC(sc,s,l)}function Uh(s,l){l=l.props.ref,s.ref=l!==void 0?l:null}function xf(s,l){throw l.$$typeof===b?Error(n(525)):(s=Object.prototype.toString.call(l),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s)))}function DC(s){function l(ot,rt){if(s){var ht=ot.deletions;ht===null?(ot.deletions=[rt],ot.flags|=16):ht.push(rt)}}function p(ot,rt){if(!s)return null;for(;rt!==null;)l(ot,rt),rt=rt.sibling;return null}function y(ot){for(var rt=new Map;ot!==null;)ot.key!==null?rt.set(ot.key,ot):rt.set(ot.index,ot),ot=ot.sibling;return rt}function k(ot,rt){return ot=ts(ot,rt),ot.index=0,ot.sibling=null,ot}function S(ot,rt,ht){return ot.index=ht,s?(ht=ot.alternate,ht!==null?(ht=ht.index,ht<rt?(ot.flags|=67108866,rt):ht):(ot.flags|=67108866,rt)):(ot.flags|=1048576,rt)}function R(ot){return s&&ot.alternate===null&&(ot.flags|=67108866),ot}function q(ot,rt,ht,wt){return rt===null||rt.tag!==6?(rt=Hm(ht,ot.mode,wt),rt.return=ot,rt):(rt=k(rt,ht),rt.return=ot,rt)}function Z(ot,rt,ht,wt){var oe=ht.type;return oe===_?Ct(ot,rt,ht.props.children,wt,ht.key):rt!==null&&(rt.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===L&&Zo(oe)===rt.type)?(rt=k(rt,ht.props),Uh(rt,ht),rt.return=ot,rt):(rt=uf(ht.type,ht.key,ht.props,null,ot.mode,wt),Uh(rt,ht),rt.return=ot,rt)}function ut(ot,rt,ht,wt){return rt===null||rt.tag!==4||rt.stateNode.containerInfo!==ht.containerInfo||rt.stateNode.implementation!==ht.implementation?(rt=Gm(ht,ot.mode,wt),rt.return=ot,rt):(rt=k(rt,ht.children||[]),rt.return=ot,rt)}function Ct(ot,rt,ht,wt,oe){return rt===null||rt.tag!==7?(rt=Wo(ht,ot.mode,wt,oe),rt.return=ot,rt):(rt=k(rt,ht),rt.return=ot,rt)}function St(ot,rt,ht){if(typeof rt=="string"&&rt!==""||typeof rt=="number"||typeof rt=="bigint")return rt=Hm(""+rt,ot.mode,ht),rt.return=ot,rt;if(typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case m:return ht=uf(rt.type,rt.key,rt.props,null,ot.mode,ht),Uh(ht,rt),ht.return=ot,ht;case v:return rt=Gm(rt,ot.mode,ht),rt.return=ot,rt;case L:return rt=Zo(rt),St(ot,rt,ht)}if(U(rt)||X(rt))return rt=Wo(rt,ot.mode,ht,null),rt.return=ot,rt;if(typeof rt.then=="function")return St(ot,bf(rt),ht);if(rt.$$typeof===E)return St(ot,pf(ot,rt),ht);xf(ot,rt)}return null}function ft(ot,rt,ht,wt){var oe=rt!==null?rt.key:null;if(typeof ht=="string"&&ht!==""||typeof ht=="number"||typeof ht=="bigint")return oe!==null?null:q(ot,rt,""+ht,wt);if(typeof ht=="object"&&ht!==null){switch(ht.$$typeof){case m:return ht.key===oe?Z(ot,rt,ht,wt):null;case v:return ht.key===oe?ut(ot,rt,ht,wt):null;case L:return ht=Zo(ht),ft(ot,rt,ht,wt)}if(U(ht)||X(ht))return oe!==null?null:Ct(ot,rt,ht,wt,null);if(typeof ht.then=="function")return ft(ot,rt,bf(ht),wt);if(ht.$$typeof===E)return ft(ot,rt,pf(ot,ht),wt);xf(ot,ht)}return null}function mt(ot,rt,ht,wt,oe){if(typeof wt=="string"&&wt!==""||typeof wt=="number"||typeof wt=="bigint")return ot=ot.get(ht)||null,q(rt,ot,""+wt,oe);if(typeof wt=="object"&&wt!==null){switch(wt.$$typeof){case m:return ot=ot.get(wt.key===null?ht:wt.key)||null,Z(rt,ot,wt,oe);case v:return ot=ot.get(wt.key===null?ht:wt.key)||null,ut(rt,ot,wt,oe);case L:return wt=Zo(wt),mt(ot,rt,ht,wt,oe)}if(U(wt)||X(wt))return ot=ot.get(ht)||null,Ct(rt,ot,wt,oe,null);if(typeof wt.then=="function")return mt(ot,rt,ht,bf(wt),oe);if(wt.$$typeof===E)return mt(ot,rt,ht,pf(rt,wt),oe);xf(rt,wt)}return null}function Wt(ot,rt,ht,wt){for(var oe=null,Ye=null,Zt=rt,Se=rt=0,$e=null;Zt!==null&&Se<ht.length;Se++){Zt.index>Se?($e=Zt,Zt=null):$e=Zt.sibling;var Ve=ft(ot,Zt,ht[Se],wt);if(Ve===null){Zt===null&&(Zt=$e);break}s&&Zt&&Ve.alternate===null&&l(ot,Zt),rt=S(Ve,rt,Se),Ye===null?oe=Ve:Ye.sibling=Ve,Ye=Ve,Zt=$e}if(Se===ht.length)return p(ot,Zt),qe&&es(ot,Se),oe;if(Zt===null){for(;Se<ht.length;Se++)Zt=St(ot,ht[Se],wt),Zt!==null&&(rt=S(Zt,rt,Se),Ye===null?oe=Zt:Ye.sibling=Zt,Ye=Zt);return qe&&es(ot,Se),oe}for(Zt=y(Zt);Se<ht.length;Se++)$e=mt(Zt,ot,Se,ht[Se],wt),$e!==null&&(s&&$e.alternate!==null&&Zt.delete($e.key===null?Se:$e.key),rt=S($e,rt,Se),Ye===null?oe=$e:Ye.sibling=$e,Ye=$e);return s&&Zt.forEach(function(uo){return l(ot,uo)}),qe&&es(ot,Se),oe}function de(ot,rt,ht,wt){if(ht==null)throw Error(n(151));for(var oe=null,Ye=null,Zt=rt,Se=rt=0,$e=null,Ve=ht.next();Zt!==null&&!Ve.done;Se++,Ve=ht.next()){Zt.index>Se?($e=Zt,Zt=null):$e=Zt.sibling;var uo=ft(ot,Zt,Ve.value,wt);if(uo===null){Zt===null&&(Zt=$e);break}s&&Zt&&uo.alternate===null&&l(ot,Zt),rt=S(uo,rt,Se),Ye===null?oe=uo:Ye.sibling=uo,Ye=uo,Zt=$e}if(Ve.done)return p(ot,Zt),qe&&es(ot,Se),oe;if(Zt===null){for(;!Ve.done;Se++,Ve=ht.next())Ve=St(ot,Ve.value,wt),Ve!==null&&(rt=S(Ve,rt,Se),Ye===null?oe=Ve:Ye.sibling=Ve,Ye=Ve);return qe&&es(ot,Se),oe}for(Zt=y(Zt);!Ve.done;Se++,Ve=ht.next())Ve=mt(Zt,ot,Se,Ve.value,wt),Ve!==null&&(s&&Ve.alternate!==null&&Zt.delete(Ve.key===null?Se:Ve.key),rt=S(Ve,rt,Se),Ye===null?oe=Ve:Ye.sibling=Ve,Ye=Ve);return s&&Zt.forEach(function(t4){return l(ot,t4)}),qe&&es(ot,Se),oe}function fr(ot,rt,ht,wt){if(typeof ht=="object"&&ht!==null&&ht.type===_&&ht.key===null&&(ht=ht.props.children),typeof ht=="object"&&ht!==null){switch(ht.$$typeof){case m:t:{for(var oe=ht.key;rt!==null;){if(rt.key===oe){if(oe=ht.type,oe===_){if(rt.tag===7){p(ot,rt.sibling),wt=k(rt,ht.props.children),wt.return=ot,ot=wt;break t}}else if(rt.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===L&&Zo(oe)===rt.type){p(ot,rt.sibling),wt=k(rt,ht.props),Uh(wt,ht),wt.return=ot,ot=wt;break t}p(ot,rt);break}else l(ot,rt);rt=rt.sibling}ht.type===_?(wt=Wo(ht.props.children,ot.mode,wt,ht.key),wt.return=ot,ot=wt):(wt=uf(ht.type,ht.key,ht.props,null,ot.mode,wt),Uh(wt,ht),wt.return=ot,ot=wt)}return R(ot);case v:t:{for(oe=ht.key;rt!==null;){if(rt.key===oe)if(rt.tag===4&&rt.stateNode.containerInfo===ht.containerInfo&&rt.stateNode.implementation===ht.implementation){p(ot,rt.sibling),wt=k(rt,ht.children||[]),wt.return=ot,ot=wt;break t}else{p(ot,rt);break}else l(ot,rt);rt=rt.sibling}wt=Gm(ht,ot.mode,wt),wt.return=ot,ot=wt}return R(ot);case L:return ht=Zo(ht),fr(ot,rt,ht,wt)}if(U(ht))return Wt(ot,rt,ht,wt);if(X(ht)){if(oe=X(ht),typeof oe!="function")throw Error(n(150));return ht=oe.call(ht),de(ot,rt,ht,wt)}if(typeof ht.then=="function")return fr(ot,rt,bf(ht),wt);if(ht.$$typeof===E)return fr(ot,rt,pf(ot,ht),wt);xf(ot,ht)}return typeof ht=="string"&&ht!==""||typeof ht=="number"||typeof ht=="bigint"?(ht=""+ht,rt!==null&&rt.tag===6?(p(ot,rt.sibling),wt=k(rt,ht),wt.return=ot,ot=wt):(p(ot,rt),wt=Hm(ht,ot.mode,wt),wt.return=ot,ot=wt),R(ot)):p(ot,rt)}return function(ot,rt,ht,wt){try{qh=0;var oe=fr(ot,rt,ht,wt);return sc=null,oe}catch(Zt){if(Zt===ac||Zt===mf)throw Zt;var Ye=_n(29,Zt,null,ot.mode);return Ye.lanes=wt,Ye.return=ot,Ye}finally{}}}var Jo=DC(!0),FC=DC(!1),Vs=!1;function iy(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ny(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Ks(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Xs(s,l,p){var y=s.updateQueue;if(y===null)return null;if(y=y.shared,(Ze&2)!==0){var k=y.pending;return k===null?l.next=l:(l.next=k.next,k.next=l),y.pending=l,l=hf(s),xC(s,null,p),l}return cf(s,y,l,p),hf(s)}function Hh(s,l,p){if(l=l.updateQueue,l!==null&&(l=l.shared,(p&4194048)!==0)){var y=l.lanes;y&=s.pendingLanes,p|=y,l.lanes=p,se(s,p)}}function ay(s,l){var p=s.updateQueue,y=s.alternate;if(y!==null&&(y=y.updateQueue,p===y)){var k=null,S=null;if(p=p.firstBaseUpdate,p!==null){do{var R={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};S===null?k=S=R:S=S.next=R,p=p.next}while(p!==null);S===null?k=S=l:S=S.next=l}else k=S=l;p={baseState:y.baseState,firstBaseUpdate:k,lastBaseUpdate:S,shared:y.shared,callbacks:y.callbacks},s.updateQueue=p;return}s=p.lastBaseUpdate,s===null?p.firstBaseUpdate=l:s.next=l,p.lastBaseUpdate=l}var sy=!1;function Gh(){if(sy){var s=nc;if(s!==null)throw s}}function Wh(s,l,p,y){sy=!1;var k=s.updateQueue;Vs=!1;var S=k.firstBaseUpdate,R=k.lastBaseUpdate,q=k.shared.pending;if(q!==null){k.shared.pending=null;var Z=q,ut=Z.next;Z.next=null,R===null?S=ut:R.next=ut,R=Z;var Ct=s.alternate;Ct!==null&&(Ct=Ct.updateQueue,q=Ct.lastBaseUpdate,q!==R&&(q===null?Ct.firstBaseUpdate=ut:q.next=ut,Ct.lastBaseUpdate=Z))}if(S!==null){var St=k.baseState;R=0,Ct=ut=Z=null,q=S;do{var ft=q.lane&-536870913,mt=ft!==q.lane;if(mt?(Ie&ft)===ft:(y&ft)===ft){ft!==0&&ft===ic&&(sy=!0),Ct!==null&&(Ct=Ct.next={lane:0,tag:q.tag,payload:q.payload,callback:null,next:null});t:{var Wt=s,de=q;ft=l;var fr=p;switch(de.tag){case 1:if(Wt=de.payload,typeof Wt=="function"){St=Wt.call(fr,St,ft);break t}St=Wt;break t;case 3:Wt.flags=Wt.flags&-65537|128;case 0:if(Wt=de.payload,ft=typeof Wt=="function"?Wt.call(fr,St,ft):Wt,ft==null)break t;St=g({},St,ft);break t;case 2:Vs=!0}}ft=q.callback,ft!==null&&(s.flags|=64,mt&&(s.flags|=8192),mt=k.callbacks,mt===null?k.callbacks=[ft]:mt.push(ft))}else mt={lane:ft,tag:q.tag,payload:q.payload,callback:q.callback,next:null},Ct===null?(ut=Ct=mt,Z=St):Ct=Ct.next=mt,R|=ft;if(q=q.next,q===null){if(q=k.shared.pending,q===null)break;mt=q,q=mt.next,mt.next=null,k.lastBaseUpdate=mt,k.shared.pending=null}}while(!0);Ct===null&&(Z=St),k.baseState=Z,k.firstBaseUpdate=ut,k.lastBaseUpdate=Ct,S===null&&(k.shared.lanes=0),eo|=R,s.lanes=R,s.memoizedState=St}}function jC(s,l){if(typeof s!="function")throw Error(n(191,s));s.call(l)}function IC(s,l){var p=s.callbacks;if(p!==null)for(s.callbacks=null,s=0;s<p.length;s++)jC(p[s],l)}var oc=G(null),vf=G(0);function $C(s,l){s=ds,lt(vf,s),lt(oc,l),ds=s|l.baseLanes}function oy(){lt(vf,ds),lt(oc,oc.current)}function ly(){ds=vf.current,J(oc),J(vf)}var Cn=G(null),Gn=null;function Zs(s){var l=s.alternate;lt(Hr,Hr.current&1),lt(Cn,s),Gn===null&&(l===null||oc.current!==null||l.memoizedState!==null)&&(Gn=s)}function cy(s){lt(Hr,Hr.current),lt(Cn,s),Gn===null&&(Gn=s)}function zC(s){s.tag===22?(lt(Hr,Hr.current),lt(Cn,s),Gn===null&&(Gn=s)):Qs()}function Qs(){lt(Hr,Hr.current),lt(Cn,Cn.current)}function kn(s){J(Cn),Gn===s&&(Gn=null),J(Hr)}var Hr=G(0);function _f(s){for(var l=s;l!==null;){if(l.tag===13){var p=l.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||g0(p)||m0(p)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var ns=0,ke=null,ur=null,Qr=null,Cf=!1,lc=!1,tl=!1,kf=0,Yh=0,cc=null,HF=0;function Fr(){throw Error(n(321))}function hy(s,l){if(l===null)return!1;for(var p=0;p<l.length&&p<s.length;p++)if(!vn(s[p],l[p]))return!1;return!0}function uy(s,l,p,y,k,S){return ns=S,ke=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,D.H=s===null||s.memoizedState===null?kk:Ty,tl=!1,S=p(y,k),tl=!1,lc&&(S=qC(l,p,y,k)),PC(s),S}function PC(s){D.H=Xh;var l=ur!==null&&ur.next!==null;if(ns=0,Qr=ur=ke=null,Cf=!1,Yh=0,cc=null,l)throw Error(n(300));s===null||Jr||(s=s.dependencies,s!==null&&ff(s)&&(Jr=!0))}function qC(s,l,p,y){ke=s;var k=0;do{if(lc&&(cc=null),Yh=0,lc=!1,25<=k)throw Error(n(301));if(k+=1,Qr=ur=null,s.updateQueue!=null){var S=s.updateQueue;S.lastEffect=null,S.events=null,S.stores=null,S.memoCache!=null&&(S.memoCache.index=0)}D.H=wk,S=l(p,y)}while(lc);return S}function GF(){var s=D.H,l=s.useState()[0];return l=typeof l.then=="function"?Vh(l):l,s=s.useState()[0],(ur!==null?ur.memoizedState:null)!==s&&(ke.flags|=1024),l}function dy(){var s=kf!==0;return kf=0,s}function fy(s,l,p){l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~p}function py(s){if(Cf){for(s=s.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}Cf=!1}ns=0,Qr=ur=ke=null,lc=!1,Yh=kf=0,cc=null}function Ui(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qr===null?ke.memoizedState=Qr=s:Qr=Qr.next=s,Qr}function Gr(){if(ur===null){var s=ke.alternate;s=s!==null?s.memoizedState:null}else s=ur.next;var l=Qr===null?ke.memoizedState:Qr.next;if(l!==null)Qr=l,ur=s;else{if(s===null)throw ke.alternate===null?Error(n(467)):Error(n(310));ur=s,s={memoizedState:ur.memoizedState,baseState:ur.baseState,baseQueue:ur.baseQueue,queue:ur.queue,next:null},Qr===null?ke.memoizedState=Qr=s:Qr=Qr.next=s}return Qr}function wf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Vh(s){var l=Yh;return Yh+=1,cc===null&&(cc=[]),s=LC(cc,s,l),l=ke,(Qr===null?l.memoizedState:Qr.next)===null&&(l=l.alternate,D.H=l===null||l.memoizedState===null?kk:Ty),s}function Sf(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Vh(s);if(s.$$typeof===E)return ki(s)}throw Error(n(438,String(s)))}function gy(s){var l=null,p=ke.updateQueue;if(p!==null&&(l=p.memoCache),l==null){var y=ke.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(l={data:y.data.map(function(k){return k.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),p===null&&(p=wf(),ke.updateQueue=p),p.memoCache=l,p=l.data[l.index],p===void 0)for(p=l.data[l.index]=Array(s),y=0;y<s;y++)p[y]=j;return l.index++,p}function as(s,l){return typeof l=="function"?l(s):l}function Tf(s){var l=Gr();return my(l,ur,s)}function my(s,l,p){var y=s.queue;if(y===null)throw Error(n(311));y.lastRenderedReducer=p;var k=s.baseQueue,S=y.pending;if(S!==null){if(k!==null){var R=k.next;k.next=S.next,S.next=R}l.baseQueue=k=S,y.pending=null}if(S=s.baseState,k===null)s.memoizedState=S;else{l=k.next;var q=R=null,Z=null,ut=l,Ct=!1;do{var St=ut.lane&-536870913;if(St!==ut.lane?(Ie&St)===St:(ns&St)===St){var ft=ut.revertLane;if(ft===0)Z!==null&&(Z=Z.next={lane:0,revertLane:0,gesture:null,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null}),St===ic&&(Ct=!0);else if((ns&ft)===ft){ut=ut.next,ft===ic&&(Ct=!0);continue}else St={lane:0,revertLane:ut.revertLane,gesture:null,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null},Z===null?(q=Z=St,R=S):Z=Z.next=St,ke.lanes|=ft,eo|=ft;St=ut.action,tl&&p(S,St),S=ut.hasEagerState?ut.eagerState:p(S,St)}else ft={lane:St,revertLane:ut.revertLane,gesture:ut.gesture,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null},Z===null?(q=Z=ft,R=S):Z=Z.next=ft,ke.lanes|=St,eo|=St;ut=ut.next}while(ut!==null&&ut!==l);if(Z===null?R=S:Z.next=q,!vn(S,s.memoizedState)&&(Jr=!0,Ct&&(p=nc,p!==null)))throw p;s.memoizedState=S,s.baseState=R,s.baseQueue=Z,y.lastRenderedState=S}return k===null&&(y.lanes=0),[s.memoizedState,y.dispatch]}function yy(s){var l=Gr(),p=l.queue;if(p===null)throw Error(n(311));p.lastRenderedReducer=s;var y=p.dispatch,k=p.pending,S=l.memoizedState;if(k!==null){p.pending=null;var R=k=k.next;do S=s(S,R.action),R=R.next;while(R!==k);vn(S,l.memoizedState)||(Jr=!0),l.memoizedState=S,l.baseQueue===null&&(l.baseState=S),p.lastRenderedState=S}return[S,y]}function UC(s,l,p){var y=ke,k=Gr(),S=qe;if(S){if(p===void 0)throw Error(n(407));p=p()}else p=l();var R=!vn((ur||k).memoizedState,p);if(R&&(k.memoizedState=p,Jr=!0),k=k.queue,vy(WC.bind(null,y,k,s),[s]),k.getSnapshot!==l||R||Qr!==null&&Qr.memoizedState.tag&1){if(y.flags|=2048,hc(9,{destroy:void 0},GC.bind(null,y,k,p,l),null),gr===null)throw Error(n(349));S||(ns&127)!==0||HC(y,l,p)}return p}function HC(s,l,p){s.flags|=16384,s={getSnapshot:l,value:p},l=ke.updateQueue,l===null?(l=wf(),ke.updateQueue=l,l.stores=[s]):(p=l.stores,p===null?l.stores=[s]:p.push(s))}function GC(s,l,p,y){l.value=p,l.getSnapshot=y,YC(l)&&VC(s)}function WC(s,l,p){return p(function(){YC(l)&&VC(s)})}function YC(s){var l=s.getSnapshot;s=s.value;try{var p=l();return!vn(s,p)}catch{return!0}}function VC(s){var l=Go(s,2);l!==null&&cn(l,s,2)}function by(s){var l=Ui();if(typeof s=="function"){var p=s;if(s=p(),tl){yi(!0);try{p()}finally{yi(!1)}}}return l.memoizedState=l.baseState=s,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:s},l}function KC(s,l,p,y){return s.baseState=p,my(s,ur,typeof y=="function"?y:as)}function WF(s,l,p,y,k){if(Nf(s))throw Error(n(485));if(s=l.action,s!==null){var S={payload:k,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(R){S.listeners.push(R)}};D.T!==null?p(!0):S.isTransition=!1,y(S),p=l.pending,p===null?(S.next=l.pending=S,XC(l,S)):(S.next=p.next,l.pending=p.next=S)}}function XC(s,l){var p=l.action,y=l.payload,k=s.state;if(l.isTransition){var S=D.T,R={};D.T=R;try{var q=p(k,y),Z=D.S;Z!==null&&Z(R,q),ZC(s,l,q)}catch(ut){xy(s,l,ut)}finally{S!==null&&R.types!==null&&(S.types=R.types),D.T=S}}else try{S=p(k,y),ZC(s,l,S)}catch(ut){xy(s,l,ut)}}function ZC(s,l,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(y){QC(s,l,y)},function(y){return xy(s,l,y)}):QC(s,l,p)}function QC(s,l,p){l.status="fulfilled",l.value=p,JC(l),s.state=p,l=s.pending,l!==null&&(p=l.next,p===l?s.pending=null:(p=p.next,l.next=p,XC(s,p)))}function xy(s,l,p){var y=s.pending;if(s.pending=null,y!==null){y=y.next;do l.status="rejected",l.reason=p,JC(l),l=l.next;while(l!==y)}s.action=null}function JC(s){s=s.listeners;for(var l=0;l<s.length;l++)(0,s[l])()}function tk(s,l){return l}function ek(s,l){if(qe){var p=gr.formState;if(p!==null){t:{var y=ke;if(qe){if(br){e:{for(var k=br,S=Hn;k.nodeType!==8;){if(!S){k=null;break e}if(k=Wn(k.nextSibling),k===null){k=null;break e}}S=k.data,k=S==="F!"||S==="F"?k:null}if(k){br=Wn(k.nextSibling),y=k.data==="F!";break t}}Ws(y)}y=!1}y&&(l=p[0])}}return p=Ui(),p.memoizedState=p.baseState=l,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tk,lastRenderedState:l},p.queue=y,p=vk.bind(null,ke,y),y.dispatch=p,y=by(!1),S=Sy.bind(null,ke,!1,y.queue),y=Ui(),k={state:l,dispatch:null,action:s,pending:null},y.queue=k,p=WF.bind(null,ke,k,S,p),k.dispatch=p,y.memoizedState=s,[l,p,!1]}function rk(s){var l=Gr();return ik(l,ur,s)}function ik(s,l,p){if(l=my(s,l,tk)[0],s=Tf(as)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var y=Vh(l)}catch(R){throw R===ac?mf:R}else y=l;l=Gr();var k=l.queue,S=k.dispatch;return p!==l.memoizedState&&(ke.flags|=2048,hc(9,{destroy:void 0},YF.bind(null,k,p),null)),[y,S,s]}function YF(s,l){s.action=l}function nk(s){var l=Gr(),p=ur;if(p!==null)return ik(l,p,s);Gr(),l=l.memoizedState,p=Gr();var y=p.queue.dispatch;return p.memoizedState=s,[l,y,!1]}function hc(s,l,p,y){return s={tag:s,create:p,deps:y,inst:l,next:null},l=ke.updateQueue,l===null&&(l=wf(),ke.updateQueue=l),p=l.lastEffect,p===null?l.lastEffect=s.next=s:(y=p.next,p.next=s,s.next=y,l.lastEffect=s),s}function ak(){return Gr().memoizedState}function Ef(s,l,p,y){var k=Ui();ke.flags|=s,k.memoizedState=hc(1|l,{destroy:void 0},p,y===void 0?null:y)}function Af(s,l,p,y){var k=Gr();y=y===void 0?null:y;var S=k.memoizedState.inst;ur!==null&&y!==null&&hy(y,ur.memoizedState.deps)?k.memoizedState=hc(l,S,p,y):(ke.flags|=s,k.memoizedState=hc(1|l,S,p,y))}function sk(s,l){Ef(8390656,8,s,l)}function vy(s,l){Af(2048,8,s,l)}function VF(s){ke.flags|=4;var l=ke.updateQueue;if(l===null)l=wf(),ke.updateQueue=l,l.events=[s];else{var p=l.events;p===null?l.events=[s]:p.push(s)}}function ok(s){var l=Gr().memoizedState;return VF({ref:l,nextImpl:s}),function(){if((Ze&2)!==0)throw Error(n(440));return l.impl.apply(void 0,arguments)}}function lk(s,l){return Af(4,2,s,l)}function ck(s,l){return Af(4,4,s,l)}function hk(s,l){if(typeof l=="function"){s=s();var p=l(s);return function(){typeof p=="function"?p():l(null)}}if(l!=null)return s=s(),l.current=s,function(){l.current=null}}function uk(s,l,p){p=p!=null?p.concat([s]):null,Af(4,4,hk.bind(null,l,s),p)}function _y(){}function dk(s,l){var p=Gr();l=l===void 0?null:l;var y=p.memoizedState;return l!==null&&hy(l,y[1])?y[0]:(p.memoizedState=[s,l],s)}function fk(s,l){var p=Gr();l=l===void 0?null:l;var y=p.memoizedState;if(l!==null&&hy(l,y[1]))return y[0];if(y=s(),tl){yi(!0);try{s()}finally{yi(!1)}}return p.memoizedState=[y,l],y}function Cy(s,l,p){return p===void 0||(ns&1073741824)!==0&&(Ie&261930)===0?s.memoizedState=l:(s.memoizedState=p,s=pw(),ke.lanes|=s,eo|=s,p)}function pk(s,l,p,y){return vn(p,l)?p:oc.current!==null?(s=Cy(s,p,y),vn(s,l)||(Jr=!0),s):(ns&42)===0||(ns&1073741824)!==0&&(Ie&261930)===0?(Jr=!0,s.memoizedState=p):(s=pw(),ke.lanes|=s,eo|=s,l)}function gk(s,l,p,y,k){var S=z.p;z.p=S!==0&&8>S?S:8;var R=D.T,q={};D.T=q,Sy(s,!1,l,p);try{var Z=k(),ut=D.S;if(ut!==null&&ut(q,Z),Z!==null&&typeof Z=="object"&&typeof Z.then=="function"){var Ct=UF(Z,y);Kh(s,l,Ct,Tn(s))}else Kh(s,l,y,Tn(s))}catch(St){Kh(s,l,{then:function(){},status:"rejected",reason:St},Tn())}finally{z.p=S,R!==null&&q.types!==null&&(R.types=q.types),D.T=R}}function KF(){}function ky(s,l,p,y){if(s.tag!==5)throw Error(n(476));var k=mk(s).queue;gk(s,k,l,H,p===null?KF:function(){return yk(s),p(y)})}function mk(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:H},next:null};var p={};return l.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:p},next:null},s.memoizedState=l,s=s.alternate,s!==null&&(s.memoizedState=l),l}function yk(s){var l=mk(s);l.next===null&&(l=s.alternate.memoizedState),Kh(s,l.next.queue,{},Tn())}function wy(){return ki(du)}function bk(){return Gr().memoizedState}function xk(){return Gr().memoizedState}function XF(s){for(var l=s.return;l!==null;){switch(l.tag){case 24:case 3:var p=Tn();s=Ks(p);var y=Xs(l,s,p);y!==null&&(cn(y,l,p),Hh(y,l,p)),l={cache:Jm()},s.payload=l;return}l=l.return}}function ZF(s,l,p){var y=Tn();p={lane:y,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Nf(s)?_k(l,p):(p=qm(s,l,p,y),p!==null&&(cn(p,s,y),Ck(p,l,y)))}function vk(s,l,p){var y=Tn();Kh(s,l,p,y)}function Kh(s,l,p,y){var k={lane:y,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(Nf(s))_k(l,k);else{var S=s.alternate;if(s.lanes===0&&(S===null||S.lanes===0)&&(S=l.lastRenderedReducer,S!==null))try{var R=l.lastRenderedState,q=S(R,p);if(k.hasEagerState=!0,k.eagerState=q,vn(q,R))return cf(s,l,k,0),gr===null&&lf(),!1}catch{}finally{}if(p=qm(s,l,k,y),p!==null)return cn(p,s,y),Ck(p,l,y),!0}return!1}function Sy(s,l,p,y){if(y={lane:2,revertLane:i0(),gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},Nf(s)){if(l)throw Error(n(479))}else l=qm(s,p,y,2),l!==null&&cn(l,s,2)}function Nf(s){var l=s.alternate;return s===ke||l!==null&&l===ke}function _k(s,l){lc=Cf=!0;var p=s.pending;p===null?l.next=l:(l.next=p.next,p.next=l),s.pending=l}function Ck(s,l,p){if((p&4194048)!==0){var y=l.lanes;y&=s.pendingLanes,p|=y,l.lanes=p,se(s,p)}}var Xh={readContext:ki,use:Sf,useCallback:Fr,useContext:Fr,useEffect:Fr,useImperativeHandle:Fr,useLayoutEffect:Fr,useInsertionEffect:Fr,useMemo:Fr,useReducer:Fr,useRef:Fr,useState:Fr,useDebugValue:Fr,useDeferredValue:Fr,useTransition:Fr,useSyncExternalStore:Fr,useId:Fr,useHostTransitionStatus:Fr,useFormState:Fr,useActionState:Fr,useOptimistic:Fr,useMemoCache:Fr,useCacheRefresh:Fr};Xh.useEffectEvent=Fr;var kk={readContext:ki,use:Sf,useCallback:function(s,l){return Ui().memoizedState=[s,l===void 0?null:l],s},useContext:ki,useEffect:sk,useImperativeHandle:function(s,l,p){p=p!=null?p.concat([s]):null,Ef(4194308,4,hk.bind(null,l,s),p)},useLayoutEffect:function(s,l){return Ef(4194308,4,s,l)},useInsertionEffect:function(s,l){Ef(4,2,s,l)},useMemo:function(s,l){var p=Ui();l=l===void 0?null:l;var y=s();if(tl){yi(!0);try{s()}finally{yi(!1)}}return p.memoizedState=[y,l],y},useReducer:function(s,l,p){var y=Ui();if(p!==void 0){var k=p(l);if(tl){yi(!0);try{p(l)}finally{yi(!1)}}}else k=l;return y.memoizedState=y.baseState=k,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:k},y.queue=s,s=s.dispatch=ZF.bind(null,ke,s),[y.memoizedState,s]},useRef:function(s){var l=Ui();return s={current:s},l.memoizedState=s},useState:function(s){s=by(s);var l=s.queue,p=vk.bind(null,ke,l);return l.dispatch=p,[s.memoizedState,p]},useDebugValue:_y,useDeferredValue:function(s,l){var p=Ui();return Cy(p,s,l)},useTransition:function(){var s=by(!1);return s=gk.bind(null,ke,s.queue,!0,!1),Ui().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,l,p){var y=ke,k=Ui();if(qe){if(p===void 0)throw Error(n(407));p=p()}else{if(p=l(),gr===null)throw Error(n(349));(Ie&127)!==0||HC(y,l,p)}k.memoizedState=p;var S={value:p,getSnapshot:l};return k.queue=S,sk(WC.bind(null,y,S,s),[s]),y.flags|=2048,hc(9,{destroy:void 0},GC.bind(null,y,S,p,l),null),p},useId:function(){var s=Ui(),l=gr.identifierPrefix;if(qe){var p=Aa,y=Ea;p=(y&~(1<<32-kr(y)-1)).toString(32)+p,l="_"+l+"R_"+p,p=kf++,0<p&&(l+="H"+p.toString(32)),l+="_"}else p=HF++,l="_"+l+"r_"+p.toString(32)+"_";return s.memoizedState=l},useHostTransitionStatus:wy,useFormState:ek,useActionState:ek,useOptimistic:function(s){var l=Ui();l.memoizedState=l.baseState=s;var p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=p,l=Sy.bind(null,ke,!0,p),p.dispatch=l,[s,l]},useMemoCache:gy,useCacheRefresh:function(){return Ui().memoizedState=XF.bind(null,ke)},useEffectEvent:function(s){var l=Ui(),p={impl:s};return l.memoizedState=p,function(){if((Ze&2)!==0)throw Error(n(440));return p.impl.apply(void 0,arguments)}}},Ty={readContext:ki,use:Sf,useCallback:dk,useContext:ki,useEffect:vy,useImperativeHandle:uk,useInsertionEffect:lk,useLayoutEffect:ck,useMemo:fk,useReducer:Tf,useRef:ak,useState:function(){return Tf(as)},useDebugValue:_y,useDeferredValue:function(s,l){var p=Gr();return pk(p,ur.memoizedState,s,l)},useTransition:function(){var s=Tf(as)[0],l=Gr().memoizedState;return[typeof s=="boolean"?s:Vh(s),l]},useSyncExternalStore:UC,useId:bk,useHostTransitionStatus:wy,useFormState:rk,useActionState:rk,useOptimistic:function(s,l){var p=Gr();return KC(p,ur,s,l)},useMemoCache:gy,useCacheRefresh:xk};Ty.useEffectEvent=ok;var wk={readContext:ki,use:Sf,useCallback:dk,useContext:ki,useEffect:vy,useImperativeHandle:uk,useInsertionEffect:lk,useLayoutEffect:ck,useMemo:fk,useReducer:yy,useRef:ak,useState:function(){return yy(as)},useDebugValue:_y,useDeferredValue:function(s,l){var p=Gr();return ur===null?Cy(p,s,l):pk(p,ur.memoizedState,s,l)},useTransition:function(){var s=yy(as)[0],l=Gr().memoizedState;return[typeof s=="boolean"?s:Vh(s),l]},useSyncExternalStore:UC,useId:bk,useHostTransitionStatus:wy,useFormState:nk,useActionState:nk,useOptimistic:function(s,l){var p=Gr();return ur!==null?KC(p,ur,s,l):(p.baseState=s,[s,p.queue.dispatch])},useMemoCache:gy,useCacheRefresh:xk};wk.useEffectEvent=ok;function Ey(s,l,p,y){l=s.memoizedState,p=p(y,l),p=p==null?l:g({},l,p),s.memoizedState=p,s.lanes===0&&(s.updateQueue.baseState=p)}var Ay={enqueueSetState:function(s,l,p){s=s._reactInternals;var y=Tn(),k=Ks(y);k.payload=l,p!=null&&(k.callback=p),l=Xs(s,k,y),l!==null&&(cn(l,s,y),Hh(l,s,y))},enqueueReplaceState:function(s,l,p){s=s._reactInternals;var y=Tn(),k=Ks(y);k.tag=1,k.payload=l,p!=null&&(k.callback=p),l=Xs(s,k,y),l!==null&&(cn(l,s,y),Hh(l,s,y))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var p=Tn(),y=Ks(p);y.tag=2,l!=null&&(y.callback=l),l=Xs(s,y,p),l!==null&&(cn(l,s,p),Hh(l,s,p))}};function Sk(s,l,p,y,k,S,R){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(y,S,R):l.prototype&&l.prototype.isPureReactComponent?!Fh(p,y)||!Fh(k,S):!0}function Tk(s,l,p,y){s=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(p,y),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(p,y),l.state!==s&&Ay.enqueueReplaceState(l,l.state,null)}function el(s,l){var p=l;if("ref"in l){p={};for(var y in l)y!=="ref"&&(p[y]=l[y])}if(s=s.defaultProps){p===l&&(p=g({},p));for(var k in s)p[k]===void 0&&(p[k]=s[k])}return p}function Ek(s){of(s)}function Ak(s){console.error(s)}function Nk(s){of(s)}function Mf(s,l){try{var p=s.onUncaughtError;p(l.value,{componentStack:l.stack})}catch(y){setTimeout(function(){throw y})}}function Mk(s,l,p){try{var y=s.onCaughtError;y(p.value,{componentStack:p.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(k){setTimeout(function(){throw k})}}function Ny(s,l,p){return p=Ks(p),p.tag=3,p.payload={element:null},p.callback=function(){Mf(s,l)},p}function Bk(s){return s=Ks(s),s.tag=3,s}function Lk(s,l,p,y){var k=p.type.getDerivedStateFromError;if(typeof k=="function"){var S=y.value;s.payload=function(){return k(S)},s.callback=function(){Mk(l,p,y)}}var R=p.stateNode;R!==null&&typeof R.componentDidCatch=="function"&&(s.callback=function(){Mk(l,p,y),typeof k!="function"&&(ro===null?ro=new Set([this]):ro.add(this));var q=y.stack;this.componentDidCatch(y.value,{componentStack:q!==null?q:""})})}function QF(s,l,p,y,k){if(p.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(l=p.alternate,l!==null&&rc(l,p,k,!0),p=Cn.current,p!==null){switch(p.tag){case 31:case 13:return Gn===null?qf():p.alternate===null&&jr===0&&(jr=3),p.flags&=-257,p.flags|=65536,p.lanes=k,y===yf?p.flags|=16384:(l=p.updateQueue,l===null?p.updateQueue=new Set([y]):l.add(y),t0(s,y,k)),!1;case 22:return p.flags|=65536,y===yf?p.flags|=16384:(l=p.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([y])},p.updateQueue=l):(p=l.retryQueue,p===null?l.retryQueue=new Set([y]):p.add(y)),t0(s,y,k)),!1}throw Error(n(435,p.tag))}return t0(s,y,k),qf(),!1}if(qe)return l=Cn.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=k,y!==Vm&&(s=Error(n(422),{cause:y}),$h(Pn(s,p)))):(y!==Vm&&(l=Error(n(423),{cause:y}),$h(Pn(l,p))),s=s.current.alternate,s.flags|=65536,k&=-k,s.lanes|=k,y=Pn(y,p),k=Ny(s.stateNode,y,k),ay(s,k),jr!==4&&(jr=2)),!1;var S=Error(n(520),{cause:y});if(S=Pn(S,p),nu===null?nu=[S]:nu.push(S),jr!==4&&(jr=2),l===null)return!0;y=Pn(y,p),p=l;do{switch(p.tag){case 3:return p.flags|=65536,s=k&-k,p.lanes|=s,s=Ny(p.stateNode,y,s),ay(p,s),!1;case 1:if(l=p.type,S=p.stateNode,(p.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(ro===null||!ro.has(S))))return p.flags|=65536,k&=-k,p.lanes|=k,k=Bk(k),Lk(k,s,p,y),ay(p,k),!1}p=p.return}while(p!==null);return!1}var My=Error(n(461)),Jr=!1;function wi(s,l,p,y){l.child=s===null?FC(l,null,p,y):Jo(l,s.child,p,y)}function Ok(s,l,p,y,k){p=p.render;var S=l.ref;if("ref"in y){var R={};for(var q in y)q!=="ref"&&(R[q]=y[q])}else R=y;return Ko(l),y=uy(s,l,p,R,S,k),q=dy(),s!==null&&!Jr?(fy(s,l,k),ss(s,l,k)):(qe&&q&&Wm(l),l.flags|=1,wi(s,l,y,k),l.child)}function Rk(s,l,p,y,k){if(s===null){var S=p.type;return typeof S=="function"&&!Um(S)&&S.defaultProps===void 0&&p.compare===null?(l.tag=15,l.type=S,Dk(s,l,S,y,k)):(s=uf(p.type,null,y,l,l.mode,k),s.ref=l.ref,s.return=l,l.child=s)}if(S=s.child,!Iy(s,k)){var R=S.memoizedProps;if(p=p.compare,p=p!==null?p:Fh,p(R,y)&&s.ref===l.ref)return ss(s,l,k)}return l.flags|=1,s=ts(S,y),s.ref=l.ref,s.return=l,l.child=s}function Dk(s,l,p,y,k){if(s!==null){var S=s.memoizedProps;if(Fh(S,y)&&s.ref===l.ref)if(Jr=!1,l.pendingProps=y=S,Iy(s,k))(s.flags&131072)!==0&&(Jr=!0);else return l.lanes=s.lanes,ss(s,l,k)}return By(s,l,p,y,k)}function Fk(s,l,p,y){var k=y.children,S=s!==null?s.memoizedState:null;if(s===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),y.mode==="hidden"){if((l.flags&128)!==0){if(S=S!==null?S.baseLanes|p:p,s!==null){for(y=l.child=s.child,k=0;y!==null;)k=k|y.lanes|y.childLanes,y=y.sibling;y=k&~S}else y=0,l.child=null;return jk(s,l,S,p,y)}if((p&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},s!==null&&gf(l,S!==null?S.cachePool:null),S!==null?$C(l,S):oy(),zC(l);else return y=l.lanes=536870912,jk(s,l,S!==null?S.baseLanes|p:p,p,y)}else S!==null?(gf(l,S.cachePool),$C(l,S),Qs(),l.memoizedState=null):(s!==null&&gf(l,null),oy(),Qs());return wi(s,l,k,p),l.child}function Zh(s,l){return s!==null&&s.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function jk(s,l,p,y,k){var S=ey();return S=S===null?null:{parent:Zr._currentValue,pool:S},l.memoizedState={baseLanes:p,cachePool:S},s!==null&&gf(l,null),oy(),zC(l),s!==null&&rc(s,l,y,!0),l.childLanes=k,null}function Bf(s,l){return l=Of({mode:l.mode,children:l.children},s.mode),l.ref=s.ref,s.child=l,l.return=s,l}function Ik(s,l,p){return Jo(l,s.child,null,p),s=Bf(l,l.pendingProps),s.flags|=2,kn(l),l.memoizedState=null,s}function JF(s,l,p){var y=l.pendingProps,k=(l.flags&128)!==0;if(l.flags&=-129,s===null){if(qe){if(y.mode==="hidden")return s=Bf(l,y),l.lanes=536870912,Zh(null,s);if(cy(l),(s=br)?(s=Xw(s,Hn),s=s!==null&&s.data==="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:Hs!==null?{id:Ea,overflow:Aa}:null,retryLane:536870912,hydrationErrors:null},p=_C(s),p.return=l,l.child=p,Ci=l,br=null)):s=null,s===null)throw Ws(l);return l.lanes=536870912,null}return Bf(l,y)}var S=s.memoizedState;if(S!==null){var R=S.dehydrated;if(cy(l),k)if(l.flags&256)l.flags&=-257,l=Ik(s,l,p);else if(l.memoizedState!==null)l.child=s.child,l.flags|=128,l=null;else throw Error(n(558));else if(Jr||rc(s,l,p,!1),k=(p&s.childLanes)!==0,Jr||k){if(y=gr,y!==null&&(R=Je(y,p),R!==0&&R!==S.retryLane))throw S.retryLane=R,Go(s,R),cn(y,s,R),My;qf(),l=Ik(s,l,p)}else s=S.treeContext,br=Wn(R.nextSibling),Ci=l,qe=!0,Gs=null,Hn=!1,s!==null&&wC(l,s),l=Bf(l,y),l.flags|=4096;return l}return s=ts(s.child,{mode:y.mode,children:y.children}),s.ref=l.ref,l.child=s,s.return=l,s}function Lf(s,l){var p=l.ref;if(p===null)s!==null&&s.ref!==null&&(l.flags|=4194816);else{if(typeof p!="function"&&typeof p!="object")throw Error(n(284));(s===null||s.ref!==p)&&(l.flags|=4194816)}}function By(s,l,p,y,k){return Ko(l),p=uy(s,l,p,y,void 0,k),y=dy(),s!==null&&!Jr?(fy(s,l,k),ss(s,l,k)):(qe&&y&&Wm(l),l.flags|=1,wi(s,l,p,k),l.child)}function $k(s,l,p,y,k,S){return Ko(l),l.updateQueue=null,p=qC(l,y,p,k),PC(s),y=dy(),s!==null&&!Jr?(fy(s,l,S),ss(s,l,S)):(qe&&y&&Wm(l),l.flags|=1,wi(s,l,p,S),l.child)}function zk(s,l,p,y,k){if(Ko(l),l.stateNode===null){var S=Ql,R=p.contextType;typeof R=="object"&&R!==null&&(S=ki(R)),S=new p(y,S),l.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=Ay,l.stateNode=S,S._reactInternals=l,S=l.stateNode,S.props=y,S.state=l.memoizedState,S.refs={},iy(l),R=p.contextType,S.context=typeof R=="object"&&R!==null?ki(R):Ql,S.state=l.memoizedState,R=p.getDerivedStateFromProps,typeof R=="function"&&(Ey(l,p,R,y),S.state=l.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(R=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),R!==S.state&&Ay.enqueueReplaceState(S,S.state,null),Wh(l,y,S,k),Gh(),S.state=l.memoizedState),typeof S.componentDidMount=="function"&&(l.flags|=4194308),y=!0}else if(s===null){S=l.stateNode;var q=l.memoizedProps,Z=el(p,q);S.props=Z;var ut=S.context,Ct=p.contextType;R=Ql,typeof Ct=="object"&&Ct!==null&&(R=ki(Ct));var St=p.getDerivedStateFromProps;Ct=typeof St=="function"||typeof S.getSnapshotBeforeUpdate=="function",q=l.pendingProps!==q,Ct||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(q||ut!==R)&&Tk(l,S,y,R),Vs=!1;var ft=l.memoizedState;S.state=ft,Wh(l,y,S,k),Gh(),ut=l.memoizedState,q||ft!==ut||Vs?(typeof St=="function"&&(Ey(l,p,St,y),ut=l.memoizedState),(Z=Vs||Sk(l,p,Z,y,ft,ut,R))?(Ct||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(l.flags|=4194308)):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=y,l.memoizedState=ut),S.props=y,S.state=ut,S.context=R,y=Z):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),y=!1)}else{S=l.stateNode,ny(s,l),R=l.memoizedProps,Ct=el(p,R),S.props=Ct,St=l.pendingProps,ft=S.context,ut=p.contextType,Z=Ql,typeof ut=="object"&&ut!==null&&(Z=ki(ut)),q=p.getDerivedStateFromProps,(ut=typeof q=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(R!==St||ft!==Z)&&Tk(l,S,y,Z),Vs=!1,ft=l.memoizedState,S.state=ft,Wh(l,y,S,k),Gh();var mt=l.memoizedState;R!==St||ft!==mt||Vs||s!==null&&s.dependencies!==null&&ff(s.dependencies)?(typeof q=="function"&&(Ey(l,p,q,y),mt=l.memoizedState),(Ct=Vs||Sk(l,p,Ct,y,ft,mt,Z)||s!==null&&s.dependencies!==null&&ff(s.dependencies))?(ut||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(y,mt,Z),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(y,mt,Z)),typeof S.componentDidUpdate=="function"&&(l.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof S.componentDidUpdate!="function"||R===s.memoizedProps&&ft===s.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||R===s.memoizedProps&&ft===s.memoizedState||(l.flags|=1024),l.memoizedProps=y,l.memoizedState=mt),S.props=y,S.state=mt,S.context=Z,y=Ct):(typeof S.componentDidUpdate!="function"||R===s.memoizedProps&&ft===s.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||R===s.memoizedProps&&ft===s.memoizedState||(l.flags|=1024),y=!1)}return S=y,Lf(s,l),y=(l.flags&128)!==0,S||y?(S=l.stateNode,p=y&&typeof p.getDerivedStateFromError!="function"?null:S.render(),l.flags|=1,s!==null&&y?(l.child=Jo(l,s.child,null,k),l.child=Jo(l,null,p,k)):wi(s,l,p,k),l.memoizedState=S.state,s=l.child):s=ss(s,l,k),s}function Pk(s,l,p,y){return Yo(),l.flags|=256,wi(s,l,p,y),l.child}var Ly={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Oy(s){return{baseLanes:s,cachePool:MC()}}function Ry(s,l,p){return s=s!==null?s.childLanes&~p:0,l&&(s|=Sn),s}function qk(s,l,p){var y=l.pendingProps,k=!1,S=(l.flags&128)!==0,R;if((R=S)||(R=s!==null&&s.memoizedState===null?!1:(Hr.current&2)!==0),R&&(k=!0,l.flags&=-129),R=(l.flags&32)!==0,l.flags&=-33,s===null){if(qe){if(k?Zs(l):Qs(),(s=br)?(s=Xw(s,Hn),s=s!==null&&s.data!=="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:Hs!==null?{id:Ea,overflow:Aa}:null,retryLane:536870912,hydrationErrors:null},p=_C(s),p.return=l,l.child=p,Ci=l,br=null)):s=null,s===null)throw Ws(l);return m0(s)?l.lanes=32:l.lanes=536870912,null}var q=y.children;return y=y.fallback,k?(Qs(),k=l.mode,q=Of({mode:"hidden",children:q},k),y=Wo(y,k,p,null),q.return=l,y.return=l,q.sibling=y,l.child=q,y=l.child,y.memoizedState=Oy(p),y.childLanes=Ry(s,R,p),l.memoizedState=Ly,Zh(null,y)):(Zs(l),Dy(l,q))}var Z=s.memoizedState;if(Z!==null&&(q=Z.dehydrated,q!==null)){if(S)l.flags&256?(Zs(l),l.flags&=-257,l=Fy(s,l,p)):l.memoizedState!==null?(Qs(),l.child=s.child,l.flags|=128,l=null):(Qs(),q=y.fallback,k=l.mode,y=Of({mode:"visible",children:y.children},k),q=Wo(q,k,p,null),q.flags|=2,y.return=l,q.return=l,y.sibling=q,l.child=y,Jo(l,s.child,null,p),y=l.child,y.memoizedState=Oy(p),y.childLanes=Ry(s,R,p),l.memoizedState=Ly,l=Zh(null,y));else if(Zs(l),m0(q)){if(R=q.nextSibling&&q.nextSibling.dataset,R)var ut=R.dgst;R=ut,y=Error(n(419)),y.stack="",y.digest=R,$h({value:y,source:null,stack:null}),l=Fy(s,l,p)}else if(Jr||rc(s,l,p,!1),R=(p&s.childLanes)!==0,Jr||R){if(R=gr,R!==null&&(y=Je(R,p),y!==0&&y!==Z.retryLane))throw Z.retryLane=y,Go(s,y),cn(R,s,y),My;g0(q)||qf(),l=Fy(s,l,p)}else g0(q)?(l.flags|=192,l.child=s.child,l=null):(s=Z.treeContext,br=Wn(q.nextSibling),Ci=l,qe=!0,Gs=null,Hn=!1,s!==null&&wC(l,s),l=Dy(l,y.children),l.flags|=4096);return l}return k?(Qs(),q=y.fallback,k=l.mode,Z=s.child,ut=Z.sibling,y=ts(Z,{mode:"hidden",children:y.children}),y.subtreeFlags=Z.subtreeFlags&65011712,ut!==null?q=ts(ut,q):(q=Wo(q,k,p,null),q.flags|=2),q.return=l,y.return=l,y.sibling=q,l.child=y,Zh(null,y),y=l.child,q=s.child.memoizedState,q===null?q=Oy(p):(k=q.cachePool,k!==null?(Z=Zr._currentValue,k=k.parent!==Z?{parent:Z,pool:Z}:k):k=MC(),q={baseLanes:q.baseLanes|p,cachePool:k}),y.memoizedState=q,y.childLanes=Ry(s,R,p),l.memoizedState=Ly,Zh(s.child,y)):(Zs(l),p=s.child,s=p.sibling,p=ts(p,{mode:"visible",children:y.children}),p.return=l,p.sibling=null,s!==null&&(R=l.deletions,R===null?(l.deletions=[s],l.flags|=16):R.push(s)),l.child=p,l.memoizedState=null,p)}function Dy(s,l){return l=Of({mode:"visible",children:l},s.mode),l.return=s,s.child=l}function Of(s,l){return s=_n(22,s,null,l),s.lanes=0,s}function Fy(s,l,p){return Jo(l,s.child,null,p),s=Dy(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function Uk(s,l,p){s.lanes|=l;var y=s.alternate;y!==null&&(y.lanes|=l),Zm(s.return,l,p)}function jy(s,l,p,y,k,S){var R=s.memoizedState;R===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:y,tail:p,tailMode:k,treeForkCount:S}:(R.isBackwards=l,R.rendering=null,R.renderingStartTime=0,R.last=y,R.tail=p,R.tailMode=k,R.treeForkCount=S)}function Hk(s,l,p){var y=l.pendingProps,k=y.revealOrder,S=y.tail;y=y.children;var R=Hr.current,q=(R&2)!==0;if(q?(R=R&1|2,l.flags|=128):R&=1,lt(Hr,R),wi(s,l,y,p),y=qe?Ih:0,!q&&s!==null&&(s.flags&128)!==0)t:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&Uk(s,p,l);else if(s.tag===19)Uk(s,p,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break t;for(;s.sibling===null;){if(s.return===null||s.return===l)break t;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(k){case"forwards":for(p=l.child,k=null;p!==null;)s=p.alternate,s!==null&&_f(s)===null&&(k=p),p=p.sibling;p=k,p===null?(k=l.child,l.child=null):(k=p.sibling,p.sibling=null),jy(l,!1,k,p,S,y);break;case"backwards":case"unstable_legacy-backwards":for(p=null,k=l.child,l.child=null;k!==null;){if(s=k.alternate,s!==null&&_f(s)===null){l.child=k;break}s=k.sibling,k.sibling=p,p=k,k=s}jy(l,!0,p,null,S,y);break;case"together":jy(l,!1,null,null,void 0,y);break;default:l.memoizedState=null}return l.child}function ss(s,l,p){if(s!==null&&(l.dependencies=s.dependencies),eo|=l.lanes,(p&l.childLanes)===0)if(s!==null){if(rc(s,l,p,!1),(p&l.childLanes)===0)return null}else return null;if(s!==null&&l.child!==s.child)throw Error(n(153));if(l.child!==null){for(s=l.child,p=ts(s,s.pendingProps),l.child=p,p.return=l;s.sibling!==null;)s=s.sibling,p=p.sibling=ts(s,s.pendingProps),p.return=l;p.sibling=null}return l.child}function Iy(s,l){return(s.lanes&l)!==0?!0:(s=s.dependencies,!!(s!==null&&ff(s)))}function tj(s,l,p){switch(l.tag){case 3:it(l,l.stateNode.containerInfo),Ys(l,Zr,s.memoizedState.cache),Yo();break;case 27:case 5:pt(l);break;case 4:it(l,l.stateNode.containerInfo);break;case 10:Ys(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,cy(l),null;break;case 13:var y=l.memoizedState;if(y!==null)return y.dehydrated!==null?(Zs(l),l.flags|=128,null):(p&l.child.childLanes)!==0?qk(s,l,p):(Zs(l),s=ss(s,l,p),s!==null?s.sibling:null);Zs(l);break;case 19:var k=(s.flags&128)!==0;if(y=(p&l.childLanes)!==0,y||(rc(s,l,p,!1),y=(p&l.childLanes)!==0),k){if(y)return Hk(s,l,p);l.flags|=128}if(k=l.memoizedState,k!==null&&(k.rendering=null,k.tail=null,k.lastEffect=null),lt(Hr,Hr.current),y)break;return null;case 22:return l.lanes=0,Fk(s,l,p,l.pendingProps);case 24:Ys(l,Zr,s.memoizedState.cache)}return ss(s,l,p)}function Gk(s,l,p){if(s!==null)if(s.memoizedProps!==l.pendingProps)Jr=!0;else{if(!Iy(s,p)&&(l.flags&128)===0)return Jr=!1,tj(s,l,p);Jr=(s.flags&131072)!==0}else Jr=!1,qe&&(l.flags&1048576)!==0&&kC(l,Ih,l.index);switch(l.lanes=0,l.tag){case 16:t:{var y=l.pendingProps;if(s=Zo(l.elementType),l.type=s,typeof s=="function")Um(s)?(y=el(s,y),l.tag=1,l=zk(null,l,s,y,p)):(l.tag=0,l=By(null,l,s,y,p));else{if(s!=null){var k=s.$$typeof;if(k===N){l.tag=11,l=Ok(null,l,s,y,p);break t}else if(k===A){l.tag=14,l=Rk(null,l,s,y,p);break t}}throw l=F(s)||s,Error(n(306,l,""))}}return l;case 0:return By(s,l,l.type,l.pendingProps,p);case 1:return y=l.type,k=el(y,l.pendingProps),zk(s,l,y,k,p);case 3:t:{if(it(l,l.stateNode.containerInfo),s===null)throw Error(n(387));y=l.pendingProps;var S=l.memoizedState;k=S.element,ny(s,l),Wh(l,y,null,p);var R=l.memoizedState;if(y=R.cache,Ys(l,Zr,y),y!==S.cache&&Qm(l,[Zr],p,!0),Gh(),y=R.element,S.isDehydrated)if(S={element:y,isDehydrated:!1,cache:R.cache},l.updateQueue.baseState=S,l.memoizedState=S,l.flags&256){l=Pk(s,l,y,p);break t}else if(y!==k){k=Pn(Error(n(424)),l),$h(k),l=Pk(s,l,y,p);break t}else{switch(s=l.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(br=Wn(s.firstChild),Ci=l,qe=!0,Gs=null,Hn=!0,p=FC(l,null,y,p),l.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling}else{if(Yo(),y===k){l=ss(s,l,p);break t}wi(s,l,y,p)}l=l.child}return l;case 26:return Lf(s,l),s===null?(p=r2(l.type,null,l.pendingProps,null))?l.memoizedState=p:qe||(p=l.type,s=l.pendingProps,y=Kf(kt.current).createElement(p),y[pr]=l,y[Rr]=s,Si(y,p,s),tr(y),l.stateNode=y):l.memoizedState=r2(l.type,s.memoizedProps,l.pendingProps,s.memoizedState),null;case 27:return pt(l),s===null&&qe&&(y=l.stateNode=Jw(l.type,l.pendingProps,kt.current),Ci=l,Hn=!0,k=br,so(l.type)?(y0=k,br=Wn(y.firstChild)):br=k),wi(s,l,l.pendingProps.children,p),Lf(s,l),s===null&&(l.flags|=4194304),l.child;case 5:return s===null&&qe&&((k=y=br)&&(y=Mj(y,l.type,l.pendingProps,Hn),y!==null?(l.stateNode=y,Ci=l,br=Wn(y.firstChild),Hn=!1,k=!0):k=!1),k||Ws(l)),pt(l),k=l.type,S=l.pendingProps,R=s!==null?s.memoizedProps:null,y=S.children,d0(k,S)?y=null:R!==null&&d0(k,R)&&(l.flags|=32),l.memoizedState!==null&&(k=uy(s,l,GF,null,null,p),du._currentValue=k),Lf(s,l),wi(s,l,y,p),l.child;case 6:return s===null&&qe&&((s=p=br)&&(p=Bj(p,l.pendingProps,Hn),p!==null?(l.stateNode=p,Ci=l,br=null,s=!0):s=!1),s||Ws(l)),null;case 13:return qk(s,l,p);case 4:return it(l,l.stateNode.containerInfo),y=l.pendingProps,s===null?l.child=Jo(l,null,y,p):wi(s,l,y,p),l.child;case 11:return Ok(s,l,l.type,l.pendingProps,p);case 7:return wi(s,l,l.pendingProps,p),l.child;case 8:return wi(s,l,l.pendingProps.children,p),l.child;case 12:return wi(s,l,l.pendingProps.children,p),l.child;case 10:return y=l.pendingProps,Ys(l,l.type,y.value),wi(s,l,y.children,p),l.child;case 9:return k=l.type._context,y=l.pendingProps.children,Ko(l),k=ki(k),y=y(k),l.flags|=1,wi(s,l,y,p),l.child;case 14:return Rk(s,l,l.type,l.pendingProps,p);case 15:return Dk(s,l,l.type,l.pendingProps,p);case 19:return Hk(s,l,p);case 31:return JF(s,l,p);case 22:return Fk(s,l,p,l.pendingProps);case 24:return Ko(l),y=ki(Zr),s===null?(k=ey(),k===null&&(k=gr,S=Jm(),k.pooledCache=S,S.refCount++,S!==null&&(k.pooledCacheLanes|=p),k=S),l.memoizedState={parent:y,cache:k},iy(l),Ys(l,Zr,k)):((s.lanes&p)!==0&&(ny(s,l),Wh(l,null,null,p),Gh()),k=s.memoizedState,S=l.memoizedState,k.parent!==y?(k={parent:y,cache:y},l.memoizedState=k,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=k),Ys(l,Zr,y)):(y=S.cache,Ys(l,Zr,y),y!==k.cache&&Qm(l,[Zr],p,!0))),wi(s,l,l.pendingProps.children,p),l.child;case 29:throw l.pendingProps}throw Error(n(156,l.tag))}function os(s){s.flags|=4}function $y(s,l,p,y,k){if((l=(s.mode&32)!==0)&&(l=!1),l){if(s.flags|=16777216,(k&335544128)===k)if(s.stateNode.complete)s.flags|=8192;else if(bw())s.flags|=8192;else throw Qo=yf,ry}else s.flags&=-16777217}function Wk(s,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!o2(l))if(bw())s.flags|=8192;else throw Qo=yf,ry}function Rf(s,l){l!==null&&(s.flags|=4),s.flags&16384&&(l=s.tag!==22?le():536870912,s.lanes|=l,pc|=l)}function Qh(s,l){if(!qe)switch(s.tailMode){case"hidden":l=s.tail;for(var p=null;l!==null;)l.alternate!==null&&(p=l),l=l.sibling;p===null?s.tail=null:p.sibling=null;break;case"collapsed":p=s.tail;for(var y=null;p!==null;)p.alternate!==null&&(y=p),p=p.sibling;y===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:y.sibling=null}}function xr(s){var l=s.alternate!==null&&s.alternate.child===s.child,p=0,y=0;if(l)for(var k=s.child;k!==null;)p|=k.lanes|k.childLanes,y|=k.subtreeFlags&65011712,y|=k.flags&65011712,k.return=s,k=k.sibling;else for(k=s.child;k!==null;)p|=k.lanes|k.childLanes,y|=k.subtreeFlags,y|=k.flags,k.return=s,k=k.sibling;return s.subtreeFlags|=y,s.childLanes=p,l}function ej(s,l,p){var y=l.pendingProps;switch(Ym(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xr(l),null;case 1:return xr(l),null;case 3:return p=l.stateNode,y=null,s!==null&&(y=s.memoizedState.cache),l.memoizedState.cache!==y&&(l.flags|=2048),is(Zr),xt(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(s===null||s.child===null)&&(ec(l)?os(l):s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Km())),xr(l),null;case 26:var k=l.type,S=l.memoizedState;return s===null?(os(l),S!==null?(xr(l),Wk(l,S)):(xr(l),$y(l,k,null,y,p))):S?S!==s.memoizedState?(os(l),xr(l),Wk(l,S)):(xr(l),l.flags&=-16777217):(s=s.memoizedProps,s!==y&&os(l),xr(l),$y(l,k,s,y,p)),null;case 27:if(Et(l),p=kt.current,k=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==y&&os(l);else{if(!y){if(l.stateNode===null)throw Error(n(166));return xr(l),null}s=st.current,ec(l)?SC(l):(s=Jw(k,y,p),l.stateNode=s,os(l))}return xr(l),null;case 5:if(Et(l),k=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==y&&os(l);else{if(!y){if(l.stateNode===null)throw Error(n(166));return xr(l),null}if(S=st.current,ec(l))SC(l);else{var R=Kf(kt.current);switch(S){case 1:S=R.createElementNS("http://www.w3.org/2000/svg",k);break;case 2:S=R.createElementNS("http://www.w3.org/1998/Math/MathML",k);break;default:switch(k){case"svg":S=R.createElementNS("http://www.w3.org/2000/svg",k);break;case"math":S=R.createElementNS("http://www.w3.org/1998/Math/MathML",k);break;case"script":S=R.createElement("div"),S.innerHTML="<script><\/script>",S=S.removeChild(S.firstChild);break;case"select":S=typeof y.is=="string"?R.createElement("select",{is:y.is}):R.createElement("select"),y.multiple?S.multiple=!0:y.size&&(S.size=y.size);break;default:S=typeof y.is=="string"?R.createElement(k,{is:y.is}):R.createElement(k)}}S[pr]=l,S[Rr]=y;t:for(R=l.child;R!==null;){if(R.tag===5||R.tag===6)S.appendChild(R.stateNode);else if(R.tag!==4&&R.tag!==27&&R.child!==null){R.child.return=R,R=R.child;continue}if(R===l)break t;for(;R.sibling===null;){if(R.return===null||R.return===l)break t;R=R.return}R.sibling.return=R.return,R=R.sibling}l.stateNode=S;t:switch(Si(S,k,y),k){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break t;case"img":y=!0;break t;default:y=!1}y&&os(l)}}return xr(l),$y(l,l.type,s===null?null:s.memoizedProps,l.pendingProps,p),null;case 6:if(s&&l.stateNode!=null)s.memoizedProps!==y&&os(l);else{if(typeof y!="string"&&l.stateNode===null)throw Error(n(166));if(s=kt.current,ec(l)){if(s=l.stateNode,p=l.memoizedProps,y=null,k=Ci,k!==null)switch(k.tag){case 27:case 5:y=k.memoizedProps}s[pr]=l,s=!!(s.nodeValue===p||y!==null&&y.suppressHydrationWarning===!0||qw(s.nodeValue,p)),s||Ws(l,!0)}else s=Kf(s).createTextNode(y),s[pr]=l,l.stateNode=s}return xr(l),null;case 31:if(p=l.memoizedState,s===null||s.memoizedState!==null){if(y=ec(l),p!==null){if(s===null){if(!y)throw Error(n(318));if(s=l.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(557));s[pr]=l}else Yo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;xr(l),s=!1}else p=Km(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=p),s=!0;if(!s)return l.flags&256?(kn(l),l):(kn(l),null);if((l.flags&128)!==0)throw Error(n(558))}return xr(l),null;case 13:if(y=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(k=ec(l),y!==null&&y.dehydrated!==null){if(s===null){if(!k)throw Error(n(318));if(k=l.memoizedState,k=k!==null?k.dehydrated:null,!k)throw Error(n(317));k[pr]=l}else Yo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;xr(l),k=!1}else k=Km(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=k),k=!0;if(!k)return l.flags&256?(kn(l),l):(kn(l),null)}return kn(l),(l.flags&128)!==0?(l.lanes=p,l):(p=y!==null,s=s!==null&&s.memoizedState!==null,p&&(y=l.child,k=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(k=y.alternate.memoizedState.cachePool.pool),S=null,y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(S=y.memoizedState.cachePool.pool),S!==k&&(y.flags|=2048)),p!==s&&p&&(l.child.flags|=8192),Rf(l,l.updateQueue),xr(l),null);case 4:return xt(),s===null&&o0(l.stateNode.containerInfo),xr(l),null;case 10:return is(l.type),xr(l),null;case 19:if(J(Hr),y=l.memoizedState,y===null)return xr(l),null;if(k=(l.flags&128)!==0,S=y.rendering,S===null)if(k)Qh(y,!1);else{if(jr!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(S=_f(s),S!==null){for(l.flags|=128,Qh(y,!1),s=S.updateQueue,l.updateQueue=s,Rf(l,s),l.subtreeFlags=0,s=p,p=l.child;p!==null;)vC(p,s),p=p.sibling;return lt(Hr,Hr.current&1|2),qe&&es(l,y.treeForkCount),l.child}s=s.sibling}y.tail!==null&&Me()>$f&&(l.flags|=128,k=!0,Qh(y,!1),l.lanes=4194304)}else{if(!k)if(s=_f(S),s!==null){if(l.flags|=128,k=!0,s=s.updateQueue,l.updateQueue=s,Rf(l,s),Qh(y,!0),y.tail===null&&y.tailMode==="hidden"&&!S.alternate&&!qe)return xr(l),null}else 2*Me()-y.renderingStartTime>$f&&p!==536870912&&(l.flags|=128,k=!0,Qh(y,!1),l.lanes=4194304);y.isBackwards?(S.sibling=l.child,l.child=S):(s=y.last,s!==null?s.sibling=S:l.child=S,y.last=S)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=Me(),s.sibling=null,p=Hr.current,lt(Hr,k?p&1|2:p&1),qe&&es(l,y.treeForkCount),s):(xr(l),null);case 22:case 23:return kn(l),ly(),y=l.memoizedState!==null,s!==null?s.memoizedState!==null!==y&&(l.flags|=8192):y&&(l.flags|=8192),y?(p&536870912)!==0&&(l.flags&128)===0&&(xr(l),l.subtreeFlags&6&&(l.flags|=8192)):xr(l),p=l.updateQueue,p!==null&&Rf(l,p.retryQueue),p=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),y=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(y=l.memoizedState.cachePool.pool),y!==p&&(l.flags|=2048),s!==null&&J(Xo),null;case 24:return p=null,s!==null&&(p=s.memoizedState.cache),l.memoizedState.cache!==p&&(l.flags|=2048),is(Zr),xr(l),null;case 25:return null;case 30:return null}throw Error(n(156,l.tag))}function rj(s,l){switch(Ym(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return is(Zr),xt(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return Et(l),null;case 31:if(l.memoizedState!==null){if(kn(l),l.alternate===null)throw Error(n(340));Yo()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 13:if(kn(l),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(n(340));Yo()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return J(Hr),null;case 4:return xt(),null;case 10:return is(l.type),null;case 22:case 23:return kn(l),ly(),s!==null&&J(Xo),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return is(Zr),null;case 25:return null;default:return null}}function Yk(s,l){switch(Ym(l),l.tag){case 3:is(Zr),xt();break;case 26:case 27:case 5:Et(l);break;case 4:xt();break;case 31:l.memoizedState!==null&&kn(l);break;case 13:kn(l);break;case 19:J(Hr);break;case 10:is(l.type);break;case 22:case 23:kn(l),ly(),s!==null&&J(Xo);break;case 24:is(Zr)}}function Jh(s,l){try{var p=l.updateQueue,y=p!==null?p.lastEffect:null;if(y!==null){var k=y.next;p=k;do{if((p.tag&s)===s){y=void 0;var S=p.create,R=p.inst;y=S(),R.destroy=y}p=p.next}while(p!==k)}}catch(q){lr(l,l.return,q)}}function Js(s,l,p){try{var y=l.updateQueue,k=y!==null?y.lastEffect:null;if(k!==null){var S=k.next;y=S;do{if((y.tag&s)===s){var R=y.inst,q=R.destroy;if(q!==void 0){R.destroy=void 0,k=l;var Z=p,ut=q;try{ut()}catch(Ct){lr(k,Z,Ct)}}}y=y.next}while(y!==S)}}catch(Ct){lr(l,l.return,Ct)}}function Vk(s){var l=s.updateQueue;if(l!==null){var p=s.stateNode;try{IC(l,p)}catch(y){lr(s,s.return,y)}}}function Kk(s,l,p){p.props=el(s.type,s.memoizedProps),p.state=s.memoizedState;try{p.componentWillUnmount()}catch(y){lr(s,l,y)}}function tu(s,l){try{var p=s.ref;if(p!==null){switch(s.tag){case 26:case 27:case 5:var y=s.stateNode;break;case 30:y=s.stateNode;break;default:y=s.stateNode}typeof p=="function"?s.refCleanup=p(y):p.current=y}}catch(k){lr(s,l,k)}}function Na(s,l){var p=s.ref,y=s.refCleanup;if(p!==null)if(typeof y=="function")try{y()}catch(k){lr(s,l,k)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(k){lr(s,l,k)}else p.current=null}function Xk(s){var l=s.type,p=s.memoizedProps,y=s.stateNode;try{t:switch(l){case"button":case"input":case"select":case"textarea":p.autoFocus&&y.focus();break t;case"img":p.src?y.src=p.src:p.srcSet&&(y.srcset=p.srcSet)}}catch(k){lr(s,s.return,k)}}function zy(s,l,p){try{var y=s.stateNode;wj(y,s.type,p,l),y[Rr]=l}catch(k){lr(s,s.return,k)}}function Zk(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&so(s.type)||s.tag===4}function Py(s){t:for(;;){for(;s.sibling===null;){if(s.return===null||Zk(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&so(s.type)||s.flags&2||s.child===null||s.tag===4)continue t;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function qy(s,l,p){var y=s.tag;if(y===5||y===6)s=s.stateNode,l?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(s,l):(l=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,l.appendChild(s),p=p._reactRootContainer,p!=null||l.onclick!==null||(l.onclick=Rt));else if(y!==4&&(y===27&&so(s.type)&&(p=s.stateNode,l=null),s=s.child,s!==null))for(qy(s,l,p),s=s.sibling;s!==null;)qy(s,l,p),s=s.sibling}function Df(s,l,p){var y=s.tag;if(y===5||y===6)s=s.stateNode,l?p.insertBefore(s,l):p.appendChild(s);else if(y!==4&&(y===27&&so(s.type)&&(p=s.stateNode),s=s.child,s!==null))for(Df(s,l,p),s=s.sibling;s!==null;)Df(s,l,p),s=s.sibling}function Qk(s){var l=s.stateNode,p=s.memoizedProps;try{for(var y=s.type,k=l.attributes;k.length;)l.removeAttributeNode(k[0]);Si(l,y,p),l[pr]=s,l[Rr]=p}catch(S){lr(s,s.return,S)}}var ls=!1,ti=!1,Uy=!1,Jk=typeof WeakSet=="function"?WeakSet:Set,fi=null;function ij(s,l){if(s=s.containerInfo,h0=rp,s=uC(s),Fm(s)){if("selectionStart"in s)var p={start:s.selectionStart,end:s.selectionEnd};else t:{p=(p=s.ownerDocument)&&p.defaultView||window;var y=p.getSelection&&p.getSelection();if(y&&y.rangeCount!==0){p=y.anchorNode;var k=y.anchorOffset,S=y.focusNode;y=y.focusOffset;try{p.nodeType,S.nodeType}catch{p=null;break t}var R=0,q=-1,Z=-1,ut=0,Ct=0,St=s,ft=null;e:for(;;){for(var mt;St!==p||k!==0&&St.nodeType!==3||(q=R+k),St!==S||y!==0&&St.nodeType!==3||(Z=R+y),St.nodeType===3&&(R+=St.nodeValue.length),(mt=St.firstChild)!==null;)ft=St,St=mt;for(;;){if(St===s)break e;if(ft===p&&++ut===k&&(q=R),ft===S&&++Ct===y&&(Z=R),(mt=St.nextSibling)!==null)break;St=ft,ft=St.parentNode}St=mt}p=q===-1||Z===-1?null:{start:q,end:Z}}else p=null}p=p||{start:0,end:0}}else p=null;for(u0={focusedElem:s,selectionRange:p},rp=!1,fi=l;fi!==null;)if(l=fi,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,fi=s;else for(;fi!==null;){switch(l=fi,S=l.alternate,s=l.flags,l.tag){case 0:if((s&4)!==0&&(s=l.updateQueue,s=s!==null?s.events:null,s!==null))for(p=0;p<s.length;p++)k=s[p],k.ref.impl=k.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&S!==null){s=void 0,p=l,k=S.memoizedProps,S=S.memoizedState,y=p.stateNode;try{var Wt=el(p.type,k);s=y.getSnapshotBeforeUpdate(Wt,S),y.__reactInternalSnapshotBeforeUpdate=s}catch(de){lr(p,p.return,de)}}break;case 3:if((s&1024)!==0){if(s=l.stateNode.containerInfo,p=s.nodeType,p===9)p0(s);else if(p===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":p0(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(n(163))}if(s=l.sibling,s!==null){s.return=l.return,fi=s;break}fi=l.return}}function tw(s,l,p){var y=p.flags;switch(p.tag){case 0:case 11:case 15:hs(s,p),y&4&&Jh(5,p);break;case 1:if(hs(s,p),y&4)if(s=p.stateNode,l===null)try{s.componentDidMount()}catch(R){lr(p,p.return,R)}else{var k=el(p.type,l.memoizedProps);l=l.memoizedState;try{s.componentDidUpdate(k,l,s.__reactInternalSnapshotBeforeUpdate)}catch(R){lr(p,p.return,R)}}y&64&&Vk(p),y&512&&tu(p,p.return);break;case 3:if(hs(s,p),y&64&&(s=p.updateQueue,s!==null)){if(l=null,p.child!==null)switch(p.child.tag){case 27:case 5:l=p.child.stateNode;break;case 1:l=p.child.stateNode}try{IC(s,l)}catch(R){lr(p,p.return,R)}}break;case 27:l===null&&y&4&&Qk(p);case 26:case 5:hs(s,p),l===null&&y&4&&Xk(p),y&512&&tu(p,p.return);break;case 12:hs(s,p);break;case 31:hs(s,p),y&4&&iw(s,p);break;case 13:hs(s,p),y&4&&nw(s,p),y&64&&(s=p.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(p=dj.bind(null,p),Lj(s,p))));break;case 22:if(y=p.memoizedState!==null||ls,!y){l=l!==null&&l.memoizedState!==null||ti,k=ls;var S=ti;ls=y,(ti=l)&&!S?us(s,p,(p.subtreeFlags&8772)!==0):hs(s,p),ls=k,ti=S}break;case 30:break;default:hs(s,p)}}function ew(s){var l=s.alternate;l!==null&&(s.alternate=null,ew(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&Ta(l)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var wr=null,an=!1;function cs(s,l,p){for(p=p.child;p!==null;)rw(s,l,p),p=p.sibling}function rw(s,l,p){if(Cr&&typeof Cr.onCommitFiberUnmount=="function")try{Cr.onCommitFiberUnmount(Yr,p)}catch{}switch(p.tag){case 26:ti||Na(p,l),cs(s,l,p),p.memoizedState?p.memoizedState.count--:p.stateNode&&(p=p.stateNode,p.parentNode.removeChild(p));break;case 27:ti||Na(p,l);var y=wr,k=an;so(p.type)&&(wr=p.stateNode,an=!1),cs(s,l,p),cu(p.stateNode),wr=y,an=k;break;case 5:ti||Na(p,l);case 6:if(y=wr,k=an,wr=null,cs(s,l,p),wr=y,an=k,wr!==null)if(an)try{(wr.nodeType===9?wr.body:wr.nodeName==="HTML"?wr.ownerDocument.body:wr).removeChild(p.stateNode)}catch(S){lr(p,l,S)}else try{wr.removeChild(p.stateNode)}catch(S){lr(p,l,S)}break;case 18:wr!==null&&(an?(s=wr,Vw(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,p.stateNode),Cc(s)):Vw(wr,p.stateNode));break;case 4:y=wr,k=an,wr=p.stateNode.containerInfo,an=!0,cs(s,l,p),wr=y,an=k;break;case 0:case 11:case 14:case 15:Js(2,p,l),ti||Js(4,p,l),cs(s,l,p);break;case 1:ti||(Na(p,l),y=p.stateNode,typeof y.componentWillUnmount=="function"&&Kk(p,l,y)),cs(s,l,p);break;case 21:cs(s,l,p);break;case 22:ti=(y=ti)||p.memoizedState!==null,cs(s,l,p),ti=y;break;default:cs(s,l,p)}}function iw(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{Cc(s)}catch(p){lr(l,l.return,p)}}}function nw(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{Cc(s)}catch(p){lr(l,l.return,p)}}function nj(s){switch(s.tag){case 31:case 13:case 19:var l=s.stateNode;return l===null&&(l=s.stateNode=new Jk),l;case 22:return s=s.stateNode,l=s._retryCache,l===null&&(l=s._retryCache=new Jk),l;default:throw Error(n(435,s.tag))}}function Ff(s,l){var p=nj(s);l.forEach(function(y){if(!p.has(y)){p.add(y);var k=fj.bind(null,s,y);y.then(k,k)}})}function sn(s,l){var p=l.deletions;if(p!==null)for(var y=0;y<p.length;y++){var k=p[y],S=s,R=l,q=R;t:for(;q!==null;){switch(q.tag){case 27:if(so(q.type)){wr=q.stateNode,an=!1;break t}break;case 5:wr=q.stateNode,an=!1;break t;case 3:case 4:wr=q.stateNode.containerInfo,an=!0;break t}q=q.return}if(wr===null)throw Error(n(160));rw(S,R,k),wr=null,an=!1,S=k.alternate,S!==null&&(S.return=null),k.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)aw(l,s),l=l.sibling}var ca=null;function aw(s,l){var p=s.alternate,y=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:sn(l,s),on(s),y&4&&(Js(3,s,s.return),Jh(3,s),Js(5,s,s.return));break;case 1:sn(l,s),on(s),y&512&&(ti||p===null||Na(p,p.return)),y&64&&ls&&(s=s.updateQueue,s!==null&&(y=s.callbacks,y!==null&&(p=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=p===null?y:p.concat(y))));break;case 26:var k=ca;if(sn(l,s),on(s),y&512&&(ti||p===null||Na(p,p.return)),y&4){var S=p!==null?p.memoizedState:null;if(y=s.memoizedState,p===null)if(y===null)if(s.stateNode===null){t:{y=s.type,p=s.memoizedProps,k=k.ownerDocument||k;e:switch(y){case"title":S=k.getElementsByTagName("title")[0],(!S||S[Dn]||S[pr]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=k.createElement(y),k.head.insertBefore(S,k.querySelector("head > title"))),Si(S,y,p),S[pr]=s,tr(S),y=S;break t;case"link":var R=a2("link","href",k).get(y+(p.href||""));if(R){for(var q=0;q<R.length;q++)if(S=R[q],S.getAttribute("href")===(p.href==null||p.href===""?null:p.href)&&S.getAttribute("rel")===(p.rel==null?null:p.rel)&&S.getAttribute("title")===(p.title==null?null:p.title)&&S.getAttribute("crossorigin")===(p.crossOrigin==null?null:p.crossOrigin)){R.splice(q,1);break e}}S=k.createElement(y),Si(S,y,p),k.head.appendChild(S);break;case"meta":if(R=a2("meta","content",k).get(y+(p.content||""))){for(q=0;q<R.length;q++)if(S=R[q],S.getAttribute("content")===(p.content==null?null:""+p.content)&&S.getAttribute("name")===(p.name==null?null:p.name)&&S.getAttribute("property")===(p.property==null?null:p.property)&&S.getAttribute("http-equiv")===(p.httpEquiv==null?null:p.httpEquiv)&&S.getAttribute("charset")===(p.charSet==null?null:p.charSet)){R.splice(q,1);break e}}S=k.createElement(y),Si(S,y,p),k.head.appendChild(S);break;default:throw Error(n(468,y))}S[pr]=s,tr(S),y=S}s.stateNode=y}else s2(k,s.type,s.stateNode);else s.stateNode=n2(k,y,s.memoizedProps);else S!==y?(S===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):S.count--,y===null?s2(k,s.type,s.stateNode):n2(k,y,s.memoizedProps)):y===null&&s.stateNode!==null&&zy(s,s.memoizedProps,p.memoizedProps)}break;case 27:sn(l,s),on(s),y&512&&(ti||p===null||Na(p,p.return)),p!==null&&y&4&&zy(s,s.memoizedProps,p.memoizedProps);break;case 5:if(sn(l,s),on(s),y&512&&(ti||p===null||Na(p,p.return)),s.flags&32){k=s.stateNode;try{jt(k,"")}catch(Wt){lr(s,s.return,Wt)}}y&4&&s.stateNode!=null&&(k=s.memoizedProps,zy(s,k,p!==null?p.memoizedProps:k)),y&1024&&(Uy=!0);break;case 6:if(sn(l,s),on(s),y&4){if(s.stateNode===null)throw Error(n(162));y=s.memoizedProps,p=s.stateNode;try{p.nodeValue=y}catch(Wt){lr(s,s.return,Wt)}}break;case 3:if(Qf=null,k=ca,ca=Xf(l.containerInfo),sn(l,s),ca=k,on(s),y&4&&p!==null&&p.memoizedState.isDehydrated)try{Cc(l.containerInfo)}catch(Wt){lr(s,s.return,Wt)}Uy&&(Uy=!1,sw(s));break;case 4:y=ca,ca=Xf(s.stateNode.containerInfo),sn(l,s),on(s),ca=y;break;case 12:sn(l,s),on(s);break;case 31:sn(l,s),on(s),y&4&&(y=s.updateQueue,y!==null&&(s.updateQueue=null,Ff(s,y)));break;case 13:sn(l,s),on(s),s.child.flags&8192&&s.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(If=Me()),y&4&&(y=s.updateQueue,y!==null&&(s.updateQueue=null,Ff(s,y)));break;case 22:k=s.memoizedState!==null;var Z=p!==null&&p.memoizedState!==null,ut=ls,Ct=ti;if(ls=ut||k,ti=Ct||Z,sn(l,s),ti=Ct,ls=ut,on(s),y&8192)t:for(l=s.stateNode,l._visibility=k?l._visibility&-2:l._visibility|1,k&&(p===null||Z||ls||ti||rl(s)),p=null,l=s;;){if(l.tag===5||l.tag===26){if(p===null){Z=p=l;try{if(S=Z.stateNode,k)R=S.style,typeof R.setProperty=="function"?R.setProperty("display","none","important"):R.display="none";else{q=Z.stateNode;var St=Z.memoizedProps.style,ft=St!=null&&St.hasOwnProperty("display")?St.display:null;q.style.display=ft==null||typeof ft=="boolean"?"":(""+ft).trim()}}catch(Wt){lr(Z,Z.return,Wt)}}}else if(l.tag===6){if(p===null){Z=l;try{Z.stateNode.nodeValue=k?"":Z.memoizedProps}catch(Wt){lr(Z,Z.return,Wt)}}}else if(l.tag===18){if(p===null){Z=l;try{var mt=Z.stateNode;k?Kw(mt,!0):Kw(Z.stateNode,!1)}catch(Wt){lr(Z,Z.return,Wt)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===s)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break t;for(;l.sibling===null;){if(l.return===null||l.return===s)break t;p===l&&(p=null),l=l.return}p===l&&(p=null),l.sibling.return=l.return,l=l.sibling}y&4&&(y=s.updateQueue,y!==null&&(p=y.retryQueue,p!==null&&(y.retryQueue=null,Ff(s,p))));break;case 19:sn(l,s),on(s),y&4&&(y=s.updateQueue,y!==null&&(s.updateQueue=null,Ff(s,y)));break;case 30:break;case 21:break;default:sn(l,s),on(s)}}function on(s){var l=s.flags;if(l&2){try{for(var p,y=s.return;y!==null;){if(Zk(y)){p=y;break}y=y.return}if(p==null)throw Error(n(160));switch(p.tag){case 27:var k=p.stateNode,S=Py(s);Df(s,S,k);break;case 5:var R=p.stateNode;p.flags&32&&(jt(R,""),p.flags&=-33);var q=Py(s);Df(s,q,R);break;case 3:case 4:var Z=p.stateNode.containerInfo,ut=Py(s);qy(s,ut,Z);break;default:throw Error(n(161))}}catch(Ct){lr(s,s.return,Ct)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function sw(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var l=s;sw(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),s=s.sibling}}function hs(s,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)tw(s,l.alternate,l),l=l.sibling}function rl(s){for(s=s.child;s!==null;){var l=s;switch(l.tag){case 0:case 11:case 14:case 15:Js(4,l,l.return),rl(l);break;case 1:Na(l,l.return);var p=l.stateNode;typeof p.componentWillUnmount=="function"&&Kk(l,l.return,p),rl(l);break;case 27:cu(l.stateNode);case 26:case 5:Na(l,l.return),rl(l);break;case 22:l.memoizedState===null&&rl(l);break;case 30:rl(l);break;default:rl(l)}s=s.sibling}}function us(s,l,p){for(p=p&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var y=l.alternate,k=s,S=l,R=S.flags;switch(S.tag){case 0:case 11:case 15:us(k,S,p),Jh(4,S);break;case 1:if(us(k,S,p),y=S,k=y.stateNode,typeof k.componentDidMount=="function")try{k.componentDidMount()}catch(ut){lr(y,y.return,ut)}if(y=S,k=y.updateQueue,k!==null){var q=y.stateNode;try{var Z=k.shared.hiddenCallbacks;if(Z!==null)for(k.shared.hiddenCallbacks=null,k=0;k<Z.length;k++)jC(Z[k],q)}catch(ut){lr(y,y.return,ut)}}p&&R&64&&Vk(S),tu(S,S.return);break;case 27:Qk(S);case 26:case 5:us(k,S,p),p&&y===null&&R&4&&Xk(S),tu(S,S.return);break;case 12:us(k,S,p);break;case 31:us(k,S,p),p&&R&4&&iw(k,S);break;case 13:us(k,S,p),p&&R&4&&nw(k,S);break;case 22:S.memoizedState===null&&us(k,S,p),tu(S,S.return);break;case 30:break;default:us(k,S,p)}l=l.sibling}}function Hy(s,l){var p=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==p&&(s!=null&&s.refCount++,p!=null&&zh(p))}function Gy(s,l){s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&zh(s))}function ha(s,l,p,y){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)ow(s,l,p,y),l=l.sibling}function ow(s,l,p,y){var k=l.flags;switch(l.tag){case 0:case 11:case 15:ha(s,l,p,y),k&2048&&Jh(9,l);break;case 1:ha(s,l,p,y);break;case 3:ha(s,l,p,y),k&2048&&(s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&zh(s)));break;case 12:if(k&2048){ha(s,l,p,y),s=l.stateNode;try{var S=l.memoizedProps,R=S.id,q=S.onPostCommit;typeof q=="function"&&q(R,l.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(Z){lr(l,l.return,Z)}}else ha(s,l,p,y);break;case 31:ha(s,l,p,y);break;case 13:ha(s,l,p,y);break;case 23:break;case 22:S=l.stateNode,R=l.alternate,l.memoizedState!==null?S._visibility&2?ha(s,l,p,y):eu(s,l):S._visibility&2?ha(s,l,p,y):(S._visibility|=2,uc(s,l,p,y,(l.subtreeFlags&10256)!==0||!1)),k&2048&&Hy(R,l);break;case 24:ha(s,l,p,y),k&2048&&Gy(l.alternate,l);break;default:ha(s,l,p,y)}}function uc(s,l,p,y,k){for(k=k&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var S=s,R=l,q=p,Z=y,ut=R.flags;switch(R.tag){case 0:case 11:case 15:uc(S,R,q,Z,k),Jh(8,R);break;case 23:break;case 22:var Ct=R.stateNode;R.memoizedState!==null?Ct._visibility&2?uc(S,R,q,Z,k):eu(S,R):(Ct._visibility|=2,uc(S,R,q,Z,k)),k&&ut&2048&&Hy(R.alternate,R);break;case 24:uc(S,R,q,Z,k),k&&ut&2048&&Gy(R.alternate,R);break;default:uc(S,R,q,Z,k)}l=l.sibling}}function eu(s,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var p=s,y=l,k=y.flags;switch(y.tag){case 22:eu(p,y),k&2048&&Hy(y.alternate,y);break;case 24:eu(p,y),k&2048&&Gy(y.alternate,y);break;default:eu(p,y)}l=l.sibling}}var ru=8192;function dc(s,l,p){if(s.subtreeFlags&ru)for(s=s.child;s!==null;)lw(s,l,p),s=s.sibling}function lw(s,l,p){switch(s.tag){case 26:dc(s,l,p),s.flags&ru&&s.memoizedState!==null&&Hj(p,ca,s.memoizedState,s.memoizedProps);break;case 5:dc(s,l,p);break;case 3:case 4:var y=ca;ca=Xf(s.stateNode.containerInfo),dc(s,l,p),ca=y;break;case 22:s.memoizedState===null&&(y=s.alternate,y!==null&&y.memoizedState!==null?(y=ru,ru=16777216,dc(s,l,p),ru=y):dc(s,l,p));break;default:dc(s,l,p)}}function cw(s){var l=s.alternate;if(l!==null&&(s=l.child,s!==null)){l.child=null;do l=s.sibling,s.sibling=null,s=l;while(s!==null)}}function iu(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var p=0;p<l.length;p++){var y=l[p];fi=y,uw(y,s)}cw(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)hw(s),s=s.sibling}function hw(s){switch(s.tag){case 0:case 11:case 15:iu(s),s.flags&2048&&Js(9,s,s.return);break;case 3:iu(s);break;case 12:iu(s);break;case 22:var l=s.stateNode;s.memoizedState!==null&&l._visibility&2&&(s.return===null||s.return.tag!==13)?(l._visibility&=-3,jf(s)):iu(s);break;default:iu(s)}}function jf(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var p=0;p<l.length;p++){var y=l[p];fi=y,uw(y,s)}cw(s)}for(s=s.child;s!==null;){switch(l=s,l.tag){case 0:case 11:case 15:Js(8,l,l.return),jf(l);break;case 22:p=l.stateNode,p._visibility&2&&(p._visibility&=-3,jf(l));break;default:jf(l)}s=s.sibling}}function uw(s,l){for(;fi!==null;){var p=fi;switch(p.tag){case 0:case 11:case 15:Js(8,p,l);break;case 23:case 22:if(p.memoizedState!==null&&p.memoizedState.cachePool!==null){var y=p.memoizedState.cachePool.pool;y!=null&&y.refCount++}break;case 24:zh(p.memoizedState.cache)}if(y=p.child,y!==null)y.return=p,fi=y;else t:for(p=s;fi!==null;){y=fi;var k=y.sibling,S=y.return;if(ew(y),y===p){fi=null;break t}if(k!==null){k.return=S,fi=k;break t}fi=S}}}var aj={getCacheForType:function(s){var l=ki(Zr),p=l.data.get(s);return p===void 0&&(p=s(),l.data.set(s,p)),p},cacheSignal:function(){return ki(Zr).controller.signal}},sj=typeof WeakMap=="function"?WeakMap:Map,Ze=0,gr=null,Re=null,Ie=0,or=0,wn=null,to=!1,fc=!1,Wy=!1,ds=0,jr=0,eo=0,il=0,Yy=0,Sn=0,pc=0,nu=null,ln=null,Vy=!1,If=0,dw=0,$f=1/0,zf=null,ro=null,si=0,io=null,gc=null,fs=0,Ky=0,Xy=null,fw=null,au=0,Zy=null;function Tn(){return(Ze&2)!==0&&Ie!==0?Ie&-Ie:D.T!==null?i0():Pi()}function pw(){if(Sn===0)if((Ie&536870912)===0||qe){var s=bi;bi<<=1,(bi&3932160)===0&&(bi=262144),Sn=s}else Sn=536870912;return s=Cn.current,s!==null&&(s.flags|=32),Sn}function cn(s,l,p){(s===gr&&(or===2||or===9)||s.cancelPendingCommit!==null)&&(mc(s,0),no(s,Ie,Sn,!1)),ue(s,p),((Ze&2)===0||s!==gr)&&(s===gr&&((Ze&2)===0&&(il|=p),jr===4&&no(s,Ie,Sn,!1)),Ma(s))}function gw(s,l,p){if((Ze&6)!==0)throw Error(n(327));var y=!p&&(l&127)===0&&(l&s.expiredLanes)===0||_t(s,l),k=y?cj(s,l):Jy(s,l,!0),S=y;do{if(k===0){fc&&!y&&no(s,l,0,!1);break}else{if(p=s.current.alternate,S&&!oj(p)){k=Jy(s,l,!1),S=!1;continue}if(k===2){if(S=l,s.errorRecoveryDisabledLanes&S)var R=0;else R=s.pendingLanes&-536870913,R=R!==0?R:R&536870912?536870912:0;if(R!==0){l=R;t:{var q=s;k=nu;var Z=q.current.memoizedState.isDehydrated;if(Z&&(mc(q,R).flags|=256),R=Jy(q,R,!1),R!==2){if(Wy&&!Z){q.errorRecoveryDisabledLanes|=S,il|=S,k=4;break t}S=ln,ln=k,S!==null&&(ln===null?ln=S:ln.push.apply(ln,S))}k=R}if(S=!1,k!==2)continue}}if(k===1){mc(s,0),no(s,l,0,!0);break}t:{switch(y=s,S=k,S){case 0:case 1:throw Error(n(345));case 4:if((l&4194048)!==l)break;case 6:no(y,l,Sn,!to);break t;case 2:ln=null;break;case 3:case 5:break;default:throw Error(n(329))}if((l&62914560)===l&&(k=If+300-Me(),10<k)){if(no(y,l,Sn,!to),tt(y,0,!0)!==0)break t;fs=l,y.timeoutHandle=Ww(mw.bind(null,y,p,ln,zf,Vy,l,Sn,il,pc,to,S,"Throttled",-0,0),k);break t}mw(y,p,ln,zf,Vy,l,Sn,il,pc,to,S,null,-0,0)}}break}while(!0);Ma(s)}function mw(s,l,p,y,k,S,R,q,Z,ut,Ct,St,ft,mt){if(s.timeoutHandle=-1,St=l.subtreeFlags,St&8192||(St&16785408)===16785408){St={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Rt},lw(l,S,St);var Wt=(S&62914560)===S?If-Me():(S&4194048)===S?dw-Me():0;if(Wt=Gj(St,Wt),Wt!==null){fs=S,s.cancelPendingCommit=Wt(ww.bind(null,s,l,S,p,y,k,R,q,Z,Ct,St,null,ft,mt)),no(s,S,R,!ut);return}}ww(s,l,S,p,y,k,R,q,Z)}function oj(s){for(var l=s;;){var p=l.tag;if((p===0||p===11||p===15)&&l.flags&16384&&(p=l.updateQueue,p!==null&&(p=p.stores,p!==null)))for(var y=0;y<p.length;y++){var k=p[y],S=k.getSnapshot;k=k.value;try{if(!vn(S(),k))return!1}catch{return!1}}if(p=l.child,l.subtreeFlags&16384&&p!==null)p.return=l,l=p;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function no(s,l,p,y){l&=~Yy,l&=~il,s.suspendedLanes|=l,s.pingedLanes&=~l,y&&(s.warmLanes|=l),y=s.expirationTimes;for(var k=l;0<k;){var S=31-kr(k),R=1<<S;y[S]=-1,k&=~R}p!==0&&It(s,p,l)}function Pf(){return(Ze&6)===0?(su(0),!1):!0}function Qy(){if(Re!==null){if(or===0)var s=Re.return;else s=Re,rs=Vo=null,py(s),sc=null,qh=0,s=Re;for(;s!==null;)Yk(s.alternate,s),s=s.return;Re=null}}function mc(s,l){var p=s.timeoutHandle;p!==-1&&(s.timeoutHandle=-1,Ej(p)),p=s.cancelPendingCommit,p!==null&&(s.cancelPendingCommit=null,p()),fs=0,Qy(),gr=s,Re=p=ts(s.current,null),Ie=l,or=0,wn=null,to=!1,fc=_t(s,l),Wy=!1,pc=Sn=Yy=il=eo=jr=0,ln=nu=null,Vy=!1,(l&8)!==0&&(l|=l&32);var y=s.entangledLanes;if(y!==0)for(s=s.entanglements,y&=l;0<y;){var k=31-kr(y),S=1<<k;l|=s[k],y&=~S}return ds=l,lf(),p}function yw(s,l){ke=null,D.H=Xh,l===ac||l===mf?(l=OC(),or=3):l===ry?(l=OC(),or=4):or=l===My?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,wn=l,Re===null&&(jr=1,Mf(s,Pn(l,s.current)))}function bw(){var s=Cn.current;return s===null?!0:(Ie&4194048)===Ie?Gn===null:(Ie&62914560)===Ie||(Ie&536870912)!==0?s===Gn:!1}function xw(){var s=D.H;return D.H=Xh,s===null?Xh:s}function vw(){var s=D.A;return D.A=aj,s}function qf(){jr=4,to||(Ie&4194048)!==Ie&&Cn.current!==null||(fc=!0),(eo&134217727)===0&&(il&134217727)===0||gr===null||no(gr,Ie,Sn,!1)}function Jy(s,l,p){var y=Ze;Ze|=2;var k=xw(),S=vw();(gr!==s||Ie!==l)&&(zf=null,mc(s,l)),l=!1;var R=jr;t:do try{if(or!==0&&Re!==null){var q=Re,Z=wn;switch(or){case 8:Qy(),R=6;break t;case 3:case 2:case 9:case 6:Cn.current===null&&(l=!0);var ut=or;if(or=0,wn=null,yc(s,q,Z,ut),p&&fc){R=0;break t}break;default:ut=or,or=0,wn=null,yc(s,q,Z,ut)}}lj(),R=jr;break}catch(Ct){yw(s,Ct)}while(!0);return l&&s.shellSuspendCounter++,rs=Vo=null,Ze=y,D.H=k,D.A=S,Re===null&&(gr=null,Ie=0,lf()),R}function lj(){for(;Re!==null;)_w(Re)}function cj(s,l){var p=Ze;Ze|=2;var y=xw(),k=vw();gr!==s||Ie!==l?(zf=null,$f=Me()+500,mc(s,l)):fc=_t(s,l);t:do try{if(or!==0&&Re!==null){l=Re;var S=wn;e:switch(or){case 1:or=0,wn=null,yc(s,l,S,1);break;case 2:case 9:if(BC(S)){or=0,wn=null,Cw(l);break}l=function(){or!==2&&or!==9||gr!==s||(or=7),Ma(s)},S.then(l,l);break t;case 3:or=7;break t;case 4:or=5;break t;case 7:BC(S)?(or=0,wn=null,Cw(l)):(or=0,wn=null,yc(s,l,S,7));break;case 5:var R=null;switch(Re.tag){case 26:R=Re.memoizedState;case 5:case 27:var q=Re;if(R?o2(R):q.stateNode.complete){or=0,wn=null;var Z=q.sibling;if(Z!==null)Re=Z;else{var ut=q.return;ut!==null?(Re=ut,Uf(ut)):Re=null}break e}}or=0,wn=null,yc(s,l,S,5);break;case 6:or=0,wn=null,yc(s,l,S,6);break;case 8:Qy(),jr=6;break t;default:throw Error(n(462))}}hj();break}catch(Ct){yw(s,Ct)}while(!0);return rs=Vo=null,D.H=y,D.A=k,Ze=p,Re!==null?0:(gr=null,Ie=0,lf(),jr)}function hj(){for(;Re!==null&&!Ge();)_w(Re)}function _w(s){var l=Gk(s.alternate,s,ds);s.memoizedProps=s.pendingProps,l===null?Uf(s):Re=l}function Cw(s){var l=s,p=l.alternate;switch(l.tag){case 15:case 0:l=$k(p,l,l.pendingProps,l.type,void 0,Ie);break;case 11:l=$k(p,l,l.pendingProps,l.type.render,l.ref,Ie);break;case 5:py(l);default:Yk(p,l),l=Re=vC(l,ds),l=Gk(p,l,ds)}s.memoizedProps=s.pendingProps,l===null?Uf(s):Re=l}function yc(s,l,p,y){rs=Vo=null,py(l),sc=null,qh=0;var k=l.return;try{if(QF(s,k,l,p,Ie)){jr=1,Mf(s,Pn(p,s.current)),Re=null;return}}catch(S){if(k!==null)throw Re=k,S;jr=1,Mf(s,Pn(p,s.current)),Re=null;return}l.flags&32768?(qe||y===1?s=!0:fc||(Ie&536870912)!==0?s=!1:(to=s=!0,(y===2||y===9||y===3||y===6)&&(y=Cn.current,y!==null&&y.tag===13&&(y.flags|=16384))),kw(l,s)):Uf(l)}function Uf(s){var l=s;do{if((l.flags&32768)!==0){kw(l,to);return}s=l.return;var p=ej(l.alternate,l,ds);if(p!==null){Re=p;return}if(l=l.sibling,l!==null){Re=l;return}Re=l=s}while(l!==null);jr===0&&(jr=5)}function kw(s,l){do{var p=rj(s.alternate,s);if(p!==null){p.flags&=32767,Re=p;return}if(p=s.return,p!==null&&(p.flags|=32768,p.subtreeFlags=0,p.deletions=null),!l&&(s=s.sibling,s!==null)){Re=s;return}Re=s=p}while(s!==null);jr=6,Re=null}function ww(s,l,p,y,k,S,R,q,Z){s.cancelPendingCommit=null;do Hf();while(si!==0);if((Ze&6)!==0)throw Error(n(327));if(l!==null){if(l===s.current)throw Error(n(177));if(S=l.lanes|l.childLanes,S|=Pm,Pt(s,p,S,R,q,Z),s===gr&&(Re=gr=null,Ie=0),gc=l,io=s,fs=p,Ky=S,Xy=k,fw=y,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,pj(di,function(){return Nw(),null})):(s.callbackNode=null,s.callbackPriority=0),y=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||y){y=D.T,D.T=null,k=z.p,z.p=2,R=Ze,Ze|=4;try{ij(s,l,p)}finally{Ze=R,z.p=k,D.T=y}}si=1,Sw(),Tw(),Ew()}}function Sw(){if(si===1){si=0;var s=io,l=gc,p=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||p){p=D.T,D.T=null;var y=z.p;z.p=2;var k=Ze;Ze|=4;try{aw(l,s);var S=u0,R=uC(s.containerInfo),q=S.focusedElem,Z=S.selectionRange;if(R!==q&&q&&q.ownerDocument&&hC(q.ownerDocument.documentElement,q)){if(Z!==null&&Fm(q)){var ut=Z.start,Ct=Z.end;if(Ct===void 0&&(Ct=ut),"selectionStart"in q)q.selectionStart=ut,q.selectionEnd=Math.min(Ct,q.value.length);else{var St=q.ownerDocument||document,ft=St&&St.defaultView||window;if(ft.getSelection){var mt=ft.getSelection(),Wt=q.textContent.length,de=Math.min(Z.start,Wt),fr=Z.end===void 0?de:Math.min(Z.end,Wt);!mt.extend&&de>fr&&(R=fr,fr=de,de=R);var ot=cC(q,de),rt=cC(q,fr);if(ot&&rt&&(mt.rangeCount!==1||mt.anchorNode!==ot.node||mt.anchorOffset!==ot.offset||mt.focusNode!==rt.node||mt.focusOffset!==rt.offset)){var ht=St.createRange();ht.setStart(ot.node,ot.offset),mt.removeAllRanges(),de>fr?(mt.addRange(ht),mt.extend(rt.node,rt.offset)):(ht.setEnd(rt.node,rt.offset),mt.addRange(ht))}}}}for(St=[],mt=q;mt=mt.parentNode;)mt.nodeType===1&&St.push({element:mt,left:mt.scrollLeft,top:mt.scrollTop});for(typeof q.focus=="function"&&q.focus(),q=0;q<St.length;q++){var wt=St[q];wt.element.scrollLeft=wt.left,wt.element.scrollTop=wt.top}}rp=!!h0,u0=h0=null}finally{Ze=k,z.p=y,D.T=p}}s.current=l,si=2}}function Tw(){if(si===2){si=0;var s=io,l=gc,p=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||p){p=D.T,D.T=null;var y=z.p;z.p=2;var k=Ze;Ze|=4;try{tw(s,l.alternate,l)}finally{Ze=k,z.p=y,D.T=p}}si=3}}function Ew(){if(si===4||si===3){si=0,Ar();var s=io,l=gc,p=fs,y=fw;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?si=5:(si=0,gc=io=null,Aw(s,s.pendingLanes));var k=s.pendingLanes;if(k===0&&(ro=null),en(p),l=l.stateNode,Cr&&typeof Cr.onCommitFiberRoot=="function")try{Cr.onCommitFiberRoot(Yr,l,void 0,(l.current.flags&128)===128)}catch{}if(y!==null){l=D.T,k=z.p,z.p=2,D.T=null;try{for(var S=s.onRecoverableError,R=0;R<y.length;R++){var q=y[R];S(q.value,{componentStack:q.stack})}}finally{D.T=l,z.p=k}}(fs&3)!==0&&Hf(),Ma(s),k=s.pendingLanes,(p&261930)!==0&&(k&42)!==0?s===Zy?au++:(au=0,Zy=s):au=0,su(0)}}function Aw(s,l){(s.pooledCacheLanes&=l)===0&&(l=s.pooledCache,l!=null&&(s.pooledCache=null,zh(l)))}function Hf(){return Sw(),Tw(),Ew(),Nw()}function Nw(){if(si!==5)return!1;var s=io,l=Ky;Ky=0;var p=en(fs),y=D.T,k=z.p;try{z.p=32>p?32:p,D.T=null,p=Xy,Xy=null;var S=io,R=fs;if(si=0,gc=io=null,fs=0,(Ze&6)!==0)throw Error(n(331));var q=Ze;if(Ze|=4,hw(S.current),ow(S,S.current,R,p),Ze=q,su(0,!1),Cr&&typeof Cr.onPostCommitFiberRoot=="function")try{Cr.onPostCommitFiberRoot(Yr,S)}catch{}return!0}finally{z.p=k,D.T=y,Aw(s,l)}}function Mw(s,l,p){l=Pn(p,l),l=Ny(s.stateNode,l,2),s=Xs(s,l,2),s!==null&&(ue(s,2),Ma(s))}function lr(s,l,p){if(s.tag===3)Mw(s,s,p);else for(;l!==null;){if(l.tag===3){Mw(l,s,p);break}else if(l.tag===1){var y=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(ro===null||!ro.has(y))){s=Pn(p,s),p=Bk(2),y=Xs(l,p,2),y!==null&&(Lk(p,y,l,s),ue(y,2),Ma(y));break}}l=l.return}}function t0(s,l,p){var y=s.pingCache;if(y===null){y=s.pingCache=new sj;var k=new Set;y.set(l,k)}else k=y.get(l),k===void 0&&(k=new Set,y.set(l,k));k.has(p)||(Wy=!0,k.add(p),s=uj.bind(null,s,l,p),l.then(s,s))}function uj(s,l,p){var y=s.pingCache;y!==null&&y.delete(l),s.pingedLanes|=s.suspendedLanes&p,s.warmLanes&=~p,gr===s&&(Ie&p)===p&&(jr===4||jr===3&&(Ie&62914560)===Ie&&300>Me()-If?(Ze&2)===0&&mc(s,0):Yy|=p,pc===Ie&&(pc=0)),Ma(s)}function Bw(s,l){l===0&&(l=le()),s=Go(s,l),s!==null&&(ue(s,l),Ma(s))}function dj(s){var l=s.memoizedState,p=0;l!==null&&(p=l.retryLane),Bw(s,p)}function fj(s,l){var p=0;switch(s.tag){case 31:case 13:var y=s.stateNode,k=s.memoizedState;k!==null&&(p=k.retryLane);break;case 19:y=s.stateNode;break;case 22:y=s.stateNode._retryCache;break;default:throw Error(n(314))}y!==null&&y.delete(l),Bw(s,p)}function pj(s,l){return ve(s,l)}var Gf=null,bc=null,e0=!1,Wf=!1,r0=!1,ao=0;function Ma(s){s!==bc&&s.next===null&&(bc===null?Gf=bc=s:bc=bc.next=s),Wf=!0,e0||(e0=!0,mj())}function su(s,l){if(!r0&&Wf){r0=!0;do for(var p=!1,y=Gf;y!==null;){if(s!==0){var k=y.pendingLanes;if(k===0)var S=0;else{var R=y.suspendedLanes,q=y.pingedLanes;S=(1<<31-kr(42|s)+1)-1,S&=k&~(R&~q),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(p=!0,Dw(y,S))}else S=Ie,S=tt(y,y===gr?S:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(S&3)===0||_t(y,S)||(p=!0,Dw(y,S));y=y.next}while(p);r0=!1}}function gj(){Lw()}function Lw(){Wf=e0=!1;var s=0;ao!==0&&Tj()&&(s=ao);for(var l=Me(),p=null,y=Gf;y!==null;){var k=y.next,S=Ow(y,l);S===0?(y.next=null,p===null?Gf=k:p.next=k,k===null&&(bc=p)):(p=y,(s!==0||(S&3)!==0)&&(Wf=!0)),y=k}si!==0&&si!==5||su(s),ao!==0&&(ao=0)}function Ow(s,l){for(var p=s.suspendedLanes,y=s.pingedLanes,k=s.expirationTimes,S=s.pendingLanes&-62914561;0<S;){var R=31-kr(S),q=1<<R,Z=k[R];Z===-1?((q&p)===0||(q&y)!==0)&&(k[R]=Ot(q,l)):Z<=l&&(s.expiredLanes|=q),S&=~q}if(l=gr,p=Ie,p=tt(s,s===l?p:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),y=s.callbackNode,p===0||s===l&&(or===2||or===9)||s.cancelPendingCommit!==null)return y!==null&&y!==null&&Ee(y),s.callbackNode=null,s.callbackPriority=0;if((p&3)===0||_t(s,p)){if(l=p&-p,l===s.callbackPriority)return l;switch(y!==null&&Ee(y),en(p)){case 2:case 8:p=ii;break;case 32:p=di;break;case 268435456:p=Ur;break;default:p=di}return y=Rw.bind(null,s),p=ve(p,y),s.callbackPriority=l,s.callbackNode=p,l}return y!==null&&y!==null&&Ee(y),s.callbackPriority=2,s.callbackNode=null,2}function Rw(s,l){if(si!==0&&si!==5)return s.callbackNode=null,s.callbackPriority=0,null;var p=s.callbackNode;if(Hf()&&s.callbackNode!==p)return null;var y=Ie;return y=tt(s,s===gr?y:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),y===0?null:(gw(s,y,l),Ow(s,Me()),s.callbackNode!=null&&s.callbackNode===p?Rw.bind(null,s):null)}function Dw(s,l){if(Hf())return null;gw(s,l,!0)}function mj(){Aj(function(){(Ze&6)!==0?ve(yr,gj):Lw()})}function i0(){if(ao===0){var s=ic;s===0&&(s=Ae,Ae<<=1,(Ae&261888)===0&&(Ae=256)),ao=s}return ao}function Fw(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:qs(""+s)}function jw(s,l){var p=l.ownerDocument.createElement("input");return p.name=l.name,p.value=l.value,s.id&&p.setAttribute("form",s.id),l.parentNode.insertBefore(p,l),s=new FormData(s),p.parentNode.removeChild(p),s}function yj(s,l,p,y,k){if(l==="submit"&&p&&p.stateNode===k){var S=Fw((k[Rr]||null).action),R=y.submitter;R&&(l=(l=R[Rr]||null)?Fw(l.formAction):R.getAttribute("formAction"),l!==null&&(S=l,R=null));var q=new nf("action","action",null,y,k);s.push({event:q,listeners:[{instance:null,listener:function(){if(y.defaultPrevented){if(ao!==0){var Z=R?jw(k,R):new FormData(k);ky(p,{pending:!0,data:Z,method:k.method,action:S},null,Z)}}else typeof S=="function"&&(q.preventDefault(),Z=R?jw(k,R):new FormData(k),ky(p,{pending:!0,data:Z,method:k.method,action:S},S,Z))},currentTarget:k}]})}}for(var n0=0;n0<zm.length;n0++){var a0=zm[n0],bj=a0.toLowerCase(),xj=a0[0].toUpperCase()+a0.slice(1);la(bj,"on"+xj)}la(pC,"onAnimationEnd"),la(gC,"onAnimationIteration"),la(mC,"onAnimationStart"),la("dblclick","onDoubleClick"),la("focusin","onFocus"),la("focusout","onBlur"),la(DF,"onTransitionRun"),la(FF,"onTransitionStart"),la(jF,"onTransitionCancel"),la(yC,"onTransitionEnd"),ct("onMouseEnter",["mouseout","mouseover"]),ct("onMouseLeave",["mouseout","mouseover"]),ct("onPointerEnter",["pointerout","pointerover"]),ct("onPointerLeave",["pointerout","pointerover"]),bt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),bt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),bt("onBeforeInput",["compositionend","keypress","textInput","paste"]),bt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),bt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),bt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ou="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(" "),vj=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ou));function Iw(s,l){l=(l&4)!==0;for(var p=0;p<s.length;p++){var y=s[p],k=y.event;y=y.listeners;t:{var S=void 0;if(l)for(var R=y.length-1;0<=R;R--){var q=y[R],Z=q.instance,ut=q.currentTarget;if(q=q.listener,Z!==S&&k.isPropagationStopped())break t;S=q,k.currentTarget=ut;try{S(k)}catch(Ct){of(Ct)}k.currentTarget=null,S=Z}else for(R=0;R<y.length;R++){if(q=y[R],Z=q.instance,ut=q.currentTarget,q=q.listener,Z!==S&&k.isPropagationStopped())break t;S=q,k.currentTarget=ut;try{S(k)}catch(Ct){of(Ct)}k.currentTarget=null,S=Z}}}}function De(s,l){var p=l[Rn];p===void 0&&(p=l[Rn]=new Set);var y=s+"__bubble";p.has(y)||($w(l,s,2,!1),p.add(y))}function s0(s,l,p){var y=0;l&&(y|=4),$w(p,s,y,l)}var Yf="_reactListening"+Math.random().toString(36).slice(2);function o0(s){if(!s[Yf]){s[Yf]=!0,Ht.forEach(function(p){p!=="selectionchange"&&(vj.has(p)||s0(p,!1,s),s0(p,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[Yf]||(l[Yf]=!0,s0("selectionchange",!1,l))}}function $w(s,l,p,y){switch(p2(l)){case 2:var k=Vj;break;case 8:k=Kj;break;default:k=C0}p=k.bind(null,l,p,s),k=void 0,!Em||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(k=!0),y?k!==void 0?s.addEventListener(l,p,{capture:!0,passive:k}):s.addEventListener(l,p,!0):k!==void 0?s.addEventListener(l,p,{passive:k}):s.addEventListener(l,p,!1)}function l0(s,l,p,y,k){var S=y;if((l&1)===0&&(l&2)===0&&y!==null)t:for(;;){if(y===null)return;var R=y.tag;if(R===3||R===4){var q=y.stateNode.containerInfo;if(q===k)break;if(R===4)for(R=y.return;R!==null;){var Z=R.tag;if((Z===3||Z===4)&&R.stateNode.containerInfo===k)return;R=R.return}for(;q!==null;){if(R=ni(q),R===null)return;if(Z=R.tag,Z===5||Z===6||Z===26||Z===27){y=S=R;continue t}q=q.parentNode}}y=y.return}Jd(function(){var ut=S,Ct=_e(p),St=[];t:{var ft=bC.get(s);if(ft!==void 0){var mt=nf,Wt=s;switch(s){case"keypress":if(ef(p)===0)break t;case"keydown":case"keyup":mt=fF;break;case"focusin":Wt="focus",mt=Bm;break;case"focusout":Wt="blur",mt=Bm;break;case"beforeblur":case"afterblur":mt=Bm;break;case"click":if(p.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":mt=Y_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":mt=eF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":mt=mF;break;case pC:case gC:case mC:mt=nF;break;case yC:mt=bF;break;case"scroll":case"scrollend":mt=JD;break;case"wheel":mt=vF;break;case"copy":case"cut":case"paste":mt=sF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":mt=K_;break;case"toggle":case"beforetoggle":mt=CF}var de=(l&4)!==0,fr=!de&&(s==="scroll"||s==="scrollend"),ot=de?ft!==null?ft+"Capture":null:ft;de=[];for(var rt=ut,ht;rt!==null;){var wt=rt;if(ht=wt.stateNode,wt=wt.tag,wt!==5&&wt!==26&&wt!==27||ht===null||ot===null||(wt=Nh(rt,ot),wt!=null&&de.push(lu(rt,wt,ht))),fr)break;rt=rt.return}0<de.length&&(ft=new mt(ft,Wt,null,p,Ct),St.push({event:ft,listeners:de}))}}if((l&7)===0){t:{if(ft=s==="mouseover"||s==="pointerover",mt=s==="mouseout"||s==="pointerout",ft&&p!==Xt&&(Wt=p.relatedTarget||p.fromElement)&&(ni(Wt)||Wt[yn]))break t;if((mt||ft)&&(ft=Ct.window===Ct?Ct:(ft=Ct.ownerDocument)?ft.defaultView||ft.parentWindow:window,mt?(Wt=p.relatedTarget||p.toElement,mt=ut,Wt=Wt?ni(Wt):null,Wt!==null&&(fr=o(Wt),de=Wt.tag,Wt!==fr||de!==5&&de!==27&&de!==6)&&(Wt=null)):(mt=null,Wt=ut),mt!==Wt)){if(de=Y_,wt="onMouseLeave",ot="onMouseEnter",rt="mouse",(s==="pointerout"||s==="pointerover")&&(de=K_,wt="onPointerLeave",ot="onPointerEnter",rt="pointer"),fr=mt==null?ft:rn(mt),ht=Wt==null?ft:rn(Wt),ft=new de(wt,rt+"leave",mt,p,Ct),ft.target=fr,ft.relatedTarget=ht,wt=null,ni(Ct)===ut&&(de=new de(ot,rt+"enter",Wt,p,Ct),de.target=ht,de.relatedTarget=fr,wt=de),fr=wt,mt&&Wt)e:{for(de=_j,ot=mt,rt=Wt,ht=0,wt=ot;wt;wt=de(wt))ht++;wt=0;for(var oe=rt;oe;oe=de(oe))wt++;for(;0<ht-wt;)ot=de(ot),ht--;for(;0<wt-ht;)rt=de(rt),wt--;for(;ht--;){if(ot===rt||rt!==null&&ot===rt.alternate){de=ot;break e}ot=de(ot),rt=de(rt)}de=null}else de=null;mt!==null&&zw(St,ft,mt,de,!1),Wt!==null&&fr!==null&&zw(St,fr,Wt,de,!0)}}t:{if(ft=ut?rn(ut):window,mt=ft.nodeName&&ft.nodeName.toLowerCase(),mt==="select"||mt==="input"&&ft.type==="file")var Ye=iC;else if(eC(ft))if(nC)Ye=LF;else{Ye=MF;var Zt=NF}else mt=ft.nodeName,!mt||mt.toLowerCase()!=="input"||ft.type!=="checkbox"&&ft.type!=="radio"?ut&&Mi(ut.elementType)&&(Ye=iC):Ye=BF;if(Ye&&(Ye=Ye(s,ut))){rC(St,Ye,p,Ct);break t}Zt&&Zt(s,ft,ut),s==="focusout"&&ut&&ft.type==="number"&&ut.memoizedProps.value!=null&&Nt(ft,"number",ft.value)}switch(Zt=ut?rn(ut):window,s){case"focusin":(eC(Zt)||Zt.contentEditable==="true")&&(Kl=Zt,jm=ut,jh=null);break;case"focusout":jh=jm=Kl=null;break;case"mousedown":Im=!0;break;case"contextmenu":case"mouseup":case"dragend":Im=!1,dC(St,p,Ct);break;case"selectionchange":if(RF)break;case"keydown":case"keyup":dC(St,p,Ct)}var Se;if(Om)t:{switch(s){case"compositionstart":var $e="onCompositionStart";break t;case"compositionend":$e="onCompositionEnd";break t;case"compositionupdate":$e="onCompositionUpdate";break t}$e=void 0}else Vl?J_(s,p)&&($e="onCompositionEnd"):s==="keydown"&&p.keyCode===229&&($e="onCompositionStart");$e&&(X_&&p.locale!=="ko"&&(Vl||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&Vl&&(Se=G_()):(Us=Ct,Am="value"in Us?Us.value:Us.textContent,Vl=!0)),Zt=Vf(ut,$e),0<Zt.length&&($e=new V_($e,s,null,p,Ct),St.push({event:$e,listeners:Zt}),Se?$e.data=Se:(Se=tC(p),Se!==null&&($e.data=Se)))),(Se=wF?SF(s,p):TF(s,p))&&($e=Vf(ut,"onBeforeInput"),0<$e.length&&(Zt=new V_("onBeforeInput","beforeinput",null,p,Ct),St.push({event:Zt,listeners:$e}),Zt.data=Se)),yj(St,s,ut,p,Ct)}Iw(St,l)})}function lu(s,l,p){return{instance:s,listener:l,currentTarget:p}}function Vf(s,l){for(var p=l+"Capture",y=[];s!==null;){var k=s,S=k.stateNode;if(k=k.tag,k!==5&&k!==26&&k!==27||S===null||(k=Nh(s,p),k!=null&&y.unshift(lu(s,k,S)),k=Nh(s,l),k!=null&&y.push(lu(s,k,S))),s.tag===3)return y;s=s.return}return[]}function _j(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function zw(s,l,p,y,k){for(var S=l._reactName,R=[];p!==null&&p!==y;){var q=p,Z=q.alternate,ut=q.stateNode;if(q=q.tag,Z!==null&&Z===y)break;q!==5&&q!==26&&q!==27||ut===null||(Z=ut,k?(ut=Nh(p,S),ut!=null&&R.unshift(lu(p,ut,Z))):k||(ut=Nh(p,S),ut!=null&&R.push(lu(p,ut,Z)))),p=p.return}R.length!==0&&s.push({event:l,listeners:R})}var Cj=/\r\n?/g,kj=/\u0000|\uFFFD/g;function Pw(s){return(typeof s=="string"?s:""+s).replace(Cj,`
50
+ `).replace(kj,"")}function qw(s,l){return l=Pw(l),Pw(s)===l}function dr(s,l,p,y,k,S){switch(p){case"children":typeof y=="string"?l==="body"||l==="textarea"&&y===""||jt(s,y):(typeof y=="number"||typeof y=="bigint")&&l!=="body"&&jt(s,""+y);break;case"className":Pe(s,"class",y);break;case"tabIndex":Pe(s,"tabindex",y);break;case"dir":case"role":case"viewBox":case"width":case"height":Pe(s,p,y);break;case"style":Fe(s,y,S);break;case"data":if(l!=="object"){Pe(s,"data",y);break}case"src":case"href":if(y===""&&(l!=="a"||p!=="href")){s.removeAttribute(p);break}if(y==null||typeof y=="function"||typeof y=="symbol"||typeof y=="boolean"){s.removeAttribute(p);break}y=qs(""+y),s.setAttribute(p,y);break;case"action":case"formAction":if(typeof y=="function"){s.setAttribute(p,"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 S=="function"&&(p==="formAction"?(l!=="input"&&dr(s,l,"name",k.name,k,null),dr(s,l,"formEncType",k.formEncType,k,null),dr(s,l,"formMethod",k.formMethod,k,null),dr(s,l,"formTarget",k.formTarget,k,null)):(dr(s,l,"encType",k.encType,k,null),dr(s,l,"method",k.method,k,null),dr(s,l,"target",k.target,k,null)));if(y==null||typeof y=="symbol"||typeof y=="boolean"){s.removeAttribute(p);break}y=qs(""+y),s.setAttribute(p,y);break;case"onClick":y!=null&&(s.onclick=Rt);break;case"onScroll":y!=null&&De("scroll",s);break;case"onScrollEnd":y!=null&&De("scrollend",s);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(n(61));if(p=y.__html,p!=null){if(k.children!=null)throw Error(n(60));s.innerHTML=p}}break;case"multiple":s.multiple=y&&typeof y!="function"&&typeof y!="symbol";break;case"muted":s.muted=y&&typeof y!="function"&&typeof y!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(y==null||typeof y=="function"||typeof y=="boolean"||typeof y=="symbol"){s.removeAttribute("xlink:href");break}p=qs(""+y),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",p);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":y!=null&&typeof y!="function"&&typeof y!="symbol"?s.setAttribute(p,""+y):s.removeAttribute(p);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":y&&typeof y!="function"&&typeof y!="symbol"?s.setAttribute(p,""):s.removeAttribute(p);break;case"capture":case"download":y===!0?s.setAttribute(p,""):y!==!1&&y!=null&&typeof y!="function"&&typeof y!="symbol"?s.setAttribute(p,y):s.removeAttribute(p);break;case"cols":case"rows":case"size":case"span":y!=null&&typeof y!="function"&&typeof y!="symbol"&&!isNaN(y)&&1<=y?s.setAttribute(p,y):s.removeAttribute(p);break;case"rowSpan":case"start":y==null||typeof y=="function"||typeof y=="symbol"||isNaN(y)?s.removeAttribute(p):s.setAttribute(p,y);break;case"popover":De("beforetoggle",s),De("toggle",s),er(s,"popover",y);break;case"xlinkActuate":Mr(s,"http://www.w3.org/1999/xlink","xlink:actuate",y);break;case"xlinkArcrole":Mr(s,"http://www.w3.org/1999/xlink","xlink:arcrole",y);break;case"xlinkRole":Mr(s,"http://www.w3.org/1999/xlink","xlink:role",y);break;case"xlinkShow":Mr(s,"http://www.w3.org/1999/xlink","xlink:show",y);break;case"xlinkTitle":Mr(s,"http://www.w3.org/1999/xlink","xlink:title",y);break;case"xlinkType":Mr(s,"http://www.w3.org/1999/xlink","xlink:type",y);break;case"xmlBase":Mr(s,"http://www.w3.org/XML/1998/namespace","xml:base",y);break;case"xmlLang":Mr(s,"http://www.w3.org/XML/1998/namespace","xml:lang",y);break;case"xmlSpace":Mr(s,"http://www.w3.org/XML/1998/namespace","xml:space",y);break;case"is":er(s,"is",y);break;case"innerText":case"textContent":break;default:(!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(p=In.get(p)||p,er(s,p,y))}}function c0(s,l,p,y,k,S){switch(p){case"style":Fe(s,y,S);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(n(61));if(p=y.__html,p!=null){if(k.children!=null)throw Error(n(60));s.innerHTML=p}}break;case"children":typeof y=="string"?jt(s,y):(typeof y=="number"||typeof y=="bigint")&&jt(s,""+y);break;case"onScroll":y!=null&&De("scroll",s);break;case"onScrollEnd":y!=null&&De("scrollend",s);break;case"onClick":y!=null&&(s.onclick=Rt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Y.hasOwnProperty(p))t:{if(p[0]==="o"&&p[1]==="n"&&(k=p.endsWith("Capture"),l=p.slice(2,k?p.length-7:void 0),S=s[Rr]||null,S=S!=null?S[p]:null,typeof S=="function"&&s.removeEventListener(l,S,k),typeof y=="function")){typeof S!="function"&&S!==null&&(p in s?s[p]=null:s.hasAttribute(p)&&s.removeAttribute(p)),s.addEventListener(l,y,k);break t}p in s?s[p]=y:y===!0?s.setAttribute(p,""):er(s,p,y)}}}function Si(s,l,p){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":De("error",s),De("load",s);var y=!1,k=!1,S;for(S in p)if(p.hasOwnProperty(S)){var R=p[S];if(R!=null)switch(S){case"src":y=!0;break;case"srcSet":k=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:dr(s,l,S,R,p,null)}}k&&dr(s,l,"srcSet",p.srcSet,p,null),y&&dr(s,l,"src",p.src,p,null);return;case"input":De("invalid",s);var q=S=R=k=null,Z=null,ut=null;for(y in p)if(p.hasOwnProperty(y)){var Ct=p[y];if(Ct!=null)switch(y){case"name":k=Ct;break;case"type":R=Ct;break;case"checked":Z=Ct;break;case"defaultChecked":ut=Ct;break;case"value":S=Ct;break;case"defaultValue":q=Ct;break;case"children":case"dangerouslySetInnerHTML":if(Ct!=null)throw Error(n(137,l));break;default:dr(s,l,y,Ct,p,null)}}dt(s,S,q,Z,ut,R,k,!1);return;case"select":De("invalid",s),y=R=S=null;for(k in p)if(p.hasOwnProperty(k)&&(q=p[k],q!=null))switch(k){case"value":S=q;break;case"defaultValue":R=q;break;case"multiple":y=q;default:dr(s,l,k,q,p,null)}l=S,p=R,s.multiple=!!y,l!=null?At(s,!!y,l,!1):p!=null&&At(s,!!y,p,!0);return;case"textarea":De("invalid",s),S=k=y=null;for(R in p)if(p.hasOwnProperty(R)&&(q=p[R],q!=null))switch(R){case"value":y=q;break;case"defaultValue":k=q;break;case"children":S=q;break;case"dangerouslySetInnerHTML":if(q!=null)throw Error(n(91));break;default:dr(s,l,R,q,p,null)}we(s,y,k,S);return;case"option":for(Z in p)if(p.hasOwnProperty(Z)&&(y=p[Z],y!=null))switch(Z){case"selected":s.selected=y&&typeof y!="function"&&typeof y!="symbol";break;default:dr(s,l,Z,y,p,null)}return;case"dialog":De("beforetoggle",s),De("toggle",s),De("cancel",s),De("close",s);break;case"iframe":case"object":De("load",s);break;case"video":case"audio":for(y=0;y<ou.length;y++)De(ou[y],s);break;case"image":De("error",s),De("load",s);break;case"details":De("toggle",s);break;case"embed":case"source":case"link":De("error",s),De("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ut in p)if(p.hasOwnProperty(ut)&&(y=p[ut],y!=null))switch(ut){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:dr(s,l,ut,y,p,null)}return;default:if(Mi(l)){for(Ct in p)p.hasOwnProperty(Ct)&&(y=p[Ct],y!==void 0&&c0(s,l,Ct,y,p,void 0));return}}for(q in p)p.hasOwnProperty(q)&&(y=p[q],y!=null&&dr(s,l,q,y,p,null))}function wj(s,l,p,y){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var k=null,S=null,R=null,q=null,Z=null,ut=null,Ct=null;for(mt in p){var St=p[mt];if(p.hasOwnProperty(mt)&&St!=null)switch(mt){case"checked":break;case"value":break;case"defaultValue":Z=St;default:y.hasOwnProperty(mt)||dr(s,l,mt,null,y,St)}}for(var ft in y){var mt=y[ft];if(St=p[ft],y.hasOwnProperty(ft)&&(mt!=null||St!=null))switch(ft){case"type":S=mt;break;case"name":k=mt;break;case"checked":ut=mt;break;case"defaultChecked":Ct=mt;break;case"value":R=mt;break;case"defaultValue":q=mt;break;case"children":case"dangerouslySetInnerHTML":if(mt!=null)throw Error(n(137,l));break;default:mt!==St&&dr(s,l,ft,mt,y,St)}}jn(s,R,q,Z,ut,Ct,S,k);return;case"select":mt=R=q=ft=null;for(S in p)if(Z=p[S],p.hasOwnProperty(S)&&Z!=null)switch(S){case"value":break;case"multiple":mt=Z;default:y.hasOwnProperty(S)||dr(s,l,S,null,y,Z)}for(k in y)if(S=y[k],Z=p[k],y.hasOwnProperty(k)&&(S!=null||Z!=null))switch(k){case"value":ft=S;break;case"defaultValue":q=S;break;case"multiple":R=S;default:S!==Z&&dr(s,l,k,S,y,Z)}l=q,p=R,y=mt,ft!=null?At(s,!!p,ft,!1):!!y!=!!p&&(l!=null?At(s,!!p,l,!0):At(s,!!p,p?[]:"",!1));return;case"textarea":mt=ft=null;for(q in p)if(k=p[q],p.hasOwnProperty(q)&&k!=null&&!y.hasOwnProperty(q))switch(q){case"value":break;case"children":break;default:dr(s,l,q,null,y,k)}for(R in y)if(k=y[R],S=p[R],y.hasOwnProperty(R)&&(k!=null||S!=null))switch(R){case"value":ft=k;break;case"defaultValue":mt=k;break;case"children":break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(n(91));break;default:k!==S&&dr(s,l,R,k,y,S)}$t(s,ft,mt);return;case"option":for(var Wt in p)if(ft=p[Wt],p.hasOwnProperty(Wt)&&ft!=null&&!y.hasOwnProperty(Wt))switch(Wt){case"selected":s.selected=!1;break;default:dr(s,l,Wt,null,y,ft)}for(Z in y)if(ft=y[Z],mt=p[Z],y.hasOwnProperty(Z)&&ft!==mt&&(ft!=null||mt!=null))switch(Z){case"selected":s.selected=ft&&typeof ft!="function"&&typeof ft!="symbol";break;default:dr(s,l,Z,ft,y,mt)}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 de in p)ft=p[de],p.hasOwnProperty(de)&&ft!=null&&!y.hasOwnProperty(de)&&dr(s,l,de,null,y,ft);for(ut in y)if(ft=y[ut],mt=p[ut],y.hasOwnProperty(ut)&&ft!==mt&&(ft!=null||mt!=null))switch(ut){case"children":case"dangerouslySetInnerHTML":if(ft!=null)throw Error(n(137,l));break;default:dr(s,l,ut,ft,y,mt)}return;default:if(Mi(l)){for(var fr in p)ft=p[fr],p.hasOwnProperty(fr)&&ft!==void 0&&!y.hasOwnProperty(fr)&&c0(s,l,fr,void 0,y,ft);for(Ct in y)ft=y[Ct],mt=p[Ct],!y.hasOwnProperty(Ct)||ft===mt||ft===void 0&&mt===void 0||c0(s,l,Ct,ft,y,mt);return}}for(var ot in p)ft=p[ot],p.hasOwnProperty(ot)&&ft!=null&&!y.hasOwnProperty(ot)&&dr(s,l,ot,null,y,ft);for(St in y)ft=y[St],mt=p[St],!y.hasOwnProperty(St)||ft===mt||ft==null&&mt==null||dr(s,l,St,ft,y,mt)}function Uw(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Sj(){if(typeof performance.getEntriesByType=="function"){for(var s=0,l=0,p=performance.getEntriesByType("resource"),y=0;y<p.length;y++){var k=p[y],S=k.transferSize,R=k.initiatorType,q=k.duration;if(S&&q&&Uw(R)){for(R=0,q=k.responseEnd,y+=1;y<p.length;y++){var Z=p[y],ut=Z.startTime;if(ut>q)break;var Ct=Z.transferSize,St=Z.initiatorType;Ct&&Uw(St)&&(Z=Z.responseEnd,R+=Ct*(Z<q?1:(q-ut)/(Z-ut)))}if(--y,l+=8*(S+R)/(k.duration/1e3),s++,10<s)break}}if(0<s)return l/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var h0=null,u0=null;function Kf(s){return s.nodeType===9?s:s.ownerDocument}function Hw(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Gw(s,l){if(s===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&l==="foreignObject"?0:s}function d0(s,l){return s==="textarea"||s==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var f0=null;function Tj(){var s=window.event;return s&&s.type==="popstate"?s===f0?!1:(f0=s,!0):(f0=null,!1)}var Ww=typeof setTimeout=="function"?setTimeout:void 0,Ej=typeof clearTimeout=="function"?clearTimeout:void 0,Yw=typeof Promise=="function"?Promise:void 0,Aj=typeof queueMicrotask=="function"?queueMicrotask:typeof Yw<"u"?function(s){return Yw.resolve(null).then(s).catch(Nj)}:Ww;function Nj(s){setTimeout(function(){throw s})}function so(s){return s==="head"}function Vw(s,l){var p=l,y=0;do{var k=p.nextSibling;if(s.removeChild(p),k&&k.nodeType===8)if(p=k.data,p==="/$"||p==="/&"){if(y===0){s.removeChild(k),Cc(l);return}y--}else if(p==="$"||p==="$?"||p==="$~"||p==="$!"||p==="&")y++;else if(p==="html")cu(s.ownerDocument.documentElement);else if(p==="head"){p=s.ownerDocument.head,cu(p);for(var S=p.firstChild;S;){var R=S.nextSibling,q=S.nodeName;S[Dn]||q==="SCRIPT"||q==="STYLE"||q==="LINK"&&S.rel.toLowerCase()==="stylesheet"||p.removeChild(S),S=R}}else p==="body"&&cu(s.ownerDocument.body);p=k}while(p);Cc(l)}function Kw(s,l){var p=s;s=0;do{var y=p.nextSibling;if(p.nodeType===1?l?(p._stashedDisplay=p.style.display,p.style.display="none"):(p.style.display=p._stashedDisplay||"",p.getAttribute("style")===""&&p.removeAttribute("style")):p.nodeType===3&&(l?(p._stashedText=p.nodeValue,p.nodeValue=""):p.nodeValue=p._stashedText||""),y&&y.nodeType===8)if(p=y.data,p==="/$"){if(s===0)break;s--}else p!=="$"&&p!=="$?"&&p!=="$~"&&p!=="$!"||s++;p=y}while(p)}function p0(s){var l=s.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var p=l;switch(l=l.nextSibling,p.nodeName){case"HTML":case"HEAD":case"BODY":p0(p),Ta(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}s.removeChild(p)}}function Mj(s,l,p,y){for(;s.nodeType===1;){var k=p;if(s.nodeName.toLowerCase()!==l.toLowerCase()){if(!y&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(y){if(!s[Dn])switch(l){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(S=s.getAttribute("rel"),S==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(S!==k.rel||s.getAttribute("href")!==(k.href==null||k.href===""?null:k.href)||s.getAttribute("crossorigin")!==(k.crossOrigin==null?null:k.crossOrigin)||s.getAttribute("title")!==(k.title==null?null:k.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(S=s.getAttribute("src"),(S!==(k.src==null?null:k.src)||s.getAttribute("type")!==(k.type==null?null:k.type)||s.getAttribute("crossorigin")!==(k.crossOrigin==null?null:k.crossOrigin))&&S&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(l==="input"&&s.type==="hidden"){var S=k.name==null?null:""+k.name;if(k.type==="hidden"&&s.getAttribute("name")===S)return s}else return s;if(s=Wn(s.nextSibling),s===null)break}return null}function Bj(s,l,p){if(l==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!p||(s=Wn(s.nextSibling),s===null))return null;return s}function Xw(s,l){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=Wn(s.nextSibling),s===null))return null;return s}function g0(s){return s.data==="$?"||s.data==="$~"}function m0(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function Lj(s,l){var p=s.ownerDocument;if(s.data==="$~")s._reactRetry=l;else if(s.data!=="$?"||p.readyState!=="loading")l();else{var y=function(){l(),p.removeEventListener("DOMContentLoaded",y)};p.addEventListener("DOMContentLoaded",y),s._reactRetry=y}}function Wn(s){for(;s!=null;s=s.nextSibling){var l=s.nodeType;if(l===1||l===3)break;if(l===8){if(l=s.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return s}var y0=null;function Zw(s){s=s.nextSibling;for(var l=0;s;){if(s.nodeType===8){var p=s.data;if(p==="/$"||p==="/&"){if(l===0)return Wn(s.nextSibling);l--}else p!=="$"&&p!=="$!"&&p!=="$?"&&p!=="$~"&&p!=="&"||l++}s=s.nextSibling}return null}function Qw(s){s=s.previousSibling;for(var l=0;s;){if(s.nodeType===8){var p=s.data;if(p==="$"||p==="$!"||p==="$?"||p==="$~"||p==="&"){if(l===0)return s;l--}else p!=="/$"&&p!=="/&"||l++}s=s.previousSibling}return null}function Jw(s,l,p){switch(l=Kf(p),s){case"html":if(s=l.documentElement,!s)throw Error(n(452));return s;case"head":if(s=l.head,!s)throw Error(n(453));return s;case"body":if(s=l.body,!s)throw Error(n(454));return s;default:throw Error(n(451))}}function cu(s){for(var l=s.attributes;l.length;)s.removeAttributeNode(l[0]);Ta(s)}var Yn=new Map,t2=new Set;function Xf(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var ps=z.d;z.d={f:Oj,r:Rj,D:Dj,C:Fj,L:jj,m:Ij,X:zj,S:$j,M:Pj};function Oj(){var s=ps.f(),l=Pf();return s||l}function Rj(s){var l=qi(s);l!==null&&l.tag===5&&l.type==="form"?yk(l):ps.r(s)}var xc=typeof document>"u"?null:document;function e2(s,l,p){var y=xc;if(y&&typeof l=="string"&&l){var k=_i(l);k='link[rel="'+s+'"][href="'+k+'"]',typeof p=="string"&&(k+='[crossorigin="'+p+'"]'),t2.has(k)||(t2.add(k),s={rel:s,crossOrigin:p,href:l},y.querySelector(k)===null&&(l=y.createElement("link"),Si(l,"link",s),tr(l),y.head.appendChild(l)))}}function Dj(s){ps.D(s),e2("dns-prefetch",s,null)}function Fj(s,l){ps.C(s,l),e2("preconnect",s,l)}function jj(s,l,p){ps.L(s,l,p);var y=xc;if(y&&s&&l){var k='link[rel="preload"][as="'+_i(l)+'"]';l==="image"&&p&&p.imageSrcSet?(k+='[imagesrcset="'+_i(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(k+='[imagesizes="'+_i(p.imageSizes)+'"]')):k+='[href="'+_i(s)+'"]';var S=k;switch(l){case"style":S=vc(s);break;case"script":S=_c(s)}Yn.has(S)||(s=g({rel:"preload",href:l==="image"&&p&&p.imageSrcSet?void 0:s,as:l},p),Yn.set(S,s),y.querySelector(k)!==null||l==="style"&&y.querySelector(hu(S))||l==="script"&&y.querySelector(uu(S))||(l=y.createElement("link"),Si(l,"link",s),tr(l),y.head.appendChild(l)))}}function Ij(s,l){ps.m(s,l);var p=xc;if(p&&s){var y=l&&typeof l.as=="string"?l.as:"script",k='link[rel="modulepreload"][as="'+_i(y)+'"][href="'+_i(s)+'"]',S=k;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=_c(s)}if(!Yn.has(S)&&(s=g({rel:"modulepreload",href:s},l),Yn.set(S,s),p.querySelector(k)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(uu(S)))return}y=p.createElement("link"),Si(y,"link",s),tr(y),p.head.appendChild(y)}}}function $j(s,l,p){ps.S(s,l,p);var y=xc;if(y&&s){var k=ai(y).hoistableStyles,S=vc(s);l=l||"default";var R=k.get(S);if(!R){var q={loading:0,preload:null};if(R=y.querySelector(hu(S)))q.loading=5;else{s=g({rel:"stylesheet",href:s,"data-precedence":l},p),(p=Yn.get(S))&&b0(s,p);var Z=R=y.createElement("link");tr(Z),Si(Z,"link",s),Z._p=new Promise(function(ut,Ct){Z.onload=ut,Z.onerror=Ct}),Z.addEventListener("load",function(){q.loading|=1}),Z.addEventListener("error",function(){q.loading|=2}),q.loading|=4,Zf(R,l,y)}R={type:"stylesheet",instance:R,count:1,state:q},k.set(S,R)}}}function zj(s,l){ps.X(s,l);var p=xc;if(p&&s){var y=ai(p).hoistableScripts,k=_c(s),S=y.get(k);S||(S=p.querySelector(uu(k)),S||(s=g({src:s,async:!0},l),(l=Yn.get(k))&&x0(s,l),S=p.createElement("script"),tr(S),Si(S,"link",s),p.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},y.set(k,S))}}function Pj(s,l){ps.M(s,l);var p=xc;if(p&&s){var y=ai(p).hoistableScripts,k=_c(s),S=y.get(k);S||(S=p.querySelector(uu(k)),S||(s=g({src:s,async:!0,type:"module"},l),(l=Yn.get(k))&&x0(s,l),S=p.createElement("script"),tr(S),Si(S,"link",s),p.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},y.set(k,S))}}function r2(s,l,p,y){var k=(k=kt.current)?Xf(k):null;if(!k)throw Error(n(446));switch(s){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(l=vc(p.href),p=ai(k).hoistableStyles,y=p.get(l),y||(y={type:"style",instance:null,count:0,state:null},p.set(l,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){s=vc(p.href);var S=ai(k).hoistableStyles,R=S.get(s);if(R||(k=k.ownerDocument||k,R={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(s,R),(S=k.querySelector(hu(s)))&&!S._p&&(R.instance=S,R.state.loading=5),Yn.has(s)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},Yn.set(s,p),S||qj(k,s,p,R.state))),l&&y===null)throw Error(n(528,""));return R}if(l&&y!==null)throw Error(n(529,""));return null;case"script":return l=p.async,p=p.src,typeof p=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=_c(p),p=ai(k).hoistableScripts,y=p.get(l),y||(y={type:"script",instance:null,count:0,state:null},p.set(l,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,s))}}function vc(s){return'href="'+_i(s)+'"'}function hu(s){return'link[rel="stylesheet"]['+s+"]"}function i2(s){return g({},s,{"data-precedence":s.precedence,precedence:null})}function qj(s,l,p,y){s.querySelector('link[rel="preload"][as="style"]['+l+"]")?y.loading=1:(l=s.createElement("link"),y.preload=l,l.addEventListener("load",function(){return y.loading|=1}),l.addEventListener("error",function(){return y.loading|=2}),Si(l,"link",p),tr(l),s.head.appendChild(l))}function _c(s){return'[src="'+_i(s)+'"]'}function uu(s){return"script[async]"+s}function n2(s,l,p){if(l.count++,l.instance===null)switch(l.type){case"style":var y=s.querySelector('style[data-href~="'+_i(p.href)+'"]');if(y)return l.instance=y,tr(y),y;var k=g({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return y=(s.ownerDocument||s).createElement("style"),tr(y),Si(y,"style",k),Zf(y,p.precedence,s),l.instance=y;case"stylesheet":k=vc(p.href);var S=s.querySelector(hu(k));if(S)return l.state.loading|=4,l.instance=S,tr(S),S;y=i2(p),(k=Yn.get(k))&&b0(y,k),S=(s.ownerDocument||s).createElement("link"),tr(S);var R=S;return R._p=new Promise(function(q,Z){R.onload=q,R.onerror=Z}),Si(S,"link",y),l.state.loading|=4,Zf(S,p.precedence,s),l.instance=S;case"script":return S=_c(p.src),(k=s.querySelector(uu(S)))?(l.instance=k,tr(k),k):(y=p,(k=Yn.get(S))&&(y=g({},p),x0(y,k)),s=s.ownerDocument||s,k=s.createElement("script"),tr(k),Si(k,"link",y),s.head.appendChild(k),l.instance=k);case"void":return null;default:throw Error(n(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(y=l.instance,l.state.loading|=4,Zf(y,p.precedence,s));return l.instance}function Zf(s,l,p){for(var y=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),k=y.length?y[y.length-1]:null,S=k,R=0;R<y.length;R++){var q=y[R];if(q.dataset.precedence===l)S=q;else if(S!==k)break}S?S.parentNode.insertBefore(s,S.nextSibling):(l=p.nodeType===9?p.head:p,l.insertBefore(s,l.firstChild))}function b0(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.title==null&&(s.title=l.title)}function x0(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.integrity==null&&(s.integrity=l.integrity)}var Qf=null;function a2(s,l,p){if(Qf===null){var y=new Map,k=Qf=new Map;k.set(p,y)}else k=Qf,y=k.get(p),y||(y=new Map,k.set(p,y));if(y.has(s))return y;for(y.set(s,null),p=p.getElementsByTagName(s),k=0;k<p.length;k++){var S=p[k];if(!(S[Dn]||S[pr]||s==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var R=S.getAttribute(l)||"";R=s+R;var q=y.get(R);q?q.push(S):y.set(R,[S])}}return y}function s2(s,l,p){s=s.ownerDocument||s,s.head.insertBefore(p,l==="title"?s.querySelector("head > title"):null)}function Uj(s,l,p){if(p===1||l.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return s=l.disabled,typeof l.precedence=="string"&&s==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function o2(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function Hj(s,l,p,y){if(p.type==="stylesheet"&&(typeof y.media!="string"||matchMedia(y.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var k=vc(y.href),S=l.querySelector(hu(k));if(S){l=S._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=Jf.bind(s),l.then(s,s)),p.state.loading|=4,p.instance=S,tr(S);return}S=l.ownerDocument||l,y=i2(y),(k=Yn.get(k))&&b0(y,k),S=S.createElement("link"),tr(S);var R=S;R._p=new Promise(function(q,Z){R.onload=q,R.onerror=Z}),Si(S,"link",y),p.instance=S}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(p,l),(l=p.state.preload)&&(p.state.loading&3)===0&&(s.count++,p=Jf.bind(s),l.addEventListener("load",p),l.addEventListener("error",p))}}var v0=0;function Gj(s,l){return s.stylesheets&&s.count===0&&ep(s,s.stylesheets),0<s.count||0<s.imgCount?function(p){var y=setTimeout(function(){if(s.stylesheets&&ep(s,s.stylesheets),s.unsuspend){var S=s.unsuspend;s.unsuspend=null,S()}},6e4+l);0<s.imgBytes&&v0===0&&(v0=62500*Sj());var k=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&ep(s,s.stylesheets),s.unsuspend)){var S=s.unsuspend;s.unsuspend=null,S()}},(s.imgBytes>v0?50:800)+l);return s.unsuspend=p,function(){s.unsuspend=null,clearTimeout(y),clearTimeout(k)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ep(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var tp=null;function ep(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,tp=new Map,l.forEach(Wj,s),tp=null,Jf.call(s))}function Wj(s,l){if(!(l.state.loading&4)){var p=tp.get(s);if(p)var y=p.get(null);else{p=new Map,tp.set(s,p);for(var k=s.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<k.length;S++){var R=k[S];(R.nodeName==="LINK"||R.getAttribute("media")!=="not all")&&(p.set(R.dataset.precedence,R),y=R)}y&&p.set(null,y)}k=l.instance,R=k.getAttribute("data-precedence"),S=p.get(R)||y,S===y&&p.set(null,k),p.set(R,k),this.count++,y=Jf.bind(this),k.addEventListener("load",y),k.addEventListener("error",y),S?S.parentNode.insertBefore(k,S.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(k,s.firstChild)),l.state.loading|=4}}var du={$$typeof:E,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function Yj(s,l,p,y,k,S,R,q,Z){this.tag=1,this.containerInfo=s,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=Qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qe(0),this.hiddenUpdates=Qe(null),this.identifierPrefix=y,this.onUncaughtError=k,this.onCaughtError=S,this.onRecoverableError=R,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Z,this.incompleteTransitions=new Map}function l2(s,l,p,y,k,S,R,q,Z,ut,Ct,St){return s=new Yj(s,l,p,R,Z,ut,Ct,St,q),l=1,S===!0&&(l|=24),S=_n(3,null,null,l),s.current=S,S.stateNode=s,l=Jm(),l.refCount++,s.pooledCache=l,l.refCount++,S.memoizedState={element:y,isDehydrated:p,cache:l},iy(S),s}function c2(s){return s?(s=Ql,s):Ql}function h2(s,l,p,y,k,S){k=c2(k),y.context===null?y.context=k:y.pendingContext=k,y=Ks(l),y.payload={element:p},S=S===void 0?null:S,S!==null&&(y.callback=S),p=Xs(s,y,l),p!==null&&(cn(p,s,l),Hh(p,s,l))}function u2(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var p=s.retryLane;s.retryLane=p!==0&&p<l?p:l}}function _0(s,l){u2(s,l),(s=s.alternate)&&u2(s,l)}function d2(s){if(s.tag===13||s.tag===31){var l=Go(s,67108864);l!==null&&cn(l,s,67108864),_0(s,67108864)}}function f2(s){if(s.tag===13||s.tag===31){var l=Tn();l=sr(l);var p=Go(s,l);p!==null&&cn(p,s,l),_0(s,l)}}var rp=!0;function Vj(s,l,p,y){var k=D.T;D.T=null;var S=z.p;try{z.p=2,C0(s,l,p,y)}finally{z.p=S,D.T=k}}function Kj(s,l,p,y){var k=D.T;D.T=null;var S=z.p;try{z.p=8,C0(s,l,p,y)}finally{z.p=S,D.T=k}}function C0(s,l,p,y){if(rp){var k=k0(y);if(k===null)l0(s,l,y,ip,p),g2(s,y);else if(Zj(k,s,l,p,y))y.stopPropagation();else if(g2(s,y),l&4&&-1<Xj.indexOf(s)){for(;k!==null;){var S=qi(k);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var R=Or(S.pendingLanes);if(R!==0){var q=S;for(q.pendingLanes|=2,q.entangledLanes|=2;R;){var Z=1<<31-kr(R);q.entanglements[1]|=Z,R&=~Z}Ma(S),(Ze&6)===0&&($f=Me()+500,su(0))}}break;case 31:case 13:q=Go(S,2),q!==null&&cn(q,S,2),Pf(),_0(S,2)}if(S=k0(y),S===null&&l0(s,l,y,ip,p),S===k)break;k=S}k!==null&&y.stopPropagation()}else l0(s,l,y,null,p)}}function k0(s){return s=_e(s),w0(s)}var ip=null;function w0(s){if(ip=null,s=ni(s),s!==null){var l=o(s);if(l===null)s=null;else{var p=l.tag;if(p===13){if(s=c(l),s!==null)return s;s=null}else if(p===31){if(s=h(l),s!==null)return s;s=null}else if(p===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;s=null}else l!==s&&(s=null)}}return ip=s,null}function p2(s){switch(s){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(Nr()){case yr:return 2;case ii:return 8;case di:case $i:return 32;case Ur:return 268435456;default:return 32}default:return 32}}var S0=!1,oo=null,lo=null,co=null,fu=new Map,pu=new Map,ho=[],Xj="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 g2(s,l){switch(s){case"focusin":case"focusout":oo=null;break;case"dragenter":case"dragleave":lo=null;break;case"mouseover":case"mouseout":co=null;break;case"pointerover":case"pointerout":fu.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":pu.delete(l.pointerId)}}function gu(s,l,p,y,k,S){return s===null||s.nativeEvent!==S?(s={blockedOn:l,domEventName:p,eventSystemFlags:y,nativeEvent:S,targetContainers:[k]},l!==null&&(l=qi(l),l!==null&&d2(l)),s):(s.eventSystemFlags|=y,l=s.targetContainers,k!==null&&l.indexOf(k)===-1&&l.push(k),s)}function Zj(s,l,p,y,k){switch(l){case"focusin":return oo=gu(oo,s,l,p,y,k),!0;case"dragenter":return lo=gu(lo,s,l,p,y,k),!0;case"mouseover":return co=gu(co,s,l,p,y,k),!0;case"pointerover":var S=k.pointerId;return fu.set(S,gu(fu.get(S)||null,s,l,p,y,k)),!0;case"gotpointercapture":return S=k.pointerId,pu.set(S,gu(pu.get(S)||null,s,l,p,y,k)),!0}return!1}function m2(s){var l=ni(s.target);if(l!==null){var p=o(l);if(p!==null){if(l=p.tag,l===13){if(l=c(p),l!==null){s.blockedOn=l,Kr(s.priority,function(){f2(p)});return}}else if(l===31){if(l=h(p),l!==null){s.blockedOn=l,Kr(s.priority,function(){f2(p)});return}}else if(l===3&&p.stateNode.current.memoizedState.isDehydrated){s.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}s.blockedOn=null}function np(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var p=k0(s.nativeEvent);if(p===null){p=s.nativeEvent;var y=new p.constructor(p.type,p);Xt=y,p.target.dispatchEvent(y),Xt=null}else return l=qi(p),l!==null&&d2(l),s.blockedOn=p,!1;l.shift()}return!0}function y2(s,l,p){np(s)&&p.delete(l)}function Qj(){S0=!1,oo!==null&&np(oo)&&(oo=null),lo!==null&&np(lo)&&(lo=null),co!==null&&np(co)&&(co=null),fu.forEach(y2),pu.forEach(y2)}function ap(s,l){s.blockedOn===l&&(s.blockedOn=null,S0||(S0=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Qj)))}var sp=null;function b2(s){sp!==s&&(sp=s,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){sp===s&&(sp=null);for(var l=0;l<s.length;l+=3){var p=s[l],y=s[l+1],k=s[l+2];if(typeof y!="function"){if(w0(y||p)===null)continue;break}var S=qi(p);S!==null&&(s.splice(l,3),l-=3,ky(S,{pending:!0,data:k,method:p.method,action:y},y,k))}}))}function Cc(s){function l(Z){return ap(Z,s)}oo!==null&&ap(oo,s),lo!==null&&ap(lo,s),co!==null&&ap(co,s),fu.forEach(l),pu.forEach(l);for(var p=0;p<ho.length;p++){var y=ho[p];y.blockedOn===s&&(y.blockedOn=null)}for(;0<ho.length&&(p=ho[0],p.blockedOn===null);)m2(p),p.blockedOn===null&&ho.shift();if(p=(s.ownerDocument||s).$$reactFormReplay,p!=null)for(y=0;y<p.length;y+=3){var k=p[y],S=p[y+1],R=k[Rr]||null;if(typeof S=="function")R||b2(p);else if(R){var q=null;if(S&&S.hasAttribute("formAction")){if(k=S,R=S[Rr]||null)q=R.formAction;else if(w0(k)!==null)continue}else q=R.action;typeof q=="function"?p[y+1]=q:(p.splice(y,3),y-=3),b2(p)}}}function x2(){function s(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(R){return k=R})},focusReset:"manual",scroll:"manual"})}function l(){k!==null&&(k(),k=null),y||setTimeout(p,20)}function p(){if(!y&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var y=!1,k=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(p,100),function(){y=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),k!==null&&(k(),k=null)}}}function T0(s){this._internalRoot=s}op.prototype.render=T0.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(n(409));var p=l.current,y=Tn();h2(p,y,s,l,null,null)},op.prototype.unmount=T0.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;h2(s.current,2,null,s,null,null),Pf(),l[yn]=null}};function op(s){this._internalRoot=s}op.prototype.unstable_scheduleHydration=function(s){if(s){var l=Pi();s={blockedOn:null,target:s,priority:l};for(var p=0;p<ho.length&&l!==0&&l<ho[p].priority;p++);ho.splice(p,0,s),p===0&&m2(s)}};var v2=e.version;if(v2!=="19.2.4")throw Error(n(527,v2,"19.2.4"));z.findDOMNode=function(s){var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=d(l),s=s!==null?f(s):null,s=s===null?null:s.stateNode,s};var Jj={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var lp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!lp.isDisabled&&lp.supportsFiber)try{Yr=lp.inject(Jj),Cr=lp}catch{}}return yu.createRoot=function(s,l){if(!a(s))throw Error(n(299));var p=!1,y="",k=Ek,S=Ak,R=Nk;return l!=null&&(l.unstable_strictMode===!0&&(p=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onUncaughtError!==void 0&&(k=l.onUncaughtError),l.onCaughtError!==void 0&&(S=l.onCaughtError),l.onRecoverableError!==void 0&&(R=l.onRecoverableError)),l=l2(s,1,!1,null,null,p,y,null,k,S,R,x2),s[yn]=l.current,o0(s),new T0(l)},yu.hydrateRoot=function(s,l,p){if(!a(s))throw Error(n(299));var y=!1,k="",S=Ek,R=Ak,q=Nk,Z=null;return p!=null&&(p.unstable_strictMode===!0&&(y=!0),p.identifierPrefix!==void 0&&(k=p.identifierPrefix),p.onUncaughtError!==void 0&&(S=p.onUncaughtError),p.onCaughtError!==void 0&&(R=p.onCaughtError),p.onRecoverableError!==void 0&&(q=p.onRecoverableError),p.formState!==void 0&&(Z=p.formState)),l=l2(s,1,!0,l,p??null,y,k,Z,S,R,q,x2),l.context=c2(null),p=l.current,y=Tn(),y=sr(y),k=Ks(y),k.callback=null,Xs(p,k,y),p=y,l.current.lanes=p,ue(l,p),Ma(l),s[yn]=l.current,o0(s),new op(l)},yu.version="19.2.4",yu}var B2;function d4(){if(B2)return M0.exports;B2=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),M0.exports=u4(),M0.exports}var f4=d4(),Ch=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(r){return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},p4={setTimeout:(r,e)=>setTimeout(r,e),clearTimeout:r=>clearTimeout(r),setInterval:(r,e)=>setInterval(r,e),clearInterval:r=>clearInterval(r)},xo,s1,vN,g4=(vN=class{constructor(){ae(this,xo,p4);ae(this,s1,!1)}setTimeoutProvider(r){zt(this,xo,r)}setTimeout(r,e){return et(this,xo).setTimeout(r,e)}clearTimeout(r){et(this,xo).clearTimeout(r)}setInterval(r,e){return et(this,xo).setInterval(r,e)}clearInterval(r){et(this,xo).clearInterval(r)}},xo=new WeakMap,s1=new WeakMap,vN),dl=new g4;function m4(r){setTimeout(r,0)}var Nl=typeof window>"u"||"Deno"in globalThis;function Wi(){}function y4(r,e){return typeof r=="function"?r(e):r}function yx(r){return typeof r=="number"&&r>=0&&r!==1/0}function LN(r,e){return Math.max(r+(e||0)-Date.now(),0)}function Mo(r,e){return typeof r=="function"?r(e):r}function ta(r,e){return typeof r=="function"?r(e):r}function L2(r,e){const{type:i="all",exact:n,fetchStatus:a,predicate:o,queryKey:c,stale:h}=r;if(c){if(n){if(e.queryHash!==l1(c,e.options))return!1}else if(!fd(e.queryKey,c))return!1}if(i!=="all"){const u=e.isActive();if(i==="active"&&!u||i==="inactive"&&u)return!1}return!(typeof h=="boolean"&&e.isStale()!==h||a&&a!==e.state.fetchStatus||o&&!o(e))}function O2(r,e){const{exact:i,status:n,predicate:a,mutationKey:o}=r;if(o){if(!e.options.mutationKey)return!1;if(i){if(Ml(e.options.mutationKey)!==Ml(o))return!1}else if(!fd(e.options.mutationKey,o))return!1}return!(n&&e.state.status!==n||a&&!a(e))}function l1(r,e){return((e==null?void 0:e.queryKeyHashFn)||Ml)(r)}function Ml(r){return JSON.stringify(r,(e,i)=>bx(i)?Object.keys(i).sort().reduce((n,a)=>(n[a]=i[a],n),{}):i)}function fd(r,e){return r===e?!0:typeof r!=typeof e?!1:r&&e&&typeof r=="object"&&typeof e=="object"?Object.keys(e).every(i=>fd(r[i],e[i])):!1}var b4=Object.prototype.hasOwnProperty;function ON(r,e,i=0){if(r===e)return r;if(i>500)return e;const n=R2(r)&&R2(e);if(!n&&!(bx(r)&&bx(e)))return e;const o=(n?r:Object.keys(r)).length,c=n?e:Object.keys(e),h=c.length,u=n?new Array(h):{};let d=0;for(let f=0;f<h;f++){const g=n?f:c[f],b=r[g],m=e[g];if(b===m){u[g]=b,(n?f<o:b4.call(r,g))&&d++;continue}if(b===null||m===null||typeof b!="object"||typeof m!="object"){u[g]=m;continue}const v=ON(b,m,i+1);u[g]=v,v===b&&d++}return o===h&&d===o?r:u}function Jp(r,e){if(!e||Object.keys(r).length!==Object.keys(e).length)return!1;for(const i in r)if(r[i]!==e[i])return!1;return!0}function R2(r){return Array.isArray(r)&&r.length===Object.keys(r).length}function bx(r){if(!D2(r))return!1;const e=r.constructor;if(e===void 0)return!0;const i=e.prototype;return!(!D2(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(r)!==Object.prototype)}function D2(r){return Object.prototype.toString.call(r)==="[object Object]"}function x4(r){return new Promise(e=>{dl.setTimeout(e,r)})}function xx(r,e,i){return typeof i.structuralSharing=="function"?i.structuralSharing(r,e):i.structuralSharing!==!1?ON(r,e):e}function v4(r,e,i=0){const n=[...r,e];return i&&n.length>i?n.slice(1):n}function _4(r,e,i=0){const n=[e,...r];return i&&n.length>i?n.slice(0,-1):n}var c1=Symbol();function RN(r,e){return!r.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!r.queryFn||r.queryFn===c1?()=>Promise.reject(new Error(`Missing queryFn: '${r.queryHash}'`)):r.queryFn}function h1(r,e){return typeof r=="function"?r(...e):!!r}function C4(r,e,i){let n=!1,a;return Object.defineProperty(r,"signal",{enumerable:!0,get:()=>(a??(a=e()),n||(n=!0,a.aborted?i():a.addEventListener("abort",i,{once:!0})),a)}),r}var yl,vo,qc,_N,k4=(_N=class extends Ch{constructor(){super();ae(this,yl);ae(this,vo);ae(this,qc);zt(this,qc,e=>{if(!Nl&&window.addEventListener){const i=()=>e();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){et(this,vo)||this.setEventListener(et(this,qc))}onUnsubscribe(){var e;this.hasListeners()||((e=et(this,vo))==null||e.call(this),zt(this,vo,void 0))}setEventListener(e){var i;zt(this,qc,e),(i=et(this,vo))==null||i.call(this),zt(this,vo,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){et(this,yl)!==e&&(zt(this,yl,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(i=>{i(e)})}isFocused(){var e;return typeof et(this,yl)=="boolean"?et(this,yl):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},yl=new WeakMap,vo=new WeakMap,qc=new WeakMap,_N),u1=new k4;function vx(){let r,e;const i=new Promise((a,o)=>{r=a,e=o});i.status="pending",i.catch(()=>{});function n(a){Object.assign(i,a),delete i.resolve,delete i.reject}return i.resolve=a=>{n({status:"fulfilled",value:a}),r(a)},i.reject=a=>{n({status:"rejected",reason:a}),e(a)},i}var w4=m4;function S4(){let r=[],e=0,i=h=>{h()},n=h=>{h()},a=w4;const o=h=>{e?r.push(h):a(()=>{i(h)})},c=()=>{const h=r;r=[],h.length&&a(()=>{n(()=>{h.forEach(u=>{i(u)})})})};return{batch:h=>{let u;e++;try{u=h()}finally{e--,e||c()}return u},batchCalls:h=>(...u)=>{o(()=>{h(...u)})},schedule:o,setNotifyFunction:h=>{i=h},setBatchNotifyFunction:h=>{n=h},setScheduler:h=>{a=h}}}var li=S4(),Uc,_o,Hc,CN,T4=(CN=class extends Ch{constructor(){super();ae(this,Uc,!0);ae(this,_o);ae(this,Hc);zt(this,Hc,e=>{if(!Nl&&window.addEventListener){const i=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",n)}}})}onSubscribe(){et(this,_o)||this.setEventListener(et(this,Hc))}onUnsubscribe(){var e;this.hasListeners()||((e=et(this,_o))==null||e.call(this),zt(this,_o,void 0))}setEventListener(e){var i;zt(this,Hc,e),(i=et(this,_o))==null||i.call(this),zt(this,_o,e(this.setOnline.bind(this)))}setOnline(e){et(this,Uc)!==e&&(zt(this,Uc,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return et(this,Uc)}},Uc=new WeakMap,_o=new WeakMap,Hc=new WeakMap,CN),tg=new T4;function E4(r){return Math.min(1e3*2**r,3e4)}function DN(r){return(r??"online")==="online"?tg.isOnline():!0}var _x=class extends Error{constructor(r){super("CancelledError"),this.revert=r==null?void 0:r.revert,this.silent=r==null?void 0:r.silent}};function FN(r){let e=!1,i=0,n;const a=vx(),o=()=>a.status!=="pending",c=_=>{var C;if(!o()){const w=new _x(_);b(w),(C=r.onCancel)==null||C.call(r,w)}},h=()=>{e=!0},u=()=>{e=!1},d=()=>u1.isFocused()&&(r.networkMode==="always"||tg.isOnline())&&r.canRun(),f=()=>DN(r.networkMode)&&r.canRun(),g=_=>{o()||(n==null||n(),a.resolve(_))},b=_=>{o()||(n==null||n(),a.reject(_))},m=()=>new Promise(_=>{var C;n=w=>{(o()||d())&&_(w)},(C=r.onPause)==null||C.call(r)}).then(()=>{var _;n=void 0,o()||(_=r.onContinue)==null||_.call(r)}),v=()=>{if(o())return;let _;const C=i===0?r.initialPromise:void 0;try{_=C??r.fn()}catch(w){_=Promise.reject(w)}Promise.resolve(_).then(g).catch(w=>{var B;if(o())return;const T=r.retry??(Nl?0:3),E=r.retryDelay??E4,N=typeof E=="function"?E(i,w):E,O=T===!0||typeof T=="number"&&i<T||typeof T=="function"&&T(i,w);if(e||!O){b(w);return}i++,(B=r.onFail)==null||B.call(r,i,w),x4(N).then(()=>d()?void 0:m()).then(()=>{e?b(w):v()})})};return{promise:a,status:()=>a.status,cancel:c,continue:()=>(n==null||n(),a),cancelRetry:h,continueRetry:u,canStart:f,start:()=>(f()?v():m().then(v),a)}}var bl,kN,jN=(kN=class{constructor(){ae(this,bl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),yx(this.gcTime)&&zt(this,bl,dl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(r){this.gcTime=Math.max(this.gcTime||0,r??(Nl?1/0:300*1e3))}clearGcTimeout(){et(this,bl)&&(dl.clearTimeout(et(this,bl)),zt(this,bl,void 0))}},bl=new WeakMap,kN),xl,Gc,Jn,vl,pi,Md,_l,da,vs,wN,A4=(wN=class extends jN{constructor(e){super();ae(this,da);ae(this,xl);ae(this,Gc);ae(this,Jn);ae(this,vl);ae(this,pi);ae(this,Md);ae(this,_l);zt(this,_l,!1),zt(this,Md,e.defaultOptions),this.setOptions(e.options),this.observers=[],zt(this,vl,e.client),zt(this,Jn,et(this,vl).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,zt(this,xl,j2(this.options)),this.state=e.state??et(this,xl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=et(this,pi))==null?void 0:e.promise}setOptions(e){if(this.options={...et(this,Md),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=j2(this.options);i.data!==void 0&&(this.setState(F2(i.data,i.dataUpdatedAt)),zt(this,xl,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&et(this,Jn).remove(this)}setData(e,i){const n=xx(this.state.data,e,this.options);return Ne(this,da,vs).call(this,{data:n,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),n}setState(e,i){Ne(this,da,vs).call(this,{type:"setState",state:e,setStateOptions:i})}cancel(e){var n,a;const i=(n=et(this,pi))==null?void 0:n.promise;return(a=et(this,pi))==null||a.cancel(e),i?i.then(Wi).catch(Wi):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(et(this,xl))}isActive(){return this.observers.some(e=>ta(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===c1||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Mo(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!LN(this.state.dataUpdatedAt,e)}onFocus(){var i;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(i=et(this,pi))==null||i.continue()}onOnline(){var i;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(i=et(this,pi))==null||i.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),et(this,Jn).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(i=>i!==e),this.observers.length||(et(this,pi)&&(et(this,_l)?et(this,pi).cancel({revert:!0}):et(this,pi).cancelRetry()),this.scheduleGc()),et(this,Jn).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ne(this,da,vs).call(this,{type:"invalidate"})}async fetch(e,i){var u,d,f,g,b,m,v,_,C,w,T,E;if(this.state.fetchStatus!=="idle"&&((u=et(this,pi))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(et(this,pi))return et(this,pi).continueRetry(),et(this,pi).promise}if(e&&this.setOptions(e),!this.options.queryFn){const N=this.observers.find(O=>O.options.queryFn);N&&this.setOptions(N.options)}const n=new AbortController,a=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(zt(this,_l,!0),n.signal)})},o=()=>{const N=RN(this.options,i),B=(()=>{const A={client:et(this,vl),queryKey:this.queryKey,meta:this.meta};return a(A),A})();return zt(this,_l,!1),this.options.persister?this.options.persister(N,B,this):N(B)},h=(()=>{const N={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:et(this,vl),state:this.state,fetchFn:o};return a(N),N})();(d=this.options.behavior)==null||d.onFetch(h,this),zt(this,Gc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=h.fetchOptions)==null?void 0:f.meta))&&Ne(this,da,vs).call(this,{type:"fetch",meta:(g=h.fetchOptions)==null?void 0:g.meta}),zt(this,pi,FN({initialPromise:i==null?void 0:i.initialPromise,fn:h.fetchFn,onCancel:N=>{N instanceof _x&&N.revert&&this.setState({...et(this,Gc),fetchStatus:"idle"}),n.abort()},onFail:(N,O)=>{Ne(this,da,vs).call(this,{type:"failed",failureCount:N,error:O})},onPause:()=>{Ne(this,da,vs).call(this,{type:"pause"})},onContinue:()=>{Ne(this,da,vs).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const N=await et(this,pi).start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(m=(b=et(this,Jn).config).onSuccess)==null||m.call(b,N,this),(_=(v=et(this,Jn).config).onSettled)==null||_.call(v,N,this.state.error,this),N}catch(N){if(N instanceof _x){if(N.silent)return et(this,pi).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw Ne(this,da,vs).call(this,{type:"error",error:N}),(w=(C=et(this,Jn).config).onError)==null||w.call(C,N,this),(E=(T=et(this,Jn).config).onSettled)==null||E.call(T,this.state.data,N,this),N}finally{this.scheduleGc()}}},xl=new WeakMap,Gc=new WeakMap,Jn=new WeakMap,vl=new WeakMap,pi=new WeakMap,Md=new WeakMap,_l=new WeakMap,da=new WeakSet,vs=function(e){const i=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...IN(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,...F2(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return zt(this,Gc,e.manual?a:void 0),a;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=i(this.state),li.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),et(this,Jn).notify({query:this,type:"updated",action:e})})},wN);function IN(r,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:DN(e.networkMode)?"fetching":"paused",...r===void 0&&{error:null,status:"pending"}}}function F2(r,e){return{data:r,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function j2(r){const e=typeof r.initialData=="function"?r.initialData():r.initialData,i=e!==void 0,n=i?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:i?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var un,Ue,Bd,Gi,Cl,Wc,ks,Co,Ld,Yc,Vc,kl,wl,ko,Kc,nr,Uu,Cx,kx,wx,Sx,Tx,Ex,Ax,$N,SN,N4=(SN=class extends Ch{constructor(e,i){super();ae(this,nr);ae(this,un);ae(this,Ue);ae(this,Bd);ae(this,Gi);ae(this,Cl);ae(this,Wc);ae(this,ks);ae(this,Co);ae(this,Ld);ae(this,Yc);ae(this,Vc);ae(this,kl);ae(this,wl);ae(this,ko);ae(this,Kc,new Set);this.options=i,zt(this,un,e),zt(this,Co,null),zt(this,ks,vx()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(et(this,Ue).addObserver(this),I2(et(this,Ue),this.options)?Ne(this,nr,Uu).call(this):this.updateResult(),Ne(this,nr,Sx).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Nx(et(this,Ue),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Nx(et(this,Ue),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ne(this,nr,Tx).call(this),Ne(this,nr,Ex).call(this),et(this,Ue).removeObserver(this)}setOptions(e){const i=this.options,n=et(this,Ue);if(this.options=et(this,un).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ta(this.options.enabled,et(this,Ue))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ne(this,nr,Ax).call(this),et(this,Ue).setOptions(this.options),i._defaulted&&!Jp(this.options,i)&&et(this,un).getQueryCache().notify({type:"observerOptionsUpdated",query:et(this,Ue),observer:this});const a=this.hasListeners();a&&$2(et(this,Ue),n,this.options,i)&&Ne(this,nr,Uu).call(this),this.updateResult(),a&&(et(this,Ue)!==n||ta(this.options.enabled,et(this,Ue))!==ta(i.enabled,et(this,Ue))||Mo(this.options.staleTime,et(this,Ue))!==Mo(i.staleTime,et(this,Ue)))&&Ne(this,nr,Cx).call(this);const o=Ne(this,nr,kx).call(this);a&&(et(this,Ue)!==n||ta(this.options.enabled,et(this,Ue))!==ta(i.enabled,et(this,Ue))||o!==et(this,ko))&&Ne(this,nr,wx).call(this,o)}getOptimisticResult(e){const i=et(this,un).getQueryCache().build(et(this,un),e),n=this.createResult(i,e);return B4(this,n)&&(zt(this,Gi,n),zt(this,Wc,this.options),zt(this,Cl,et(this,Ue).state)),n}getCurrentResult(){return et(this,Gi)}trackResult(e,i){return new Proxy(e,{get:(n,a)=>(this.trackProp(a),i==null||i(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&et(this,ks).status==="pending"&&et(this,ks).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(e){et(this,Kc).add(e)}getCurrentQuery(){return et(this,Ue)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const i=et(this,un).defaultQueryOptions(e),n=et(this,un).getQueryCache().build(et(this,un),i);return n.fetch().then(()=>this.createResult(n,i))}fetch(e){return Ne(this,nr,Uu).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),et(this,Gi)))}createResult(e,i){var P;const n=et(this,Ue),a=this.options,o=et(this,Gi),c=et(this,Cl),h=et(this,Wc),d=e!==n?e.state:et(this,Bd),{state:f}=e;let g={...f},b=!1,m;if(i._optimisticResults){const j=this.hasListeners(),$=!j&&I2(e,i),X=j&&$2(e,n,i,a);($||X)&&(g={...g,...IN(f.data,e.options)}),i._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:v,errorUpdatedAt:_,status:C}=g;m=g.data;let w=!1;if(i.placeholderData!==void 0&&m===void 0&&C==="pending"){let j;o!=null&&o.isPlaceholderData&&i.placeholderData===(h==null?void 0:h.placeholderData)?(j=o.data,w=!0):j=typeof i.placeholderData=="function"?i.placeholderData((P=et(this,Vc))==null?void 0:P.state.data,et(this,Vc)):i.placeholderData,j!==void 0&&(C="success",m=xx(o==null?void 0:o.data,j,i),b=!0)}if(i.select&&m!==void 0&&!w)if(o&&m===(c==null?void 0:c.data)&&i.select===et(this,Ld))m=et(this,Yc);else try{zt(this,Ld,i.select),m=i.select(m),m=xx(o==null?void 0:o.data,m,i),zt(this,Yc,m),zt(this,Co,null)}catch(j){zt(this,Co,j)}et(this,Co)&&(v=et(this,Co),m=et(this,Yc),_=Date.now(),C="error");const T=g.fetchStatus==="fetching",E=C==="pending",N=C==="error",O=E&&T,B=m!==void 0,L={status:C,fetchStatus:g.fetchStatus,isPending:E,isSuccess:C==="success",isError:N,isInitialLoading:O,isLoading:O,data:m,dataUpdatedAt:g.dataUpdatedAt,error:v,errorUpdatedAt:_,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:T,isRefetching:T&&!E,isLoadingError:N&&!B,isPaused:g.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:N&&B,isStale:d1(e,i),refetch:this.refetch,promise:et(this,ks),isEnabled:ta(i.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const j=L.data!==void 0,$=L.status==="error"&&!j,X=U=>{$?U.reject(L.error):j&&U.resolve(L.data)},W=()=>{const U=zt(this,ks,L.promise=vx());X(U)},F=et(this,ks);switch(F.status){case"pending":e.queryHash===n.queryHash&&X(F);break;case"fulfilled":($||L.data!==F.value)&&W();break;case"rejected":(!$||L.error!==F.reason)&&W();break}}return L}updateResult(){const e=et(this,Gi),i=this.createResult(et(this,Ue),this.options);if(zt(this,Cl,et(this,Ue).state),zt(this,Wc,this.options),et(this,Cl).data!==void 0&&zt(this,Vc,et(this,Ue)),Jp(i,e))return;zt(this,Gi,i);const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!et(this,Kc).size)return!0;const c=new Set(o??et(this,Kc));return this.options.throwOnError&&c.add("error"),Object.keys(et(this,Gi)).some(h=>{const u=h;return et(this,Gi)[u]!==e[u]&&c.has(u)})};Ne(this,nr,$N).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ne(this,nr,Sx).call(this)}},un=new WeakMap,Ue=new WeakMap,Bd=new WeakMap,Gi=new WeakMap,Cl=new WeakMap,Wc=new WeakMap,ks=new WeakMap,Co=new WeakMap,Ld=new WeakMap,Yc=new WeakMap,Vc=new WeakMap,kl=new WeakMap,wl=new WeakMap,ko=new WeakMap,Kc=new WeakMap,nr=new WeakSet,Uu=function(e){Ne(this,nr,Ax).call(this);let i=et(this,Ue).fetch(this.options,e);return e!=null&&e.throwOnError||(i=i.catch(Wi)),i},Cx=function(){Ne(this,nr,Tx).call(this);const e=Mo(this.options.staleTime,et(this,Ue));if(Nl||et(this,Gi).isStale||!yx(e))return;const n=LN(et(this,Gi).dataUpdatedAt,e)+1;zt(this,kl,dl.setTimeout(()=>{et(this,Gi).isStale||this.updateResult()},n))},kx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(et(this,Ue)):this.options.refetchInterval)??!1},wx=function(e){Ne(this,nr,Ex).call(this),zt(this,ko,e),!(Nl||ta(this.options.enabled,et(this,Ue))===!1||!yx(et(this,ko))||et(this,ko)===0)&&zt(this,wl,dl.setInterval(()=>{(this.options.refetchIntervalInBackground||u1.isFocused())&&Ne(this,nr,Uu).call(this)},et(this,ko)))},Sx=function(){Ne(this,nr,Cx).call(this),Ne(this,nr,wx).call(this,Ne(this,nr,kx).call(this))},Tx=function(){et(this,kl)&&(dl.clearTimeout(et(this,kl)),zt(this,kl,void 0))},Ex=function(){et(this,wl)&&(dl.clearInterval(et(this,wl)),zt(this,wl,void 0))},Ax=function(){const e=et(this,un).getQueryCache().build(et(this,un),this.options);if(e===et(this,Ue))return;const i=et(this,Ue);zt(this,Ue,e),zt(this,Bd,e.state),this.hasListeners()&&(i==null||i.removeObserver(this),e.addObserver(this))},$N=function(e){li.batch(()=>{e.listeners&&this.listeners.forEach(i=>{i(et(this,Gi))}),et(this,un).getQueryCache().notify({query:et(this,Ue),type:"observerResultsUpdated"})})},SN);function M4(r,e){return ta(e.enabled,r)!==!1&&r.state.data===void 0&&!(r.state.status==="error"&&e.retryOnMount===!1)}function I2(r,e){return M4(r,e)||r.state.data!==void 0&&Nx(r,e,e.refetchOnMount)}function Nx(r,e,i){if(ta(e.enabled,r)!==!1&&Mo(e.staleTime,r)!=="static"){const n=typeof i=="function"?i(r):i;return n==="always"||n!==!1&&d1(r,e)}return!1}function $2(r,e,i,n){return(r!==e||ta(n.enabled,r)===!1)&&(!i.suspense||r.state.status!=="error")&&d1(r,i)}function d1(r,e){return ta(e.enabled,r)!==!1&&r.isStaleByTime(Mo(e.staleTime,r))}function B4(r,e){return!Jp(r.getCurrentResult(),e)}function z2(r){return{onFetch:(e,i)=>{var f,g,b,m,v;const n=e.options,a=(b=(g=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:g.fetchMore)==null?void 0:b.direction,o=((m=e.state.data)==null?void 0:m.pages)||[],c=((v=e.state.data)==null?void 0:v.pageParams)||[];let h={pages:[],pageParams:[]},u=0;const d=async()=>{let _=!1;const C=E=>{C4(E,()=>e.signal,()=>_=!0)},w=RN(e.options,e.fetchOptions),T=async(E,N,O)=>{if(_)return Promise.reject();if(N==null&&E.pages.length)return Promise.resolve(E);const A=(()=>{const $={client:e.client,queryKey:e.queryKey,pageParam:N,direction:O?"backward":"forward",meta:e.options.meta};return C($),$})(),L=await w(A),{maxPages:P}=e.options,j=O?_4:v4;return{pages:j(E.pages,L,P),pageParams:j(E.pageParams,N,P)}};if(a&&o.length){const E=a==="backward",N=E?L4:P2,O={pages:o,pageParams:c},B=N(n,O);h=await T(O,B,E)}else{const E=r??o.length;do{const N=u===0?c[0]??n.initialPageParam:P2(n,h);if(u>0&&N==null)break;h=await T(h,N),u++}while(u<E)}return h};e.options.persister?e.fetchFn=()=>{var _,C;return(C=(_=e.options).persister)==null?void 0:C.call(_,d,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},i)}:e.fetchFn=d}}}function P2(r,{pages:e,pageParams:i}){const n=e.length-1;return e.length>0?r.getNextPageParam(e[n],e,i[n],i):void 0}function L4(r,{pages:e,pageParams:i}){var n;return e.length>0?(n=r.getPreviousPageParam)==null?void 0:n.call(r,e[0],e,i[0],i):void 0}var Od,za,Di,Sl,Pa,go,TN,O4=(TN=class extends jN{constructor(e){super();ae(this,Pa);ae(this,Od);ae(this,za);ae(this,Di);ae(this,Sl);zt(this,Od,e.client),this.mutationId=e.mutationId,zt(this,Di,e.mutationCache),zt(this,za,[]),this.state=e.state||zN(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){et(this,za).includes(e)||(et(this,za).push(e),this.clearGcTimeout(),et(this,Di).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){zt(this,za,et(this,za).filter(i=>i!==e)),this.scheduleGc(),et(this,Di).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){et(this,za).length||(this.state.status==="pending"?this.scheduleGc():et(this,Di).remove(this))}continue(){var e;return((e=et(this,Sl))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var c,h,u,d,f,g,b,m,v,_,C,w,T,E,N,O,B,A;const i=()=>{Ne(this,Pa,go).call(this,{type:"continue"})},n={client:et(this,Od),meta:this.options.meta,mutationKey:this.options.mutationKey};zt(this,Sl,FN({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(L,P)=>{Ne(this,Pa,go).call(this,{type:"failed",failureCount:L,error:P})},onPause:()=>{Ne(this,Pa,go).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>et(this,Di).canRun(this)}));const a=this.state.status==="pending",o=!et(this,Sl).canStart();try{if(a)i();else{Ne(this,Pa,go).call(this,{type:"pending",variables:e,isPaused:o}),et(this,Di).config.onMutate&&await et(this,Di).config.onMutate(e,this,n);const P=await((h=(c=this.options).onMutate)==null?void 0:h.call(c,e,n));P!==this.state.context&&Ne(this,Pa,go).call(this,{type:"pending",context:P,variables:e,isPaused:o})}const L=await et(this,Sl).start();return await((d=(u=et(this,Di).config).onSuccess)==null?void 0:d.call(u,L,e,this.state.context,this,n)),await((g=(f=this.options).onSuccess)==null?void 0:g.call(f,L,e,this.state.context,n)),await((m=(b=et(this,Di).config).onSettled)==null?void 0:m.call(b,L,null,this.state.variables,this.state.context,this,n)),await((_=(v=this.options).onSettled)==null?void 0:_.call(v,L,null,e,this.state.context,n)),Ne(this,Pa,go).call(this,{type:"success",data:L}),L}catch(L){try{await((w=(C=et(this,Di).config).onError)==null?void 0:w.call(C,L,e,this.state.context,this,n))}catch(P){Promise.reject(P)}try{await((E=(T=this.options).onError)==null?void 0:E.call(T,L,e,this.state.context,n))}catch(P){Promise.reject(P)}try{await((O=(N=et(this,Di).config).onSettled)==null?void 0:O.call(N,void 0,L,this.state.variables,this.state.context,this,n))}catch(P){Promise.reject(P)}try{await((A=(B=this.options).onSettled)==null?void 0:A.call(B,void 0,L,e,this.state.context,n))}catch(P){Promise.reject(P)}throw Ne(this,Pa,go).call(this,{type:"error",error:L}),L}finally{et(this,Di).runNext(this)}}},Od=new WeakMap,za=new WeakMap,Di=new WeakMap,Sl=new WeakMap,Pa=new WeakSet,go=function(e){const i=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=i(this.state),li.batch(()=>{et(this,za).forEach(n=>{n.onMutationUpdate(e)}),et(this,Di).notify({mutation:this,type:"updated",action:e})})},TN);function zN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ws,fa,Rd,EN,R4=(EN=class extends Ch{constructor(e={}){super();ae(this,ws);ae(this,fa);ae(this,Rd);this.config=e,zt(this,ws,new Set),zt(this,fa,new Map),zt(this,Rd,0)}build(e,i,n){const a=new O4({client:e,mutationCache:this,mutationId:++cp(this,Rd)._,options:e.defaultMutationOptions(i),state:n});return this.add(a),a}add(e){et(this,ws).add(e);const i=hp(e);if(typeof i=="string"){const n=et(this,fa).get(i);n?n.push(e):et(this,fa).set(i,[e])}this.notify({type:"added",mutation:e})}remove(e){if(et(this,ws).delete(e)){const i=hp(e);if(typeof i=="string"){const n=et(this,fa).get(i);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&et(this,fa).delete(i)}}this.notify({type:"removed",mutation:e})}canRun(e){const i=hp(e);if(typeof i=="string"){const n=et(this,fa).get(i),a=n==null?void 0:n.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){var n;const i=hp(e);if(typeof i=="string"){const a=(n=et(this,fa).get(i))==null?void 0:n.find(o=>o!==e&&o.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){li.batch(()=>{et(this,ws).forEach(e=>{this.notify({type:"removed",mutation:e})}),et(this,ws).clear(),et(this,fa).clear()})}getAll(){return Array.from(et(this,ws))}find(e){const i={exact:!0,...e};return this.getAll().find(n=>O2(i,n))}findAll(e={}){return this.getAll().filter(i=>O2(e,i))}notify(e){li.batch(()=>{this.listeners.forEach(i=>{i(e)})})}resumePausedMutations(){const e=this.getAll().filter(i=>i.state.isPaused);return li.batch(()=>Promise.all(e.map(i=>i.continue().catch(Wi))))}},ws=new WeakMap,fa=new WeakMap,Rd=new WeakMap,EN);function hp(r){var e;return(e=r.options.scope)==null?void 0:e.id}var Ss,wo,dn,Ts,Os,Fp,Mx,AN,D4=(AN=class extends Ch{constructor(i,n){super();ae(this,Os);ae(this,Ss);ae(this,wo);ae(this,dn);ae(this,Ts);zt(this,Ss,i),this.setOptions(n),this.bindMethods(),Ne(this,Os,Fp).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var a;const n=this.options;this.options=et(this,Ss).defaultMutationOptions(i),Jp(this.options,n)||et(this,Ss).getMutationCache().notify({type:"observerOptionsUpdated",mutation:et(this,dn),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Ml(n.mutationKey)!==Ml(this.options.mutationKey)?this.reset():((a=et(this,dn))==null?void 0:a.state.status)==="pending"&&et(this,dn).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=et(this,dn))==null||i.removeObserver(this)}onMutationUpdate(i){Ne(this,Os,Fp).call(this),Ne(this,Os,Mx).call(this,i)}getCurrentResult(){return et(this,wo)}reset(){var i;(i=et(this,dn))==null||i.removeObserver(this),zt(this,dn,void 0),Ne(this,Os,Fp).call(this),Ne(this,Os,Mx).call(this)}mutate(i,n){var a;return zt(this,Ts,n),(a=et(this,dn))==null||a.removeObserver(this),zt(this,dn,et(this,Ss).getMutationCache().build(et(this,Ss),this.options)),et(this,dn).addObserver(this),et(this,dn).execute(i)}},Ss=new WeakMap,wo=new WeakMap,dn=new WeakMap,Ts=new WeakMap,Os=new WeakSet,Fp=function(){var n;const i=((n=et(this,dn))==null?void 0:n.state)??zN();zt(this,wo,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},Mx=function(i){li.batch(()=>{var n,a,o,c,h,u,d,f;if(et(this,Ts)&&this.hasListeners()){const g=et(this,wo).variables,b=et(this,wo).context,m={client:et(this,Ss),meta:this.options.meta,mutationKey:this.options.mutationKey};if((i==null?void 0:i.type)==="success"){try{(a=(n=et(this,Ts)).onSuccess)==null||a.call(n,i.data,g,b,m)}catch(v){Promise.reject(v)}try{(c=(o=et(this,Ts)).onSettled)==null||c.call(o,i.data,null,g,b,m)}catch(v){Promise.reject(v)}}else if((i==null?void 0:i.type)==="error"){try{(u=(h=et(this,Ts)).onError)==null||u.call(h,i.error,g,b,m)}catch(v){Promise.reject(v)}try{(f=(d=et(this,Ts)).onSettled)==null||f.call(d,void 0,i.error,g,b,m)}catch(v){Promise.reject(v)}}}this.listeners.forEach(g=>{g(et(this,wo))})})},AN),qa,NN,F4=(NN=class extends Ch{constructor(e={}){super();ae(this,qa);this.config=e,zt(this,qa,new Map)}build(e,i,n){const a=i.queryKey,o=i.queryHash??l1(a,i);let c=this.get(o);return c||(c=new A4({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(i),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(c)),c}add(e){et(this,qa).has(e.queryHash)||(et(this,qa).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const i=et(this,qa).get(e.queryHash);i&&(e.destroy(),i===e&&et(this,qa).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){li.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return et(this,qa).get(e)}getAll(){return[...et(this,qa).values()]}find(e){const i={exact:!0,...e};return this.getAll().find(n=>L2(i,n))}findAll(e={}){const i=this.getAll();return Object.keys(e).length>0?i.filter(n=>L2(e,n)):i}notify(e){li.batch(()=>{this.listeners.forEach(i=>{i(e)})})}onFocus(){li.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){li.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},qa=new WeakMap,NN),zr,So,To,Xc,Zc,Eo,Qc,Jc,MN,j4=(MN=class{constructor(r={}){ae(this,zr);ae(this,So);ae(this,To);ae(this,Xc);ae(this,Zc);ae(this,Eo);ae(this,Qc);ae(this,Jc);zt(this,zr,r.queryCache||new F4),zt(this,So,r.mutationCache||new R4),zt(this,To,r.defaultOptions||{}),zt(this,Xc,new Map),zt(this,Zc,new Map),zt(this,Eo,0)}mount(){cp(this,Eo)._++,et(this,Eo)===1&&(zt(this,Qc,u1.subscribe(async r=>{r&&(await this.resumePausedMutations(),et(this,zr).onFocus())})),zt(this,Jc,tg.subscribe(async r=>{r&&(await this.resumePausedMutations(),et(this,zr).onOnline())})))}unmount(){var r,e;cp(this,Eo)._--,et(this,Eo)===0&&((r=et(this,Qc))==null||r.call(this),zt(this,Qc,void 0),(e=et(this,Jc))==null||e.call(this),zt(this,Jc,void 0))}isFetching(r){return et(this,zr).findAll({...r,fetchStatus:"fetching"}).length}isMutating(r){return et(this,So).findAll({...r,status:"pending"}).length}getQueryData(r){var i;const e=this.defaultQueryOptions({queryKey:r});return(i=et(this,zr).get(e.queryHash))==null?void 0:i.state.data}ensureQueryData(r){const e=this.defaultQueryOptions(r),i=et(this,zr).build(this,e),n=i.state.data;return n===void 0?this.fetchQuery(r):(r.revalidateIfStale&&i.isStaleByTime(Mo(e.staleTime,i))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(r){return et(this,zr).findAll(r).map(({queryKey:e,state:i})=>{const n=i.data;return[e,n]})}setQueryData(r,e,i){const n=this.defaultQueryOptions({queryKey:r}),a=et(this,zr).get(n.queryHash),o=a==null?void 0:a.state.data,c=y4(e,o);if(c!==void 0)return et(this,zr).build(this,n).setData(c,{...i,manual:!0})}setQueriesData(r,e,i){return li.batch(()=>et(this,zr).findAll(r).map(({queryKey:n})=>[n,this.setQueryData(n,e,i)]))}getQueryState(r){var i;const e=this.defaultQueryOptions({queryKey:r});return(i=et(this,zr).get(e.queryHash))==null?void 0:i.state}removeQueries(r){const e=et(this,zr);li.batch(()=>{e.findAll(r).forEach(i=>{e.remove(i)})})}resetQueries(r,e){const i=et(this,zr);return li.batch(()=>(i.findAll(r).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...r},e)))}cancelQueries(r,e={}){const i={revert:!0,...e},n=li.batch(()=>et(this,zr).findAll(r).map(a=>a.cancel(i)));return Promise.all(n).then(Wi).catch(Wi)}invalidateQueries(r,e={}){return li.batch(()=>(et(this,zr).findAll(r).forEach(i=>{i.invalidate()}),(r==null?void 0:r.refetchType)==="none"?Promise.resolve():this.refetchQueries({...r,type:(r==null?void 0:r.refetchType)??(r==null?void 0:r.type)??"active"},e)))}refetchQueries(r,e={}){const i={...e,cancelRefetch:e.cancelRefetch??!0},n=li.batch(()=>et(this,zr).findAll(r).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,i);return i.throwOnError||(o=o.catch(Wi)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Wi)}fetchQuery(r){const e=this.defaultQueryOptions(r);e.retry===void 0&&(e.retry=!1);const i=et(this,zr).build(this,e);return i.isStaleByTime(Mo(e.staleTime,i))?i.fetch(e):Promise.resolve(i.state.data)}prefetchQuery(r){return this.fetchQuery(r).then(Wi).catch(Wi)}fetchInfiniteQuery(r){return r.behavior=z2(r.pages),this.fetchQuery(r)}prefetchInfiniteQuery(r){return this.fetchInfiniteQuery(r).then(Wi).catch(Wi)}ensureInfiniteQueryData(r){return r.behavior=z2(r.pages),this.ensureQueryData(r)}resumePausedMutations(){return tg.isOnline()?et(this,So).resumePausedMutations():Promise.resolve()}getQueryCache(){return et(this,zr)}getMutationCache(){return et(this,So)}getDefaultOptions(){return et(this,To)}setDefaultOptions(r){zt(this,To,r)}setQueryDefaults(r,e){et(this,Xc).set(Ml(r),{queryKey:r,defaultOptions:e})}getQueryDefaults(r){const e=[...et(this,Xc).values()],i={};return e.forEach(n=>{fd(r,n.queryKey)&&Object.assign(i,n.defaultOptions)}),i}setMutationDefaults(r,e){et(this,Zc).set(Ml(r),{mutationKey:r,defaultOptions:e})}getMutationDefaults(r){const e=[...et(this,Zc).values()],i={};return e.forEach(n=>{fd(r,n.mutationKey)&&Object.assign(i,n.defaultOptions)}),i}defaultQueryOptions(r){if(r._defaulted)return r;const e={...et(this,To).queries,...this.getQueryDefaults(r.queryKey),...r,_defaulted:!0};return e.queryHash||(e.queryHash=l1(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===c1&&(e.enabled=!1),e}defaultMutationOptions(r){return r!=null&&r._defaulted?r:{...et(this,To).mutations,...(r==null?void 0:r.mutationKey)&&this.getMutationDefaults(r.mutationKey),...r,_defaulted:!0}}clear(){et(this,zr).clear(),et(this,So).clear()}},zr=new WeakMap,So=new WeakMap,To=new WeakMap,Xc=new WeakMap,Zc=new WeakMap,Eo=new WeakMap,Qc=new WeakMap,Jc=new WeakMap,MN),PN=K.createContext(void 0),Ln=r=>{const e=K.useContext(PN);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},I4=({client:r,children:e})=>(K.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]),x.jsx(PN.Provider,{value:r,children:e})),qN=K.createContext(!1),$4=()=>K.useContext(qN);qN.Provider;function z4(){let r=!1;return{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r}}var P4=K.createContext(z4()),q4=()=>K.useContext(P4),U4=(r,e,i)=>{const n=i!=null&&i.state.error&&typeof r.throwOnError=="function"?h1(r.throwOnError,[i.state.error,i]):r.throwOnError;(r.suspense||r.experimental_prefetchInRender||n)&&(e.isReset()||(r.retryOnMount=!1))},H4=r=>{K.useEffect(()=>{r.clearReset()},[r])},G4=({result:r,errorResetBoundary:e,throwOnError:i,query:n,suspense:a})=>r.isError&&!e.isReset()&&!r.isFetching&&n&&(a&&r.data===void 0||h1(i,[r.error,n])),W4=r=>{if(r.suspense){const i=a=>a==="static"?a:Math.max(a??1e3,1e3),n=r.staleTime;r.staleTime=typeof n=="function"?(...a)=>i(n(...a)):i(n),typeof r.gcTime=="number"&&(r.gcTime=Math.max(r.gcTime,1e3))}},Y4=(r,e)=>r.isLoading&&r.isFetching&&!e,V4=(r,e)=>(r==null?void 0:r.suspense)&&e.isPending,q2=(r,e,i)=>e.fetchOptimistic(r).catch(()=>{i.clearReset()});function K4(r,e,i){var b,m,v,_;const n=$4(),a=q4(),o=Ln(),c=o.defaultQueryOptions(r);(m=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||m.call(b,c);const h=o.getQueryCache().get(c.queryHash);c._optimisticResults=n?"isRestoring":"optimistic",W4(c),U4(c,a,h),H4(a);const u=!o.getQueryCache().get(c.queryHash),[d]=K.useState(()=>new e(o,c)),f=d.getOptimisticResult(c),g=!n&&r.subscribed!==!1;if(K.useSyncExternalStore(K.useCallback(C=>{const w=g?d.subscribe(li.batchCalls(C)):Wi;return d.updateResult(),w},[d,g]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),K.useEffect(()=>{d.setOptions(c)},[c,d]),V4(c,f))throw q2(c,d,a);if(G4({result:f,errorResetBoundary:a,throwOnError:c.throwOnError,query:h,suspense:c.suspense}))throw f.error;if((_=(v=o.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||_.call(v,c,f),c.experimental_prefetchInRender&&!Nl&&Y4(f,n)){const C=u?q2(c,d,a):h==null?void 0:h.promise;C==null||C.catch(Wi).finally(()=>{d.updateResult()})}return c.notifyOnChangeProps?f:d.trackResult(f)}function mi(r,e){return K4(r,N4)}function Va(r,e){const i=Ln(),[n]=K.useState(()=>new D4(i,r));K.useEffect(()=>{n.setOptions(r)},[n,r]);const a=K.useSyncExternalStore(K.useCallback(c=>n.subscribe(li.batchCalls(c)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=K.useCallback((c,h)=>{n.mutate(c,h).catch(Wi)},[n]);if(a.error&&h1(n.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}const UN=K.createContext(null);function HN(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function U2(r){return r==="system"?HN():r}function X4({children:r}){const[e,i]=K.useState(()=>localStorage.getItem("dreamcontext-theme")||"system"),[n,a]=K.useState(()=>U2(e)),o=c=>{i(c),localStorage.setItem("dreamcontext-theme",c)};return K.useEffect(()=>{const c=U2(e);a(c),document.documentElement.setAttribute("data-theme",c)},[e]),K.useEffect(()=>{if(e!=="system")return;const c=window.matchMedia("(prefers-color-scheme: dark)"),h=()=>{const u=HN();a(u),document.documentElement.setAttribute("data-theme",u)};return c.addEventListener("change",h),()=>c.removeEventListener("change",h)},[e]),x.jsx(UN.Provider,{value:{theme:e,resolved:n,setTheme:o},children:r})}function Fd(){const r=K.useContext(UN);if(!r)throw new Error("useTheme must be used within ThemeProvider");return r}const Z4={en:{"nav.brain":"Brain","nav.tasks":"Tasks","nav.core":"Core Files","nav.knowledge":"Knowledge","nav.features":"Features","nav.sleep":"Sleep State","nav.council":"Council","nav.settings":"Settings","nav.packs":"Packs","nav.about":"What is this?","nav.group.workspace":"Workspace","nav.group.control":"Control Panel","nav.collapse":"Collapse","nav.expand":"Expand","council.title":"Council","council.tab.verdict":"Verdict","council.tab.matrix":"Matrix","council.tab.transcript":"Transcript","council.search.placeholder":"Search sessions…","council.search.matrix":"Filter cells by text…","council.search.transcript":"Search transcript…","council.filter.all":"All","council.filter.status":"Status","council.inspector.empty":"Select a persona or cell to inspect.","council.inspector.selectCell":"Select a cell in the matrix for round details.","council.verdict.awaitingSynthesis":"Awaiting synthesis","council.verdict.synthPending":"The final report will appear here once the synthesizer runs.","council.empty.list":"No council sessions yet.","council.empty.detail":"Select a council session from the list.","tasks.title":"Tasks","tasks.create":"New Task","tasks.filter":"Filter","tasks.todo":"To Do","tasks.in_progress":"In Progress","tasks.in_review":"In Review","tasks.completed":"Completed","tasks.name":"Task Name","tasks.description":"Description","tasks.priority":"Priority","tasks.tags":"Tags","tasks.save":"Create Task","tasks.cancel":"Cancel","tasks.changelog":"Changelog","tasks.add_entry":"Add Entry","rice.title":"RICE","rice.reach":"Reach","rice.impact":"Impact","rice.confidence":"Confidence","rice.effort":"Effort","rice.score":"Score","rice.clear":"Clear RICE","rice.tooltip.reach":"How many people / sessions / units affected (1–10)","rice.tooltip.impact":"How much per affected unit (1=minimal, 5=massive)","rice.tooltip.confidence":"How sure are you? (25, 50, 75, 100)","rice.tooltip.effort":"Person-weeks (0.5–8 typical, max 52)","rice.empty":"Not rated","sort.rice":"RICE score","filter.min_rice":"Min RICE","priority.critical":"Critical","priority.high":"High","priority.medium":"Medium","priority.low":"Low","sleep.title":"Sleep State","sleep.debt":"Debt","sleep.level":"Level","sleep.last_sleep":"Last Sleep","sleep.sessions":"Sessions","sleep.alert":"Alert","sleep.drowsy":"Drowsy","sleep.sleepy":"Sleepy","sleep.must_sleep":"Must Sleep","sleep.changelog":"Changelog","sleep.changelog.pending":"Will fold into next sleep","sleep.changelog.breaking":"BREAKING","sleep.changelog.earlier":"earlier entries not shown","core.title":"Core Files","knowledge.title":"Knowledge","knowledge.pin":"Pin","knowledge.unpin":"Unpin","knowledge.search":"Search knowledge...","features.title":"Features","features.search":"Search features...","settings.title":"Settings","settings.platforms":"Platforms","settings.save":"Save","settings.saving":"Saving...","settings.saved":"Saved","settings.no_config":"No configuration file found. Saving will create one with your selections.","settings.platform.claude":"Claude (Anthropic)","settings.platform.codex":"Codex (OpenAI)","settings.packs.installed":"Installed","settings.memory":"Memory","settings.native_memory.label":"Disable Claude's native memory","settings.native_memory.hint":"Recommended — dreamcontext becomes the single source of project memory instead of Claude Code’s built-in MEMORY.md.","packs.title":"Skill Packs","packs.section.packs":"Packs","packs.section.standalone":"Standalone Skills","packs.detail.base":"Base Skill","packs.detail.subskills":"Sub-Skills","packs.detail.agents":"Related Agents","packs.detail.close":"Close","packs.action.install":"Install","packs.action.remove":"Remove","packs.action.installing":"Installing…","packs.action.removing":"Removing…","packs.action.error":"Action failed","update.available":"Update available","update.title":"Update Available","update.dismiss":"Dismiss","update.managePacks":"Manage packs →","common.loading":"Loading...","common.error":"Error","common.empty":"Nothing here yet.","common.close":"Close"}},GN=K.createContext(null);function Q4({children:r}){const[e,i]=K.useState("en"),n=a=>{var o;return((o=Z4[e])==null?void 0:o[a])??a};return x.jsx(GN.Provider,{value:{locale:e,setLocale:i,t:n},children:r})}function Pr(){const r=K.useContext(GN);if(!r)throw new Error("useI18n must be used within I18nProvider");return r}const J4="/api";class tI{async request(e,i){const n=await fetch(`${J4}${e}`,{...i,headers:{"Content-Type":"application/json",...i==null?void 0:i.headers}});if(!n.ok){let a=`Request failed: ${n.status}`;try{const o=await n.json();o.message&&(a=o.message)}catch{}throw new Error(a)}return await n.json()}get(e){return this.request(e)}post(e,i){return this.request(e,{method:"POST",body:JSON.stringify(i)})}patch(e,i){return this.request(e,{method:"PATCH",body:JSON.stringify(i)})}put(e,i){return this.request(e,{method:"PUT",body:JSON.stringify(i)})}del(e){return this.request(e,{method:"DELETE"})}}const cr=new tI,WN=K.createContext({projectId:"",contextRoot:""});function eI(r){let e=0;for(let i=0;i<r.length;i++)e=(e<<5)-e+r.charCodeAt(i)|0;return Math.abs(e).toString(36)}function rI({children:r}){const[e,i]=K.useState({kind:"loading"});return K.useEffect(()=>{cr.get("/health").then(n=>{i({kind:"ready",value:{contextRoot:n.contextRoot,projectId:eI(n.contextRoot)}})}).catch(()=>{i({kind:"ready",value:{projectId:"",contextRoot:""}})})},[]),e.kind==="loading"?x.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100vh",color:"var(--color-text-secondary, #888)",fontSize:"14px"},children:"Loading project…"}):x.jsx(WN.Provider,{value:e.value,children:r})}function YN(){return K.useContext(WN)}function VN(r){return r<=3?"Alert":r<=6?"Drowsy":r<=9?"Sleepy":"Must Sleep"}function KN(r){return r<=3?"alert":r<=6?"drowsy":r<=9?"sleepy":"must_sleep"}function XN(){return mi({queryKey:["sleep"],queryFn:()=>cr.get("/sleep")})}function iI(){return mi({queryKey:["version-check"],queryFn:()=>cr.get("/version-check")})}function f1(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ql=f1();function ZN(r){ql=r}var ed={exec:()=>null};function ar(r,e=""){let i=typeof r=="string"?r:r.source;const n={replace:(a,o)=>{let c=typeof o=="string"?o:o.source;return c=c.replace(Vi.caret,"$1"),i=i.replace(a,c),n},getRegex:()=>new RegExp(i,e)};return n}var Vi={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:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},nI=/^(?:[ \t]*(?:\n|$))+/,aI=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,sI=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,jd=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,oI=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,p1=/(?:[*+-]|\d{1,9}[.)])/,QN=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,JN=ar(QN).replace(/bull/g,p1).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(),lI=ar(QN).replace(/bull/g,p1).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(),g1=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,cI=/^[^\n]+/,m1=/(?!\s*\])(?:\\.|[^\[\]\\])+/,hI=ar(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",m1).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),uI=ar(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,p1).getRegex(),Vg="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",y1=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,dI=ar("^ {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",y1).replace("tag",Vg).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),tM=ar(g1).replace("hr",jd).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",Vg).getRegex(),fI=ar(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",tM).getRegex(),b1={blockquote:fI,code:aI,def:hI,fences:sI,heading:oI,hr:jd,html:dI,lheading:JN,list:uI,newline:nI,paragraph:tM,table:ed,text:cI},H2=ar("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",jd).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",Vg).getRegex(),pI={...b1,lheading:lI,table:H2,paragraph:ar(g1).replace("hr",jd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",H2).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",Vg).getRegex()},gI={...b1,html:ar(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",y1).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:ed,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ar(g1).replace("hr",jd).replace("heading",` *#{1,6} *[^
51
+ ]`).replace("lheading",JN).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},mI=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,yI=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,eM=/^( {2,}|\\)\n(?!\s*$)/,bI=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Kg=/[\p{P}\p{S}]/u,x1=/[\s\p{P}\p{S}]/u,rM=/[^\s\p{P}\p{S}]/u,xI=ar(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,x1).getRegex(),iM=/(?!~)[\p{P}\p{S}]/u,vI=/(?!~)[\s\p{P}\p{S}]/u,_I=/(?:[^\s\p{P}\p{S}]|~)/u,CI=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,nM=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,kI=ar(nM,"u").replace(/punct/g,Kg).getRegex(),wI=ar(nM,"u").replace(/punct/g,iM).getRegex(),aM="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",SI=ar(aM,"gu").replace(/notPunctSpace/g,rM).replace(/punctSpace/g,x1).replace(/punct/g,Kg).getRegex(),TI=ar(aM,"gu").replace(/notPunctSpace/g,_I).replace(/punctSpace/g,vI).replace(/punct/g,iM).getRegex(),EI=ar("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,rM).replace(/punctSpace/g,x1).replace(/punct/g,Kg).getRegex(),AI=ar(/\\(punct)/,"gu").replace(/punct/g,Kg).getRegex(),NI=ar(/^<(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(),MI=ar(y1).replace("(?:-->|$)","-->").getRegex(),BI=ar("^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",MI).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),eg=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,LI=ar(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",eg).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),sM=ar(/^!?\[(label)\]\[(ref)\]/).replace("label",eg).replace("ref",m1).getRegex(),oM=ar(/^!?\[(ref)\](?:\[\])?/).replace("ref",m1).getRegex(),OI=ar("reflink|nolink(?!\\()","g").replace("reflink",sM).replace("nolink",oM).getRegex(),v1={_backpedal:ed,anyPunctuation:AI,autolink:NI,blockSkip:CI,br:eM,code:yI,del:ed,emStrongLDelim:kI,emStrongRDelimAst:SI,emStrongRDelimUnd:EI,escape:mI,link:LI,nolink:oM,punctuation:xI,reflink:sM,reflinkSearch:OI,tag:BI,text:bI,url:ed},RI={...v1,link:ar(/^!?\[(label)\]\((.*?)\)/).replace("label",eg).getRegex(),reflink:ar(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",eg).getRegex()},Bx={...v1,emStrongRDelimAst:TI,emStrongLDelim:wI,url:ar(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},DI={...Bx,br:ar(eM).replace("{2,}","*").getRegex(),text:ar(Bx.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},up={normal:b1,gfm:pI,pedantic:gI},bu={normal:v1,gfm:Bx,breaks:DI,pedantic:RI},FI={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},G2=r=>FI[r];function La(r,e){if(e){if(Vi.escapeTest.test(r))return r.replace(Vi.escapeReplace,G2)}else if(Vi.escapeTestNoEncode.test(r))return r.replace(Vi.escapeReplaceNoEncode,G2);return r}function W2(r){try{r=encodeURI(r).replace(Vi.percentDecode,"%")}catch{return null}return r}function Y2(r,e){var o;const i=r.replace(Vi.findPipe,(c,h,u)=>{let d=!1,f=h;for(;--f>=0&&u[f]==="\\";)d=!d;return d?"|":" |"}),n=i.split(Vi.splitPipe);let a=0;if(n[0].trim()||n.shift(),n.length>0&&!((o=n.at(-1))!=null&&o.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(Vi.slashPipe,"|");return n}function xu(r,e,i){const n=r.length;if(n===0)return"";let a=0;for(;a<n&&r.charAt(n-a-1)===e;)a++;return r.slice(0,n-a)}function jI(r,e){if(r.indexOf(e[1])===-1)return-1;let i=0;for(let n=0;n<r.length;n++)if(r[n]==="\\")n++;else if(r[n]===e[0])i++;else if(r[n]===e[1]&&(i--,i<0))return n;return i>0?-2:-1}function V2(r,e,i,n,a){const o=e.href,c=e.title||null,h=r[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;const u={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:o,title:c,text:h,tokens:n.inlineTokens(h)};return n.state.inLink=!1,u}function II(r,e,i){const n=r.match(i.other.indentCodeCompensation);if(n===null)return e;const a=n[1];return e.split(`
52
+ `).map(o=>{const c=o.match(i.other.beginningSpace);if(c===null)return o;const[h]=c;return h.length>=a.length?o.slice(a.length):o}).join(`
53
+ `)}var rg=class{constructor(r){ne(this,"options");ne(this,"rules");ne(this,"lexer");this.options=r||ql}space(r){const e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){const e=this.rules.block.code.exec(r);if(e){const i=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?i:xu(i,`
54
+ `)}}}fences(r){const e=this.rules.block.fences.exec(r);if(e){const i=e[0],n=II(i,e[3]||"",this.rules);return{type:"code",raw:i,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(r){const e=this.rules.block.heading.exec(r);if(e){let i=e[2].trim();if(this.rules.other.endingHash.test(i)){const n=xu(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(r){const e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:xu(e[0],`
55
+ `)}}blockquote(r){const e=this.rules.block.blockquote.exec(r);if(e){let i=xu(e[0],`
56
+ `).split(`
57
+ `),n="",a="";const o=[];for(;i.length>0;){let c=!1;const h=[];let u;for(u=0;u<i.length;u++)if(this.rules.other.blockquoteStart.test(i[u]))h.push(i[u]),c=!0;else if(!c)h.push(i[u]);else break;i=i.slice(u);const d=h.join(`
58
+ `),f=d.replace(this.rules.other.blockquoteSetextReplace,`
59
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
60
+ ${d}`:d,a=a?`${a}
61
+ ${f}`:f;const g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,o,!0),this.lexer.state.top=g,i.length===0)break;const b=o.at(-1);if((b==null?void 0:b.type)==="code")break;if((b==null?void 0:b.type)==="blockquote"){const m=b,v=m.raw+`
62
+ `+i.join(`
63
+ `),_=this.blockquote(v);o[o.length-1]=_,n=n.substring(0,n.length-m.raw.length)+_.raw,a=a.substring(0,a.length-m.text.length)+_.text;break}else if((b==null?void 0:b.type)==="list"){const m=b,v=m.raw+`
64
+ `+i.join(`
65
+ `),_=this.list(v);o[o.length-1]=_,n=n.substring(0,n.length-b.raw.length)+_.raw,a=a.substring(0,a.length-m.raw.length)+_.raw,i=v.substring(o.at(-1).raw.length).split(`
66
+ `);continue}}return{type:"blockquote",raw:n,tokens:o,text:a}}}list(r){let e=this.rules.block.list.exec(r);if(e){let i=e[1].trim();const n=i.length>1,a={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");const o=this.rules.other.listItemRegex(i);let c=!1;for(;r;){let u=!1,d="",f="";if(!(e=o.exec(r))||this.rules.block.hr.test(r))break;d=e[0],r=r.substring(d.length);let g=e[2].split(`
67
+ `,1)[0].replace(this.rules.other.listReplaceTabs,w=>" ".repeat(3*w.length)),b=r.split(`
68
+ `,1)[0],m=!g.trim(),v=0;if(this.options.pedantic?(v=2,f=g.trimStart()):m?v=e[1].length+1:(v=e[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,f=g.slice(v),v+=e[1].length),m&&this.rules.other.blankLine.test(b)&&(d+=b+`
69
+ `,r=r.substring(b.length+1),u=!0),!u){const w=this.rules.other.nextBulletRegex(v),T=this.rules.other.hrRegex(v),E=this.rules.other.fencesBeginRegex(v),N=this.rules.other.headingBeginRegex(v),O=this.rules.other.htmlBeginRegex(v);for(;r;){const B=r.split(`
70
+ `,1)[0];let A;if(b=B,this.options.pedantic?(b=b.replace(this.rules.other.listReplaceNesting," "),A=b):A=b.replace(this.rules.other.tabCharGlobal," "),E.test(b)||N.test(b)||O.test(b)||w.test(b)||T.test(b))break;if(A.search(this.rules.other.nonSpaceChar)>=v||!b.trim())f+=`
71
+ `+A.slice(v);else{if(m||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(g)||N.test(g)||T.test(g))break;f+=`
72
+ `+b}!m&&!b.trim()&&(m=!0),d+=B+`
73
+ `,r=r.substring(B.length+1),g=A.slice(v)}}a.loose||(c?a.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(c=!0));let _=null,C;this.options.gfm&&(_=this.rules.other.listIsTask.exec(f),_&&(C=_[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:d,task:!!_,checked:C,loose:!1,text:f,tokens:[]}),a.raw+=d}const h=a.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let u=0;u<a.items.length;u++)if(this.lexer.state.top=!1,a.items[u].tokens=this.lexer.blockTokens(a.items[u].text,[]),!a.loose){const d=a.items[u].tokens.filter(g=>g.type==="space"),f=d.length>0&&d.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=f}if(a.loose)for(let u=0;u<a.items.length;u++)a.items[u].loose=!0;return a}}html(r){const e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(r){const e=this.rules.block.def.exec(r);if(e){const i=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:i,raw:e[0],href:n,title:a}}}table(r){var c;const e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const i=Y2(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(c=e[3])!=null&&c.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
74
+ `):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(i.length===n.length){for(const h of n)this.rules.other.tableAlignRight.test(h)?o.align.push("right"):this.rules.other.tableAlignCenter.test(h)?o.align.push("center"):this.rules.other.tableAlignLeft.test(h)?o.align.push("left"):o.align.push(null);for(let h=0;h<i.length;h++)o.header.push({text:i[h],tokens:this.lexer.inline(i[h]),header:!0,align:o.align[h]});for(const h of a)o.rows.push(Y2(h,o.header.length).map((u,d)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:o.align[d]})));return o}}lheading(r){const e=this.rules.block.lheading.exec(r);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(r){const e=this.rules.block.paragraph.exec(r);if(e){const i=e[1].charAt(e[1].length-1)===`
75
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:i,tokens:this.lexer.inline(i)}}}text(r){const e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){const e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){const e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){const e=this.rules.inline.link.exec(r);if(e){const i=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;const o=xu(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{const o=jI(e[2],"()");if(o===-2)return;if(o>-1){const h=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,h).trim(),e[3]=""}}let n=e[2],a="";if(this.options.pedantic){const o=this.rules.other.pedanticHrefTitle.exec(n);o&&(n=o[1],a=o[3])}else a=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),V2(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let i;if((i=this.rules.inline.reflink.exec(r))||(i=this.rules.inline.nolink.exec(r))){const n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=e[n.toLowerCase()];if(!a){const o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return V2(i,a,i[0],this.lexer,this.rules)}}emStrong(r,e,i=""){let n=this.rules.inline.emStrongLDelim.exec(r);if(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))return;if(!(n[1]||n[2]||"")||!i||this.rules.inline.punctuation.exec(i)){const o=[...n[0]].length-1;let c,h,u=o,d=0;const f=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,e=e.slice(-1*r.length+o);(n=f.exec(e))!=null;){if(c=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!c)continue;if(h=[...c].length,n[3]||n[4]){u+=h;continue}else if((n[5]||n[6])&&o%3&&!((o+h)%3)){d+=h;continue}if(u-=h,u>0)continue;h=Math.min(h,h+u+d);const g=[...n[0]][0].length,b=r.slice(0,o+n.index+g+h);if(Math.min(o,h)%2){const v=b.slice(1,-1);return{type:"em",raw:b,text:v,tokens:this.lexer.inlineTokens(v)}}const m=b.slice(2,-2);return{type:"strong",raw:b,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(r){const e=this.rules.inline.code.exec(r);if(e){let i=e[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:e[0],text:i}}}br(r){const e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r){const e=this.rules.inline.del.exec(r);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){const e=this.rules.inline.autolink.exec(r);if(e){let i,n;return e[2]==="@"?(i=e[1],n="mailto:"+i):(i=e[1],n=i),{type:"link",raw:e[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(r){var i;let e;if(e=this.rules.inline.url.exec(r)){let n,a;if(e[2]==="@")n=e[0],a="mailto:"+n;else{let o;do o=e[0],e[0]=((i=this.rules.inline._backpedal.exec(e[0]))==null?void 0:i[0])??"";while(o!==e[0]);n=e[0],e[1]==="www."?a="http://"+e[0]:a=e[0]}return{type:"link",raw:e[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(r){const e=this.rules.inline.text.exec(r);if(e){const i=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:i}}}},Es=class Lx{constructor(e){ne(this,"tokens");ne(this,"options");ne(this,"state");ne(this,"tokenizer");ne(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ql,this.options.tokenizer=this.options.tokenizer||new rg,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const i={other:Vi,block:up.normal,inline:bu.normal};this.options.pedantic?(i.block=up.pedantic,i.inline=bu.pedantic):this.options.gfm&&(i.block=up.gfm,this.options.breaks?i.inline=bu.breaks:i.inline=bu.gfm),this.tokenizer.rules=i}static get rules(){return{block:up,inline:bu}}static lex(e,i){return new Lx(i).lex(e)}static lexInline(e,i){return new Lx(i).inlineTokens(e)}lex(e){e=e.replace(Vi.carriageReturn,`
76
+ `),this.blockTokens(e,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){const n=this.inlineQueue[i];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,i=[],n=!1){var a,o,c;for(this.options.pedantic&&(e=e.replace(Vi.tabCharGlobal," ").replace(Vi.spaceLine,""));e;){let h;if((o=(a=this.options.extensions)==null?void 0:a.block)!=null&&o.some(d=>(h=d.call({lexer:this},e,i))?(e=e.substring(h.raw.length),i.push(h),!0):!1))continue;if(h=this.tokenizer.space(e)){e=e.substring(h.raw.length);const d=i.at(-1);h.raw.length===1&&d!==void 0?d.raw+=`
77
+ `:i.push(h);continue}if(h=this.tokenizer.code(e)){e=e.substring(h.raw.length);const d=i.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
78
+ `+h.raw,d.text+=`
79
+ `+h.text,this.inlineQueue.at(-1).src=d.text):i.push(h);continue}if(h=this.tokenizer.fences(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.heading(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.hr(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.blockquote(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.list(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.html(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.def(e)){e=e.substring(h.raw.length);const d=i.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
80
+ `+h.raw,d.text+=`
81
+ `+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});continue}if(h=this.tokenizer.table(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.lheading(e)){e=e.substring(h.raw.length),i.push(h);continue}let u=e;if((c=this.options.extensions)!=null&&c.startBlock){let d=1/0;const f=e.slice(1);let g;this.options.extensions.startBlock.forEach(b=>{g=b.call({lexer:this},f),typeof g=="number"&&g>=0&&(d=Math.min(d,g))}),d<1/0&&d>=0&&(u=e.substring(0,d+1))}if(this.state.top&&(h=this.tokenizer.paragraph(u))){const d=i.at(-1);n&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=`
82
+ `+h.raw,d.text+=`
83
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):i.push(h),n=u.length!==e.length,e=e.substring(h.raw.length);continue}if(h=this.tokenizer.text(e)){e=e.substring(h.raw.length);const d=i.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=`
84
+ `+h.raw,d.text+=`
85
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):i.push(h);continue}if(e){const d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,i}inline(e,i=[]){return this.inlineQueue.push({src:e,tokens:i}),i}inlineTokens(e,i=[]){var h,u,d;let n=e,a=null;if(this.tokens.links){const f=Object.keys(this.tokens.links);if(f.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)f.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let o=!1,c="";for(;e;){o||(c=""),o=!1;let f;if((u=(h=this.options.extensions)==null?void 0:h.inline)!=null&&u.some(b=>(f=b.call({lexer:this},e,i))?(e=e.substring(f.raw.length),i.push(f),!0):!1))continue;if(f=this.tokenizer.escape(e)){e=e.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.tag(e)){e=e.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.link(e)){e=e.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(f.raw.length);const b=i.at(-1);f.type==="text"&&(b==null?void 0:b.type)==="text"?(b.raw+=f.raw,b.text+=f.text):i.push(f);continue}if(f=this.tokenizer.emStrong(e,n,c)){e=e.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.codespan(e)){e=e.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.br(e)){e=e.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.del(e)){e=e.substring(f.raw.length),i.push(f);continue}if(f=this.tokenizer.autolink(e)){e=e.substring(f.raw.length),i.push(f);continue}if(!this.state.inLink&&(f=this.tokenizer.url(e))){e=e.substring(f.raw.length),i.push(f);continue}let g=e;if((d=this.options.extensions)!=null&&d.startInline){let b=1/0;const m=e.slice(1);let v;this.options.extensions.startInline.forEach(_=>{v=_.call({lexer:this},m),typeof v=="number"&&v>=0&&(b=Math.min(b,v))}),b<1/0&&b>=0&&(g=e.substring(0,b+1))}if(f=this.tokenizer.inlineText(g)){e=e.substring(f.raw.length),f.raw.slice(-1)!=="_"&&(c=f.raw.slice(-1)),o=!0;const b=i.at(-1);(b==null?void 0:b.type)==="text"?(b.raw+=f.raw,b.text+=f.text):i.push(f);continue}if(e){const b="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(b);break}else throw new Error(b)}}return i}},ig=class{constructor(r){ne(this,"options");ne(this,"parser");this.options=r||ql}space(r){return""}code({text:r,lang:e,escaped:i}){var o;const n=(o=(e||"").match(Vi.notSpaceStart))==null?void 0:o[0],a=r.replace(Vi.endingNewline,"")+`
86
+ `;return n?'<pre><code class="language-'+La(n)+'">'+(i?a:La(a,!0))+`</code></pre>
87
+ `:"<pre><code>"+(i?a:La(a,!0))+`</code></pre>
88
+ `}blockquote({tokens:r}){return`<blockquote>
89
+ ${this.parser.parse(r)}</blockquote>
90
+ `}html({text:r}){return r}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
91
+ `}hr(r){return`<hr>
92
+ `}list(r){const e=r.ordered,i=r.start;let n="";for(let c=0;c<r.items.length;c++){const h=r.items[c];n+=this.listitem(h)}const a=e?"ol":"ul",o=e&&i!==1?' start="'+i+'"':"";return"<"+a+o+`>
93
+ `+n+"</"+a+`>
94
+ `}listitem(r){var i;let e="";if(r.task){const n=this.checkbox({checked:!!r.checked});r.loose?((i=r.tokens[0])==null?void 0:i.type)==="paragraph"?(r.tokens[0].text=n+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&r.tokens[0].tokens[0].type==="text"&&(r.tokens[0].tokens[0].text=n+" "+La(r.tokens[0].tokens[0].text),r.tokens[0].tokens[0].escaped=!0)):r.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(r.tokens,!!r.loose),`<li>${e}</li>
95
+ `}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
96
+ `}table(r){let e="",i="";for(let a=0;a<r.header.length;a++)i+=this.tablecell(r.header[a]);e+=this.tablerow({text:i});let n="";for(let a=0;a<r.rows.length;a++){const o=r.rows[a];i="";for(let c=0;c<o.length;c++)i+=this.tablecell(o[c]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
97
+ <thead>
98
+ `+e+`</thead>
99
+ `+n+`</table>
100
+ `}tablerow({text:r}){return`<tr>
101
+ ${r}</tr>
102
+ `}tablecell(r){const e=this.parser.parseInline(r.tokens),i=r.header?"th":"td";return(r.align?`<${i} align="${r.align}">`:`<${i}>`)+e+`</${i}>
103
+ `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${La(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:i}){const n=this.parser.parseInline(i),a=W2(r);if(a===null)return n;r=a;let o='<a href="'+r+'"';return e&&(o+=' title="'+La(e)+'"'),o+=">"+n+"</a>",o}image({href:r,title:e,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));const a=W2(r);if(a===null)return La(i);r=a;let o=`<img src="${r}" alt="${i}"`;return e&&(o+=` title="${La(e)}"`),o+=">",o}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:La(r.text)}},_1=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},As=class Ox{constructor(e){ne(this,"options");ne(this,"renderer");ne(this,"textRenderer");this.options=e||ql,this.options.renderer=this.options.renderer||new ig,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new _1}static parse(e,i){return new Ox(i).parse(e)}static parseInline(e,i){return new Ox(i).parseInline(e)}parse(e,i=!0){var a,o;let n="";for(let c=0;c<e.length;c++){const h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){const d=h,f=this.options.extensions.renderers[d.type].call({parser:this},d);if(f!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)){n+=f||"";continue}}const u=h;switch(u.type){case"space":{n+=this.renderer.space(u);continue}case"hr":{n+=this.renderer.hr(u);continue}case"heading":{n+=this.renderer.heading(u);continue}case"code":{n+=this.renderer.code(u);continue}case"table":{n+=this.renderer.table(u);continue}case"blockquote":{n+=this.renderer.blockquote(u);continue}case"list":{n+=this.renderer.list(u);continue}case"html":{n+=this.renderer.html(u);continue}case"paragraph":{n+=this.renderer.paragraph(u);continue}case"text":{let d=u,f=this.renderer.text(d);for(;c+1<e.length&&e[c+1].type==="text";)d=e[++c],f+=`
104
+ `+this.renderer.text(d);i?n+=this.renderer.paragraph({type:"paragraph",raw:f,text:f,tokens:[{type:"text",raw:f,text:f,escaped:!0}]}):n+=f;continue}default:{const d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}parseInline(e,i=this.renderer){var a,o;let n="";for(let c=0;c<e.length;c++){const h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){const 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)){n+=d||"";continue}}const u=h;switch(u.type){case"escape":{n+=i.text(u);break}case"html":{n+=i.html(u);break}case"link":{n+=i.link(u);break}case"image":{n+=i.image(u);break}case"strong":{n+=i.strong(u);break}case"em":{n+=i.em(u);break}case"codespan":{n+=i.codespan(u);break}case"br":{n+=i.br(u);break}case"del":{n+=i.del(u);break}case"text":{n+=i.text(u);break}default:{const d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}},mx,jp=(mx=class{constructor(r){ne(this,"options");ne(this,"block");this.options=r||ql}preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}provideLexer(){return this.block?Es.lex:Es.lexInline}provideParser(){return this.block?As.parse:As.parseInline}},ne(mx,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),mx),$I=class{constructor(...r){ne(this,"defaults",f1());ne(this,"options",this.setOptions);ne(this,"parse",this.parseMarkdown(!0));ne(this,"parseInline",this.parseMarkdown(!1));ne(this,"Parser",As);ne(this,"Renderer",ig);ne(this,"TextRenderer",_1);ne(this,"Lexer",Es);ne(this,"Tokenizer",rg);ne(this,"Hooks",jp);this.use(...r)}walkTokens(r,e){var n,a;let i=[];for(const o of r)switch(i=i.concat(e.call(this,o)),o.type){case"table":{const c=o;for(const h of c.header)i=i.concat(this.walkTokens(h.tokens,e));for(const h of c.rows)for(const u of h)i=i.concat(this.walkTokens(u.tokens,e));break}case"list":{const c=o;i=i.concat(this.walkTokens(c.items,e));break}default:{const c=o;(a=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&a[c.type]?this.defaults.extensions.childTokens[c.type].forEach(h=>{const u=c[h].flat(1/0);i=i.concat(this.walkTokens(u,e))}):c.tokens&&(i=i.concat(this.walkTokens(c.tokens,e)))}}return i}use(...r){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(i=>{const n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const o=e.renderers[a.name];o?e.renderers[a.name]=function(...c){let h=a.renderer.apply(this,c);return h===!1&&(h=o.apply(this,c)),h}:e.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=e[a.level];o?o.unshift(a.tokenizer):e[a.level]=[a.tokenizer],a.start&&(a.level==="block"?e.startBlock?e.startBlock.push(a.start):e.startBlock=[a.start]:a.level==="inline"&&(e.startInline?e.startInline.push(a.start):e.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(e.childTokens[a.name]=a.childTokens)}),n.extensions=e),i.renderer){const a=this.defaults.renderer||new ig(this.defaults);for(const o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const c=o,h=i.renderer[c],u=a[c];a[c]=(...d)=>{let f=h.apply(a,d);return f===!1&&(f=u.apply(a,d)),f||""}}n.renderer=a}if(i.tokenizer){const a=this.defaults.tokenizer||new rg(this.defaults);for(const o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const c=o,h=i.tokenizer[c],u=a[c];a[c]=(...d)=>{let f=h.apply(a,d);return f===!1&&(f=u.apply(a,d)),f}}n.tokenizer=a}if(i.hooks){const a=this.defaults.hooks||new jp;for(const o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const c=o,h=i.hooks[c],u=a[c];jp.passThroughHooks.has(o)?a[c]=d=>{if(this.defaults.async)return Promise.resolve(h.call(a,d)).then(g=>u.call(a,g));const f=h.call(a,d);return u.call(a,f)}:a[c]=(...d)=>{let f=h.apply(a,d);return f===!1&&(f=u.apply(a,d)),f}}n.hooks=a}if(i.walkTokens){const a=this.defaults.walkTokens,o=i.walkTokens;n.walkTokens=function(c){let h=[];return h.push(o.call(this,c)),a&&(h=h.concat(a.call(this,c))),h}}this.defaults={...this.defaults,...n}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return Es.lex(r,e??this.defaults)}parser(r,e){return As.parse(r,e??this.defaults)}parseMarkdown(r){return(i,n)=>{const a={...n},o={...this.defaults,...a},c=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&a.async===!1)return c(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=r);const h=o.hooks?o.hooks.provideLexer():r?Es.lex:Es.lexInline,u=o.hooks?o.hooks.provideParser():r?As.parse:As.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(i):i).then(d=>h(d,o)).then(d=>o.hooks?o.hooks.processAllTokens(d):d).then(d=>o.walkTokens?Promise.all(this.walkTokens(d,o.walkTokens)).then(()=>d):d).then(d=>u(d,o)).then(d=>o.hooks?o.hooks.postprocess(d):d).catch(c);try{o.hooks&&(i=o.hooks.preprocess(i));let d=h(i,o);o.hooks&&(d=o.hooks.processAllTokens(d)),o.walkTokens&&this.walkTokens(d,o.walkTokens);let f=u(d,o);return o.hooks&&(f=o.hooks.postprocess(f)),f}catch(d){return c(d)}}}onError(r,e){return i=>{if(i.message+=`
105
+ Please report this to https://github.com/markedjs/marked.`,r){const n="<p>An error occurred:</p><pre>"+La(i.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(i);throw i}}},Bl=new $I;function Ce(r,e){return Bl.parse(r,e)}Ce.options=Ce.setOptions=function(r){return Bl.setOptions(r),Ce.defaults=Bl.defaults,ZN(Ce.defaults),Ce};Ce.getDefaults=f1;Ce.defaults=ql;Ce.use=function(...r){return Bl.use(...r),Ce.defaults=Bl.defaults,ZN(Ce.defaults),Ce};Ce.walkTokens=function(r,e){return Bl.walkTokens(r,e)};Ce.parseInline=Bl.parseInline;Ce.Parser=As;Ce.parser=As.parse;Ce.Renderer=ig;Ce.TextRenderer=_1;Ce.Lexer=Es;Ce.lexer=Es.lex;Ce.Tokenizer=rg;Ce.Hooks=jp;Ce.parse=Ce;Ce.options;Ce.setOptions;Ce.use;Ce.walkTokens;Ce.parseInline;As.parse;Es.lex;/*! @license DOMPurify 3.4.7 | (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.7/LICENSE */function K2(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function zI(r){if(Array.isArray(r))return r}function PI(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e!==0)for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function qI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
106
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UI(r,e){return zI(r)||PI(r,e)||HI(r,e)||qI()}function HI(r,e){if(r){if(typeof r=="string")return K2(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?K2(r,e):void 0}}const lM=Object.entries,X2=Object.setPrototypeOf,GI=Object.isFrozen,WI=Object.getPrototypeOf,YI=Object.getOwnPropertyDescriptor;let Zi=Object.freeze,ia=Object.seal,Lc=Object.create,cM=typeof Reflect<"u"&&Reflect,Rx=cM.apply,Dx=cM.construct;Zi||(Zi=function(e){return e});ia||(ia=function(e){return e});Rx||(Rx=function(e,i){for(var n=arguments.length,a=new Array(n>2?n-2:0),o=2;o<n;o++)a[o-2]=arguments[o];return e.apply(i,a)});Dx||(Dx=function(e){for(var i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];return new e(...n)});const kc=ri(Array.prototype.forEach),VI=ri(Array.prototype.lastIndexOf),Z2=ri(Array.prototype.pop),wc=ri(Array.prototype.push),KI=ri(Array.prototype.splice),Hi=Array.isArray,Hu=ri(String.prototype.toLowerCase),R0=ri(String.prototype.toString),Q2=ri(String.prototype.match),Sc=ri(String.prototype.replace),J2=ri(String.prototype.indexOf),XI=ri(String.prototype.trim),ZI=ri(Number.prototype.toString),QI=ri(Boolean.prototype.toString),tS=typeof BigInt>"u"?null:ri(BigInt.prototype.toString),eS=typeof Symbol>"u"?null:ri(Symbol.prototype.toString),$r=ri(Object.prototype.hasOwnProperty),vu=ri(Object.prototype.toString),Ti=ri(RegExp.prototype.test),_u=JI(TypeError);function ri(r){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];return Rx(r,e,n)}}function JI(r){return function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return Dx(r,i)}}function Te(r,e){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Hu;if(X2&&X2(r,null),!Hi(e))return r;let n=e.length;for(;n--;){let a=e[n];if(typeof a=="string"){const o=i(a);o!==a&&(GI(e)||(e[n]=o),a=o)}r[a]=!0}return r}function t6(r){for(let e=0;e<r.length;e++)$r(r,e)||(r[e]=null);return r}function Oi(r){const e=Lc(null);for(const n of lM(r)){var i=UI(n,2);const a=i[0],o=i[1];$r(r,a)&&(Hi(o)?e[a]=t6(o):o&&typeof o=="object"&&o.constructor===Object?e[a]=Oi(o):e[a]=o)}return e}function e6(r){switch(typeof r){case"string":return r;case"number":return ZI(r);case"boolean":return QI(r);case"bigint":return tS?tS(r):"0";case"symbol":return eS?eS(r):"Symbol()";case"undefined":return vu(r);case"function":case"object":{if(r===null)return vu(r);const e=r,i=Oa(e,"toString");if(typeof i=="function"){const n=i(e);return typeof n=="string"?n:vu(n)}return vu(r)}default:return vu(r)}}function Oa(r,e){for(;r!==null;){const n=YI(r,e);if(n){if(n.get)return ri(n.get);if(typeof n.value=="function")return ri(n.value)}r=WI(r)}function i(){return null}return i}function r6(r){try{return Ti(r,""),!0}catch{return!1}}const rS=Zi(["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"]),D0=Zi(["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"]),F0=Zi(["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"]),i6=Zi(["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"]),j0=Zi(["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"]),n6=Zi(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),iS=Zi(["#text"]),nS=Zi(["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"]),I0=Zi(["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"]),aS=Zi(["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"]),dp=Zi(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),a6=ia(/{{[\w\W]*|^[\w\W]*}}/g),s6=ia(/<%[\w\W]*|^[\w\W]*%>/g),o6=ia(/\${[\w\W]*/g),l6=ia(/^data-[\-\w.\u00B7-\uFFFF]+$/),c6=ia(/^aria-[\-\w]+$/),sS=ia(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),h6=ia(/^(?:\w+script|data):/i),u6=ia(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),d6=ia(/^html$/i),f6=ia(/^[a-z][.\w]*(-[.\w]+)+$/i),Ba={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},p6=function(){return typeof window>"u"?null:window},g6=function(e,i){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const a="data-tt-policy-suffix";i&&i.hasAttribute(a)&&(n=i.getAttribute(a));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},oS=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function hM(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p6();const e=Ht=>hM(Ht);if(e.version="3.4.7",e.removed=[],!r||!r.document||r.document.nodeType!==Ba.document||!r.Element)return e.isSupported=!1,e;let i=r.document;const n=i,a=n.currentScript;r.DocumentFragment;const o=r.HTMLTemplateElement,c=r.Node,h=r.Element,u=r.NodeFilter,d=r.NamedNodeMap;d===void 0&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;const f=r.DOMParser,g=r.trustedTypes,b=h.prototype,m=Oa(b,"cloneNode"),v=Oa(b,"remove"),_=Oa(b,"nextSibling"),C=Oa(b,"childNodes"),w=Oa(b,"parentNode"),T=Oa(b,"shadowRoot"),E=Oa(b,"attributes"),N=c&&c.prototype?Oa(c.prototype,"nodeType"):null,O=c&&c.prototype?Oa(c.prototype,"nodeName"):null;if(typeof o=="function"){const Ht=i.createElement("template");Ht.content&&Ht.content.ownerDocument&&(i=Ht.content.ownerDocument)}let B,A="";const L=i,P=L.implementation,j=L.createNodeIterator,$=L.createDocumentFragment,X=L.getElementsByTagName,W=n.importNode;let F=oS();e.isSupported=typeof lM=="function"&&typeof w=="function"&&P&&P.createHTMLDocument!==void 0;const U=a6,D=s6,z=o6,H=l6,V=c6,Q=h6,G=u6,J=f6;let lt=sS,st=null;const vt=Te({},[...rS,...D0,...F0,...j0,...iS]);let kt=null;const Mt=Te({},[...nS,...I0,...aS,...dp]);let it=Object.seal(Lc(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}})),xt=null,pt=null;const Et=Object.seal(Lc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ut=!0,Gt=!0,ie=!1,Dt=!0,Jt=!1,Le=!0,hr=!1,qr=!1,ve=!1,Ee=!1,Ge=!1,Ar=!1,Me=!0,Nr=!1;const yr="user-content-";let ii=!0,di=!1,$i={},Ur=null;const aa=Te({},["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 sa=null;const Yr=Te({},["audio","video","img","source","image","track"]);let Cr=null;const yi=Te({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),kr="http://www.w3.org/1998/Math/MathML",On="http://www.w3.org/2000/svg",Vr="http://www.w3.org/1999/xhtml";let zi=Vr,Ae=!1,bi=null;const xi=Te({},[kr,On,Vr],R0);let Or=Te({},["mi","mo","mn","ms","mtext"]),tt=Te({},["annotation-xml"]);const _t=Te({},["title","style","font","a","script"]);let Ot=null;const le=["application/xhtml+xml","text/html"],Qe="text/html";let ue=null,Pt=null;const It=i.createElement("form"),se=function(Y){return Y instanceof RegExp||Y instanceof Function},Je=function(){let Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Pt&&Pt===Y)return;(!Y||typeof Y!="object")&&(Y={}),Y=Oi(Y),Ot=le.indexOf(Y.PARSER_MEDIA_TYPE)===-1?Qe:Y.PARSER_MEDIA_TYPE,ue=Ot==="application/xhtml+xml"?R0:Hu,st=$r(Y,"ALLOWED_TAGS")&&Hi(Y.ALLOWED_TAGS)?Te({},Y.ALLOWED_TAGS,ue):vt,kt=$r(Y,"ALLOWED_ATTR")&&Hi(Y.ALLOWED_ATTR)?Te({},Y.ALLOWED_ATTR,ue):Mt,bi=$r(Y,"ALLOWED_NAMESPACES")&&Hi(Y.ALLOWED_NAMESPACES)?Te({},Y.ALLOWED_NAMESPACES,R0):xi,Cr=$r(Y,"ADD_URI_SAFE_ATTR")&&Hi(Y.ADD_URI_SAFE_ATTR)?Te(Oi(yi),Y.ADD_URI_SAFE_ATTR,ue):yi,sa=$r(Y,"ADD_DATA_URI_TAGS")&&Hi(Y.ADD_DATA_URI_TAGS)?Te(Oi(Yr),Y.ADD_DATA_URI_TAGS,ue):Yr,Ur=$r(Y,"FORBID_CONTENTS")&&Hi(Y.FORBID_CONTENTS)?Te({},Y.FORBID_CONTENTS,ue):aa,xt=$r(Y,"FORBID_TAGS")&&Hi(Y.FORBID_TAGS)?Te({},Y.FORBID_TAGS,ue):Oi({}),pt=$r(Y,"FORBID_ATTR")&&Hi(Y.FORBID_ATTR)?Te({},Y.FORBID_ATTR,ue):Oi({}),$i=$r(Y,"USE_PROFILES")?Y.USE_PROFILES&&typeof Y.USE_PROFILES=="object"?Oi(Y.USE_PROFILES):Y.USE_PROFILES:!1,Ut=Y.ALLOW_ARIA_ATTR!==!1,Gt=Y.ALLOW_DATA_ATTR!==!1,ie=Y.ALLOW_UNKNOWN_PROTOCOLS||!1,Dt=Y.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Jt=Y.SAFE_FOR_TEMPLATES||!1,Le=Y.SAFE_FOR_XML!==!1,hr=Y.WHOLE_DOCUMENT||!1,Ee=Y.RETURN_DOM||!1,Ge=Y.RETURN_DOM_FRAGMENT||!1,Ar=Y.RETURN_TRUSTED_TYPE||!1,ve=Y.FORCE_BODY||!1,Me=Y.SANITIZE_DOM!==!1,Nr=Y.SANITIZE_NAMED_PROPS||!1,ii=Y.KEEP_CONTENT!==!1,di=Y.IN_PLACE||!1,lt=r6(Y.ALLOWED_URI_REGEXP)?Y.ALLOWED_URI_REGEXP:sS,zi=typeof Y.NAMESPACE=="string"?Y.NAMESPACE:Vr,Or=$r(Y,"MATHML_TEXT_INTEGRATION_POINTS")&&Y.MATHML_TEXT_INTEGRATION_POINTS&&typeof Y.MATHML_TEXT_INTEGRATION_POINTS=="object"?Oi(Y.MATHML_TEXT_INTEGRATION_POINTS):Te({},["mi","mo","mn","ms","mtext"]),tt=$r(Y,"HTML_INTEGRATION_POINTS")&&Y.HTML_INTEGRATION_POINTS&&typeof Y.HTML_INTEGRATION_POINTS=="object"?Oi(Y.HTML_INTEGRATION_POINTS):Te({},["annotation-xml"]);const bt=$r(Y,"CUSTOM_ELEMENT_HANDLING")&&Y.CUSTOM_ELEMENT_HANDLING&&typeof Y.CUSTOM_ELEMENT_HANDLING=="object"?Oi(Y.CUSTOM_ELEMENT_HANDLING):Lc(null);if(it=Lc(null),$r(bt,"tagNameCheck")&&se(bt.tagNameCheck)&&(it.tagNameCheck=bt.tagNameCheck),$r(bt,"attributeNameCheck")&&se(bt.attributeNameCheck)&&(it.attributeNameCheck=bt.attributeNameCheck),$r(bt,"allowCustomizedBuiltInElements")&&typeof bt.allowCustomizedBuiltInElements=="boolean"&&(it.allowCustomizedBuiltInElements=bt.allowCustomizedBuiltInElements),Jt&&(Gt=!1),Ge&&(Ee=!0),$i&&(st=Te({},iS),kt=Lc(null),$i.html===!0&&(Te(st,rS),Te(kt,nS)),$i.svg===!0&&(Te(st,D0),Te(kt,I0),Te(kt,dp)),$i.svgFilters===!0&&(Te(st,F0),Te(kt,I0),Te(kt,dp)),$i.mathMl===!0&&(Te(st,j0),Te(kt,aS),Te(kt,dp))),Et.tagCheck=null,Et.attributeCheck=null,$r(Y,"ADD_TAGS")&&(typeof Y.ADD_TAGS=="function"?Et.tagCheck=Y.ADD_TAGS:Hi(Y.ADD_TAGS)&&(st===vt&&(st=Oi(st)),Te(st,Y.ADD_TAGS,ue))),$r(Y,"ADD_ATTR")&&(typeof Y.ADD_ATTR=="function"?Et.attributeCheck=Y.ADD_ATTR:Hi(Y.ADD_ATTR)&&(kt===Mt&&(kt=Oi(kt)),Te(kt,Y.ADD_ATTR,ue))),$r(Y,"ADD_URI_SAFE_ATTR")&&Hi(Y.ADD_URI_SAFE_ATTR)&&Te(Cr,Y.ADD_URI_SAFE_ATTR,ue),$r(Y,"FORBID_CONTENTS")&&Hi(Y.FORBID_CONTENTS)&&(Ur===aa&&(Ur=Oi(Ur)),Te(Ur,Y.FORBID_CONTENTS,ue)),$r(Y,"ADD_FORBID_CONTENTS")&&Hi(Y.ADD_FORBID_CONTENTS)&&(Ur===aa&&(Ur=Oi(Ur)),Te(Ur,Y.ADD_FORBID_CONTENTS,ue)),ii&&(st["#text"]=!0),hr&&Te(st,["html","head","body"]),st.table&&(Te(st,["tbody"]),delete xt.tbody),Y.TRUSTED_TYPES_POLICY){if(typeof Y.TRUSTED_TYPES_POLICY.createHTML!="function")throw _u('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Y.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw _u('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');B=Y.TRUSTED_TYPES_POLICY,A=B.createHTML("")}else B===void 0&&(B=g6(g,a)),B!==null&&typeof A=="string"&&(A=B.createHTML(""));(F.uponSanitizeElement.length>0||F.uponSanitizeAttribute.length>0)&&st===vt&&(st=Oi(st)),F.uponSanitizeAttribute.length>0&&kt===Mt&&(kt=Oi(kt)),Zi&&Zi(Y),Pt=Y},sr=Te({},[...D0,...F0,...i6]),en=Te({},[...j0,...n6]),Pi=function(Y){let bt=w(Y);(!bt||!bt.tagName)&&(bt={namespaceURI:zi,tagName:"template"});const ct=Hu(Y.tagName),Bt=Hu(bt.tagName);return bi[Y.namespaceURI]?Y.namespaceURI===On?bt.namespaceURI===Vr?ct==="svg":bt.namespaceURI===kr?ct==="svg"&&(Bt==="annotation-xml"||Or[Bt]):!!sr[ct]:Y.namespaceURI===kr?bt.namespaceURI===Vr?ct==="math":bt.namespaceURI===On?ct==="math"&&tt[Bt]:!!en[ct]:Y.namespaceURI===Vr?bt.namespaceURI===On&&!tt[Bt]||bt.namespaceURI===kr&&!Or[Bt]?!1:!en[ct]&&(_t[ct]||!sr[ct]):!!(Ot==="application/xhtml+xml"&&bi[Y.namespaceURI]):!1},Kr=function(Y){wc(e.removed,{element:Y});try{w(Y).removeChild(Y)}catch{v(Y)}},Xr=function(Y,bt){try{wc(e.removed,{attribute:bt.getAttributeNode(Y),from:bt})}catch{wc(e.removed,{attribute:null,from:bt})}if(bt.removeAttribute(Y),Y==="is")if(Ee||Ge)try{Kr(bt)}catch{}else try{bt.setAttribute(Y,"")}catch{}},pr=function(Y){let bt=null,ct=null;if(ve)Y="<remove></remove>"+Y;else{const te=Q2(Y,/^[\r\n\t ]+/);ct=te&&te[0]}Ot==="application/xhtml+xml"&&zi===Vr&&(Y='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Y+"</body></html>");const Bt=B?B.createHTML(Y):Y;if(zi===Vr)try{bt=new f().parseFromString(Bt,Ot)}catch{}if(!bt||!bt.documentElement){bt=P.createDocument(zi,"template",null);try{bt.documentElement.innerHTML=Ae?A:Bt}catch{}}const Ft=bt.body||bt.documentElement;return Y&&ct&&Ft.insertBefore(i.createTextNode(ct),Ft.childNodes[0]||null),zi===Vr?X.call(bt,hr?"html":"body")[0]:hr?bt.documentElement:Ft},Rr=function(Y){return j.call(Y.ownerDocument||Y,Y,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},yn=function(Y){Y.normalize();const bt=j.call(Y.ownerDocument||Y,Y,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let ct=bt.nextNode();for(;ct;){let Bt=ct.data;kc([U,D,z],Ft=>{Bt=Sc(Bt,Ft," ")}),ct.data=Bt,ct=bt.nextNode()}},Rn=function(Y){const bt=O?O(Y):null;return typeof bt!="string"||ue(bt)!=="form"?!1:typeof Y.nodeName!="string"||typeof Y.textContent!="string"||typeof Y.removeChild!="function"||Y.attributes!==E(Y)||typeof Y.removeAttribute!="function"||typeof Y.setAttribute!="function"||typeof Y.namespaceURI!="string"||typeof Y.insertBefore!="function"||typeof Y.hasChildNodes!="function"||Y.nodeType!==N(Y)||Y.childNodes!==C(Y)},bn=function(Y){if(!N||typeof Y!="object"||Y===null)return!1;try{return N(Y)===Ba.documentFragment}catch{return!1}},xn=function(Y){if(!N||typeof Y!="object"||Y===null)return!1;try{return typeof N(Y)=="number"}catch{return!1}};function vi(Ht,Y,bt){kc(Ht,ct=>{ct.call(e,Y,bt,Pt)})}const Dn=function(Y){let bt=null;if(vi(F.beforeSanitizeElements,Y,null),Rn(Y))return Kr(Y),!0;const ct=ue(Y.nodeName);if(vi(F.uponSanitizeElement,Y,{tagName:ct,allowedTags:st}),Le&&Y.hasChildNodes()&&!xn(Y.firstElementChild)&&Ti(/<[/\w!]/g,Y.innerHTML)&&Ti(/<[/\w!]/g,Y.textContent)||Le&&Y.namespaceURI===Vr&&ct==="style"&&xn(Y.firstElementChild)||Y.nodeType===Ba.progressingInstruction||Le&&Y.nodeType===Ba.comment&&Ti(/<[/\w]/g,Y.data))return Kr(Y),!0;if(xt[ct]||!(Et.tagCheck instanceof Function&&Et.tagCheck(ct))&&!st[ct]){if(!xt[ct]&&qi(ct)&&(it.tagNameCheck instanceof RegExp&&Ti(it.tagNameCheck,ct)||it.tagNameCheck instanceof Function&&it.tagNameCheck(ct)))return!1;if(ii&&!Ur[ct]){const Ft=w(Y),te=C(Y);if(te&&Ft){const Oe=te.length;for(let er=Oe-1;er>=0;--er){const Pe=m(te[er],!0);Ft.insertBefore(Pe,_(Y))}}}return Kr(Y),!0}return(N?N(Y):Y.nodeType)===Ba.element&&!Pi(Y)||(ct==="noscript"||ct==="noembed"||ct==="noframes")&&Ti(/<\/no(script|embed|frames)/i,Y.innerHTML)?(Kr(Y),!0):(Jt&&Y.nodeType===Ba.text&&(bt=Y.textContent,kc([U,D,z],Ft=>{bt=Sc(bt,Ft," ")}),Y.textContent!==bt&&(wc(e.removed,{element:Y.cloneNode()}),Y.textContent=bt)),vi(F.afterSanitizeElements,Y,null),!1)},Ta=function(Y,bt,ct){if(pt[bt]||Me&&(bt==="id"||bt==="name")&&(ct in i||ct in It))return!1;const Bt=kt[bt]||Et.attributeCheck instanceof Function&&Et.attributeCheck(bt,Y);if(!(Gt&&!pt[bt]&&Ti(H,bt))){if(!(Ut&&Ti(V,bt))){if(!Bt||pt[bt]){if(!(qi(Y)&&(it.tagNameCheck instanceof RegExp&&Ti(it.tagNameCheck,Y)||it.tagNameCheck instanceof Function&&it.tagNameCheck(Y))&&(it.attributeNameCheck instanceof RegExp&&Ti(it.attributeNameCheck,bt)||it.attributeNameCheck instanceof Function&&it.attributeNameCheck(bt,Y))||bt==="is"&&it.allowCustomizedBuiltInElements&&(it.tagNameCheck instanceof RegExp&&Ti(it.tagNameCheck,ct)||it.tagNameCheck instanceof Function&&it.tagNameCheck(ct))))return!1}else if(!Cr[bt]){if(!Ti(lt,Sc(ct,G,""))){if(!((bt==="src"||bt==="xlink:href"||bt==="href")&&Y!=="script"&&J2(ct,"data:")===0&&sa[Y])){if(!(ie&&!Ti(Q,Sc(ct,G,"")))){if(ct)return!1}}}}}}return!0},ni=Te({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),qi=function(Y){return!ni[Hu(Y)]&&Ti(J,Y)},rn=function(Y){vi(F.beforeSanitizeAttributes,Y,null);const bt=Y.attributes;if(!bt||Rn(Y))return;const ct={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:kt,forceKeepAttr:void 0};let Bt=bt.length;for(;Bt--;){const Ft=bt[Bt],te=Ft.name,Oe=Ft.namespaceURI,er=Ft.value,Pe=ue(te),Mr=er;let ye=te==="value"?Mr:XI(Mr);if(ct.attrName=Pe,ct.attrValue=ye,ct.keepAttr=!0,ct.forceKeepAttr=void 0,vi(F.uponSanitizeAttribute,Y,ct),ye=ct.attrValue,Nr&&(Pe==="id"||Pe==="name")&&J2(ye,yr)!==0&&(Xr(te,Y),ye=yr+ye),Le&&Ti(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ye)){Xr(te,Y);continue}if(Pe==="attributename"&&Q2(ye,"href")){Xr(te,Y);continue}if(ct.forceKeepAttr)continue;if(!ct.keepAttr){Xr(te,Y);continue}if(!Dt&&Ti(/\/>/i,ye)){Xr(te,Y);continue}Jt&&kc([U,D,z],Fn=>{ye=Sc(ye,Fn," ")});const Dr=ue(Y.nodeName);if(!Ta(Dr,Pe,ye)){Xr(te,Y);continue}if(B&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Oe)switch(g.getAttributeType(Dr,Pe)){case"TrustedHTML":{ye=B.createHTML(ye);break}case"TrustedScriptURL":{ye=B.createScriptURL(ye);break}}if(ye!==Mr)try{Oe?Y.setAttributeNS(Oe,te,ye):Y.setAttribute(te,ye),Rn(Y)?Kr(Y):Z2(e.removed)}catch{Xr(te,Y)}}vi(F.afterSanitizeAttributes,Y,null)},ai=function(Y){let bt=null;const ct=Rr(Y);for(vi(F.beforeSanitizeShadowDOM,Y,null);bt=ct.nextNode();)if(vi(F.uponSanitizeShadowNode,bt,null),Dn(bt),rn(bt),bn(bt.content)&&ai(bt.content),(N?N(bt):bt.nodeType)===Ba.element){const Ft=T?T(bt):bt.shadowRoot;bn(Ft)&&(tr(Ft),ai(Ft))}vi(F.afterSanitizeShadowDOM,Y,null)},tr=function(Y){const bt=N?N(Y):Y.nodeType;if(bt===Ba.element){const Ft=T?T(Y):Y.shadowRoot;bn(Ft)&&(tr(Ft),ai(Ft))}const ct=C?C(Y):Y.childNodes;if(!ct)return;const Bt=[];kc(ct,Ft=>{wc(Bt,Ft)});for(const Ft of Bt)tr(Ft);if(bt===Ba.element){const Ft=O?O(Y):null;if(typeof Ft=="string"&&ue(Ft)==="template"){const te=Y.content;bn(te)&&tr(te)}}};return e.sanitize=function(Ht){let Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},bt=null,ct=null,Bt=null,Ft=null;if(Ae=!Ht,Ae&&(Ht="<!-->"),typeof Ht!="string"&&!xn(Ht)&&(Ht=e6(Ht),typeof Ht!="string"))throw _u("dirty is not a string, aborting");if(!e.isSupported)return Ht;if(qr||Je(Y),e.removed=[],typeof Ht=="string"&&(di=!1),di){const er=O?O(Ht):Ht.nodeName;if(typeof er=="string"){const Pe=ue(er);if(!st[Pe]||xt[Pe])throw _u("root node is forbidden and cannot be sanitized in-place")}if(Rn(Ht))throw _u("root node is clobbered and cannot be sanitized in-place");tr(Ht)}else if(xn(Ht))bt=pr("<!---->"),ct=bt.ownerDocument.importNode(Ht,!0),ct.nodeType===Ba.element&&ct.nodeName==="BODY"||ct.nodeName==="HTML"?bt=ct:bt.appendChild(ct),tr(ct);else{if(!Ee&&!Jt&&!hr&&Ht.indexOf("<")===-1)return B&&Ar?B.createHTML(Ht):Ht;if(bt=pr(Ht),!bt)return Ee?null:Ar?A:""}bt&&ve&&Kr(bt.firstChild);const te=Rr(di?Ht:bt);for(;Bt=te.nextNode();)Dn(Bt),rn(Bt),bn(Bt.content)&&ai(Bt.content);if(di)return Jt&&yn(Ht),Ht;if(Ee){if(Jt&&yn(bt),Ge)for(Ft=$.call(bt.ownerDocument);bt.firstChild;)Ft.appendChild(bt.firstChild);else Ft=bt;return(kt.shadowroot||kt.shadowrootmode)&&(Ft=W.call(n,Ft,!0)),Ft}let Oe=hr?bt.outerHTML:bt.innerHTML;return hr&&st["!doctype"]&&bt.ownerDocument&&bt.ownerDocument.doctype&&bt.ownerDocument.doctype.name&&Ti(d6,bt.ownerDocument.doctype.name)&&(Oe="<!DOCTYPE "+bt.ownerDocument.doctype.name+`>
107
+ `+Oe),Jt&&kc([U,D,z],er=>{Oe=Sc(Oe,er," ")}),B&&Ar?B.createHTML(Oe):Oe},e.setConfig=function(){let Ht=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Je(Ht),qr=!0},e.clearConfig=function(){Pt=null,qr=!1},e.isValidAttribute=function(Ht,Y,bt){Pt||Je({});const ct=ue(Ht),Bt=ue(Y);return Ta(ct,Bt,bt)},e.addHook=function(Ht,Y){typeof Y=="function"&&wc(F[Ht],Y)},e.removeHook=function(Ht,Y){if(Y!==void 0){const bt=VI(F[Ht],Y);return bt===-1?void 0:KI(F[Ht],bt,1)[0]}return Z2(F[Ht])},e.removeHooks=function(Ht){F[Ht]=[]},e.removeAllHooks=function(){F=oS()},e}var Ll=hM();const m6="modulepreload",y6=function(r){return"/"+r},lS={},ze=function(e,i,n){let a=Promise.resolve();if(i&&i.length>0){let c=function(d){return Promise.all(d.map(f=>Promise.resolve(f).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),u=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));a=c(i.map(d=>{if(d=y6(d),d in lS)return;lS[d]=!0;const f=d.endsWith(".css"),g=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${g}`))return;const b=document.createElement("link");if(b.rel=f?"stylesheet":m6,f||(b.as="script"),b.crossOrigin="",b.href=d,u&&b.setAttribute("nonce",u),document.head.appendChild(b),f)return new Promise((m,v)=>{b.addEventListener("load",m),b.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${d}`)))})}))}function o(c){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=c,window.dispatchEvent(h),!h.defaultPrevented)throw c}return a.then(c=>{for(const h of c||[])h.status==="rejected"&&o(h.reason);return e().catch(o)})};var Ip={exports:{}},b6=Ip.exports,cS;function x6(){return cS||(cS=1,(function(r,e){(function(i,n){r.exports=n()})(b6,(function(){var i=1e3,n=6e4,a=36e5,o="millisecond",c="second",h="minute",u="hour",d="day",f="week",g="month",b="quarter",m="year",v="date",_="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|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,T={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var U=["th","st","nd","rd"],D=F%100;return"["+F+(U[(D-20)%10]||U[D]||U[0])+"]"}},E=function(F,U,D){var z=String(F);return!z||z.length>=U?F:""+Array(U+1-z.length).join(D)+F},N={s:E,z:function(F){var U=-F.utcOffset(),D=Math.abs(U),z=Math.floor(D/60),H=D%60;return(U<=0?"+":"-")+E(z,2,"0")+":"+E(H,2,"0")},m:function F(U,D){if(U.date()<D.date())return-F(D,U);var z=12*(D.year()-U.year())+(D.month()-U.month()),H=U.clone().add(z,g),V=D-H<0,Q=U.clone().add(z+(V?-1:1),g);return+(-(z+(D-H)/(V?H-Q:Q-H))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:g,y:m,w:f,d,D:v,h:u,m:h,s:c,ms:o,Q:b}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},O="en",B={};B[O]=T;var A="$isDayjsObject",L=function(F){return F instanceof X||!(!F||!F[A])},P=function F(U,D,z){var H;if(!U)return O;if(typeof U=="string"){var V=U.toLowerCase();B[V]&&(H=V),D&&(B[V]=D,H=V);var Q=U.split("-");if(!H&&Q.length>1)return F(Q[0])}else{var G=U.name;B[G]=U,H=G}return!z&&H&&(O=H),H||!z&&O},j=function(F,U){if(L(F))return F.clone();var D=typeof U=="object"?U:{};return D.date=F,D.args=arguments,new X(D)},$=N;$.l=P,$.i=L,$.w=function(F,U){return j(F,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var X=(function(){function F(D){this.$L=P(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[A]=!0}var U=F.prototype;return U.parse=function(D){this.$d=(function(z){var H=z.date,V=z.utc;if(H===null)return new Date(NaN);if($.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var Q=H.match(C);if(Q){var G=Q[2]-1||0,J=(Q[7]||"0").substring(0,3);return V?new Date(Date.UTC(Q[1],G,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,J)):new Date(Q[1],G,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,J)}}return new Date(H)})(D),this.init()},U.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},U.$utils=function(){return $},U.isValid=function(){return this.$d.toString()!==_},U.isSame=function(D,z){var H=j(D);return this.startOf(z)<=H&&H<=this.endOf(z)},U.isAfter=function(D,z){return j(D)<this.startOf(z)},U.isBefore=function(D,z){return this.endOf(z)<j(D)},U.$g=function(D,z,H){return $.u(D)?this[z]:this.set(H,D)},U.unix=function(){return Math.floor(this.valueOf()/1e3)},U.valueOf=function(){return this.$d.getTime()},U.startOf=function(D,z){var H=this,V=!!$.u(z)||z,Q=$.p(D),G=function(xt,pt){var Et=$.w(H.$u?Date.UTC(H.$y,pt,xt):new Date(H.$y,pt,xt),H);return V?Et:Et.endOf(d)},J=function(xt,pt){return $.w(H.toDate()[xt].apply(H.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(pt)),H)},lt=this.$W,st=this.$M,vt=this.$D,kt="set"+(this.$u?"UTC":"");switch(Q){case m:return V?G(1,0):G(31,11);case g:return V?G(1,st):G(0,st+1);case f:var Mt=this.$locale().weekStart||0,it=(lt<Mt?lt+7:lt)-Mt;return G(V?vt-it:vt+(6-it),st);case d:case v:return J(kt+"Hours",0);case u:return J(kt+"Minutes",1);case h:return J(kt+"Seconds",2);case c:return J(kt+"Milliseconds",3);default:return this.clone()}},U.endOf=function(D){return this.startOf(D,!1)},U.$set=function(D,z){var H,V=$.p(D),Q="set"+(this.$u?"UTC":""),G=(H={},H[d]=Q+"Date",H[v]=Q+"Date",H[g]=Q+"Month",H[m]=Q+"FullYear",H[u]=Q+"Hours",H[h]=Q+"Minutes",H[c]=Q+"Seconds",H[o]=Q+"Milliseconds",H)[V],J=V===d?this.$D+(z-this.$W):z;if(V===g||V===m){var lt=this.clone().set(v,1);lt.$d[G](J),lt.init(),this.$d=lt.set(v,Math.min(this.$D,lt.daysInMonth())).$d}else G&&this.$d[G](J);return this.init(),this},U.set=function(D,z){return this.clone().$set(D,z)},U.get=function(D){return this[$.p(D)]()},U.add=function(D,z){var H,V=this;D=Number(D);var Q=$.p(z),G=function(st){var vt=j(V);return $.w(vt.date(vt.date()+Math.round(st*D)),V)};if(Q===g)return this.set(g,this.$M+D);if(Q===m)return this.set(m,this.$y+D);if(Q===d)return G(1);if(Q===f)return G(7);var J=(H={},H[h]=n,H[u]=a,H[c]=i,H)[Q]||1,lt=this.$d.getTime()+D*J;return $.w(lt,this)},U.subtract=function(D,z){return this.add(-1*D,z)},U.format=function(D){var z=this,H=this.$locale();if(!this.isValid())return H.invalidDate||_;var V=D||"YYYY-MM-DDTHH:mm:ssZ",Q=$.z(this),G=this.$H,J=this.$m,lt=this.$M,st=H.weekdays,vt=H.months,kt=H.meridiem,Mt=function(pt,Et,Ut,Gt){return pt&&(pt[Et]||pt(z,V))||Ut[Et].slice(0,Gt)},it=function(pt){return $.s(G%12||12,pt,"0")},xt=kt||function(pt,Et,Ut){var Gt=pt<12?"AM":"PM";return Ut?Gt.toLowerCase():Gt};return V.replace(w,(function(pt,Et){return Et||(function(Ut){switch(Ut){case"YY":return String(z.$y).slice(-2);case"YYYY":return $.s(z.$y,4,"0");case"M":return lt+1;case"MM":return $.s(lt+1,2,"0");case"MMM":return Mt(H.monthsShort,lt,vt,3);case"MMMM":return Mt(vt,lt);case"D":return z.$D;case"DD":return $.s(z.$D,2,"0");case"d":return String(z.$W);case"dd":return Mt(H.weekdaysMin,z.$W,st,2);case"ddd":return Mt(H.weekdaysShort,z.$W,st,3);case"dddd":return st[z.$W];case"H":return String(G);case"HH":return $.s(G,2,"0");case"h":return it(1);case"hh":return it(2);case"a":return xt(G,J,!0);case"A":return xt(G,J,!1);case"m":return String(J);case"mm":return $.s(J,2,"0");case"s":return String(z.$s);case"ss":return $.s(z.$s,2,"0");case"SSS":return $.s(z.$ms,3,"0");case"Z":return Q}return null})(pt)||Q.replace(":","")}))},U.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},U.diff=function(D,z,H){var V,Q=this,G=$.p(z),J=j(D),lt=(J.utcOffset()-this.utcOffset())*n,st=this-J,vt=function(){return $.m(Q,J)};switch(G){case m:V=vt()/12;break;case g:V=vt();break;case b:V=vt()/3;break;case f:V=(st-lt)/6048e5;break;case d:V=(st-lt)/864e5;break;case u:V=st/a;break;case h:V=st/n;break;case c:V=st/i;break;default:V=st}return H?V:$.a(V)},U.daysInMonth=function(){return this.endOf(g).$D},U.$locale=function(){return B[this.$L]},U.locale=function(D,z){if(!D)return this.$L;var H=this.clone(),V=P(D,z,!0);return V&&(H.$L=V),H},U.clone=function(){return $.w(this.$d,this)},U.toDate=function(){return new Date(this.valueOf())},U.toJSON=function(){return this.isValid()?this.toISOString():null},U.toISOString=function(){return this.$d.toISOString()},U.toString=function(){return this.$d.toUTCString()},F})(),W=X.prototype;return j.prototype=W,[["$ms",o],["$s",c],["$m",h],["$H",u],["$W",d],["$M",g],["$y",m],["$D",v]].forEach((function(F){W[F[1]]=function(U){return this.$g(U,F[0],F[1])}})),j.extend=function(F,U){return F.$i||(F(U,X,j),F.$i=!0),j},j.locale=P,j.isDayjs=L,j.unix=function(F){return j(1e3*F)},j.en=B[O],j.Ls=B,j.p={},j}))})(Ip)),Ip.exports}var v6=x6();const _6=Dd(v6);var uM=Object.defineProperty,M=(r,e)=>uM(r,"name",{value:e,configurable:!0}),C6=(r,e)=>{for(var i in e)uM(r,i,{get:e[i],enumerable:!0})},gs={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Tt={trace:M((...r)=>{},"trace"),debug:M((...r)=>{},"debug"),info:M((...r)=>{},"info"),warn:M((...r)=>{},"warn"),error:M((...r)=>{},"error"),fatal:M((...r)=>{},"fatal")},C1=M(function(r="fatal"){let e=gs.fatal;typeof r=="string"?r.toLowerCase()in gs&&(e=gs[r]):typeof r=="number"&&(e=r),Tt.trace=()=>{},Tt.debug=()=>{},Tt.info=()=>{},Tt.warn=()=>{},Tt.error=()=>{},Tt.fatal=()=>{},e<=gs.fatal&&(Tt.fatal=console.error?console.error.bind(console,Vn("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Vn("FATAL"))),e<=gs.error&&(Tt.error=console.error?console.error.bind(console,Vn("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Vn("ERROR"))),e<=gs.warn&&(Tt.warn=console.warn?console.warn.bind(console,Vn("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Vn("WARN"))),e<=gs.info&&(Tt.info=console.info?console.info.bind(console,Vn("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Vn("INFO"))),e<=gs.debug&&(Tt.debug=console.debug?console.debug.bind(console,Vn("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Vn("DEBUG"))),e<=gs.trace&&(Tt.trace=console.debug?console.debug.bind(console,Vn("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Vn("TRACE")))},"setLogLevel"),Vn=M(r=>`%c${_6().format("ss.SSS")} : ${r} : `,"format");const $p={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:r=>r>=255?255:r<0?0:r,g:r=>r>=255?255:r<0?0:r,b:r=>r>=255?255:r<0?0:r,h:r=>r%360,s:r=>r>=100?100:r<0?0:r,l:r=>r>=100?100:r<0?0:r,a:r=>r>=1?1:r<0?0:r},toLinear:r=>{const e=r/255;return r>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(r,e,i)=>(i<0&&(i+=1),i>1&&(i-=1),i<1/6?r+(e-r)*6*i:i<1/2?e:i<2/3?r+(e-r)*(2/3-i)*6:r),hsl2rgb:({h:r,s:e,l:i},n)=>{if(!e)return i*2.55;r/=360,e/=100,i/=100;const a=i<.5?i*(1+e):i+e-i*e,o=2*i-a;switch(n){case"r":return $p.hue2rgb(o,a,r+1/3)*255;case"g":return $p.hue2rgb(o,a,r)*255;case"b":return $p.hue2rgb(o,a,r-1/3)*255}},rgb2hsl:({r,g:e,b:i},n)=>{r/=255,e/=255,i/=255;const a=Math.max(r,e,i),o=Math.min(r,e,i),c=(a+o)/2;if(n==="l")return c*100;if(a===o)return 0;const h=a-o,u=c>.5?h/(2-a-o):h/(a+o);if(n==="s")return u*100;switch(a){case r:return((e-i)/h+(e<i?6:0))*60;case e:return((i-r)/h+2)*60;case i:return((r-e)/h+4)*60;default:return-1}}},k6={clamp:(r,e,i)=>e>i?Math.min(e,Math.max(i,r)):Math.min(i,Math.max(e,r)),round:r=>Math.round(r*1e10)/1e10},w6={dec2hex:r=>{const e=Math.round(r).toString(16);return e.length>1?e:`0${e}`}},be={channel:$p,lang:k6,unit:w6},mo={};for(let r=0;r<=255;r++)mo[r]=be.unit.dec2hex(r);const Ri={ALL:0,RGB:1,HSL:2};class S6{constructor(){this.type=Ri.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=Ri.ALL}is(e){return this.type===e}}class T6{constructor(e,i){this.color=i,this.changed=!1,this.data=e,this.type=new S6}set(e,i){return this.color=i,this.changed=!1,this.data=e,this.type.type=Ri.ALL,this}_ensureHSL(){const e=this.data,{h:i,s:n,l:a}=e;i===void 0&&(e.h=be.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=be.channel.rgb2hsl(e,"s")),a===void 0&&(e.l=be.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r:i,g:n,b:a}=e;i===void 0&&(e.r=be.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=be.channel.hsl2rgb(e,"g")),a===void 0&&(e.b=be.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,i=e.r;return!this.type.is(Ri.HSL)&&i!==void 0?i:(this._ensureHSL(),be.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,i=e.g;return!this.type.is(Ri.HSL)&&i!==void 0?i:(this._ensureHSL(),be.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,i=e.b;return!this.type.is(Ri.HSL)&&i!==void 0?i:(this._ensureHSL(),be.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,i=e.h;return!this.type.is(Ri.RGB)&&i!==void 0?i:(this._ensureRGB(),be.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,i=e.s;return!this.type.is(Ri.RGB)&&i!==void 0?i:(this._ensureRGB(),be.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,i=e.l;return!this.type.is(Ri.RGB)&&i!==void 0?i:(this._ensureRGB(),be.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(Ri.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Ri.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Ri.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Ri.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Ri.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Ri.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const Xg=new T6({r:0,g:0,b:0,a:0},"transparent"),Ic={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:r=>{if(r.charCodeAt(0)!==35)return;const e=r.match(Ic.re);if(!e)return;const i=e[1],n=parseInt(i,16),a=i.length,o=a%4===0,c=a>4,h=c?1:17,u=c?8:4,d=o?0:-1,f=c?255:15;return Xg.set({r:(n>>u*(d+3)&f)*h,g:(n>>u*(d+2)&f)*h,b:(n>>u*(d+1)&f)*h,a:o?(n&f)*h/255:1},r)},stringify:r=>{const{r:e,g:i,b:n,a}=r;return a<1?`#${mo[Math.round(e)]}${mo[Math.round(i)]}${mo[Math.round(n)]}${mo[Math.round(a*255)]}`:`#${mo[Math.round(e)]}${mo[Math.round(i)]}${mo[Math.round(n)]}`}},fl={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:r=>{const e=r.match(fl.hueRe);if(e){const[,i,n]=e;switch(n){case"grad":return be.channel.clamp.h(parseFloat(i)*.9);case"rad":return be.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return be.channel.clamp.h(parseFloat(i)*360)}}return be.channel.clamp.h(parseFloat(r))},parse:r=>{const e=r.charCodeAt(0);if(e!==104&&e!==72)return;const i=r.match(fl.re);if(!i)return;const[,n,a,o,c,h]=i;return Xg.set({h:fl._hue2deg(n),s:be.channel.clamp.s(parseFloat(a)),l:be.channel.clamp.l(parseFloat(o)),a:c?be.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},r)},stringify:r=>{const{h:e,s:i,l:n,a}=r;return a<1?`hsla(${be.lang.round(e)}, ${be.lang.round(i)}%, ${be.lang.round(n)}%, ${a})`:`hsl(${be.lang.round(e)}, ${be.lang.round(i)}%, ${be.lang.round(n)}%)`}},rd={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:r=>{r=r.toLowerCase();const e=rd.colors[r];if(e)return Ic.parse(e)},stringify:r=>{const e=Ic.stringify(r);for(const i in rd.colors)if(rd.colors[i]===e)return i}},Gu={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:r=>{const e=r.charCodeAt(0);if(e!==114&&e!==82)return;const i=r.match(Gu.re);if(!i)return;const[,n,a,o,c,h,u,d,f]=i;return Xg.set({r:be.channel.clamp.r(a?parseFloat(n)*2.55:parseFloat(n)),g:be.channel.clamp.g(c?parseFloat(o)*2.55:parseFloat(o)),b:be.channel.clamp.b(u?parseFloat(h)*2.55:parseFloat(h)),a:d?be.channel.clamp.a(f?parseFloat(d)/100:parseFloat(d)):1},r)},stringify:r=>{const{r:e,g:i,b:n,a}=r;return a<1?`rgba(${be.lang.round(e)}, ${be.lang.round(i)}, ${be.lang.round(n)}, ${be.lang.round(a)})`:`rgb(${be.lang.round(e)}, ${be.lang.round(i)}, ${be.lang.round(n)})`}},Ga={format:{keyword:rd,hex:Ic,rgb:Gu,rgba:Gu,hsl:fl,hsla:fl},parse:r=>{if(typeof r!="string")return r;const e=Ic.parse(r)||Gu.parse(r)||fl.parse(r)||rd.parse(r);if(e)return e;throw new Error(`Unsupported color format: "${r}"`)},stringify:r=>!r.changed&&r.color?r.color:r.type.is(Ri.HSL)||r.data.r===void 0?fl.stringify(r):r.a<1||!Number.isInteger(r.r)||!Number.isInteger(r.g)||!Number.isInteger(r.b)?Gu.stringify(r):Ic.stringify(r)},dM=(r,e)=>{const i=Ga.parse(r);for(const n in e)i[n]=be.channel.clamp[n](e[n]);return Ga.stringify(i)},Bo=(r,e,i=0,n=1)=>{if(typeof r!="number")return dM(r,{a:e});const a=Xg.set({r:be.channel.clamp.r(r),g:be.channel.clamp.g(e),b:be.channel.clamp.b(i),a:be.channel.clamp.a(n)});return Ga.stringify(a)},E6=r=>{const{r:e,g:i,b:n}=Ga.parse(r),a=.2126*be.channel.toLinear(e)+.7152*be.channel.toLinear(i)+.0722*be.channel.toLinear(n);return be.lang.round(a)},A6=r=>E6(r)>=.5,ka=r=>!A6(r),fM=(r,e,i)=>{const n=Ga.parse(r),a=n[e],o=be.channel.clamp[e](a+i);return a!==o&&(n[e]=o),Ga.stringify(n)},yt=(r,e)=>fM(r,"l",e),gt=(r,e)=>fM(r,"l",-e),I=(r,e)=>{const i=Ga.parse(r),n={};for(const a in e)e[a]&&(n[a]=i[a]+e[a]);return dM(r,n)},N6=(r,e,i=50)=>{const{r:n,g:a,b:o,a:c}=Ga.parse(r),{r:h,g:u,b:d,a:f}=Ga.parse(e),g=i/100,b=g*2-1,m=c-f,_=((b*m===-1?b:(b+m)/(1+b*m))+1)/2,C=1-_,w=n*_+h*C,T=a*_+u*C,E=o*_+d*C,N=c*g+f*(1-g);return Bo(w,T,E,N)},at=(r,e=100)=>{const i=Ga.parse(r);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,N6(i,r,e)};var pM=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,id=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,M6=/\s*%%.*\n/gm,th,gM=(th=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},M(th,"UnknownDiagramError"),th),Ol={},k1=M(function(r,e){r=r.replace(pM,"").replace(id,"").replace(M6,`
108
+ `);for(const[i,{detector:n}]of Object.entries(Ol))if(n(r,e))return i;throw new gM(`No diagram type detected matching given configuration for text: ${r}`)},"detectType"),Fx=M((...r)=>{for(const{id:e,detector:i,loader:n}of r)mM(e,i,n)},"registerLazyLoadedDiagrams"),mM=M((r,e,i)=>{Ol[r]&&Tt.warn(`Detector with key ${r} already exists. Overwriting.`),Ol[r]={detector:e,loader:i},Tt.debug(`Detector with key ${r} added${i?" with loader":""}`)},"addDetector"),B6=M(r=>Ol[r].loader,"getDiagramLoader"),jx=M((r,e,{depth:i=2,clobber:n=!1}={})=>{const a={depth:i,clobber:n};return Array.isArray(e)&&!Array.isArray(r)?(e.forEach(o=>jx(r,o,a)),r):Array.isArray(e)&&Array.isArray(r)?(e.forEach(o=>{r.includes(o)||r.push(o)}),r):r===void 0||i<=0?r!=null&&typeof r=="object"&&typeof e=="object"?Object.assign(r,e):e:(e!==void 0&&typeof r=="object"&&typeof e=="object"&&Object.keys(e).forEach(o=>{typeof e[o]=="object"&&e[o]!==null&&(r[o]===void 0||typeof r[o]=="object")?(r[o]===void 0&&(r[o]=Array.isArray(e[o])?[]:{}),r[o]=jx(r[o],e[o],{depth:i-1,clobber:n})):(n||typeof r[o]!="object"&&typeof e[o]!="object")&&(r[o]=e[o])}),r)},"assignWithDepth"),ci=jx,Ka="#ffffff",Xa="#f2f2f2",ge=M((r,e)=>e?I(r,{s:-40,l:10}):I(r,{s:-40,l:-10}),"mkBorder"),eh,L6=(eh=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 i,n,a,o,c,h,u,d,f,g,b,m,v,_,C,w,T,E,N,O,B,A;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||I(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||I(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||at(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||at(this.tertiaryColor),this.lineColor=this.lineColor||at(this.background),this.arrowheadColor=this.arrowheadColor||at(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?gt(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||gt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||at(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||yt(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||gt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||gt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||yt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||yt(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||I(this.primaryColor,{h:30}),this.cScale4=this.cScale4||I(this.primaryColor,{h:60}),this.cScale5=this.cScale5||I(this.primaryColor,{h:90}),this.cScale6=this.cScale6||I(this.primaryColor,{h:120}),this.cScale7=this.cScale7||I(this.primaryColor,{h:150}),this.cScale8=this.cScale8||I(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||I(this.primaryColor,{h:270}),this.cScale10=this.cScale10||I(this.primaryColor,{h:300}),this.cScale11=this.cScale11||I(this.primaryColor,{h:330}),this.darkMode)for(let L=0;L<this.THEME_COLOR_LIMIT;L++)this["cScale"+L]=gt(this["cScale"+L],75);else for(let L=0;L<this.THEME_COLOR_LIMIT;L++)this["cScale"+L]=gt(this["cScale"+L],25);for(let L=0;L<this.THEME_COLOR_LIMIT;L++)this["cScaleInv"+L]=this["cScaleInv"+L]||at(this["cScale"+L]);for(let L=0;L<this.THEME_COLOR_LIMIT;L++)this.darkMode?this["cScalePeer"+L]=this["cScalePeer"+L]||yt(this["cScale"+L],10):this["cScalePeer"+L]=this["cScalePeer"+L]||gt(this["cScale"+L],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let L=0;L<this.THEME_COLOR_LIMIT;L++)this["cScaleLabel"+L]=this["cScaleLabel"+L]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let L=0;L<5;L++)this["surface"+L]=this["surface"+L]||I(this.mainBkg,{h:180,s:-15,l:e*(5+L*3)}),this["surfacePeer"+L]=this["surfacePeer"+L]||I(this.mainBkg,{h:180,s:-15,l:e*(8+L*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||I(this.primaryColor,{h:64}),this.fillType3=this.fillType3||I(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||I(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||I(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||I(this.primaryColor,{h:128}),this.fillType7=this.fillType7||I(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||I(this.primaryColor,{l:-10}),this.pie5=this.pie5||I(this.secondaryColor,{l:-10}),this.pie6=this.pie6||I(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||I(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||I(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||I(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||I(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||I(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||I(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??I(this.primaryColor,{l:-30}),this.venn2=this.venn2??I(this.secondaryColor,{l:-30}),this.venn3=this.venn3??I(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??I(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??I(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??I(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??I(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??I(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((i=this.radar)==null?void 0:i.axisColor)||this.lineColor,axisStrokeWidth:((n=this.radar)==null?void 0:n.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((o=this.radar)==null?void 0:o.curveOpacity)||.5,curveStrokeWidth:((c=this.radar)==null?void 0:c.curveStrokeWidth)||2,graticuleColor:((h=this.radar)==null?void 0:h.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((u=this.radar)==null?void 0:u.graticuleStrokeWidth)||1,graticuleOpacity:((d=this.radar)==null?void 0:d.graticuleOpacity)||.3,legendBoxSize:((f=this.radar)==null?void 0:f.legendBoxSize)||12,legendFontSize:((g=this.radar)==null?void 0:g.legendFontSize)||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||I(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ka(this.quadrant1Fill)?yt(this.quadrant1Fill):gt(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:((b=this.xyChart)==null?void 0:b.backgroundColor)||this.background,titleColor:((m=this.xyChart)==null?void 0:m.titleColor)||this.primaryTextColor,dataLabelColor:((v=this.xyChart)==null?void 0:v.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((_=this.xyChart)==null?void 0:_.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((C=this.xyChart)==null?void 0:C.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((w=this.xyChart)==null?void 0:w.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((T=this.xyChart)==null?void 0:T.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((E=this.xyChart)==null?void 0:E.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((N=this.xyChart)==null?void 0:N.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((O=this.xyChart)==null?void 0:O.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((B=this.xyChart)==null?void 0:B.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((A=this.xyChart)==null?void 0:A.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?gt(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||I(this.primaryColor,{h:-30}),this.git4=this.git4||I(this.primaryColor,{h:-60}),this.git5=this.git5||I(this.primaryColor,{h:-90}),this.git6=this.git6||I(this.primaryColor,{h:60}),this.git7=this.git7||I(this.primaryColor,{h:120}),this.darkMode?(this.git0=yt(this.git0,25),this.git1=yt(this.git1,25),this.git2=yt(this.git2,25),this.git3=yt(this.git3,25),this.git4=yt(this.git4,25),this.git5=yt(this.git5,25),this.git6=yt(this.git6,25),this.git7=yt(this.git7,25)):(this.git0=gt(this.git0,25),this.git1=gt(this.git1,25),this.git2=gt(this.git2,25),this.git3=gt(this.git3,25),this.git4=gt(this.git4,25),this.git5=gt(this.git5,25),this.git6=gt(this.git6,25),this.git7=gt(this.git7,25)),this.gitInv0=this.gitInv0||at(this.git0),this.gitInv1=this.gitInv1||at(this.git1),this.gitInv2=this.gitInv2||at(this.git2),this.gitInv3=this.gitInv3||at(this.git3),this.gitInv4=this.gitInv4||at(this.git4),this.gitInv5=this.gitInv5||at(this.git5),this.gitInv6=this.gitInv6||at(this.git6),this.gitInv7=this.gitInv7||at(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||Ka,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xa,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},M(eh,"Theme"),eh),O6=M(r=>{const e=new L6;return e.calculate(r),e},"getThemeVariables"),rh,R6=(rh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=yt(this.primaryColor,16),this.tertiaryColor=I(this.primaryColor,{h:-160}),this.primaryBorderColor=at(this.background),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=at(this.primaryColor),this.secondaryTextColor=at(this.secondaryColor),this.tertiaryTextColor=at(this.tertiaryColor),this.lineColor=at(this.background),this.textColor=at(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=yt(at("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Bo(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=gt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=gt(this.sectionBkgColor,10),this.taskBorderColor=Bo(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Bo(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||yt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||gt(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 e,i,n,a,o,c,h,u,d,f,g,b,m,v,_,C,w,T,E,N,O,B;this.secondBkg=yt(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=yt(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=yt(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=at(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=I(this.primaryColor,{h:64}),this.fillType3=I(this.secondaryColor,{h:64}),this.fillType4=I(this.primaryColor,{h:-64}),this.fillType5=I(this.secondaryColor,{h:-64}),this.fillType6=I(this.primaryColor,{h:128}),this.fillType7=I(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||I(this.primaryColor,{h:30}),this.cScale4=this.cScale4||I(this.primaryColor,{h:60}),this.cScale5=this.cScale5||I(this.primaryColor,{h:90}),this.cScale6=this.cScale6||I(this.primaryColor,{h:120}),this.cScale7=this.cScale7||I(this.primaryColor,{h:150}),this.cScale8=this.cScale8||I(this.primaryColor,{h:210}),this.cScale9=this.cScale9||I(this.primaryColor,{h:270}),this.cScale10=this.cScale10||I(this.primaryColor,{h:300}),this.cScale11=this.cScale11||I(this.primaryColor,{h:330});for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleInv"+A]=this["cScaleInv"+A]||at(this["cScale"+A]);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScalePeer"+A]=this["cScalePeer"+A]||yt(this["cScale"+A],10);for(let A=0;A<5;A++)this["surface"+A]=this["surface"+A]||I(this.mainBkg,{h:30,s:-30,l:-(-10+A*4)}),this["surfacePeer"+A]=this["surfacePeer"+A]||I(this.mainBkg,{h:30,s:-30,l:-(-7+A*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleLabel"+A]=this["cScaleLabel"+A]||this.scaleLabelColor;for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["pie"+A]=this["cScale"+A];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 A=0;A<8;A++)this["venn"+(A+1)]=this["venn"+(A+1)]??yt(this["cScale"+A],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||I(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ka(this.quadrant1Fill)?yt(this.quadrant1Fill):gt(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:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,dataLabelColor:((n=this.xyChart)==null?void 0:n.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.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:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((f=this.xyChart)==null?void 0:f.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((b=this.xyChart)==null?void 0:b.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:((v=this.radar)==null?void 0:v.axisStrokeWidth)||2,axisLabelFontSize:((_=this.radar)==null?void 0:_.axisLabelFontSize)||12,curveOpacity:((C=this.radar)==null?void 0:C.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((N=this.radar)==null?void 0:N.graticuleOpacity)||.3,legendBoxSize:((O=this.radar)==null?void 0:O.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.legendFontSize)||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?gt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=yt(this.secondaryColor,20),this.git1=yt(this.pie2||this.secondaryColor,20),this.git2=yt(this.pie3||this.tertiaryColor,20),this.git3=yt(this.pie4||I(this.primaryColor,{h:-30}),20),this.git4=yt(this.pie5||I(this.primaryColor,{h:-60}),20),this.git5=yt(this.pie6||I(this.primaryColor,{h:-90}),10),this.git6=yt(this.pie7||I(this.primaryColor,{h:60}),10),this.git7=yt(this.pie8||I(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||at(this.git0),this.gitInv1=this.gitInv1||at(this.git1),this.gitInv2=this.gitInv2||at(this.git2),this.gitInv3=this.gitInv3||at(this.git3),this.gitInv4=this.gitInv4||at(this.git4),this.gitInv5=this.gitInv5||at(this.git5),this.gitInv6=this.gitInv6||at(this.git6),this.gitInv7=this.gitInv7||at(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||at(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||at(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||yt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||yt(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},M(rh,"Theme"),rh),D6=M(r=>{const e=new R6;return e.calculate(r),e},"getThemeVariables"),ih,F6=(ih=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=I(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=I(this.primaryColor,{h:-160}),this.primaryBorderColor=ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=at(this.primaryColor),this.secondaryTextColor=at(this.secondaryColor),this.tertiaryTextColor=at(this.tertiaryColor),this.lineColor=at(this.background),this.textColor=at(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ge(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=Bo(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 e,i,n,a,o,c,h,u,d,f,g,b,m,v,_,C,w,T,E,N,O,B;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||I(this.primaryColor,{h:30}),this.cScale4=this.cScale4||I(this.primaryColor,{h:60}),this.cScale5=this.cScale5||I(this.primaryColor,{h:90}),this.cScale6=this.cScale6||I(this.primaryColor,{h:120}),this.cScale7=this.cScale7||I(this.primaryColor,{h:150}),this.cScale8=this.cScale8||I(this.primaryColor,{h:210}),this.cScale9=this.cScale9||I(this.primaryColor,{h:270}),this.cScale10=this.cScale10||I(this.primaryColor,{h:300}),this.cScale11=this.cScale11||I(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||gt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||gt(this.tertiaryColor,40);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScale"+A]=gt(this["cScale"+A],10),this["cScalePeer"+A]=this["cScalePeer"+A]||gt(this["cScale"+A],25);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleInv"+A]=this["cScaleInv"+A]||I(this["cScale"+A],{h:180});for(let A=0;A<5;A++)this["surface"+A]=this["surface"+A]||I(this.mainBkg,{h:30,l:-(5+A*5)}),this["surfacePeer"+A]=this["surfacePeer"+A]||I(this.mainBkg,{h:30,l:-(7+A*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||at(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||at(this.labelTextColor);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleLabel"+A]=this["cScaleLabel"+A]||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||yt(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||yt(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=I(this.primaryColor,{h:64}),this.fillType3=I(this.secondaryColor,{h:64}),this.fillType4=I(this.primaryColor,{h:-64}),this.fillType5=I(this.secondaryColor,{h:-64}),this.fillType6=I(this.primaryColor,{h:128}),this.fillType7=I(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||I(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||I(this.primaryColor,{l:-10}),this.pie5=this.pie5||I(this.secondaryColor,{l:-30}),this.pie6=this.pie6||I(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||I(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||I(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||I(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||I(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||I(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||I(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??I(this.primaryColor,{l:-30}),this.venn2=this.venn2??I(this.secondaryColor,{l:-30}),this.venn3=this.venn3??I(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??I(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??I(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??I(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??I(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??I(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||I(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ka(this.quadrant1Fill)?yt(this.quadrant1Fill):gt(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:((e=this.radar)==null?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((c=this.radar)==null?void 0:c.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((h=this.radar)==null?void 0:h.graticuleStrokeWidth)||1,graticuleOpacity:((u=this.radar)==null?void 0:u.graticuleOpacity)||.3,legendBoxSize:((d=this.radar)==null?void 0:d.legendBoxSize)||12,legendFontSize:((f=this.radar)==null?void 0:f.legendFontSize)||12},this.xyChart={backgroundColor:((g=this.xyChart)==null?void 0:g.backgroundColor)||this.background,titleColor:((b=this.xyChart)==null?void 0:b.titleColor)||this.primaryTextColor,dataLabelColor:((m=this.xyChart)==null?void 0:m.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((v=this.xyChart)==null?void 0:v.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_=this.xyChart)==null?void 0:_.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((C=this.xyChart)==null?void 0:C.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((w=this.xyChart)==null?void 0:w.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((T=this.xyChart)==null?void 0:T.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((N=this.xyChart)==null?void 0:N.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((B=this.xyChart)==null?void 0:B.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||I(this.primaryColor,{h:-30}),this.git4=this.git4||I(this.primaryColor,{h:-60}),this.git5=this.git5||I(this.primaryColor,{h:-90}),this.git6=this.git6||I(this.primaryColor,{h:60}),this.git7=this.git7||I(this.primaryColor,{h:120}),this.darkMode?(this.git0=yt(this.git0,25),this.git1=yt(this.git1,25),this.git2=yt(this.git2,25),this.git3=yt(this.git3,25),this.git4=yt(this.git4,25),this.git5=yt(this.git5,25),this.git6=yt(this.git6,25),this.git7=yt(this.git7,25)):(this.git0=gt(this.git0,25),this.git1=gt(this.git1,25),this.git2=gt(this.git2,25),this.git3=gt(this.git3,25),this.git4=gt(this.git4,25),this.git5=gt(this.git5,25),this.git6=gt(this.git6,25),this.git7=gt(this.git7,25)),this.gitInv0=this.gitInv0||gt(at(this.git0),25),this.gitInv1=this.gitInv1||at(this.git1),this.gitInv2=this.gitInv2||at(this.git2),this.gitInv3=this.gitInv3||at(this.git3),this.gitInv4=this.gitInv4||at(this.git4),this.gitInv5=this.gitInv5||at(this.git5),this.gitInv6=this.gitInv6||at(this.git6),this.gitInv7=this.gitInv7||at(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||at(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||at(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ka,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xa}calculate(e){if(Object.keys(this).forEach(n=>{this[n]==="calculated"&&(this[n]=void 0)}),typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},M(ih,"Theme"),ih),j6=M(r=>{const e=new F6;return e.calculate(r),e},"getThemeVariables"),nh,I6=(nh=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=yt("#cde498",10),this.primaryBorderColor=ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=at(this.primaryColor),this.secondaryTextColor=at(this.secondaryColor),this.tertiaryTextColor=at(this.primaryColor),this.lineColor=at(this.background),this.textColor=at(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 e,i,n,a,o,c,h,u,d,f,g,b,m,v,_,C,w,T,E,N,O,B;this.actorBorder=gt(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||I(this.primaryColor,{h:30}),this.cScale4=this.cScale4||I(this.primaryColor,{h:60}),this.cScale5=this.cScale5||I(this.primaryColor,{h:90}),this.cScale6=this.cScale6||I(this.primaryColor,{h:120}),this.cScale7=this.cScale7||I(this.primaryColor,{h:150}),this.cScale8=this.cScale8||I(this.primaryColor,{h:210}),this.cScale9=this.cScale9||I(this.primaryColor,{h:270}),this.cScale10=this.cScale10||I(this.primaryColor,{h:300}),this.cScale11=this.cScale11||I(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||gt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||gt(this.tertiaryColor,40);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScale"+A]=gt(this["cScale"+A],10),this["cScalePeer"+A]=this["cScalePeer"+A]||gt(this["cScale"+A],25);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleInv"+A]=this["cScaleInv"+A]||I(this["cScale"+A],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleLabel"+A]=this["cScaleLabel"+A]||this.scaleLabelColor;for(let A=0;A<5;A++)this["surface"+A]=this["surface"+A]||I(this.mainBkg,{h:30,s:-30,l:-(5+A*5)}),this["surfacePeer"+A]=this["surfacePeer"+A]||I(this.mainBkg,{h:30,s:-30,l:-(8+A*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||yt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||yt(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=I(this.primaryColor,{h:64}),this.fillType3=I(this.secondaryColor,{h:64}),this.fillType4=I(this.primaryColor,{h:-64}),this.fillType5=I(this.secondaryColor,{h:-64}),this.fillType6=I(this.primaryColor,{h:128}),this.fillType7=I(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||I(this.primaryColor,{l:-30}),this.pie5=this.pie5||I(this.secondaryColor,{l:-30}),this.pie6=this.pie6||I(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||I(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||I(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||I(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||I(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||I(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||I(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??I(this.primaryColor,{l:-30}),this.venn2=this.venn2??I(this.secondaryColor,{l:-30}),this.venn3=this.venn3??I(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??I(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??I(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??I(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??I(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??I(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||I(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ka(this.quadrant1Fill)?yt(this.quadrant1Fill):gt(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:((e=this.radar)==null?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((c=this.radar)==null?void 0:c.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((h=this.radar)==null?void 0:h.graticuleStrokeWidth)||1,graticuleOpacity:((u=this.radar)==null?void 0:u.graticuleOpacity)||.3,legendBoxSize:((d=this.radar)==null?void 0:d.legendBoxSize)||12,legendFontSize:((f=this.radar)==null?void 0:f.legendFontSize)||12},this.xyChart={backgroundColor:((g=this.xyChart)==null?void 0:g.backgroundColor)||this.background,titleColor:((b=this.xyChart)==null?void 0:b.titleColor)||this.primaryTextColor,dataLabelColor:((m=this.xyChart)==null?void 0:m.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((v=this.xyChart)==null?void 0:v.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_=this.xyChart)==null?void 0:_.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((C=this.xyChart)==null?void 0:C.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((w=this.xyChart)==null?void 0:w.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((T=this.xyChart)==null?void 0:T.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((N=this.xyChart)==null?void 0:N.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((B=this.xyChart)==null?void 0:B.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||I(this.primaryColor,{h:-30}),this.git4=this.git4||I(this.primaryColor,{h:-60}),this.git5=this.git5||I(this.primaryColor,{h:-90}),this.git6=this.git6||I(this.primaryColor,{h:60}),this.git7=this.git7||I(this.primaryColor,{h:120}),this.darkMode?(this.git0=yt(this.git0,25),this.git1=yt(this.git1,25),this.git2=yt(this.git2,25),this.git3=yt(this.git3,25),this.git4=yt(this.git4,25),this.git5=yt(this.git5,25),this.git6=yt(this.git6,25),this.git7=yt(this.git7,25)):(this.git0=gt(this.git0,25),this.git1=gt(this.git1,25),this.git2=gt(this.git2,25),this.git3=gt(this.git3,25),this.git4=gt(this.git4,25),this.git5=gt(this.git5,25),this.git6=gt(this.git6,25),this.git7=gt(this.git7,25)),this.gitInv0=this.gitInv0||at(this.git0),this.gitInv1=this.gitInv1||at(this.git1),this.gitInv2=this.gitInv2||at(this.git2),this.gitInv3=this.gitInv3||at(this.git3),this.gitInv4=this.gitInv4||at(this.git4),this.gitInv5=this.gitInv5||at(this.git5),this.gitInv6=this.gitInv6||at(this.git6),this.gitInv7=this.gitInv7||at(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||at(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||at(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ka,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xa}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},M(nh,"Theme"),nh),$6=M(r=>{const e=new I6;return e.calculate(r),e},"getThemeVariables"),ah,z6=(ah=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=yt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=I(this.primaryColor,{h:-160}),this.primaryBorderColor=ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=at(this.primaryColor),this.secondaryTextColor=at(this.secondaryColor),this.tertiaryTextColor=at(this.tertiaryColor),this.lineColor=at(this.background),this.textColor=at(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||yt(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 e,i,n,a,o,c,h,u,d,f,g,b,m,v,_,C,w,T,E,N,O,B;this.secondBkg=yt(this.contrast,55),this.border2=this.contrast,this.actorBorder=yt(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 A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleInv"+A]=this["cScaleInv"+A]||at(this["cScale"+A]);for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this.darkMode?this["cScalePeer"+A]=this["cScalePeer"+A]||yt(this["cScale"+A],10):this["cScalePeer"+A]=this["cScalePeer"+A]||gt(this["cScale"+A],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["cScaleLabel"+A]=this["cScaleLabel"+A]||this.scaleLabelColor;for(let A=0;A<5;A++)this["surface"+A]=this["surface"+A]||I(this.mainBkg,{l:-(5+A*5)}),this["surfacePeer"+A]=this["surfacePeer"+A]||I(this.mainBkg,{l:-(8+A*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=yt(this.contrast,30),this.sectionBkgColor2=yt(this.contrast,30),this.taskBorderColor=gt(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=yt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=gt(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=I(this.primaryColor,{h:64}),this.fillType3=I(this.secondaryColor,{h:64}),this.fillType4=I(this.primaryColor,{h:-64}),this.fillType5=I(this.secondaryColor,{h:-64}),this.fillType6=I(this.primaryColor,{h:128}),this.fillType7=I(this.secondaryColor,{h:128});for(let A=0;A<this.THEME_COLOR_LIMIT;A++)this["pie"+A]=this["cScale"+A];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 A=0;A<8;A++)this["venn"+(A+1)]=this["venn"+(A+1)]??this["cScale"+A];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||I(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ka(this.quadrant1Fill)?yt(this.quadrant1Fill):gt(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:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,dataLabelColor:((n=this.xyChart)==null?void 0:n.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.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:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((f=this.xyChart)==null?void 0:f.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((b=this.xyChart)==null?void 0:b.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:((v=this.radar)==null?void 0:v.axisStrokeWidth)||2,axisLabelFontSize:((_=this.radar)==null?void 0:_.axisLabelFontSize)||12,curveOpacity:((C=this.radar)==null?void 0:C.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((N=this.radar)==null?void 0:N.graticuleOpacity)||.3,legendBoxSize:((O=this.radar)==null?void 0:O.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.legendFontSize)||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=gt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||I(this.primaryColor,{h:-30}),this.git4=this.pie5||I(this.primaryColor,{h:-60}),this.git5=this.pie6||I(this.primaryColor,{h:-90}),this.git6=this.pie7||I(this.primaryColor,{h:60}),this.git7=this.pie8||I(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||at(this.git0),this.gitInv1=this.gitInv1||at(this.git1),this.gitInv2=this.gitInv2||at(this.git2),this.gitInv3=this.gitInv3||at(this.git3),this.gitInv4=this.gitInv4||at(this.git4),this.gitInv5=this.gitInv5||at(this.git5),this.gitInv6=this.gitInv6||at(this.git6),this.gitInv7=this.gitInv7||at(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ka,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xa}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},M(ah,"Theme"),ah),P6=M(r=>{const e=new z6;return e.calculate(r),e},"getThemeVariables"),sh,q6=(sh=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=ge(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 o,c,h,u,d,f,g,b,m,v,_;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||I(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||I(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||at(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||at(this.tertiaryColor),this.lineColor=this.lineColor||at(this.background),this.arrowheadColor=this.arrowheadColor||at(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?gt(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||gt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||at(this.lineColor);const e="#ECECFE",i="#E9E9F1",n=I(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||yt(e,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||e,this.cScale1=this.cScale1||i,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||I(e,{h:30}),this.cScale4=this.cScale4||I(e,{h:60}),this.cScale5=this.cScale5||I(e,{h:90}),this.cScale6=this.cScale6||I(e,{h:120}),this.cScale7=this.cScale7||I(e,{h:150}),this.cScale8=this.cScale8||I(e,{h:210,l:150}),this.cScale9=this.cScale9||I(e,{h:270}),this.cScale10=this.cScale10||I(e,{h:300}),this.cScale11=this.cScale11||I(e,{h:330}),this.darkMode)for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=gt(this["cScale"+C],75);else for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=gt(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||at(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||yt(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||gt(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||I(this.mainBkg,{h:180,s:-15,l:a*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||I(this.mainBkg,{h:180,s:-15,l:a*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||i,this.fillType2=this.fillType2||I(e,{h:64}),this.fillType3=this.fillType3||I(i,{h:64}),this.fillType4=this.fillType4||I(e,{h:-64}),this.fillType5=this.fillType5||I(i,{h:-64}),this.fillType6=this.fillType6||I(e,{h:128}),this.fillType7=this.fillType7||I(i,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||i,this.pie3=this.pie3||n,this.pie4=this.pie4||I(e,{l:-10}),this.pie5=this.pie5||I(i,{l:-10}),this.pie6=this.pie6||I(n,{l:-10}),this.pie7=this.pie7||I(e,{h:60,l:-10}),this.pie8=this.pie8||I(e,{h:-60,l:-10}),this.pie9=this.pie9||I(e,{h:120,l:0}),this.pie10=this.pie10||I(e,{h:60,l:-20}),this.pie11=this.pie11||I(e,{h:-60,l:-20}),this.pie12=this.pie12||I(e,{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||e,this.quadrant2Fill=this.quadrant2Fill||I(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ka(this.quadrant1Fill)?yt(this.quadrant1Fill):gt(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:((o=this.xyChart)==null?void 0:o.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:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((d=this.xyChart)==null?void 0:d.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((f=this.xyChart)==null?void 0:f.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_=this.xyChart)==null?void 0:_.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,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?gt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||i,this.git2=this.git2||n,this.git3=this.git3||I(e,{h:-30}),this.git4=this.git4||I(e,{h:-60}),this.git5=this.git5||I(e,{h:-90}),this.git6=this.git6||I(e,{h:60}),this.git7=this.git7||I(e,{h:120}),this.darkMode?(this.git0=yt(this.git0,25),this.git1=yt(this.git1,25),this.git2=yt(this.git2,25),this.git3=yt(this.git3,25),this.git4=yt(this.git4,25),this.git5=yt(this.git5,25),this.git6=yt(this.git6,25),this.git7=yt(this.git7,25)):(this.git0=gt(this.git0,25),this.git1=gt(this.git1,25),this.git2=gt(this.git2,25),this.git3=gt(this.git3,25),this.git4=gt(this.git4,25),this.git5=gt(this.git5,25),this.git6=gt(this.git6,25),this.git7=gt(this.git7,25)),this.gitInv0=this.gitInv0||at(this.git0),this.gitInv1=this.gitInv1||at(this.git1),this.gitInv2=this.gitInv2||at(this.git2),this.gitInv3=this.gitInv3||at(this.git3),this.gitInv4=this.gitInv4||at(this.git4),this.gitInv5=this.gitInv5||at(this.git5),this.gitInv6=this.gitInv6||at(this.git6),this.gitInv7=this.gitInv7||at(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||Ka,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xa}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},M(sh,"Theme"),sh),U6=M(r=>{const e=new q6;return e.calculate(r),e},"getThemeVariables"),oh,H6=(oh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=yt(this.primaryColor,16),this.tertiaryColor=I(this.primaryColor,{h:-160}),this.primaryBorderColor=at(this.background),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=at(this.primaryColor),this.secondaryTextColor=at(this.secondaryColor),this.tertiaryTextColor=at(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=yt(at("#323D47"),10),this.border1="#ccc",this.border2=Bo(255,255,255,.25),this.arrowheadColor=at(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 i,n,a,o,c,h,u,d,f,g,b;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||I(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||I(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||at(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||at(this.tertiaryColor),this.lineColor=this.lineColor||at(this.background),this.arrowheadColor=this.arrowheadColor||at(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?gt(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||gt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||at(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||yt(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||I(this.primaryColor,{h:30}),this.cScale4=this.cScale4||I(this.primaryColor,{h:60}),this.cScale5=this.cScale5||I(this.primaryColor,{h:90}),this.cScale6=this.cScale6||I(this.primaryColor,{h:120}),this.cScale7=this.cScale7||I(this.primaryColor,{h:150}),this.cScale8=this.cScale8||I(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||I(this.primaryColor,{h:270}),this.cScale10=this.cScale10||I(this.primaryColor,{h:300}),this.cScale11=this.cScale11||I(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=gt(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=gt(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||at(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||yt(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||gt(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 e=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||I(this.mainBkg,{h:180,s:-15,l:e*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||I(this.mainBkg,{h:180,s:-15,l:e*(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||I(this.primaryColor,{h:64}),this.fillType3=this.fillType3||I(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||I(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||I(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||I(this.primaryColor,{h:128}),this.fillType7=this.fillType7||I(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||I(this.primaryColor,{l:-10}),this.pie5=this.pie5||I(this.secondaryColor,{l:-10}),this.pie6=this.pie6||I(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||I(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||I(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||I(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||I(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||I(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||I(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||I(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ka(this.quadrant1Fill)?yt(this.quadrant1Fill):gt(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:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.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:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((f=this.xyChart)==null?void 0:f.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((b=this.xyChart)==null?void 0:b.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?gt(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=yt(this.git0,25),this.git1=yt(this.git1,25),this.git2=yt(this.git2,25),this.git3=yt(this.git3,25),this.git4=yt(this.git4,25),this.git5=yt(this.git5,25),this.git6=yt(this.git6,25),this.git7=yt(this.git7,25)):(this.git0=gt(this.git0,25),this.git1=gt(this.git1,25),this.git2=gt(this.git2,25),this.git3=gt(this.git3,25),this.git4=gt(this.git4,25),this.git5=gt(this.git5,25),this.git6=gt(this.git6,25),this.git7=gt(this.git7,25)),this.gitInv0=this.gitInv0||at(this.git0),this.gitInv1=this.gitInv1||at(this.git1),this.gitInv2=this.gitInv2||at(this.git2),this.gitInv3=this.gitInv3||at(this.git3),this.gitInv4=this.gitInv4||at(this.git4),this.gitInv5=this.gitInv5||at(this.git5),this.gitInv6=this.gitInv6||at(this.git6),this.gitInv7=this.gitInv7||at(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||Ka,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xa}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},M(oh,"Theme"),oh),G6=M(r=>{const e=new H6;return e.calculate(r),e},"getThemeVariables"),lh,W6=(lh=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=ge("#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 o,c,h,u,d,f,g,b,m,v,_;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||I(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||I(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||at(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||at(this.tertiaryColor),this.lineColor=this.lineColor||at(this.background),this.arrowheadColor=this.arrowheadColor||at(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?gt(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||gt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||at(this.lineColor);const e="#ECECFE",i="#E9E9F1",n=I(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||yt(e,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 C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=this.mainBkg;if(this.darkMode)for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=gt(this["cScale"+C],75);else for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=gt(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||at(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||yt(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||gt(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||I(this.mainBkg,{h:180,s:-15,l:a*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||I(this.mainBkg,{h:180,s:-15,l:a*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||i,this.fillType2=this.fillType2||I(e,{h:64}),this.fillType3=this.fillType3||I(i,{h:64}),this.fillType4=this.fillType4||I(e,{h:-64}),this.fillType5=this.fillType5||I(i,{h:-64}),this.fillType6=this.fillType6||I(e,{h:128}),this.fillType7=this.fillType7||I(i,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||i,this.pie3=this.pie3||n,this.pie4=this.pie4||I(e,{l:-10}),this.pie5=this.pie5||I(i,{l:-10}),this.pie6=this.pie6||I(n,{l:-10}),this.pie7=this.pie7||I(e,{h:60,l:-10}),this.pie8=this.pie8||I(e,{h:-60,l:-10}),this.pie9=this.pie9||I(e,{h:120,l:0}),this.pie10=this.pie10||I(e,{h:60,l:-20}),this.pie11=this.pie11||I(e,{h:-60,l:-20}),this.pie12=this.pie12||I(e,{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||e,this.quadrant2Fill=this.quadrant2Fill||I(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ka(this.quadrant1Fill)?yt(this.quadrant1Fill):gt(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:((o=this.xyChart)==null?void 0:o.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:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((d=this.xyChart)==null?void 0:d.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((f=this.xyChart)==null?void 0:f.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_=this.xyChart)==null?void 0:_.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,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?gt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||e,this.git1=this.git1||i,this.git2=this.git2||n,this.git3=this.git3||I(e,{h:-30}),this.git4=this.git4||I(e,{h:-60}),this.git5=this.git5||I(e,{h:-90}),this.git6=this.git6||I(e,{h:60}),this.git7=this.git7||I(e,{h:120}),this.darkMode?(this.git0=yt(this.git0,25),this.git1=yt(this.git1,25),this.git2=yt(this.git2,25),this.git3=yt(this.git3,25),this.git4=yt(this.git4,25),this.git5=yt(this.git5,25),this.git6=yt(this.git6,25),this.git7=yt(this.git7,25)):(this.git0=gt(this.git0,25),this.git1=gt(this.git1,25),this.git2=gt(this.git2,25),this.git3=gt(this.git3,25),this.git4=gt(this.git4,25),this.git5=gt(this.git5,25),this.git6=gt(this.git6,25),this.git7=gt(this.git7,25)),this.gitInv0=this.gitInv0||at(this.git0),this.gitInv1=this.gitInv1||at(this.git1),this.gitInv2=this.gitInv2||at(this.git2),this.gitInv3=this.gitInv3||at(this.git3),this.gitInv4=this.gitInv4||at(this.git4),this.gitInv5=this.gitInv5||at(this.git5),this.gitInv6=this.gitInv6||at(this.git6),this.gitInv7=this.gitInv7||at(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||Ka,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xa}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},M(lh,"Theme"),lh),Y6=M(r=>{const e=new W6;return e.calculate(r),e},"getThemeVariables"),ch,V6=(ch=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=yt(this.primaryColor,16),this.tertiaryColor=I(this.primaryColor,{h:-160}),this.primaryBorderColor=at(this.background),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=at(this.primaryColor),this.secondaryTextColor=at(this.secondaryColor),this.tertiaryTextColor=at(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=yt(at("#323D47"),10),this.border1="#ccc",this.border2=Bo(255,255,255,.25),this.arrowheadColor=at(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 i,n,a,o,c,h,u,d,f,g,b;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||I(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||I(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||at(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||at(this.tertiaryColor),this.lineColor=this.lineColor||at(this.background),this.arrowheadColor=this.arrowheadColor||at(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?gt(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||gt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||at(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||yt(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||I(this.primaryColor,{h:30}),this.cScale4=this.cScale4||I(this.primaryColor,{h:60}),this.cScale5=this.cScale5||I(this.primaryColor,{h:90}),this.cScale6=this.cScale6||I(this.primaryColor,{h:120}),this.cScale7=this.cScale7||I(this.primaryColor,{h:150}),this.cScale8=this.cScale8||I(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||I(this.primaryColor,{h:270}),this.cScale10=this.cScale10||I(this.primaryColor,{h:300}),this.cScale11=this.cScale11||I(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=gt(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=gt(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||at(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||yt(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||gt(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 e=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||I(this.mainBkg,{h:180,s:-15,l:e*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||I(this.mainBkg,{h:180,s:-15,l:e*(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||I(this.primaryColor,{h:64}),this.fillType3=this.fillType3||I(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||I(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||I(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||I(this.primaryColor,{h:128}),this.fillType7=this.fillType7||I(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||I(this.primaryColor,{l:-10}),this.pie5=this.pie5||I(this.secondaryColor,{l:-10}),this.pie6=this.pie6||I(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||I(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||I(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||I(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||I(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||I(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||I(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||I(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ka(this.quadrant1Fill)?yt(this.quadrant1Fill):gt(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:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.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:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((f=this.xyChart)==null?void 0:f.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((b=this.xyChart)==null?void 0:b.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?gt(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||I(this.primaryColor,{h:-30}),this.git4=this.git4||I(this.primaryColor,{h:-60}),this.git5=this.git5||I(this.primaryColor,{h:-90}),this.git6=this.git6||I(this.primaryColor,{h:60}),this.git7=this.git7||I(this.primaryColor,{h:120}),this.darkMode?(this.git0=yt(this.git0,25),this.git1=yt(this.git1,25),this.git2=yt(this.git2,25),this.git3=yt(this.git3,25),this.git4=yt(this.git4,25),this.git5=yt(this.git5,25),this.git6=yt(this.git6,25),this.git7=yt(this.git7,25)):(this.git0=gt(this.git0,25),this.git1=gt(this.git1,25),this.git2=gt(this.git2,25),this.git3=gt(this.git3,25),this.git4=gt(this.git4,25),this.git5=gt(this.git5,25),this.git6=gt(this.git6,25),this.git7=gt(this.git7,25)),this.gitInv0=this.gitInv0||at(this.git0),this.gitInv1=this.gitInv1||at(this.git1),this.gitInv2=this.gitInv2||at(this.git2),this.gitInv3=this.gitInv3||at(this.git3),this.gitInv4=this.gitInv4||at(this.git4),this.gitInv5=this.gitInv5||at(this.git5),this.gitInv6=this.gitInv6||at(this.git6),this.gitInv7=this.gitInv7||at(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||Ka,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xa}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},M(ch,"Theme"),ch),K6=M(r=>{const e=new V6;return e.calculate(r),e},"getThemeVariables"),hh,X6=(hh=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=ge(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 o,c,h,u,d,f,g,b,m,v,_;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||I(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||I(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||at(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||at(this.tertiaryColor),this.lineColor=this.lineColor||at(this.background),this.arrowheadColor=this.arrowheadColor||at(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?gt(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||gt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||at(this.lineColor);const e="#ECECFE",i="#E9E9F1",n=I(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||yt(e,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 C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||at(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||yt(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||gt(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||I(this.mainBkg,{h:180,s:-15,l:a*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||I(this.mainBkg,{h:180,s:-15,l:a*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||i,this.fillType2=this.fillType2||I(e,{h:64}),this.fillType3=this.fillType3||I(i,{h:64}),this.fillType4=this.fillType4||I(e,{h:-64}),this.fillType5=this.fillType5||I(i,{h:-64}),this.fillType6=this.fillType6||I(e,{h:128}),this.fillType7=this.fillType7||I(i,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||i,this.pie3=this.pie3||n,this.pie4=this.pie4||I(e,{l:-10}),this.pie5=this.pie5||I(i,{l:-10}),this.pie6=this.pie6||I(n,{l:-10}),this.pie7=this.pie7||I(e,{h:60,l:-10}),this.pie8=this.pie8||I(e,{h:-60,l:-10}),this.pie9=this.pie9||I(e,{h:120,l:0}),this.pie10=this.pie10||I(e,{h:60,l:-20}),this.pie11=this.pie11||I(e,{h:-60,l:-20}),this.pie12=this.pie12||I(e,{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||e,this.quadrant2Fill=this.quadrant2Fill||I(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ka(this.quadrant1Fill)?yt(this.quadrant1Fill):gt(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:((o=this.xyChart)==null?void 0:o.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:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((d=this.xyChart)==null?void 0:d.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((f=this.xyChart)==null?void 0:f.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_=this.xyChart)==null?void 0:_.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,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?gt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||i,this.git2=this.git2||n,this.git3=this.git3||I(e,{h:-30}),this.git4=this.git4||I(e,{h:-60}),this.git5=this.git5||I(e,{h:-90}),this.git6=this.git6||I(e,{h:60}),this.git7=this.git7||I(e,{h:120}),this.darkMode?(this.git0=yt(this.git0,25),this.git1=yt(this.git1,25),this.git2=yt(this.git2,25),this.git3=yt(this.git3,25),this.git4=yt(this.git4,25),this.git5=yt(this.git5,25),this.git6=yt(this.git6,25),this.git7=yt(this.git7,25)):(this.git0=gt(this.git0,25),this.git1=gt(this.git1,25),this.git2=gt(this.git2,25),this.git3=gt(this.git3,25),this.git4=gt(this.git4,25),this.git5=gt(this.git5,25),this.git6=gt(this.git6,25),this.git7=gt(this.git7,25)),this.gitInv0=this.gitInv0||at(this.git0),this.gitInv1=this.gitInv1||at(this.git1),this.gitInv2=this.gitInv2||at(this.git2),this.gitInv3=this.gitInv3||at(this.git3),this.gitInv4=this.gitInv4||at(this.git4),this.gitInv5=this.gitInv5||at(this.git5),this.gitInv6=this.gitInv6||at(this.git6),this.gitInv7=this.gitInv7||at(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||Ka,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xa}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},M(hh,"Theme"),hh),Z6=M(r=>{const e=new X6;return e.calculate(r),e},"getThemeVariables"),uh,Q6=(uh=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=yt(this.primaryColor,16),this.tertiaryColor=I(this.primaryColor,{h:-160}),this.primaryBorderColor=at(this.background),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=at(this.primaryColor),this.secondaryTextColor=at(this.secondaryColor),this.tertiaryTextColor=at(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=yt(at("#323D47"),10),this.border1="#ccc",this.border2=Bo(255,255,255,.25),this.arrowheadColor=at(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 i,n,a,o,c,h,u,d,f,g,b;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||I(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||I(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||at(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||at(this.tertiaryColor),this.lineColor=this.lineColor||at(this.background),this.arrowheadColor=this.arrowheadColor||at(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?gt(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||gt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||at(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||yt(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]||at(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||yt(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||gt(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=gt(this["cScale"+m],75);const e=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||I(this.mainBkg,{h:180,s:-15,l:e*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||I(this.mainBkg,{h:180,s:-15,l:e*(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||I(this.primaryColor,{h:64}),this.fillType3=this.fillType3||I(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||I(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||I(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||I(this.primaryColor,{h:128}),this.fillType7=this.fillType7||I(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||I(this.primaryColor,{l:-10}),this.pie5=this.pie5||I(this.secondaryColor,{l:-10}),this.pie6=this.pie6||I(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||I(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||I(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||I(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||I(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||I(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||I(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||I(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||I(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||I(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||I(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||I(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||I(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ka(this.quadrant1Fill)?yt(this.quadrant1Fill):gt(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:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.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:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((f=this.xyChart)==null?void 0:f.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((b=this.xyChart)==null?void 0:b.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?gt(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||I(this.primaryColor,{h:-30}),this.git4=this.git4||I(this.primaryColor,{h:-60}),this.git5=this.git5||I(this.primaryColor,{h:-90}),this.git6=this.git6||I(this.primaryColor,{h:60}),this.git7=this.git7||I(this.primaryColor,{h:120}),this.darkMode?(this.git0=yt(this.git0,25),this.git1=yt(this.git1,25),this.git2=yt(this.git2,25),this.git3=yt(this.git3,25),this.git4=yt(this.git4,25),this.git5=yt(this.git5,25),this.git6=yt(this.git6,25),this.git7=yt(this.git7,25)):(this.git0=gt(this.git0,25),this.git1=gt(this.git1,25),this.git2=gt(this.git2,25),this.git3=gt(this.git3,25),this.git4=gt(this.git4,25),this.git5=gt(this.git5,25),this.git6=gt(this.git6,25),this.git7=gt(this.git7,25)),this.gitInv0=this.gitInv0||at(this.git0),this.gitInv1=this.gitInv1||at(this.git1),this.gitInv2=this.gitInv2||at(this.git2),this.gitInv3=this.gitInv3||at(this.git3),this.gitInv4=this.gitInv4||at(this.git4),this.gitInv5=this.gitInv5||at(this.git5),this.gitInv6=this.gitInv6||at(this.git6),this.gitInv7=this.gitInv7||at(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||Ka,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xa}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(n=>{this[n]=e[n]}),this.updateColors(),i.forEach(n=>{this[n]=e[n]})}},M(uh,"Theme"),uh),J6=M(r=>{const e=new Q6;return e.calculate(r),e},"getThemeVariables"),Ms={base:{getThemeVariables:O6},dark:{getThemeVariables:D6},default:{getThemeVariables:j6},forest:{getThemeVariables:$6},neutral:{getThemeVariables:P6},neo:{getThemeVariables:U6},"neo-dark":{getThemeVariables:G6},redux:{getThemeVariables:Y6},"redux-dark":{getThemeVariables:K6},"redux-color":{getThemeVariables:Z6},"redux-dark-color":{getThemeVariables:J6}},En={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},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:""},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},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},yM={...En,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ms.default.getThemeVariables(),sequence:{...En.sequence,messageFont:M(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:M(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:M(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...En.gantt,tickInterval:void 0,useWidth:void 0},c4:{...En.c4,useWidth:void 0,personFont:M(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...En.flowchart,inheritDir:!1},external_personFont:M(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:M(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:M(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:M(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:M(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:M(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:M(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:M(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:M(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:M(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:M(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:M(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:M(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:M(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:M(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:M(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:M(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:M(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:M(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:M(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:M(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...En.pie,useWidth:984},xyChart:{...En.xyChart,useWidth:void 0},requirement:{...En.requirement,useWidth:void 0},packet:{...En.packet},treeView:{...En.treeView,useWidth:void 0},radar:{...En.radar},ishikawa:{...En.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...En.venn}},bM=M((r,e="")=>Object.keys(r).reduce((i,n)=>Array.isArray(r[n])?i:typeof r[n]=="object"&&r[n]!==null?[...i,e+n,...bM(r[n],"")]:[...i,e+n],[]),"keyify"),t$=new Set(bM(yM,"")),xM=yM,ng=M(r=>{if(Tt.debug("sanitizeDirective called with",r),!(typeof r!="object"||r==null)){if(Array.isArray(r)){r.forEach(e=>ng(e));return}for(const e of Object.keys(r)){if(Tt.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!t$.has(e)||r[e]==null){Tt.debug("sanitize deleting key: ",e),delete r[e];continue}if(typeof r[e]=="object"){Tt.debug("sanitizing object",e),ng(r[e]);continue}const i=["themeCSS","fontFamily","altFontFamily"];for(const n of i)e.includes(n)&&(Tt.debug("sanitizing css option",e),r[e]=e$(r[e]))}if(r.themeVariables)for(const e of Object.keys(r.themeVariables)){const i=r.themeVariables[e];i!=null&&i.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(r.themeVariables[e]="")}Tt.debug("After sanitization",r)}},"sanitizeDirective"),e$=M(r=>{let e=0,i=0;for(const n of r){if(e<i)return"{ /* ERROR: Unbalanced CSS */ }";n==="{"?e++:n==="}"&&i++}return e!==i?"{ /* ERROR: Unbalanced CSS */ }":r},"sanitizeCss"),ph=Object.freeze(xM),Fs=M(r=>!(r===!1||["false","null","0"].includes(String(r).trim().toLowerCase())),"evaluate"),fn=ci({},ph),ag,Rl=[],nd=ci({},ph),Zg=M((r,e)=>{let i=ci({},r),n={};for(const a of e)CM(a),n=ci(n,a);if(i=ci(i,n),n.theme&&n.theme in Ms){const a=ci({},ag),o=ci(a.themeVariables||{},n.themeVariables);i.theme&&i.theme in Ms&&(i.themeVariables=Ms[i.theme].getThemeVariables(o))}return nd=i,wM(nd),nd},"updateCurrentConfig"),r$=M(r=>(fn=ci({},ph),fn=ci(fn,r),r.theme&&Ms[r.theme]&&(fn.themeVariables=Ms[r.theme].getThemeVariables(r.themeVariables)),Zg(fn,Rl),fn),"setSiteConfig"),i$=M(r=>{ag=ci({},r)},"saveConfigFromInitialize"),n$=M(r=>(fn=ci(fn,r),Zg(fn,Rl),fn),"updateSiteConfig"),vM=M(()=>ci({},fn),"getSiteConfig"),_M=M(r=>(wM(r),ci(nd,r),Lr()),"setConfig"),Lr=M(()=>ci({},nd),"getConfig"),CM=M(r=>{r&&(["secure",...fn.secure??[]].forEach(e=>{Object.hasOwn(r,e)&&(Tt.debug(`Denied attempt to modify a secure key ${e}`,r[e]),delete r[e])}),Object.keys(r).forEach(e=>{e.startsWith("__")&&delete r[e]}),Object.keys(r).forEach(e=>{typeof r[e]=="string"&&(r[e].includes("<")||r[e].includes(">")||r[e].includes("url(data:"))&&delete r[e],typeof r[e]=="object"&&CM(r[e])}))},"sanitize"),a$=M(r=>{var e;ng(r),r.fontFamily&&!((e=r.themeVariables)!=null&&e.fontFamily)&&(r.themeVariables={...r.themeVariables,fontFamily:r.fontFamily}),Rl.push(r),Zg(fn,Rl)},"addDirective"),sg=M((r=fn)=>{Rl=[],Zg(r,Rl)},"reset"),s$={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."},hS={},kM=M(r=>{hS[r]||(Tt.warn(s$[r]),hS[r]=!0)},"issueWarning"),wM=M(r=>{r&&(r.lazyLoadedDiagrams||r.loadExternalDiagramsAtStartup)&&kM("LAZY_LOAD_DEPRECATED")},"checkConfig"),dst=M(()=>{let r={};ag&&(r=ci(r,ag));for(const e of Rl)r=ci(r,e);return r},"getUserDefinedConfig"),Qi=M(r=>{var e,i;return((e=r.flowchart)==null?void 0:e.htmlLabels)!=null&&kM("FLOWCHART_HTML_LABELS_DEPRECATED"),Fs(r.htmlLabels??((i=r.flowchart)==null?void 0:i.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Id=/<br\s*\/?>/gi,o$=M(r=>r?EM(r).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),l$=(()=>{let r=!1;return()=>{r||(SM(),r=!0)}})();function SM(){const r="data-temp-href-target";Ll.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(r,e.getAttribute("target")??"")}),Ll.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(r)&&(e.setAttribute("target",e.getAttribute(r)??""),e.removeAttribute(r),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}M(SM,"setupDompurifyHooks");var TM=M(r=>(l$(),Ll.sanitize(r)),"removeScript"),uS=M((r,e)=>{if(Qi(e)){const i=e.securityLevel;i==="antiscript"||i==="strict"||i==="sandbox"?r=TM(r):i!=="loose"&&(r=EM(r),r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"),r=r.replace(/=/g,"&equals;"),r=d$(r))}return r},"sanitizeMore"),_a=M((r,e)=>r&&(e.dompurifyConfig?r=Ll.sanitize(uS(r,e),e.dompurifyConfig).toString():r=Ll.sanitize(uS(r,e),{FORBID_TAGS:["style"]}).toString(),r),"sanitizeText"),c$=M((r,e)=>typeof r=="string"?_a(r,e):r.flat().map(i=>_a(i,e)),"sanitizeTextOrArray"),h$=M(r=>Id.test(r),"hasBreaks"),u$=M(r=>r.split(Id),"splitBreaks"),d$=M(r=>r.replace(/#br#/g,"<br/>"),"placeholderToBreak"),EM=M(r=>r.replace(Id,"#br#"),"breakToPlaceholder"),f$=M(r=>{let e="";return r&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),p$=M(function(...r){const e=r.filter(i=>!isNaN(i));return Math.max(...e)},"getMax"),g$=M(function(...r){const e=r.filter(i=>!isNaN(i));return Math.min(...e)},"getMin"),dS=M(function(r){const e=r.split(/(,)/),i=[];for(let n=0;n<e.length;n++){let a=e[n];if(a===","&&n>0&&n+1<e.length){const o=e[n-1],c=e[n+1];m$(o,c)&&(a=o+","+c,n++,i.pop())}i.push(y$(a))}return i.join("")},"parseGenericTypes"),Ix=M((r,e)=>Math.max(0,r.split(e).length-1),"countOccurrence"),m$=M((r,e)=>{const i=Ix(r,"~"),n=Ix(e,"~");return i===1&&n===1},"shouldCombineSets"),y$=M(r=>{const e=Ix(r,"~");let i=!1;if(e<=1)return r;e%2!==0&&r.startsWith("~")&&(r=r.substring(1),i=!0);const n=[...r];let a=n.indexOf("~"),o=n.lastIndexOf("~");for(;a!==-1&&o!==-1&&a!==o;)n[a]="<",n[o]=">",a=n.indexOf("~"),o=n.lastIndexOf("~");return i&&n.unshift("~"),n.join("")},"processSet"),fS=M(()=>window.MathMLElement!==void 0,"isMathMLSupported"),$x=/\$\$(.*)\$\$/g,pd=M(r=>{var e;return(((e=r.match($x))==null?void 0:e.length)??0)>0},"hasKatex"),fst=M(async(r,e)=>{const i=document.createElement("div");i.innerHTML=await AM(r,e),i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0";const n=document.querySelector("body");n==null||n.insertAdjacentElement("beforeend",i);const a={width:i.clientWidth,height:i.clientHeight};return i.remove(),a},"calculateMathMLDimensions"),b$=M(async(r,e)=>{if(!pd(r))return r;if(!(fS()||e.legacyMathML||e.forceLegacyMathML))return r.replace($x,"MathML is unsupported in this environment.");{const{default:i}=await ze(async()=>{const{default:a}=await import("./katex-DkKDou_j.js");return{default:a}},[]),n=e.forceLegacyMathML||!fS()&&e.legacyMathML?"htmlAndMathml":"mathml";return r.split(Id).map(a=>pd(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace($x,(a,o)=>i.renderToString(o,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),AM=M(async(r,e)=>_a(await b$(r,e),e),"renderKatexSanitized"),$d={getRows:o$,sanitizeText:_a,sanitizeTextOrArray:c$,hasBreaks:h$,splitBreaks:u$,lineBreakRegex:Id,removeScript:TM,getUrl:f$,evaluate:Fs,getMax:p$,getMin:g$},x$=M(function(r,e){for(let i of e)r.attr(i[0],i[1])},"d3Attrs"),v$=M(function(r,e,i){let n=new Map;return i?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",r),n.set("width",e)),n},"calculateSvgSizeAttrs"),NM=M(function(r,e,i,n){const a=v$(e,i,n);x$(r,a)},"configureSvgSize"),_$=M(function(r,e,i,n){const a=e.node().getBBox(),o=a.width,c=a.height;Tt.info(`SVG bounds: ${o}x${c}`,a);let h=0,u=0;Tt.info(`Graph bounds: ${h}x${u}`,r),h=o+i*2,u=c+i*2,Tt.info(`Calculated bounds: ${h}x${u}`),NM(e,u,h,n);const d=`${a.x-i} ${a.y-i} ${a.width+2*i} ${a.height+2*i}`;e.attr("viewBox",d)},"setupGraphViewbox"),zp={},C$=M((r,e,i,n)=>{let a="";return r in zp&&zp[r]?a=zp[r]({...i,svgId:n}):Tt.warn(`No theme found for ${r}`),` & {
109
+ font-family: ${i.fontFamily};
110
+ font-size: ${i.fontSize};
111
+ fill: ${i.textColor}
112
+ }
113
+ @keyframes edge-animation-frame {
114
+ from {
115
+ stroke-dashoffset: 0;
116
+ }
117
+ }
118
+ @keyframes dash {
119
+ to {
120
+ stroke-dashoffset: 0;
121
+ }
122
+ }
123
+ & .edge-animation-slow {
124
+ stroke-dasharray: 9,5 !important;
125
+ stroke-dashoffset: 900;
126
+ animation: dash 50s linear infinite;
127
+ stroke-linecap: round;
128
+ }
129
+ & .edge-animation-fast {
130
+ stroke-dasharray: 9,5 !important;
131
+ stroke-dashoffset: 900;
132
+ animation: dash 20s linear infinite;
133
+ stroke-linecap: round;
134
+ }
135
+ /* Classes common for multiple diagrams */
136
+
137
+ & .error-icon {
138
+ fill: ${i.errorBkgColor};
139
+ }
140
+ & .error-text {
141
+ fill: ${i.errorTextColor};
142
+ stroke: ${i.errorTextColor};
143
+ }
144
+
145
+ & .edge-thickness-normal {
146
+ stroke-width: ${i.strokeWidth??1}px;
147
+ }
148
+ & .edge-thickness-thick {
149
+ stroke-width: 3.5px
150
+ }
151
+ & .edge-pattern-solid {
152
+ stroke-dasharray: 0;
153
+ }
154
+ & .edge-thickness-invisible {
155
+ stroke-width: 0;
156
+ fill: none;
157
+ }
158
+ & .edge-pattern-dashed{
159
+ stroke-dasharray: 3;
160
+ }
161
+ .edge-pattern-dotted {
162
+ stroke-dasharray: 2;
163
+ }
164
+
165
+ & .marker {
166
+ fill: ${i.lineColor};
167
+ stroke: ${i.lineColor};
168
+ }
169
+ & .marker.cross {
170
+ stroke: ${i.lineColor};
171
+ }
172
+
173
+ & svg {
174
+ font-family: ${i.fontFamily};
175
+ font-size: ${i.fontSize};
176
+ }
177
+ & p {
178
+ margin: 0
179
+ }
180
+
181
+ ${a}
182
+ .node .neo-node {
183
+ stroke: ${i.nodeBorder};
184
+ }
185
+
186
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
187
+ stroke: ${i.useGradient?"url("+n+"-gradient)":i.nodeBorder};
188
+ filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
189
+ }
190
+
191
+
192
+ [data-look="neo"].node path {
193
+ stroke: ${i.useGradient?"url("+n+"-gradient)":i.nodeBorder};
194
+ stroke-width: ${i.strokeWidth??1}px;
195
+ }
196
+
197
+ [data-look="neo"].node .outer-path {
198
+ filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
199
+ }
200
+
201
+ [data-look="neo"].node .neo-line path {
202
+ stroke: ${i.nodeBorder};
203
+ filter: none;
204
+ }
205
+
206
+ [data-look="neo"].node circle{
207
+ stroke: ${i.useGradient?"url("+n+"-gradient)":i.nodeBorder};
208
+ filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
209
+ }
210
+
211
+ [data-look="neo"].node circle .state-start{
212
+ fill: #000000;
213
+ }
214
+
215
+ [data-look="neo"].icon-shape .icon {
216
+ fill: ${i.useGradient?"url("+n+"-gradient)":i.nodeBorder};
217
+ filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
218
+ }
219
+
220
+ [data-look="neo"].icon-shape .icon-neo path {
221
+ stroke: ${i.useGradient?"url("+n+"-gradient)":i.nodeBorder};
222
+ filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
223
+ }
224
+
225
+ ${e}
226
+ `},"getStyles"),k$=M((r,e)=>{e!==void 0&&(zp[r]=e)},"addStylesForDiagram"),w$=C$,MM={};C6(MM,{clear:()=>S$,getAccDescription:()=>N$,getAccTitle:()=>E$,getDiagramTitle:()=>B$,setAccDescription:()=>A$,setAccTitle:()=>T$,setDiagramTitle:()=>M$});var w1="",S1="",T1="",E1=M(r=>_a(r,Lr()),"sanitizeText"),S$=M(()=>{w1="",T1="",S1=""},"clear"),T$=M(r=>{w1=E1(r).replace(/^\s+/g,"")},"setAccTitle"),E$=M(()=>w1,"getAccTitle"),A$=M(r=>{T1=E1(r).replace(/\n\s+/g,`
227
+ `)},"setAccDescription"),N$=M(()=>T1,"getAccDescription"),M$=M(r=>{S1=E1(r)},"setDiagramTitle"),B$=M(()=>S1,"getDiagramTitle"),pS=Tt,L$=C1,Ke=Lr,pst=_M,gst=ph,A1=M(r=>_a(r,Ke()),"sanitizeText"),O$=_$,R$=M(()=>MM,"getCommonDb"),og={},lg=M((r,e,i)=>{var n;og[r]&&pS.warn(`Diagram with id ${r} already registered. Overwriting.`),og[r]=e,i&&mM(r,i),k$(r,e.styles),(n=e.injectUtils)==null||n.call(e,pS,L$,Ke,A1,O$,R$(),()=>{})},"registerDiagram"),zx=M(r=>{if(r in og)return og[r];throw new D$(r)},"getDiagram"),dh,D$=(dh=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},M(dh,"DiagramNotFoundError"),dh);class gS extends Map{constructor(e,i=I$){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:i}}),e!=null)for(const[n,a]of e)this.set(n,a)}get(e){return super.get(mS(this,e))}has(e){return super.has(mS(this,e))}set(e,i){return super.set(F$(this,e),i)}delete(e){return super.delete(j$(this,e))}}function mS({_intern:r,_key:e},i){const n=e(i);return r.has(n)?r.get(n):i}function F$({_intern:r,_key:e},i){const n=e(i);return r.has(n)?r.get(n):(r.set(n,i),i)}function j$({_intern:r,_key:e},i){const n=e(i);return r.has(n)&&(i=r.get(n),r.delete(n)),i}function I$(r){return r!==null&&typeof r=="object"?r.valueOf():r}function yS(r,e){let i;if(e===void 0)for(const n of r)n!=null&&(i<n||i===void 0&&n>=n)&&(i=n);else{let n=-1;for(let a of r)(a=e(a,++n,r))!=null&&(i<a||i===void 0&&a>=a)&&(i=a)}return i}function bS(r,e){let i;if(e===void 0)for(const n of r)n!=null&&(i>n||i===void 0&&n>=n)&&(i=n);else{let n=-1;for(let a of r)(a=e(a,++n,r))!=null&&(i>a||i===void 0&&a>=a)&&(i=a)}return i}function $$(r,e){let i=0;for(let n of r)(n=+n)&&(i+=n);return i}var z$={value:()=>{}};function zd(){for(var r=0,e=arguments.length,i={},n;r<e;++r){if(!(n=arguments[r]+"")||n in i||/[\s.]/.test(n))throw new Error("illegal type: "+n);i[n]=[]}return new Pp(i)}function Pp(r){this._=r}function P$(r,e){return r.trim().split(/^|\s+/).map(function(i){var n="",a=i.indexOf(".");if(a>=0&&(n=i.slice(a+1),i=i.slice(0,a)),i&&!e.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:n}})}Pp.prototype=zd.prototype={constructor:Pp,on:function(r,e){var i=this._,n=P$(r+"",i),a,o=-1,c=n.length;if(arguments.length<2){for(;++o<c;)if((a=(r=n[o]).type)&&(a=q$(i[a],r.name)))return a;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<c;)if(a=(r=n[o]).type)i[a]=xS(i[a],r.name,e);else if(e==null)for(a in i)i[a]=xS(i[a],r.name,null);return this},copy:function(){var r={},e=this._;for(var i in e)r[i]=e[i].slice();return new Pp(r)},call:function(r,e){if((a=arguments.length-2)>0)for(var i=new Array(a),n=0,a,o;n<a;++n)i[n]=arguments[n+2];if(!this._.hasOwnProperty(r))throw new Error("unknown type: "+r);for(o=this._[r],n=0,a=o.length;n<a;++n)o[n].value.apply(e,i)},apply:function(r,e,i){if(!this._.hasOwnProperty(r))throw new Error("unknown type: "+r);for(var n=this._[r],a=0,o=n.length;a<o;++a)n[a].value.apply(e,i)}};function q$(r,e){for(var i=0,n=r.length,a;i<n;++i)if((a=r[i]).name===e)return a.value}function xS(r,e,i){for(var n=0,a=r.length;n<a;++n)if(r[n].name===e){r[n]=z$,r=r.slice(0,n).concat(r.slice(n+1));break}return i!=null&&r.push({name:e,value:i}),r}var Px="http://www.w3.org/1999/xhtml";const vS={svg:"http://www.w3.org/2000/svg",xhtml:Px,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Qg(r){var e=r+="",i=e.indexOf(":");return i>=0&&(e=r.slice(0,i))!=="xmlns"&&(r=r.slice(i+1)),vS.hasOwnProperty(e)?{space:vS[e],local:r}:r}function U$(r){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===Px&&e.documentElement.namespaceURI===Px?e.createElement(r):e.createElementNS(i,r)}}function H$(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function BM(r){var e=Qg(r);return(e.local?H$:U$)(e)}function G$(){}function N1(r){return r==null?G$:function(){return this.querySelector(r)}}function W$(r){typeof r!="function"&&(r=N1(r));for(var e=this._groups,i=e.length,n=new Array(i),a=0;a<i;++a)for(var o=e[a],c=o.length,h=n[a]=new Array(c),u,d,f=0;f<c;++f)(u=o[f])&&(d=r.call(u,u.__data__,f,o))&&("__data__"in u&&(d.__data__=u.__data__),h[f]=d);return new Bn(n,this._parents)}function Y$(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function V$(){return[]}function LM(r){return r==null?V$:function(){return this.querySelectorAll(r)}}function K$(r){return function(){return Y$(r.apply(this,arguments))}}function X$(r){typeof r=="function"?r=K$(r):r=LM(r);for(var e=this._groups,i=e.length,n=[],a=[],o=0;o<i;++o)for(var c=e[o],h=c.length,u,d=0;d<h;++d)(u=c[d])&&(n.push(r.call(u,u.__data__,d,c)),a.push(u));return new Bn(n,a)}function OM(r){return function(){return this.matches(r)}}function RM(r){return function(e){return e.matches(r)}}var Z$=Array.prototype.find;function Q$(r){return function(){return Z$.call(this.children,r)}}function J$(){return this.firstElementChild}function tz(r){return this.select(r==null?J$:Q$(typeof r=="function"?r:RM(r)))}var ez=Array.prototype.filter;function rz(){return Array.from(this.children)}function iz(r){return function(){return ez.call(this.children,r)}}function nz(r){return this.selectAll(r==null?rz:iz(typeof r=="function"?r:RM(r)))}function az(r){typeof r!="function"&&(r=OM(r));for(var e=this._groups,i=e.length,n=new Array(i),a=0;a<i;++a)for(var o=e[a],c=o.length,h=n[a]=[],u,d=0;d<c;++d)(u=o[d])&&r.call(u,u.__data__,d,o)&&h.push(u);return new Bn(n,this._parents)}function DM(r){return new Array(r.length)}function sz(){return new Bn(this._enter||this._groups.map(DM),this._parents)}function cg(r,e){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=e}cg.prototype={constructor:cg,appendChild:function(r){return this._parent.insertBefore(r,this._next)},insertBefore:function(r,e){return this._parent.insertBefore(r,e)},querySelector:function(r){return this._parent.querySelector(r)},querySelectorAll:function(r){return this._parent.querySelectorAll(r)}};function oz(r){return function(){return r}}function lz(r,e,i,n,a,o){for(var c=0,h,u=e.length,d=o.length;c<d;++c)(h=e[c])?(h.__data__=o[c],n[c]=h):i[c]=new cg(r,o[c]);for(;c<u;++c)(h=e[c])&&(a[c]=h)}function cz(r,e,i,n,a,o,c){var h,u,d=new Map,f=e.length,g=o.length,b=new Array(f),m;for(h=0;h<f;++h)(u=e[h])&&(b[h]=m=c.call(u,u.__data__,h,e)+"",d.has(m)?a[h]=u:d.set(m,u));for(h=0;h<g;++h)m=c.call(r,o[h],h,o)+"",(u=d.get(m))?(n[h]=u,u.__data__=o[h],d.delete(m)):i[h]=new cg(r,o[h]);for(h=0;h<f;++h)(u=e[h])&&d.get(b[h])===u&&(a[h]=u)}function hz(r){return r.__data__}function uz(r,e){if(!arguments.length)return Array.from(this,hz);var i=e?cz:lz,n=this._parents,a=this._groups;typeof r!="function"&&(r=oz(r));for(var o=a.length,c=new Array(o),h=new Array(o),u=new Array(o),d=0;d<o;++d){var f=n[d],g=a[d],b=g.length,m=dz(r.call(f,f&&f.__data__,d,n)),v=m.length,_=h[d]=new Array(v),C=c[d]=new Array(v),w=u[d]=new Array(b);i(f,g,_,C,w,m,e);for(var T=0,E=0,N,O;T<v;++T)if(N=_[T]){for(T>=E&&(E=T+1);!(O=C[E])&&++E<v;);N._next=O||null}}return c=new Bn(c,n),c._enter=h,c._exit=u,c}function dz(r){return typeof r=="object"&&"length"in r?r:Array.from(r)}function fz(){return new Bn(this._exit||this._groups.map(DM),this._parents)}function pz(r,e,i){var n=this.enter(),a=this,o=this.exit();return typeof r=="function"?(n=r(n),n&&(n=n.selection())):n=n.append(r+""),e!=null&&(a=e(a),a&&(a=a.selection())),i==null?o.remove():i(o),n&&a?n.merge(a).order():a}function gz(r){for(var e=r.selection?r.selection():r,i=this._groups,n=e._groups,a=i.length,o=n.length,c=Math.min(a,o),h=new Array(a),u=0;u<c;++u)for(var d=i[u],f=n[u],g=d.length,b=h[u]=new Array(g),m,v=0;v<g;++v)(m=d[v]||f[v])&&(b[v]=m);for(;u<a;++u)h[u]=i[u];return new Bn(h,this._parents)}function mz(){for(var r=this._groups,e=-1,i=r.length;++e<i;)for(var n=r[e],a=n.length-1,o=n[a],c;--a>=0;)(c=n[a])&&(o&&c.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(c,o),o=c);return this}function yz(r){r||(r=bz);function e(g,b){return g&&b?r(g.__data__,b.__data__):!g-!b}for(var i=this._groups,n=i.length,a=new Array(n),o=0;o<n;++o){for(var c=i[o],h=c.length,u=a[o]=new Array(h),d,f=0;f<h;++f)(d=c[f])&&(u[f]=d);u.sort(e)}return new Bn(a,this._parents).order()}function bz(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function xz(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function vz(){return Array.from(this)}function _z(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var n=r[e],a=0,o=n.length;a<o;++a){var c=n[a];if(c)return c}return null}function Cz(){let r=0;for(const e of this)++r;return r}function kz(){return!this.node()}function wz(r){for(var e=this._groups,i=0,n=e.length;i<n;++i)for(var a=e[i],o=0,c=a.length,h;o<c;++o)(h=a[o])&&r.call(h,h.__data__,o,a);return this}function Sz(r){return function(){this.removeAttribute(r)}}function Tz(r){return function(){this.removeAttributeNS(r.space,r.local)}}function Ez(r,e){return function(){this.setAttribute(r,e)}}function Az(r,e){return function(){this.setAttributeNS(r.space,r.local,e)}}function Nz(r,e){return function(){var i=e.apply(this,arguments);i==null?this.removeAttribute(r):this.setAttribute(r,i)}}function Mz(r,e){return function(){var i=e.apply(this,arguments);i==null?this.removeAttributeNS(r.space,r.local):this.setAttributeNS(r.space,r.local,i)}}function Bz(r,e){var i=Qg(r);if(arguments.length<2){var n=this.node();return i.local?n.getAttributeNS(i.space,i.local):n.getAttribute(i)}return this.each((e==null?i.local?Tz:Sz:typeof e=="function"?i.local?Mz:Nz:i.local?Az:Ez)(i,e))}function FM(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function Lz(r){return function(){this.style.removeProperty(r)}}function Oz(r,e,i){return function(){this.style.setProperty(r,e,i)}}function Rz(r,e,i){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(r):this.style.setProperty(r,n,i)}}function Dz(r,e,i){return arguments.length>1?this.each((e==null?Lz:typeof e=="function"?Rz:Oz)(r,e,i??"")):gh(this.node(),r)}function gh(r,e){return r.style.getPropertyValue(e)||FM(r).getComputedStyle(r,null).getPropertyValue(e)}function Fz(r){return function(){delete this[r]}}function jz(r,e){return function(){this[r]=e}}function Iz(r,e){return function(){var i=e.apply(this,arguments);i==null?delete this[r]:this[r]=i}}function $z(r,e){return arguments.length>1?this.each((e==null?Fz:typeof e=="function"?Iz:jz)(r,e)):this.node()[r]}function jM(r){return r.trim().split(/^|\s+/)}function M1(r){return r.classList||new IM(r)}function IM(r){this._node=r,this._names=jM(r.getAttribute("class")||"")}IM.prototype={add:function(r){var e=this._names.indexOf(r);e<0&&(this._names.push(r),this._node.setAttribute("class",this._names.join(" ")))},remove:function(r){var e=this._names.indexOf(r);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(r){return this._names.indexOf(r)>=0}};function $M(r,e){for(var i=M1(r),n=-1,a=e.length;++n<a;)i.add(e[n])}function zM(r,e){for(var i=M1(r),n=-1,a=e.length;++n<a;)i.remove(e[n])}function zz(r){return function(){$M(this,r)}}function Pz(r){return function(){zM(this,r)}}function qz(r,e){return function(){(e.apply(this,arguments)?$M:zM)(this,r)}}function Uz(r,e){var i=jM(r+"");if(arguments.length<2){for(var n=M1(this.node()),a=-1,o=i.length;++a<o;)if(!n.contains(i[a]))return!1;return!0}return this.each((typeof e=="function"?qz:e?zz:Pz)(i,e))}function Hz(){this.textContent=""}function Gz(r){return function(){this.textContent=r}}function Wz(r){return function(){var e=r.apply(this,arguments);this.textContent=e??""}}function Yz(r){return arguments.length?this.each(r==null?Hz:(typeof r=="function"?Wz:Gz)(r)):this.node().textContent}function Vz(){this.innerHTML=""}function Kz(r){return function(){this.innerHTML=r}}function Xz(r){return function(){var e=r.apply(this,arguments);this.innerHTML=e??""}}function Zz(r){return arguments.length?this.each(r==null?Vz:(typeof r=="function"?Xz:Kz)(r)):this.node().innerHTML}function Qz(){this.nextSibling&&this.parentNode.appendChild(this)}function Jz(){return this.each(Qz)}function t8(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function e8(){return this.each(t8)}function r8(r){var e=typeof r=="function"?r:BM(r);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function i8(){return null}function n8(r,e){var i=typeof r=="function"?r:BM(r),n=e==null?i8:typeof e=="function"?e:N1(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),n.apply(this,arguments)||null)})}function a8(){var r=this.parentNode;r&&r.removeChild(this)}function s8(){return this.each(a8)}function o8(){var r=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function l8(){var r=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function c8(r){return this.select(r?l8:o8)}function h8(r){return arguments.length?this.property("__data__",r):this.node().__data__}function u8(r){return function(e){r.call(this,e,this.__data__)}}function d8(r){return r.trim().split(/^|\s+/).map(function(e){var i="",n=e.indexOf(".");return n>=0&&(i=e.slice(n+1),e=e.slice(0,n)),{type:e,name:i}})}function f8(r){return function(){var e=this.__on;if(e){for(var i=0,n=-1,a=e.length,o;i<a;++i)o=e[i],(!r.type||o.type===r.type)&&o.name===r.name?this.removeEventListener(o.type,o.listener,o.options):e[++n]=o;++n?e.length=n:delete this.__on}}}function p8(r,e,i){return function(){var n=this.__on,a,o=u8(e);if(n){for(var c=0,h=n.length;c<h;++c)if((a=n[c]).type===r.type&&a.name===r.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=o,a.options=i),a.value=e;return}}this.addEventListener(r.type,o,i),a={type:r.type,name:r.name,value:e,listener:o,options:i},n?n.push(a):this.__on=[a]}}function g8(r,e,i){var n=d8(r+""),a,o=n.length,c;if(arguments.length<2){var h=this.node().__on;if(h){for(var u=0,d=h.length,f;u<d;++u)for(a=0,f=h[u];a<o;++a)if((c=n[a]).type===f.type&&c.name===f.name)return f.value}return}for(h=e?p8:f8,a=0;a<o;++a)this.each(h(n[a],e,i));return this}function PM(r,e,i){var n=FM(r),a=n.CustomEvent;typeof a=="function"?a=new a(e,i):(a=n.document.createEvent("Event"),i?(a.initEvent(e,i.bubbles,i.cancelable),a.detail=i.detail):a.initEvent(e,!1,!1)),r.dispatchEvent(a)}function m8(r,e){return function(){return PM(this,r,e)}}function y8(r,e){return function(){return PM(this,r,e.apply(this,arguments))}}function b8(r,e){return this.each((typeof e=="function"?y8:m8)(r,e))}function*x8(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var n=r[e],a=0,o=n.length,c;a<o;++a)(c=n[a])&&(yield c)}var qM=[null];function Bn(r,e){this._groups=r,this._parents=e}function Pd(){return new Bn([[document.documentElement]],qM)}function v8(){return this}Bn.prototype=Pd.prototype={constructor:Bn,select:W$,selectAll:X$,selectChild:tz,selectChildren:nz,filter:az,data:uz,enter:sz,exit:fz,join:pz,merge:gz,selection:v8,order:mz,sort:yz,call:xz,nodes:vz,node:_z,size:Cz,empty:kz,each:wz,attr:Bz,style:Dz,property:$z,classed:Uz,text:Yz,html:Zz,raise:Jz,lower:e8,append:r8,insert:n8,remove:s8,clone:c8,datum:h8,on:g8,dispatch:b8,[Symbol.iterator]:x8};function ce(r){return typeof r=="string"?new Bn([[document.querySelector(r)]],[document.documentElement]):new Bn([[r]],qM)}function _8(r){let e;for(;e=r.sourceEvent;)r=e;return r}function Ia(r,e){if(r=_8(r),e===void 0&&(e=r.currentTarget),e){var i=e.ownerSVGElement||e;if(i.createSVGPoint){var n=i.createSVGPoint();return n.x=r.clientX,n.y=r.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}if(e.getBoundingClientRect){var a=e.getBoundingClientRect();return[r.clientX-a.left-e.clientLeft,r.clientY-a.top-e.clientTop]}}return[r.pageX,r.pageY]}const C8={passive:!1},gd={capture:!0,passive:!1};function $0(r){r.stopImmediatePropagation()}function $c(r){r.preventDefault(),r.stopImmediatePropagation()}function UM(r){var e=r.document.documentElement,i=ce(r).on("dragstart.drag",$c,gd);"onselectstart"in e?i.on("selectstart.drag",$c,gd):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function HM(r,e){var i=r.document.documentElement,n=ce(r).on("dragstart.drag",null);e&&(n.on("click.drag",$c,gd),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in i?n.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}const fp=r=>()=>r;function qx(r,{sourceEvent:e,subject:i,target:n,identifier:a,active:o,x:c,y:h,dx:u,dy:d,dispatch:f}){Object.defineProperties(this,{type:{value:r,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:c,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:f}})}qx.prototype.on=function(){var r=this._.on.apply(this._,arguments);return r===this._?this:r};function k8(r){return!r.ctrlKey&&!r.button}function w8(){return this.parentNode}function S8(r,e){return e??{x:r.x,y:r.y}}function T8(){return navigator.maxTouchPoints||"ontouchstart"in this}function E8(){var r=k8,e=w8,i=S8,n=T8,a={},o=zd("start","drag","end"),c=0,h,u,d,f,g=0;function b(N){N.on("mousedown.drag",m).filter(n).on("touchstart.drag",C).on("touchmove.drag",w,C8).on("touchend.drag touchcancel.drag",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(N,O){if(!(f||!r.call(this,N,O))){var B=E(this,e.call(this,N,O),N,O,"mouse");B&&(ce(N.view).on("mousemove.drag",v,gd).on("mouseup.drag",_,gd),UM(N.view),$0(N),d=!1,h=N.clientX,u=N.clientY,B("start",N))}}function v(N){if($c(N),!d){var O=N.clientX-h,B=N.clientY-u;d=O*O+B*B>g}a.mouse("drag",N)}function _(N){ce(N.view).on("mousemove.drag mouseup.drag",null),HM(N.view,d),$c(N),a.mouse("end",N)}function C(N,O){if(r.call(this,N,O)){var B=N.changedTouches,A=e.call(this,N,O),L=B.length,P,j;for(P=0;P<L;++P)(j=E(this,A,N,O,B[P].identifier,B[P]))&&($0(N),j("start",N,B[P]))}}function w(N){var O=N.changedTouches,B=O.length,A,L;for(A=0;A<B;++A)(L=a[O[A].identifier])&&($c(N),L("drag",N,O[A]))}function T(N){var O=N.changedTouches,B=O.length,A,L;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),A=0;A<B;++A)(L=a[O[A].identifier])&&($0(N),L("end",N,O[A]))}function E(N,O,B,A,L,P){var j=o.copy(),$=Ia(P||B,O),X,W,F;if((F=i.call(N,new qx("beforestart",{sourceEvent:B,target:b,identifier:L,active:c,x:$[0],y:$[1],dx:0,dy:0,dispatch:j}),A))!=null)return X=F.x-$[0]||0,W=F.y-$[1]||0,function U(D,z,H){var V=$,Q;switch(D){case"start":a[L]=U,Q=c++;break;case"end":delete a[L],--c;case"drag":$=Ia(H||z,O),Q=c;break}j.call(D,N,new qx(D,{sourceEvent:z,subject:F,target:b,identifier:L,active:Q,x:$[0]+X,y:$[1]+W,dx:$[0]-V[0],dy:$[1]-V[1],dispatch:j}),A)}}return b.filter=function(N){return arguments.length?(r=typeof N=="function"?N:fp(!!N),b):r},b.container=function(N){return arguments.length?(e=typeof N=="function"?N:fp(N),b):e},b.subject=function(N){return arguments.length?(i=typeof N=="function"?N:fp(N),b):i},b.touchable=function(N){return arguments.length?(n=typeof N=="function"?N:fp(!!N),b):n},b.on=function(){var N=o.on.apply(o,arguments);return N===o?b:N},b.clickDistance=function(N){return arguments.length?(g=(N=+N)*N,b):Math.sqrt(g)},b}function B1(r,e,i){r.prototype=e.prototype=i,i.constructor=r}function GM(r,e){var i=Object.create(r.prototype);for(var n in e)i[n]=e[n];return i}function qd(){}var md=.7,hg=1/md,zc="\\s*([+-]?\\d+)\\s*",yd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ha="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",A8=/^#([0-9a-f]{3,8})$/,N8=new RegExp(`^rgb\\(${zc},${zc},${zc}\\)$`),M8=new RegExp(`^rgb\\(${Ha},${Ha},${Ha}\\)$`),B8=new RegExp(`^rgba\\(${zc},${zc},${zc},${yd}\\)$`),L8=new RegExp(`^rgba\\(${Ha},${Ha},${Ha},${yd}\\)$`),O8=new RegExp(`^hsl\\(${yd},${Ha},${Ha}\\)$`),R8=new RegExp(`^hsla\\(${yd},${Ha},${Ha},${yd}\\)$`),_S={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};B1(qd,bd,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:CS,formatHex:CS,formatHex8:D8,formatHsl:F8,formatRgb:kS,toString:kS});function CS(){return this.rgb().formatHex()}function D8(){return this.rgb().formatHex8()}function F8(){return WM(this).formatHsl()}function kS(){return this.rgb().formatRgb()}function bd(r){var e,i;return r=(r+"").trim().toLowerCase(),(e=A8.exec(r))?(i=e[1].length,e=parseInt(e[1],16),i===6?wS(e):i===3?new gn(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?pp(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?pp(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=N8.exec(r))?new gn(e[1],e[2],e[3],1):(e=M8.exec(r))?new gn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=B8.exec(r))?pp(e[1],e[2],e[3],e[4]):(e=L8.exec(r))?pp(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=O8.exec(r))?ES(e[1],e[2]/100,e[3]/100,1):(e=R8.exec(r))?ES(e[1],e[2]/100,e[3]/100,e[4]):_S.hasOwnProperty(r)?wS(_S[r]):r==="transparent"?new gn(NaN,NaN,NaN,0):null}function wS(r){return new gn(r>>16&255,r>>8&255,r&255,1)}function pp(r,e,i,n){return n<=0&&(r=e=i=NaN),new gn(r,e,i,n)}function j8(r){return r instanceof qd||(r=bd(r)),r?(r=r.rgb(),new gn(r.r,r.g,r.b,r.opacity)):new gn}function Ux(r,e,i,n){return arguments.length===1?j8(r):new gn(r,e,i,n??1)}function gn(r,e,i,n){this.r=+r,this.g=+e,this.b=+i,this.opacity=+n}B1(gn,Ux,GM(qd,{brighter(r){return r=r==null?hg:Math.pow(hg,r),new gn(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?md:Math.pow(md,r),new gn(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new gn(Tl(this.r),Tl(this.g),Tl(this.b),ug(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:SS,formatHex:SS,formatHex8:I8,formatRgb:TS,toString:TS}));function SS(){return`#${pl(this.r)}${pl(this.g)}${pl(this.b)}`}function I8(){return`#${pl(this.r)}${pl(this.g)}${pl(this.b)}${pl((isNaN(this.opacity)?1:this.opacity)*255)}`}function TS(){const r=ug(this.opacity);return`${r===1?"rgb(":"rgba("}${Tl(this.r)}, ${Tl(this.g)}, ${Tl(this.b)}${r===1?")":`, ${r})`}`}function ug(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function Tl(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function pl(r){return r=Tl(r),(r<16?"0":"")+r.toString(16)}function ES(r,e,i,n){return n<=0?r=e=i=NaN:i<=0||i>=1?r=e=NaN:e<=0&&(r=NaN),new ma(r,e,i,n)}function WM(r){if(r instanceof ma)return new ma(r.h,r.s,r.l,r.opacity);if(r instanceof qd||(r=bd(r)),!r)return new ma;if(r instanceof ma)return r;r=r.rgb();var e=r.r/255,i=r.g/255,n=r.b/255,a=Math.min(e,i,n),o=Math.max(e,i,n),c=NaN,h=o-a,u=(o+a)/2;return h?(e===o?c=(i-n)/h+(i<n)*6:i===o?c=(n-e)/h+2:c=(e-i)/h+4,h/=u<.5?o+a:2-o-a,c*=60):h=u>0&&u<1?0:c,new ma(c,h,u,r.opacity)}function $8(r,e,i,n){return arguments.length===1?WM(r):new ma(r,e,i,n??1)}function ma(r,e,i,n){this.h=+r,this.s=+e,this.l=+i,this.opacity=+n}B1(ma,$8,GM(qd,{brighter(r){return r=r==null?hg:Math.pow(hg,r),new ma(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?md:Math.pow(md,r),new ma(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,e=isNaN(r)||isNaN(this.s)?0:this.s,i=this.l,n=i+(i<.5?i:1-i)*e,a=2*i-n;return new gn(z0(r>=240?r-240:r+120,a,n),z0(r,a,n),z0(r<120?r+240:r-120,a,n),this.opacity)},clamp(){return new ma(AS(this.h),gp(this.s),gp(this.l),ug(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 r=ug(this.opacity);return`${r===1?"hsl(":"hsla("}${AS(this.h)}, ${gp(this.s)*100}%, ${gp(this.l)*100}%${r===1?")":`, ${r})`}`}}));function AS(r){return r=(r||0)%360,r<0?r+360:r}function gp(r){return Math.max(0,Math.min(1,r||0))}function z0(r,e,i){return(r<60?e+(i-e)*r/60:r<180?i:r<240?e+(i-e)*(240-r)/60:e)*255}const L1=r=>()=>r;function YM(r,e){return function(i){return r+i*e}}function z8(r,e,i){return r=Math.pow(r,i),e=Math.pow(e,i)-r,i=1/i,function(n){return Math.pow(r+n*e,i)}}function mst(r,e){var i=e-r;return i?YM(r,i>180||i<-180?i-360*Math.round(i/360):i):L1(isNaN(r)?e:r)}function P8(r){return(r=+r)==1?VM:function(e,i){return i-e?z8(e,i,r):L1(isNaN(e)?i:e)}}function VM(r,e){var i=e-r;return i?YM(r,i):L1(isNaN(r)?e:r)}const NS=(function r(e){var i=P8(e);function n(a,o){var c=i((a=Ux(a)).r,(o=Ux(o)).r),h=i(a.g,o.g),u=i(a.b,o.b),d=VM(a.opacity,o.opacity);return function(f){return a.r=c(f),a.g=h(f),a.b=u(f),a.opacity=d(f),a+""}}return n.gamma=r,n})(1);function yo(r,e){return r=+r,e=+e,function(i){return r*(1-i)+e*i}}var Hx=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,P0=new RegExp(Hx.source,"g");function q8(r){return function(){return r}}function U8(r){return function(e){return r(e)+""}}function H8(r,e){var i=Hx.lastIndex=P0.lastIndex=0,n,a,o,c=-1,h=[],u=[];for(r=r+"",e=e+"";(n=Hx.exec(r))&&(a=P0.exec(e));)(o=a.index)>i&&(o=e.slice(i,o),h[c]?h[c]+=o:h[++c]=o),(n=n[0])===(a=a[0])?h[c]?h[c]+=a:h[++c]=a:(h[++c]=null,u.push({i:c,x:yo(n,a)})),i=P0.lastIndex;return i<e.length&&(o=e.slice(i),h[c]?h[c]+=o:h[++c]=o),h.length<2?u[0]?U8(u[0].x):q8(e):(e=u.length,function(d){for(var f=0,g;f<e;++f)h[(g=u[f]).i]=g.x(d);return h.join("")})}var MS=180/Math.PI,Gx={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function KM(r,e,i,n,a,o){var c,h,u;return(c=Math.sqrt(r*r+e*e))&&(r/=c,e/=c),(u=r*i+e*n)&&(i-=r*u,n-=e*u),(h=Math.sqrt(i*i+n*n))&&(i/=h,n/=h,u/=h),r*n<e*i&&(r=-r,e=-e,u=-u,c=-c),{translateX:a,translateY:o,rotate:Math.atan2(e,r)*MS,skewX:Math.atan(u)*MS,scaleX:c,scaleY:h}}var mp;function G8(r){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return e.isIdentity?Gx:KM(e.a,e.b,e.c,e.d,e.e,e.f)}function W8(r){return r==null||(mp||(mp=document.createElementNS("http://www.w3.org/2000/svg","g")),mp.setAttribute("transform",r),!(r=mp.transform.baseVal.consolidate()))?Gx:(r=r.matrix,KM(r.a,r.b,r.c,r.d,r.e,r.f))}function XM(r,e,i,n){function a(d){return d.length?d.pop()+" ":""}function o(d,f,g,b,m,v){if(d!==g||f!==b){var _=m.push("translate(",null,e,null,i);v.push({i:_-4,x:yo(d,g)},{i:_-2,x:yo(f,b)})}else(g||b)&&m.push("translate("+g+e+b+i)}function c(d,f,g,b){d!==f?(d-f>180?f+=360:f-d>180&&(d+=360),b.push({i:g.push(a(g)+"rotate(",null,n)-2,x:yo(d,f)})):f&&g.push(a(g)+"rotate("+f+n)}function h(d,f,g,b){d!==f?b.push({i:g.push(a(g)+"skewX(",null,n)-2,x:yo(d,f)}):f&&g.push(a(g)+"skewX("+f+n)}function u(d,f,g,b,m,v){if(d!==g||f!==b){var _=m.push(a(m)+"scale(",null,",",null,")");v.push({i:_-4,x:yo(d,g)},{i:_-2,x:yo(f,b)})}else(g!==1||b!==1)&&m.push(a(m)+"scale("+g+","+b+")")}return function(d,f){var g=[],b=[];return d=r(d),f=r(f),o(d.translateX,d.translateY,f.translateX,f.translateY,g,b),c(d.rotate,f.rotate,g,b),h(d.skewX,f.skewX,g,b),u(d.scaleX,d.scaleY,f.scaleX,f.scaleY,g,b),d=f=null,function(m){for(var v=-1,_=b.length,C;++v<_;)g[(C=b[v]).i]=C.x(m);return g.join("")}}}var Y8=XM(G8,"px, ","px)","deg)"),V8=XM(W8,", ",")",")"),K8=1e-12;function BS(r){return((r=Math.exp(r))+1/r)/2}function X8(r){return((r=Math.exp(r))-1/r)/2}function Z8(r){return((r=Math.exp(2*r))-1)/(r+1)}const Q8=(function r(e,i,n){function a(o,c){var h=o[0],u=o[1],d=o[2],f=c[0],g=c[1],b=c[2],m=f-h,v=g-u,_=m*m+v*v,C,w;if(_<K8)w=Math.log(b/d)/e,C=function(A){return[h+A*m,u+A*v,d*Math.exp(e*A*w)]};else{var T=Math.sqrt(_),E=(b*b-d*d+n*_)/(2*d*i*T),N=(b*b-d*d-n*_)/(2*b*i*T),O=Math.log(Math.sqrt(E*E+1)-E),B=Math.log(Math.sqrt(N*N+1)-N);w=(B-O)/e,C=function(A){var L=A*w,P=BS(O),j=d/(i*T)*(P*Z8(e*L+O)-X8(O));return[h+j*m,u+j*v,d*P/BS(e*L+O)]}}return C.duration=w*1e3*e/Math.SQRT2,C}return a.rho=function(o){var c=Math.max(.001,+o),h=c*c,u=h*h;return r(c,h,u)},a})(Math.SQRT2,2,4);var mh=0,Wu=0,Cu=0,ZM=1e3,dg,Yu,fg=0,Dl=0,Jg=0,xd=typeof performance=="object"&&performance.now?performance:Date,QM=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function O1(){return Dl||(QM(J8),Dl=xd.now()+Jg)}function J8(){Dl=0}function pg(){this._call=this._time=this._next=null}pg.prototype=R1.prototype={constructor:pg,restart:function(r,e,i){if(typeof r!="function")throw new TypeError("callback is not a function");i=(i==null?O1():+i)+(e==null?0:+e),!this._next&&Yu!==this&&(Yu?Yu._next=this:dg=this,Yu=this),this._call=r,this._time=i,Wx()},stop:function(){this._call&&(this._call=null,this._time=1/0,Wx())}};function R1(r,e,i){var n=new pg;return n.restart(r,e,i),n}function tP(){O1(),++mh;for(var r=dg,e;r;)(e=Dl-r._time)>=0&&r._call.call(void 0,e),r=r._next;--mh}function LS(){Dl=(fg=xd.now())+Jg,mh=Wu=0;try{tP()}finally{mh=0,rP(),Dl=0}}function eP(){var r=xd.now(),e=r-fg;e>ZM&&(Jg-=e,fg=r)}function rP(){for(var r,e=dg,i,n=1/0;e;)e._call?(n>e._time&&(n=e._time),r=e,e=e._next):(i=e._next,e._next=null,e=r?r._next=i:dg=i);Yu=r,Wx(n)}function Wx(r){if(!mh){Wu&&(Wu=clearTimeout(Wu));var e=r-Dl;e>24?(r<1/0&&(Wu=setTimeout(LS,r-xd.now()-Jg)),Cu&&(Cu=clearInterval(Cu))):(Cu||(fg=xd.now(),Cu=setInterval(eP,ZM)),mh=1,QM(LS))}}function OS(r,e,i){var n=new pg;return e=e==null?0:+e,n.restart(a=>{n.stop(),r(a+e)},e,i),n}var iP=zd("start","end","cancel","interrupt"),nP=[],JM=0,RS=1,Yx=2,qp=3,DS=4,Vx=5,Up=6;function tm(r,e,i,n,a,o){var c=r.__transition;if(!c)r.__transition={};else if(i in c)return;aP(r,i,{name:e,index:n,group:a,on:iP,tween:nP,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:JM})}function D1(r,e){var i=wa(r,e);if(i.state>JM)throw new Error("too late; already scheduled");return i}function Za(r,e){var i=wa(r,e);if(i.state>qp)throw new Error("too late; already running");return i}function wa(r,e){var i=r.__transition;if(!i||!(i=i[e]))throw new Error("transition not found");return i}function aP(r,e,i){var n=r.__transition,a;n[e]=i,i.timer=R1(o,0,i.time);function o(d){i.state=RS,i.timer.restart(c,i.delay,i.time),i.delay<=d&&c(d-i.delay)}function c(d){var f,g,b,m;if(i.state!==RS)return u();for(f in n)if(m=n[f],m.name===i.name){if(m.state===qp)return OS(c);m.state===DS?(m.state=Up,m.timer.stop(),m.on.call("interrupt",r,r.__data__,m.index,m.group),delete n[f]):+f<e&&(m.state=Up,m.timer.stop(),m.on.call("cancel",r,r.__data__,m.index,m.group),delete n[f])}if(OS(function(){i.state===qp&&(i.state=DS,i.timer.restart(h,i.delay,i.time),h(d))}),i.state=Yx,i.on.call("start",r,r.__data__,i.index,i.group),i.state===Yx){for(i.state=qp,a=new Array(b=i.tween.length),f=0,g=-1;f<b;++f)(m=i.tween[f].value.call(r,r.__data__,i.index,i.group))&&(a[++g]=m);a.length=g+1}}function h(d){for(var f=d<i.duration?i.ease.call(null,d/i.duration):(i.timer.restart(u),i.state=Vx,1),g=-1,b=a.length;++g<b;)a[g].call(r,f);i.state===Vx&&(i.on.call("end",r,r.__data__,i.index,i.group),u())}function u(){i.state=Up,i.timer.stop(),delete n[e];for(var d in n)return;delete r.__transition}}function Hp(r,e){var i=r.__transition,n,a,o=!0,c;if(i){e=e==null?null:e+"";for(c in i){if((n=i[c]).name!==e){o=!1;continue}a=n.state>Yx&&n.state<Vx,n.state=Up,n.timer.stop(),n.on.call(a?"interrupt":"cancel",r,r.__data__,n.index,n.group),delete i[c]}o&&delete r.__transition}}function sP(r){return this.each(function(){Hp(this,r)})}function oP(r,e){var i,n;return function(){var a=Za(this,r),o=a.tween;if(o!==i){n=i=o;for(var c=0,h=n.length;c<h;++c)if(n[c].name===e){n=n.slice(),n.splice(c,1);break}}a.tween=n}}function lP(r,e,i){var n,a;if(typeof i!="function")throw new Error;return function(){var o=Za(this,r),c=o.tween;if(c!==n){a=(n=c).slice();for(var h={name:e,value:i},u=0,d=a.length;u<d;++u)if(a[u].name===e){a[u]=h;break}u===d&&a.push(h)}o.tween=a}}function cP(r,e){var i=this._id;if(r+="",arguments.length<2){for(var n=wa(this.node(),i).tween,a=0,o=n.length,c;a<o;++a)if((c=n[a]).name===r)return c.value;return null}return this.each((e==null?oP:lP)(i,r,e))}function F1(r,e,i){var n=r._id;return r.each(function(){var a=Za(this,n);(a.value||(a.value={}))[e]=i.apply(this,arguments)}),function(a){return wa(a,n).value[e]}}function tB(r,e){var i;return(typeof e=="number"?yo:e instanceof bd?NS:(i=bd(e))?(e=i,NS):H8)(r,e)}function hP(r){return function(){this.removeAttribute(r)}}function uP(r){return function(){this.removeAttributeNS(r.space,r.local)}}function dP(r,e,i){var n,a=i+"",o;return function(){var c=this.getAttribute(r);return c===a?null:c===n?o:o=e(n=c,i)}}function fP(r,e,i){var n,a=i+"",o;return function(){var c=this.getAttributeNS(r.space,r.local);return c===a?null:c===n?o:o=e(n=c,i)}}function pP(r,e,i){var n,a,o;return function(){var c,h=i(this),u;return h==null?void this.removeAttribute(r):(c=this.getAttribute(r),u=h+"",c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h)))}}function gP(r,e,i){var n,a,o;return function(){var c,h=i(this),u;return h==null?void this.removeAttributeNS(r.space,r.local):(c=this.getAttributeNS(r.space,r.local),u=h+"",c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h)))}}function mP(r,e){var i=Qg(r),n=i==="transform"?V8:tB;return this.attrTween(r,typeof e=="function"?(i.local?gP:pP)(i,n,F1(this,"attr."+r,e)):e==null?(i.local?uP:hP)(i):(i.local?fP:dP)(i,n,e))}function yP(r,e){return function(i){this.setAttribute(r,e.call(this,i))}}function bP(r,e){return function(i){this.setAttributeNS(r.space,r.local,e.call(this,i))}}function xP(r,e){var i,n;function a(){var o=e.apply(this,arguments);return o!==n&&(i=(n=o)&&bP(r,o)),i}return a._value=e,a}function vP(r,e){var i,n;function a(){var o=e.apply(this,arguments);return o!==n&&(i=(n=o)&&yP(r,o)),i}return a._value=e,a}function _P(r,e){var i="attr."+r;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;var n=Qg(r);return this.tween(i,(n.local?xP:vP)(n,e))}function CP(r,e){return function(){D1(this,r).delay=+e.apply(this,arguments)}}function kP(r,e){return e=+e,function(){D1(this,r).delay=e}}function wP(r){var e=this._id;return arguments.length?this.each((typeof r=="function"?CP:kP)(e,r)):wa(this.node(),e).delay}function SP(r,e){return function(){Za(this,r).duration=+e.apply(this,arguments)}}function TP(r,e){return e=+e,function(){Za(this,r).duration=e}}function EP(r){var e=this._id;return arguments.length?this.each((typeof r=="function"?SP:TP)(e,r)):wa(this.node(),e).duration}function AP(r,e){if(typeof e!="function")throw new Error;return function(){Za(this,r).ease=e}}function NP(r){var e=this._id;return arguments.length?this.each(AP(e,r)):wa(this.node(),e).ease}function MP(r,e){return function(){var i=e.apply(this,arguments);if(typeof i!="function")throw new Error;Za(this,r).ease=i}}function BP(r){if(typeof r!="function")throw new Error;return this.each(MP(this._id,r))}function LP(r){typeof r!="function"&&(r=OM(r));for(var e=this._groups,i=e.length,n=new Array(i),a=0;a<i;++a)for(var o=e[a],c=o.length,h=n[a]=[],u,d=0;d<c;++d)(u=o[d])&&r.call(u,u.__data__,d,o)&&h.push(u);return new Rs(n,this._parents,this._name,this._id)}function OP(r){if(r._id!==this._id)throw new Error;for(var e=this._groups,i=r._groups,n=e.length,a=i.length,o=Math.min(n,a),c=new Array(n),h=0;h<o;++h)for(var u=e[h],d=i[h],f=u.length,g=c[h]=new Array(f),b,m=0;m<f;++m)(b=u[m]||d[m])&&(g[m]=b);for(;h<n;++h)c[h]=e[h];return new Rs(c,this._parents,this._name,this._id)}function RP(r){return(r+"").trim().split(/^|\s+/).every(function(e){var i=e.indexOf(".");return i>=0&&(e=e.slice(0,i)),!e||e==="start"})}function DP(r,e,i){var n,a,o=RP(e)?D1:Za;return function(){var c=o(this,r),h=c.on;h!==n&&(a=(n=h).copy()).on(e,i),c.on=a}}function FP(r,e){var i=this._id;return arguments.length<2?wa(this.node(),i).on.on(r):this.each(DP(i,r,e))}function jP(r){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==r)return;e&&e.removeChild(this)}}function IP(){return this.on("end.remove",jP(this._id))}function $P(r){var e=this._name,i=this._id;typeof r!="function"&&(r=N1(r));for(var n=this._groups,a=n.length,o=new Array(a),c=0;c<a;++c)for(var h=n[c],u=h.length,d=o[c]=new Array(u),f,g,b=0;b<u;++b)(f=h[b])&&(g=r.call(f,f.__data__,b,h))&&("__data__"in f&&(g.__data__=f.__data__),d[b]=g,tm(d[b],e,i,b,d,wa(f,i)));return new Rs(o,this._parents,e,i)}function zP(r){var e=this._name,i=this._id;typeof r!="function"&&(r=LM(r));for(var n=this._groups,a=n.length,o=[],c=[],h=0;h<a;++h)for(var u=n[h],d=u.length,f,g=0;g<d;++g)if(f=u[g]){for(var b=r.call(f,f.__data__,g,u),m,v=wa(f,i),_=0,C=b.length;_<C;++_)(m=b[_])&&tm(m,e,i,_,b,v);o.push(b),c.push(f)}return new Rs(o,c,e,i)}var PP=Pd.prototype.constructor;function qP(){return new PP(this._groups,this._parents)}function UP(r,e){var i,n,a;return function(){var o=gh(this,r),c=(this.style.removeProperty(r),gh(this,r));return o===c?null:o===i&&c===n?a:a=e(i=o,n=c)}}function eB(r){return function(){this.style.removeProperty(r)}}function HP(r,e,i){var n,a=i+"",o;return function(){var c=gh(this,r);return c===a?null:c===n?o:o=e(n=c,i)}}function GP(r,e,i){var n,a,o;return function(){var c=gh(this,r),h=i(this),u=h+"";return h==null&&(u=h=(this.style.removeProperty(r),gh(this,r))),c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h))}}function WP(r,e){var i,n,a,o="style."+e,c="end."+o,h;return function(){var u=Za(this,r),d=u.on,f=u.value[o]==null?h||(h=eB(e)):void 0;(d!==i||a!==f)&&(n=(i=d).copy()).on(c,a=f),u.on=n}}function YP(r,e,i){var n=(r+="")=="transform"?Y8:tB;return e==null?this.styleTween(r,UP(r,n)).on("end.style."+r,eB(r)):typeof e=="function"?this.styleTween(r,GP(r,n,F1(this,"style."+r,e))).each(WP(this._id,r)):this.styleTween(r,HP(r,n,e),i).on("end.style."+r,null)}function VP(r,e,i){return function(n){this.style.setProperty(r,e.call(this,n),i)}}function KP(r,e,i){var n,a;function o(){var c=e.apply(this,arguments);return c!==a&&(n=(a=c)&&VP(r,c,i)),n}return o._value=e,o}function XP(r,e,i){var n="style."+(r+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,KP(r,e,i??""))}function ZP(r){return function(){this.textContent=r}}function QP(r){return function(){var e=r(this);this.textContent=e??""}}function JP(r){return this.tween("text",typeof r=="function"?QP(F1(this,"text",r)):ZP(r==null?"":r+""))}function tq(r){return function(e){this.textContent=r.call(this,e)}}function eq(r){var e,i;function n(){var a=r.apply(this,arguments);return a!==i&&(e=(i=a)&&tq(a)),e}return n._value=r,n}function rq(r){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(r==null)return this.tween(e,null);if(typeof r!="function")throw new Error;return this.tween(e,eq(r))}function iq(){for(var r=this._name,e=this._id,i=rB(),n=this._groups,a=n.length,o=0;o<a;++o)for(var c=n[o],h=c.length,u,d=0;d<h;++d)if(u=c[d]){var f=wa(u,e);tm(u,r,i,d,c,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Rs(n,this._parents,r,i)}function nq(){var r,e,i=this,n=i._id,a=i.size();return new Promise(function(o,c){var h={value:c},u={value:function(){--a===0&&o()}};i.each(function(){var d=Za(this,n),f=d.on;f!==r&&(e=(r=f).copy(),e._.cancel.push(h),e._.interrupt.push(h),e._.end.push(u)),d.on=e}),a===0&&o()})}var aq=0;function Rs(r,e,i,n){this._groups=r,this._parents=e,this._name=i,this._id=n}function rB(){return++aq}var ms=Pd.prototype;Rs.prototype={constructor:Rs,select:$P,selectAll:zP,selectChild:ms.selectChild,selectChildren:ms.selectChildren,filter:LP,merge:OP,selection:qP,transition:iq,call:ms.call,nodes:ms.nodes,node:ms.node,size:ms.size,empty:ms.empty,each:ms.each,on:FP,attr:mP,attrTween:_P,style:YP,styleTween:XP,text:JP,textTween:rq,remove:IP,tween:cP,delay:wP,duration:EP,ease:NP,easeVarying:BP,end:nq,[Symbol.iterator]:ms[Symbol.iterator]};function sq(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var oq={time:null,delay:0,duration:250,ease:sq};function lq(r,e){for(var i;!(i=r.__transition)||!(i=i[e]);)if(!(r=r.parentNode))throw new Error(`transition ${e} not found`);return i}function cq(r){var e,i;r instanceof Rs?(e=r._id,r=r._name):(e=rB(),(i=oq).time=O1(),r=r==null?null:r+"");for(var n=this._groups,a=n.length,o=0;o<a;++o)for(var c=n[o],h=c.length,u,d=0;d<h;++d)(u=c[d])&&tm(u,r,e,d,c,i||lq(u,e));return new Rs(n,this._parents,r,e)}Pd.prototype.interrupt=sP;Pd.prototype.transition=cq;const Kx=Math.PI,Xx=2*Kx,ll=1e-6,hq=Xx-ll;function iB(r){this._+=r[0];for(let e=1,i=r.length;e<i;++e)this._+=arguments[e]+r[e]}function uq(r){let e=Math.floor(r);if(!(e>=0))throw new Error(`invalid digits: ${r}`);if(e>15)return iB;const i=10**e;return function(n){this._+=n[0];for(let a=1,o=n.length;a<o;++a)this._+=Math.round(arguments[a]*i)/i+n[a]}}class dq{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?iB:uq(e)}moveTo(e,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+i}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,i){this._append`L${this._x1=+e},${this._y1=+i}`}quadraticCurveTo(e,i,n,a){this._append`Q${+e},${+i},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(e,i,n,a,o,c){this._append`C${+e},${+i},${+n},${+a},${this._x1=+o},${this._y1=+c}`}arcTo(e,i,n,a,o){if(e=+e,i=+i,n=+n,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let c=this._x1,h=this._y1,u=n-e,d=a-i,f=c-e,g=h-i,b=f*f+g*g;if(this._x1===null)this._append`M${this._x1=e},${this._y1=i}`;else if(b>ll)if(!(Math.abs(g*u-d*f)>ll)||!o)this._append`L${this._x1=e},${this._y1=i}`;else{let m=n-c,v=a-h,_=u*u+d*d,C=m*m+v*v,w=Math.sqrt(_),T=Math.sqrt(b),E=o*Math.tan((Kx-Math.acos((_+b-C)/(2*w*T)))/2),N=E/T,O=E/w;Math.abs(N-1)>ll&&this._append`L${e+N*f},${i+N*g}`,this._append`A${o},${o},0,0,${+(g*m>f*v)},${this._x1=e+O*u},${this._y1=i+O*d}`}}arc(e,i,n,a,o,c){if(e=+e,i=+i,n=+n,c=!!c,n<0)throw new Error(`negative radius: ${n}`);let h=n*Math.cos(a),u=n*Math.sin(a),d=e+h,f=i+u,g=1^c,b=c?a-o:o-a;this._x1===null?this._append`M${d},${f}`:(Math.abs(this._x1-d)>ll||Math.abs(this._y1-f)>ll)&&this._append`L${d},${f}`,n&&(b<0&&(b=b%Xx+Xx),b>hq?this._append`A${n},${n},0,1,${g},${e-h},${i-u}A${n},${n},0,1,${g},${this._x1=d},${this._y1=f}`:b>ll&&this._append`A${n},${n},0,${+(b>=Kx)},${g},${this._x1=e+n*Math.cos(o)},${this._y1=i+n*Math.sin(o)}`)}rect(e,i,n,a){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+i}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function fq(r){const e=+this._x.call(null,r),i=+this._y.call(null,r);return nB(this.cover(e,i),e,i,r)}function nB(r,e,i,n){if(isNaN(e)||isNaN(i))return r;var a,o=r._root,c={data:n},h=r._x0,u=r._y0,d=r._x1,f=r._y1,g,b,m,v,_,C,w,T;if(!o)return r._root=c,r;for(;o.length;)if((_=e>=(g=(h+d)/2))?h=g:d=g,(C=i>=(b=(u+f)/2))?u=b:f=b,a=o,!(o=o[w=C<<1|_]))return a[w]=c,r;if(m=+r._x.call(null,o.data),v=+r._y.call(null,o.data),e===m&&i===v)return c.next=o,a?a[w]=c:r._root=c,r;do a=a?a[w]=new Array(4):r._root=new Array(4),(_=e>=(g=(h+d)/2))?h=g:d=g,(C=i>=(b=(u+f)/2))?u=b:f=b;while((w=C<<1|_)===(T=(v>=b)<<1|m>=g));return a[T]=o,a[w]=c,r}function pq(r){var e,i,n=r.length,a,o,c=new Array(n),h=new Array(n),u=1/0,d=1/0,f=-1/0,g=-1/0;for(i=0;i<n;++i)isNaN(a=+this._x.call(null,e=r[i]))||isNaN(o=+this._y.call(null,e))||(c[i]=a,h[i]=o,a<u&&(u=a),a>f&&(f=a),o<d&&(d=o),o>g&&(g=o));if(u>f||d>g)return this;for(this.cover(u,d).cover(f,g),i=0;i<n;++i)nB(this,c[i],h[i],r[i]);return this}function gq(r,e){if(isNaN(r=+r)||isNaN(e=+e))return this;var i=this._x0,n=this._y0,a=this._x1,o=this._y1;if(isNaN(i))a=(i=Math.floor(r))+1,o=(n=Math.floor(e))+1;else{for(var c=a-i||1,h=this._root,u,d;i>r||r>=a||n>e||e>=o;)switch(d=(e<n)<<1|r<i,u=new Array(4),u[d]=h,h=u,c*=2,d){case 0:a=i+c,o=n+c;break;case 1:i=a-c,o=n+c;break;case 2:a=i+c,n=o-c;break;case 3:i=a-c,n=o-c;break}this._root&&this._root.length&&(this._root=h)}return this._x0=i,this._y0=n,this._x1=a,this._y1=o,this}function mq(){var r=[];return this.visit(function(e){if(!e.length)do r.push(e.data);while(e=e.next)}),r}function yq(r){return arguments.length?this.cover(+r[0][0],+r[0][1]).cover(+r[1][0],+r[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Yi(r,e,i,n,a){this.node=r,this.x0=e,this.y0=i,this.x1=n,this.y1=a}function bq(r,e,i){var n,a=this._x0,o=this._y0,c,h,u,d,f=this._x1,g=this._y1,b=[],m=this._root,v,_;for(m&&b.push(new Yi(m,a,o,f,g)),i==null?i=1/0:(a=r-i,o=e-i,f=r+i,g=e+i,i*=i);v=b.pop();)if(!(!(m=v.node)||(c=v.x0)>f||(h=v.y0)>g||(u=v.x1)<a||(d=v.y1)<o))if(m.length){var C=(c+u)/2,w=(h+d)/2;b.push(new Yi(m[3],C,w,u,d),new Yi(m[2],c,w,C,d),new Yi(m[1],C,h,u,w),new Yi(m[0],c,h,C,w)),(_=(e>=w)<<1|r>=C)&&(v=b[b.length-1],b[b.length-1]=b[b.length-1-_],b[b.length-1-_]=v)}else{var T=r-+this._x.call(null,m.data),E=e-+this._y.call(null,m.data),N=T*T+E*E;if(N<i){var O=Math.sqrt(i=N);a=r-O,o=e-O,f=r+O,g=e+O,n=m.data}}return n}function xq(r){if(isNaN(f=+this._x.call(null,r))||isNaN(g=+this._y.call(null,r)))return this;var e,i=this._root,n,a,o,c=this._x0,h=this._y0,u=this._x1,d=this._y1,f,g,b,m,v,_,C,w;if(!i)return this;if(i.length)for(;;){if((v=f>=(b=(c+u)/2))?c=b:u=b,(_=g>=(m=(h+d)/2))?h=m:d=m,e=i,!(i=i[C=_<<1|v]))return this;if(!i.length)break;(e[C+1&3]||e[C+2&3]||e[C+3&3])&&(n=e,w=C)}for(;i.data!==r;)if(a=i,!(i=i.next))return this;return(o=i.next)&&delete i.next,a?(o?a.next=o:delete a.next,this):e?(o?e[C]=o:delete e[C],(i=e[0]||e[1]||e[2]||e[3])&&i===(e[3]||e[2]||e[1]||e[0])&&!i.length&&(n?n[w]=i:this._root=i),this):(this._root=o,this)}function vq(r){for(var e=0,i=r.length;e<i;++e)this.remove(r[e]);return this}function _q(){return this._root}function Cq(){var r=0;return this.visit(function(e){if(!e.length)do++r;while(e=e.next)}),r}function kq(r){var e=[],i,n=this._root,a,o,c,h,u;for(n&&e.push(new Yi(n,this._x0,this._y0,this._x1,this._y1));i=e.pop();)if(!r(n=i.node,o=i.x0,c=i.y0,h=i.x1,u=i.y1)&&n.length){var d=(o+h)/2,f=(c+u)/2;(a=n[3])&&e.push(new Yi(a,d,f,h,u)),(a=n[2])&&e.push(new Yi(a,o,f,d,u)),(a=n[1])&&e.push(new Yi(a,d,c,h,f)),(a=n[0])&&e.push(new Yi(a,o,c,d,f))}return this}function wq(r){var e=[],i=[],n;for(this._root&&e.push(new Yi(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var a=n.node;if(a.length){var o,c=n.x0,h=n.y0,u=n.x1,d=n.y1,f=(c+u)/2,g=(h+d)/2;(o=a[0])&&e.push(new Yi(o,c,h,f,g)),(o=a[1])&&e.push(new Yi(o,f,h,u,g)),(o=a[2])&&e.push(new Yi(o,c,g,f,d)),(o=a[3])&&e.push(new Yi(o,f,g,u,d))}i.push(n)}for(;n=i.pop();)r(n.node,n.x0,n.y0,n.x1,n.y1);return this}function Sq(r){return r[0]}function Tq(r){return arguments.length?(this._x=r,this):this._x}function Eq(r){return r[1]}function Aq(r){return arguments.length?(this._y=r,this):this._y}function j1(r,e,i){var n=new I1(e??Sq,i??Eq,NaN,NaN,NaN,NaN);return r==null?n:n.addAll(r)}function I1(r,e,i,n,a,o){this._x=r,this._y=e,this._x0=i,this._y0=n,this._x1=a,this._y1=o,this._root=void 0}function FS(r){for(var e={data:r.data},i=e;r=r.next;)i=i.next={data:r.data};return e}var tn=j1.prototype=I1.prototype;tn.copy=function(){var r=new I1(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,i,n;if(!e)return r;if(!e.length)return r._root=FS(e),r;for(i=[{source:e,target:r._root=new Array(4)}];e=i.pop();)for(var a=0;a<4;++a)(n=e.source[a])&&(n.length?i.push({source:n,target:e.target[a]=new Array(4)}):e.target[a]=FS(n));return r};tn.add=fq;tn.addAll=pq;tn.cover=gq;tn.data=mq;tn.extent=yq;tn.find=bq;tn.remove=xq;tn.removeAll=vq;tn.root=_q;tn.size=Cq;tn.visit=kq;tn.visitAfter=wq;tn.x=Tq;tn.y=Aq;function Nq(r,e){switch(arguments.length){case 0:break;case 1:this.range(r);break;default:this.range(e).domain(r);break}return this}const jS=Symbol("implicit");function aB(){var r=new gS,e=[],i=[],n=jS;function a(o){let c=r.get(o);if(c===void 0){if(n!==jS)return n;r.set(o,c=e.push(o)-1)}return i[c%i.length]}return a.domain=function(o){if(!arguments.length)return e.slice();e=[],r=new gS;for(const c of o)r.has(c)||r.set(c,e.push(c)-1);return a},a.range=function(o){return arguments.length?(i=Array.from(o),a):i.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return aB(e,i).unknown(n)},Nq.apply(a,arguments),a}function Mq(r){for(var e=r.length/6|0,i=new Array(e),n=0;n<e;)i[n]="#"+r.slice(n*6,++n*6);return i}const Bq=Mq("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function Tc(r){return function(){return r}}const yst=Math.abs,bst=Math.atan2,xst=Math.cos,vst=Math.max,_st=Math.min,Cst=Math.sin,kst=Math.sqrt,IS=1e-12,$1=Math.PI,$S=$1/2,wst=2*$1;function Sst(r){return r>1?0:r<-1?$1:Math.acos(r)}function Tst(r){return r>=1?$S:r<=-1?-$S:Math.asin(r)}function Lq(r){let e=3;return r.digits=function(i){if(!arguments.length)return e;if(i==null)e=null;else{const n=Math.floor(i);if(!(n>=0))throw new RangeError(`invalid digits: ${i}`);e=n}return r},()=>new dq(e)}function Oq(r){return typeof r=="object"&&"length"in r?r:Array.from(r)}function sB(r){this._context=r}sB.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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:this._context.lineTo(r,e);break}}};function ad(r){return new sB(r)}function Rq(r){return r[0]}function Dq(r){return r[1]}function Fq(r,e){var i=Tc(!0),n=null,a=ad,o=null,c=Lq(h);r=typeof r=="function"?r:r===void 0?Rq:Tc(r),e=typeof e=="function"?e:e===void 0?Dq:Tc(e);function h(u){var d,f=(u=Oq(u)).length,g,b=!1,m;for(n==null&&(o=a(m=c())),d=0;d<=f;++d)!(d<f&&i(g=u[d],d,u))===b&&((b=!b)?o.lineStart():o.lineEnd()),b&&o.point(+r(g,d,u),+e(g,d,u));if(m)return o=null,m+""||null}return h.x=function(u){return arguments.length?(r=typeof u=="function"?u:Tc(+u),h):r},h.y=function(u){return arguments.length?(e=typeof u=="function"?u:Tc(+u),h):e},h.defined=function(u){return arguments.length?(i=typeof u=="function"?u:Tc(!!u),h):i},h.curve=function(u){return arguments.length?(a=u,n!=null&&(o=a(n)),h):a},h.context=function(u){return arguments.length?(u==null?n=o=null:o=a(n=u),h):n},h}class oB{constructor(e,i){this._context=e,this._x=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,i){switch(e=+e,i=+i,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,i):this._context.moveTo(e,i);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,i,e,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,e,this._y0,e,i);break}}this._x0=e,this._y0=i}}function lB(r){return new oB(r,!0)}function cB(r){return new oB(r,!1)}function Ro(){}function gg(r,e,i){r._context.bezierCurveTo((2*r._x0+r._x1)/3,(2*r._y0+r._y1)/3,(r._x0+2*r._x1)/3,(r._y0+2*r._y1)/3,(r._x0+4*r._x1+e)/6,(r._y0+4*r._y1+i)/6)}function em(r){this._context=r}em.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:gg(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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);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:gg(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Zx(r){return new em(r)}function hB(r){this._context=r}hB.prototype={areaStart:Ro,areaEnd:Ro,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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x2=r,this._y2=e;break;case 1:this._point=2,this._x3=r,this._y3=e;break;case 2:this._point=3,this._x4=r,this._y4=e,this._context.moveTo((this._x0+4*this._x1+r)/6,(this._y0+4*this._y1+e)/6);break;default:gg(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function jq(r){return new hB(r)}function uB(r){this._context=r}uB.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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+r)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,n):this._context.moveTo(i,n);break;case 3:this._point=4;default:gg(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Iq(r){return new uB(r)}function dB(r,e){this._basis=new em(r),this._beta=e}dB.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var r=this._x,e=this._y,i=r.length-1;if(i>0)for(var n=r[0],a=e[0],o=r[i]-n,c=e[i]-a,h=-1,u;++h<=i;)u=h/i,this._basis.point(this._beta*r[h]+(1-this._beta)*(n+u*o),this._beta*e[h]+(1-this._beta)*(a+u*c));this._x=this._y=null,this._basis.lineEnd()},point:function(r,e){this._x.push(+r),this._y.push(+e)}};const $q=(function r(e){function i(n){return e===1?new em(n):new dB(n,e)}return i.beta=function(n){return r(+n)},i})(.85);function mg(r,e,i){r._context.bezierCurveTo(r._x1+r._k*(r._x2-r._x0),r._y1+r._k*(r._y2-r._y0),r._x2+r._k*(r._x1-e),r._y2+r._k*(r._y1-i),r._x2,r._y2)}function z1(r,e){this._context=r,this._k=(1-e)/6}z1.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:mg(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2,this._x1=r,this._y1=e;break;case 2:this._point=3;default:mg(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const fB=(function r(e){function i(n){return new z1(n,e)}return i.tension=function(n){return r(+n)},i})(0);function P1(r,e){this._context=r,this._k=(1-e)/6}P1.prototype={areaStart:Ro,areaEnd:Ro,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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:mg(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const zq=(function r(e){function i(n){return new P1(n,e)}return i.tension=function(n){return r(+n)},i})(0);function q1(r,e){this._context=r,this._k=(1-e)/6}q1.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(r,e){switch(r=+r,e=+e,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:mg(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Pq=(function r(e){function i(n){return new q1(n,e)}return i.tension=function(n){return r(+n)},i})(0);function U1(r,e,i){var n=r._x1,a=r._y1,o=r._x2,c=r._y2;if(r._l01_a>IS){var h=2*r._l01_2a+3*r._l01_a*r._l12_a+r._l12_2a,u=3*r._l01_a*(r._l01_a+r._l12_a);n=(n*h-r._x0*r._l12_2a+r._x2*r._l01_2a)/u,a=(a*h-r._y0*r._l12_2a+r._y2*r._l01_2a)/u}if(r._l23_a>IS){var d=2*r._l23_2a+3*r._l23_a*r._l12_a+r._l12_2a,f=3*r._l23_a*(r._l23_a+r._l12_a);o=(o*d+r._x1*r._l23_2a-e*r._l12_2a)/f,c=(c*d+r._y1*r._l23_2a-i*r._l12_2a)/f}r._context.bezierCurveTo(n,a,o,c,r._x2,r._y2)}function pB(r,e){this._context=r,this._alpha=e}pB.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(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3;default:U1(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const gB=(function r(e){function i(n){return e?new pB(n,e):new z1(n,0)}return i.alpha=function(n){return r(+n)},i})(.5);function mB(r,e){this._context=r,this._alpha=e}mB.prototype={areaStart:Ro,areaEnd:Ro,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(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:U1(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const qq=(function r(e){function i(n){return e?new mB(n,e):new P1(n,0)}return i.alpha=function(n){return r(+n)},i})(.5);function yB(r,e){this._context=r,this._alpha=e}yB.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(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,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:U1(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Uq=(function r(e){function i(n){return e?new yB(n,e):new q1(n,0)}return i.alpha=function(n){return r(+n)},i})(.5);function bB(r){this._context=r}bB.prototype={areaStart:Ro,areaEnd:Ro,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(r,e){r=+r,e=+e,this._point?this._context.lineTo(r,e):(this._point=1,this._context.moveTo(r,e))}};function Hq(r){return new bB(r)}function zS(r){return r<0?-1:1}function PS(r,e,i){var n=r._x1-r._x0,a=e-r._x1,o=(r._y1-r._y0)/(n||a<0&&-0),c=(i-r._y1)/(a||n<0&&-0),h=(o*a+c*n)/(n+a);return(zS(o)+zS(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(h))||0}function qS(r,e){var i=r._x1-r._x0;return i?(3*(r._y1-r._y0)/i-e)/2:e}function q0(r,e,i){var n=r._x0,a=r._y0,o=r._x1,c=r._y1,h=(o-n)/3;r._context.bezierCurveTo(n+h,a+h*e,o-h,c-h*i,o,c)}function yg(r){this._context=r}yg.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:q0(this,this._t0,qS(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(r,e){var i=NaN;if(r=+r,e=+e,!(r===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3,q0(this,qS(this,i=PS(this,r,e)),i);break;default:q0(this,this._t0,i=PS(this,r,e));break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e,this._t0=i}}};function xB(r){this._context=new vB(r)}(xB.prototype=Object.create(yg.prototype)).point=function(r,e){yg.prototype.point.call(this,e,r)};function vB(r){this._context=r}vB.prototype={moveTo:function(r,e){this._context.moveTo(e,r)},closePath:function(){this._context.closePath()},lineTo:function(r,e){this._context.lineTo(e,r)},bezierCurveTo:function(r,e,i,n,a,o){this._context.bezierCurveTo(e,r,n,i,o,a)}};function _B(r){return new yg(r)}function CB(r){return new xB(r)}function kB(r){this._context=r}kB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var r=this._x,e=this._y,i=r.length;if(i)if(this._line?this._context.lineTo(r[0],e[0]):this._context.moveTo(r[0],e[0]),i===2)this._context.lineTo(r[1],e[1]);else for(var n=US(r),a=US(e),o=0,c=1;c<i;++o,++c)this._context.bezierCurveTo(n[0][o],a[0][o],n[1][o],a[1][o],r[c],e[c]);(this._line||this._line!==0&&i===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(r,e){this._x.push(+r),this._y.push(+e)}};function US(r){var e,i=r.length-1,n,a=new Array(i),o=new Array(i),c=new Array(i);for(a[0]=0,o[0]=2,c[0]=r[0]+2*r[1],e=1;e<i-1;++e)a[e]=1,o[e]=4,c[e]=4*r[e]+2*r[e+1];for(a[i-1]=2,o[i-1]=7,c[i-1]=8*r[i-1]+r[i],e=1;e<i;++e)n=a[e]/o[e-1],o[e]-=n,c[e]-=n*c[e-1];for(a[i-1]=c[i-1]/o[i-1],e=i-2;e>=0;--e)a[e]=(c[e]-a[e+1])/o[e];for(o[i-1]=(r[i]+a[i-1])/2,e=0;e<i-1;++e)o[e]=2*r[e+1]-a[e+1];return[a,o]}function wB(r){return new kB(r)}function rm(r,e){this._context=r,this._t=e}rm.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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(r,e);else{var i=this._x*(1-this._t)+r*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}break}}this._x=r,this._y=e}};function SB(r){return new rm(r,.5)}function TB(r){return new rm(r,0)}function EB(r){return new rm(r,1)}const yp=r=>()=>r;function Gq(r,{sourceEvent:e,target:i,transform:n,dispatch:a}){Object.defineProperties(this,{type:{value:r,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:a}})}function Ns(r,e,i){this.k=r,this.x=e,this.y=i}Ns.prototype={constructor:Ns,scale:function(r){return r===1?this:new Ns(this.k*r,this.x,this.y)},translate:function(r,e){return r===0&e===0?this:new Ns(this.k,this.x+this.k*r,this.y+this.k*e)},apply:function(r){return[r[0]*this.k+this.x,r[1]*this.k+this.y]},applyX:function(r){return r*this.k+this.x},applyY:function(r){return r*this.k+this.y},invert:function(r){return[(r[0]-this.x)/this.k,(r[1]-this.y)/this.k]},invertX:function(r){return(r-this.x)/this.k},invertY:function(r){return(r-this.y)/this.k},rescaleX:function(r){return r.copy().domain(r.range().map(this.invertX,this).map(r.invert,r))},rescaleY:function(r){return r.copy().domain(r.range().map(this.invertY,this).map(r.invert,r))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var H1=new Ns(1,0,0);Fa.prototype=Ns.prototype;function Fa(r){for(;!r.__zoom;)if(!(r=r.parentNode))return H1;return r.__zoom}function U0(r){r.stopImmediatePropagation()}function ku(r){r.preventDefault(),r.stopImmediatePropagation()}function Wq(r){return(!r.ctrlKey||r.type==="wheel")&&!r.button}function Yq(){var r=this;return r instanceof SVGElement?(r=r.ownerSVGElement||r,r.hasAttribute("viewBox")?(r=r.viewBox.baseVal,[[r.x,r.y],[r.x+r.width,r.y+r.height]]):[[0,0],[r.width.baseVal.value,r.height.baseVal.value]]):[[0,0],[r.clientWidth,r.clientHeight]]}function HS(){return this.__zoom||H1}function Vq(r){return-r.deltaY*(r.deltaMode===1?.05:r.deltaMode?1:.002)*(r.ctrlKey?10:1)}function Kq(){return navigator.maxTouchPoints||"ontouchstart"in this}function Xq(r,e,i){var n=r.invertX(e[0][0])-i[0][0],a=r.invertX(e[1][0])-i[1][0],o=r.invertY(e[0][1])-i[0][1],c=r.invertY(e[1][1])-i[1][1];return r.translate(a>n?(n+a)/2:Math.min(0,n)||Math.max(0,a),c>o?(o+c)/2:Math.min(0,o)||Math.max(0,c))}function Zq(){var r=Wq,e=Yq,i=Xq,n=Vq,a=Kq,o=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],h=250,u=Q8,d=zd("start","zoom","end"),f,g,b,m=500,v=150,_=0,C=10;function w(F){F.property("__zoom",HS).on("wheel.zoom",L,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",j).filter(a).on("touchstart.zoom",$).on("touchmove.zoom",X).on("touchend.zoom touchcancel.zoom",W).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(F,U,D,z){var H=F.selection?F.selection():F;H.property("__zoom",HS),F!==H?O(F,U,D,z):H.interrupt().each(function(){B(this,arguments).event(z).start().zoom(null,typeof U=="function"?U.apply(this,arguments):U).end()})},w.scaleBy=function(F,U,D,z){w.scaleTo(F,function(){var H=this.__zoom.k,V=typeof U=="function"?U.apply(this,arguments):U;return H*V},D,z)},w.scaleTo=function(F,U,D,z){w.transform(F,function(){var H=e.apply(this,arguments),V=this.__zoom,Q=D==null?N(H):typeof D=="function"?D.apply(this,arguments):D,G=V.invert(Q),J=typeof U=="function"?U.apply(this,arguments):U;return i(E(T(V,J),Q,G),H,c)},D,z)},w.translateBy=function(F,U,D,z){w.transform(F,function(){return i(this.__zoom.translate(typeof U=="function"?U.apply(this,arguments):U,typeof D=="function"?D.apply(this,arguments):D),e.apply(this,arguments),c)},null,z)},w.translateTo=function(F,U,D,z,H){w.transform(F,function(){var V=e.apply(this,arguments),Q=this.__zoom,G=z==null?N(V):typeof z=="function"?z.apply(this,arguments):z;return i(H1.translate(G[0],G[1]).scale(Q.k).translate(typeof U=="function"?-U.apply(this,arguments):-U,typeof D=="function"?-D.apply(this,arguments):-D),V,c)},z,H)};function T(F,U){return U=Math.max(o[0],Math.min(o[1],U)),U===F.k?F:new Ns(U,F.x,F.y)}function E(F,U,D){var z=U[0]-D[0]*F.k,H=U[1]-D[1]*F.k;return z===F.x&&H===F.y?F:new Ns(F.k,z,H)}function N(F){return[(+F[0][0]+ +F[1][0])/2,(+F[0][1]+ +F[1][1])/2]}function O(F,U,D,z){F.on("start.zoom",function(){B(this,arguments).event(z).start()}).on("interrupt.zoom end.zoom",function(){B(this,arguments).event(z).end()}).tween("zoom",function(){var H=this,V=arguments,Q=B(H,V).event(z),G=e.apply(H,V),J=D==null?N(G):typeof D=="function"?D.apply(H,V):D,lt=Math.max(G[1][0]-G[0][0],G[1][1]-G[0][1]),st=H.__zoom,vt=typeof U=="function"?U.apply(H,V):U,kt=u(st.invert(J).concat(lt/st.k),vt.invert(J).concat(lt/vt.k));return function(Mt){if(Mt===1)Mt=vt;else{var it=kt(Mt),xt=lt/it[2];Mt=new Ns(xt,J[0]-it[0]*xt,J[1]-it[1]*xt)}Q.zoom(null,Mt)}})}function B(F,U,D){return!D&&F.__zooming||new A(F,U)}function A(F,U){this.that=F,this.args=U,this.active=0,this.sourceEvent=null,this.extent=e.apply(F,U),this.taps=0}A.prototype={event:function(F){return F&&(this.sourceEvent=F),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(F,U){return this.mouse&&F!=="mouse"&&(this.mouse[1]=U.invert(this.mouse[0])),this.touch0&&F!=="touch"&&(this.touch0[1]=U.invert(this.touch0[0])),this.touch1&&F!=="touch"&&(this.touch1[1]=U.invert(this.touch1[0])),this.that.__zoom=U,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(F){var U=ce(this.that).datum();d.call(F,this.that,new Gq(F,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:d}),U)}};function L(F,...U){if(!r.apply(this,arguments))return;var D=B(this,U).event(F),z=this.__zoom,H=Math.max(o[0],Math.min(o[1],z.k*Math.pow(2,n.apply(this,arguments)))),V=Ia(F);if(D.wheel)(D.mouse[0][0]!==V[0]||D.mouse[0][1]!==V[1])&&(D.mouse[1]=z.invert(D.mouse[0]=V)),clearTimeout(D.wheel);else{if(z.k===H)return;D.mouse=[V,z.invert(V)],Hp(this),D.start()}ku(F),D.wheel=setTimeout(Q,v),D.zoom("mouse",i(E(T(z,H),D.mouse[0],D.mouse[1]),D.extent,c));function Q(){D.wheel=null,D.end()}}function P(F,...U){if(b||!r.apply(this,arguments))return;var D=F.currentTarget,z=B(this,U,!0).event(F),H=ce(F.view).on("mousemove.zoom",J,!0).on("mouseup.zoom",lt,!0),V=Ia(F,D),Q=F.clientX,G=F.clientY;UM(F.view),U0(F),z.mouse=[V,this.__zoom.invert(V)],Hp(this),z.start();function J(st){if(ku(st),!z.moved){var vt=st.clientX-Q,kt=st.clientY-G;z.moved=vt*vt+kt*kt>_}z.event(st).zoom("mouse",i(E(z.that.__zoom,z.mouse[0]=Ia(st,D),z.mouse[1]),z.extent,c))}function lt(st){H.on("mousemove.zoom mouseup.zoom",null),HM(st.view,z.moved),ku(st),z.event(st).end()}}function j(F,...U){if(r.apply(this,arguments)){var D=this.__zoom,z=Ia(F.changedTouches?F.changedTouches[0]:F,this),H=D.invert(z),V=D.k*(F.shiftKey?.5:2),Q=i(E(T(D,V),z,H),e.apply(this,U),c);ku(F),h>0?ce(this).transition().duration(h).call(O,Q,z,F):ce(this).call(w.transform,Q,z,F)}}function $(F,...U){if(r.apply(this,arguments)){var D=F.touches,z=D.length,H=B(this,U,F.changedTouches.length===z).event(F),V,Q,G,J;for(U0(F),Q=0;Q<z;++Q)G=D[Q],J=Ia(G,this),J=[J,this.__zoom.invert(J),G.identifier],H.touch0?!H.touch1&&H.touch0[2]!==J[2]&&(H.touch1=J,H.taps=0):(H.touch0=J,V=!0,H.taps=1+!!f);f&&(f=clearTimeout(f)),V&&(H.taps<2&&(g=J[0],f=setTimeout(function(){f=null},m)),Hp(this),H.start())}}function X(F,...U){if(this.__zooming){var D=B(this,U).event(F),z=F.changedTouches,H=z.length,V,Q,G,J;for(ku(F),V=0;V<H;++V)Q=z[V],G=Ia(Q,this),D.touch0&&D.touch0[2]===Q.identifier?D.touch0[0]=G:D.touch1&&D.touch1[2]===Q.identifier&&(D.touch1[0]=G);if(Q=D.that.__zoom,D.touch1){var lt=D.touch0[0],st=D.touch0[1],vt=D.touch1[0],kt=D.touch1[1],Mt=(Mt=vt[0]-lt[0])*Mt+(Mt=vt[1]-lt[1])*Mt,it=(it=kt[0]-st[0])*it+(it=kt[1]-st[1])*it;Q=T(Q,Math.sqrt(Mt/it)),G=[(lt[0]+vt[0])/2,(lt[1]+vt[1])/2],J=[(st[0]+kt[0])/2,(st[1]+kt[1])/2]}else if(D.touch0)G=D.touch0[0],J=D.touch0[1];else return;D.zoom("touch",i(E(Q,G,J),D.extent,c))}}function W(F,...U){if(this.__zooming){var D=B(this,U).event(F),z=F.changedTouches,H=z.length,V,Q;for(U0(F),b&&clearTimeout(b),b=setTimeout(function(){b=null},m),V=0;V<H;++V)Q=z[V],D.touch0&&D.touch0[2]===Q.identifier?delete D.touch0:D.touch1&&D.touch1[2]===Q.identifier&&delete D.touch1;if(D.touch1&&!D.touch0&&(D.touch0=D.touch1,delete D.touch1),D.touch0)D.touch0[1]=this.__zoom.invert(D.touch0[0]);else if(D.end(),D.taps===2&&(Q=Ia(Q,this),Math.hypot(g[0]-Q[0],g[1]-Q[1])<C)){var G=ce(this).on("dblclick.zoom");G&&G.apply(this,arguments)}}}return w.wheelDelta=function(F){return arguments.length?(n=typeof F=="function"?F:yp(+F),w):n},w.filter=function(F){return arguments.length?(r=typeof F=="function"?F:yp(!!F),w):r},w.touchable=function(F){return arguments.length?(a=typeof F=="function"?F:yp(!!F),w):a},w.extent=function(F){return arguments.length?(e=typeof F=="function"?F:yp([[+F[0][0],+F[0][1]],[+F[1][0],+F[1][1]]]),w):e},w.scaleExtent=function(F){return arguments.length?(o[0]=+F[0],o[1]=+F[1],w):[o[0],o[1]]},w.translateExtent=function(F){return arguments.length?(c[0][0]=+F[0][0],c[1][0]=+F[1][0],c[0][1]=+F[0][1],c[1][1]=+F[1][1],w):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},w.constrain=function(F){return arguments.length?(i=F,w):i},w.duration=function(F){return arguments.length?(h=+F,w):h},w.interpolate=function(F){return arguments.length?(u=F,w):u},w.on=function(){var F=d.on.apply(d,arguments);return F===d?w:F},w.clickDistance=function(F){return arguments.length?(_=(F=+F)*F,w):Math.sqrt(_)},w.tapDistance=function(F){return arguments.length?(C=+F,w):C},w}var Qq=M(r=>{var a;const{securityLevel:e}=Ke();let i=ce("body");if(e==="sandbox"){const c=((a=ce(`#i${r}`).node())==null?void 0:a.contentDocument)??document;i=ce(c.body)}return i.select(`#${r}`)},"selectSvgElement");function G1(r){return typeof r>"u"||r===null}M(G1,"isNothing");function AB(r){return typeof r=="object"&&r!==null}M(AB,"isObject");function NB(r){return Array.isArray(r)?r:G1(r)?[]:[r]}M(NB,"toArray");function MB(r,e){var i,n,a,o;if(e)for(o=Object.keys(e),i=0,n=o.length;i<n;i+=1)a=o[i],r[a]=e[a];return r}M(MB,"extend");function BB(r,e){var i="",n;for(n=0;n<e;n+=1)i+=r;return i}M(BB,"repeat");function LB(r){return r===0&&Number.NEGATIVE_INFINITY===1/r}M(LB,"isNegativeZero");var Jq=G1,t9=AB,e9=NB,r9=BB,i9=LB,n9=MB,hi={isNothing:Jq,isObject:t9,toArray:e9,repeat:r9,isNegativeZero:i9,extend:n9};function W1(r,e){var i="",n=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(i+='in "'+r.mark.name+'" '),i+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!e&&r.mark.snippet&&(i+=`
228
+
229
+ `+r.mark.snippet),n+" "+i):n}M(W1,"formatError");function yh(r,e){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=e,this.message=W1(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}M(yh,"YAMLException$1");yh.prototype=Object.create(Error.prototype);yh.prototype.constructor=yh;yh.prototype.toString=M(function(e){return this.name+": "+W1(this,e)},"toString");var pn=yh;function Gp(r,e,i,n,a){var o="",c="",h=Math.floor(a/2)-1;return n-e>h&&(o=" ... ",e=n-h+o.length),i-n>h&&(c=" ...",i=n+h-c.length),{str:o+r.slice(e,i).replace(/\t/g,"→")+c,pos:n-e+o.length}}M(Gp,"getLine");function Wp(r,e){return hi.repeat(" ",e-r.length)+r}M(Wp,"padStart");function OB(r,e){if(e=Object.create(e||null),!r.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var i=/\r?\n|\r|\0/g,n=[0],a=[],o,c=-1;o=i.exec(r.buffer);)a.push(o.index),n.push(o.index+o[0].length),r.position<=o.index&&c<0&&(c=n.length-2);c<0&&(c=n.length-1);var h="",u,d,f=Math.min(r.line+e.linesAfter,a.length).toString().length,g=e.maxLength-(e.indent+f+3);for(u=1;u<=e.linesBefore&&!(c-u<0);u++)d=Gp(r.buffer,n[c-u],a[c-u],r.position-(n[c]-n[c-u]),g),h=hi.repeat(" ",e.indent)+Wp((r.line-u+1).toString(),f)+" | "+d.str+`
230
+ `+h;for(d=Gp(r.buffer,n[c],a[c],r.position,g),h+=hi.repeat(" ",e.indent)+Wp((r.line+1).toString(),f)+" | "+d.str+`
231
+ `,h+=hi.repeat("-",e.indent+f+3+d.pos)+`^
232
+ `,u=1;u<=e.linesAfter&&!(c+u>=a.length);u++)d=Gp(r.buffer,n[c+u],a[c+u],r.position-(n[c]-n[c+u]),g),h+=hi.repeat(" ",e.indent)+Wp((r.line+u+1).toString(),f)+" | "+d.str+`
233
+ `;return h.replace(/\n$/,"")}M(OB,"makeSnippet");var a9=OB,s9=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],o9=["scalar","sequence","mapping"];function RB(r){var e={};return r!==null&&Object.keys(r).forEach(function(i){r[i].forEach(function(n){e[String(n)]=i})}),e}M(RB,"compileStyleAliases");function DB(r,e){if(e=e||{},Object.keys(e).forEach(function(i){if(s9.indexOf(i)===-1)throw new pn('Unknown option "'+i+'" is met in definition of "'+r+'" YAML type.')}),this.options=e,this.tag=r,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(i){return i},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=RB(e.styleAliases||null),o9.indexOf(this.kind)===-1)throw new pn('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}M(DB,"Type$1");var ji=DB;function Qx(r,e){var i=[];return r[e].forEach(function(n){var a=i.length;i.forEach(function(o,c){o.tag===n.tag&&o.kind===n.kind&&o.multi===n.multi&&(a=c)}),i[a]=n}),i}M(Qx,"compileList");function FB(){var r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,i;function n(a){a.multi?(r.multi[a.kind].push(a),r.multi.fallback.push(a)):r[a.kind][a.tag]=r.fallback[a.tag]=a}for(M(n,"collectType"),e=0,i=arguments.length;e<i;e+=1)arguments[e].forEach(n);return r}M(FB,"compileMap");function bg(r){return this.extend(r)}M(bg,"Schema$1");bg.prototype.extend=M(function(e){var i=[],n=[];if(e instanceof ji)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(i=i.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new pn("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(o){if(!(o instanceof ji))throw new pn("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new pn("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new pn("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(o){if(!(o instanceof ji))throw new pn("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(bg.prototype);return a.implicit=(this.implicit||[]).concat(i),a.explicit=(this.explicit||[]).concat(n),a.compiledImplicit=Qx(a,"implicit"),a.compiledExplicit=Qx(a,"explicit"),a.compiledTypeMap=FB(a.compiledImplicit,a.compiledExplicit),a},"extend");var l9=bg,c9=new ji("tag:yaml.org,2002:str",{kind:"scalar",construct:M(function(r){return r!==null?r:""},"construct")}),h9=new ji("tag:yaml.org,2002:seq",{kind:"sequence",construct:M(function(r){return r!==null?r:[]},"construct")}),u9=new ji("tag:yaml.org,2002:map",{kind:"mapping",construct:M(function(r){return r!==null?r:{}},"construct")}),d9=new l9({explicit:[c9,h9,u9]});function jB(r){if(r===null)return!0;var e=r.length;return e===1&&r==="~"||e===4&&(r==="null"||r==="Null"||r==="NULL")}M(jB,"resolveYamlNull");function IB(){return null}M(IB,"constructYamlNull");function $B(r){return r===null}M($B,"isNull");var f9=new ji("tag:yaml.org,2002:null",{kind:"scalar",resolve:jB,construct:IB,predicate:$B,represent:{canonical:M(function(){return"~"},"canonical"),lowercase:M(function(){return"null"},"lowercase"),uppercase:M(function(){return"NULL"},"uppercase"),camelcase:M(function(){return"Null"},"camelcase"),empty:M(function(){return""},"empty")},defaultStyle:"lowercase"});function zB(r){if(r===null)return!1;var e=r.length;return e===4&&(r==="true"||r==="True"||r==="TRUE")||e===5&&(r==="false"||r==="False"||r==="FALSE")}M(zB,"resolveYamlBoolean");function PB(r){return r==="true"||r==="True"||r==="TRUE"}M(PB,"constructYamlBoolean");function qB(r){return Object.prototype.toString.call(r)==="[object Boolean]"}M(qB,"isBoolean");var p9=new ji("tag:yaml.org,2002:bool",{kind:"scalar",resolve:zB,construct:PB,predicate:qB,represent:{lowercase:M(function(r){return r?"true":"false"},"lowercase"),uppercase:M(function(r){return r?"TRUE":"FALSE"},"uppercase"),camelcase:M(function(r){return r?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function UB(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}M(UB,"isHexCode");function HB(r){return 48<=r&&r<=55}M(HB,"isOctCode");function GB(r){return 48<=r&&r<=57}M(GB,"isDecCode");function WB(r){if(r===null)return!1;var e=r.length,i=0,n=!1,a;if(!e)return!1;if(a=r[i],(a==="-"||a==="+")&&(a=r[++i]),a==="0"){if(i+1===e)return!0;if(a=r[++i],a==="b"){for(i++;i<e;i++)if(a=r[i],a!=="_"){if(a!=="0"&&a!=="1")return!1;n=!0}return n&&a!=="_"}if(a==="x"){for(i++;i<e;i++)if(a=r[i],a!=="_"){if(!UB(r.charCodeAt(i)))return!1;n=!0}return n&&a!=="_"}if(a==="o"){for(i++;i<e;i++)if(a=r[i],a!=="_"){if(!HB(r.charCodeAt(i)))return!1;n=!0}return n&&a!=="_"}}if(a==="_")return!1;for(;i<e;i++)if(a=r[i],a!=="_"){if(!GB(r.charCodeAt(i)))return!1;n=!0}return!(!n||a==="_")}M(WB,"resolveYamlInteger");function YB(r){var e=r,i=1,n;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(i=-1),e=e.slice(1),n=e[0]),e==="0")return 0;if(n==="0"){if(e[1]==="b")return i*parseInt(e.slice(2),2);if(e[1]==="x")return i*parseInt(e.slice(2),16);if(e[1]==="o")return i*parseInt(e.slice(2),8)}return i*parseInt(e,10)}M(YB,"constructYamlInteger");function VB(r){return Object.prototype.toString.call(r)==="[object Number]"&&r%1===0&&!hi.isNegativeZero(r)}M(VB,"isInteger");var g9=new ji("tag:yaml.org,2002:int",{kind:"scalar",resolve:WB,construct:YB,predicate:VB,represent:{binary:M(function(r){return r>=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},"binary"),octal:M(function(r){return r>=0?"0o"+r.toString(8):"-0o"+r.toString(8).slice(1)},"octal"),decimal:M(function(r){return r.toString(10)},"decimal"),hexadecimal:M(function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),m9=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function KB(r){return!(r===null||!m9.test(r)||r[r.length-1]==="_")}M(KB,"resolveYamlFloat");function XB(r){var e,i;return e=r.replace(/_/g,"").toLowerCase(),i=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:i*parseFloat(e,10)}M(XB,"constructYamlFloat");var y9=/^[-+]?[0-9]+e/;function ZB(r,e){var i;if(isNaN(r))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===r)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===r)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(hi.isNegativeZero(r))return"-0.0";return i=r.toString(10),y9.test(i)?i.replace("e",".e"):i}M(ZB,"representYamlFloat");function QB(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||hi.isNegativeZero(r))}M(QB,"isFloat");var b9=new ji("tag:yaml.org,2002:float",{kind:"scalar",resolve:KB,construct:XB,predicate:QB,represent:ZB,defaultStyle:"lowercase"}),JB=d9.extend({implicit:[f9,p9,g9,b9]}),x9=JB,tL=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),eL=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 rL(r){return r===null?!1:tL.exec(r)!==null||eL.exec(r)!==null}M(rL,"resolveYamlTimestamp");function iL(r){var e,i,n,a,o,c,h,u=0,d=null,f,g,b;if(e=tL.exec(r),e===null&&(e=eL.exec(r)),e===null)throw new Error("Date resolve error");if(i=+e[1],n=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(i,n,a));if(o=+e[4],c=+e[5],h=+e[6],e[7]){for(u=e[7].slice(0,3);u.length<3;)u+="0";u=+u}return e[9]&&(f=+e[10],g=+(e[11]||0),d=(f*60+g)*6e4,e[9]==="-"&&(d=-d)),b=new Date(Date.UTC(i,n,a,o,c,h,u)),d&&b.setTime(b.getTime()-d),b}M(iL,"constructYamlTimestamp");function nL(r){return r.toISOString()}M(nL,"representYamlTimestamp");var v9=new ji("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:rL,construct:iL,instanceOf:Date,represent:nL});function aL(r){return r==="<<"||r===null}M(aL,"resolveYamlMerge");var _9=new ji("tag:yaml.org,2002:merge",{kind:"scalar",resolve:aL}),Y1=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
234
+ \r`;function sL(r){if(r===null)return!1;var e,i,n=0,a=r.length,o=Y1;for(i=0;i<a;i++)if(e=o.indexOf(r.charAt(i)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}M(sL,"resolveYamlBinary");function oL(r){var e,i,n=r.replace(/[\r\n=]/g,""),a=n.length,o=Y1,c=0,h=[];for(e=0;e<a;e++)e%4===0&&e&&(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)),c=c<<6|o.indexOf(n.charAt(e));return i=a%4*6,i===0?(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)):i===18?(h.push(c>>10&255),h.push(c>>2&255)):i===12&&h.push(c>>4&255),new Uint8Array(h)}M(oL,"constructYamlBinary");function lL(r){var e="",i=0,n,a,o=r.length,c=Y1;for(n=0;n<o;n++)n%3===0&&n&&(e+=c[i>>18&63],e+=c[i>>12&63],e+=c[i>>6&63],e+=c[i&63]),i=(i<<8)+r[n];return a=o%3,a===0?(e+=c[i>>18&63],e+=c[i>>12&63],e+=c[i>>6&63],e+=c[i&63]):a===2?(e+=c[i>>10&63],e+=c[i>>4&63],e+=c[i<<2&63],e+=c[64]):a===1&&(e+=c[i>>2&63],e+=c[i<<4&63],e+=c[64],e+=c[64]),e}M(lL,"representYamlBinary");function cL(r){return Object.prototype.toString.call(r)==="[object Uint8Array]"}M(cL,"isBinary");var C9=new ji("tag:yaml.org,2002:binary",{kind:"scalar",resolve:sL,construct:oL,predicate:cL,represent:lL}),k9=Object.prototype.hasOwnProperty,w9=Object.prototype.toString;function hL(r){if(r===null)return!0;var e=[],i,n,a,o,c,h=r;for(i=0,n=h.length;i<n;i+=1){if(a=h[i],c=!1,w9.call(a)!=="[object Object]")return!1;for(o in a)if(k9.call(a,o))if(!c)c=!0;else return!1;if(!c)return!1;if(e.indexOf(o)===-1)e.push(o);else return!1}return!0}M(hL,"resolveYamlOmap");function uL(r){return r!==null?r:[]}M(uL,"constructYamlOmap");var S9=new ji("tag:yaml.org,2002:omap",{kind:"sequence",resolve:hL,construct:uL}),T9=Object.prototype.toString;function dL(r){if(r===null)return!0;var e,i,n,a,o,c=r;for(o=new Array(c.length),e=0,i=c.length;e<i;e+=1){if(n=c[e],T9.call(n)!=="[object Object]"||(a=Object.keys(n),a.length!==1))return!1;o[e]=[a[0],n[a[0]]]}return!0}M(dL,"resolveYamlPairs");function fL(r){if(r===null)return[];var e,i,n,a,o,c=r;for(o=new Array(c.length),e=0,i=c.length;e<i;e+=1)n=c[e],a=Object.keys(n),o[e]=[a[0],n[a[0]]];return o}M(fL,"constructYamlPairs");var E9=new ji("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:dL,construct:fL}),A9=Object.prototype.hasOwnProperty;function pL(r){if(r===null)return!0;var e,i=r;for(e in i)if(A9.call(i,e)&&i[e]!==null)return!1;return!0}M(pL,"resolveYamlSet");function gL(r){return r!==null?r:{}}M(gL,"constructYamlSet");var N9=new ji("tag:yaml.org,2002:set",{kind:"mapping",resolve:pL,construct:gL}),mL=x9.extend({implicit:[v9,_9],explicit:[C9,S9,E9,N9]}),Do=Object.prototype.hasOwnProperty,xg=1,yL=2,bL=3,vg=4,H0=1,M9=2,GS=3,B9=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,L9=/[\x85\u2028\u2029]/,O9=/[,\[\]\{\}]/,xL=/^(?:!|!!|![a-z\-]+!)$/i,vL=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Jx(r){return Object.prototype.toString.call(r)}M(Jx,"_class");function xa(r){return r===10||r===13}M(xa,"is_EOL");function Lo(r){return r===9||r===32}M(Lo,"is_WHITE_SPACE");function Ki(r){return r===9||r===32||r===10||r===13}M(Ki,"is_WS_OR_EOL");function gl(r){return r===44||r===91||r===93||r===123||r===125}M(gl,"is_FLOW_INDICATOR");function _L(r){var e;return 48<=r&&r<=57?r-48:(e=r|32,97<=e&&e<=102?e-97+10:-1)}M(_L,"fromHexCode");function CL(r){return r===120?2:r===117?4:r===85?8:0}M(CL,"escapedHexLen");function kL(r){return 48<=r&&r<=57?r-48:-1}M(kL,"fromDecimalCode");function tv(r){return r===48?"\0":r===97?"\x07":r===98?"\b":r===116||r===9?" ":r===110?`
235
+ `:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"\x1B":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"…":r===95?" ":r===76?"\u2028":r===80?"\u2029":""}M(tv,"simpleEscapeSequence");function wL(r){return r<=65535?String.fromCharCode(r):String.fromCharCode((r-65536>>10)+55296,(r-65536&1023)+56320)}M(wL,"charFromCodepoint");function V1(r,e,i){e==="__proto__"?Object.defineProperty(r,e,{configurable:!0,enumerable:!0,writable:!0,value:i}):r[e]=i}M(V1,"setProperty");var SL=new Array(256),TL=new Array(256);for(nl=0;nl<256;nl++)SL[nl]=tv(nl)?1:0,TL[nl]=tv(nl);var nl;function EL(r,e){this.input=r,this.filename=e.filename||null,this.schema=e.schema||mL,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=r.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}M(EL,"State$1");function K1(r,e){var i={name:r.filename,buffer:r.input.slice(0,-1),position:r.position,line:r.line,column:r.position-r.lineStart};return i.snippet=a9(i),new pn(e,i)}M(K1,"generateError");function ee(r,e){throw K1(r,e)}M(ee,"throwError");function vd(r,e){r.onWarning&&r.onWarning.call(null,K1(r,e))}M(vd,"throwWarning");var WS={YAML:M(function(e,i,n){var a,o,c;e.version!==null&&ee(e,"duplication of %YAML directive"),n.length!==1&&ee(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),a===null&&ee(e,"ill-formed argument of the YAML directive"),o=parseInt(a[1],10),c=parseInt(a[2],10),o!==1&&ee(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=c<2,c!==1&&c!==2&&vd(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:M(function(e,i,n){var a,o;n.length!==2&&ee(e,"TAG directive accepts exactly two arguments"),a=n[0],o=n[1],xL.test(a)||ee(e,"ill-formed tag handle (first argument) of the TAG directive"),Do.call(e.tagMap,a)&&ee(e,'there is a previously declared suffix for "'+a+'" tag handle'),vL.test(o)||ee(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{ee(e,"tag prefix is malformed: "+o)}e.tagMap[a]=o},"handleTagDirective")};function Bs(r,e,i,n){var a,o,c,h;if(e<i){if(h=r.input.slice(e,i),n)for(a=0,o=h.length;a<o;a+=1)c=h.charCodeAt(a),c===9||32<=c&&c<=1114111||ee(r,"expected valid JSON character");else B9.test(h)&&ee(r,"the stream contains non-printable characters");r.result+=h}}M(Bs,"captureSegment");function ev(r,e,i,n){var a,o,c,h;for(hi.isObject(i)||ee(r,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(i),c=0,h=a.length;c<h;c+=1)o=a[c],Do.call(e,o)||(V1(e,o,i[o]),n[o]=!0)}M(ev,"mergeMappings");function ml(r,e,i,n,a,o,c,h,u){var d,f;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),d=0,f=a.length;d<f;d+=1)Array.isArray(a[d])&&ee(r,"nested arrays are not supported inside keys"),typeof a=="object"&&Jx(a[d])==="[object Object]"&&(a[d]="[object Object]");if(typeof a=="object"&&Jx(a)==="[object Object]"&&(a="[object Object]"),a=String(a),e===null&&(e={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(d=0,f=o.length;d<f;d+=1)ev(r,e,o[d],i);else ev(r,e,o,i);else!r.json&&!Do.call(i,a)&&Do.call(e,a)&&(r.line=c||r.line,r.lineStart=h||r.lineStart,r.position=u||r.position,ee(r,"duplicated mapping key")),V1(e,a,o),delete i[a];return e}M(ml,"storeMappingPair");function im(r){var e;e=r.input.charCodeAt(r.position),e===10?r.position++:e===13?(r.position++,r.input.charCodeAt(r.position)===10&&r.position++):ee(r,"a line break is expected"),r.line+=1,r.lineStart=r.position,r.firstTabInLine=-1}M(im,"readLineBreak");function Wr(r,e,i){for(var n=0,a=r.input.charCodeAt(r.position);a!==0;){for(;Lo(a);)a===9&&r.firstTabInLine===-1&&(r.firstTabInLine=r.position),a=r.input.charCodeAt(++r.position);if(e&&a===35)do a=r.input.charCodeAt(++r.position);while(a!==10&&a!==13&&a!==0);if(xa(a))for(im(r),a=r.input.charCodeAt(r.position),n++,r.lineIndent=0;a===32;)r.lineIndent++,a=r.input.charCodeAt(++r.position);else break}return i!==-1&&n!==0&&r.lineIndent<i&&vd(r,"deficient indentation"),n}M(Wr,"skipSeparationSpace");function Ud(r){var e=r.position,i;return i=r.input.charCodeAt(e),!!((i===45||i===46)&&i===r.input.charCodeAt(e+1)&&i===r.input.charCodeAt(e+2)&&(e+=3,i=r.input.charCodeAt(e),i===0||Ki(i)))}M(Ud,"testDocumentSeparator");function nm(r,e){e===1?r.result+=" ":e>1&&(r.result+=hi.repeat(`
236
+ `,e-1))}M(nm,"writeFoldedLines");function AL(r,e,i){var n,a,o,c,h,u,d,f,g=r.kind,b=r.result,m;if(m=r.input.charCodeAt(r.position),Ki(m)||gl(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)&&(a=r.input.charCodeAt(r.position+1),Ki(a)||i&&gl(a)))return!1;for(r.kind="scalar",r.result="",o=c=r.position,h=!1;m!==0;){if(m===58){if(a=r.input.charCodeAt(r.position+1),Ki(a)||i&&gl(a))break}else if(m===35){if(n=r.input.charCodeAt(r.position-1),Ki(n))break}else{if(r.position===r.lineStart&&Ud(r)||i&&gl(m))break;if(xa(m))if(u=r.line,d=r.lineStart,f=r.lineIndent,Wr(r,!1,-1),r.lineIndent>=e){h=!0,m=r.input.charCodeAt(r.position);continue}else{r.position=c,r.line=u,r.lineStart=d,r.lineIndent=f;break}}h&&(Bs(r,o,c,!1),nm(r,r.line-u),o=c=r.position,h=!1),Lo(m)||(c=r.position+1),m=r.input.charCodeAt(++r.position)}return Bs(r,o,c,!1),r.result?!0:(r.kind=g,r.result=b,!1)}M(AL,"readPlainScalar");function NL(r,e){var i,n,a;if(i=r.input.charCodeAt(r.position),i!==39)return!1;for(r.kind="scalar",r.result="",r.position++,n=a=r.position;(i=r.input.charCodeAt(r.position))!==0;)if(i===39)if(Bs(r,n,r.position,!0),i=r.input.charCodeAt(++r.position),i===39)n=r.position,r.position++,a=r.position;else return!0;else xa(i)?(Bs(r,n,a,!0),nm(r,Wr(r,!1,e)),n=a=r.position):r.position===r.lineStart&&Ud(r)?ee(r,"unexpected end of the document within a single quoted scalar"):(r.position++,a=r.position);ee(r,"unexpected end of the stream within a single quoted scalar")}M(NL,"readSingleQuotedScalar");function ML(r,e){var i,n,a,o,c,h;if(h=r.input.charCodeAt(r.position),h!==34)return!1;for(r.kind="scalar",r.result="",r.position++,i=n=r.position;(h=r.input.charCodeAt(r.position))!==0;){if(h===34)return Bs(r,i,r.position,!0),r.position++,!0;if(h===92){if(Bs(r,i,r.position,!0),h=r.input.charCodeAt(++r.position),xa(h))Wr(r,!1,e);else if(h<256&&SL[h])r.result+=TL[h],r.position++;else if((c=CL(h))>0){for(a=c,o=0;a>0;a--)h=r.input.charCodeAt(++r.position),(c=_L(h))>=0?o=(o<<4)+c:ee(r,"expected hexadecimal character");r.result+=wL(o),r.position++}else ee(r,"unknown escape sequence");i=n=r.position}else xa(h)?(Bs(r,i,n,!0),nm(r,Wr(r,!1,e)),i=n=r.position):r.position===r.lineStart&&Ud(r)?ee(r,"unexpected end of the document within a double quoted scalar"):(r.position++,n=r.position)}ee(r,"unexpected end of the stream within a double quoted scalar")}M(ML,"readDoubleQuotedScalar");function BL(r,e){var i=!0,n,a,o,c=r.tag,h,u=r.anchor,d,f,g,b,m,v=Object.create(null),_,C,w,T;if(T=r.input.charCodeAt(r.position),T===91)f=93,m=!1,h=[];else if(T===123)f=125,m=!0,h={};else return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=h),T=r.input.charCodeAt(++r.position);T!==0;){if(Wr(r,!0,e),T=r.input.charCodeAt(r.position),T===f)return r.position++,r.tag=c,r.anchor=u,r.kind=m?"mapping":"sequence",r.result=h,!0;i?T===44&&ee(r,"expected the node content, but found ','"):ee(r,"missed comma between flow collection entries"),C=_=w=null,g=b=!1,T===63&&(d=r.input.charCodeAt(r.position+1),Ki(d)&&(g=b=!0,r.position++,Wr(r,!0,e))),n=r.line,a=r.lineStart,o=r.position,Fl(r,e,xg,!1,!0),C=r.tag,_=r.result,Wr(r,!0,e),T=r.input.charCodeAt(r.position),(b||r.line===n)&&T===58&&(g=!0,T=r.input.charCodeAt(++r.position),Wr(r,!0,e),Fl(r,e,xg,!1,!0),w=r.result),m?ml(r,h,v,C,_,w,n,a,o):g?h.push(ml(r,null,v,C,_,w,n,a,o)):h.push(_),Wr(r,!0,e),T=r.input.charCodeAt(r.position),T===44?(i=!0,T=r.input.charCodeAt(++r.position)):i=!1}ee(r,"unexpected end of the stream within a flow collection")}M(BL,"readFlowCollection");function LL(r,e){var i,n,a=H0,o=!1,c=!1,h=e,u=0,d=!1,f,g;if(g=r.input.charCodeAt(r.position),g===124)n=!1;else if(g===62)n=!0;else return!1;for(r.kind="scalar",r.result="";g!==0;)if(g=r.input.charCodeAt(++r.position),g===43||g===45)H0===a?a=g===43?GS:M9:ee(r,"repeat of a chomping mode identifier");else if((f=kL(g))>=0)f===0?ee(r,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?ee(r,"repeat of an indentation width identifier"):(h=e+f-1,c=!0);else break;if(Lo(g)){do g=r.input.charCodeAt(++r.position);while(Lo(g));if(g===35)do g=r.input.charCodeAt(++r.position);while(!xa(g)&&g!==0)}for(;g!==0;){for(im(r),r.lineIndent=0,g=r.input.charCodeAt(r.position);(!c||r.lineIndent<h)&&g===32;)r.lineIndent++,g=r.input.charCodeAt(++r.position);if(!c&&r.lineIndent>h&&(h=r.lineIndent),xa(g)){u++;continue}if(r.lineIndent<h){a===GS?r.result+=hi.repeat(`
237
+ `,o?1+u:u):a===H0&&o&&(r.result+=`
238
+ `);break}for(n?Lo(g)?(d=!0,r.result+=hi.repeat(`
239
+ `,o?1+u:u)):d?(d=!1,r.result+=hi.repeat(`
240
+ `,u+1)):u===0?o&&(r.result+=" "):r.result+=hi.repeat(`
241
+ `,u):r.result+=hi.repeat(`
242
+ `,o?1+u:u),o=!0,c=!0,u=0,i=r.position;!xa(g)&&g!==0;)g=r.input.charCodeAt(++r.position);Bs(r,i,r.position,!1)}return!0}M(LL,"readBlockScalar");function rv(r,e){var i,n=r.tag,a=r.anchor,o=[],c,h=!1,u;if(r.firstTabInLine!==-1)return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=o),u=r.input.charCodeAt(r.position);u!==0&&(r.firstTabInLine!==-1&&(r.position=r.firstTabInLine,ee(r,"tab characters must not be used in indentation")),!(u!==45||(c=r.input.charCodeAt(r.position+1),!Ki(c))));){if(h=!0,r.position++,Wr(r,!0,-1)&&r.lineIndent<=e){o.push(null),u=r.input.charCodeAt(r.position);continue}if(i=r.line,Fl(r,e,bL,!1,!0),o.push(r.result),Wr(r,!0,-1),u=r.input.charCodeAt(r.position),(r.line===i||r.lineIndent>e)&&u!==0)ee(r,"bad indentation of a sequence entry");else if(r.lineIndent<e)break}return h?(r.tag=n,r.anchor=a,r.kind="sequence",r.result=o,!0):!1}M(rv,"readBlockSequence");function OL(r,e,i){var n,a,o,c,h,u,d=r.tag,f=r.anchor,g={},b=Object.create(null),m=null,v=null,_=null,C=!1,w=!1,T;if(r.firstTabInLine!==-1)return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=g),T=r.input.charCodeAt(r.position);T!==0;){if(!C&&r.firstTabInLine!==-1&&(r.position=r.firstTabInLine,ee(r,"tab characters must not be used in indentation")),n=r.input.charCodeAt(r.position+1),o=r.line,(T===63||T===58)&&Ki(n))T===63?(C&&(ml(r,g,b,m,v,null,c,h,u),m=v=_=null),w=!0,C=!0,a=!0):C?(C=!1,a=!0):ee(r,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),r.position+=1,T=n;else{if(c=r.line,h=r.lineStart,u=r.position,!Fl(r,i,yL,!1,!0))break;if(r.line===o){for(T=r.input.charCodeAt(r.position);Lo(T);)T=r.input.charCodeAt(++r.position);if(T===58)T=r.input.charCodeAt(++r.position),Ki(T)||ee(r,"a whitespace character is expected after the key-value separator within a block mapping"),C&&(ml(r,g,b,m,v,null,c,h,u),m=v=_=null),w=!0,C=!1,a=!1,m=r.tag,v=r.result;else if(w)ee(r,"can not read an implicit mapping pair; a colon is missed");else return r.tag=d,r.anchor=f,!0}else if(w)ee(r,"can not read a block mapping entry; a multiline key may not be an implicit key");else return r.tag=d,r.anchor=f,!0}if((r.line===o||r.lineIndent>e)&&(C&&(c=r.line,h=r.lineStart,u=r.position),Fl(r,e,vg,!0,a)&&(C?v=r.result:_=r.result),C||(ml(r,g,b,m,v,_,c,h,u),m=v=_=null),Wr(r,!0,-1),T=r.input.charCodeAt(r.position)),(r.line===o||r.lineIndent>e)&&T!==0)ee(r,"bad indentation of a mapping entry");else if(r.lineIndent<e)break}return C&&ml(r,g,b,m,v,null,c,h,u),w&&(r.tag=d,r.anchor=f,r.kind="mapping",r.result=g),w}M(OL,"readBlockMapping");function RL(r){var e,i=!1,n=!1,a,o,c;if(c=r.input.charCodeAt(r.position),c!==33)return!1;if(r.tag!==null&&ee(r,"duplication of a tag property"),c=r.input.charCodeAt(++r.position),c===60?(i=!0,c=r.input.charCodeAt(++r.position)):c===33?(n=!0,a="!!",c=r.input.charCodeAt(++r.position)):a="!",e=r.position,i){do c=r.input.charCodeAt(++r.position);while(c!==0&&c!==62);r.position<r.length?(o=r.input.slice(e,r.position),c=r.input.charCodeAt(++r.position)):ee(r,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!Ki(c);)c===33&&(n?ee(r,"tag suffix cannot contain exclamation marks"):(a=r.input.slice(e-1,r.position+1),xL.test(a)||ee(r,"named tag handle cannot contain such characters"),n=!0,e=r.position+1)),c=r.input.charCodeAt(++r.position);o=r.input.slice(e,r.position),O9.test(o)&&ee(r,"tag suffix cannot contain flow indicator characters")}o&&!vL.test(o)&&ee(r,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{ee(r,"tag name is malformed: "+o)}return i?r.tag=o:Do.call(r.tagMap,a)?r.tag=r.tagMap[a]+o:a==="!"?r.tag="!"+o:a==="!!"?r.tag="tag:yaml.org,2002:"+o:ee(r,'undeclared tag handle "'+a+'"'),!0}M(RL,"readTagProperty");function DL(r){var e,i;if(i=r.input.charCodeAt(r.position),i!==38)return!1;for(r.anchor!==null&&ee(r,"duplication of an anchor property"),i=r.input.charCodeAt(++r.position),e=r.position;i!==0&&!Ki(i)&&!gl(i);)i=r.input.charCodeAt(++r.position);return r.position===e&&ee(r,"name of an anchor node must contain at least one character"),r.anchor=r.input.slice(e,r.position),!0}M(DL,"readAnchorProperty");function FL(r){var e,i,n;if(n=r.input.charCodeAt(r.position),n!==42)return!1;for(n=r.input.charCodeAt(++r.position),e=r.position;n!==0&&!Ki(n)&&!gl(n);)n=r.input.charCodeAt(++r.position);return r.position===e&&ee(r,"name of an alias node must contain at least one character"),i=r.input.slice(e,r.position),Do.call(r.anchorMap,i)||ee(r,'unidentified alias "'+i+'"'),r.result=r.anchorMap[i],Wr(r,!0,-1),!0}M(FL,"readAlias");function Fl(r,e,i,n,a){var o,c,h,u=1,d=!1,f=!1,g,b,m,v,_,C;if(r.listener!==null&&r.listener("open",r),r.tag=null,r.anchor=null,r.kind=null,r.result=null,o=c=h=vg===i||bL===i,n&&Wr(r,!0,-1)&&(d=!0,r.lineIndent>e?u=1:r.lineIndent===e?u=0:r.lineIndent<e&&(u=-1)),u===1)for(;RL(r)||DL(r);)Wr(r,!0,-1)?(d=!0,h=o,r.lineIndent>e?u=1:r.lineIndent===e?u=0:r.lineIndent<e&&(u=-1)):h=!1;if(h&&(h=d||a),(u===1||vg===i)&&(xg===i||yL===i?_=e:_=e+1,C=r.position-r.lineStart,u===1?h&&(rv(r,C)||OL(r,C,_))||BL(r,_)?f=!0:(c&&LL(r,_)||NL(r,_)||ML(r,_)?f=!0:FL(r)?(f=!0,(r.tag!==null||r.anchor!==null)&&ee(r,"alias node should not have any properties")):AL(r,_,xg===i)&&(f=!0,r.tag===null&&(r.tag="?")),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):u===0&&(f=h&&rv(r,C))),r.tag===null)r.anchor!==null&&(r.anchorMap[r.anchor]=r.result);else if(r.tag==="?"){for(r.result!==null&&r.kind!=="scalar"&&ee(r,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+r.kind+'"'),g=0,b=r.implicitTypes.length;g<b;g+=1)if(v=r.implicitTypes[g],v.resolve(r.result)){r.result=v.construct(r.result),r.tag=v.tag,r.anchor!==null&&(r.anchorMap[r.anchor]=r.result);break}}else if(r.tag!=="!"){if(Do.call(r.typeMap[r.kind||"fallback"],r.tag))v=r.typeMap[r.kind||"fallback"][r.tag];else for(v=null,m=r.typeMap.multi[r.kind||"fallback"],g=0,b=m.length;g<b;g+=1)if(r.tag.slice(0,m[g].tag.length)===m[g].tag){v=m[g];break}v||ee(r,"unknown tag !<"+r.tag+">"),r.result!==null&&v.kind!==r.kind&&ee(r,"unacceptable node kind for !<"+r.tag+'> tag; it should be "'+v.kind+'", not "'+r.kind+'"'),v.resolve(r.result,r.tag)?(r.result=v.construct(r.result,r.tag),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):ee(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")}return r.listener!==null&&r.listener("close",r),r.tag!==null||r.anchor!==null||f}M(Fl,"composeNode");function jL(r){var e=r.position,i,n,a,o=!1,c;for(r.version=null,r.checkLineBreaks=r.legacy,r.tagMap=Object.create(null),r.anchorMap=Object.create(null);(c=r.input.charCodeAt(r.position))!==0&&(Wr(r,!0,-1),c=r.input.charCodeAt(r.position),!(r.lineIndent>0||c!==37));){for(o=!0,c=r.input.charCodeAt(++r.position),i=r.position;c!==0&&!Ki(c);)c=r.input.charCodeAt(++r.position);for(n=r.input.slice(i,r.position),a=[],n.length<1&&ee(r,"directive name must not be less than one character in length");c!==0;){for(;Lo(c);)c=r.input.charCodeAt(++r.position);if(c===35){do c=r.input.charCodeAt(++r.position);while(c!==0&&!xa(c));break}if(xa(c))break;for(i=r.position;c!==0&&!Ki(c);)c=r.input.charCodeAt(++r.position);a.push(r.input.slice(i,r.position))}c!==0&&im(r),Do.call(WS,n)?WS[n](r,n,a):vd(r,'unknown document directive "'+n+'"')}if(Wr(r,!0,-1),r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45?(r.position+=3,Wr(r,!0,-1)):o&&ee(r,"directives end mark is expected"),Fl(r,r.lineIndent-1,vg,!1,!0),Wr(r,!0,-1),r.checkLineBreaks&&L9.test(r.input.slice(e,r.position))&&vd(r,"non-ASCII line breaks are interpreted as content"),r.documents.push(r.result),r.position===r.lineStart&&Ud(r)){r.input.charCodeAt(r.position)===46&&(r.position+=3,Wr(r,!0,-1));return}if(r.position<r.length-1)ee(r,"end of the stream or a document separator is expected");else return}M(jL,"readDocument");function X1(r,e){r=String(r),e=e||{},r.length!==0&&(r.charCodeAt(r.length-1)!==10&&r.charCodeAt(r.length-1)!==13&&(r+=`
243
+ `),r.charCodeAt(0)===65279&&(r=r.slice(1)));var i=new EL(r,e),n=r.indexOf("\0");for(n!==-1&&(i.position=n,ee(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)jL(i);return i.documents}M(X1,"loadDocuments");function R9(r,e,i){e!==null&&typeof e=="object"&&typeof i>"u"&&(i=e,e=null);var n=X1(r,i);if(typeof e!="function")return n;for(var a=0,o=n.length;a<o;a+=1)e(n[a])}M(R9,"loadAll$1");function IL(r,e){var i=X1(r,e);if(i.length!==0){if(i.length===1)return i[0];throw new pn("expected a single document in the stream, but found more")}}M(IL,"load$1");var D9=IL,F9={load:D9},$L=Object.prototype.toString,zL=Object.prototype.hasOwnProperty,Z1=65279,j9=9,_d=10,I9=13,$9=32,z9=33,P9=34,iv=35,q9=37,U9=38,H9=39,G9=42,PL=44,W9=45,_g=58,Y9=61,V9=62,K9=63,X9=64,qL=91,UL=93,Z9=96,HL=123,Q9=124,GL=125,Ii={};Ii[0]="\\0";Ii[7]="\\a";Ii[8]="\\b";Ii[9]="\\t";Ii[10]="\\n";Ii[11]="\\v";Ii[12]="\\f";Ii[13]="\\r";Ii[27]="\\e";Ii[34]='\\"';Ii[92]="\\\\";Ii[133]="\\N";Ii[160]="\\_";Ii[8232]="\\L";Ii[8233]="\\P";var J9=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],t7=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function WL(r,e){var i,n,a,o,c,h,u;if(e===null)return{};for(i={},n=Object.keys(e),a=0,o=n.length;a<o;a+=1)c=n[a],h=String(e[c]),c.slice(0,2)==="!!"&&(c="tag:yaml.org,2002:"+c.slice(2)),u=r.compiledTypeMap.fallback[c],u&&zL.call(u.styleAliases,h)&&(h=u.styleAliases[h]),i[c]=h;return i}M(WL,"compileStyleMap");function YL(r){var e,i,n;if(e=r.toString(16).toUpperCase(),r<=255)i="x",n=2;else if(r<=65535)i="u",n=4;else if(r<=4294967295)i="U",n=8;else throw new pn("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+hi.repeat("0",n-e.length)+e}M(YL,"encodeHex");var e7=1,Cd=2;function VL(r){this.schema=r.schema||mL,this.indent=Math.max(1,r.indent||2),this.noArrayIndent=r.noArrayIndent||!1,this.skipInvalid=r.skipInvalid||!1,this.flowLevel=hi.isNothing(r.flowLevel)?-1:r.flowLevel,this.styleMap=WL(this.schema,r.styles||null),this.sortKeys=r.sortKeys||!1,this.lineWidth=r.lineWidth||80,this.noRefs=r.noRefs||!1,this.noCompatMode=r.noCompatMode||!1,this.condenseFlow=r.condenseFlow||!1,this.quotingType=r.quotingType==='"'?Cd:e7,this.forceQuotes=r.forceQuotes||!1,this.replacer=typeof r.replacer=="function"?r.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}M(VL,"State");function nv(r,e){for(var i=hi.repeat(" ",e),n=0,a=-1,o="",c,h=r.length;n<h;)a=r.indexOf(`
244
+ `,n),a===-1?(c=r.slice(n),n=h):(c=r.slice(n,a+1),n=a+1),c.length&&c!==`
245
+ `&&(o+=i),o+=c;return o}M(nv,"indentString");function Cg(r,e){return`
246
+ `+hi.repeat(" ",r.indent*e)}M(Cg,"generateNextLine");function KL(r,e){var i,n,a;for(i=0,n=r.implicitTypes.length;i<n;i+=1)if(a=r.implicitTypes[i],a.resolve(e))return!0;return!1}M(KL,"testImplicitResolving");function kd(r){return r===$9||r===j9}M(kd,"isWhitespace");function bh(r){return 32<=r&&r<=126||161<=r&&r<=55295&&r!==8232&&r!==8233||57344<=r&&r<=65533&&r!==Z1||65536<=r&&r<=1114111}M(bh,"isPrintable");function av(r){return bh(r)&&r!==Z1&&r!==I9&&r!==_d}M(av,"isNsCharOrWhitespace");function sv(r,e,i){var n=av(r),a=n&&!kd(r);return(i?n:n&&r!==PL&&r!==qL&&r!==UL&&r!==HL&&r!==GL)&&r!==iv&&!(e===_g&&!a)||av(e)&&!kd(e)&&r===iv||e===_g&&a}M(sv,"isPlainSafe");function XL(r){return bh(r)&&r!==Z1&&!kd(r)&&r!==W9&&r!==K9&&r!==_g&&r!==PL&&r!==qL&&r!==UL&&r!==HL&&r!==GL&&r!==iv&&r!==U9&&r!==G9&&r!==z9&&r!==Q9&&r!==Y9&&r!==V9&&r!==H9&&r!==P9&&r!==q9&&r!==X9&&r!==Z9}M(XL,"isPlainSafeFirst");function ZL(r){return!kd(r)&&r!==_g}M(ZL,"isPlainSafeLast");function jc(r,e){var i=r.charCodeAt(e),n;return i>=55296&&i<=56319&&e+1<r.length&&(n=r.charCodeAt(e+1),n>=56320&&n<=57343)?(i-55296)*1024+n-56320+65536:i}M(jc,"codePointAt");function Q1(r){var e=/^\n* /;return e.test(r)}M(Q1,"needIndentIndicator");var QL=1,ov=2,JL=3,tO=4,Oc=5;function eO(r,e,i,n,a,o,c,h){var u,d=0,f=null,g=!1,b=!1,m=n!==-1,v=-1,_=XL(jc(r,0))&&ZL(jc(r,r.length-1));if(e||c)for(u=0;u<r.length;d>=65536?u+=2:u++){if(d=jc(r,u),!bh(d))return Oc;_=_&&sv(d,f,h),f=d}else{for(u=0;u<r.length;d>=65536?u+=2:u++){if(d=jc(r,u),d===_d)g=!0,m&&(b=b||u-v-1>n&&r[v+1]!==" ",v=u);else if(!bh(d))return Oc;_=_&&sv(d,f,h),f=d}b=b||m&&u-v-1>n&&r[v+1]!==" "}return!g&&!b?_&&!c&&!a(r)?QL:o===Cd?Oc:ov:i>9&&Q1(r)?Oc:c?o===Cd?Oc:ov:b?tO:JL}M(eO,"chooseScalarStyle");function rO(r,e,i,n,a){r.dump=(function(){if(e.length===0)return r.quotingType===Cd?'""':"''";if(!r.noCompatMode&&(J9.indexOf(e)!==-1||t7.test(e)))return r.quotingType===Cd?'"'+e+'"':"'"+e+"'";var o=r.indent*Math.max(1,i),c=r.lineWidth===-1?-1:Math.max(Math.min(r.lineWidth,40),r.lineWidth-o),h=n||r.flowLevel>-1&&i>=r.flowLevel;function u(d){return KL(r,d)}switch(M(u,"testAmbiguity"),eO(e,h,r.indent,c,u,r.quotingType,r.forceQuotes&&!n,a)){case QL:return e;case ov:return"'"+e.replace(/'/g,"''")+"'";case JL:return"|"+lv(e,r.indent)+cv(nv(e,o));case tO:return">"+lv(e,r.indent)+cv(nv(iO(e,c),o));case Oc:return'"'+nO(e)+'"';default:throw new pn("impossible error: invalid scalar style")}})()}M(rO,"writeScalar");function lv(r,e){var i=Q1(r)?String(e):"",n=r[r.length-1]===`
247
+ `,a=n&&(r[r.length-2]===`
248
+ `||r===`
249
+ `),o=a?"+":n?"":"-";return i+o+`
250
+ `}M(lv,"blockHeader");function cv(r){return r[r.length-1]===`
251
+ `?r.slice(0,-1):r}M(cv,"dropEndingNewline");function iO(r,e){for(var i=/(\n+)([^\n]*)/g,n=(function(){var d=r.indexOf(`
252
+ `);return d=d!==-1?d:r.length,i.lastIndex=d,hv(r.slice(0,d),e)})(),a=r[0]===`
253
+ `||r[0]===" ",o,c;c=i.exec(r);){var h=c[1],u=c[2];o=u[0]===" ",n+=h+(!a&&!o&&u!==""?`
254
+ `:"")+hv(u,e),a=o}return n}M(iO,"foldString");function hv(r,e){if(r===""||r[0]===" ")return r;for(var i=/ [^ ]/g,n,a=0,o,c=0,h=0,u="";n=i.exec(r);)h=n.index,h-a>e&&(o=c>a?c:h,u+=`
255
+ `+r.slice(a,o),a=o+1),c=h;return u+=`
256
+ `,r.length-a>e&&c>a?u+=r.slice(a,c)+`
257
+ `+r.slice(c+1):u+=r.slice(a),u.slice(1)}M(hv,"foldLine");function nO(r){for(var e="",i=0,n,a=0;a<r.length;i>=65536?a+=2:a++)i=jc(r,a),n=Ii[i],!n&&bh(i)?(e+=r[a],i>=65536&&(e+=r[a+1])):e+=n||YL(i);return e}M(nO,"escapeString");function aO(r,e,i){var n="",a=r.tag,o,c,h;for(o=0,c=i.length;o<c;o+=1)h=i[o],r.replacer&&(h=r.replacer.call(i,String(o),h)),(Wa(r,e,h,!1,!1)||typeof h>"u"&&Wa(r,e,null,!1,!1))&&(n!==""&&(n+=","+(r.condenseFlow?"":" ")),n+=r.dump);r.tag=a,r.dump="["+n+"]"}M(aO,"writeFlowSequence");function uv(r,e,i,n){var a="",o=r.tag,c,h,u;for(c=0,h=i.length;c<h;c+=1)u=i[c],r.replacer&&(u=r.replacer.call(i,String(c),u)),(Wa(r,e+1,u,!0,!0,!1,!0)||typeof u>"u"&&Wa(r,e+1,null,!0,!0,!1,!0))&&((!n||a!=="")&&(a+=Cg(r,e)),r.dump&&_d===r.dump.charCodeAt(0)?a+="-":a+="- ",a+=r.dump);r.tag=o,r.dump=a||"[]"}M(uv,"writeBlockSequence");function sO(r,e,i){var n="",a=r.tag,o=Object.keys(i),c,h,u,d,f;for(c=0,h=o.length;c<h;c+=1)f="",n!==""&&(f+=", "),r.condenseFlow&&(f+='"'),u=o[c],d=i[u],r.replacer&&(d=r.replacer.call(i,u,d)),Wa(r,e,u,!1,!1)&&(r.dump.length>1024&&(f+="? "),f+=r.dump+(r.condenseFlow?'"':"")+":"+(r.condenseFlow?"":" "),Wa(r,e,d,!1,!1)&&(f+=r.dump,n+=f));r.tag=a,r.dump="{"+n+"}"}M(sO,"writeFlowMapping");function oO(r,e,i,n){var a="",o=r.tag,c=Object.keys(i),h,u,d,f,g,b;if(r.sortKeys===!0)c.sort();else if(typeof r.sortKeys=="function")c.sort(r.sortKeys);else if(r.sortKeys)throw new pn("sortKeys must be a boolean or a function");for(h=0,u=c.length;h<u;h+=1)b="",(!n||a!=="")&&(b+=Cg(r,e)),d=c[h],f=i[d],r.replacer&&(f=r.replacer.call(i,d,f)),Wa(r,e+1,d,!0,!0,!0)&&(g=r.tag!==null&&r.tag!=="?"||r.dump&&r.dump.length>1024,g&&(r.dump&&_d===r.dump.charCodeAt(0)?b+="?":b+="? "),b+=r.dump,g&&(b+=Cg(r,e)),Wa(r,e+1,f,!0,g)&&(r.dump&&_d===r.dump.charCodeAt(0)?b+=":":b+=": ",b+=r.dump,a+=b));r.tag=o,r.dump=a||"{}"}M(oO,"writeBlockMapping");function dv(r,e,i){var n,a,o,c,h,u;for(a=i?r.explicitTypes:r.implicitTypes,o=0,c=a.length;o<c;o+=1)if(h=a[o],(h.instanceOf||h.predicate)&&(!h.instanceOf||typeof e=="object"&&e instanceof h.instanceOf)&&(!h.predicate||h.predicate(e))){if(i?h.multi&&h.representName?r.tag=h.representName(e):r.tag=h.tag:r.tag="?",h.represent){if(u=r.styleMap[h.tag]||h.defaultStyle,$L.call(h.represent)==="[object Function]")n=h.represent(e,u);else if(zL.call(h.represent,u))n=h.represent[u](e,u);else throw new pn("!<"+h.tag+'> tag resolver accepts not "'+u+'" style');r.dump=n}return!0}return!1}M(dv,"detectType");function Wa(r,e,i,n,a,o,c){r.tag=null,r.dump=i,dv(r,i,!1)||dv(r,i,!0);var h=$L.call(r.dump),u=n,d;n&&(n=r.flowLevel<0||r.flowLevel>e);var f=h==="[object Object]"||h==="[object Array]",g,b;if(f&&(g=r.duplicates.indexOf(i),b=g!==-1),(r.tag!==null&&r.tag!=="?"||b||r.indent!==2&&e>0)&&(a=!1),b&&r.usedDuplicates[g])r.dump="*ref_"+g;else{if(f&&b&&!r.usedDuplicates[g]&&(r.usedDuplicates[g]=!0),h==="[object Object]")n&&Object.keys(r.dump).length!==0?(oO(r,e,r.dump,a),b&&(r.dump="&ref_"+g+r.dump)):(sO(r,e,r.dump),b&&(r.dump="&ref_"+g+" "+r.dump));else if(h==="[object Array]")n&&r.dump.length!==0?(r.noArrayIndent&&!c&&e>0?uv(r,e-1,r.dump,a):uv(r,e,r.dump,a),b&&(r.dump="&ref_"+g+r.dump)):(aO(r,e,r.dump),b&&(r.dump="&ref_"+g+" "+r.dump));else if(h==="[object String]")r.tag!=="?"&&rO(r,r.dump,e,o,u);else{if(h==="[object Undefined]")return!1;if(r.skipInvalid)return!1;throw new pn("unacceptable kind of an object to dump "+h)}r.tag!==null&&r.tag!=="?"&&(d=encodeURI(r.tag[0]==="!"?r.tag.slice(1):r.tag).replace(/!/g,"%21"),r.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",r.dump=d+" "+r.dump)}return!0}M(Wa,"writeNode");function lO(r,e){var i=[],n=[],a,o;for(kg(r,i,n),a=0,o=n.length;a<o;a+=1)e.duplicates.push(i[n[a]]);e.usedDuplicates=new Array(o)}M(lO,"getDuplicateReferences");function kg(r,e,i){var n,a,o;if(r!==null&&typeof r=="object")if(a=e.indexOf(r),a!==-1)i.indexOf(a)===-1&&i.push(a);else if(e.push(r),Array.isArray(r))for(a=0,o=r.length;a<o;a+=1)kg(r[a],e,i);else for(n=Object.keys(r),a=0,o=n.length;a<o;a+=1)kg(r[n[a]],e,i)}M(kg,"inspectNode");function r7(r,e){e=e||{};var i=new VL(e);i.noRefs||lO(r,i);var n=r;return i.replacer&&(n=i.replacer.call({"":n},"",n)),Wa(i,0,n,!0,!0)?i.dump+`
258
+ `:""}M(r7,"dump$1");function i7(r,e){return function(){throw new Error("Function yaml."+r+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}M(i7,"renamed");var n7=JB,a7=F9.load;/*! Bundled license information:
259
+
260
+ js-yaml/dist/js-yaml.mjs:
261
+ (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
262
+ */var wu=M((r,e)=>{if(e)return"translate("+-r.width/2+", "+-r.height/2+")";const i=r.x??0,n=r.y??0;return"translate("+-(i+r.width/2)+", "+-(n+r.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},YS={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Vu(r,e){if(r===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};r=Sr(r),e=Sr(e);const[i,n]=[r.x,r.y],[a,o]=[e.x,e.y],c=a-i,h=o-n;return{angle:Math.atan(h/c),deltaX:c,deltaY:h}}M(Vu,"calculateDeltaAndAngle");var Sr=M(r=>Array.isArray(r)?{x:r[0],y:r[1]}:r,"pointTransformer"),s7=M(r=>({x:M(function(e,i,n){let a=0;const o=Sr(n[0]).x<Sr(n[n.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(Fi,r.arrowTypeStart)){const{angle:m,deltaX:v}=Vu(n[0],n[1]);a=Fi[r.arrowTypeStart]*Math.cos(m)*(v>=0?1:-1)}else if(i===n.length-1&&Object.hasOwn(Fi,r.arrowTypeEnd)){const{angle:m,deltaX:v}=Vu(n[n.length-1],n[n.length-2]);a=Fi[r.arrowTypeEnd]*Math.cos(m)*(v>=0?1:-1)}const c=Math.abs(Sr(e).x-Sr(n[n.length-1]).x),h=Math.abs(Sr(e).y-Sr(n[n.length-1]).y),u=Math.abs(Sr(e).x-Sr(n[0]).x),d=Math.abs(Sr(e).y-Sr(n[0]).y),f=Fi[r.arrowTypeStart],g=Fi[r.arrowTypeEnd],b=1;if(c<g&&c>0&&h<g){let m=g+b-c;m*=o==="right"?-1:1,a-=m}if(u<f&&u>0&&d<f){let m=f+b-u;m*=o==="right"?-1:1,a+=m}return Sr(e).x+a},"x"),y:M(function(e,i,n){let a=0;const o=Sr(n[0]).y<Sr(n[n.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(Fi,r.arrowTypeStart)){const{angle:m,deltaY:v}=Vu(n[0],n[1]);a=Fi[r.arrowTypeStart]*Math.abs(Math.sin(m))*(v>=0?1:-1)}else if(i===n.length-1&&Object.hasOwn(Fi,r.arrowTypeEnd)){const{angle:m,deltaY:v}=Vu(n[n.length-1],n[n.length-2]);a=Fi[r.arrowTypeEnd]*Math.abs(Math.sin(m))*(v>=0?1:-1)}const c=Math.abs(Sr(e).y-Sr(n[n.length-1]).y),h=Math.abs(Sr(e).x-Sr(n[n.length-1]).x),u=Math.abs(Sr(e).y-Sr(n[0]).y),d=Math.abs(Sr(e).x-Sr(n[0]).x),f=Fi[r.arrowTypeStart],g=Fi[r.arrowTypeEnd],b=1;if(c<g&&c>0&&h<g){let m=g+b-c;m*=o==="up"?-1:1,a-=m}if(u<f&&u>0&&d<f){let m=f+b-u;m*=o==="up"?-1:1,a+=m}return Sr(e).y+a},"y")}),"getLineFunctionsWithOffset"),bp={},oi={},VS;function o7(){return VS||(VS=1,Object.defineProperty(oi,"__esModule",{value:!0}),oi.BLANK_URL=oi.relativeFirstCharacters=oi.whitespaceEscapeCharsRegex=oi.urlSchemeRegex=oi.ctrlCharactersRegex=oi.htmlCtrlEntityRegex=oi.htmlEntitiesRegex=oi.invalidProtocolRegex=void 0,oi.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,oi.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,oi.htmlCtrlEntityRegex=/&(newline|tab);/gi,oi.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,oi.urlSchemeRegex=/^.+(:|&colon;)/gim,oi.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,oi.relativeFirstCharacters=[".","/"],oi.BLANK_URL="about:blank"),oi}var KS;function l7(){if(KS)return bp;KS=1,Object.defineProperty(bp,"__esModule",{value:!0}),bp.sanitizeUrl=o;var r=o7();function e(c){return r.relativeFirstCharacters.indexOf(c[0])>-1}function i(c){var h=c.replace(r.ctrlCharactersRegex,"");return h.replace(r.htmlEntitiesRegex,function(u,d){return String.fromCharCode(d)})}function n(c){return URL.canParse(c)}function a(c){try{return decodeURIComponent(c)}catch{return c}}function o(c){if(!c)return r.BLANK_URL;var h,u=a(c.trim());do u=i(u).replace(r.htmlCtrlEntityRegex,"").replace(r.ctrlCharactersRegex,"").replace(r.whitespaceEscapeCharsRegex,"").trim(),u=a(u),h=u.match(r.ctrlCharactersRegex)||u.match(r.htmlEntitiesRegex)||u.match(r.htmlCtrlEntityRegex)||u.match(r.whitespaceEscapeCharsRegex);while(h&&h.length>0);var d=u;if(!d)return r.BLANK_URL;if(e(d))return d;var f=d.trimStart(),g=f.match(r.urlSchemeRegex);if(!g)return d;var b=g[0].toLowerCase().trim();if(r.invalidProtocolRegex.test(b))return r.BLANK_URL;var m=f.replace(/\\/g,"/");if(b==="mailto:"||b.includes("://"))return m;if(b==="http:"||b==="https:"){if(!n(m))return r.BLANK_URL;var v=new URL(m);return v.protocol=v.protocol.toLowerCase(),v.hostname=v.hostname.toLowerCase(),v.toString()}return m}return bp}var c7=l7(),cO=typeof global=="object"&&global&&global.Object===Object&&global,h7=typeof self=="object"&&self&&self.Object===Object&&self,Sa=cO||h7||Function("return this")(),wg=Sa.Symbol,hO=Object.prototype,u7=hO.hasOwnProperty,d7=hO.toString,Su=wg?wg.toStringTag:void 0;function f7(r){var e=u7.call(r,Su),i=r[Su];try{r[Su]=void 0;var n=!0}catch{}var a=d7.call(r);return n&&(e?r[Su]=i:delete r[Su]),a}var p7=Object.prototype,g7=p7.toString;function m7(r){return g7.call(r)}var y7="[object Null]",b7="[object Undefined]",XS=wg?wg.toStringTag:void 0;function Ul(r){return r==null?r===void 0?b7:y7:XS&&XS in Object(r)?f7(r):m7(r)}function Ca(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var x7="[object AsyncFunction]",v7="[object Function]",_7="[object GeneratorFunction]",C7="[object Proxy]";function J1(r){if(!Ca(r))return!1;var e=Ul(r);return e==v7||e==_7||e==x7||e==C7}var G0=Sa["__core-js_shared__"],ZS=(function(){var r=/[^.]+$/.exec(G0&&G0.keys&&G0.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function k7(r){return!!ZS&&ZS in r}var w7=Function.prototype,S7=w7.toString;function Hl(r){if(r!=null){try{return S7.call(r)}catch{}try{return r+""}catch{}}return""}var T7=/[\\^$.*+?()[\]{}|]/g,E7=/^\[object .+?Constructor\]$/,A7=Function.prototype,N7=Object.prototype,M7=A7.toString,B7=N7.hasOwnProperty,L7=RegExp("^"+M7.call(B7).replace(T7,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function O7(r){if(!Ca(r)||k7(r))return!1;var e=J1(r)?L7:E7;return e.test(Hl(r))}function R7(r,e){return r==null?void 0:r[e]}function Gl(r,e){var i=R7(r,e);return O7(i)?i:void 0}var wd=Gl(Object,"create");function D7(){this.__data__=wd?wd(null):{},this.size=0}function F7(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var j7="__lodash_hash_undefined__",I7=Object.prototype,$7=I7.hasOwnProperty;function z7(r){var e=this.__data__;if(wd){var i=e[r];return i===j7?void 0:i}return $7.call(e,r)?e[r]:void 0}var P7=Object.prototype,q7=P7.hasOwnProperty;function U7(r){var e=this.__data__;return wd?e[r]!==void 0:q7.call(e,r)}var H7="__lodash_hash_undefined__";function G7(r,e){var i=this.__data__;return this.size+=this.has(r)?0:1,i[r]=wd&&e===void 0?H7:e,this}function jl(r){var e=-1,i=r==null?0:r.length;for(this.clear();++e<i;){var n=r[e];this.set(n[0],n[1])}}jl.prototype.clear=D7;jl.prototype.delete=F7;jl.prototype.get=z7;jl.prototype.has=U7;jl.prototype.set=G7;function W7(){this.__data__=[],this.size=0}function am(r,e){return r===e||r!==r&&e!==e}function sm(r,e){for(var i=r.length;i--;)if(am(r[i][0],e))return i;return-1}var Y7=Array.prototype,V7=Y7.splice;function K7(r){var e=this.__data__,i=sm(e,r);if(i<0)return!1;var n=e.length-1;return i==n?e.pop():V7.call(e,i,1),--this.size,!0}function X7(r){var e=this.__data__,i=sm(e,r);return i<0?void 0:e[i][1]}function Z7(r){return sm(this.__data__,r)>-1}function Q7(r,e){var i=this.__data__,n=sm(i,r);return n<0?(++this.size,i.push([r,e])):i[n][1]=e,this}function js(r){var e=-1,i=r==null?0:r.length;for(this.clear();++e<i;){var n=r[e];this.set(n[0],n[1])}}js.prototype.clear=W7;js.prototype.delete=K7;js.prototype.get=X7;js.prototype.has=Z7;js.prototype.set=Q7;var Sd=Gl(Sa,"Map");function J7(){this.size=0,this.__data__={hash:new jl,map:new(Sd||js),string:new jl}}function tU(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}function om(r,e){var i=r.__data__;return tU(e)?i[typeof e=="string"?"string":"hash"]:i.map}function eU(r){var e=om(this,r).delete(r);return this.size-=e?1:0,e}function rU(r){return om(this,r).get(r)}function iU(r){return om(this,r).has(r)}function nU(r,e){var i=om(this,r),n=i.size;return i.set(r,e),this.size+=i.size==n?0:1,this}function Io(r){var e=-1,i=r==null?0:r.length;for(this.clear();++e<i;){var n=r[e];this.set(n[0],n[1])}}Io.prototype.clear=J7;Io.prototype.delete=eU;Io.prototype.get=rU;Io.prototype.has=iU;Io.prototype.set=nU;var aU="Expected a function";function Hd(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(aU);var i=function(){var n=arguments,a=e?e.apply(this,n):n[0],o=i.cache;if(o.has(a))return o.get(a);var c=r.apply(this,n);return i.cache=o.set(a,c)||o,c};return i.cache=new(Hd.Cache||Io),i}Hd.Cache=Io;function sU(){this.__data__=new js,this.size=0}function oU(r){var e=this.__data__,i=e.delete(r);return this.size=e.size,i}function lU(r){return this.__data__.get(r)}function cU(r){return this.__data__.has(r)}var hU=200;function uU(r,e){var i=this.__data__;if(i instanceof js){var n=i.__data__;if(!Sd||n.length<hU-1)return n.push([r,e]),this.size=++i.size,this;i=this.__data__=new Io(n)}return i.set(r,e),this.size=i.size,this}function kh(r){var e=this.__data__=new js(r);this.size=e.size}kh.prototype.clear=sU;kh.prototype.delete=oU;kh.prototype.get=lU;kh.prototype.has=cU;kh.prototype.set=uU;var Sg=(function(){try{var r=Gl(Object,"defineProperty");return r({},"",{}),r}catch{}})();function t_(r,e,i){e=="__proto__"&&Sg?Sg(r,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[e]=i}function fv(r,e,i){(i!==void 0&&!am(r[e],i)||i===void 0&&!(e in r))&&t_(r,e,i)}function dU(r){return function(e,i,n){for(var a=-1,o=Object(e),c=n(e),h=c.length;h--;){var u=c[++a];if(i(o[u],u,o)===!1)break}return e}}var fU=dU(),uO=typeof exports=="object"&&exports&&!exports.nodeType&&exports,QS=uO&&typeof module=="object"&&module&&!module.nodeType&&module,pU=QS&&QS.exports===uO,JS=pU?Sa.Buffer:void 0,tT=JS?JS.allocUnsafe:void 0;function gU(r,e){if(e)return r.slice();var i=r.length,n=tT?tT(i):new r.constructor(i);return r.copy(n),n}var eT=Sa.Uint8Array;function mU(r){var e=new r.constructor(r.byteLength);return new eT(e).set(new eT(r)),e}function yU(r,e){var i=e?mU(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}function bU(r,e){var i=-1,n=r.length;for(e||(e=Array(n));++i<n;)e[i]=r[i];return e}var rT=Object.create,xU=(function(){function r(){}return function(e){if(!Ca(e))return{};if(rT)return rT(e);r.prototype=e;var i=new r;return r.prototype=void 0,i}})();function dO(r,e){return function(i){return r(e(i))}}var fO=dO(Object.getPrototypeOf,Object),vU=Object.prototype;function lm(r){var e=r&&r.constructor,i=typeof e=="function"&&e.prototype||vU;return r===i}function _U(r){return typeof r.constructor=="function"&&!lm(r)?xU(fO(r)):{}}function wh(r){return r!=null&&typeof r=="object"}var CU="[object Arguments]";function iT(r){return wh(r)&&Ul(r)==CU}var pO=Object.prototype,kU=pO.hasOwnProperty,wU=pO.propertyIsEnumerable,Tg=iT((function(){return arguments})())?iT:function(r){return wh(r)&&kU.call(r,"callee")&&!wU.call(r,"callee")},Eg=Array.isArray,SU=9007199254740991;function gO(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=SU}function cm(r){return r!=null&&gO(r.length)&&!J1(r)}function TU(r){return wh(r)&&cm(r)}function EU(){return!1}var mO=typeof exports=="object"&&exports&&!exports.nodeType&&exports,nT=mO&&typeof module=="object"&&module&&!module.nodeType&&module,AU=nT&&nT.exports===mO,aT=AU?Sa.Buffer:void 0,NU=aT?aT.isBuffer:void 0,e_=NU||EU,MU="[object Object]",BU=Function.prototype,LU=Object.prototype,yO=BU.toString,OU=LU.hasOwnProperty,RU=yO.call(Object);function DU(r){if(!wh(r)||Ul(r)!=MU)return!1;var e=fO(r);if(e===null)return!0;var i=OU.call(e,"constructor")&&e.constructor;return typeof i=="function"&&i instanceof i&&yO.call(i)==RU}var FU="[object Arguments]",jU="[object Array]",IU="[object Boolean]",$U="[object Date]",zU="[object Error]",PU="[object Function]",qU="[object Map]",UU="[object Number]",HU="[object Object]",GU="[object RegExp]",WU="[object Set]",YU="[object String]",VU="[object WeakMap]",KU="[object ArrayBuffer]",XU="[object DataView]",ZU="[object Float32Array]",QU="[object Float64Array]",JU="[object Int8Array]",tH="[object Int16Array]",eH="[object Int32Array]",rH="[object Uint8Array]",iH="[object Uint8ClampedArray]",nH="[object Uint16Array]",aH="[object Uint32Array]",_r={};_r[ZU]=_r[QU]=_r[JU]=_r[tH]=_r[eH]=_r[rH]=_r[iH]=_r[nH]=_r[aH]=!0;_r[FU]=_r[jU]=_r[KU]=_r[IU]=_r[XU]=_r[$U]=_r[zU]=_r[PU]=_r[qU]=_r[UU]=_r[HU]=_r[GU]=_r[WU]=_r[YU]=_r[VU]=!1;function sH(r){return wh(r)&&gO(r.length)&&!!_r[Ul(r)]}function oH(r){return function(e){return r(e)}}var bO=typeof exports=="object"&&exports&&!exports.nodeType&&exports,sd=bO&&typeof module=="object"&&module&&!module.nodeType&&module,lH=sd&&sd.exports===bO,W0=lH&&cO.process,sT=(function(){try{var r=sd&&sd.require&&sd.require("util").types;return r||W0&&W0.binding&&W0.binding("util")}catch{}})(),oT=sT&&sT.isTypedArray,r_=oT?oH(oT):sH;function pv(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}var cH=Object.prototype,hH=cH.hasOwnProperty;function uH(r,e,i){var n=r[e];(!(hH.call(r,e)&&am(n,i))||i===void 0&&!(e in r))&&t_(r,e,i)}function dH(r,e,i,n){var a=!i;i||(i={});for(var o=-1,c=e.length;++o<c;){var h=e[o],u=void 0;u===void 0&&(u=r[h]),a?t_(i,h,u):uH(i,h,u)}return i}function fH(r,e){for(var i=-1,n=Array(r);++i<r;)n[i]=e(i);return n}var pH=9007199254740991,gH=/^(?:0|[1-9]\d*)$/;function xO(r,e){var i=typeof r;return e=e??pH,!!e&&(i=="number"||i!="symbol"&&gH.test(r))&&r>-1&&r%1==0&&r<e}var mH=Object.prototype,yH=mH.hasOwnProperty;function bH(r,e){var i=Eg(r),n=!i&&Tg(r),a=!i&&!n&&e_(r),o=!i&&!n&&!a&&r_(r),c=i||n||a||o,h=c?fH(r.length,String):[],u=h.length;for(var d in r)(e||yH.call(r,d))&&!(c&&(d=="length"||a&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||xO(d,u)))&&h.push(d);return h}function xH(r){var e=[];if(r!=null)for(var i in Object(r))e.push(i);return e}var vH=Object.prototype,_H=vH.hasOwnProperty;function CH(r){if(!Ca(r))return xH(r);var e=lm(r),i=[];for(var n in r)n=="constructor"&&(e||!_H.call(r,n))||i.push(n);return i}function vO(r){return cm(r)?bH(r,!0):CH(r)}function kH(r){return dH(r,vO(r))}function wH(r,e,i,n,a,o,c){var h=pv(r,i),u=pv(e,i),d=c.get(u);if(d){fv(r,i,d);return}var f=o?o(h,u,i+"",r,e,c):void 0,g=f===void 0;if(g){var b=Eg(u),m=!b&&e_(u),v=!b&&!m&&r_(u);f=u,b||m||v?Eg(h)?f=h:TU(h)?f=bU(h):m?(g=!1,f=gU(u,!0)):v?(g=!1,f=yU(u,!0)):f=[]:DU(u)||Tg(u)?(f=h,Tg(h)?f=kH(h):(!Ca(h)||J1(h))&&(f=_U(u))):g=!1}g&&(c.set(u,f),a(f,u,n,o,c),c.delete(u)),fv(r,i,f)}function _O(r,e,i,n,a){r!==e&&fU(e,function(o,c){if(a||(a=new kh),Ca(o))wH(r,e,c,i,_O,n,a);else{var h=n?n(pv(r,c),o,c+"",r,e,a):void 0;h===void 0&&(h=o),fv(r,c,h)}},vO)}function CO(r){return r}function SH(r,e,i){switch(i.length){case 0:return r.call(e);case 1:return r.call(e,i[0]);case 2:return r.call(e,i[0],i[1]);case 3:return r.call(e,i[0],i[1],i[2])}return r.apply(e,i)}var lT=Math.max;function TH(r,e,i){return e=lT(e===void 0?r.length-1:e,0),function(){for(var n=arguments,a=-1,o=lT(n.length-e,0),c=Array(o);++a<o;)c[a]=n[e+a];a=-1;for(var h=Array(e+1);++a<e;)h[a]=n[a];return h[e]=i(c),SH(r,this,h)}}function EH(r){return function(){return r}}var AH=Sg?function(r,e){return Sg(r,"toString",{configurable:!0,enumerable:!1,value:EH(e),writable:!0})}:CO,NH=800,MH=16,BH=Date.now;function LH(r){var e=0,i=0;return function(){var n=BH(),a=MH-(n-i);if(i=n,a>0){if(++e>=NH)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}var OH=LH(AH);function RH(r,e){return OH(TH(r,e,CO),r+"")}function DH(r,e,i){if(!Ca(i))return!1;var n=typeof e;return(n=="number"?cm(i)&&xO(e,i.length):n=="string"&&e in i)?am(i[e],r):!1}function FH(r){return RH(function(e,i){var n=-1,a=i.length,o=a>1?i[a-1]:void 0,c=a>2?i[2]:void 0;for(o=r.length>3&&typeof o=="function"?(a--,o):void 0,c&&DH(i[0],i[1],c)&&(o=a<3?void 0:o,a=1),e=Object(e);++n<a;){var h=i[n];h&&r(e,h,n,o)}return e})}var jH=FH(function(r,e,i){_O(r,e,i)}),IH="​",$H={curveBasis:Zx,curveBasisClosed:jq,curveBasisOpen:Iq,curveBumpX:lB,curveBumpY:cB,curveBundle:$q,curveCardinalClosed:zq,curveCardinalOpen:Pq,curveCardinal:fB,curveCatmullRomClosed:qq,curveCatmullRomOpen:Uq,curveCatmullRom:gB,curveLinear:ad,curveLinearClosed:Hq,curveMonotoneX:_B,curveMonotoneY:CB,curveNatural:wB,curveStep:SB,curveStepAfter:EB,curveStepBefore:TB},zH=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,PH=M(function(r,e){const i=kO(r,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(i)){const c=i.map(h=>h.args);ng(c),n=ci(n,[...c])}else n=i.args;if(!n)return;let a=k1(r,e);const o="config";return n[o]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),n[a]=n[o],delete n[o]),n},"detectInit"),kO=M(function(r,e=null){var i,n;try{const a=new RegExp(`[%]{2}(?![{]${zH.source})(?=[}][%]{2}).*
263
+ `,"ig");r=r.trim().replace(a,"").replace(/'/gm,'"'),Tt.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${r}`);let o;const c=[];for(;(o=id.exec(r))!==null;)if(o.index===id.lastIndex&&id.lastIndex++,o&&!e||e&&((i=o[1])!=null&&i.match(e))||e&&((n=o[2])!=null&&n.match(e))){const h=o[1]?o[1]:o[2],u=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;c.push({type:h,args:u})}return c.length===0?{type:r,args:null}:c.length===1?c[0]:c}catch(a){return Tt.error(`ERROR: ${a.message} - Unable to parse directive type: '${e}' based on the text: '${r}'`),{type:void 0,args:null}}},"detectDirective"),qH=M(function(r){return r.replace(id,"")},"removeDirectives"),UH=M(function(r,e){for(const[i,n]of e.entries())if(n.match(r))return i;return-1},"isSubstringInArray");function i_(r,e){if(!r)return e;const i=`curve${r.charAt(0).toUpperCase()+r.slice(1)}`;return $H[i]??e}M(i_,"interpolateToCurve");function wO(r,e){const i=r.trim();if(i)return e.securityLevel!=="loose"?c7.sanitizeUrl(i):i}M(wO,"formatUrl");var HH=M((r,...e)=>{const i=r.split("."),n=i.length-1,a=i[n];let o=window;for(let c=0;c<n;c++)if(o=o[i[c]],!o){Tt.error(`Function name: ${r} not found in window`);return}o[a](...e)},"runFunc");function n_(r,e){return!r||!e?0:Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2))}M(n_,"distance");function SO(r){let e,i=0;r.forEach(a=>{i+=n_(a,e),e=a});const n=i/2;return a_(r,n)}M(SO,"traverseEdge");function TO(r){return r.length===1?r[0]:SO(r)}M(TO,"calcLabelPosition");var cT=M((r,e=2)=>{const i=Math.pow(10,e);return Math.round(r*i)/i},"roundNumber"),a_=M((r,e)=>{let i,n=e;for(const a of r){if(i){const o=n_(a,i);if(o===0)return i;if(o<n)n-=o;else{const c=n/o;if(c<=0)return i;if(c>=1)return{x:a.x,y:a.y};if(c>0&&c<1)return{x:cT((1-c)*i.x+c*a.x,5),y:cT((1-c)*i.y+c*a.y,5)}}}i=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),GH=M((r,e,i)=>{Tt.info(`our points ${JSON.stringify(e)}`),e[0]!==i&&(e=e.reverse());const a=a_(e,25),o=r?10:5,c=Math.atan2(e[0].y-a.y,e[0].x-a.x),h={x:0,y:0};return h.x=Math.sin(c)*o+(e[0].x+a.x)/2,h.y=-Math.cos(c)*o+(e[0].y+a.y)/2,h},"calcCardinalityPosition");function EO(r,e,i){const n=structuredClone(i);Tt.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();const a=25+r,o=a_(n,a),c=10+r*.5,h=Math.atan2(n[0].y-o.y,n[0].x-o.x),u={x:0,y:0};return e==="start_left"?(u.x=Math.sin(h+Math.PI)*c+(n[0].x+o.x)/2,u.y=-Math.cos(h+Math.PI)*c+(n[0].y+o.y)/2):e==="end_right"?(u.x=Math.sin(h-Math.PI)*c+(n[0].x+o.x)/2-5,u.y=-Math.cos(h-Math.PI)*c+(n[0].y+o.y)/2-5):e==="end_left"?(u.x=Math.sin(h)*c+(n[0].x+o.x)/2-5,u.y=-Math.cos(h)*c+(n[0].y+o.y)/2-5):(u.x=Math.sin(h)*c+(n[0].x+o.x)/2,u.y=-Math.cos(h)*c+(n[0].y+o.y)/2),u}M(EO,"calcTerminalLabelPosition");function AO(r){let e="",i="";for(const n of r)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?i=i+n+";":e=e+n+";");return{style:e,labelStyle:i}}M(AO,"getStylesFromArray");var hT=0,WH=M(()=>(hT++,"id-"+Math.random().toString(36).substr(2,12)+"-"+hT),"generateId");function NO(r){let e="";const i="0123456789abcdef",n=i.length;for(let a=0;a<r;a++)e+=i.charAt(Math.floor(Math.random()*n));return e}M(NO,"makeRandomHex");var YH=M(r=>NO(r.length),"random"),VH=M(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"),KH=M(function(r,e){const i=e.text.replace($d.lineBreakRegex," "),[,n]=hm(e.fontSize),a=r.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",n),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),e.class!==void 0&&a.attr("class",e.class);const o=a.append("tspan");return o.attr("x",e.x+e.textMargin*2),o.attr("fill",e.fill),o.text(i),a},"drawSimpleText"),XH=Hd((r,e,i)=>{if(!r||(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),$d.lineBreakRegex.test(r)))return r;const n=r.split(" ").filter(Boolean),a=[];let o="";return n.forEach((c,h)=>{const u=Ds(`${c} `,i),d=Ds(o,i);if(u>e){const{hyphenatedStrings:b,remainingWord:m}=ZH(c,e,"-",i);a.push(o,...b),o=m}else d+u>=e?(a.push(o),o=c):o=[o,c].filter(Boolean).join(" ");h+1===n.length&&a.push(o)}),a.filter(c=>c!=="").join(i.joinWith)},(r,e,i)=>`${r}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),ZH=Hd((r,e,i="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const a=[...r],o=[];let c="";return a.forEach((h,u)=>{const d=`${c}${h}`;if(Ds(d,n)>=e){const g=u+1,b=a.length===g,m=`${d}${i}`;o.push(b?d:m),c=""}else c=d}),{hyphenatedStrings:o,remainingWord:c}},(r,e,i="-",n)=>`${r}${e}${i}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function MO(r,e){return s_(r,e).height}M(MO,"calculateTextHeight");function Ds(r,e){return s_(r,e).width}M(Ds,"calculateTextWidth");var s_=Hd((r,e)=>{const{fontSize:i=12,fontFamily:n="Arial",fontWeight:a=400}=e;if(!r)return{width:0,height:0};const[,o]=hm(i),c=["sans-serif",n],h=r.split($d.lineBreakRegex),u=[],d=ce("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const f=d.append("svg");for(const b of c){let m=0;const v={width:0,height:0,lineHeight:0};for(const _ of h){const C=VH();C.text=_||IH;const w=KH(f,C).style("font-size",o).style("font-weight",a).style("font-family",b),T=(w._groups||w)[0][0].getBBox();if(T.width===0&&T.height===0)throw new Error("svg element not in render tree");v.width=Math.round(Math.max(v.width,T.width)),m=Math.round(T.height),v.height+=m,v.lineHeight=Math.round(Math.max(v.lineHeight,m))}u.push(v)}f.remove();const g=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[g]},(r,e)=>`${r}${e.fontSize}${e.fontWeight}${e.fontFamily}`),fh,QH=(fh=class{constructor(e=!1,i){this.count=0,this.count=i?i.length:0,this.next=e?()=>this.count++:()=>Date.now()}},M(fh,"InitIDGenerator"),fh),xp,JH=M(function(r){return xp=xp||document.createElement("div"),r=escape(r).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),xp.innerHTML=r,unescape(xp.textContent)},"entityDecode");function o_(r){return"str"in r}M(o_,"isDetailedError");var tG=M((r,e,i,n)=>{var o;if(!n)return;const a=(o=r.node())==null?void 0:o.getBBox();a&&r.append("text").text(n).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-i).attr("class",e)},"insertTitle"),hm=M(r=>{if(typeof r=="number")return[r,r+"px"];const e=parseInt(r??"",10);return Number.isNaN(e)?[void 0,void 0]:r===String(e)?[e,r+"px"]:[e,r]},"parseFontSize");function l_(r,e){return jH({},r,e)}M(l_,"cleanAndMerge");var ya={assignWithDepth:ci,wrapLabel:XH,calculateTextHeight:MO,calculateTextWidth:Ds,calculateTextDimensions:s_,cleanAndMerge:l_,detectInit:PH,detectDirective:kO,isSubstringInArray:UH,interpolateToCurve:i_,calcLabelPosition:TO,calcCardinalityPosition:GH,calcTerminalLabelPosition:EO,formatUrl:wO,getStylesFromArray:AO,generateId:WH,random:YH,runFunc:HH,entityDecode:JH,insertTitle:tG,isLabelCoordinateInPath:BO,parseFontSize:hm,InitIDGenerator:QH},eG=M(function(r){let e=r;return e=e.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/#\w+;/g,function(i){const n=i.substring(1,i.length-1);return/^\+?\d+$/.test(n)?"fl°°"+n+"¶ß":"fl°"+n+"¶ß"}),e},"encodeEntities"),Il=M(function(r){return r.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Est=M((r,e,{counter:i=0,prefix:n,suffix:a},o)=>o||`${n?`${n}_`:""}${r}_${e}_${i}${a?`_${a}`:""}`,"getEdgeId");function gi(r){return r??null}M(gi,"handleUndefinedAttr");function BO(r,e){const i=Math.round(r.x),n=Math.round(r.y),a=e.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return a.includes(i.toString())||a.includes(n.toString())}M(BO,"isLabelCoordinateInPath");var c_=M(({flowchart:r})=>{var a,o;const e=((a=r==null?void 0:r.subGraphTitleMargin)==null?void 0:a.top)??0,i=((o=r==null?void 0:r.subGraphTitleMargin)==null?void 0:o.bottom)??0,n=e+i;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins");async function LO(r,e){const i=r.getElementsByTagName("img");if(!i||i.length===0)return;const n=e.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...i].map(a=>new Promise(o=>{function c(){if(a.style.display="flex",a.style.flexDirection="column",n){const h=Ke().fontSize?Ke().fontSize:window.getComputedStyle(document.body).fontSize,u=5,[d=xM.fontSize]=hm(h),f=d*u+"px";a.style.minWidth=f,a.style.maxWidth=f}else a.style.width="100%";o(a)}M(c,"setupImage"),setTimeout(()=>{a.complete&&c()}),a.addEventListener("error",c),a.addEventListener("load",c)})))}M(LO,"configureLabelImages");var rG=M(r=>{const{handDrawnSeed:e}=Ke();return{fill:r,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:r,seed:e}},"solidStateFill"),Sh=M(r=>{const e=iG([...r.cssCompiledStyles||[],...r.cssStyles||[],...r.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),iG=M(r=>{const e=new Map;return r.forEach(i=>{const[n,a]=i.split(":");e.set(n.trim(),a==null?void 0:a.trim())}),e},"styles2Map"),OO=M(r=>r==="color"||r==="font-size"||r==="font-family"||r==="font-weight"||r==="font-style"||r==="text-decoration"||r==="text-align"||r==="text-transform"||r==="line-height"||r==="letter-spacing"||r==="word-spacing"||r==="text-shadow"||r==="text-overflow"||r==="white-space"||r==="word-wrap"||r==="word-break"||r==="overflow-wrap"||r==="hyphens","isLabelStyle"),Kt=M(r=>{const{stylesArray:e}=Sh(r),i=[],n=[],a=[],o=[];return e.forEach(c=>{const h=c[0];OO(h)?i.push(c.join(":")+" !important"):(n.push(c.join(":")+" !important"),h.includes("stroke")&&a.push(c.join(":")+" !important"),h==="fill"&&o.push(c.join(":")+" !important"))}),{labelStyles:i.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:a,backgroundStyles:o}},"styles2String"),Vt=M((r,e)=>{var u;const{themeVariables:i,handDrawnSeed:n}=Ke(),{nodeBorder:a,mainBkg:o}=i,{stylesMap:c}=Sh(r);return Object.assign({roughness:.7,fill:c.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:c.get("stroke")||a,seed:n,strokeWidth:((u=c.get("stroke-width"))==null?void 0:u.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:nG(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),nG=M(r=>{if(!r)return[0,0];const e=r.trim().split(/\s+/).map(Number);if(e.length===1){const a=isNaN(e[0])?0:e[0];return[a,a]}const i=isNaN(e[0])?0:e[0],n=isNaN(e[1])?0:e[1];return[i,n]},"getStrokeDashArray");const aG=Object.freeze({left:0,top:0,width:16,height:16}),Ag=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),RO=Object.freeze({...aG,...Ag}),sG=Object.freeze({...RO,body:"",hidden:!1}),oG=Object.freeze({width:null,height:null}),lG=Object.freeze({...oG,...Ag}),cG=(r,e,i,n="")=>{const a=r.split(":");if(r.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;n=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const h=a.pop(),u=a.pop(),d={provider:a.length>0?a[0]:n,prefix:u,name:h};return Y0(d)?d:null}const o=a[0],c=o.split("-");if(c.length>1){const h={provider:n,prefix:c.shift(),name:c.join("-")};return Y0(h)?h:null}if(i&&n===""){const h={provider:n,prefix:"",name:o};return Y0(h,i)?h:null}return null},Y0=(r,e)=>r?!!((e&&r.prefix===""||r.prefix)&&r.name):!1;function hG(r,e){const i={};!r.hFlip!=!e.hFlip&&(i.hFlip=!0),!r.vFlip!=!e.vFlip&&(i.vFlip=!0);const n=((r.rotate||0)+(e.rotate||0))%4;return n&&(i.rotate=n),i}function uT(r,e){const i=hG(r,e);for(const n in sG)n in Ag?n in r&&!(n in i)&&(i[n]=Ag[n]):n in e?i[n]=e[n]:n in r&&(i[n]=r[n]);return i}function uG(r,e){const i=r.icons,n=r.aliases||Object.create(null),a=Object.create(null);function o(c){if(i[c])return a[c]=[];if(!(c in a)){a[c]=null;const h=n[c]&&n[c].parent,u=h&&o(h);u&&(a[c]=[h].concat(u))}return a[c]}return(e||Object.keys(i).concat(Object.keys(n))).forEach(o),a}function dT(r,e,i){const n=r.icons,a=r.aliases||Object.create(null);let o={};function c(h){o=uT(n[h]||a[h],o)}return c(e),i.forEach(c),uT(r,o)}function dG(r,e){if(r.icons[e])return dT(r,e,[]);const i=uG(r,[e])[e];return i?dT(r,e,i):null}const fG=/(-?[0-9.]*[0-9]+[0-9.]*)/g,pG=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function fT(r,e,i){if(e===1)return r;if(i=i||100,typeof r=="number")return Math.ceil(r*e*i)/i;if(typeof r!="string")return r;const n=r.split(fG);if(n===null||!n.length)return r;const a=[];let o=n.shift(),c=pG.test(o);for(;;){if(c){const h=parseFloat(o);isNaN(h)?a.push(o):a.push(Math.ceil(h*e*i)/i)}else a.push(o);if(o=n.shift(),o===void 0)return a.join("");c=!c}}function gG(r,e="defs"){let i="";const n=r.indexOf("<"+e);for(;n>=0;){const a=r.indexOf(">",n),o=r.indexOf("</"+e);if(a===-1||o===-1)break;const c=r.indexOf(">",o);if(c===-1)break;i+=r.slice(a+1,o).trim(),r=r.slice(0,n).trim()+r.slice(c+1)}return{defs:i,content:r}}function mG(r,e){return r?"<defs>"+r+"</defs>"+e:e}function yG(r,e,i){const n=gG(r);return mG(n.defs,e+n.content+i)}const bG=r=>r==="unset"||r==="undefined"||r==="none";function xG(r,e){const i={...RO,...r},n={...lG,...e},a={left:i.left,top:i.top,width:i.width,height:i.height};let o=i.body;[i,n].forEach(_=>{const C=[],w=_.hFlip,T=_.vFlip;let E=_.rotate;w?T?E+=2:(C.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),C.push("scale(-1 1)"),a.top=a.left=0):T&&(C.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),C.push("scale(1 -1)"),a.top=a.left=0);let N;switch(E<0&&(E-=Math.floor(E/4)*4),E=E%4,E){case 1:N=a.height/2+a.top,C.unshift("rotate(90 "+N.toString()+" "+N.toString()+")");break;case 2:C.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:N=a.width/2+a.left,C.unshift("rotate(-90 "+N.toString()+" "+N.toString()+")");break}E%2===1&&(a.left!==a.top&&(N=a.left,a.left=a.top,a.top=N),a.width!==a.height&&(N=a.width,a.width=a.height,a.height=N)),C.length&&(o=yG(o,'<g transform="'+C.join(" ")+'">',"</g>"))});const c=n.width,h=n.height,u=a.width,d=a.height;let f,g;c===null?(g=h===null?"1em":h==="auto"?d:h,f=fT(g,u/d)):(f=c==="auto"?u:c,g=h===null?fT(f,d/u):h==="auto"?d:h);const b={},m=(_,C)=>{bG(C)||(b[_]=C.toString())};m("width",f),m("height",g);const v=[a.left,a.top,u,d];return b.viewBox=v.join(" "),{attributes:b,viewBox:v,body:o}}const vG=/\sid="(\S+)"/g,pT=new Map;function _G(r){r=r.replace(/[0-9]+$/,"")||"a";const e=pT.get(r)||0;return pT.set(r,e+1),e?`${r}${e}`:r}function CG(r){const e=[];let i;for(;i=vG.exec(r);)e.push(i[1]);if(!e.length)return r;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach(a=>{const o=_G(a),c=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),r=r.replace(new RegExp(n,"g"),""),r}function kG(r,e){let i=r.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in e)i+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+r+"</svg>"}function h_(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Wl=h_();function DO(r){Wl=r}var od={exec:()=>null};function Xe(r,e=""){let i=typeof r=="string"?r:r.source,n={replace:(a,o)=>{let c=typeof o=="string"?o:o.source;return c=c.replace(Xi.caret,"$1"),i=i.replace(a,c),n},getRegex:()=>new RegExp(i,e)};return n}var wG=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Xi={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},SG=/^(?:[ \t]*(?:\n|$))+/,TG=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,EG=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Gd=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,AG=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,u_=/(?:[*+-]|\d{1,9}[.)])/,FO=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,jO=Xe(FO).replace(/bull/g,u_).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(),NG=Xe(FO).replace(/bull/g,u_).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(),d_=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,MG=/^[^\n]+/,f_=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,BG=Xe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",f_).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),LG=Xe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,u_).getRegex(),um="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",p_=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,OG=Xe("^ {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",p_).replace("tag",um).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),IO=Xe(d_).replace("hr",Gd).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",um).getRegex(),RG=Xe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",IO).getRegex(),g_={blockquote:RG,code:TG,def:BG,fences:EG,heading:AG,hr:Gd,html:OG,lheading:jO,list:LG,newline:SG,paragraph:IO,table:od,text:MG},gT=Xe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Gd).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",um).getRegex(),DG={...g_,lheading:NG,table:gT,paragraph:Xe(d_).replace("hr",Gd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",gT).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",um).getRegex()},FG={...g_,html:Xe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",p_).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:od,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Xe(d_).replace("hr",Gd).replace("heading",` *#{1,6} *[^
264
+ ]`).replace("lheading",jO).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},jG=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,IG=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,$O=/^( {2,}|\\)\n(?!\s*$)/,$G=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,dm=/[\p{P}\p{S}]/u,m_=/[\s\p{P}\p{S}]/u,zO=/[^\s\p{P}\p{S}]/u,zG=Xe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,m_).getRegex(),PO=/(?!~)[\p{P}\p{S}]/u,PG=/(?!~)[\s\p{P}\p{S}]/u,qG=/(?:[^\s\p{P}\p{S}]|~)/u,UG=Xe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",wG?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),qO=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,HG=Xe(qO,"u").replace(/punct/g,dm).getRegex(),GG=Xe(qO,"u").replace(/punct/g,PO).getRegex(),UO="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",WG=Xe(UO,"gu").replace(/notPunctSpace/g,zO).replace(/punctSpace/g,m_).replace(/punct/g,dm).getRegex(),YG=Xe(UO,"gu").replace(/notPunctSpace/g,qG).replace(/punctSpace/g,PG).replace(/punct/g,PO).getRegex(),VG=Xe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,zO).replace(/punctSpace/g,m_).replace(/punct/g,dm).getRegex(),KG=Xe(/\\(punct)/,"gu").replace(/punct/g,dm).getRegex(),XG=Xe(/^<(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(),ZG=Xe(p_).replace("(?:-->|$)","-->").getRegex(),QG=Xe("^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",ZG).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ng=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,JG=Xe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ng).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),HO=Xe(/^!?\[(label)\]\[(ref)\]/).replace("label",Ng).replace("ref",f_).getRegex(),GO=Xe(/^!?\[(ref)\](?:\[\])?/).replace("ref",f_).getRegex(),tW=Xe("reflink|nolink(?!\\()","g").replace("reflink",HO).replace("nolink",GO).getRegex(),mT=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,y_={_backpedal:od,anyPunctuation:KG,autolink:XG,blockSkip:UG,br:$O,code:IG,del:od,emStrongLDelim:HG,emStrongRDelimAst:WG,emStrongRDelimUnd:VG,escape:jG,link:JG,nolink:GO,punctuation:zG,reflink:HO,reflinkSearch:tW,tag:QG,text:$G,url:od},eW={...y_,link:Xe(/^!?\[(label)\]\((.*?)\)/).replace("label",Ng).getRegex(),reflink:Xe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ng).getRegex()},gv={...y_,emStrongRDelimAst:YG,emStrongLDelim:GG,url:Xe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",mT).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:Xe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",mT).getRegex()},rW={...gv,br:Xe($O).replace("{2,}","*").getRegex(),text:Xe(gv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},vp={normal:g_,gfm:DG,pedantic:FG},Tu={normal:y_,gfm:gv,breaks:rW,pedantic:eW},iW={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},yT=r=>iW[r];function Ra(r,e){if(e){if(Xi.escapeTest.test(r))return r.replace(Xi.escapeReplace,yT)}else if(Xi.escapeTestNoEncode.test(r))return r.replace(Xi.escapeReplaceNoEncode,yT);return r}function bT(r){try{r=encodeURI(r).replace(Xi.percentDecode,"%")}catch{return null}return r}function xT(r,e){var o;let i=r.replace(Xi.findPipe,(c,h,u)=>{let d=!1,f=h;for(;--f>=0&&u[f]==="\\";)d=!d;return d?"|":" |"}),n=i.split(Xi.splitPipe),a=0;if(n[0].trim()||n.shift(),n.length>0&&!((o=n.at(-1))!=null&&o.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(Xi.slashPipe,"|");return n}function Eu(r,e,i){let n=r.length;if(n===0)return"";let a=0;for(;a<n&&r.charAt(n-a-1)===e;)a++;return r.slice(0,n-a)}function nW(r,e){if(r.indexOf(e[1])===-1)return-1;let i=0;for(let n=0;n<r.length;n++)if(r[n]==="\\")n++;else if(r[n]===e[0])i++;else if(r[n]===e[1]&&(i--,i<0))return n;return i>0?-2:-1}function vT(r,e,i,n,a){let o=e.href,c=e.title||null,h=r[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;let u={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:o,title:c,text:h,tokens:n.inlineTokens(h)};return n.state.inLink=!1,u}function aW(r,e,i){let n=r.match(i.other.indentCodeCompensation);if(n===null)return e;let a=n[1];return e.split(`
265
+ `).map(o=>{let c=o.match(i.other.beginningSpace);if(c===null)return o;let[h]=c;return h.length>=a.length?o.slice(a.length):o}).join(`
266
+ `)}var Mg=class{constructor(e){ne(this,"options");ne(this,"rules");ne(this,"lexer");this.options=e||Wl}space(e){let i=this.rules.block.newline.exec(e);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(e){let i=this.rules.block.code.exec(e);if(i){let n=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Eu(n,`
267
+ `)}}}fences(e){let i=this.rules.block.fences.exec(e);if(i){let n=i[0],a=aW(n,i[3]||"",this.rules);return{type:"code",raw:n,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:a}}}heading(e){let i=this.rules.block.heading.exec(e);if(i){let n=i[2].trim();if(this.rules.other.endingHash.test(n)){let a=Eu(n,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(n=a.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let i=this.rules.block.hr.exec(e);if(i)return{type:"hr",raw:Eu(i[0],`
268
+ `)}}blockquote(e){let i=this.rules.block.blockquote.exec(e);if(i){let n=Eu(i[0],`
269
+ `).split(`
270
+ `),a="",o="",c=[];for(;n.length>0;){let h=!1,u=[],d;for(d=0;d<n.length;d++)if(this.rules.other.blockquoteStart.test(n[d]))u.push(n[d]),h=!0;else if(!h)u.push(n[d]);else break;n=n.slice(d);let f=u.join(`
271
+ `),g=f.replace(this.rules.other.blockquoteSetextReplace,`
272
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
273
+ ${f}`:f,o=o?`${o}
274
+ ${g}`:g;let b=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(g,c,!0),this.lexer.state.top=b,n.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 v=m,_=v.raw+`
275
+ `+n.join(`
276
+ `),C=this.blockquote(_);c[c.length-1]=C,a=a.substring(0,a.length-v.raw.length)+C.raw,o=o.substring(0,o.length-v.text.length)+C.text;break}else if((m==null?void 0:m.type)==="list"){let v=m,_=v.raw+`
277
+ `+n.join(`
278
+ `),C=this.list(_);c[c.length-1]=C,a=a.substring(0,a.length-m.raw.length)+C.raw,o=o.substring(0,o.length-v.raw.length)+C.raw,n=_.substring(c.at(-1).raw.length).split(`
279
+ `);continue}}return{type:"blockquote",raw:a,tokens:c,text:o}}}list(e){let i=this.rules.block.list.exec(e);if(i){let n=i[1].trim(),a=n.length>1,o={type:"list",raw:"",ordered:a,start:a?+n.slice(0,-1):"",loose:!1,items:[]};n=a?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=a?n:"[*+-]");let c=this.rules.other.listItemRegex(n),h=!1;for(;e;){let d=!1,f="",g="";if(!(i=c.exec(e))||this.rules.block.hr.test(e))break;f=i[0],e=e.substring(f.length);let b=i[2].split(`
280
+ `,1)[0].replace(this.rules.other.listReplaceTabs,T=>" ".repeat(3*T.length)),m=e.split(`
281
+ `,1)[0],v=!b.trim(),_=0;if(this.options.pedantic?(_=2,g=b.trimStart()):v?_=i[1].length+1:(_=i[2].search(this.rules.other.nonSpaceChar),_=_>4?1:_,g=b.slice(_),_+=i[1].length),v&&this.rules.other.blankLine.test(m)&&(f+=m+`
282
+ `,e=e.substring(m.length+1),d=!0),!d){let T=this.rules.other.nextBulletRegex(_),E=this.rules.other.hrRegex(_),N=this.rules.other.fencesBeginRegex(_),O=this.rules.other.headingBeginRegex(_),B=this.rules.other.htmlBeginRegex(_);for(;e;){let A=e.split(`
283
+ `,1)[0],L;if(m=A,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),L=m):L=m.replace(this.rules.other.tabCharGlobal," "),N.test(m)||O.test(m)||B.test(m)||T.test(m)||E.test(m))break;if(L.search(this.rules.other.nonSpaceChar)>=_||!m.trim())g+=`
284
+ `+L.slice(_);else{if(v||b.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||N.test(b)||O.test(b)||E.test(b))break;g+=`
285
+ `+m}!v&&!m.trim()&&(v=!0),f+=A+`
286
+ `,e=e.substring(A.length+1),b=L.slice(_)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(h=!0));let C=null,w;this.options.gfm&&(C=this.rules.other.listIsTask.exec(g),C&&(w=C[0]!=="[ ] ",g=g.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:f,task:!!C,checked:w,loose:!1,text:g,tokens:[]}),o.raw+=f}let u=o.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let d=0;d<o.items.length;d++)if(this.lexer.state.top=!1,o.items[d].tokens=this.lexer.blockTokens(o.items[d].text,[]),!o.loose){let f=o.items[d].tokens.filter(b=>b.type==="space"),g=f.length>0&&f.some(b=>this.rules.other.anyLine.test(b.raw));o.loose=g}if(o.loose)for(let d=0;d<o.items.length;d++)o.items[d].loose=!0;return o}}html(e){let i=this.rules.block.html.exec(e);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(e){let i=this.rules.block.def.exec(e);if(i){let n=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:n,raw:i[0],href:a,title:o}}}table(e){var h;let i=this.rules.block.table.exec(e);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let n=xT(i[1]),a=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(h=i[3])!=null&&h.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
287
+ `):[],c={type:"table",raw:i[0],header:[],align:[],rows:[]};if(n.length===a.length){for(let u of a)this.rules.other.tableAlignRight.test(u)?c.align.push("right"):this.rules.other.tableAlignCenter.test(u)?c.align.push("center"):this.rules.other.tableAlignLeft.test(u)?c.align.push("left"):c.align.push(null);for(let u=0;u<n.length;u++)c.header.push({text:n[u],tokens:this.lexer.inline(n[u]),header:!0,align:c.align[u]});for(let u of o)c.rows.push(xT(u,c.header.length).map((d,f)=>({text:d,tokens:this.lexer.inline(d),header:!1,align:c.align[f]})));return c}}lheading(e){let i=this.rules.block.lheading.exec(e);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(e){let i=this.rules.block.paragraph.exec(e);if(i){let n=i[1].charAt(i[1].length-1)===`
288
+ `?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let i=this.rules.block.text.exec(e);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(e){let i=this.rules.inline.escape.exec(e);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(e){let i=this.rules.inline.tag.exec(e);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(e){let i=this.rules.inline.link.exec(e);if(i){let n=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let c=Eu(n.slice(0,-1),"\\");if((n.length-c.length)%2===0)return}else{let c=nW(i[2],"()");if(c===-2)return;if(c>-1){let h=(i[0].indexOf("!")===0?5:4)+i[1].length+c;i[2]=i[2].substring(0,c),i[0]=i[0].substring(0,h).trim(),i[3]=""}}let a=i[2],o="";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(a);c&&(a=c[1],o=c[3])}else o=i[3]?i[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?a=a.slice(1):a=a.slice(1,-1)),vT(i,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(e,i){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let a=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=i[a.toLowerCase()];if(!o){let c=n[0].charAt(0);return{type:"text",raw:c,text:c}}return vT(n,o,n[0],this.lexer,this.rules)}}emStrong(e,i,n=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(!(!a||a[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!n||this.rules.inline.punctuation.exec(n))){let o=[...a[0]].length-1,c,h,u=o,d=0,f=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,i=i.slice(-1*e.length+o);(a=f.exec(i))!=null;){if(c=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!c)continue;if(h=[...c].length,a[3]||a[4]){u+=h;continue}else if((a[5]||a[6])&&o%3&&!((o+h)%3)){d+=h;continue}if(u-=h,u>0)continue;h=Math.min(h,h+u+d);let g=[...a[0]][0].length,b=e.slice(0,o+a.index+g+h);if(Math.min(o,h)%2){let v=b.slice(1,-1);return{type:"em",raw:b,text:v,tokens:this.lexer.inlineTokens(v)}}let m=b.slice(2,-2);return{type:"strong",raw:b,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){let i=this.rules.inline.code.exec(e);if(i){let n=i[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return a&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:i[0],text:n}}}br(e){let i=this.rules.inline.br.exec(e);if(i)return{type:"br",raw:i[0]}}del(e){let i=this.rules.inline.del.exec(e);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(e){let i=this.rules.inline.autolink.exec(e);if(i){let n,a;return i[2]==="@"?(n=i[1],a="mailto:"+n):(n=i[1],a=n),{type:"link",raw:i[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let i;if(i=this.rules.inline.url.exec(e)){let a,o;if(i[2]==="@")a=i[0],o="mailto:"+a;else{let c;do c=i[0],i[0]=((n=this.rules.inline._backpedal.exec(i[0]))==null?void 0:n[0])??"";while(c!==i[0]);a=i[0],i[1]==="www."?o="http://"+i[0]:o=i[0]}return{type:"link",raw:i[0],text:a,href:o,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(e){let i=this.rules.inline.text.exec(e);if(i){let n=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:n}}}},pa=class mv{constructor(e){ne(this,"tokens");ne(this,"options");ne(this,"state");ne(this,"tokenizer");ne(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Wl,this.options.tokenizer=this.options.tokenizer||new Mg,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let i={other:Xi,block:vp.normal,inline:Tu.normal};this.options.pedantic?(i.block=vp.pedantic,i.inline=Tu.pedantic):this.options.gfm&&(i.block=vp.gfm,this.options.breaks?i.inline=Tu.breaks:i.inline=Tu.gfm),this.tokenizer.rules=i}static get rules(){return{block:vp,inline:Tu}}static lex(e,i){return new mv(i).lex(e)}static lexInline(e,i){return new mv(i).inlineTokens(e)}lex(e){e=e.replace(Xi.carriageReturn,`
289
+ `),this.blockTokens(e,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let n=this.inlineQueue[i];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,i=[],n=!1){var a,o,c;for(this.options.pedantic&&(e=e.replace(Xi.tabCharGlobal," ").replace(Xi.spaceLine,""));e;){let h;if((o=(a=this.options.extensions)==null?void 0:a.block)!=null&&o.some(d=>(h=d.call({lexer:this},e,i))?(e=e.substring(h.raw.length),i.push(h),!0):!1))continue;if(h=this.tokenizer.space(e)){e=e.substring(h.raw.length);let d=i.at(-1);h.raw.length===1&&d!==void 0?d.raw+=`
290
+ `:i.push(h);continue}if(h=this.tokenizer.code(e)){e=e.substring(h.raw.length);let d=i.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
291
+ `)?"":`
292
+ `)+h.raw,d.text+=`
293
+ `+h.text,this.inlineQueue.at(-1).src=d.text):i.push(h);continue}if(h=this.tokenizer.fences(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.heading(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.hr(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.blockquote(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.list(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.html(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.def(e)){e=e.substring(h.raw.length);let d=i.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
294
+ `)?"":`
295
+ `)+h.raw,d.text+=`
296
+ `+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},i.push(h));continue}if(h=this.tokenizer.table(e)){e=e.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.lheading(e)){e=e.substring(h.raw.length),i.push(h);continue}let u=e;if((c=this.options.extensions)!=null&&c.startBlock){let d=1/0,f=e.slice(1),g;this.options.extensions.startBlock.forEach(b=>{g=b.call({lexer:this},f),typeof g=="number"&&g>=0&&(d=Math.min(d,g))}),d<1/0&&d>=0&&(u=e.substring(0,d+1))}if(this.state.top&&(h=this.tokenizer.paragraph(u))){let d=i.at(-1);n&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=(d.raw.endsWith(`
297
+ `)?"":`
298
+ `)+h.raw,d.text+=`
299
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):i.push(h),n=u.length!==e.length,e=e.substring(h.raw.length);continue}if(h=this.tokenizer.text(e)){e=e.substring(h.raw.length);let d=i.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
300
+ `)?"":`
301
+ `)+h.raw,d.text+=`
302
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):i.push(h);continue}if(e){let d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,i}inline(e,i=[]){return this.inlineQueue.push({src:e,tokens:i}),i}inlineTokens(e,i=[]){var u,d,f,g,b;let n=e,a=null;if(this.tokens.links){let m=Object.keys(this.tokens.links);if(m.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)m.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)o=a[2]?a[2].length:0,n=n.slice(0,a.index+o)+"["+"a".repeat(a[0].length-o-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=((d=(u=this.options.hooks)==null?void 0:u.emStrongMask)==null?void 0:d.call({lexer:this},n))??n;let c=!1,h="";for(;e;){c||(h=""),c=!1;let m;if((g=(f=this.options.extensions)==null?void 0:f.inline)!=null&&g.some(_=>(m=_.call({lexer:this},e,i))?(e=e.substring(m.raw.length),i.push(m),!0):!1))continue;if(m=this.tokenizer.escape(e)){e=e.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.tag(e)){e=e.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.link(e)){e=e.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(m.raw.length);let _=i.at(-1);m.type==="text"&&(_==null?void 0:_.type)==="text"?(_.raw+=m.raw,_.text+=m.text):i.push(m);continue}if(m=this.tokenizer.emStrong(e,n,h)){e=e.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.codespan(e)){e=e.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.br(e)){e=e.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.del(e)){e=e.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.autolink(e)){e=e.substring(m.raw.length),i.push(m);continue}if(!this.state.inLink&&(m=this.tokenizer.url(e))){e=e.substring(m.raw.length),i.push(m);continue}let v=e;if((b=this.options.extensions)!=null&&b.startInline){let _=1/0,C=e.slice(1),w;this.options.extensions.startInline.forEach(T=>{w=T.call({lexer:this},C),typeof w=="number"&&w>=0&&(_=Math.min(_,w))}),_<1/0&&_>=0&&(v=e.substring(0,_+1))}if(m=this.tokenizer.inlineText(v)){e=e.substring(m.raw.length),m.raw.slice(-1)!=="_"&&(h=m.raw.slice(-1)),c=!0;let _=i.at(-1);(_==null?void 0:_.type)==="text"?(_.raw+=m.raw,_.text+=m.text):i.push(m);continue}if(e){let _="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(_);break}else throw new Error(_)}}return i}},Bg=class{constructor(e){ne(this,"options");ne(this,"parser");this.options=e||Wl}space(e){return""}code({text:e,lang:i,escaped:n}){var c;let a=(c=(i||"").match(Xi.notSpaceStart))==null?void 0:c[0],o=e.replace(Xi.endingNewline,"")+`
303
+ `;return a?'<pre><code class="language-'+Ra(a)+'">'+(n?o:Ra(o,!0))+`</code></pre>
304
+ `:"<pre><code>"+(n?o:Ra(o,!0))+`</code></pre>
305
+ `}blockquote({tokens:e}){return`<blockquote>
306
+ ${this.parser.parse(e)}</blockquote>
307
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:i}){return`<h${i}>${this.parser.parseInline(e)}</h${i}>
308
+ `}hr(e){return`<hr>
309
+ `}list(e){let i=e.ordered,n=e.start,a="";for(let h=0;h<e.items.length;h++){let u=e.items[h];a+=this.listitem(u)}let o=i?"ol":"ul",c=i&&n!==1?' start="'+n+'"':"";return"<"+o+c+`>
310
+ `+a+"</"+o+`>
311
+ `}listitem(e){var n;let i="";if(e.task){let a=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=a+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=a+" "+Ra(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):i+=a+" "}return i+=this.parser.parse(e.tokens,!!e.loose),`<li>${i}</li>
312
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
313
+ `}table(e){let i="",n="";for(let o=0;o<e.header.length;o++)n+=this.tablecell(e.header[o]);i+=this.tablerow({text:n});let a="";for(let o=0;o<e.rows.length;o++){let c=e.rows[o];n="";for(let h=0;h<c.length;h++)n+=this.tablecell(c[h]);a+=this.tablerow({text:n})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
314
+ <thead>
315
+ `+i+`</thead>
316
+ `+a+`</table>
317
+ `}tablerow({text:e}){return`<tr>
318
+ ${e}</tr>
319
+ `}tablecell(e){let i=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+i+`</${n}>
320
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ra(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:i,tokens:n}){let a=this.parser.parseInline(n),o=bT(e);if(o===null)return a;e=o;let c='<a href="'+e+'"';return i&&(c+=' title="'+Ra(i)+'"'),c+=">"+a+"</a>",c}image({href:e,title:i,text:n,tokens:a}){a&&(n=this.parser.parseInline(a,this.parser.textRenderer));let o=bT(e);if(o===null)return Ra(n);e=o;let c=`<img src="${e}" alt="${n}"`;return i&&(c+=` title="${Ra(i)}"`),c+=">",c}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ra(e.text)}},b_=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},ga=class yv{constructor(e){ne(this,"options");ne(this,"renderer");ne(this,"textRenderer");this.options=e||Wl,this.options.renderer=this.options.renderer||new Bg,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new b_}static parse(e,i){return new yv(i).parse(e)}static parseInline(e,i){return new yv(i).parseInline(e)}parse(e,i=!0){var a,o;let n="";for(let c=0;c<e.length;c++){let h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){let d=h,f=this.options.extensions.renderers[d.type].call({parser:this},d);if(f!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(d.type)){n+=f||"";continue}}let u=h;switch(u.type){case"space":{n+=this.renderer.space(u);continue}case"hr":{n+=this.renderer.hr(u);continue}case"heading":{n+=this.renderer.heading(u);continue}case"code":{n+=this.renderer.code(u);continue}case"table":{n+=this.renderer.table(u);continue}case"blockquote":{n+=this.renderer.blockquote(u);continue}case"list":{n+=this.renderer.list(u);continue}case"html":{n+=this.renderer.html(u);continue}case"def":{n+=this.renderer.def(u);continue}case"paragraph":{n+=this.renderer.paragraph(u);continue}case"text":{let d=u,f=this.renderer.text(d);for(;c+1<e.length&&e[c+1].type==="text";)d=e[++c],f+=`
321
+ `+this.renderer.text(d);i?n+=this.renderer.paragraph({type:"paragraph",raw:f,text:f,tokens:[{type:"text",raw:f,text:f,escaped:!0}]}):n+=f;continue}default:{let d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}parseInline(e,i=this.renderer){var a,o;let n="";for(let c=0;c<e.length;c++){let h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[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)){n+=d||"";continue}}let u=h;switch(u.type){case"escape":{n+=i.text(u);break}case"html":{n+=i.html(u);break}case"link":{n+=i.link(u);break}case"image":{n+=i.image(u);break}case"strong":{n+=i.strong(u);break}case"em":{n+=i.em(u);break}case"codespan":{n+=i.codespan(u);break}case"br":{n+=i.br(u);break}case"del":{n+=i.del(u);break}case"text":{n+=i.text(u);break}default:{let d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}},Dp,Ku=(Dp=class{constructor(e){ne(this,"options");ne(this,"block");this.options=e||Wl}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?pa.lex:pa.lexInline}provideParser(){return this.block?ga.parse:ga.parseInline}},ne(Dp,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),ne(Dp,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Dp),sW=class{constructor(...e){ne(this,"defaults",h_());ne(this,"options",this.setOptions);ne(this,"parse",this.parseMarkdown(!0));ne(this,"parseInline",this.parseMarkdown(!1));ne(this,"Parser",ga);ne(this,"Renderer",Bg);ne(this,"TextRenderer",b_);ne(this,"Lexer",pa);ne(this,"Tokenizer",Mg);ne(this,"Hooks",Ku);this.use(...e)}walkTokens(e,i){var a,o;let n=[];for(let c of e)switch(n=n.concat(i.call(this,c)),c.type){case"table":{let h=c;for(let u of h.header)n=n.concat(this.walkTokens(u.tokens,i));for(let u of h.rows)for(let d of u)n=n.concat(this.walkTokens(d.tokens,i));break}case"list":{let h=c;n=n.concat(this.walkTokens(h.items,i));break}default:{let h=c;(o=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&o[h.type]?this.defaults.extensions.childTokens[h.type].forEach(u=>{let d=h[u].flat(1/0);n=n.concat(this.walkTokens(d,i))}):h.tokens&&(n=n.concat(this.walkTokens(h.tokens,i)))}}return n}use(...e){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let a={...n};if(a.async=this.defaults.async||a.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let c=i.renderers[o.name];c?i.renderers[o.name]=function(...h){let u=o.renderer.apply(this,h);return u===!1&&(u=c.apply(this,h)),u}:i.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let c=i[o.level];c?c.unshift(o.tokenizer):i[o.level]=[o.tokenizer],o.start&&(o.level==="block"?i.startBlock?i.startBlock.push(o.start):i.startBlock=[o.start]:o.level==="inline"&&(i.startInline?i.startInline.push(o.start):i.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(i.childTokens[o.name]=o.childTokens)}),a.extensions=i),n.renderer){let o=this.defaults.renderer||new Bg(this.defaults);for(let c in n.renderer){if(!(c in o))throw new Error(`renderer '${c}' does not exist`);if(["options","parser"].includes(c))continue;let h=c,u=n.renderer[h],d=o[h];o[h]=(...f)=>{let g=u.apply(o,f);return g===!1&&(g=d.apply(o,f)),g||""}}a.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new Mg(this.defaults);for(let c in n.tokenizer){if(!(c in o))throw new Error(`tokenizer '${c}' does not exist`);if(["options","rules","lexer"].includes(c))continue;let h=c,u=n.tokenizer[h],d=o[h];o[h]=(...f)=>{let g=u.apply(o,f);return g===!1&&(g=d.apply(o,f)),g}}a.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new Ku;for(let c in n.hooks){if(!(c in o))throw new Error(`hook '${c}' does not exist`);if(["options","block"].includes(c))continue;let h=c,u=n.hooks[h],d=o[h];Ku.passThroughHooks.has(c)?o[h]=f=>{if(this.defaults.async&&Ku.passThroughHooksRespectAsync.has(c))return(async()=>{let b=await u.call(o,f);return d.call(o,b)})();let g=u.call(o,f);return d.call(o,g)}:o[h]=(...f)=>{if(this.defaults.async)return(async()=>{let b=await u.apply(o,f);return b===!1&&(b=await d.apply(o,f)),b})();let g=u.apply(o,f);return g===!1&&(g=d.apply(o,f)),g}}a.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,c=n.walkTokens;a.walkTokens=function(h){let u=[];return u.push(c.call(this,h)),o&&(u=u.concat(o.call(this,h))),u}}this.defaults={...this.defaults,...a}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,i){return pa.lex(e,i??this.defaults)}parser(e,i){return ga.parse(e,i??this.defaults)}parseMarkdown(e){return(i,n)=>{let a={...n},o={...this.defaults,...a},c=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&a.async===!1)return c(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return(async()=>{let h=o.hooks?await o.hooks.preprocess(i):i,u=await(o.hooks?await o.hooks.provideLexer():e?pa.lex:pa.lexInline)(h,o),d=o.hooks?await o.hooks.processAllTokens(u):u;o.walkTokens&&await Promise.all(this.walkTokens(d,o.walkTokens));let f=await(o.hooks?await o.hooks.provideParser():e?ga.parse:ga.parseInline)(d,o);return o.hooks?await o.hooks.postprocess(f):f})().catch(c);try{o.hooks&&(i=o.hooks.preprocess(i));let h=(o.hooks?o.hooks.provideLexer():e?pa.lex:pa.lexInline)(i,o);o.hooks&&(h=o.hooks.processAllTokens(h)),o.walkTokens&&this.walkTokens(h,o.walkTokens);let u=(o.hooks?o.hooks.provideParser():e?ga.parse:ga.parseInline)(h,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(h){return c(h)}}}onError(e,i){return n=>{if(n.message+=`
322
+ Please report this to https://github.com/markedjs/marked.`,e){let a="<p>An error occurred:</p><pre>"+Ra(n.message+"",!0)+"</pre>";return i?Promise.resolve(a):a}if(i)return Promise.reject(n);throw n}}},$l=new sW;function ir(r,e){return $l.parse(r,e)}ir.options=ir.setOptions=function(r){return $l.setOptions(r),ir.defaults=$l.defaults,DO(ir.defaults),ir};ir.getDefaults=h_;ir.defaults=Wl;ir.use=function(...r){return $l.use(...r),ir.defaults=$l.defaults,DO(ir.defaults),ir};ir.walkTokens=function(r,e){return $l.walkTokens(r,e)};ir.parseInline=$l.parseInline;ir.Parser=ga;ir.parser=ga.parse;ir.Renderer=Bg;ir.TextRenderer=b_;ir.Lexer=pa;ir.lexer=pa.lex;ir.Tokenizer=Mg;ir.Hooks=Ku;ir.parse=ir;ir.options;ir.setOptions;ir.use;ir.walkTokens;ir.parseInline;ga.parse;pa.lex;function WO(r){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var n=Array.from(typeof r=="string"?[r]:r);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var a=n.reduce(function(h,u){var d=u.match(/\n([\t ]+|(?!\s).)/g);return d?h.concat(d.map(function(f){var g,b;return(b=(g=f.match(/[\t ]/g))===null||g===void 0?void 0:g.length)!==null&&b!==void 0?b:0})):h},[]);if(a.length){var o=new RegExp(`
323
+ [ ]{`+Math.min.apply(Math,a)+"}","g");n=n.map(function(h){return h.replace(o,`
324
+ `)})}n[0]=n[0].replace(/^\r?\n/,"");var c=n[0];return e.forEach(function(h,u){var d=c.match(/(?:^|\n)( *)$/),f=d?d[1]:"",g=h;typeof h=="string"&&h.includes(`
325
+ `)&&(g=String(h).split(`
326
+ `).map(function(b,m){return m===0?b:""+f+b}).join(`
327
+ `)),c+=g+n[u+1]}),c}var oW={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},bv=new Map,YO=new Map,lW=M(r=>{for(const e of r){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(Tt.debug("Registering icon pack:",e.name),"loader"in e)YO.set(e.name,e.loader);else if("icons"in e)bv.set(e.name,e.icons);else throw Tt.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),VO=M(async(r,e)=>{const i=cG(r,!0,e!==void 0);if(!i)throw new Error(`Invalid icon name: ${r}`);const n=i.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${r}`);let a=bv.get(n);if(!a){const c=YO.get(n);if(!c)throw new Error(`Icon set not found: ${i.prefix}`);try{a={...await c(),prefix:n},bv.set(n,a)}catch(h){throw Tt.error(h),new Error(`Failed to load icon set: ${i.prefix}`)}}const o=dG(a,i.name);if(!o)throw new Error(`Icon not found: ${r}`);return o},"getRegisteredIconData"),cW=M(async r=>{try{return await VO(r),!0}catch{return!1}},"isIconAvailable"),Wd=M(async(r,e,i)=>{let n;try{n=await VO(r,e==null?void 0:e.fallbackPrefix)}catch(c){Tt.error(c),n=oW}const a=xG(n,e),o=kG(CG(a.body),{...a.attributes,...i});return _a(o,Lr())},"getIconSVG");function KO(r,{markdownAutoWrap:e}){const n=r.replace(/<br\/>/g,`
328
+ `).replace(/\n{2,}/g,`
329
+ `);return WO(n)}M(KO,"preprocessMarkdown");function XO(r){return r.split(/\\n|\n|<br\s*\/?>/gi).map(e=>{var i;return((i=e.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:i.map(n=>({content:n,type:"normal"})))??[]})}M(XO,"nonMarkdownToLines");function ZO(r,e={}){const i=KO(r,e),n=ir.lexer(i),a=[[]];let o=0;function c(h,u="normal"){h.type==="text"?h.text.split(`
330
+ `).forEach((f,g)=>{g!==0&&(o++,a.push([])),f.split(" ").forEach(b=>{b=b.replace(/&#39;/g,"'"),b&&a[o].push({content:b,type:u})})}):h.type==="strong"||h.type==="em"?h.tokens.forEach(d=>{c(d,h.type)}):h.type==="html"&&a[o].push({content:h.text,type:"normal"})}return M(c,"processNode"),n.forEach(h=>{var u;h.type==="paragraph"?(u=h.tokens)==null||u.forEach(d=>{c(d)}):h.type==="html"?a[o].push({content:h.text,type:"normal"}):a[o].push({content:h.raw,type:"normal"})}),a}M(ZO,"markdownToLines");function QO(r){return r?`<p>${r.replace(/\\n|\n/g,"<br />")}</p>`:""}M(QO,"nonMarkdownToHTML");function JO(r,{markdownAutoWrap:e}={}){const i=ir.lexer(r);function n(a){var o,c,h;return a.type==="text"?e===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(o=a.tokens)==null?void 0:o.map(n).join("")}</strong>`:a.type==="em"?`<em>${(c=a.tokens)==null?void 0:c.map(n).join("")}</em>`:a.type==="paragraph"?`<p>${(h=a.tokens)==null?void 0:h.map(n).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(Tt.warn(`Unsupported markdown: ${a.type}`),a.raw)}return M(n,"output"),i.map(n).join("")}M(JO,"markdownToHTML");function tR(r){return Intl.Segmenter?[...new Intl.Segmenter().segment(r)].map(e=>e.segment):[...r]}M(tR,"splitTextToChars");function eR(r,e){const i=tR(e.content);return x_(r,[],i,e.type)}M(eR,"splitWordToFitWidth");function x_(r,e,i,n){if(i.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];const[a,...o]=i,c=[...e,a];return r([{content:c.join(""),type:n}])?x_(r,c,o,n):(e.length===0&&a&&(e.push(a),i.shift()),[{content:e.join(""),type:n},{content:i.join(""),type:n}])}M(x_,"splitWordToFitWidthRecursion");function rR(r,e){if(r.some(({content:i})=>i.includes(`
331
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Lg(r,e)}M(rR,"splitLineToFitWidth");function Lg(r,e,i=[],n=[]){if(r.length===0)return n.length>0&&i.push(n),i.length>0?i:[];let a="";r[0].content===" "&&(a=" ",r.shift());const o=r.shift()??{content:" ",type:"normal"},c=[...n];if(a!==""&&c.push({content:a,type:"normal"}),c.push(o),e(c))return Lg(r,e,i,c);if(n.length>0)i.push(n),r.unshift(o);else if(o.content){const[h,u]=eR(e,o);i.push([h]),u.content&&r.unshift(u)}return Lg(r,e,i)}M(Lg,"splitLineToFitWidthRecursion");function xv(r,e){e&&r.attr("style",e)}M(xv,"applyStyle");var _T=16384;async function iR(r,e,i,n,a=!1,o=Lr()){const c=r.append("foreignObject");c.attr("width",`${Math.min(10*i,_T)}px`),c.attr("height",`${Math.min(10*i,_T)}px`);const h=c.append("xhtml:div"),u=pd(e.label)?await AM(e.label.replace($d.lineBreakRegex,`
332
+ `),o):_a(e.label,o),d=e.isNode?"nodeLabel":"edgeLabel",f=h.append("span");f.html(u),xv(f,e.labelStyle),f.attr("class",`${d} ${n}`),xv(h,e.labelStyle),h.style("display","table-cell"),h.style("white-space","nowrap"),h.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY&&(h.style("max-width",i+"px"),h.style("text-align","center")),h.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&h.attr("class","labelBkg");let g=h.node().getBoundingClientRect();return g.width===i&&(h.style("display","table"),h.style("white-space","break-spaces"),h.style("width",i+"px"),g=h.node().getBoundingClientRect()),c.node()}M(iR,"addHtmlSpan");function fm(r,e,i,n=!1){const a=r.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*i-.1+"em").attr("dy",i+"em");return n&&a.attr("text-anchor","middle"),a}M(fm,"createTspan");function nR(r,e,i){const n=r.append("text"),a=fm(n,1,e);pm(a,i);const o=a.node().getComputedTextLength();return n.remove(),o}M(nR,"computeWidthOfText");function hW(r,e,i){var c;const n=r.append("text"),a=fm(n,1,e);pm(a,[{content:i,type:"normal"}]);const o=(c=a.node())==null?void 0:c.getBoundingClientRect();return o&&n.remove(),o}M(hW,"computeDimensionOfText");function aR(r,e,i,n=!1,a=!1){const c=e.append("g"),h=c.insert("rect").attr("class","background").attr("style","stroke: none"),u=c.append("text").attr("y","-10.1");a&&u.attr("text-anchor","middle");let d=0;for(const f of i){const g=M(m=>nR(c,1.1,m)<=r,"checkWidth"),b=g(f)?[f]:rR(f,g);for(const m of b){const v=fm(u,d,1.1,a);pm(v,m),d++}}if(n){const f=u.node().getBBox(),g=2;return h.attr("x",f.x-g).attr("y",f.y-g).attr("width",f.width+2*g).attr("height",f.height+2*g),c.node()}else return u.node()}M(aR,"createFormattedText");function vv(r){const e=/&(amp|lt|gt);/g;return r.replace(e,(i,n)=>{switch(n){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return i}})}M(vv,"decodeHTMLEntities");function pm(r,e){r.text(""),e.forEach((i,n)=>{const a=r.append("tspan").attr("font-style",i.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",i.type==="strong"?"bold":"normal");n===0?a.text(vv(i.content)):a.text(" "+vv(i.content))})}M(pm,"updateTextContentAndStyles");async function sR(r,e={}){const i=[];r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,o,c)=>(i.push((async()=>{const h=`${o}:${c}`;return await cW(h)?await Wd(h,void 0,{class:"label-icon"}):`<i class='${_a(a,e).replace(":"," ")}'></i>`})()),a));const n=await Promise.all(i);return r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}M(sR,"replaceIconSubstring");var Is=M(async(r,e="",{style:i="",isTitle:n=!1,classes:a="",useHtmlLabels:o=!0,markdown:c=!0,isNode:h=!0,width:u=200,addSvgBackground:d=!1}={},f)=>{if(Tt.debug("XYZ createText",e,i,n,a,o,h,"addSvgBackground: ",d),o){const g=c?JO(e,f):QO(e),b=await sR(Il(g),f),m=e.replace(/\\\\/g,"\\"),v={isNode:h,label:pd(e)?m:b,labelStyle:i.replace("fill:","color:")};return await iR(r,v,u,a,d,f)}else{const g=Il(e.replace(/<br\s*\/?>/g,"<br/>")),b=c?ZO(g.replace("<br>","<br/>"),f):XO(g),m=aR(u,r,b,e?d:!1,!h);if(h){/stroke:/.exec(i)&&(i=i.replace("stroke:","lineColor:"));const v=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ce(m).attr("style",v)}else{const v=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ce(m).select("rect").attr("style",v.replace(/background:/g,"fill:"));const _=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ce(m).select("text").attr("style",_)}return n?ce(m).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ce(m).selectAll("tspan.text-outer-tspan").classed("row",!0),m}},"createText");function V0(r,e,i){if(r&&r.length){const[n,a]=e,o=Math.PI/180*i,c=Math.cos(o),h=Math.sin(o);for(const u of r){const[d,f]=u;u[0]=(d-n)*c-(f-a)*h+n,u[1]=(d-n)*h+(f-a)*c+a}}}function uW(r,e){return r[0]===e[0]&&r[1]===e[1]}function dW(r,e,i,n=1){const a=i,o=Math.max(e,.1),c=r[0]&&r[0][0]&&typeof r[0][0]=="number"?[r]:r,h=[0,0];if(a)for(const d of c)V0(d,h,a);const u=(function(d,f,g){const b=[];for(const T of d){const E=[...T];uW(E[0],E[E.length-1])||E.push([E[0][0],E[0][1]]),E.length>2&&b.push(E)}const m=[];f=Math.max(f,.1);const v=[];for(const T of b)for(let E=0;E<T.length-1;E++){const N=T[E],O=T[E+1];if(N[1]!==O[1]){const B=Math.min(N[1],O[1]);v.push({ymin:B,ymax:Math.max(N[1],O[1]),x:B===N[1]?N[0]:O[0],islope:(O[0]-N[0])/(O[1]-N[1])})}}if(v.sort(((T,E)=>T.ymin<E.ymin?-1:T.ymin>E.ymin?1:T.x<E.x?-1:T.x>E.x?1:T.ymax===E.ymax?0:(T.ymax-E.ymax)/Math.abs(T.ymax-E.ymax))),!v.length)return m;let _=[],C=v[0].ymin,w=0;for(;_.length||v.length;){if(v.length){let T=-1;for(let E=0;E<v.length&&!(v[E].ymin>C);E++)T=E;v.splice(0,T+1).forEach((E=>{_.push({s:C,edge:E})}))}if(_=_.filter((T=>!(T.edge.ymax<=C))),_.sort(((T,E)=>T.edge.x===E.edge.x?0:(T.edge.x-E.edge.x)/Math.abs(T.edge.x-E.edge.x))),(g!==1||w%f==0)&&_.length>1)for(let T=0;T<_.length;T+=2){const E=T+1;if(E>=_.length)break;const N=_[T].edge,O=_[E].edge;m.push([[Math.round(N.x),C],[Math.round(O.x),C]])}C+=g,_.forEach((T=>{T.edge.x=T.edge.x+g*T.edge.islope})),w++}return m})(c,o,n);if(a){for(const d of c)V0(d,h,-a);(function(d,f,g){const b=[];d.forEach((m=>b.push(...m))),V0(b,f,g)})(u,h,-a)}return u}function Yd(r,e){var i;const n=e.hachureAngle+90;let a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let o=1;return e.roughness>=1&&(((i=e.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>.7&&(o=a),dW(r,a,n,o||1)}let v_=class{constructor(e){this.helper=e}fillPolygons(e,i){return this._fillPolygons(e,i)}_fillPolygons(e,i){const n=Yd(e,i);return{type:"fillSketch",ops:this.renderLines(n,i)}}renderLines(e,i){const n=[];for(const a of e)n.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],i));return n}};function gm(r){const e=r[0],i=r[1];return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}let fW=class extends v_{fillPolygons(e,i){let n=i.hachureGap;n<0&&(n=4*i.strokeWidth),n=Math.max(n,.1);const a=Yd(e,Object.assign({},i,{hachureGap:n})),o=Math.PI/180*i.hachureAngle,c=[],h=.5*n*Math.cos(o),u=.5*n*Math.sin(o);for(const[d,f]of a)gm([d,f])&&c.push([[d[0]-h,d[1]+u],[...f]],[[d[0]+h,d[1]-u],[...f]]);return{type:"fillSketch",ops:this.renderLines(c,i)}}},pW=class extends v_{fillPolygons(e,i){const n=this._fillPolygons(e,i),a=Object.assign({},i,{hachureAngle:i.hachureAngle+90}),o=this._fillPolygons(e,a);return n.ops=n.ops.concat(o.ops),n}},gW=class{constructor(e){this.helper=e}fillPolygons(e,i){const n=Yd(e,i=Object.assign({},i,{hachureAngle:0}));return this.dotsOnLines(n,i)}dotsOnLines(e,i){const n=[];let a=i.hachureGap;a<0&&(a=4*i.strokeWidth),a=Math.max(a,.1);let o=i.fillWeight;o<0&&(o=i.strokeWidth/2);const c=a/4;for(const h of e){const u=gm(h),d=u/a,f=Math.ceil(d)-1,g=u-f*a,b=(h[0][0]+h[1][0])/2-a/4,m=Math.min(h[0][1],h[1][1]);for(let v=0;v<f;v++){const _=m+g+v*a,C=b-c+2*Math.random()*c,w=_-c+2*Math.random()*c,T=this.helper.ellipse(C,w,o,o,i);n.push(...T.ops)}}return{type:"fillSketch",ops:n}}},mW=class{constructor(e){this.helper=e}fillPolygons(e,i){const n=Yd(e,i);return{type:"fillSketch",ops:this.dashedLine(n,i)}}dashedLine(e,i){const n=i.dashOffset<0?i.hachureGap<0?4*i.strokeWidth:i.hachureGap:i.dashOffset,a=i.dashGap<0?i.hachureGap<0?4*i.strokeWidth:i.hachureGap:i.dashGap,o=[];return e.forEach((c=>{const h=gm(c),u=Math.floor(h/(n+a)),d=(h+a-u*(n+a))/2;let f=c[0],g=c[1];f[0]>g[0]&&(f=c[1],g=c[0]);const b=Math.atan((g[1]-f[1])/(g[0]-f[0]));for(let m=0;m<u;m++){const v=m*(n+a),_=v+n,C=[f[0]+v*Math.cos(b)+d*Math.cos(b),f[1]+v*Math.sin(b)+d*Math.sin(b)],w=[f[0]+_*Math.cos(b)+d*Math.cos(b),f[1]+_*Math.sin(b)+d*Math.sin(b)];o.push(...this.helper.doubleLineOps(C[0],C[1],w[0],w[1],i))}})),o}},yW=class{constructor(e){this.helper=e}fillPolygons(e,i){const n=i.hachureGap<0?4*i.strokeWidth:i.hachureGap,a=i.zigzagOffset<0?n:i.zigzagOffset,o=Yd(e,i=Object.assign({},i,{hachureGap:n+a}));return{type:"fillSketch",ops:this.zigzagLines(o,a,i)}}zigzagLines(e,i,n){const a=[];return e.forEach((o=>{const c=gm(o),h=Math.round(c/(2*i));let u=o[0],d=o[1];u[0]>d[0]&&(u=o[1],d=o[0]);const f=Math.atan((d[1]-u[1])/(d[0]-u[0]));for(let g=0;g<h;g++){const b=2*g*i,m=2*(g+1)*i,v=Math.sqrt(2*Math.pow(i,2)),_=[u[0]+b*Math.cos(f),u[1]+b*Math.sin(f)],C=[u[0]+m*Math.cos(f),u[1]+m*Math.sin(f)],w=[_[0]+v*Math.cos(f+Math.PI/4),_[1]+v*Math.sin(f+Math.PI/4)];a.push(...this.helper.doubleLineOps(_[0],_[1],w[0],w[1],n),...this.helper.doubleLineOps(w[0],w[1],C[0],C[1],n))}})),a}};const hn={};let bW=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};const xW=0,K0=1,CT=2,_p={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 X0(r,e){return r.type===e}function __(r){const e=[],i=(function(c){const h=new Array;for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))h[h.length]={type:xW,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:K0,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return h[h.length]={type:CT,text:""},h})(r);let n="BOD",a=0,o=i[a];for(;!X0(o,CT);){let c=0;const h=[];if(n==="BOD"){if(o.text!=="M"&&o.text!=="m")return __("M0,0"+r);a++,c=_p[o.text],n=o.text}else X0(o,K0)?c=_p[n]:(a++,c=_p[o.text],n=o.text);if(!(a+c<i.length))throw new Error("Path data ended short");for(let u=a;u<a+c;u++){const d=i[u];if(!X0(d,K0))throw new Error("Param not a number: "+n+","+d.text);h[h.length]=+d.text}if(typeof _p[n]!="number")throw new Error("Bad segment: "+n);{const u={key:n,data:h};e.push(u),a+=c,o=i[a],n==="M"&&(n="L"),n==="m"&&(n="l")}}return e}function oR(r){let e=0,i=0,n=0,a=0;const o=[];for(const{key:c,data:h}of r)switch(c){case"M":o.push({key:"M",data:[...h]}),[e,i]=h,[n,a]=h;break;case"m":e+=h[0],i+=h[1],o.push({key:"M",data:[e,i]}),n=e,a=i;break;case"L":o.push({key:"L",data:[...h]}),[e,i]=h;break;case"l":e+=h[0],i+=h[1],o.push({key:"L",data:[e,i]});break;case"C":o.push({key:"C",data:[...h]}),e=h[4],i=h[5];break;case"c":{const u=h.map(((d,f)=>f%2?d+i:d+e));o.push({key:"C",data:u}),e=u[4],i=u[5];break}case"Q":o.push({key:"Q",data:[...h]}),e=h[2],i=h[3];break;case"q":{const u=h.map(((d,f)=>f%2?d+i:d+e));o.push({key:"Q",data:u}),e=u[2],i=u[3];break}case"A":o.push({key:"A",data:[...h]}),e=h[5],i=h[6];break;case"a":e+=h[5],i+=h[6],o.push({key:"A",data:[h[0],h[1],h[2],h[3],h[4],e,i]});break;case"H":o.push({key:"H",data:[...h]}),e=h[0];break;case"h":e+=h[0],o.push({key:"H",data:[e]});break;case"V":o.push({key:"V",data:[...h]}),i=h[0];break;case"v":i+=h[0],o.push({key:"V",data:[i]});break;case"S":o.push({key:"S",data:[...h]}),e=h[2],i=h[3];break;case"s":{const u=h.map(((d,f)=>f%2?d+i:d+e));o.push({key:"S",data:u}),e=u[2],i=u[3];break}case"T":o.push({key:"T",data:[...h]}),e=h[0],i=h[1];break;case"t":e+=h[0],i+=h[1],o.push({key:"T",data:[e,i]});break;case"Z":case"z":o.push({key:"Z",data:[]}),e=n,i=a}return o}function lR(r){const e=[];let i="",n=0,a=0,o=0,c=0,h=0,u=0;for(const{key:d,data:f}of r){switch(d){case"M":e.push({key:"M",data:[...f]}),[n,a]=f,[o,c]=f;break;case"C":e.push({key:"C",data:[...f]}),n=f[4],a=f[5],h=f[2],u=f[3];break;case"L":e.push({key:"L",data:[...f]}),[n,a]=f;break;case"H":n=f[0],e.push({key:"L",data:[n,a]});break;case"V":a=f[0],e.push({key:"L",data:[n,a]});break;case"S":{let g=0,b=0;i==="C"||i==="S"?(g=n+(n-h),b=a+(a-u)):(g=n,b=a),e.push({key:"C",data:[g,b,...f]}),h=f[0],u=f[1],n=f[2],a=f[3];break}case"T":{const[g,b]=f;let m=0,v=0;i==="Q"||i==="T"?(m=n+(n-h),v=a+(a-u)):(m=n,v=a);const _=n+2*(m-n)/3,C=a+2*(v-a)/3,w=g+2*(m-g)/3,T=b+2*(v-b)/3;e.push({key:"C",data:[_,C,w,T,g,b]}),h=m,u=v,n=g,a=b;break}case"Q":{const[g,b,m,v]=f,_=n+2*(g-n)/3,C=a+2*(b-a)/3,w=m+2*(g-m)/3,T=v+2*(b-v)/3;e.push({key:"C",data:[_,C,w,T,m,v]}),h=g,u=b,n=m,a=v;break}case"A":{const g=Math.abs(f[0]),b=Math.abs(f[1]),m=f[2],v=f[3],_=f[4],C=f[5],w=f[6];g===0||b===0?(e.push({key:"C",data:[n,a,C,w,C,w]}),n=C,a=w):(n!==C||a!==w)&&(cR(n,a,C,w,g,b,m,v,_).forEach((function(T){e.push({key:"C",data:T})})),n=C,a=w);break}case"Z":e.push({key:"Z",data:[]}),n=o,a=c}i=d}return e}function Au(r,e,i){return[r*Math.cos(i)-e*Math.sin(i),r*Math.sin(i)+e*Math.cos(i)]}function cR(r,e,i,n,a,o,c,h,u,d){const f=(g=c,Math.PI*g/180);var g;let b=[],m=0,v=0,_=0,C=0;if(d)[m,v,_,C]=d;else{[r,e]=Au(r,e,-f),[i,n]=Au(i,n,-f);const W=(r-i)/2,F=(e-n)/2;let U=W*W/(a*a)+F*F/(o*o);U>1&&(U=Math.sqrt(U),a*=U,o*=U);const D=a*a,z=o*o,H=D*z-D*F*F-z*W*W,V=D*F*F+z*W*W,Q=(h===u?-1:1)*Math.sqrt(Math.abs(H/V));_=Q*a*F/o+(r+i)/2,C=Q*-o*W/a+(e+n)/2,m=Math.asin(parseFloat(((e-C)/o).toFixed(9))),v=Math.asin(parseFloat(((n-C)/o).toFixed(9))),r<_&&(m=Math.PI-m),i<_&&(v=Math.PI-v),m<0&&(m=2*Math.PI+m),v<0&&(v=2*Math.PI+v),u&&m>v&&(m-=2*Math.PI),!u&&v>m&&(v-=2*Math.PI)}let w=v-m;if(Math.abs(w)>120*Math.PI/180){const W=v,F=i,U=n;v=u&&v>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,b=cR(i=_+a*Math.cos(v),n=C+o*Math.sin(v),F,U,a,o,c,0,u,[v,W,_,C])}w=v-m;const T=Math.cos(m),E=Math.sin(m),N=Math.cos(v),O=Math.sin(v),B=Math.tan(w/4),A=4/3*a*B,L=4/3*o*B,P=[r,e],j=[r+A*E,e-L*T],$=[i+A*O,n-L*N],X=[i,n];if(j[0]=2*P[0]-j[0],j[1]=2*P[1]-j[1],d)return[j,$,X].concat(b);{b=[j,$,X].concat(b);const W=[];for(let F=0;F<b.length;F+=3){const U=Au(b[F][0],b[F][1],f),D=Au(b[F+1][0],b[F+1][1],f),z=Au(b[F+2][0],b[F+2][1],f);W.push([U[0],U[1],D[0],D[1],z[0],z[1]])}return W}}const vW={randOffset:function(r,e){return pe(r,e)},randOffsetWithRange:function(r,e,i){return Og(r,e,i)},ellipse:function(r,e,i,n,a){const o=uR(i,n,a);return _v(r,e,a,o).opset},doubleLineOps:function(r,e,i,n,a){return Fo(r,e,i,n,a,!0)}};function hR(r,e,i,n,a){return{type:"path",ops:Fo(r,e,i,n,a)}}function Yp(r,e,i){const n=(r||[]).length;if(n>2){const a=[];for(let o=0;o<n-1;o++)a.push(...Fo(r[o][0],r[o][1],r[o+1][0],r[o+1][1],i));return e&&a.push(...Fo(r[n-1][0],r[n-1][1],r[0][0],r[0][1],i)),{type:"path",ops:a}}return n===2?hR(r[0][0],r[0][1],r[1][0],r[1][1],i):{type:"path",ops:[]}}function _W(r,e,i,n,a){return(function(o,c){return Yp(o,!0,c)})([[r,e],[r+i,e],[r+i,e+n],[r,e+n]],a)}function kT(r,e){if(r.length){const i=typeof r[0][0]=="number"?[r]:r,n=Cp(i[0],1*(1+.2*e.roughness),e),a=e.disableMultiStroke?[]:Cp(i[0],1.5*(1+.22*e.roughness),TT(e));for(let o=1;o<i.length;o++){const c=i[o];if(c.length){const h=Cp(c,1*(1+.2*e.roughness),e),u=e.disableMultiStroke?[]:Cp(c,1.5*(1+.22*e.roughness),TT(e));for(const d of h)d.op!=="move"&&n.push(d);for(const d of u)d.op!=="move"&&a.push(d)}}return{type:"path",ops:n.concat(a)}}return{type:"path",ops:[]}}function uR(r,e,i){const n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(r/2,2)+Math.pow(e/2,2))/2)),a=Math.ceil(Math.max(i.curveStepCount,i.curveStepCount/Math.sqrt(200)*n)),o=2*Math.PI/a;let c=Math.abs(r/2),h=Math.abs(e/2);const u=1-i.curveFitting;return c+=pe(c*u,i),h+=pe(h*u,i),{increment:o,rx:c,ry:h}}function _v(r,e,i,n){const[a,o]=ET(n.increment,r,e,n.rx,n.ry,1,n.increment*Og(.1,Og(.4,1,i),i),i);let c=Rg(a,null,i);if(!i.disableMultiStroke&&i.roughness!==0){const[h]=ET(n.increment,r,e,n.rx,n.ry,1.5,0,i),u=Rg(h,null,i);c=c.concat(u)}return{estimatedPoints:o,opset:{type:"path",ops:c}}}function wT(r,e,i,n,a,o,c,h,u){const d=r,f=e;let g=Math.abs(i/2),b=Math.abs(n/2);g+=pe(.01*g,u),b+=pe(.01*b,u);let m=a,v=o;for(;m<0;)m+=2*Math.PI,v+=2*Math.PI;v-m>2*Math.PI&&(m=0,v=2*Math.PI);const _=2*Math.PI/u.curveStepCount,C=Math.min(_/2,(v-m)/2),w=AT(C,d,f,g,b,m,v,1,u);if(!u.disableMultiStroke){const T=AT(C,d,f,g,b,m,v,1.5,u);w.push(...T)}return c&&(h?w.push(...Fo(d,f,d+g*Math.cos(m),f+b*Math.sin(m),u),...Fo(d,f,d+g*Math.cos(v),f+b*Math.sin(v),u)):w.push({op:"lineTo",data:[d,f]},{op:"lineTo",data:[d+g*Math.cos(m),f+b*Math.sin(m)]})),{type:"path",ops:w}}function ST(r,e){const i=lR(oR(__(r))),n=[];let a=[0,0],o=[0,0];for(const{key:c,data:h}of i)switch(c){case"M":o=[h[0],h[1]],a=[h[0],h[1]];break;case"L":n.push(...Fo(o[0],o[1],h[0],h[1],e)),o=[h[0],h[1]];break;case"C":{const[u,d,f,g,b,m]=h;n.push(...CW(u,d,f,g,b,m,o,e)),o=[b,m];break}case"Z":n.push(...Fo(o[0],o[1],a[0],a[1],e)),o=[a[0],a[1]]}return{type:"path",ops:n}}function Z0(r,e){const i=[];for(const n of r)if(n.length){const a=e.maxRandomnessOffset||0,o=n.length;if(o>2){i.push({op:"move",data:[n[0][0]+pe(a,e),n[0][1]+pe(a,e)]});for(let c=1;c<o;c++)i.push({op:"lineTo",data:[n[c][0]+pe(a,e),n[c][1]+pe(a,e)]})}}return{type:"fillPath",ops:i}}function Ec(r,e){return(function(i,n){let a=i.fillStyle||"hachure";if(!hn[a])switch(a){case"zigzag":hn[a]||(hn[a]=new fW(n));break;case"cross-hatch":hn[a]||(hn[a]=new pW(n));break;case"dots":hn[a]||(hn[a]=new gW(n));break;case"dashed":hn[a]||(hn[a]=new mW(n));break;case"zigzag-line":hn[a]||(hn[a]=new yW(n));break;default:a="hachure",hn[a]||(hn[a]=new v_(n))}return hn[a]})(e,vW).fillPolygons(r,e)}function TT(r){const e=Object.assign({},r);return e.randomizer=void 0,r.seed&&(e.seed=r.seed+1),e}function dR(r){return r.randomizer||(r.randomizer=new bW(r.seed||0)),r.randomizer.next()}function Og(r,e,i,n=1){return i.roughness*n*(dR(i)*(e-r)+r)}function pe(r,e,i=1){return Og(-r,r,e,i)}function Fo(r,e,i,n,a,o=!1){const c=o?a.disableMultiStrokeFill:a.disableMultiStroke,h=Cv(r,e,i,n,a,!0,!1);if(c)return h;const u=Cv(r,e,i,n,a,!0,!0);return h.concat(u)}function Cv(r,e,i,n,a,o,c){const h=Math.pow(r-i,2)+Math.pow(e-n,2),u=Math.sqrt(h);let d=1;d=u<200?1:u>500?.4:-.0016668*u+1.233334;let f=a.maxRandomnessOffset||0;f*f*100>h&&(f=u/10);const g=f/2,b=.2+.2*dR(a);let m=a.bowing*a.maxRandomnessOffset*(n-e)/200,v=a.bowing*a.maxRandomnessOffset*(r-i)/200;m=pe(m,a,d),v=pe(v,a,d);const _=[],C=()=>pe(g,a,d),w=()=>pe(f,a,d),T=a.preserveVertices;return c?_.push({op:"move",data:[r+(T?0:C()),e+(T?0:C())]}):_.push({op:"move",data:[r+(T?0:pe(f,a,d)),e+(T?0:pe(f,a,d))]}),c?_.push({op:"bcurveTo",data:[m+r+(i-r)*b+C(),v+e+(n-e)*b+C(),m+r+2*(i-r)*b+C(),v+e+2*(n-e)*b+C(),i+(T?0:C()),n+(T?0:C())]}):_.push({op:"bcurveTo",data:[m+r+(i-r)*b+w(),v+e+(n-e)*b+w(),m+r+2*(i-r)*b+w(),v+e+2*(n-e)*b+w(),i+(T?0:w()),n+(T?0:w())]}),_}function Cp(r,e,i){if(!r.length)return[];const n=[];n.push([r[0][0]+pe(e,i),r[0][1]+pe(e,i)]),n.push([r[0][0]+pe(e,i),r[0][1]+pe(e,i)]);for(let a=1;a<r.length;a++)n.push([r[a][0]+pe(e,i),r[a][1]+pe(e,i)]),a===r.length-1&&n.push([r[a][0]+pe(e,i),r[a][1]+pe(e,i)]);return Rg(n,null,i)}function Rg(r,e,i){const n=r.length,a=[];if(n>3){const o=[],c=1-i.curveTightness;a.push({op:"move",data:[r[1][0],r[1][1]]});for(let h=1;h+2<n;h++){const u=r[h];o[0]=[u[0],u[1]],o[1]=[u[0]+(c*r[h+1][0]-c*r[h-1][0])/6,u[1]+(c*r[h+1][1]-c*r[h-1][1])/6],o[2]=[r[h+1][0]+(c*r[h][0]-c*r[h+2][0])/6,r[h+1][1]+(c*r[h][1]-c*r[h+2][1])/6],o[3]=[r[h+1][0],r[h+1][1]],a.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else n===3?(a.push({op:"move",data:[r[1][0],r[1][1]]}),a.push({op:"bcurveTo",data:[r[1][0],r[1][1],r[2][0],r[2][1],r[2][0],r[2][1]]})):n===2&&a.push(...Cv(r[0][0],r[0][1],r[1][0],r[1][1],i,!0,!0));return a}function ET(r,e,i,n,a,o,c,h){const u=[],d=[];if(h.roughness===0){r/=4,d.push([e+n*Math.cos(-r),i+a*Math.sin(-r)]);for(let f=0;f<=2*Math.PI;f+=r){const g=[e+n*Math.cos(f),i+a*Math.sin(f)];u.push(g),d.push(g)}d.push([e+n*Math.cos(0),i+a*Math.sin(0)]),d.push([e+n*Math.cos(r),i+a*Math.sin(r)])}else{const f=pe(.5,h)-Math.PI/2;d.push([pe(o,h)+e+.9*n*Math.cos(f-r),pe(o,h)+i+.9*a*Math.sin(f-r)]);const g=2*Math.PI+f-.01;for(let b=f;b<g;b+=r){const m=[pe(o,h)+e+n*Math.cos(b),pe(o,h)+i+a*Math.sin(b)];u.push(m),d.push(m)}d.push([pe(o,h)+e+n*Math.cos(f+2*Math.PI+.5*c),pe(o,h)+i+a*Math.sin(f+2*Math.PI+.5*c)]),d.push([pe(o,h)+e+.98*n*Math.cos(f+c),pe(o,h)+i+.98*a*Math.sin(f+c)]),d.push([pe(o,h)+e+.9*n*Math.cos(f+.5*c),pe(o,h)+i+.9*a*Math.sin(f+.5*c)])}return[d,u]}function AT(r,e,i,n,a,o,c,h,u){const d=o+pe(.1,u),f=[];f.push([pe(h,u)+e+.9*n*Math.cos(d-r),pe(h,u)+i+.9*a*Math.sin(d-r)]);for(let g=d;g<=c;g+=r)f.push([pe(h,u)+e+n*Math.cos(g),pe(h,u)+i+a*Math.sin(g)]);return f.push([e+n*Math.cos(c),i+a*Math.sin(c)]),f.push([e+n*Math.cos(c),i+a*Math.sin(c)]),Rg(f,null,u)}function CW(r,e,i,n,a,o,c,h){const u=[],d=[h.maxRandomnessOffset||1,(h.maxRandomnessOffset||1)+.3];let f=[0,0];const g=h.disableMultiStroke?1:2,b=h.preserveVertices;for(let m=0;m<g;m++)m===0?u.push({op:"move",data:[c[0],c[1]]}):u.push({op:"move",data:[c[0]+(b?0:pe(d[0],h)),c[1]+(b?0:pe(d[0],h))]}),f=b?[a,o]:[a+pe(d[m],h),o+pe(d[m],h)],u.push({op:"bcurveTo",data:[r+pe(d[m],h),e+pe(d[m],h),i+pe(d[m],h),n+pe(d[m],h),f[0],f[1]]});return u}function Nu(r){return[...r]}function NT(r,e=0){const i=r.length;if(i<3)throw new Error("A curve must have at least three points.");const n=[];if(i===3)n.push(Nu(r[0]),Nu(r[1]),Nu(r[2]),Nu(r[2]));else{const a=[];a.push(r[0],r[0]);for(let h=1;h<r.length;h++)a.push(r[h]),h===r.length-1&&a.push(r[h]);const o=[],c=1-e;n.push(Nu(a[0]));for(let h=1;h+2<a.length;h++){const u=a[h];o[0]=[u[0],u[1]],o[1]=[u[0]+(c*a[h+1][0]-c*a[h-1][0])/6,u[1]+(c*a[h+1][1]-c*a[h-1][1])/6],o[2]=[a[h+1][0]+(c*a[h][0]-c*a[h+2][0])/6,a[h+1][1]+(c*a[h][1]-c*a[h+2][1])/6],o[3]=[a[h+1][0],a[h+1][1]],n.push(o[1],o[2],o[3])}}return n}function Vp(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)}function kW(r,e,i){const n=Vp(e,i);if(n===0)return Vp(r,e);let a=((r[0]-e[0])*(i[0]-e[0])+(r[1]-e[1])*(i[1]-e[1]))/n;return a=Math.max(0,Math.min(1,a)),Vp(r,cl(e,i,a))}function cl(r,e,i){return[r[0]+(e[0]-r[0])*i,r[1]+(e[1]-r[1])*i]}function kv(r,e,i,n){const a=n||[];if((function(h,u){const d=h[u+0],f=h[u+1],g=h[u+2],b=h[u+3];let m=3*f[0]-2*d[0]-b[0];m*=m;let v=3*f[1]-2*d[1]-b[1];v*=v;let _=3*g[0]-2*b[0]-d[0];_*=_;let C=3*g[1]-2*b[1]-d[1];return C*=C,m<_&&(m=_),v<C&&(v=C),m+v})(r,e)<i){const h=r[e+0];a.length?(o=a[a.length-1],c=h,Math.sqrt(Vp(o,c))>1&&a.push(h)):a.push(h),a.push(r[e+3])}else{const u=r[e+0],d=r[e+1],f=r[e+2],g=r[e+3],b=cl(u,d,.5),m=cl(d,f,.5),v=cl(f,g,.5),_=cl(b,m,.5),C=cl(m,v,.5),w=cl(_,C,.5);kv([u,b,_,w],0,i,a),kv([w,C,v,g],0,i,a)}var o,c;return a}function wW(r,e){return Dg(r,0,r.length,e)}function Dg(r,e,i,n,a){const o=a||[],c=r[e],h=r[i-1];let u=0,d=1;for(let f=e+1;f<i-1;++f){const g=kW(r[f],c,h);g>u&&(u=g,d=f)}return Math.sqrt(u)>n?(Dg(r,e,d+1,n,o),Dg(r,d,i,n,o)):(o.length||o.push(c),o.push(h)),o}function Q0(r,e=.15,i){const n=[],a=(r.length-1)/3;for(let o=0;o<a;o++)kv(r,3*o,e,n);return i&&i>0?Dg(n,0,n.length,i):n}const An="none";class Fg{constructor(e){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=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,i,n){return{shape:e,sets:i||[],options:n||this.defaultOptions}}line(e,i,n,a,o){const c=this._o(o);return this._d("line",[hR(e,i,n,a,c)],c)}rectangle(e,i,n,a,o){const c=this._o(o),h=[],u=_W(e,i,n,a,c);if(c.fill){const d=[[e,i],[e+n,i],[e+n,i+a],[e,i+a]];c.fillStyle==="solid"?h.push(Z0([d],c)):h.push(Ec([d],c))}return c.stroke!==An&&h.push(u),this._d("rectangle",h,c)}ellipse(e,i,n,a,o){const c=this._o(o),h=[],u=uR(n,a,c),d=_v(e,i,c,u);if(c.fill)if(c.fillStyle==="solid"){const f=_v(e,i,c,u).opset;f.type="fillPath",h.push(f)}else h.push(Ec([d.estimatedPoints],c));return c.stroke!==An&&h.push(d.opset),this._d("ellipse",h,c)}circle(e,i,n,a){const o=this.ellipse(e,i,n,n,a);return o.shape="circle",o}linearPath(e,i){const n=this._o(i);return this._d("linearPath",[Yp(e,!1,n)],n)}arc(e,i,n,a,o,c,h=!1,u){const d=this._o(u),f=[],g=wT(e,i,n,a,o,c,h,!0,d);if(h&&d.fill)if(d.fillStyle==="solid"){const b=Object.assign({},d);b.disableMultiStroke=!0;const m=wT(e,i,n,a,o,c,!0,!1,b);m.type="fillPath",f.push(m)}else f.push((function(b,m,v,_,C,w,T){const E=b,N=m;let O=Math.abs(v/2),B=Math.abs(_/2);O+=pe(.01*O,T),B+=pe(.01*B,T);let A=C,L=w;for(;A<0;)A+=2*Math.PI,L+=2*Math.PI;L-A>2*Math.PI&&(A=0,L=2*Math.PI);const P=(L-A)/T.curveStepCount,j=[];for(let $=A;$<=L;$+=P)j.push([E+O*Math.cos($),N+B*Math.sin($)]);return j.push([E+O*Math.cos(L),N+B*Math.sin(L)]),j.push([E,N]),Ec([j],T)})(e,i,n,a,o,c,d));return d.stroke!==An&&f.push(g),this._d("arc",f,d)}curve(e,i){const n=this._o(i),a=[],o=kT(e,n);if(n.fill&&n.fill!==An)if(n.fillStyle==="solid"){const c=kT(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else{const c=[],h=e;if(h.length){const u=typeof h[0][0]=="number"?[h]:h;for(const d of u)d.length<3?c.push(...d):d.length===3?c.push(...Q0(NT([d[0],d[0],d[1],d[2]]),10,(1+n.roughness)/2)):c.push(...Q0(NT(d),10,(1+n.roughness)/2))}c.length&&a.push(Ec([c],n))}return n.stroke!==An&&a.push(o),this._d("curve",a,n)}polygon(e,i){const n=this._o(i),a=[],o=Yp(e,!0,n);return n.fill&&(n.fillStyle==="solid"?a.push(Z0([e],n)):a.push(Ec([e],n))),n.stroke!==An&&a.push(o),this._d("polygon",a,n)}path(e,i){const n=this._o(i),a=[];if(!e)return this._d("path",a,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=n.fill&&n.fill!=="transparent"&&n.fill!==An,c=n.stroke!==An,h=!!(n.simplification&&n.simplification<1),u=(function(f,g,b){const m=lR(oR(__(f))),v=[];let _=[],C=[0,0],w=[];const T=()=>{w.length>=4&&_.push(...Q0(w,g)),w=[]},E=()=>{T(),_.length&&(v.push(_),_=[])};for(const{key:O,data:B}of m)switch(O){case"M":E(),C=[B[0],B[1]],_.push(C);break;case"L":T(),_.push([B[0],B[1]]);break;case"C":if(!w.length){const A=_.length?_[_.length-1]:C;w.push([A[0],A[1]])}w.push([B[0],B[1]]),w.push([B[2],B[3]]),w.push([B[4],B[5]]);break;case"Z":T(),_.push([C[0],C[1]])}if(E(),!b)return v;const N=[];for(const O of v){const B=wW(O,b);B.length&&N.push(B)}return N})(e,1,h?4-4*(n.simplification||1):(1+n.roughness)/2),d=ST(e,n);if(o)if(n.fillStyle==="solid")if(u.length===1){const f=ST(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(f.ops)})}else a.push(Z0(u,n));else a.push(Ec(u,n));return c&&(h?u.forEach((f=>{a.push(Yp(f,!1,n))})):a.push(d)),this._d("path",a,n)}opsToPath(e,i){let n="";for(const a of e.ops){const o=typeof i=="number"&&i>=0?a.data.map((c=>+c.toFixed(i))):a.data;switch(a.op){case"move":n+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":n+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":n+=`L${o[0]} ${o[1]} `}}return n.trim()}toPaths(e){const i=e.sets||[],n=e.options||this.defaultOptions,a=[];for(const o of i){let c=null;switch(o.type){case"path":c={d:this.opsToPath(o),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:An};break;case"fillPath":c={d:this.opsToPath(o),stroke:An,strokeWidth:0,fill:n.fill||An};break;case"fillSketch":c=this.fillSketch(o,n)}c&&a.push(c)}return a}fillSketch(e,i){let n=i.fillWeight;return n<0&&(n=i.strokeWidth/2),{d:this.opsToPath(e),stroke:i.fill||An,strokeWidth:n,fill:An}}_mergedShape(e){return e.filter(((i,n)=>n===0||i.op!=="move"))}}class SW{constructor(e,i){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new Fg(i)}draw(e){const i=e.sets||[],n=e.options||this.getDefaultOptions(),a=this.ctx,o=e.options.fixedDecimalPlaceDigits;for(const c of i)switch(c.type){case"path":a.save(),a.strokeStyle=n.stroke==="none"?"transparent":n.stroke,a.lineWidth=n.strokeWidth,n.strokeLineDash&&a.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(a.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(a,c,o),a.restore();break;case"fillPath":{a.save(),a.fillStyle=n.fill||"";const h=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,c,o,h),a.restore();break}case"fillSketch":this.fillSketch(a,c,n)}}fillSketch(e,i,n){let a=n.fillWeight;a<0&&(a=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=a,this._drawToContext(e,i,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,i,n,a="nonzero"){e.beginPath();for(const o of i.ops){const c=typeof n=="number"&&n>=0?o.data.map((h=>+h.toFixed(n))):o.data;switch(o.op){case"move":e.moveTo(c[0],c[1]);break;case"bcurveTo":e.bezierCurveTo(c[0],c[1],c[2],c[3],c[4],c[5]);break;case"lineTo":e.lineTo(c[0],c[1])}}i.type==="fillPath"?e.fill(a):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,i,n,a,o){const c=this.gen.line(e,i,n,a,o);return this.draw(c),c}rectangle(e,i,n,a,o){const c=this.gen.rectangle(e,i,n,a,o);return this.draw(c),c}ellipse(e,i,n,a,o){const c=this.gen.ellipse(e,i,n,a,o);return this.draw(c),c}circle(e,i,n,a){const o=this.gen.circle(e,i,n,a);return this.draw(o),o}linearPath(e,i){const n=this.gen.linearPath(e,i);return this.draw(n),n}polygon(e,i){const n=this.gen.polygon(e,i);return this.draw(n),n}arc(e,i,n,a,o,c,h=!1,u){const d=this.gen.arc(e,i,n,a,o,c,h,u);return this.draw(d),d}curve(e,i){const n=this.gen.curve(e,i);return this.draw(n),n}path(e,i){const n=this.gen.path(e,i);return this.draw(n),n}}const kp="http://www.w3.org/2000/svg";class TW{constructor(e,i){this.svg=e,this.gen=new Fg(i)}draw(e){const i=e.sets||[],n=e.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,o=a.createElementNS(kp,"g"),c=e.options.fixedDecimalPlaceDigits;for(const h of i){let u=null;switch(h.type){case"path":u=a.createElementNS(kp,"path"),u.setAttribute("d",this.opsToPath(h,c)),u.setAttribute("stroke",n.stroke),u.setAttribute("stroke-width",n.strokeWidth+""),u.setAttribute("fill","none"),n.strokeLineDash&&u.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":u=a.createElementNS(kp,"path"),u.setAttribute("d",this.opsToPath(h,c)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(a,h,n)}u&&o.appendChild(u)}return o}fillSketch(e,i,n){let a=n.fillWeight;a<0&&(a=n.strokeWidth/2);const o=e.createElementNS(kp,"path");return o.setAttribute("d",this.opsToPath(i,n.fixedDecimalPlaceDigits)),o.setAttribute("stroke",n.fill||""),o.setAttribute("stroke-width",a+""),o.setAttribute("fill","none"),n.fillLineDash&&o.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,i){return this.gen.opsToPath(e,i)}line(e,i,n,a,o){const c=this.gen.line(e,i,n,a,o);return this.draw(c)}rectangle(e,i,n,a,o){const c=this.gen.rectangle(e,i,n,a,o);return this.draw(c)}ellipse(e,i,n,a,o){const c=this.gen.ellipse(e,i,n,a,o);return this.draw(c)}circle(e,i,n,a){const o=this.gen.circle(e,i,n,a);return this.draw(o)}linearPath(e,i){const n=this.gen.linearPath(e,i);return this.draw(n)}polygon(e,i){const n=this.gen.polygon(e,i);return this.draw(n)}arc(e,i,n,a,o,c,h=!1,u){const d=this.gen.arc(e,i,n,a,o,c,h,u);return this.draw(d)}curve(e,i){const n=this.gen.curve(e,i);return this.draw(n)}path(e,i){const n=this.gen.path(e,i);return this.draw(n)}}var Yt={canvas:(r,e)=>new SW(r,e),svg:(r,e)=>new TW(r,e),generator:r=>new Fg(r),newSeed:()=>Fg.newSeed()},fe=M(async(r,e,i)=>{var m,v;let n;const a=e.useHtmlLabels||Fs((m=Ke())==null?void 0:m.htmlLabels);i?n=i:n="node default";const o=r.insert("g").attr("class",n).attr("id",e.domId||e.id),c=o.insert("g").attr("class","label").attr("style",gi(e.labelStyle));let h;e.label===void 0?h="":h=typeof e.label=="string"?e.label:e.label[0];const u=!!e.icon||!!e.img,d=e.labelType==="markdown",f=await Is(c,_a(Il(h),Ke()),{useHtmlLabels:a,width:e.width||((v=Ke().flowchart)==null?void 0:v.wrappingWidth),classes:d?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:u,markdown:d},Ke());let g=f.getBBox();const b=((e==null?void 0:e.padding)??0)/2;if(a){const _=f.children[0],C=ce(f);await LO(_,h),g=_.getBoundingClientRect(),C.attr("width",g.width),C.attr("height",g.height)}return a?c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"):c.attr("transform","translate(0, "+-g.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:o,bbox:g,halfPadding:b,label:c}},"labelHelper"),J0=M(async(r,e,i)=>{var u,d;const n=i.useHtmlLabels??Qi(Ke()),a=r.insert("g").attr("class","label").attr("style",i.labelStyle||""),o=await Is(a,_a(Il(e),Ke()),{useHtmlLabels:n,width:i.width||((d=(u=Ke())==null?void 0:u.flowchart)==null?void 0:d.wrappingWidth),style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img});let c=o.getBBox();const h=i.padding/2;if(Qi(Ke())){const f=o.children[0],g=ce(o);c=f.getBoundingClientRect(),g.attr("width",c.width),g.attr("height",c.height)}return n?a.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):a.attr("transform","translate(0, "+-c.height/2+")"),i.centerLabel&&a.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:r,bbox:c,halfPadding:h,label:a}},"insertLabel"),Qt=M((r,e)=>{const i=e.node().getBBox();r.width=i.width,r.height=i.height},"updateNodeBounds"),he=M((r,e)=>(r.look==="handDrawn"?"rough-node":"node")+" "+r.cssClasses+" "+(e||""),"getNodeClasses");function He(r){const e=r.map((i,n)=>`${n===0?"M":"L"}${i.x},${i.y}`);return e.push("Z"),e.join(" ")}M(He,"createPathFromPoints");function jo(r,e,i,n,a,o){const c=[],u=i-r,d=n-e,f=u/o,g=2*Math.PI/f,b=e+d/2;for(let m=0;m<=50;m++){const v=m/50,_=r+v*u,C=b+a*Math.sin(g*(_-r));c.push({x:_,y:C})}return c}M(jo,"generateFullSineWavePoints");function Td(r,e,i,n,a,o){const c=[],h=a*Math.PI/180,f=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const b=h+g*f,m=r+i*Math.cos(b),v=e+i*Math.sin(b);c.push({x:-m,y:-v})}return c}M(Td,"generateCirclePoints");function wv(r){const e=Array.from(r.childNodes).filter(u=>u.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),n=e.map(u=>u.getAttribute("d")).filter(u=>u!==null).join(" ");i.setAttribute("d",n);const a=e.find(u=>u.getAttribute("fill")!=="none"),o=e.find(u=>u.getAttribute("stroke")!=="none"),c=M((u,d)=>(u==null?void 0:u.getAttribute(d))??void 0,"getAttr");if(a){const u={fill:c(a,"fill"),"fill-opacity":c(a,"fill-opacity")??"1"};Object.entries(u).forEach(([d,f])=>{f&&i.setAttribute(d,f)})}if(o){const u={stroke:c(o,"stroke"),"stroke-width":c(o,"stroke-width")??"1","stroke-opacity":c(o,"stroke-opacity")??"1"};Object.entries(u).forEach(([d,f])=>{f&&i.setAttribute(d,f)})}const h=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(i),h}M(wv,"mergePaths");var EW=M((r,e)=>{var i=r.x,n=r.y,a=e.x-i,o=e.y-n,c=r.width/2,h=r.height/2,u,d;return Math.abs(o)*c>Math.abs(a)*h?(o<0&&(h=-h),u=o===0?0:h*a/o,d=h):(a<0&&(c=-c),u=c,d=a===0?0:c*o/a),{x:i+u,y:n+d}},"intersectRect"),Th=EW,AW=M(async(r,e,i,n=!1,a=!1)=>{let o=e||"";typeof o=="object"&&(o=o[0]);const c=Ke(),h=Qi(c);return await Is(r,o,{style:i,isTitle:n,useHtmlLabels:h,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},c)},"createLabel"),Ao=AW,$o=M((r,e,i,n,a)=>["M",r+a,e,"H",r+i-a,"A",a,a,0,0,1,r+i,e+a,"V",e+n-a,"A",a,a,0,0,1,r+i-a,e+n,"H",r+a,"A",a,a,0,0,1,r,e+n-a,"V",e+a,"A",a,a,0,0,1,r+a,e,"Z"].join(" "),"createRoundedRectPathD"),fR=M(async(r,e)=>{Tt.info("Creating subgraph rect for ",e.id,e);const i=Ke(),{themeVariables:n,handDrawnSeed:a}=i,{clusterBkg:o,clusterBorder:c}=n,{labelStyles:h,nodeStyles:u,borderStyles:d,backgroundStyles:f}=Kt(e),g=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),b=Qi(i),m=g.insert("g").attr("class","cluster-label ");let v;e.labelType==="markdown"?v=await Is(m,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width}):v=await Ao(m,e.label,e.labelStyle||"",!1,!0);let _=v.getBBox();if(Qi(i)){const A=v.children[0],L=ce(v);_=A.getBoundingClientRect(),L.attr("width",_.width),L.attr("height",_.height)}const C=e.width<=_.width+e.padding?_.width+e.padding:e.width;e.width<=_.width+e.padding?e.diff=(C-e.width)/2-e.padding:e.diff=-e.padding;const w=e.height,T=e.x-C/2,E=e.y-w/2;Tt.trace("Data ",e,JSON.stringify(e));let N;if(e.look==="handDrawn"){const A=Yt.svg(g),L=Vt(e,{roughness:.7,fill:o,stroke:c,fillWeight:3,seed:a}),P=A.path($o(T,E,C,w,0),L);N=g.insert(()=>(Tt.debug("Rough node insert CXC",P),P),":first-child"),N.select("path:nth-child(2)").attr("style",d.join(";")),N.select("path").attr("style",f.join(";").replace("fill","stroke"))}else N=g.insert("rect",":first-child"),N.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",E).attr("width",C).attr("height",w);const{subGraphTitleTopMargin:O}=c_(i);if(m.attr("transform",`translate(${e.x-_.width/2}, ${e.y-e.height/2+O})`),h){const A=m.select("span");A&&A.attr("style",h)}const B=N.node().getBBox();return e.offsetX=0,e.width=B.width,e.height=B.height,e.offsetY=_.height-e.padding/2,e.intersect=function(A){return Th(e,A)},{cluster:g,labelBBox:_}},"rect"),NW=M((r,e)=>{const i=r.insert("g").attr("class","note-cluster").attr("id",e.domId),n=i.insert("rect",":first-child"),a=0*e.padding,o=a/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-o).attr("y",e.y-e.height/2-o).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");const c=n.node().getBBox();return e.width=c.width,e.height=c.height,e.intersect=function(h){return Th(e,h)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),MW=M(async(r,e)=>{const i=Ke(),{themeVariables:n,handDrawnSeed:a}=i,{altBackground:o,compositeBackground:c,compositeTitleBackground:h,nodeBorder:u}=n,d=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),f=d.insert("g",":first-child"),g=d.insert("g").attr("class","cluster-label");let b=d.append("rect");const m=await Ao(g,e.label,e.labelStyle,void 0,!0);let v=m.getBBox();if(Qi(i)){const P=m.children[0],j=ce(m);v=P.getBoundingClientRect(),j.attr("width",v.width),j.attr("height",v.height)}const _=0*e.padding,C=_/2,w=(e.width<=v.width+e.padding?v.width+e.padding:e.width)+_;e.width<=v.width+e.padding?e.diff=(w-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height+_,E=e.height+_-v.height-6,N=e.x-w/2,O=e.y-T/2;e.width=w;const B=e.y-e.height/2-C+v.height+2;let A;if(e.look==="handDrawn"){const P=e.cssClasses.includes("statediagram-cluster-alt"),j=Yt.svg(d),$=e.rx||e.ry?j.path($o(N,O,w,T,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:u,seed:a}):j.rectangle(N,O,w,T,{seed:a});A=d.insert(()=>$,":first-child");const X=j.rectangle(N,B,w,E,{fill:P?o:c,fillStyle:P?"hachure":"solid",stroke:u,seed:a});A=d.insert(()=>$,":first-child"),b=d.insert(()=>X)}else A=f.insert("rect",":first-child"),A.attr("class","outer").attr("x",N).attr("y",O).attr("width",w).attr("height",T).attr("data-look",e.look),b.attr("class","inner").attr("x",N).attr("y",B).attr("width",w).attr("height",E);g.attr("transform",`translate(${e.x-v.width/2}, ${O+1-(Qi(i)?0:3)})`);const L=A.node().getBBox();return e.height=L.height,e.offsetX=0,e.offsetY=v.height-e.padding/2,e.labelBBox=v,e.intersect=function(P){return Th(e,P)},{cluster:d,labelBBox:v}},"roundedWithTitle"),BW=M(async(r,e)=>{Tt.info("Creating subgraph rect for ",e.id,e);const i=Ke(),{themeVariables:n,handDrawnSeed:a}=i,{clusterBkg:o,clusterBorder:c}=n,{labelStyles:h,nodeStyles:u,borderStyles:d,backgroundStyles:f}=Kt(e),g=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),b=Qi(i),m=g.insert("g").attr("class","cluster-label "),v=await Is(m,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width});let _=v.getBBox();if(Qi(i)){const A=v.children[0],L=ce(v);_=A.getBoundingClientRect(),L.attr("width",_.width),L.attr("height",_.height)}const C=e.width<=_.width+e.padding?_.width+e.padding:e.width;e.width<=_.width+e.padding?e.diff=(C-e.width)/2-e.padding:e.diff=-e.padding;const w=e.height,T=e.x-C/2,E=e.y-w/2;Tt.trace("Data ",e,JSON.stringify(e));let N;if(e.look==="handDrawn"){const A=Yt.svg(g),L=Vt(e,{roughness:.7,fill:o,stroke:c,fillWeight:4,seed:a}),P=A.path($o(T,E,C,w,e.rx),L);N=g.insert(()=>(Tt.debug("Rough node insert CXC",P),P),":first-child"),N.select("path:nth-child(2)").attr("style",d.join(";")),N.select("path").attr("style",f.join(";").replace("fill","stroke"))}else N=g.insert("rect",":first-child"),N.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",E).attr("width",C).attr("height",w);const{subGraphTitleTopMargin:O}=c_(i);if(m.attr("transform",`translate(${e.x-_.width/2}, ${e.y-e.height/2+O})`),h){const A=m.select("span");A&&A.attr("style",h)}const B=N.node().getBBox();return e.offsetX=0,e.width=B.width,e.height=B.height,e.offsetY=_.height-e.padding/2,e.intersect=function(A){return Th(e,A)},{cluster:g,labelBBox:_}},"kanbanSection"),LW=M((r,e)=>{const i=Ke(),{themeVariables:n,handDrawnSeed:a}=i,{nodeBorder:o}=n,c=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),h=c.insert("g",":first-child"),u=0*e.padding,d=e.width+u;e.diff=-e.padding;const f=e.height+u,g=e.x-d/2,b=e.y-f/2;e.width=d;let m;if(e.look==="handDrawn"){const C=Yt.svg(c).rectangle(g,b,d,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:a});m=c.insert(()=>C,":first-child")}else{m=h.insert("rect",":first-child");let _="outer";e.look,_="divider",m.attr("class",_).attr("x",g).attr("y",b).attr("width",d).attr("height",f).attr("data-look",e.look)}const v=m.node().getBBox();return e.height=v.height,e.offsetX=0,e.offsetY=0,e.intersect=function(_){return Th(e,_)},{cluster:c,labelBBox:{}}},"divider"),OW=fR,RW={rect:fR,squareRect:OW,roundedWithTitle:MW,noteGroup:NW,divider:LW,kanbanSection:BW},pR=new Map,DW=M(async(r,e)=>{const i=e.shape||"rect",n=await RW[i](r,e);return pR.set(e.id,n),n},"insertCluster"),zst=M(()=>{pR=new Map},"clear");function gR(r,e){return r.intersect(e)}M(gR,"intersectNode");var FW=gR;function mR(r,e,i,n){var a=r.x,o=r.y,c=a-n.x,h=o-n.y,u=Math.sqrt(e*e*h*h+i*i*c*c),d=Math.abs(e*i*c/u);n.x<a&&(d=-d);var f=Math.abs(e*i*h/u);return n.y<o&&(f=-f),{x:a+d,y:o+f}}M(mR,"intersectEllipse");var yR=mR;function bR(r,e,i){return yR(r,e,e,i)}M(bR,"intersectCircle");var jW=bR;function xR(r,e,i,n){{const a=e.y-r.y,o=r.x-e.x,c=e.x*r.y-r.x*e.y,h=a*i.x+o*i.y+c,u=a*n.x+o*n.y+c,d=1e-6;if(h!==0&&u!==0&&Sv(h,u))return;const f=n.y-i.y,g=i.x-n.x,b=n.x*i.y-i.x*n.y,m=f*r.x+g*r.y+b,v=f*e.x+g*e.y+b;if(Math.abs(m)<d&&Math.abs(v)<d&&Sv(m,v))return;const _=a*g-f*o;if(_===0)return;const C=Math.abs(_/2);let w=o*b-g*c;const T=w<0?(w-C)/_:(w+C)/_;w=f*c-a*b;const E=w<0?(w-C)/_:(w+C)/_;return{x:T,y:E}}}M(xR,"intersectLine");function Sv(r,e){return r*e>0}M(Sv,"sameSign");var IW=xR;function vR(r,e,i){let n=r.x,a=r.y,o=[],c=Number.POSITIVE_INFINITY,h=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(f){c=Math.min(c,f.x),h=Math.min(h,f.y)}):(c=Math.min(c,e.x),h=Math.min(h,e.y));let u=n-r.width/2-c,d=a-r.height/2-h;for(let f=0;f<e.length;f++){let g=e[f],b=e[f<e.length-1?f+1:0],m=IW(r,i,{x:u+g.x,y:d+g.y},{x:u+b.x,y:d+b.y});m&&o.push(m)}return o.length?(o.length>1&&o.sort(function(f,g){let b=f.x-i.x,m=f.y-i.y,v=Math.sqrt(b*b+m*m),_=g.x-i.x,C=g.y-i.y,w=Math.sqrt(_*_+C*C);return v<w?-1:v===w?0:1}),o[0]):r}M(vR,"intersectPolygon");var $W=vR,qt={node:FW,circle:jW,ellipse:yR,polygon:$W,rect:Th};function _R(r,e){const{labelStyles:i}=Kt(e);e.labelStyle=i;const n=he(e);let a=n;n||(a="anchor");const o=r.insert("g").attr("class",a).attr("id",e.domId||e.id),c=1,{cssStyles:h}=e,u=Yt.svg(o),d=Vt(e,{fill:"black",stroke:"none",fillStyle:"solid"});e.look!=="handDrawn"&&(d.roughness=0);const f=u.circle(0,0,c*2,d),g=o.insert(()=>f,":first-child");return g.attr("class","anchor").attr("style",gi(h)),Qt(e,g),e.intersect=function(b){return Tt.info("Circle intersect",e,c,b),qt.circle(e,c,b)},o}M(_R,"anchor");function Tv(r,e,i,n,a,o,c){const u=(r+i)/2,d=(e+n)/2,f=Math.atan2(n-e,i-r),g=(i-r)/2,b=(n-e)/2,m=g/a,v=b/o,_=Math.sqrt(m**2+v**2);if(_>1)throw new Error("The given radii are too small to create an arc between the points.");const C=Math.sqrt(1-_**2),w=u+C*o*Math.sin(f)*(c?-1:1),T=d-C*a*Math.cos(f)*(c?-1:1),E=Math.atan2((e-T)/o,(r-w)/a);let O=Math.atan2((n-T)/o,(i-w)/a)-E;c&&O<0&&(O+=2*Math.PI),!c&&O>0&&(O-=2*Math.PI);const B=[];for(let A=0;A<20;A++){const L=A/19,P=E+L*O,j=w+a*Math.cos(P),$=T+o*Math.sin(P);B.push({x:j,y:$})}return B}M(Tv,"generateArcPoints");function CR(r,e,i){const[n,a]=[e,i].sort((o,c)=>c-o);return a*(1-Math.sqrt(1-(r/n/2)**2))}M(CR,"calculateArcSagitta");async function kR(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=M(P=>P+c,"calcTotalHeight"),u=M(P=>{const j=P/2;return[j/(2.5+P/50),j]},"calcEllipseRadius"),{shapeSvg:d,bbox:f}=await fe(r,e,he(e)),g=h(e!=null&&e.height?e==null?void 0:e.height:f.height),[b,m]=u(g),v=CR(g,b,m),C=(e!=null&&e.width?e==null?void 0:e.width:f.width)+o*2+v-v,w=g,{cssStyles:T}=e,E=[{x:C/2,y:-w/2},{x:-C/2,y:-w/2},...Tv(-C/2,-w/2,-C/2,w/2,b,m,!1),{x:C/2,y:w/2},...Tv(C/2,w/2,C/2,-w/2,b,m,!0)],N=Yt.svg(d),O=Vt(e,{});e.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");const B=He(E),A=N.path(B,O),L=d.insert(()=>A,":first-child");return L.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",T),n&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",n),L.attr("transform",`translate(${b/2}, 0)`),Qt(e,L),e.intersect=function(P){return qt.polygon(e,E,P)},d}M(kR,"bowTieRect");function $s(r,e,i,n){return r.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+i/2+")")}M($s,"insertPolygonShape");var wp=12;async function wR(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?28:a,c=e.look==="neo"?24:a,{shapeSvg:h,bbox:u}=await fe(r,e,he(e)),d=((e==null?void 0:e.width)??u.width)+(e.look==="neo"?o*2:o+wp),f=((e==null?void 0:e.height)??u.height)+(e.look==="neo"?c*2:c),g=0,b=d,m=-f,v=0,_=[{x:g+wp,y:m},{x:b,y:m},{x:b,y:v},{x:g,y:v},{x:g,y:m+wp},{x:g+wp,y:m}];let C;const{cssStyles:w}=e;if(e.look==="handDrawn"){const T=Yt.svg(h),E=Vt(e,{}),N=He(_),O=T.path(N,E);C=h.insert(()=>O,":first-child").attr("transform",`translate(${-d/2}, ${f/2})`),w&&C.attr("style",w)}else C=$s(h,d,f,_);return n&&C.attr("style",n),Qt(e,C),e.intersect=function(T){return qt.polygon(e,_,T)},h}M(wR,"card");function SR(r,e){const{nodeStyles:i}=Kt(e);e.label="";const n=r.insert("g").attr("class",he(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,o=Math.max(28,e.width??0),c=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],h=Yt.svg(n),u=Vt(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=He(c),f=h.path(d,u),g=n.insert(()=>f,":first-child");return a&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",i),e.width=28,e.height=28,e.intersect=function(b){return qt.polygon(e,c,b)},n}M(SR,"choice");async function C_(r,e,i){const{labelStyles:n,nodeStyles:a}=Kt(e);e.labelStyle=n;const{shapeSvg:o,bbox:c,halfPadding:h}=await fe(r,e,he(e)),u=16,d=(i==null?void 0:i.padding)??h,f=e.look==="neo"?c.width/2+u*2:c.width/2+d;let g;const{cssStyles:b}=e;if(e.look==="handDrawn"){const m=Yt.svg(o),v=Vt(e,{}),_=m.circle(0,0,f*2,v);g=o.insert(()=>_,":first-child"),g.attr("class","basic label-container").attr("style",gi(b))}else g=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",f).attr("cx",0).attr("cy",0);return Qt(e,g),e.calcIntersect=function(m,v){const _=m.width/2;return qt.circle(m,_,v)},e.intersect=function(m){return Tt.info("Circle intersect",e,f,m),qt.circle(e,f,m)},o}M(C_,"circle");function TR(r){const e=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),n=r*2,a={x:n/2*e,y:n/2*i},o={x:-(n/2)*e,y:n/2*i},c={x:-(n/2)*e,y:-(n/2)*i},h={x:n/2*e,y:-(n/2)*i};return`M ${o.x},${o.y} L ${h.x},${h.y}
333
+ M ${a.x},${a.y} L ${c.x},${c.y}`}M(TR,"createLine");function ER(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i,e.label="";const a=r.insert("g").attr("class",he(e)).attr("id",e.domId??e.id),o=Math.max(30,(e==null?void 0:e.width)??0),{cssStyles:c}=e,h=Yt.svg(a),u=Vt(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=h.circle(0,0,o*2,u),f=TR(o),g=h.path(f,u),b=a.insert(()=>d,":first-child");return b.insert(()=>g),b.attr("class","outer-path"),c&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",c),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),Qt(e,b),e.intersect=function(m){return Tt.info("crossedCircle intersect",e,{radius:o,point:m}),qt.circle(e,o,m)},a}M(ER,"crossedCircle");function _s(r,e,i,n=100,a=0,o=180){const c=[],h=a*Math.PI/180,f=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const b=h+g*f,m=r+i*Math.cos(b),v=e+i*Math.sin(b);c.push({x:-m,y:-v})}return c}M(_s,"generateCirclePoints");async function AR(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,label:c}=await fe(r,e,he(e)),h=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,d=o.width+h,f=o.height+u,g=Math.max(5,f*.1),{cssStyles:b}=e,m=[..._s(d/2,-f/2,g,30,-90,0),{x:-d/2-g,y:g},..._s(d/2+g*2,-g,g,20,-180,-270),..._s(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:-f/2},..._s(d/2,f/2,g,20,0,90)],v=[{x:d/2,y:-f/2-g},{x:-d/2,y:-f/2-g},..._s(d/2,-f/2,g,20,-90,0),{x:-d/2-g,y:-g},..._s(d/2+d*.1,-g,g,20,-180,-270),..._s(d/2+d*.1,g,g,20,-90,-180),{x:-d/2-g,y:f/2},..._s(d/2,f/2,g,20,0,90),{x:-d/2,y:f/2+g},{x:d/2,y:f/2+g}],_=Yt.svg(a),C=Vt(e,{fill:"none"});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const T=He(m).replace("Z",""),E=_.path(T,C),N=He(v),O=_.path(N,{...C}),B=a.insert("g",":first-child");return B.insert(()=>O,":first-child").attr("stroke-opacity",0),B.insert(()=>E,":first-child"),B.attr("class","text"),b&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",b),n&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",n),B.attr("transform",`translate(${g}, 0)`),c.attr("transform",`translate(${-d/2+g-(o.x-(o.left??0))},${-f/2+(e.padding??0)/2-(o.y-(o.top??0))})`),Qt(e,B),e.intersect=function(A){return qt.polygon(e,v,A)},a}M(AR,"curlyBraceLeft");function Cs(r,e,i,n=100,a=0,o=180){const c=[],h=a*Math.PI/180,f=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const b=h+g*f,m=r+i*Math.cos(b),v=e+i*Math.sin(b);c.push({x:m,y:v})}return c}M(Cs,"generateCirclePoints");async function NR(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,label:c}=await fe(r,e,he(e)),h=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,d=o.width+(e.look==="neo"?h*2:h),f=o.height+(e.look==="neo"?u*2:u),g=Math.max(5,f*.1),{cssStyles:b}=e,m=[...Cs(d/2,-f/2,g,20,-90,0),{x:d/2+g,y:-g},...Cs(d/2+g*2,-g,g,20,-180,-270),...Cs(d/2+g*2,g,g,20,-90,-180),{x:d/2+g,y:f/2},...Cs(d/2,f/2,g,20,0,90)],v=[{x:-d/2,y:-f/2-g},{x:d/2,y:-f/2-g},...Cs(d/2,-f/2,g,20,-90,0),{x:d/2+g,y:-g},...Cs(d/2+g*2,-g,g,20,-180,-270),...Cs(d/2+g*2,g,g,20,-90,-180),{x:d/2+g,y:f/2},...Cs(d/2,f/2,g,20,0,90),{x:d/2,y:f/2+g},{x:-d/2,y:f/2+g}],_=Yt.svg(a),C=Vt(e,{fill:"none"});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const T=He(m).replace("Z",""),E=_.path(T,C),N=He(v),O=_.path(N,{...C}),B=a.insert("g",":first-child");return B.insert(()=>O,":first-child").attr("stroke-opacity",0),B.insert(()=>E,":first-child"),B.attr("class","text"),b&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",b),n&&e.look!=="handDrawn"&&B.selectAll("path").attr("style",n),B.attr("transform",`translate(${-g}, 0)`),c.attr("transform",`translate(${-d/2+(e.padding??0)/2-(o.x-(o.left??0))},${-f/2+(e.padding??0)/2-(o.y-(o.top??0))})`),Qt(e,B),e.intersect=function(A){return qt.polygon(e,v,A)},a}M(NR,"curlyBraceRight");function Ei(r,e,i,n=100,a=0,o=180){const c=[],h=a*Math.PI/180,f=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const b=h+g*f,m=r+i*Math.cos(b),v=e+i*Math.sin(b);c.push({x:-m,y:-v})}return c}M(Ei,"generateCirclePoints");async function MR(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,label:c}=await fe(r,e,he(e)),h=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,d=o.width+(e.look==="neo"?h*2:h),f=o.height+(e.look==="neo"?u*2:u),g=Math.max(5,f*.1),{cssStyles:b}=e,m=[...Ei(d/2,-f/2,g,30,-90,0),{x:-d/2-g,y:g},...Ei(d/2+g*2,-g,g,20,-180,-270),...Ei(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:-f/2},...Ei(d/2,f/2,g,20,0,90)],v=[...Ei(-d/2+g+g/2,-f/2,g,20,-90,-180),{x:d/2-g/2,y:g},...Ei(-d/2-g/2,-g,g,20,0,90),...Ei(-d/2-g/2,g,g,20,-90,0),{x:d/2-g/2,y:-g},...Ei(-d/2+g+g/2,f/2,g,30,-180,-270)],_=[{x:d/2,y:-f/2-g},{x:-d/2,y:-f/2-g},...Ei(d/2,-f/2,g,20,-90,0),{x:-d/2-g,y:-g},...Ei(d/2+g*2,-g,g,20,-180,-270),...Ei(d/2+g*2,g,g,20,-90,-180),{x:-d/2-g,y:f/2},...Ei(d/2,f/2,g,20,0,90),{x:-d/2,y:f/2+g},{x:d/2-g-g/2,y:f/2+g},...Ei(-d/2+g+g/2,-f/2,g,20,-90,-180),{x:d/2-g/2,y:g},...Ei(-d/2-g/2,-g,g,20,0,90),...Ei(-d/2-g/2,g,g,20,-90,0),{x:d/2-g/2,y:-g},...Ei(-d/2+g+g/2,f/2,g,30,-180,-270)],C=Yt.svg(a),w=Vt(e,{fill:"none"});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const E=He(m).replace("Z",""),N=C.path(E,w),B=He(v).replace("Z",""),A=C.path(B,w),L=He(_),P=C.path(L,{...w}),j=a.insert("g",":first-child");return j.insert(()=>P,":first-child").attr("stroke-opacity",0),j.insert(()=>N,":first-child"),j.insert(()=>A,":first-child"),j.attr("class","text"),b&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",b),n&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",n),j.attr("transform",`translate(${g-g/4}, 0)`),c.attr("transform",`translate(${-d/2+(e.padding??0)/2-(o.x-(o.left??0))},${-f/2+(e.padding??0)/2-(o.y-(o.top??0))})`),Qt(e,j),e.intersect=function($){return qt.polygon(e,_,$)},a}M(MR,"curlyBraces");async function BR(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=20,u=5,{shapeSvg:d,bbox:f}=await fe(r,e,he(e)),g=Math.max(h,(f.width+o*2)*1.25,(e==null?void 0:e.width)??0),b=Math.max(u,f.height+c*2,(e==null?void 0:e.height)??0),m=b/2,{cssStyles:v}=e,_=Yt.svg(d),C=Vt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=g,T=b,E=w-m,N=T/4,O=[{x:E,y:0},{x:N,y:0},{x:0,y:T/2},{x:N,y:T},{x:E,y:T},...Td(-E,-T/2,m,50,270,90)],B=He(O),A=_.path(B,C),L=d.insert(()=>A,":first-child");return L.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&L.selectChildren("path").attr("style",v),n&&e.look!=="handDrawn"&&L.selectChildren("path").attr("style",n),L.attr("transform",`translate(${-g/2}, ${-b/2})`),Qt(e,L),e.intersect=function(P){return qt.polygon(e,O,P)},d}M(BR,"curvedTrapezoid");var zW=M((r,e,i,n,a,o)=>[`M${r},${e+o}`,`a${a},${o} 0,0,0 ${i},0`,`a${a},${o} 0,0,0 ${-i},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${i},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),PW=M((r,e,i,n,a,o)=>[`M${r},${e+o}`,`M${r+i},${e+o}`,`a${a},${o} 0,0,0 ${-i},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${i},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),qW=M((r,e,i,n,a,o)=>[`M${r-i/2},${-n/2}`,`a${a},${o} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),MT=8,BT=8;async function LR(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?24:a,c=e.look==="neo"?24:a;if(e.width||e.height){const C=e.width??0;e.width=(e.width??0)-c,e.width<BT&&(e.width=BT);const T=C/2/(2.5+C/50);e.height=(e.height??0)-o-T*3,e.height<MT&&(e.height=MT)}const{shapeSvg:h,bbox:u,label:d}=await fe(r,e,he(e)),f=(e.width?e.width:u.width)+c,g=f/2,b=g/(2.5+f/50),m=(e.height?e.height:u.height)+o+b;let v;const{cssStyles:_}=e;if(e.look==="handDrawn"){const C=Yt.svg(h),w=PW(0,0,f,m,g,b),T=qW(0,b,f,m,g,b),E=Vt(e,{}),N=C.path(w,E),O=C.path(T,Vt(e,{fill:"none"}));v=h.insert(()=>O,":first-child"),v=h.insert(()=>N,":first-child"),v.attr("class","basic label-container"),_&&v.attr("style",_)}else{const C=zW(0,0,f,m,g,b);v=h.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",gi(_)).attr("style",n)}return v.attr("label-offset-y",b),v.attr("transform",`translate(${-f/2}, ${-(m/2+b)})`),Qt(e,v),d.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(e.padding??0)/1.5-(u.y-(u.top??0))})`),e.intersect=function(C){const w=qt.rect(e,C),T=w.x-(e.x??0);if(g!=0&&(Math.abs(T)<(e.width??0)/2||Math.abs(T)==(e.width??0)/2&&Math.abs(w.y-(e.y??0))>(e.height??0)/2-b)){let E=b*b*(1-T*T/(g*g));E>0&&(E=Math.sqrt(E)),E=b-E,C.y-(e.y??0)>0&&(E=-E),w.y+=E}return w},h}M(LR,"cylinder");async function OR(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.look==="neo"?16:e.padding??0,o=e.look==="neo"?16:e.padding??0,{shapeSvg:c,bbox:h,label:u}=await fe(r,e,he(e)),d=h.width+a,f=h.height+o,g=f*.2,b=-d/2,m=-f/2-g/2,{cssStyles:v}=e,_=Yt.svg(c),C=Vt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=[{x:b,y:m+g},{x:-b,y:m+g},{x:-b,y:-m},{x:b,y:-m},{x:b,y:m},{x:-b,y:m},{x:-b,y:m+g}],T=_.polygon(w.map(N=>[N.x,N.y]),C),E=c.insert(()=>T,":first-child");return E.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",v),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),u.attr("transform",`translate(${b+(e.padding??0)/2-(h.x-(h.left??0))}, ${m+g+(e.padding??0)/2-(h.y-(h.top??0))})`),Qt(e,E),e.intersect=function(N){return qt.rect(e,N)},c}M(OR,"dividedRectangle");async function RR(r,e){var m,v;const{labelStyles:i,nodeStyles:n}=Kt(e),a=e.look==="neo"?12:5;e.labelStyle=i;const o=e.padding??0,c=e.look==="neo"?16:o,{shapeSvg:h,bbox:u}=await fe(r,e,he(e)),d=(e!=null&&e.width?(e==null?void 0:e.width)/2:u.width/2)+(c??0),f=d-a;let g;const{cssStyles:b}=e;if(e.look==="handDrawn"){const _=Yt.svg(h),C=Vt(e,{roughness:.2,strokeWidth:2.5}),w=Vt(e,{roughness:.2,strokeWidth:1.5}),T=_.circle(0,0,d*2,C),E=_.circle(0,0,f*2,w);g=h.insert("g",":first-child"),g.attr("class",gi(e.cssClasses)).attr("style",gi(b)),(m=g.node())==null||m.appendChild(T),(v=g.node())==null||v.appendChild(E)}else{g=h.insert("g",":first-child");const _=g.insert("circle",":first-child"),C=g.insert("circle");g.attr("class","basic label-container").attr("style",n),_.attr("class","outer-circle").attr("style",n).attr("r",d).attr("cx",0).attr("cy",0),C.attr("class","inner-circle").attr("style",n).attr("r",f).attr("cx",0).attr("cy",0)}return Qt(e,g),e.intersect=function(_){return Tt.info("DoubleCircle intersect",e,d,_),qt.circle(e,d,_)},h}M(RR,"doublecircle");function DR(r,e,{config:{themeVariables:i}}){const{labelStyles:n,nodeStyles:a}=Kt(e);e.label="",e.labelStyle=n;const o=r.insert("g").attr("class",he(e)).attr("id",e.domId??e.id),c=7,{cssStyles:h}=e,u=Yt.svg(o),{nodeBorder:d}=i,f=Vt(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(f.roughness=0);const g=u.circle(0,0,c*2,f),b=o.insert(()=>g,":first-child");return b.selectAll("path").attr("style",`fill: ${d} !important;`),h&&h.length>0&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",h),a&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",a),Qt(e,b),e.intersect=function(m){return Tt.info("filledCircle intersect",e,{radius:c,point:m}),qt.circle(e,c,m)},o}M(DR,"filledCircle");var LT=10,OT=10;async function FR(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?a*2:a;(e.width||e.height)&&(e.height=(e==null?void 0:e.height)??0,e.height<LT&&(e.height=LT),e.width=((e==null?void 0:e.width)??0)-o-o/2,e.width<OT&&(e.width=OT));const{shapeSvg:c,bbox:h,label:u}=await fe(r,e,he(e)),d=(e!=null&&e.width?e==null?void 0:e.width:h.width)+(o??0),f=e!=null&&e.height?e==null?void 0:e.height:d+h.height,g=f,b=[{x:0,y:-f},{x:g,y:-f},{x:g/2,y:0}],{cssStyles:m}=e,v=Yt.svg(c),_=Vt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const C=He(b),w=v.path(C,_),T=c.insert(()=>w,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");return m&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",m),n&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),e.width=d,e.height=f,Qt(e,T),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-f/2+(e.padding??0)/2+(h.y-(h.top??0))})`),e.intersect=function(E){return Tt.info("Triangle intersect",e,b,E),qt.polygon(e,b,E)},c}M(FR,"flippedTriangle");function jR(r,e,{dir:i,config:{state:n,themeVariables:a}}){const{nodeStyles:o}=Kt(e);e.label="";const c=r.insert("g").attr("class",he(e)).attr("id",e.domId??e.id),{cssStyles:h}=e;let u=Math.max(70,(e==null?void 0:e.width)??0),d=Math.max(10,(e==null?void 0:e.height)??0);i==="LR"&&(u=Math.max(10,(e==null?void 0:e.width)??0),d=Math.max(70,(e==null?void 0:e.height)??0));const f=-1*u/2,g=-1*d/2,b=Yt.svg(c),m=Vt(e,{stroke:a.lineColor,fill:a.lineColor});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const v=b.rectangle(f,g,u,d,m),_=c.insert(()=>v,":first-child");h&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",h),o&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",o),Qt(e,_);const C=(n==null?void 0:n.padding)??0;return e.width&&e.height&&(e.width+=C/2||0,e.height+=C/2||0),e.intersect=function(w){return qt.rect(e,w)},c}M(jR,"forkJoin");async function IR(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=15,o=10,c=e.look==="neo"?16:e.padding??0,h=e.look==="neo"?12:e.padding??0;(e.width||e.height)&&(e.height=((e==null?void 0:e.height)??0)-h*2,e.height<o&&(e.height=o),e.width=((e==null?void 0:e.width)??0)-c*2,e.width<a&&(e.width=a));const{shapeSvg:u,bbox:d}=await fe(r,e,he(e)),f=(e!=null&&e.width?e==null?void 0:e.width:Math.max(a,d.width))+c*2,g=(e!=null&&e.height?e==null?void 0:e.height:Math.max(o,d.height))+h*2,b=g/2,{cssStyles:m}=e,v=Yt.svg(u),_=Vt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const C=[{x:-f/2,y:-g/2},{x:f/2-b,y:-g/2},...Td(-f/2+b,0,b,50,90,270),{x:f/2-b,y:g/2},{x:-f/2,y:g/2}],w=He(C),T=v.path(w,_),E=u.insert(()=>T,":first-child");return E.attr("class","basic label-container outer-path"),m&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",m),n&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",n),Qt(e,E),e.intersect=function(N){return Tt.info("Pill intersect",e,{radius:b,point:N}),qt.polygon(e,C,N)},u}M(IR,"halfRoundedRectangle");var UW=M((r,e,i,n,a)=>[`M${r+a},${e}`,`L${r+i-a},${e}`,`L${r+i},${e-n/2}`,`L${r+i-a},${e-n}`,`L${r+a},${e-n}`,`L${r},${e-n/2}`,"Z"].join(" "),"createHexagonPathD");async function $R(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e),a=e.look==="neo"?3.5:4;e.labelStyle=i;const o=e.padding??0,c=70,h=32,u=e.look==="neo"?c:o,d=e.look==="neo"?h:o;if(e.width||e.height){const E=(e.height??0)/a;e.width=((e==null?void 0:e.width)??0)-2*E-d,e.height=(e.height??0)-u}const{shapeSvg:f,bbox:g}=await fe(r,e,he(e)),b=(e!=null&&e.height?e==null?void 0:e.height:g.height)+u,m=b/a,v=(e!=null&&e.width?e==null?void 0:e.width:g.width)+2*m+d,_=[{x:m,y:0},{x:v-m,y:0},{x:v,y:-b/2},{x:v-m,y:-b},{x:m,y:-b},{x:0,y:-b/2}];let C;const{cssStyles:w}=e;if(e.look==="handDrawn"){const T=Yt.svg(f),E=Vt(e,{}),N=UW(0,0,v,b,m),O=T.path(N,E);C=f.insert(()=>O,":first-child").attr("transform",`translate(${-v/2}, ${b/2})`),w&&C.attr("style",w)}else C=$s(f,v,b,_);return n&&C.attr("style",n),e.width=v,e.height=b,Qt(e,C),e.intersect=function(T){return qt.polygon(e,_,T)},f}M($R,"hexagon");async function zR(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.label="",e.labelStyle=i;const{shapeSvg:a}=await fe(r,e,he(e)),o=Math.max(30,(e==null?void 0:e.width)??0),c=Math.max(30,(e==null?void 0:e.height)??0),{cssStyles:h}=e,u=Yt.svg(a),d=Vt(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=[{x:0,y:0},{x:o,y:0},{x:0,y:c},{x:o,y:c}],g=He(f),b=u.path(g,d),m=a.insert(()=>b,":first-child");return m.attr("class","basic label-container outer-path"),h&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",h),n&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",n),m.attr("transform",`translate(${-o/2}, ${-c/2})`),Qt(e,m),e.intersect=function(v){return Tt.info("Pill intersect",e,{points:f}),qt.polygon(e,f,v)},a}M(zR,"hourglass");async function PR(r,e,{config:{themeVariables:i,flowchart:n}}){const{labelStyles:a}=Kt(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:d,bbox:f,label:g}=await fe(r,e,"icon-shape default"),b=e.pos==="t",m=h,v=h,{nodeBorder:_}=i,{stylesMap:C}=Sh(e),w=-v/2,T=-m/2,E=e.label?8:0,N=Yt.svg(d),O=Vt(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");const B=N.rectangle(w,T,v,m,O),A=Math.max(v,f.width),L=m+f.height+E,P=N.rectangle(-A/2,-L/2,A,L,{...O,fill:"transparent",stroke:"none"}),j=d.insert(()=>B,":first-child"),$=d.insert(()=>P);if(e.icon){const X=d.append("g");X.html(`<g>${await Wd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const W=X.node().getBBox(),F=W.width,U=W.height,D=W.x,z=W.y;X.attr("transform",`translate(${-F/2-D},${b?f.height/2+E/2-U/2-z:-f.height/2-E/2-U/2-z})`),X.attr("style",`color: ${C.get("stroke")??_};`)}return g.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${b?-L/2:L/2-f.height})`),j.attr("transform",`translate(0,${b?f.height/2+E/2:-f.height/2-E/2})`),Qt(e,$),e.intersect=function(X){if(Tt.info("iconSquare intersect",e,X),!e.label)return qt.rect(e,X);const W=e.x??0,F=e.y??0,U=e.height??0;let D=[];return b?D=[{x:W-f.width/2,y:F-U/2},{x:W+f.width/2,y:F-U/2},{x:W+f.width/2,y:F-U/2+f.height+E},{x:W+v/2,y:F-U/2+f.height+E},{x:W+v/2,y:F+U/2},{x:W-v/2,y:F+U/2},{x:W-v/2,y:F-U/2+f.height+E},{x:W-f.width/2,y:F-U/2+f.height+E}]:D=[{x:W-v/2,y:F-U/2},{x:W+v/2,y:F-U/2},{x:W+v/2,y:F-U/2+m},{x:W+f.width/2,y:F-U/2+m},{x:W+f.width/2/2,y:F+U/2},{x:W-f.width/2,y:F+U/2},{x:W-f.width/2,y:F-U/2+m},{x:W-v/2,y:F-U/2+m}],qt.polygon(e,D,X)},d}M(PR,"icon");async function qR(r,e,{config:{themeVariables:i,flowchart:n}}){const{labelStyles:a}=Kt(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:d,bbox:f,label:g}=await fe(r,e,"icon-shape default"),b=20,m=e.label?8:0,v=e.pos==="t",{nodeBorder:_,mainBkg:C}=i,{stylesMap:w}=Sh(e),T=Yt.svg(d),E=Vt(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const N=w.get("fill");E.stroke=N??C;const O=d.append("g");e.icon&&O.html(`<g>${await Wd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const B=O.node().getBBox(),A=B.width,L=B.height,P=B.x,j=B.y,$=Math.max(A,L)*Math.SQRT2+b*2,X=T.circle(0,0,$,E),W=Math.max($,f.width),F=$+f.height+m,U=T.rectangle(-W/2,-F/2,W,F,{...E,fill:"transparent",stroke:"none"}),D=d.insert(()=>X,":first-child"),z=d.insert(()=>U);return O.attr("transform",`translate(${-A/2-P},${v?f.height/2+m/2-L/2-j:-f.height/2-m/2-L/2-j})`),O.attr("style",`color: ${w.get("stroke")??_};`),g.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${v?-F/2:F/2-f.height})`),D.attr("transform",`translate(0,${v?f.height/2+m/2:-f.height/2-m/2})`),Qt(e,z),e.intersect=function(H){return Tt.info("iconSquare intersect",e,H),qt.rect(e,H)},d}M(qR,"iconCircle");async function UR(r,e,{config:{themeVariables:i,flowchart:n}}){const{labelStyles:a}=Kt(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:d,bbox:f,halfPadding:g,label:b}=await fe(r,e,"icon-shape default"),m=e.pos==="t",v=h+g*2,_=h+g*2,{nodeBorder:C,mainBkg:w}=i,{stylesMap:T}=Sh(e),E=-_/2,N=-v/2,O=e.label?8:0,B=Yt.svg(d),A=Vt(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const L=T.get("fill");A.stroke=L??w;const P=B.path($o(E,N,_,v,5),A),j=Math.max(_,f.width),$=v+f.height+O,X=B.rectangle(-j/2,-$/2,j,$,{...A,fill:"transparent",stroke:"none"}),W=d.insert(()=>P,":first-child").attr("class","icon-shape2"),F=d.insert(()=>X);if(e.icon){const U=d.append("g");U.html(`<g>${await Wd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const D=U.node().getBBox(),z=D.width,H=D.height,V=D.x,Q=D.y;U.attr("transform",`translate(${-z/2-V},${m?f.height/2+O/2-H/2-Q:-f.height/2-O/2-H/2-Q})`),U.attr("style",`color: ${T.get("stroke")??C};`)}return b.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-$/2:$/2-f.height})`),W.attr("transform",`translate(0,${m?f.height/2+O/2:-f.height/2-O/2})`),Qt(e,F),e.intersect=function(U){if(Tt.info("iconSquare intersect",e,U),!e.label)return qt.rect(e,U);const D=e.x??0,z=e.y??0,H=e.height??0;let V=[];return m?V=[{x:D-f.width/2,y:z-H/2},{x:D+f.width/2,y:z-H/2},{x:D+f.width/2,y:z-H/2+f.height+O},{x:D+_/2,y:z-H/2+f.height+O},{x:D+_/2,y:z+H/2},{x:D-_/2,y:z+H/2},{x:D-_/2,y:z-H/2+f.height+O},{x:D-f.width/2,y:z-H/2+f.height+O}]:V=[{x:D-_/2,y:z-H/2},{x:D+_/2,y:z-H/2},{x:D+_/2,y:z-H/2+v},{x:D+f.width/2,y:z-H/2+v},{x:D+f.width/2/2,y:z+H/2},{x:D-f.width/2,y:z+H/2},{x:D-f.width/2,y:z-H/2+v},{x:D-_/2,y:z-H/2+v}],qt.polygon(e,V,U)},d}M(UR,"iconRounded");async function HR(r,e,{config:{themeVariables:i,flowchart:n}}){const{labelStyles:a}=Kt(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:d,bbox:f,halfPadding:g,label:b}=await fe(r,e,"icon-shape default"),m=e.pos==="t",v=h+g*2,_=h+g*2,{nodeBorder:C,mainBkg:w}=i,{stylesMap:T}=Sh(e),E=-_/2,N=-v/2,O=e.label?8:0,B=Yt.svg(d),A=Vt(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const L=T.get("fill");A.stroke=L??w;const P=B.path($o(E,N,_,v,.1),A),j=Math.max(_,f.width),$=v+f.height+O,X=B.rectangle(-j/2,-$/2,j,$,{...A,fill:"transparent",stroke:"none"}),W=d.insert(()=>P,":first-child"),F=d.insert(()=>X);if(e.icon){const U=d.append("g");U.html(`<g>${await Wd(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const D=U.node().getBBox(),z=D.width,H=D.height,V=D.x,Q=D.y;U.attr("transform",`translate(${-z/2-V},${m?f.height/2+O/2-H/2-Q:-f.height/2-O/2-H/2-Q})`),U.attr("style",`color: ${T.get("stroke")??C};`)}return b.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-$/2:$/2-f.height})`),W.attr("transform",`translate(0,${m?f.height/2+O/2:-f.height/2-O/2})`),Qt(e,F),e.intersect=function(U){if(Tt.info("iconSquare intersect",e,U),!e.label)return qt.rect(e,U);const D=e.x??0,z=e.y??0,H=e.height??0;let V=[];return m?V=[{x:D-f.width/2,y:z-H/2},{x:D+f.width/2,y:z-H/2},{x:D+f.width/2,y:z-H/2+f.height+O},{x:D+_/2,y:z-H/2+f.height+O},{x:D+_/2,y:z+H/2},{x:D-_/2,y:z+H/2},{x:D-_/2,y:z-H/2+f.height+O},{x:D-f.width/2,y:z-H/2+f.height+O}]:V=[{x:D-_/2,y:z-H/2},{x:D+_/2,y:z-H/2},{x:D+_/2,y:z-H/2+v},{x:D+f.width/2,y:z-H/2+v},{x:D+f.width/2/2,y:z+H/2},{x:D-f.width/2,y:z+H/2},{x:D-f.width/2,y:z-H/2+v},{x:D-_/2,y:z-H/2+v}],qt.polygon(e,V,U)},d}M(HR,"iconSquare");async function GR(r,e,{config:{flowchart:i}}){const n=new Image;n.src=(e==null?void 0:e.img)??"",await n.decode();const a=Number(n.naturalWidth.toString().replace("px","")),o=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/o;const{labelStyles:c}=Kt(e);e.labelStyle=c;const h=i==null?void 0:i.wrappingWidth;e.defaultWidth=i==null?void 0:i.wrappingWidth;const u=Math.max(e.label?h??0:0,(e==null?void 0:e.assetWidth)??a),d=e.constraint==="on"&&e!=null&&e.assetHeight?e.assetHeight*e.imageAspectRatio:u,f=e.constraint==="on"?d/e.imageAspectRatio:(e==null?void 0:e.assetHeight)??o;e.width=Math.max(d,h??0);const{shapeSvg:g,bbox:b,label:m}=await fe(r,e,"image-shape default"),v=e.pos==="t",_=-d/2,C=-f/2,w=e.label?8:0,T=Yt.svg(g),E=Vt(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const N=T.rectangle(_,C,d,f,E),O=Math.max(d,b.width),B=f+b.height+w,A=T.rectangle(-O/2,-B/2,O,B,{...E,fill:"none",stroke:"none"}),L=g.insert(()=>N,":first-child"),P=g.insert(()=>A);if(e.img){const j=g.append("image");j.attr("href",e.img),j.attr("width",d),j.attr("height",f),j.attr("preserveAspectRatio","none"),j.attr("transform",`translate(${-d/2},${v?B/2-f:-B/2})`)}return m.attr("transform",`translate(${-b.width/2-(b.x-(b.left??0))},${v?-f/2-b.height/2-w/2:f/2-b.height/2+w/2})`),L.attr("transform",`translate(0,${v?b.height/2+w/2:-b.height/2-w/2})`),Qt(e,P),e.intersect=function(j){if(Tt.info("iconSquare intersect",e,j),!e.label)return qt.rect(e,j);const $=e.x??0,X=e.y??0,W=e.height??0;let F=[];return v?F=[{x:$-b.width/2,y:X-W/2},{x:$+b.width/2,y:X-W/2},{x:$+b.width/2,y:X-W/2+b.height+w},{x:$+d/2,y:X-W/2+b.height+w},{x:$+d/2,y:X+W/2},{x:$-d/2,y:X+W/2},{x:$-d/2,y:X-W/2+b.height+w},{x:$-b.width/2,y:X-W/2+b.height+w}]:F=[{x:$-d/2,y:X-W/2},{x:$+d/2,y:X-W/2},{x:$+d/2,y:X-W/2+f},{x:$+b.width/2,y:X-W/2+f},{x:$+b.width/2/2,y:X+W/2},{x:$-b.width/2,y:X+W/2},{x:$-b.width/2,y:X-W/2+f},{x:$-d/2,y:X-W/2+f}],qt.polygon(e,F,j)},g}M(GR,"imageSquare");async function WR(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await fe(r,e,he(e)),d=Math.max(u.width+(c??0)*2,(e==null?void 0:e.width)??0),f=Math.max(u.height+(o??0)*2,(e==null?void 0:e.height)??0),g=[{x:0,y:0},{x:d,y:0},{x:d+3*f/6,y:-f},{x:-3*f/6,y:-f}];let b;const{cssStyles:m}=e;if(e.look==="handDrawn"){const v=Yt.svg(h),_=Vt(e,{}),C=He(g),w=v.path(C,_);b=h.insert(()=>w,":first-child").attr("transform",`translate(${-d/2}, ${f/2})`),m&&b.attr("style",m)}else b=$s(h,d,f,g);return n&&b.attr("style",n),e.width=d,e.height=f,Qt(e,b),e.intersect=function(v){return qt.polygon(e,g,v)},h}M(WR,"inv_trapezoid");async function Vd(r,e,i){const{labelStyles:n,nodeStyles:a}=Kt(e);e.labelStyle=n;const{shapeSvg:o,bbox:c}=await fe(r,e,he(e)),h=Math.max(c.width+i.labelPaddingX*2,(e==null?void 0:e.width)||0),u=Math.max(c.height+i.labelPaddingY*2,(e==null?void 0:e.height)||0),d=-h/2,f=-u/2;let g,{rx:b,ry:m}=e;const{cssStyles:v}=e;if(i!=null&&i.rx&&i.ry&&(b=i.rx,m=i.ry),e.look==="handDrawn"){const _=Yt.svg(o),C=Vt(e,{}),w=b||m?_.path($o(d,f,h,u,b||0),C):_.rectangle(d,f,h,u,C);g=o.insert(()=>w,":first-child"),g.attr("class","basic label-container").attr("style",gi(v))}else g=o.insert("rect",":first-child"),g.attr("class","basic label-container").attr("style",a).attr("rx",gi(b)).attr("ry",gi(m)).attr("x",d).attr("y",f).attr("width",h).attr("height",u);return Qt(e,g),e.calcIntersect=function(_,C){return qt.rect(_,C)},e.intersect=function(_){return qt.rect(e,_)},o}M(Vd,"drawRect");async function YR(r,e){const{shapeSvg:i,bbox:n,label:a}=await fe(r,e,"label"),o=i.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),i.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Qt(e,o),e.intersect=function(u){return qt.rect(e,u)},i}M(YR,"labelRect");async function VR(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await fe(r,e,he(e)),d=((e==null?void 0:e.height)??u.height)+o,f=((e==null?void 0:e.width)??u.width)+c,g=[{x:0,y:0},{x:f+3*d/6,y:0},{x:f,y:-d},{x:-(3*d)/6,y:-d}];let b;const{cssStyles:m}=e;if(e.look==="handDrawn"){const v=Yt.svg(h),_=Vt(e,{}),C=He(g),w=v.path(C,_);b=h.insert(()=>w,":first-child").attr("transform",`translate(${-f/2}, ${d/2})`),m&&b.attr("style",m)}else b=$s(h,f,d,g);return n&&b.attr("style",n),e.width=f,e.height=d,Qt(e,b),e.intersect=function(v){return qt.polygon(e,g,v)},h}M(VR,"lean_left");async function KR(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await fe(r,e,he(e)),d=((e==null?void 0:e.height)??u.height)+o,f=((e==null?void 0:e.width)??u.width)+c,g=[{x:-3*d/6,y:0},{x:f,y:0},{x:f+3*d/6,y:-d},{x:0,y:-d}];let b;const{cssStyles:m}=e;if(e.look==="handDrawn"){const v=Yt.svg(h),_=Vt(e,{}),C=He(g),w=v.path(C,_);b=h.insert(()=>w,":first-child").attr("transform",`translate(${-f/2}, ${d/2})`),m&&b.attr("style",m)}else b=$s(h,f,d,g);return n&&b.attr("style",n),e.width=f,e.height=d,Qt(e,b),e.intersect=function(v){return qt.polygon(e,g,v)},h}M(KR,"lean_right");function XR(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.label="",e.labelStyle=i;const a=r.insert("g").attr("class",he(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,c=Math.max(35,(e==null?void 0:e.width)??0),h=Math.max(35,(e==null?void 0:e.height)??0),u=7,d=[{x:c,y:0},{x:0,y:h+u/2},{x:c-2*u,y:h+u/2},{x:0,y:2*h},{x:c,y:h-u/2},{x:2*u,y:h-u/2}],f=Yt.svg(a),g=Vt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=He(d),m=f.path(b,g),v=a.insert(()=>m,":first-child");return v.attr("class","outer-path"),o&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",o),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(-${c/2},${-h})`),Qt(e,v),e.intersect=function(_){return Tt.info("lightningBolt intersect",e,_),qt.polygon(e,d,_)},a}M(XR,"lightningBolt");var HW=M((r,e,i,n,a,o,c)=>[`M${r},${e+o}`,`a${a},${o} 0,0,0 ${i},0`,`a${a},${o} 0,0,0 ${-i},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${i},0`,`l0,${-n}`,`M${r},${e+o+c}`,`a${a},${o} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),GW=M((r,e,i,n,a,o,c)=>[`M${r},${e+o}`,`M${r+i},${e+o}`,`a${a},${o} 0,0,0 ${-i},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${i},0`,`l0,${-n}`,`M${r},${e+o+c}`,`a${a},${o} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),WW=M((r,e,i,n,a,o)=>[`M${r-i/2},${-n/2}`,`a${a},${o} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),RT=10,DT=10;async function ZR(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?24:a;if(e.width||e.height){const w=e.width??0;e.width=(e.width??0)-o,e.width<DT&&(e.width=DT);const E=w/2/(2.5+w/50);e.height=(e.height??0)-c-E*3,e.height<RT&&(e.height=RT)}const{shapeSvg:h,bbox:u,label:d}=await fe(r,e,he(e)),f=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2,g=f/2,b=g/(2.5+f/50),m=(e!=null&&e.height?e==null?void 0:e.height:u.height)+b+c*2,v=m*.1;let _;const{cssStyles:C}=e;if(e.look==="handDrawn"){const w=Yt.svg(h),T=GW(0,0,f,m,g,b,v),E=WW(0,b,f,m,g,b),N=Vt(e,{}),O=w.path(T,N),B=w.path(E,N);h.insert(()=>B,":first-child").attr("class","line"),_=h.insert(()=>O,":first-child"),_.attr("class","basic label-container"),C&&_.attr("style",C)}else{const w=HW(0,0,f,m,g,b,v);_=h.insert("path",":first-child").attr("d",w).attr("class","basic label-container outer-path").attr("style",gi(C)).attr("style",n)}return _.attr("label-offset-y",b),_.attr("transform",`translate(${-f/2}, ${-(m/2+b)})`),Qt(e,_),d.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+b-(u.y-(u.top??0))})`),e.intersect=function(w){const T=qt.rect(e,w),E=T.x-(e.x??0);if(g!=0&&(Math.abs(E)<(e.width??0)/2||Math.abs(E)==(e.width??0)/2&&Math.abs(T.y-(e.y??0))>(e.height??0)/2-b)){let N=b*b*(1-E*E/(g*g));N>0&&(N=Math.sqrt(N)),N=b-N,w.y-(e.y??0)>0&&(N=-N),T.y+=N}return T},h}M(ZR,"linedCylinder");async function QR(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;if(e.width||e.height){const N=e.width;e.width=(N??0)*10/11-o*2,e.width<10&&(e.width=10),e.height=((e==null?void 0:e.height)??0)-c*2,e.height<10&&(e.height=10)}const{shapeSvg:h,bbox:u,label:d}=await fe(r,e,he(e)),f=(e!=null&&e.width?e==null?void 0:e.width:u.width)+(o??0)*2,g=(e!=null&&e.height?e==null?void 0:e.height:u.height)+(c??0)*2,b=e.look==="neo"?g/4:g/8,m=g+b,{cssStyles:v}=e,_=Yt.svg(h),C=Vt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=[{x:-f/2-f/2*.1,y:-m/2},{x:-f/2-f/2*.1,y:m/2},...jo(-f/2-f/2*.1,m/2,f/2+f/2*.1,m/2,b,.8),{x:f/2+f/2*.1,y:-m/2},{x:-f/2-f/2*.1,y:-m/2},{x:-f/2,y:-m/2},{x:-f/2,y:m/2*1.1},{x:-f/2,y:-m/2}],T=_.polygon(w.map(N=>[N.x,N.y]),C),E=h.insert(()=>T,":first-child");return E.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",v),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(0,${-b/2})`),d.attr("transform",`translate(${-f/2+(e.padding??0)+f/2*.1/2-(u.x-(u.left??0))},${-g/2+(e.padding??0)-b/2-(u.y-(u.top??0))})`),Qt(e,E),e.intersect=function(N){return qt.polygon(e,w,N)},h}M(QR,"linedWaveEdgedRect");async function JR(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=e.look==="neo"?10:5;(e.width||e.height)&&(e.width=Math.max(((e==null?void 0:e.width)??0)-o*2-2*h,10),e.height=Math.max(((e==null?void 0:e.height)??0)-c*2-2*h,10));const{shapeSvg:u,bbox:d,label:f}=await fe(r,e,he(e)),g=(e!=null&&e.width?e==null?void 0:e.width:d.width)+o*2+2*h,b=(e!=null&&e.height?e==null?void 0:e.height:d.height)+c*2+2*h,m=g-2*h,v=b-2*h,_=-m/2,C=-v/2,{cssStyles:w}=e,T=Yt.svg(u),E=Vt(e,{}),N=[{x:_-h,y:C+h},{x:_-h,y:C+v+h},{x:_+m-h,y:C+v+h},{x:_+m-h,y:C+v},{x:_+m,y:C+v},{x:_+m,y:C+v-h},{x:_+m+h,y:C+v-h},{x:_+m+h,y:C-h},{x:_+h,y:C-h},{x:_+h,y:C},{x:_,y:C},{x:_,y:C+h}],O=[{x:_,y:C+h},{x:_+m-h,y:C+h},{x:_+m-h,y:C+v},{x:_+m,y:C+v},{x:_+m,y:C},{x:_,y:C}];e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const B=He(N);let A=T.path(B,E);const L=He(O);let P=T.path(L,E);e.look!=="handDrawn"&&(A=wv(A),P=wv(P));const j=u.insert("g",":first-child");return j.insert(()=>A),j.insert(()=>P),j.attr("class","basic label-container outer-path"),w&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",w),n&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",n),f.attr("transform",`translate(${-(d.width/2)-h-(d.x-(d.left??0))}, ${-(d.height/2)+h-(d.y-(d.top??0))})`),Qt(e,j),e.intersect=function($){return qt.polygon(e,N,$)},u}M(JR,"multiRect");async function t3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,label:c}=await fe(r,e,he(e)),h=e.padding??0,u=e.look==="neo"?16:h,d=e.look==="neo"?12:h;let f=!0;(e.width||e.height)&&(f=!1,e.width=((e==null?void 0:e.width)??0)-u*2,e.height=((e==null?void 0:e.height)??0)-d*3);const g=Math.max(o.width,(e==null?void 0:e.width)??0)+u*2,b=Math.max(o.height,(e==null?void 0:e.height)??0)+d*3,m=e.look==="neo"?b/4:b/8,v=b+(f?m/2:-m/2),_=-g/2,C=-v/2,w=10,{cssStyles:T}=e,E=jo(_-w,C+v+w,_+g-w,C+v+w,m,.8),N=E==null?void 0:E[E.length-1],O=[{x:_-w,y:C+w},{x:_-w,y:C+v+w},...E,{x:_+g-w,y:N.y-w},{x:_+g,y:N.y-w},{x:_+g,y:N.y-2*w},{x:_+g+w,y:N.y-2*w},{x:_+g+w,y:C-w},{x:_+w,y:C-w},{x:_+w,y:C},{x:_,y:C},{x:_,y:C+w}],B=[{x:_,y:C+w},{x:_+g-w,y:C+w},{x:_+g-w,y:N.y-w},{x:_+g,y:N.y-w},{x:_+g,y:C},{x:_,y:C}],A=Yt.svg(a),L=Vt(e,{});e.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const P=He(O),j=A.path(P,L),$=He(B),X=A.path($,L),W=a.insert(()=>j,":first-child");return W.insert(()=>X),W.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn"&&W.selectAll("path").attr("style",T),n&&e.look!=="handDrawn"&&W.selectAll("path").attr("style",n),W.attr("transform",`translate(0,${-m/2})`),c.attr("transform",`translate(${-(o.width/2)-w-(o.x-(o.left??0))}, ${-(o.height/2)+w-m/2-(o.y-(o.top??0))})`),Qt(e,W),e.intersect=function(F){return qt.polygon(e,O,F)},a}M(t3,"multiWaveEdgedRectangle");async function e3(r,e,{config:{themeVariables:i}}){const{labelStyles:n,nodeStyles:a}=Kt(e);e.labelStyle=n,e.useHtmlLabels||Qi(Lr())||(e.centerLabel=!0);const{shapeSvg:c,bbox:h,label:u}=await fe(r,e,he(e)),d=Math.max(h.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),f=Math.max(h.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),g=-d/2,b=-f/2,{cssStyles:m}=e,v=Yt.svg(c),_=Vt(e,{fill:i.noteBkgColor,stroke:i.noteBorderColor});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const C=v.rectangle(g,b,d,f,_),w=c.insert(()=>C,":first-child");return w.attr("class","basic label-container outer-path"),u.attr("class","label noteLabel"),m&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",m),a&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",a),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Qt(e,w),e.intersect=function(T){return qt.rect(e,T)},c}M(e3,"note");var YW=M((r,e,i)=>[`M${r+i/2},${e}`,`L${r+i},${e-i/2}`,`L${r+i/2},${e-i}`,`L${r},${e-i/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function r3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const{shapeSvg:a,bbox:o}=await fe(r,e,he(e)),c=o.width+(e.padding??0),h=o.height+(e.padding??0),u=c+h,d=.5,f=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}];let g;const{cssStyles:b}=e;if(e.look==="handDrawn"){const m=Yt.svg(a),v=Vt(e,{}),_=YW(0,0,u),C=m.path(_,v);g=a.insert(()=>C,":first-child").attr("transform",`translate(${-u/2+d}, ${u/2})`),b&&g.attr("style",b)}else g=$s(a,u,u,f),g.attr("transform",`translate(${-u/2+d}, ${u/2})`);return n&&g.attr("style",n),Qt(e,g),e.calcIntersect=function(m,v){const _=m.width,C=[{x:_/2,y:0},{x:_,y:-_/2},{x:_/2,y:-_},{x:0,y:-_/2}],w=qt.polygon(m,C,v);return{x:w.x-.5,y:w.y-.5}},e.intersect=function(m){return this.calcIntersect(e,m)},a}M(r3,"question");async function i3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?21:a??0,c=e.look==="neo"?12:a??0,{shapeSvg:h,bbox:u,label:d}=await fe(r,e,he(e)),f=((e==null?void 0:e.width)??u.width)+(e.look==="neo"?o*2:o),g=((e==null?void 0:e.height)??u.height)+(e.look==="neo"?c*2:c),b=-f/2,m=-g/2,v=m/2,_=[{x:b+v,y:m},{x:b,y:0},{x:b+v,y:-m},{x:-b,y:-m},{x:-b,y:m}],{cssStyles:C}=e,w=Yt.svg(h),T=Vt(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const E=He(_),N=w.path(E,T),O=h.insert(()=>N,":first-child");return O.attr("class","basic label-container outer-path"),C&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",C),n&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",n),O.attr("transform",`translate(${-v/2},0)`),d.attr("transform",`translate(${-v/2-u.width/2-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),Qt(e,O),e.intersect=function(B){return qt.polygon(e,_,B)},h}M(i3,"rect_left_inv_arrow");async function n3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;let a;e.cssClasses?a="node "+e.cssClasses:a="node default";const o=r.insert("g").attr("class",a).attr("id",e.domId||e.id),c=o.insert("g"),h=o.insert("g").attr("class","label").attr("style",n),u=e.description,d=e.label,f=await Ao(h,d,e.labelStyle,!0,!0);let g={width:0,height:0};if(Qi(Ke())){const L=f.children[0],P=ce(f);g=L.getBoundingClientRect(),P.attr("width",g.width),P.attr("height",g.height)}Tt.info("Text 2",u);const b=u||[],m=f.getBBox(),v=await Ao(h,Array.isArray(b)?b.join("<br/>"):b,e.labelStyle,!0,!0),_=v.children[0],C=ce(v);g=_.getBoundingClientRect(),C.attr("width",g.width),C.attr("height",g.height);const w=(e.padding||0)/2;ce(v).attr("transform","translate( "+(g.width>m.width?0:(m.width-g.width)/2)+", "+(m.height+w+5)+")"),ce(f).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-w+3)+")");const T=g.width+(e.padding||0),E=g.height+(e.padding||0),N=-g.width/2-w,O=-g.height/2-w;let B,A;if(e.look==="handDrawn"){const L=Yt.svg(o),P=Vt(e,{}),j=L.path($o(N,O,T,E,e.rx||0),P),$=L.line(-g.width/2-w,-g.height/2-w+m.height+w,g.width/2+w,-g.height/2-w+m.height+w,P);A=o.insert(()=>(Tt.debug("Rough node insert CXC",j),$),":first-child"),B=o.insert(()=>(Tt.debug("Rough node insert CXC",j),j),":first-child")}else B=c.insert("rect",":first-child"),A=c.insert("line"),B.attr("class","outer title-state").attr("style",n).attr("x",-g.width/2-w).attr("y",-g.height/2-w).attr("width",g.width+(e.padding||0)).attr("height",g.height+(e.padding||0)),A.attr("class","divider").attr("x1",-g.width/2-w).attr("x2",g.width/2+w).attr("y1",-g.height/2-w+m.height+w).attr("y2",-g.height/2-w+m.height+w);return Qt(e,B),e.intersect=function(L){return qt.rect(e,L)},o}M(n3,"rectWithTitle");async function a3(r,e,{config:{themeVariables:i}}){const n=(i==null?void 0:i.radius)??5,a={rx:n,ry:n,labelPaddingX:((e==null?void 0:e.padding)??0)*1,labelPaddingY:((e==null?void 0:e.padding)??0)*1};return Vd(r,e,a)}M(a3,"roundedRect");var al=8;async function s3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.look==="neo"?16:e.padding??0,o=e.look==="neo"?12:e.padding??0,{shapeSvg:c,bbox:h,label:u}=await fe(r,e,he(e)),d=((e==null?void 0:e.width)??h.width)+a*2+(e.look==="neo"?al:al*2),f=((e==null?void 0:e.height)??h.height)+o*2,g=d-al,b=f,m=al-d/2,v=-f/2,{cssStyles:_}=e,C=Yt.svg(c),w=Vt(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const T=[{x:m,y:v},{x:m+g,y:v},{x:m+g,y:v+b},{x:m-al,y:v+b},{x:m-al,y:v},{x:m,y:v},{x:m,y:v+b}],E=C.polygon(T.map(O=>[O.x,O.y]),w),N=c.insert(()=>E,":first-child");return N.attr("class","basic label-container outer-path").attr("style",gi(_)),n&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",n),_&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",n),u.attr("transform",`translate(${al/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Qt(e,N),e.intersect=function(O){return qt.rect(e,O)},c}M(s3,"shadedProcess");async function o3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;(e.width||e.height)&&(e.width=Math.max(((e==null?void 0:e.width)??0)-o*2,10),e.height=Math.max(((e==null?void 0:e.height)??0)/1.5-c*2,10));const{shapeSvg:h,bbox:u,label:d}=await fe(r,e,he(e)),f=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2,g=((e!=null&&e.height?e==null?void 0:e.height:u.height)+c*2)*1.5,b=f,m=g/1.5,v=-b/2,_=-m/2,{cssStyles:C}=e,w=Yt.svg(h),T=Vt(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const E=[{x:v,y:_},{x:v,y:_+m},{x:v+b,y:_+m},{x:v+b,y:_-m/2}],N=He(E),O=w.path(N,T),B=h.insert(()=>O,":first-child");return B.attr("class","basic label-container outer-path"),C&&e.look!=="handDrawn"&&B.selectChildren("path").attr("style",C),n&&e.look!=="handDrawn"&&B.selectChildren("path").attr("style",n),B.attr("transform",`translate(0, ${m/4})`),d.attr("transform",`translate(${-b/2+(e.padding??0)-(u.x-(u.left??0))}, ${-m/4+(e.padding??0)-(u.y-(u.top??0))})`),Qt(e,B),e.intersect=function(A){return qt.polygon(e,E,A)},h}M(o3,"slopedRect");async function l3(r,e){const i=e.padding??0,n=e.look==="neo"?16:i*2,a=e.look==="neo"?12:i,o={rx:0,ry:0,labelPaddingX:e.labelPaddingX??n,labelPaddingY:a};return Vd(r,e,o)}M(l3,"squareRect");async function c3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?20:a,c=e.look==="neo"?12:a,{shapeSvg:h,bbox:u}=await fe(r,e,he(e)),d=u.height+(e.look==="neo"?c*2:c),f=u.width+d/4+(e.look==="neo"?o*2:o),g=d/2,{cssStyles:b}=e,m=Yt.svg(h),v=Vt(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const _=[{x:-f/2+g,y:-d/2},{x:f/2-g,y:-d/2},...Td(-f/2+g,0,g,50,90,270),{x:f/2-g,y:d/2},...Td(f/2-g,0,g,50,270,450)],C=He(_),w=m.path(C,v),T=h.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",b),n&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),Qt(e,T),e.intersect=function(E){return qt.polygon(e,_,E)},h}M(c3,"stadium");async function h3(r,e){const i={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5};return Vd(r,e,i)}M(h3,"state");function u3(r,e,{config:{themeVariables:i}}){var T,E;const{labelStyles:n,nodeStyles:a}=Kt(e);e.labelStyle=n;const{cssStyles:o}=e,{lineColor:c,stateBorder:h,nodeBorder:u,nodeShadow:d}=i;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const f=r.insert("g").attr("class","node default").attr("id",e.domId??e.id),g=Yt.svg(f),b=Vt(e,{});e.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const m=g.circle(0,0,e.width,{...b,stroke:c,strokeWidth:2}),v=h??u,_=(e.width??0)*5/14,C=g.circle(0,0,_,{...b,fill:v,stroke:v,strokeWidth:2,fillStyle:"solid"}),w=f.insert(()=>m,":first-child");if(w.insert(()=>C),e.look!=="handDrawn"&&w.attr("class","outer-path"),o&&w.selectAll("path").attr("style",o),a&&w.selectAll("path").attr("style",a),e.width<25&&d&&e.look!=="handDrawn"){const N=((E=(T=r.node())==null?void 0:T.ownerSVGElement)==null?void 0:E.id)??"",O=N?`${N}-drop-shadow-small`:"drop-shadow-small";w.attr("style",`filter:url(#${O})`)}return Qt(e,w),e.intersect=function(N){return qt.circle(e,(e.width??0)/2,N)},f}M(u3,"stateEnd");function d3(r,e,{config:{themeVariables:i}}){var h,u;const{lineColor:n,nodeShadow:a}=i;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const o=r.insert("g").attr("class","node default").attr("id",e.domId||e.id);let c;if(e.look==="handDrawn"){const f=Yt.svg(o).circle(0,0,e.width,rG(n));c=o.insert(()=>f),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else c=o.insert("circle",":first-child"),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&a&&e.look!=="handDrawn"){const d=((u=(h=r.node())==null?void 0:h.ownerSVGElement)==null?void 0:u.id)??"",f=d?`${d}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${f})`)}return Qt(e,c),e.intersect=function(d){return qt.circle(e,(e.width??7)/2,d)},o}M(d3,"stateStart");var Ac=8;async function f3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=(e==null?void 0:e.padding)??8,o=e.look==="neo"?28:a,c=e.look==="neo"?12:a,{shapeSvg:h,bbox:u}=await fe(r,e,he(e)),d=((e==null?void 0:e.width)??u.width)+2*Ac+o,f=((e==null?void 0:e.height)??u.height)+c,g=d-2*Ac,b=f,m=-d/2,v=-f/2,_=[{x:0,y:0},{x:g,y:0},{x:g,y:-b},{x:0,y:-b},{x:0,y:0},{x:-8,y:0},{x:g+8,y:0},{x:g+8,y:-b},{x:-8,y:-b},{x:-8,y:0}];if(e.look==="handDrawn"){const C=Yt.svg(h),w=Vt(e,{}),T=C.rectangle(m,v,g+16,b,w),E=C.line(m+Ac,v,m+Ac,v+b,w),N=C.line(m+Ac+g,v,m+Ac+g,v+b,w);h.insert(()=>E,":first-child"),h.insert(()=>N,":first-child");const O=h.insert(()=>T,":first-child"),{cssStyles:B}=e;O.attr("class","basic label-container").attr("style",gi(B)),Qt(e,O)}else{const C=$s(h,g,b,_);n&&C.attr("style",n),Qt(e,C)}return e.intersect=function(C){return qt.polygon(e,_,C)},h}M(f3,"subroutine");var tb=.2;async function p3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;(e.width||e.height)&&(e.height=Math.max(((e==null?void 0:e.height)??0)-c*2,10),e.width=Math.max(((e==null?void 0:e.width)??0)-o*2-tb*(e.height+c*2),10));const{shapeSvg:h,bbox:u}=await fe(r,e,he(e)),d=(e!=null&&e.height?e==null?void 0:e.height:u.height)+c*2,f=tb*d,g=tb*d,m=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2+f-f,v=d,_=-m/2,C=-v/2,{cssStyles:w}=e,T=Yt.svg(h),E=Vt(e,{}),N=[{x:_-f/2,y:C},{x:_+m+f/2,y:C},{x:_+m+f/2,y:C+v},{x:_-f/2,y:C+v}],O=[{x:_+m-f/2,y:C+v},{x:_+m+f/2,y:C+v},{x:_+m+f/2,y:C+v-g}];e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const B=He(N),A=T.path(B,E),L=He(O),P=T.path(L,{...E,fillStyle:"solid"}),j=h.insert(()=>P,":first-child");return j.insert(()=>A,":first-child"),j.attr("class","basic label-container outer-path"),w&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",w),n&&e.look!=="handDrawn"&&j.selectAll("path").attr("style",n),Qt(e,j),e.intersect=function($){return qt.polygon(e,N,$)},h}M(p3,"taggedRect");async function g3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,label:c}=await fe(r,e,he(e)),h=Math.max(o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),u=Math.max(o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),d=u/8,f=.2*h,g=.2*u,b=u+d,{cssStyles:m}=e,v=Yt.svg(a),_=Vt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const C=[{x:-h/2-h/2*.1,y:b/2},...jo(-h/2-h/2*.1,b/2,h/2+h/2*.1,b/2,d,.8),{x:h/2+h/2*.1,y:-b/2},{x:-h/2-h/2*.1,y:-b/2}],w=-h/2+h/2*.1,T=-b/2-g*.4,E=[{x:w+h-f,y:(T+u)*1.3},{x:w+h,y:T+u-g},{x:w+h,y:(T+u)*.9},...jo(w+h,(T+u)*1.25,w+h-f,(T+u)*1.3,-u*.02,.5)],N=He(C),O=v.path(N,_),B=He(E),A=v.path(B,{..._,fillStyle:"solid"}),L=a.insert(()=>A,":first-child");return L.insert(()=>O,":first-child"),L.attr("class","basic label-container outer-path"),m&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",n),L.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-h/2+(e.padding??0)-(o.x-(o.left??0))},${-u/2+(e.padding??0)-d/2-(o.y-(o.top??0))})`),Qt(e,L),e.intersect=function(P){return qt.polygon(e,C,P)},a}M(g3,"taggedWaveEdgedRectangle");async function m3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const{shapeSvg:a,bbox:o}=await fe(r,e,he(e)),c=Math.max(o.width+(e.padding??0),(e==null?void 0:e.width)||0),h=Math.max(o.height+(e.padding??0),(e==null?void 0:e.height)||0),u=-c/2,d=-h/2,f=a.insert("rect",":first-child");return f.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",u).attr("y",d).attr("width",c).attr("height",h),Qt(e,f),e.intersect=function(g){return qt.rect(e,g)},a}M(m3,"text");var VW=M((r,e,i,n,a,o)=>`M${r},${e}
334
+ a${a},${o} 0,0,1 0,${-n}
335
+ l${i},0
336
+ a${a},${o} 0,0,1 0,${n}
337
+ M${i},${-n}
338
+ a${a},${o} 0,0,0 0,${n}
339
+ l${-i},0`,"createCylinderPathD"),KW=M((r,e,i,n,a,o)=>[`M${r},${e}`,`M${r+i},${e}`,`a${a},${o} 0,0,0 0,${-n}`,`l${-i},0`,`a${a},${o} 0,0,0 0,${n}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),XW=M((r,e,i,n,a,o)=>[`M${r+i/2},${-n/2}`,`a${a},${o} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD"),FT=5,jT=10;async function y3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?12:a/2;if(e.width||e.height){const _=e.height??0;e.height=(e.height??0)-o,e.height<FT&&(e.height=FT);const w=_/2/(2.5+_/50);e.width=(e.width??0)-o-w*3,e.width<jT&&(e.width=jT)}const{shapeSvg:c,bbox:h,label:u}=await fe(r,e,he(e)),d=(e.height?e.height:h.height)+o,f=d/2,g=f/(2.5+d/50),b=(e.width?e.width:h.width)+g+o,{cssStyles:m}=e;let v;if(e.look==="handDrawn"){const _=Yt.svg(c),C=KW(0,0,b,d,g,f),w=XW(0,0,b,d,g,f),T=_.path(C,Vt(e,{})),E=_.path(w,Vt(e,{fill:"none"}));v=c.insert(()=>E,":first-child"),v=c.insert(()=>T,":first-child"),v.attr("class","basic label-container"),m&&v.attr("style",m)}else{const _=VW(0,0,b,d,g,f);v=c.insert("path",":first-child").attr("d",_).attr("class","basic label-container").attr("style",gi(m)).attr("style",n),v.attr("class","basic label-container outer-path"),m&&v.selectAll("path").attr("style",m),n&&v.selectAll("path").attr("style",n)}return v.attr("label-offset-x",g),v.attr("transform",`translate(${-b/2}, ${d/2} )`),u.attr("transform",`translate(${-(h.width/2)-g-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Qt(e,v),e.intersect=function(_){const C=qt.rect(e,_),w=C.y-(e.y??0);if(f!=0&&(Math.abs(w)<(e.height??0)/2||Math.abs(w)==(e.height??0)/2&&Math.abs(C.x-(e.x??0))>(e.width??0)/2-g)){let T=g*g*(1-w*w/(f*f));T!=0&&(T=Math.sqrt(Math.abs(T))),T=g-T,_.x-(e.x??0)>0&&(T=-T),C.x+=T}return C},c}M(y3,"tiltedCylinder");async function b3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=(e.look==="neo",a),c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await fe(r,e,he(e)),d=((e==null?void 0:e.height)??u.height)+o,f=((e==null?void 0:e.width)??u.width)+c,g=[{x:-3*d/6,y:0},{x:f+3*d/6,y:0},{x:f,y:-d},{x:0,y:-d}];let b;const{cssStyles:m}=e;if(e.look==="handDrawn"){const v=Yt.svg(h),_=Vt(e,{}),C=He(g),w=v.path(C,_);b=h.insert(()=>w,":first-child").attr("transform",`translate(${-f/2}, ${d/2})`),m&&b.attr("style",m)}else b=$s(h,f,d,g);return n&&b.attr("style",n),e.width=f,e.height=d,Qt(e,b),e.intersect=function(v){return qt.polygon(e,g,v)},h}M(b3,"trapezoid");async function x3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=15,u=5;(e.width||e.height)&&(e.height=(e.height??0)-c*2,e.height<u&&(e.height=u),e.width=(e.width??0)-o*2,e.width<h&&(e.width=h));const{shapeSvg:d,bbox:f}=await fe(r,e,he(e)),g=(e!=null&&e.width?e==null?void 0:e.width:f.width)+o*2,b=(e!=null&&e.height?e==null?void 0:e.height:f.height)+c*2,{cssStyles:m}=e,v=Yt.svg(d),_=Vt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const C=[{x:-g/2*.8,y:-b/2},{x:g/2*.8,y:-b/2},{x:g/2,y:-b/2*.6},{x:g/2,y:b/2},{x:-g/2,y:b/2},{x:-g/2,y:-b/2*.6}],w=He(C),T=v.path(w,_),E=d.insert(()=>T,":first-child");return E.attr("class","basic label-container outer-path"),m&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",m),n&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",n),Qt(e,E),e.intersect=function(N){return qt.polygon(e,C,N)},d}M(x3,"trapezoidalPentagon");var IT=10,$T=10;async function v3(r,e){var N;const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?a*2:a;(e.width||e.height)&&(e.width=(((e==null?void 0:e.width)??0)-o)/2,e.width<$T&&(e.width=$T),e.height=(e==null?void 0:e.height)??0,e.height<IT&&(e.height=IT));const{shapeSvg:c,bbox:h,label:u}=await fe(r,e,he(e)),d=Fs((N=Ke().flowchart)==null?void 0:N.htmlLabels),f=(e!=null&&e.width?e==null?void 0:e.width:h.width)+o,g=e!=null&&e.height?e==null?void 0:e.height:f+h.height,b=g,m=[{x:0,y:0},{x:b,y:0},{x:b/2,y:-g}],{cssStyles:v}=e,_=Yt.svg(c),C=Vt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=He(m),T=_.path(w,C),E=c.insert(()=>T,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`).attr("class","outer-path");return v&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",v),n&&e.look!=="handDrawn"&&E.selectChildren("path").attr("style",n),e.width=f,e.height=g,Qt(e,E),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${g/2-(h.height+(e.padding??0)/(d?2:1)-(h.y-(h.top??0)))})`),e.intersect=function(O){return Tt.info("Triangle intersect",e,m,O),qt.polygon(e,m,O)},c}M(v3,"triangle");async function _3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;let h=!0;(e.width||e.height)&&(h=!1,e.width=((e==null?void 0:e.width)??0)-o*2,e.width<10&&(e.width=10),e.height=((e==null?void 0:e.height)??0)-c*2,e.height<10&&(e.height=10));const{shapeSvg:u,bbox:d,label:f}=await fe(r,e,he(e)),g=(e!=null&&e.width?e==null?void 0:e.width:d.width)+(o??0)*2,b=(e!=null&&e.height?e==null?void 0:e.height:d.height)+(c??0)*2,m=e.look==="neo"?b/4:b/8,v=b+(h?m:-m),{cssStyles:_}=e,w=14-g,T=w>0?w/2:0,E=Yt.svg(u),N=Vt(e,{});e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const O=[{x:-g/2-T,y:v/2},...jo(-g/2-T,v/2,g/2+T,v/2,m,.8),{x:g/2+T,y:-v/2},{x:-g/2-T,y:-v/2}],B=He(O),A=E.path(B,N),L=u.insert(()=>A,":first-child");return L.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",_),n&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",n),L.attr("transform",`translate(0,${-m/2})`),f.attr("transform",`translate(${-g/2+(e.padding??0)-(d.x-(d.left??0))},${-b/2+(e.padding??0)-m-(d.y-(d.top??0))})`),Qt(e,L),e.intersect=function(P){return qt.polygon(e,O,P)},u}M(_3,"waveEdgedRectangle");async function C3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?20:a;if(e.width||e.height){e.width=(e==null?void 0:e.width)??0,e.width<20&&(e.width=20),e.height=(e==null?void 0:e.height)??0,e.height<10&&(e.height=10);const N=Math.min(e.height*.2,e.height/4);e.height=Math.ceil(e.height-c-N*(20/9)),e.width=e.width-o*2}const{shapeSvg:h,bbox:u}=await fe(r,e,he(e)),d=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2,f=(e!=null&&e.height?e==null?void 0:e.height:u.height)+c,g=f/8,b=f+g*2,{cssStyles:m}=e,v=Yt.svg(h),_=Vt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const C=[{x:-d/2,y:b/2},...jo(-d/2,b/2,d/2,b/2,g,1),{x:d/2,y:-b/2},...jo(d/2,-b/2,-d/2,-b/2,g,-1)],w=He(C),T=v.path(w,_),E=h.insert(()=>T,":first-child");return E.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),Qt(e,E),e.intersect=function(N){return qt.polygon(e,C,N)},h}M(C3,"waveRectangle");var Ir=10;async function k3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e.look==="neo"?16:e.padding??0,o=e.look==="neo"?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max(((e==null?void 0:e.width)??0)-a*2-Ir,10),e.height=Math.max(((e==null?void 0:e.height)??0)-o*2-Ir,10));const{shapeSvg:c,bbox:h,label:u}=await fe(r,e,he(e)),d=(e!=null&&e.width?e==null?void 0:e.width:h.width)+a*2+Ir,f=(e!=null&&e.height?e==null?void 0:e.height:h.height)+o*2+Ir,g=d-Ir,b=f-Ir,m=-g/2,v=-b/2,{cssStyles:_}=e,C=Yt.svg(c),w=Vt(e,{}),T=[{x:m-Ir,y:v-Ir},{x:m-Ir,y:v+b},{x:m+g,y:v+b},{x:m+g,y:v-Ir}],E=`M${m-Ir},${v-Ir} L${m+g},${v-Ir} L${m+g},${v+b} L${m-Ir},${v+b} L${m-Ir},${v-Ir}
340
+ M${m-Ir},${v} L${m+g},${v}
341
+ M${m},${v-Ir} L${m},${v+b}`;e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const N=C.path(E,w),O=c.insert(()=>N,":first-child");return O.attr("transform",`translate(${Ir/2}, ${Ir/2})`),O.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",_),n&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",n),u.attr("transform",`translate(${-(h.width/2)+Ir/2-(h.x-(h.left??0))}, ${-(h.height/2)+Ir/2-(h.y-(h.top??0))})`),Qt(e,O),e.intersect=function(B){return qt.polygon(e,T,B)},c}M(k3,"windowPane");var zT=new Set(["redux-color","redux-dark-color"]),ZW=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function k_(r,e){var kt,Mt,it,xt;const i=e;i.alias&&(e.label=i.alias);const{theme:n,themeVariables:a}=Lr(),{rowEven:o,rowOdd:c,nodeBorder:h,borderColorArray:u}=a;if(e.look==="handDrawn"){const{themeVariables:pt}=Lr(),{background:Et}=pt,Ut={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Et}`]};await k_(r,Ut)}const d=Lr();e.useHtmlLabels=d.htmlLabels;let f=((kt=d.er)==null?void 0:kt.diagramPadding)??10,g=((Mt=d.er)==null?void 0:Mt.entityPadding)??6;const{cssStyles:b}=e,{labelStyles:m,nodeStyles:v}=Kt(e);if(i.attributes.length===0&&e.label){const pt={rx:0,ry:0,labelPaddingX:f,labelPaddingY:f*1.5};Ds(e.label,d)+pt.labelPaddingX*2<d.er.minEntityWidth&&(e.width=d.er.minEntityWidth);const Et=await Vd(r,e,pt);if(n!=null&&zT.has(n)){const Ut=i.colorIndex??0;Et.attr("data-color-id",`color-${Ut%u.length}`)}if(!Fs(d.htmlLabels)){const Ut=Et.select("text"),Gt=(it=Ut.node())==null?void 0:it.getBBox();Ut.attr("transform",`translate(${-Gt.width/2}, 0)`)}return Et}d.htmlLabels||(f*=1.25,g*=1.25);let _=he(e);_||(_="node default");const C=r.insert("g").attr("class",_).attr("id",e.domId||e.id),w=await Rc(C,e.label??"",d,0,0,["name"],m);w.height+=g;let T=0;const E=[],N=[];let O=0,B=0,A=0,L=0,P=!0,j=!0;for(const pt of i.attributes){const Et=await Rc(C,pt.type,d,0,T,["attribute-type"],m);O=Math.max(O,Et.width+f);const Ut=await Rc(C,pt.name,d,0,T,["attribute-name"],m);B=Math.max(B,Ut.width+f);const Gt=await Rc(C,pt.keys.join(),d,0,T,["attribute-keys"],m);A=Math.max(A,Gt.width+f);const ie=await Rc(C,pt.comment,d,0,T,["attribute-comment"],m);L=Math.max(L,ie.width+f);const Dt=Math.max(Et.height,Ut.height,Gt.height,ie.height)+g;N.push({yOffset:T,rowHeight:Dt}),T+=Dt}let $=4;A<=f&&(P=!1,A=0,$--),L<=f&&(j=!1,L=0,$--);const X=C.node().getBBox();if(w.width+f*2-(O+B+A+L)>0){const pt=w.width+f*2-(O+B+A+L);O+=pt/$,B+=pt/$,A>0&&(A+=pt/$),L>0&&(L+=pt/$)}const W=O+B+A+L,F=Yt.svg(C),U=Vt(e,{});e.look!=="handDrawn"&&(U.roughness=0,U.fillStyle="solid");let D=0;N.length>0&&(D=N.reduce((pt,Et)=>pt+((Et==null?void 0:Et.rowHeight)??0),0));const z=Math.max(X.width+f*2,(e==null?void 0:e.width)||0,W),H=Math.max((D??0)+w.height,(e==null?void 0:e.height)||0),V=-z/2,Q=-H/2;if(C.selectAll("g:not(:first-child)").each((pt,Et,Ut)=>{const Gt=ce(Ut[Et]),ie=Gt.attr("transform");let Dt=0,Jt=0;if(ie){const hr=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ie);hr&&(Dt=parseFloat(hr[1]),Jt=parseFloat(hr[2]),Gt.attr("class").includes("attribute-name")?Dt+=O:Gt.attr("class").includes("attribute-keys")?Dt+=O+B:Gt.attr("class").includes("attribute-comment")&&(Dt+=O+B+A))}Gt.attr("transform",`translate(${V+f/2+Dt}, ${Jt+Q+w.height+g/2})`)}),C.select(".name").attr("transform","translate("+-w.width/2+", "+(Q+g/2)+")"),n!=null&&zT.has(n)){const pt=i.colorIndex??0;C.attr("data-color-id",`color-${pt%u.length}`)}const G=F.rectangle(V,Q,z,H,U),J=C.insert(()=>G,":first-child").attr("class","outer-path").attr("style",b.join(""));E.push(0);for(const[pt,Et]of N.entries()){const Gt=(pt+1)%2===0&&Et.yOffset!==0,ie=F.rectangle(V,w.height+Q+(Et==null?void 0:Et.yOffset),z,Et==null?void 0:Et.rowHeight,{...U,fill:Gt?o:c,stroke:h});C.insert(()=>ie,"g.label").attr("style",b.join("")).attr("class",`row-rect-${Gt?"even":"odd"}`)}const lt=1e-4;let st=Dc(V,w.height+Q,z+V,w.height+Q,lt),vt=F.polygon(st.map(pt=>[pt.x,pt.y]),U);if(C.insert(()=>vt).attr("class","divider"),st=Dc(O+V,w.height+Q,O+V,H+Q,lt),vt=F.polygon(st.map(pt=>[pt.x,pt.y]),U),C.insert(()=>vt).attr("class","divider"),P){const pt=O+B+V;st=Dc(pt,w.height+Q,pt,H+Q,lt),vt=F.polygon(st.map(Et=>[Et.x,Et.y]),U),C.insert(()=>vt).attr("class","divider")}if(j){const pt=O+B+A+V;st=Dc(pt,w.height+Q,pt,H+Q,lt),vt=F.polygon(st.map(Et=>[Et.x,Et.y]),U),C.insert(()=>vt).attr("class","divider")}for(const pt of E){const Et=w.height+Q+pt;st=Dc(V,Et,z+V,Et,lt),vt=F.polygon(st.map(Ut=>[Ut.x,Ut.y]),U),C.insert(()=>vt).attr("class","divider")}if(Qt(e,J),v&&e.look!=="handDrawn")if(n!=null&&ZW.has(n))C.selectAll("path").attr("style",v);else{const pt=v.split(";"),Et=(xt=pt==null?void 0:pt.filter(Ut=>Ut.includes("stroke")))==null?void 0:xt.map(Ut=>`${Ut}`).join("; ");C.selectAll("path").attr("style",Et??""),C.selectAll(".row-rect-even path").attr("style",v)}return e.intersect=function(pt){return qt.rect(e,pt)},C}M(k_,"erBox");async function Rc(r,e,i,n=0,a=0,o=[],c=""){const h=r.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${n}, ${a})`).attr("style",c);e!==dS(e)&&(e=dS(e),e=e.replaceAll("<","&lt;").replaceAll(">","&gt;"));const u=h.node().appendChild(await Is(h,e,{width:Ds(e,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(e.includes("&lt;")||e.includes("&gt;")){let f=u.children[0];for(f.textContent=f.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");f.childNodes[0];)f=f.childNodes[0],f.textContent=f.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let d=u.getBBox();if(Fs(i.htmlLabels)){const f=u.children[0];f.style.textAlign="start";const g=ce(u);d=f.getBoundingClientRect(),g.attr("width",d.width),g.attr("height",d.height)}return d}M(Rc,"addText");function Dc(r,e,i,n,a){return r===i?[{x:r-a/2,y:e},{x:r+a/2,y:e},{x:i+a/2,y:n},{x:i-a/2,y:n}]:[{x:r,y:e-a/2},{x:r,y:e+a/2},{x:i,y:n+a/2},{x:i,y:n-a/2}]}M(Dc,"lineToPolygon");async function w3(r,e,i,n,a=i.class.padding??12){const o=n?0:3,c=r.insert("g").attr("class",he(e)).attr("id",e.domId||e.id);let h=null,u=null,d=null,f=null,g=0,b=0,m=0;if(h=c.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const T=e.annotations[0];await Xu(h,{text:`«${T}»`},0),g=h.node().getBBox().height}u=c.insert("g").attr("class","label-group text"),await Xu(u,e,0,["font-weight: bolder"]);const v=u.node().getBBox();b=v.height,d=c.insert("g").attr("class","members-group text");let _=0;for(const T of e.members){const E=await Xu(d,T,_,[T.parseClassifier()]);_+=E+o}m=d.node().getBBox().height,m<=0&&(m=a/2),f=c.insert("g").attr("class","methods-group text");let C=0;for(const T of e.methods){const E=await Xu(f,T,C,[T.parseClassifier()]);C+=E+o}let w=c.node().getBBox();if(h!==null){const T=h.node().getBBox();h.attr("transform",`translate(${-T.width/2})`)}return u.attr("transform",`translate(${-v.width/2}, ${g})`),w=c.node().getBBox(),d.attr("transform",`translate(0, ${g+b+a*2})`),w=c.node().getBBox(),f.attr("transform",`translate(0, ${g+b+(m?m+a*4:a*2)})`),w=c.node().getBBox(),{shapeSvg:c,bbox:w}}M(w3,"textHelper");async function Xu(r,e,i,n=[]){const a=r.insert("g").attr("class","label").attr("style",n.join("; ")),o=Lr();let c="useHtmlLabels"in e?e.useHtmlLabels:Fs(o.htmlLabels)??!0,h="";"text"in e?h=e.text:h=e.label,!c&&h.startsWith("\\")&&(h=h.substring(1)),pd(h)&&(c=!0);const u=await Is(a,A1(Il(h)),{width:Ds(h,o)+50,classes:"markdown-node-label",useHtmlLabels:c},o);let d,f=1;if(c){const g=u.children[0],b=ce(u);f=g.innerHTML.split("<br>").length,g.innerHTML.includes("</math>")&&(f+=g.innerHTML.split("<mrow>").length-1);const m=g.getElementsByTagName("img");if(m){const v=h.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(_=>new Promise(C=>{function w(){var T;if(_.style.display="flex",_.style.flexDirection="column",v){const E=((T=o.fontSize)==null?void 0:T.toString())??window.getComputedStyle(document.body).fontSize,O=parseInt(E,10)*5+"px";_.style.minWidth=O,_.style.maxWidth=O}else _.style.width="100%";C(_)}M(w,"setupImage"),setTimeout(()=>{_.complete&&w()}),_.addEventListener("error",w),_.addEventListener("load",w)})))}d=g.getBoundingClientRect(),b.attr("width",d.width),b.attr("height",d.height)}else{n.includes("font-weight: bolder")&&ce(u).selectAll("tspan").attr("font-weight",""),f=u.children.length;const g=u.children[0];(u.textContent===""||u.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=u.getBBox()}return a.attr("transform","translate(0,"+(-d.height/(2*f)+i)+")"),d.height}M(Xu,"addText");async function S3(r,e){var F,U;const i=Ke(),{themeVariables:n}=i,{useGradient:a}=n,o=i.class.padding??12,c=o,h=e.useHtmlLabels??Fs(i.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];const{shapeSvg:d,bbox:f}=await w3(r,e,i,h,c),{labelStyles:g,nodeStyles:b}=Kt(e);e.labelStyle=g,e.cssStyles=u.styles||"";const m=((F=u.styles)==null?void 0:F.join(";"))||b||"";e.cssStyles||(e.cssStyles=m.replaceAll("!important","").split(";"));const v=u.members.length===0&&u.methods.length===0&&!((U=i.class)!=null&&U.hideEmptyMembersBox),_=Yt.svg(d),C=Vt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=Math.max(e.width??0,f.width);let T=Math.max(e.height??0,f.height);const E=(e.height??0)>f.height;u.members.length===0&&u.methods.length===0?T+=c:u.members.length>0&&u.methods.length===0&&(T+=c*2);const N=-w/2,O=-T/2;let B=v?o*2:u.members.length===0&&u.methods.length===0?-o:0;E&&(B=o*2);const A=_.rectangle(N-o,O-o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0),w+2*o,T+2*o+B,C),L=d.insert(()=>A,":first-child");L.attr("class","basic label-container outer-path");const P=L.node().getBBox(),j=d.select(".annotation-group").node().getBBox().height-(v?o/2:0)||0,$=d.select(".label-group").node().getBBox().height-(v?o/2:0)||0,X=d.select(".members-group").node().getBBox().height-(v?o/2:0)||0,W=(j+$+O+o-(O-o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0)))/2;if(d.selectAll(".text").each((D,z,H)=>{var st,vt;const V=ce(H[z]),Q=V.attr("transform");let G=0;if(Q){const Mt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Q);Mt&&(G=parseFloat(Mt[2]))}let J=G+O+o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0);if(V.attr("class").includes("methods-group")){const kt=Math.max(X,c/2);E?J=Math.max(W,j+$+kt+O+c*2+o)+c*2:J=j+$+kt+O+c*4+o}u.members.length===0&&u.methods.length===0&&((st=i.class)!=null&&st.hideEmptyMembersBox)&&(u.annotations.length>0?J=G-c:J=G),h||(J-=4);let lt=N;(V.attr("class").includes("label-group")||V.attr("class").includes("annotation-group"))&&(lt=-((vt=V.node())==null?void 0:vt.getBBox().width)/2||0,d.selectAll("text").each(function(kt,Mt,it){window.getComputedStyle(it[Mt]).textAnchor==="middle"&&(lt=0)})),V.attr("transform",`translate(${lt}, ${J})`)}),u.members.length>0||u.methods.length>0||v){const D=j+$+O+o,z=_.line(P.x,D,P.x+P.width,D+.001,C);d.insert(()=>z).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",m)}if(v||u.members.length>0||u.methods.length>0){const D=j+$+X+O+c*2+o,z=_.line(P.x,E?Math.max(W,D):D,P.x+P.width,(E?Math.max(W,D):D)+.001,C);d.insert(()=>z).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",m)}if(u.look!=="handDrawn"&&d.selectAll("path").attr("style",m),L.select(":nth-child(2)").attr("style",m),d.selectAll(".divider").select("path").attr("style",m),e.labelStyle?d.selectAll("span").attr("style",e.labelStyle):d.selectAll("span").attr("style",m),!h){const D=RegExp(/color\s*:\s*([^;]*)/),z=D.exec(m);if(z){const H=z[0].replace("color","fill");d.selectAll("tspan").attr("style",H)}else if(g){const H=D.exec(g);if(H){const V=H[0].replace("color","fill");d.selectAll("tspan").attr("style",V)}}}return Qt(e,L),e.intersect=function(D){return qt.rect(e,D)},d}M(S3,"classBox");async function T3(r,e){var P,j;const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const a=e,o=e,c=20,h=20,u="verifyMethod"in e,d=he(e),{themeVariables:f}=Ke(),{borderColorArray:g,requirementEdgeLabelBackground:b}=f,m=r.insert("g").attr("class",d).attr("id",e.domId??e.id);let v;u?v=await Da(m,`&lt;&lt;${a.type}&gt;&gt;`,0,e.labelStyle):v=await Da(m,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let _=v;const C=await Da(m,a.name,_,e.labelStyle+"; font-weight: bold;");if(_+=C+h,u){const $=await Da(m,`${a.requirementId?`ID: ${a.requirementId}`:""}`,_,e.labelStyle);_+=$;const X=await Da(m,`${a.text?`Text: ${a.text}`:""}`,_,e.labelStyle);_+=X;const W=await Da(m,`${a.risk?`Risk: ${a.risk}`:""}`,_,e.labelStyle);_+=W,await Da(m,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,_,e.labelStyle)}else{const $=await Da(m,`${o.type?`Type: ${o.type}`:""}`,_,e.labelStyle);_+=$,await Da(m,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,_,e.labelStyle)}const w=(((P=m.node())==null?void 0:P.getBBox().width)??200)+c,T=(((j=m.node())==null?void 0:j.getBBox().height)??200)+c,E=-w/2,N=-T/2,O=Yt.svg(m),B=Vt(e,{});e.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const A=O.rectangle(E,N,w,T,B),L=m.insert(()=>A,":first-child");if(L.attr("class","basic label-container outer-path").attr("style",n),g!=null&&g.length){const $=e.colorIndex??0;m.attr("data-color-id",`color-${$%g.length}`)}if(m.selectAll(".label").each(($,X,W)=>{const F=ce(W[X]),U=F.attr("transform");let D=0,z=0;if(U){const G=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(U);G&&(D=parseFloat(G[1]),z=parseFloat(G[2]))}const H=z-T/2;let V=E+c/2;(X===0||X===1)&&(V=D),F.attr("transform",`translate(${V}, ${H+c})`)}),_>v+C+h){const $=N+v+C+h;let X;if(e.look==="neo"){const U=[[E,$],[E+w,$],[E+w,$+.001],[E,$+.001]];X=O.polygon(U,B)}else X=O.line(E,$,E+w,$,B);m.insert(()=>X).attr("class","divider")}return Qt(e,L),e.intersect=function($){return qt.rect(e,$)},n&&e.look!=="handDrawn"&&(b||g!=null&&g.length)&&m.selectAll("path").attr("style",n),m}M(T3,"requirementBox");async function Da(r,e,i,n=""){if(e==="")return 0;const a=r.insert("g").attr("class","label").attr("style",n),o=Ke(),c=o.htmlLabels??!0,h=await Is(a,A1(Il(e)),{width:Ds(e,o)+50,classes:"markdown-node-label",useHtmlLabels:c,style:n},o);let u;if(c){const d=h.children[0],f=ce(h);u=d.getBoundingClientRect(),f.attr("width",u.width),f.attr("height",u.height)}else{const d=h.children[0];for(const f of d.children)n&&f.setAttribute("style",n);u=h.getBBox(),u.height+=6}return a.attr("transform",`translate(${-u.width/2},${-u.height/2+i})`),u.height}M(Da,"addText");var QW=M(r=>{switch(r){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 E3(r,e,{config:i}){var X,W;const{labelStyles:n,nodeStyles:a}=Kt(e);e.labelStyle=n||"";const o=10,c=e.width;e.width=(e.width??200)-10;const{shapeSvg:h,bbox:u,label:d}=await fe(r,e,he(e)),f=e.padding||10;let g="",b;"ticket"in e&&e.ticket&&((X=i==null?void 0:i.kanban)!=null&&X.ticketBaseUrl)&&(g=(W=i==null?void 0:i.kanban)==null?void 0:W.ticketBaseUrl.replace("#TICKET#",e.ticket),b=h.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",g).attr("target","_blank"));const m={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let v,_;b?{label:v,bbox:_}=await J0(b,"ticket"in e&&e.ticket||"",m):{label:v,bbox:_}=await J0(h,"ticket"in e&&e.ticket||"",m);const{label:C,bbox:w}=await J0(h,"assigned"in e&&e.assigned||"",m);e.width=c;const T=10,E=(e==null?void 0:e.width)||0,N=Math.max(_.height,w.height)/2,O=Math.max(u.height+T*2,(e==null?void 0:e.height)||0)+N,B=-E/2,A=-O/2;d.attr("transform","translate("+(f-E/2)+", "+(-N-u.height/2)+")"),v.attr("transform","translate("+(f-E/2)+", "+(-N+u.height/2)+")"),C.attr("transform","translate("+(f+E/2-w.width-2*o)+", "+(-N+u.height/2)+")");let L;const{rx:P,ry:j}=e,{cssStyles:$}=e;if(e.look==="handDrawn"){const F=Yt.svg(h),U=Vt(e,{}),D=P||j?F.path($o(B,A,E,O,P||0),U):F.rectangle(B,A,E,O,U);L=h.insert(()=>D,":first-child"),L.attr("class","basic label-container").attr("style",$||null)}else{L=h.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",a).attr("rx",P??5).attr("ry",j??5).attr("x",B).attr("y",A).attr("width",E).attr("height",O);const F="priority"in e&&e.priority;if(F){const U=h.append("line"),D=B+2,z=A+Math.floor((P??0)/2),H=A+O-Math.floor((P??0)/2);U.attr("x1",D).attr("y1",z).attr("x2",D).attr("y2",H).attr("stroke-width","4").attr("stroke",QW(F))}}return Qt(e,L),e.height=O,e.intersect=function(F){return qt.rect(e,F)},h}M(E3,"kanbanItem");async function A3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await fe(r,e,he(e)),u=o.width+10*c,d=o.height+8*c,f=.15*u,{cssStyles:g}=e,b=o.width+20,m=o.height+20,v=Math.max(u,b),_=Math.max(d,m);h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let C;const w=`M0 0
342
+ a${f},${f} 1 0,0 ${v*.25},${-1*_*.1}
343
+ a${f},${f} 1 0,0 ${v*.25},0
344
+ a${f},${f} 1 0,0 ${v*.25},0
345
+ a${f},${f} 1 0,0 ${v*.25},${_*.1}
346
+
347
+ a${f},${f} 1 0,0 ${v*.15},${_*.33}
348
+ a${f*.8},${f*.8} 1 0,0 0,${_*.34}
349
+ a${f},${f} 1 0,0 ${-1*v*.15},${_*.33}
350
+
351
+ a${f},${f} 1 0,0 ${-1*v*.25},${_*.15}
352
+ a${f},${f} 1 0,0 ${-1*v*.25},0
353
+ a${f},${f} 1 0,0 ${-1*v*.25},0
354
+ a${f},${f} 1 0,0 ${-1*v*.25},${-1*_*.15}
355
+
356
+ a${f},${f} 1 0,0 ${-1*v*.1},${-1*_*.33}
357
+ a${f*.8},${f*.8} 1 0,0 0,${-1*_*.34}
358
+ a${f},${f} 1 0,0 ${v*.1},${-1*_*.33}
359
+ H0 V0 Z`;if(e.look==="handDrawn"){const T=Yt.svg(a),E=Vt(e,{}),N=T.path(w,E);C=a.insert(()=>N,":first-child"),C.attr("class","basic label-container").attr("style",gi(g))}else C=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",w);return C.attr("transform",`translate(${-v/2}, ${-_/2})`),Qt(e,C),e.calcIntersect=function(T,E){return qt.rect(T,E)},e.intersect=function(T){return Tt.info("Bang intersect",e,T),qt.rect(e,T)},a}M(A3,"bang");async function N3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await fe(r,e,he(e)),u=o.width+2*c,d=o.height+2*c,f=.15*u,g=.25*u,b=.35*u,m=.2*u,{cssStyles:v}=e;let _;const C=`M0 0
360
+ a${f},${f} 0 0,1 ${u*.25},${-1*u*.1}
361
+ a${b},${b} 1 0,1 ${u*.4},${-1*u*.1}
362
+ a${g},${g} 1 0,1 ${u*.35},${u*.2}
363
+
364
+ a${f},${f} 1 0,1 ${u*.15},${d*.35}
365
+ a${m},${m} 1 0,1 ${-1*u*.15},${d*.65}
366
+
367
+ a${g},${f} 1 0,1 ${-1*u*.25},${u*.15}
368
+ a${b},${b} 1 0,1 ${-1*u*.5},0
369
+ a${f},${f} 1 0,1 ${-1*u*.25},${-1*u*.15}
370
+
371
+ a${f},${f} 1 0,1 ${-1*u*.1},${-1*d*.35}
372
+ a${m},${m} 1 0,1 ${u*.1},${-1*d*.65}
373
+ H0 V0 Z`;if(e.look==="handDrawn"){const w=Yt.svg(a),T=Vt(e,{}),E=w.path(C,T);_=a.insert(()=>E,":first-child"),_.attr("class","basic label-container").attr("style",gi(v))}else _=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",C);return h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),_.attr("transform",`translate(${-u/2}, ${-d/2})`),Qt(e,_),e.calcIntersect=function(w,T){return qt.rect(w,T)},e.intersect=function(w){return Tt.info("Cloud intersect",e,w),qt.rect(e,w)},a}M(N3,"cloud");async function M3(r,e){const{labelStyles:i,nodeStyles:n}=Kt(e);e.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await fe(r,e,he(e)),u=o.width+8*c,d=o.height+2*c,f=5,g=e.look==="neo"?`
374
+ M${-u/2} ${d/2-f}
375
+ v${-d+2*f}
376
+ q0,-${f} ${f},-${f}
377
+ h${u-2*f}
378
+ q${f},0 ${f},${f}
379
+ v${d-f}
380
+ H${-u/2}
381
+ Z
382
+ `:`
383
+ M${-u/2} ${d/2-f}
384
+ v${-d+2*f}
385
+ q0,-${f} ${f},-${f}
386
+ h${u-2*f}
387
+ q${f},0 ${f},${f}
388
+ v${d-2*f}
389
+ q0,${f} ${-f},${f}
390
+ h${-(u-2*f)}
391
+ q${-f},0 ${-f},${-f}
392
+ Z
393
+ `;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);const b=a.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",n).attr("d",g);return a.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",d/2).attr("x2",u/2).attr("y2",d/2),h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.append(()=>h.node()),Qt(e,b),e.calcIntersect=function(m,v){return qt.rect(m,v)},e.intersect=function(m){return qt.rect(e,m)},a}M(M3,"defaultMindmapNode");async function B3(r,e){const i={padding:e.padding??0};return C_(r,e,i)}M(B3,"mindmapCircle");var JW=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:l3},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:a3},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:c3},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:f3},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:LR},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:C_},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:A3},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:N3},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:r3},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:$R},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:KR},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:VR},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:b3},{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:WR},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:RR},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:m3},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:wR},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:s3},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:d3},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:u3},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:jR},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:zR},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:AR},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:NR},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:MR},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:XR},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:_3},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:IR},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:y3},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:ZR},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:BR},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:OR},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:v3},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:k3},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:DR},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:x3},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:FR},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:o3},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:t3},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:JR},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:kR},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:ER},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:g3},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:p3},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:C3},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:i3},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:QR}],tY=M(()=>{const e=[...Object.entries({state:h3,choice:SR,note:e3,rectWithTitle:n3,labelRect:YR,iconSquare:HR,iconCircle:qR,icon:PR,iconRounded:UR,imageSquare:GR,anchor:_R,kanbanItem:E3,mindmapCircle:B3,defaultMindmapNode:M3,classBox:S3,erBox:k_,requirementBox:T3}),...JW.flatMap(i=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map(a=>[a,i.handler]))];return Object.fromEntries(e)},"generateShapeMap"),L3=tY();function eY(r){return r in L3}M(eY,"isValidShape");var mm=new Map;async function O3(r,e,i){let n,a;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const o=e.shape?L3[e.shape]:void 0;if(!o)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let c;i.config.securityLevel==="sandbox"?c="_top":e.linkTarget&&(c=e.linkTarget||"_blank"),n=r.insert("svg:a").attr("xlink:href",e.link).attr("target",c??null),a=await o(n,e,i)}else a=await o(r,e,i),n=a;return n.attr("data-look",gi(e.look)),e.tooltip&&a.attr("title",e.tooltip),mm.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}M(O3,"insertNode");var Pst=M((r,e)=>{mm.set(e.id,r)},"setNodeElem"),qst=M(()=>{mm.clear()},"clear"),Ust=M(r=>{const e=mm.get(r.id);Tt.trace("Transforming node",r.diff,r,"translate("+(r.x-r.width/2-5)+", "+r.width/2+")");const i=8,n=r.diff||0;return r.clusterNode?e.attr("transform","translate("+(r.x+n-r.width/2)+", "+(r.y-r.height/2-i)+")"):e.attr("transform","translate("+r.x+", "+r.y+")"),n},"positionNode"),rY=M((r,e,i,n,a,o=!1,c)=>{e.arrowTypeStart&&PT(r,"start",e.arrowTypeStart,i,n,a,o,c),e.arrowTypeEnd&&PT(r,"end",e.arrowTypeEnd,i,n,a,o,c)},"addEdgeMarkers"),iY={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}},nY=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],PT=M((r,e,i,n,a,o,c=!1,h)=>{var v;const u=iY[i],d=u&&nY.includes(u.type);if(!u){Tt.warn(`Unknown arrow type: ${i}`);return}const f=u.type,m=`${a}_${o}-${f}${e==="start"?"Start":"End"}${c&&d?"-margin":""}`;if(h&&h.trim()!==""){const _=h.replace(/[^\dA-Za-z]/g,"_"),C=`${m}_${_}`;if(!document.getElementById(C)){const w=document.getElementById(m);if(w){const T=w.cloneNode(!0);T.id=C,T.querySelectorAll("path, circle, line").forEach(N=>{N.setAttribute("stroke",h),u.fill&&N.setAttribute("fill",h)}),(v=w.parentNode)==null||v.appendChild(T)}}r.attr(`marker-${e}`,`url(${n}#${C})`)}else r.attr(`marker-${e}`,`url(${n}#${m})`)},"addEdgeMarker"),aY=M(r=>{var e,i;return typeof r=="string"?r:(i=(e=Ke())==null?void 0:e.flowchart)==null?void 0:i.curve},"resolveEdgeCurveType"),jg=new Map,Ai=new Map,Hst=M(()=>{jg.clear(),Ai.clear()},"clear"),Mu=M(r=>r?typeof r=="string"?r:r.reduce((e,i)=>e+";"+i,""):"","getLabelStyles"),sY=M(async(r,e)=>{const i=Ke();let n=Qi(i);const{labelStyles:a}=Kt(e);e.labelStyle=a;const o=r.insert("g").attr("class","edgeLabel"),c=o.insert("g").attr("class","label").attr("data-id",e.id),h=e.labelType==="markdown",d=await Is(r,e.label,{style:Mu(e.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1,markdown:h,width:h?void 0:void 0},i);c.node().appendChild(d),Tt.info("abc82",e,e.labelType);let f=d.getBBox(),g=f;if(n){const m=d.children[0],v=ce(d);f=m.getBoundingClientRect(),g=f,v.attr("width",f.width),v.attr("height",f.height)}else{const m=ce(d).select("text").node();m&&typeof m.getBBox=="function"&&(g=m.getBBox())}c.attr("transform",wu(g,n)),jg.set(e.id,o),e.width=f.width,e.height=f.height;let b;if(e.startLabelLeft){const m=r.insert("g").attr("class","edgeTerminals"),v=m.insert("g").attr("class","inner"),_=await Ao(v,e.startLabelLeft,Mu(e.labelStyle)||"",!1,!1);b=_;let C=_.getBBox();if(n){const w=_.children[0],T=ce(_);C=w.getBoundingClientRect(),T.attr("width",C.width),T.attr("height",C.height)}v.attr("transform",wu(C,n)),Ai.get(e.id)||Ai.set(e.id,{}),Ai.get(e.id).startLeft=m,Zu(b,e.startLabelLeft)}if(e.startLabelRight){const m=r.insert("g").attr("class","edgeTerminals"),v=m.insert("g").attr("class","inner"),_=await Ao(v,e.startLabelRight,Mu(e.labelStyle)||"",!1,!1);b=_,v.node().appendChild(_);let C=_.getBBox();if(n){const w=_.children[0],T=ce(_);C=w.getBoundingClientRect(),T.attr("width",C.width),T.attr("height",C.height)}v.attr("transform",wu(C,n)),Ai.get(e.id)||Ai.set(e.id,{}),Ai.get(e.id).startRight=m,Zu(b,e.startLabelRight)}if(e.endLabelLeft){const m=r.insert("g").attr("class","edgeTerminals"),v=m.insert("g").attr("class","inner"),_=await Ao(v,e.endLabelLeft,Mu(e.labelStyle)||"",!1,!1);b=_;let C=_.getBBox();if(n){const w=_.children[0],T=ce(_);C=w.getBoundingClientRect(),T.attr("width",C.width),T.attr("height",C.height)}v.attr("transform",wu(C,n)),m.node().appendChild(_),Ai.get(e.id)||Ai.set(e.id,{}),Ai.get(e.id).endLeft=m,Zu(b,e.endLabelLeft)}if(e.endLabelRight){const m=r.insert("g").attr("class","edgeTerminals"),v=m.insert("g").attr("class","inner"),_=await Ao(v,e.endLabelRight,Mu(e.labelStyle)||"",!1,!1);b=_;let C=_.getBBox();if(n){const w=_.children[0],T=ce(_);C=w.getBoundingClientRect(),T.attr("width",C.width),T.attr("height",C.height)}v.attr("transform",wu(C,n)),m.node().appendChild(_),Ai.get(e.id)||Ai.set(e.id,{}),Ai.get(e.id).endRight=m,Zu(b,e.endLabelRight)}return d},"insertEdgeLabel");function Zu(r,e){Qi(Ke())&&r&&(r.style.width=e.length*9+"px",r.style.height="12px")}M(Zu,"setTerminalWidth");var oY=M((r,e)=>{Tt.debug("Moving label abc88 ",r.id,r.label,jg.get(r.id),e);let i=e.updatedPath?e.updatedPath:e.originalPath;const n=Ke(),{subGraphTitleTotalMargin:a}=c_(n);if(r.label){const o=jg.get(r.id);let c=r.x,h=r.y;if(i){const u=ya.calcLabelPosition(i);Tt.debug("Moving label "+r.label+" from (",c,",",h,") to (",u.x,",",u.y,") abc88"),e.updatedPath&&(c=u.x,h=u.y)}o.attr("transform",`translate(${c}, ${h+a/2})`)}if(r.startLabelLeft){const o=Ai.get(r.id).startLeft;let c=r.x,h=r.y;if(i){const u=ya.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",i);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}if(r.startLabelRight){const o=Ai.get(r.id).startRight;let c=r.x,h=r.y;if(i){const u=ya.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",i);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}if(r.endLabelLeft){const o=Ai.get(r.id).endLeft;let c=r.x,h=r.y;if(i){const u=ya.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",i);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}if(r.endLabelRight){const o=Ai.get(r.id).endRight;let c=r.x,h=r.y;if(i){const u=ya.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",i);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}},"positionEdgeLabel"),lY=M((r,e)=>{const i=r.x,n=r.y,a=Math.abs(e.x-i),o=Math.abs(e.y-n),c=r.width/2,h=r.height/2;return a>=c||o>=h},"outsideNode"),cY=M((r,e,i)=>{Tt.debug(`intersection calc abc89:
394
+ outsidePoint: ${JSON.stringify(e)}
395
+ insidePoint : ${JSON.stringify(i)}
396
+ node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);const n=r.x,a=r.y,o=Math.abs(n-i.x),c=r.width/2;let h=i.x<e.x?c-o:c+o;const u=r.height/2,d=Math.abs(e.y-i.y),f=Math.abs(e.x-i.x);if(Math.abs(a-e.y)*c>Math.abs(n-e.x)*u){let g=i.y<e.y?e.y-u-a:a-u-e.y;h=f*g/d;const b={x:i.x<e.x?i.x+h:i.x-f+h,y:i.y<e.y?i.y+d-g:i.y-d+g};return h===0&&(b.x=e.x,b.y=e.y),f===0&&(b.x=e.x),d===0&&(b.y=e.y),Tt.debug(`abc89 top/bottom calc, Q ${d}, q ${g}, R ${f}, r ${h}`,b),b}else{i.x<e.x?h=e.x-c-n:h=n-c-e.x;let g=d*h/f,b=i.x<e.x?i.x+f-h:i.x-f+h,m=i.y<e.y?i.y+g:i.y-g;return Tt.debug(`sides calc abc89, Q ${d}, q ${g}, R ${f}, r ${h}`,{_x:b,_y:m}),h===0&&(b=e.x,m=e.y),f===0&&(b=e.x),d===0&&(m=e.y),{x:b,y:m}}},"intersection"),qT=M((r,e)=>{Tt.warn("abc88 cutPathAtIntersect",r,e);let i=[],n=r[0],a=!1;return r.forEach(o=>{if(Tt.info("abc88 checking point",o,e),!lY(e,o)&&!a){const c=cY(e,n,o);Tt.debug("abc88 inside",o,n,c),Tt.debug("abc88 intersection",c,e);let h=!1;i.forEach(u=>{h=h||u.x===c.x&&u.y===c.y}),i.some(u=>u.x===c.x&&u.y===c.y)?Tt.warn("abc88 no intersect",c,i):i.push(c),a=!0}else Tt.warn("abc88 outside",o,n),n=o,a||i.push(o)}),Tt.debug("returning points",i),i},"cutPathAtIntersect");function R3(r){const e=[],i=[];for(let n=1;n<r.length-1;n++){const a=r[n-1],o=r[n],c=r[n+1];(a.x===o.x&&o.y===c.y&&Math.abs(o.x-c.x)>5&&Math.abs(o.y-a.y)>5||a.y===o.y&&o.x===c.x&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-c.y)>5)&&(e.push(o),i.push(n))}return{cornerPoints:e,cornerPointPositions:i}}M(R3,"extractCornerPoints");var UT=M(function(r,e,i){const n=e.x-r.x,a=e.y-r.y,o=Math.sqrt(n*n+a*a),c=i/o;return{x:e.x-c*n,y:e.y-c*a}},"findAdjacentPoint"),hY=M(function(r){const{cornerPointPositions:e}=R3(r),i=[];for(let n=0;n<r.length;n++)if(e.includes(n)){const a=r[n-1],o=r[n+1],c=r[n],h=UT(a,c,5),u=UT(o,c,5),d=u.x-h.x,f=u.y-h.y;i.push(h);const g=Math.sqrt(2)*2;let b={x:c.x,y:c.y};if(Math.abs(o.x-a.x)>10&&Math.abs(o.y-a.y)>=10){Tt.debug("Corner point fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));const m=5;c.x===h.x?b={x:d<0?h.x-m+g:h.x+m-g,y:f<0?h.y-g:h.y+g}:b={x:d<0?h.x-g:h.x+g,y:f<0?h.y-m+g:h.y+m-g}}else Tt.debug("Corner point skipping fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));i.push(b,u)}else i.push(r[n]);return i},"fixCorners"),uY=M((r,e,i)=>{const n=r-e-i,a=2,o=2,c=a+o,h=Math.floor(n/c),u=Array(h).fill(`${a} ${o}`).join(" ");return`0 ${e} ${u} ${i}`},"generateDashArray"),dY=M(function(r,e,i,n,a,o,c,h=!1){var z;if(!c)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:u}=Ke();let d=e.points,f=!1;const g=a;var b=o;const m=[];for(const H in e.cssCompiledStyles)OO(H)||m.push(e.cssCompiledStyles[H]);Tt.debug("UIO intersect check",e.points,b.x,g.x),b.intersect&&g.intersect&&!h&&(d=d.slice(1,e.points.length-1),d.unshift(g.intersect(d[0])),Tt.debug("Last point UIO",e.start,"-->",e.end,d[d.length-1],b,b.intersect(d[d.length-1])),d.push(b.intersect(d[d.length-1])));const v=btoa(JSON.stringify(d));e.toCluster&&(Tt.info("to cluster abc88",i.get(e.toCluster)),d=qT(e.points,i.get(e.toCluster).node),f=!0),e.fromCluster&&(Tt.debug("from cluster abc88",i.get(e.fromCluster),JSON.stringify(d,null,2)),d=qT(d.reverse(),i.get(e.fromCluster).node).reverse(),f=!0);let _=d.filter(H=>!Number.isNaN(H.y));const C=aY(e.curve);C!=="rounded"&&(_=hY(_));let w=ad;switch(C){case"linear":w=ad;break;case"basis":w=Zx;break;case"cardinal":w=fB;break;case"bumpX":w=lB;break;case"bumpY":w=cB;break;case"catmullRom":w=gB;break;case"monotoneX":w=_B;break;case"monotoneY":w=CB;break;case"natural":w=wB;break;case"step":w=SB;break;case"stepAfter":w=EB;break;case"stepBefore":w=TB;break;case"rounded":w=ad;break;default:w=Zx}const{x:T,y:E}=s7(e),N=Fq().x(T).y(E).curve(w);let O;switch(e.thickness){case"normal":O="edge-thickness-normal";break;case"thick":O="edge-thickness-thick";break;case"invisible":O="edge-thickness-invisible";break;default:O="edge-thickness-normal"}switch(e.pattern){case"solid":O+=" edge-pattern-solid";break;case"dotted":O+=" edge-pattern-dotted";break;case"dashed":O+=" edge-pattern-dashed";break;default:O+=" edge-pattern-solid"}let B,A=C==="rounded"?D3(F3(_,e),5):N(_);const L=Array.isArray(e.style)?e.style:[e.style];let P=L.find(H=>H==null?void 0:H.startsWith("stroke:")),j="";e.animate&&(j="edge-animation-fast"),e.animation&&(j="edge-animation-"+e.animation);let $=!1;if(e.look==="handDrawn"){const H=Yt.svg(r);Object.assign([],_);const V=H.path(A,{roughness:.3,seed:u});O+=" transition",B=ce(V).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+O+(e.classes?" "+e.classes:"")+(j?" "+j:"")).attr("style",L?L.reduce((G,J)=>G+";"+J,""):"");let Q=B.attr("d");B.attr("d",Q),r.node().appendChild(B.node())}else{const H=m.join(";"),V=L?L.reduce((vt,kt)=>vt+kt+";",""):"",Q=(H?H+";"+V+";":V)+";"+(L?L.reduce((vt,kt)=>vt+";"+kt,""):"");B=r.append("path").attr("d",A).attr("id",`${c}-${e.id}`).attr("class"," "+O+(e.classes?" "+e.classes:"")+(j?" "+j:"")).attr("style",Q),P=(z=Q.match(/stroke:([^;]+)/))==null?void 0:z[1],$=e.animate===!0||!!e.animation||H.includes("animation");const G=B.node(),J=typeof G.getTotalLength=="function"?G.getTotalLength():0,lt=YS[e.arrowTypeStart]||0,st=YS[e.arrowTypeEnd]||0;if(e.look==="neo"&&!$){const kt=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?uY(J,lt,st):`0 ${lt} ${J-lt-st} ${st}`}; stroke-dashoffset: 0;`;B.attr("style",kt+B.attr("style"))}}B.attr("data-edge",!0),B.attr("data-et","edge"),B.attr("data-id",e.id),B.attr("data-points",v),B.attr("data-look",gi(e.look)),e.showPoints&&_.forEach(H=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",H.x).attr("cy",H.y)});let X="";(Ke().flowchart.arrowMarkerAbsolute||Ke().state.arrowMarkerAbsolute)&&(X=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,X=X.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),Tt.info("arrowTypeStart",e.arrowTypeStart),Tt.info("arrowTypeEnd",e.arrowTypeEnd);const W=!$&&(e==null?void 0:e.look)==="neo";rY(B,e,X,c,n,W,P);const F=Math.floor(d.length/2),U=d[F];ya.isLabelCoordinateInPath(U,B.attr("d"))||(f=!0);let D={};return f&&(D.updatedPath=d),D.originalPath=e.points,D},"insertEdge");function D3(r,e){if(r.length<2)return"";let i="";const n=r.length,a=1e-5;for(let o=0;o<n;o++){const c=r[o],h=r[o-1],u=r[o+1];if(o===0)i+=`M${c.x},${c.y}`;else if(o===n-1)i+=`L${c.x},${c.y}`;else{const d=c.x-h.x,f=c.y-h.y,g=u.x-c.x,b=u.y-c.y,m=Math.hypot(d,f),v=Math.hypot(g,b);if(m<a||v<a){i+=`L${c.x},${c.y}`;continue}const _=d/m,C=f/m,w=g/v,T=b/v,E=_*w+C*T,N=Math.max(-1,Math.min(1,E)),O=Math.acos(N);if(O<a||Math.abs(Math.PI-O)<a){i+=`L${c.x},${c.y}`;continue}const B=Math.min(e/Math.sin(O/2),m/2,v/2),A=c.x-_*B,L=c.y-C*B,P=c.x+w*B,j=c.y+T*B;i+=`L${A},${L}`,i+=`Q${c.x},${c.y} ${P},${j}`}}return i}M(D3,"generateRoundedPath");function Ev(r,e){if(!r||!e)return{angle:0,deltaX:0,deltaY:0};const i=e.x-r.x,n=e.y-r.y;return{angle:Math.atan2(n,i),deltaX:i,deltaY:n}}M(Ev,"calculateDeltaAndAngle");function F3(r,e){const i=r.map(a=>({...a}));if(r.length>=2&&Fi[e.arrowTypeStart]){const a=Fi[e.arrowTypeStart],o=r[0],c=r[1],{angle:h}=Ev(o,c),u=a*Math.cos(h),d=a*Math.sin(h);i[0].x=o.x+u,i[0].y=o.y+d}const n=r.length;if(n>=2&&Fi[e.arrowTypeEnd]){const a=Fi[e.arrowTypeEnd],o=r[n-1],c=r[n-2],{angle:h}=Ev(c,o),u=a*Math.cos(h),d=a*Math.sin(h);i[n-1].x=o.x-u,i[n-1].y=o.y-d}return i}M(F3,"applyMarkerOffsetsToPoints");var fY=M((r,e,i,n)=>{e.forEach(a=>{FY[a](r,i,n)})},"insertMarkers"),pY=M((r,e,i)=>{Tt.trace("Making markers for ",i),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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"),r.append("marker").attr("id",i+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).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"),gY=M((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).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"),mY=M((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).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"),yY=M((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).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"),bY=M((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).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),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).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"),xY=M((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-pointEnd").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-pointStart").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-pointEnd-margin").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-pointStart-margin").attr("class","marker "+e).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"),vY=M((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-circleEnd").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-circleStart").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-circleEnd-margin").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-circleStart-margin").attr("class","marker "+e).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"),_Y=M((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),r.append("marker").attr("id",i+"_"+e+"-crossStart").attr("class","marker cross "+e).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"),r.append("marker").attr("id",i+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).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),r.append("marker").attr("id",i+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).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"),CY=M((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-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"),kY=M((r,e,i)=>{const n=Lr(),{themeVariables:a}=n,{transitionColor:o}=a;r.append("defs").append("marker").attr("id",i+"_"+e+"-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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-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",`${o}`)},"barbNeo"),wY=M((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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"),SY=M((r,e,i)=>{const n=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");const a=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),TY=M((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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"),EY=M((r,e,i)=>{const n=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const a=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),AY=M((r,e,i)=>{const n=Lr(),{themeVariables:a}=n,{strokeWidth:o}=a;r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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",`${o}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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",`${o}`)},"only_one_neo"),NY=M((r,e,i)=>{const n=Lr(),{themeVariables:a}=n,{strokeWidth:o,mainBkg:c}=a,h=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).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",`${o}`).attr("r",6),h.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const u=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");u.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),u.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),MY=M((r,e,i)=>{const n=Lr(),{themeVariables:a}=n,{strokeWidth:o}=a;r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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",`${o}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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",`${o}`)},"one_or_more_neo"),BY=M((r,e,i)=>{const n=Lr(),{themeVariables:a}=n,{strokeWidth:o,mainBkg:c}=a,h=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).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",`${o}`),h.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const u=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");u.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),u.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),LY=M((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
397
+ L20,10
398
+ M20,10
399
+ L0,20`)},"requirement_arrow"),OY=M((r,e,i)=>{const n=Lr(),{themeVariables:a}=n,{strokeWidth:o}=a;r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
400
+ L20,10
401
+ M20,10
402
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),RY=M((r,e,i)=>{const n=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),DY=M((r,e,i)=>{const n=Lr(),{themeVariables:a}=n,{strokeWidth:o}=a,c=r.append("defs").append("marker").attr("id",i+"_"+e+"-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",`${o}`)},"requirement_contains_neo"),FY={extension:pY,composition:gY,aggregation:mY,dependency:yY,lollipop:bY,point:xY,circle:vY,cross:_Y,barb:CY,barbNeo:kY,only_one:wY,zero_or_one:SY,one_or_more:TY,zero_or_more:EY,only_one_neo:AY,zero_or_one_neo:NY,one_or_more_neo:MY,zero_or_more_neo:BY,requirement_arrow:LY,requirement_contains:RY,requirement_arrow_neo:OY,requirement_contains_neo:DY},jY=fY,IY={common:$d,getConfig:Lr,insertCluster:DW,insertEdge:dY,insertEdgeLabel:sY,insertMarkers:jY,insertNode:O3,interpolateToCurve:i_,labelHelper:fe,log:Tt,positionEdgeLabel:oY},Ed={},j3=M(r=>{for(const e of r)Ed[e.name]=e},"registerLayoutLoaders"),$Y=M(()=>{j3([{name:"dagre",loader:M(async()=>await ze(()=>import("./dagre-KV5264BT-BsnIu1de.js"),__vite__mapDeps([0,1,2,3,4,5])),"loader")},{name:"cose-bilkent",loader:M(async()=>await ze(()=>import("./cose-bilkent-S5V4N54A-86wk8_0k.js"),__vite__mapDeps([6,7])),"loader")}])},"registerDefaultLayoutLoaders");$Y();var Gst=M(async(r,e)=>{if(!(r.layoutAlgorithm in Ed))throw new Error(`Unknown layout algorithm: ${r.layoutAlgorithm}`);if(r.diagramId)for(const f of r.nodes){const g=f.domId||f.id;f.domId=`${r.diagramId}-${g}`}const i=Ed[r.layoutAlgorithm],n=await i.loader(),{theme:a,themeVariables:o}=r.config,{useGradient:c,gradientStart:h,gradientStop:u}=o,d=e.attr("id");if(e.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",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),e.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",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),c){const f=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");f.append("svg:stop").attr("offset","0%").attr("stop-color",h).attr("stop-opacity",1),f.append("svg:stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}return n.render(r,e,IY,{algorithm:i.algorithm})},"render"),Wst=M((r="",{fallback:e="dagre"}={})=>{if(r in Ed)return r;if(e in Ed)return Tt.warn(`Layout algorithm ${r} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${r} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),I3="comm",$3="rule",z3="decl",zY="@import",PY="@namespace",qY="@keyframes",UY="@layer",HY=Math.abs,ld=String.fromCharCode;function P3(r){return r.trim()}function Av(r,e,i){return r.replace(e,i)}function Pc(r,e){return r.charCodeAt(e)|0}function xh(r,e,i){return r.slice(e,i)}function $a(r){return r.length}function GY(r){return r.length}function Sp(r,e){return e.push(r),r}var ym=1,vh=1,q3=0,na=0,ei=0,Eh="";function w_(r,e,i,n,a,o,c,h){return{value:r,root:e,parent:i,type:n,props:a,children:o,line:ym,column:vh,length:c,return:"",siblings:h}}function WY(){return ei}function YY(){return ei=na>0?Pc(Eh,--na):0,vh--,ei===10&&(vh=1,ym--),ei}function va(){return ei=na<q3?Pc(Eh,na++):0,vh++,ei===10&&(vh=1,ym++),ei}function No(){return Pc(Eh,na)}function Kp(){return na}function bm(r,e){return xh(Eh,r,e)}function Ad(r){switch(r){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 VY(r){return ym=vh=1,q3=$a(Eh=r),na=0,[]}function KY(r){return Eh="",r}function eb(r){return P3(bm(na-1,Nv(r===91?r+2:r===40?r+1:r)))}function XY(r){for(;(ei=No())&&ei<33;)va();return Ad(r)>2||Ad(ei)>3?"":" "}function ZY(r,e){for(;--e&&va()&&!(ei<48||ei>102||ei>57&&ei<65||ei>70&&ei<97););return bm(r,Kp()+(e<6&&No()==32&&va()==32))}function Nv(r){for(;va();)switch(ei){case r:return na;case 34:case 39:r!==34&&r!==39&&Nv(ei);break;case 40:r===41&&Nv(r);break;case 92:va();break}return na}function QY(r,e){for(;va()&&r+ei!==57;)if(r+ei===84&&No()===47)break;return"/*"+bm(e,na-1)+"*"+ld(r===47?r:va())}function JY(r){for(;!Ad(No());)va();return bm(r,na)}function tV(r){return KY(Xp("",null,null,null,[""],r=VY(r),0,[0],r))}function Xp(r,e,i,n,a,o,c,h,u){for(var d=0,f=0,g=c,b=0,m=0,v=0,_=1,C=1,w=1,T=0,E=0,N="",O=a,B=o,A=n,L=N;C;)switch(v=E,E=va()){case 40:v!=108&&Pc(L,g-1)==58?(T++,L+="("):L+=eb(E);break;case 41:T--,L+=")";break;case 34:case 39:case 91:L+=eb(E);break;case 9:case 10:case 13:case 32:if(T>0){L+=ld(E);break}L+=XY(v);break;case 92:L+=ZY(Kp()-1,7);continue;case 47:switch(No()){case 42:case 47:Sp(eV(QY(va(),Kp()),e,i,u),u),(Ad(v||1)==5||Ad(No()||1)==5)&&$a(L)&&xh(L,-1,void 0)!==" "&&(L+=" ");break;default:L+="/"}break;case 123*_:h[d++]=$a(L)*w;case 125*_:case 59:case 0:if(T>0&&E){L+=ld(E);break}switch(E){case 0:case 125:C=0;case 59+f:w==-1&&(L=Av(L,/\f/g,"")),m>0&&($a(L)-g||_===0)&&Sp(m>32?GT(L+";",n,i,g-1,u):GT(Av(L," ","")+";",n,i,g-2,u),u);break;case 59:L+=";";default:if(Sp(A=HT(L,e,i,d,f,a,h,N,O=[],B=[],g,o),o),E===123)if(f===0)Xp(L,e,A,A,O,o,g,h,B);else{switch(b){case 99:if(Pc(L,3)===110)break;case 108:if(Pc(L,2)===97)break;default:f=0;case 100:case 109:case 115:}f?Xp(r,A,A,n&&Sp(HT(r,A,A,0,0,a,h,N,a,O=[],g,B),B),a,B,g,h,n?O:B):Xp(L,A,A,A,[""],B,0,h,B)}}d=f=m=0,_=w=1,N=L="",g=c;break;case 58:g=1+$a(L),m=v;default:if(_<1){if(E==123)--_;else if(E==125&&_++==0&&YY()==125)continue}switch(L+=ld(E),E*_){case 38:w=f>0?1:(L+="\f",-1);break;case 44:if(T>0)break;h[d++]=($a(L)-1)*w,w=1;break;case 64:No()===45&&(L+=eb(va())),b=No(),f=g=$a(N=L+=JY(Kp())),E++;break;case 45:v===45&&$a(L)==2&&(_=0)}}return o}function HT(r,e,i,n,a,o,c,h,u,d,f,g){for(var b=a-1,m=a===0?o:[""],v=GY(m),_=0,C=0,w=0;_<n;++_)for(var T=0,E=xh(r,b+1,b=HY(C=c[_])),N=r;T<v;++T)(N=P3(C>0?m[T]+" "+E:Av(E,/&\f/g,m[T])))&&(u[w++]=N);return w_(r,e,i,a===0?$3:h,u,d,f,g)}function eV(r,e,i,n){return w_(r,e,i,I3,ld(WY()),xh(r,2,-2),0,n)}function GT(r,e,i,n,a){return w_(r,e,i,z3,xh(r,0,n),xh(r,n+1,-1),n,a)}function Mv(r,e){for(var i="",n=0;n<r.length;n++)i+=e(r[n],n,r,e)||"";return i}function rV(r,e,i,n){switch(r.type){case UY:if(r.children.length)break;case zY:case PY:case z3:return r.return=r.return||r.value;case I3:return"";case qY:return r.return=r.value+"{"+Mv(r.children,n)+"}";case $3:if(!$a(r.value=r.props.join(",")))return""}return $a(i=Mv(r.children,n))?r.return=r.value+"{"+i+"}":""}var iV=dO(Object.keys,Object),nV=Object.prototype,aV=nV.hasOwnProperty;function sV(r){if(!lm(r))return iV(r);var e=[];for(var i in Object(r))aV.call(r,i)&&i!="constructor"&&e.push(i);return e}var Bv=Gl(Sa,"DataView"),Lv=Gl(Sa,"Promise"),Ov=Gl(Sa,"Set"),Rv=Gl(Sa,"WeakMap"),WT="[object Map]",oV="[object Object]",YT="[object Promise]",VT="[object Set]",KT="[object WeakMap]",XT="[object DataView]",lV=Hl(Bv),cV=Hl(Sd),hV=Hl(Lv),uV=Hl(Ov),dV=Hl(Rv),hl=Ul;(Bv&&hl(new Bv(new ArrayBuffer(1)))!=XT||Sd&&hl(new Sd)!=WT||Lv&&hl(Lv.resolve())!=YT||Ov&&hl(new Ov)!=VT||Rv&&hl(new Rv)!=KT)&&(hl=function(r){var e=Ul(r),i=e==oV?r.constructor:void 0,n=i?Hl(i):"";if(n)switch(n){case lV:return XT;case cV:return WT;case hV:return YT;case uV:return VT;case dV:return KT}return e});var fV="[object Map]",pV="[object Set]",gV=Object.prototype,mV=gV.hasOwnProperty;function ZT(r){if(r==null)return!0;if(cm(r)&&(Eg(r)||typeof r=="string"||typeof r.splice=="function"||e_(r)||r_(r)||Tg(r)))return!r.length;var e=hl(r);if(e==fV||e==pV)return!r.size;if(lm(r))return!sV(r).length;for(var i in r)if(mV.call(r,i))return!1;return!0}var U3="c4",yV=M(r=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(r),"detector"),bV=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./c4Diagram-AHTNJAMY-DAT2Y4Ei.js");return{diagram:e}},__vite__mapDeps([8,9]));return{id:U3,diagram:r}},"loader"),xV={id:U3,detector:yV,loader:bV},vV=xV,H3="flowchart",_V=M((r,e)=>{var i,n;return((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-wrapper"||((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"?!1:/^\s*graph/.test(r)},"detector"),CV=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-DfOOuTHa.js");return{diagram:e}},__vite__mapDeps([10,11,9,12,13,14]));return{id:H3,diagram:r}},"loader"),kV={id:H3,detector:_V,loader:CV},wV=kV,G3="flowchart-v2",SV=M((r,e)=>{var i,n,a;return((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-d3"?!1:(((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"&&(e.layout="elk"),/^\s*graph/.test(r)&&((a=e==null?void 0:e.flowchart)==null?void 0:a.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(r))},"detector"),TV=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-DfOOuTHa.js");return{diagram:e}},__vite__mapDeps([10,11,9,12,13,14]));return{id:G3,diagram:r}},"loader"),EV={id:G3,detector:SV,loader:TV},AV=EV,W3="er",NV=M(r=>/^\s*erDiagram/.test(r),"detector"),MV=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./erDiagram-SMLLAGMA-tggQbGeM.js");return{diagram:e}},__vite__mapDeps([15,12,13,14]));return{id:W3,diagram:r}},"loader"),BV={id:W3,detector:NV,loader:MV},LV=BV,Y3="gitGraph",OV=M(r=>/^\s*gitGraph/.test(r),"detector"),RV=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./gitGraphDiagram-UUTBAWPF-DCooi0ou.js");return{diagram:e}},__vite__mapDeps([16,17,18,19,4,2]));return{id:Y3,diagram:r}},"loader"),DV={id:Y3,detector:OV,loader:RV},FV=DV,V3="gantt",jV=M(r=>/^\s*gantt/.test(r),"detector"),IV=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./ganttDiagram-T4ZO3ILL-CqRBfUlO.js");return{diagram:e}},__vite__mapDeps([20,21,22]));return{id:V3,diagram:r}},"loader"),$V={id:V3,detector:jV,loader:IV},zV=$V,K3="info",PV=M(r=>/^\s*info/.test(r),"detector"),qV=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./infoDiagram-42DDH7IO-DvXAiIKM.js");return{diagram:e}},__vite__mapDeps([23,19,4,2]));return{id:K3,diagram:r}},"loader"),UV={id:K3,detector:PV,loader:qV},X3="pie",HV=M(r=>/^\s*pie/.test(r),"detector"),GV=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./pieDiagram-DEJITSTG-C4ZFpuC0.js");return{diagram:e}},__vite__mapDeps([24,17,19,4,2,25]));return{id:X3,diagram:r}},"loader"),WV={id:X3,detector:HV,loader:GV},Z3="quadrantChart",YV=M(r=>/^\s*quadrantChart/.test(r),"detector"),VV=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./quadrantDiagram-34T5L4WZ-yvEQRUmq.js");return{diagram:e}},__vite__mapDeps([26,21,22]));return{id:Z3,diagram:r}},"loader"),KV={id:Z3,detector:YV,loader:VV},XV=KV,Q3="xychart",ZV=M(r=>/^\s*xychart(-beta)?/.test(r),"detector"),QV=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./xychartDiagram-5P7HB3ND-D1QYeAFg.js");return{diagram:e}},__vite__mapDeps([27,21,22]));return{id:Q3,diagram:r}},"loader"),JV={id:Q3,detector:ZV,loader:QV},tK=JV,J3="requirement",eK=M(r=>/^\s*requirement(Diagram)?/.test(r),"detector"),rK=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./requirementDiagram-MS252O5E-BkjbZkw1.js");return{diagram:e}},__vite__mapDeps([28,12,13]));return{id:J3,diagram:r}},"loader"),iK={id:J3,detector:eK,loader:rK},nK=iK,t5="sequence",aK=M(r=>/^\s*sequenceDiagram/.test(r),"detector"),sK=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./sequenceDiagram-FGHM5R23-B03MUCIO.js");return{diagram:e}},__vite__mapDeps([29,9,18]));return{id:t5,diagram:r}},"loader"),oK={id:t5,detector:aK,loader:sK},lK=oK,e5="class",cK=M((r,e)=>{var i;return((i=e==null?void 0:e.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(r)},"detector"),hK=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./classDiagram-6PBFFD2Q-BBVZgLT7.js");return{diagram:e}},__vite__mapDeps([30,31,11,9,12,13]));return{id:e5,diagram:r}},"loader"),uK={id:e5,detector:cK,loader:hK},dK=uK,r5="classDiagram",fK=M((r,e)=>{var i;return/^\s*classDiagram/.test(r)&&((i=e==null?void 0:e.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(r)},"detector"),pK=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./classDiagram-v2-HSJHXN6E-BBVZgLT7.js");return{diagram:e}},__vite__mapDeps([32,31,11,9,12,13]));return{id:r5,diagram:r}},"loader"),gK={id:r5,detector:fK,loader:pK},mK=gK,i5="state",yK=M((r,e)=>{var i;return((i=e==null?void 0:e.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(r)},"detector"),bK=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./stateDiagram-FHFEXIEX-DW9W8hRb.js");return{diagram:e}},__vite__mapDeps([33,34,12,13,1,2,3,4]));return{id:i5,diagram:r}},"loader"),xK={id:i5,detector:yK,loader:bK},vK=xK,n5="stateDiagram",_K=M((r,e)=>{var i;return!!(/^\s*stateDiagram-v2/.test(r)||/^\s*stateDiagram/.test(r)&&((i=e==null?void 0:e.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper")},"detector"),CK=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./stateDiagram-v2-QKLJ7IA2-DGLHFCvB.js");return{diagram:e}},__vite__mapDeps([35,34,12,13]));return{id:n5,diagram:r}},"loader"),kK={id:n5,detector:_K,loader:CK},wK=kK,a5="journey",SK=M(r=>/^\s*journey/.test(r),"detector"),TK=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./journeyDiagram-VCZTEJTY-3sYlQlzX.js");return{diagram:e}},__vite__mapDeps([36,11,9,25]));return{id:a5,diagram:r}},"loader"),EK={id:a5,detector:SK,loader:TK},AK=EK,NK=M((r,e,i)=>{Tt.debug(`rendering svg for syntax error
403
+ `);const n=Qq(e),a=n.append("g");n.attr("viewBox","0 0 2412 512"),NM(n,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${i}`)},"draw"),s5={draw:NK},MK=s5,BK={db:{},renderer:s5,parser:{parse:M(()=>{},"parse")}},LK=BK,o5="flowchart-elk",OK=M((r,e={})=>{var i;return/^\s*flowchart-elk/.test(r)||/^\s*(flowchart|graph)/.test(r)&&((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?(e.layout="elk",!0):!1},"detector"),RK=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-DfOOuTHa.js");return{diagram:e}},__vite__mapDeps([10,11,9,12,13,14]));return{id:o5,diagram:r}},"loader"),DK={id:o5,detector:OK,loader:RK},FK=DK,l5="timeline",jK=M(r=>/^\s*timeline/.test(r),"detector"),IK=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./timeline-definition-GMOUNBTQ-Cq3P6C9q.js");return{diagram:e}},__vite__mapDeps([37,25]));return{id:l5,diagram:r}},"loader"),$K={id:l5,detector:jK,loader:IK},zK=$K,c5="mindmap",PK=M(r=>/^\s*mindmap/.test(r),"detector"),qK=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./mindmap-definition-QFDTVHPH-DNg9-qbI.js");return{diagram:e}},__vite__mapDeps([38,12,13]));return{id:c5,diagram:r}},"loader"),UK={id:c5,detector:PK,loader:qK},HK=UK,h5="kanban",GK=M(r=>/^\s*kanban/.test(r),"detector"),WK=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./kanban-definition-6JOO6SKY-cGLqpTJv.js");return{diagram:e}},__vite__mapDeps([39,11]));return{id:h5,diagram:r}},"loader"),YK={id:h5,detector:GK,loader:WK},VK=YK,u5="sankey",KK=M(r=>/^\s*sankey(-beta)?/.test(r),"detector"),XK=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./sankeyDiagram-XADWPNL6-_6wZr0Q4.js");return{diagram:e}},[]);return{id:u5,diagram:r}},"loader"),ZK={id:u5,detector:KK,loader:XK},QK=ZK,d5="packet",JK=M(r=>/^\s*packet(-beta)?/.test(r),"detector"),tX=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./diagram-TYMM5635-Co4XFxnB.js");return{diagram:e}},__vite__mapDeps([40,17,19,4,2]));return{id:d5,diagram:r}},"loader"),eX={id:d5,detector:JK,loader:tX},f5="radar",rX=M(r=>/^\s*radar-beta/.test(r),"detector"),iX=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./diagram-MMDJMWI5-4PK6U-9k.js");return{diagram:e}},__vite__mapDeps([41,17,19,4,2]));return{id:f5,diagram:r}},"loader"),nX={id:f5,detector:rX,loader:iX},p5="block",aX=M(r=>/^\s*block(-beta)?/.test(r),"detector"),sX=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./blockDiagram-DXYQGD6D-dX-e3JNh.js");return{diagram:e}},__vite__mapDeps([42,11,5,1,2,14]));return{id:p5,diagram:r}},"loader"),oX={id:p5,detector:aX,loader:sX},lX=oX,g5="treeView",cX=M(r=>/^\s*treeView-beta/.test(r),"detector"),hX=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./diagram-5BDNPKRD-BfKZpkO_.js");return{diagram:e}},__vite__mapDeps([43,17,18,19,4,2]));return{id:g5,diagram:r}},"loader"),uX={id:g5,detector:cX,loader:hX},dX=uX,m5="architecture",fX=M(r=>/^\s*architecture/.test(r),"detector"),pX=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./architectureDiagram-Q4EWVU46-u9hbL6uu.js");return{diagram:e}},__vite__mapDeps([44,17,19,4,2,7]));return{id:m5,diagram:r}},"loader"),gX={id:m5,detector:fX,loader:pX},mX=gX,y5="ishikawa",yX=M(r=>/^\s*ishikawa(-beta)?\b/i.test(r),"detector"),bX=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./ishikawaDiagram-UXIWVN3A-B3k3F-SR.js");return{diagram:e}},[]);return{id:y5,diagram:r}},"loader"),xX={id:y5,detector:yX,loader:bX},b5="venn",vX=M(r=>/^\s*venn-beta/.test(r),"detector"),_X=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./vennDiagram-DHZGUBPP-BO3azTdL.js");return{diagram:e}},[]);return{id:b5,diagram:r}},"loader"),CX={id:b5,detector:vX,loader:_X},kX=CX,x5="treemap",wX=M(r=>/^\s*treemap/.test(r),"detector"),SX=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./diagram-G4DWMVQ6-BGEdOZis.js");return{diagram:e}},__vite__mapDeps([45,13,17,19,4,2,22]));return{id:x5,diagram:r}},"loader"),TX={id:x5,detector:wX,loader:SX},v5="wardley-beta",EX=M(r=>/^\s*wardley-beta/i.test(r),"detector"),AX=M(async()=>{const{diagram:r}=await ze(async()=>{const{diagram:e}=await import("./wardleyDiagram-NUSXRM2D-D0Ghwhzw.js");return{diagram:e}},__vite__mapDeps([46,17,19,4,2]));return{id:v5,diagram:r}},"loader"),NX={id:v5,detector:EX,loader:AX},MX=NX,QT=!1,xm=M(()=>{QT||(QT=!0,lg("error",LK,r=>r.toLowerCase().trim()==="error"),lg("---",{db:{clear:M(()=>{},"clear")},styles:{},renderer:{draw:M(()=>{},"draw")},parser:{parse:M(()=>{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:M(()=>null,"init")},r=>r.toLowerCase().trimStart().startsWith("---")),Fx(FK,HK,mX),Fx(vV,VK,mK,dK,LV,zV,UV,WV,nK,lK,AV,wV,zK,FV,wK,vK,AK,XV,QK,eX,tK,lX,dX,nX,xX,TX,kX,MX))},"addDiagrams"),BX=M(async()=>{Tt.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(Ol).map(async([i,{detector:n,loader:a}])=>{if(a)try{zx(i)}catch{try{const{diagram:o,id:c}=await a();lg(c,o,n)}catch(o){throw Tt.error(`Failed to load external diagram with key ${i}. Removing from detectors.`),delete Ol[i],o}}}))).filter(i=>i.status==="rejected");if(e.length>0){Tt.error(`Failed to load ${e.length} external diagrams`);for(const i of e)Tt.error(i);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),LX="graphics-document document";function _5(r,e){r.attr("role",LX),e!==""&&r.attr("aria-roledescription",e)}M(_5,"setA11yDiagramInfo");function C5(r,e,i,n){if(r.insert!==void 0){if(i){const a=`chart-desc-${n}`;r.attr("aria-describedby",a),r.insert("desc",":first-child").attr("id",a).text(i)}if(e){const a=`chart-title-${n}`;r.attr("aria-labelledby",a),r.insert("title",":first-child").attr("id",a).text(e)}}}M(C5,"addSVGa11yTitleDescription");var Al,Dv=(Al=class{constructor(e,i,n,a,o){this.type=e,this.text=i,this.db=n,this.parser=a,this.renderer=o}static async fromText(e,i={}){var d,f;const n=Lr(),a=k1(e,n);e=eG(e)+`
404
+ `;try{zx(a)}catch{const g=B6(a);if(!g)throw new gM(`Diagram ${a} not found.`);const{id:b,diagram:m}=await g();lg(b,m)}const{db:o,parser:c,renderer:h,init:u}=zx(a);return c.parser&&(c.parser.yy=o),(d=o.clear)==null||d.call(o),u==null||u(n),i.title&&((f=o.setDiagramTitle)==null||f.call(o,i.title)),await c.parse(e),new Al(a,e,o,c,h)}async render(e,i){await this.renderer.draw(this.text,e,i,this)}getParser(){return this.parser}getType(){return this.type}},M(Al,"Diagram"),Al),JT=[],OX=M(()=>{JT.forEach(r=>{r()}),JT=[]},"attachFunctions"),RX=M(r=>r.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function k5(r){const e=r.match(pM);if(!e)return{text:r,metadata:{}};let i=a7(e[1],{schema:n7})??{};i=typeof i=="object"&&!Array.isArray(i)?i:{};const n={};return i.displayMode&&(n.displayMode=i.displayMode.toString()),i.title&&(n.title=i.title.toString()),i.config&&(n.config=i.config),{text:r.slice(e[0].length),metadata:n}}M(k5,"extractFrontMatter");var DX=M(r=>r.replace(/\r\n?/g,`
405
+ `).replace(/<(\w+)([^>]*)>/g,(e,i,n)=>"<"+i+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),FX=M(r=>{const{text:e,metadata:i}=k5(r),{displayMode:n,title:a,config:o={}}=i;return n&&(o.gantt||(o.gantt={}),o.gantt.displayMode=n),{title:a,config:o,text:e}},"processFrontmatter"),jX=M(r=>{const e=ya.detectInit(r)??{},i=ya.detectDirective(r,"wrap");return Array.isArray(i)?e.wrap=i.some(({type:n})=>n==="wrap"):(i==null?void 0:i.type)==="wrap"&&(e.wrap=!0),{text:qH(r),directive:e}},"processDirectives");function S_(r){const e=DX(r),i=FX(e),n=jX(i.text),a=l_(i.config,n.directive);return r=RX(n.text),{code:r,title:i.title,config:a}}M(S_,"preprocessDiagram");function w5(r){const e=new TextEncoder().encode(r),i=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(i)}M(w5,"toBase64");var IX=5e4,$X="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",zX="sandbox",PX="loose",qX="http://www.w3.org/2000/svg",UX="http://www.w3.org/1999/xlink",HX="http://www.w3.org/1999/xhtml",GX="100%",WX="100%",YX="border:0;margin:0;",VX="margin:0",KX="allow-top-navigation-by-user-activation allow-popups",XX='The "iframe" tag is not supported by your browser.',ZX=["foreignobject"],QX=["dominant-baseline"];function T_(r){const e=S_(r);return sg(),a$(e.config??{}),e}M(T_,"processAndSetConfigs");async function S5(r,e){xm();try{const{code:i,config:n}=T_(r);return{diagramType:(await E5(i)).type,config:n}}catch(i){if(e!=null&&e.suppressErrors)return!1;throw i}}M(S5,"parse");var tE=M((r,e,i=[])=>`
406
+ .${r} ${e} { ${i.join(" !important; ")} !important; }`,"cssImportantStyles"),JX=M((r,e=new Map)=>{let i="";if(r.themeCSS!==void 0&&(i+=`
407
+ ${r.themeCSS}`),r.fontFamily!==void 0&&(i+=`
408
+ :root { --mermaid-font-family: ${r.fontFamily}}`),r.altFontFamily!==void 0&&(i+=`
409
+ :root { --mermaid-alt-font-family: ${r.altFontFamily}}`),e instanceof Map){const c=Qi(r)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(h=>{ZT(h.styles)||c.forEach(u=>{i+=tE(h.id,u,h.styles)}),ZT(h.textStyles)||(i+=tE(h.id,"tspan",((h==null?void 0:h.textStyles)||[]).map(u=>u.replace("color","fill"))))})}return i},"createCssStyles"),tZ=M((r,e,i,n)=>{const a=JX(r,i),o=w$(e,a,{...r.themeVariables,theme:r.theme,look:r.look},n);return Mv(tV(`${n}{${o}}`),rV)},"createUserStyles"),eZ=M((r="",e,i)=>{let n=r;return!i&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=Il(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),rZ=M((r="",e)=>{var a,o;const i=(o=(a=e==null?void 0:e.viewBox)==null?void 0:a.baseVal)!=null&&o.height?e.viewBox.baseVal.height+"px":WX,n=w5(`<body style="${VX}">${r}</body>`);return`<iframe style="width:${GX};height:${i};${YX}" src="data:text/html;charset=UTF-8;base64,${n}" sandbox="${KX}">
410
+ ${XX}
411
+ </iframe>`},"putIntoIFrame"),eE=M((r,e,i,n,a)=>{const o=r.append("div");o.attr("id",i),n&&o.attr("style",n);const c=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns",qX);return a&&c.attr("xmlns:xlink",a),c.append("g"),r},"appendDivSvgG");function Fv(r,e){return r.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}M(Fv,"sandboxedIframe");var iZ=M((r,e,i,n)=>{var a,o,c;(a=r.getElementById(e))==null||a.remove(),(o=r.getElementById(i))==null||o.remove(),(c=r.getElementById(n))==null||c.remove()},"removeExistingElements"),nZ=M(async function(r,e,i){var X,W,F,U,D,z;xm();const n=T_(e);e=n.code;const a=Lr();Tt.debug(a),e.length>((a==null?void 0:a.maxTextSize)??IX)&&(e=$X);const o="#"+r,c="i"+r,h="#"+c,u="d"+r,d="#"+u,f=M(()=>{const V=ce(b?h:d).node();V&&"remove"in V&&V.remove()},"removeTempElements");let g=ce("body");const b=a.securityLevel===zX,m=a.securityLevel===PX,v=a.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),b){const H=Fv(ce(i),c);g=ce(H.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=ce(i);eE(g,r,u,`font-family: ${v}`,UX)}else{if(iZ(document,r,u,c),b){const H=Fv(ce("body"),c);g=ce(H.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=ce("body");eE(g,r,u)}let _,C;try{_=await Dv.fromText(e,{title:n.title})}catch(H){if(a.suppressErrorRendering)throw f(),H;_=await Dv.fromText("error"),C=H}const w=g.select(d).node(),T=_.type,E=w.firstChild,N=E.firstChild,O=(W=(X=_.renderer).getClasses)==null?void 0:W.call(X,e,_),B=tZ(a,T,O,o),A=document.createElement("style");A.innerHTML=B,E.insertBefore(A,N);try{await _.renderer.draw(e,r,"11.14.0",_)}catch(H){throw a.suppressErrorRendering?f():MK.draw(e,r,"11.14.0"),H}const L=g.select(`${d} svg`),P=(U=(F=_.db).getAccTitle)==null?void 0:U.call(F),j=(z=(D=_.db).getAccDescription)==null?void 0:z.call(D);A5(T,L,P,j),g.select(`[id="${r}"]`).selectAll("foreignobject > *").attr("xmlns",HX);let $=g.select(d).node().innerHTML;if(Tt.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),$=eZ($,b,Fs(a.arrowMarkerAbsolute)),b){const H=g.select(d+" svg").node();$=rZ($,H)}else m||($=Ll.sanitize($,{ADD_TAGS:ZX,ADD_ATTR:QX,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(OX(),C)throw C;return f(),{diagramType:T,svg:$,bindFunctions:_.db.bindFunctions}},"render");function T5(r={}){var n;const e=ci({},r);e!=null&&e.fontFamily&&!((n=e.themeVariables)!=null&&n.fontFamily)&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),i$(e),e!=null&&e.theme&&e.theme in Ms?e.themeVariables=Ms[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Ms.default.getThemeVariables(e.themeVariables));const i=typeof e=="object"?r$(e):vM();C1(i.logLevel),xm()}M(T5,"initialize");var E5=M((r,e={})=>{const{code:i}=S_(r);return Dv.fromText(i,e)},"getDiagramFromText");function A5(r,e,i,n){_5(e,r),C5(e,i,n,e.attr("id"))}M(A5,"addA11yInfo");var zl=Object.freeze({render:nZ,parse:S5,getDiagramFromText:E5,initialize:T5,getConfig:Lr,setConfig:_M,getSiteConfig:vM,updateSiteConfig:n$,reset:M(()=>{sg()},"reset"),globalReset:M(()=>{sg(ph)},"globalReset"),defaultConfig:ph});C1(Lr().logLevel);sg(Lr());var aZ=M((r,e,i)=>{Tt.warn(r),o_(r)?(i&&i(r.str,r.hash),e.push({...r,message:r.str,error:r})):(i&&i(r),r instanceof Error&&e.push({str:r.message,message:r.message,hash:r.name,error:r}))},"handleError"),N5=M(async function(r={querySelector:".mermaid"}){try{await sZ(r)}catch(e){if(o_(e)&&Tt.error(e.str),Mn.parseError&&Mn.parseError(e),!r.suppressErrors)throw Tt.error("Use the suppressErrors option to suppress these errors"),e}},"run"),sZ=M(async function({postRenderCallback:r,querySelector:e,nodes:i}={querySelector:".mermaid"}){const n=zl.getConfig();Tt.debug(`${r?"":"No "}Callback function found`);let a;if(i)a=i;else if(e)a=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");Tt.debug(`Found ${a.length} diagrams`),(n==null?void 0:n.startOnLoad)!==void 0&&(Tt.debug("Start On Load: "+(n==null?void 0:n.startOnLoad)),zl.updateSiteConfig({startOnLoad:n==null?void 0:n.startOnLoad}));const o=new ya.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let c;const h=[];for(const u of Array.from(a)){if(Tt.info("Rendering diagram: "+u.id),u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");const d=`mermaid-${o.next()}`;c=u.innerHTML,c=WO(ya.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>");const f=ya.detectInit(c);f&&Tt.debug("Detected early reinit: ",f);try{const{svg:g,bindFunctions:b}=await O5(d,c,u);u.innerHTML=g,r&&await r(d),b&&b(u)}catch(g){aZ(g,h,Mn.parseError)}}if(h.length>0)throw h[0]},"runThrowsErrors"),M5=M(function(r){zl.initialize(r)},"initialize"),oZ=M(async function(r,e,i){Tt.warn("mermaid.init is deprecated. Please use run instead."),r&&M5(r);const n={postRenderCallback:i,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await N5(n)},"init"),lZ=M(async(r,{lazyLoad:e=!0}={})=>{xm(),Fx(...r),e===!1&&await BX()},"registerExternalDiagrams"),B5=M(function(){if(Mn.startOnLoad){const{startOnLoad:r}=zl.getConfig();r&&Mn.run().catch(e=>Tt.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",B5,!1);var cZ=M(function(r){Mn.parseError=r},"setParseErrorHandler"),Ig=[],rb=!1,L5=M(async()=>{if(!rb){for(rb=!0;Ig.length>0;){const r=Ig.shift();if(r)try{await r()}catch(e){Tt.error("Error executing queue",e)}}rb=!1}},"executeQueue"),hZ=M(async(r,e)=>new Promise((i,n)=>{const a=M(()=>new Promise((o,c)=>{zl.parse(r,e).then(h=>{o(h),i(h)},h=>{var u;Tt.error("Error parsing",h),(u=Mn.parseError)==null||u.call(Mn,h),c(h),n(h)})}),"performCall");Ig.push(a),L5().catch(n)}),"parse"),O5=M((r,e,i)=>new Promise((n,a)=>{const o=M(()=>new Promise((c,h)=>{zl.render(r,e,i).then(u=>{c(u),n(u)},u=>{var d;Tt.error("Error parsing",u),(d=Mn.parseError)==null||d.call(Mn,u),h(u),a(u)})}),"performCall");Ig.push(o),L5().catch(a)}),"render"),uZ=M(()=>Object.keys(Ol).map(r=>({id:r})),"getRegisteredDiagramsMetadata"),Mn={startOnLoad:!0,mermaidAPI:zl,parse:hZ,render:O5,init:oZ,run:N5,registerExternalDiagrams:lZ,registerLayoutLoaders:j3,initialize:M5,parseError:void 0,contentLoaded:B5,setParseErrorHandler:cZ,detectType:k1,registerIconPacks:lW,getRegisteredDiagramsMetadata:uZ},E_=Mn;/*! Check if previously processed *//*!
412
+ * Wait for document loaded before starting the execution
413
+ */let rE=null;function dZ(r){const e="'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui, sans-serif";return r==="dark"?{startOnLoad:!1,securityLevel:"strict",theme:"base",themeVariables:{background:"#1c1f2a",primaryColor:"rgba(157, 140, 255, 0.18)",primaryTextColor:"#f5f6fa",primaryBorderColor:"#9d8cff",secondaryColor:"rgba(96, 165, 250, 0.18)",secondaryBorderColor:"#93c5fd",secondaryTextColor:"#f5f6fa",tertiaryColor:"rgba(74, 222, 128, 0.16)",tertiaryBorderColor:"#86efac",tertiaryTextColor:"#f5f6fa",noteBkgColor:"rgba(251, 191, 36, 0.18)",noteBorderColor:"#fcd34d",noteTextColor:"#fcd34d",lineColor:"#9aa0b3",textColor:"#f5f6fa",mainBkg:"rgba(157, 140, 255, 0.18)",nodeBorder:"#9d8cff",clusterBkg:"rgba(255, 255, 255, 0.04)",clusterBorder:"#3d4358",edgeLabelBackground:"#1c1f2a",fontFamily:e},flowchart:{htmlLabels:!0,curve:"basis",nodeSpacing:48,rankSpacing:64,padding:12},sequence:{actorFontFamily:e,noteFontFamily:e,messageFontFamily:e}}:{startOnLoad:!1,securityLevel:"strict",theme:"base",themeVariables:{background:"#ffffff",primaryColor:"#ede9fe",primaryTextColor:"#5b21b6",primaryBorderColor:"#7b68ee",secondaryColor:"#dbeafe",secondaryBorderColor:"#1d4ed8",secondaryTextColor:"#1d4ed8",tertiaryColor:"#dcfce7",tertiaryBorderColor:"#15803d",tertiaryTextColor:"#15803d",noteBkgColor:"#fef3c7",noteBorderColor:"#a16207",noteTextColor:"#a16207",lineColor:"#646464",textColor:"#292d34",mainBkg:"#ede9fe",nodeBorder:"#7b68ee",clusterBkg:"#f7f8f8",clusterBorder:"#e8e8e8",edgeLabelBackground:"#ffffff",fontFamily:e},flowchart:{htmlLabels:!0,curve:"basis",nodeSpacing:48,rankSpacing:64,padding:12},sequence:{actorFontFamily:e,noteFontFamily:e,messageFontFamily:e}}}function R5(r){rE!==r&&(E_.initialize(dZ(r)),rE=r)}function fZ(r){const e=r.getAttribute("style");if(!e)return;const i=e.split(";").filter(n=>{var o;const a=(o=n.trim().split(":")[0])==null?void 0:o.trim().toLowerCase();return a&&a!=="fill"&&a!=="stroke"&&a!=="color"}).join(";");i.trim()?r.setAttribute("style",i):r.removeAttribute("style")}function D5(r){const e=[".node > rect",".node > polygon",".node > path",".node > circle",".node .label",".node .label *",".node foreignObject *",".cluster > rect",".cluster > polygon",".cluster-label",".cluster-label *",".cluster-label foreignObject *",".edgeLabel",".edgeLabel rect",".edgeLabel foreignObject *",".edgePath path",".marker",".arrowheadPath"];r.querySelectorAll(e.join(", ")).forEach(fZ);const i=r.querySelector("style");if(i&&i.textContent){const n=i.textContent.replace(/#[\w-]+\s+\.[\w-]+\s*(?:>\s*\*|\s+span|\s+tspan)\s*\{[^}]*\}/g,"");i.textContent=n}}async function pZ(r,e){r.querySelectorAll(".mermaid-rendered").forEach(o=>{const c=o.dataset.mermaidSource;if(!c)return;const h=document.createElement("pre"),u=document.createElement("code");u.className="language-mermaid",u.textContent=c,h.appendChild(u),o.replaceWith(h)});const n=r.querySelectorAll("pre > code.language-mermaid");if(n.length===0)return;let a=0;for(const o of n){const c=o.parentElement;if(!c)continue;const h=(o.textContent??"").trim();if(!h)continue;const u=`${e}-${a++}-${Date.now().toString(36)}`,d=document.createElement("div");d.className="mermaid-rendered",d.dataset.mermaidSource=h;const f=document.createElement("div");f.className="mermaid-stage",d.appendChild(f),c.replaceWith(d);try{const{svg:g}=await E_.render(u,h);f.innerHTML=g;const b=f.querySelector("svg");b&&(b.removeAttribute("height"),b.style.maxWidth="100%",b.style.height="auto",D5(b))}catch(g){const b=g instanceof Error?g.message:String(g);f.innerHTML=`<div class="mermaid-error">Diagram error: ${b.replace(/[<>&]/g,m=>({"<":"&lt;",">":"&gt;","&":"&amp;"})[m]??m)}</div>`}}}function gZ(r,e,i,n="mmd"){K.useEffect(()=>{const a=r.current;if(!a||!e)return;R5(i);let o=!1;return queueMicrotask(()=>{o||pZ(a,n)}),()=>{o=!0}},[r,e,i,n])}var ib,iE;function mZ(){if(iE)return ib;iE=1;function r(tt){return tt instanceof Map?tt.clear=tt.delete=tt.set=function(){throw new Error("map is read-only")}:tt instanceof Set&&(tt.add=tt.clear=tt.delete=function(){throw new Error("set is read-only")}),Object.freeze(tt),Object.getOwnPropertyNames(tt).forEach(_t=>{const Ot=tt[_t],le=typeof Ot;(le==="object"||le==="function")&&!Object.isFrozen(Ot)&&r(Ot)}),tt}class e{constructor(_t){_t.data===void 0&&(_t.data={}),this.data=_t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function i(tt){return tt.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function n(tt,..._t){const Ot=Object.create(null);for(const le in tt)Ot[le]=tt[le];return _t.forEach(function(le){for(const Qe in le)Ot[Qe]=le[Qe]}),Ot}const a="</span>",o=tt=>!!tt.scope,c=(tt,{prefix:_t})=>{if(tt.startsWith("language:"))return tt.replace("language:","language-");if(tt.includes(".")){const Ot=tt.split(".");return[`${_t}${Ot.shift()}`,...Ot.map((le,Qe)=>`${le}${"_".repeat(Qe+1)}`)].join(" ")}return`${_t}${tt}`};class h{constructor(_t,Ot){this.buffer="",this.classPrefix=Ot.classPrefix,_t.walk(this)}addText(_t){this.buffer+=i(_t)}openNode(_t){if(!o(_t))return;const Ot=c(_t.scope,{prefix:this.classPrefix});this.span(Ot)}closeNode(_t){o(_t)&&(this.buffer+=a)}value(){return this.buffer}span(_t){this.buffer+=`<span class="${_t}">`}}const u=(tt={})=>{const _t={children:[]};return Object.assign(_t,tt),_t};class d{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(_t){this.top.children.push(_t)}openNode(_t){const Ot=u({scope:_t});this.add(Ot),this.stack.push(Ot)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(_t){return this.constructor._walk(_t,this.rootNode)}static _walk(_t,Ot){return typeof Ot=="string"?_t.addText(Ot):Ot.children&&(_t.openNode(Ot),Ot.children.forEach(le=>this._walk(_t,le)),_t.closeNode(Ot)),_t}static _collapse(_t){typeof _t!="string"&&_t.children&&(_t.children.every(Ot=>typeof Ot=="string")?_t.children=[_t.children.join("")]:_t.children.forEach(Ot=>{d._collapse(Ot)}))}}class f extends d{constructor(_t){super(),this.options=_t}addText(_t){_t!==""&&this.add(_t)}startScope(_t){this.openNode(_t)}endScope(){this.closeNode()}__addSublanguage(_t,Ot){const le=_t.root;Ot&&(le.scope=`language:${Ot}`),this.add(le)}toHTML(){return new h(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function g(tt){return tt?typeof tt=="string"?tt:tt.source:null}function b(tt){return _("(?=",tt,")")}function m(tt){return _("(?:",tt,")*")}function v(tt){return _("(?:",tt,")?")}function _(...tt){return tt.map(Ot=>g(Ot)).join("")}function C(tt){const _t=tt[tt.length-1];return typeof _t=="object"&&_t.constructor===Object?(tt.splice(tt.length-1,1),_t):{}}function w(...tt){return"("+(C(tt).capture?"":"?:")+tt.map(le=>g(le)).join("|")+")"}function T(tt){return new RegExp(tt.toString()+"|").exec("").length-1}function E(tt,_t){const Ot=tt&&tt.exec(_t);return Ot&&Ot.index===0}const N=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function O(tt,{joinWith:_t}){let Ot=0;return tt.map(le=>{Ot+=1;const Qe=Ot;let ue=g(le),Pt="";for(;ue.length>0;){const It=N.exec(ue);if(!It){Pt+=ue;break}Pt+=ue.substring(0,It.index),ue=ue.substring(It.index+It[0].length),It[0][0]==="\\"&&It[1]?Pt+="\\"+String(Number(It[1])+Qe):(Pt+=It[0],It[0]==="("&&Ot++)}return Pt}).map(le=>`(${le})`).join(_t)}const B=/\b\B/,A="[a-zA-Z]\\w*",L="[a-zA-Z_]\\w*",P="\\b\\d+(\\.\\d+)?",j="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",$="\\b(0b[01]+)",X="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",W=(tt={})=>{const _t=/^#![ ]*\//;return tt.binary&&(tt.begin=_(_t,/.*\b/,tt.binary,/\b.*/)),n({scope:"meta",begin:_t,end:/$/,relevance:0,"on:begin":(Ot,le)=>{Ot.index!==0&&le.ignoreMatch()}},tt)},F={begin:"\\\\[\\s\\S]",relevance:0},U={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[F]},D={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[F]},z={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},H=function(tt,_t,Ot={}){const le=n({scope:"comment",begin:tt,end:_t,contains:[]},Ot);le.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Qe=w("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return le.contains.push({begin:_(/[ ]+/,"(",Qe,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),le},V=H("//","$"),Q=H("/\\*","\\*/"),G=H("#","$"),J={scope:"number",begin:P,relevance:0},lt={scope:"number",begin:j,relevance:0},st={scope:"number",begin:$,relevance:0},vt={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[F,{begin:/\[/,end:/\]/,relevance:0,contains:[F]}]},kt={scope:"title",begin:A,relevance:0},Mt={scope:"title",begin:L,relevance:0},it={begin:"\\.\\s*"+L,relevance:0};var pt=Object.freeze({__proto__:null,APOS_STRING_MODE:U,BACKSLASH_ESCAPE:F,BINARY_NUMBER_MODE:st,BINARY_NUMBER_RE:$,COMMENT:H,C_BLOCK_COMMENT_MODE:Q,C_LINE_COMMENT_MODE:V,C_NUMBER_MODE:lt,C_NUMBER_RE:j,END_SAME_AS_BEGIN:function(tt){return Object.assign(tt,{"on:begin":(_t,Ot)=>{Ot.data._beginMatch=_t[1]},"on:end":(_t,Ot)=>{Ot.data._beginMatch!==_t[1]&&Ot.ignoreMatch()}})},HASH_COMMENT_MODE:G,IDENT_RE:A,MATCH_NOTHING_RE:B,METHOD_GUARD:it,NUMBER_MODE:J,NUMBER_RE:P,PHRASAL_WORDS_MODE:z,QUOTE_STRING_MODE:D,REGEXP_MODE:vt,RE_STARTERS_RE:X,SHEBANG:W,TITLE_MODE:kt,UNDERSCORE_IDENT_RE:L,UNDERSCORE_TITLE_MODE:Mt});function Et(tt,_t){tt.input[tt.index-1]==="."&&_t.ignoreMatch()}function Ut(tt,_t){tt.className!==void 0&&(tt.scope=tt.className,delete tt.className)}function Gt(tt,_t){_t&&tt.beginKeywords&&(tt.begin="\\b("+tt.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",tt.__beforeBegin=Et,tt.keywords=tt.keywords||tt.beginKeywords,delete tt.beginKeywords,tt.relevance===void 0&&(tt.relevance=0))}function ie(tt,_t){Array.isArray(tt.illegal)&&(tt.illegal=w(...tt.illegal))}function Dt(tt,_t){if(tt.match){if(tt.begin||tt.end)throw new Error("begin & end are not supported with match");tt.begin=tt.match,delete tt.match}}function Jt(tt,_t){tt.relevance===void 0&&(tt.relevance=1)}const Le=(tt,_t)=>{if(!tt.beforeMatch)return;if(tt.starts)throw new Error("beforeMatch cannot be used with starts");const Ot=Object.assign({},tt);Object.keys(tt).forEach(le=>{delete tt[le]}),tt.keywords=Ot.keywords,tt.begin=_(Ot.beforeMatch,b(Ot.begin)),tt.starts={relevance:0,contains:[Object.assign(Ot,{endsParent:!0})]},tt.relevance=0,delete Ot.beforeMatch},hr=["of","and","for","in","not","or","if","then","parent","list","value"],qr="keyword";function ve(tt,_t,Ot=qr){const le=Object.create(null);return typeof tt=="string"?Qe(Ot,tt.split(" ")):Array.isArray(tt)?Qe(Ot,tt):Object.keys(tt).forEach(function(ue){Object.assign(le,ve(tt[ue],_t,ue))}),le;function Qe(ue,Pt){_t&&(Pt=Pt.map(It=>It.toLowerCase())),Pt.forEach(function(It){const se=It.split("|");le[se[0]]=[ue,Ee(se[0],se[1])]})}}function Ee(tt,_t){return _t?Number(_t):Ge(tt)?0:1}function Ge(tt){return hr.includes(tt.toLowerCase())}const Ar={},Me=tt=>{console.error(tt)},Nr=(tt,..._t)=>{console.log(`WARN: ${tt}`,..._t)},yr=(tt,_t)=>{Ar[`${tt}/${_t}`]||(console.log(`Deprecated as of ${tt}. ${_t}`),Ar[`${tt}/${_t}`]=!0)},ii=new Error;function di(tt,_t,{key:Ot}){let le=0;const Qe=tt[Ot],ue={},Pt={};for(let It=1;It<=_t.length;It++)Pt[It+le]=Qe[It],ue[It+le]=!0,le+=T(_t[It-1]);tt[Ot]=Pt,tt[Ot]._emit=ue,tt[Ot]._multi=!0}function $i(tt){if(Array.isArray(tt.begin)){if(tt.skip||tt.excludeBegin||tt.returnBegin)throw Me("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ii;if(typeof tt.beginScope!="object"||tt.beginScope===null)throw Me("beginScope must be object"),ii;di(tt,tt.begin,{key:"beginScope"}),tt.begin=O(tt.begin,{joinWith:""})}}function Ur(tt){if(Array.isArray(tt.end)){if(tt.skip||tt.excludeEnd||tt.returnEnd)throw Me("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ii;if(typeof tt.endScope!="object"||tt.endScope===null)throw Me("endScope must be object"),ii;di(tt,tt.end,{key:"endScope"}),tt.end=O(tt.end,{joinWith:""})}}function aa(tt){tt.scope&&typeof tt.scope=="object"&&tt.scope!==null&&(tt.beginScope=tt.scope,delete tt.scope)}function sa(tt){aa(tt),typeof tt.beginScope=="string"&&(tt.beginScope={_wrap:tt.beginScope}),typeof tt.endScope=="string"&&(tt.endScope={_wrap:tt.endScope}),$i(tt),Ur(tt)}function Yr(tt){function _t(Pt,It){return new RegExp(g(Pt),"m"+(tt.case_insensitive?"i":"")+(tt.unicodeRegex?"u":"")+(It?"g":""))}class Ot{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(It,se){se.position=this.position++,this.matchIndexes[this.matchAt]=se,this.regexes.push([se,It]),this.matchAt+=T(It)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const It=this.regexes.map(se=>se[1]);this.matcherRe=_t(O(It,{joinWith:"|"}),!0),this.lastIndex=0}exec(It){this.matcherRe.lastIndex=this.lastIndex;const se=this.matcherRe.exec(It);if(!se)return null;const Je=se.findIndex((en,Pi)=>Pi>0&&en!==void 0),sr=this.matchIndexes[Je];return se.splice(0,Je),Object.assign(se,sr)}}class le{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(It){if(this.multiRegexes[It])return this.multiRegexes[It];const se=new Ot;return this.rules.slice(It).forEach(([Je,sr])=>se.addRule(Je,sr)),se.compile(),this.multiRegexes[It]=se,se}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(It,se){this.rules.push([It,se]),se.type==="begin"&&this.count++}exec(It){const se=this.getMatcher(this.regexIndex);se.lastIndex=this.lastIndex;let Je=se.exec(It);if(this.resumingScanAtSamePosition()&&!(Je&&Je.index===this.lastIndex)){const sr=this.getMatcher(0);sr.lastIndex=this.lastIndex+1,Je=sr.exec(It)}return Je&&(this.regexIndex+=Je.position+1,this.regexIndex===this.count&&this.considerAll()),Je}}function Qe(Pt){const It=new le;return Pt.contains.forEach(se=>It.addRule(se.begin,{rule:se,type:"begin"})),Pt.terminatorEnd&&It.addRule(Pt.terminatorEnd,{type:"end"}),Pt.illegal&&It.addRule(Pt.illegal,{type:"illegal"}),It}function ue(Pt,It){const se=Pt;if(Pt.isCompiled)return se;[Ut,Dt,sa,Le].forEach(sr=>sr(Pt,It)),tt.compilerExtensions.forEach(sr=>sr(Pt,It)),Pt.__beforeBegin=null,[Gt,ie,Jt].forEach(sr=>sr(Pt,It)),Pt.isCompiled=!0;let Je=null;return typeof Pt.keywords=="object"&&Pt.keywords.$pattern&&(Pt.keywords=Object.assign({},Pt.keywords),Je=Pt.keywords.$pattern,delete Pt.keywords.$pattern),Je=Je||/\w+/,Pt.keywords&&(Pt.keywords=ve(Pt.keywords,tt.case_insensitive)),se.keywordPatternRe=_t(Je,!0),It&&(Pt.begin||(Pt.begin=/\B|\b/),se.beginRe=_t(se.begin),!Pt.end&&!Pt.endsWithParent&&(Pt.end=/\B|\b/),Pt.end&&(se.endRe=_t(se.end)),se.terminatorEnd=g(se.end)||"",Pt.endsWithParent&&It.terminatorEnd&&(se.terminatorEnd+=(Pt.end?"|":"")+It.terminatorEnd)),Pt.illegal&&(se.illegalRe=_t(Pt.illegal)),Pt.contains||(Pt.contains=[]),Pt.contains=[].concat(...Pt.contains.map(function(sr){return yi(sr==="self"?Pt:sr)})),Pt.contains.forEach(function(sr){ue(sr,se)}),Pt.starts&&ue(Pt.starts,It),se.matcher=Qe(se),se}if(tt.compilerExtensions||(tt.compilerExtensions=[]),tt.contains&&tt.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return tt.classNameAliases=n(tt.classNameAliases||{}),ue(tt)}function Cr(tt){return tt?tt.endsWithParent||Cr(tt.starts):!1}function yi(tt){return tt.variants&&!tt.cachedVariants&&(tt.cachedVariants=tt.variants.map(function(_t){return n(tt,{variants:null},_t)})),tt.cachedVariants?tt.cachedVariants:Cr(tt)?n(tt,{starts:tt.starts?n(tt.starts):null}):Object.isFrozen(tt)?n(tt):tt}var kr="11.11.1";class On extends Error{constructor(_t,Ot){super(_t),this.name="HTMLInjectionError",this.html=Ot}}const Vr=i,zi=n,Ae=Symbol("nomatch"),bi=7,xi=function(tt){const _t=Object.create(null),Ot=Object.create(null),le=[];let Qe=!0;const ue="Could not find the language '{}', did you forget to load/include a language module?",Pt={disableAutodetect:!0,name:"Plain text",contains:[]};let It={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:f};function se(ct){return It.noHighlightRe.test(ct)}function Je(ct){let Bt=ct.className+" ";Bt+=ct.parentNode?ct.parentNode.className:"";const Ft=It.languageDetectRe.exec(Bt);if(Ft){const te=ni(Ft[1]);return te||(Nr(ue.replace("{}",Ft[1])),Nr("Falling back to no-highlight mode for this block.",ct)),te?Ft[1]:"no-highlight"}return Bt.split(/\s+/).find(te=>se(te)||ni(te))}function sr(ct,Bt,Ft){let te="",Oe="";typeof Bt=="object"?(te=ct,Ft=Bt.ignoreIllegals,Oe=Bt.language):(yr("10.7.0","highlight(lang, code, ...args) has been deprecated."),yr("10.7.0",`Please use highlight(code, options) instead.
414
+ https://github.com/highlightjs/highlight.js/issues/2277`),Oe=ct,te=Bt),Ft===void 0&&(Ft=!0);const er={code:te,language:Oe};Y("before:highlight",er);const Pe=er.result?er.result:en(er.language,er.code,Ft);return Pe.code=er.code,Y("after:highlight",Pe),Pe}function en(ct,Bt,Ft,te){const Oe=Object.create(null);function er(Rt,Xt){return Rt.keywords[Xt]}function Pe(){if(!jt.keywords){Be.addText(Fe);return}let Rt=0;jt.keywordPatternRe.lastIndex=0;let Xt=jt.keywordPatternRe.exec(Fe),_e="";for(;Xt;){_e+=Fe.substring(Rt,Xt.index);const je=At.case_insensitive?Xt[0].toLowerCase():Xt[0],Br=er(jt,je);if(Br){const[$n,Ah]=Br;if(Be.addText(_e),_e="",Oe[je]=(Oe[je]||0)+1,Oe[je]<=bi&&(Mi+=Ah),$n.startsWith("_"))_e+=Xt[0];else{const Jd=At.classNameAliases[$n]||$n;Dr(Xt[0],Jd)}}else _e+=Xt[0];Rt=jt.keywordPatternRe.lastIndex,Xt=jt.keywordPatternRe.exec(Fe)}_e+=Fe.substring(Rt),Be.addText(_e)}function Mr(){if(Fe==="")return;let Rt=null;if(typeof jt.subLanguage=="string"){if(!_t[jt.subLanguage]){Be.addText(Fe);return}Rt=en(jt.subLanguage,Fe,!0,We[jt.subLanguage]),We[jt.subLanguage]=Rt._top}else Rt=Kr(Fe,jt.subLanguage.length?jt.subLanguage:null);jt.relevance>0&&(Mi+=Rt.relevance),Be.__addSublanguage(Rt._emitter,Rt.language)}function ye(){jt.subLanguage!=null?Mr():Pe(),Fe=""}function Dr(Rt,Xt){Rt!==""&&(Be.startScope(Xt),Be.addText(Rt),Be.endScope())}function Fn(Rt,Xt){let _e=1;const je=Xt.length-1;for(;_e<=je;){if(!Rt._emit[_e]){_e++;continue}const Br=At.classNameAliases[Rt[_e]]||Rt[_e],$n=Xt[_e];Br?Dr($n,Br):(Fe=$n,Pe(),Fe=""),_e++}}function oa(Rt,Xt){return Rt.scope&&typeof Rt.scope=="string"&&Be.openNode(At.classNameAliases[Rt.scope]||Rt.scope),Rt.beginScope&&(Rt.beginScope._wrap?(Dr(Fe,At.classNameAliases[Rt.beginScope._wrap]||Rt.beginScope._wrap),Fe=""):Rt.beginScope._multi&&(Fn(Rt.beginScope,Xt),Fe="")),jt=Object.create(Rt,{parent:{value:jt}}),jt}function zs(Rt,Xt,_e){let je=E(Rt.endRe,_e);if(je){if(Rt["on:end"]){const Br=new e(Rt);Rt["on:end"](Xt,Br),Br.isMatchIgnored&&(je=!1)}if(je){for(;Rt.endsParent&&Rt.parent;)Rt=Rt.parent;return Rt}}if(Rt.endsWithParent)return zs(Rt.parent,Xt,_e)}function Qa(Rt){return jt.matcher.regexIndex===0?(Fe+=Rt[0],1):(qs=!0,0)}function Po(Rt){const Xt=Rt[0],_e=Rt.rule,je=new e(_e),Br=[_e.__beforeBegin,_e["on:begin"]];for(const $n of Br)if($n&&($n(Rt,je),je.isMatchIgnored))return Qa(Xt);return _e.skip?Fe+=Xt:(_e.excludeBegin&&(Fe+=Xt),ye(),!_e.returnBegin&&!_e.excludeBegin&&(Fe=Xt)),oa(_e,Rt),_e.returnBegin?0:Xt.length}function _i(Rt){const Xt=Rt[0],_e=Bt.substring(Rt.index),je=zs(jt,Rt,_e);if(!je)return Ae;const Br=jt;jt.endScope&&jt.endScope._wrap?(ye(),Dr(Xt,jt.endScope._wrap)):jt.endScope&&jt.endScope._multi?(ye(),Fn(jt.endScope,Rt)):Br.skip?Fe+=Xt:(Br.returnEnd||Br.excludeEnd||(Fe+=Xt),ye(),Br.excludeEnd&&(Fe=Xt));do jt.scope&&Be.closeNode(),!jt.skip&&!jt.subLanguage&&(Mi+=jt.relevance),jt=jt.parent;while(jt!==je.parent);return je.starts&&oa(je.starts,Rt),Br.returnEnd?0:Xt.length}function jn(){const Rt=[];for(let Xt=jt;Xt!==At;Xt=Xt.parent)Xt.scope&&Rt.unshift(Xt.scope);Rt.forEach(Xt=>Be.openNode(Xt))}let dt={};function Nt(Rt,Xt){const _e=Xt&&Xt[0];if(Fe+=Rt,_e==null)return ye(),0;if(dt.type==="begin"&&Xt.type==="end"&&dt.index===Xt.index&&_e===""){if(Fe+=Bt.slice(Xt.index,Xt.index+1),!Qe){const je=new Error(`0 width match regex (${ct})`);throw je.languageName=ct,je.badRule=dt.rule,je}return 1}if(dt=Xt,Xt.type==="begin")return Po(Xt);if(Xt.type==="illegal"&&!Ft){const je=new Error('Illegal lexeme "'+_e+'" for mode "'+(jt.scope||"<unnamed>")+'"');throw je.mode=jt,je}else if(Xt.type==="end"){const je=_i(Xt);if(je!==Ae)return je}if(Xt.type==="illegal"&&_e==="")return Fe+=`
415
+ `,1;if(Ps>1e5&&Ps>Xt.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Fe+=_e,_e.length}const At=ni(ct);if(!At)throw Me(ue.replace("{}",ct)),new Error('Unknown language: "'+ct+'"');const $t=Yr(At);let we="",jt=te||$t;const We={},Be=new It.__emitter(It);jn();let Fe="",Mi=0,In=0,Ps=0,qs=!1;try{if(At.__emitTokens)At.__emitTokens(Bt,Be);else{for(jt.matcher.considerAll();;){Ps++,qs?qs=!1:jt.matcher.considerAll(),jt.matcher.lastIndex=In;const Rt=jt.matcher.exec(Bt);if(!Rt)break;const Xt=Bt.substring(In,Rt.index),_e=Nt(Xt,Rt);In=Rt.index+_e}Nt(Bt.substring(In))}return Be.finalize(),we=Be.toHTML(),{language:ct,value:we,relevance:Mi,illegal:!1,_emitter:Be,_top:jt}}catch(Rt){if(Rt.message&&Rt.message.includes("Illegal"))return{language:ct,value:Vr(Bt),illegal:!0,relevance:0,_illegalBy:{message:Rt.message,index:In,context:Bt.slice(In-100,In+100),mode:Rt.mode,resultSoFar:we},_emitter:Be};if(Qe)return{language:ct,value:Vr(Bt),illegal:!1,relevance:0,errorRaised:Rt,_emitter:Be,_top:jt};throw Rt}}function Pi(ct){const Bt={value:Vr(ct),illegal:!1,relevance:0,_top:Pt,_emitter:new It.__emitter(It)};return Bt._emitter.addText(ct),Bt}function Kr(ct,Bt){Bt=Bt||It.languages||Object.keys(_t);const Ft=Pi(ct),te=Bt.filter(ni).filter(rn).map(ye=>en(ye,ct,!1));te.unshift(Ft);const Oe=te.sort((ye,Dr)=>{if(ye.relevance!==Dr.relevance)return Dr.relevance-ye.relevance;if(ye.language&&Dr.language){if(ni(ye.language).supersetOf===Dr.language)return 1;if(ni(Dr.language).supersetOf===ye.language)return-1}return 0}),[er,Pe]=Oe,Mr=er;return Mr.secondBest=Pe,Mr}function Xr(ct,Bt,Ft){const te=Bt&&Ot[Bt]||Ft;ct.classList.add("hljs"),ct.classList.add(`language-${te}`)}function pr(ct){let Bt=null;const Ft=Je(ct);if(se(Ft))return;if(Y("before:highlightElement",{el:ct,language:Ft}),ct.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ct);return}if(ct.children.length>0&&(It.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(ct)),It.throwUnescapedHTML))throw new On("One of your code blocks includes unescaped HTML.",ct.innerHTML);Bt=ct;const te=Bt.textContent,Oe=Ft?sr(te,{language:Ft,ignoreIllegals:!0}):Kr(te);ct.innerHTML=Oe.value,ct.dataset.highlighted="yes",Xr(ct,Ft,Oe.language),ct.result={language:Oe.language,re:Oe.relevance,relevance:Oe.relevance},Oe.secondBest&&(ct.secondBest={language:Oe.secondBest.language,relevance:Oe.secondBest.relevance}),Y("after:highlightElement",{el:ct,result:Oe,text:te})}function Rr(ct){It=zi(It,ct)}const yn=()=>{xn(),yr("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Rn(){xn(),yr("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let bn=!1;function xn(){function ct(){xn()}if(document.readyState==="loading"){bn||window.addEventListener("DOMContentLoaded",ct,!1),bn=!0;return}document.querySelectorAll(It.cssSelector).forEach(pr)}function vi(ct,Bt){let Ft=null;try{Ft=Bt(tt)}catch(te){if(Me("Language definition for '{}' could not be registered.".replace("{}",ct)),Qe)Me(te);else throw te;Ft=Pt}Ft.name||(Ft.name=ct),_t[ct]=Ft,Ft.rawDefinition=Bt.bind(null,tt),Ft.aliases&&qi(Ft.aliases,{languageName:ct})}function Dn(ct){delete _t[ct];for(const Bt of Object.keys(Ot))Ot[Bt]===ct&&delete Ot[Bt]}function Ta(){return Object.keys(_t)}function ni(ct){return ct=(ct||"").toLowerCase(),_t[ct]||_t[Ot[ct]]}function qi(ct,{languageName:Bt}){typeof ct=="string"&&(ct=[ct]),ct.forEach(Ft=>{Ot[Ft.toLowerCase()]=Bt})}function rn(ct){const Bt=ni(ct);return Bt&&!Bt.disableAutodetect}function ai(ct){ct["before:highlightBlock"]&&!ct["before:highlightElement"]&&(ct["before:highlightElement"]=Bt=>{ct["before:highlightBlock"](Object.assign({block:Bt.el},Bt))}),ct["after:highlightBlock"]&&!ct["after:highlightElement"]&&(ct["after:highlightElement"]=Bt=>{ct["after:highlightBlock"](Object.assign({block:Bt.el},Bt))})}function tr(ct){ai(ct),le.push(ct)}function Ht(ct){const Bt=le.indexOf(ct);Bt!==-1&&le.splice(Bt,1)}function Y(ct,Bt){const Ft=ct;le.forEach(function(te){te[Ft]&&te[Ft](Bt)})}function bt(ct){return yr("10.7.0","highlightBlock will be removed entirely in v12.0"),yr("10.7.0","Please use highlightElement now."),pr(ct)}Object.assign(tt,{highlight:sr,highlightAuto:Kr,highlightAll:xn,highlightElement:pr,highlightBlock:bt,configure:Rr,initHighlighting:yn,initHighlightingOnLoad:Rn,registerLanguage:vi,unregisterLanguage:Dn,listLanguages:Ta,getLanguage:ni,registerAliases:qi,autoDetection:rn,inherit:zi,addPlugin:tr,removePlugin:Ht}),tt.debugMode=function(){Qe=!1},tt.safeMode=function(){Qe=!0},tt.versionString=kr,tt.regex={concat:_,lookahead:b,either:w,optional:v,anyNumberOfTimes:m};for(const ct in pt)typeof pt[ct]=="object"&&r(pt[ct]);return Object.assign(tt,pt),tt},Or=xi({});return Or.newInstance=()=>xi({}),ib=Or,Or.HighlightJS=Or,Or.default=Or,ib}var nb,nE;function yZ(){if(nE)return nb;nE=1;function r(e){const i=e.regex,n=i.concat(/[\p{L}_]/u,i.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),a=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},c={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},h=e.inherit(c,{begin:/\(/,end:/\)/}),u=e.inherit(e.APOS_STRING_MODE,{className:"string"}),d=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),f={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:a,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[o]},{begin:/'/,end:/'/,contains:[o]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[c,d,u,h,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[c,h,d,u]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[d]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[f],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[f],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:i.concat(/</,i.lookahead(i.concat(n,i.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:f}]},{className:"tag",begin:i.concat(/<\//,i.lookahead(i.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}return nb=r,nb}var ab,aE;function bZ(){if(aE)return ab;aE=1;function r(e){const i=e.regex,n={},a={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:i.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},c=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),h={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},u={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(u);const d={match:/\\"/},f={className:"string",begin:/'/,end:/'/},g={match:/\\'/},b={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},m=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],v=e.SHEBANG({binary:`(${m.join("|")})`,relevance:10}),_={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},C=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],w=["true","false"],T={match:/(\/[a-z._-]+)+/},E=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],N=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],O=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],B=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:C,literal:w,built_in:[...E,...N,"set","shopt",...O,...B]},contains:[v,e.SHEBANG(),_,b,c,h,T,u,d,f,g,n]}}return ab=r,ab}var sb,sE;function xZ(){if(sE)return sb;sE=1;function r(e){const i=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",h="("+a+"|"+i.optional(o)+"[a-zA-Z_]\\w*"+i.optional("<[^<>]+>")+")",u={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},b={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},m={className:"title",begin:i.optional(o)+e.IDENT_RE,relevance:0},v=i.optional(o)+e.IDENT_RE+"\\s*\\(",w={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},T=[b,u,n,e.C_BLOCK_COMMENT_MODE,g,f],E={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:w,contains:T.concat([{begin:/\(/,end:/\)/,keywords:w,contains:T.concat(["self"]),relevance:0}]),relevance:0},N={begin:"("+h+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:w,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:w,relevance:0},{begin:v,returnBegin:!0,contains:[e.inherit(m,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,g,u,{begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,g,u]}]},u,n,e.C_BLOCK_COMMENT_MODE,b]};return{name:"C",aliases:["h"],keywords:w,disableAutodetect:!0,illegal:"</",contains:[].concat(E,N,T,[b,{begin:e.IDENT_RE+"::",keywords:w},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:b,strings:f,keywords:w}}}return sb=r,sb}var ob,oE;function vZ(){if(oE)return ob;oE=1;function r(e){const i=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",h="(?!struct)("+a+"|"+i.optional(o)+"[a-zA-Z_]\\w*"+i.optional("<[^<>]+>")+")",u={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},b={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},m={className:"title",begin:i.optional(o)+e.IDENT_RE,relevance:0},v=i.optional(o)+e.IDENT_RE+"\\s*\\(",_=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],C=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],w=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],T=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],O={type:C,keyword:_,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:w},B={className:"function.dispatch",relevance:0,keywords:{_hint:T},begin:i.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,i.lookahead(/(<[^<>]+>|)\s*\(/))},A=[B,b,u,n,e.C_BLOCK_COMMENT_MODE,g,f],L={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:O,contains:A.concat([{begin:/\(/,end:/\)/,keywords:O,contains:A.concat(["self"]),relevance:0}]),relevance:0},P={className:"function",begin:"("+h+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:O,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:O,relevance:0},{begin:v,returnBegin:!0,contains:[m],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[f,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,g,u,{begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,g,u]}]},u,n,e.C_BLOCK_COMMENT_MODE,b]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:O,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(L,P,B,A,[b,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:O,contains:["self",u]},{begin:e.IDENT_RE+"::",keywords:O},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return ob=r,ob}var lb,lE;function _Z(){if(lE)return lb;lE=1;function r(e){const i=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],a=["default","false","null","true"],o=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],c=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],h={keyword:o.concat(c),built_in:i,literal:a},u=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},f={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},g={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},b=e.inherit(g,{illegal:/\n/}),m={className:"subst",begin:/\{/,end:/\}/,keywords:h},v=e.inherit(m,{illegal:/\n/}),_={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,v]},C={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},m]},w=e.inherit(C,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});m.contains=[C,_,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.C_BLOCK_COMMENT_MODE],v.contains=[w,_,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const T={variants:[f,C,_,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},E={begin:"<",end:">",contains:[{beginKeywords:"in out"},u]},N=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",O={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:h,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},T,d,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},u,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+N+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:h,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,E],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:h,relevance:0,contains:[T,d,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},O]}}return lb=r,lb}var cb,cE;function CZ(){if(cE)return cb;cE=1;const r=d=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:d.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[d.APOS_STRING_MODE,d.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:d.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],i=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],n=[...e,...i],a=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),h=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(d){const f=d.regex,g=r(d),b={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},m="and or not only",v=/@-?\w[\w]*(-\w+)*/,_="[a-zA-Z-][a-zA-Z0-9_-]*",C=[d.APOS_STRING_MODE,d.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[g.BLOCK_COMMENT,b,g.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+_,relevance:0},g.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+o.join("|")+")"},{begin:":(:)?("+c.join("|")+")"}]},g.CSS_VARIABLE,{className:"attribute",begin:"\\b("+h.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[g.BLOCK_COMMENT,g.HEXCOLOR,g.IMPORTANT,g.CSS_NUMBER_MODE,...C,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...C,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},g.FUNCTION_DISPATCH]},{begin:f.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:v},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:m,attribute:a.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...C,g.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+n.join("|")+")\\b"}]}}return cb=u,cb}var hb,hE;function kZ(){if(hE)return hb;hE=1;function r(e){const i=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},a={begin:"^[-\\*]{3,}",end:"$"},o={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},c={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},h={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},u=/[A-Za-z][A-Za-z0-9+.-]*/,d={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:i.concat(/\[.+?\]\(/,u,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},f={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},g={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},b=e.inherit(f,{contains:[]}),m=e.inherit(g,{contains:[]});f.contains.push(m),g.contains.push(b);let v=[n,d];return[f,g,b,m].forEach(T=>{T.contains=T.contains.concat(v)}),v=v.concat(f,g),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:v},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:v}]}]},n,c,f,g,{className:"quote",begin:"^>\\s+",contains:v,end:"$"},o,a,d,h,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return hb=r,hb}var ub,uE;function wZ(){if(uE)return ub;uE=1;function r(e){const i=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:i.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:i.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}return ub=r,ub}var db,dE;function SZ(){if(dE)return db;dE=1;function r(e){const i=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=i.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=i.concat(a,/(::\w+)*/),h={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},u={className:"doctag",begin:"@[A-Za-z]+"},d={begin:"#<",end:">"},f=[e.COMMENT("#","$",{contains:[u]}),e.COMMENT("^=begin","^=end",{contains:[u],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],g={className:"subst",begin:/#\{/,end:/\}/,keywords:h},b={className:"string",contains:[e.BACKSLASH_ESCAPE,g],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:i.concat(/<<[-~]?'?/,i.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,g]})]}]},m="[1-9](_?[0-9])*|0",v="[0-9](_?[0-9])*",_={className:"number",relevance:0,variants:[{begin:`\\b(${m})(\\.(${v}))?([eE][+-]?(${v})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},C={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:h}]},A=[b,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:h},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:h},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[C]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[b,{begin:n}],relevance:0},_,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:h},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,g],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(d,f),relevance:0}].concat(d,f);g.contains=A,C.contains=A;const $=[{begin:/^\s*=>/,starts:{end:"$",contains:A}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:h,contains:A}}];return f.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:h,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat($).concat(f).concat(A)}}return db=r,db}var fb,fE;function TZ(){if(fE)return fb;fE=1;function r(e){const c={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:c,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:c,illegal:/["']/}]}]}}return fb=r,fb}var pb,pE;function EZ(){if(pE)return pb;pE=1;function r(e){const i=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:i.concat(n,i.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}return pb=r,pb}var gb,gE;function AZ(){if(gE)return gb;gE=1;function r(e){const i=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},a=e.COMMENT();a.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const o={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},c={className:"literal",begin:/\bon|off|true|false|yes|no\b/},h={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},u={begin:/\[/,end:/\]/,contains:[a,c,o,h,n,"self"],relevance:0},d=/[A-Za-z0-9_-]+/,f=/"(\\"|[^"])*"/,g=/'[^']*'/,b=i.either(d,f,g),m=i.concat(b,"(\\s*\\.\\s*",b,")*",i.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[a,{className:"section",begin:/\[+/,end:/\]+/},{begin:m,className:"attr",starts:{end:/$/,contains:[a,u,c,o,h,n]}}]}}return gb=r,gb}var mb,mE;function NZ(){if(mE)return mb;mE=1;var r="[0-9](_*[0-9])*",e=`\\.(${r})`,i="[0-9a-fA-F](_*[0-9a-fA-F])*",n={className:"number",variants:[{begin:`(\\b(${r})((${e})|\\.)?|(${e}))[eE][+-]?(${r})[fFdD]?\\b`},{begin:`\\b(${r})((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${e})[fFdD]?\\b`},{begin:`\\b(${r})[fFdD]\\b`},{begin:`\\b0[xX]((${i})\\.?|(${i})?\\.(${i}))[pP][+-]?(${r})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${i})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function a(c,h,u){return u===-1?"":c.replace(h,d=>a(c,h,u-1))}function o(c){const h=c.regex,u="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",d=u+a("(?:<"+u+"~~~(?:\\s*,\\s*"+u+"~~~)*>)?",/~~~/g,2),v={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},_={className:"meta",begin:"@"+u,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},C={className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[c.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:v,illegal:/<\/|#/,contains:[c.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[c.BACKSLASH_ESCAPE]},c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,u],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[h.concat(/(?!else)/,u),/\s+/,u,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,u],className:{1:"keyword",3:"title.class"},contains:[C,c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+d+"\\s+)",c.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:v,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[_,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,n,c.C_BLOCK_COMMENT_MODE]},c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE]},n,_]}}return mb=o,mb}var yb,yE;function MZ(){if(yE)return yb;yE=1;const r="[A-Za-z$_][0-9A-Za-z$_]*",e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],i=["true","false","null","undefined","NaN","Infinity"],n=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],a=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],o=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],h=[].concat(o,n,a);function u(d){const f=d.regex,g=(Mt,{after:it})=>{const xt="</"+Mt[0].slice(1);return Mt.input.indexOf(xt,it)!==-1},b=r,m={begin:"<>",end:"</>"},v=/<[A-Za-z0-9\\._:-]+\s*\/>/,_={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Mt,it)=>{const xt=Mt[0].length+Mt.index,pt=Mt.input[xt];if(pt==="<"||pt===","){it.ignoreMatch();return}pt===">"&&(g(Mt,{after:xt})||it.ignoreMatch());let Et;const Ut=Mt.input.substring(xt);if(Et=Ut.match(/^\s*=/)){it.ignoreMatch();return}if((Et=Ut.match(/^\s+extends\s+/))&&Et.index===0){it.ignoreMatch();return}}},C={$pattern:r,keyword:e,literal:i,built_in:h,"variable.language":c},w="[0-9](_?[0-9])*",T=`\\.(${w})`,E="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",N={className:"number",variants:[{begin:`(\\b(${E})((${T})|\\.)?|(${T}))[eE][+-]?(${w})\\b`},{begin:`\\b(${E})\\b((${T})\\b|\\.)?|(${T})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},O={className:"subst",begin:"\\$\\{",end:"\\}",keywords:C,contains:[]},B={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,O],subLanguage:"xml"}},A={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,O],subLanguage:"css"}},L={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,O],subLanguage:"graphql"}},P={className:"string",begin:"`",end:"`",contains:[d.BACKSLASH_ESCAPE,O]},$={className:"comment",variants:[d.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:b+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),d.C_BLOCK_COMMENT_MODE,d.C_LINE_COMMENT_MODE]},X=[d.APOS_STRING_MODE,d.QUOTE_STRING_MODE,B,A,L,P,{match:/\$\d+/},N];O.contains=X.concat({begin:/\{/,end:/\}/,keywords:C,contains:["self"].concat(X)});const W=[].concat($,O.contains),F=W.concat([{begin:/(\s*)\(/,end:/\)/,keywords:C,contains:["self"].concat(W)}]),U={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:C,contains:F},D={variants:[{match:[/class/,/\s+/,b,/\s+/,/extends/,/\s+/,f.concat(b,"(",f.concat(/\./,b),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,b],scope:{1:"keyword",3:"title.class"}}]},z={relevance:0,match:f.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...n,...a]}},H={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},V={variants:[{match:[/function/,/\s+/,b,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[U],illegal:/%/},Q={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function G(Mt){return f.concat("(?!",Mt.join("|"),")")}const J={match:f.concat(/\b/,G([...o,"super","import"].map(Mt=>`${Mt}\\s*\\(`)),b,f.lookahead(/\s*\(/)),className:"title.function",relevance:0},lt={begin:f.concat(/\./,f.lookahead(f.concat(b,/(?![0-9A-Za-z$_(])/))),end:b,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},st={match:[/get|set/,/\s+/,b,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},U]},vt="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+d.UNDERSCORE_IDENT_RE+")\\s*=>",kt={match:[/const|var|let/,/\s+/,b,/\s*/,/=\s*/,/(async\s*)?/,f.lookahead(vt)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[U]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:C,exports:{PARAMS_CONTAINS:F,CLASS_REFERENCE:z},illegal:/#(?![$_A-z])/,contains:[d.SHEBANG({label:"shebang",binary:"node",relevance:5}),H,d.APOS_STRING_MODE,d.QUOTE_STRING_MODE,B,A,L,P,$,{match:/\$\d+/},N,z,{scope:"attr",match:b+f.lookahead(":"),relevance:0},kt,{begin:"("+d.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[$,d.REGEXP_MODE,{className:"function",begin:vt,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:d.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:C,contains:F}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:m.begin,end:m.end},{match:v},{begin:_.begin,"on:begin":_.isTrulyOpeningTag,end:_.end}],subLanguage:"xml",contains:[{begin:_.begin,end:_.end,skip:!0,contains:["self"]}]}]},V,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+d.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[U,d.inherit(d.TITLE_MODE,{begin:b,className:"title.function"})]},{match:/\.\.\./,relevance:0},lt,{match:"\\$"+b,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[U]},J,Q,D,st,{match:/\$[(.]/}]}}return yb=u,yb}var bb,bE;function BZ(){if(bE)return bb;bE=1;function r(e){const i={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},a=["true","false","null"],o={scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:a},contains:[i,n,e.QUOTE_STRING_MODE,o,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}return bb=r,bb}var xb,xE;function LZ(){if(xE)return xb;xE=1;var r="[0-9](_*[0-9])*",e=`\\.(${r})`,i="[0-9a-fA-F](_*[0-9a-fA-F])*",n={className:"number",variants:[{begin:`(\\b(${r})((${e})|\\.)?|(${e}))[eE][+-]?(${r})[fFdD]?\\b`},{begin:`\\b(${r})((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${e})[fFdD]?\\b`},{begin:`\\b(${r})[fFdD]\\b`},{begin:`\\b0[xX]((${i})\\.?|(${i})?\\.(${i}))[pP][+-]?(${r})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${i})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function a(o){const c={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},h={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},u={className:"symbol",begin:o.UNDERSCORE_IDENT_RE+"@"},d={className:"subst",begin:/\$\{/,end:/\}/,contains:[o.C_NUMBER_MODE]},f={className:"variable",begin:"\\$"+o.UNDERSCORE_IDENT_RE},g={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[f,d]},{begin:"'",end:"'",illegal:/\n/,contains:[o.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[o.BACKSLASH_ESCAPE,f,d]}]};d.contains.push(g);const b={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+o.UNDERSCORE_IDENT_RE+")?"},m={className:"meta",begin:"@"+o.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[o.inherit(g,{className:"string"}),"self"]}]},v=n,_=o.COMMENT("/\\*","\\*/",{contains:[o.C_BLOCK_COMMENT_MODE]}),C={variants:[{className:"type",begin:o.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},w=C;return w.variants[1].contains=[C],C.variants[1].contains=[w],{name:"Kotlin",aliases:["kt","kts"],keywords:c,contains:[o.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),o.C_LINE_COMMENT_MODE,_,h,u,b,m,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:c,relevance:5,contains:[{begin:o.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[o.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:c,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[C,o.C_LINE_COMMENT_MODE,_],relevance:0},o.C_LINE_COMMENT_MODE,_,b,m,g,o.C_NUMBER_MODE]},_]},{begin:[/class|interface|trait/,/\s+/,o.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},o.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},b,m]},g,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
416
+ `},v]}}return xb=a,xb}var vb,vE;function OZ(){if(vE)return vb;vE=1;const r=f=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:f.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[f.APOS_STRING_MODE,f.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:f.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],i=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],n=[...e,...i],a=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),h=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),u=o.concat(c).sort().reverse();function d(f){const g=r(f),b=u,m="and or not only",v="[\\w-]+",_="("+v+"|@\\{"+v+"\\})",C=[],w=[],T=function(W){return{className:"string",begin:"~?"+W+".*?"+W}},E=function(W,F,U){return{className:W,begin:F,relevance:U}},N={$pattern:/[a-z-]+/,keyword:m,attribute:a.join(" ")},O={begin:"\\(",end:"\\)",contains:w,keywords:N,relevance:0};w.push(f.C_LINE_COMMENT_MODE,f.C_BLOCK_COMMENT_MODE,T("'"),T('"'),g.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},g.HEXCOLOR,O,E("variable","@@?"+v,10),E("variable","@\\{"+v+"\\}"),E("built_in","~?`[^`]*?`"),{className:"attribute",begin:v+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},g.IMPORTANT,{beginKeywords:"and not"},g.FUNCTION_DISPATCH);const B=w.concat({begin:/\{/,end:/\}/,contains:C}),A={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(w)},L={begin:_+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},g.CSS_VARIABLE,{className:"attribute",begin:"\\b("+h.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:w}}]},P={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:N,returnEnd:!0,contains:w,relevance:0}},j={className:"variable",variants:[{begin:"@"+v+"\\s*:",relevance:15},{begin:"@"+v}],starts:{end:"[;}]",returnEnd:!0,contains:B}},$={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:_,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[f.C_LINE_COMMENT_MODE,f.C_BLOCK_COMMENT_MODE,A,E("keyword","all\\b"),E("variable","@\\{"+v+"\\}"),{begin:"\\b("+n.join("|")+")\\b",className:"selector-tag"},g.CSS_NUMBER_MODE,E("selector-tag",_,0),E("selector-id","#"+_),E("selector-class","\\."+_,0),E("selector-tag","&",0),g.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+o.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+c.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:B},{begin:"!important"},g.FUNCTION_DISPATCH]},X={begin:v+`:(:)?(${b.join("|")})`,returnBegin:!0,contains:[$]};return C.push(f.C_LINE_COMMENT_MODE,f.C_BLOCK_COMMENT_MODE,P,j,X,L,$,A,g.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:C}}return vb=d,vb}var _b,_E;function RZ(){if(_E)return _b;_E=1;function r(e){const i="\\[=*\\[",n="\\]=*\\]",a={begin:i,end:n,contains:["self"]},o=[e.COMMENT("--(?!"+i+")","$"),e.COMMENT("--"+i,n,{contains:[a],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:o}].concat(o)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:i,end:n,contains:[a],relevance:5}])}}return _b=r,_b}var Cb,CE;function DZ(){if(CE)return Cb;CE=1;function r(e){const i={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i]},a={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[i,n]},o={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},c={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},h={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[i]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,i,n,a,o,c,h]}}return Cb=r,Cb}var kb,kE;function FZ(){if(kE)return kb;kE=1;function r(e){const i=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],a=/[dualxmsipngr]{0,12}/,o={$pattern:/[\w.]+/,keyword:n.join(" ")},c={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:o},h={begin:/->\{/,end:/\}/},u={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},d={scope:"variable",variants:[{begin:/\$\d/},{begin:i.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[u]},f={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},g=[e.BACKSLASH_ESCAPE,c,d],b=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],m=(C,w,T="\\1")=>{const E=T==="\\1"?T:i.concat(T,w);return i.concat(i.concat("(?:",C,")"),w,/(?:\\.|[^\\\/])*?/,E,/(?:\\.|[^\\\/])*?/,T,a)},v=(C,w,T)=>i.concat(i.concat("(?:",C,")"),w,/(?:\\.|[^\\\/])*?/,T,a),_=[d,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),h,{className:"string",contains:g,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},f,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:m("s|tr|y",i.either(...b,{capture:!0}))},{begin:m("s|tr|y","\\(","\\)")},{begin:m("s|tr|y","\\[","\\]")},{begin:m("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:v("(?:m|qr)?",/\//,/\//)},{begin:v("m|qr",i.either(...b,{capture:!0}),/\1/)},{begin:v("m|qr",/\(/,/\)/)},{begin:v("m|qr",/\[/,/\]/)},{begin:v("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,u]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,u,f]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return c.contains=_,h.contains=_,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:_}}return kb=r,kb}var wb,wE;function jZ(){if(wE)return wb;wE=1;function r(e){const i={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,u={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},d={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:u,illegal:"</",contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+d.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:d,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}return wb=r,wb}var Sb,SE;function IZ(){if(SE)return Sb;SE=1;function r(e){const i=e.regex,n=/(?![A-Za-z0-9])(?![$])/,a=i.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),o=i.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),c=i.concat(/[A-Z]+/,n),h={scope:"variable",match:"\\$+"+a},u={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},d={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},f=e.inherit(e.APOS_STRING_MODE,{illegal:null}),g=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(d)}),b={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(d),"on:begin":(U,D)=>{D.data._beginMatch=U[1]||U[2]},"on:end":(U,D)=>{D.data._beginMatch!==U[1]&&D.ignoreMatch()}},m=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
417
+ ]`,_={scope:"string",variants:[g,f,b,m]},C={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},w=["false","null","true"],T=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],E=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],O={keyword:T,literal:(U=>{const D=[];return U.forEach(z=>{D.push(z),z.toLowerCase()===z?D.push(z.toUpperCase()):D.push(z.toLowerCase())}),D})(w),built_in:E},B=U=>U.map(D=>D.replace(/\|\d+$/,"")),A={variants:[{match:[/new/,i.concat(v,"+"),i.concat("(?!",B(E).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},L=i.concat(a,"\\b(?!\\()"),P={variants:[{match:[i.concat(/::/,i.lookahead(/(?!class\b)/)),L],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,i.concat(/::/,i.lookahead(/(?!class\b)/)),L],scope:{1:"title.class",3:"variable.constant"}},{match:[o,i.concat("::",i.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},j={scope:"attr",match:i.concat(a,i.lookahead(":"),i.lookahead(/(?!::)/))},$={relevance:0,begin:/\(/,end:/\)/,keywords:O,contains:[j,h,P,e.C_BLOCK_COMMENT_MODE,_,C,A]},X={relevance:0,match:[/\b/,i.concat("(?!fn\\b|function\\b|",B(T).join("\\b|"),"|",B(E).join("\\b|"),"\\b)"),a,i.concat(v,"*"),i.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[$]};$.contains.push(X);const W=[j,P,e.C_BLOCK_COMMENT_MODE,_,C,A],F={begin:i.concat(/#\[\s*\\?/,i.either(o,c)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:w,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:w,keyword:["new","array"]},contains:["self",...W]},...W,{scope:"meta",variants:[{match:o},{match:c}]}]};return{case_insensitive:!1,keywords:O,contains:[F,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},u,{scope:"variable.language",match:/\$this\b/},h,X,P,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},A,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:O,contains:["self",F,h,P,e.C_BLOCK_COMMENT_MODE,_,C]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},_,C]}}return Sb=r,Sb}var Tb,TE;function $Z(){if(TE)return Tb;TE=1;function r(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}return Tb=r,Tb}var Eb,EE;function zZ(){if(EE)return Eb;EE=1;function r(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return Eb=r,Eb}var Ab,AE;function PZ(){if(AE)return Ab;AE=1;function r(e){const i=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),a=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],u={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:a,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},d={className:"meta",begin:/^(>>>|\.\.\.) /},f={className:"subst",begin:/\{/,end:/\}/,keywords:u,illegal:/#/},g={begin:/\{\{/,relevance:0},b={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d,g,f]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d,g,f]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,g,f]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,g,f]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},m="[0-9](_?[0-9])*",v=`(\\b(${m}))?\\.(${m})|\\b(${m})\\.`,_=`\\b|${a.join("|")}`,C={className:"number",relevance:0,variants:[{begin:`(\\b(${m})|(${v}))[eE][+-]?(${m})[jJ]?(?=${_})`},{begin:`(${v})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${_})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${_})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${_})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${_})`},{begin:`\\b(${m})[jJ](?=${_})`}]},w={className:"comment",begin:i.lookahead(/# type:/),end:/$/,keywords:u,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},T={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:["self",d,C,b,e.HASH_COMMENT_MODE]}]};return f.contains=[b,C,d],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[d,C,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},b,w,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[T]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[C,T,b]}]}}return Ab=r,Ab}var Nb,NE;function qZ(){if(NE)return Nb;NE=1;function r(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return Nb=r,Nb}var Mb,ME;function UZ(){if(ME)return Mb;ME=1;function r(e){const i=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,a=i.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,c=i.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:i.lookahead(i.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[o,a]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,a]},{scope:{1:"punctuation",2:"number"},match:[c,a]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,a]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:c},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}return Mb=r,Mb}var Bb,BE;function HZ(){if(BE)return Bb;BE=1;function r(e){const i=e.regex,n=/(r#)?/,a=i.concat(n,e.UNDERSCORE_IDENT_RE),o=i.concat(n,e.IDENT_RE),c={className:"title.function.invoke",relevance:0,begin:i.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,i.lookahead(/\s*\(/))},h="([ui](8|16|32|64|128|size)|f(32|64))?",u=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],d=["true","false","Some","None","Ok","Err"],f=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],g=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:g,keyword:u,literal:d,built_in:f},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+h},{begin:"\\b0o([0-7_]+)"+h},{begin:"\\b0x([A-Fa-f0-9_]+)"+h},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+h}],relevance:0},{begin:[/fn/,/\s+/,a],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,a],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,a,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:f,type:g}},{className:"punctuation",begin:"->"},c]}}return Bb=r,Bb}var Lb,LE;function GZ(){if(LE)return Lb;LE=1;const r=d=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:d.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[d.APOS_STRING_MODE,d.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:d.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],i=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],n=[...e,...i],a=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),h=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(d){const f=r(d),g=c,b=o,m="@[a-z-]+",v="and or not only",C={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[d.C_LINE_COMMENT_MODE,d.C_BLOCK_COMMENT_MODE,f.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},f.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+n.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+b.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+g.join("|")+")"},C,{begin:/\(/,end:/\)/,contains:[f.CSS_NUMBER_MODE]},f.CSS_VARIABLE,{className:"attribute",begin:"\\b("+h.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[f.BLOCK_COMMENT,C,f.HEXCOLOR,f.CSS_NUMBER_MODE,d.QUOTE_STRING_MODE,d.APOS_STRING_MODE,f.IMPORTANT,f.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:m,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:v,attribute:a.join(" ")},contains:[{begin:m,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},C,d.QUOTE_STRING_MODE,d.APOS_STRING_MODE,f.HEXCOLOR,f.CSS_NUMBER_MODE]},f.FUNCTION_DISPATCH]}}return Lb=u,Lb}var Ob,OE;function WZ(){if(OE)return Ob;OE=1;function r(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}return Ob=r,Ob}var Rb,RE;function YZ(){if(RE)return Rb;RE=1;function r(e){const i=e.regex,n=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},c=["true","false","unknown"],h=["double precision","large object","with timezone","without timezone"],u=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],d=["add","asc","collation","desc","final","first","last","view"],f=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],g=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],b=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],m=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],v=g,_=[...f,...d].filter(B=>!g.includes(B)),C={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},w={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},T={match:i.concat(/\b/,i.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function E(B){return i.concat(/\b/,i.either(...B.map(A=>A.replace(/\s+/,"\\s+"))),/\b/)}const N={scope:"keyword",match:E(m),relevance:0};function O(B,{exceptions:A,when:L}={}){const P=L;return A=A||[],B.map(j=>j.match(/\|\d+$/)||A.includes(j)?j:P(j)?`${j}|0`:j)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:O(_,{when:B=>B.length<3}),literal:c,type:u,built_in:b},contains:[{scope:"type",match:E(h)},N,T,C,a,o,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,w]}}return Rb=r,Rb}var Db,DE;function VZ(){if(DE)return Db;DE=1;function r(L){return L?typeof L=="string"?L:L.source:null}function e(L){return i("(?=",L,")")}function i(...L){return L.map(j=>r(j)).join("")}function n(L){const P=L[L.length-1];return typeof P=="object"&&P.constructor===Object?(L.splice(L.length-1,1),P):{}}function a(...L){return"("+(n(L).capture?"":"?:")+L.map($=>r($)).join("|")+")"}const o=L=>i(/\b/,L,/\w$/.test(L)?/\b/:/\B/),c=["Protocol","Type"].map(o),h=["init","self"].map(o),u=["Any","Self"],d=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],f=["false","nil","true"],g=["assignment","associativity","higherThan","left","lowerThan","none","right"],b=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],m=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],v=a(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),_=a(v,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),C=i(v,_,"*"),w=a(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),T=a(w,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),E=i(w,T,"*"),N=i(/[A-Z]/,T,"*"),O=["attached","autoclosure",i(/convention\(/,a("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",i(/objc\(/,E,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],B=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function A(L){const P={match:/\s+/,relevance:0},j=L.COMMENT("/\\*","\\*/",{contains:["self"]}),$=[L.C_LINE_COMMENT_MODE,j],X={match:[/\./,a(...c,...h)],className:{2:"keyword"}},W={match:i(/\./,a(...d)),relevance:0},F=d.filter(Ae=>typeof Ae=="string").concat(["_|0"]),U=d.filter(Ae=>typeof Ae!="string").concat(u).map(o),D={variants:[{className:"keyword",match:a(...U,...h)}]},z={$pattern:a(/\b\w+/,/#\w+/),keyword:F.concat(b),literal:f},H=[X,W,D],V={match:i(/\./,a(...m)),relevance:0},Q={className:"built_in",match:i(/\b/,a(...m),/(?=\()/)},G=[V,Q],J={match:/->/,relevance:0},lt={className:"operator",relevance:0,variants:[{match:C},{match:`\\.(\\.|${_})+`}]},st=[J,lt],vt="([0-9]_*)+",kt="([0-9a-fA-F]_*)+",Mt={className:"number",relevance:0,variants:[{match:`\\b(${vt})(\\.(${vt}))?([eE][+-]?(${vt}))?\\b`},{match:`\\b0x(${kt})(\\.(${kt}))?([pP][+-]?(${vt}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},it=(Ae="")=>({className:"subst",variants:[{match:i(/\\/,Ae,/[0\\tnr"']/)},{match:i(/\\/,Ae,/u\{[0-9a-fA-F]{1,8}\}/)}]}),xt=(Ae="")=>({className:"subst",match:i(/\\/,Ae,/[\t ]*(?:[\r\n]|\r\n)/)}),pt=(Ae="")=>({className:"subst",label:"interpol",begin:i(/\\/,Ae,/\(/),end:/\)/}),Et=(Ae="")=>({begin:i(Ae,/"""/),end:i(/"""/,Ae),contains:[it(Ae),xt(Ae),pt(Ae)]}),Ut=(Ae="")=>({begin:i(Ae,/"/),end:i(/"/,Ae),contains:[it(Ae),pt(Ae)]}),Gt={className:"string",variants:[Et(),Et("#"),Et("##"),Et("###"),Ut(),Ut("#"),Ut("##"),Ut("###")]},ie=[L.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[L.BACKSLASH_ESCAPE]}],Dt={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:ie},Jt=Ae=>{const bi=i(Ae,/\//),xi=i(/\//,Ae);return{begin:bi,end:xi,contains:[...ie,{scope:"comment",begin:`#(?!.*${xi})`,end:/$/}]}},Le={scope:"regexp",variants:[Jt("###"),Jt("##"),Jt("#"),Dt]},hr={match:i(/`/,E,/`/)},qr={className:"variable",match:/\$\d+/},ve={className:"variable",match:`\\$${T}+`},Ee=[hr,qr,ve],Ge={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:B,contains:[...st,Mt,Gt]}]}},Ar={scope:"keyword",match:i(/@/,a(...O),e(a(/\(/,/\s+/)))},Me={scope:"meta",match:i(/@/,E)},Nr=[Ge,Ar,Me],yr={match:e(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:i(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,T,"+")},{className:"type",match:N,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:i(/\s+&\s+/,e(N)),relevance:0}]},ii={begin:/</,end:/>/,keywords:z,contains:[...$,...H,...Nr,J,yr]};yr.contains.push(ii);const di={match:i(E,/\s*:/),keywords:"_|0",relevance:0},$i={begin:/\(/,end:/\)/,relevance:0,keywords:z,contains:["self",di,...$,Le,...H,...G,...st,Mt,Gt,...Ee,...Nr,yr]},Ur={begin:/</,end:/>/,keywords:"repeat each",contains:[...$,yr]},aa={begin:a(e(i(E,/\s*:/)),e(i(E,/\s+/,E,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:E}]},sa={begin:/\(/,end:/\)/,keywords:z,contains:[aa,...$,...H,...st,Mt,Gt,...Nr,yr,$i],endsParent:!0,illegal:/["']/},Yr={match:[/(func|macro)/,/\s+/,a(hr.match,E,C)],className:{1:"keyword",3:"title.function"},contains:[Ur,sa,P],illegal:[/\[/,/%/]},Cr={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Ur,sa,P],illegal:/\[|%/},yi={match:[/operator/,/\s+/,C],className:{1:"keyword",3:"title"}},kr={begin:[/precedencegroup/,/\s+/,N],className:{1:"keyword",3:"title"},contains:[yr],keywords:[...g,...f],end:/}/},On={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Vr={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},zi={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,E,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:z,contains:[Ur,...H,{begin:/:/,end:/\{/,keywords:z,contains:[{scope:"title.class.inherited",match:N},...H],relevance:0}]};for(const Ae of Gt.variants){const bi=Ae.contains.find(Or=>Or.label==="interpol");bi.keywords=z;const xi=[...H,...G,...st,Mt,Gt,...Ee];bi.contains=[...xi,{begin:/\(/,end:/\)/,contains:["self",...xi]}]}return{name:"Swift",keywords:z,contains:[...$,Yr,Cr,On,Vr,zi,yi,kr,{beginKeywords:"import",end:/$/,contains:[...$],relevance:0},Le,...H,...G,...st,Mt,Gt,...Ee,...Nr,yr,$i]}}return Db=A,Db}var Fb,FE;function KZ(){if(FE)return Fb;FE=1;function r(e){const i="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",a={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},c={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},h={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,o]},u=e.inherit(h,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),m={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},v={end:",",endsWithParent:!0,excludeEnd:!0,keywords:i,relevance:0},_={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},C={begin:"\\[",end:"\\]",contains:[v],illegal:"\\n",relevance:0},w=[a,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:i,keywords:{literal:i}},m,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},_,C,c,h],T=[...w];return T.pop(),T.push(u),v.contains=T,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:w}}return Fb=r,Fb}var jb,jE;function XZ(){if(jE)return jb;jE=1;const r="[A-Za-z$_][0-9A-Za-z$_]*",e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],i=["true","false","null","undefined","NaN","Infinity"],n=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],a=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],o=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],h=[].concat(o,n,a);function u(f){const g=f.regex,b=(it,{after:xt})=>{const pt="</"+it[0].slice(1);return it.input.indexOf(pt,xt)!==-1},m=r,v={begin:"<>",end:"</>"},_=/<[A-Za-z0-9\\._:-]+\s*\/>/,C={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(it,xt)=>{const pt=it[0].length+it.index,Et=it.input[pt];if(Et==="<"||Et===","){xt.ignoreMatch();return}Et===">"&&(b(it,{after:pt})||xt.ignoreMatch());let Ut;const Gt=it.input.substring(pt);if(Ut=Gt.match(/^\s*=/)){xt.ignoreMatch();return}if((Ut=Gt.match(/^\s+extends\s+/))&&Ut.index===0){xt.ignoreMatch();return}}},w={$pattern:r,keyword:e,literal:i,built_in:h,"variable.language":c},T="[0-9](_?[0-9])*",E=`\\.(${T})`,N="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",O={className:"number",variants:[{begin:`(\\b(${N})((${E})|\\.)?|(${E}))[eE][+-]?(${T})\\b`},{begin:`\\b(${N})\\b((${E})\\b|\\.)?|(${E})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},B={className:"subst",begin:"\\$\\{",end:"\\}",keywords:w,contains:[]},A={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[f.BACKSLASH_ESCAPE,B],subLanguage:"xml"}},L={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[f.BACKSLASH_ESCAPE,B],subLanguage:"css"}},P={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[f.BACKSLASH_ESCAPE,B],subLanguage:"graphql"}},j={className:"string",begin:"`",end:"`",contains:[f.BACKSLASH_ESCAPE,B]},X={className:"comment",variants:[f.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:m+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),f.C_BLOCK_COMMENT_MODE,f.C_LINE_COMMENT_MODE]},W=[f.APOS_STRING_MODE,f.QUOTE_STRING_MODE,A,L,P,j,{match:/\$\d+/},O];B.contains=W.concat({begin:/\{/,end:/\}/,keywords:w,contains:["self"].concat(W)});const F=[].concat(X,B.contains),U=F.concat([{begin:/(\s*)\(/,end:/\)/,keywords:w,contains:["self"].concat(F)}]),D={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:w,contains:U},z={variants:[{match:[/class/,/\s+/,m,/\s+/,/extends/,/\s+/,g.concat(m,"(",g.concat(/\./,m),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,m],scope:{1:"keyword",3:"title.class"}}]},H={relevance:0,match:g.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...n,...a]}},V={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},Q={variants:[{match:[/function/,/\s+/,m,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[D],illegal:/%/},G={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(it){return g.concat("(?!",it.join("|"),")")}const lt={match:g.concat(/\b/,J([...o,"super","import"].map(it=>`${it}\\s*\\(`)),m,g.lookahead(/\s*\(/)),className:"title.function",relevance:0},st={begin:g.concat(/\./,g.lookahead(g.concat(m,/(?![0-9A-Za-z$_(])/))),end:m,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},vt={match:[/get|set/,/\s+/,m,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},D]},kt="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+f.UNDERSCORE_IDENT_RE+")\\s*=>",Mt={match:[/const|var|let/,/\s+/,m,/\s*/,/=\s*/,/(async\s*)?/,g.lookahead(kt)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[D]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:w,exports:{PARAMS_CONTAINS:U,CLASS_REFERENCE:H},illegal:/#(?![$_A-z])/,contains:[f.SHEBANG({label:"shebang",binary:"node",relevance:5}),V,f.APOS_STRING_MODE,f.QUOTE_STRING_MODE,A,L,P,j,X,{match:/\$\d+/},O,H,{scope:"attr",match:m+g.lookahead(":"),relevance:0},Mt,{begin:"("+f.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[X,f.REGEXP_MODE,{className:"function",begin:kt,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:f.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:w,contains:U}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:v.begin,end:v.end},{match:_},{begin:C.begin,"on:begin":C.isTrulyOpeningTag,end:C.end}],subLanguage:"xml",contains:[{begin:C.begin,end:C.end,skip:!0,contains:["self"]}]}]},Q,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+f.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[D,f.inherit(f.TITLE_MODE,{begin:m,className:"title.function"})]},{match:/\.\.\./,relevance:0},st,{match:"\\$"+m,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[D]},lt,G,z,vt,{match:/\$[(.]/}]}}function d(f){const g=f.regex,b=u(f),m=r,v=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],_={begin:[/namespace/,/\s+/,f.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},C={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:v},contains:[b.exports.CLASS_REFERENCE]},w={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},T=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],E={$pattern:r,keyword:e.concat(T),literal:i,built_in:h.concat(v),"variable.language":c},N={className:"meta",begin:"@"+m},O=(P,j,$)=>{const X=P.contains.findIndex(W=>W.label===j);if(X===-1)throw new Error("can not find mode to replace");P.contains.splice(X,1,$)};Object.assign(b.keywords,E),b.exports.PARAMS_CONTAINS.push(N);const B=b.contains.find(P=>P.scope==="attr"),A=Object.assign({},B,{match:g.concat(m,g.lookahead(/\s*\?:/))});b.exports.PARAMS_CONTAINS.push([b.exports.CLASS_REFERENCE,B,A]),b.contains=b.contains.concat([N,_,C,A]),O(b,"shebang",f.SHEBANG()),O(b,"use_strict",w);const L=b.contains.find(P=>P.label==="func.def");return L.relevance=0,Object.assign(b,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),b}return jb=d,jb}var Ib,IE;function ZZ(){if(IE)return Ib;IE=1;function r(e){const i=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},a={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,c=/\d{4}-\d{1,2}-\d{1,2}/,h=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,u=/\d{1,2}(:\d{1,2}){1,2}/,d={className:"literal",variants:[{begin:i.concat(/# */,i.either(c,o),/ *#/)},{begin:i.concat(/# */,u,/ *#/)},{begin:i.concat(/# */,h,/ *#/)},{begin:i.concat(/# */,i.either(c,o),/ +/,i.either(h,u),/ *#/)}]},f={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},g={className:"label",begin:/^\w+:/},b=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),m=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,a,d,f,g,b,m,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[m]}]}}return Ib=r,Ib}var $b,$E;function QZ(){if($E)return $b;$E=1;function r(e){e.regex;const i=e.COMMENT(/\(;/,/;\)/);i.contains.push("self");const n=e.COMMENT(/;;/,/$/),a=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],o={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},c={className:"variable",begin:/\$[\w_]+/},h={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},u={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},d={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},f={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:a},contains:[n,i,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},c,h,o,e.QUOTE_STRING_MODE,d,f,u]}}return $b=r,$b}var zb,zE;function JZ(){if(zE)return zb;zE=1;var r=mZ();return r.registerLanguage("xml",yZ()),r.registerLanguage("bash",bZ()),r.registerLanguage("c",xZ()),r.registerLanguage("cpp",vZ()),r.registerLanguage("csharp",_Z()),r.registerLanguage("css",CZ()),r.registerLanguage("markdown",kZ()),r.registerLanguage("diff",wZ()),r.registerLanguage("ruby",SZ()),r.registerLanguage("go",TZ()),r.registerLanguage("graphql",EZ()),r.registerLanguage("ini",AZ()),r.registerLanguage("java",NZ()),r.registerLanguage("javascript",MZ()),r.registerLanguage("json",BZ()),r.registerLanguage("kotlin",LZ()),r.registerLanguage("less",OZ()),r.registerLanguage("lua",RZ()),r.registerLanguage("makefile",DZ()),r.registerLanguage("perl",FZ()),r.registerLanguage("objectivec",jZ()),r.registerLanguage("php",IZ()),r.registerLanguage("php-template",$Z()),r.registerLanguage("plaintext",zZ()),r.registerLanguage("python",PZ()),r.registerLanguage("python-repl",qZ()),r.registerLanguage("r",UZ()),r.registerLanguage("rust",HZ()),r.registerLanguage("scss",GZ()),r.registerLanguage("shell",WZ()),r.registerLanguage("sql",YZ()),r.registerLanguage("swift",VZ()),r.registerLanguage("yaml",KZ()),r.registerLanguage("typescript",XZ()),r.registerLanguage("vbnet",ZZ()),r.registerLanguage("wasm",QZ()),r.HighlightJS=r,r.default=r,zb=r,zb}var tQ=JZ();const eQ=Dd(tQ);function rQ(r,e){K.useEffect(()=>{const i=r.current;i&&i.querySelectorAll("pre > code:not(.language-mermaid)").forEach(n=>{if(n.dataset.highlighted!=="yes")try{eQ.highlightElement(n)}catch{}})},[r,e])}Ce.setOptions({gfm:!0,breaks:!0});function Kd({content:r,frontmatter:e}){const i=K.useMemo(()=>Ll.sanitize(Ce.parse(r)),[r]),n=K.useRef(null),{resolved:a}=Fd();gZ(n,i,a,"md-mmd"),rQ(n,i);const o=e?Object.entries(e).filter(([,c])=>c!=null&&c!==""):[];return x.jsxs("div",{className:"md-preview",children:[o.length>0&&x.jsx("div",{className:"md-frontmatter",children:o.map(([c,h])=>x.jsxs("div",{className:"md-fm-row",children:[x.jsx("span",{className:"md-fm-key",children:c}),x.jsx("span",{className:"md-fm-value",children:String(h)})]},c))}),x.jsx("div",{ref:n,className:"markdown-body",dangerouslySetInnerHTML:{__html:i}})]})}function iQ({onManagePacks:r}){const{t:e}=Pr(),{data:i}=iI(),n=(i==null?void 0:i.nudge)??null,a=(i==null?void 0:i.newPacks)??[],[o,c]=K.useState(!1),h=K.useCallback(u=>{u.key==="Escape"&&o&&c(!1)},[o]);return K.useEffect(()=>(document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)),[h]),n?x.jsxs("div",{className:"update-badge",children:[x.jsxs("button",{className:"update-badge-trigger",onClick:()=>c(u=>!u),"aria-expanded":o,title:e("update.title"),children:[x.jsx("span",{className:"update-badge-dot"}),x.jsx("span",{className:"update-badge-label",children:e("update.available")})]}),o&&x.jsxs("div",{className:"update-badge-popover",children:[x.jsxs("div",{className:"update-badge-popover-header",children:[x.jsx("span",{className:"update-badge-popover-title",children:e("update.title")}),x.jsx("button",{className:"update-badge-dismiss",onClick:()=>c(!1),title:e("update.dismiss"),"aria-label":e("update.dismiss"),children:"×"})]}),x.jsx("div",{className:"update-badge-content",children:x.jsx(Kd,{content:n})}),a.length>0&&r&&x.jsx("button",{className:"update-badge-action",onClick:()=>{r(),c(!1)},children:e("update.managePacks")})]})]}):null}const Qu=[.85,.9,1,1.1,1.2],F5="dreamcontext-zoom";function nQ(){try{const r=localStorage.getItem(F5);if(r!==null){const e=parseFloat(r);if(Qu.includes(e))return e}}catch{}return 1}function aQ(r){document.documentElement.style.setProperty("--zoom",String(r))}function sQ({onNavigate:r}){const{theme:e,setTheme:i,resolved:n}=Fd(),{data:a}=XN(),[o,c]=K.useState(nQ);K.useEffect(()=>{aQ(o)},[o]);const h=(a==null?void 0:a.debt)??0,u=VN(h),d=KN(h),f=()=>{i(e==="system"?"light":e==="light"?"dark":"system")},g=e==="system"?`System (${n})`:n==="dark"?"Dark":"Light",b=Qu.indexOf(o),m=b>0,v=b<Qu.length-1,_=C=>{const w=b+C;if(w<0||w>=Qu.length)return;const T=Qu[w];c(T);try{localStorage.setItem(F5,String(T))}catch{}};return x.jsxs("header",{className:"header",children:[x.jsxs("div",{className:"header-left",children:[x.jsxs("div",{className:`agent-avatar agent-avatar--${d}`,children:[x.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"M14 2L24 14L14 26L4 14L14 2Z",fill:"url(#diamond-gradient)",opacity:d==="must_sleep"?.4:d==="sleepy"?.6:d==="drowsy"?.8:1}),x.jsx("path",{d:"M14 8L19 14L14 20L9 14L14 8Z",fill:"url(#diamond-inner)",opacity:d==="must_sleep"?.3:.7}),x.jsxs("defs",{children:[x.jsxs("linearGradient",{id:"diamond-gradient",x1:"4",y1:"2",x2:"24",y2:"26",gradientUnits:"userSpaceOnUse",children:[x.jsx("stop",{stopColor:"hsl(287, 100%, 33%)"}),x.jsx("stop",{offset:"1",stopColor:"hsl(311, 97%, 43%)"})]}),x.jsxs("linearGradient",{id:"diamond-inner",x1:"9",y1:"8",x2:"19",y2:"20",gradientUnits:"userSpaceOnUse",children:[x.jsx("stop",{stopColor:"hsl(276, 74%, 50%)"}),x.jsx("stop",{offset:"1",stopColor:"hsl(287, 100%, 45%)"})]})]})]}),d==="must_sleep"&&x.jsx("span",{className:"zzz",children:"zzz"})]}),x.jsxs("div",{className:"header-brand",children:[x.jsx("span",{className:"brand-name",children:"dreamcontext"}),x.jsxs("span",{className:`sleep-badge sleep-badge--${d}`,children:[u," (",h,")"]})]})]}),x.jsxs("div",{className:"header-right",children:[x.jsx(iQ,{onManagePacks:r?()=>r("packs"):void 0}),x.jsxs("div",{className:"zoom-controls",children:[x.jsx("button",{className:"zoom-btn",onClick:()=>_(-1),disabled:!m,title:"Zoom out",children:"-"}),x.jsxs("span",{className:"zoom-label",children:[Math.round(o*100),"%"]}),x.jsx("button",{className:"zoom-btn",onClick:()=>_(1),disabled:!v,title:"Zoom in",children:"+"})]}),x.jsx("button",{className:"theme-toggle",onClick:f,title:`Theme: ${g}`,children:n==="dark"?x.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:x.jsx("path",{d:"M8 1a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 1zm0 10a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 11zm7-3a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 15 8zM5 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 5 8zm7.07-4.07a.5.5 0 0 1 0 .71l-1.41 1.41a.5.5 0 1 1-.71-.71l1.41-1.41a.5.5 0 0 1 .71 0zM6.05 10.66a.5.5 0 0 1 0 .71l-1.41 1.41a.5.5 0 0 1-.71-.71l1.41-1.41a.5.5 0 0 1 .71 0zm7.72 3.12a.5.5 0 0 1-.71 0l-1.41-1.41a.5.5 0 1 1 .71-.71l1.41 1.41a.5.5 0 0 1 0 .71zM5.34 6.05a.5.5 0 0 1-.71 0L3.22 4.64a.5.5 0 0 1 .71-.71l1.41 1.41a.5.5 0 0 1 0 .71zM8 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8z"})}):x.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:x.jsx("path",{d:"M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"})})})]})]})}const oQ=[{labelKey:"nav.group.workspace",items:[{page:"brain",icon:"◉",labelKey:"nav.brain"},{page:"tasks",icon:"▦",labelKey:"nav.tasks"},{page:"knowledge",icon:"✦",labelKey:"nav.knowledge"},{page:"features",icon:"⚑",labelKey:"nav.features"},{page:"core",icon:"◈",labelKey:"nav.core"},{page:"council",icon:"⚔",labelKey:"nav.council"},{page:"sleep",icon:"◑",labelKey:"nav.sleep"}]},{labelKey:"nav.group.control",items:[{page:"packs",icon:"◳",labelKey:"nav.packs"},{page:"settings",icon:"⚙",labelKey:"nav.settings"}]}],j5="dreamcontext.dashboard.sidebarCollapsed",I5="dreamcontext.dashboard.aboutSeen",Nc=typeof window<"u"&&window.matchMedia?window.matchMedia("(max-width: 1024px)"):null;function lQ(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(j5)==="1"}catch{return!1}}function cQ(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(I5)==="1"}catch{return!1}}function hQ({activePage:r,onNavigate:e}){const{t:i}=Pr(),[n,a]=K.useState(lQ),[o,c]=K.useState((Nc==null?void 0:Nc.matches)??!1),[h,u]=K.useState(cQ);K.useEffect(()=>{if(!Nc)return;const v=_=>c(_.matches);return Nc.addEventListener("change",v),()=>Nc.removeEventListener("change",v)},[]);const d=o||n,f=()=>{a(v=>{const _=!v;try{window.localStorage.setItem(j5,_?"1":"0")}catch{}return _})},g=()=>{if(!h){u(!0);try{window.localStorage.setItem(I5,"1")}catch{}}e("about")},b=!h&&r!=="about";let m=0;return x.jsxs("nav",{className:`sidebar${d?" sidebar--collapsed":""}`,"aria-label":"Primary",children:[x.jsxs("button",{type:"button",className:"sidebar-toggle","data-testid":"sidebar-collapse",onClick:f,"aria-expanded":!d,"aria-label":i(d?"nav.expand":"nav.collapse"),title:i(d?"nav.expand":"nav.collapse"),children:[x.jsx("span",{className:"sidebar-toggle-icon",children:d?"»":"«"}),x.jsx("span",{className:"sidebar-label",children:i("nav.collapse")})]}),oQ.map(v=>x.jsxs("div",{className:"sidebar-group",children:[x.jsx("span",{className:"sidebar-group-label",children:i(v.labelKey)}),x.jsx("ul",{className:"sidebar-nav",children:v.items.map(({page:_,icon:C,labelKey:w})=>{m+=1;const T=i(w);return x.jsx("li",{className:`animate-stagger animate-stagger-${m}`,children:x.jsxs("button",{className:`sidebar-item ${r===_?"sidebar-item--active":""}`,onClick:()=>e(_),title:T,"aria-current":r===_?"page":void 0,children:[x.jsx("span",{className:"sidebar-icon",children:C}),x.jsx("span",{className:"sidebar-label",children:T})]})},_)})})]},v.labelKey)),x.jsx("div",{className:"sidebar-footer",children:x.jsxs("button",{className:`sidebar-item sidebar-item--about ${r==="about"?"sidebar-item--active":""}${b?" sidebar-item--nudge":""}`,onClick:g,title:i("nav.about"),"aria-current":r==="about"?"page":void 0,children:[x.jsx("span",{className:"sidebar-icon",children:"✷"}),x.jsx("span",{className:"sidebar-label",children:i("nav.about")})]})})]})}const $5="dreamcontext.dashboard.activePage",uQ=["tasks","core","knowledge","features","sleep","brain","council","settings","packs","about"];function dQ(){if(typeof window>"u")return"brain";try{const r=window.localStorage.getItem($5);if(r&&uQ.includes(r))return r}catch{}return"brain"}function fQ({children:r}){const[e,i]=K.useState(dQ),[n,a]=K.useState(null),[o,c]=K.useState(0),h=K.useCallback((f,g)=>{i(f),a(g),c(b=>b+1);try{window.localStorage.setItem($5,f)}catch{}},[]),u=K.useCallback(f=>{h(f,null)},[h]),d=K.useCallback(()=>a(null),[]);return x.jsxs("div",{className:"shell",children:[x.jsx(sQ,{onNavigate:u}),x.jsxs("div",{className:"shell-body",children:[x.jsx(hQ,{activePage:e,onNavigate:u}),x.jsx("main",{className:"shell-main",children:r({page:e,focusId:n,nonce:o,navigate:h,clearFocus:d})})]})]})}function pQ(){return mi({queryKey:["tasks"],queryFn:()=>cr.get("/tasks"),select:r=>r.tasks})}function gQ(){const r=Ln();return Va({mutationFn:e=>cr.post("/tasks",e),onSuccess:()=>{r.invalidateQueries({queryKey:["tasks"]})}})}function z5(){const r=Ln();return Va({mutationFn:({slug:e,updates:i})=>cr.patch(`/tasks/${e}`,i),onSuccess:(e,i)=>{r.invalidateQueries({queryKey:["tasks"]}),r.invalidateQueries({queryKey:["tasks",i.slug]})}})}function mQ(){const r=Ln();return Va({mutationFn:({slug:e,content:i})=>cr.post(`/tasks/${e}/changelog`,{content:i}),onSuccess:()=>{r.invalidateQueries({queryKey:["tasks"]})}})}function P5(){return mi({queryKey:["releases"],queryFn:()=>cr.get("/releases"),select:r=>r.entries.map(e=>({...e,status:e.status??"released"}))})}function q5(){return mi({queryKey:["releases"],queryFn:()=>cr.get("/releases"),select:r=>r.entries.map(e=>({...e,status:e.status??"released"})).filter(e=>e.status==="planning")})}function yQ(){const r=Ln();return Va({mutationFn:e=>cr.post("/releases",{...e,status:"planning"}),onSuccess:()=>{r.invalidateQueries({queryKey:["releases"]})}})}function bQ(){const r=Ln();return Va({mutationFn:({version:e,updates:i})=>cr.patch(`/releases/${encodeURIComponent(e)}`,i),onSuccess:()=>{r.invalidateQueries({queryKey:["releases"]})}})}const U5="dreamcontext:",H5="kanban-presets",jv=`${U5}${H5}`;function G5(r){return r?`${U5}${r}:${H5}`:jv}function xQ(r){const e=G5(r);try{const i=localStorage.getItem(e);if(i!==null){const n=JSON.parse(i);return Array.isArray(n)?n:[]}if(r){const n=localStorage.getItem(jv);if(n!==null){localStorage.setItem(e,n),localStorage.removeItem(jv);const a=JSON.parse(n);return Array.isArray(a)?a:[]}}}catch{}return[]}function W5(r,e){try{localStorage.setItem(G5(r),JSON.stringify(e))}catch{}}const $g=new Map;function A_(r){let e=$g.get(r);return e===void 0&&(e=xQ(r),$g.set(r,e)),e}const Iv=new Set;function vQ(r){return Iv.add(r),()=>{Iv.delete(r)}}function Y5(){for(const r of Iv)r()}function _Q(){return Date.now().toString(36)+Math.random().toString(36).slice(2,6)}function CQ(r){return K.useSyncExternalStore(vQ,()=>A_(r))}function kQ(r,e,i){const n={id:_Q(),name:e,filters:i},o=[...A_(r),n];return $g.set(r,o),W5(r,o),Y5(),n}function wQ(r,e){const i=A_(r),n=i.filter(a=>a.id!==e);n.length!==i.length&&($g.set(r,n),W5(r,n),Y5())}const SQ=10;function Yl(r){let e=2166136261;for(let i=0;i<r.length;i++)e^=r.charCodeAt(i),e=Math.imul(e,16777619);return(e>>>0)%SQ}function Xd({task:r,onClick:e,onDragStart:i,dragging:n=!1}){return x.jsxs("div",{className:`task-card${n?" task-card--dragging":""}`,draggable:!0,onDragStart:i,onClick:e,role:"button",tabIndex:0,onKeyDown:a=>{a.key==="Enter"&&e()},children:[x.jsxs("div",{className:"task-card-header",children:[x.jsx("span",{className:`priority-dot priority-dot--${r.priority}`,title:`Priority: ${r.priority}`}),r.urgency&&r.urgency!=="medium"&&x.jsx("span",{className:`urgency-bar urgency-bar--${r.urgency}`,title:`Urgency: ${r.urgency}`}),x.jsx("span",{className:"task-card-name",children:r.name})]}),r.description&&x.jsxs("p",{className:"task-card-desc",children:[r.description.slice(0,100),r.description.length>100?"...":""]}),x.jsxs("div",{className:"task-card-footer",children:[r.tags.length>0&&x.jsx("div",{className:"task-card-tags",children:r.tags.slice(0,3).map(a=>x.jsx("span",{className:"task-tag","data-hue":Yl(a),children:a},a))}),x.jsx("span",{className:"task-card-date",children:r.updated_at})]})]})}function TQ({label:r,color:e,tasks:i,onTaskClick:n,onDragStart:a}){const[o,c]=K.useState(!1);return x.jsxs("div",{className:"sub-group",children:[x.jsxs("button",{className:"sub-group-header",onClick:()=>c(h=>!h),children:[x.jsx("svg",{className:`sub-group-chevron ${o?"":"sub-group-chevron--open"}`,width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:x.jsx("path",{d:"M3 2L7 5L3 8",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})}),e&&x.jsx("span",{className:"sub-group-dot",style:{background:e}}),x.jsx("span",{className:"sub-group-label",children:r}),x.jsx("span",{className:"sub-group-count",children:i.length})]}),!o&&x.jsx("div",{className:"sub-group-cards",children:i.map(h=>x.jsx(Xd,{task:h,onClick:()=>n(h),onDragStart:u=>a(u,h)},h.slug))})]})}function PE({title:r,status:e,tasks:i,count:n,colorVar:a,onTaskClick:o,onDrop:c,subGroups:h}){const[u,d]=K.useState(!1),f=v=>{v.preventDefault(),v.dataTransfer.dropEffect="move",d(!0)},g=()=>{d(!1)},b=v=>{v.preventDefault(),d(!1);const _=v.dataTransfer.getData("text/plain");_&&c(_,e)},m=(v,_)=>{v.dataTransfer.setData("text/plain",_.slug),v.dataTransfer.effectAllowed="move"};return x.jsxs("div",{className:`kanban-column ${u?"kanban-column--dragover":""}`,onDragOver:f,onDragLeave:g,onDrop:b,children:[x.jsxs("div",{className:"kanban-column-header",children:[x.jsx("span",{className:"kanban-column-dot",style:{background:`var(${a})`}}),x.jsx("span",{className:"kanban-column-title",children:r}),x.jsx("span",{className:"kanban-column-count",children:n})]}),x.jsx("div",{className:"kanban-column-cards",children:h&&h.length>0?h.map(v=>x.jsx(TQ,{label:v.label,color:v.color,tasks:v.tasks,onTaskClick:o,onDragStart:m},v.key)):i.map(v=>x.jsx(Xd,{task:v,onClick:()=>o(v),onDragStart:_=>m(_,v)},v.slug))})]})}function Fc({trigger:r,content:e,isOpen:i,onClose:n,align:a="left",width:o}){const c=K.useRef(null),h=K.useCallback(d=>{c.current&&!c.current.contains(d.target)&&n()},[n]),u=K.useCallback(d=>{d.key==="Escape"&&n()},[n]);return K.useEffect(()=>{if(i)return document.addEventListener("mousedown",h),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",u)}},[i,h,u]),x.jsxs("div",{className:"filter-popover",ref:c,children:[r,i&&x.jsx("div",{className:`filter-popover-dropdown filter-popover-dropdown--${a}`,style:o?{width:`${o}px`}:void 0,children:e})]})}function EQ({open:r}){return x.jsx("svg",{className:`filter-chip-chevron ${r?"filter-chip-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:x.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}function Bu({label:r,options:e,selected:i,onChange:n,isOpen:a,onToggle:o,onClose:c}){var w,T;const h=i.length>0,[u,d]=K.useState(""),f=K.useRef(null);K.useEffect(()=>{a?requestAnimationFrame(()=>{var E;return(E=f.current)==null?void 0:E.focus()}):d("")},[a]);const g=u.trim()?e.filter(E=>E.label.toLowerCase().includes(u.trim().toLowerCase())):e,b=E=>{i.includes(E)?n(i.filter(N=>N!==E)):n([...i,E])},m=()=>n(e.map(E=>E.value)),v=()=>n([]),_=h?i.length<=2?i.map(E=>{var N;return((N=e.find(O=>O.value===E))==null?void 0:N.label)??E}).join(", "):`${((w=e.find(E=>E.value===i[0]))==null?void 0:w.label)??i[0]} +${i.length-1}`:r,C=e.length>5;return x.jsx(Fc,{isOpen:a,onClose:c,trigger:x.jsxs("button",{className:`filter-chip ${h?"filter-chip--active":""}`,onClick:o,children:[h&&i.length===1&&x.jsx("span",{className:"filter-chip-dot",style:{background:(T=e.find(E=>E.value===i[0]))==null?void 0:T.color}}),x.jsx("span",{className:"filter-chip-label",children:_}),x.jsx(EQ,{open:a})]}),content:x.jsxs("div",{className:"multi-select-list",children:[C&&x.jsx("div",{className:"multi-select-search-wrap",children:x.jsx("input",{ref:f,className:"multi-select-search",placeholder:"Search...",value:u,onChange:E=>d(E.target.value)})}),x.jsxs("div",{className:"multi-select-actions",children:[x.jsx("button",{className:"multi-select-action",onClick:m,children:"All"}),x.jsx("button",{className:"multi-select-action",onClick:v,children:"None"})]}),x.jsxs("div",{className:"multi-select-options",children:[g.map(E=>x.jsxs("label",{className:"multi-select-option",children:[x.jsx("input",{type:"checkbox",checked:i.includes(E.value),onChange:()=>b(E.value)}),E.color&&x.jsx("span",{className:"filter-option-dot",style:{background:E.color}}),x.jsx("span",{className:"filter-option-label",children:E.label})]},E.value)),g.length===0&&x.jsx("div",{className:"multi-select-no-results",children:"No matches"})]})]})})}function qE(r){return String(r).padStart(2,"0")}function Oo(r){return`${r.getFullYear()}-${qE(r.getMonth()+1)}-${qE(r.getDate())}`}function V5(){return Oo(new Date)}function Tp(r){const e=new Date;return e.setDate(e.getDate()-r),Oo(e)}function AQ(){const r=new Date,e=r.getDay();return r.setDate(r.getDate()-(e===0?6:e-1)),Oo(r)}function NQ(){const r=new Date;return r.setDate(1),Oo(r)}function MQ(){const r=new Date;return r.setMonth(0,1),Oo(r)}function UE(r){return new Date(r+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric"})}function BQ(){const r=V5();return[{label:"Today",from:r,to:r},{label:"Yesterday",from:Tp(1),to:Tp(1)},{label:"This week",from:AQ(),to:r},{label:"Last 7 days",from:Tp(6),to:r},{label:"This month",from:NQ(),to:r},{label:"Last 30 days",from:Tp(29),to:r},{label:"This year",from:MQ(),to:r}]}const LQ=["January","February","March","April","May","June","July","August","September","October","November","December"],OQ=["Mo","Tu","We","Th","Fr","Sa","Su"];function RQ({dateField:r,dateFrom:e,dateTo:i,onDateFieldChange:n,onDateFromChange:a,onDateToChange:o}){const c=new Date,[h,u]=K.useState(()=>e?parseInt(e.slice(0,4),10):c.getFullYear()),[d,f]=K.useState(()=>e?parseInt(e.slice(5,7),10)-1:c.getMonth()),g=K.useMemo(BQ,[]),b=K.useMemo(()=>{const N=new Date(h,d+1,0).getDate(),O=new Date(h,d,1).getDay(),B=O===0?6:O-1,A=[],L=new Date(h,d,0).getDate();for(let j=B-1;j>=0;j--){const $=L-j,X=d===0?11:d-1,W=d===0?h-1:h;A.push({date:Oo(new Date(W,X,$)),day:$,isCurrentMonth:!1})}for(let j=1;j<=N;j++)A.push({date:Oo(new Date(h,d,j)),day:j,isCurrentMonth:!0});const P=42-A.length;for(let j=1;j<=P;j++){const $=d===11?0:d+1,X=d===11?h+1:h;A.push({date:Oo(new Date(X,$,j)),day:j,isCurrentMonth:!1})}return A},[h,d]),m=N=>{!e||e&&i?(a(N),o("")):N<e?(o(e),a(N)):o(N)},v=N=>{a(N.from),o(N.to);const O=new Date(N.from+"T00:00:00");u(O.getFullYear()),f(O.getMonth())},_=()=>{a(""),o("")},C=()=>{d===0?(f(11),u(N=>N-1)):f(N=>N-1)},w=()=>{d===11?(f(0),u(N=>N+1)):f(N=>N+1)},T=V5(),E=g.find(N=>N.from===e&&N.to===i);return x.jsxs("div",{className:"mini-cal",children:[x.jsxs("div",{className:"mini-cal-field-toggle",children:[x.jsx("button",{className:`mini-cal-field-btn ${r==="updated_at"?"mini-cal-field-btn--active":""}`,onClick:()=>n("updated_at"),children:"Updated"}),x.jsx("button",{className:`mini-cal-field-btn ${r==="created_at"?"mini-cal-field-btn--active":""}`,onClick:()=>n("created_at"),children:"Created"})]}),x.jsx("div",{className:"mini-cal-presets",children:g.map(N=>x.jsx("button",{className:`mini-cal-preset ${(E==null?void 0:E.label)===N.label?"mini-cal-preset--active":""}`,onClick:()=>v(N),children:N.label},N.label))}),x.jsx("div",{className:"mini-cal-divider"}),x.jsxs("div",{className:"mini-cal-nav-row",children:[x.jsx("button",{className:"mini-cal-nav-btn",onClick:C,"aria-label":"Previous month",children:x.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:x.jsx("path",{d:"M8.5 3L4.5 7L8.5 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),x.jsxs("span",{className:"mini-cal-month-label",children:[LQ[d]," ",h]}),x.jsx("button",{className:"mini-cal-nav-btn",onClick:w,"aria-label":"Next month",children:x.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:x.jsx("path",{d:"M5.5 3L9.5 7L5.5 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),x.jsxs("div",{className:"mini-cal-grid",children:[OQ.map(N=>x.jsx("div",{className:"mini-cal-day-label",children:N},N)),b.map((N,O)=>{const B=N.date===e,A=N.date===i,L=e&&i&&N.date>e&&N.date<i,P=B&&!i,j=B||A,$=["mini-cal-day",!N.isCurrentMonth&&"mini-cal-day--outside",N.date===T&&"mini-cal-day--today",j&&"mini-cal-day--selected",B&&i&&"mini-cal-day--range-start",A&&e&&"mini-cal-day--range-end",L&&"mini-cal-day--in-range",P&&"mini-cal-day--single"].filter(Boolean).join(" ");return x.jsx("button",{className:$,onClick:()=>m(N.date),children:N.day},O)})]}),(e||i)&&x.jsxs("div",{className:"mini-cal-footer",children:[x.jsxs("span",{className:"mini-cal-range-text",children:[e&&x.jsx("span",{children:UE(e)}),e&&i&&e!==i&&x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"mini-cal-arrow",children:"→"}),x.jsx("span",{children:UE(i)})]}),e&&!i&&x.jsx("span",{className:"mini-cal-hint",children:"Pick end date"})]}),x.jsx("button",{className:"mini-cal-clear-btn",onClick:_,children:"Clear"})]})]})}const zg={priorityFilter:[],statusFilter:[],urgencyFilter:[],tagFilter:[],versionFilter:[],searchQuery:"",dateField:"updated_at",dateFrom:"",dateTo:"",minRice:null,sortField:"updated_at",groupBy:"status",subGroupBy:"none",viewMode:"kanban"};function DQ(){return x.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[x.jsx("circle",{cx:"5.8",cy:"5.8",r:"4.3",stroke:"currentColor",strokeWidth:"1.4"}),x.jsx("path",{d:"M9 9L12.5 12.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]})}function Ep({open:r}){return x.jsx("svg",{className:`filter-chip-chevron ${r?"filter-chip-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:x.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}function Pb(){return x.jsx("svg",{className:"filter-option-check",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:x.jsx("path",{d:"M3 7L6 10L11 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function HE(){return x.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:x.jsx("path",{d:"M2.5 2.5L7.5 7.5M7.5 2.5L2.5 7.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})})}function FQ(){return x.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[x.jsx("rect",{x:"1.5",y:"2.5",width:"11",height:"10",rx:"1.5",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("path",{d:"M1.5 5.5H12.5",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("path",{d:"M4.5 1V3.5M9.5 1V3.5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function jQ(){return x.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[x.jsx("rect",{x:"1.5",y:"1.5",width:"11",height:"11",rx:"1.5",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("path",{d:"M4 1.5V5H10V1.5",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("rect",{x:"4",y:"7.5",width:"6",height:"3.5",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"})]})}function IQ(){return x.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[x.jsx("rect",{x:"1",y:"1",width:"3.5",height:"12",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("rect",{x:"5.25",y:"1",width:"3.5",height:"8",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("rect",{x:"9.5",y:"1",width:"3.5",height:"10",rx:"1",stroke:"currentColor",strokeWidth:"1.2"})]})}function $Q(){return x.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[x.jsx("rect",{x:"1",y:"1",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("rect",{x:"7.5",y:"1",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("rect",{x:"1",y:"7.5",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("rect",{x:"7.5",y:"7.5",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"})]})}function zQ(){return x.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[x.jsx("circle",{cx:"3",cy:"11",r:"1.4",fill:"currentColor"}),x.jsx("circle",{cx:"6",cy:"6",r:"1.6",fill:"currentColor"}),x.jsx("circle",{cx:"10",cy:"8",r:"1.2",fill:"currentColor"}),x.jsx("circle",{cx:"11",cy:"3",r:"1",fill:"currentColor"})]})}function PQ(){return x.jsx("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:x.jsx("path",{d:"M2 3.5H12M2 7H12M2 10.5H12",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})})}function qQ(){return x.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[x.jsx("path",{d:"M2 2V12",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),x.jsx("path",{d:"M2 3H9L7 5.5L9 8H2",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})]})}const UQ=[{value:"todo",label:"To Do",color:"var(--color-status-todo)"},{value:"in_progress",label:"In Progress",color:"var(--color-status-in-progress)"},{value:"in_review",label:"In Review",color:"var(--color-status-in-review)"},{value:"completed",label:"Completed",color:"var(--color-status-completed)"}],HQ=[{value:"critical",label:"Critical",color:"var(--color-priority-critical)"},{value:"high",label:"High",color:"var(--color-priority-high)"},{value:"medium",label:"Medium",color:"var(--color-priority-medium)"},{value:"low",label:"Low",color:"var(--color-priority-low)"}],GQ=[{value:"critical",label:"Critical",color:"var(--color-urgency-critical)"},{value:"high",label:"High",color:"var(--color-urgency-high)"},{value:"medium",label:"Medium",color:"var(--color-urgency-medium)"},{value:"low",label:"Low",color:"var(--color-urgency-low)"}],GE=[{value:"updated_at",label:"Last updated"},{value:"created_at",label:"Date created"},{value:"priority",label:"Priority"},{value:"urgency",label:"Urgency"},{value:"rice",label:"RICE score"},{value:"name",label:"Name"}],qb=[{value:"status",label:"Status"},{value:"priority",label:"Priority"},{value:"urgency",label:"Urgency"},{value:"tags",label:"Tags"},{value:"version",label:"Version"},{value:"none",label:"No grouping"}];function WQ(r){let e=0;return r.priorityFilter.length>0&&e++,r.statusFilter.length>0&&e++,r.urgencyFilter.length>0&&e++,r.tagFilter.length>0&&e++,r.versionFilter.length>0&&e++,r.searchQuery.trim()&&e++,(r.dateFrom||r.dateTo)&&e++,r.minRice!==null&&r.minRice!==void 0&&e++,e}function YQ(r){if(!r.dateFrom&&!r.dateTo)return null;const e=new Date().toISOString().slice(0,10);if(r.dateFrom===e&&r.dateTo===e)return"Today";const i=new Date;i.setDate(i.getDate()-1);const n=i.toISOString().slice(0,10);if(r.dateFrom===n&&r.dateTo===n)return"Yesterday";if(r.dateTo===e){const a=new Date;if(a.setDate(a.getDate()-6),r.dateFrom===a.toISOString().slice(0,10))return"Last 7 days";const o=new Date;if(o.setDate(o.getDate()-29),r.dateFrom===o.toISOString().slice(0,10))return"Last 30 days"}return"Custom"}function VQ({filters:r,onFilterChange:e,onClearFilters:i,onCreateClick:n,presets:a,onSavePreset:o,onLoadPreset:c,onDeletePreset:h,allTags:u,allVersions:d,onVersionManagerClick:f}){var P,j;const{t:g}=Pr(),[b,m]=K.useState(null),[v,_]=K.useState(""),C=WQ(r),w=K.useMemo(()=>YQ(r),[r]),T=$=>m(X=>X===$?null:$),E=()=>m(null),N=(P=GE.find($=>$.value===r.sortField))==null?void 0:P.label,O=(j=qb.find($=>$.value===r.groupBy))==null?void 0:j.label,B=K.useMemo(()=>u.map($=>({value:$,label:$})),[u]),A=K.useMemo(()=>d.map($=>({value:$,label:$})),[d]),L=K.useMemo(()=>qb.filter($=>$.value!==r.groupBy&&$.value!=="none").concat({value:"none",label:"No sub-group"}),[r.groupBy]);return x.jsxs("div",{className:"filter-bar",children:[x.jsxs("div",{className:"filter-search",children:[x.jsx(DQ,{}),x.jsx("input",{className:"filter-search-input",placeholder:"Search tasks...",value:r.searchQuery,onChange:$=>e("searchQuery",$.target.value)}),r.searchQuery&&x.jsx("button",{className:"filter-search-clear",onClick:()=>e("searchQuery",""),children:x.jsx(HE,{})})]}),x.jsx("div",{className:"filter-bar-divider"}),x.jsx(Bu,{id:"status",label:"Status",options:UQ,selected:r.statusFilter,onChange:$=>e("statusFilter",$),isOpen:b==="status",onToggle:()=>T("status"),onClose:E}),x.jsx(Bu,{id:"priority",label:"Priority",options:HQ,selected:r.priorityFilter,onChange:$=>e("priorityFilter",$),isOpen:b==="priority",onToggle:()=>T("priority"),onClose:E}),x.jsx(Bu,{id:"urgency",label:"Urgency",options:GQ,selected:r.urgencyFilter,onChange:$=>e("urgencyFilter",$),isOpen:b==="urgency",onToggle:()=>T("urgency"),onClose:E}),B.length>0&&x.jsx(Bu,{id:"tags",label:"Tags",options:B,selected:r.tagFilter,onChange:$=>e("tagFilter",$),isOpen:b==="tags",onToggle:()=>T("tags"),onClose:E}),A.length>0&&x.jsx(Bu,{id:"version",label:"Version",options:A,selected:r.versionFilter,onChange:$=>e("versionFilter",$),isOpen:b==="version",onToggle:()=>T("version"),onClose:E}),x.jsx(Fc,{isOpen:b==="date",onClose:E,width:320,trigger:x.jsxs("button",{className:`filter-chip ${w?"filter-chip--active":""}`,onClick:()=>T("date"),children:[x.jsx(FQ,{}),x.jsx("span",{className:"filter-chip-label",children:w??"Date"}),x.jsx(Ep,{open:b==="date"})]}),content:x.jsx(RQ,{dateField:r.dateField,dateFrom:r.dateFrom,dateTo:r.dateTo,onDateFieldChange:$=>e("dateField",$),onDateFromChange:$=>e("dateFrom",$),onDateToChange:$=>e("dateTo",$)})}),x.jsx(Fc,{isOpen:b==="minRice",onClose:E,width:220,trigger:x.jsxs("button",{className:`filter-chip ${r.minRice!==null?"filter-chip--active":""}`,onClick:()=>T("minRice"),children:[x.jsx("span",{className:"filter-chip-label",children:r.minRice!==null?`${g("filter.min_rice")} ≥ ${r.minRice}`:g("filter.min_rice")}),x.jsx(Ep,{open:b==="minRice"})]}),content:x.jsxs("div",{className:"filter-min-rice",children:[x.jsx("label",{className:"filter-min-rice-label",htmlFor:"filter-min-rice-input",children:g("filter.min_rice")}),x.jsx("input",{id:"filter-min-rice-input",type:"number",min:"0",step:"0.1",className:"field-input",value:r.minRice??"",placeholder:"e.g. 5",onChange:$=>{const X=$.target.value.trim();if(X===""){e("minRice",null);return}const W=Number(X);e("minRice",Number.isFinite(W)?W:null)}}),r.minRice!==null&&x.jsx("button",{type:"button",className:"filter-min-rice-clear",onClick:()=>e("minRice",null),children:"Clear"})]})}),C>0&&x.jsxs("button",{className:"filter-clear-all",onClick:i,children:["Clear ",x.jsx("span",{className:"filter-clear-count",children:C})]}),x.jsx("div",{className:"filter-bar-spacer"}),x.jsxs("div",{className:"filter-view-toggle",children:[x.jsx("button",{className:`filter-view-btn ${r.viewMode==="kanban"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","kanban"),title:"Kanban view",children:x.jsx(IQ,{})}),x.jsx("button",{className:`filter-view-btn ${r.viewMode==="eisenhower"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","eisenhower"),title:"Eisenhower matrix",children:x.jsx($Q,{})}),x.jsx("button",{className:`filter-view-btn ${r.viewMode==="scatter"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","scatter"),title:"RICE scatter (Impact × Effort)",children:x.jsx(zQ,{})}),x.jsx("button",{className:`filter-view-btn ${r.viewMode==="list"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","list"),title:"List view",children:x.jsx(PQ,{})})]}),x.jsx("div",{className:"filter-bar-divider"}),x.jsx(Fc,{isOpen:b==="sort",onClose:E,align:"right",trigger:x.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>T("sort"),children:[x.jsx("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:x.jsx("path",{d:"M2 4H12M4 7H10M6 10H8",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})}),x.jsx("span",{className:"filter-chip-label",children:N}),x.jsx(Ep,{open:b==="sort"})]}),content:x.jsxs("div",{className:"filter-option-list",children:[x.jsx("div",{className:"filter-popover-section",children:"Sort by"}),GE.map($=>x.jsxs("button",{className:`filter-option ${r.sortField===$.value?"filter-option--selected":""}`,onClick:()=>{e("sortField",$.value),E()},children:[x.jsx("span",{className:"filter-option-label",children:$.label}),r.sortField===$.value&&x.jsx(Pb,{})]},$.value))]})}),x.jsx(Fc,{isOpen:b==="group",onClose:E,align:"right",trigger:x.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>T("group"),children:[x.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[x.jsx("rect",{x:"1.5",y:"2",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("rect",{x:"8",y:"2",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("rect",{x:"1.5",y:"8.5",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),x.jsx("rect",{x:"8",y:"8.5",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"})]}),x.jsx("span",{className:"filter-chip-label",children:O}),x.jsx(Ep,{open:b==="group"})]}),content:x.jsxs("div",{className:"filter-option-list",children:[x.jsx("div",{className:"filter-popover-section",children:"Group by"}),qb.map($=>x.jsxs("button",{className:`filter-option ${r.groupBy===$.value?"filter-option--selected":""}`,onClick:()=>{e("groupBy",$.value),E()},children:[x.jsx("span",{className:"filter-option-label",children:$.label}),r.groupBy===$.value&&x.jsx(Pb,{})]},$.value)),r.groupBy!=="none"&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"filter-popover-section",style:{marginTop:"var(--space-2)"},children:"Sub-group by"}),L.map($=>x.jsxs("button",{className:`filter-option ${r.subGroupBy===$.value?"filter-option--selected":""}`,onClick:()=>{e("subGroupBy",$.value),E()},children:[x.jsx("span",{className:"filter-option-label",children:$.label}),r.subGroupBy===$.value&&x.jsx(Pb,{})]},`sub-${$.value}`))]})]})}),x.jsx("div",{className:"filter-bar-divider"}),x.jsx("button",{className:"filter-chip filter-chip--subtle",onClick:f,title:"Manage versions",children:x.jsx(qQ,{})}),x.jsx(Fc,{isOpen:b==="views",onClose:E,align:"right",width:220,trigger:x.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>T("views"),children:[x.jsx(jQ,{}),x.jsx("span",{className:"filter-chip-label",children:"Views"}),a.length>0&&x.jsx("span",{className:"filter-chip-badge",children:a.length})]}),content:x.jsxs("div",{className:"filter-views",children:[a.length===0?x.jsx("div",{className:"filter-views-empty",children:"No saved views yet"}):x.jsx("div",{className:"filter-views-list",children:a.map($=>x.jsxs("div",{className:"filter-views-item",children:[x.jsx("button",{className:"filter-views-load",onClick:()=>{c($),E()},children:$.name}),x.jsx("button",{className:"filter-views-delete",onClick:()=>h($.id),children:x.jsx(HE,{})})]},$.id))}),x.jsx("div",{className:"filter-popover-divider"}),x.jsxs("div",{className:"filter-views-save",children:[x.jsx("input",{className:"filter-views-input",placeholder:"Save current view...",value:v,onChange:$=>_($.target.value),onKeyDown:$=>{$.key==="Enter"&&v.trim()&&(o(v.trim()),_(""))}}),x.jsx("button",{className:"filter-views-save-btn",disabled:!v.trim(),onClick:()=>{v.trim()&&(o(v.trim()),_(""))},children:"Save"})]})]})}),x.jsxs("button",{className:"filter-create-btn",onClick:n,children:[x.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:x.jsx("path",{d:"M7 2V12M2 7H12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),g("tasks.create")]})]})}function KQ({onClose:r}){const{t:e}=Pr(),i=gQ(),{data:n}=q5(),[a,o]=K.useState(""),[c,h]=K.useState(""),[u,d]=K.useState("medium"),[f,g]=K.useState("medium"),[b,m]=K.useState(""),[v,_]=K.useState(""),[C,w]=K.useState(""),T=E=>{if(E.preventDefault(),!a.trim())return;const N=b.split(",").map(O=>O.trim()).filter(Boolean);i.mutate({name:a.trim(),description:c,priority:u,tags:N,urgency:f!=="medium"?f:void 0,why:v.trim()||void 0,version:C||void 0},{onSuccess:()=>r()})};return x.jsx("div",{className:"modal-overlay",onClick:r,children:x.jsxs("div",{className:"modal",onClick:E=>E.stopPropagation(),children:[x.jsxs("div",{className:"modal-header",children:[x.jsx("h2",{className:"modal-title",children:e("tasks.create")}),x.jsx("button",{className:"modal-close",onClick:r,children:"×"})]}),x.jsxs("form",{onSubmit:T,className:"modal-body",children:[x.jsxs("label",{className:"field",children:[x.jsx("span",{className:"field-label",children:e("tasks.name")}),x.jsx("input",{className:"field-input",value:a,onChange:E=>o(E.target.value),placeholder:"e.g. Implement user auth",autoFocus:!0,required:!0})]}),x.jsxs("label",{className:"field",children:[x.jsx("span",{className:"field-label",children:e("tasks.description")}),x.jsx("textarea",{className:"field-textarea",value:c,onChange:E=>h(E.target.value),placeholder:"What needs to be done?",rows:3})]}),x.jsxs("label",{className:"field",children:[x.jsx("span",{className:"field-label",children:e("tasks.priority")}),x.jsxs("select",{className:"field-select",value:u,onChange:E=>d(E.target.value),children:[x.jsx("option",{value:"low",children:e("priority.low")}),x.jsx("option",{value:"medium",children:e("priority.medium")}),x.jsx("option",{value:"high",children:e("priority.high")}),x.jsx("option",{value:"critical",children:e("priority.critical")})]})]}),x.jsxs("label",{className:"field",children:[x.jsx("span",{className:"field-label",children:"Urgency"}),x.jsxs("select",{className:"field-select",value:f,onChange:E=>g(E.target.value),children:[x.jsx("option",{value:"low",children:e("priority.low")}),x.jsx("option",{value:"medium",children:e("priority.medium")}),x.jsx("option",{value:"high",children:e("priority.high")}),x.jsx("option",{value:"critical",children:e("priority.critical")})]})]}),x.jsxs("label",{className:"field",children:[x.jsx("span",{className:"field-label",children:"Version"}),x.jsxs("select",{className:"field-select",value:C,onChange:E=>w(E.target.value),children:[x.jsx("option",{value:"",children:"No version"}),(n??[]).map(E=>x.jsx("option",{value:E.version,children:E.version},E.version))]})]}),x.jsxs("label",{className:"field",children:[x.jsx("span",{className:"field-label",children:"Why"}),x.jsx("textarea",{className:"field-textarea",value:v,onChange:E=>_(E.target.value),placeholder:"Why is this task needed?",rows:2})]}),x.jsxs("label",{className:"field",children:[x.jsx("span",{className:"field-label",children:e("tasks.tags")}),x.jsx("input",{className:"field-input",value:b,onChange:E=>m(E.target.value),placeholder:"Comma-separated tags"})]}),x.jsxs("div",{className:"modal-actions",children:[x.jsx("button",{type:"button",className:"btn btn--ghost",onClick:r,children:e("tasks.cancel")}),x.jsx("button",{type:"submit",className:"btn btn--primary",disabled:!a.trim()||i.isPending,children:i.isPending?"...":e("tasks.save")})]})]})]})})}var Lu={exports:{}},WE;function XQ(){if(WE)return Lu.exports;WE=1,Lu.exports=r,Lu.exports.addWheelListener=r,Lu.exports.removeWheelListener=e;function r(i,n,a){i.addEventListener("wheel",n,a)}function e(i,n,a){i.removeEventListener("wheel",n,a)}return Lu.exports}var Ou={exports:{}},Ub,YE;function ZQ(){if(YE)return Ub;YE=1;var r=4,e=.001,i=1e-7,n=10,a=11,o=1/(a-1),c=typeof Float32Array=="function";function h(_,C){return 1-3*C+3*_}function u(_,C){return 3*C-6*_}function d(_){return 3*_}function f(_,C,w){return((h(C,w)*_+u(C,w))*_+d(C))*_}function g(_,C,w){return 3*h(C,w)*_*_+2*u(C,w)*_+d(C)}function b(_,C,w,T,E){var N,O,B=0;do O=C+(w-C)/2,N=f(O,T,E)-_,N>0?w=O:C=O;while(Math.abs(N)>i&&++B<n);return O}function m(_,C,w,T){for(var E=0;E<r;++E){var N=g(C,w,T);if(N===0)return C;var O=f(C,w,T)-_;C-=O/N}return C}function v(_){return _}return Ub=function(C,w,T,E){if(!(0<=C&&C<=1&&0<=T&&T<=1))throw new Error("bezier x values must be in [0, 1] range");if(C===w&&T===E)return v;for(var N=c?new Float32Array(a):new Array(a),O=0;O<a;++O)N[O]=f(O*o,C,T);function B(A){for(var L=0,P=1,j=a-1;P!==j&&N[P]<=A;++P)L+=o;--P;var $=(A-N[P])/(N[P+1]-N[P]),X=L+$*o,W=g(X,C,T);return W>=e?m(A,X,C,T):W===0?X:b(A,L,L+o,C,T)}return function(L){return L===0?0:L===1?1:f(B(L),w,E)}},Ub}var VE;function QQ(){if(VE)return Ou.exports;VE=1;var r=ZQ(),e={ease:r(.25,.1,.25,1),easeIn:r(.42,0,1,1),easeOut:r(0,0,.58,1),easeInOut:r(.42,0,.58,1),linear:r(0,0,1,1)};Ou.exports=i,Ou.exports.makeAggregateRaf=h,Ou.exports.sharedScheduler=h();function i(u,d,f){var g=Object.create(null),b=Object.create(null);f=f||{};var m=typeof f.easing=="function"?f.easing:e[f.easing];m||(f.easing&&console.warn("Unknown easing function in amator: "+f.easing),m=e.ease);var v=typeof f.step=="function"?f.step:n,_=typeof f.done=="function"?f.done:n,C=a(f.scheduler),w=Object.keys(d);w.forEach(function(P){g[P]=u[P],b[P]=d[P]-u[P]});var T=typeof f.duration=="number"?f.duration:400,E=Math.max(1,T*.06),N,O=0;return N=C.next(A),{cancel:B};function B(){C.cancel(N),N=0}function A(){var P=m(O/E);O+=1,L(P),O<=E?(N=C.next(A),v(u)):(N=0,setTimeout(function(){_(u)},0))}function L(P){w.forEach(function(j){u[j]=b[j]*P+g[j]})}}function n(){}function a(u){if(!u){var d=typeof window<"u"&&window.requestAnimationFrame;return d?o():c()}if(typeof u.next!="function")throw new Error("Scheduler is supposed to have next(cb) function");if(typeof u.cancel!="function")throw new Error("Scheduler is supposed to have cancel(handle) function");return u}function o(){return{next:window.requestAnimationFrame.bind(window),cancel:window.cancelAnimationFrame.bind(window)}}function c(){return{next:function(u){return setTimeout(u,1e3/60)},cancel:function(u){return clearTimeout(u)}}}function h(){var u=new Set,d=new Set,f=0;return{next:b,cancel:b,clearAll:g};function g(){u.clear(),d.clear(),cancelAnimationFrame(f),f=0}function b(_){d.add(_),m()}function m(){f||(f=requestAnimationFrame(v))}function v(){f=0;var _=d;d=u,u=_,u.forEach(function(C){C()}),u.clear()}}return Ou.exports}var Hb,KE;function JQ(){if(KE)return Hb;KE=1;function r(n){i(n);const a=e(n);return n.on=a.on,n.off=a.off,n.fire=a.fire,n}function e(n){let a=Object.create(null);return{on:function(o,c,h){if(typeof c!="function")throw new Error("callback is expected to be a function");let u=a[o];return u||(u=a[o]=[]),u.push({callback:c,ctx:h}),n},off:function(o,c){if(typeof o>"u")return a=Object.create(null),n;if(a[o])if(typeof c!="function")delete a[o];else{const h=a[o];for(let u=0;u<h.length;++u)h[u].callback===c&&h.splice(u,1)}return n},fire:function(o){const c=a[o];if(!c)return n;let h;arguments.length>1&&(h=Array.prototype.slice.call(arguments,1));for(let u=0;u<c.length;++u){const d=c[u];d.callback.apply(d.ctx,h)}return n}}}function i(n){if(!n)throw new Error("Eventify cannot use falsy object as events subject");const a=["on","fire","off"];for(let o=0;o<a.length;++o)if(n.hasOwnProperty(a[o]))throw new Error("Subject cannot be eventified, since it already has property '"+a[o]+"'")}return Hb=r,Hb}var Gb,XE;function tJ(){if(XE)return Gb;XE=1,Gb=r;function r(n,a,o){typeof o!="object"&&(o={});var c=typeof o.minVelocity=="number"?o.minVelocity:5,h=typeof o.amplitude=="number"?o.amplitude:.25,u=typeof o.cancelAnimationFrame=="function"?o.cancelAnimationFrame:e(),d=typeof o.requestAnimationFrame=="function"?o.requestAnimationFrame:i(),f,g,b=342,m,v,_,C,w,T,E,N;return{start:B,stop:L,cancel:O};function O(){u(m),u(N)}function B(){f=n(),C=E=v=w=0,g=new Date,u(m),u(N),m=d(A)}function A(){var j=Date.now(),$=j-g;g=j;var X=n(),W=X.x-f.x,F=X.y-f.y;f=X;var U=1e3/(1+$);v=.8*W*U+.2*v,w=.8*F*U+.2*w,m=d(A)}function L(){u(m),u(N);var j=n();_=j.x,T=j.y,g=Date.now(),(v<-c||v>c)&&(C=h*v,_+=C),(w<-c||w>c)&&(E=h*w,T+=E),N=d(P)}function P(){var j=Date.now()-g,$=!1,X=0,W=0;C&&(X=-C*Math.exp(-j/b),X>.5||X<-.5?$=!0:X=C=0),E&&(W=-E*Math.exp(-j/b),W>.5||W<-.5?$=!0:W=E=0),$&&(a(_+X,T+W),N=d(P))}}function e(){return typeof cancelAnimationFrame=="function"?cancelAnimationFrame:clearTimeout}function i(){return typeof requestAnimationFrame=="function"?requestAnimationFrame:function(n){return setTimeout(n,16)}}return Gb}var Wb,ZE;function eJ(){if(ZE)return Wb;ZE=1,Wb=r;function r(n){if(n)return{capture:i,release:i};var a,o,c,h=!1;return{capture:u,release:d};function u(f){h=!0,o=window.document.onselectstart,c=window.document.ondragstart,window.document.onselectstart=e,a=f,a.ondragstart=e}function d(){h&&(h=!1,window.document.onselectstart=o,a&&(a.ondragstart=c))}}function e(n){return n.stopPropagation(),!1}function i(){}return Wb}var Yb,QE;function rJ(){if(QE)return Yb;QE=1,Yb=r;function r(){this.x=0,this.y=0,this.scale=1}return Yb}var Ap={exports:{}},JE;function iJ(){if(JE)return Ap.exports;JE=1,Ap.exports=r,Ap.exports.canAttach=e;function r(i,n){if(!e(i))throw new Error("svg element is required for svg.panzoom to work");var a=i.ownerSVGElement;if(!a)throw new Error("Do not apply panzoom to the root <svg> element. Use its child instead (e.g. <g></g>). As of March 2016 only FireFox supported transform on the root element");n.disableKeyboardInteraction||a.setAttribute("tabindex",0);var o={getBBox:h,getScreenCTM:u,getOwner:c,applyTransform:f,initTransform:d};return o;function c(){return a}function h(){var g=i.getBBox();return{left:g.x,top:g.y,width:g.width,height:g.height}}function u(){var g=a.getCTM();return g||a.getScreenCTM()}function d(g){var b=i.getCTM();b===null&&(b=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGMatrix()),g.x=b.e,g.y=b.f,g.scale=b.a,a.removeAttributeNS(null,"viewBox")}function f(g){i.setAttribute("transform","matrix("+g.scale+" 0 0 "+g.scale+" "+g.x+" "+g.y+")")}}function e(i){return i&&i.ownerSVGElement&&i.getCTM}return Ap.exports}var Np={exports:{}},tA;function nJ(){if(tA)return Np.exports;tA=1,Np.exports=r,Np.exports.canAttach=e;function r(i,n){var a=e(i);if(!a)throw new Error("panzoom requires DOM element to be attached to the DOM tree");var o=i.parentElement;i.scrollTop=0,n.disableKeyboardInteraction||o.setAttribute("tabindex",0);var c={getBBox:u,getOwner:h,applyTransform:d};return c;function h(){return o}function u(){return{left:0,top:0,width:i.clientWidth,height:i.clientHeight}}function d(f){i.style.transformOrigin="0 0 0",i.style.transform="matrix("+f.scale+", 0, 0, "+f.scale+", "+f.x+", "+f.y+")"}}function e(i){return i&&i.parentElement&&i.style}return Np.exports}var Vb,eA;function aJ(){if(eA)return Vb;eA=1;var r=XQ(),e=QQ(),i=JQ(),n=tJ(),a=eJ(),o=a(),c=a(!0),h=rJ(),u=iJ(),d=nJ(),f=1,g=1.75,b=300,m=200;Vb=v;function v(A,L){L=L||{};var P=L.controller;if(P||(u.canAttach(A)?P=u(A,L):d.canAttach(A)&&(P=d(A,L))),!P)throw new Error("Cannot create panzoom for the current type of dom element");var j=P.getOwner(),$={x:0,y:0},X=!1,W=new h;P.initTransform&&P.initTransform(W);var F=typeof L.filterKey=="function"?L.filterKey:w,U=typeof L.pinchSpeed=="number"?L.pinchSpeed:1,D=L.bounds,z=typeof L.maxZoom=="number"?L.maxZoom:Number.POSITIVE_INFINITY,H=typeof L.minZoom=="number"?L.minZoom:0,V=typeof L.boundsPadding=="number"?L.boundsPadding:.05,Q=typeof L.zoomDoubleClickSpeed=="number"?L.zoomDoubleClickSpeed:g,G=L.beforeWheel||w,J=L.beforeMouseDown||w,lt=typeof L.zoomSpeed=="number"?L.zoomSpeed:f,st=_(L.transformOrigin),vt=L.enableTextSelection?c:o;T(D),L.autocenter&&Cr();var kt,Mt=0,it=0,xt=0,pt=null,Et=new Date,Ut,Gt=!1,ie=!1,Dt,Jt,Le,hr,qr,ve;"smoothScroll"in L&&!L.smoothScroll?ve=O():ve=n(tt,Kr,L.smoothScroll);var Ee,Ge,Ar,Me=!1;pr();var Nr={dispose:Xr,moveBy:Pi,moveTo:_t,smoothMoveTo:en,centerOn:sr,zoomTo:Fn,zoomAbs:Je,smoothZoom:Mr,smoothZoomAbs:ye,showRectangle:sa,pause:$i,resume:Ur,isPaused:aa,getTransform:yi,getMinZoom:kr,setMinZoom:On,getMaxZoom:Vr,setMaxZoom:zi,getTransformOrigin:Ae,setTransformOrigin:bi,getZoomSpeed:xi,setZoomSpeed:Or};i(Nr);var yr=typeof L.initialX=="number"?L.initialX:W.x,ii=typeof L.initialY=="number"?L.initialY:W.y,di=typeof L.initialZoom=="number"?L.initialZoom:W.scale;return(yr!=W.x||ii!=W.y||di!=W.scale)&&Je(yr,ii,di),Nr;function $i(){Rr(),Me=!0}function Ur(){Me&&(pr(),Me=!1)}function aa(){return Me}function sa(dt){var Nt=j.getBoundingClientRect(),At=Yr(Nt.width,Nt.height),$t=dt.right-dt.left,we=dt.bottom-dt.top;if(!Number.isFinite($t)||!Number.isFinite(we))throw new Error("Invalid rectangle");var jt=At.x/$t,We=At.y/we,Be=Math.min(jt,We);W.x=-(dt.left+$t/2)*Be+At.x/2,W.y=-(dt.top+we/2)*Be+At.y/2,W.scale=Be}function Yr(dt,Nt){if(P.getScreenCTM){var At=P.getScreenCTM(),$t=At.a,we=At.d,jt=At.e,We=At.f;$.x=dt*$t-jt,$.y=Nt*we-We}else $.x=dt,$.y=Nt;return $}function Cr(){var dt,Nt,At=0,$t=0,we=Qe();if(we)At=we.left,$t=we.top,dt=we.right-we.left,Nt=we.bottom-we.top;else{var jt=j.getBoundingClientRect();dt=jt.width,Nt=jt.height}var We=P.getBBox();if(!(We.width===0||We.height===0)){var Be=Nt/We.height,Fe=dt/We.width,Mi=Math.min(Fe,Be);W.x=-(We.left+We.width/2)*Mi+dt/2+At,W.y=-(We.top+We.height/2)*Mi+Nt/2+$t,W.scale=Mi}}function yi(){return W}function kr(){return H}function On(dt){H=dt}function Vr(){return z}function zi(dt){z=dt}function Ae(){return st}function bi(dt){st=_(dt)}function xi(){return lt}function Or(dt){if(!Number.isFinite(dt))throw new Error("Zoom speed should be a number");lt=dt}function tt(){return{x:W.x,y:W.y}}function _t(dt,Nt){W.x=dt,W.y=Nt,le(),jn("pan"),It()}function Ot(dt,Nt){_t(W.x+dt,W.y+Nt)}function le(){var dt=Qe();if(dt){var Nt=!1,At=ue(),$t=dt.left-At.right;return $t>0&&(W.x+=$t,Nt=!0),$t=dt.right-At.left,$t<0&&(W.x+=$t,Nt=!0),$t=dt.top-At.bottom,$t>0&&(W.y+=$t,Nt=!0),$t=dt.bottom-At.top,$t<0&&(W.y+=$t,Nt=!0),Nt}}function Qe(){if(D){if(typeof D=="boolean"){var dt=j.getBoundingClientRect(),Nt=dt.width,At=dt.height;return{left:Nt*V,top:At*V,right:Nt*(1-V),bottom:At*(1-V)}}return D}}function ue(){var dt=P.getBBox(),Nt=Pt(dt.left,dt.top);return{left:Nt.x,top:Nt.y,right:dt.width*W.scale+Nt.x,bottom:dt.height*W.scale+Nt.y}}function Pt(dt,Nt){return{x:dt*W.scale+W.x,y:Nt*W.scale+W.y}}function It(){X=!0,kt=window.requestAnimationFrame(yn)}function se(dt,Nt,At){if(N(dt)||N(Nt)||N(At))throw new Error("zoom requires valid numbers");var $t=W.scale*At;if($t<H){if(W.scale===H)return;At=H/W.scale}if($t>z){if(W.scale===z)return;At=z/W.scale}var we=Yr(dt,Nt);if(W.x=we.x-At*(we.x-W.x),W.y=we.y-At*(we.y-W.y),D&&V===1&&H===1)W.scale*=At,le();else{var jt=le();jt||(W.scale*=At)}jn("zoom"),It()}function Je(dt,Nt,At){var $t=At/W.scale;se(dt,Nt,$t)}function sr(dt){var Nt=dt.ownerSVGElement;if(!Nt)throw new Error("ui element is required to be within the scene");var At=dt.getBoundingClientRect(),$t=At.left+At.width/2,we=At.top+At.height/2,jt=Nt.getBoundingClientRect(),We=jt.width/2-$t,Be=jt.height/2-we;Pi(We,Be,!0)}function en(dt,Nt){Pi(dt-W.x,Nt-W.y,!0)}function Pi(dt,Nt,At){if(!At)return Ot(dt,Nt);Ee&&Ee.cancel();var $t={x:0,y:0},we={x:dt,y:Nt},jt=0,We=0;Ee=e($t,we,{step:function(Be){Ot(Be.x-jt,Be.y-We),jt=Be.x,We=Be.y}})}function Kr(dt,Nt){oa(),_t(dt,Nt)}function Xr(){Rr()}function pr(){j.addEventListener("mousedown",ct,{passive:!1}),j.addEventListener("dblclick",bt,{passive:!1}),j.addEventListener("touchstart",vi,{passive:!1}),j.addEventListener("keydown",bn,{passive:!1}),r.addWheelListener(j,er,{passive:!1}),It()}function Rr(){r.removeWheelListener(j,er),j.removeEventListener("mousedown",ct),j.removeEventListener("keydown",bn),j.removeEventListener("dblclick",bt),j.removeEventListener("touchstart",vi),kt&&(window.cancelAnimationFrame(kt),kt=0),ve.cancel(),te(),Oe(),vt.release(),Po()}function yn(){X&&Rn()}function Rn(){X=!1,P.applyTransform(W),jn("transform"),kt=0}function bn(dt){var Nt=0,At=0,$t=0;if(dt.keyCode===38?At=1:dt.keyCode===40?At=-1:dt.keyCode===37?Nt=1:dt.keyCode===39?Nt=-1:dt.keyCode===189||dt.keyCode===109?$t=1:(dt.keyCode===187||dt.keyCode===107)&&($t=-1),!F(dt,Nt,At,$t)){if(Nt||At){dt.preventDefault(),dt.stopPropagation();var we=j.getBoundingClientRect(),jt=Math.min(we.width,we.height),We=.05,Be=jt*We*Nt,Fe=jt*We*At;Pi(Be,Fe)}if($t){var Mi=zs($t*100),jt=st?Dr():xn();Fn(jt.x,jt.y,Mi)}}}function xn(){var dt=j.getBoundingClientRect();return{x:dt.width/2,y:dt.height/2}}function vi(dt){if(Dn(dt),ai(),dt.touches.length===1)return ni(dt,dt.touches[0]);dt.touches.length===2&&(qr=Y(dt.touches[0],dt.touches[1]),Ar=!0,qi())}function Dn(dt){L.onTouch&&!L.onTouch(dt)||(dt.stopPropagation(),dt.preventDefault())}function Ta(dt){ai(),!(L.onDoubleClick&&!L.onDoubleClick(dt))&&(dt.preventDefault(),dt.stopPropagation())}function ni(dt){it=new Date;var Nt=dt.touches[0],At=Pe(Nt);Ut=At;var $t=Yr(At.x,At.y);Dt=$t.x,Jt=$t.y,Le=Dt,hr=Jt,ve.cancel(),qi()}function qi(){Gt||(Gt=!0,document.addEventListener("touchmove",rn),document.addEventListener("touchend",Ht),document.addEventListener("touchcancel",Ht))}function rn(dt){if(dt.touches.length===1){dt.stopPropagation();var Nt=dt.touches[0],At=Pe(Nt),$t=Yr(At.x,At.y),we=$t.x-Dt,jt=$t.y-Jt;we!==0&&jt!==0&&Qa(),Dt=$t.x,Jt=$t.y,Pi(we,jt)}else if(dt.touches.length===2){Ar=!0;var We=dt.touches[0],Be=dt.touches[1],Fe=Y(We,Be),Mi=1+(Fe/qr-1)*U,In=Pe(We),Ps=Pe(Be);if(Dt=(In.x+Ps.x)/2,Jt=(In.y+Ps.y)/2,st){var At=Dr();Dt=At.x,Jt=At.y}Fn(Dt,Jt,Mi),qr=Fe,dt.stopPropagation(),dt.preventDefault()}}function ai(){xt&&(clearTimeout(xt),xt=0)}function tr(dt){if(L.onClick){ai();var Nt=Dt-Le,At=Jt-hr,$t=Math.sqrt(Nt*Nt+At*At);$t>5||(xt=setTimeout(function(){xt=0,L.onClick(dt)},b))}}function Ht(dt){if(ai(),dt.touches.length>0){var Nt=Pe(dt.touches[0]),At=Yr(Nt.x,Nt.y);Dt=At.x,Jt=At.y}else{var $t=new Date;if($t-Mt<b)if(st){var Nt=Dr();Mr(Nt.x,Nt.y,Q)}else Mr(Ut.x,Ut.y,Q);else $t-it<m&&tr(dt);Mt=$t,Po(),Oe()}}function Y(dt,Nt){var At=dt.clientX-Nt.clientX,$t=dt.clientY-Nt.clientY;return Math.sqrt(At*At+$t*$t)}function bt(dt){Ta(dt);var Nt=Pe(dt);st&&(Nt=Dr()),Mr(Nt.x,Nt.y,Q)}function ct(dt){if(ai(),!J(dt)){if(pt=dt,Et=new Date,Gt)return dt.stopPropagation(),!1;var Nt=dt.button===1&&window.event!==null||dt.button===0;if(Nt){ve.cancel();var At=Pe(dt),$t=Yr(At.x,At.y);return Le=Dt=$t.x,hr=Jt=$t.y,document.addEventListener("mousemove",Bt),document.addEventListener("mouseup",Ft),vt.capture(dt.target||dt.srcElement),!1}}}function Bt(dt){if(!Gt){Qa();var Nt=Pe(dt),At=Yr(Nt.x,Nt.y),$t=At.x-Dt,we=At.y-Jt;Dt=At.x,Jt=At.y,Pi($t,we)}}function Ft(){var dt=new Date;dt-Et<m&&tr(pt),vt.release(),Po(),te()}function te(){document.removeEventListener("mousemove",Bt),document.removeEventListener("mouseup",Ft),ie=!1}function Oe(){document.removeEventListener("touchmove",rn),document.removeEventListener("touchend",Ht),document.removeEventListener("touchcancel",Ht),ie=!1,Ar=!1,Gt=!1}function er(dt){if(!G(dt)){ve.cancel();var Nt=dt.deltaY;dt.deltaMode>0&&(Nt*=100);var At=zs(Nt);if(At!==1){var $t=st?Dr():Pe(dt);Fn($t.x,$t.y,At),dt.preventDefault()}}}function Pe(dt){var Nt,At,$t=j.getBoundingClientRect();return Nt=dt.clientX-$t.left,At=dt.clientY-$t.top,{x:Nt,y:At}}function Mr(dt,Nt,At){var $t=W.scale,we={scale:$t},jt={scale:At*$t};ve.cancel(),oa(),Ge=e(we,jt,{step:function(We){Je(dt,Nt,We.scale)},done:_i})}function ye(dt,Nt,At){var $t=W.scale,we={scale:$t},jt={scale:At};ve.cancel(),oa(),Ge=e(we,jt,{step:function(We){Je(dt,Nt,We.scale)},done:_i})}function Dr(){var dt=j.getBoundingClientRect();return{x:dt.width*st.x,y:dt.height*st.y}}function Fn(dt,Nt,At){return ve.cancel(),oa(),se(dt,Nt,At)}function oa(){Ge&&(Ge.cancel(),Ge=null)}function zs(dt){var Nt=Math.sign(dt),At=Math.min(.25,Math.abs(lt*dt/128));return 1-Nt*At}function Qa(){ie||(jn("panstart"),ie=!0,ve.start())}function Po(){ie&&(Ar||ve.stop(),jn("panend"))}function _i(){jn("zoomend")}function jn(dt){Nr.fire(dt,Nr)}}function _(A){if(A){if(typeof A=="object")return(!E(A.x)||!E(A.y))&&C(A),A;C()}}function C(A){throw console.error(A),new Error(["Cannot parse transform origin.","Some good examples:",' "center center" can be achieved with {x: 0.5, y: 0.5}',' "top center" can be achieved with {x: 0.5, y: 0}',' "bottom right" can be achieved with {x: 1, y: 1}'].join(`
418
+ `))}function w(){}function T(A){var L=typeof A;if(!(L==="undefined"||L==="boolean")){var P=E(A.left)&&E(A.top)&&E(A.bottom)&&E(A.right);if(!P)throw new Error("Bounds object is not valid. It can be: undefined, boolean (true|false) or an object {left, top, right, bottom}")}}function E(A){return Number.isFinite(A)}function N(A){return Number.isNaN?Number.isNaN(A):A!==A}function O(){return{start:w,stop:w,cancel:w}}function B(){if(typeof document>"u")return;var A=document.getElementsByTagName("script");if(!A)return;for(var L,P=0;P<A.length;++P){var j=A[P];if(j.src&&j.src.match(/\bpanzoom(\.min)?\.js/)){L=j;break}}if(!L)return;var $=L.getAttribute("query");if(!$)return;var X=L.getAttribute("name")||"pz",W=Date.now();F();function F(){var z=document.querySelector($);if(!z){var H=Date.now(),V=H-W;if(V<2e3){setTimeout(F,100);return}console.error("Cannot find the panzoom element",X);return}var Q=U(L);console.log(Q),window[X]=v(z,Q)}function U(z){for(var H=z.attributes,V={},Q=0;Q<H.length;++Q){var G=H[Q],J=D(G);J&&(V[J.name]=J.value)}return V}function D(z){if(z.name){var H=z.name[0]==="p"&&z.name[1]==="z"&&z.name[2]==="-";if(H){var V=z.name.substr(3),Q=JSON.parse(z.value);return{name:V,value:Q}}}}}return B(),Vb}var sJ=aJ();const K5=Dd(sJ);Ce.setOptions({gfm:!0,breaks:!0});const oJ={"[":"]","(":")","{":"}"};function lJ(r){if(/^\s*(classDef|class|style|linkStyle|click|subgraph)\b/.test(r))return r;let e="",i=0;const n=r.length;for(;i<n;){const a=r.slice(i).match(/^(\s*[A-Za-z_]\w*\s*)([\[\(\{])/);if(!a){e+=r[i],i++;continue}const o=a[1],c=a[2],h=oJ[c],u=i+o.length+1,d=r.lastIndexOf(h);if(d<=u){e+=r[i],i++;continue}const g=r.slice(u,d).trim();if(g.startsWith('"')&&g.endsWith('"')){e+=r.slice(i,d+1),i=d+1;continue}if(g===""){e+=r.slice(i,d+1),i=d+1;continue}const b=g.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;");e+=`${o}${c}"${b}"${h}`,i=d+1}return e}function cJ(r){return r.split(`
419
+ `).map(lJ).join(`
420
+ `)}const hJ=/^(\s*[-*+]\s+)\[( |x|X)\](\s+)(.*)$/;function uJ(r,e,i){const n=r.split(`
421
+ `);let a=0,o=!1,c="";for(let h=0;h<n.length;h++){const u=n[h],d=/^(\s*)(```|~~~)/.exec(u);if(d){o?u.includes(c)&&(o=!1,c=""):(o=!0,c=d[2]);continue}if(o)continue;const f=hJ.exec(u);if(f){if(a===e){const[,g,,b,m]=f,v=i?"[x]":"[ ]";n[h]=`${g}${v}${b}${m}`;const _=/<!--\s*node:([A-Za-z0-9_-]+)\s*-->/.exec(m);return{body:n.join(`
422
+ `),nodeId:_?_[1]:null}}a++}}return null}const dJ=/-->|---|==>|==|-\.|~~~|\.->/;function fJ(r,e,i){const n=i?"done":"todo",a=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=new RegExp(`^(\\s*)(${a})((?:\\[[^\\]]*\\]|\\([^)]*\\)|\\{[^}]*\\})?)(\\s*:::(?:done|todo|active|blocked)\\b)?\\s*$`),c=r.split(`
423
+ `);let h=!1,u="";for(let d=0;d<c.length;d++){const f=c[d];if(!h){const _=/^(\s*)(```|~~~)\s*mermaid\b/i.exec(f);_&&(h=!0,u=_[2]);continue}if(f.trim().startsWith(u)){h=!1,u="";continue}if(/^\s*(classDef|class|style|linkStyle|click|subgraph|end)\b/.test(f)||dJ.test(f))continue;const g=o.exec(f);if(!g)continue;const[,b,m,v]=g;c[d]=`${b}${m}${v??""}:::${n}`}return c.join(`
424
+ `)}const pJ=[1,2,3,4,5,6,7,8,9,10],gJ=[1,2,3,4,5],mJ=[25,50,75,100],yJ=[.5,1,1.5,2,3,4,5,6,8];function bJ(r){return r==null?"":r<5?"rice-score--low":r<=15?"rice-score--mid":"rice-score--high"}function xJ({task:r,expanded:e,onToggle:i,onUpdate:n}){const{t:a}=Pr(),o=r.rice,c=(o==null?void 0:o.score)??null,h=c===null?"—":String(c),u=bJ(c),d=g=>o?o[g]:null,f=(g,b)=>{const m=b===""?null:Number(b);m!==null&&!Number.isFinite(m)||m!==d(g)&&n({[g]:m})};return x.jsxs("div",{className:`rice-block ${e?"rice-block--open":""}`,children:[x.jsxs("button",{type:"button",className:"rice-header",onClick:i,"aria-expanded":e,children:[x.jsx("span",{className:"rice-header-label",children:a("rice.title")}),x.jsx("span",{className:`rice-score-badge ${u}`,title:a("rice.score"),children:h}),x.jsx("svg",{className:`rice-chevron ${e?"rice-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:x.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e&&x.jsxs("div",{className:"rice-grid",children:[x.jsxs("label",{className:"rice-field",children:[x.jsx("span",{className:"rice-field-label",children:a("rice.reach")}),x.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.reach)??"",title:a("rice.tooltip.reach"),onChange:g=>f("reach",g.target.value),children:[x.jsx("option",{value:"",children:"—"}),pJ.map(g=>x.jsx("option",{value:g,children:g},g))]})]}),x.jsxs("label",{className:"rice-field",children:[x.jsx("span",{className:"rice-field-label",children:a("rice.impact")}),x.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.impact)??"",title:a("rice.tooltip.impact"),onChange:g=>f("impact",g.target.value),children:[x.jsx("option",{value:"",children:"—"}),gJ.map(g=>x.jsx("option",{value:g,children:g},g))]})]}),x.jsxs("label",{className:"rice-field",children:[x.jsx("span",{className:"rice-field-label",children:a("rice.confidence")}),x.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.confidence)??"",title:a("rice.tooltip.confidence"),onChange:g=>f("confidence",g.target.value),children:[x.jsx("option",{value:"",children:"—"}),mJ.map(g=>x.jsxs("option",{value:g,children:[g,"%"]},g))]})]}),x.jsxs("label",{className:"rice-field",children:[x.jsx("span",{className:"rice-field-label",children:a("rice.effort")}),x.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.effort)??"",title:a("rice.tooltip.effort"),onChange:g=>f("effort",g.target.value),children:[x.jsx("option",{value:"",children:"—"}),yJ.map(g=>x.jsxs("option",{value:g,children:[g,"w"]},g))]})]}),o&&x.jsx("button",{type:"button",className:"rice-clear-btn",onClick:()=>n(null),children:a("rice.clear")})]})]})}function Kn({label:r,children:e}){return x.jsxs("div",{className:"prop-row",children:[x.jsx("span",{className:"prop-label",children:r}),x.jsx("div",{className:"prop-value",children:e})]})}function vJ({text:r}){const[e,i]=K.useState(!1),[n,a]=K.useState(!1),o=K.useRef(null);return K.useEffect(()=>{requestAnimationFrame(()=>{const c=o.current;c&&a(c.scrollHeight>c.clientHeight+1)})},[r]),x.jsxs("span",{className:"prop-expandable",onClick:()=>i(c=>!c),children:[x.jsx("span",{ref:o,className:`prop-text ${e?"":"prop-text--clamped"}`,children:r}),n&&!e&&x.jsx("span",{className:"prop-expand-hint",children:"show more"}),e&&n&&x.jsx("span",{className:"prop-expand-hint",children:"show less"})]})}function _J({task:r,onClose:e,initialRiceExpanded:i}){const{t:n}=Pr(),{resolved:a}=Fd(),o=z5(),c=mQ(),{data:h}=q5(),[u,d]=K.useState(""),[f,g]=K.useState(null),[b,m]=K.useState(i??!!r.rice),[v,_]=K.useState(!1),C=W=>{g(W.message),setTimeout(()=>g(null),5e3)},w=W=>{o.mutate({slug:r.slug,updates:{status:W}},{onError:C})},T=W=>{o.mutate({slug:r.slug,updates:{priority:W}},{onError:C})},E=W=>{o.mutate({slug:r.slug,updates:{urgency:W}},{onError:C})},N=W=>{o.mutate({slug:r.slug,updates:{version:W||null}},{onError:C})},O=W=>{o.mutate({slug:r.slug,updates:{rice:W}},{onError:C})},B=W=>{W.preventDefault(),u.trim()&&c.mutate({slug:r.slug,content:u.trim()},{onSuccess:()=>d(""),onError:C})},A=K.useMemo(()=>r.body?Ce.parse(r.body):"",[r.body]),L=K.useRef(null),P=K.useRef(r.body??""),j=K.useRef(r.body??"");K.useEffect(()=>{P.current=r.body??"",j.current=r.body??""},[r.body]);const $=K.useRef(o),X=K.useRef(C);return K.useEffect(()=>{$.current=o,X.current=C}),K.useEffect(()=>{const W=L.current;if(!W||!A)return;W.querySelectorAll('input[type="checkbox"]').forEach((D,z)=>{D.removeAttribute("disabled"),D.dataset.criterionIndex=String(z)});const U=D=>{const z=D.target;if(!(z instanceof HTMLInputElement)||z.type!=="checkbox")return;const H=z.dataset.criterionIndex;if(H===void 0)return;const V=Number(H),Q=z.checked,G=j.current,J=uJ(G,V,Q);if(!J)return;let lt=J.body;J.nodeId&&(lt=fJ(lt,J.nodeId,Q)),lt!==G&&(j.current=lt,$.current.mutate({slug:r.slug,updates:{body:lt}},{onError:st=>{z.checked=!Q,j.current=P.current,X.current(st)}}))};return W.addEventListener("change",U),()=>W.removeEventListener("change",U)},[A,r.slug]),K.useEffect(()=>{const W=L.current;if(!W||!A)return;R5(a);let F=!1;const U=[];let D=!1;const z=async()=>{if(F||D)return;W.querySelectorAll(".mermaid-rendered").forEach(Q=>{const G=Q.dataset.mermaidSource;if(!G)return;const J=document.createElement("pre"),lt=document.createElement("code");lt.className="language-mermaid",lt.textContent=G,J.appendChild(lt),Q.replaceWith(J)});const V=W.querySelectorAll("pre > code.language-mermaid");if(V.length!==0){for(D=!0;U.length;){const Q=U.pop();try{Q==null||Q()}catch{}}for(let Q=0;Q<V.length&&!F;Q++){const G=V[Q],J=G.parentElement;if(!J)continue;const lt=cJ(G.textContent??""),st=`mmd-${r.slug}-${Q}-${Date.now().toString(36)}`,vt=document.createElement("div");vt.className="mermaid-rendered",vt.dataset.mermaidSource=lt;const kt=document.createElement("div");kt.className="mermaid-stage",vt.appendChild(kt);const Mt=document.createElement("div");Mt.className="mermaid-controls",Mt.innerHTML=`
425
+ <button type="button" data-act="out" title="Zoom out">−</button>
426
+ <button type="button" data-act="reset" title="Fit">⤢</button>
427
+ <button type="button" data-act="in" title="Zoom in">+</button>
428
+ `,vt.appendChild(Mt),J.replaceWith(vt);try{const{svg:it,bindFunctions:xt}=await E_.render(st,lt);if(F)break;kt.innerHTML=it,xt==null||xt(kt),vt.dataset.mermaidRendered="1";const pt=kt.querySelector("svg");if(!pt)continue;D5(pt);const Et=pt.viewBox.baseVal,Ut=Et&&Et.width>0?Et.width:pt.getBoundingClientRect().width,Gt=Et&&Et.height>0?Et.height:pt.getBoundingClientRect().height;pt.removeAttribute("width"),pt.removeAttribute("height"),pt.style.width=`${Ut}px`,pt.style.height=`${Gt}px`,pt.style.maxWidth="none",pt.style.transformOrigin="0 0";const ie=K5(pt,{maxZoom:12,minZoom:.15,bounds:!1,zoomDoubleClickSpeed:1.6,smoothScroll:!1}),Dt=()=>{try{const ve=kt.getBoundingClientRect();if(ve.width===0||ve.height===0)return;const Ee=32,Ge=Math.min((ve.width-Ee)/Ut,(ve.height-Ee)/Gt,1);ie.zoomAbs(0,0,1),ie.moveTo(0,0),ie.zoomAbs(0,0,Ge);const Ar=(ve.width-Ut*Ge)/2,Me=(ve.height-Gt*Ge)/2;ie.moveTo(Ar,Me)}catch{}};requestAnimationFrame(()=>requestAnimationFrame(Dt));const Jt=new ResizeObserver(()=>Dt());Jt.observe(kt);let Le=null;const hr=ve=>{try{const Ee=ve.getBoundingClientRect(),Ge=kt.getBoundingClientRect();if(Ee.width===0)return;const Ar=Ee.left+Ee.width/2-Ge.left,Me=Ee.top+Ee.height/2-Ge.top,Nr=Math.min(Ge.width*.6/Ee.width,Ge.height*.6/Ee.height,6),yr=ie.getTransform(),ii=Nr/yr.scale;if(Math.abs(ii-1)<.01)return;ie.smoothZoom(Ar,Me,ii)}catch{}},qr=ve=>{const Ee=ve.target,Ge=(Ee==null?void 0:Ee.closest("g.node, g.cluster"))??null;if(!Ge){Le&&(Le=null,Dt());return}Le===Ge?(Le=null,Dt()):(Le=Ge,hr(Ge))};kt.addEventListener("click",qr),pt.querySelectorAll("g.node, g.cluster").forEach(ve=>{ve.style.cursor="zoom-in"}),Mt.addEventListener("click",ve=>{ve.stopPropagation();const Ee=ve.target.closest("button");if(!Ee)return;const Ge=kt.getBoundingClientRect(),Ar=Ge.width/2,Me=Ge.height/2,Nr=Ee.getAttribute("data-act");Nr==="in"?ie.smoothZoom(Ar,Me,1.4):Nr==="out"?ie.smoothZoom(Ar,Me,1/1.4):Nr==="reset"&&(Le=null,Dt())}),U.push(()=>{Jt.disconnect(),kt.removeEventListener("click",qr),ie.dispose()})}catch(it){if(F)break;const xt=it instanceof Error?it.message:String(it);kt.innerHTML=`<pre class="mermaid-error">Mermaid render failed: ${xt.replace(/[<>&]/g,pt=>({"<":"&lt;",">":"&gt;","&":"&amp;"})[pt]??pt)}</pre>`}}D=!1}};z();const H=new MutationObserver(()=>{if(F||D)return;const V=W.querySelector("pre > code.language-mermaid"),Q=W.querySelector(".mermaid-rendered .mermaid-stage svg");V&&(!Q||V)&&V&&z()});return H.observe(W,{childList:!0,subtree:!0}),()=>{for(F=!0,H.disconnect();U.length;){const V=U.pop();try{V==null||V()}catch{}}}},[A,r.slug,a]),x.jsx("div",{className:`detail-overlay ${v?"detail-overlay--fullscreen":""}`,onClick:e,children:x.jsxs("div",{className:`detail-panel ${v?"detail-panel--fullscreen":""}`,onClick:W=>W.stopPropagation(),children:[x.jsxs("div",{className:"detail-header",children:[x.jsx("h2",{className:"detail-title",children:r.name}),x.jsxs("div",{className:"detail-header-actions",children:[x.jsx("button",{type:"button",className:"detail-icon-btn",onClick:()=>_(W=>!W),title:v?"Exit full-page view":"Open in full page","aria-label":v?"Exit full-page view":"Open in full page",children:v?x.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:x.jsx("path",{d:"M6 3v3H3M10 3v3h3M6 13v-3H3M10 13v-3h3"})}):x.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:x.jsx("path",{d:"M3 6V3h3M13 6V3h-3M3 10v3h3M13 10v3h-3"})})}),x.jsx("button",{className:"modal-close",onClick:e,"aria-label":"Close",children:"×"})]})]}),x.jsxs("div",{className:"detail-body",children:[f&&x.jsx("div",{className:"error-state",style:{marginBottom:"var(--space-3)"},children:f}),x.jsxs("div",{className:"props-block",children:[x.jsx(Kn,{label:"Status",children:x.jsxs("select",{className:"field-select prop-select",value:r.status,onChange:W=>w(W.target.value),children:[x.jsx("option",{value:"todo",children:n("tasks.todo")}),x.jsx("option",{value:"in_progress",children:n("tasks.in_progress")}),x.jsx("option",{value:"in_review",children:n("tasks.in_review")}),x.jsx("option",{value:"completed",children:n("tasks.completed")})]})}),x.jsx(Kn,{label:n("tasks.priority"),children:x.jsxs("select",{className:"field-select prop-select",value:r.priority,onChange:W=>T(W.target.value),children:[x.jsx("option",{value:"low",children:n("priority.low")}),x.jsx("option",{value:"medium",children:n("priority.medium")}),x.jsx("option",{value:"high",children:n("priority.high")}),x.jsx("option",{value:"critical",children:n("priority.critical")})]})}),x.jsx(Kn,{label:"Urgency",children:x.jsxs("select",{className:"field-select prop-select",value:r.urgency,onChange:W=>E(W.target.value),children:[x.jsx("option",{value:"low",children:n("priority.low")}),x.jsx("option",{value:"medium",children:n("priority.medium")}),x.jsx("option",{value:"high",children:n("priority.high")}),x.jsx("option",{value:"critical",children:n("priority.critical")})]})}),x.jsx(Kn,{label:n("rice.title"),children:x.jsx(xJ,{task:r,expanded:b,onToggle:()=>m(W=>!W),onUpdate:O})}),r.tags.length>0&&x.jsx(Kn,{label:"Tags",children:x.jsx("div",{className:"prop-tags",children:r.tags.map(W=>x.jsx("span",{className:"task-tag","data-hue":Yl(W),children:W},W))})}),r.related_feature&&x.jsx(Kn,{label:"Feature",children:x.jsx("span",{className:"prop-feature",children:r.related_feature})}),x.jsx(Kn,{label:"Version",children:x.jsxs("select",{className:"field-select prop-select",value:r.version??"",onChange:W=>N(W.target.value),children:[x.jsx("option",{value:"",children:"No version"}),(h??[]).map(W=>x.jsx("option",{value:W.version,children:W.version},W.version)),r.version&&!(h??[]).some(W=>W.version===r.version)&&x.jsx("option",{value:r.version,children:r.version})]})}),r.description&&x.jsx(Kn,{label:"Description",children:x.jsx(vJ,{text:r.description})}),x.jsx(Kn,{label:"Created",children:x.jsx("span",{className:"prop-date",children:r.created_at})}),x.jsx(Kn,{label:"Updated",children:x.jsx("span",{className:"prop-date",children:r.updated_at})}),r.parent_task&&x.jsx(Kn,{label:"Parent",children:x.jsx("span",{className:"prop-text",children:r.parent_task})}),x.jsx(Kn,{label:"ID",children:x.jsx("code",{className:"prop-id",children:r.id})})]}),x.jsx("hr",{className:"detail-divider"}),A?x.jsx("div",{ref:L,className:"markdown-body",dangerouslySetInnerHTML:{__html:A}}):x.jsx("p",{className:"detail-empty",children:"No content."}),x.jsx("hr",{className:"detail-divider"}),x.jsxs("div",{className:"changelog-section",children:[x.jsx("h3",{className:"changelog-title",children:n("tasks.changelog")}),x.jsxs("form",{onSubmit:B,className:"changelog-add",children:[x.jsx("input",{className:"field-input",value:u,onChange:W=>d(W.target.value),placeholder:"Add a changelog entry..."}),x.jsx("button",{type:"submit",className:"btn btn--primary",disabled:!u.trim()||c.isPending,children:c.isPending?"...":n("tasks.add_entry")})]})]})]})]})})}const CJ=["critical","high"];function Pg(r){return CJ.includes(r)}const $v=[{key:"do",label:"Do First",subtitle:"Important & Urgent",colorVar:"--color-quadrant-do",priorityHigh:!0,urgencyHigh:!0},{key:"schedule",label:"Schedule",subtitle:"Important & Not Urgent",colorVar:"--color-quadrant-schedule",priorityHigh:!0,urgencyHigh:!1},{key:"delegate",label:"Delegate",subtitle:"Less Important & Urgent",colorVar:"--color-quadrant-delegate",priorityHigh:!1,urgencyHigh:!0},{key:"eliminate",label:"Don't Do",subtitle:"Less Important & Not Urgent",colorVar:"--color-quadrant-eliminate",priorityHigh:!1,urgencyHigh:!1}];function rA(r){const e=Pg(r.priority),i=Pg(r.urgency);return e&&i?"do":e&&!i?"schedule":!e&&i?"delegate":"eliminate"}function iA(r,e){return r&&!Pg(e)?"high":!r&&Pg(e)?"medium":null}function nA(r,e){const i=$v.find(c=>c.key===e);if(!i)return{};const n={},a=iA(i.priorityHigh,r.priority),o=iA(i.urgencyHigh,r.urgency);return a&&(n.priority=a),o&&(n.urgency=o),n}function Kb(r){return!r.priority&&!r.urgency}function kJ(r){const e=[];return r.priority&&e.push(`priority → ${r.priority}`),r.urgency&&e.push(`urgency → ${r.urgency}`),e.join(" · ")}function wJ({tasks:r,onTaskClick:e,onTaskMove:i}){const n=r.filter(T=>T.status!=="completed"),[a,o]=K.useState(null),[c,h]=K.useState(null),[u,d]=K.useState(null),f=!!i,g=c?n.find(T=>T.slug===c)??null:null,b=g?rA(g):null,m=(T,E)=>{T.dataTransfer.setData("text/plain",E.slug),T.dataTransfer.effectAllowed="move",h(E.slug)},v=()=>{h(null),o(null)},_=(T,E)=>{f&&(T.preventDefault(),T.dataTransfer.dropEffect="move",a!==E&&o(E))},C=(T,E)=>{if(!i)return;T.preventDefault();const N=T.dataTransfer.getData("text/plain");if(v(),!N)return;const O=n.find(L=>L.slug===N);if(!O)return;const B=nA(O,E);if(Kb(B))return;i(N,B);const A=$v.find(L=>L.key===E);d({slug:N,name:O.name,toLabel:(A==null?void 0:A.label)??E,prev:{priority:O.priority,urgency:O.urgency}})},w=()=>{!u||!i||(i(u.slug,{priority:u.prev.priority,urgency:u.prev.urgency}),d(null))};return x.jsxs("div",{className:`eisenhower${g?" eisenhower--dragging":""}`,children:[f&&u&&x.jsxs("div",{className:"eisenhower-undo",role:"status",children:[x.jsxs("span",{className:"eisenhower-undo-text",children:["Moved ",x.jsx("strong",{children:u.name})," → ",u.toLabel]}),x.jsx("button",{type:"button",className:"eisenhower-undo-btn",onClick:w,children:"Undo"}),x.jsx("button",{type:"button",className:"eisenhower-undo-dismiss","aria-label":"Dismiss",onClick:()=>d(null),children:"×"})]}),x.jsx("div",{className:"eisenhower-grid",onDragEnd:v,children:$v.map(T=>{const E=n.filter(P=>rA(P)===T.key),N=a===T.key,O=b===T.key,B=N&&g?nA(g,T.key):null,A=B?Kb(B)?"Already here":kJ(B):null,L=["eisenhower-quadrant",`eisenhower-quadrant--${T.key}`,N?"eisenhower-quadrant--dragover":"",O?"eisenhower-quadrant--source":"",N&&B&&Kb(B)?"eisenhower-quadrant--noop":""].filter(Boolean).join(" ");return x.jsxs("div",{className:L,onDragOver:P=>_(P,T.key),onDragLeave:()=>o(P=>P===T.key?null:P),onDrop:P=>C(P,T.key),children:[x.jsxs("div",{className:"eisenhower-quadrant-header",children:[x.jsx("span",{className:"eisenhower-quadrant-dot",style:{background:`var(${T.colorVar})`}}),x.jsx("span",{className:"eisenhower-quadrant-label",children:T.label}),x.jsx("span",{className:"eisenhower-quadrant-count",children:E.length})]}),A?x.jsx("span",{className:"eisenhower-quadrant-preview",children:A}):x.jsx("span",{className:"eisenhower-quadrant-subtitle",children:T.subtitle}),x.jsxs("div",{className:"eisenhower-quadrant-cards",children:[E.map(P=>x.jsx(Xd,{task:P,onClick:()=>e(P),onDragStart:j=>m(j,P),dragging:c===P.slug},P.slug)),f&&E.length===0&&x.jsx("div",{className:"eisenhower-quadrant-empty",children:"Drop tasks here"})]})]},T.key)})}),x.jsxs("div",{className:"eisenhower-x-label",children:[x.jsx("span",{className:"eisenhower-axis-hi",children:"Urgent"}),x.jsx("span",{className:"eisenhower-axis-lo",children:"Not Urgent"})]})]})}const me={top:32,right:24,bottom:56,left:64},aA=.5,sA=8,Xb=1,oA=5,SJ=2,TJ=3,EJ={todo:"--color-status-todo",in_progress:"--color-status-in-progress",in_review:"--color-status-in-review",completed:"--color-status-completed"};function Zb(r){return Math.log2(Math.max(r,.01)+1)}function Qb(r,e,i){return Math.max(e,Math.min(i,r))}function lA(r){const e=r.rice;return!!(e&&e.reach!==null&&e.impact!==null&&e.confidence!==null&&e.effort!==null&&e.score!==null)}function AJ({tasks:r,onTaskClick:e}){const i=K.useRef(null),[n,a]=K.useState({width:800,height:480}),[o,c]=K.useState(!1),[h,u]=K.useState(null);K.useEffect(()=>{const j=i.current;if(!j)return;const $=new ResizeObserver(X=>{for(const W of X){const F=W.contentRect.width,U=Math.max(360,Math.min(620,F*.6));a({width:F,height:U})}});return $.observe(j),()=>$.disconnect()},[]);const d=K.useMemo(()=>r.filter(j=>j.status!=="completed"),[r]),f=K.useMemo(()=>d.filter(lA),[d]),g=K.useMemo(()=>d.filter(j=>!lA(j)),[d]),b=K.useMemo(()=>[...f].sort((j,$)=>($.rice.score??0)-(j.rice.score??0)),[f]),m=Math.max(120,n.width-me.left-me.right),v=Math.max(120,n.height-me.top-me.bottom),_=Zb(aA),w=Zb(sA)-_,T=j=>{const $=(Zb(Qb(j,aA,sA))-_)/w;return me.left+(1-$)*m},E=j=>{const $=(Qb(j,Xb,oA)-Xb)/(oA-Xb);return me.top+(1-$)*v},N=j=>6+(Qb(j,1,10)-1)/9*18,O=j=>Math.max(.4,j/100),B=T(SJ),A=E(TJ),L=[.5,1,2,4,8],P=[1,2,3,4,5];return x.jsxs("div",{className:"rice-scatter",ref:i,children:[x.jsxs("svg",{className:"rice-scatter-svg",width:n.width,height:n.height,viewBox:`0 0 ${n.width} ${n.height}`,role:"img","aria-label":`RICE scatter: ${f.length} rated tasks plotted by impact and effort`,children:[x.jsx("rect",{x:me.left,y:me.top,width:B-me.left,height:A-me.top,className:"rice-quad rice-quad--big-bets"}),x.jsx("rect",{x:B,y:me.top,width:me.left+m-B,height:A-me.top,className:"rice-quad rice-quad--quick-wins"}),x.jsx("rect",{x:me.left,y:A,width:B-me.left,height:me.top+v-A,className:"rice-quad rice-quad--time-sinks"}),x.jsx("rect",{x:B,y:A,width:me.left+m-B,height:me.top+v-A,className:"rice-quad rice-quad--fill-ins"}),x.jsx("text",{x:me.left+8,y:me.top+18,className:"rice-quad-label",children:"Big Bets"}),x.jsx("text",{x:me.left+m-8,y:me.top+18,textAnchor:"end",className:"rice-quad-label",children:"Quick Wins"}),x.jsx("text",{x:me.left+8,y:me.top+v-6,className:"rice-quad-label",children:"Time Sinks"}),x.jsx("text",{x:me.left+m-8,y:me.top+v-6,textAnchor:"end",className:"rice-quad-label",children:"Fill-ins"}),x.jsx("line",{x1:B,y1:me.top,x2:B,y2:me.top+v,className:"rice-quad-divider"}),x.jsx("line",{x1:me.left,y1:A,x2:me.left+m,y2:A,className:"rice-quad-divider"}),x.jsx("line",{x1:me.left,y1:me.top+v,x2:me.left+m,y2:me.top+v,className:"rice-axis"}),x.jsx("line",{x1:me.left,y1:me.top,x2:me.left,y2:me.top+v,className:"rice-axis"}),L.map(j=>x.jsxs("g",{children:[x.jsx("line",{x1:T(j),y1:me.top+v,x2:T(j),y2:me.top+v+4,className:"rice-axis"}),x.jsxs("text",{x:T(j),y:me.top+v+18,textAnchor:"middle",className:"rice-tick",children:[j,"w"]})]},`xt-${j}`)),x.jsx("text",{x:me.left+m/2,y:me.top+v+40,textAnchor:"middle",className:"rice-axis-label",children:"Effort (weeks) — low-effort on right"}),P.map(j=>x.jsxs("g",{children:[x.jsx("line",{x1:me.left-4,y1:E(j),x2:me.left,y2:E(j),className:"rice-axis"}),x.jsx("text",{x:me.left-8,y:E(j)+4,textAnchor:"end",className:"rice-tick",children:j})]},`yt-${j}`)),x.jsx("text",{transform:`translate(${me.left-44}, ${me.top+v/2}) rotate(-90)`,textAnchor:"middle",className:"rice-axis-label",children:"Impact"}),f.map(j=>{const $=j.rice,X=T($.effort),W=E($.impact),F=N($.reach),U=O($.confidence),D=EJ[j.status],z=h===j.slug;return x.jsx("circle",{cx:X,cy:W,r:F,fill:`var(${D})`,fillOpacity:U,stroke:"var(--color-bg)",strokeWidth:z?2.5:1.5,className:"rice-dot",tabIndex:0,role:"button","aria-label":`${j.name}: reach ${$.reach}, impact ${$.impact}, confidence ${$.confidence}, effort ${$.effort} weeks, score ${$.score}`,onClick:()=>e(j),onKeyDown:H=>{(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),e(j))},onMouseEnter:()=>u(j.slug),onMouseLeave:()=>u(null),onFocus:()=>u(j.slug),onBlur:()=>u(null),children:x.jsx("title",{children:`${j.name}
429
+ R ${$.reach} · I ${$.impact} · C ${$.confidence}% · E ${$.effort}w
430
+ Score: ${$.score}`})},j.slug)})]}),x.jsx("ol",{className:"rice-scatter-sr-list",children:b.map(j=>x.jsx("li",{children:`${j.name} — score ${j.rice.score}`},j.slug))}),g.length>0&&x.jsxs("div",{className:`rice-unscored ${o?"rice-unscored--open":""}`,children:[x.jsxs("button",{type:"button",className:"rice-unscored-toggle",onClick:()=>c(j=>!j),"aria-expanded":o,children:[x.jsxs("span",{children:["Unscored (",g.length,")"]}),x.jsx("svg",{className:`rice-chevron ${o?"rice-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:x.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),o&&x.jsx("div",{className:"rice-unscored-cards",children:g.map(j=>x.jsx(Xd,{task:j,onClick:()=>e(j),onDragStart:()=>{}},j.slug))})]})]})}function NJ({onClose:r,tasks:e}){const{data:i,isLoading:n}=P5(),a=yQ(),o=bQ(),[c,h]=K.useState(""),[u,d]=K.useState(""),f=v=>{v.preventDefault(),c.trim()&&a.mutate({version:c.trim(),summary:u.trim()||void 0},{onSuccess:()=>{h(""),d("")}})},g=v=>e.filter(_=>_.version===v).length,b=(i??[]).filter(v=>v.status==="planning"),m=(i??[]).filter(v=>v.status==="released");return x.jsx("div",{className:"modal-overlay",onClick:r,children:x.jsxs("div",{className:"modal version-manager-modal",onClick:v=>v.stopPropagation(),children:[x.jsxs("div",{className:"modal-header",children:[x.jsx("h2",{className:"modal-title",children:"Versions & Releases"}),x.jsx("button",{className:"modal-close",onClick:r,children:"×"})]}),x.jsxs("div",{className:"modal-body version-manager-body",children:[x.jsxs("div",{className:"version-stats",children:[x.jsxs("div",{className:"version-stat",children:[x.jsx("span",{className:"version-stat-count",children:b.length}),x.jsx("span",{className:"version-stat-label",children:"Planning"})]}),x.jsxs("div",{className:"version-stat",children:[x.jsx("span",{className:"version-stat-count",children:m.length}),x.jsx("span",{className:"version-stat-label",children:"Released"})]})]}),n&&x.jsx("p",{className:"version-manager-loading",children:"Loading..."}),b.length>0&&x.jsxs("div",{className:"version-section",children:[x.jsx("h3",{className:"version-section-title",children:"Planning"}),b.map(v=>{const _=g(v.version);return x.jsxs("div",{className:"version-item",children:[x.jsxs("div",{className:"version-item-info",children:[x.jsx("span",{className:"version-status-badge version-status-badge--planning",children:"planning"}),x.jsx("span",{className:"version-item-name",children:v.version}),x.jsxs("span",{className:"version-item-count",children:[_," task",_!==1?"s":""]})]}),v.summary&&x.jsx("p",{className:"version-item-desc",children:v.summary}),x.jsx("div",{className:"version-item-actions",children:x.jsx("button",{className:"btn btn--primary version-release-btn",onClick:()=>o.mutate({version:v.version,updates:{status:"released"}}),children:"Release"})})]},v.version)})]}),m.length>0&&x.jsxs("div",{className:"version-section",children:[x.jsx("h3",{className:"version-section-title",children:"Released"}),m.map(v=>{const _=g(v.version);return x.jsxs("div",{className:"version-item version-item--released",children:[x.jsxs("div",{className:"version-item-info",children:[x.jsx("span",{className:"version-status-badge version-status-badge--released",children:"released"}),x.jsx("span",{className:"version-item-name",children:v.version}),x.jsxs("span",{className:"version-item-count",children:[_," task",_!==1?"s":""]}),v.date&&x.jsx("span",{className:"version-item-date",children:v.date})]}),v.summary&&x.jsx("p",{className:"version-item-desc",children:v.summary})]},v.version)})]}),(i??[]).length===0&&!n&&x.jsx("p",{className:"version-manager-empty",children:"No versions yet. Create one below."}),x.jsxs("form",{onSubmit:f,className:"version-create-form",children:[x.jsx("h3",{className:"version-section-title",children:"New Version"}),x.jsx("input",{className:"field-input",value:c,onChange:v=>h(v.target.value),placeholder:"Version name (e.g. v0.2.0)",required:!0}),x.jsx("input",{className:"field-input",value:u,onChange:v=>d(v.target.value),placeholder:"Summary (optional)"}),x.jsx("button",{type:"submit",className:"btn btn--primary",disabled:!c.trim()||a.isPending,children:a.isPending?"...":"Create Planning Version"})]})]})]})})}const cA={critical:0,high:1,medium:2,low:3},hA={critical:0,high:1,medium:2,low:3},X5=[{key:"todo",labelKey:"tasks.todo",colorVar:"--color-status-todo"},{key:"in_progress",labelKey:"tasks.in_progress",colorVar:"--color-status-in-progress"},{key:"in_review",labelKey:"tasks.in_review",colorVar:"--color-status-in-review"},{key:"completed",labelKey:"tasks.completed",colorVar:"--color-status-completed"}],Z5=[{key:"critical",label:"Critical",colorVar:"--color-priority-critical"},{key:"high",label:"High",colorVar:"--color-priority-high"},{key:"medium",label:"Medium",colorVar:"--color-priority-medium"},{key:"low",label:"Low",colorVar:"--color-priority-low"}],Q5=[{key:"critical",label:"Critical",colorVar:"--color-urgency-critical"},{key:"high",label:"High",colorVar:"--color-urgency-high"},{key:"medium",label:"Medium",colorVar:"--color-urgency-medium"},{key:"low",label:"Low",colorVar:"--color-urgency-low"}];function MJ(r,e){return[...r].sort((i,n)=>{var a,o;switch(e){case"updated_at":case"created_at":return n[e].localeCompare(i[e]);case"priority":return(cA[i.priority]??9)-(cA[n.priority]??9);case"urgency":return(hA[i.urgency]??9)-(hA[n.urgency]??9);case"name":return i.name.localeCompare(n.name);case"rice":{const c=((a=i.rice)==null?void 0:a.score)??-1/0;return(((o=n.rice)==null?void 0:o.score)??-1/0)-c}}})}function BJ(r,e){let i=r;if(e.searchQuery.trim()){const n=e.searchQuery.trim().toLowerCase();i=i.filter(a=>a.name.toLowerCase().includes(n)||a.description.toLowerCase().includes(n))}if(e.statusFilter.length>0&&(i=i.filter(n=>e.statusFilter.includes(n.status))),e.priorityFilter.length>0&&(i=i.filter(n=>e.priorityFilter.includes(n.priority))),e.urgencyFilter.length>0&&(i=i.filter(n=>e.urgencyFilter.includes(n.urgency))),e.tagFilter.length>0&&(i=i.filter(n=>n.tags.some(a=>e.tagFilter.includes(a)))),e.versionFilter.length>0&&(i=i.filter(n=>n.version!==null&&e.versionFilter.includes(n.version))),e.dateFrom||e.dateTo){const n=e.dateField;e.dateFrom&&(i=i.filter(a=>a[n].slice(0,10)>=e.dateFrom)),e.dateTo&&(i=i.filter(a=>a[n].slice(0,10)<=e.dateTo))}if(e.minRice!==null&&e.minRice!==void 0){const n=e.minRice;i=i.filter(a=>{var o,c;return((o=a.rice)==null?void 0:o.score)!==null&&((c=a.rice)==null?void 0:c.score)!==void 0&&a.rice.score>=n})}return MJ(i,e.sortField)}function uA(r){const e=r,i={...zg};for(const a of Object.keys(zg))e[a]!==void 0&&(i[a]=e[a]);const n=["statusFilter","priorityFilter","urgencyFilter","tagFilter","versionFilter"];for(const a of n){const o=e[a];typeof o=="string"?i[a]=o.trim()?[o.trim()]:[]:Array.isArray(o)||(i[a]=[])}return i.viewMode===void 0&&(i.viewMode="kanban"),i.subGroupBy===void 0&&(i.subGroupBy="none"),i.minRice===void 0&&(i.minRice=null),i}function dA(r,e){if(e==="none")return[];switch(e){case"status":return X5.map(i=>({key:i.key,label:i.labelKey,color:`var(${i.colorVar})`,tasks:r.filter(n=>n.status===i.key)})).filter(i=>i.tasks.length>0);case"priority":return Z5.map(i=>({key:i.key,label:i.label,color:`var(${i.colorVar})`,tasks:r.filter(n=>n.priority===i.key)})).filter(i=>i.tasks.length>0);case"urgency":return Q5.map(i=>({key:i.key,label:i.label,color:`var(${i.colorVar})`,tasks:r.filter(n=>n.urgency===i.key)})).filter(i=>i.tasks.length>0);case"tags":{const i=new Map;for(const n of r)if(n.tags.length===0){const a=i.get("(untagged)")??[];a.push(n),i.set("(untagged)",a)}else for(const a of n.tags){const o=i.get(a)??[];o.push(n),i.set(a,o)}return Array.from(i.entries()).map(([n,a])=>({key:n,label:n,tasks:a}))}case"version":{const i=new Map;for(const n of r){const a=n.version??"(no version)",o=i.get(a)??[];o.push(n),i.set(a,o)}return Array.from(i.entries()).map(([n,a])=>({key:n,label:n,tasks:a}))}}return[]}function LJ(r,e){return r?`dreamcontext:${r}:${e}`:`dreamcontext:${e}`}function OJ(r,e){try{const i=localStorage.getItem(r);return i===null?e:JSON.parse(i)}catch{return e}}function RJ(r,e){try{localStorage.setItem(r,JSON.stringify(e))}catch{}}function DJ(){const{t:r}=Pr(),{projectId:e}=YN(),{data:i,isLoading:n,isError:a,error:o}=pQ(),{data:c}=P5(),h=z5(),[u,d]=K.useState(!1),[f,g]=K.useState(!1),[b,m]=K.useState(null),v=K.useMemo(()=>LJ(e,"kanban-filters"),[e]),[_,C]=K.useState(()=>{const F=OJ(v,zg);return uA(F)}),w=K.useCallback(F=>{C(U=>{const D=typeof F=="function"?F(U):F;return RJ(v,D),D})},[v]),T=CQ(e),E=K.useCallback((F,U)=>{w(D=>({...D,[F]:U}))},[w]),N=K.useCallback(()=>{w(F=>({...zg,sortField:F.sortField,groupBy:F.groupBy,subGroupBy:F.subGroupBy,viewMode:F.viewMode}))},[w]),O=K.useCallback(F=>{kQ(e,F,{..._})},[_,e]),B=K.useCallback(F=>{w(uA(F.filters))},[w]),A=K.useCallback(F=>{wQ(e,F)},[e]),L=K.useMemo(()=>BJ(i??[],_),[i,_]),P=K.useMemo(()=>!b||!i?null:i.find(F=>F.slug===b)??null,[b,i]),j=K.useMemo(()=>{const F=new Set;for(const U of i??[])for(const D of U.tags)F.add(D);return Array.from(F).sort()},[i]),$=K.useMemo(()=>{const F=new Set;for(const U of i??[])U.version&&F.add(U.version);for(const U of c??[])F.add(U.version);return Array.from(F).sort()},[i,c]),X=(F,U,D)=>{switch(D){case"status":h.mutate({slug:F,updates:{status:U}});break;case"priority":h.mutate({slug:F,updates:{priority:U}});break;case"urgency":h.mutate({slug:F,updates:{urgency:U}});break;case"tags":{const z=(i??[]).find(H=>H.slug===F);z&&!z.tags.includes(U)&&U!=="(untagged)"&&h.mutate({slug:F,updates:{tags:[...z.tags,U]}})}break;case"version":h.mutate({slug:F,updates:{version:U==="(no version)"?null:U}});break}};if(n)return x.jsx("div",{className:"loading",children:r("common.loading")});if(a)return x.jsxs("div",{className:"error-state",children:["Failed to load tasks. ",o==null?void 0:o.message]});const W=()=>{const{groupBy:F,subGroupBy:U}=_,D=(z,H,V,Q,G)=>x.jsx(PE,{title:typeof H=="string"&&H.includes(".")?r(H):H,status:z,tasks:Q,count:Q.length,colorVar:V,onTaskClick:J=>m(J.slug),onDrop:(J,lt)=>X(J,lt,F),staggerIndex:G+1,subGroups:U!=="none"?dA(Q,U):void 0},z);switch(F){case"status":return X5.map((z,H)=>D(z.key,z.labelKey,z.colorVar,L.filter(V=>V.status===z.key),H));case"priority":return Z5.map((z,H)=>D(z.key,z.label,z.colorVar,L.filter(V=>V.priority===z.key),H));case"urgency":return Q5.map((z,H)=>D(z.key,z.label,z.colorVar,L.filter(V=>V.urgency===z.key),H));case"tags":{const z=new Map;for(const H of L)if(H.tags.length===0){const V=z.get("(untagged)")??[];V.push(H),z.set("(untagged)",V)}else for(const V of H.tags){const Q=z.get(V)??[];Q.push(H),z.set(V,Q)}return Array.from(z.entries()).map(([H,V],Q)=>D(H,H,"--color-brand-vivid",V,Q))}case"version":{const z=(c??[]).filter(Q=>Q.status==="planning").map(Q=>Q.version),H=(c??[]).filter(Q=>Q.status==="released").map(Q=>Q.version),V=["(no version)",...z,...H];for(const Q of L)Q.version&&!V.includes(Q.version)&&V.push(Q.version);return V.map((Q,G)=>{const J=L.filter(lt=>(lt.version??"(no version)")===Q);return J.length===0&&Q!=="(no version)"?null:D(Q,Q,"--color-brand-mid",J,G)}).filter(Boolean)}case"none":return[x.jsx(PE,{title:"All Tasks",status:"all",tasks:L,count:L.length,colorVar:"--color-brand-vivid",onTaskClick:z=>m(z.slug),onDrop:()=>{},subGroups:U!=="none"?dA(L,U):void 0},"all")]}};return x.jsxs("div",{className:"kanban-board",children:[x.jsx(VQ,{filters:_,onFilterChange:E,onClearFilters:N,onCreateClick:()=>d(!0),presets:T,onSavePreset:O,onLoadPreset:B,onDeletePreset:A,allTags:j,allVersions:$,onVersionManagerClick:()=>g(!0)}),_.viewMode==="eisenhower"?x.jsx(wJ,{tasks:L,onTaskClick:F=>m(F.slug),onTaskMove:(F,U)=>h.mutate({slug:F,updates:U})}):_.viewMode==="scatter"?x.jsx(AJ,{tasks:L,onTaskClick:F=>m(F.slug)}):_.viewMode==="list"?x.jsx("div",{className:"task-list",children:L.map(F=>x.jsx(Xd,{task:F,onClick:()=>m(F.slug),onDragStart:()=>{}},F.slug))}):x.jsx("div",{className:"kanban-columns",children:W()}),u&&x.jsx(KQ,{onClose:()=>d(!1)}),f&&x.jsx(NJ,{onClose:()=>g(!1),tasks:i??[]}),P&&x.jsx(_J,{task:P,onClose:()=>m(null)})]})}function FJ(){return x.jsx("div",{children:x.jsx(DJ,{})})}function jJ(){return mi({queryKey:["changelog"],queryFn:()=>cr.get("/changelog")})}const IJ=25;function fA({entry:r}){const{t:e}=Pr();return x.jsxs("div",{className:"changelog-item",children:[x.jsxs("div",{className:"changelog-meta",children:[x.jsx("span",{className:"task-tag","data-hue":Yl(r.type),children:r.type}),r.scope&&x.jsx("span",{className:"changelog-scope",children:r.scope}),r.breaking&&x.jsx("span",{className:"changelog-breaking",children:e("sleep.changelog.breaking")})]}),x.jsx("p",{className:"changelog-summary",children:r.summary}),r.description&&x.jsx("p",{className:"changelog-desc",children:r.description})]})}function $J(r){const e=[];for(const i of r){const n=e[e.length-1];n&&n.date===i.date?n.items.push(i):e.push({date:i.date,items:[i]})}return e}function zJ(){const{t:r}=Pr(),{data:e,isLoading:i,isError:n,error:a}=XN(),{data:o}=jJ();if(i||!e)return x.jsx("div",{className:"loading",children:r("common.loading")});if(n)return x.jsxs("div",{className:"error-state",children:["Failed to load sleep state. ",a==null?void 0:a.message]});const c=VN(e.debt),h=KN(e.debt),u=e.last_sleep,d=(o==null?void 0:o.entries)??[],f=u?d.filter(_=>_.date>u):[],g=u?d.filter(_=>_.date<=u):d,b=g.slice(0,IJ),m=$J(b),v=g.length-b.length;return x.jsxs("div",{className:"sleep-page",children:[x.jsx("h1",{className:"page-title",children:r("sleep.title")}),x.jsxs("div",{className:"sleep-overview",children:[x.jsxs("div",{className:`sleep-gauge sleep-gauge--${h}`,children:[x.jsx("span",{className:"sleep-gauge-number",children:e.debt}),x.jsx("span",{className:"sleep-gauge-label",children:c})]}),x.jsxs("div",{className:"sleep-details",children:[x.jsxs("div",{className:"sleep-detail",children:[x.jsx("span",{className:"sleep-detail-label",children:r("sleep.last_sleep")}),x.jsx("span",{className:"sleep-detail-value",children:e.last_sleep??"Never"})]}),e.last_sleep_summary&&x.jsxs("div",{className:"sleep-detail",children:[x.jsx("span",{className:"sleep-detail-label",children:"Summary"}),x.jsx("span",{className:"sleep-detail-value sleep-detail-value--summary",children:e.last_sleep_summary.slice(0,200)})]})]})]}),d.length>0&&x.jsxs("div",{className:"sleep-section",children:[x.jsxs("h2",{className:"sleep-section-title",children:[r("sleep.changelog")," (",d.length,")"]}),f.length>0&&x.jsxs("div",{className:"changelog-group changelog-group--pending",children:[x.jsxs("h3",{className:"changelog-group-title",children:[r("sleep.changelog.pending")," (",f.length,")"]}),x.jsx("div",{className:"changelog-list",children:f.map((_,C)=>x.jsx(fA,{entry:_},`p-${C}`))})]}),m.map(_=>x.jsxs("div",{className:"changelog-group",children:[x.jsx("h3",{className:"changelog-group-title changelog-group-title--day",children:_.date}),x.jsx("div",{className:"changelog-list",children:_.items.map((C,w)=>x.jsx(fA,{entry:C},`${_.date}-${w}`))})]},_.date)),v>0&&x.jsxs("p",{className:"changelog-more",children:[v," ",r("sleep.changelog.earlier")]})]}),e.sessions.length>0&&x.jsxs("div",{className:"sleep-section",children:[x.jsxs("h2",{className:"sleep-section-title",children:[r("sleep.sessions")," (",e.sessions.length,")"]}),x.jsx("div",{className:"session-list",children:e.sessions.map((_,C)=>x.jsxs("div",{className:"session-item",children:[x.jsxs("div",{className:"session-header",children:[x.jsx("span",{className:"session-time",children:_.stopped_at??"Active"}),_.score!==null&&x.jsxs("span",{className:"session-score",children:["+",_.score]}),_.change_count!==null&&x.jsxs("span",{className:"session-changes",children:[_.change_count," changes"]}),_.tool_count!=null&&x.jsxs("span",{className:"session-changes",children:[_.tool_count," tools"]})]}),_.last_assistant_message&&x.jsxs("p",{className:"session-message",children:[_.last_assistant_message.slice(0,150),_.last_assistant_message.length>150?"...":""]})]},C))})]}),e.dashboard_changes.length>0&&x.jsxs("div",{className:"sleep-section",children:[x.jsxs("h2",{className:"sleep-section-title",children:["Dashboard Changes (",e.dashboard_changes.length,")"]}),x.jsx("div",{className:"session-list",children:e.dashboard_changes.map((_,C)=>x.jsxs("div",{className:"session-item",children:[x.jsxs("div",{className:"session-header",children:[x.jsx("span",{className:"session-time",children:_.timestamp}),x.jsxs("span",{className:"session-changes",children:[_.entity," / ",_.action]})]}),x.jsx("p",{className:"session-message",children:_.summary})]},C))})]})]})}const PJ=new Set(["text","int","integer","numeric","boolean","timestamp","jsonb","json","serial","bigint","smallint","real","double","float","date","time","uuid","bytea","blob","varchar","char","array"]);function Jb(r){const e=r.replace(/\(.*\)/,"").replace(/\[.*\]/,"").toLowerCase();return PJ.has(e)}function qJ(r){const{entities:e,relations:i}=UJ(r),n=HJ(r),a=new Set(e.map(f=>f.name.toLowerCase())),o=[...e,...n.filter(f=>!a.has(f.name.toLowerCase()))],c=GJ(o),h=f=>`${f.from}.${f.fromField}->${f.to}.${f.toField}`,u=new Set(i.map(h)),d=[...i,...c.filter(f=>!u.has(h(f)))];return{entities:o,relations:d}}function UJ(r){const e=[],i=[],n=r.split(`
431
+ `);let a=null,o=[],c,h=!1,u=null;function d(){a&&o.length>0&&e.push({name:a,path:c,fields:o,storageType:"table",notes:[]}),a=null,c=void 0,o=[],h=!1,u=null}for(let f=0;f<n.length;f++){const g=n[f],b=g.trim();if(/^\s*--\s*\d+\.\s+\w+/.test(g)){const P=g.match(/\/\w+\/\{[^}]+\}/);P&&(c=P[0]);continue}const m=b.match(/^CREATE\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?[`"']?(\w+)[`"']?\s*\(/i);if(m){d(),a=m[1],o=[],h=!0;continue}if(!h||!a)continue;if(/^\s*\)\s*;/.test(g)){d();continue}if(/^\s*--/.test(g)){const j=g.replace(/^\s*--\s?/,"").trim();if(!j||/^[═─=\-*]{3,}/.test(j))continue;if(j.startsWith(".")){const X=j.match(/^\.(\w+(?:\.\w+)*)\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(X&&Jb(X[2])&&u){const W=X[1],F=X[2].toLowerCase(),D=(X[3]||"").match(/--\s*(.+)$/),z=D?D[1].trim():void 0;o.push({name:`${u}.${W}`,type:F,description:z,isNested:!0,parentField:u})}continue}const $=j.match(/^(\w+(?:\[\])?)\.(\w+(?:\.\w+)*)\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if($&&Jb($[3])){const X=$[1].replace(/\[\]$/,""),W=$[2],F=$[3].toLowerCase(),D=($[4]||"").match(/--\s*(.+)$/),z=D?D[1].trim():void 0;u=X,o.push({name:`${X}.${W}`,type:F,description:z,isNested:!0,parentField:X});continue}continue}if(!b)continue;const _=b.replace(/--.*$/,"").trim().replace(/,\s*$/,"").trim();if(/^(PRIMARY|FOREIGN|UNIQUE|CHECK|CONSTRAINT|INDEX)\b/i.test(_))continue;const C=_.match(/^[`"']?(\w+)[`"']?\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(!C)continue;const w=C[1],T=C[2],E=C[3]||"";if(!Jb(T))continue;const N=T.toLowerCase(),O=/PRIMARY\s+KEY/i.test(E),B=E.match(/REFERENCES\s+[`"']?(\w+)[`"']?\s*\(\s*[`"']?(\w+)[`"']?\s*\)/i);B&&i.push({from:a,fromField:w,to:B[1],toField:B[2],cardinality:"1:1"});const A=g.match(/--\s*(.+)$/),L=A?A[1].trim():void 0;(N==="jsonb"||N==="json")&&(u=w),o.push({name:w,type:N,isPrimary:O,description:L})}return d(),{entities:e,relations:i}}function HJ(r){var o,c,h,u,d;const e=[];let i=null,n=!1;const a=r.split(`
432
+ `);for(let f=0;f<a.length;f++){const b=a[f].match(/^--\s?(.*)/);if(!b)continue;const m=b[1].trim();if(/^={4,}$/.test(m)){i&&i.fields.length>0&&e.push(i),i=null,n=!1;continue}if(/^[A-Z ]+\(/.test(m)&&!m.match(/^[a-z_]/))continue;const v=m.match(/^([A-Z][A-Z _]+?):\s+(\S.+)$/);if(v&&!n){const _=v[1].trim();if(_===_.toUpperCase()&&_.length>1){i&&i.fields.length>0&&e.push(i);const C=v[2].trim();i={name:_,path:C,storageType:C.endsWith(".json")?"json":"file",notes:[],fields:[]},n=!1;continue}}if(i){const _=m.match(/^(?:Created|Managed)\s+by:\s+(.+)/i);if(_){i.managedBy=_[1].trim();continue}}if(m.includes("Fields in YAML frontmatter")||m.startsWith("Schema ")){n=!0;continue}if(m==="["||m==="{"){n=!0;continue}if(!(m==="]"||m==="}"||m==="..."||m==="},")){if(i&&n){const _=m.match(/^([a-z_]\w*):\s+(.+?)(?:\s{2,}--\s+(.+))?$/);if(_){const{type:w,enumValues:T}=pA(_[2].trim(),(o=_[3])==null?void 0:o.trim());i.fields.push({name:_[1],type:w,enumValues:T,description:(c=_[3])==null?void 0:c.trim(),isPrimary:_[1]==="id"});continue}const C=m.match(/^"([a-z_]\w*)":\s+(.+?)(?:,)?(?:\s{2,}--\s+(.+))?$/);if(C){const{type:w,enumValues:T}=pA(C[2].trim(),(h=C[3])==null?void 0:h.trim());i.fields.push({name:C[1],type:w,enumValues:T,description:(u=C[3])==null?void 0:u.trim()});continue}}if(i&&m.startsWith("Body ")&&(i.notes.push(m),m.includes("sections")&&f+1<a.length)){const _=(d=a[f+1])==null?void 0:d.match(/^--\s?(.*)/);_&&/^\s*(Why|[A-Z])/.test(_[1])&&(i.notes.push(_[1].trim()),f++)}}}return i&&i.fields.length>0&&e.push(i),e}function pA(r,e){return r.includes("|")?{type:"enum",enumValues:r.split("|").map(n=>n.trim().replace(/^"|"$/g,""))}:r==="[]"?{type:e!=null&&e.includes("string")?"string[]":"array"}:r.startsWith("[")?{type:"array"}:r==="true"||r==="false"?{type:"boolean"}:r==="null"?{type:"nullable"}:/^\d+$/.test(r)?{type:"number"}:/\d{4}-\d{2}-\d{2}/.test(r.replace(/"/g,""))?{type:"date"}:{type:"string"}}function GJ(r){const e=[];for(const i of r)for(const n of i.fields)if(!n.isNested){if(n.description){const a=n.description.match(/(task|feature|knowledge)\s+IDs?/i);if(a){const o=a[1].toLowerCase(),c=r.find(h=>h.name.toLowerCase().includes(o));if(c&&c.name!==i.name){const h=c.fields.find(u=>u.isPrimary);e.push({from:i.name,fromField:n.name,to:c.name,toField:h?h.name:"_id",cardinality:n.type.includes("array")||n.type==="array"?"1:N":"1:1"})}}}if(n.name==="parent_task"||n.name==="parent_id"){const a=i.fields.find(o=>o.isPrimary);e.push({from:i.name,fromField:n.name,to:i.name,toField:a?a.name:"_id",cardinality:"1:1"})}}return e}function zv(r){return r.toLowerCase().replace(/\s+/g,"-")}function gA(r){return r==="enum"?"enum":r==="array"||r.endsWith("[]")||r.startsWith("array")?"array":r==="boolean"?"boolean":r==="nullable"?"nullable":r==="date"||r==="timestamp"?"date":r==="int"||r==="integer"||r==="numeric"||r==="serial"||r==="bigint"||r==="smallint"||r==="real"||r==="float"||r==="double"?"number":r==="jsonb"||r==="json"?"json":"string"}function WJ(r,e,i){return r.isPrimary?{icon:"PK",cls:"entity-field-icon--key"}:e.some(a=>a.from===i&&a.fromField===r.name)?{icon:"FK",cls:"entity-field-icon--ref"}:null}function YJ(r,e,i,n){if(n){const _=r.right-i.left,C=r.top+r.height*.35-i.top,w=36,T=28;return{d:`M ${_},${C} C ${_+w},${C-T*.3} ${_+w},${C-T*1.3} ${_},${C-T}`,labelX:_+w+4,labelY:C-T*.5}}const a=r.left+r.width/2-i.left,o=e.left+e.width/2-i.left,c=r.top+r.height/2-i.top,h=e.top+e.height/2-i.top,u=Math.abs(a-o),d=Math.abs(c-h);let f,g,b,m;if(u>d){a<o?(f=r.right-i.left,b=e.left-i.left):(f=r.left-i.left,b=e.right-i.left),g=c,m=h;const _=(b-f)*.4;return{d:`M ${f},${g} C ${f+_},${g} ${b-_},${m} ${b},${m}`,labelX:(f+b)/2,labelY:(g+m)/2-10}}f=a,b=o,c<h?(g=r.bottom-i.top,m=e.top-i.top):(g=r.top-i.top,m=e.bottom-i.top);const v=(m-g)*.4;return{d:`M ${f},${g} C ${f},${g+v} ${b},${m-v} ${b},${m}`,labelX:(f+b)/2,labelY:(g+m)/2-10}}function VJ({entity:r,relations:e}){const[i,n]=K.useState(new Set),a=r.storageType==="json"?"{ }":r.storageType==="table"?"SQL":"☰",o=r.fields.filter(u=>!u.isNested),c=K.useMemo(()=>{const u=new Map;for(const d of r.fields)if(d.isNested&&d.parentField){const f=u.get(d.parentField)||[];f.push(d),u.set(d.parentField,f)}return u},[r.fields]),h=u=>{n(d=>{const f=new Set(d);return f.has(u)?f.delete(u):f.add(u),f})};return x.jsxs("div",{className:"entity-card","data-entity":zv(r.name),children:[x.jsxs("div",{className:"entity-card-header",children:[x.jsxs("div",{className:"entity-card-title-group",children:[x.jsx("span",{className:"entity-card-category-icon",children:a}),x.jsx("span",{className:"entity-card-name",children:r.name})]}),x.jsx("span",{className:"entity-card-badge","data-storage":r.storageType,children:r.storageType})]}),r.path&&x.jsx("div",{className:"entity-card-path",title:r.path,children:r.path}),r.managedBy&&x.jsx("div",{className:"entity-card-managed",children:r.managedBy}),x.jsx("div",{className:"entity-fields",children:o.map(u=>{const d=WJ(u,e,r.name),f=gA(u.type),g=c.get(u.name),b=i.has(u.name);return x.jsxs(K.Fragment,{children:[x.jsxs("div",{className:`entity-field${g?" entity-field--expandable":""}`,onClick:g?()=>h(u.name):void 0,children:[x.jsx("span",{className:`entity-field-icon ${(d==null?void 0:d.cls)??""}`,children:(d==null?void 0:d.icon)??""}),x.jsx("span",{className:"entity-field-name",children:u.name}),u.type==="enum"&&u.enumValues?x.jsx("span",{className:"entity-field-enum-group",children:u.enumValues.map(m=>x.jsx("span",{className:"entity-field-enum-pill",children:m},m))}):x.jsx("span",{className:"entity-field-type","data-type":f,children:u.type}),g&&x.jsxs("span",{className:"entity-field-toggle",children:[x.jsx("span",{className:`entity-field-toggle-arrow${b?" entity-field-toggle-arrow--open":""}`,children:"▶"}),x.jsx("span",{className:"entity-field-toggle-count",children:g.length})]}),!g&&u.description&&x.jsx("span",{className:"entity-field-desc",title:u.description,children:u.description})]}),g&&b&&g.map(m=>{var C;const v=gA(m.type),_=m.name.slice((((C=m.parentField)==null?void 0:C.length)??0)+1);return x.jsxs("div",{className:"entity-field entity-field--nested",children:[x.jsx("span",{className:"entity-field-icon"}),x.jsxs("span",{className:"entity-field-name entity-field-name--nested",children:[".",_]}),x.jsx("span",{className:"entity-field-type","data-type":v,children:m.type}),m.description&&x.jsx("span",{className:"entity-field-desc",title:m.description,children:m.description})]},m.name)})]},u.name)})}),r.notes.length>0&&x.jsx("div",{className:"entity-card-notes",children:r.notes.map((u,d)=>x.jsx("div",{className:"entity-card-note",children:u},d))})]})}function KJ({relations:r,entities:e}){return r.length===0?null:x.jsxs("div",{className:"sql-preview-legend",children:[x.jsx("div",{className:"sql-preview-legend-title",children:"Relationships"}),x.jsx("div",{className:"sql-preview-legend-items",children:r.map((i,n)=>{var h,u;const a=((h=e.find(d=>d.name===i.from))==null?void 0:h.name)??i.from,o=((u=e.find(d=>d.name===i.to))==null?void 0:u.name)??i.to,c=i.from===i.to;return x.jsxs("div",{className:"sql-preview-legend-item",children:[x.jsx("span",{className:"sql-preview-legend-line"}),x.jsx("span",{children:c?`${a}.${i.fromField} ↻ self`:`${a}.${i.fromField} → ${o}.${i.toField}`}),x.jsx("span",{className:"sql-preview-legend-cardinality",children:i.cardinality})]},n)})})]})}function J5({content:r}){const e=K.useRef(null),[i,n]=K.useState([]),[a,o]=K.useState({width:0,height:0}),c=K.useMemo(()=>qJ(r),[r]),h=K.useCallback(()=>{const u=e.current;if(!u||c.relations.length===0){n([]);return}const d=u.getBoundingClientRect();o({width:u.scrollWidth,height:u.scrollHeight});const f=[];for(const g of c.relations){const b=u.querySelector(`[data-entity="${zv(g.from)}"]`),m=u.querySelector(`[data-entity="${zv(g.to)}"]`);if(!b||!m)continue;const v=b.getBoundingClientRect(),_=m.getBoundingClientRect(),{d:C,labelX:w,labelY:T}=YJ(v,_,d,g.from===g.to);f.push({d:C,labelX:w,labelY:T,label:g.cardinality})}n(f)},[c]);return K.useEffect(()=>{const u=requestAnimationFrame(h),d=new ResizeObserver(h);return e.current&&d.observe(e.current),()=>{cancelAnimationFrame(u),d.disconnect()}},[h]),c.entities.length===0?x.jsx("div",{className:"sql-preview",children:x.jsx("div",{className:"sql-preview-empty",children:"No schema entities found in this file."})}):x.jsxs("div",{className:"sql-preview",ref:e,children:[x.jsxs("svg",{className:"sql-preview-svg",width:a.width||"100%",height:a.height||"100%",viewBox:a.width?`0 0 ${a.width} ${a.height}`:void 0,children:[x.jsx("defs",{children:x.jsx("marker",{id:"rel-arrowhead",viewBox:"0 0 10 7",refX:"9",refY:"3.5",markerWidth:"8",markerHeight:"6",orient:"auto",children:x.jsx("polygon",{points:"0 0, 10 3.5, 0 7",className:"sql-preview-arrowhead"})})}),i.map((u,d)=>x.jsxs("g",{children:[x.jsx("path",{d:u.d,className:"sql-preview-line",markerEnd:"url(#rel-arrowhead)"}),x.jsx("rect",{className:"sql-preview-line-label-bg",x:u.labelX-12,y:u.labelY-7,width:24,height:14}),x.jsx("text",{className:"sql-preview-line-label",x:u.labelX,y:u.labelY+4,textAnchor:"middle",children:u.label})]},d))]}),x.jsx("div",{className:"sql-preview-grid",children:c.entities.map(u=>x.jsx(VJ,{entity:u,relations:c.relations},u.name))}),x.jsx(KJ,{relations:c.relations,entities:c.entities})]})}const XJ={feat:"type--feat",fix:"type--fix",refactor:"type--refactor",chore:"type--chore",docs:"type--docs",test:"type--test",perf:"type--perf"};function Pv({type:r}){return x.jsx("span",{className:`json-type-badge ${XJ[r]??""}`,children:r})}function qv(){return x.jsx("span",{className:"json-breaking-badge",children:"BREAKING"})}function ZJ({data:r}){const[e,i]=K.useState("all"),[n,a]=K.useState(new Set),o=K.useMemo(()=>{const u=e==="all"?r:r.filter(f=>f.type===e),d=new Map;for(let f=0;f<u.length;f++){const g=u[f],b=d.get(g.date)||[];b.push({entry:g,index:f}),d.set(g.date,b)}return d},[r,e]),c=u=>{a(d=>{const f=new Set(d);return f.has(u)?f.delete(u):f.add(u),f})},h=K.useMemo(()=>{const u={};for(const d of r)u[d.type]=(u[d.type]||0)+1;return u},[r]);return x.jsxs("div",{className:"json-preview",children:[x.jsx("div",{className:"json-preview-header",children:x.jsxs("div",{className:"json-preview-stats",children:[x.jsxs("span",{className:"json-preview-total",children:[r.length," entries"]}),Object.entries(h).sort((u,d)=>d[1]-u[1]).map(([u,d])=>x.jsxs("button",{className:`json-stat-chip ${e===u?"json-stat-chip--active":""}`,onClick:()=>i(f=>f===u?"all":u),children:[x.jsx(Pv,{type:u})," ",d]},u))]})}),x.jsx("div",{className:"json-timeline",children:Array.from(o.entries()).map(([u,d])=>x.jsxs("div",{className:"json-date-group",children:[x.jsxs("div",{className:"json-date-marker",children:[x.jsx("span",{className:"json-date-dot"}),x.jsx("span",{className:"json-date-label",children:u}),x.jsx("span",{className:"json-date-count",children:d.length})]}),x.jsx("div",{className:"json-date-entries",children:d.map(({entry:f,index:g})=>{const b=n.has(g),m=f.scope.length>50?f.scope.slice(0,47)+"...":f.scope;return x.jsxs("div",{className:`json-entry ${b?"json-entry--expanded":""}`,onClick:()=>c(g),children:[x.jsxs("div",{className:"json-entry-header",children:[x.jsx(Pv,{type:f.type}),f.breaking&&x.jsx(qv,{}),x.jsx("span",{className:"json-entry-scope",title:f.scope,children:m})]}),x.jsx("div",{className:`json-entry-desc ${b?"":"json-entry-desc--clamped"}`,children:f.description})]},g)})})]},u))})]})}function QJ({data:r}){const[e,i]=K.useState(new Set([0])),n=a=>{i(o=>{const c=new Set(o);return c.has(a)?c.delete(a):c.add(a),c})};return x.jsxs("div",{className:"json-preview",children:[x.jsx("div",{className:"json-preview-header",children:x.jsxs("span",{className:"json-preview-total",children:[r.length," release",r.length!==1?"s":""]})}),x.jsx("div",{className:"json-releases",children:r.map((a,o)=>{var h,u,d,f;const c=e.has(o);return x.jsxs("div",{className:`json-release ${c?"json-release--expanded":""}`,children:[x.jsxs("div",{className:"json-release-header",onClick:()=>n(o),children:[x.jsx("span",{className:"json-release-version",children:a.version}),x.jsx("span",{className:"json-release-date",children:a.date}),a.breaking&&x.jsx(qv,{}),x.jsxs("span",{className:"json-release-meta",children:[(h=a.features)!=null&&h.length?`${a.features.length} features`:"",(u=a.features)!=null&&u.length&&((d=a.tasks)!=null&&d.length)?" / ":"",(f=a.tasks)!=null&&f.length?`${a.tasks.length} task${a.tasks.length!==1?"s":""}`:""]}),x.jsx("span",{className:`json-release-chevron ${c?"json-release-chevron--open":""}`,children:"▶"})]}),c&&x.jsxs("div",{className:"json-release-body",children:[x.jsx("div",{className:"json-release-summary",children:a.summary}),a.features&&a.features.length>0&&x.jsxs("div",{className:"json-release-section",children:[x.jsx("div",{className:"json-release-section-title",children:"Features"}),x.jsx("div",{className:"json-release-ids",children:a.features.map(g=>x.jsx("span",{className:"json-id-chip json-id-chip--feature",children:g},g))})]}),a.tasks&&a.tasks.length>0&&x.jsxs("div",{className:"json-release-section",children:[x.jsx("div",{className:"json-release-section-title",children:"Tasks"}),x.jsx("div",{className:"json-release-ids",children:a.tasks.map(g=>x.jsx("span",{className:"json-id-chip json-id-chip--task",children:g},g))})]}),a.changelog&&a.changelog.length>0&&x.jsxs("div",{className:"json-release-section",children:[x.jsxs("div",{className:"json-release-section-title",children:["Changelog (",a.changelog.length,")"]}),x.jsx("div",{className:"json-release-changelog",children:a.changelog.map((g,b)=>x.jsxs("div",{className:"json-release-cl-entry",children:[x.jsx(Pv,{type:g.type}),g.breaking&&x.jsx(qv,{}),x.jsx("span",{className:"json-release-cl-scope",children:g.scope}),x.jsx("span",{className:"json-release-cl-desc",children:g.description})]},b))})]})]})]},a.version)})})]})}function JJ({data:r,filename:e}){var a,o,c;if(!Array.isArray(r)||r.length===0)return x.jsx("div",{className:"json-preview",children:x.jsx("div",{className:"json-preview-empty",children:"No data found in this file."})});const i=e.toLowerCase().includes("changelog"),n=e.toLowerCase().includes("release");return i&&((a=r[0])!=null&&a.type)&&((o=r[0])!=null&&o.description)?x.jsx(ZJ,{data:r}):n&&((c=r[0])!=null&&c.version)?x.jsx(QJ,{data:r}):x.jsxs("div",{className:"json-preview",children:[x.jsx("div",{className:"json-preview-header",children:x.jsxs("span",{className:"json-preview-total",children:[r.length," items"]})}),x.jsx("div",{className:"json-generic-list",children:r.map((h,u)=>x.jsx("pre",{className:"json-generic-item",children:JSON.stringify(h,null,2)},u))})]})}function ttt(r){return r.endsWith(".sql")||r.endsWith(".json")||r.endsWith(".md")}function ett(){const{t:r}=Pr(),e=Ln(),[i,n]=K.useState(null),[a,o]=K.useState(null),[c,h]=K.useState(!1),[u,d]=K.useState("preview"),{data:f,isLoading:g,isError:b,error:m}=mi({queryKey:["core"],queryFn:()=>cr.get("/core")}),{data:v}=mi({queryKey:["core",i],queryFn:()=>cr.get(`/core/${i}`),enabled:!!i}),_=Va({mutationFn:({filename:N,content:O})=>cr.put(`/core/${N}`,{content:O}),onSuccess:()=>{e.invalidateQueries({queryKey:["core"]}),h(!1)}}),C=()=>{(v==null?void 0:v.content)!==void 0&&(o(v.content),h(!0))},w=()=>{i&&a!==null&&_.mutate({filename:i,content:a})};if(g)return x.jsx("div",{className:"loading",children:r("common.loading")});if(b)return x.jsxs("div",{className:"error-state",children:["Failed to load core files. ",m==null?void 0:m.message]});const T=(f==null?void 0:f.files)??[],E=()=>{if(!i||!v)return null;if(u==="preview"){if(i.endsWith(".sql")&&v.content)return x.jsx(J5,{content:v.content});if(i.endsWith(".json")&&v.data)return x.jsx(JJ,{data:v.data,filename:i});if(i.endsWith(".md")&&v.content)return x.jsx(Kd,{content:v.content,frontmatter:v.frontmatter})}return x.jsx("pre",{className:"core-viewer-content",children:v.content??JSON.stringify(v.data,null,2)})};return x.jsxs("div",{className:"core-page",children:[x.jsx("h1",{className:"page-title",children:r("core.title")}),x.jsxs("div",{className:"core-layout",children:[x.jsx("div",{className:"core-list",children:T.map((N,O)=>x.jsxs("button",{className:`core-list-item ${i===N.filename?"core-list-item--active":""} animate-stagger animate-stagger-${Math.min(O+1,8)}`,onClick:()=>{n(N.filename),h(!1),d("preview")},children:[x.jsx("span",{className:"core-list-name",children:N.name}),x.jsx("span",{className:"core-list-type",children:N.type})]},N.filename))}),x.jsxs("div",{className:"core-detail",children:[!i&&x.jsx("div",{className:"core-empty",children:"Select a file to view."}),i&&v&&!c&&x.jsxs("div",{className:"core-viewer",children:[x.jsxs("div",{className:"core-viewer-header",children:[x.jsx("h2",{className:"core-viewer-title",children:v.filename}),x.jsxs("div",{className:"core-viewer-actions",children:[ttt(i)&&x.jsxs("div",{className:"core-tabs",children:[x.jsx("button",{className:`core-tab ${u==="file"?"core-tab--active":""}`,onClick:()=>d("file"),children:"File"}),x.jsx("button",{className:`core-tab ${u==="preview"?"core-tab--active":""}`,onClick:()=>d("preview"),children:"Preview"})]}),v.type==="markdown"&&x.jsx("button",{className:"btn btn--ghost",onClick:C,children:"Edit"})]})]}),E()]}),i&&c&&x.jsxs("div",{className:"core-editor",children:[x.jsxs("div",{className:"core-editor-header",children:[x.jsxs("h2",{className:"core-viewer-title",children:["Editing: ",i]}),x.jsxs("div",{className:"core-editor-actions",children:[x.jsx("button",{className:"btn btn--ghost",onClick:()=>h(!1),children:"Cancel"}),x.jsx("button",{className:"btn btn--primary",onClick:w,disabled:_.isPending,children:_.isPending?"Saving...":"Save"})]})]}),x.jsxs("div",{className:"core-editor-split",children:[x.jsx("textarea",{className:"core-editor-textarea",value:a??"",onChange:N=>o(N.target.value)}),x.jsx("pre",{className:"core-editor-preview",children:a})]})]})]})]})]})}function rtt(){return mi({queryKey:["knowledge"],queryFn:()=>cr.get("/knowledge"),select:r=>r.entries})}function itt(r){return mi({queryKey:["knowledge",r],queryFn:()=>cr.get(`/knowledge/${r}`),select:e=>e.entry,enabled:!!r})}function ntt(){const r=Ln();return Va({mutationFn:({slug:e,pinned:i})=>cr.patch(`/knowledge/${e}`,{pinned:i}),onSuccess:()=>{r.invalidateQueries({queryKey:["knowledge"]})}})}var tx={exports:{}},mA;function att(){return mA||(mA=1,(function(r){var e=(function(){var i=String.fromCharCode,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",o={};function c(u,d){if(!o[u]){o[u]={};for(var f=0;f<u.length;f++)o[u][u.charAt(f)]=f}return o[u][d]}var h={compressToBase64:function(u){if(u==null)return"";var d=h._compress(u,6,function(f){return n.charAt(f)});switch(d.length%4){default:case 0:return d;case 1:return d+"===";case 2:return d+"==";case 3:return d+"="}},decompressFromBase64:function(u){return u==null?"":u==""?null:h._decompress(u.length,32,function(d){return c(n,u.charAt(d))})},compressToUTF16:function(u){return u==null?"":h._compress(u,15,function(d){return i(d+32)})+" "},decompressFromUTF16:function(u){return u==null?"":u==""?null:h._decompress(u.length,16384,function(d){return u.charCodeAt(d)-32})},compressToUint8Array:function(u){for(var d=h.compress(u),f=new Uint8Array(d.length*2),g=0,b=d.length;g<b;g++){var m=d.charCodeAt(g);f[g*2]=m>>>8,f[g*2+1]=m%256}return f},decompressFromUint8Array:function(u){if(u==null)return h.decompress(u);for(var d=new Array(u.length/2),f=0,g=d.length;f<g;f++)d[f]=u[f*2]*256+u[f*2+1];var b=[];return d.forEach(function(m){b.push(i(m))}),h.decompress(b.join(""))},compressToEncodedURIComponent:function(u){return u==null?"":h._compress(u,6,function(d){return a.charAt(d)})},decompressFromEncodedURIComponent:function(u){return u==null?"":u==""?null:(u=u.replace(/ /g,"+"),h._decompress(u.length,32,function(d){return c(a,u.charAt(d))}))},compress:function(u){return h._compress(u,16,function(d){return i(d)})},_compress:function(u,d,f){if(u==null)return"";var g,b,m={},v={},_="",C="",w="",T=2,E=3,N=2,O=[],B=0,A=0,L;for(L=0;L<u.length;L+=1)if(_=u.charAt(L),Object.prototype.hasOwnProperty.call(m,_)||(m[_]=E++,v[_]=!0),C=w+_,Object.prototype.hasOwnProperty.call(m,C))w=C;else{if(Object.prototype.hasOwnProperty.call(v,w)){if(w.charCodeAt(0)<256){for(g=0;g<N;g++)B=B<<1,A==d-1?(A=0,O.push(f(B)),B=0):A++;for(b=w.charCodeAt(0),g=0;g<8;g++)B=B<<1|b&1,A==d-1?(A=0,O.push(f(B)),B=0):A++,b=b>>1}else{for(b=1,g=0;g<N;g++)B=B<<1|b,A==d-1?(A=0,O.push(f(B)),B=0):A++,b=0;for(b=w.charCodeAt(0),g=0;g<16;g++)B=B<<1|b&1,A==d-1?(A=0,O.push(f(B)),B=0):A++,b=b>>1}T--,T==0&&(T=Math.pow(2,N),N++),delete v[w]}else for(b=m[w],g=0;g<N;g++)B=B<<1|b&1,A==d-1?(A=0,O.push(f(B)),B=0):A++,b=b>>1;T--,T==0&&(T=Math.pow(2,N),N++),m[C]=E++,w=String(_)}if(w!==""){if(Object.prototype.hasOwnProperty.call(v,w)){if(w.charCodeAt(0)<256){for(g=0;g<N;g++)B=B<<1,A==d-1?(A=0,O.push(f(B)),B=0):A++;for(b=w.charCodeAt(0),g=0;g<8;g++)B=B<<1|b&1,A==d-1?(A=0,O.push(f(B)),B=0):A++,b=b>>1}else{for(b=1,g=0;g<N;g++)B=B<<1|b,A==d-1?(A=0,O.push(f(B)),B=0):A++,b=0;for(b=w.charCodeAt(0),g=0;g<16;g++)B=B<<1|b&1,A==d-1?(A=0,O.push(f(B)),B=0):A++,b=b>>1}T--,T==0&&(T=Math.pow(2,N),N++),delete v[w]}else for(b=m[w],g=0;g<N;g++)B=B<<1|b&1,A==d-1?(A=0,O.push(f(B)),B=0):A++,b=b>>1;T--,T==0&&(T=Math.pow(2,N),N++)}for(b=2,g=0;g<N;g++)B=B<<1|b&1,A==d-1?(A=0,O.push(f(B)),B=0):A++,b=b>>1;for(;;)if(B=B<<1,A==d-1){O.push(f(B));break}else A++;return O.join("")},decompress:function(u){return u==null?"":u==""?null:h._decompress(u.length,32768,function(d){return u.charCodeAt(d)})},_decompress:function(u,d,f){var g=[],b=4,m=4,v=3,_="",C=[],w,T,E,N,O,B,A,L={val:f(0),position:d,index:1};for(w=0;w<3;w+=1)g[w]=w;for(E=0,O=Math.pow(2,2),B=1;B!=O;)N=L.val&L.position,L.position>>=1,L.position==0&&(L.position=d,L.val=f(L.index++)),E|=(N>0?1:0)*B,B<<=1;switch(E){case 0:for(E=0,O=Math.pow(2,8),B=1;B!=O;)N=L.val&L.position,L.position>>=1,L.position==0&&(L.position=d,L.val=f(L.index++)),E|=(N>0?1:0)*B,B<<=1;A=i(E);break;case 1:for(E=0,O=Math.pow(2,16),B=1;B!=O;)N=L.val&L.position,L.position>>=1,L.position==0&&(L.position=d,L.val=f(L.index++)),E|=(N>0?1:0)*B,B<<=1;A=i(E);break;case 2:return""}for(g[3]=A,T=A,C.push(A);;){if(L.index>u)return"";for(E=0,O=Math.pow(2,v),B=1;B!=O;)N=L.val&L.position,L.position>>=1,L.position==0&&(L.position=d,L.val=f(L.index++)),E|=(N>0?1:0)*B,B<<=1;switch(A=E){case 0:for(E=0,O=Math.pow(2,8),B=1;B!=O;)N=L.val&L.position,L.position>>=1,L.position==0&&(L.position=d,L.val=f(L.index++)),E|=(N>0?1:0)*B,B<<=1;g[m++]=i(E),A=m-1,b--;break;case 1:for(E=0,O=Math.pow(2,16),B=1;B!=O;)N=L.val&L.position,L.position>>=1,L.position==0&&(L.position=d,L.val=f(L.index++)),E|=(N>0?1:0)*B,B<<=1;g[m++]=i(E),A=m-1,b--;break;case 2:return C.join("")}if(b==0&&(b=Math.pow(2,v),v++),g[A])_=g[A];else if(A===m)_=T+T.charAt(0);else return null;C.push(_),g[m++]=T+_.charAt(0),b--,T=_,b==0&&(b=Math.pow(2,v),v++)}}};return h})();r!=null?r.exports=e:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return e})})(tx)),tx.exports}var stt=att();const ott=/##\s*Drawing\s*```(compressed-json|json)\s*([\s\S]*?)```/;function ltt(r){const e=r.match(ott);if(!e)return null;const[,i,n]=e;let a;if(i==="compressed-json"){const o=stt.decompressFromBase64(n.replace(/\s+/g,""));if(!o)return null;a=o}else a=n;try{const o=JSON.parse(a);return Array.isArray(o.elements)?o:null}catch{return null}}function ctt(r){return r.endsWith(".excalidraw")}function htt({content:r}){const e=K.useRef(null),{resolved:i}=Fd(),[n,a]=K.useState(null);return K.useEffect(()=>{const o=e.current;if(!o)return;let c=!1,h=null,u=null;const d=ltt(r);if(!d){a("Could not read the Excalidraw drawing in this file.");return}return a(null),(async()=>{try{const{exportToSvg:f}=await ze(async()=>{const{exportToSvg:C}=await import("./percentages-BXMCSKIN-QYboYPU4.js").then(w=>w.i);return{exportToSvg:C}},__vite__mapDeps([47,48]));if(c)return;const g=await f({elements:d.elements,files:d.files??null,appState:{...d.appState??{},exportBackground:!1,exportWithDarkMode:i==="dark",exportEmbedScene:!1},exportPadding:24});if(c)return;const b=parseFloat(g.getAttribute("width")||"0")||g.viewBox.baseVal.width,m=parseFloat(g.getAttribute("height")||"0")||g.viewBox.baseVal.height;g.style.width=`${b}px`,g.style.height=`${m}px`,g.style.maxWidth="none",g.style.transformOrigin="0 0",o.innerHTML="",o.appendChild(g);const v=K5(g,{maxZoom:12,minZoom:.1,bounds:!1,zoomDoubleClickSpeed:1.6,smoothScroll:!1});h=()=>v.dispose();const _=()=>{try{const C=o.getBoundingClientRect();if(C.width===0||C.height===0||b===0||m===0)return;const w=24,T=Math.min((C.width-w)/b,(C.height-w)/m,1);v.zoomAbs(0,0,1),v.moveTo(0,0),v.zoomAbs(0,0,T);const E=(C.width-b*T)/2,N=(C.height-m*T)/2;v.moveTo(E,N)}catch{}};requestAnimationFrame(()=>requestAnimationFrame(_)),u=new ResizeObserver(()=>_()),u.observe(o)}catch(f){c||a(f instanceof Error?f.message:"Failed to render Excalidraw drawing.")}})(),()=>{c=!0,u==null||u.disconnect(),h==null||h(),o.innerHTML=""}},[r,i]),n?x.jsx("div",{className:"excalidraw-error",children:n}):x.jsx("div",{className:"excalidraw-preview","data-theme":i,children:x.jsx("div",{ref:e,className:"excalidraw-stage"})})}const utt=/```sql\s*\n([\s\S]*?)```/i;function dtt(r,e){if(!r.startsWith("data-structures/"))return null;const i=e.match(utt);return i?i[1]:null}function ftt(r){return r.split(/[-_]/).map(e=>e&&e[0].toUpperCase()+e.slice(1)).join(" ")}function ptt(r,e){return e&&r.name.startsWith(`${e}/`)?r.name.slice(e.length+1):r.name}function gtt(){const{t:r}=Pr(),{data:e,isLoading:i,isError:n,error:a}=rtt(),o=ntt(),[c,h]=K.useState(""),[u,d]=K.useState(null),[f,g]=K.useState("preview"),[b,m]=K.useState(new Set),{data:v}=itt(u??""),_=K.useMemo(()=>{if(!e)return[];if(!c.trim())return e;const B=c.toLowerCase();return e.filter(A=>A.name.toLowerCase().includes(B)||A.description.toLowerCase().includes(B)||A.tags.some(L=>L.toLowerCase().includes(B)))},[e,c]),{rootEntries:C,folders:w}=K.useMemo(()=>{const B=[],A=new Map;for(const P of _){const j=P.slug.indexOf("/");if(j===-1){B.push(P);continue}const $=P.slug.slice(0,j),X=A.get($);X?X.push(P):A.set($,[P])}const L=[...A.entries()].sort((P,j)=>P[0].localeCompare(j[0])).map(([P,j])=>({folder:P,label:ftt(P),entries:j}));return{rootEntries:B,folders:L}},[_]),T=c.trim().length>0,E=B=>T||b.has(B),N=B=>{m(A=>{const L=new Set(A);return L.has(B)?L.delete(B):L.add(B),L})},O=(B,A=null)=>x.jsxs("button",{className:`knowledge-card ${u===B.slug?"knowledge-card--active":""}`,onClick:()=>{d(B.slug),g("preview")},children:[x.jsxs("div",{className:"knowledge-card-header",children:[x.jsx("span",{className:"knowledge-card-name",children:ptt(B,A)}),x.jsx("button",{className:`pin-btn ${B.pinned?"pin-btn--active":""}`,onClick:L=>{L.stopPropagation(),o.mutate({slug:B.slug,pinned:!B.pinned})},title:B.pinned?r("knowledge.unpin"):r("knowledge.pin"),children:B.pinned?"◆":"◇"})]}),B.description&&x.jsx("p",{className:"knowledge-card-desc",children:B.description}),x.jsx("div",{className:"knowledge-card-tags",children:B.tags.map(L=>x.jsx("span",{className:"task-tag","data-hue":Yl(L),children:L},L))})]},B.slug);return i?x.jsx("div",{className:"loading",children:r("common.loading")}):n?x.jsxs("div",{className:"error-state",children:["Failed to load knowledge. ",a==null?void 0:a.message]}):x.jsxs("div",{className:"knowledge-page",children:[x.jsx("input",{className:"knowledge-search",placeholder:r("knowledge.search"),value:c,onChange:B=>h(B.target.value)}),x.jsxs("div",{className:"knowledge-layout",children:[x.jsxs("div",{className:"knowledge-list",children:[_.length===0&&x.jsx("div",{className:"core-empty",children:r("common.empty")}),w.map(B=>x.jsxs("div",{className:"knowledge-folder",children:[x.jsxs("button",{className:"knowledge-folder-header",onClick:()=>N(B.folder),"aria-expanded":E(B.folder),children:[x.jsx("span",{className:"knowledge-folder-chevron",children:E(B.folder)?"▾":"▸"}),x.jsx("span",{className:"knowledge-folder-name",children:B.label}),x.jsx("span",{className:"knowledge-folder-count",children:B.entries.length})]}),E(B.folder)&&x.jsx("div",{className:"knowledge-folder-items",children:B.entries.map(A=>O(A,B.folder))})]},B.folder)),C.map(B=>O(B))]}),x.jsxs("div",{className:"knowledge-detail",children:[!u&&x.jsx("div",{className:"core-empty",children:"Select a knowledge file to view."}),u&&v&&x.jsxs("div",{className:"core-viewer",children:[x.jsxs("div",{className:"core-viewer-header",children:[x.jsx("h2",{className:"core-viewer-title",children:v.name}),x.jsx("div",{className:"core-viewer-actions",children:x.jsxs("div",{className:"core-tabs",children:[x.jsx("button",{className:`core-tab ${f==="file"?"core-tab--active":""}`,onClick:()=>g("file"),children:"File"}),x.jsx("button",{className:`core-tab ${f==="preview"?"core-tab--active":""}`,onClick:()=>g("preview"),children:"Preview"})]})})]}),f==="preview"&&v.content?(()=>{if(ctt(v.slug))return x.jsx(htt,{content:v.content});const B=dtt(v.slug,v.content);return B?x.jsx(J5,{content:B}):x.jsx(Kd,{content:v.content})})():x.jsx("pre",{className:"core-viewer-content",children:v.content})]})]})]})]})}function mtt(){const{t:r}=Pr(),[e,i]=K.useState(null),[n,a]=K.useState("preview"),[o,c]=K.useState(""),{data:h,isLoading:u,isError:d,error:f}=mi({queryKey:["features"],queryFn:()=>cr.get("/features")}),g=(h==null?void 0:h.features)??[],b=K.useMemo(()=>{if(!o.trim())return g;const v=o.toLowerCase();return g.filter(_=>_.slug.toLowerCase().includes(v)||_.status.toLowerCase().includes(v)||_.tags.some(C=>C.toLowerCase().includes(v)))},[g,o]),{data:m}=mi({queryKey:["features",e],queryFn:()=>cr.get(`/features/${e}`),enabled:!!e,select:v=>v.feature});return u?x.jsx("div",{className:"loading",children:r("common.loading")}):d?x.jsxs("div",{className:"error-state",children:["Failed to load features. ",f==null?void 0:f.message]}):x.jsxs("div",{className:"features-page",children:[x.jsx("input",{className:"features-search",placeholder:r("features.search"),value:o,onChange:v=>c(v.target.value)}),x.jsxs("div",{className:"features-layout",children:[x.jsxs("div",{className:"features-list",children:[b.length===0&&x.jsx("div",{className:"core-empty",children:r("common.empty")}),b.map((v,_)=>{var C;return x.jsxs("button",{className:`feature-card ${e===v.slug?"feature-card--active":""} animate-stagger animate-stagger-${Math.min(_+1,8)}`,onClick:()=>{i(v.slug),a("preview")},children:[x.jsxs("div",{className:"feature-card-header",children:[x.jsx("span",{className:"feature-card-name",children:v.slug}),x.jsxs("div",{className:"feature-card-badges",children:[((C=v.freshness)==null?void 0:C.level)==="stale"&&x.jsx("span",{className:"feature-freshness feature-freshness--stale",children:"stale"}),x.jsx("span",{className:`feature-status feature-status--${v.status}`,children:v.status})]})]}),x.jsx("div",{className:"knowledge-card-tags",children:v.tags.map(w=>x.jsx("span",{className:"task-tag","data-hue":Yl(w),children:w},w))})]},v.slug)})]}),x.jsxs("div",{className:"features-detail",children:[!e&&x.jsx("div",{className:"core-empty",children:"Select a feature to view."}),e&&m&&x.jsxs("div",{className:"core-viewer",children:[x.jsxs("div",{className:"core-viewer-header",children:[x.jsx("h2",{className:"core-viewer-title",children:m.slug}),x.jsx("div",{className:"core-viewer-actions",children:x.jsxs("div",{className:"core-tabs",children:[x.jsx("button",{className:`core-tab ${n==="file"?"core-tab--active":""}`,onClick:()=>a("file"),children:"File"}),x.jsx("button",{className:`core-tab ${n==="preview"?"core-tab--active":""}`,onClick:()=>a("preview"),children:"Preview"})]})})]}),x.jsxs("div",{className:"feature-meta",children:[x.jsxs("span",{children:["Status: ",m.status]}),x.jsxs("span",{children:["Created: ",m.created]}),x.jsxs("span",{children:["Updated: ",m.updated]})]}),m.related_tasks.length>0&&x.jsxs("div",{className:"feature-tasks",children:["Related tasks: ",m.related_tasks.join(", ")]}),n==="preview"&&m.content?x.jsx(Kd,{content:m.content}):x.jsx("div",{className:"feature-viewer",children:m.sections.map(v=>x.jsxs("div",{className:"feature-section",children:[x.jsx("h3",{className:"feature-section-title",children:v}),x.jsx("pre",{className:"feature-section-content",children:m.sectionContents[v]||"(empty)"})]},v))})]})]})]})]})}function ytt(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e===0){if(Object(i)!==i)return;u=!1}else for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function btt(r,e,i){return e=Ttt(e),e in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i,r}function yA(r,e){return _tt(r)||ytt(r,e)||tD(r,e)||wtt()}function xtt(r){return vtt(r)||Ctt(r)||tD(r)||ktt()}function vtt(r){if(Array.isArray(r))return Uv(r)}function _tt(r){if(Array.isArray(r))return r}function Ctt(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function tD(r,e){if(r){if(typeof r=="string")return Uv(r,e);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Uv(r,e)}}function Uv(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=r[i];return n}function ktt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
433
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wtt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
434
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Stt(r,e){if(typeof r!="object"||r===null)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Ttt(r){var e=Stt(r,"string");return typeof e=="symbol"?e:String(e)}var Ett=function(e,i){var n=new Set(i);return Object.assign.apply(Object,[{}].concat(xtt(Object.entries(e).filter(function(a){var o=yA(a,1),c=o[0];return!n.has(c)}).map(function(a){var o=yA(a,2),c=o[0],h=o[1];return btt({},c,h)}))))};function Hv(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function Att(r){if(Array.isArray(r))return r}function Ntt(r){if(Array.isArray(r))return Hv(r)}function Mtt(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Btt(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e!==0)for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function Ltt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
435
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ott(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
436
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rtt(r,e){return Att(r)||Btt(r,e)||eD(r,e)||Ltt()}function bA(r){return Ntt(r)||Mtt(r)||eD(r)||Ott()}function eD(r,e){if(r){if(typeof r=="string")return Hv(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Hv(r,e):void 0}}function Dtt(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=e.wrapperElementType,n=i===void 0?"div":i,a=e.nodeMapper,o=a===void 0?function(f){return f}:a,c=e.methodNames,h=c===void 0?[]:c,u=e.initPropNames,d=u===void 0?[]:u;return K.forwardRef(function(f,g){var b=K.useRef(),m=K.useMemo(function(){var C=Object.fromEntries(d.filter(function(w){return f.hasOwnProperty(w)}).map(function(w){return[w,f[w]]}));return r(C)},[]);xA(function(){m(o(b.current))},K.useLayoutEffect),xA(function(){return m._destructor instanceof Function?m._destructor:void 0});var v=K.useCallback(function(C){for(var w=arguments.length,T=new Array(w>1?w-1:0),E=1;E<w;E++)T[E-1]=arguments[E];return m[C]instanceof Function?m[C].apply(m,T):void 0},[m]),_=K.useRef({});return Object.keys(Ett(f,[].concat(bA(h),bA(d)))).filter(function(C){return _.current[C]!==f[C]}).forEach(function(C){return v(C,f[C])}),_.current=f,K.useImperativeHandle(g,function(){return Object.fromEntries(h.map(function(C){return[C,function(){for(var w=arguments.length,T=new Array(w),E=0;E<w;E++)T[E]=arguments[E];return v.apply(void 0,[C].concat(T))}]}))},[v]),BN.createElement(n,{ref:b})})}function xA(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K.useEffect,i=K.useRef(),n=K.useRef(!1),a=K.useRef(!1),o=K.useState(0),c=Rtt(o,2);c[0];var h=c[1];n.current&&(a.current=!0),e(function(){return n.current||(i.current=r(),n.current=!0),h(function(u){return u+1}),function(){a.current&&i.current&&i.current()}},[])}var Ftt="[object Symbol]";function jtt(r){return typeof r=="symbol"||wh(r)&&Ul(r)==Ftt}var Itt=/\s/;function $tt(r){for(var e=r.length;e--&&Itt.test(r.charAt(e)););return e}var ztt=/^\s+/;function Ptt(r){return r&&r.slice(0,$tt(r)+1).replace(ztt,"")}var vA=NaN,qtt=/^[-+]0x[0-9a-f]+$/i,Utt=/^0b[01]+$/i,Htt=/^0o[0-7]+$/i,Gtt=parseInt;function _A(r){if(typeof r=="number")return r;if(jtt(r))return vA;if(Ca(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=Ca(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=Ptt(r);var i=Utt.test(r);return i||Htt.test(r)?Gtt(r.slice(2),i?2:8):qtt.test(r)?vA:+r}var ex=function(){return Sa.Date.now()},Wtt="Expected a function",Ytt=Math.max,Vtt=Math.min;function rD(r,e,i){var n,a,o,c,h,u,d=0,f=!1,g=!1,b=!0;if(typeof r!="function")throw new TypeError(Wtt);e=_A(e)||0,Ca(i)&&(f=!!i.leading,g="maxWait"in i,o=g?Ytt(_A(i.maxWait)||0,e):o,b="trailing"in i?!!i.trailing:b);function m(B){var A=n,L=a;return n=a=void 0,d=B,c=r.apply(L,A),c}function v(B){return d=B,h=setTimeout(w,e),f?m(B):c}function _(B){var A=B-u,L=B-d,P=e-A;return g?Vtt(P,o-L):P}function C(B){var A=B-u,L=B-d;return u===void 0||A>=e||A<0||g&&L>=o}function w(){var B=ex();if(C(B))return T(B);h=setTimeout(w,_(B))}function T(B){return h=void 0,b&&n?m(B):(n=a=void 0,c)}function E(){h!==void 0&&clearTimeout(h),d=0,n=u=a=h=void 0}function N(){return h===void 0?c:T(ex())}function O(){var B=ex(),A=C(B);if(n=arguments,a=this,u=B,A){if(h===void 0)return v(u);if(g)return clearTimeout(h),h=setTimeout(w,e),m(u)}return h===void 0&&(h=setTimeout(w,e)),c}return O.cancel=E,O.flush=N,O}var Ktt="Expected a function";function Xtt(r,e,i){var n=!0,a=!0;if(typeof r!="function")throw new TypeError(Ktt);return Ca(i)&&(n="leading"in i?!!i.leading:n,a="trailing"in i?!!i.trailing:a),rD(r,e,{leading:n,maxWait:e,trailing:a})}var El=Object.freeze({Linear:Object.freeze({None:function(r){return r},In:function(r){return r},Out:function(r){return r},InOut:function(r){return r}}),Quadratic:Object.freeze({In:function(r){return r*r},Out:function(r){return r*(2-r)},InOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)}}),Cubic:Object.freeze({In:function(r){return r*r*r},Out:function(r){return--r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)}}),Quartic:Object.freeze({In:function(r){return r*r*r*r},Out:function(r){return 1- --r*r*r*r},InOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)}}),Quintic:Object.freeze({In:function(r){return r*r*r*r*r},Out:function(r){return--r*r*r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)}}),Sinusoidal:Object.freeze({In:function(r){return 1-Math.sin((1-r)*Math.PI/2)},Out:function(r){return Math.sin(r*Math.PI/2)},InOut:function(r){return .5*(1-Math.sin(Math.PI*(.5-r)))}}),Exponential:Object.freeze({In:function(r){return r===0?0:Math.pow(1024,r-1)},Out:function(r){return r===1?1:1-Math.pow(2,-10*r)},InOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)}}),Circular:Object.freeze({In:function(r){return 1-Math.sqrt(1-r*r)},Out:function(r){return Math.sqrt(1- --r*r)},InOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)}}),Elastic:Object.freeze({In:function(r){return r===0?0:r===1?1:-Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI)},Out:function(r){return r===0?0:r===1?1:Math.pow(2,-10*r)*Math.sin((r-.1)*5*Math.PI)+1},InOut:function(r){return r===0?0:r===1?1:(r*=2,r<1?-.5*Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI):.5*Math.pow(2,-10*(r-1))*Math.sin((r-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(r){var e=1.70158;return r===1?1:r*r*((e+1)*r-e)},Out:function(r){var e=1.70158;return r===0?0:--r*r*((e+1)*r+e)+1},InOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)}}),Bounce:Object.freeze({In:function(r){return 1-El.Bounce.Out(1-r)},Out:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},InOut:function(r){return r<.5?El.Bounce.In(r*2)*.5:El.Bounce.Out(r*2-1)*.5+.5}}),generatePow:function(r){return r===void 0&&(r=4),r=r<Number.EPSILON?Number.EPSILON:r,r=r>1e4?1e4:r,{In:function(e){return Math.pow(e,r)},Out:function(e){return 1-Math.pow(1-e,r)},InOut:function(e){return e<.5?Math.pow(e*2,r)/2:(1-Math.pow(2-e*2,r))/2+.5}}}}),Ju=function(){return performance.now()},iD=(function(){function r(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,e)}return r.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(i){return e._tweens[i]})},r.prototype.removeAll=function(){this._tweens={}},r.prototype.add=function(){for(var e,i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];for(var a=0,o=i;a<o.length;a++){var c=o[a];(e=c._group)===null||e===void 0||e.remove(c),c._group=this,this._tweens[c.getId()]=c,this._tweensAddedDuringUpdate[c.getId()]=c}},r.prototype.remove=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];for(var n=0,a=e;n<a.length;n++){var o=a[n];o._group=void 0,delete this._tweens[o.getId()],delete this._tweensAddedDuringUpdate[o.getId()]}},r.prototype.allStopped=function(){return this.getAll().every(function(e){return!e.isPlaying()})},r.prototype.update=function(e,i){e===void 0&&(e=Ju()),i===void 0&&(i=!0);var n=Object.keys(this._tweens);if(n.length!==0)for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var a=0;a<n.length;a++){var o=this._tweens[n[a]],c=!i;o&&o.update(e,c)===!1&&!i&&this.remove(o)}n=Object.keys(this._tweensAddedDuringUpdate)}},r})(),Gv={Linear:function(r,e){var i=r.length-1,n=i*e,a=Math.floor(n),o=Gv.Utils.Linear;return e<0?o(r[0],r[1],n):e>1?o(r[i],r[i-1],i-n):o(r[a],r[a+1>i?i:a+1],n-a)},Utils:{Linear:function(r,e,i){return(e-r)*i+r}}},nD=(function(){function r(){}return r.nextId=function(){return r._nextId++},r._nextId=0,r})(),Wv=new iD,CA=(function(){function r(e,i){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=El.Linear.None,this._interpolationFunction=Gv.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=nD.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=e,typeof i=="object"?(this._group=i,i.add(this)):i===!0&&(this._group=Wv,Wv.add(this))}return r.prototype.getId=function(){return this._id},r.prototype.isPlaying=function(){return this._isPlaying},r.prototype.isPaused=function(){return this._isPaused},r.prototype.getDuration=function(){return this._duration},r.prototype.to=function(e,i){if(i===void 0&&(i=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=i<0?0:i,this},r.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},r.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},r.prototype.start=function(e,i){if(e===void 0&&(e=Ju()),i===void 0&&(i=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||i){if(this._propertiesAreSetUp=!0,!this._isDynamic){var a={};for(var o in this._valuesEnd)a[o]=this._valuesEnd[o];this._valuesEnd=a}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,i)}return this},r.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},r.prototype._setupProperties=function(e,i,n,a,o){for(var c in n){var h=e[c],u=Array.isArray(h),d=u?"array":typeof h,f=!u&&Array.isArray(n[c]);if(!(d==="undefined"||d==="function")){if(f){var g=n[c];if(g.length===0)continue;for(var b=[h],m=0,v=g.length;m<v;m+=1){var _=this._handleRelativeValue(h,g[m]);if(isNaN(_)){f=!1,console.warn("Found invalid interpolation list. Skipping.");break}b.push(_)}f&&(n[c]=b)}if((d==="object"||u)&&h&&!f){i[c]=u?[]:{};var C=h;for(var w in C)i[c][w]=C[w];a[c]=u?[]:{};var g=n[c];if(!this._isDynamic){var T={};for(var w in g)T[w]=g[w];n[c]=g=T}this._setupProperties(C,i[c],g,a[c],o)}else(typeof i[c]>"u"||o)&&(i[c]=h),u||(i[c]*=1),f?a[c]=n[c].slice().reverse():a[c]=i[c]||0}}},r.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},r.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},r.prototype.pause=function(e){return e===void 0&&(e=Ju()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},r.prototype.resume=function(e){return e===void 0&&(e=Ju()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this)},r.prototype.stopChainedTweens=function(){for(var e=0,i=this._chainedTweens.length;e<i;e++)this._chainedTweens[e].stop();return this},r.prototype.group=function(e){return e?(e.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},r.prototype.remove=function(){var e;return(e=this._group)===null||e===void 0||e.remove(this),this},r.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},r.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},r.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},r.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},r.prototype.easing=function(e){return e===void 0&&(e=El.Linear.None),this._easingFunction=e,this},r.prototype.interpolation=function(e){return e===void 0&&(e=Gv.Linear),this._interpolationFunction=e,this},r.prototype.chain=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return this._chainedTweens=e,this},r.prototype.onStart=function(e){return this._onStartCallback=e,this},r.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},r.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},r.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},r.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},r.prototype.onStop=function(e){return this._onStopCallback=e,this},r.prototype.update=function(e,i){var n=this,a;if(e===void 0&&(e=Ju()),i===void 0&&(i=r.autoStartOnUpdate),this._isPaused)return!0;var o;if(!this._goToEnd&&!this._isPlaying)if(i)this.start(e,!0);else return!1;if(this._goToEnd=!1,e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var c=e-this._startTime,h=this._duration+((a=this._repeatDelayTime)!==null&&a!==void 0?a:this._delayTime),u=this._duration+this._repeat*h,d=function(){if(n._duration===0||c>u)return 1;var _=Math.trunc(c/h),C=c-_*h,w=Math.min(C/n._duration,1);return w===0&&c===n._duration?1:w},f=d(),g=this._easingFunction(f);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,g),this._onUpdateCallback&&this._onUpdateCallback(this._object,f),this._duration===0||c>=this._duration)if(this._repeat>0){var b=Math.min(Math.trunc((c-this._duration)/h)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=b);for(o in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[o]=="string"&&(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(this._valuesEnd[o])),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=h*b,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var m=0,v=this._chainedTweens.length;m<v;m++)this._chainedTweens[m].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},r.prototype._updateProperties=function(e,i,n,a){for(var o in n)if(i[o]!==void 0){var c=i[o]||0,h=n[o],u=Array.isArray(e[o]),d=Array.isArray(h),f=!u&&d;f?e[o]=this._interpolationFunction(h,a):typeof h=="object"&&h?this._updateProperties(e[o],c,h,a):(h=this._handleRelativeValue(c,h),typeof h=="number"&&(e[o]=c+(h-c)*a))}},r.prototype._handleRelativeValue=function(e,i){return typeof i!="string"?i:i.charAt(0)==="+"||i.charAt(0)==="-"?e+parseFloat(i):parseFloat(i)},r.prototype._swapEndStartRepeatValues=function(e){var i=this._valuesStartRepeat[e],n=this._valuesEnd[e];typeof n=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(n):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=i},r.autoStartOnUpdate=!1,r})();nD.nextId;var Ya=Wv;Ya.getAll.bind(Ya);Ya.removeAll.bind(Ya);Ya.add.bind(Ya);Ya.remove.bind(Ya);Ya.update.bind(Ya);function kA(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function Ztt(r){if(Array.isArray(r))return r}function Qtt(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Jtt(r,e,i){return Object.defineProperty(r,"prototype",{writable:!1}),r}function tet(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e!==0)for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function eet(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
437
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ret(r,e){return Ztt(r)||tet(r,e)||iet(r,e)||eet()}function iet(r,e){if(r){if(typeof r=="string")return kA(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?kA(r,e):void 0}}var net=Jtt(function r(e,i){var n=i.default,a=n===void 0?null:n,o=i.triggerUpdate,c=o===void 0?!0:o,h=i.onChange,u=h===void 0?function(d,f){}:h;Qtt(this,r),this.name=e,this.defaultVal=a,this.triggerUpdate=c,this.onChange=u});function N_(r){var e=r.stateInit,i=e===void 0?function(){return{}}:e,n=r.props,a=n===void 0?{}:n,o=r.methods,c=o===void 0?{}:o,h=r.aliases,u=h===void 0?{}:h,d=r.init,f=d===void 0?function(){}:d,g=r.update,b=g===void 0?function(){}:g,m=Object.keys(a).map(function(v){return new net(v,a[v])});return function v(){for(var _=arguments.length,C=new Array(_),w=0;w<_;w++)C[w]=arguments[w];var T=!!(this instanceof v&&this.constructor),E=T?C.shift():void 0,N=C[0],O=N===void 0?{}:N,B=Object.assign({},i instanceof Function?i(O):i,{initialised:!1}),A={};function L($){return P($,O),j(),L}var P=function(X,W){f.call(L,X,B,W),B.initialised=!0},j=rD(function(){B.initialised&&(b.call(L,B,A),A={})},1);return m.forEach(function($){L[$.name]=X($);function X(W){var F=W.name,U=W.triggerUpdate,D=U===void 0?!1:U,z=W.onChange,H=z===void 0?function(G,J){}:z,V=W.defaultVal,Q=V===void 0?null:V;return function(G){var J=B[F];if(!arguments.length)return J;var lt=G===void 0?Q:G;return B[F]=lt,H.call(L,lt,B,J),!A.hasOwnProperty(F)&&(A[F]=J),D&&j(),L}}}),Object.keys(c).forEach(function($){L[$]=function(){for(var X,W=arguments.length,F=new Array(W),U=0;U<W;U++)F[U]=arguments[U];return(X=c[$]).call.apply(X,[L,B].concat(F))}}),Object.entries(u).forEach(function($){var X=ret($,2),W=X[0],F=X[1];return L[W]=L[F]}),L.resetProps=function(){return m.forEach(function($){L[$.name]($.defaultVal)}),L},L.resetProps(),B._rerender=j,T&&E&&L(E),L}}var rr=(function(r){return typeof r=="function"?r:typeof r=="string"?function(e){return e[r]}:function(e){return r}});function qg(r){"@babel/helpers - typeof";return qg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qg(r)}var aet=/^\s+/,set=/\s+$/;function re(r,e){if(r=r||"",e=e||{},r instanceof re)return r;if(!(this instanceof re))return new re(r,e);var i=oet(r);this._originalInput=r,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||i.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=i.ok}re.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),i,n,a,o,c,h;return i=e.r/255,n=e.g/255,a=e.b/255,i<=.03928?o=i/12.92:o=Math.pow((i+.055)/1.055,2.4),n<=.03928?c=n/12.92:c=Math.pow((n+.055)/1.055,2.4),a<=.03928?h=a/12.92:h=Math.pow((a+.055)/1.055,2.4),.2126*o+.7152*c+.0722*h},setAlpha:function(e){return this._a=aD(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=SA(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=SA(this._r,this._g,this._b),i=Math.round(e.h*360),n=Math.round(e.s*100),a=Math.round(e.v*100);return this._a==1?"hsv("+i+", "+n+"%, "+a+"%)":"hsva("+i+", "+n+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var e=wA(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=wA(this._r,this._g,this._b),i=Math.round(e.h*360),n=Math.round(e.s*100),a=Math.round(e.l*100);return this._a==1?"hsl("+i+", "+n+"%, "+a+"%)":"hsla("+i+", "+n+"%, "+a+"%, "+this._roundA+")"},toHex:function(e){return TA(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return det(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Tr(this._r,255)*100)+"%",g:Math.round(Tr(this._g,255)*100)+"%",b:Math.round(Tr(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Tr(this._r,255)*100)+"%, "+Math.round(Tr(this._g,255)*100)+"%, "+Math.round(Tr(this._b,255)*100)+"%)":"rgba("+Math.round(Tr(this._r,255)*100)+"%, "+Math.round(Tr(this._g,255)*100)+"%, "+Math.round(Tr(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:wet[TA(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var i="#"+EA(this._r,this._g,this._b,this._a),n=i,a=this._gradientType?"GradientType = 1, ":"";if(e){var o=re(e);n="#"+EA(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+i+",endColorstr="+n+")"},toString:function(e){var i=!!e;e=e||this._format;var n=!1,a=this._a<1&&this._a>=0,o=!i&&a&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return re(this.toString())},_applyModification:function(e,i){var n=e.apply(null,[this].concat([].slice.call(i)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(met,arguments)},brighten:function(){return this._applyModification(yet,arguments)},darken:function(){return this._applyModification(bet,arguments)},desaturate:function(){return this._applyModification(fet,arguments)},saturate:function(){return this._applyModification(pet,arguments)},greyscale:function(){return this._applyModification(get,arguments)},spin:function(){return this._applyModification(xet,arguments)},_applyCombination:function(e,i){return e.apply(null,[this].concat([].slice.call(i)))},analogous:function(){return this._applyCombination(Cet,arguments)},complement:function(){return this._applyCombination(vet,arguments)},monochromatic:function(){return this._applyCombination(ket,arguments)},splitcomplement:function(){return this._applyCombination(_et,arguments)},triad:function(){return this._applyCombination(AA,[3])},tetrad:function(){return this._applyCombination(AA,[4])}};re.fromRatio=function(r,e){if(qg(r)=="object"){var i={};for(var n in r)r.hasOwnProperty(n)&&(n==="a"?i[n]=r[n]:i[n]=td(r[n]));r=i}return re(r,e)};function oet(r){var e={r:0,g:0,b:0},i=1,n=null,a=null,o=null,c=!1,h=!1;return typeof r=="string"&&(r=Net(r)),qg(r)=="object"&&(ys(r.r)&&ys(r.g)&&ys(r.b)?(e=cet(r.r,r.g,r.b),c=!0,h=String(r.r).substr(-1)==="%"?"prgb":"rgb"):ys(r.h)&&ys(r.s)&&ys(r.v)?(n=td(r.s),a=td(r.v),e=uet(r.h,n,a),c=!0,h="hsv"):ys(r.h)&&ys(r.s)&&ys(r.l)&&(n=td(r.s),o=td(r.l),e=het(r.h,n,o),c=!0,h="hsl"),r.hasOwnProperty("a")&&(i=r.a)),i=aD(i),{ok:c,format:r.format||h,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:i}}function cet(r,e,i){return{r:Tr(r,255)*255,g:Tr(e,255)*255,b:Tr(i,255)*255}}function wA(r,e,i){r=Tr(r,255),e=Tr(e,255),i=Tr(i,255);var n=Math.max(r,e,i),a=Math.min(r,e,i),o,c,h=(n+a)/2;if(n==a)o=c=0;else{var u=n-a;switch(c=h>.5?u/(2-n-a):u/(n+a),n){case r:o=(e-i)/u+(e<i?6:0);break;case e:o=(i-r)/u+2;break;case i:o=(r-e)/u+4;break}o/=6}return{h:o,s:c,l:h}}function het(r,e,i){var n,a,o;r=Tr(r,360),e=Tr(e,100),i=Tr(i,100);function c(d,f,g){return g<0&&(g+=1),g>1&&(g-=1),g<1/6?d+(f-d)*6*g:g<1/2?f:g<2/3?d+(f-d)*(2/3-g)*6:d}if(e===0)n=a=o=i;else{var h=i<.5?i*(1+e):i+e-i*e,u=2*i-h;n=c(u,h,r+1/3),a=c(u,h,r),o=c(u,h,r-1/3)}return{r:n*255,g:a*255,b:o*255}}function SA(r,e,i){r=Tr(r,255),e=Tr(e,255),i=Tr(i,255);var n=Math.max(r,e,i),a=Math.min(r,e,i),o,c,h=n,u=n-a;if(c=n===0?0:u/n,n==a)o=0;else{switch(n){case r:o=(e-i)/u+(e<i?6:0);break;case e:o=(i-r)/u+2;break;case i:o=(r-e)/u+4;break}o/=6}return{h:o,s:c,v:h}}function uet(r,e,i){r=Tr(r,360)*6,e=Tr(e,100),i=Tr(i,100);var n=Math.floor(r),a=r-n,o=i*(1-e),c=i*(1-a*e),h=i*(1-(1-a)*e),u=n%6,d=[i,c,o,o,h,i][u],f=[h,i,i,c,o,o][u],g=[o,o,h,i,i,c][u];return{r:d*255,g:f*255,b:g*255}}function TA(r,e,i,n){var a=[ba(Math.round(r).toString(16)),ba(Math.round(e).toString(16)),ba(Math.round(i).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function det(r,e,i,n,a){var o=[ba(Math.round(r).toString(16)),ba(Math.round(e).toString(16)),ba(Math.round(i).toString(16)),ba(sD(n))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function EA(r,e,i,n){var a=[ba(sD(n)),ba(Math.round(r).toString(16)),ba(Math.round(e).toString(16)),ba(Math.round(i).toString(16))];return a.join("")}re.equals=function(r,e){return!r||!e?!1:re(r).toRgbString()==re(e).toRgbString()};re.random=function(){return re.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function fet(r,e){e=e===0?0:e||10;var i=re(r).toHsl();return i.s-=e/100,i.s=vm(i.s),re(i)}function pet(r,e){e=e===0?0:e||10;var i=re(r).toHsl();return i.s+=e/100,i.s=vm(i.s),re(i)}function get(r){return re(r).desaturate(100)}function met(r,e){e=e===0?0:e||10;var i=re(r).toHsl();return i.l+=e/100,i.l=vm(i.l),re(i)}function yet(r,e){e=e===0?0:e||10;var i=re(r).toRgb();return i.r=Math.max(0,Math.min(255,i.r-Math.round(255*-(e/100)))),i.g=Math.max(0,Math.min(255,i.g-Math.round(255*-(e/100)))),i.b=Math.max(0,Math.min(255,i.b-Math.round(255*-(e/100)))),re(i)}function bet(r,e){e=e===0?0:e||10;var i=re(r).toHsl();return i.l-=e/100,i.l=vm(i.l),re(i)}function xet(r,e){var i=re(r).toHsl(),n=(i.h+e)%360;return i.h=n<0?360+n:n,re(i)}function vet(r){var e=re(r).toHsl();return e.h=(e.h+180)%360,re(e)}function AA(r,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var i=re(r).toHsl(),n=[re(r)],a=360/e,o=1;o<e;o++)n.push(re({h:(i.h+o*a)%360,s:i.s,l:i.l}));return n}function _et(r){var e=re(r).toHsl(),i=e.h;return[re(r),re({h:(i+72)%360,s:e.s,l:e.l}),re({h:(i+216)%360,s:e.s,l:e.l})]}function Cet(r,e,i){e=e||6,i=i||30;var n=re(r).toHsl(),a=360/i,o=[re(r)];for(n.h=(n.h-(a*e>>1)+720)%360;--e;)n.h=(n.h+a)%360,o.push(re(n));return o}function ket(r,e){e=e||6;for(var i=re(r).toHsv(),n=i.h,a=i.s,o=i.v,c=[],h=1/e;e--;)c.push(re({h:n,s:a,v:o})),o=(o+h)%1;return c}re.mix=function(r,e,i){i=i===0?0:i||50;var n=re(r).toRgb(),a=re(e).toRgb(),o=i/100,c={r:(a.r-n.r)*o+n.r,g:(a.g-n.g)*o+n.g,b:(a.b-n.b)*o+n.b,a:(a.a-n.a)*o+n.a};return re(c)};re.readability=function(r,e){var i=re(r),n=re(e);return(Math.max(i.getLuminance(),n.getLuminance())+.05)/(Math.min(i.getLuminance(),n.getLuminance())+.05)};re.isReadable=function(r,e,i){var n=re.readability(r,e),a,o;switch(o=!1,a=Met(i),a.level+a.size){case"AAsmall":case"AAAlarge":o=n>=4.5;break;case"AAlarge":o=n>=3;break;case"AAAsmall":o=n>=7;break}return o};re.mostReadable=function(r,e,i){var n=null,a=0,o,c,h,u;i=i||{},c=i.includeFallbackColors,h=i.level,u=i.size;for(var d=0;d<e.length;d++)o=re.readability(r,e[d]),o>a&&(a=o,n=re(e[d]));return re.isReadable(r,n,{level:h,size:u})||!c?n:(i.includeFallbackColors=!1,re.mostReadable(r,["#fff","#000"],i))};var Yv=re.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",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:"f0f",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:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",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:"f00",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",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},wet=re.hexNames=Tet(Yv);function Tet(r){var e={};for(var i in r)r.hasOwnProperty(i)&&(e[r[i]]=i);return e}function aD(r){return r=parseFloat(r),(isNaN(r)||r<0||r>1)&&(r=1),r}function Tr(r,e){Eet(r)&&(r="100%");var i=Aet(r);return r=Math.min(e,Math.max(0,parseFloat(r))),i&&(r=parseInt(r*e,10)/100),Math.abs(r-e)<1e-6?1:r%e/parseFloat(e)}function vm(r){return Math.min(1,Math.max(0,r))}function Nn(r){return parseInt(r,16)}function Eet(r){return typeof r=="string"&&r.indexOf(".")!=-1&&parseFloat(r)===1}function Aet(r){return typeof r=="string"&&r.indexOf("%")!=-1}function ba(r){return r.length==1?"0"+r:""+r}function td(r){return r<=1&&(r=r*100+"%"),r}function sD(r){return Math.round(parseFloat(r)*255).toString(16)}function NA(r){return Nn(r)/255}var ua=(function(){var r="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",i="(?:"+e+")|(?:"+r+")",n="[\\s|\\(]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")\\s*\\)?",a="[\\s|\\(]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")\\s*\\)?";return{CSS_UNIT:new RegExp(i),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function ys(r){return!!ua.CSS_UNIT.exec(r)}function Net(r){r=r.replace(aet,"").replace(set,"").toLowerCase();var e=!1;if(Yv[r])r=Yv[r],e=!0;else if(r=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var i;return(i=ua.rgb.exec(r))?{r:i[1],g:i[2],b:i[3]}:(i=ua.rgba.exec(r))?{r:i[1],g:i[2],b:i[3],a:i[4]}:(i=ua.hsl.exec(r))?{h:i[1],s:i[2],l:i[3]}:(i=ua.hsla.exec(r))?{h:i[1],s:i[2],l:i[3],a:i[4]}:(i=ua.hsv.exec(r))?{h:i[1],s:i[2],v:i[3]}:(i=ua.hsva.exec(r))?{h:i[1],s:i[2],v:i[3],a:i[4]}:(i=ua.hex8.exec(r))?{r:Nn(i[1]),g:Nn(i[2]),b:Nn(i[3]),a:NA(i[4]),format:e?"name":"hex8"}:(i=ua.hex6.exec(r))?{r:Nn(i[1]),g:Nn(i[2]),b:Nn(i[3]),format:e?"name":"hex"}:(i=ua.hex4.exec(r))?{r:Nn(i[1]+""+i[1]),g:Nn(i[2]+""+i[2]),b:Nn(i[3]+""+i[3]),a:NA(i[4]+""+i[4]),format:e?"name":"hex8"}:(i=ua.hex3.exec(r))?{r:Nn(i[1]+""+i[1]),g:Nn(i[2]+""+i[2]),b:Nn(i[3]+""+i[3]),format:e?"name":"hex"}:!1}function Met(r){var e,i;return r=r||{level:"AA",size:"small"},e=(r.level||"AA").toUpperCase(),i=(r.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),i!=="small"&&i!=="large"&&(i="small"),{level:e,size:i}}function Vv(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function Bet(r){if(Array.isArray(r))return Vv(r)}function oD(r,e,i){if(typeof r=="function"?r===e:r.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}function Let(r,e){if(e.has(r))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Oet(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Xn(r,e){return r.get(oD(r,e))}function MA(r,e,i){Let(r,e),e.set(r,i)}function BA(r,e,i){return r.set(oD(r,e),i),i}function Ret(r,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,zet(n.key),n)}}function Det(r,e,i){return e&&Ret(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function Fet(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function jet(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
438
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Iet(r){return Bet(r)||Fet(r)||Pet(r)||jet()}function $et(r,e){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function zet(r){var e=$et(r,"string");return typeof e=="symbol"?e:e+""}function Pet(r,e){if(r){if(typeof r=="string")return Vv(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Vv(r,e):void 0}}var qet=123,Uet=function(e){return"#".concat(Math.min(e,Math.pow(2,24)).toString(16).padStart(6,"0"))},lD=function(e,i,n){return(e<<16)+(i<<8)+n},Het=function(e){var i=re(e).toRgb(),n=i.r,a=i.g,o=i.b;return lD(n,a,o)},LA=function(e,i){return e*qet%Math.pow(2,i)},sl=new WeakMap,bs=new WeakMap,Get=(function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;Oet(this,r),MA(this,sl,void 0),MA(this,bs,void 0),BA(bs,this,e),this.reset()}return Det(r,[{key:"reset",value:function(){BA(sl,this,["__reserved for background__"])}},{key:"register",value:function(i){if(Xn(sl,this).length>=Math.pow(2,24-Xn(bs,this)))return null;var n=Xn(sl,this).length,a=LA(n,Xn(bs,this)),o=Uet(n+(a<<24-Xn(bs,this)));return Xn(sl,this).push(i),o}},{key:"lookup",value:function(i){if(!i)return null;var n=typeof i=="string"?Het(i):lD.apply(void 0,Iet(i));if(!n)return null;var a=n&Math.pow(2,24-Xn(bs,this))-1,o=n>>24-Xn(bs,this)&Math.pow(2,Xn(bs,this))-1;return LA(a,Xn(bs,this))!==o||a>=Xn(sl,this).length?null:Xn(sl,this)[a]}}])})(),Zd,Er,cD,hD,bo,OA,uD,dD,rx,Zp,cd,fD,M_,Kv,Xv,Ug={},Hg=[],Wet=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,_m=Array.isArray;function Ua(r,e){for(var i in e)r[i]=e[i];return r}function B_(r){r&&r.parentNode&&r.parentNode.removeChild(r)}function Yet(r,e,i){var n,a,o,c={};for(o in e)o=="key"?n=e[o]:o=="ref"?a=e[o]:c[o]=e[o];if(arguments.length>2&&(c.children=arguments.length>3?Zd.call(arguments,2):i),typeof r=="function"&&r.defaultProps!=null)for(o in r.defaultProps)c[o]===void 0&&(c[o]=r.defaultProps[o]);return hd(r,c,n,a,null)}function hd(r,e,i,n,a){var o={type:r,props:e,key:i,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a??++cD,__i:-1,__u:0};return a==null&&Er.vnode!=null&&Er.vnode(o),o}function Cm(r){return r.children}function Qp(r,e){this.props=r,this.context=e}function _h(r,e){if(e==null)return r.__?_h(r.__,r.__i+1):null;for(var i;e<r.__k.length;e++)if((i=r.__k[e])!=null&&i.__e!=null)return i.__e;return typeof r.type=="function"?_h(r):null}function Vet(r){if(r.__P&&r.__d){var e=r.__v,i=e.__e,n=[],a=[],o=Ua({},e);o.__v=e.__v+1,Er.vnode&&Er.vnode(o),L_(r.__P,o,e,r.__n,r.__P.namespaceURI,32&e.__u?[i]:null,n,i??_h(e),!!(32&e.__u),a),o.__v=e.__v,o.__.__k[o.__i]=o,yD(n,o,a),e.__e=e.__=null,o.__e!=i&&pD(o)}}function pD(r){if((r=r.__)!=null&&r.__c!=null)return r.__e=r.__c.base=null,r.__k.some(function(e){if(e!=null&&e.__e!=null)return r.__e=r.__c.base=e.__e}),pD(r)}function RA(r){(!r.__d&&(r.__d=!0)&&bo.push(r)&&!Gg.__r++||OA!=Er.debounceRendering)&&((OA=Er.debounceRendering)||uD)(Gg)}function Gg(){try{for(var r,e=1;bo.length;)bo.length>e&&bo.sort(dD),r=bo.shift(),e=bo.length,Vet(r)}finally{bo.length=Gg.__r=0}}function gD(r,e,i,n,a,o,c,h,u,d,f){var g,b,m,v,_,C,w,T=n&&n.__k||Hg,E=e.length;for(u=Ket(i,e,T,u,E),g=0;g<E;g++)(m=i.__k[g])!=null&&(b=m.__i!=-1&&T[m.__i]||Ug,m.__i=g,C=L_(r,m,b,a,o,c,h,u,d,f),v=m.__e,m.ref&&b.ref!=m.ref&&(b.ref&&O_(b.ref,null,m),f.push(m.ref,m.__c||v,m)),_==null&&v!=null&&(_=v),(w=!!(4&m.__u))||b.__k===m.__k?(u=mD(m,u,r,w),w&&b.__e&&(b.__e=null)):typeof m.type=="function"&&C!==void 0?u=C:v&&(u=v.nextSibling),m.__u&=-7);return i.__e=_,u}function Ket(r,e,i,n,a){var o,c,h,u,d,f=i.length,g=f,b=0;for(r.__k=new Array(a),o=0;o<a;o++)(c=e[o])!=null&&typeof c!="boolean"&&typeof c!="function"?(typeof c=="string"||typeof c=="number"||typeof c=="bigint"||c.constructor==String?c=r.__k[o]=hd(null,c,null,null,null):_m(c)?c=r.__k[o]=hd(Cm,{children:c},null,null,null):c.constructor===void 0&&c.__b>0?c=r.__k[o]=hd(c.type,c.props,c.key,c.ref?c.ref:null,c.__v):r.__k[o]=c,u=o+b,c.__=r,c.__b=r.__b+1,h=null,(d=c.__i=Xet(c,i,u,g))!=-1&&(g--,(h=i[d])&&(h.__u|=2)),h==null||h.__v==null?(d==-1&&(a>f?b--:a<f&&b++),typeof c.type!="function"&&(c.__u|=4)):d!=u&&(d==u-1?b--:d==u+1?b++:(d>u?b--:b++,c.__u|=4))):r.__k[o]=null;if(g)for(o=0;o<f;o++)(h=i[o])!=null&&(2&h.__u)==0&&(h.__e==n&&(n=_h(h)),xD(h,h));return n}function mD(r,e,i,n){var a,o;if(typeof r.type=="function"){for(a=r.__k,o=0;a&&o<a.length;o++)a[o]&&(a[o].__=r,e=mD(a[o],e,i,n));return e}r.__e!=e&&(n&&(e&&r.type&&!e.parentNode&&(e=_h(r)),i.insertBefore(r.__e,e||null)),e=r.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Xet(r,e,i,n){var a,o,c,h=r.key,u=r.type,d=e[i],f=d!=null&&(2&d.__u)==0;if(d===null&&h==null||f&&h==d.key&&u==d.type)return i;if(n>(f?1:0)){for(a=i-1,o=i+1;a>=0||o<e.length;)if((d=e[c=a>=0?a--:o++])!=null&&(2&d.__u)==0&&h==d.key&&u==d.type)return c}return-1}function DA(r,e,i){e[0]=="-"?r.setProperty(e,i??""):r[e]=i==null?"":typeof i!="number"||Wet.test(e)?i:i+"px"}function Mp(r,e,i,n,a){var o,c;t:if(e=="style")if(typeof i=="string")r.style.cssText=i;else{if(typeof n=="string"&&(r.style.cssText=n=""),n)for(e in n)i&&e in i||DA(r.style,e,"");if(i)for(e in i)n&&i[e]==n[e]||DA(r.style,e,i[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(fD,"$1")),c=e.toLowerCase(),e=c in r||e=="onFocusOut"||e=="onFocusIn"?c.slice(2):e.slice(2),r.l||(r.l={}),r.l[e+o]=i,i?n?i[cd]=n[cd]:(i[cd]=M_,r.addEventListener(e,o?Xv:Kv,o)):r.removeEventListener(e,o?Xv:Kv,o);else{if(a=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in r)try{r[e]=i??"";break t}catch{}typeof i=="function"||(i==null||i===!1&&e[4]!="-"?r.removeAttribute(e):r.setAttribute(e,e=="popover"&&i==1?"":i))}}function FA(r){return function(e){if(this.l){var i=this.l[e.type+r];if(e[Zp]==null)e[Zp]=M_++;else if(e[Zp]<i[cd])return;return i(Er.event?Er.event(e):e)}}}function L_(r,e,i,n,a,o,c,h,u,d){var f,g,b,m,v,_,C,w,T,E,N,O,B,A,L,P=e.type;if(e.constructor!==void 0)return null;128&i.__u&&(u=!!(32&i.__u),o=[h=e.__e=i.__e]),(f=Er.__b)&&f(e);t:if(typeof P=="function")try{if(w=e.props,T=P.prototype&&P.prototype.render,E=(f=P.contextType)&&n[f.__c],N=f?E?E.props.value:f.__:n,i.__c?C=(g=e.__c=i.__c).__=g.__E:(T?e.__c=g=new P(w,N):(e.__c=g=new Qp(w,N),g.constructor=P,g.render=Qet),E&&E.sub(g),g.state||(g.state={}),g.__n=n,b=g.__d=!0,g.__h=[],g._sb=[]),T&&g.__s==null&&(g.__s=g.state),T&&P.getDerivedStateFromProps!=null&&(g.__s==g.state&&(g.__s=Ua({},g.__s)),Ua(g.__s,P.getDerivedStateFromProps(w,g.__s))),m=g.props,v=g.state,g.__v=e,b)T&&P.getDerivedStateFromProps==null&&g.componentWillMount!=null&&g.componentWillMount(),T&&g.componentDidMount!=null&&g.__h.push(g.componentDidMount);else{if(T&&P.getDerivedStateFromProps==null&&w!==m&&g.componentWillReceiveProps!=null&&g.componentWillReceiveProps(w,N),e.__v==i.__v||!g.__e&&g.shouldComponentUpdate!=null&&g.shouldComponentUpdate(w,g.__s,N)===!1){e.__v!=i.__v&&(g.props=w,g.state=g.__s,g.__d=!1),e.__e=i.__e,e.__k=i.__k,e.__k.some(function(j){j&&(j.__=e)}),Hg.push.apply(g.__h,g._sb),g._sb=[],g.__h.length&&c.push(g);break t}g.componentWillUpdate!=null&&g.componentWillUpdate(w,g.__s,N),T&&g.componentDidUpdate!=null&&g.__h.push(function(){g.componentDidUpdate(m,v,_)})}if(g.context=N,g.props=w,g.__P=r,g.__e=!1,O=Er.__r,B=0,T)g.state=g.__s,g.__d=!1,O&&O(e),f=g.render(g.props,g.state,g.context),Hg.push.apply(g.__h,g._sb),g._sb=[];else do g.__d=!1,O&&O(e),f=g.render(g.props,g.state,g.context),g.state=g.__s;while(g.__d&&++B<25);g.state=g.__s,g.getChildContext!=null&&(n=Ua(Ua({},n),g.getChildContext())),T&&!b&&g.getSnapshotBeforeUpdate!=null&&(_=g.getSnapshotBeforeUpdate(m,v)),A=f!=null&&f.type===Cm&&f.key==null?bD(f.props.children):f,h=gD(r,_m(A)?A:[A],e,i,n,a,o,c,h,u,d),g.base=e.__e,e.__u&=-161,g.__h.length&&c.push(g),C&&(g.__E=g.__=null)}catch(j){if(e.__v=null,u||o!=null)if(j.then){for(e.__u|=u?160:128;h&&h.nodeType==8&&h.nextSibling;)h=h.nextSibling;o[o.indexOf(h)]=null,e.__e=h}else{for(L=o.length;L--;)B_(o[L]);Zv(e)}else e.__e=i.__e,e.__k=i.__k,j.then||Zv(e);Er.__e(j,e,i)}else o==null&&e.__v==i.__v?(e.__k=i.__k,e.__e=i.__e):h=e.__e=Zet(i.__e,e,i,n,a,o,c,u,d);return(f=Er.diffed)&&f(e),128&e.__u?void 0:h}function Zv(r){r&&(r.__c&&(r.__c.__e=!0),r.__k&&r.__k.some(Zv))}function yD(r,e,i){for(var n=0;n<i.length;n++)O_(i[n],i[++n],i[++n]);Er.__c&&Er.__c(e,r),r.some(function(a){try{r=a.__h,a.__h=[],r.some(function(o){o.call(a)})}catch(o){Er.__e(o,a.__v)}})}function bD(r){return typeof r!="object"||r==null||r.__b>0?r:_m(r)?r.map(bD):Ua({},r)}function Zet(r,e,i,n,a,o,c,h,u){var d,f,g,b,m,v,_,C=i.props||Ug,w=e.props,T=e.type;if(T=="svg"?a="http://www.w3.org/2000/svg":T=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),o!=null){for(d=0;d<o.length;d++)if((m=o[d])&&"setAttribute"in m==!!T&&(T?m.localName==T:m.nodeType==3)){r=m,o[d]=null;break}}if(r==null){if(T==null)return document.createTextNode(w);r=document.createElementNS(a,T,w.is&&w),h&&(Er.__m&&Er.__m(e,o),h=!1),o=null}if(T==null)C===w||h&&r.data==w||(r.data=w);else{if(o=o&&Zd.call(r.childNodes),!h&&o!=null)for(C={},d=0;d<r.attributes.length;d++)C[(m=r.attributes[d]).name]=m.value;for(d in C)m=C[d],d=="dangerouslySetInnerHTML"?g=m:d=="children"||d in w||d=="value"&&"defaultValue"in w||d=="checked"&&"defaultChecked"in w||Mp(r,d,null,m,a);for(d in w)m=w[d],d=="children"?b=m:d=="dangerouslySetInnerHTML"?f=m:d=="value"?v=m:d=="checked"?_=m:h&&typeof m!="function"||C[d]===m||Mp(r,d,m,C[d],a);if(f)h||g&&(f.__html==g.__html||f.__html==r.innerHTML)||(r.innerHTML=f.__html),e.__k=[];else if(g&&(r.innerHTML=""),gD(e.type=="template"?r.content:r,_m(b)?b:[b],e,i,n,T=="foreignObject"?"http://www.w3.org/1999/xhtml":a,o,c,o?o[0]:i.__k&&_h(i,0),h,u),o!=null)for(d=o.length;d--;)B_(o[d]);h||(d="value",T=="progress"&&v==null?r.removeAttribute("value"):v!=null&&(v!==r[d]||T=="progress"&&!v||T=="option"&&v!=C[d])&&Mp(r,d,v,C[d],a),d="checked",_!=null&&_!=r[d]&&Mp(r,d,_,C[d],a))}return r}function O_(r,e,i){try{if(typeof r=="function"){var n=typeof r.__u=="function";n&&r.__u(),n&&e==null||(r.__u=r(e))}else r.current=e}catch(a){Er.__e(a,i)}}function xD(r,e,i){var n,a;if(Er.unmount&&Er.unmount(r),(n=r.ref)&&(n.current&&n.current!=r.__e||O_(n,null,e)),(n=r.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){Er.__e(o,e)}n.base=n.__P=null}if(n=r.__k)for(a=0;a<n.length;a++)n[a]&&xD(n[a],e,i||typeof r.type!="function");i||B_(r.__e),r.__c=r.__=r.__e=void 0}function Qet(r,e,i){return this.constructor(r,i)}function Jet(r,e,i){var n,a,o,c;e==document&&(e=document.documentElement),Er.__&&Er.__(r,e),a=(n=!1)?null:e.__k,o=[],c=[],L_(e,r=e.__k=Yet(Cm,null,[r]),a||Ug,Ug,e.namespaceURI,a?null:e.firstChild?Zd.call(e.childNodes):null,o,a?a.__e:e.firstChild,n,c),yD(o,r,c)}function vD(r,e,i){var n,a,o,c,h=Ua({},r.props);for(o in r.type&&r.type.defaultProps&&(c=r.type.defaultProps),e)o=="key"?n=e[o]:o=="ref"?a=e[o]:h[o]=e[o]===void 0&&c!=null?c[o]:e[o];return arguments.length>2&&(h.children=arguments.length>3?Zd.call(arguments,2):i),hd(r.type,h,n||r.key,a||r.ref,null)}Zd=Hg.slice,Er={__e:function(r,e,i,n){for(var a,o,c;e=e.__;)if((a=e.__c)&&!a.__)try{if((o=a.constructor)&&o.getDerivedStateFromError!=null&&(a.setState(o.getDerivedStateFromError(r)),c=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(r,n||{}),c=a.__d),c)return a.__E=a}catch(h){r=h}throw r}},cD=0,hD=function(r){return r!=null&&r.constructor===void 0},Qp.prototype.setState=function(r,e){var i;i=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Ua({},this.state),typeof r=="function"&&(r=r(Ua({},i),this.props)),r&&Ua(i,r),r!=null&&this.__v&&(e&&this._sb.push(e),RA(this))},Qp.prototype.forceUpdate=function(r){this.__v&&(this.__e=!0,r&&this.__h.push(r),RA(this))},Qp.prototype.render=Cm,bo=[],uD=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,dD=function(r,e){return r.__v.__b-e.__v.__b},Gg.__r=0,rx=Math.random().toString(8),Zp="__d"+rx,cd="__a"+rx,fD=/(PointerCapture)$|Capture$/i,M_=0,Kv=FA(!1),Xv=FA(!0);function jA(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function trt(r){if(Array.isArray(r))return r}function ert(r,e,i){return(e=ort(e))in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i,r}function rrt(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e!==0)for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function irt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
439
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IA(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),i.push.apply(i,n)}return i}function nrt(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?IA(Object(i),!0).forEach(function(n){ert(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):IA(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}function art(r,e){return trt(r)||rrt(r,e)||lrt(r,e)||irt()}function srt(r,e){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function ort(r){var e=srt(r,"string");return typeof e=="symbol"?e:e+""}function Wg(r){"@babel/helpers - typeof";return Wg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wg(r)}function lrt(r,e){if(r){if(typeof r=="string")return jA(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?jA(r,e):void 0}}var Qv=function(e){if(Wg(e)!=="object")return e;var i=vD(e);if(i.props){var n;i.props=nrt({},i.props),i!=null&&(n=i.props)!==null&&n!==void 0&&n.children&&(i.props.children=Array.isArray(i.props.children)?i.props.children.map(Qv):Qv(i.props.children))}return i},crt=function(e){return hD(vD(e))},hrt=function(e,i){delete i.__k,Jet(Qv(e),i)};function urt(r,e){e===void 0&&(e={});var i=e.insertAt;if(!(typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",i==="top"&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(document.createTextNode(r))}}var drt=`.float-tooltip-kap {
440
+ position: absolute;
441
+ width: max-content; /* prevent shrinking near right edge */
442
+ max-width: max(50%, 150px);
443
+ padding: 3px 5px;
444
+ border-radius: 3px;
445
+ font: 12px sans-serif;
446
+ color: #eee;
447
+ background: rgba(0,0,0,0.6);
448
+ pointer-events: none;
449
+ }
450
+ `;urt(drt);var frt=N_({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(e,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=n.style,o=a===void 0?{}:a,c=!!e&&Wg(e)==="object"&&!!e.node&&typeof e.node=="function",h=ce(c?e.node():e);h.style("position")==="static"&&h.style("position","relative"),i.tooltipEl=h.append("div").attr("class","float-tooltip-kap"),Object.entries(o).forEach(function(d){var f=art(d,2),g=f[0],b=f[1];return i.tooltipEl.style(g,b)}),i.tooltipEl.style("left","-10000px").style("display","none");var u="tooltip-".concat(Math.round(Math.random()*1e12));i.mouseInside=!1,h.on("mousemove.".concat(u),function(d){i.mouseInside=!0;var f=Ia(d),g=h.node(),b=g.offsetWidth,m=g.offsetHeight,v=[i.offsetX===null||i.offsetX===void 0?"-".concat(f[0]/b*100,"%"):typeof i.offsetX=="number"?"calc(-50% + ".concat(i.offsetX,"px)"):i.offsetX,i.offsetY===null||i.offsetY===void 0?m>130&&m-f[1]<100?"calc(-100% - 6px)":"21px":typeof i.offsetY=="number"?i.offsetY<0?"calc(-100% - ".concat(Math.abs(i.offsetY),"px)"):"".concat(i.offsetY,"px"):i.offsetY];i.tooltipEl.style("left",f[0]+"px").style("top",f[1]+"px").style("transform","translate(".concat(v.join(","),")")),i.content&&i.tooltipEl.style("display","inline")}),h.on("mouseover.".concat(u),function(){i.mouseInside=!0,i.content&&i.tooltipEl.style("display","inline")}),h.on("mouseout.".concat(u),function(){i.mouseInside=!1,i.tooltipEl.style("display","none")})},update:function(e){e.tooltipEl.style("display",e.content&&e.mouseInside?"inline":"none"),e.content?e.content instanceof HTMLElement?(e.tooltipEl.text(""),e.tooltipEl.append(function(){return e.content})):typeof e.content=="string"?e.tooltipEl.html(e.content):crt(e.content)?(e.tooltipEl.text(""),hrt(e.content,e.tooltipEl.node())):(e.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",e.content,e.content.toString())):e.tooltipEl.text("")}});function prt(r,e,i){var n,a=1;r==null&&(r=0),e==null&&(e=0),i==null&&(i=0);function o(){var c,h=n.length,u,d=0,f=0,g=0;for(c=0;c<h;++c)u=n[c],d+=u.x||0,f+=u.y||0,g+=u.z||0;for(d=(d/h-r)*a,f=(f/h-e)*a,g=(g/h-i)*a,c=0;c<h;++c)u=n[c],d&&(u.x-=d),f&&(u.y-=f),g&&(u.z-=g)}return o.initialize=function(c){n=c},o.x=function(c){return arguments.length?(r=+c,o):r},o.y=function(c){return arguments.length?(e=+c,o):e},o.z=function(c){return arguments.length?(i=+c,o):i},o.strength=function(c){return arguments.length?(a=+c,o):a},o}function grt(r){const e=+this._x.call(null,r);return _D(this.cover(e),e,r)}function _D(r,e,i){if(isNaN(e))return r;var n,a=r._root,o={data:i},c=r._x0,h=r._x1,u,d,f,g,b;if(!a)return r._root=o,r;for(;a.length;)if((f=e>=(u=(c+h)/2))?c=u:h=u,n=a,!(a=a[g=+f]))return n[g]=o,r;if(d=+r._x.call(null,a.data),e===d)return o.next=a,n?n[g]=o:r._root=o,r;do n=n?n[g]=new Array(2):r._root=new Array(2),(f=e>=(u=(c+h)/2))?c=u:h=u;while((g=+f)==(b=+(d>=u)));return n[b]=a,n[g]=o,r}function mrt(r){Array.isArray(r)||(r=Array.from(r));const e=r.length,i=new Float64Array(e);let n=1/0,a=-1/0;for(let o=0,c;o<e;++o)isNaN(c=+this._x.call(null,r[o]))||(i[o]=c,c<n&&(n=c),c>a&&(a=c));if(n>a)return this;this.cover(n).cover(a);for(let o=0;o<e;++o)_D(this,i[o],r[o]);return this}function yrt(r){if(isNaN(r=+r))return this;var e=this._x0,i=this._x1;if(isNaN(e))i=(e=Math.floor(r))+1;else{for(var n=i-e||1,a=this._root,o,c;e>r||r>=i;)switch(c=+(r<e),o=new Array(2),o[c]=a,a=o,n*=2,c){case 0:i=e+n;break;case 1:e=i-n;break}this._root&&this._root.length&&(this._root=a)}return this._x0=e,this._x1=i,this}function brt(){var r=[];return this.visit(function(e){if(!e.length)do r.push(e.data);while(e=e.next)}),r}function xrt(r){return arguments.length?this.cover(+r[0][0]).cover(+r[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Ls(r,e,i){this.node=r,this.x0=e,this.x1=i}function vrt(r,e){var i,n=this._x0,a,o,c=this._x1,h=[],u=this._root,d,f;for(u&&h.push(new Ls(u,n,c)),e==null?e=1/0:(n=r-e,c=r+e);d=h.pop();)if(!(!(u=d.node)||(a=d.x0)>c||(o=d.x1)<n))if(u.length){var g=(a+o)/2;h.push(new Ls(u[1],g,o),new Ls(u[0],a,g)),(f=+(r>=g))&&(d=h[h.length-1],h[h.length-1]=h[h.length-1-f],h[h.length-1-f]=d)}else{var b=Math.abs(r-+this._x.call(null,u.data));b<e&&(e=b,n=r-b,c=r+b,i=u.data)}return i}function _rt(r){if(isNaN(u=+this._x.call(null,r)))return this;var e,i=this._root,n,a,o,c=this._x0,h=this._x1,u,d,f,g,b;if(!i)return this;if(i.length)for(;;){if((f=u>=(d=(c+h)/2))?c=d:h=d,e=i,!(i=i[g=+f]))return this;if(!i.length)break;e[g+1&1]&&(n=e,b=g)}for(;i.data!==r;)if(a=i,!(i=i.next))return this;return(o=i.next)&&delete i.next,a?(o?a.next=o:delete a.next,this):e?(o?e[g]=o:delete e[g],(i=e[0]||e[1])&&i===(e[1]||e[0])&&!i.length&&(n?n[b]=i:this._root=i),this):(this._root=o,this)}function Crt(r){for(var e=0,i=r.length;e<i;++e)this.remove(r[e]);return this}function krt(){return this._root}function wrt(){var r=0;return this.visit(function(e){if(!e.length)do++r;while(e=e.next)}),r}function Srt(r){var e=[],i,n=this._root,a,o,c;for(n&&e.push(new Ls(n,this._x0,this._x1));i=e.pop();)if(!r(n=i.node,o=i.x0,c=i.x1)&&n.length){var h=(o+c)/2;(a=n[1])&&e.push(new Ls(a,h,c)),(a=n[0])&&e.push(new Ls(a,o,h))}return this}function Trt(r){var e=[],i=[],n;for(this._root&&e.push(new Ls(this._root,this._x0,this._x1));n=e.pop();){var a=n.node;if(a.length){var o,c=n.x0,h=n.x1,u=(c+h)/2;(o=a[0])&&e.push(new Ls(o,c,u)),(o=a[1])&&e.push(new Ls(o,u,h))}i.push(n)}for(;n=i.pop();)r(n.node,n.x0,n.x1);return this}function Ert(r){return r[0]}function Art(r){return arguments.length?(this._x=r,this):this._x}function R_(r,e){var i=new D_(e??Ert,NaN,NaN);return r==null?i:i.addAll(r)}function D_(r,e,i){this._x=r,this._x0=e,this._x1=i,this._root=void 0}function $A(r){for(var e={data:r.data},i=e;r=r.next;)i=i.next={data:r.data};return e}var mn=R_.prototype=D_.prototype;mn.copy=function(){var r=new D_(this._x,this._x0,this._x1),e=this._root,i,n;if(!e)return r;if(!e.length)return r._root=$A(e),r;for(i=[{source:e,target:r._root=new Array(2)}];e=i.pop();)for(var a=0;a<2;++a)(n=e.source[a])&&(n.length?i.push({source:n,target:e.target[a]=new Array(2)}):e.target[a]=$A(n));return r};mn.add=grt;mn.addAll=mrt;mn.cover=yrt;mn.data=brt;mn.extent=xrt;mn.find=vrt;mn.remove=_rt;mn.removeAll=Crt;mn.root=krt;mn.size=wrt;mn.visit=Srt;mn.visitAfter=Trt;mn.x=Art;function Nrt(r){const e=+this._x.call(null,r),i=+this._y.call(null,r),n=+this._z.call(null,r);return CD(this.cover(e,i,n),e,i,n,r)}function CD(r,e,i,n,a){if(isNaN(e)||isNaN(i)||isNaN(n))return r;var o,c=r._root,h={data:a},u=r._x0,d=r._y0,f=r._z0,g=r._x1,b=r._y1,m=r._z1,v,_,C,w,T,E,N,O,B,A,L;if(!c)return r._root=h,r;for(;c.length;)if((N=e>=(v=(u+g)/2))?u=v:g=v,(O=i>=(_=(d+b)/2))?d=_:b=_,(B=n>=(C=(f+m)/2))?f=C:m=C,o=c,!(c=c[A=B<<2|O<<1|N]))return o[A]=h,r;if(w=+r._x.call(null,c.data),T=+r._y.call(null,c.data),E=+r._z.call(null,c.data),e===w&&i===T&&n===E)return h.next=c,o?o[A]=h:r._root=h,r;do o=o?o[A]=new Array(8):r._root=new Array(8),(N=e>=(v=(u+g)/2))?u=v:g=v,(O=i>=(_=(d+b)/2))?d=_:b=_,(B=n>=(C=(f+m)/2))?f=C:m=C;while((A=B<<2|O<<1|N)===(L=(E>=C)<<2|(T>=_)<<1|w>=v));return o[L]=c,o[A]=h,r}function Mrt(r){Array.isArray(r)||(r=Array.from(r));const e=r.length,i=new Float64Array(e),n=new Float64Array(e),a=new Float64Array(e);let o=1/0,c=1/0,h=1/0,u=-1/0,d=-1/0,f=-1/0;for(let g=0,b,m,v,_;g<e;++g)isNaN(m=+this._x.call(null,b=r[g]))||isNaN(v=+this._y.call(null,b))||isNaN(_=+this._z.call(null,b))||(i[g]=m,n[g]=v,a[g]=_,m<o&&(o=m),m>u&&(u=m),v<c&&(c=v),v>d&&(d=v),_<h&&(h=_),_>f&&(f=_));if(o>u||c>d||h>f)return this;this.cover(o,c,h).cover(u,d,f);for(let g=0;g<e;++g)CD(this,i[g],n[g],a[g],r[g]);return this}function Brt(r,e,i){if(isNaN(r=+r)||isNaN(e=+e)||isNaN(i=+i))return this;var n=this._x0,a=this._y0,o=this._z0,c=this._x1,h=this._y1,u=this._z1;if(isNaN(n))c=(n=Math.floor(r))+1,h=(a=Math.floor(e))+1,u=(o=Math.floor(i))+1;else{for(var d=c-n||1,f=this._root,g,b;n>r||r>=c||a>e||e>=h||o>i||i>=u;)switch(b=(i<o)<<2|(e<a)<<1|r<n,g=new Array(8),g[b]=f,f=g,d*=2,b){case 0:c=n+d,h=a+d,u=o+d;break;case 1:n=c-d,h=a+d,u=o+d;break;case 2:c=n+d,a=h-d,u=o+d;break;case 3:n=c-d,a=h-d,u=o+d;break;case 4:c=n+d,h=a+d,o=u-d;break;case 5:n=c-d,h=a+d,o=u-d;break;case 6:c=n+d,a=h-d,o=u-d;break;case 7:n=c-d,a=h-d,o=u-d;break}this._root&&this._root.length&&(this._root=f)}return this._x0=n,this._y0=a,this._z0=o,this._x1=c,this._y1=h,this._z1=u,this}function Lrt(){var r=[];return this.visit(function(e){if(!e.length)do r.push(e.data);while(e=e.next)}),r}function Ort(r){return arguments.length?this.cover(+r[0][0],+r[0][1],+r[0][2]).cover(+r[1][0],+r[1][1],+r[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function mr(r,e,i,n,a,o,c){this.node=r,this.x0=e,this.y0=i,this.z0=n,this.x1=a,this.y1=o,this.z1=c}function Rrt(r,e,i,n){var a,o=this._x0,c=this._y0,h=this._z0,u,d,f,g,b,m,v=this._x1,_=this._y1,C=this._z1,w=[],T=this._root,E,N;for(T&&w.push(new mr(T,o,c,h,v,_,C)),n==null?n=1/0:(o=r-n,c=e-n,h=i-n,v=r+n,_=e+n,C=i+n,n*=n);E=w.pop();)if(!(!(T=E.node)||(u=E.x0)>v||(d=E.y0)>_||(f=E.z0)>C||(g=E.x1)<o||(b=E.y1)<c||(m=E.z1)<h))if(T.length){var O=(u+g)/2,B=(d+b)/2,A=(f+m)/2;w.push(new mr(T[7],O,B,A,g,b,m),new mr(T[6],u,B,A,O,b,m),new mr(T[5],O,d,A,g,B,m),new mr(T[4],u,d,A,O,B,m),new mr(T[3],O,B,f,g,b,A),new mr(T[2],u,B,f,O,b,A),new mr(T[1],O,d,f,g,B,A),new mr(T[0],u,d,f,O,B,A)),(N=(i>=A)<<2|(e>=B)<<1|r>=O)&&(E=w[w.length-1],w[w.length-1]=w[w.length-1-N],w[w.length-1-N]=E)}else{var L=r-+this._x.call(null,T.data),P=e-+this._y.call(null,T.data),j=i-+this._z.call(null,T.data),$=L*L+P*P+j*j;if($<n){var X=Math.sqrt(n=$);o=r-X,c=e-X,h=i-X,v=r+X,_=e+X,C=i+X,a=T.data}}return a}const Drt=(r,e,i,n,a,o)=>Math.sqrt((r-n)**2+(e-a)**2+(i-o)**2);function Frt(r,e,i,n){const a=[],o=r-n,c=e-n,h=i-n,u=r+n,d=e+n,f=i+n;return this.visit((g,b,m,v,_,C,w)=>{if(!g.length)do{const T=g.data;Drt(r,e,i,this._x(T),this._y(T),this._z(T))<=n&&a.push(T)}while(g=g.next);return b>u||m>d||v>f||_<o||C<c||w<h}),a}function jrt(r){if(isNaN(b=+this._x.call(null,r))||isNaN(m=+this._y.call(null,r))||isNaN(v=+this._z.call(null,r)))return this;var e,i=this._root,n,a,o,c=this._x0,h=this._y0,u=this._z0,d=this._x1,f=this._y1,g=this._z1,b,m,v,_,C,w,T,E,N,O,B;if(!i)return this;if(i.length)for(;;){if((T=b>=(_=(c+d)/2))?c=_:d=_,(E=m>=(C=(h+f)/2))?h=C:f=C,(N=v>=(w=(u+g)/2))?u=w:g=w,e=i,!(i=i[O=N<<2|E<<1|T]))return this;if(!i.length)break;(e[O+1&7]||e[O+2&7]||e[O+3&7]||e[O+4&7]||e[O+5&7]||e[O+6&7]||e[O+7&7])&&(n=e,B=O)}for(;i.data!==r;)if(a=i,!(i=i.next))return this;return(o=i.next)&&delete i.next,a?(o?a.next=o:delete a.next,this):e?(o?e[O]=o:delete e[O],(i=e[0]||e[1]||e[2]||e[3]||e[4]||e[5]||e[6]||e[7])&&i===(e[7]||e[6]||e[5]||e[4]||e[3]||e[2]||e[1]||e[0])&&!i.length&&(n?n[B]=i:this._root=i),this):(this._root=o,this)}function Irt(r){for(var e=0,i=r.length;e<i;++e)this.remove(r[e]);return this}function $rt(){return this._root}function zrt(){var r=0;return this.visit(function(e){if(!e.length)do++r;while(e=e.next)}),r}function Prt(r){var e=[],i,n=this._root,a,o,c,h,u,d,f;for(n&&e.push(new mr(n,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));i=e.pop();)if(!r(n=i.node,o=i.x0,c=i.y0,h=i.z0,u=i.x1,d=i.y1,f=i.z1)&&n.length){var g=(o+u)/2,b=(c+d)/2,m=(h+f)/2;(a=n[7])&&e.push(new mr(a,g,b,m,u,d,f)),(a=n[6])&&e.push(new mr(a,o,b,m,g,d,f)),(a=n[5])&&e.push(new mr(a,g,c,m,u,b,f)),(a=n[4])&&e.push(new mr(a,o,c,m,g,b,f)),(a=n[3])&&e.push(new mr(a,g,b,h,u,d,m)),(a=n[2])&&e.push(new mr(a,o,b,h,g,d,m)),(a=n[1])&&e.push(new mr(a,g,c,h,u,b,m)),(a=n[0])&&e.push(new mr(a,o,c,h,g,b,m))}return this}function qrt(r){var e=[],i=[],n;for(this._root&&e.push(new mr(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=e.pop();){var a=n.node;if(a.length){var o,c=n.x0,h=n.y0,u=n.z0,d=n.x1,f=n.y1,g=n.z1,b=(c+d)/2,m=(h+f)/2,v=(u+g)/2;(o=a[0])&&e.push(new mr(o,c,h,u,b,m,v)),(o=a[1])&&e.push(new mr(o,b,h,u,d,m,v)),(o=a[2])&&e.push(new mr(o,c,m,u,b,f,v)),(o=a[3])&&e.push(new mr(o,b,m,u,d,f,v)),(o=a[4])&&e.push(new mr(o,c,h,v,b,m,g)),(o=a[5])&&e.push(new mr(o,b,h,v,d,m,g)),(o=a[6])&&e.push(new mr(o,c,m,v,b,f,g)),(o=a[7])&&e.push(new mr(o,b,m,v,d,f,g))}i.push(n)}for(;n=i.pop();)r(n.node,n.x0,n.y0,n.z0,n.x1,n.y1,n.z1);return this}function Urt(r){return r[0]}function Hrt(r){return arguments.length?(this._x=r,this):this._x}function Grt(r){return r[1]}function Wrt(r){return arguments.length?(this._y=r,this):this._y}function Yrt(r){return r[2]}function Vrt(r){return arguments.length?(this._z=r,this):this._z}function F_(r,e,i,n){var a=new j_(e??Urt,i??Grt,n??Yrt,NaN,NaN,NaN,NaN,NaN,NaN);return r==null?a:a.addAll(r)}function j_(r,e,i,n,a,o,c,h,u){this._x=r,this._y=e,this._z=i,this._x0=n,this._y0=a,this._z0=o,this._x1=c,this._y1=h,this._z1=u,this._root=void 0}function zA(r){for(var e={data:r.data},i=e;r=r.next;)i=i.next={data:r.data};return e}var Ni=F_.prototype=j_.prototype;Ni.copy=function(){var r=new j_(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),e=this._root,i,n;if(!e)return r;if(!e.length)return r._root=zA(e),r;for(i=[{source:e,target:r._root=new Array(8)}];e=i.pop();)for(var a=0;a<8;++a)(n=e.source[a])&&(n.length?i.push({source:n,target:e.target[a]=new Array(8)}):e.target[a]=zA(n));return r};Ni.add=Nrt;Ni.addAll=Mrt;Ni.cover=Brt;Ni.data=Lrt;Ni.extent=Ort;Ni.find=Rrt;Ni.findAllWithinRadius=Frt;Ni.remove=jrt;Ni.removeAll=Irt;Ni.root=$rt;Ni.size=zrt;Ni.visit=Prt;Ni.visitAfter=qrt;Ni.x=Hrt;Ni.y=Wrt;Ni.z=Vrt;function ui(r){return function(){return r}}function ea(r){return(r()-.5)*1e-6}function ix(r){return r.x+r.vx}function PA(r){return r.y+r.vy}function Krt(r){return r.z+r.vz}function Xrt(r){var e,i,n,a,o=1,c=1;typeof r!="function"&&(r=ui(r==null?1:+r));function h(){for(var f,g=e.length,b,m,v,_,C,w,T,E=0;E<c;++E)for(b=(i===1?R_(e,ix):i===2?j1(e,ix,PA):i===3?F_(e,ix,PA,Krt):null).visitAfter(u),f=0;f<g;++f)m=e[f],w=n[m.index],T=w*w,v=m.x+m.vx,i>1&&(_=m.y+m.vy),i>2&&(C=m.z+m.vz),b.visit(N);function N(O,B,A,L,P,j,$){var X=[B,A,L,P,j,$],W=X[0],F=X[1],U=X[2],D=X[i],z=X[i+1],H=X[i+2],V=O.data,Q=O.r,G=w+Q;if(V){if(V.index>m.index){var J=v-V.x-V.vx,lt=i>1?_-V.y-V.vy:0,st=i>2?C-V.z-V.vz:0,vt=J*J+lt*lt+st*st;vt<G*G&&(J===0&&(J=ea(a),vt+=J*J),i>1&&lt===0&&(lt=ea(a),vt+=lt*lt),i>2&&st===0&&(st=ea(a),vt+=st*st),vt=(G-(vt=Math.sqrt(vt)))/vt*o,m.vx+=(J*=vt)*(G=(Q*=Q)/(T+Q)),i>1&&(m.vy+=(lt*=vt)*G),i>2&&(m.vz+=(st*=vt)*G),V.vx-=J*(G=1-G),i>1&&(V.vy-=lt*G),i>2&&(V.vz-=st*G))}return}return W>v+G||D<v-G||i>1&&(F>_+G||z<_-G)||i>2&&(U>C+G||H<C-G)}}function u(f){if(f.data)return f.r=n[f.data.index];for(var g=f.r=0;g<Math.pow(2,i);++g)f[g]&&f[g].r>f.r&&(f.r=f[g].r)}function d(){if(e){var f,g=e.length,b;for(n=new Array(g),f=0;f<g;++f)b=e[f],n[b.index]=+r(b,f,e)}}return h.initialize=function(f,...g){e=f,a=g.find(b=>typeof b=="function")||Math.random,i=g.find(b=>[1,2,3].includes(b))||2,d()},h.iterations=function(f){return arguments.length?(c=+f,h):c},h.strength=function(f){return arguments.length?(o=+f,h):o},h.radius=function(f){return arguments.length?(r=typeof f=="function"?f:ui(+f),d(),h):r},h}function Zrt(r){return r.index}function qA(r,e){var i=r.get(e);if(!i)throw new Error("node not found: "+e);return i}function Qrt(r){var e=Zrt,i=b,n,a=ui(30),o,c,h,u,d,f,g=1;r==null&&(r=[]);function b(w){return 1/Math.min(u[w.source.index],u[w.target.index])}function m(w){for(var T=0,E=r.length;T<g;++T)for(var N=0,O,B,A,L=0,P=0,j=0,$,X;N<E;++N)O=r[N],B=O.source,A=O.target,L=A.x+A.vx-B.x-B.vx||ea(f),h>1&&(P=A.y+A.vy-B.y-B.vy||ea(f)),h>2&&(j=A.z+A.vz-B.z-B.vz||ea(f)),$=Math.sqrt(L*L+P*P+j*j),$=($-o[N])/$*w*n[N],L*=$,P*=$,j*=$,A.vx-=L*(X=d[N]),h>1&&(A.vy-=P*X),h>2&&(A.vz-=j*X),B.vx+=L*(X=1-X),h>1&&(B.vy+=P*X),h>2&&(B.vz+=j*X)}function v(){if(c){var w,T=c.length,E=r.length,N=new Map(c.map((B,A)=>[e(B,A,c),B])),O;for(w=0,u=new Array(T);w<E;++w)O=r[w],O.index=w,typeof O.source!="object"&&(O.source=qA(N,O.source)),typeof O.target!="object"&&(O.target=qA(N,O.target)),u[O.source.index]=(u[O.source.index]||0)+1,u[O.target.index]=(u[O.target.index]||0)+1;for(w=0,d=new Array(E);w<E;++w)O=r[w],d[w]=u[O.source.index]/(u[O.source.index]+u[O.target.index]);n=new Array(E),_(),o=new Array(E),C()}}function _(){if(c)for(var w=0,T=r.length;w<T;++w)n[w]=+i(r[w],w,r)}function C(){if(c)for(var w=0,T=r.length;w<T;++w)o[w]=+a(r[w],w,r)}return m.initialize=function(w,...T){c=w,f=T.find(E=>typeof E=="function")||Math.random,h=T.find(E=>[1,2,3].includes(E))||2,v()},m.links=function(w){return arguments.length?(r=w,v(),m):r},m.id=function(w){return arguments.length?(e=w,m):e},m.iterations=function(w){return arguments.length?(g=+w,m):g},m.strength=function(w){return arguments.length?(i=typeof w=="function"?w:ui(+w),_(),m):i},m.distance=function(w){return arguments.length?(a=typeof w=="function"?w:ui(+w),C(),m):a},m}const Jrt=1664525,tit=1013904223,UA=4294967296;function eit(){let r=1;return()=>(r=(Jrt*r+tit)%UA)/UA}var HA=3;function nx(r){return r.x}function GA(r){return r.y}function rit(r){return r.z}var iit=10,nit=Math.PI*(3-Math.sqrt(5)),ait=Math.PI*20/(9+Math.sqrt(221));function sit(r,e){e=e||2;var i=Math.min(HA,Math.max(1,Math.round(e))),n,a=1,o=.001,c=1-Math.pow(o,1/300),h=0,u=.6,d=new Map,f=R1(m),g=zd("tick","end"),b=eit();r==null&&(r=[]);function m(){v(),g.call("tick",n),a<o&&(f.stop(),g.call("end",n))}function v(w){var T,E=r.length,N;w===void 0&&(w=1);for(var O=0;O<w;++O)for(a+=(h-a)*c,d.forEach(function(B){B(a)}),T=0;T<E;++T)N=r[T],N.fx==null?N.x+=N.vx*=u:(N.x=N.fx,N.vx=0),i>1&&(N.fy==null?N.y+=N.vy*=u:(N.y=N.fy,N.vy=0)),i>2&&(N.fz==null?N.z+=N.vz*=u:(N.z=N.fz,N.vz=0));return n}function _(){for(var w=0,T=r.length,E;w<T;++w){if(E=r[w],E.index=w,E.fx!=null&&(E.x=E.fx),E.fy!=null&&(E.y=E.fy),E.fz!=null&&(E.z=E.fz),isNaN(E.x)||i>1&&isNaN(E.y)||i>2&&isNaN(E.z)){var N=iit*(i>2?Math.cbrt(.5+w):i>1?Math.sqrt(.5+w):w),O=w*nit,B=w*ait;i===1?E.x=N:i===2?(E.x=N*Math.cos(O),E.y=N*Math.sin(O)):(E.x=N*Math.sin(O)*Math.cos(B),E.y=N*Math.cos(O),E.z=N*Math.sin(O)*Math.sin(B))}(isNaN(E.vx)||i>1&&isNaN(E.vy)||i>2&&isNaN(E.vz))&&(E.vx=0,i>1&&(E.vy=0),i>2&&(E.vz=0))}}function C(w){return w.initialize&&w.initialize(r,b,i),w}return _(),n={tick:v,restart:function(){return f.restart(m),n},stop:function(){return f.stop(),n},numDimensions:function(w){return arguments.length?(i=Math.min(HA,Math.max(1,Math.round(w))),d.forEach(C),n):i},nodes:function(w){return arguments.length?(r=w,_(),d.forEach(C),n):r},alpha:function(w){return arguments.length?(a=+w,n):a},alphaMin:function(w){return arguments.length?(o=+w,n):o},alphaDecay:function(w){return arguments.length?(c=+w,n):+c},alphaTarget:function(w){return arguments.length?(h=+w,n):h},velocityDecay:function(w){return arguments.length?(u=1-w,n):1-u},randomSource:function(w){return arguments.length?(b=w,d.forEach(C),n):b},force:function(w,T){return arguments.length>1?(T==null?d.delete(w):d.set(w,C(T)),n):d.get(w)},find:function(){var w=Array.prototype.slice.call(arguments),T=w.shift()||0,E=(i>1?w.shift():null)||0,N=(i>2?w.shift():null)||0,O=w.shift()||1/0,B=0,A=r.length,L,P,j,$,X,W;for(O*=O,B=0;B<A;++B)X=r[B],L=T-X.x,P=E-(X.y||0),j=N-(X.z||0),$=L*L+P*P+j*j,$<O&&(W=X,O=$);return W},on:function(w,T){return arguments.length>1?(g.on(w,T),n):g.on(w)}}}function oit(){var r,e,i,n,a,o=ui(-30),c,h=1,u=1/0,d=.81;function f(v){var _,C=r.length,w=(e===1?R_(r,nx):e===2?j1(r,nx,GA):e===3?F_(r,nx,GA,rit):null).visitAfter(b);for(a=v,_=0;_<C;++_)i=r[_],w.visit(m)}function g(){if(r){var v,_=r.length,C;for(c=new Array(_),v=0;v<_;++v)C=r[v],c[C.index]=+o(C,v,r)}}function b(v){var _=0,C,w,T=0,E,N,O,B,A=v.length;if(A){for(E=N=O=B=0;B<A;++B)(C=v[B])&&(w=Math.abs(C.value))&&(_+=C.value,T+=w,E+=w*(C.x||0),N+=w*(C.y||0),O+=w*(C.z||0));_*=Math.sqrt(4/A),v.x=E/T,e>1&&(v.y=N/T),e>2&&(v.z=O/T)}else{C=v,C.x=C.data.x,e>1&&(C.y=C.data.y),e>2&&(C.z=C.data.z);do _+=c[C.data.index];while(C=C.next)}v.value=_}function m(v,_,C,w,T){if(!v.value)return!0;var E=[C,w,T][e-1],N=v.x-i.x,O=e>1?v.y-i.y:0,B=e>2?v.z-i.z:0,A=E-_,L=N*N+O*O+B*B;if(A*A/d<L)return L<u&&(N===0&&(N=ea(n),L+=N*N),e>1&&O===0&&(O=ea(n),L+=O*O),e>2&&B===0&&(B=ea(n),L+=B*B),L<h&&(L=Math.sqrt(h*L)),i.vx+=N*v.value*a/L,e>1&&(i.vy+=O*v.value*a/L),e>2&&(i.vz+=B*v.value*a/L)),!0;if(v.length||L>=u)return;(v.data!==i||v.next)&&(N===0&&(N=ea(n),L+=N*N),e>1&&O===0&&(O=ea(n),L+=O*O),e>2&&B===0&&(B=ea(n),L+=B*B),L<h&&(L=Math.sqrt(h*L)));do v.data!==i&&(A=c[v.data.index]*a/L,i.vx+=N*A,e>1&&(i.vy+=O*A),e>2&&(i.vz+=B*A));while(v=v.next)}return f.initialize=function(v,..._){r=v,n=_.find(C=>typeof C=="function")||Math.random,e=_.find(C=>[1,2,3].includes(C))||2,g()},f.strength=function(v){return arguments.length?(o=typeof v=="function"?v:ui(+v),g(),f):o},f.distanceMin=function(v){return arguments.length?(h=v*v,f):Math.sqrt(h)},f.distanceMax=function(v){return arguments.length?(u=v*v,f):Math.sqrt(u)},f.theta=function(v){return arguments.length?(d=v*v,f):Math.sqrt(d)},f}function lit(r,e,i,n){var a,o,c=ui(.1),h,u;typeof r!="function"&&(r=ui(+r)),e==null&&(e=0),i==null&&(i=0),n==null&&(n=0);function d(g){for(var b=0,m=a.length;b<m;++b){var v=a[b],_=v.x-e||1e-6,C=(v.y||0)-i||1e-6,w=(v.z||0)-n||1e-6,T=Math.sqrt(_*_+C*C+w*w),E=(u[b]-T)*h[b]*g/T;v.vx+=_*E,o>1&&(v.vy+=C*E),o>2&&(v.vz+=w*E)}}function f(){if(a){var g,b=a.length;for(h=new Array(b),u=new Array(b),g=0;g<b;++g)u[g]=+r(a[g],g,a),h[g]=isNaN(u[g])?0:+c(a[g],g,a)}}return d.initialize=function(g,...b){a=g,o=b.find(m=>[1,2,3].includes(m))||2,f()},d.strength=function(g){return arguments.length?(c=typeof g=="function"?g:ui(+g),f(),d):c},d.radius=function(g){return arguments.length?(r=typeof g=="function"?g:ui(+g),f(),d):r},d.x=function(g){return arguments.length?(e=+g,d):e},d.y=function(g){return arguments.length?(i=+g,d):i},d.z=function(g){return arguments.length?(n=+g,d):n},d}function cit(r){var e=ui(.1),i,n,a;typeof r!="function"&&(r=ui(r==null?0:+r));function o(h){for(var u=0,d=i.length,f;u<d;++u)f=i[u],f.vx+=(a[u]-f.x)*n[u]*h}function c(){if(i){var h,u=i.length;for(n=new Array(u),a=new Array(u),h=0;h<u;++h)n[h]=isNaN(a[h]=+r(i[h],h,i))?0:+e(i[h],h,i)}}return o.initialize=function(h){i=h,c()},o.strength=function(h){return arguments.length?(e=typeof h=="function"?h:ui(+h),c(),o):e},o.x=function(h){return arguments.length?(r=typeof h=="function"?h:ui(+h),c(),o):r},o}function hit(r){var e=ui(.1),i,n,a;typeof r!="function"&&(r=ui(r==null?0:+r));function o(h){for(var u=0,d=i.length,f;u<d;++u)f=i[u],f.vy+=(a[u]-f.y)*n[u]*h}function c(){if(i){var h,u=i.length;for(n=new Array(u),a=new Array(u),h=0;h<u;++h)n[h]=isNaN(a[h]=+r(i[h],h,i))?0:+e(i[h],h,i)}}return o.initialize=function(h){i=h,c()},o.strength=function(h){return arguments.length?(e=typeof h=="function"?h:ui(+h),c(),o):e},o.y=function(h){return arguments.length?(r=typeof h=="function"?h:ui(+h),c(),o):r},o}const{abs:Ru,cos:xs,sin:Mc,acos:uit,atan2:Du,sqrt:fo,pow:Qn}=Math;function Fu(r){return r<0?-Qn(-r,1/3):Qn(r,1/3)}const kD=Math.PI,Bp=2*kD,po=kD/2,dit=1e-6,ax=Number.MAX_SAFE_INTEGER||9007199254740991,sx=Number.MIN_SAFE_INTEGER||-9007199254740991,fit={x:0,y:0,z:0},Lt={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(r,e){const i=e(r);let n=i.x*i.x+i.y*i.y;return typeof i.z<"u"&&(n+=i.z*i.z),fo(n)},compute:function(r,e,i){if(r===0)return e[0].t=0,e[0];const n=e.length-1;if(r===1)return e[n].t=1,e[n];const a=1-r;let o=e;if(n===0)return e[0].t=r,e[0];if(n===1){const h={x:a*o[0].x+r*o[1].x,y:a*o[0].y+r*o[1].y,t:r};return i&&(h.z=a*o[0].z+r*o[1].z),h}if(n<4){let h=a*a,u=r*r,d,f,g,b=0;n===2?(o=[o[0],o[1],o[2],fit],d=h,f=a*r*2,g=u):n===3&&(d=h*a,f=h*r*3,g=a*u*3,b=r*u);const m={x:d*o[0].x+f*o[1].x+g*o[2].x+b*o[3].x,y:d*o[0].y+f*o[1].y+g*o[2].y+b*o[3].y,t:r};return i&&(m.z=d*o[0].z+f*o[1].z+g*o[2].z+b*o[3].z),m}const c=JSON.parse(JSON.stringify(e));for(;c.length>1;){for(let h=0;h<c.length-1;h++)c[h]={x:c[h].x+(c[h+1].x-c[h].x)*r,y:c[h].y+(c[h+1].y-c[h].y)*r},typeof c[h].z<"u"&&(c[h].z=c[h].z+(c[h+1].z-c[h].z)*r);c.splice(c.length-1,1)}return c[0].t=r,c[0]},computeWithRatios:function(r,e,i,n){const a=1-r,o=i,c=e;let h=o[0],u=o[1],d=o[2],f=o[3],g;if(h*=a,u*=r,c.length===2)return g=h+u,{x:(h*c[0].x+u*c[1].x)/g,y:(h*c[0].y+u*c[1].y)/g,z:n?(h*c[0].z+u*c[1].z)/g:!1,t:r};if(h*=a,u*=2*a,d*=r*r,c.length===3)return g=h+u+d,{x:(h*c[0].x+u*c[1].x+d*c[2].x)/g,y:(h*c[0].y+u*c[1].y+d*c[2].y)/g,z:n?(h*c[0].z+u*c[1].z+d*c[2].z)/g:!1,t:r};if(h*=a,u*=1.5*a,d*=3*a,f*=r*r*r,c.length===4)return g=h+u+d+f,{x:(h*c[0].x+u*c[1].x+d*c[2].x+f*c[3].x)/g,y:(h*c[0].y+u*c[1].y+d*c[2].y+f*c[3].y)/g,z:n?(h*c[0].z+u*c[1].z+d*c[2].z+f*c[3].z)/g:!1,t:r}},derive:function(r,e){const i=[];for(let n=r,a=n.length,o=a-1;a>1;a--,o--){const c=[];for(let h=0,u;h<o;h++)u={x:o*(n[h+1].x-n[h].x),y:o*(n[h+1].y-n[h].y)},e&&(u.z=o*(n[h+1].z-n[h].z)),c.push(u);i.push(c),n=c}return i},between:function(r,e,i){return e<=r&&r<=i||Lt.approximately(r,e)||Lt.approximately(r,i)},approximately:function(r,e,i){return Ru(r-e)<=(i||dit)},length:function(r){const i=Lt.Tvalues.length;let n=0;for(let a=0,o;a<i;a++)o=.5*Lt.Tvalues[a]+.5,n+=Lt.Cvalues[a]*Lt.arcfn(o,r);return .5*n},map:function(r,e,i,n,a){const o=i-e,c=a-n,h=r-e,u=h/o;return n+c*u},lerp:function(r,e,i){const n={x:e.x+r*(i.x-e.x),y:e.y+r*(i.y-e.y)};return e.z!==void 0&&i.z!==void 0&&(n.z=e.z+r*(i.z-e.z)),n},pointToString:function(r){let e=r.x+"/"+r.y;return typeof r.z<"u"&&(e+="/"+r.z),e},pointsToString:function(r){return"["+r.map(Lt.pointToString).join(", ")+"]"},copy:function(r){return JSON.parse(JSON.stringify(r))},angle:function(r,e,i){const n=e.x-r.x,a=e.y-r.y,o=i.x-r.x,c=i.y-r.y,h=n*c-a*o,u=n*o+a*c;return Du(h,u)},round:function(r,e){const i=""+r,n=i.indexOf(".");return parseFloat(i.substring(0,n+1+e))},dist:function(r,e){const i=r.x-e.x,n=r.y-e.y;return fo(i*i+n*n)},closest:function(r,e){let i=Qn(2,63),n,a;return r.forEach(function(o,c){a=Lt.dist(e,o),a<i&&(i=a,n=c)}),{mdist:i,mpos:n}},abcratio:function(r,e){if(e!==2&&e!==3)return!1;if(typeof r>"u")r=.5;else if(r===0||r===1)return r;const i=Qn(r,e)+Qn(1-r,e),n=i-1;return Ru(n/i)},projectionratio:function(r,e){if(e!==2&&e!==3)return!1;if(typeof r>"u")r=.5;else if(r===0||r===1)return r;const i=Qn(1-r,e),n=Qn(r,e)+i;return i/n},lli8:function(r,e,i,n,a,o,c,h){const u=(r*n-e*i)*(a-c)-(r-i)*(a*h-o*c),d=(r*n-e*i)*(o-h)-(e-n)*(a*h-o*c),f=(r-i)*(o-h)-(e-n)*(a-c);return f==0?!1:{x:u/f,y:d/f}},lli4:function(r,e,i,n){const a=r.x,o=r.y,c=e.x,h=e.y,u=i.x,d=i.y,f=n.x,g=n.y;return Lt.lli8(a,o,c,h,u,d,f,g)},lli:function(r,e){return Lt.lli4(r,r.c,e,e.c)},makeline:function(r,e){return new vr(r.x,r.y,(r.x+e.x)/2,(r.y+e.y)/2,e.x,e.y)},findbbox:function(r){let e=ax,i=ax,n=sx,a=sx;return r.forEach(function(o){const c=o.bbox();e>c.x.min&&(e=c.x.min),i>c.y.min&&(i=c.y.min),n<c.x.max&&(n=c.x.max),a<c.y.max&&(a=c.y.max)}),{x:{min:e,mid:(e+n)/2,max:n,size:n-e},y:{min:i,mid:(i+a)/2,max:a,size:a-i}}},shapeintersections:function(r,e,i,n,a){if(!Lt.bboxoverlap(e,n))return[];const o=[],c=[r.startcap,r.forward,r.back,r.endcap],h=[i.startcap,i.forward,i.back,i.endcap];return c.forEach(function(u){u.virtual||h.forEach(function(d){if(d.virtual)return;const f=u.intersects(d,a);f.length>0&&(f.c1=u,f.c2=d,f.s1=r,f.s2=i,o.push(f))})}),o},makeshape:function(r,e,i){const n=e.points.length,a=r.points.length,o=Lt.makeline(e.points[n-1],r.points[0]),c=Lt.makeline(r.points[a-1],e.points[0]),h={startcap:o,forward:r,back:e,endcap:c,bbox:Lt.findbbox([o,r,e,c])};return h.intersections=function(u){return Lt.shapeintersections(h,h.bbox,u,u.bbox,i)},h},getminmax:function(r,e,i){if(!i)return{min:0,max:0};let n=ax,a=sx,o,c;i.indexOf(0)===-1&&(i=[0].concat(i)),i.indexOf(1)===-1&&i.push(1);for(let h=0,u=i.length;h<u;h++)o=i[h],c=r.get(o),c[e]<n&&(n=c[e]),c[e]>a&&(a=c[e]);return{min:n,mid:(n+a)/2,max:a,size:a-n}},align:function(r,e){const i=e.p1.x,n=e.p1.y,a=-Du(e.p2.y-n,e.p2.x-i),o=function(c){return{x:(c.x-i)*xs(a)-(c.y-n)*Mc(a),y:(c.x-i)*Mc(a)+(c.y-n)*xs(a)}};return r.map(o)},roots:function(r,e){e=e||{p1:{x:0,y:0},p2:{x:1,y:0}};const i=r.length-1,n=Lt.align(r,e),a=function(A){return 0<=A&&A<=1};if(i===2){const A=n[0].y,L=n[1].y,P=n[2].y,j=A-2*L+P;if(j!==0){const $=-fo(L*L-A*P),X=-A+L,W=-($+X)/j,F=-(-$+X)/j;return[W,F].filter(a)}else if(L!==P&&j===0)return[(2*L-P)/(2*L-2*P)].filter(a);return[]}const o=n[0].y,c=n[1].y,h=n[2].y,u=n[3].y;let d=-o+3*c-3*h+u,f=3*o-6*c+3*h,g=-3*o+3*c,b=o;if(Lt.approximately(d,0)){if(Lt.approximately(f,0))return Lt.approximately(g,0)?[]:[-b/g].filter(a);const A=fo(g*g-4*f*b),L=2*f;return[(A-g)/L,(-g-A)/L].filter(a)}f/=d,g/=d,b/=d;const m=(3*g-f*f)/3,v=m/3,_=(2*f*f*f-9*f*g+27*b)/27,C=_/2,w=C*C+v*v*v;let T,E,N,O,B;if(w<0){const A=-m/3,L=A*A*A,P=fo(L),j=-_/(2*P),$=j<-1?-1:j>1?1:j,X=uit($),W=Fu(P),F=2*W;return N=F*xs(X/3)-f/3,O=F*xs((X+Bp)/3)-f/3,B=F*xs((X+2*Bp)/3)-f/3,[N,O,B].filter(a)}else{if(w===0)return T=C<0?Fu(-C):-Fu(C),N=2*T-f/3,O=-T-f/3,[N,O].filter(a);{const A=fo(w);return T=Fu(-C+A),E=Fu(C+A),[T-E-f/3].filter(a)}}},droots:function(r){if(r.length===3){const e=r[0],i=r[1],n=r[2],a=e-2*i+n;if(a!==0){const o=-fo(i*i-e*n),c=-e+i,h=-(o+c)/a,u=-(-o+c)/a;return[h,u]}else if(i!==n&&a===0)return[(2*i-n)/(2*(i-n))];return[]}if(r.length===2){const e=r[0],i=r[1];return e!==i?[e/(e-i)]:[]}return[]},curvature:function(r,e,i,n,a){let o,c,h,u,d=0,f=0;const g=Lt.compute(r,e),b=Lt.compute(r,i),m=g.x*g.x+g.y*g.y;if(n?(o=fo(Qn(g.y*b.z-b.y*g.z,2)+Qn(g.z*b.x-b.z*g.x,2)+Qn(g.x*b.y-b.x*g.y,2)),c=Qn(m+g.z*g.z,3/2)):(o=g.x*b.y-g.y*b.x,c=Qn(m,3/2)),o===0||c===0)return{k:0,r:0};if(d=o/c,f=c/o,!a){const v=Lt.curvature(r-.001,e,i,n,!0).k,_=Lt.curvature(r+.001,e,i,n,!0).k;u=(_-d+(d-v))/2,h=(Ru(_-d)+Ru(d-v))/2}return{k:d,r:f,dk:u,adk:h}},inflections:function(r){if(r.length<4)return[];const e=Lt.align(r,{p1:r[0],p2:r.slice(-1)[0]}),i=e[2].x*e[1].y,n=e[3].x*e[1].y,a=e[1].x*e[2].y,o=e[3].x*e[2].y,c=18*(-3*i+2*n+3*a-o),h=18*(3*i-n-3*a),u=18*(a-i);if(Lt.approximately(c,0)){if(!Lt.approximately(h,0)){let b=-u/h;if(0<=b&&b<=1)return[b]}return[]}const d=2*c;if(Lt.approximately(d,0))return[];const f=h*h-4*c*u;if(f<0)return[];const g=Math.sqrt(f);return[(g-h)/d,-(h+g)/d].filter(function(b){return 0<=b&&b<=1})},bboxoverlap:function(r,e){const i=["x","y"],n=i.length;for(let a=0,o,c,h,u;a<n;a++)if(o=i[a],c=r[o].mid,h=e[o].mid,u=(r[o].size+e[o].size)/2,Ru(c-h)>=u)return!1;return!0},expandbox:function(r,e){e.x.min<r.x.min&&(r.x.min=e.x.min),e.y.min<r.y.min&&(r.y.min=e.y.min),e.z&&e.z.min<r.z.min&&(r.z.min=e.z.min),e.x.max>r.x.max&&(r.x.max=e.x.max),e.y.max>r.y.max&&(r.y.max=e.y.max),e.z&&e.z.max>r.z.max&&(r.z.max=e.z.max),r.x.mid=(r.x.min+r.x.max)/2,r.y.mid=(r.y.min+r.y.max)/2,r.z&&(r.z.mid=(r.z.min+r.z.max)/2),r.x.size=r.x.max-r.x.min,r.y.size=r.y.max-r.y.min,r.z&&(r.z.size=r.z.max-r.z.min)},pairiteration:function(r,e,i){const n=r.bbox(),a=e.bbox(),o=1e5,c=i||.5;if(n.x.size+n.y.size<c&&a.x.size+a.y.size<c)return[(o*(r._t1+r._t2)/2|0)/o+"/"+(o*(e._t1+e._t2)/2|0)/o];let h=r.split(.5),u=e.split(.5),d=[{left:h.left,right:u.left},{left:h.left,right:u.right},{left:h.right,right:u.right},{left:h.right,right:u.left}];d=d.filter(function(g){return Lt.bboxoverlap(g.left.bbox(),g.right.bbox())});let f=[];return d.length===0||(d.forEach(function(g){f=f.concat(Lt.pairiteration(g.left,g.right,c))}),f=f.filter(function(g,b){return f.indexOf(g)===b})),f},getccenter:function(r,e,i){const n=e.x-r.x,a=e.y-r.y,o=i.x-e.x,c=i.y-e.y,h=n*xs(po)-a*Mc(po),u=n*Mc(po)+a*xs(po),d=o*xs(po)-c*Mc(po),f=o*Mc(po)+c*xs(po),g=(r.x+e.x)/2,b=(r.y+e.y)/2,m=(e.x+i.x)/2,v=(e.y+i.y)/2,_=g+h,C=b+u,w=m+d,T=v+f,E=Lt.lli8(g,b,_,C,m,v,w,T),N=Lt.dist(E,r);let O=Du(r.y-E.y,r.x-E.x),B=Du(e.y-E.y,e.x-E.x),A=Du(i.y-E.y,i.x-E.x),L;return O<A?((O>B||B>A)&&(O+=Bp),O>A&&(L=A,A=O,O=L)):A<B&&B<O?(L=A,A=O,O=L):A+=Bp,E.s=O,E.e=A,E.r=N,E},numberSort:function(r,e){return r-e}};class ud{constructor(e){this.curves=[],this._3d=!1,e&&(this.curves=e,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(e){return Lt.pointsToString(e.points)}).join(", ")+"]"}addCurve(e){this.curves.push(e),this._3d=this._3d||e._3d}length(){return this.curves.map(function(e){return e.length()}).reduce(function(e,i){return e+i})}curve(e){return this.curves[e]}bbox(){const e=this.curves;for(var i=e[0].bbox(),n=1;n<e.length;n++)Lt.expandbox(i,e[n].bbox());return i}offset(e){const i=[];return this.curves.forEach(function(n){i.push(...n.offset(e))}),new ud(i)}}const{abs:ju,min:WA,max:YA,cos:pit,sin:git,acos:mit,sqrt:Iu}=Math,yit=Math.PI;class vr{constructor(e){let i=e&&e.forEach?e:Array.from(arguments).slice(),n=!1;if(typeof i[0]=="object"){n=i.length;const m=[];i.forEach(function(v){["x","y","z"].forEach(function(_){typeof v[_]<"u"&&m.push(v[_])})}),i=m}let a=!1;const o=i.length;if(n){if(n>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");a=!0}}else if(o!==6&&o!==8&&o!==9&&o!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const c=this._3d=!a&&(o===9||o===12)||e&&e[0]&&typeof e[0].z<"u",h=this.points=[];for(let m=0,v=c?3:2;m<o;m+=v){var u={x:i[m],y:i[m+1]};c&&(u.z=i[m+2]),h.push(u)}const d=this.order=h.length-1,f=this.dims=["x","y"];c&&f.push("z"),this.dimlen=f.length;const g=Lt.align(h,{p1:h[0],p2:h[d]}),b=Lt.dist(h[0],h[d]);this._linear=g.reduce((m,v)=>m+ju(v.y),0)<b/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(e,i,n,a){if(typeof a>"u"&&(a=.5),a===0)return new vr(i,i,n);if(a===1)return new vr(e,i,i);const o=vr.getABC(2,e,i,n,a);return new vr(e,o.A,n)}static cubicFromPoints(e,i,n,a,o){typeof a>"u"&&(a=.5);const c=vr.getABC(3,e,i,n,a);typeof o>"u"&&(o=Lt.dist(i,c.C));const h=o*(1-a)/a,u=Lt.dist(e,n),d=(n.x-e.x)/u,f=(n.y-e.y)/u,g=o*d,b=o*f,m=h*d,v=h*f,_={x:i.x-g,y:i.y-b},C={x:i.x+m,y:i.y+v},w=c.A,T={x:w.x+(_.x-w.x)/(1-a),y:w.y+(_.y-w.y)/(1-a)},E={x:w.x+(C.x-w.x)/a,y:w.y+(C.y-w.y)/a},N={x:e.x+(T.x-e.x)/a,y:e.y+(T.y-e.y)/a},O={x:n.x+(E.x-n.x)/(1-a),y:n.y+(E.y-n.y)/(1-a)};return new vr(e,N,O,n)}static getUtils(){return Lt}getUtils(){return vr.getUtils()}static get PolyBezier(){return ud}valueOf(){return this.toString()}toString(){return Lt.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const e=this.points,i=e[0].x,n=e[0].y,a=["M",i,n,this.order===2?"Q":"C"];for(let o=1,c=e.length;o<c;o++)a.push(e[o].x),a.push(e[o].y);return a.join(" ")}setRatios(e){if(e.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=e,this._lut=[]}verify(){const e=this.coordDigest();e!==this._print&&(this._print=e,this.update())}coordDigest(){return this.points.map(function(e,i){return""+i+e.x+e.y+(e.z?e.z:0)}).join("")}update(){this._lut=[],this.dpoints=Lt.derive(this.points,this._3d),this.computedirection()}computedirection(){const e=this.points,i=Lt.angle(e[0],e[this.order],e[1]);this.clockwise=i>0}length(){return Lt.length(this.derivative.bind(this))}static getABC(e=2,i,n,a,o=.5){const c=Lt.projectionratio(o,e),h=1-c,u={x:c*i.x+h*a.x,y:c*i.y+h*a.y},d=Lt.abcratio(o,e);return{A:{x:n.x+(n.x-u.x)/d,y:n.y+(n.y-u.y)/d},B:n,C:u,S:i,E:a}}getABC(e,i){i=i||this.get(e);let n=this.points[0],a=this.points[this.order];return vr.getABC(this.order,n,i,a,e)}getLUT(e){if(this.verify(),e=e||100,this._lut.length===e+1)return this._lut;this._lut=[],e++,this._lut=[];for(let i=0,n,a;i<e;i++)a=i/(e-1),n=this.compute(a),n.t=a,this._lut.push(n);return this._lut}on(e,i){i=i||5;const n=this.getLUT(),a=[];for(let o=0,c,h=0;o<n.length;o++)c=n[o],Lt.dist(c,e)<i&&(a.push(c),h+=o/n.length);return a.length?t/=a.length:!1}project(e){const i=this.getLUT(),n=i.length-1,a=Lt.closest(i,e),o=a.mpos,c=(o-1)/n,h=(o+1)/n,u=.1/n;let d=a.mdist,f=c,g=f,b;d+=1;for(let m;f<h+u;f+=u)b=this.compute(f),m=Lt.dist(e,b),m<d&&(d=m,g=f);return g=g<0?0:g>1?1:g,b=this.compute(g),b.t=g,b.d=d,b}get(e){return this.compute(e)}point(e){return this.points[e]}compute(e){return this.ratios?Lt.computeWithRatios(e,this.points,this.ratios,this._3d):Lt.compute(e,this.points,this._3d,this.ratios)}raise(){const e=this.points,i=[e[0]],n=e.length;for(let a=1,o,c;a<n;a++)o=e[a],c=e[a-1],i[a]={x:(n-a)/n*o.x+a/n*c.x,y:(n-a)/n*o.y+a/n*c.y};return i[n]=e[n-1],new vr(i)}derivative(e){return Lt.compute(e,this.dpoints[0],this._3d)}dderivative(e){return Lt.compute(e,this.dpoints[1],this._3d)}align(){let e=this.points;return new vr(Lt.align(e,{p1:e[0],p2:e[e.length-1]}))}curvature(e){return Lt.curvature(e,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return Lt.inflections(this.points)}normal(e){return this._3d?this.__normal3(e):this.__normal2(e)}__normal2(e){const i=this.derivative(e),n=Iu(i.x*i.x+i.y*i.y);return{t:e,x:-i.y/n,y:i.x/n}}__normal3(e){const i=this.derivative(e),n=this.derivative(e+.01),a=Iu(i.x*i.x+i.y*i.y+i.z*i.z),o=Iu(n.x*n.x+n.y*n.y+n.z*n.z);i.x/=a,i.y/=a,i.z/=a,n.x/=o,n.y/=o,n.z/=o;const c={x:n.y*i.z-n.z*i.y,y:n.z*i.x-n.x*i.z,z:n.x*i.y-n.y*i.x},h=Iu(c.x*c.x+c.y*c.y+c.z*c.z);c.x/=h,c.y/=h,c.z/=h;const u=[c.x*c.x,c.x*c.y-c.z,c.x*c.z+c.y,c.x*c.y+c.z,c.y*c.y,c.y*c.z-c.x,c.x*c.z-c.y,c.y*c.z+c.x,c.z*c.z];return{t:e,x:u[0]*i.x+u[1]*i.y+u[2]*i.z,y:u[3]*i.x+u[4]*i.y+u[5]*i.z,z:u[6]*i.x+u[7]*i.y+u[8]*i.z}}hull(e){let i=this.points,n=[],a=[],o=0;for(a[o++]=i[0],a[o++]=i[1],a[o++]=i[2],this.order===3&&(a[o++]=i[3]);i.length>1;){n=[];for(let c=0,h,u=i.length-1;c<u;c++)h=Lt.lerp(e,i[c],i[c+1]),a[o++]=h,n.push(h);i=n}return a}split(e,i){if(e===0&&i)return this.split(i).left;if(i===1)return this.split(e).right;const n=this.hull(e),a={left:this.order===2?new vr([n[0],n[3],n[5]]):new vr([n[0],n[4],n[7],n[9]]),right:this.order===2?new vr([n[5],n[4],n[2]]):new vr([n[9],n[8],n[6],n[3]]),span:n};return a.left._t1=Lt.map(0,0,1,this._t1,this._t2),a.left._t2=Lt.map(e,0,1,this._t1,this._t2),a.right._t1=Lt.map(e,0,1,this._t1,this._t2),a.right._t2=Lt.map(1,0,1,this._t1,this._t2),i?(i=Lt.map(i,e,1,0,1),a.right.split(i).left):a}extrema(){const e={};let i=[];return this.dims.forEach((function(n){let a=function(c){return c[n]},o=this.dpoints[0].map(a);e[n]=Lt.droots(o),this.order===3&&(o=this.dpoints[1].map(a),e[n]=e[n].concat(Lt.droots(o))),e[n]=e[n].filter(function(c){return c>=0&&c<=1}),i=i.concat(e[n].sort(Lt.numberSort))}).bind(this)),e.values=i.sort(Lt.numberSort).filter(function(n,a){return i.indexOf(n)===a}),e}bbox(){const e=this.extrema(),i={};return this.dims.forEach((function(n){i[n]=Lt.getminmax(this,n,e[n])}).bind(this)),i}overlaps(e){const i=this.bbox(),n=e.bbox();return Lt.bboxoverlap(i,n)}offset(e,i){if(typeof i<"u"){const n=this.get(e),a=this.normal(e),o={c:n,n:a,x:n.x+a.x*i,y:n.y+a.y*i};return this._3d&&(o.z=n.z+a.z*i),o}if(this._linear){const n=this.normal(0),a=this.points.map(function(o){const c={x:o.x+e*n.x,y:o.y+e*n.y};return o.z&&n.z&&(c.z=o.z+e*n.z),c});return[new vr(a)]}return this.reduce().map(function(n){return n._linear?n.offset(e)[0]:n.scale(e)})}simple(){if(this.order===3){const a=Lt.angle(this.points[0],this.points[3],this.points[1]),o=Lt.angle(this.points[0],this.points[3],this.points[2]);if(a>0&&o<0||a<0&&o>0)return!1}const e=this.normal(0),i=this.normal(1);let n=e.x*i.x+e.y*i.y;return this._3d&&(n+=e.z*i.z),ju(mit(n))<yit/3}reduce(){let e,i=0,n=0,a=.01,o,c=[],h=[],u=this.extrema().values;for(u.indexOf(0)===-1&&(u=[0].concat(u)),u.indexOf(1)===-1&&u.push(1),i=u[0],e=1;e<u.length;e++)n=u[e],o=this.split(i,n),o._t1=i,o._t2=n,c.push(o),i=n;return c.forEach(function(d){for(i=0,n=0;n<=1;)for(n=i+a;n<=1+a;n+=a)if(o=d.split(i,n),!o.simple()){if(n-=a,ju(i-n)<a)return[];o=d.split(i,n),o._t1=Lt.map(i,0,1,d._t1,d._t2),o._t2=Lt.map(n,0,1,d._t1,d._t2),h.push(o),i=n;break}i<1&&(o=d.split(i,1),o._t1=Lt.map(i,0,1,d._t1,d._t2),o._t2=d._t2,h.push(o))}),h}translate(e,i,n){n=typeof n=="number"?n:i;const a=this.order;let o=this.points.map((c,h)=>(1-h/a)*i+h/a*n);return new vr(this.points.map((c,h)=>({x:c.x+e.x*o[h],y:c.y+e.y*o[h]})))}scale(e){const i=this.order;let n=!1;if(typeof e=="function"&&(n=e),n&&i===2)return this.raise().scale(n);const a=this.clockwise,o=this.points;if(this._linear)return this.translate(this.normal(0),n?n(0):e,n?n(1):e);const c=n?n(0):e,h=n?n(1):e,u=[this.offset(0,10),this.offset(1,10)],d=[],f=Lt.lli4(u[0],u[0].c,u[1],u[1].c);if(!f)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(g){const b=d[g*i]=Lt.copy(o[g*i]);b.x+=(g?h:c)*u[g].n.x,b.y+=(g?h:c)*u[g].n.y}),n?([0,1].forEach(function(g){if(!(i===2&&g)){var b=o[g+1],m={x:b.x-f.x,y:b.y-f.y},v=n?n((g+1)/i):e;n&&!a&&(v=-v);var _=Iu(m.x*m.x+m.y*m.y);m.x/=_,m.y/=_,d[g+1]={x:b.x+v*m.x,y:b.y+v*m.y}}}),new vr(d)):([0,1].forEach(g=>{if(i===2&&g)return;const b=d[g*i],m=this.derivative(g),v={x:b.x+m.x,y:b.y+m.y};d[g+1]=Lt.lli4(b,v,f,o[g+1])}),new vr(d))}outline(e,i,n,a){if(i=i===void 0?e:i,this._linear){const O=this.normal(0),B=this.points[0],A=this.points[this.points.length-1];let L,P,j;n===void 0&&(n=e,a=i),L={x:B.x+O.x*e,y:B.y+O.y*e},j={x:A.x+O.x*n,y:A.y+O.y*n},P={x:(L.x+j.x)/2,y:(L.y+j.y)/2};const $=[L,P,j];L={x:B.x-O.x*i,y:B.y-O.y*i},j={x:A.x-O.x*a,y:A.y-O.y*a},P={x:(L.x+j.x)/2,y:(L.y+j.y)/2};const X=[j,P,L],W=Lt.makeline(X[2],$[0]),F=Lt.makeline($[2],X[0]),U=[W,new vr($),F,new vr(X)];return new ud(U)}const o=this.reduce(),c=o.length,h=[];let u=[],d,f=0,g=this.length();const b=typeof n<"u"&&typeof a<"u";function m(O,B,A,L,P){return function(j){const $=L/A,X=(L+P)/A,W=B-O;return Lt.map(j,0,1,O+$*W,O+X*W)}}o.forEach(function(O){const B=O.length();b?(h.push(O.scale(m(e,n,g,f,B))),u.push(O.scale(m(-i,-a,g,f,B)))):(h.push(O.scale(e)),u.push(O.scale(-i))),f+=B}),u=u.map(function(O){return d=O.points,d[3]?O.points=[d[3],d[2],d[1],d[0]]:O.points=[d[2],d[1],d[0]],O}).reverse();const v=h[0].points[0],_=h[c-1].points[h[c-1].points.length-1],C=u[c-1].points[u[c-1].points.length-1],w=u[0].points[0],T=Lt.makeline(C,v),E=Lt.makeline(_,w),N=[T].concat(h).concat([E]).concat(u);return new ud(N)}outlineshapes(e,i,n){i=i||e;const a=this.outline(e,i).curves,o=[];for(let c=1,h=a.length;c<h/2;c++){const u=Lt.makeshape(a[c],a[h-c],n);u.startcap.virtual=c>1,u.endcap.virtual=c<h/2-1,o.push(u)}return o}intersects(e,i){return e?e.p1&&e.p2?this.lineIntersects(e):(e instanceof vr&&(e=e.reduce()),this.curveintersects(this.reduce(),e,i)):this.selfintersects(i)}lineIntersects(e){const i=WA(e.p1.x,e.p2.x),n=WA(e.p1.y,e.p2.y),a=YA(e.p1.x,e.p2.x),o=YA(e.p1.y,e.p2.y);return Lt.roots(this.points,e).filter(c=>{var h=this.get(c);return Lt.between(h.x,i,a)&&Lt.between(h.y,n,o)})}selfintersects(e){const i=this.reduce(),n=i.length-2,a=[];for(let o=0,c,h,u;o<n;o++)h=i.slice(o,o+1),u=i.slice(o+2),c=this.curveintersects(h,u,e),a.push(...c);return a}curveintersects(e,i,n){const a=[];e.forEach(function(c){i.forEach(function(h){c.overlaps(h)&&a.push({left:c,right:h})})});let o=[];return a.forEach(function(c){const h=Lt.pairiteration(c.left,c.right,n);h.length>0&&(o=o.concat(h))}),o}arcs(e){return e=e||.5,this._iterate(e,[])}_error(e,i,n,a){const o=(a-n)/4,c=this.get(n+o),h=this.get(a-o),u=Lt.dist(e,i),d=Lt.dist(e,c),f=Lt.dist(e,h);return ju(d-u)+ju(f-u)}_iterate(e,i){let n=0,a=1,o;do{o=0,a=1;let c=this.get(n),h,u,d,f,g=!1,b=!1,m,v=a,_=1;do if(b=g,f=d,v=(n+a)/2,h=this.get(v),u=this.get(a),d=Lt.getccenter(c,h,u),d.interval={start:n,end:a},g=this._error(d,c,n,a)<=e,m=b&&!g,m||(_=a),g){if(a>=1){if(d.interval.end=_=1,f=d,a>1){let w={x:d.x+d.r*pit(d.e),y:d.y+d.r*git(d.e)};d.e+=Lt.angle({x:d.x,y:d.y},w,this.get(1))}break}a=a+(a-n)/2}else a=v;while(!m&&o++<100);if(o>=100)break;f=f||d,i.push(f),n=_}while(a<1);return i}}function Jv(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function bit(r){if(Array.isArray(r))return r}function xit(r){if(Array.isArray(r))return Jv(r)}function vit(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function _it(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e!==0)for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function Cit(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
451
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kit(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
452
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wit(r,e){if(r==null)return{};var i,n,a=Sit(r,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(n=0;n<o.length;n++)i=o[n],e.includes(i)||{}.propertyIsEnumerable.call(r,i)&&(a[i]=r[i])}return a}function Sit(r,e){if(r==null)return{};var i={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.includes(n))continue;i[n]=r[n]}return i}function Tit(r,e){return bit(r)||_it(r,e)||wD(r,e)||Cit()}function Eit(r){return xit(r)||vit(r)||wD(r)||kit()}function Ait(r,e){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function Nit(r){var e=Ait(r,"string");return typeof e=="symbol"?e:e+""}function wD(r,e){if(r){if(typeof r=="string")return Jv(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Jv(r,e):void 0}}var Mit=(function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=(e instanceof Array?e.length?e:[void 0]:[e]).map(function(h){return{keyAccessor:h,isProp:!(h instanceof Function)}}),o=r.reduce(function(h,u){var d=h,f=u;return a.forEach(function(g,b){var m=g.keyAccessor,v=g.isProp,_;if(v){var C=f,w=C[m],T=wit(C,[m].map(Nit));_=w,f=T}else _=m(f,b);b+1<a.length?(d.hasOwnProperty(_)||(d[_]={}),d=d[_]):i?(d.hasOwnProperty(_)||(d[_]=[]),d[_].push(f)):d[_]=f}),h},{});i instanceof Function&&(function h(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;d===a.length?Object.keys(u).forEach(function(f){return u[f]=i(u[f])}):Object.values(u).forEach(function(f){return h(f,d+1)})})(o);var c=o;return n&&(c=[],(function h(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];d.length===a.length?c.push({keys:d,vals:u}):Object.entries(u).forEach(function(f){var g=Tit(f,2),b=g[0],m=g[1];return h(m,[].concat(Eit(d),[b]))})})(o),e instanceof Array&&e.length===0&&c.length===1&&(c[0].keys=[])),c});function Bit(r,e){e===void 0&&(e={});var i=e.insertAt;if(!(typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",i==="top"&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(document.createTextNode(r))}}var Lit=`.force-graph-container canvas {
453
+ display: block;
454
+ user-select: none;
455
+ outline: none;
456
+ -webkit-tap-highlight-color: transparent;
457
+ }
458
+
459
+ .force-graph-container .clickable {
460
+ cursor: pointer;
461
+ }
462
+
463
+ .force-graph-container .grabbable {
464
+ cursor: move;
465
+ cursor: grab;
466
+ cursor: -moz-grab;
467
+ cursor: -webkit-grab;
468
+ }
469
+
470
+ .force-graph-container .grabbable:active {
471
+ cursor: grabbing;
472
+ cursor: -moz-grabbing;
473
+ cursor: -webkit-grabbing;
474
+ }
475
+ `;Bit(Lit);function t1(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function Oit(r){if(Array.isArray(r))return r}function Rit(r){if(Array.isArray(r))return t1(r)}function VA(r,e,i){if(SD())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var a=new(r.bind.apply(r,n));return a}function Nd(r,e,i){return(e=zit(e))in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i,r}function SD(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SD=function(){return!!r})()}function Dit(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Fit(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,a,o,c,h=[],u=!0,d=!1;try{if(o=(i=i.call(r)).next,e!==0)for(;!(u=(n=o.call(i)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(f){d=!0,a=f}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw a}}return h}}function jit(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
476
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Iit(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
477
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KA(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),i.push.apply(i,n)}return i}function Bc(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?KA(Object(i),!0).forEach(function(n){Nd(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):KA(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}function dd(r,e){return Oit(r)||Fit(r,e)||TD(r,e)||jit()}function ra(r){return Rit(r)||Dit(r)||TD(r)||Iit()}function $it(r,e){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function zit(r){var e=$it(r,"string");return typeof e=="symbol"?e:e+""}function e1(r){"@babel/helpers - typeof";return e1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e1(r)}function TD(r,e){if(r){if(typeof r=="string")return t1(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?t1(r,e):void 0}}var Pit=aB(Bq);function XA(r,e,i){!e||typeof i!="string"||r.filter(function(n){return!n[i]}).forEach(function(n){n[i]=Pit(e(n))})}function qit(r,e){var i=r.nodes,n=r.links,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=a.nodeFilter,c=o===void 0?function(){return!0}:o,h=a.onLoopError,u=h===void 0?function(m){throw"Invalid DAG structure! Found cycle in node path: ".concat(m.join(" -> "),".")}:h,d={};i.forEach(function(m){return d[e(m)]={data:m,out:[],depth:-1,skip:!c(m)}}),n.forEach(function(m){var v=m.source,_=m.target,C=N(v),w=N(_);if(!d.hasOwnProperty(C))throw"Missing source node with id: ".concat(C);if(!d.hasOwnProperty(w))throw"Missing target node with id: ".concat(w);var T=d[C],E=d[w];T.out.push(E);function N(O){return e1(O)==="object"?e(O):O}});var f=[];b(Object.values(d));var g=Object.assign.apply(Object,[{}].concat(ra(Object.entries(d).filter(function(m){var v=dd(m,2),_=v[1];return!_.skip}).map(function(m){var v=dd(m,2),_=v[0],C=v[1];return Nd({},_,C.depth)}))));return g;function b(m){for(var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,C=function(){var N=m[w];if(v.indexOf(N)!==-1){var O=[].concat(ra(v.slice(v.indexOf(N))),[N]).map(function(B){return e(B.data)});return f.some(function(B){return B.length===O.length&&B.every(function(A,L){return A===O[L]})})||(f.push(O),u(O)),1}_>N.depth&&(N.depth=_,b(N.out,[].concat(ra(v),[N]),_+(N.skip?0:1)))},w=0,T=m.length;w<T;w++)C()}}var Uit=2,Li=function(e,i){return i.onNeedsRedraw&&i.onNeedsRedraw()},ZA=function(e,i){if(!i.isShadow){var n=rr(i.linkDirectionalParticles);i.graphData.links.forEach(function(a){var o=Math.round(Math.abs(n(a)));o?a.__photons=ra(Array(o)).map(function(){return{}}):delete a.__photons})}},Yg=N_({props:{graphData:{default:{nodes:[],links:[]},onChange:function(e,i){i.engineRunning=!1,ZA(e,i)}},dagMode:{onChange:function(e,i){!e&&(i.graphData.nodes||[]).forEach(function(n){return n.fx=n.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:Li},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:Li},nodeColor:{default:"color",triggerUpdate:!1,onChange:Li},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:Li},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Li},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:Li},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:Li},linkColor:{default:"color",triggerUpdate:!1,onChange:Li},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:Li},linkWidth:{default:1,triggerUpdate:!1,onChange:Li},linkCurvature:{default:0,triggerUpdate:!1,onChange:Li},linkCanvasObject:{triggerUpdate:!1,onChange:Li},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Li},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:Li},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:Li},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:Li},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:ZA},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(e,i){i.forceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,i){i.forceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,i){i.forceLayout.velocityDecay(e)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(e,i,n){return n===void 0?e.forceLayout.force(i):(e.forceLayout.force(i,n),this)},d3ReheatSimulation:function(e){return e.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},isEngineRunning:function(e){return!!e.engineRunning},tickFrame:function(e){return!e.isShadow&&i(),a(),!e.isShadow&&o(),!e.isShadow&&c(),n(),this;function i(){e.engineRunning&&(++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin?(e.engineRunning=!1,e.onEngineStop()):(e.forceLayout.tick(),e.onEngineTick()))}function n(){var h=rr(e.nodeVisibility),u=rr(e.nodeVal),d=rr(e.nodeColor),f=rr(e.nodeCanvasObjectMode),g=e.ctx,b=e.isShadow/e.globalScale,m=e.graphData.nodes.filter(h);g.save(),m.forEach(function(v){var _=f(v);if(e.nodeCanvasObject&&(_==="before"||_==="replace")&&(e.nodeCanvasObject(v,g,e.globalScale),_==="replace")){g.restore();return}var C=Math.sqrt(Math.max(0,u(v)||1))*e.nodeRelSize+b;g.beginPath(),g.arc(v.x,v.y,C,0,2*Math.PI,!1),g.fillStyle=d(v)||"rgba(31, 120, 180, 0.92)",g.fill(),e.nodeCanvasObject&&_==="after"&&e.nodeCanvasObject(v,e.ctx,e.globalScale)}),g.restore()}function a(){var h=rr(e.linkVisibility),u=rr(e.linkColor),d=rr(e.linkWidth),f=rr(e.linkLineDash),g=rr(e.linkCurvature),b=rr(e.linkCanvasObjectMode),m=e.ctx,v=e.isShadow*2,_=e.graphData.links.filter(h);_.forEach(B);var C=[],w=[],T=_;if(e.linkCanvasObject){var E=[],N=[];_.forEach(function(A){return({before:C,after:w,replace:E}[b(A)]||N).push(A)}),T=[].concat(ra(C),w,N),C=C.concat(E)}m.save(),C.forEach(function(A){return e.linkCanvasObject(A,m,e.globalScale)}),m.restore();var O=Mit(T,[u,d,f]);m.save(),Object.entries(O).forEach(function(A){var L=dd(A,2),P=L[0],j=L[1],$=!P||P==="undefined"?"rgba(0,0,0,0.15)":P;Object.entries(j).forEach(function(X){var W=dd(X,2),F=W[0],U=W[1],D=(F||1)/e.globalScale+v;Object.entries(U).forEach(function(z){var H=dd(z,2);H[0];var V=H[1],Q=f(V[0]);m.beginPath(),V.forEach(function(G){var J=G.source,lt=G.target;if(!(!J||!lt||!J.hasOwnProperty("x")||!lt.hasOwnProperty("x"))){m.moveTo(J.x,J.y);var st=G.__controlPoints;st?m[st.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(m,ra(st).concat([lt.x,lt.y])):m.lineTo(lt.x,lt.y)}}),m.strokeStyle=$,m.lineWidth=D,m.setLineDash(Q||[]),m.stroke()})})}),m.restore(),m.save(),w.forEach(function(A){return e.linkCanvasObject(A,m,e.globalScale)}),m.restore();function B(A){var L=g(A);if(!L){A.__controlPoints=null;return}var P=A.source,j=A.target;if(!(!P||!j||!P.hasOwnProperty("x")||!j.hasOwnProperty("x"))){var $=Math.sqrt(Math.pow(j.x-P.x,2)+Math.pow(j.y-P.y,2));if($>0){var X=Math.atan2(j.y-P.y,j.x-P.x),W=$*L,F={x:(P.x+j.x)/2+W*Math.cos(X-Math.PI/2),y:(P.y+j.y)/2+W*Math.sin(X-Math.PI/2)};A.__controlPoints=[F.x,F.y]}else{var U=L*70;A.__controlPoints=[j.x,j.y-U,j.x+U,j.y]}}}}function o(){var h=1.6,u=.2,d=rr(e.linkDirectionalArrowLength),f=rr(e.linkDirectionalArrowRelPos),g=rr(e.linkVisibility),b=rr(e.linkDirectionalArrowColor||e.linkColor),m=rr(e.nodeVal),v=e.ctx;v.save(),e.graphData.links.filter(g).forEach(function(_){var C=d(_);if(!(!C||C<0)){var w=_.source,T=_.target;if(!(!w||!T||!w.hasOwnProperty("x")||!T.hasOwnProperty("x"))){var E=Math.sqrt(Math.max(0,m(w)||1))*e.nodeRelSize,N=Math.sqrt(Math.max(0,m(T)||1))*e.nodeRelSize,O=Math.min(1,Math.max(0,f(_))),B=b(_)||"rgba(0,0,0,0.28)",A=C/h/2,L=_.__controlPoints&&VA(vr,[w.x,w.y].concat(ra(_.__controlPoints),[T.x,T.y])),P=L?function(D){return L.get(D)}:function(D){return{x:w.x+(T.x-w.x)*D||0,y:w.y+(T.y-w.y)*D||0}},j=L?L.length():Math.sqrt(Math.pow(T.x-w.x,2)+Math.pow(T.y-w.y,2)),$=E+C+(j-E-N-C)*O,X=P($/j),W=P(($-C)/j),F=P(($-C*(1-u))/j),U=Math.atan2(X.y-W.y,X.x-W.x)-Math.PI/2;v.beginPath(),v.moveTo(X.x,X.y),v.lineTo(W.x+A*Math.cos(U),W.y+A*Math.sin(U)),v.lineTo(F.x,F.y),v.lineTo(W.x-A*Math.cos(U),W.y-A*Math.sin(U)),v.fillStyle=B,v.fill()}}}),v.restore()}function c(){var h=rr(e.linkDirectionalParticles),u=rr(e.linkDirectionalParticleSpeed),d=rr(e.linkDirectionalParticleOffset),f=rr(e.linkDirectionalParticleWidth),g=rr(e.linkVisibility),b=rr(e.linkDirectionalParticleColor||e.linkColor),m=e.ctx;m.save(),e.graphData.links.filter(g).forEach(function(v){var _=h(v);if(!(!v.hasOwnProperty("__photons")||!v.__photons.length)){var C=v.source,w=v.target;if(!(!C||!w||!C.hasOwnProperty("x")||!w.hasOwnProperty("x"))){var T=u(v),E=Math.abs(d(v)),N=v.__photons||[],O=Math.max(0,f(v)/2)/Math.sqrt(e.globalScale),B=b(v)||"rgba(0,0,0,0.28)";m.fillStyle=B;var A=v.__controlPoints?VA(vr,[C.x,C.y].concat(ra(v.__controlPoints),[w.x,w.y])):null,L=0,P=!1;N.forEach(function(j){var $=!!j.__singleHop;if(j.hasOwnProperty("__progressRatio")||(j.__progressRatio=$?T<0?1:0:(L+E)/_),!$&&L++,j.__progressRatio+=T,j.__progressRatio>=1||j.__progressRatio<0)if(!$)j.__progressRatio=j.__progressRatio%1,j.__progressRatio<0&&j.__progressRatio++;else{P=!0;return}var X=j.__progressRatio,W=A?A.get(X):{x:C.x+(w.x-C.x)*X||0,y:C.y+(w.y-C.y)*X||0};e.linkDirectionalParticleCanvasObject?e.linkDirectionalParticleCanvasObject(W.x,W.y,v,m,e.globalScale):(m.beginPath(),m.arc(W.x,W.y,O,0,2*Math.PI,!1),m.fill())}),P&&(v.__photons=v.__photons.filter(function(j){return!j.__singleHop||j.__progressRatio<=1&&j.__progressRatio>=0}))}}}),m.restore()}},emitParticle:function(e,i){return i&&(!i.__photons&&(i.__photons=[]),i.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:sit().force("link",Qrt()).force("charge",oit()).force("center",prt()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(e,i){i.ctx=e},update:function(e,i){e.engineRunning=!1,e.onUpdate(),e.nodeAutoColorBy!==null&&XA(e.graphData.nodes,rr(e.nodeAutoColorBy),e.nodeColor),e.linkAutoColorBy!==null&&XA(e.graphData.links,rr(e.linkAutoColorBy),e.linkColor),e.graphData.links.forEach(function(b){b.source=b[e.linkSource],b.target=b[e.linkTarget]}),e.forceLayout.stop().alpha(1).nodes(e.graphData.nodes);var n=e.forceLayout.force("link");n&&n.id(function(b){return b[e.nodeId]}).links(e.graphData.links);var a=e.dagMode&&qit(e.graphData,function(b){return b[e.nodeId]},{nodeFilter:e.dagNodeFilter,onLoopError:e.onDagError||void 0}),o=Math.max.apply(Math,ra(Object.values(a||[]))),c=e.dagLevelDistance||e.graphData.nodes.length/(o||1)*Uit*(["radialin","radialout"].indexOf(e.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(i.dagMode)){var h=["lr","rl"].includes(i.dagMode)?"fx":"fy";e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(b){return delete b[h]})}if(["lr","rl","td","bu"].includes(e.dagMode)){var u=["rl","bu"].includes(e.dagMode),d=function(m){return(a[m[e.nodeId]]-o/2)*c*(u?-1:1)},f=["lr","rl"].includes(e.dagMode)?"fx":"fy";e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(b){return b[f]=d(b)})}e.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(e.dagMode)!==-1?lit(function(b){var m=a[b[e.nodeId]]||-1;return(e.dagMode==="radialin"?o-m:m)*c}).strength(function(b){return e.dagNodeFilter(b)?1:0}):null);for(var g=0;g<e.warmupTicks&&!(e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin);g++)e.forceLayout.tick();this.resetCountdown(),e.onFinishUpdate()}});function ED(r,e){var i=r instanceof Array?r:[r],n=new e;return n._destructor&&n._destructor(),{linkProp:function(o){return{default:n[o](),onChange:function(h,u){i.forEach(function(d){return u[d][o](h)})},triggerUpdate:!1}},linkMethod:function(o){return function(c){for(var h=arguments.length,u=new Array(h>1?h-1:0),d=1;d<h;d++)u[d-1]=arguments[d];var f=[];return i.forEach(function(g){var b=c[g],m=b[o].apply(b,u);m!==b&&f.push(m)}),f.length?f[0]:this}}}}var Hit=800,Git=4,Wit=5,AD=ED("forceGraph",Yg),Yit=ED(["forceGraph","shadowGraph"],Yg),Vit=Object.assign.apply(Object,ra(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleOffset","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleCanvasObject","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(r){return Nd({},r,AD.linkProp(r))})).concat(ra(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(r){return Nd({},r,Yit.linkProp(r))})))),Kit=Object.assign.apply(Object,ra(["d3Force","d3ReheatSimulation","emitParticle"].map(function(r){return Nd({},r,AD.linkMethod(r))})));function ox(r){if(r.canvas){var e=r.canvas.width,i=r.canvas.height;e===300&&i===150&&(e=i=0);var n=window.devicePixelRatio;e/=n,i/=n,[r.canvas,r.shadowCanvas].forEach(function(o){o.style.width="".concat(r.width,"px"),o.style.height="".concat(r.height,"px"),o.width=r.width*n,o.height=r.height*n,!e&&!i&&o.getContext("2d").scale(n,n)});var a=Fa(r.canvas).k;r.zoom.translateBy(r.zoom.__baseElem,(r.width-e)/2/a,(r.height-i)/2/a),r.needsRedraw=!0}}function ND(r){var e=window.devicePixelRatio;r.setTransform(e,0,0,e,0,0)}function QA(r,e,i){r.save(),ND(r),r.clearRect(0,0,e,i),r.restore()}var Xit=N_({props:Bc({width:{default:window.innerWidth,onChange:function(e,i){return ox(i)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(e,i){return ox(i)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(e,i){[e.nodes,e.links].every(function(a){return(a||[]).every(function(o){return!o.hasOwnProperty("__indexColor")})})&&i.colorTracker.reset(),[{type:"Node",objs:e.nodes},{type:"Link",objs:e.links}].forEach(n),i.forceGraph.graphData(e),i.shadowGraph.graphData(e);function n(a){var o=a.type,c=a.objs;c.filter(function(h){if(!h.hasOwnProperty("__indexColor"))return!0;var u=i.colorTracker.lookup(h.__indexColor);return!u||!u.hasOwnProperty("d")||u.d!==h}).forEach(function(h){h.__indexColor=i.colorTracker.register({type:o,d:h})})}},triggerUpdate:!1},backgroundColor:{onChange:function(e,i){i.canvas&&e&&(i.canvas.style.background=e)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(e,i){i.shadowGraph.nodeCanvasObject(e?function(n,a,o){return e(n,n.__indexColor,a,o)}:null),i.flushShadowCanvas&&i.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(e,i){i.shadowGraph.linkCanvasObject(e?function(n,a,o){return e(n,n.__indexColor,a,o)}:null),i.flushShadowCanvas&&i.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(e,i){i.zoom.scaleExtent([e,i.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(e,i){i.zoom.scaleExtent([i.zoom.scaleExtent()[0],e])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(e,i){i.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},Vit),aliases:{stopAnimation:"pauseAnimation"},methods:Bc({graph2ScreenCoords:function(e,i,n){var a=Fa(e.canvas);return{x:i*a.k+a.x,y:n*a.k+a.y}},screen2GraphCoords:function(e,i,n){var a=Fa(e.canvas);return{x:(i-a.x)/a.k,y:(n-a.y)/a.k}},centerAt:function(e,i,n,a){if(!e.canvas)return null;if(i!==void 0||n!==void 0){var o=Object.assign({},i!==void 0?{x:i}:{},n!==void 0?{y:n}:{});return a?e.tweenGroup.add(new CA(c()).to(o,a).easing(El.Quadratic.Out).onUpdate(h).onComplete(function(){e.tweenGroup.remove(this)}).start()):h(o),this}return c();function c(){var u=Fa(e.canvas);return{x:(e.width/2-u.x)/u.k,y:(e.height/2-u.y)/u.k}}function h(u){var d=u.x,f=u.y;e.zoom.translateTo(e.zoom.__baseElem,d===void 0?c().x:d,f===void 0?c().y:f),e.needsRedraw=!0}},zoom:function(e,i,n){if(!e.canvas)return null;if(i!==void 0)return n?e.tweenGroup.add(new CA({k:a()}).to({k:i},n).easing(El.Quadratic.Out).onUpdate(function(c){var h=c.k;return o(h)}).onComplete(function(){e.tweenGroup.remove(this)}).start()):o(i),this;return a();function a(){return Fa(e.canvas).k}function o(c){e.zoom.scaleTo(e.zoom.__baseElem,c),e.needsRedraw=!0}},zoomToFit:function(e){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,a=arguments.length,o=new Array(a>3?a-3:0),c=3;c<a;c++)o[c-3]=arguments[c];var h=this.getGraphBbox.apply(this,o);if(h){var u={x:(h.x[0]+h.x[1])/2,y:(h.y[0]+h.y[1])/2},d=Math.max(1e-12,Math.min(1e12,(e.width-n*2)/(h.x[1]-h.x[0]),(e.height-n*2)/(h.y[1]-h.y[0])));this.centerAt(u.x,u.y,i),this.zoom(d,i)}return this},getGraphBbox:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},n=rr(e.nodeVal),a=function(h){return Math.sqrt(Math.max(0,n(h)||1))*e.nodeRelSize},o=e.graphData.nodes.filter(i).map(function(c){return{x:c.x,y:c.y,r:a(c)}});return o.length?{x:[bS(o,function(c){return c.x-c.r}),yS(o,function(c){return c.x+c.r})],y:[bS(o,function(c){return c.y-c.r}),yS(o,function(c){return c.y+c.r})]}:null},pauseAnimation:function(e){return e.animationFrameRequestId&&(cancelAnimationFrame(e.animationFrameRequestId),e.animationFrameRequestId=null),this},resumeAnimation:function(e){return e.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},Kit),stateInit:function(){return{lastSetZoom:1,zoom:Zq(),forceGraph:new Yg,shadowGraph:new Yg().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new Get,tweenGroup:new iD}},init:function(e,i){var n=this;e.innerHTML="";var a=document.createElement("div");a.classList.add("force-graph-container"),a.style.position="relative",e.appendChild(a),i.canvas=document.createElement("canvas"),i.backgroundColor&&(i.canvas.style.background=i.backgroundColor),a.appendChild(i.canvas),i.shadowCanvas=document.createElement("canvas");var o=i.canvas.getContext("2d"),c=i.shadowCanvas.getContext("2d",{willReadFrequently:!0}),h={x:-1e12,y:-1e12},u=function(){var g=null,b=window.devicePixelRatio,m=h.x>0&&h.y>0?c.getImageData(h.x*b,h.y*b,1,1):null;return m&&(g=i.colorTracker.lookup(m.data)),g};ce(i.canvas).call(E8().subject(function(){if(!i.enableNodeDrag)return null;var f=u();return f&&f.type==="Node"?f.d:null}).on("start",function(f){var g=f.subject;g.__initialDragPos={x:g.x,y:g.y,fx:g.fx,fy:g.fy},f.active||(g.fx=g.x,g.fy=g.y),i.canvas.classList.add("grabbable")}).on("drag",function(f){var g=f.subject,b=g.__initialDragPos,m=f,v=Fa(i.canvas).k,_={x:b.x+(m.x-b.x)/v-g.x,y:b.y+(m.y-b.y)/v-g.y};["x","y"].forEach(function(C){return g["f".concat(C)]=g[C]=b[C]+(m[C]-b[C])/v}),!(!g.__dragged&&Wit>=Math.sqrt($$(["x","y"].map(function(C){return Math.pow(f[C]-b[C],2)}))))&&(i.forceGraph.d3AlphaTarget(.3).resetCountdown(),i.isPointerDragging=!0,g.__dragged=!0,i.onNodeDrag(g,_))}).on("end",function(f){var g=f.subject,b=g.__initialDragPos,m={x:g.x-b.x,y:g.y-b.y};b.fx===void 0&&(g.fx=void 0),b.fy===void 0&&(g.fy=void 0),delete g.__initialDragPos,i.forceGraph.d3AlphaTarget()&&i.forceGraph.d3AlphaTarget(0).resetCountdown(),i.canvas.classList.remove("grabbable"),i.isPointerDragging=!1,g.__dragged&&(delete g.__dragged,i.onNodeDragEnd(g,m))})),i.zoom(i.zoom.__baseElem=ce(i.canvas)),i.zoom.__baseElem.on("dblclick.zoom",null),i.zoom.filter(function(f){return!f.button&&i.enableZoomPanInteraction&&(f.type!=="wheel"||rr(i.enableZoomInteraction)(f))&&(f.type==="wheel"||rr(i.enablePanInteraction)(f))}).on("zoom",function(f){var g=f.transform;[o,c].forEach(function(b){ND(b),b.translate(g.x,g.y),b.scale(g.k,g.k)}),i.isPointerDragging=!0,i.onZoom&&i.onZoom(Bc(Bc({},g),n.centerAt())),i.needsRedraw=!0}).on("end",function(f){i.isPointerDragging=!1,i.onZoomEnd&&i.onZoomEnd(Bc(Bc({},f.transform),n.centerAt()))}),ox(i),i.forceGraph.onNeedsRedraw(function(){return i.needsRedraw=!0}).onFinishUpdate(function(){Fa(i.canvas).k===i.lastSetZoom&&i.graphData.nodes.length&&(i.zoom.scaleTo(i.zoom.__baseElem,i.lastSetZoom=Git/Math.cbrt(i.graphData.nodes.length)),i.needsRedraw=!0)}),i.tooltip=new frt(a),["pointermove","pointerdown"].forEach(function(f){return a.addEventListener(f,function(g){f==="pointerdown"&&(i.isPointerPressed=!0,i.pointerDownEvent=g),!i.isPointerDragging&&g.type==="pointermove"&&i.onBackgroundClick&&(g.pressure>0||i.isPointerPressed)&&(g.pointerType==="mouse"||g.movementX===void 0||[g.movementX,g.movementY].some(function(v){return Math.abs(v)>1}))&&(i.isPointerDragging=!0);var b=m(a);h.x=g.pageX-b.left,h.y=g.pageY-b.top;function m(v){var _=v.getBoundingClientRect(),C=window.pageXOffset||document.documentElement.scrollLeft,w=window.pageYOffset||document.documentElement.scrollTop;return{top:_.top+w,left:_.left+C}}},{passive:!0})}),a.addEventListener("pointerup",function(f){if(i.isPointerPressed){if(i.isPointerPressed=!1,i.isPointerDragging){i.isPointerDragging=!1;return}var g=[f,i.pointerDownEvent];requestAnimationFrame(function(){if(f.button===0)if(i.hoverObj){var b=i["on".concat(i.hoverObj.type,"Click")];b&&b.apply(void 0,[i.hoverObj.d].concat(g))}else i.onBackgroundClick&&i.onBackgroundClick.apply(i,g);if(f.button===2)if(i.hoverObj){var m=i["on".concat(i.hoverObj.type,"RightClick")];m&&m.apply(void 0,[i.hoverObj.d].concat(g))}else i.onBackgroundRightClick&&i.onBackgroundRightClick.apply(i,g)})}},{passive:!0}),a.addEventListener("contextmenu",function(f){return!i.onBackgroundRightClick&&!i.onNodeRightClick&&!i.onLinkRightClick?!0:(f.preventDefault(),!1)}),i.forceGraph(o),i.shadowGraph(c);var d=Xtt(function(){QA(c,i.width,i.height),i.shadowGraph.linkWidth(function(g){return rr(i.linkWidth)(g)+i.linkHoverPrecision});var f=Fa(i.canvas);i.shadowGraph.globalScale(f.k).tickFrame()},Hit);i.flushShadowCanvas=d.flush,(this._animationCycle=function f(){var g=!i.autoPauseRedraw||!!i.needsRedraw||i.forceGraph.isEngineRunning()||i.graphData.links.some(function(E){return E.__photons&&E.__photons.length});if(i.needsRedraw=!1,i.enablePointerInteraction){var b=i.isPointerDragging?null:u();if(b!==i.hoverObj){var m=i.hoverObj,v=m?m.type:null,_=b?b.type:null;if(v&&v!==_){var C=i["on".concat(v,"Hover")];C&&C(null,m.d)}if(_){var w=i["on".concat(_,"Hover")];w&&w(b.d,v===_?m.d:null)}i.tooltip.content(b&&rr(i["".concat(b.type.toLowerCase(),"Label")])(b.d)||null),i.canvas.classList[(b&&i["on".concat(_,"Click")]||!b&&i.onBackgroundClick)&&rr(i.showPointerCursor)(b==null?void 0:b.d)?"add":"remove"]("clickable"),i.hoverObj=b}g&&d()}if(g){QA(o,i.width,i.height);var T=Fa(i.canvas).k;i.onRenderFramePre&&i.onRenderFramePre(o,T),i.forceGraph.globalScale(T).tickFrame(),i.onRenderFramePost&&i.onRenderFramePost(o,T)}i.tweenGroup.update(),i.animationFrameRequestId=requestAnimationFrame(f)})()},update:function(e){}}),lx={exports:{}},cx,JA;function Zit(){if(JA)return cx;JA=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return cx=r,cx}var hx,tN;function Qit(){if(tN)return hx;tN=1;var r=Zit();function e(){}function i(){}return i.resetWarningCache=e,hx=function(){function n(c,h,u,d,f,g){if(g!==r){var b=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw b.name="Invariant Violation",b}}n.isRequired=n;function a(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:i,resetWarningCache:e};return o.PropTypes=o,o},hx}var eN;function Jit(){return eN||(eN=1,lx.exports=Qit()()),lx.exports}var tnt=Jit();const nt=Dd(tnt),km={width:nt.number,height:nt.number,graphData:nt.shape({nodes:nt.arrayOf(nt.object).isRequired,links:nt.arrayOf(nt.object).isRequired}),backgroundColor:nt.string,nodeRelSize:nt.number,nodeId:nt.string,nodeLabel:nt.oneOfType([nt.string,nt.func]),nodeVal:nt.oneOfType([nt.number,nt.string,nt.func]),nodeVisibility:nt.oneOfType([nt.bool,nt.string,nt.func]),nodeColor:nt.oneOfType([nt.string,nt.func]),nodeAutoColorBy:nt.oneOfType([nt.string,nt.func]),onNodeHover:nt.func,onNodeClick:nt.func,linkSource:nt.string,linkTarget:nt.string,linkLabel:nt.oneOfType([nt.string,nt.func]),linkVisibility:nt.oneOfType([nt.bool,nt.string,nt.func]),linkColor:nt.oneOfType([nt.string,nt.func]),linkAutoColorBy:nt.oneOfType([nt.string,nt.func]),linkWidth:nt.oneOfType([nt.number,nt.string,nt.func]),linkCurvature:nt.oneOfType([nt.number,nt.string,nt.func]),linkDirectionalArrowLength:nt.oneOfType([nt.number,nt.string,nt.func]),linkDirectionalArrowColor:nt.oneOfType([nt.string,nt.func]),linkDirectionalArrowRelPos:nt.oneOfType([nt.number,nt.string,nt.func]),linkDirectionalParticles:nt.oneOfType([nt.number,nt.string,nt.func]),linkDirectionalParticleSpeed:nt.oneOfType([nt.number,nt.string,nt.func]),linkDirectionalParticleOffset:nt.oneOfType([nt.number,nt.string,nt.func]),linkDirectionalParticleWidth:nt.oneOfType([nt.number,nt.string,nt.func]),linkDirectionalParticleColor:nt.oneOfType([nt.string,nt.func]),onLinkHover:nt.func,onLinkClick:nt.func,dagMode:nt.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:nt.number,dagNodeFilter:nt.func,onDagError:nt.func,d3AlphaMin:nt.number,d3AlphaDecay:nt.number,d3VelocityDecay:nt.number,warmupTicks:nt.number,cooldownTicks:nt.number,cooldownTime:nt.number,onEngineTick:nt.func,onEngineStop:nt.func,getGraphBbox:nt.func},MD={zoomToFit:nt.func,onNodeRightClick:nt.func,onNodeDrag:nt.func,onNodeDragEnd:nt.func,onLinkRightClick:nt.func,linkHoverPrecision:nt.number,onBackgroundClick:nt.func,onBackgroundRightClick:nt.func,showPointerCursor:nt.oneOfType([nt.bool,nt.func]),enablePointerInteraction:nt.bool,enableNodeDrag:nt.bool},I_={showNavInfo:nt.bool,nodeOpacity:nt.number,nodeResolution:nt.number,nodeThreeObject:nt.oneOfType([nt.object,nt.string,nt.func]),nodeThreeObjectExtend:nt.oneOfType([nt.bool,nt.string,nt.func]),nodePositionUpdate:nt.func,linkOpacity:nt.number,linkResolution:nt.number,linkCurveRotation:nt.oneOfType([nt.number,nt.string,nt.func]),linkMaterial:nt.oneOfType([nt.object,nt.string,nt.func]),linkThreeObject:nt.oneOfType([nt.object,nt.string,nt.func]),linkThreeObjectExtend:nt.oneOfType([nt.bool,nt.string,nt.func]),linkPositionUpdate:nt.func,linkDirectionalArrowResolution:nt.number,linkDirectionalParticleResolution:nt.number,linkDirectionalParticleThreeObject:nt.oneOfType([nt.object,nt.string,nt.func]),forceEngine:nt.oneOf(["d3","ngraph"]),ngraphPhysics:nt.object,numDimensions:nt.oneOf([1,2,3])},ent=Object.assign({},km,MD,{linkLineDash:nt.oneOfType([nt.arrayOf(nt.number),nt.string,nt.func]),nodeCanvasObjectMode:nt.oneOfType([nt.string,nt.func]),nodeCanvasObject:nt.func,nodePointerAreaPaint:nt.func,linkCanvasObjectMode:nt.oneOfType([nt.string,nt.func]),linkCanvasObject:nt.func,linkPointerAreaPaint:nt.func,linkDirectionalParticleCanvasObject:nt.func,autoPauseRedraw:nt.bool,minZoom:nt.number,maxZoom:nt.number,enableZoomInteraction:nt.oneOfType([nt.bool,nt.func]),enablePanInteraction:nt.oneOfType([nt.bool,nt.func]),onZoom:nt.func,onZoomEnd:nt.func,onRenderFramePre:nt.func,onRenderFramePost:nt.func});Object.assign({},km,MD,I_,{enableNavigationControls:nt.bool,controlType:nt.oneOf(["trackball","orbit","fly"]),rendererConfig:nt.object,extraRenderers:nt.arrayOf(nt.shape({render:nt.func.isRequired}))});Object.assign({},km,I_,{nodeDesc:nt.oneOfType([nt.string,nt.func]),linkDesc:nt.oneOfType([nt.string,nt.func])});Object.assign({},km,I_,{markerAttrs:nt.object,yOffset:nt.number,glScale:nt.number});const $_=Dtt(Xit,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});$_.displayName="ForceGraph2D";$_.propTypes=ent;function rnt(){return mi({queryKey:["graph"],queryFn:()=>cr.get("/graph"),staleTime:3e4})}const ux="dreamcontext:";function int(r,e){const{projectId:i}=YN(),n=i?`${ux}${i}:${r}`:`${ux}${r}`,[a,o]=K.useState(()=>{try{const h=localStorage.getItem(n);if(h!==null)return JSON.parse(h);if(i){const u=`${ux}${r}`,d=localStorage.getItem(u);if(d!==null)return localStorage.setItem(n,d),localStorage.removeItem(u),JSON.parse(d)}}catch{}return e}),c=K.useCallback(h=>{o(u=>{const d=typeof h=="function"?h(u):h;try{localStorage.setItem(n,JSON.stringify(d))}catch{}return d})},[n]);return[a,c]}const rN={filters:{search:"",showTags:!0,showOrphans:!0,showAttachments:!1,existingFilesOnly:!1},groups:[],display:{view:"2d",arrows:!1,textFadeThreshold:.85,nodeSize:.5,linkThickness:.5},forces:{centerStrength:.7,repelStrength:.35,linkStrength:.9,linkDistance:.35}};function nnt(r){return{centerStrength:.05+r.centerStrength*.45,repelStrength:-(30+r.repelStrength*240),linkStrength:.1+r.linkStrength*1.2,linkDistance:20+r.linkDistance*180}}function ant(){const[r,e]=int("brain:settings:v1",rN),i=K.useCallback((o,c)=>{e(h=>({...h,[o]:{...h[o],...c}}))},[e]),n=K.useCallback(o=>{e(c=>({...c,groups:o}))},[e]),a=K.useCallback(()=>{e(rN)},[e]);return{settings:r,patch:i,setGroups:n,reset:a}}function snt(r){const e=[];let i=0;for(;i<r.length;){const n=r[i];if(/\s/.test(n)){i++;continue}if(n==="("){e.push({type:"LPAREN"}),i++;continue}if(n===")"){e.push({type:"RPAREN"}),i++;continue}if(n==="-"&&i+1<r.length&&!/\s/.test(r[i+1])){e.push({type:"NOT"}),i++;continue}if(n==='"'){let h=i+1,u="";for(;h<r.length&&r[h]!=='"';)r[h]==="\\"&&h+1<r.length?(u+=r[h+1],h+=2):(u+=r[h],h++);e.push({type:"PHRASE",value:u}),i=h+1;continue}if(n==="/"){let h=i+1,u="";for(;h<r.length&&r[h]!=="/";)r[h]==="\\"&&h+1<r.length?(u+=r[h]+r[h+1],h+=2):(u+=r[h],h++);if(h<r.length){e.push({type:"REGEX",value:u}),i=h+1;continue}}let a=i;for(;a<r.length&&!/[\s()]/.test(r[a])&&r[a]!=='"';)a++;const o=r.slice(i,a),c=o.match(/^(tag|path|file|content):(.*)$/i);c?e.push({type:"OP",value:c[1].toLowerCase(),arg:c[2]}):o.toUpperCase()==="OR"?e.push({type:"OR"}):o.toUpperCase()==="AND"||o.length>0&&e.push({type:"WORD",value:o}),i=a}return e}class ont{constructor(e){ne(this,"pos",0);this.tokens=e}parse(){return this.parseOr()}parseOr(){var i;let e=this.parseAnd();for(;((i=this.peek())==null?void 0:i.type)==="OR";){this.pos++;const n=this.parseAnd();e.type==="or"?e.children.push(n):e={type:"or",children:[e,n]}}return e}parseAnd(){var i,n;const e=[];for(;this.pos<this.tokens.length&&((i=this.peek())==null?void 0:i.type)!=="RPAREN"&&((n=this.peek())==null?void 0:n.type)!=="OR";){const a=this.parseTerm();a&&e.push(a)}return e.length===0?{type:"and",children:[]}:e.length===1?e[0]:{type:"and",children:e}}parseTerm(){var a;const e=this.peek();if(!e)return null;let i=!1;e.type==="NOT"&&(i=!0,this.pos++);const n=this.peek();if(!n)return null;if(n.type==="LPAREN"){this.pos++;const o=this.parseOr();return((a=this.peek())==null?void 0:a.type)==="RPAREN"&&this.pos++,i?BD(o):o}if(n.type==="WORD")return this.pos++,{type:"word",value:n.value.toLowerCase(),negated:i};if(n.type==="PHRASE")return this.pos++,{type:"phrase",value:n.value.toLowerCase(),negated:i};if(n.type==="REGEX"){this.pos++;try{return{type:"regex",value:new RegExp(n.value,"i"),negated:i}}catch{return null}}return n.type==="OP"?(this.pos++,{type:"op",op:n.value,arg:n.arg.toLowerCase(),negated:i}):(this.pos++,null)}peek(){return this.tokens[this.pos]}}function BD(r){return r.type==="and"||r.type==="or"?{...r,children:r.children.map(BD)}:{...r,negated:!r.negated}}function iN(r){const e=r.trim();if(!e)return{match:()=>!0,raw:"",isEmpty:!0};const i=snt(e),n=new ont(i).parse();return{match:a=>r1(n,a),raw:e,isEmpty:!1}}function r1(r,e){switch(r.type){case"and":return r.children.every(i=>r1(i,e));case"or":return r.children.some(i=>r1(i,e));case"word":return Lp(nN(e,r.value),r.negated);case"phrase":return Lp(nN(e,r.value),r.negated);case"regex":return Lp(lnt(e,r.value),r.negated);case"op":return Lp(cnt(e,r.op,r.arg),r.negated)}}function Lp(r,e){return e?!r:r}function LD(r){return[r.label,r.path,r.id,r.meta.description??"",...r.meta.tags??[]].join(" ").toLowerCase()}function nN(r,e){return LD(r).includes(e)}function lnt(r,e){return e.test(LD(r))}function cnt(r,e,i){var a;const n=i.toLowerCase();switch(e){case"path":return r.path.toLowerCase().includes(n);case"file":return(((a=r.path.split("/").pop())==null?void 0:a.toLowerCase())??r.label.toLowerCase()).includes(n);case"tag":{const o=n.replace(/^#/,"");return(r.meta.tags??[]).some(c=>c.toLowerCase()===o)||r.group==="tag"&&r.label.toLowerCase().replace(/^#/,"")===o}case"content":return(r.meta.description??"").toLowerCase().includes(n);default:return!1}}const Op={filters:"Filters",groups:"Groups",display:"Display",forces:"Forces"},dx=["#10b981","#4fb3e6","#a78bfa","#f59e0b","#ef4444","#e11d74","#9ca3af","#eab308","#22d3ee","#f472b6"];function hnt({settings:r,patch:e,setGroups:i,reset:n,onClose:a}){const[o,c]=K.useState({filters:!0,groups:!0,display:!0,forces:!0}),h=u=>c(d=>({...d,[u]:!d[u]}));return x.jsxs("aside",{className:"brain-settings",children:[x.jsxs("div",{className:"brain-settings-header",children:[x.jsx("span",{className:"brain-settings-title",children:"Graph settings"}),x.jsxs("div",{className:"brain-settings-header-actions",children:[x.jsx("button",{className:"brain-settings-mini-btn",onClick:n,title:"Restore default settings",children:"↻"}),x.jsx("button",{className:"brain-settings-mini-btn",onClick:a,title:"Close",children:"×"})]})]}),x.jsxs("div",{className:"brain-settings-body",children:[x.jsxs(Rp,{label:Op.filters,open:o.filters,onToggle:()=>h("filters"),children:[x.jsx("label",{className:"brain-settings-label",children:"Search files"}),x.jsx("input",{type:"search",className:"brain-settings-input",placeholder:"Search…",value:r.filters.search,onChange:u=>e("filters",{search:u.target.value})}),x.jsxs("p",{className:"brain-settings-hint",children:["Operators: ",x.jsx("code",{children:"tag:"})," ",x.jsx("code",{children:"path:"})," ",x.jsx("code",{children:"file:"})," ",x.jsx("code",{children:"-not"})," ",x.jsx("code",{children:"OR"})," ",x.jsx("code",{children:'"phrase"'})," ",x.jsx("code",{children:"/regex/"})]}),x.jsx($u,{label:"Tags",checked:r.filters.showTags,onChange:u=>e("filters",{showTags:u})}),x.jsx($u,{label:"Attachments",checked:r.filters.showAttachments,onChange:u=>e("filters",{showAttachments:u})}),x.jsx($u,{label:"Existing files only",checked:r.filters.existingFilesOnly,onChange:u=>e("filters",{existingFilesOnly:u})}),x.jsx($u,{label:"Orphans",checked:r.filters.showOrphans,onChange:u=>e("filters",{showOrphans:u})})]}),x.jsx(Rp,{label:Op.groups,open:o.groups,onToggle:()=>h("groups"),children:x.jsx(dnt,{groups:r.groups,onChange:i})}),x.jsxs(Rp,{label:Op.display,open:o.display,onToggle:()=>h("display"),children:[x.jsx(unt,{label:"View",value:r.display.view==="3d"?"3d":"2d",options:[{value:"2d",label:"2D"},{value:"3d",label:"3D"}],onChange:u=>e("display",{view:u})}),x.jsx($u,{label:"Arrows",checked:r.display.arrows,onChange:u=>e("display",{arrows:u})}),x.jsx(ol,{label:"Text fade threshold",value:r.display.textFadeThreshold,onChange:u=>e("display",{textFadeThreshold:u})}),x.jsx(ol,{label:"Node size",value:r.display.nodeSize,onChange:u=>e("display",{nodeSize:u})}),x.jsx(ol,{label:"Link thickness",value:r.display.linkThickness,onChange:u=>e("display",{linkThickness:u})})]}),x.jsxs(Rp,{label:Op.forces,open:o.forces,onToggle:()=>h("forces"),children:[x.jsx(ol,{label:"Center force",value:r.forces.centerStrength,onChange:u=>e("forces",{centerStrength:u})}),x.jsx(ol,{label:"Repel force",value:r.forces.repelStrength,onChange:u=>e("forces",{repelStrength:u})}),x.jsx(ol,{label:"Link force",value:r.forces.linkStrength,onChange:u=>e("forces",{linkStrength:u})}),x.jsx(ol,{label:"Link distance",value:r.forces.linkDistance,onChange:u=>e("forces",{linkDistance:u})})]})]})]})}function Rp({label:r,open:e,onToggle:i,children:n}){return x.jsxs("div",{className:`brain-section ${e?"brain-section--open":""}`,children:[x.jsxs("button",{className:"brain-section-header",onClick:i,type:"button",children:[x.jsx("span",{className:"brain-section-caret",children:e?"▾":"▸"}),x.jsx("span",{children:r})]}),e&&x.jsx("div",{className:"brain-section-body",children:n})]})}function $u({label:r,checked:e,onChange:i}){return x.jsxs("label",{className:"brain-toggle-row",children:[x.jsx("span",{children:r}),x.jsx("span",{className:`brain-toggle ${e?"brain-toggle--on":""}`,onClick:()=>i(!e),children:x.jsx("span",{className:"brain-toggle-knob"})})]})}function unt({label:r,value:e,options:i,onChange:n}){return x.jsxs("div",{className:"brain-segmented-row",children:[x.jsx("span",{className:"brain-segmented-label",children:r}),x.jsx("div",{className:"brain-segmented",role:"tablist",children:i.map(a=>x.jsx("button",{type:"button",role:"tab","aria-selected":e===a.value,className:`brain-segmented-btn ${e===a.value?"brain-segmented-btn--active":""}`,onClick:()=>n(a.value),children:a.label},a.value))})]})}function ol({label:r,value:e,onChange:i}){return x.jsxs("label",{className:"brain-slider-row",children:[x.jsx("span",{className:"brain-slider-label-text",children:r}),x.jsx("input",{type:"range",min:0,max:1,step:.01,value:e,onChange:n=>i(parseFloat(n.target.value))})]})}function dnt({groups:r,onChange:e}){const[i,n]=K.useState(""),[a,o]=K.useState(null),c=()=>{const d=i.trim();if(!d)return;const f=`grp_${Math.random().toString(36).slice(2,8)}`;e([...r,{id:f,query:d,color:dx[r.length%dx.length]}]),n("")},h=(d,f)=>{e(r.map(g=>g.id===d?{...g,...f}:g))},u=d=>e(r.filter(f=>f.id!==d));return x.jsxs(x.Fragment,{children:[r.length===0&&x.jsxs("p",{className:"brain-settings-hint",children:["Color nodes that match a query. First matching group wins. Example:"," ",x.jsx("code",{children:"tag:#architecture"})]}),x.jsx("div",{className:"brain-groups-list",children:r.map(d=>x.jsxs("div",{className:"brain-group-row",children:[x.jsx("button",{className:"brain-group-color",style:{background:d.color},onClick:()=>o(a===d.id?null:d.id),title:"Pick color"}),x.jsx("input",{className:"brain-settings-input brain-group-input",value:d.query,onChange:f=>h(d.id,{query:f.target.value})}),x.jsx("button",{className:"brain-settings-mini-btn",onClick:()=>u(d.id),title:"Remove group",children:"×"}),a===d.id&&x.jsx("div",{className:"brain-swatch-picker",children:dx.map(f=>x.jsx("button",{className:"brain-swatch",style:{background:f},onClick:()=>{h(d.id,{color:f}),o(null)}},f))})]},d.id))}),x.jsxs("div",{className:"brain-group-add",children:[x.jsx("input",{className:"brain-settings-input",placeholder:"New group query…",value:i,onChange:d=>n(d.target.value),onKeyDown:d=>{d.key==="Enter"&&c()}}),x.jsx("button",{className:"brain-settings-btn",onClick:c,disabled:!i.trim(),children:"New group"})]})]})}function fnt(r){return mi({queryKey:["graph","content",(r==null?void 0:r.path)??null],queryFn:()=>{if(!r||!r.path)throw new Error("No path for node");return cr.get(`/graph/content?path=${encodeURIComponent(r.path)}`)},enabled:!!(r&&r.path),staleTime:3e4})}const aN={soul:"#4fb3e6",user:"#4fb3e6",memory:"#4fb3e6",core:"#4fb3e6",feature:"#10b981",task:"#f59e0b",knowledge:"#a78bfa",release:"#e11d74",inbox:"#9ca3af",tag:"#10b981"},pnt={soul:"Soul",user:"User",memory:"Memory",core:"Core",feature:"Feature",task:"Task",knowledge:"Knowledge",release:"Release",inbox:"Inbox",tag:"Tag"},gnt={related_feature:"feature",parent_task:"parent",release_includes:"released",sibling_core:"spine",has_tag:"tag"};function mnt(r){return r==="task"?"tasks":r==="feature"?"features":r==="knowledge"?"knowledge":r==="soul"||r==="user"||r==="memory"||r==="core"?"core":null}function ynt({node:r,onClose:e,onSelectRelated:i,relatedNodes:n,inDegree:a,totalDegree:o,onNavigate:c}){const h=!!(r!=null&&r.path),u=fnt(h?r:null);if(!r)return x.jsx("aside",{className:"brain-drawer"});const d=mnt(r.group),f=u.data;return x.jsxs("aside",{className:"brain-drawer brain-drawer--open",children:[x.jsx("button",{className:"brain-drawer-close",onClick:e,"aria-label":"Close",children:"×"}),x.jsxs("div",{className:"brain-drawer-header",children:[x.jsxs("span",{className:"brain-drawer-group-badge",children:[x.jsx("span",{className:"brain-related-dot",style:{background:aN[r.group]}}),pnt[r.group]]}),x.jsx("h2",{className:"brain-drawer-title",children:r.label}),r.path&&x.jsx("span",{className:"brain-drawer-id",children:r.path})]}),x.jsxs("div",{className:"brain-drawer-body",children:[h&&u.isLoading&&x.jsx("p",{className:"brain-description",children:"Loading…"}),h&&u.error&&x.jsxs("p",{className:"brain-description",children:["Failed to load file: ",String(u.error)]}),(f==null?void 0:f.type)==="markdown"&&x.jsx(Kd,{content:f.content,frontmatter:f.frontmatter}),(f==null?void 0:f.type)==="json"&&x.jsx("pre",{className:"brain-codeblock",children:f.data!==void 0?JSON.stringify(f.data,null,2):f.raw??"(empty)"}),(f==null?void 0:f.type)==="text"&&x.jsx("pre",{className:"brain-codeblock",children:f.content}),!h&&r.group==="tag"&&x.jsxs("p",{className:"brain-description",children:["Tag ",x.jsxs("code",{children:["#",r.label.replace(/^#/,"")]})," — ",n.length," ",n.length===1?"file":"files"," reference this tag."]}),!h&&r.group!=="tag"&&x.jsx("p",{className:"brain-description",children:r.meta.description??"No file content."}),n.length>0&&x.jsxs("section",{className:"brain-drawer-section",children:[x.jsxs("h3",{className:"brain-drawer-section-title",children:["Connections (",n.length,") · in ",a," · total ",o]}),x.jsx("div",{className:"brain-related-list",children:n.map(({node:g,kind:b})=>x.jsxs("button",{className:"brain-related-item",onClick:()=>i(g.id),children:[x.jsx("span",{className:"brain-related-dot",style:{background:aN[g.group]}}),x.jsx("span",{children:g.label}),x.jsx("span",{className:"brain-related-kind",children:gnt[b]??b})]},`${g.id}-${b}`))})]})]}),d&&c&&x.jsx("div",{className:"brain-drawer-footer",children:x.jsxs("button",{className:"brain-btn",onClick:()=>c(d,r.id),children:["Open in ",d.charAt(0).toUpperCase()+d.slice(1)," to edit →"]})})]})}const bnt=K.lazy(()=>ze(()=>import("./BrainCanvas3D-Bb8WCKrn.js"),__vite__mapDeps([49,48])).then(r=>({default:r.BrainCanvas3D}))),xnt={soul:"#4fb3e6",user:"#4fb3e6",memory:"#4fb3e6",core:"#4fb3e6",feature:"#10b981",task:"#f59e0b",knowledge:"#a78bfa",release:"#e11d74",inbox:"#9ca3af",tag:"#10b981"},vnt={soul:"#0d7bb8",user:"#0d7bb8",memory:"#0d7bb8",core:"#0d7bb8",feature:"#047857",task:"#b45309",knowledge:"#6d28d9",release:"#be185d",inbox:"#475569",tag:"#047857"};function sN(r){return typeof r=="string"?r:r.id}function OD(r){const e=r.group==="soul"?8:r.group==="user"||r.group==="memory"?6:r.group==="tag"?3:4,i=r.__inDegree??0;return e+Math.min(14,i*1.2)}function oN(r,e){return Math.sqrt(OD(r)*e)*3}function _nt(r,e,i){for(const{group:n,parsed:a}of e)if(a.match(r))return n.color;return i[r.group]}function Cnt({onNavigate:r}){const{data:e,isLoading:i,error:n}=rnt(),a=Ln(),{settings:o,patch:c,setGroups:h,reset:u}=ant(),{resolved:d}=Fd(),f=d==="dark",g=f?xnt:vnt,b=K.useRef(null),m=K.useRef(void 0),[v,_]=K.useState({w:0,h:0}),[C,w]=K.useState(null),[T,E]=K.useState(null),[N,O]=K.useState(!0),B=K.useRef(!1);K.useEffect(()=>{if(!b.current)return;const it=b.current,xt=()=>_({w:it.clientWidth,h:it.clientHeight});xt();const pt=new ResizeObserver(xt);return pt.observe(it),()=>pt.disconnect()},[]);const A=K.useMemo(()=>iN(o.filters.search),[o.filters.search]),L=K.useMemo(()=>o.groups.map(it=>({group:it,parsed:iN(it.query)})).filter(({parsed:it})=>!it.isEmpty),[o.groups]),{filteredData:P,neighborsById:j,totalDegreeById:$,inDegreeById:X}=K.useMemo(()=>{if(!e)return{filteredData:{nodes:[],links:[]},neighborsById:new Map,totalDegreeById:new Map,inDegreeById:new Map};const it=new Map,xt=new Map;for(const Dt of e.nodes)it.set(Dt.id,0),xt.set(Dt.id,0);for(const Dt of e.links){const Jt=typeof Dt.source=="string"?Dt.source:Dt.source.id,Le=typeof Dt.target=="string"?Dt.target:Dt.target.id;it.set(Le,(it.get(Le)??0)+1),xt.set(Jt,(xt.get(Jt)??0)+1),xt.set(Le,(xt.get(Le)??0)+1)}const pt=Dt=>(xt.get(Dt)??0)===0,Et=[],Ut=new Set;for(const Dt of e.nodes){if(!o.filters.showTags&&Dt.group==="tag"||!o.filters.showOrphans&&pt(Dt.id)||!A.isEmpty&&!A.match(Dt))continue;const Jt={...Dt};Jt.__inDegree=it.get(Dt.id)??0,Jt.__totalDegree=xt.get(Dt.id)??0,Jt.__color=_nt(Dt,L,g),Et.push(Jt),Ut.add(Dt.id)}const Gt=[],ie=new Map;for(const Dt of Et)ie.set(Dt.id,new Set);for(const Dt of e.links){const Jt=typeof Dt.source=="string"?Dt.source:Dt.source.id,Le=typeof Dt.target=="string"?Dt.target:Dt.target.id;!Ut.has(Jt)||!Ut.has(Le)||(Gt.push({source:Jt,target:Le,kind:Dt.kind}),ie.get(Jt).add(Le),ie.get(Le).add(Jt))}return{filteredData:{nodes:Et,links:Gt},neighborsById:ie,totalDegreeById:xt,inDegreeById:it}},[e,o.filters,A,L]),W=K.useMemo(()=>nnt(o.forces),[o.forces]),F=.4+o.display.nodeSize*2.2;K.useEffect(()=>{var Ut,Gt,ie,Dt,Jt,Le,hr,qr,ve;const it=m.current;if(!it)return;const xt=(Ut=it.d3Force)==null?void 0:Ut.call(it,"charge");xt!=null&&xt.strength&&xt.strength(W.repelStrength),xt!=null&&xt.distanceMax&&xt.distanceMax(420);const pt=(Gt=it.d3Force)==null?void 0:Gt.call(it,"link");pt&&((ie=pt.strength)==null||ie.call(pt,W.linkStrength),(Dt=pt.distance)==null||Dt.call(pt,W.linkDistance));const Et=(Jt=it.d3Force)==null?void 0:Jt.call(it,"center");Et!=null&&Et.strength&&Et.strength(W.centerStrength),(Le=it.d3Force)==null||Le.call(it,"collide",Xrt().radius(Ee=>oN(Ee,F)+4).strength(.9).iterations(2)),(hr=it.d3Force)==null||hr.call(it,"x",cit(0).strength(W.centerStrength*.4)),(qr=it.d3Force)==null||qr.call(it,"y",hit(0).strength(W.centerStrength*.4)),(ve=it.d3ReheatSimulation)==null||ve.call(it)},[W,F,P]),K.useEffect(()=>{B.current=!1},[e==null?void 0:e.nodes.length]),K.useEffect(()=>{if(!e||!P.nodes.length)return;const it=[];return[800,1600,2600].forEach(xt=>{it.push(setTimeout(()=>{var Et;if(B.current)return;const pt=m.current;pt&&((Et=pt.zoomToFit)==null||Et.call(pt,500,80),xt>=2600&&(B.current=!0))},xt))}),()=>it.forEach(clearTimeout)},[e,P.nodes.length]);const U=K.useMemo(()=>P.nodes.find(it=>it.id===C)??null,[P,C]),D=K.useMemo(()=>{if(!U||!e)return[];const it=[],xt=new Map(e.nodes.map(pt=>[pt.id,pt]));for(const pt of e.links){const Et=typeof pt.source=="string"?pt.source:pt.source.id,Ut=typeof pt.target=="string"?pt.target:pt.target.id;if(Et===U.id){const Gt=xt.get(Ut);Gt&&it.push({node:Gt,kind:pt.kind})}else if(Ut===U.id){const Gt=xt.get(Et);Gt&&it.push({node:Gt,kind:pt.kind})}}return it},[e,U]),z=it=>{w(it.id);const xt=m.current;xt&&typeof it.x=="number"&&typeof it.y=="number"&&(xt.centerAt(it.x,it.y,400),xt.zoom(Math.max(xt.zoom(),2.2),400))},H=()=>a.invalidateQueries({queryKey:["graph"]});K.useEffect(()=>{const it=xt=>{var Ut;if((Ut=xt.target)!=null&&Ut.matches("input,textarea"))return;const pt=m.current;if(!pt)return;const Et=pt.zoom();if(xt.key==="+"||xt.key==="=")pt.zoom(Et*1.2,200);else if(xt.key==="-"||xt.key==="_")pt.zoom(Et/1.2,200);else if(xt.key.startsWith("Arrow")){const Gt=xt.shiftKey?120:40,ie=pt.centerAt();let Dt=0,Jt=0;xt.key==="ArrowUp"?Jt=-Gt:xt.key==="ArrowDown"?Jt=Gt:xt.key==="ArrowLeft"?Dt=-Gt:xt.key==="ArrowRight"&&(Dt=Gt),pt.centerAt(((ie==null?void 0:ie.x)??0)+Dt/Et,((ie==null?void 0:ie.y)??0)+Jt/Et,150)}};return window.addEventListener("keydown",it),()=>window.removeEventListener("keydown",it)},[]);const V=T??C,Q=V?j.get(V)??new Set:null,G=it=>!V||it===V?!1:!(Q!=null&&Q.has(it)),J=it=>{const xt=it.__color??g[it.group];return G(it.id)?knt(xt,f?.18:.3):xt},lt=it=>{const xt=sN(it.source),pt=sN(it.target);return V?xt===V||pt===V?f?"rgba(220, 225, 240, 0.85)":"rgba(30, 35, 50, 0.85)":f?"rgba(140, 150, 170, 0.07)":"rgba(60, 65, 80, 0.06)":f?"rgba(140, 150, 170, 0.35)":"rgba(60, 65, 80, 0.28)"},st=.5+o.display.linkThickness*2.5,vt=it=>it.kind==="sibling_core"||it.kind==="release_includes"?st*1.3:st,kt=it=>OD(it)*F,Mt=(1-o.display.textFadeThreshold)*.8;return x.jsxs("div",{className:"brain-page",children:[x.jsxs("header",{className:"brain-header",children:[x.jsxs("h1",{className:"brain-title",children:[x.jsx("span",{className:"brain-title-mark",children:"◉"}),"Brain"]}),e&&x.jsxs("span",{className:"brain-stats",children:[P.nodes.length,"/",e.nodes.length," nodes · ",P.links.length," links"]}),x.jsxs("div",{className:"brain-header-actions",children:[x.jsx("button",{className:"brain-btn",onClick:H,title:"Refresh",children:"↻"}),x.jsx("button",{className:`brain-btn ${N?"brain-btn--active":""}`,onClick:()=>O(it=>!it),title:"Graph settings",children:"⚙"})]})]}),x.jsxs("div",{className:"brain-canvas-wrap",ref:b,onPointerLeave:()=>E(null),onPointerDown:()=>E(null),children:[N&&x.jsx(hnt,{settings:o,patch:c,setGroups:h,reset:u,onClose:()=>O(!1)}),i&&x.jsx("div",{className:"brain-loading",children:"Loading brain…"}),n&&x.jsxs("div",{className:"brain-empty",children:["Failed to load graph: ",String(n)]}),e&&P.nodes.length===0&&!i&&x.jsx("div",{className:"brain-empty",children:"No nodes match the current filters."}),e&&P.nodes.length>0&&v.w>0&&o.display.view!=="3d"&&x.jsx($_,{ref:m,graphData:P,width:v.w,height:v.h,backgroundColor:f?"#151518":"#ffffff",nodeId:"id",nodeLabel:it=>it.label,nodeColor:it=>J(it),nodeVal:it=>kt(it),nodeRelSize:3,linkColor:it=>lt(it),linkWidth:it=>vt(it),linkDirectionalArrowLength:it=>o.display.arrows?3.5:0,linkDirectionalArrowRelPos:.94,linkDirectionalArrowColor:()=>f?"rgba(180, 185, 200, 0.6)":"rgba(60, 65, 80, 0.55)",onNodeClick:it=>z(it),onNodeHover:it=>E(it?it.id:null),onNodeDrag:()=>E(null),onZoom:()=>E(null),onBackgroundClick:()=>{w(null),E(null)},onEngineStop:()=>{var xt;if(B.current)return;const it=m.current;it&&((xt=it.zoomToFit)==null||xt.call(it,600,80),B.current=!0)},cooldownTicks:160,d3AlphaDecay:.025,d3VelocityDecay:.28,enableNodeDrag:!0,nodeCanvasObjectMode:()=>"after",nodeCanvasObject:(it,xt,pt)=>{if(!(it.id===T||it.id===C||V&&(Q==null?void 0:Q.has(it.id)))&&pt<Mt)return;const Ut=it.label,Gt=Math.max(10,13/Math.max(pt,.7));xt.font=`${Gt}px -apple-system, BlinkMacSystemFont, 'Visby CF', sans-serif`,xt.textAlign="center",xt.textBaseline="top";const ie=oN(it,F),Dt=(it.y??0)+ie+3,Jt=G(it.id);f?xt.fillStyle=Jt?"rgba(200, 210, 225, 0.3)":"rgba(235, 240, 250, 0.95)":xt.fillStyle=Jt?"rgba(60, 65, 80, 0.3)":"rgba(20, 24, 36, 0.92)",xt.fillText(Ut,it.x??0,Dt)}}),e&&P.nodes.length>0&&v.w>0&&o.display.view==="3d"&&x.jsx(K.Suspense,{fallback:x.jsx("div",{className:"brain-loading",children:"Loading 3D engine…"}),children:x.jsx(bnt,{graphData:P,width:v.w,height:v.h,isDark:f,nodeColor:J,nodeVal:kt,linkColor:lt,linkWidth:vt,showArrows:o.display.arrows,forces:W,nodeSizeScale:F,isDimmed:G,neighborsById:j,onNodeClick:z,onNodeHover:it=>E(it?it.id:null),onBackgroundClick:()=>{w(null),E(null)}})}),x.jsx(ynt,{node:U,onClose:()=>w(null),onSelectRelated:it=>w(it),relatedNodes:D,inDegree:U?X.get(U.id)??0:0,totalDegree:U?$.get(U.id)??0:0,onNavigate:r})]})]})}function knt(r,e){const i=r.replace("#",""),n=parseInt(i,16),a=n>>16&255,o=n>>8&255,c=n&255;return`rgba(${a}, ${o}, ${c}, ${e})`}function wnt(){return mi({queryKey:["council"],queryFn:()=>cr.get("/council"),select:r=>r.debates})}function Snt(r){return mi({queryKey:["council",r],queryFn:()=>cr.get(`/council/${r}`),select:e=>e.debate,enabled:!!r})}function RD(r){if(!r)return null;const e=r.split(`
478
+ `)[0].trim();if(!e)return null;const n=e.replace(/^(recommend(?:ed|ing)?|i\s+(?:would\s+)?recommend|proposal|my\s+position|conclusion|verdict)\s*[:\-—]?\s*/i,"").replace(/\.$/,"").split(/\s+/).slice(0,3).join(" ");return(n.length>18?n.slice(0,17).trimEnd()+"…":n).toUpperCase()}function Tnt(r){if(!r)return"other";const e=r.toLowerCase();return/\b(go\b|ship|launch|proceed|approve|yes|adopt|migrate\b)/.test(e)?"go":/\b(defer|postpone|delay|wait|later|q[2-9]|next\s+(?:quarter|year))/.test(e)?"defer":/\b(no-go|no\b|reject|abandon|stop|cancel|block)/.test(e)?"hold":/\b(pivot|phased|poc|proof.?of.?concept|pilot|partial|subset|scope\s+down)/.test(e)?"pivot":"other"}function DD(r,e){return r.rounds.find(i=>i.round===e)??null}function FD(r){if(!r.reactions)return 0;const e=(r.reactions.match(/\*\*[a-z][a-z0-9-]+\*\*/g)??[]).length;return e>0?e:(r.reactions.match(/^####\s+/gm)??[]).length}function Ent(r,e){if(!r.reactions)return[];const i=new Set(e),n=[],a=/\*\*([a-z][a-z0-9-]+)\*\*/g;let o;for(;(o=a.exec(r.reactions))!==null;)i.has(o[1])&&!n.includes(o[1])&&n.push(o[1]);return n}function Ant(r){return r.openQuestions?(r.openQuestions.match(/^\s*[-*\d]/gm)??[]).length:0}function Nnt(r){const e=r.frontmatter.rounds_planned||r.personas.reduce((c,h)=>Math.max(c,...h.rounds.map(u=>u.round),0),0),i=r.personas.length,n=r.personas.reduce((c,h)=>c+h.rounds.reduce((u,d)=>u+FD(d),0),0);let a=0,o=0;if(r.finalReport){const c=r.finalReport.content,h=c.match(/##\s+Open\s+risks\s*\n([\s\S]*?)(?=^##\s+|\Z)/im);h&&(a=(h[1].match(/^\s*[-*]/gm)??[]).length);const u=c.match(/##\s+Minority\s+views\s*\n([\s\S]*?)(?=^##\s+|\Z)/im);if(u){const d=u[1].trim();d.length>0&&!/\(none\)|n\/?a/i.test(d)&&(o=Math.max(1,(d.match(/^\s*[-*]/gm)??[]).length))}}return{rounds:e,personas:i,pushbacks:n,openRisks:a,minorityViews:o}}function Mnt(r){let e=0;for(let i=0;i<r.length;i++)e=e*31+r.charCodeAt(i)>>>0;return e%360}const lN=["◈","◉","◎","◆","◇","✦","✧","❖","⬡","⬢","▲","▼","●","■","◐","◑","◒","◓"];function Bnt(r){let e=0;for(let i=0;i<r.length;i++)e=e*31+r.charCodeAt(i)>>>0;return lN[e%lN.length]}function Lnt(r){const e=(r||"").toLowerCase();return e.includes("opus")?245:e.includes("sonnet")?195:e.includes("haiku")?160:280}function Ont(r){const e={verdict:"",appendix:null,sections:[]},i=/^##\s+(.+?)\s*\n([\s\S]*?)(?=^##\s+|\Z)/gim;let n;for(;(n=i.exec(r))!==null;){const a=n[1].trim(),o=n[2].trim();if(!e.verdict&&/^verdict\b/i.test(a)){e.verdict=o;continue}if(/^appendix\b/i.test(a)){e.appendix||(e.appendix={heading:a,body:o});continue}e.sections.push({heading:a,body:o})}return e}function Qd({slug:r,size:e=36,title:i,onClick:n}){const a=Mnt(r),o=`linear-gradient(135deg, hsl(${a} 72% 52%), hsl(${(a+36)%360} 72% 44%))`,c=Bnt(r);return x.jsx("span",{className:"council-avatar",onClick:n,title:i??r,style:{width:e,height:e,fontSize:e*.45,background:o,cursor:n?"pointer":"default"},"aria-label":r,children:c})}const Rnt=[{value:"all",label:"All"},{value:"in_progress",label:"In progress"},{value:"synthesizing",label:"Synthesizing"},{value:"complete",label:"Complete"},{value:"promoted",label:"Promoted"}];function Dnt(r,e,i){var a;if(i!=="all"&&(i==="in_progress"&&!r.status.endsWith("_running")||i==="synthesizing"&&r.status!=="synthesizing"||i==="complete"&&r.status!=="complete"||i==="promoted"&&!r.promoted_to_knowledge))return!1;if(!e.trim())return!0;const n=e.trim().toLowerCase();return!!((r.topic||"").toLowerCase().includes(n)||r.id.toLowerCase().includes(n)||(a=r.personaSlugs)!=null&&a.some(o=>o.toLowerCase().includes(n)))}function Fnt(r){return r==="complete"?"council-hall-status--complete":r==="synthesizing"?"council-hall-status--synth":r.endsWith("_running")?"council-hall-status--running":"council-hall-status--pending"}function jnt(r){return r==="complete"?"Complete":r==="synthesizing"?"Synthesizing":r.endsWith("_running")?"In progress":"Pending"}function Int({debates:r,onOpen:e}){const{t:i}=Pr(),[n,a]=K.useState(""),[o,c]=K.useState("all"),h=K.useMemo(()=>r.filter(u=>Dnt(u,n,o)),[r,n,o]);return x.jsxs("div",{className:"council-hall",children:[x.jsxs("div",{className:"council-hall-bar",children:[x.jsxs("label",{className:"council-hall-search",children:[x.jsx("span",{"aria-hidden":!0,children:"🔍"}),x.jsx("input",{type:"search",value:n,onChange:u=>a(u.target.value),placeholder:i("council.search.placeholder")})]}),x.jsx("select",{className:"council-hall-filter",value:o,onChange:u=>c(u.target.value),"aria-label":i("council.filter.status"),children:Rnt.map(u=>x.jsx("option",{value:u.value,children:u.label},u.value))}),x.jsxs("span",{className:"council-hall-count",children:[h.length," / ",r.length]})]}),h.length===0?x.jsx("div",{className:"council-empty",children:i("council.empty.list")}):x.jsx("div",{className:"council-hall-grid",children:h.map(u=>x.jsxs("button",{type:"button",className:"council-hall-card",onClick:()=>e(u.id),children:[x.jsxs("div",{className:"council-hall-card-head",children:[x.jsxs("span",{className:`council-hall-status ${Fnt(u.status)}`,children:[x.jsx("span",{className:"council-hall-status-dot"}),jnt(u.status)]}),x.jsxs("span",{className:"council-hall-rounds",children:["R",u.current_round,"/",u.rounds_planned]})]}),x.jsx("h3",{className:"council-hall-topic",children:u.topic||u.id}),x.jsxs("div",{className:"council-hall-foot",children:[u.personaSlugs&&u.personaSlugs.length>0&&x.jsxs("div",{className:"council-hall-avatars","aria-label":`${u.personaSlugs.length} personas`,children:[u.personaSlugs.slice(0,6).map((d,f)=>x.jsx("span",{className:"council-hall-avatar-wrap",style:{zIndex:10-f},children:x.jsx(Qd,{slug:d,size:20})},d)),u.personaSlugs.length>6&&x.jsxs("span",{className:"council-hall-avatar-more",children:["+",u.personaSlugs.length-6]})]}),x.jsx("span",{className:"council-hall-date",children:u.updated_at||u.created_at}),u.promoted_to_knowledge&&x.jsx("span",{className:"council-hall-promoted",title:"Promoted to knowledge",children:"📜"})]})]},u.id))})]})}function $nt(r){var e,i;if(r==="complete")return{label:"Complete",tone:"complete"};if(r==="synthesizing")return{label:"Synthesizing",tone:"synth"};if(/_running$/.test(r)){const n=(e=r.match(/^round_(\d+)_running$/))==null?void 0:e[1];return{label:n?`Round ${n} running`:"Running",tone:"running"}}if(/_complete$/.test(r)){const n=(i=r.match(/^round_(\d+)_complete$/))==null?void 0:i[1];return{label:n?`Round ${n} done`:"Round done",tone:"pending"}}return r==="created"?{label:"Created",tone:"pending"}:{label:r,tone:"pending"}}function znt({status:r,size:e="md"}){const{label:i,tone:n}=$nt(r);return x.jsxs("span",{className:`council-status council-status--${n} council-status--${e}`,children:[x.jsx("span",{className:"council-status-dot"}),i]})}function zu({value:r,label:e,tone:i="default"}){return x.jsxs("div",{className:`council-stat-tile council-stat-tile--${i}`,children:[x.jsx("div",{className:"council-stat-value",children:r}),x.jsx("div",{className:"council-stat-label",children:e})]})}function Pnt({debate:r,onCiteJump:e,onAgentJump:i}){const{t:n}=Pr(),a=K.useMemo(()=>Nnt(r),[r]),o=r.finalReport?Ont(r.finalReport.content):null,c=r.personas.map(u=>u.slug),h=u=>{const d=u.toLowerCase();return/\b(risk|danger|warning|caveat)/.test(d)?"council-ov-card--risks":/\b(minority|dissent|objection)/.test(d)?"council-ov-card--minority":/^why\b/.test(d)?"council-ov-card--why":""};return x.jsxs("div",{className:"council-ov",children:[x.jsxs("section",{className:"council-ov-problem",children:[x.jsx("div",{className:"council-ov-label",children:"Problem"}),x.jsx("h2",{className:"council-ov-topic",children:r.frontmatter.topic||r.frontmatter.id}),r.frontmatter.promoted_to_knowledge&&x.jsxs("div",{className:"council-ov-promoted",children:[x.jsx("span",{children:"📜"}),x.jsxs("span",{children:["Promoted to knowledge: ",x.jsx("code",{children:r.frontmatter.promoted_to_knowledge})]})]})]}),!o&&x.jsxs("section",{className:"council-ov-pending",children:[x.jsx("div",{className:"council-ov-label",children:n("council.verdict.awaitingSynthesis")}),x.jsx("p",{children:n("council.verdict.synthPending")}),r.roundLog&&x.jsxs("div",{className:"council-roundlog",children:[x.jsx("h4",{children:"Round log"}),x.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:Ce.parse(r.roundLog)}})]})]}),o&&x.jsxs(x.Fragment,{children:[x.jsxs("section",{className:"council-ov-verdict",children:[x.jsx("div",{className:"council-ov-label",children:"Verdict"}),x.jsx("div",{className:"council-ov-verdict-text",dangerouslySetInnerHTML:{__html:Ce.parse(o.verdict||"*No verdict section found.*")}})]}),x.jsxs("div",{className:"council-ov-stats",children:[x.jsx(zu,{value:a.rounds,label:"rounds"}),x.jsx(zu,{value:a.personas,label:"personas"}),x.jsx(zu,{value:a.pushbacks,label:"pushbacks"}),x.jsx(zu,{value:a.openRisks,label:"open risks",tone:"warning"}),x.jsx(zu,{value:a.minorityViews,label:"dissent",tone:"dissent"})]}),o.sections.length>0&&x.jsx("div",{className:"council-ov-sections",children:o.sections.map(u=>x.jsxs("section",{className:`council-ov-card ${h(u.heading)}`,children:[x.jsx("h3",{children:u.heading}),x.jsx(qnt,{text:u.body,knownSlugs:c,onCiteJump:e,onAgentJump:i})]},u.heading))}),o.appendix&&x.jsxs("details",{className:"council-ov-appendix",children:[x.jsx("summary",{children:o.appendix.heading}),x.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:Ce.parse(o.appendix.body)}})]})]})]})}function qnt({text:r,knownSlugs:e,onCiteJump:i,onAgentJump:n}){const a=[],o=new Set(e);let c=r.replace(/([a-z][a-z0-9-]+)\s+in\s+R(\d+)/g,(b,m,v)=>{if(!o.has(m))return b;const _=a.length;return a.push({slug:m,round:Number(v)}),`\0CITE${_}\0`});const h=[];c=c.replace(/\*\*([a-z][a-z0-9-]+)\*\*/g,(b,m)=>{if(!o.has(m))return b;const v=h.length;return h.push(m),`\0AGENT${v}\0`});const d=Ce.parse(c).split(/\u0000(CITE|AGENT)(\d+)\u0000/),f=[];let g=0;for(;g<d.length;){const b=d[g];if(g+2<d.length&&(d[g+1]==="CITE"||d[g+1]==="AGENT")){f.push(x.jsx("span",{dangerouslySetInnerHTML:{__html:b}},`h-${g}`));const m=d[g+1],v=Number(d[g+2]);if(m==="CITE"){const _=a[v];f.push(x.jsxs("button",{type:"button",className:"council-cite-chip",onClick:()=>i(_.slug,_.round),children:[x.jsx(Qd,{slug:_.slug,size:14}),x.jsx("span",{children:_.slug}),x.jsxs("span",{className:"council-cite-round",children:["R",_.round]})]},`c-${g}`))}else{const _=h[v];f.push(x.jsx("button",{type:"button",className:"council-inline-slug",onClick:()=>n(_),children:_},`a-${g}`))}g+=3}else f.push(x.jsx("span",{dangerouslySetInnerHTML:{__html:b}},`h-${g}`)),g+=1}return x.jsx("div",{className:"council-sheet-prose council-citation-prose",children:f})}function jD({model:r}){const e=Lnt(r),i=r?r.charAt(0).toUpperCase()+r.slice(1):"unknown";return x.jsx("span",{className:"council-model-badge",style:{background:`hsl(${e} 85% 55% / 0.14)`,color:`hsl(${e} 85% 40%)`,borderColor:`hsl(${e} 85% 55% / 0.35)`},title:`Model: ${i}`,children:i})}function Unt(r,e){if(!e.trim())return!0;const i=e.trim().toLowerCase();if(r.slug.toLowerCase().includes(i))return!0;for(const n of r.rounds)if([n.executiveSummary,n.position,n.reasoning,n.reactions,n.openQuestions].filter(Boolean).join(`
479
+ `).toLowerCase().includes(i))return!0;return!1}function z_(r,e){if(!e.trim())return r;const n=e.trim().replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return r.replace(new RegExp(`(${n})`,"gi"),"<mark>$1</mark>")}function Hnt({debate:r,focusSlug:e}){const{t:i}=Pr(),[n,a]=K.useState(""),[o,c]=K.useState(()=>new Set),h=K.useRef(null),u=K.useMemo(()=>r.personas.filter(f=>Unt(f,n)),[r.personas,n]);K.useEffect(()=>{if(!e)return;c(g=>{const b=new Set(g);return b.delete(e),b});const f=setTimeout(()=>{var b;const g=(b=h.current)==null?void 0:b.querySelector(`[data-agent="${e}"]`);g==null||g.scrollIntoView({behavior:"smooth",block:"start"})},30);return()=>clearTimeout(f)},[e]);const d=f=>{c(g=>{const b=new Set(g);return b.has(f)?b.delete(f):b.add(f),b})};return x.jsxs("div",{className:"council-transcript",ref:h,children:[x.jsxs("div",{className:"council-transcript-searchbar",children:[x.jsxs("label",{className:"council-transcript-search",children:[x.jsx("span",{"aria-hidden":!0,children:"🔍"}),x.jsx("input",{type:"search",value:n,onChange:f=>a(f.target.value),placeholder:i("council.search.transcript")})]}),x.jsxs("span",{className:"council-transcript-count",children:[u.length," of ",r.personas.length," persona",r.personas.length===1?"":"s"]})]}),x.jsxs("div",{className:"council-transcript-body",children:[u.length===0&&x.jsx("div",{className:"council-empty",children:"No personas match this search."}),u.map(f=>x.jsx(Gnt,{persona:f,query:n,collapsed:o.has(f.slug),highlighted:e===f.slug,onToggle:()=>d(f.slug)},f.slug))]})]})}function Gnt({persona:r,query:e,collapsed:i,highlighted:n,onToggle:a}){return x.jsxs("article",{className:`council-transcript-block ${n?"is-highlighted":""}`,"data-agent":r.slug,children:[x.jsxs("header",{className:"council-transcript-block-head",onClick:a,children:[x.jsxs("div",{className:"council-transcript-block-title",children:[x.jsx(Qd,{slug:r.slug,size:24}),x.jsxs("div",{children:[x.jsx("h3",{className:"council-transcript-block-name",children:r.slug}),x.jsxs("div",{className:"council-transcript-block-meta",children:[x.jsx(jD,{model:r.frontmatter.model}),r.frontmatter.aspects.slice(0,4).map(o=>x.jsx("span",{className:"council-aspect",children:o},o))]})]})]}),x.jsx("span",{className:`council-transcript-chev ${i?"":"is-open"}`,"aria-hidden":!0,children:"▸"})]}),!i&&x.jsxs("div",{className:"council-transcript-block-body",children:[r.persona&&x.jsxs("section",{className:"council-sheet-section",children:[x.jsx("h4",{children:"Persona prompt"}),x.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:z_(Ce.parse(r.persona),e)}})]}),r.rounds.length===0&&x.jsx("div",{className:"council-sheet-empty",children:"No rounds submitted."}),r.rounds.slice().sort((o,c)=>c.round-o.round).map(o=>x.jsx(Wnt,{round:o,crossContext:r.crossContext[o.round]??null,query:e},o.round)),r.researches.length>0&&x.jsxs("section",{className:"council-sheet-section",children:[x.jsx("h4",{children:"Research notes"}),x.jsx("ul",{className:"council-research-list",children:r.researches.map(o=>x.jsxs("li",{children:[x.jsx("span",{className:"council-research-topic",children:o.topic}),x.jsx("span",{className:"council-research-date",children:o.added_at})]},o.slug))})]})]})]})}function Wnt({round:r,crossContext:e,query:i}){const n=RD(r.position);return x.jsxs("section",{className:"council-round-panel",children:[x.jsxs("header",{className:"council-round-panel-head",children:[x.jsxs("h4",{className:"council-round-panel-title",children:["Round ",r.round]}),n&&x.jsx("span",{className:"council-chip-pos",children:n})]}),e&&x.jsxs("blockquote",{className:"council-crosscontext",children:[x.jsx("strong",{children:"Cross-context loaded"}),x.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:z_(Ce.parse(e),i)}})]}),r.executiveSummary&&x.jsx(Pu,{title:"Executive summary",body:r.executiveSummary,query:i}),r.position&&x.jsx(Pu,{title:"Position",body:r.position,query:i}),r.reasoning&&x.jsx(Pu,{title:"Reasoning",body:r.reasoning,query:i}),r.reactions&&x.jsx(Pu,{title:"Reactions to peers",body:r.reactions,query:i}),r.openQuestions&&x.jsx(Pu,{title:"Open questions",body:r.openQuestions,query:i})]})}function Pu({title:r,body:e,query:i}){const n=z_(Ce.parse(e),i);return x.jsxs("div",{className:"council-round-sub",children:[x.jsx("h5",{className:"council-round-sub-title",children:r}),x.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:n}})]})}function ID(r,e){return e.trim()?r?[r.executiveSummary,r.position,r.reasoning].filter(Boolean).join(`
480
+ `).toLowerCase().includes(e.trim().toLowerCase()):!1:!0}function Ynt({debate:r,query:e,onQueryChange:i,selected:n,onSelectCell:a,onClearSelection:o}){const c=K.useRef(null),h=K.useMemo(()=>Array.from({length:Math.max(1,r.frontmatter.rounds_planned)},(f,g)=>g+1),[r.frontmatter.rounds_planned]),u=K.useMemo(()=>r.personas.map(f=>f.slug),[r.personas]),d=K.useMemo(()=>{if(!e.trim())return null;let f=0;for(const g of r.personas)for(const b of h)ID(DD(g,b),e)&&f++;return f},[e,r,h]);return K.useEffect(()=>{if(!n)return;const f=g=>{const b=g.target;if(b&&["INPUT","TEXTAREA"].includes(b.tagName))return;if(g.key==="Escape"){o();return}const m=r.personas.findIndex(_=>_.slug===n.slug);if(m===-1)return;const v=r.frontmatter.rounds_planned;g.key==="ArrowRight"&&n.round<v?(g.preventDefault(),a(n.slug,n.round+1)):g.key==="ArrowLeft"&&n.round>1?(g.preventDefault(),a(n.slug,n.round-1)):g.key==="ArrowDown"&&m<r.personas.length-1?(g.preventDefault(),a(r.personas[m+1].slug,n.round)):g.key==="ArrowUp"&&m>0&&(g.preventDefault(),a(r.personas[m-1].slug,n.round))};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[n,r,o,a]),K.useEffect(()=>{if(!n||!c.current)return;const f=c.current.querySelector(`[data-persona="${n.slug}"][data-round="${n.round}"]`);f==null||f.scrollIntoView({behavior:"smooth",block:"center"})},[n]),x.jsxs("div",{className:"council-matrix",children:[x.jsxs("div",{className:"council-matrix-bar",children:[x.jsxs("label",{className:"council-matrix-search-input",children:[x.jsx("span",{className:"council-matrix-search-icon","aria-hidden":!0,children:"🔍"}),x.jsx("input",{type:"search",value:e,onChange:f=>i(f.target.value),placeholder:"Filter cells by text…"}),e&&x.jsx("button",{type:"button",className:"council-matrix-search-clear",onClick:()=>i(""),children:"×"})]}),d!=null&&x.jsxs("span",{className:"council-matrix-count",children:[d," match",d===1?"":"es"]})]}),x.jsx("div",{className:"council-matrix-scroll",ref:c,children:x.jsxs("div",{className:"council-matrix-grid",style:{gridTemplateColumns:`180px repeat(${h.length}, minmax(220px, 1fr))`},children:[x.jsx("div",{className:"council-matrix-corner","aria-hidden":!0}),h.map(f=>{const g=r.frontmatter.status===`round_${f}_running`,b=r.frontmatter.current_round>=f&&!g;return x.jsxs("div",{className:`council-round-head ${g?"is-running":""} ${b?"is-done":""}`,children:["Round ",f]},`h-${f}`)}),r.personas.map(f=>x.jsx(Vnt,{persona:f,rounds:h,debate:r,query:e,selected:n,knownSlugs:u,onSelectCell:a},f.slug))]})})]})}function Vnt({persona:r,rounds:e,debate:i,query:n,selected:a,knownSlugs:o,onSelectCell:c}){return x.jsxs(x.Fragment,{children:[x.jsxs("aside",{className:"council-matrix-row-head",children:[x.jsx(Qd,{slug:r.slug,size:22}),x.jsxs("div",{className:"council-matrix-row-id",children:[x.jsx("div",{className:"council-matrix-row-name",children:r.slug}),x.jsx(jD,{model:r.frontmatter.model})]})]}),e.map(h=>{const u=DD(r,h),d=i.frontmatter.status===`round_${h}_running`,f=!!a&&a.slug===r.slug&&a.round===h,g=ID(u,n),b=!!n.trim()&&!g;return x.jsx(Knt,{personaSlug:r.slug,round:h,data:u,isRunning:d,active:f,dimmed:b,knownSlugs:o,onSelect:c},h)})]})}function Knt({personaSlug:r,round:e,data:i,isRunning:n,active:a,dimmed:o,knownSlugs:c,onSelect:h}){if(!i)return x.jsx("div",{className:`council-cell council-cell--empty ${n?"council-cell--pending":""} ${o?"is-dimmed":""}`,"data-persona":r,"data-round":e,children:x.jsx("span",{className:"council-cell-empty-label",children:n?"awaiting…":"— silent —"})});const u=RD(i.position),d=Tnt(i.position),f=FD(i),g=Ant(i),b=Ent(i,c);return x.jsxs("button",{type:"button",className:`council-cell council-cell--${d} ${a?"is-active":""} ${o?"is-dimmed":""}`,"data-persona":r,"data-round":e,onClick:()=>h(r,e),children:[x.jsxs("div",{className:"council-cell-top",children:[u&&x.jsx("span",{className:`council-chip-pos council-chip-pos--${d}`,children:u}),(f>0||g>0)&&x.jsxs("span",{className:"council-cell-meta",children:[f>0&&x.jsxs(x.Fragment,{children:["↯ ",f]}),f>0&&g>0&&x.jsx("span",{children:" · "}),g>0&&x.jsxs(x.Fragment,{children:["? ",g]})]})]}),!a&&i.executiveSummary&&x.jsx("p",{className:"council-cell-exec",children:i.executiveSummary}),a&&x.jsxs("div",{className:"council-cell-full",children:[i.executiveSummary&&x.jsx(qu,{title:"Executive summary",children:x.jsx("p",{children:i.executiveSummary})}),i.position&&x.jsx(qu,{title:"Position",children:x.jsx("div",{dangerouslySetInnerHTML:{__html:Ce.parse(i.position)}})}),i.reasoning&&x.jsx(qu,{title:"Reasoning",children:x.jsx("div",{dangerouslySetInnerHTML:{__html:Ce.parse(i.reasoning)}})}),i.reactions&&x.jsxs(qu,{title:"Reactions to peers",children:[x.jsx("div",{dangerouslySetInnerHTML:{__html:Ce.parse(i.reactions)}}),b.length>0&&x.jsx("div",{className:"council-cell-react-chips",children:b.map(m=>x.jsxs("span",{className:"council-cell-react-chip",children:[x.jsx(Qd,{slug:m,size:14}),x.jsx("span",{children:m})]},m))})]}),i.openQuestions&&x.jsx(qu,{title:"Open questions",children:x.jsx("div",{dangerouslySetInnerHTML:{__html:Ce.parse(i.openQuestions)}})})]})]})}function qu({title:r,children:e}){return x.jsxs("section",{className:"council-cell-sub",children:[x.jsx("h5",{children:r}),x.jsx("div",{className:"council-cell-sub-body",children:e})]})}function cN(r){return r==="complete"||r==="synthesizing"?"overview":"matrix"}function Xnt({debate:r,onBack:e}){const{t:i}=Pr(),[n,a]=K.useState(()=>cN(r.frontmatter.status)),[o,c]=K.useState(""),[h,u]=K.useState(null),[d,f]=K.useState(null);K.useEffect(()=>{a(cN(r.frontmatter.status)),c(""),u(null),f(null)},[r.frontmatter.id]);const g=(v,_)=>{a("matrix"),u({slug:v,round:_})},b=v=>{a("agents"),f(v)},m=()=>{var v;return(v=navigator.clipboard)==null?void 0:v.writeText(r.frontmatter.id).catch(()=>{})};return x.jsxs("div",{className:"council-detail",children:[x.jsxs("header",{className:"council-detail-head",children:[x.jsxs("button",{type:"button",className:"council-detail-back",onClick:e,children:["← ",i("council.title")]}),x.jsxs("div",{className:"council-detail-meta",children:[x.jsx(znt,{status:r.frontmatter.status}),x.jsxs("span",{className:"council-detail-rounds",children:["R",r.frontmatter.current_round,"/",r.frontmatter.rounds_planned]}),x.jsx("span",{className:"council-session-dot",children:"·"}),x.jsx("span",{className:"council-detail-date",children:r.frontmatter.created_at}),x.jsx("span",{className:"council-session-dot",children:"·"}),x.jsx("button",{type:"button",className:"council-session-id",onClick:m,title:"Copy debate id",children:r.frontmatter.id})]})]}),x.jsxs("nav",{className:"council-tabs",role:"tablist",children:[x.jsx(fx,{active:n==="overview",onClick:()=>a("overview"),label:"Overview"}),x.jsx(fx,{active:n==="agents",onClick:()=>a("agents"),label:"Agents"}),x.jsx(fx,{active:n==="matrix",onClick:()=>a("matrix"),label:"Matrix"})]}),x.jsxs("div",{className:"council-detail-body",children:[n==="overview"&&x.jsx(Pnt,{debate:r,onCiteJump:g,onAgentJump:b}),n==="agents"&&x.jsx(Hnt,{debate:r,focusSlug:d}),n==="matrix"&&x.jsx(Ynt,{debate:r,query:o,onQueryChange:c,selected:h,onSelectCell:(v,_)=>u({slug:v,round:_}),onClearSelection:()=>u(null)})]})]})}function fx({active:r,onClick:e,label:i}){return x.jsx("button",{type:"button",role:"tab","aria-selected":r,className:`council-tab ${r?"is-active":""}`,onClick:e,children:i})}function Znt(){const{t:r}=Pr(),{data:e,isLoading:i,isError:n,error:a}=wnt(),[o,c]=K.useState(null),{data:h,isLoading:u}=Snt(o);return i?x.jsx("div",{className:"loading",children:r("common.loading")}):n?x.jsxs("div",{className:"error-state",children:["Failed to load council sessions. ",a==null?void 0:a.message]}):o?x.jsxs("div",{className:"council-page council-page--detail",children:[u&&x.jsx("div",{className:"loading",children:"Loading session…"}),h&&x.jsx(Xnt,{debate:h,onBack:()=>c(null)})]}):x.jsxs("div",{className:"council-page",children:[x.jsx("h1",{className:"page-title",children:r("council.title")}),x.jsx(Int,{debates:e??[],onOpen:c})]})}function Qnt(){return mi({queryKey:["config"],queryFn:()=>cr.get("/config"),select:r=>r.config})}function Jnt(){const r=Ln();return Va({mutationFn:e=>cr.patch("/config",e),onSuccess:()=>{r.invalidateQueries({queryKey:["config"]})}})}const tat=[{id:"claude",labelKey:"settings.platform.claude"},{id:"codex",labelKey:"settings.platform.codex"}],px={platforms:[],disableNativeMemory:!0};function eat(){const{t:r}=Pr(),{data:e,isLoading:i,isError:n}=Qnt(),a=Jnt(),[o,c]=K.useState(px.platforms),[h,u]=K.useState(px.disableNativeMemory),[d,f]=K.useState(!1),[g,b]=K.useState(!1);if(K.useEffect(()=>{const C=e??px;c(C.platforms),u(C.disableNativeMemory??!0),f(!1),b(!1)},[e]),i)return x.jsx("div",{className:"loading",children:r("common.loading")});if(n)return x.jsx("div",{className:"error-state",children:r("common.error")});const m=C=>{c(w=>{const T=w.includes(C)?w.filter(E=>E!==C):[...w,C];return f(!0),b(!1),T})},v=()=>{u(C=>!C),f(!0),b(!1)},_=()=>{a.mutate({platforms:o,disableNativeMemory:h},{onSuccess:()=>{f(!1),b(!0)}})};return x.jsxs("div",{className:"settings-page",children:[x.jsxs("div",{className:"settings-header",children:[x.jsx("h1",{className:"page-title",children:r("settings.title")}),x.jsxs("div",{className:"settings-save-row",children:[g&&!d&&x.jsx("span",{className:"settings-saved",children:r("settings.saved")}),a.isError&&x.jsx("span",{className:"settings-error",children:r("common.error")}),x.jsx("button",{className:"btn btn--primary",onClick:_,disabled:!d||a.isPending,children:a.isPending?r("settings.saving"):r("settings.save")})]})]}),e===null&&x.jsx("div",{className:"settings-empty-notice",children:r("settings.no_config")}),x.jsxs("section",{className:"settings-section",children:[x.jsx("h2",{className:"settings-section-title",children:r("settings.platforms")}),x.jsx("div",{className:"settings-checkboxes",children:tat.map(({id:C,labelKey:w})=>x.jsxs("label",{className:"settings-checkbox-label",children:[x.jsx("input",{type:"checkbox",className:"settings-checkbox",checked:o.includes(C),onChange:()=>m(C)}),x.jsx("span",{children:r(w)})]},C))})]}),x.jsxs("section",{className:"settings-section",children:[x.jsx("h2",{className:"settings-section-title",children:r("settings.memory")}),x.jsxs("div",{className:"settings-checkboxes",children:[x.jsxs("label",{className:"settings-checkbox-label",children:[x.jsx("input",{type:"checkbox",className:"settings-checkbox",checked:h,onChange:v}),x.jsx("span",{children:r("settings.native_memory.label")})]}),x.jsx("p",{className:"settings-field-hint",children:r("settings.native_memory.hint")})]})]})]})}function $D(){return mi({queryKey:["packs"],queryFn:()=>cr.get("/packs")})}function rat(){const r=Ln();return Va({mutationFn:e=>cr.post(`/packs/${encodeURIComponent(e)}/install`,{}),onSuccess:()=>{r.invalidateQueries({queryKey:["packs"]})}})}function iat(){const r=Ln();return Va({mutationFn:e=>cr.del(`/packs/${encodeURIComponent(e)}`),onSuccess:()=>{r.invalidateQueries({queryKey:["packs"]})}})}function nat(r){return"base"in r}function zD({item:r,onActionDone:e}){const{t:i}=Pr(),n=rat(),a=iat(),o=r.installed,c=o?a:n,h=c.isPending,u=c.isError,d=i(o?"packs.action.remove":"packs.action.install"),f=i(o?"packs.action.removing":"packs.action.installing"),g=h?f:d,b=m=>{m.stopPropagation(),m.preventDefault(),!h&&c.mutate(r.name,{onSuccess:()=>e==null?void 0:e()})};return x.jsxs("div",{className:"packs-card-actions",children:[x.jsx("button",{type:"button",className:`packs-action-btn btn btn--ghost${o?" packs-action-btn--danger":""}`,onClick:b,disabled:h,"aria-invalid":u||void 0,"aria-busy":h||void 0,children:g}),u&&x.jsx("span",{className:"packs-action-error",role:"alert",children:i("packs.action.error")})]})}function aat({item:r,onClose:e}){const{t:i}=Pr(),n=K.useCallback(a=>{a.target===a.currentTarget&&e()},[e]);return K.useEffect(()=>{const a=o=>{o.key==="Escape"&&e()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e]),x.jsx("div",{className:"packs-modal-overlay",onClick:n,"aria-modal":"true",role:"dialog","aria-label":r.name,children:x.jsxs("div",{className:"packs-modal-panel",children:[x.jsxs("div",{className:"packs-modal-header",children:[x.jsxs("div",{className:"packs-modal-title-row",children:[x.jsx("h2",{className:"packs-modal-name",children:r.name}),r.installed&&x.jsx("span",{className:"packs-installed-pill",children:i("settings.packs.installed")})]}),x.jsxs("div",{className:"packs-modal-header-actions",children:[x.jsx(zD,{item:r,onActionDone:e}),x.jsx("button",{className:"packs-modal-close btn btn--ghost",type:"button",onClick:e,"aria-label":i("packs.detail.close"),children:i("packs.detail.close")})]})]}),r.description&&x.jsx("p",{className:"packs-modal-desc",children:r.description}),r.tags.length>0&&x.jsx("div",{className:"packs-modal-tags",children:r.tags.map(a=>x.jsx("span",{className:"task-tag","data-hue":Yl(a),children:a},a))}),nat(r)&&x.jsxs(x.Fragment,{children:[r.base&&x.jsxs("div",{className:"packs-modal-section",children:[x.jsx("h3",{className:"packs-modal-section-title",children:i("packs.detail.base")}),x.jsx("p",{className:"packs-modal-mono",children:r.base})]}),r.subSkills.length>0&&x.jsxs("div",{className:"packs-modal-section",children:[x.jsx("h3",{className:"packs-modal-section-title",children:i("packs.detail.subskills")}),x.jsx("ul",{className:"packs-modal-subskills",children:r.subSkills.map(a=>x.jsxs("li",{className:"packs-modal-subskill",children:[x.jsx("span",{className:"packs-modal-subskill-name",children:a.name}),a.description&&x.jsx("span",{className:"packs-modal-subskill-desc",children:a.description})]},a.name))})]}),r.relatedAgents&&r.relatedAgents.length>0&&x.jsxs("div",{className:"packs-modal-section",children:[x.jsx("h3",{className:"packs-modal-section-title",children:i("packs.detail.agents")}),x.jsx("ul",{className:"packs-modal-agents",children:r.relatedAgents.map(a=>x.jsx("li",{className:"packs-modal-agent",children:a},a))})]})]})]})})}function hN({item:r,onClick:e}){const{t:i}=Pr(),n=a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),e(r))};return x.jsxs("div",{className:"packs-card packs-card--clickable",role:"button",tabIndex:0,onClick:()=>e(r),onKeyDown:n,"aria-label":r.name,children:[x.jsxs("div",{className:"packs-card-header",children:[x.jsx("span",{className:"packs-card-name",children:r.name}),r.installed&&x.jsx("span",{className:"packs-installed-pill",children:i("settings.packs.installed")})]}),r.description&&x.jsx("p",{className:"packs-card-desc",children:r.description}),r.tags.length>0&&x.jsx("div",{className:"packs-card-tags",children:r.tags.map(a=>x.jsx("span",{className:"task-tag","data-hue":Yl(a),children:a},a))}),x.jsx(zD,{item:r})]})}function sat(){const{t:r}=Pr(),{data:e,isLoading:i,isError:n,error:a}=$D(),[o,c]=K.useState(null);if(i)return x.jsx("div",{className:"loading",children:r("common.loading")});if(n)return x.jsxs("div",{className:"error-state",children:[r("common.error")," ",a==null?void 0:a.message]});const h=(e==null?void 0:e.packs)??[],u=(e==null?void 0:e.standalone)??[];return x.jsxs("div",{className:"packs-page",children:[x.jsx("h1",{className:"page-title",children:r("packs.title")}),h.length===0&&u.length===0&&x.jsx("div",{className:"packs-empty",children:r("common.empty")}),h.length>0&&x.jsxs("section",{className:"packs-section",children:[x.jsx("h2",{className:"packs-section-title",children:r("packs.section.packs")}),x.jsx("div",{className:"packs-grid",children:h.map(d=>x.jsx(hN,{item:d,onClick:c},d.name))})]}),u.length>0&&x.jsxs("section",{className:"packs-section",children:[x.jsx("h2",{className:"packs-section-title",children:r("packs.section.standalone")}),x.jsx("div",{className:"packs-grid",children:u.map(d=>x.jsx(hN,{item:d,onClick:c},d.name))})]}),o!==null&&x.jsx(aat,{item:o,onClose:()=>c(null)})]})}function oat(){return x.jsxs("header",{className:"about-hero",children:[x.jsxs("div",{className:"about-hero-copy",children:[x.jsxs("a",{className:"about-lockup",href:"#top","aria-label":"dreamcontext",children:[x.jsxs("svg",{className:"about-lockup-mark",width:"34",height:"34",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[x.jsx("path",{d:"M16 2L28 16L16 30L4 16L16 2Z",fill:"url(#hero-mark-outer)"}),x.jsx("path",{d:"M16 9L22 16L16 23L10 16L16 9Z",fill:"url(#hero-mark-inner)",opacity:"0.75"}),x.jsxs("defs",{children:[x.jsxs("linearGradient",{id:"hero-mark-outer",x1:"4",y1:"2",x2:"28",y2:"30",gradientUnits:"userSpaceOnUse",children:[x.jsx("stop",{stopColor:"var(--color-vivid-purple)"}),x.jsx("stop",{offset:"1",stopColor:"var(--color-electric-blue)"})]}),x.jsxs("linearGradient",{id:"hero-mark-inner",x1:"10",y1:"9",x2:"22",y2:"23",gradientUnits:"userSpaceOnUse",children:[x.jsx("stop",{stopColor:"var(--color-electric-blue)"}),x.jsx("stop",{offset:"1",stopColor:"var(--color-vivid-purple)"})]})]})]}),x.jsx("span",{className:"about-lockup-word",children:"dreamcontext"})]}),x.jsxs("h1",{className:"about-title",children:["The persistent brain for",x.jsx("span",{className:"about-title-accent",children:" AI natives."})]}),x.jsxs("p",{className:"about-lead",children:["It remembers every decision you made, knows how your project is structured, and is learning to act on that knowledge — so every session starts ",x.jsx("em",{children:"ready"})," instead of blind. Built for founders and builders, technical or not."]}),x.jsxs("div",{className:"about-compat",children:[x.jsx("span",{className:"about-compat-mark","aria-hidden":"true",children:"✓"}),"Works with ",x.jsx("strong",{children:"Claude Code"})]}),x.jsxs("div",{className:"about-cta-row",children:[x.jsx("code",{className:"about-command",children:"npm i -g dreamcontext"}),x.jsx("a",{className:"about-link-btn",href:"https://www.npmjs.com/package/dreamcontext",target:"_blank",rel:"noreferrer",children:"npm ↗"}),x.jsx("a",{className:"about-link-btn about-link-btn--ghost",href:"https://github.com/meanllbrl/dreamcontext",target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),x.jsxs("div",{className:"about-hero-media",children:[x.jsx("div",{className:"about-hero-aura","aria-hidden":"true"}),x.jsxs("video",{className:"about-hero-video",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,poster:"/media/brain-hero.png",children:[x.jsx("source",{src:"/media/brain.webm",type:"video/webm"}),x.jsx("source",{src:"/media/brain.mp4",type:"video/mp4"})]})]})]})}function lat(){return x.jsxs("section",{className:"about-section",children:[x.jsx("p",{className:"about-kicker",children:"The problem"}),x.jsx("h2",{className:"about-h2",children:"Your project is bigger than anyone can hold."}),x.jsxs("p",{className:"about-section-lead",children:["dreamcontext isn't a memory file. It builds a deep understanding of your whole project — the company, the codebase, even how you work — then ",x.jsx("em",{children:"surfaces what's hiding"}),": the scattered decisions, the forgotten reasons, the connections no one wrote down. Because it never forgets and sees the whole graph, the agent sometimes understands your project better than you do."]}),x.jsxs("div",{className:"about-contrast",children:[x.jsxs("div",{className:"about-contrast-card about-contrast-card--bad",children:[x.jsx("span",{className:"about-contrast-tag",children:"Without dreamcontext"}),x.jsxs("ul",{children:[x.jsx("li",{children:"Decisions scatter across chats, commits, and your head"}),x.jsx("li",{children:`The "why" behind last month's choice is already gone`}),x.jsx("li",{children:"You re-explain the project from scratch every session"}),x.jsx("li",{children:"Blind to the connections between what you've decided"})]})]}),x.jsxs("div",{className:"about-contrast-card about-contrast-card--good",children:[x.jsx("span",{className:"about-contrast-tag",children:"With dreamcontext"}),x.jsxs("ul",{children:[x.jsx("li",{children:"Deep understanding of the whole project, across every session"}),x.jsx("li",{children:"Surfaces the hidden links between scattered decisions"}),x.jsx("li",{children:"Holds the whole picture — company, code, and work-life context"}),x.jsx("li",{children:"Gets sharper every time it consolidates what changed"})]})]})]})]})}function cat(r,e,i){const n=i*.6,o=Math.max(6,Math.floor((e-i*2)/n));if(r.length<=o)return[r];const c=[];let h="";const u=(d,f)=>{const g=h?h+f+d:d;h&&g.length>o?(c.push(h),h=d):h=g};return r.split(" · ").forEach((d,f)=>{const g=f===0?"":" · ";d.length<=o?u(d,g):d.split(" ").forEach((b,m)=>u(b,m===0?g:" "))}),h&&c.push(h),c}function wm({spec:r,className:e,size:i="full"}){const a=K.useId().replace(/[^a-zA-Z0-9_-]/g,""),o=`fd-node-${a}`,c=`fd-dot-${a}`,h=i==="mini"?5:7;return x.jsx("div",{className:`fd fd--${i} ${e??""}`,role:"img","aria-label":r.ariaLabel,children:x.jsxs("svg",{viewBox:r.viewBox,preserveAspectRatio:"xMidYMid meet",className:"fd-svg",children:[x.jsxs("defs",{children:[x.jsxs("linearGradient",{id:o,x1:"0",y1:"0",x2:"0",y2:"1",children:[x.jsx("stop",{offset:"0",className:"fd-node-grad-a"}),x.jsx("stop",{offset:"1",className:"fd-node-grad-b"})]}),x.jsxs("radialGradient",{id:c,children:[x.jsx("stop",{offset:"0",className:"fd-dot-core"}),x.jsx("stop",{offset:"0.45",className:"fd-dot-mid"}),x.jsx("stop",{offset:"1",className:"fd-dot-edge"})]})]}),x.jsx("g",{className:"fd-wires",fill:"none",children:r.edges.map(u=>x.jsxs("g",{children:[x.jsx("path",{d:u.d,className:`fd-wire${u.dashed?" fd-wire--dashed":""}`}),u.comet!==!1&&x.jsx("circle",{cx:"0",cy:"0",r:h,className:"fd-comet-dot",fill:`url(#${c})`,style:{offsetPath:`path('${u.d}')`,animationDelay:`${u.delay??0}s`,animationDuration:`${u.dur??2.6}s`}}),u.label&&x.jsx("text",{x:u.label.x,y:u.label.y,className:"fd-label",transform:u.label.rotate!==void 0?`rotate(${u.label.rotate} ${u.label.x} ${u.label.y})`:void 0,children:u.label.text})]},u.id))}),r.nodes.map(u=>{const d=u.x+u.w/2,f=u.y+u.h/2,g=u.sub==null?[]:Array.isArray(u.sub)?u.sub:u.glyph?[u.sub]:cat(u.sub,u.w,i==="mini"?10:12),b=15,m=u.glyph?f+6:g.length?f-8-(g.length-1)*(b/2):f,v=u.glyph?u.y+u.h-16:m+22;return x.jsxs("g",{className:`fd-node fd-node--${u.variant??"plain"}${u.breathe?" fd-node--breathe":""}`,children:[x.jsx("rect",{x:u.x,y:u.y,width:u.w,height:u.h,rx:"14",fill:`url(#${o})`,style:u.breathe&&u.breatheDelay!==void 0?{animationDelay:`${u.breatheDelay}s`}:void 0}),u.glyph&&x.jsx("text",{x:d,y:u.y+26,className:"fd-region-glyph",children:u.glyph}),x.jsx("text",{x:d,y:m,className:"fd-node-title",children:u.title}),g.length>0&&x.jsx("text",{x:d,y:v,className:"fd-node-sub",children:g.map((_,C)=>x.jsx("tspan",{x:d,dy:C===0?0:b,children:_},C))})]},u.id)})]})})}function Ji(r,e,i,n){const a=(e+n)/2;return`M ${r} ${e} C ${r} ${a}, ${i} ${a}, ${i} ${n}`}const P_=[{file:"soul",region:"Identity",glyph:"◆"},{file:"user",region:"Episodic",glyph:"◉"},{file:"memory",region:"Semantic",glyph:"✦"},{file:"knowledge",region:"Procedural",glyph:"⚙"},{file:"state",region:"Working",glyph:"▦"},{file:"data-structures",region:"Schema",glyph:"▤"},{file:"skills",region:"Capabilities",glyph:"✧"},{file:"sub-agents",region:"Workers",glyph:"⬡"}],ul=600,Sm=250,PD=92,Pl=4,uN=(1200-Pl*Sm)/(Pl+1),q_=196,hat=320,uat=hat-q_,dat=120,qD=470,fat=548,dN=632;function UD(r){return uN+r*(Sm+uN)}function HD(r){return UD(r)+Sm/2}function GD(r){return q_+r*uat}const pat=P_.map((r,e)=>{const i=e%Pl,n=Math.floor(e/Pl);return{id:`cat-${r.file}`,x:UD(i),y:GD(n),w:Sm,h:PD,title:r.file,sub:r.region,glyph:r.glyph,variant:"region",breathe:!0,breatheDelay:e*.18}}),gat=P_.slice(0,Pl).map((r,e)=>({id:`fan-${e}`,d:Ji(ul,dat,HD(e),q_),travel:220,delay:e*.18,dur:2.6})),mat=P_.map((r,e)=>{const i=e%Pl,n=Math.floor(e/Pl);return{id:`conv-${r.file}`,d:Ji(HD(i),GD(n)+PD,ul,qD),travel:300,delay:.5+e*.12,dur:2.8}}),yat={viewBox:"0 0 1200 780",ariaLabel:"How dreamcontext works: a SessionStart hook preloads eight context categories — identity, episodic, semantic, procedural, working, schema, capabilities and workers — with zero tool calls. The agent then works with the whole picture, and RemSleep parallel specialists consolidate the session and feed the distilled knowledge back into the context categories. The loop is the product.",nodes:[{id:"hook",x:ul-215,y:40,w:430,h:80,title:"SessionStart hook fires",sub:"preloads context · 0 tool calls",variant:"hook"},...pat,{id:"agent",x:ul-250,y:qD,w:500,h:78,title:"Your agent works with the whole picture",sub:"no re-exploring · no blind search spiral",variant:"agent"},{id:"rem",x:ul-200,y:dN,w:400,h:78,title:"RemSleep — parallel specialists",sub:"multi-agent consolidation",variant:"rem"}],edges:[...gat,...mat,{id:"agent-rem",d:`M ${ul} ${fat} L ${ul} ${dN}`,travel:90,delay:1.6,dur:1.8},{id:"feedback",d:"M 800 671 C 1140 671, 1170 470, 1170 300 C 1170 170, 1110 170, 1010 170",dashed:!0,travel:520,delay:0,dur:4.2,label:{text:"consolidates & feeds back",x:1180,y:420,rotate:90}}]},ja=550,Tm=300,WD=116,fN=3,pN=(1100-fN*Tm)/(fN+1),U_=280,bat=196,YD=470,xat=540,gN=596;function VD(r){return pN+r*(Tm+pN)}function KD(r){return VD(r)+Tm/2}const H_=[{id:"sleep-tasks",title:"sleep-tasks",sub:"state/*.md tasks"},{id:"sleep-state",title:"sleep-state",sub:"soul · user · memory · core 3-6 · data-structures · changelog · releases"},{id:"sleep-product",title:"sleep-product",sub:"knowledge/ + features/ · conditional"}],vat=H_.map((r,e)=>({id:r.id,x:VD(e),y:U_,w:Tm,h:WD,title:r.title,sub:r.sub,variant:"region",breathe:!0,breatheDelay:e*.25})),_at=H_.map((r,e)=>({id:`fan-${r.id}`,d:Ji(ja,bat,KD(e),U_),travel:200,delay:e*.3,dur:2.4})),Cat=H_.map((r,e)=>({id:`conv-${r.id}`,d:Ji(KD(e),U_+WD,ja,YD),travel:200,delay:.9+e*.2,dur:2.4})),kat={viewBox:"0 0 1100 680",ariaLabel:"Sleep consolidation: sessions accumulate sleep debt; running sleep start fans out to three parallel specialists — sleep-tasks updates task files, sleep-state updates core files, changelog and releases, and sleep-product conditionally updates knowledge and feature docs. Their reports converge into updated system knowledge, then sleep done resets the debt.",nodes:[{id:"debt",x:ja-230,y:36,w:460,h:76,title:"Sessions accumulate → sleep debt",sub:"Alert · Drowsy · Sleepy · Must Sleep",variant:"accent"},{id:"sleep-start",x:ja-130,y:132,w:260,h:64,title:"sleep start",sub:"pins the epoch",variant:"hook"},...vat,{id:"converge",x:ja-220,y:YD,w:440,h:70,title:"system knowledge updated",sub:"reports stitched into one summary",variant:"agent"},{id:"sleep-done",x:ja-130,y:gN,w:260,h:64,title:"sleep done",sub:"debt reset",variant:"rem"}],edges:[{id:"debt-start",d:`M ${ja} 112 L ${ja} 132`,travel:26,delay:0,dur:1.4},..._at,...Cat,{id:"converge-done",d:`M ${ja} ${xat} L ${ja} ${gN}`,travel:64,delay:1.8,dur:1.8}]},i1=230,XD=230,mN=132,n1=[{id:"prompt",x:40,title:"Your prompt",sub:"any language",variant:"hook"},{id:"bm25",x:320,title:"BM25F keyword match",sub:"field-weighted · stemming · synonyms",variant:"region"},{id:"haiku",x:600,title:"Haiku recall",sub:"smallest cloud agent · 0-3 docs · BM25 fallback",variant:"region"},{id:"snapshot",x:880,title:"SessionStart snapshot",sub:"warm + cold knowledge · features · index · pinned",variant:"rem"}],wat=n1.map(r=>({id:r.id,x:r.x,y:i1-mN/2,w:XD,h:mN,title:r.title,sub:r.sub,variant:r.variant})),Sat=n1.slice(0,-1).map((r,e)=>{const i=n1[e+1],n=r.x+XD,a=i.x;return{id:`pipe-${r.id}`,d:`M ${n} ${i1} L ${a} ${i1}`,travel:a-n,delay:e*.4,dur:2.2}}),Tat={viewBox:"0 0 1150 460",ariaLabel:"Memory recall pipeline: your prompt is matched by field-weighted BM25F keyword search with stemming and synonyms; a small Haiku cloud agent picks zero to three directly relevant docs (falling back to BM25 when unavailable); and the SessionStart snapshot assembles warm and cold knowledge, features, the index and pinned docs.",nodes:wat,edges:Sat},Eat=[{n:"01",title:"It loads",body:"A SessionStart hook preloads the whole project picture — soul, user, memory, knowledge and state, plus data-structures, skills and sub-agents — before the agent makes a single tool call."},{n:"02",title:"It works",body:"With identity, history, procedures, schema and capabilities already in context, your agent works against the real project — no re-exploring, no blind search spiral, no re-teaching what it learned last time."},{n:"03",title:"It sleeps",body:"RemSleep is multi-agent: parallel specialists consolidate the session in their own domains and feed the distilled knowledge back into those context files — so the next session starts even sharper."}];function Aat(){return x.jsxs("section",{className:"about-section",children:[x.jsx("p",{className:"about-kicker",children:"How it works"}),x.jsx("h2",{className:"about-h2",children:"A brain that loads, works, and sleeps — across your whole system."}),x.jsxs("p",{className:"about-section-lead",children:["Three moves, repeated every session. A hook preloads the entire context set with"," ",x.jsx("em",{children:"zero tool calls"}),", your agent works with the whole picture, and a multi-agent RemSleep cycle consolidates what changed. The loop is the product."]}),x.jsx(wm,{spec:yat}),x.jsx("div",{className:"hiw2-steps",children:Eat.map(r=>x.jsxs("div",{className:"hiw2-step",children:[x.jsx("span",{className:"hiw2-step-n",children:r.n}),x.jsx("h3",{className:"hiw2-step-title",children:r.title}),x.jsx("p",{className:"hiw2-step-body",children:r.body})]},r.n))})]})}const Nat=[{level:"Alert",range:"0–3",note:"fresh — nothing to consolidate yet"},{level:"Drowsy",range:"4–6",note:"consolidation offered"},{level:"Sleepy",range:"7–9",note:"advisory note prepended"},{level:"Must Sleep",range:"10+",note:"critical directive prepended"}],Mat=[{name:"sleep-tasks",domain:"state/*.md — logs progress, bumps statuses, reconciles task bodies and workflow nodes.",always:!0},{name:"sleep-state",domain:"soul · user · memory · data-structures · CHANGELOG · RELEASES — surgical core-file updates with an anti-bloat sweep.",always:!0},{name:"sleep-product",domain:"knowledge/ + core/features/ — writes and refreshes knowledge files and feature PRDs.",always:!1}];function Bat(){return x.jsxs("section",{className:"about-section",children:[x.jsx("p",{className:"about-kicker",children:"How sleep works"}),x.jsx("h2",{className:"about-h2",children:"It sleeps to remember — like REM, but for your project."}),x.jsxs("p",{className:"about-section-lead",children:["Every session adds ",x.jsx("em",{children:"sleep debt"}),". When it builds up, one command fans out to parallel specialists that fold what changed back into the brain — then resets the meter."]}),x.jsx(wm,{spec:kat}),x.jsxs("div",{className:"sleepf-cards",children:[x.jsxs("article",{className:"sleepf-card sleepf-card--debt",children:[x.jsx("h3",{className:"sleepf-card-title",children:"Debt accumulates across sessions"}),x.jsx("p",{className:"sleepf-card-body",children:"Each session scores by how much changed; the score adds to a running debt total that crosses graduated thresholds, so consolidation urgency is never ambiguous."}),x.jsx("ul",{className:"sleepf-debt",children:Nat.map(r=>x.jsxs("li",{className:"sleepf-debt-row",children:[x.jsx("span",{className:"sleepf-debt-level",children:r.level}),x.jsx("span",{className:"sleepf-debt-range",children:r.range}),x.jsx("span",{className:"sleepf-debt-note",children:r.note})]},r.level))})]}),x.jsxs("article",{className:"sleepf-card",children:[x.jsx("h3",{className:"sleepf-card-title",children:"Specialists run in parallel"}),x.jsxs("p",{className:"sleepf-card-body",children:[x.jsx("code",{className:"sleepf-cmd",children:"sleep start"})," pins the epoch, then the main agent dispatches the specialists together in a single message — each updating a distinct knowledge domain, never editing outside it."]}),x.jsx("ul",{className:"sleepf-specialists",children:Mat.map(r=>x.jsxs("li",{className:"sleepf-spec-row",children:[x.jsx("code",{className:"sleepf-spec-name",children:r.name}),x.jsx("span",{className:`sleepf-spec-badge${r.always?" sleepf-spec-badge--always":""}`,children:r.always?"always fires":"conditional"}),x.jsx("span",{className:"sleepf-spec-domain",children:r.domain})]},r.name))})]}),x.jsxs("article",{className:"sleepf-card sleepf-card--done",children:[x.jsxs("h3",{className:"sleepf-card-title",children:[x.jsx("code",{className:"sleepf-cmd",children:"sleep done"})," resets the debt"]}),x.jsxs("p",{className:"sleepf-card-body",children:["Their reports converge into one stitched summary of updated system knowledge. The main agent calls ",x.jsx("code",{className:"sleepf-cmd",children:"sleep done"}),", which records the consolidation and resets the debt to zero — ready for the next cycle."]})]})]})]})}const Lat=[{n:"01",tag:"Keyword match",title:"Field-weighted BM25F",body:"Your prompt is matched against the corpus — knowledge, features, tasks, memory and changelog — with field weighting, stemming and synonym expansion. It runs locally in under 100ms, with zero token overhead."},{n:"02",tag:"Intent recall",title:"The Haiku agent",body:"The smallest cloud agent reads your full prompt and a relevance-ranked corpus index, then returns only the 0–3 documents that are directly relevant — resolving intent across languages. If it is unavailable, the pipeline falls back to raw BM25."},{n:"03",tag:"Session start",title:"The snapshot assembles",body:"At SessionStart a hook composes the knowledge distribution — warm and cold knowledge, the features summary, the knowledge index, and pinned docs — and hands it to the agent so it begins each session already oriented."}];function Oat(){return x.jsxs("section",{className:"about-section",children:[x.jsx("p",{className:"about-kicker",children:"How the system remembers"}),x.jsx("h2",{className:"about-h2",children:"The right memory, surfaced before you ask."}),x.jsxs("p",{className:"about-section-lead",children:["Remembering is a read pipeline. Three stages take a prompt — or a fresh session — and put exactly the relevant context in front of the agent, so it works on what you actually meant. It ",x.jsx("em",{children:"augments"})," the agent's reach; you stay in the driver's seat."]}),x.jsx(wm,{spec:Tat}),x.jsx("div",{className:"recallf-stages",children:Lat.map(r=>x.jsxs("article",{className:"recallf-stage",children:[x.jsxs("div",{className:"recallf-stage-head",children:[x.jsx("span",{className:"recallf-stage-n",children:r.n}),x.jsx("span",{className:"recallf-stage-tag",children:r.tag})]}),x.jsx("h3",{className:"recallf-stage-title",children:r.title}),x.jsx("p",{className:"recallf-stage-body",children:r.body})]},r.n))})]})}const yN=[{file:"0.soul",glyph:"◆",region:"Identity",brain:"sense of self",desc:"Who it is — purpose, principles, and the rules it must never break."},{file:"1.user",glyph:"◉",region:"Episodic",brain:"lived history",desc:"What you did and decided, session over session."},{file:"2.memory",glyph:"✦",region:"Semantic",brain:"durable facts",desc:"What's true about the project — facts that hold across every session."},{file:"data-structures/",glyph:"▤",region:"Schema",brain:"mental models",desc:"The shapes of your data — the structures everything else is built on."},{file:"knowledge/",glyph:"⚙",region:"Procedural",brain:"learned skill",desc:"How to do things here — patterns, recipes, and hard-won know-how.",rides:{label:"skills",desc:"capabilities it can pick up and apply"}},{file:"state/",glyph:"▦",region:"Working",brain:"in attention",desc:"What's in flight right now — tasks, features, and the sleep cycle.",rides:{label:"sub-agents",desc:"workers it directs under your steer"}}];function Rat(){return x.jsxs("section",{className:"about-section arch","aria-labelledby":"arch-heading",children:[x.jsx("p",{className:"about-kicker",children:"The architecture"}),x.jsx("h2",{className:"about-h2",id:"arch-heading",children:"Memory, organized like a mind."}),x.jsx("p",{className:"about-section-lead",children:"Knowledge isn't one flat file. It's laid down in strata — each a purpose-built region that mirrors a part of the brain — so the agent reaches for the right kind of memory at the right moment."}),x.jsxs("div",{className:"arch-stage",role:"img","aria-label":"A cross-section of the project's memory, stacked as layered brain regions.",children:[x.jsx("div",{className:"arch-glow","aria-hidden":"true"}),x.jsx("ol",{className:"arch-stack",children:yN.map((r,e)=>x.jsxs("li",{className:"arch-stratum",style:{"--i":e,"--n":yN.length},children:[x.jsx("div",{className:"arch-edge","aria-hidden":"true"}),x.jsxs("div",{className:"arch-face",children:[x.jsx("span",{className:"arch-glyph","aria-hidden":"true",children:r.glyph}),x.jsxs("div",{className:"arch-meta",children:[x.jsxs("div",{className:"arch-meta-top",children:[x.jsx("code",{className:"arch-file",children:r.file}),x.jsx("span",{className:"arch-region",children:r.region}),x.jsx("span",{className:"arch-brain",children:r.brain})]}),x.jsx("p",{className:"arch-desc",children:r.desc})]}),r.rides?x.jsxs("div",{className:"arch-rides",children:[x.jsx("span",{className:"arch-rides-plus","aria-hidden":"true",children:"+"}),x.jsx("span",{className:"arch-rides-label",children:r.rides.label}),x.jsx("span",{className:"arch-rides-desc",children:r.rides.desc})]}):null]})]},r.file))})]}),x.jsxs("p",{className:"arch-foot",children:["Six strata, one mind — read top-down, the agent goes from"," ",x.jsx("em",{children:"who it is"})," to ",x.jsx("em",{children:"what it's doing right now"}),"."]})]})}function Dat(r){return"base"in r}function bN({item:r}){const e=Dat(r)?"pack":"standalone",i=e==="pack"?"pack":r.tags[0]??"standalone";return x.jsxs("li",{className:"marquee-card",children:[x.jsx("span",{className:`marquee-chip marquee-chip--${e}`,children:i}),x.jsx("span",{className:"marquee-card-name",children:r.name}),r.description&&x.jsx("p",{className:"marquee-card-desc",children:r.description})]})}function Fat(){const{data:r,isLoading:e,isError:i}=$D(),n=K.useMemo(()=>r?[...r.packs,...r.standalone]:[],[r]),a=Math.min(60,Math.max(40,n.length*2.2)),o=x.jsxs(x.Fragment,{children:[x.jsx("p",{className:"about-kicker",children:"Skill packs"}),x.jsx("h2",{className:"about-h2",children:"A growing library of expertise."}),x.jsx("p",{className:"about-section-lead",children:"The agent loads the right pack for the task — and more are added all the time."})]});return e?x.jsxs("section",{className:"about-section",children:[o,x.jsx("div",{className:"marquee-viewport marquee-viewport--static","aria-hidden":"true",children:x.jsx("ul",{className:"marquee-track marquee-track--skeleton",children:Array.from({length:6}).map((c,h)=>x.jsx("li",{className:"marquee-card marquee-card--skeleton"},h))})}),x.jsx("p",{className:"marquee-status",children:"Loading packs…"})]}):i||n.length===0?x.jsx("section",{className:"about-section",children:o}):x.jsxs("section",{className:"about-section",children:[o,x.jsxs("div",{className:"marquee-viewport",style:{"--marquee-duration":`${a}s`},children:[x.jsx("ul",{className:"marquee-track",children:n.map(c=>x.jsx(bN,{item:c},`a-${c.name}`))}),x.jsx("ul",{className:"marquee-track marquee-track--dup","aria-hidden":"true",children:n.map(c=>x.jsx(bN,{item:c},`b-${c.name}`))})]})]})}const zo="0 0 360 170";function ZD(r,e,i){return{viewBox:zo,ariaLabel:r,nodes:[{id:"a",x:20,y:50,w:140,h:70,title:e.title,sub:e.sub,variant:e.variant??"hook"},{id:"b",x:200,y:50,w:140,h:70,title:i.title,sub:i.sub,variant:i.variant??"rem"}],edges:[{id:"a-b",d:"M 160 85 L 200 85",travel:40,dur:2}]}}const jat={viewBox:zo,ariaLabel:"Context snapshot: a SessionStart hook injects the soul, memory, active tasks and knowledge index straight into the agent with zero tool calls.",nodes:[{id:"hook",x:110,y:12,w:140,h:50,title:"SessionStart",sub:"0 tool calls",variant:"hook"},{id:"brain",x:16,y:100,w:150,h:56,title:"project brain",sub:"soul · memory · tasks",variant:"region",breathe:!0},{id:"agent",x:194,y:100,w:150,h:56,title:"your agent",sub:"oriented",variant:"agent"}],edges:[{id:"h-b",d:Ji(180,62,91,100),travel:80,dur:2.2},{id:"b-a",d:"M 166 128 L 194 128",travel:28,dur:1.6,delay:.5}]},Iat={viewBox:zo,ariaLabel:"Memory recall: a question is scored by BM25 keyword match, optionally refined by a small Haiku agent, returning the most relevant docs in under 100 milliseconds.",nodes:[{id:"q",x:14,y:52,w:96,h:66,title:"question",sub:"any language",variant:"hook"},{id:"bm25",x:132,y:52,w:96,h:66,title:"BM25",sub:"+ Haiku",variant:"region",breathe:!0},{id:"docs",x:250,y:52,w:96,h:66,title:"top docs",sub:"<100ms",variant:"rem"}],edges:[{id:"q-b",d:"M 110 85 L 132 85",travel:22,dur:1.6},{id:"b-d",d:"M 228 85 L 250 85",travel:22,dur:1.6,delay:.4}]},$at={viewBox:zo,ariaLabel:"RemSleep: accumulated sleep debt triggers a fan-out to three parallel specialists that consolidate the session and reset the meter.",nodes:[{id:"debt",x:108,y:10,w:144,h:46,title:"sleep debt",sub:"crosses threshold",variant:"accent"},{id:"s1",x:14,y:92,w:100,h:50,title:"sleep-tasks",variant:"region",breathe:!0},{id:"s2",x:130,y:92,w:100,h:50,title:"sleep-state",variant:"region",breathe:!0,breatheDelay:.2},{id:"s3",x:246,y:92,w:100,h:50,title:"sleep-product",variant:"region",breathe:!0,breatheDelay:.4}],edges:[{id:"d-1",d:Ji(180,56,64,92),travel:90,dur:2.2},{id:"d-2",d:"M 180 56 L 180 92",travel:36,dur:1.8,delay:.2},{id:"d-3",d:Ji(180,56,296,92),travel:90,dur:2.2,delay:.4}]},zat={viewBox:zo,ariaLabel:"Brain-region core files: soul, user, memory and the knowledge index sit in a numbered band the snapshot always loads.",nodes:[{id:"soul",x:14,y:24,w:158,h:54,title:"0.soul",sub:"identity · rules",variant:"region",breathe:!0},{id:"mem",x:188,y:24,w:158,h:54,title:"2.memory",sub:"decisions · issues",variant:"region",breathe:!0,breatheDelay:.2},{id:"user",x:14,y:96,w:158,h:54,title:"1.user",sub:"preferences",variant:"region",breathe:!0,breatheDelay:.4},{id:"know",x:188,y:96,w:158,h:54,title:"knowledge",sub:"index · pinned",variant:"region",breathe:!0,breatheDelay:.6}],edges:[]},Pat={viewBox:zo,ariaLabel:"Tag-based relation graph: knowledge, features and tasks link through shared tags into a navigable brain view.",nodes:[{id:"tag",x:110,y:58,w:140,h:54,title:"shared tag",sub:"the edge",variant:"accent",breathe:!0},{id:"k",x:14,y:10,w:110,h:44,title:"knowledge",variant:"region"},{id:"f",x:236,y:10,w:110,h:44,title:"features",variant:"region"},{id:"t",x:125,y:122,w:110,h:40,title:"tasks",variant:"region"}],edges:[{id:"k-tag",d:Ji(69,54,150,58),travel:90,dur:2.4},{id:"f-tag",d:Ji(291,54,210,58),travel:90,dur:2.4,delay:.4},{id:"t-tag",d:"M 180 122 L 180 112",travel:12,dur:1.6,delay:.8}]},qat={viewBox:zo,ariaLabel:"Task management: each task carries a LIFO changelog viewable as a Kanban board, an Eisenhower matrix, or RICE-scored.",nodes:[{id:"task",x:16,y:50,w:130,h:70,title:"task .md",sub:"LIFO changelog",variant:"hook"},{id:"views",x:200,y:24,w:144,h:44,title:"Kanban",variant:"region",breathe:!0},{id:"eis",x:200,y:74,w:144,h:40,title:"Eisenhower",variant:"region",breathe:!0,breatheDelay:.2},{id:"rice",x:200,y:120,w:144,h:40,title:"RICE score",variant:"region",breathe:!0,breatheDelay:.4}],edges:[{id:"t-k",d:Ji(146,85,272,46),travel:90,dur:2.2},{id:"t-e",d:"M 146 85 L 200 94",travel:56,dur:2,delay:.3},{id:"t-r",d:Ji(146,85,272,140),travel:90,dur:2.2,delay:.6}]},Uat={viewBox:zo,ariaLabel:"Sub-agents: the main agent fans work out to briefed specialist sub-agents that report back, keeping the main context small.",nodes:[{id:"main",x:110,y:12,w:140,h:46,title:"main agent",variant:"agent"},{id:"a",x:16,y:96,w:96,h:50,title:"reviewer",variant:"region",breathe:!0},{id:"b",x:132,y:96,w:96,h:50,title:"planner",variant:"region",breathe:!0,breatheDelay:.2},{id:"c",x:248,y:96,w:96,h:50,title:"researcher",variant:"region",breathe:!0,breatheDelay:.4}],edges:[{id:"m-a",d:Ji(180,58,64,96),travel:90,dur:2.2},{id:"m-b",d:"M 180 58 L 180 96",travel:38,dur:1.8,delay:.2},{id:"m-c",d:Ji(180,58,296,96),travel:90,dur:2.2,delay:.4}]},Hat={viewBox:"0 0 400 232",ariaLabel:"Council: three persona sub-agents debate each other in a cycle — each sees the others’ reasoning, round after round — then the debate converges into a synthesizer that writes one decision report.",nodes:[{id:"p1",x:70,y:14,w:96,h:46,title:"persona",sub:"lens A",variant:"region",breathe:!0},{id:"p2",x:18,y:118,w:96,h:46,title:"persona",sub:"lens B",variant:"region",breathe:!0,breatheDelay:.25},{id:"p3",x:130,y:118,w:96,h:46,title:"persona",sub:"lens C",variant:"region",breathe:!0,breatheDelay:.5},{id:"syn",x:286,y:70,w:104,h:72,title:"synthesizer",sub:"decision report",variant:"rem"}],edges:[{id:"p1-p2",d:"M 96 60 L 80 118",travel:60,dur:1.8},{id:"p2-p3",d:"M 114 141 L 130 141",travel:16,dur:1.1,delay:.3,label:{text:"↻ rounds",x:118,y:95}},{id:"p3-p1",d:"M 178 118 L 152 60",travel:60,dur:1.8,delay:.6},{id:"p1-syn",d:Ji(166,40,286,96),travel:130,dur:2.4,delay:.4},{id:"p3-syn",d:Ji(226,136,286,116),travel:76,dur:2.2,delay:.9}]},Gat={viewBox:"0 0 1000 330",ariaLabel:"Goal-skill orchestration: a goal-planner drafts a file-by-file plan; parallel reviewers vote SOLID or NEEDS_WORK and loop back to the planner until solid; the plan is persisted as a task; a goal-implementer builds to the acceptance criteria; a code reviewer and then a goal-validator each gate the result, looping back to the implementer on FAIL; every gate is capped at three retries before escalating to the user, after which the work ships as a task in review.",nodes:[{id:"plan",x:20,y:40,w:140,h:86,title:"planner",sub:"file-by-file plan",variant:"agent"},{id:"plan-review",x:184,y:40,w:140,h:86,title:"plan review",sub:"SOLID · NEEDS_WORK",variant:"region",breathe:!0},{id:"impl",x:348,y:40,w:140,h:86,title:"implementer",sub:"builds to criteria",variant:"agent"},{id:"code-review",x:512,y:40,w:140,h:86,title:"code review",sub:"PASS · FAIL",variant:"region",breathe:!0,breatheDelay:.2},{id:"validate",x:676,y:40,w:140,h:86,title:"validator",sub:"tests · PASS · FAIL",variant:"region",breathe:!0,breatheDelay:.4},{id:"done",x:840,y:40,w:140,h:86,title:"shipped",sub:"task → in_review",variant:"rem"}],edges:[{id:"f1",d:"M 160 83 L 184 83",dur:2},{id:"f2",d:"M 324 83 L 348 83",dur:2,delay:.2},{id:"f3",d:"M 488 83 L 512 83",dur:2,delay:.1},{id:"f4",d:"M 652 83 L 676 83",dur:2,delay:.2},{id:"f5",d:"M 816 83 L 840 83",dur:2,delay:.3},{id:"l1",d:"M 254 126 C 254 196, 90 196, 90 126",dashed:!0,dur:3.2,delay:.5,label:{text:"↻ ≤3",x:172,y:186}},{id:"l2",d:"M 582 126 C 582 196, 418 196, 418 126",dashed:!0,dur:3.2,delay:.7,label:{text:"↻ ≤3",x:500,y:186}},{id:"l3",d:"M 746 126 C 746 262, 418 262, 418 126",dashed:!0,dur:3.6,delay:.9,label:{text:"↻ ≤3",x:582,y:252}}]},Wat=ZD("Skill packs: curated domain packs install a base skill plus on-demand sub-skills into the agent.",{title:"skill pack",sub:"engineering · design · growth",variant:"hook"},{title:"agent gains",sub:"base + sub-skills",variant:"rem"}),Yat=ZD("Knowledge base: tagged knowledge files are indexed every session; pinned files load warm, the rest load cold on demand.",{title:"knowledge/*.md",sub:"tagged · indexed",variant:"region"},{title:"snapshot",sub:"warm + cold",variant:"rem"}),QD=[{id:"context-snapshot",title:"Context snapshot",tagline:"Every session starts with the whole brain, zero tool calls.",body:"A SessionStart hook injects your project identity, user preferences, memory, active tasks and the knowledge index straight into the agent — so it orients instantly instead of grepping around blind.",defaultOpen:!0,tag:"Memory",flow:jat},{id:"memory-recall",title:"Memory recall",tagline:'Ask "where did we decide X?" and get an answer in under 100ms.',body:"A deterministic BM25 search ranks every knowledge file, PRD, task, memory entry and changelog line — optionally sharpened by a small Haiku agent — so the right context surfaces without scrolling or grepping. Handles English, Turkish and mixed queries.",defaultOpen:!0,tag:"Memory",flow:Iat},{id:"rem-sleep",title:"RemSleep consolidation",tagline:"It sleeps to remember — multi-agent consolidation, like REM.",body:"Sessions accumulate sleep debt; when it builds up, one command fans out to three parallel specialists that fold what changed back into the brain, then resets the meter. Knowledge compounds instead of decaying.",defaultOpen:!0,tag:"Sleep",flow:$at},{id:"brain-regions",title:"Brain-region core files",tagline:"A numbered band of core files — soul, user, memory, knowledge.",body:"The brain is a handful of small, always-loaded files: identity and rules, user preferences, durable memory, and the knowledge index. Kept lightweight on purpose so the snapshot stays under budget every session.",defaultOpen:!0,tag:"Memory",flow:zat},{id:"knowledge-base",title:"Knowledge base",tagline:"Tagged research that loads warm when pinned, cold on demand.",body:"Deep research and domain context live in tagged knowledge files the snapshot indexes every session. Pin the critical ones to load them in full; the rest stay one read away when an agent needs them.",defaultOpen:!0,tag:"Knowledge",flow:Yat},{id:"brain-graph",title:"Relation graph (Brain view)",tagline:"Knowledge, features and tasks linked through shared tags.",body:"A tag-based graph connects every knowledge file, feature and task into one navigable Brain view — so you can see how the parts of a project relate instead of reading them one file at a time.",defaultOpen:!0,tag:"Knowledge",flow:Pat},{id:"task-management",title:"Task management",tagline:"LIFO changelogs, viewable as Kanban, Eisenhower or RICE.",body:"Each task is a Markdown file with a LIFO changelog, so any session reads where the last one left off. View the backlog as a Kanban board, triage it on an Eisenhower matrix, or rank it numerically with RICE — Reach × Impact × Confidence ÷ Effort.",defaultOpen:!0,tag:"Tasks",flow:qat},{id:"skill-packs",title:"Skill packs",tagline:"Curated, installable skills by domain — one command.",body:"Extend an agent with domain packs — engineering, design, growth, brand-voice and more — each a base skill plus on-demand sub-skills. Install interactively or name a pack directly; prerequisites resolve automatically.",defaultOpen:!0,tag:"Skills",flow:Wat},{id:"sub-agents",title:"Sub-agents",tagline:"Fan work out to briefed specialists; keep the main context lean.",body:"The main agent dispatches focused sub-agents — reviewers, planners, researchers — each launched with a lightweight context briefing so it knows the project structure without any tool calls. They report back; the main thread stays small.",defaultOpen:!0,tag:"Agents",flow:Uat},{id:"council",title:"Council",tagline:"Persona sub-agents debate a hard call, a synthesizer decides.",body:"For a non-trivial decision, Council spins up 3–10 persona sub-agents that debate across rounds, see each other's reasoning, then hand off to a dedicated synthesizer that writes one decision report — promotable straight into knowledge.",defaultOpen:!0,tag:"Agents",flow:Hat},{id:"goal-skill",title:"Goal-skill orchestration",tagline:"Plan it, review it, build it, review it, validate it — on a leash.",body:"Turn the main agent into an orchestrator. A goal-planner drafts a file-by-file plan; parallel reviewers vote SOLID or NEEDS_WORK and bounce it back until it holds; the plan is persisted as a task; a goal-implementer builds to the acceptance criteria; then a code reviewer and a goal-validator each gate the result, looping back to the implementer on a fail. Every gate is capped at three retries and escalates to you instead of spinning.",defaultOpen:!0,tag:"Agents",flow:Gat},{id:"bookmarking",title:"Bookmarking (salience)",tagline:"High-signal moments tagged so sleep can find them later.",body:"Corrections, error-to-fix turns and decisions are auto-bookmarked during a session, marking the moments worth keeping — so consolidation folds the right learnings into the brain without manual flagging.",defaultOpen:!1,tag:"Memory",glyph:"◈"},{id:"warm-cold-knowledge",title:"Warm vs cold knowledge",tagline:"Pinned files load in full; the rest stay one read away.",body:"Pinned (warm) knowledge is inlined into every snapshot; unpinned (cold) knowledge appears only in the index and loads on demand. The split keeps the always-on context small while nothing gets lost.",defaultOpen:!1,tag:"Knowledge",glyph:"❄"},{id:"feature-prds",title:"Feature PRDs",tagline:"Living docs that capture not just what was built, but why.",body:"Each feature has a PRD with user stories, acceptance criteria and design decisions that update as work progresses — so an agent understands the product surface without reconstructing it from conversation history.",defaultOpen:!1,tag:"Knowledge",glyph:"▤"},{id:"versions-releases",title:"Versions & releases",tagline:"Changelog and release readiness tracked in the brain.",body:"A structured changelog and release notes live alongside the context, so version history and release readiness are part of the brain the agent reads — not an afterthought scattered across commits.",defaultOpen:!1,tag:"Knowledge",glyph:"⎇"},{id:"multi-vault",title:"Multi-vault registry",tagline:"Switch between project brains from one global registry.",body:"A global vault registry tracks every project brain on your machine. List, add and remove vaults, then point the dashboard at any one — so multiple projects each keep their own clean context.",defaultOpen:!1,tag:"Setup",glyph:"▦"},{id:"multi-product",title:"Multi-product support",tagline:"Per-product knowledge auto-injected from the active task.",body:"Monorepos and portfolios get a product namespace: per-product knowledge and data structures, plus automatic injection of the right product's knowledge at session start when the active task carries a product tag.",defaultOpen:!1,tag:"Knowledge",glyph:"◫"},{id:"manifest-install",title:"Manifest install & update",tagline:"Clean upgrades — stale files tracked and removed, not layered.",body:"A manifest tracks every file dreamcontext owns, so updates remove what a new version drops instead of leaving stale agents and configs behind. Includes a one-line install script and an in-session update nudge.",defaultOpen:!1,tag:"Setup",glyph:"⟳"},{id:"project-init",title:"Project initialization",tagline:"Blank repo to agent-aware workspace in under a minute.",body:"One init command scaffolds the whole context directory, detects your tech stack, runs token substitution on the templates, and wires up the Claude Code hooks — no manual setup.",defaultOpen:!1,tag:"Setup",glyph:"⊕"},{id:"control-panel",title:"Control panel",tagline:"Configure platforms, packs and vaults in the browser.",body:"The dashboard control panel closes the loop on configuration — edit platforms and skill packs, see which packs are actually installed on disk, manage vaults, and get notified in-app when a newer version ships.",defaultOpen:!1,tag:"Setup",glyph:"⚙"},{id:"multi-review",title:"Multi-review",tagline:"Route a diff to niche reviewers, get one merged report.",body:"A router classifies a diff by domain and dispatches specialist reviewers — security, frontend, cloud functions, edge cases — in parallel; a coordinator dedupes their findings into a single report. Each specialist reviews against your live project rules.",defaultOpen:!1,tag:"Agents",glyph:"⊜"},{id:"continuous-capture",title:"Continuous capture",tagline:"Session digests and auto-bookmarks, searchable next session.",body:"Transcripts are digested and indexed as you work, so a decision from one session is searchable in the next — before any sleep consolidation runs. Capture is down-weighted so it never crowds out curated knowledge.",defaultOpen:!1,tag:"Memory",glyph:"◌"},{id:"context-gate",title:"Context gate",tagline:"Nudges the agent to load relevant skills before it acts.",body:"A prompt-time hook detects when an installed skill is plausibly relevant and injects a directive to review the full skill list and invoke what fits — deliberately not a pre-selected top-N, so the right skill is never anchored out.",defaultOpen:!1,tag:"Skills",glyph:"⊳"},{id:"auto-dashboard",title:"Auto-open dashboard hook",tagline:"The dashboard surfaces itself when it is worth a look.",body:"A hook can open the dashboard at the right moment so the visual view of tasks, knowledge and the brain is one glance away — without you remembering to launch it.",defaultOpen:!1,tag:"Setup",glyph:"◰"},{id:"post-edit-hook",title:"Post-edit format & typecheck",tagline:"Format and typecheck fire automatically after an edit.",body:"A post-edit hook runs your formatter and type checker right after the agent changes a file, so problems surface immediately instead of piling up — keeping the working tree clean as work proceeds.",defaultOpen:!1,tag:"Setup",glyph:"✓"},{id:"marketing-pack",title:"Marketing pack",tagline:"Brand-voice and growth skills for going to market.",body:"A bundled set of go-to-market skills — brand voice, growth, performance marketing — so the same agent that builds a feature can help position and launch it, on-brand.",defaultOpen:!1,tag:"Skills",glyph:"✦"}],a1=QD.filter(r=>r.defaultOpen),xN=QD.filter(r=>!r.defaultOpen),Zn=a1.length,gx=16,Vat=62,Kat=.72,Xat=40,Zat=140,Qat=8;function Jat(){const[r,e]=K.useState(0),i=K.useId(),n=K.useRef([]),a=K.useRef([]),o=K.useRef([]),c=K.useRef(null),h=K.useRef(null),u=K.useRef(null),d=K.useRef(!1),f=K.useRef(0),g=C=>`${i}-tab-${C}`,b=C=>`${i}-panel-${C}`,m=K.useCallback(C=>{const w=Math.max(0,Math.min(Zn-1,C));w!==f.current&&(f.current=w,e(w))},[]);K.useLayoutEffect(()=>{const C=c.current,w=h.current;if(!C||!w)return;d.current=window.matchMedia("(prefers-reduced-motion: reduce)").matches;const T=C.closest(".shell-main")??null,E=T??window;let N=0;const O=()=>{N=0;const P=C.getBoundingClientRect(),j=T?T.getBoundingClientRect().top:0,$=P.height-w.offsetHeight;if($<=0)return;const X=Math.max(0,Math.min(1,(j+gx-P.top)/$));u.current&&(u.current.style.transform=`scaleX(${X})`);const W=X*(Zn-1);for(let F=0;F<Zn;F++){const U=a.current[F];if(!U)continue;const D=F-W,z=Math.abs(D);U.style.opacity=String(Math.max(0,1-z/Kat)),U.style.transform=d.current?"none":`translate3d(0, ${D*Xat}px, 0)`;const H=z<.5;U.style.zIndex=H?"2":"1",U.style.pointerEvents=H?"auto":"none";const V=z<1.05;o.current[F]!==V&&(o.current[F]=V,U.classList.toggle("feat-panel--near",V))}m(Math.round(W))};let B=0;const A=()=>{if(!T)return;const P=C.getBoundingClientRect(),j=P.height-w.offsetHeight;if(j<=0)return;const $=(T.getBoundingClientRect().top+gx-P.top)/j;if($<=.012||$>=.988)return;const W=(Math.round($*(Zn-1))/(Zn-1)-$)*j;Math.abs(W)<Qat||T.scrollTo({top:T.scrollTop+W,behavior:d.current?"auto":"smooth"})},L=()=>{N||(N=requestAnimationFrame(O)),B&&clearTimeout(B),B=window.setTimeout(A,Zat)};return E.addEventListener("scroll",L,{passive:!0}),window.addEventListener("resize",L),O(),()=>{E.removeEventListener("scroll",L),window.removeEventListener("resize",L),N&&cancelAnimationFrame(N),B&&clearTimeout(B)}},[m]);const v=K.useCallback(C=>{const w=c.current,T=h.current,E=w==null?void 0:w.closest(".shell-main");if(!w||!T||!E){m(C);return}const N=w.getBoundingClientRect(),O=N.height-T.offsetHeight;if(O<=0){m(C);return}const A=C/(Zn-1)*O-(E.getBoundingClientRect().top+gx-N.top);E.scrollTo({top:E.scrollTop+A,behavior:d.current?"auto":"smooth"})},[m]);function _(C){var T;let w=f.current;if(C.key==="ArrowDown"||C.key==="ArrowRight")w=(f.current+1)%Zn;else if(C.key==="ArrowUp"||C.key==="ArrowLeft")w=(f.current-1+Zn)%Zn;else if(C.key==="Home")w=0;else if(C.key==="End")w=Zn-1;else return;C.preventDefault(),m(w),(T=n.current[w])==null||T.focus(),v(w)}return x.jsxs("section",{className:"about-section feat-section",children:[x.jsx("div",{className:"feat-scroller",ref:c,style:{"--feat-track-h":`${Zn*Vat}vh`},children:x.jsxs("div",{className:"feat-sticky",ref:h,children:[x.jsx("p",{className:"about-kicker",children:"Everything inside"}),x.jsx("h2",{className:"about-h2",children:"One brain, many faculties."}),x.jsxs("p",{className:"about-section-lead",children:["Every capability dreamcontext gives your agents — ",x.jsx("em",{children:"scroll to move through them, or pick one."})]}),x.jsxs("div",{className:"feat-spotlight",children:[x.jsxs("div",{className:"feat-rail-wrap",children:[x.jsxs("div",{className:"feat-rail-head","aria-hidden":"true",children:[x.jsxs("span",{className:"feat-rail-step",children:[String(r+1).padStart(2,"0")," ",x.jsxs("i",{children:["/ ",String(Zn).padStart(2,"0")]})]}),x.jsx("div",{className:"feat-rail-track",children:x.jsx("span",{className:"feat-rail-fill",ref:u})})]}),x.jsx("div",{className:"feat-rail",role:"tablist","aria-orientation":"vertical","aria-label":"Core faculties",onKeyDown:_,children:a1.map((C,w)=>{const T=w===r;return x.jsxs("button",{ref:E=>{n.current[w]=E},id:g(w),role:"tab",type:"button","aria-selected":T,"aria-controls":b(w),tabIndex:T?0:-1,className:`feat-rail-item${T?" feat-rail-item--active":""}`,onClick:()=>{m(w),v(w)},children:[x.jsx("span",{className:"feat-rail-title",children:C.title}),C.tag&&x.jsx("span",{className:"feat-rail-tag",children:C.tag})]},C.id)})})]}),x.jsx("div",{className:"feat-stage",children:a1.map((C,w)=>x.jsxs("div",{ref:T=>{a.current[w]=T},className:"feat-panel",role:"tabpanel",id:b(w),"aria-labelledby":g(w),"aria-hidden":w!==r,tabIndex:w===r?0:-1,children:[x.jsxs("div",{className:"feat-stage-head",children:[C.tag&&x.jsx("span",{className:"feat-stage-chip",children:C.tag}),x.jsx("h3",{className:"feat-stage-title",children:C.title})]}),x.jsx("p",{className:"feat-stage-body",children:C.body}),C.flow&&x.jsx(wm,{spec:C.flow,className:"feat-stage-flow"})]},C.id))})]})]})}),x.jsxs("div",{className:"feat-more",children:[x.jsxs("div",{className:"feat-more-head",children:[x.jsx("span",{className:"feat-more-label",children:"Everything else"}),x.jsx("span",{className:"feat-more-count",children:xN.length})]}),x.jsx("div",{className:"feat-more-grid",children:xN.map(C=>x.jsxs("div",{className:"feat-more-card",children:[x.jsx("span",{className:"feat-more-glyph","aria-hidden":"true",children:C.glyph??"✦"}),x.jsxs("div",{className:"feat-more-meta",children:[x.jsx("span",{className:"feat-more-title",children:C.title}),x.jsx("span",{className:"feat-more-tagline",children:C.tagline})]})]},C.id))})]})]})}const tst=[{cmd:"dreamcontext init",hint:"# set up the brain"},{cmd:"dreamcontext dashboard",hint:"# open this dashboard"},{cmd:"dreamcontext sleep",hint:"# consolidate the session"}];function est(){return x.jsxs("section",{className:"closing","aria-labelledby":"closing-heading",children:[x.jsx("h2",{className:"closing-title",id:"closing-heading",children:"So — what is this?"}),x.jsxs("p",{className:"closing-body",children:[x.jsx("strong",{children:"dreamcontext"})," is a small CLI that gives your AI coding agents a structured, persistent brain across sessions. It pre-loads what matters, keeps a living map of your project, and consolidates new knowledge as you go — so you stop paying, every single session, to re-teach the agent what it already learned."]}),x.jsx("div",{className:"closing-cmds",role:"list",children:tst.map(r=>x.jsxs("div",{className:"closing-cmd",role:"listitem",children:[x.jsx("span",{className:"closing-cmd-c","aria-hidden":"true",children:"$"}),x.jsx("span",{className:"closing-cmd-text",children:r.cmd}),x.jsx("span",{className:"closing-cmd-hint",children:r.hint})]},r.cmd))}),x.jsx("p",{className:"closing-foot",children:"You're looking at the dashboard now. The brain graph, tasks, and sleep state in the sidebar are this project's actual memory — live."})]})}function rst(){return x.jsxs("div",{className:"about","data-testid":"about-page",children:[x.jsx(oat,{}),x.jsx(lat,{}),x.jsx(Aat,{}),x.jsx(Bat,{}),x.jsx(Oat,{}),x.jsx(Rat,{}),x.jsx(Fat,{}),x.jsx(Jat,{}),x.jsx(est,{})]})}const ist=new j4({defaultOptions:{queries:{staleTime:5e3,retry:1,refetchOnWindowFocus:!0},mutations:{retry:0}}});function nst({nav:r}){const e=(i,n)=>{const a={tasks:"tasks",features:"features",knowledge:"knowledge",core:"core"};r.navigate(a[i],n)};switch(r.page){case"brain":return x.jsx(Cnt,{onNavigate:e});case"tasks":return x.jsx(FJ,{});case"sleep":return x.jsx(zJ,{});case"core":return x.jsx(ett,{});case"knowledge":return x.jsx(gtt,{});case"features":return x.jsx(mtt,{});case"council":return x.jsx(Znt,{});case"settings":return x.jsx(eat,{});case"packs":return x.jsx(sat,{});case"about":return x.jsx(rst,{})}}class ast extends K.Component{constructor(){super(...arguments);ne(this,"state",{error:null})}static getDerivedStateFromError(i){return{error:i}}render(){return this.state.error?x.jsxs("div",{className:"error-boundary",children:[x.jsx("h1",{children:"Something went wrong."}),x.jsx("p",{children:this.state.error.message}),x.jsx("button",{onClick:()=>window.location.reload(),children:"Reload"})]}):this.props.children}}function sst(){return x.jsx(ast,{children:x.jsx(I4,{client:ist,children:x.jsx(rI,{children:x.jsx(X4,{children:x.jsx(Q4,{children:x.jsx(fQ,{children:r=>x.jsx(nst,{nav:r})})})})})})})}f4.createRoot(document.getElementById("root")).render(x.jsx(K.StrictMode,{children:x.jsx(sst,{})}));export{MM as $,gst as A,Bo as B,C6 as C,Lr as D,O$ as E,l_ as F,xM as G,YH as H,Qq as I,n7 as J,j6 as K,pd as L,fst as M,hm as N,f$ as O,AM as P,dS as Q,Fq as R,Zx as S,WH as T,Id as U,ka as V,yt as W,gt as X,_$ as Y,IH as Z,M as _,E$ as a,yU as a$,Lq as a0,$S as a1,IS as a2,wst as a3,xst as a4,Cst as a5,_st as a6,yst as a7,$1 as a8,kst as a9,oY as aA,sY as aB,aB as aC,Nq as aD,hW as aE,fM as aF,Oq as aG,Dd as aH,dst as aI,cm as aJ,Eg as aK,jtt as aL,CO as aM,Wd as aN,lW as aO,oW as aP,Mq as aQ,L1 as aR,yo as aS,bd as aT,NS as aU,H8 as aV,dH as aW,vO as aX,fO as aY,mU as aZ,wg as a_,bst as aa,Tc as ab,Tst as ac,Sst as ad,vst as ae,DW as af,O3 as ag,Ust as ah,s7 as ai,Qi as aj,Is as ak,wu as al,c_ as am,AO as an,Il as ao,LO as ap,be as aq,Ga as ar,Yt as as,jY as at,qst as au,Hst as av,zst as aw,Qt as ax,Pst as ay,dY as az,T$ as b,Tg as b$,wh as b0,hl as b1,oH as b2,sT as b3,Ca as b4,bU as b5,e_ as b6,gU as b7,_U as b8,kh as b9,oit as bA,prt as bB,re as bC,Bq as bD,frt as bE,iD as bF,CA as bG,El as bH,Dtt as bI,nt as bJ,K as bK,Xrt as bL,cit as bM,hit as bN,x as bO,_A as bP,OH as bQ,TH as bR,DH as bS,am as bT,fU as bU,t_ as bV,xO as bW,jH as bX,bH as bY,sV as bZ,Hd as b_,uH as ba,RH as bb,TU as bc,EH as bd,J1 as be,ZT as bf,Kt as bg,OO as bh,E_ as bi,gn as bj,j8 as bk,B1 as bl,GM as bm,qd as bn,VM as bo,mst as bp,bS as bq,yS as br,_6 as bs,ui as bt,JQ as bu,rr as bv,N_ as bw,lit as bx,sit as by,Qrt as bz,Ke as c,Io as c0,eT as c1,r_ as c2,gO as c3,Ov as c4,lst as c5,ze as c6,BN as c7,h4 as c8,hst as c9,o1 as ca,cst as cb,ce as d,NM as e,ci as f,N$ as g,Ds as h,_a as i,c7 as j,$d as k,Tt as l,MO as m,pst as n,Wst as o,M$ as p,B$ as q,Gst as r,A$ as s,a7 as t,ya as u,eY as v,XH as w,Est as x,Ll as y,S$ as z};