@render-harness/ui 0.1.2 → 0.1.4

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 (97) hide show
  1. package/dist/static/assets/{architectureDiagram-3BPJPVTR-DLNRxqTW.js → architectureDiagram-3BPJPVTR-CFD3Y1kc.js} +2 -2
  2. package/dist/static/assets/{architectureDiagram-3BPJPVTR-DLNRxqTW.js.map → architectureDiagram-3BPJPVTR-CFD3Y1kc.js.map} +1 -1
  3. package/dist/static/assets/{blockDiagram-GPEHLZMM-CCWTkWe6.js → blockDiagram-GPEHLZMM-Elf3j5Yp.js} +3 -3
  4. package/dist/static/assets/{blockDiagram-GPEHLZMM-CCWTkWe6.js.map → blockDiagram-GPEHLZMM-Elf3j5Yp.js.map} +1 -1
  5. package/dist/static/assets/{c4Diagram-AAUBKEIU-qO0tZRXO.js → c4Diagram-AAUBKEIU-COPyA4Y2.js} +2 -2
  6. package/dist/static/assets/{c4Diagram-AAUBKEIU-qO0tZRXO.js.map → c4Diagram-AAUBKEIU-COPyA4Y2.js.map} +1 -1
  7. package/dist/static/assets/{chunk-3OPIFGDE-xcRWDOrg.js → chunk-3OPIFGDE-P0oLihOV.js} +2 -2
  8. package/dist/static/assets/{chunk-3OPIFGDE-xcRWDOrg.js.map → chunk-3OPIFGDE-P0oLihOV.js.map} +1 -1
  9. package/dist/static/assets/{chunk-5ZQYHXKU-B_3UEJ_q.js → chunk-5ZQYHXKU-CCVDVWrS.js} +2 -2
  10. package/dist/static/assets/{chunk-5ZQYHXKU-B_3UEJ_q.js.map → chunk-5ZQYHXKU-CCVDVWrS.js.map} +1 -1
  11. package/dist/static/assets/{chunk-727SXJPM-c1bbIj6N.js → chunk-727SXJPM-CNNkFQDE.js} +2 -2
  12. package/dist/static/assets/{chunk-727SXJPM-c1bbIj6N.js.map → chunk-727SXJPM-CNNkFQDE.js.map} +1 -1
  13. package/dist/static/assets/{chunk-AQP2D5EJ-Wv0w6wvH.js → chunk-AQP2D5EJ-BmW_1ljM.js} +2 -2
  14. package/dist/static/assets/{chunk-AQP2D5EJ-Wv0w6wvH.js.map → chunk-AQP2D5EJ-BmW_1ljM.js.map} +1 -1
  15. package/dist/static/assets/{chunk-KSCS5N6A-BZrceHGX.js → chunk-KSCS5N6A-B2emJsw5.js} +3 -3
  16. package/dist/static/assets/{chunk-KSCS5N6A-BZrceHGX.js.map → chunk-KSCS5N6A-B2emJsw5.js.map} +1 -1
  17. package/dist/static/assets/{chunk-L5ZTLDWV-BAcjEn3C.js → chunk-L5ZTLDWV-DZfwPtSD.js} +2 -2
  18. package/dist/static/assets/{chunk-L5ZTLDWV-BAcjEn3C.js.map → chunk-L5ZTLDWV-DZfwPtSD.js.map} +1 -1
  19. package/dist/static/assets/{chunk-O5CBEL6O-KRO56hHQ.js → chunk-O5CBEL6O-CNfA3Ek9.js} +2 -2
  20. package/dist/static/assets/{chunk-O5CBEL6O-KRO56hHQ.js.map → chunk-O5CBEL6O-CNfA3Ek9.js.map} +1 -1
  21. package/dist/static/assets/classDiagram-4FO5ZUOK-BRBJdDvt.js +2 -0
  22. package/dist/static/assets/{classDiagram-4FO5ZUOK-oexPF7ww.js.map → classDiagram-4FO5ZUOK-BRBJdDvt.js.map} +1 -1
  23. package/dist/static/assets/classDiagram-v2-Q7XG4LA2-CQjk9kLc.js +2 -0
  24. package/dist/static/assets/{classDiagram-v2-Q7XG4LA2-Dc4jeSLj.js.map → classDiagram-v2-Q7XG4LA2-CQjk9kLc.js.map} +1 -1
  25. package/dist/static/assets/{dagre-BM42HDAG-au4dCVgC.js → dagre-BM42HDAG-DovnSGTF.js} +2 -2
  26. package/dist/static/assets/{dagre-BM42HDAG-au4dCVgC.js.map → dagre-BM42HDAG-DovnSGTF.js.map} +1 -1
  27. package/dist/static/assets/{diagram-2AECGRRQ-rJMnDhBW.js → diagram-2AECGRRQ-DL9VAGtd.js} +2 -2
  28. package/dist/static/assets/{diagram-2AECGRRQ-rJMnDhBW.js.map → diagram-2AECGRRQ-DL9VAGtd.js.map} +1 -1
  29. package/dist/static/assets/{diagram-5GNKFQAL-diIxjA-v.js → diagram-5GNKFQAL-Crr9YjF6.js} +2 -2
  30. package/dist/static/assets/{diagram-5GNKFQAL-diIxjA-v.js.map → diagram-5GNKFQAL-Crr9YjF6.js.map} +1 -1
  31. package/dist/static/assets/{diagram-KO2AKTUF-D9IYocVR.js → diagram-KO2AKTUF-B3yOnGTs.js} +2 -2
  32. package/dist/static/assets/{diagram-KO2AKTUF-D9IYocVR.js.map → diagram-KO2AKTUF-B3yOnGTs.js.map} +1 -1
  33. package/dist/static/assets/{diagram-LMA3HP47-BtdvpqaH.js → diagram-LMA3HP47-KALO7OjG.js} +2 -2
  34. package/dist/static/assets/{diagram-LMA3HP47-BtdvpqaH.js.map → diagram-LMA3HP47-KALO7OjG.js.map} +1 -1
  35. package/dist/static/assets/{diagram-OG6HWLK6-CaRkxDoj.js → diagram-OG6HWLK6-D0GPjAxV.js} +2 -2
  36. package/dist/static/assets/{diagram-OG6HWLK6-CaRkxDoj.js.map → diagram-OG6HWLK6-D0GPjAxV.js.map} +1 -1
  37. package/dist/static/assets/{erDiagram-TEJ5UH35-CgifrqeZ.js → erDiagram-TEJ5UH35-ksCvepnP.js} +2 -2
  38. package/dist/static/assets/{erDiagram-TEJ5UH35-CgifrqeZ.js.map → erDiagram-TEJ5UH35-ksCvepnP.js.map} +1 -1
  39. package/dist/static/assets/{flowDiagram-I6XJVG4X-DaguIeM_.js → flowDiagram-I6XJVG4X-BT1bpfq2.js} +2 -2
  40. package/dist/static/assets/{flowDiagram-I6XJVG4X-DaguIeM_.js.map → flowDiagram-I6XJVG4X-BT1bpfq2.js.map} +1 -1
  41. package/dist/static/assets/ganttDiagram-6RSMTGT7-Cg3QTIl7.js +293 -0
  42. package/dist/static/assets/ganttDiagram-6RSMTGT7-Cg3QTIl7.js.map +1 -0
  43. package/dist/static/assets/{gitGraphDiagram-PVQCEYII-Ht-SDjxh.js → gitGraphDiagram-PVQCEYII-AW-DbGHw.js} +2 -2
  44. package/dist/static/assets/{gitGraphDiagram-PVQCEYII-Ht-SDjxh.js.map → gitGraphDiagram-PVQCEYII-AW-DbGHw.js.map} +1 -1
  45. package/dist/static/assets/index-B1CSiQFH.js +260 -0
  46. package/dist/static/assets/index-B1CSiQFH.js.map +1 -0
  47. package/dist/static/assets/{index-luXiT-gK.css → index-BJZaWHUt.css} +1 -1
  48. package/dist/static/assets/{infoDiagram-5YYISTIA-CwLGA7Zu.js → infoDiagram-5YYISTIA-DZzRjoNy.js} +2 -2
  49. package/dist/static/assets/{infoDiagram-5YYISTIA-CwLGA7Zu.js.map → infoDiagram-5YYISTIA-DZzRjoNy.js.map} +1 -1
  50. package/dist/static/assets/init-D6CV0rqX.js +2 -0
  51. package/dist/static/assets/{init-Dfd1k18d.js.map → init-D6CV0rqX.js.map} +1 -1
  52. package/dist/static/assets/{ishikawaDiagram-YF4QCWOH-CaZCrUUR.js → ishikawaDiagram-YF4QCWOH-A-bX4Zu0.js} +2 -2
  53. package/dist/static/assets/{ishikawaDiagram-YF4QCWOH-CaZCrUUR.js.map → ishikawaDiagram-YF4QCWOH-A-bX4Zu0.js.map} +1 -1
  54. package/dist/static/assets/{kanban-definition-UN3LZRKU-DlYha85J.js → kanban-definition-UN3LZRKU-ibATe6sx.js} +2 -2
  55. package/dist/static/assets/{kanban-definition-UN3LZRKU-DlYha85J.js.map → kanban-definition-UN3LZRKU-ibATe6sx.js.map} +1 -1
  56. package/dist/static/assets/{line-GCwXS1Fi.js → line-DvIoplHa.js} +2 -2
  57. package/dist/static/assets/{line-GCwXS1Fi.js.map → line-DvIoplHa.js.map} +1 -1
  58. package/dist/static/assets/linear-D0P02-YR.js +2 -0
  59. package/dist/static/assets/{linear-CTnL8jvu.js.map → linear-D0P02-YR.js.map} +1 -1
  60. package/dist/static/assets/{mindmap-definition-RKZ34NQL-CPJIWJdQ.js → mindmap-definition-RKZ34NQL-BYhA5Frb.js} +2 -2
  61. package/dist/static/assets/{mindmap-definition-RKZ34NQL-CPJIWJdQ.js.map → mindmap-definition-RKZ34NQL-BYhA5Frb.js.map} +1 -1
  62. package/dist/static/assets/{ordinal-DjeI0KOh.js → ordinal-D-PEDSg4.js} +2 -2
  63. package/dist/static/assets/{ordinal-DjeI0KOh.js.map → ordinal-D-PEDSg4.js.map} +1 -1
  64. package/dist/static/assets/{pieDiagram-4H26LBE5-DTVmF_CH.js → pieDiagram-4H26LBE5-qud9ZeDs.js} +2 -2
  65. package/dist/static/assets/{pieDiagram-4H26LBE5-DTVmF_CH.js.map → pieDiagram-4H26LBE5-qud9ZeDs.js.map} +1 -1
  66. package/dist/static/assets/{quadrantDiagram-W4KKPZXB-Bho6zy_y.js → quadrantDiagram-W4KKPZXB-B5lPA7rJ.js} +2 -2
  67. package/dist/static/assets/{quadrantDiagram-W4KKPZXB-Bho6zy_y.js.map → quadrantDiagram-W4KKPZXB-B5lPA7rJ.js.map} +1 -1
  68. package/dist/static/assets/{requirementDiagram-4Y6WPE33-CLyoVwlh.js → requirementDiagram-4Y6WPE33-C0mLADne.js} +2 -2
  69. package/dist/static/assets/{requirementDiagram-4Y6WPE33-CLyoVwlh.js.map → requirementDiagram-4Y6WPE33-C0mLADne.js.map} +1 -1
  70. package/dist/static/assets/{sankeyDiagram-5OEKKPKP-V2yvk-0Z.js → sankeyDiagram-5OEKKPKP-vwfoPxTH.js} +2 -2
  71. package/dist/static/assets/{sankeyDiagram-5OEKKPKP-V2yvk-0Z.js.map → sankeyDiagram-5OEKKPKP-vwfoPxTH.js.map} +1 -1
  72. package/dist/static/assets/{sequenceDiagram-3UESZ5HK-Dp03aXVk.js → sequenceDiagram-3UESZ5HK-DtPUE6ba.js} +2 -2
  73. package/dist/static/assets/{sequenceDiagram-3UESZ5HK-Dp03aXVk.js.map → sequenceDiagram-3UESZ5HK-DtPUE6ba.js.map} +1 -1
  74. package/dist/static/assets/{stateDiagram-AJRCARHV-BEJW-_HK.js → stateDiagram-AJRCARHV-BaeNtGLJ.js} +2 -2
  75. package/dist/static/assets/{stateDiagram-AJRCARHV-BEJW-_HK.js.map → stateDiagram-AJRCARHV-BaeNtGLJ.js.map} +1 -1
  76. package/dist/static/assets/stateDiagram-v2-BHNVJYJU-DbTX_m6G.js +2 -0
  77. package/dist/static/assets/{stateDiagram-v2-BHNVJYJU-Bo19-vKE.js.map → stateDiagram-v2-BHNVJYJU-DbTX_m6G.js.map} +1 -1
  78. package/dist/static/assets/{timeline-definition-PNZ67QCA-C4KTq0mQ.js → timeline-definition-PNZ67QCA-C9H1UzNY.js} +2 -2
  79. package/dist/static/assets/{timeline-definition-PNZ67QCA-C4KTq0mQ.js.map → timeline-definition-PNZ67QCA-C9H1UzNY.js.map} +1 -1
  80. package/dist/static/assets/{vennDiagram-CIIHVFJN-1jmBZPSZ.js → vennDiagram-CIIHVFJN-BpQ2qCN5.js} +2 -2
  81. package/dist/static/assets/{vennDiagram-CIIHVFJN-1jmBZPSZ.js.map → vennDiagram-CIIHVFJN-BpQ2qCN5.js.map} +1 -1
  82. package/dist/static/assets/{wardleyDiagram-YWT4CUSO-A8XYzYTW.js → wardleyDiagram-YWT4CUSO-CQ8dLujr.js} +2 -2
  83. package/dist/static/assets/{wardleyDiagram-YWT4CUSO-A8XYzYTW.js.map → wardleyDiagram-YWT4CUSO-CQ8dLujr.js.map} +1 -1
  84. package/dist/static/assets/{xychartDiagram-2RQKCTM6-CuyUQvFt.js → xychartDiagram-2RQKCTM6-BCRK_Cs-.js} +4 -4
  85. package/dist/static/assets/xychartDiagram-2RQKCTM6-BCRK_Cs-.js.map +1 -0
  86. package/dist/static/index.html +14 -10
  87. package/package.json +14 -13
  88. package/dist/static/assets/classDiagram-4FO5ZUOK-oexPF7ww.js +0 -2
  89. package/dist/static/assets/classDiagram-v2-Q7XG4LA2-Dc4jeSLj.js +0 -2
  90. package/dist/static/assets/ganttDiagram-6RSMTGT7-DIFubQTa.js +0 -293
  91. package/dist/static/assets/ganttDiagram-6RSMTGT7-DIFubQTa.js.map +0 -1
  92. package/dist/static/assets/index-D5tmHkO_.js +0 -228
  93. package/dist/static/assets/index-D5tmHkO_.js.map +0 -1
  94. package/dist/static/assets/init-Dfd1k18d.js +0 -2
  95. package/dist/static/assets/linear-CTnL8jvu.js +0 -2
  96. package/dist/static/assets/stateDiagram-v2-BHNVJYJU-Bo19-vKE.js +0 -2
  97. package/dist/static/assets/xychartDiagram-2RQKCTM6-CuyUQvFt.js.map +0 -1
@@ -1,228 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-BM42HDAG-au4dCVgC.js","./src-DoMhBUqV.js","./chunk-CSCIHK7Q-BBzr5U3o.js","./chunk-O5CBEL6O-KRO56hHQ.js","./chunk-5ZQYHXKU-B_3UEJ_q.js","./dist-C2f1Lbm8.js","./dagre-CKPhbkRL.js","./graphlib-B-xHMrcv.js","./chunk-3OPIFGDE-xcRWDOrg.js","./chunk-L5ZTLDWV-BAcjEn3C.js","./chunk-NZK2D7GU-DuwDtSGJ.js","./rough.esm-C6nrIGLg.js","./chunk-BSJP7CBP-Kr5SHCan.js","./chunk-KSCS5N6A-BZrceHGX.js","./line-GCwXS1Fi.js","./path-BmDdnQs8.js","./array-B4O_ir3H.js","./cose-bilkent-S5V4N54A-CsjsMgdo.js","./cytoscape.esm-C0W7YdOh.js","./c4Diagram-AAUBKEIU-qO0tZRXO.js","./chunk-ND2GUHAM-DHtjIa8_.js","./flowDiagram-I6XJVG4X-DaguIeM_.js","./channel-CAoVqDgM.js","./chunk-2J33WTMH-DaEvWRZX.js","./chunk-55IACEB6-aqMcRzKm.js","./chunk-FMBD7UC4-CiWgEw8O.js","./erDiagram-TEJ5UH35-CgifrqeZ.js","./gitGraphDiagram-PVQCEYII-Ht-SDjxh.js","./mermaid-parser.core-BO_-QleW.js","./chunk-4EGX6M5U-sKH2Isf8.js","./chunk-NNHCCRGN-DSaPFNsL.js","./chunk-5DO6E6H7-DVriMWxp.js","./chunk-BR22UD5L-BCm2xrxa.js","./chunk-FHYWG6QK-B_z4diOF.js","./chunk-MPE355IW-BrU23f3r.js","./chunk-MZUSXYTE-BGj-wpbJ.js","./chunk-N66VUXT2-Bx9F_D4P.js","./chunk-PUPMXCY4-C2l0dHY4.js","./chunk-UIBZB4QT-DXVjm6Jo.js","./chunk-WCWK7LTN-zc10zcLo.js","./chunk-4BX2VUAB-BqYEJTr3.js","./chunk-QZHKN3VN-C51sC6VA.js","./ganttDiagram-6RSMTGT7-DIFubQTa.js","./linear-CTnL8jvu.js","./defaultLocale-BGJ623y0.js","./init-Dfd1k18d.js","./infoDiagram-5YYISTIA-CwLGA7Zu.js","./pieDiagram-4H26LBE5-DTVmF_CH.js","./ordinal-DjeI0KOh.js","./arc-Ck_Wc4j5.js","./quadrantDiagram-W4KKPZXB-Bho6zy_y.js","./xychartDiagram-2RQKCTM6-CuyUQvFt.js","./requirementDiagram-4Y6WPE33-CLyoVwlh.js","./sequenceDiagram-3UESZ5HK-Dp03aXVk.js","./classDiagram-4FO5ZUOK-oexPF7ww.js","./chunk-727SXJPM-c1bbIj6N.js","./classDiagram-v2-Q7XG4LA2-Dc4jeSLj.js","./stateDiagram-AJRCARHV-BEJW-_HK.js","./chunk-AQP2D5EJ-Wv0w6wvH.js","./stateDiagram-v2-BHNVJYJU-Bo19-vKE.js","./journeyDiagram-JHISSGLW-C-j_GoJi.js","./timeline-definition-PNZ67QCA-C4KTq0mQ.js","./mindmap-definition-RKZ34NQL-CPJIWJdQ.js","./kanban-definition-UN3LZRKU-DlYha85J.js","./sankeyDiagram-5OEKKPKP-V2yvk-0Z.js","./diagram-LMA3HP47-BtdvpqaH.js","./diagram-2AECGRRQ-rJMnDhBW.js","./blockDiagram-GPEHLZMM-CCWTkWe6.js","./diagram-5GNKFQAL-diIxjA-v.js","./architectureDiagram-3BPJPVTR-DLNRxqTW.js","./diagram-KO2AKTUF-D9IYocVR.js","./ishikawaDiagram-YF4QCWOH-CaZCrUUR.js","./vennDiagram-CIIHVFJN-1jmBZPSZ.js","./diagram-OG6HWLK6-CaRkxDoj.js","./wardleyDiagram-YWT4CUSO-A8XYzYTW.js","./angular-html-BTPgvNVF.js","./html-Dim8R87k.js","./css-D6U_Ko9J.js","./javascript-BL10MWEh.js","./angular-ts-DlluasyV.js","./scss-Bk85YZ5B.js","./apl-DXNMM5sn.js","./json-ByVheYRi.js","./xml-BGJ8DYcz.js","./java-DCQryRjA.js","./astro-Chivy__8.js","./postcss-B05sTlrk.js","./tsx-CCae5zBp.js","./typescript-DYRUzQ4v.js","./blade-CbK4h373.js","./html-derivative-wv0mpNga.js","./sql-BJUy431w.js","./bsl-CdDFyo5F.js","./sdbl-CFMWR8pX.js","./c-XAfXzHJL.js","./cairo-CCizMn05.js","./python-DdQYuMIU.js","./cobol-D99n3iqc.js","./coffee-D1LQvIkF.js","./cpp-CKg5ZwjL.js","./glsl-Bjsk2TMh.js","./regexp-DcDCrGpo.js","./crystal-CYzaTz8d.js","./shellscript-D7bH9K7P.js","./edge-CkCaSgQh.js","./elixir-CjHA8w1Y.js","./elm-DXIXYSVh.js","./erb-CnzDf1w5.js","./ruby-C8G-I-gY.js","./graphql-Cx4kQnkL.js","./jsx-CXM6RMr-.js","./haml-tmAx7Gde.js","./lua-DLD2Zr6L.js","./yaml-Cc1kud-L.js","./erlang-CNbCQ89n.js","./markdown-YB84TJfD.js","./fortran-fixed-form-BNQstKjF.js","./fortran-free-form-BnXTqrXt.js","./fsharp-CjygqGHI.js","./gdresource-CdJwksfi.js","./gdscript-Bv1IS9z0.js","./gdshader-DkHuiVRJ.js","./git-commit-tF6n3zME.js","./diff-CFBZUcgj.js","./git-rebase-KgX8Og1c.js","./glimmer-js-BGDyd0fi.js","./glimmer-ts-BgpDMnVZ.js","./hack-DUr7hpoX.js","./handlebars-Bjly3GZc.js","./http-BEgFKWFd.js","./hurl-wrVcT4bK.js","./csv-C9AlRNbg.js","./hxml-D3FneN50.js","./haxe-C5IMy4J9.js","./jinja-B6phq7Ig.js","./jison-OaSAm_Y-.js","./julia-CmDZ9WDU.js","./r-BG-aUxp7.js","./just-CXlTXez_.js","./perl-Cbj4nRfk.js","./latex-Dftgeikp.js","./tex-BlSODC1j.js","./liquid-DJaAYdFW.js","./marko-DT7MtIul.js","./less-BvF2kiCY.js","./mdc-Sj7HqqlM.js","./nextflow-ORht-cRv.js","./nextflow-groovy-oNZt-evu.js","./nginx-B8SA1rN2.js","./nim-c4YDKhvV.js","./php-DrQT-g-m.js","./pug-BK4UlN0b.js","./qml-BfKmfN_Y.js","./razor-gw0eNghw.js","./csharp-7zj_5c7P.js","./rst-RXpGCPX3.js","./cmake-Ci4NQnAb.js","./sas-BbMHg9d6.js","./shaderlab-gtHHzeHH.js","./hlsl-Bnp3EqHT.js","./shellsession-BxkAMrvC.js","./soy-BzuqaVTA.js","./sparql-PRQhoTwI.js","./turtle-BdKlZW8d.js","./stata-DbL7Ndl2.js","./surrealql-YEW9swFu.js","./svelte-BsO-M6w8.js","./templ-zMTXDva2.js","./go-DrxTzaFE.js","./ts-tags-Di_YeGim.js","./twig-Dmp-uJhk.js","./vue-Bjt7AYG8.js","./vue-html-DbfHTuzQ.js","./vue-vine-fHOt7AV6.js","./stylus-CrmL_SSE.js","./xsl-DUB-ai0Q.js"])))=>i.map(i=>d[i]);
2
- import{_ as e,b as t,g as n,h as r,p as i,x as a,y as o}from"./src-DoMhBUqV.js";import{$ as s,C as c,E as l,I as u,L as d,N as f,P as p,Q as m,S as h,T as g,V as _,W as v,X as y,Z as b,_ as x,b as S,c as C,et as w,g as T,l as E,m as ee,n as D,p as te,q as ne,r as re,s as ie,t as O,u as k,x as ae}from"./chunk-CSCIHK7Q-BBzr5U3o.js";import{G as oe,a as se,b as ce,d as le,f as A,g as ue,h as de,i as fe,o as pe,v as me,y as he}from"./chunk-5ZQYHXKU-B_3UEJ_q.js";import"./chunk-BSJP7CBP-Kr5SHCan.js";import"./chunk-L5ZTLDWV-BAcjEn3C.js";import"./chunk-NZK2D7GU-DuwDtSGJ.js";import{i as ge,o as _e}from"./chunk-O5CBEL6O-KRO56hHQ.js";import{a as ve,i as ye,s as be}from"./chunk-3OPIFGDE-xcRWDOrg.js";import{a as xe,i as Se,n as Ce,r as we}from"./chunk-KSCS5N6A-BZrceHGX.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Te=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return E(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ne=/\/+/g;function re(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function ie(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function O(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,O(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+re(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(ne,`$&/`)+`/`),O(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ne,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+re(a,u),c+=O(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+re(a,u++),c+=O(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return O(ie(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function k(e,t,n){if(e==null)return e;var r=[],i=0;return O(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ae(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var oe=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},se={map:k,forEach:function(e,t,n){k(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return k(e,function(){t++}),t},toArray:function(e){return k(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=se,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ae}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,oe)}catch(e){oe(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.6`})),Ee=o(((e,t)=>{t.exports=Te()})),De=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,D());else{var t=n(l);t!==null&&re(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&re(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(ee)};else if(typeof MessageChannel<`u`){var te=new MessageChannel,ne=te.port2;te.port1.onmessage=ee,D=function(){ne.postMessage(null)}}else D=function(){_(ee,0)};function re(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,re(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Oe=o(((e,t)=>{t.exports=De()})),ke=o((e=>{var t=Ee();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.6`})),Ae=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ke()})),je=o((e=>{var t=Oe(),n=Ee(),r=Ae();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),ee=Symbol.for(`react.memo_cache_sentinel`),D=Symbol.iterator;function te(e){return typeof e!=`object`||!e?null:(e=D&&e[D]||e[`@@iterator`],typeof e==`function`?e:null)}var ne=Symbol.for(`react.client.reference`);function re(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ne?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?re(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return re(e(t))}catch{}}return null}var ie=Array.isArray,O=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},oe=[],se=-1;function ce(e){return{current:e}}function le(e){0>se||(e.current=oe[se],oe[se]=null,se--)}function A(e,t){se++,oe[se]=e.current,e.current=t}var ue=ce(null),de=ce(null),fe=ce(null),pe=ce(null);function me(e,t){switch(A(fe,t),A(de,e),A(ue,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Ud(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}le(ue),A(ue,e)}function he(){le(ue),le(de),le(fe)}function ge(e){e.memoizedState!==null&&A(pe,e);var t=ue.current,n=Ud(t,e.type);t!==n&&(A(de,e),A(ue,n))}function _e(e){de.current===e&&(le(ue),le(de)),pe.current===e&&(le(pe),$f._currentValue=ae)}var ve,ye;function be(e){if(ve===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ve=t&&t[1]||``,ye=-1<e.stack.indexOf(`
3
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
- `+ve+e+ye}var xe=!1;function Se(e,t){if(!e||xe)return``;xe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5
- `),l=s.split(`
6
- `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7
- `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{xe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?be(n):``}function Ce(e,t){switch(e.tag){case 26:case 27:case 5:return be(e.type);case 16:return be(`Lazy`);case 13:return e.child!==t&&t!==null?be(`Suspense Fallback`):be(`Suspense`);case 19:return be(`SuspenseList`);case 0:case 15:return Se(e.type,!1);case 11:return Se(e.type.render,!1);case 1:return Se(e.type,!0);case 31:return be(`Activity`);default:return``}}function we(e){try{var t=``,n=null;do t+=Ce(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
- Error generating stack: `+e.message+`
9
- `+e.stack}}var Te=Object.prototype.hasOwnProperty,De=t.unstable_scheduleCallback,ke=t.unstable_cancelCallback,je=t.unstable_shouldYield,Me=t.unstable_requestPaint,j=t.unstable_now,Ne=t.unstable_getCurrentPriorityLevel,Pe=t.unstable_ImmediatePriority,Fe=t.unstable_UserBlockingPriority,Ie=t.unstable_NormalPriority,Le=t.unstable_LowPriority,Re=t.unstable_IdlePriority,ze=t.log,Be=t.unstable_setDisableYieldValue,Ve=null,He=null;function Ue(e){if(typeof ze==`function`&&Be(e),He&&typeof He.setStrictMode==`function`)try{He.setStrictMode(Ve,e)}catch{}}var We=Math.clz32?Math.clz32:qe,Ge=Math.log,Ke=Math.LN2;function qe(e){return e>>>=0,e===0?32:31-(Ge(e)/Ke|0)|0}var Je=256,Ye=262144,Xe=4194304;function Ze(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Qe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ze(n))):i=Ze(o):i=Ze(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ze(n))):i=Ze(o)):i=Ze(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function $e(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function et(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 tt(){var e=Xe;return Xe<<=1,!(Xe&62914560)&&(Xe=4194304),e}function nt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function rt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function it(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-We(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&at(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function at(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-We(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function M(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-We(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ot(e,t){var n=t&-t;return n=n&42?1:st(n),(n&(e.suspendedLanes|t))===0?n:0}function st(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ct(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function lt(){var e=k.p;return e===0?(e=window.event,e===void 0?32:hp(e.type)):e}function ut(e,t){var n=k.p;try{return k.p=e,t()}finally{k.p=n}}var dt=Math.random().toString(36).slice(2),ft=`__reactFiber$`+dt,pt=`__reactProps$`+dt,mt=`__reactContainer$`+dt,ht=`__reactEvents$`+dt,gt=`__reactListeners$`+dt,_t=`__reactHandles$`+dt,vt=`__reactResources$`+dt,yt=`__reactMarker$`+dt;function bt(e){delete e[ft],delete e[pt],delete e[ht],delete e[gt],delete e[_t]}function xt(e){var t=e[ft];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mt]||n[ft]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ff(e);e!==null;){if(n=e[ft])return n;e=ff(e)}return t}e=n,n=e.parentNode}return null}function St(e){if(e=e[ft]||e[mt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ct(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function wt(e){var t=e[vt];return t||=e[vt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Tt(e){e[yt]=!0}var Et=new Set,Dt={};function Ot(e,t){kt(e,t),kt(e+`Capture`,t)}function kt(e,t){for(Dt[e]=t,e=0;e<t.length;e++)Et.add(t[e])}var At=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]*$`),jt={},Mt={};function Nt(e){return Te.call(Mt,e)?!0:Te.call(jt,e)?!1:At.test(e)?Mt[e]=!0:(jt[e]=!0,!1)}function Pt(e,t,n){if(Nt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Ft(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function It(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Lt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Rt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function zt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Bt(e){if(!e._valueTracker){var t=Rt(e)?`checked`:`value`;e._valueTracker=zt(e,t,``+e[t])}}function Vt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Rt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Ht(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ut=/[\n"\\]/g;function Wt(e){return e.replace(Ut,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Gt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Lt(t)):e.value!==``+Lt(t)&&(e.value=``+Lt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):qt(e,o,Lt(n)):qt(e,o,Lt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Lt(s):e.removeAttribute(`name`)}function Kt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Bt(e);return}n=n==null?``:``+Lt(n),t=t==null?n:``+Lt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Bt(e)}function qt(e,t,n){t===`number`&&Ht(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Jt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Lt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Yt(e,t,n){if(t!=null&&(t=``+Lt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Lt(n)}function Xt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ie(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Lt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Bt(e)}function N(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zt=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 Qt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Zt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function $t(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Qt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Qt(e,o,t[o])}function en(e){if(e.indexOf(`-`)===-1)return!1;switch(e){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 tn=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`]]),nn=/^[\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 rn(e){return nn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function an(){}var on=null;function sn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cn=null,ln=null;function un(e){var t=St(e);if(t&&(e=t.stateNode)){var n=e[pt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Gt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Wt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[pt]||null;if(!a)throw Error(i(90));Gt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Vt(r)}break a;case`textarea`:Yt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Jt(e,!!n.multiple,t,!1)}}}var dn=!1;function fn(e,t,n){if(dn)return e(t,n);dn=!0;try{return e(t)}finally{if(dn=!1,(cn!==null||ln!==null)&&(Tu(),cn&&(t=cn,e=ln,ln=cn=null,un(t),e)))for(t=0;t<e.length;t++)un(e[t])}}function pn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[pt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var P=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),mn=!1;if(P)try{var hn={};Object.defineProperty(hn,`passive`,{get:function(){mn=!0}}),window.addEventListener(`test`,hn,hn),window.removeEventListener(`test`,hn,hn)}catch{mn=!1}var gn=null,_n=null,vn=null;function yn(){if(vn)return vn;var e,t=_n,n=t.length,r,i=`value`in gn?gn.value:gn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return vn=i.slice(e,1<r?1-r:void 0)}function bn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function xn(){return!0}function Sn(){return!1}function Cn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?xn:Sn,this.isPropagationStopped=Sn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=xn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=xn)},persist:function(){},isPersistent:xn}),t}var wn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tn=Cn(wn),En=f({},wn,{view:0,detail:0}),Dn=Cn(En),On,kn,An,jn=f({},En,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==An&&(An&&e.type===`mousemove`?(On=e.screenX-An.screenX,kn=e.screenY-An.screenY):kn=On=0,An=e),On)},movementY:function(e){return`movementY`in e?e.movementY:kn}}),Mn=Cn(jn),Nn=Cn(f({},jn,{dataTransfer:0})),Pn=Cn(f({},En,{relatedTarget:0})),Fn=Cn(f({},wn,{animationName:0,elapsedTime:0,pseudoElement:0})),In=Cn(f({},wn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Ln=Cn(f({},wn,{data:0})),Rn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},zn={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`},Bn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Vn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Bn[e])?!!t[e]:!1}function Hn(){return Vn}var Un=Cn(f({},En,{key:function(e){if(e.key){var t=Rn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=bn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?zn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hn,charCode:function(e){return e.type===`keypress`?bn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?bn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Wn=Cn(f({},jn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Gn=Cn(f({},En,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hn})),Kn=Cn(f({},wn,{propertyName:0,elapsedTime:0,pseudoElement:0})),qn=Cn(f({},jn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Jn=Cn(f({},wn,{newState:0,oldState:0})),Yn=[9,13,27,32],Xn=P&&`CompositionEvent`in window,Zn=null;P&&`documentMode`in document&&(Zn=document.documentMode);var Qn=P&&`TextEvent`in window&&!Zn,$n=P&&(!Xn||Zn&&8<Zn&&11>=Zn),er=` `,tr=!1;function nr(e,t){switch(e){case`keyup`:return Yn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function rr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ir=!1;function ar(e,t){switch(e){case`compositionend`:return rr(t);case`keypress`:return t.which===32?(tr=!0,er):null;case`textInput`:return e=t.data,e===er&&tr?null:e;default:return null}}function or(e,t){if(ir)return e===`compositionend`||!Xn&&nr(e,t)?(e=yn(),vn=_n=gn=null,ir=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return $n&&t.locale!==`ko`?null:t.data;default:return null}}var sr={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 cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!sr[e.type]:t===`textarea`}function lr(e,t,n,r){cn?ln?ln.push(r):ln=[r]:cn=r,t=Dd(t,`onChange`),0<t.length&&(n=new Tn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ur=null,dr=null;function fr(e){bd(e,0)}function pr(e){if(Vt(Ct(e)))return e}function mr(e,t){if(e===`change`)return t}var hr=!1;if(P){var gr;if(P){var _r=`oninput`in document;if(!_r){var vr=document.createElement(`div`);vr.setAttribute(`oninput`,`return;`),_r=typeof vr.oninput==`function`}gr=_r}else gr=!1;hr=gr&&(!document.documentMode||9<document.documentMode)}function yr(){ur&&(ur.detachEvent(`onpropertychange`,br),dr=ur=null)}function br(e){if(e.propertyName===`value`&&pr(dr)){var t=[];lr(t,dr,e,sn(e)),fn(fr,t)}}function xr(e,t,n){e===`focusin`?(yr(),ur=t,dr=n,ur.attachEvent(`onpropertychange`,br)):e===`focusout`&&yr()}function Sr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return pr(dr)}function Cr(e,t){if(e===`click`)return pr(t)}function wr(e,t){if(e===`input`||e===`change`)return pr(t)}function Tr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Er=typeof Object.is==`function`?Object.is:Tr;function Dr(e,t){if(Er(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Te.call(t,i)||!Er(e[i],t[i]))return!1}return!0}function F(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Or(e,t){var n=F(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=F(n)}}function kr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ar(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ht(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ht(e.document)}return t}function jr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Mr=P&&`documentMode`in document&&11>=document.documentMode,Nr=null,Pr=null,Fr=null,Ir=!1;function Lr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ir||Nr==null||Nr!==Ht(r)||(r=Nr,`selectionStart`in r&&jr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Fr&&Dr(Fr,r)||(Fr=r,r=Dd(Pr,`onSelect`),0<r.length&&(t=new Tn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Nr)))}function Rr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var zr={animationend:Rr(`Animation`,`AnimationEnd`),animationiteration:Rr(`Animation`,`AnimationIteration`),animationstart:Rr(`Animation`,`AnimationStart`),transitionrun:Rr(`Transition`,`TransitionRun`),transitionstart:Rr(`Transition`,`TransitionStart`),transitioncancel:Rr(`Transition`,`TransitionCancel`),transitionend:Rr(`Transition`,`TransitionEnd`)},Br={},Vr={};P&&(Vr=document.createElement(`div`).style,`AnimationEvent`in window||(delete zr.animationend.animation,delete zr.animationiteration.animation,delete zr.animationstart.animation),`TransitionEvent`in window||delete zr.transitionend.transition);function Hr(e){if(Br[e])return Br[e];if(!zr[e])return e;var t=zr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Vr)return Br[e]=t[n];return e}var Ur=Hr(`animationend`),Wr=Hr(`animationiteration`),Gr=Hr(`animationstart`),Kr=Hr(`transitionrun`),qr=Hr(`transitionstart`),Jr=Hr(`transitioncancel`),Yr=Hr(`transitionend`),Xr=new Map,Zr=`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(` `);Zr.push(`scrollEnd`);function Qr(e,t){Xr.set(e,t),Ot(t,[e])}var $r=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ei=[],ti=0,ni=0;function ri(){for(var e=ti,t=ni=ti=0;t<e;){var n=ei[t];ei[t++]=null;var r=ei[t];ei[t++]=null;var i=ei[t];ei[t++]=null;var a=ei[t];if(ei[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&si(n,i,a)}}function ii(e,t,n,r){ei[ti++]=e,ei[ti++]=t,ei[ti++]=n,ei[ti++]=r,ni|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ai(e,t,n,r){return ii(e,t,n,r),ci(e)}function oi(e,t){return ii(e,null,null,t),ci(e)}function si(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-We(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ci(e){if(50<gu)throw gu=0,_u=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var li={};function ui(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function di(e,t,n,r){return new ui(e,t,n,r)}function fi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pi(e,t){var n=e.alternate;return n===null?(n=di(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function mi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function hi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)fi(e)&&(s=1);else if(typeof e==`string`)s=Wf(e,n,ue.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=di(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return gi(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=di(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=di(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=di(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=di(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function gi(e,t,n,r){return e=di(7,e,r,t),e.lanes=n,e}function _i(e,t,n){return e=di(6,e,null,t),e.lanes=n,e}function vi(e){var t=di(18,null,null,0);return t.stateNode=e,t}function yi(e,t,n){return t=di(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var bi=new WeakMap;function xi(e,t){if(typeof e==`object`&&e){var n=bi.get(e);return n===void 0?(t={value:e,source:t,stack:we(t)},bi.set(e,t),t):n}return{value:e,source:t,stack:we(t)}}var Si=[],Ci=0,wi=null,Ti=0,Ei=[],Di=0,Oi=null,ki=1,Ai=``;function ji(e,t){Si[Ci++]=Ti,Si[Ci++]=wi,wi=e,Ti=t}function Mi(e,t,n){Ei[Di++]=ki,Ei[Di++]=Ai,Ei[Di++]=Oi,Oi=e;var r=ki;e=Ai;var i=32-We(r)-1;r&=~(1<<i),n+=1;var a=32-We(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ki=1<<32-We(t)+i|n<<i|r,Ai=a+e}else ki=1<<a|n<<i|r,Ai=e}function Ni(e){e.return!==null&&(ji(e,1),Mi(e,1,0))}function Pi(e){for(;e===wi;)wi=Si[--Ci],Si[Ci]=null,Ti=Si[--Ci],Si[Ci]=null;for(;e===Oi;)Oi=Ei[--Di],Ei[Di]=null,Ai=Ei[--Di],Ei[Di]=null,ki=Ei[--Di],Ei[Di]=null}function Fi(e,t){Ei[Di++]=ki,Ei[Di++]=Ai,Ei[Di++]=Oi,ki=t.id,Ai=t.overflow,Oi=e}var Ii=null,Li=null,I=!1,Ri=null,zi=!1,Bi=Error(i(519));function Vi(e){throw qi(xi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Bi}function Hi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ft]=e,t[pt]=r,n){case`dialog`:Z(`cancel`,t),Z(`close`,t);break;case`iframe`:case`object`:case`embed`:Z(`load`,t);break;case`video`:case`audio`:for(n=0;n<vd.length;n++)Z(vd[n],t);break;case`source`:Z(`error`,t);break;case`img`:case`image`:case`link`:Z(`error`,t),Z(`load`,t);break;case`details`:Z(`toggle`,t);break;case`input`:Z(`invalid`,t),Kt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Z(`invalid`,t);break;case`textarea`:Z(`invalid`,t),Xt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Nd(t.textContent,n)?(r.popover!=null&&(Z(`beforetoggle`,t),Z(`toggle`,t)),r.onScroll!=null&&Z(`scroll`,t),r.onScrollEnd!=null&&Z(`scrollend`,t),r.onClick!=null&&(t.onclick=an),t=!0):t=!1,t||Vi(e,!0)}function Ui(e){for(Ii=e.return;Ii;)switch(Ii.tag){case 5:case 31:case 13:zi=!1;return;case 27:case 3:zi=!0;return;default:Ii=Ii.return}}function Wi(e){if(e!==Ii)return!1;if(!I)return Ui(e),I=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Wd(e.type,e.memoizedProps)),n=!n),n&&Li&&Vi(e),Ui(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Li=df(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Li=df(e)}else t===27?(t=Li,Qd(e.type)?(e=uf,uf=null,Li=e):Li=t):Li=Ii?lf(e.stateNode.nextSibling):null;return!0}function Gi(){Li=Ii=null,I=!1}function Ki(){var e=Ri;return e!==null&&(nu===null?nu=e:nu.push.apply(nu,e),Ri=null),e}function qi(e){Ri===null?Ri=[e]:Ri.push(e)}var Ji=ce(null),Yi=null,Xi=null;function Zi(e,t,n){A(Ji,t._currentValue),t._currentValue=n}function Qi(e){e._currentValue=Ji.current,le(Ji)}function $i(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ea(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),$i(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),$i(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ta(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Er(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===pe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[$f]:e.push($f))}a=a.return}e!==null&&ea(t,e,n,r),t.flags|=262144}function na(e){for(e=e.firstContext;e!==null;){if(!Er(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ra(e){Yi=e,Xi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ia(e){return oa(Yi,e)}function aa(e,t){return Yi===null&&ra(e),oa(e,t)}function oa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Xi===null){if(e===null)throw Error(i(308));Xi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Xi=Xi.next=t;return n}var sa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ca=t.unstable_scheduleCallback,la=t.unstable_NormalPriority,ua={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function da(){return{controller:new sa,data:new Map,refCount:0}}function fa(e){e.refCount--,e.refCount===0&&ca(la,function(){e.controller.abort()})}var pa=null,ma=0,ha=0,ga=null;function _a(e,t){if(pa===null){var n=pa=[];ma=0,ha=fd(),ga={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ma++,t.then(va,va),t}function va(){if(--ma===0&&pa!==null){ga!==null&&(ga.status=`fulfilled`);var e=pa;pa=null,ha=0,ga=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ya(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ba=O.S;O.S=function(e,t){au=j(),typeof t==`object`&&t&&typeof t.then==`function`&&_a(e,t),ba!==null&&ba(e,t)};var xa=ce(null);function Sa(){var e=xa.current;return e===null?Ul.pooledCache:e}function Ca(e,t){t===null?A(xa,xa.current):A(xa,t.pool)}function wa(){var e=Sa();return e===null?null:{parent:ua._currentValue,pool:e}}var Ta=Error(i(460)),Ea=Error(i(474)),Da=Error(i(542)),Oa={then:function(){}};function ka(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Aa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(an,an),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Pa(e),e;default:if(typeof t.status==`string`)t.then(an,an);else{if(e=Ul,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Pa(e),e}throw Ma=t,Ta}}function ja(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ma=e,Ta):e}}var Ma=null;function Na(){if(Ma===null)throw Error(i(459));var e=Ma;return Ma=null,e}function Pa(e){if(e===Ta||e===Da)throw Error(i(483))}var Fa=null,Ia=0;function La(e){var t=Ia;return Ia+=1,Fa===null&&(Fa=[]),Aa(Fa,e,t)}function Ra(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function za(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ba(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=pi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=_i(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&ja(i)===t.type)?(t=a(t,n.props),Ra(t,n),t.return=e,t):(t=hi(n.type,n.key,n.props,null,e.mode,r),Ra(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=yi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=gi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=_i(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=hi(t.type,t.key,t.props,null,e.mode,n),Ra(n,t),n.return=e,n;case h:return t=yi(t,e.mode,n),t.return=e,t;case T:return t=ja(t),f(e,t,n)}if(ie(t)||te(t))return t=gi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,La(t),n);if(t.$$typeof===b)return f(e,aa(e,t),n);za(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=ja(n),p(e,t,n,r)}if(ie(n)||te(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,La(n),r);if(n.$$typeof===b)return p(e,t,aa(e,n),r);za(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=ja(r),_(e,t,n,r,i)}if(ie(r)||te(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,La(r),i);if(r.$$typeof===b)return _(e,t,n,aa(t,r),i);za(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),I&&ji(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return I&&ji(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),I&&ji(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),I&&ji(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return I&&ji(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),I&&ji(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&ja(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ra(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=gi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=hi(o.type,o.key,o.props,null,e.mode,c),Ra(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=yi(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=ja(o),x(e,r,o,c)}if(ie(o))return v(e,r,o,c);if(te(o)){if(l=te(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,La(o),c);if(o.$$typeof===b)return x(e,r,aa(e,o),c);za(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=_i(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ia=0;var i=x(e,t,n,r);return Fa=null,i}catch(t){if(t===Ta||t===Da)throw t;var a=di(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Va=Ba(!0),Ha=Ba(!1),Ua=!1;function Wa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ga(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,H&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ci(e),si(e,null,n),t}return ii(e,r,t,n),ci(e)}function Ja(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,M(e,n)}}function Ya(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Xa=!1;function Za(){if(Xa){var e=ga;if(e!==null)throw e}}function Qa(e,t,n,r){Xa=!1;var i=e.updateQueue;Ua=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(W&p)===p:(r&p)===p){p!==0&&p===ha&&(Xa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ua=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Xl|=o,e.lanes=o,e.memoizedState=d}}function $a(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function eo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)$a(n[e],t)}var to=ce(null),no=ce(0);function ro(e,t){e=Jl,A(no,e),A(to,t),Jl=e|t.baseLanes}function io(){A(no,Jl),A(to,to.current)}function ao(){Jl=no.current,le(to),le(no)}var oo=ce(null),so=null;function co(e){var t=e.alternate;A(mo,mo.current&1),A(oo,e),so===null&&(t===null||to.current!==null||t.memoizedState!==null)&&(so=e)}function lo(e){A(mo,mo.current),A(oo,e),so===null&&(so=e)}function uo(e){e.tag===22?(A(mo,mo.current),A(oo,e),so===null&&(so=e)):fo(e)}function fo(){A(mo,mo.current),A(oo,oo.current)}function po(e){le(oo),so===e&&(so=null),le(mo)}var mo=ce(0);function ho(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||of(n)||sf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var go=0,L=null,R=null,_o=null,vo=!1,yo=!1,bo=!1,xo=0,So=0,Co=null,wo=0;function To(){throw Error(i(321))}function Eo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Er(e[n],t[n]))return!1;return!0}function Do(e,t,n,r,i,a){return go=a,L=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?Ws:Gs,bo=!1,a=n(r,i),bo=!1,yo&&(a=ko(t,n,r,i)),Oo(e),a}function Oo(e){O.H=Us;var t=R!==null&&R.next!==null;if(go=0,_o=R=L=null,vo=!1,So=0,Co=null,t)throw Error(i(300));e===null||cc||(e=e.dependencies,e!==null&&na(e)&&(cc=!0))}function ko(e,t,n,r){L=e;var a=0;do{if(yo&&(Co=null),So=0,yo=!1,25<=a)throw Error(i(301));if(a+=1,_o=R=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}O.H=Ks,o=t(n,r)}while(yo);return o}function Ao(){var e=O.H,t=e.useState()[0];return t=typeof t.then==`function`?Lo(t):t,e=e.useState()[0],(R===null?null:R.memoizedState)!==e&&(L.flags|=1024),t}function jo(){var e=xo!==0;return xo=0,e}function Mo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function No(e){if(vo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}vo=!1}go=0,_o=R=L=null,yo=!1,So=xo=0,Co=null}function Po(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _o===null?L.memoizedState=_o=e:_o=_o.next=e,_o}function Fo(){if(R===null){var e=L.alternate;e=e===null?null:e.memoizedState}else e=R.next;var t=_o===null?L.memoizedState:_o.next;if(t!==null)_o=t,R=e;else{if(e===null)throw L.alternate===null?Error(i(467)):Error(i(310));R=e,e={memoizedState:R.memoizedState,baseState:R.baseState,baseQueue:R.baseQueue,queue:R.queue,next:null},_o===null?L.memoizedState=_o=e:_o=_o.next=e}return _o}function Io(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lo(e){var t=So;return So+=1,Co===null&&(Co=[]),e=Aa(Co,e,t),t=L,(_o===null?t.memoizedState:_o.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?Ws:Gs),e}function Ro(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Lo(e);if(e.$$typeof===b)return ia(e)}throw Error(i(438,String(e)))}function zo(e){var t=null,n=L.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=L.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Io(),L.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ee;return t.index++,n}function Bo(e,t){return typeof t==`function`?t(e):t}function Vo(e){return Ho(Fo(),R,e)}function Ho(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(go&f)===f:(W&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ha&&(d=!0);else if((go&p)===p){u=u.next,p===ha&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,L.lanes|=p,Xl|=p;f=u.action,bo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,L.lanes|=f,Xl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Er(o,e.memoizedState)&&(cc=!0,d&&(n=ga,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Uo(e){var t=Fo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Er(o,t.memoizedState)||(cc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Wo(e,t,n){var r=L,a=Fo(),o=I;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Er((R||a).memoizedState,n);if(s&&(a.memoizedState=n,cc=!0),a=a.queue,hs(qo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||_o!==null&&_o.memoizedState.tag&1){if(r.flags|=2048,us(9,{destroy:void 0},Ko.bind(null,r,a,n,t),null),Ul===null)throw Error(i(349));o||go&127||Go(r,t,n)}return n}function Go(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=L.updateQueue,t===null?(t=Io(),L.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ko(e,t,n,r){t.value=n,t.getSnapshot=r,Jo(t)&&Yo(e)}function qo(e,t,n){return n(function(){Jo(t)&&Yo(e)})}function Jo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Er(e,n)}catch{return!0}}function Yo(e){var t=oi(e,2);t!==null&&bu(t,e,2)}function Xo(e){var t=Po();if(typeof e==`function`){var n=e;if(e=n(),bo){Ue(!0);try{n()}finally{Ue(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:e},t}function Zo(e,t,n,r){return e.baseState=n,Ho(e,R,typeof r==`function`?r:Bo)}function Qo(e,t,n,r,a){if(Bs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};O.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,$o(t,o)):(o.next=n.next,t.pending=n.next=o)}}function $o(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=O.T,o={};O.T=o;try{var s=n(i,r),c=O.S;c!==null&&c(o,s),es(e,t,s)}catch(n){ns(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),O.T=a}}else try{a=n(i,r),es(e,t,a)}catch(n){ns(e,t,n)}}function es(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ts(e,t,n)},function(n){return ns(e,t,n)}):ts(e,t,n)}function ts(e,t,n){t.status=`fulfilled`,t.value=n,rs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,$o(e,n)))}function ns(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,rs(t),t=t.next;while(t!==r)}e.action=null}function rs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function is(e,t){return t}function as(e,t){if(I){var n=Ul.formState;if(n!==null){a:{var r=L;if(I){if(Li){b:{for(var i=Li,a=zi;i.nodeType!==8;){if(!a){i=null;break b}if(i=lf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Li=lf(i.nextSibling),r=i.data===`F!`;break a}}Vi(r)}r=!1}r&&(t=n[0])}}return n=Po(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:t},n.queue=r,n=Ls.bind(null,L,r),r.dispatch=n,r=Xo(!1),a=zs.bind(null,L,!1,r.queue),r=Po(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Qo.bind(null,L,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function os(e){return ss(Fo(),R,e)}function ss(e,t,n){if(t=Ho(e,t,is)[0],e=Vo(Bo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Lo(t)}catch(e){throw e===Ta?Da:e}else r=t;t=Fo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(L.flags|=2048,us(9,{destroy:void 0},cs.bind(null,i,n),null)),[r,a,e]}function cs(e,t){e.action=t}function ls(e){var t=Fo(),n=R;if(n!==null)return ss(t,n,e);Fo(),t=t.memoizedState,n=Fo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function us(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=L.updateQueue,t===null&&(t=Io(),L.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ds(){return Fo().memoizedState}function fs(e,t,n,r){var i=Po();L.flags|=e,i.memoizedState=us(1|t,{destroy:void 0},n,r===void 0?null:r)}function ps(e,t,n,r){var i=Fo();r=r===void 0?null:r;var a=i.memoizedState.inst;R!==null&&r!==null&&Eo(r,R.memoizedState.deps)?i.memoizedState=us(t,a,n,r):(L.flags|=e,i.memoizedState=us(1|t,a,n,r))}function ms(e,t){fs(8390656,8,e,t)}function hs(e,t){ps(2048,8,e,t)}function gs(e){L.flags|=4;var t=L.updateQueue;if(t===null)t=Io(),L.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function _s(e){var t=Fo().memoizedState;return gs({ref:t,nextImpl:e}),function(){if(H&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function vs(e,t){return ps(4,2,e,t)}function ys(e,t){return ps(4,4,e,t)}function bs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function xs(e,t,n){n=n==null?null:n.concat([e]),ps(4,4,bs.bind(null,t,e),n)}function Ss(){}function Cs(e,t){var n=Fo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Eo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ws(e,t){var n=Fo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Eo(t,r[1]))return r[0];if(r=e(),bo){Ue(!0);try{e()}finally{Ue(!1)}}return n.memoizedState=[r,t],r}function Ts(e,t,n){return n===void 0||go&1073741824&&!(W&261930)?e.memoizedState=t:(e.memoizedState=n,e=yu(),L.lanes|=e,Xl|=e,n)}function Es(e,t,n,r){return Er(n,t)?n:to.current===null?!(go&42)||go&1073741824&&!(W&261930)?(cc=!0,e.memoizedState=n):(e=yu(),L.lanes|=e,Xl|=e,t):(e=Ts(e,n,r),Er(e,t)||(cc=!0),e)}function Ds(e,t,n,r,i){var a=k.p;k.p=a!==0&&8>a?a:8;var o=O.T,s={};O.T=s,zs(e,!1,t,n);try{var c=i(),l=O.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Rs(e,t,ya(c,r),vu(e)):Rs(e,t,r,vu(e))}catch(n){Rs(e,t,{then:function(){},status:`rejected`,reason:n},vu())}finally{k.p=a,o!==null&&s.types!==null&&(o.types=s.types),O.T=o}}function Os(){}function ks(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=As(e).queue;Ds(e,a,t,ae,n===null?Os:function(){return js(e),n(r)})}function As(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:ae},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function js(e){var t=As(e);t.next===null&&(t=e.alternate.memoizedState),Rs(e,t.next.queue,{},vu())}function Ms(){return ia($f)}function Ns(){return Fo().memoizedState}function Ps(){return Fo().memoizedState}function Fs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=vu();e=Ka(n);var r=qa(t,e,n);r!==null&&(bu(r,t,n),Ja(r,t,n)),t={cache:da()},e.payload=t;return}t=t.return}}function Is(e,t,n){var r=vu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Bs(e)?Vs(t,n):(n=ai(e,t,n,r),n!==null&&(bu(n,e,r),Hs(n,t,r)))}function Ls(e,t,n){Rs(e,t,n,vu())}function Rs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bs(e))Vs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Er(s,o))return ii(e,t,i,0),Ul===null&&ri(),!1}catch{}if(n=ai(e,t,i,r),n!==null)return bu(n,e,r),Hs(n,t,r),!0}return!1}function zs(e,t,n,r){if(r={lane:2,revertLane:fd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Bs(e)){if(t)throw Error(i(479))}else t=ai(e,n,r,2),t!==null&&bu(t,e,2)}function Bs(e){var t=e.alternate;return e===L||t!==null&&t===L}function Vs(e,t){yo=vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,M(e,n)}}var Us={readContext:ia,use:Ro,useCallback:To,useContext:To,useEffect:To,useImperativeHandle:To,useLayoutEffect:To,useInsertionEffect:To,useMemo:To,useReducer:To,useRef:To,useState:To,useDebugValue:To,useDeferredValue:To,useTransition:To,useSyncExternalStore:To,useId:To,useHostTransitionStatus:To,useFormState:To,useActionState:To,useOptimistic:To,useMemoCache:To,useCacheRefresh:To};Us.useEffectEvent=To;var Ws={readContext:ia,use:Ro,useCallback:function(e,t){return Po().memoizedState=[e,t===void 0?null:t],e},useContext:ia,useEffect:ms,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),fs(4194308,4,bs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fs(4194308,4,e,t)},useInsertionEffect:function(e,t){fs(4,2,e,t)},useMemo:function(e,t){var n=Po();t=t===void 0?null:t;var r=e();if(bo){Ue(!0);try{e()}finally{Ue(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Po();if(n!==void 0){var i=n(t);if(bo){Ue(!0);try{n(t)}finally{Ue(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Is.bind(null,L,e),[r.memoizedState,e]},useRef:function(e){var t=Po();return e={current:e},t.memoizedState=e},useState:function(e){e=Xo(e);var t=e.queue,n=Ls.bind(null,L,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ss,useDeferredValue:function(e,t){return Ts(Po(),e,t)},useTransition:function(){var e=Xo(!1);return e=Ds.bind(null,L,e.queue,!0,!1),Po().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=L,a=Po();if(I){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Ul===null)throw Error(i(349));W&127||Go(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ms(qo.bind(null,r,o,e),[e]),r.flags|=2048,us(9,{destroy:void 0},Ko.bind(null,r,o,n,t),null),n},useId:function(){var e=Po(),t=Ul.identifierPrefix;if(I){var n=Ai,r=ki;n=(r&~(1<<32-We(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=xo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=wo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ms,useFormState:as,useActionState:as,useOptimistic:function(e){var t=Po();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=zs.bind(null,L,!0,n),n.dispatch=t,[e,t]},useMemoCache:zo,useCacheRefresh:function(){return Po().memoizedState=Fs.bind(null,L)},useEffectEvent:function(e){var t=Po(),n={impl:e};return t.memoizedState=n,function(){if(H&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Gs={readContext:ia,use:Ro,useCallback:Cs,useContext:ia,useEffect:hs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:Vo,useRef:ds,useState:function(){return Vo(Bo)},useDebugValue:Ss,useDeferredValue:function(e,t){return Es(Fo(),R.memoizedState,e,t)},useTransition:function(){var e=Vo(Bo)[0],t=Fo().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:Ns,useHostTransitionStatus:Ms,useFormState:os,useActionState:os,useOptimistic:function(e,t){return Zo(Fo(),R,e,t)},useMemoCache:zo,useCacheRefresh:Ps};Gs.useEffectEvent=_s;var Ks={readContext:ia,use:Ro,useCallback:Cs,useContext:ia,useEffect:hs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:Uo,useRef:ds,useState:function(){return Uo(Bo)},useDebugValue:Ss,useDeferredValue:function(e,t){var n=Fo();return R===null?Ts(n,e,t):Es(n,R.memoizedState,e,t)},useTransition:function(){var e=Uo(Bo)[0],t=Fo().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:Ns,useHostTransitionStatus:Ms,useFormState:ls,useActionState:ls,useOptimistic:function(e,t){var n=Fo();return R===null?(n.baseState=e,[e,n.queue.dispatch]):Zo(n,R,e,t)},useMemoCache:zo,useCacheRefresh:Ps};Ks.useEffectEvent=_s;function qs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Js={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=vu(),i=Ka(r);i.payload=t,n!=null&&(i.callback=n),t=qa(e,i,r),t!==null&&(bu(t,e,r),Ja(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=vu(),i=Ka(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=qa(e,i,r),t!==null&&(bu(t,e,r),Ja(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=vu(),r=Ka(n);r.tag=2,t!=null&&(r.callback=t),t=qa(e,r,n),t!==null&&(bu(t,e,n),Ja(t,e,n))}};function Ys(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Dr(n,r)||!Dr(i,a):!0}function Xs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Js.enqueueReplaceState(t,t.state,null)}function Zs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Qs(e){$r(e)}function $s(e){console.error(e)}function ec(e){$r(e)}function tc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function nc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function rc(e,t,n){return n=Ka(n),n.tag=3,n.payload={element:null},n.callback=function(){tc(e,t)},n}function ic(e){return e=Ka(e),e.tag=3,e}function ac(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){nc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){nc(t,n,r),typeof i!=`function`&&(cu===null?cu=new Set([this]):cu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function oc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ta(t,n,a,!0),n=oo.current,n!==null){switch(n.tag){case 31:case 13:return so===null?Mu():n.alternate===null&&Yl===0&&(Yl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Oa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Xu(e,r,a)),!1;case 22:return n.flags|=65536,r===Oa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Xu(e,r,a)),!1}throw Error(i(435,n.tag))}return Xu(e,r,a),Mu(),!1}if(I)return t=oo.current,t===null?(r!==Bi&&(t=Error(i(423),{cause:r}),qi(xi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=xi(r,n),a=rc(e.stateNode,r,a),Ya(e,a),Yl!==4&&(Yl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Bi&&(e=Error(i(422),{cause:r}),qi(xi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=xi(o,n),tu===null?tu=[o]:tu.push(o),Yl!==4&&(Yl=2),t===null)return!0;r=xi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=rc(n.stateNode,r,e),Ya(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(cu===null||!cu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=ic(a),ac(a,e,n,r),Ya(n,a),!1}n=n.return}while(n!==null);return!1}var sc=Error(i(461)),cc=!1;function lc(e,t,n,r){t.child=e===null?Ha(t,null,n,r):Va(t,e.child,n,r)}function uc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ra(t),r=Do(e,t,n,o,a,i),s=jo(),e!==null&&!cc?(Mo(e,t,i),Pc(e,t,i)):(I&&s&&Ni(t),t.flags|=1,lc(e,t,r,i),t.child)}function dc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!fi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,fc(e,t,a,r,i)):(e=hi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Fc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Dr:n,n(o,r)&&e.ref===t.ref)return Pc(e,t,i)}return t.flags|=1,e=pi(a,r),e.ref=t.ref,e.return=t,t.child=e}function fc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Dr(a,r)&&e.ref===t.ref)if(cc=!1,t.pendingProps=r=a,Fc(e,i))e.flags&131072&&(cc=!0);else return t.lanes=e.lanes,Pc(e,t,i)}return bc(e,t,n,r,i)}function pc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return hc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ca(t,a===null?null:a.cachePool),a===null?io():ro(t,a),uo(t);else return r=t.lanes=536870912,hc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ca(t,null),io(),fo(t)):(Ca(t,a.cachePool),ro(t,a),fo(t),t.memoizedState=null);return lc(e,t,i,n),t.child}function mc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function hc(e,t,n,r,i){var a=Sa();return a=a===null?null:{parent:ua._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ca(t,null),io(),uo(t),e!==null&&ta(e,t,r,!0),t.childLanes=i,null}function gc(e,t){return t=kc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function _c(e,t,n){return Va(t,e.child,null,n),e=gc(t,t.pendingProps),e.flags|=2,po(t),t.memoizedState=null,e}function vc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(I){if(r.mode===`hidden`)return e=gc(t,r),t.lanes=536870912,mc(null,e);if(lo(t),(e=Li)?(e=af(e,zi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Oi===null?null:{id:ki,overflow:Ai},retryLane:536870912,hydrationErrors:null},n=vi(e),n.return=t,t.child=n,Ii=t,Li=null)):e=null,e===null)throw Vi(t);return t.lanes=536870912,null}return gc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(lo(t),a)if(t.flags&256)t.flags&=-257,t=_c(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(cc||ta(e,t,n,!1),a=(n&e.childLanes)!==0,cc||a){if(r=Ul,r!==null&&(s=ot(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,oi(e,s),bu(r,e,s),sc;Mu(),t=_c(e,t,n)}else e=o.treeContext,Li=lf(s.nextSibling),Ii=t,I=!0,Ri=null,zi=!1,e!==null&&Fi(t,e),t=gc(t,r),t.flags|=4096;return t}return e=pi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function yc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function bc(e,t,n,r,i){return ra(t),n=Do(e,t,n,r,void 0,i),r=jo(),e!==null&&!cc?(Mo(e,t,i),Pc(e,t,i)):(I&&r&&Ni(t),t.flags|=1,lc(e,t,n,i),t.child)}function xc(e,t,n,r,i,a){return ra(t),t.updateQueue=null,n=ko(t,r,n,i),Oo(e),r=jo(),e!==null&&!cc?(Mo(e,t,a),Pc(e,t,a)):(I&&r&&Ni(t),t.flags|=1,lc(e,t,n,a),t.child)}function Sc(e,t,n,r,i){if(ra(t),t.stateNode===null){var a=li,o=n.contextType;typeof o==`object`&&o&&(a=ia(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Js,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Wa(t),o=n.contextType,a.context=typeof o==`object`&&o?ia(o):li,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(qs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Js.enqueueReplaceState(a,a.state,null),Qa(t,r,a,i),Za(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Zs(n,s);a.props=c;var l=a.context,u=n.contextType;o=li,typeof u==`object`&&u&&(o=ia(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Xs(t,a,r,o),Ua=!1;var f=t.memoizedState;a.state=f,Qa(t,r,a,i),Za(),l=t.memoizedState,s||f!==l||Ua?(typeof d==`function`&&(qs(t,n,d,r),l=t.memoizedState),(c=Ua||Ys(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ga(e,t),o=t.memoizedProps,u=Zs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=li,typeof l==`object`&&l&&(c=ia(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Xs(t,a,r,c),Ua=!1,f=t.memoizedState,a.state=f,Qa(t,r,a,i),Za();var p=t.memoizedState;o!==d||f!==p||Ua||e!==null&&e.dependencies!==null&&na(e.dependencies)?(typeof s==`function`&&(qs(t,n,s,r),p=t.memoizedState),(u=Ua||Ys(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&na(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,yc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Va(t,e.child,null,i),t.child=Va(t,null,n,i)):lc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Pc(e,t,i),e}function Cc(e,t,n,r){return Gi(),t.flags|=256,lc(e,t,n,r),t.child}var wc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tc(e){return{baseLanes:e,cachePool:wa()}}function Ec(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=$l),e}function Dc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(mo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(I){if(a?co(t):fo(t),(e=Li)?(e=af(e,zi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Oi===null?null:{id:ki,overflow:Ai},retryLane:536870912,hydrationErrors:null},n=vi(e),n.return=t,t.child=n,Ii=t,Li=null)):e=null,e===null)throw Vi(t);return sf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(fo(t),a=t.mode,c=kc({mode:`hidden`,children:c},a),r=gi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Tc(n),r.childLanes=Ec(e,s,n),t.memoizedState=wc,mc(null,r)):(co(t),Oc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(co(t),t.flags&=-257,t=Ac(e,t,n)):t.memoizedState===null?(fo(t),c=r.fallback,a=t.mode,r=kc({mode:`visible`,children:r.children},a),c=gi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Va(t,e.child,null,n),r=t.child,r.memoizedState=Tc(n),r.childLanes=Ec(e,s,n),t.memoizedState=wc,t=mc(null,r)):(fo(t),t.child=e.child,t.flags|=128,t=null);else if(co(t),sf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,qi({value:r,source:null,stack:null}),t=Ac(e,t,n)}else if(cc||ta(e,t,n,!1),s=(n&e.childLanes)!==0,cc||s){if(s=Ul,s!==null&&(r=ot(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,oi(e,r),bu(s,e,r),sc;of(c)||Mu(),t=Ac(e,t,n)}else of(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Li=lf(c.nextSibling),Ii=t,I=!0,Ri=null,zi=!1,e!==null&&Fi(t,e),t=Oc(t,r.children),t.flags|=4096);return t}return a?(fo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=pi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=gi(c,a,n,null),c.flags|=2):c=pi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,mc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Tc(n):(a=c.cachePool,a===null?a=wa():(l=ua._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Ec(e,s,n),t.memoizedState=wc,mc(e.child,r)):(co(t),n=e.child,e=n.sibling,n=pi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Oc(e,t){return t=kc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function kc(e,t){return e=di(22,e,null,t),e.lanes=0,e}function Ac(e,t,n){return Va(t,e.child,null,n),e=Oc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function jc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$i(e.return,t,n)}function Mc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Nc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=mo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,A(mo,o),lc(e,t,r,n),r=I?Ti:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jc(e,n,t);else if(e.tag===19)jc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ho(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Mc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ho(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Mc(t,!0,n,null,a,r);break;case`together`:Mc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Pc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ta(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=pi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=pi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Fc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&na(e))):!0}function Ic(e,t,n){switch(t.tag){case 3:me(t,t.stateNode.containerInfo),Zi(t,ua,e.memoizedState.cache),Gi();break;case 27:case 5:ge(t);break;case 4:me(t,t.stateNode.containerInfo);break;case 10:Zi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,lo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(co(t),e=Pc(e,t,n),e===null?null:e.sibling):Dc(e,t,n):(co(t),t.flags|=128,null);co(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ta(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Nc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),A(mo,mo.current),r)break;return null;case 22:return t.lanes=0,pc(e,t,n,t.pendingProps);case 24:Zi(t,ua,e.memoizedState.cache)}return Pc(e,t,n)}function Lc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)cc=!0;else{if(!Fc(e,n)&&!(t.flags&128))return cc=!1,Ic(e,t,n);cc=!!(e.flags&131072)}else cc=!1,I&&t.flags&1048576&&Mi(t,Ti,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ja(t.elementType),t.type=e,typeof e==`function`)fi(e)?(r=Zs(e,r),t.tag=1,t=Sc(null,t,e,r,n)):(t.tag=0,t=bc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=uc(null,t,e,r,n);break a}else if(a===w){t.tag=14,t=dc(null,t,e,r,n);break a}}throw t=re(e)||e,Error(i(306,t,``))}}return t;case 0:return bc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Zs(r,t.pendingProps),Sc(e,t,r,a,n);case 3:a:{if(me(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ga(e,t),Qa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Zi(t,ua,r),r!==o.cache&&ea(t,[ua],n,!0),Za(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Cc(e,t,r,n);break a}else if(r!==a){a=xi(Error(i(424)),t),qi(a),t=Cc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Li=lf(e.firstChild),Ii=t,I=!0,Ri=null,zi=!0,n=Ha(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Gi(),r===a){t=Pc(e,t,n);break a}lc(e,t,r,n)}t=t.child}return t;case 26:return yc(e,t),e===null?(n=Af(t.type,null,t.pendingProps,null))?t.memoizedState=n:I||(n=t.type,e=t.pendingProps,r=Vd(fe.current).createElement(n),r[ft]=t,r[pt]=e,Fd(r,n,e),Tt(r),t.stateNode=r):t.memoizedState=Af(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ge(t),e===null&&I&&(r=t.stateNode=pf(t.type,t.pendingProps,fe.current),Ii=t,zi=!0,a=Li,Qd(t.type)?(uf=a,Li=lf(r.firstChild)):Li=a),lc(e,t,t.pendingProps.children,n),yc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&I&&((a=r=Li)&&(r=nf(r,t.type,t.pendingProps,zi),r===null?a=!1:(t.stateNode=r,Ii=t,Li=lf(r.firstChild),zi=!1,a=!0)),a||Vi(t)),ge(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Wd(a,o)?r=null:s!==null&&Wd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Do(e,t,Ao,null,null,n),$f._currentValue=a),yc(e,t),lc(e,t,r,n),t.child;case 6:return e===null&&I&&((e=n=Li)&&(n=rf(n,t.pendingProps,zi),n===null?e=!1:(t.stateNode=n,Ii=t,Li=null,e=!0)),e||Vi(t)),null;case 13:return Dc(e,t,n);case 4:return me(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Va(t,null,r,n):lc(e,t,r,n),t.child;case 11:return uc(e,t,t.type,t.pendingProps,n);case 7:return lc(e,t,t.pendingProps,n),t.child;case 8:return lc(e,t,t.pendingProps.children,n),t.child;case 12:return lc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Zi(t,t.type,r.value),lc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ra(t),a=ia(a),r=r(a),t.flags|=1,lc(e,t,r,n),t.child;case 14:return dc(e,t,t.type,t.pendingProps,n);case 15:return fc(e,t,t.type,t.pendingProps,n);case 19:return Nc(e,t,n);case 31:return vc(e,t,n);case 22:return pc(e,t,n,t.pendingProps);case 24:return ra(t),r=ia(ua),e===null?(a=Sa(),a===null&&(a=Ul,o=da(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Wa(t),Zi(t,ua,a)):((e.lanes&n)!==0&&(Ga(e,t),Qa(t,null,null,n),Za()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Zi(t,ua,r),r!==a.cache&&ea(t,[ua],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Zi(t,ua,r))),lc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Rc(e){e.flags|=4}function zc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(ku())e.flags|=8192;else throw Ma=Oa,Ea}else e.flags&=-16777217}function Bc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Gf(t))if(ku())e.flags|=8192;else throw Ma=Oa,Ea}function Vc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:tt(),e.lanes|=t,eu|=t)}function Hc(e,t){if(!I)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Uc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Wc(e,t,n){var r=t.pendingProps;switch(Pi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Uc(t),null;case 1:return Uc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Qi(ua),he(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Wi(t)?Rc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ki())),Uc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Rc(t),o===null?(Uc(t),zc(t,a,null,r,n)):(Uc(t),Bc(t,o))):o?o===e.memoizedState?(Uc(t),t.flags&=-16777217):(Rc(t),Uc(t),Bc(t,o)):(e=e.memoizedProps,e!==r&&Rc(t),Uc(t),zc(t,a,e,r,n)),null;case 27:if(_e(t),n=fe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Uc(t),null}e=ue.current,Wi(t)?Hi(t,e):(e=pf(a,r,n),t.stateNode=e,Rc(t))}return Uc(t),null;case 5:if(_e(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Uc(t),null}if(o=ue.current,Wi(t))Hi(t,o);else{var s=Vd(fe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ft]=t,o[pt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Fd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Rc(t)}}return Uc(t),zc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=fe.current,Wi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ii,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ft]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Nd(e.nodeValue,n)),e||Vi(t,!0)}else e=Vd(e).createTextNode(r),e[ft]=t,t.stateNode=e}return Uc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Wi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ft]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Uc(t),e=!1}else n=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(po(t),t):(po(t),null);if(t.flags&128)throw Error(i(558))}return Uc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Wi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ft]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Uc(t),a=!1}else a=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(po(t),t):(po(t),null)}return po(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Vc(t,t.updateQueue),Uc(t),null);case 4:return he(),e===null&&Cd(t.stateNode.containerInfo),Uc(t),null;case 10:return Qi(t.type),Uc(t),null;case 19:if(le(mo),r=t.memoizedState,r===null)return Uc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Hc(r,!1);else{if(Yl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ho(e),o!==null){for(t.flags|=128,Hc(r,!1),e=o.updateQueue,t.updateQueue=e,Vc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)mi(n,e),n=n.sibling;return A(mo,mo.current&1|2),I&&ji(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&j()>ou&&(t.flags|=128,a=!0,Hc(r,!1),t.lanes=4194304)}else{if(!a)if(e=ho(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Vc(t,e),Hc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!I)return Uc(t),null}else 2*j()-r.renderingStartTime>ou&&n!==536870912&&(t.flags|=128,a=!0,Hc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Uc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=j(),e.sibling=null,n=mo.current,A(mo,a?n&1|2:n&1),I&&ji(t,r.treeForkCount),e);case 22:case 23:return po(t),ao(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Uc(t),t.subtreeFlags&6&&(t.flags|=8192)):Uc(t),n=t.updateQueue,n!==null&&Vc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&le(xa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Qi(ua),Uc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Gc(e,t){switch(Pi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qi(ua),he(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(po(t),t.alternate===null)throw Error(i(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(po(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return le(mo),null;case 4:return he(),null;case 10:return Qi(t.type),null;case 22:case 23:return po(t),ao(),e!==null&&le(xa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qi(ua),null;case 25:return null;default:return null}}function Kc(e,t){switch(Pi(t),t.tag){case 3:Qi(ua),he();break;case 26:case 27:case 5:_e(t);break;case 4:he();break;case 31:t.memoizedState!==null&&po(t);break;case 13:po(t);break;case 19:le(mo);break;case 10:Qi(t.type);break;case 22:case 23:po(t),ao(),e!==null&&le(xa);break;case 24:Qi(ua)}}function qc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){K(t,t.return,e)}}function Jc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){K(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){K(t,t.return,e)}}function Yc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{eo(t,n)}catch(t){K(e,e.return,t)}}}function Xc(e,t,n){n.props=Zs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){K(e,t,n)}}function Zc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){K(e,t,n)}}function Qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){K(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){K(e,t,n)}else n.current=null}function $c(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){K(e,e.return,t)}}function el(e,t,n){try{var r=e.stateNode;Id(r,e.type,n,t),r[pt]=t}catch(t){K(e,e.return,t)}}function tl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Qd(e.type)||e.tag===4}function nl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||tl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Qd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=an));else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Fd(t,r,n),t[ft]=e,t[pt]=n}catch(t){K(e,e.return,t)}}var ol=!1,sl=!1,cl=!1,ll=typeof WeakSet==`function`?WeakSet:Set,ul=null;function dl(e,t){if(e=e.containerInfo,zd=cp,e=Ar(e),jr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Bd={focusedElem:e,selectionRange:n},cp=!1,ul=t;ul!==null;)if(t=ul,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ul=e;else for(;ul!==null;){switch(t=ul,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Zs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){K(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)tf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:tf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ul=e;break}ul=t.return}}function fl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:wl(e,n),r&4&&qc(5,n);break;case 1:if(wl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){K(n,n.return,e)}else{var i=Zs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){K(n,n.return,e)}}r&64&&Yc(n),r&512&&Zc(n,n.return);break;case 3:if(wl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{eo(e,t)}catch(e){K(n,n.return,e)}}break;case 27:t===null&&r&4&&al(n);case 26:case 5:wl(e,n),t===null&&r&4&&$c(n),r&512&&Zc(n,n.return);break;case 12:wl(e,n);break;case 31:wl(e,n),r&4&&vl(e,n);break;case 13:wl(e,n),r&4&&yl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=$u.bind(null,n),cf(e,n))));break;case 22:if(r=n.memoizedState!==null||ol,!r){t=t!==null&&t.memoizedState!==null||sl,i=ol;var a=sl;ol=r,(sl=t)&&!a?El(e,n,(n.subtreeFlags&8772)!=0):wl(e,n),ol=i,sl=a}break;case 30:break;default:wl(e,n)}}function pl(e){var t=e.alternate;t!==null&&(e.alternate=null,pl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ml=null,hl=!1;function gl(e,t,n){for(n=n.child;n!==null;)_l(e,t,n),n=n.sibling}function _l(e,t,n){if(He&&typeof He.onCommitFiberUnmount==`function`)try{He.onCommitFiberUnmount(Ve,n)}catch{}switch(n.tag){case 26:sl||Qc(n,t),gl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:sl||Qc(n,t);var r=ml,i=hl;Qd(n.type)&&(ml=n.stateNode,hl=!1),gl(e,t,n),mf(n.stateNode),ml=r,hl=i;break;case 5:sl||Qc(n,t);case 6:if(r=ml,i=hl,ml=null,gl(e,t,n),ml=r,hl=i,ml!==null)if(hl)try{(ml.nodeType===9?ml.body:ml.nodeName===`HTML`?ml.ownerDocument.body:ml).removeChild(n.stateNode)}catch(e){K(n,t,e)}else try{ml.removeChild(n.stateNode)}catch(e){K(n,t,e)}break;case 18:ml!==null&&(hl?(e=ml,$d(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Pp(e)):$d(ml,n.stateNode));break;case 4:r=ml,i=hl,ml=n.stateNode.containerInfo,hl=!0,gl(e,t,n),ml=r,hl=i;break;case 0:case 11:case 14:case 15:Jc(2,n,t),sl||Jc(4,n,t),gl(e,t,n);break;case 1:sl||(Qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Xc(n,t,r)),gl(e,t,n);break;case 21:gl(e,t,n);break;case 22:sl=(r=sl)||n.memoizedState!==null,gl(e,t,n),sl=r;break;default:gl(e,t,n)}}function vl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Pp(e)}catch(e){K(t,t.return,e)}}}function yl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Pp(e)}catch(e){K(t,t.return,e)}}function bl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ll),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ll),t;default:throw Error(i(435,e.tag))}}function xl(e,t){var n=bl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=ed.bind(null,e,t);t.then(r,r)}})}function z(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Qd(c.type)){ml=c.stateNode,hl=!1;break a}break;case 5:ml=c.stateNode,hl=!1;break a;case 3:case 4:ml=c.stateNode.containerInfo,hl=!0;break a}c=c.return}if(ml===null)throw Error(i(160));_l(o,s,a),ml=null,hl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Sl(t,e),t=t.sibling}var B=null;function Sl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:z(t,e),V(e),r&4&&(Jc(3,e,e.return),qc(3,e),Jc(5,e,e.return));break;case 1:z(t,e),V(e),r&512&&(sl||n===null||Qc(n,n.return)),r&64&&ol&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=B;if(z(t,e),V(e),r&512&&(sl||n===null||Qc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[yt]||o[ft]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Fd(o,r,n),o[ft]=e,Tt(o),r=o;break a;case`link`:var s=Hf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Fd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Hf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Fd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ft]=e,Tt(o),r=o}e.stateNode=r}else Uf(a,e.type,e.stateNode);else e.stateNode=Lf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&el(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Uf(a,e.type,e.stateNode):Lf(a,r,e.memoizedProps))}break;case 27:z(t,e),V(e),r&512&&(sl||n===null||Qc(n,n.return)),n!==null&&r&4&&el(e,e.memoizedProps,n.memoizedProps);break;case 5:if(z(t,e),V(e),r&512&&(sl||n===null||Qc(n,n.return)),e.flags&32){a=e.stateNode;try{N(a,``)}catch(t){K(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,el(e,a,n===null?a:n.memoizedProps)),r&1024&&(cl=!0);break;case 6:if(z(t,e),V(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){K(e,e.return,t)}}break;case 3:if(Vf=null,a=B,B=_f(t.containerInfo),z(t,e),B=a,V(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Pp(t.containerInfo)}catch(t){K(e,e.return,t)}cl&&(cl=!1,Cl(e));break;case 4:r=B,B=_f(e.stateNode.containerInfo),z(t,e),V(e),B=r;break;case 12:z(t,e),V(e);break;case 31:z(t,e),V(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 13:z(t,e),V(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(iu=j()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=ol,d=sl;if(ol=u||a,sl=d||l,z(t,e),sl=d,ol=u,V(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||ol||sl||Tl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){K(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){K(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?ef(m,!0):ef(l.stateNode,!1)}catch(e){K(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,xl(e,n))));break;case 19:z(t,e),V(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 30:break;case 21:break;default:z(t,e),V(e)}}function V(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(tl(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;il(e,nl(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(N(o,``),n.flags&=-33),il(e,nl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;rl(e,nl(e),s);break;default:throw Error(i(161))}}catch(t){K(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Cl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Cl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function wl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)fl(e,t.alternate,t),t=t.sibling}function Tl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Jc(4,t,t.return),Tl(t);break;case 1:Qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Xc(t,t.return,n),Tl(t);break;case 27:mf(t.stateNode);case 26:case 5:Qc(t,t.return),Tl(t);break;case 22:t.memoizedState===null&&Tl(t);break;case 30:Tl(t);break;default:Tl(t)}e=e.sibling}}function El(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:El(i,a,n),qc(4,a);break;case 1:if(El(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){K(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)$a(c[i],s)}catch(e){K(r,r.return,e)}}n&&o&64&&Yc(a),Zc(a,a.return);break;case 27:al(a);case 26:case 5:El(i,a,n),n&&r===null&&o&4&&$c(a),Zc(a,a.return);break;case 12:El(i,a,n);break;case 31:El(i,a,n),n&&o&4&&vl(i,a);break;case 13:El(i,a,n),n&&o&4&&yl(i,a);break;case 22:a.memoizedState===null&&El(i,a,n),Zc(a,a.return);break;case 30:break;default:El(i,a,n)}t=t.sibling}}function Dl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&fa(n))}function Ol(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e))}function kl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Al(e,t,n,r),t=t.sibling}function Al(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:kl(e,t,n,r),i&2048&&qc(9,t);break;case 1:kl(e,t,n,r);break;case 3:kl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e)));break;case 12:if(i&2048){kl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){K(t,t.return,e)}}else kl(e,t,n,r);break;case 31:kl(e,t,n,r);break;case 13:kl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?kl(e,t,n,r):(a._visibility|=2,jl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?kl(e,t,n,r):Ml(e,t),i&2048&&Dl(o,t);break;case 24:kl(e,t,n,r),i&2048&&Ol(t.alternate,t);break;default:kl(e,t,n,r)}}function jl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:jl(a,o,s,c,i),qc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,jl(a,o,s,c,i)):u._visibility&2?jl(a,o,s,c,i):Ml(a,o),i&&l&2048&&Dl(o.alternate,o);break;case 24:jl(a,o,s,c,i),i&&l&2048&&Ol(o.alternate,o);break;default:jl(a,o,s,c,i)}t=t.sibling}}function Ml(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ml(n,r),i&2048&&Dl(r.alternate,r);break;case 24:Ml(n,r),i&2048&&Ol(r.alternate,r);break;default:Ml(n,r)}t=t.sibling}}var Nl=8192;function Pl(e,t,n){if(e.subtreeFlags&Nl)for(e=e.child;e!==null;)Fl(e,t,n),e=e.sibling}function Fl(e,t,n){switch(e.tag){case 26:Pl(e,t,n),e.flags&Nl&&e.memoizedState!==null&&Kf(n,B,e.memoizedState,e.memoizedProps);break;case 5:Pl(e,t,n);break;case 3:case 4:var r=B;B=_f(e.stateNode.containerInfo),Pl(e,t,n),B=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Nl,Nl=16777216,Pl(e,t,n),Nl=r):Pl(e,t,n));break;default:Pl(e,t,n)}}function Il(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Bl(r,e)}Il(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rl(e),e=e.sibling}function Rl(e){switch(e.tag){case 0:case 11:case 15:Ll(e),e.flags&2048&&Jc(9,e,e.return);break;case 3:Ll(e);break;case 12:Ll(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zl(e)):Ll(e);break;default:Ll(e)}}function zl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Bl(r,e)}Il(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Jc(8,t,t.return),zl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,zl(t));break;default:zl(t)}e=e.sibling}}function Bl(e,t){for(;ul!==null;){var n=ul;switch(n.tag){case 0:case 11:case 15:Jc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:fa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ul=r;else a:for(n=e;ul!==null;){r=ul;var i=r.sibling,a=r.return;if(pl(r),r===n){ul=null;break a}if(i!==null){i.return=a,ul=i;break a}ul=a}}}var Vl={getCacheForType:function(e){var t=ia(ua),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ia(ua).controller.signal}},Hl=typeof WeakMap==`function`?WeakMap:Map,H=0,Ul=null,U=null,W=0,G=0,Wl=null,Gl=!1,Kl=!1,ql=!1,Jl=0,Yl=0,Xl=0,Zl=0,Ql=0,$l=0,eu=0,tu=null,nu=null,ru=!1,iu=0,au=0,ou=1/0,su=null,cu=null,lu=0,uu=null,du=null,fu=0,pu=0,mu=null,hu=null,gu=0,_u=null;function vu(){return H&2&&W!==0?W&-W:O.T===null?lt():fd()}function yu(){if($l===0)if(!(W&536870912)||I){var e=Ye;Ye<<=1,!(Ye&3932160)&&(Ye=262144),$l=e}else $l=536870912;return e=oo.current,e!==null&&(e.flags|=32),$l}function bu(e,t,n){(e===Ul&&(G===2||G===9)||e.cancelPendingCommit!==null)&&(Du(e,0),wu(e,W,$l,!1)),rt(e,n),(!(H&2)||e!==Ul)&&(e===Ul&&(!(H&2)&&(Zl|=n),Yl===4&&wu(e,W,$l,!1)),X(e))}function xu(e,t,n){if(H&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||$e(e,t),a=r?Fu(e,t):Nu(e,t,!0),o=r;do{if(a===0){Kl&&!r&&wu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Cu(n)){a=Nu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=tu;var l=c.current.memoizedState.isDehydrated;if(l&&(Du(c,s).flags|=256),s=Nu(c,s,!1),s!==2){if(ql&&!l){c.errorRecoveryDisabledLanes|=o,Zl|=o,a=4;break a}o=nu,nu=a,o!==null&&(nu===null?nu=o:nu.push.apply(nu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Du(e,0),wu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:wu(r,t,$l,!Gl);break a;case 2:nu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=iu+300-j(),10<a)){if(wu(r,t,$l,!Gl),Qe(r,0,!0)!==0)break a;fu=t,r.timeoutHandle=qd(Su.bind(null,r,n,nu,su,ru,t,$l,Zl,eu,Gl,o,`Throttled`,-0,0),a);break a}Su(r,n,nu,su,ru,t,$l,Zl,eu,Gl,o,null,-0,0)}}break}while(1);X(e)}function Su(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:an},Fl(t,a,d);var m=(a&62914560)===a?iu-j():(a&4194048)===a?au-j():0;if(m=Jf(d,m),m!==null){fu=a,e.cancelPendingCommit=m(Hu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),wu(e,a,o,!l);return}}Hu(e,t,a,n,r,i,o,s,c)}function Cu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Er(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function wu(e,t,n,r){t&=~Ql,t&=~Zl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-We(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&at(e,n,t)}function Tu(){return H&6?!0:(ad(0,!1),!1)}function Eu(){if(U!==null){if(G===0)var e=U.return;else e=U,Xi=Yi=null,No(e),Fa=null,Ia=0,e=U;for(;e!==null;)Kc(e.alternate,e),e=e.return;U=null}}function Du(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Jd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),fu=0,Eu(),Ul=e,U=n=pi(e.current,null),W=t,G=0,Wl=null,Gl=!1,Kl=$e(e,t),ql=!1,eu=$l=Ql=Zl=Xl=Yl=0,nu=tu=null,ru=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-We(r),a=1<<i;t|=e[i],r&=~a}return Jl=t,ri(),n}function Ou(e,t){L=null,O.H=Us,t===Ta||t===Da?(t=Na(),G=3):t===Ea?(t=Na(),G=4):G=t===sc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Wl=t,U===null&&(Yl=1,tc(e,xi(t,e.current)))}function ku(){var e=oo.current;return e===null?!0:(W&4194048)===W?so===null:(W&62914560)===W||W&536870912?e===so:!1}function Au(){var e=O.H;return O.H=Us,e===null?Us:e}function ju(){var e=O.A;return O.A=Vl,e}function Mu(){Yl=4,Gl||(W&4194048)!==W&&oo.current!==null||(Kl=!0),!(Xl&134217727)&&!(Zl&134217727)||Ul===null||wu(Ul,W,$l,!1)}function Nu(e,t,n){var r=H;H|=2;var i=Au(),a=ju();(Ul!==e||W!==t)&&(su=null,Du(e,t)),t=!1;var o=Yl;a:do try{if(G!==0&&U!==null){var s=U,c=Wl;switch(G){case 8:Eu(),o=6;break a;case 3:case 2:case 9:case 6:oo.current===null&&(t=!0);var l=G;if(G=0,Wl=null,zu(e,s,c,l),n&&Kl){o=0;break a}break;default:l=G,G=0,Wl=null,zu(e,s,c,l)}}Pu(),o=Yl;break}catch(t){Ou(e,t)}while(1);return t&&e.shellSuspendCounter++,Xi=Yi=null,H=r,O.H=i,O.A=a,U===null&&(Ul=null,W=0,ri()),o}function Pu(){for(;U!==null;)Lu(U)}function Fu(e,t){var n=H;H|=2;var r=Au(),a=ju();Ul!==e||W!==t?(su=null,ou=j()+500,Du(e,t)):Kl=$e(e,t);a:do try{if(G!==0&&U!==null){t=U;var o=Wl;b:switch(G){case 1:G=0,Wl=null,zu(e,t,o,1);break;case 2:case 9:if(ka(o)){G=0,Wl=null,Ru(t);break}t=function(){G!==2&&G!==9||Ul!==e||(G=7),X(e)},o.then(t,t);break a;case 3:G=7;break a;case 4:G=5;break a;case 7:ka(o)?(G=0,Wl=null,Ru(t)):(G=0,Wl=null,zu(e,t,o,7));break;case 5:var s=null;switch(U.tag){case 26:s=U.memoizedState;case 5:case 27:var c=U;if(s?Gf(s):c.stateNode.complete){G=0,Wl=null;var l=c.sibling;if(l!==null)U=l;else{var u=c.return;u===null?U=null:(U=u,Bu(u))}break b}}G=0,Wl=null,zu(e,t,o,5);break;case 6:G=0,Wl=null,zu(e,t,o,6);break;case 8:Eu(),Yl=6;break a;default:throw Error(i(462))}}Iu();break}catch(t){Ou(e,t)}while(1);return Xi=Yi=null,O.H=r,O.A=a,H=n,U===null?(Ul=null,W=0,ri(),Yl):0}function Iu(){for(;U!==null&&!je();)Lu(U)}function Lu(e){var t=Lc(e.alternate,e,Jl);e.memoizedProps=e.pendingProps,t===null?Bu(e):U=t}function Ru(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=xc(n,t,t.pendingProps,t.type,void 0,W);break;case 11:t=xc(n,t,t.pendingProps,t.type.render,t.ref,W);break;case 5:No(t);default:Kc(n,t),t=U=mi(t,Jl),t=Lc(n,t,Jl)}e.memoizedProps=e.pendingProps,t===null?Bu(e):U=t}function zu(e,t,n,r){Xi=Yi=null,No(t),Fa=null,Ia=0;var i=t.return;try{if(oc(e,i,t,n,W)){Yl=1,tc(e,xi(n,e.current)),U=null;return}}catch(t){if(i!==null)throw U=i,t;Yl=1,tc(e,xi(n,e.current)),U=null;return}t.flags&32768?(I||r===1?e=!0:Kl||W&536870912?e=!1:(Gl=e=!0,(r===2||r===9||r===3||r===6)&&(r=oo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Vu(t,e)):Bu(t)}function Bu(e){var t=e;do{if(t.flags&32768){Vu(t,Gl);return}e=t.return;var n=Wc(t.alternate,t,Jl);if(n!==null){U=n;return}if(t=t.sibling,t!==null){U=t;return}U=t=e}while(t!==null);Yl===0&&(Yl=5)}function Vu(e,t){do{var n=Gc(e.alternate,e);if(n!==null){n.flags&=32767,U=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){U=e;return}U=e=n}while(e!==null);Yl=6,U=null}function Hu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do qu();while(lu!==0);if(H&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ni,it(e,n,o,s,c,l),e===Ul&&(U=Ul=null,W=0),du=t,uu=e,fu=n,pu=o,mu=a,hu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,q(Ie,function(){return Ju(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=O.T,O.T=null,a=k.p,k.p=2,s=H,H|=4;try{dl(e,t,n)}finally{H=s,k.p=a,O.T=r}}lu=1,Uu(),Wu(),Gu()}}function Uu(){if(lu===1){lu=0;var e=uu,t=du,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=O.T,O.T=null;var r=k.p;k.p=2;var i=H;H|=4;try{Sl(t,e);var a=Bd,o=Ar(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&kr(s.ownerDocument.documentElement,s)){if(c!==null&&jr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Or(s,h),v=Or(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}cp=!!zd,Bd=zd=null}finally{H=i,k.p=r,O.T=n}}e.current=t,lu=2}}function Wu(){if(lu===2){lu=0;var e=uu,t=du,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=O.T,O.T=null;var r=k.p;k.p=2;var i=H;H|=4;try{fl(e,t.alternate,t)}finally{H=i,k.p=r,O.T=n}}lu=3}}function Gu(){if(lu===4||lu===3){lu=0,Me();var e=uu,t=du,n=fu,r=hu;t.subtreeFlags&10256||t.flags&10256?lu=5:(lu=0,du=uu=null,Ku(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(cu=null),ct(n),t=t.stateNode,He&&typeof He.onCommitFiberRoot==`function`)try{He.onCommitFiberRoot(Ve,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=O.T,i=k.p,k.p=2,O.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{O.T=t,k.p=i}}fu&3&&qu(),X(e),i=e.pendingLanes,n&261930&&i&42?e===_u?gu++:(gu=0,_u=e):gu=0,ad(0,!1)}}function Ku(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fa(t)))}function qu(){return Uu(),Wu(),Gu(),Ju()}function Ju(){if(lu!==5)return!1;var e=uu,t=pu;pu=0;var n=ct(fu),r=O.T,a=k.p;try{k.p=32>n?32:n,O.T=null,n=mu,mu=null;var o=uu,s=fu;if(lu=0,du=uu=null,fu=0,H&6)throw Error(i(331));var c=H;if(H|=4,Rl(o.current),Al(o,o.current,s,n),H=c,ad(0,!1),He&&typeof He.onPostCommitFiberRoot==`function`)try{He.onPostCommitFiberRoot(Ve,o)}catch{}return!0}finally{k.p=a,O.T=r,Ku(e,t)}}function Yu(e,t,n){t=xi(n,t),t=rc(e.stateNode,t,2),e=qa(e,t,2),e!==null&&(rt(e,2),X(e))}function K(e,t,n){if(e.tag===3)Yu(e,e,n);else for(;t!==null;){if(t.tag===3){Yu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(cu===null||!cu.has(r))){e=xi(n,e),n=ic(2),r=qa(t,n,2),r!==null&&(ac(n,r,t,e),rt(r,2),X(r));break}}t=t.return}}function Xu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Hl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(ql=!0,i.add(n),e=Zu.bind(null,e,t,n),t.then(e,e))}function Zu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ul===e&&(W&n)===n&&(Yl===4||Yl===3&&(W&62914560)===W&&300>j()-iu?!(H&2)&&Du(e,0):Ql|=n,eu===W&&(eu=0)),X(e)}function Qu(e,t){t===0&&(t=tt()),e=oi(e,t),e!==null&&(rt(e,t),X(e))}function $u(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qu(e,n)}function ed(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Qu(e,n)}function q(e,t){return De(e,t)}var J=null,Y=null,td=!1,nd=!1,rd=!1,id=0;function X(e){e!==Y&&e.next===null&&(Y===null?J=Y=e:Y=Y.next=e),nd=!0,td||(td=!0,dd())}function ad(e,t){if(!rd&&nd){rd=!0;do for(var n=!1,r=J;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-We(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ud(r,a))}else a=W,a=Qe(r,r===Ul?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||$e(r,a)||(n=!0,ud(r,a));r=r.next}while(n);rd=!1}}function od(){sd()}function sd(){nd=td=!1;var e=0;id!==0&&Kd()&&(e=id);for(var t=j(),n=null,r=J;r!==null;){var i=r.next,a=cd(r,t);a===0?(r.next=null,n===null?J=i:n.next=i,i===null&&(Y=n)):(n=r,(e!==0||a&3)&&(nd=!0)),r=i}lu!==0&&lu!==5||ad(e,!1),id!==0&&(id=0)}function cd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-We(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=et(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ul,n=W,n=Qe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(G===2||G===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ke(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||$e(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ke(r),ct(n)){case 2:case 8:n=Fe;break;case 32:n=Ie;break;case 268435456:n=Re;break;default:n=Ie}return r=ld.bind(null,e),n=De(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ke(r),e.callbackPriority=2,e.callbackNode=null,2}function ld(e,t){if(lu!==0&&lu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(qu()&&e.callbackNode!==n)return null;var r=W;return r=Qe(e,e===Ul?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(xu(e,r,t),cd(e,j()),e.callbackNode!=null&&e.callbackNode===n?ld.bind(null,e):null)}function ud(e,t){if(qu())return null;xu(e,t,!0)}function dd(){Xd(function(){H&6?De(Pe,od):sd()})}function fd(){if(id===0){var e=ha;e===0&&(e=Je,Je<<=1,!(Je&261888)&&(Je=256)),id=e}return id}function pd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:rn(``+e)}function md(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function hd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=pd((i[pt]||null).action),o=r.submitter;o&&(t=(t=o[pt]||null)?pd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Tn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(id!==0){var e=o?md(i,o):new FormData(i);ks(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?md(i,o):new FormData(i),ks(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var gd=0;gd<Zr.length;gd++){var _d=Zr[gd];Qr(_d.toLowerCase(),`on`+(_d[0].toUpperCase()+_d.slice(1)))}Qr(Ur,`onAnimationEnd`),Qr(Wr,`onAnimationIteration`),Qr(Gr,`onAnimationStart`),Qr(`dblclick`,`onDoubleClick`),Qr(`focusin`,`onFocus`),Qr(`focusout`,`onBlur`),Qr(Kr,`onTransitionRun`),Qr(qr,`onTransitionStart`),Qr(Jr,`onTransitionCancel`),Qr(Yr,`onTransitionEnd`),kt(`onMouseEnter`,[`mouseout`,`mouseover`]),kt(`onMouseLeave`,[`mouseout`,`mouseover`]),kt(`onPointerEnter`,[`pointerout`,`pointerover`]),kt(`onPointerLeave`,[`pointerout`,`pointerover`]),Ot(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ot(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ot(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ot(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ot(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ot(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var vd=`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(` `),yd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(vd));function bd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){$r(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){$r(e)}i.currentTarget=null,a=c}}}}function Z(e,t){var n=t[ht];n===void 0&&(n=t[ht]=new Set);var r=e+`__bubble`;n.has(r)||(wd(t,e,2,!1),n.add(r))}function xd(e,t,n){var r=0;t&&(r|=4),wd(n,e,r,t)}var Sd=`_reactListening`+Math.random().toString(36).slice(2);function Cd(e){if(!e[Sd]){e[Sd]=!0,Et.forEach(function(t){t!==`selectionchange`&&(yd.has(t)||xd(t,!1,e),xd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sd]||(t[Sd]=!0,xd(`selectionchange`,!1,t))}}function wd(e,t,n,r){switch(hp(t)){case 2:var i=lp;break;case 8:i=up;break;default:i=dp}n=i.bind(null,t,n,e),i=void 0,!mn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Td(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=xt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}fn(function(){var r=a,i=sn(n),s=[];a:{var c=Xr.get(e);if(c!==void 0){var l=Tn,u=e;switch(e){case`keypress`:if(bn(n)===0)break a;case`keydown`:case`keyup`:l=Un;break;case`focusin`:u=`focus`,l=Pn;break;case`focusout`:u=`blur`,l=Pn;break;case`beforeblur`:case`afterblur`:l=Pn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Mn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Nn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Gn;break;case Ur:case Wr:case Gr:l=Fn;break;case Yr:l=Kn;break;case`scroll`:case`scrollend`:l=Dn;break;case`wheel`:l=qn;break;case`copy`:case`cut`:case`paste`:l=In;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Wn;break;case`toggle`:case`beforetoggle`:l=Jn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=pn(m,p),g!=null&&d.push(Ed(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==on&&(u=n.relatedTarget||n.fromElement)&&(xt(u)||u[mt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?xt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Mn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Wn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:Ct(l),h=u==null?c:Ct(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,xt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Od,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&kd(s,c,l,d,!1),u!==null&&f!==null&&kd(s,f,u,d,!0)}}a:{if(c=r?Ct(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=mr;else if(cr(c))if(hr)v=wr;else{v=Sr;var y=xr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&en(r.elementType)&&(v=mr):v=Cr;if(v&&=v(e,r)){lr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&qt(c,`number`,c.value)}switch(y=r?Ct(r):window,e){case`focusin`:(cr(y)||y.contentEditable===`true`)&&(Nr=y,Pr=r,Fr=null);break;case`focusout`:Fr=Pr=Nr=null;break;case`mousedown`:Ir=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ir=!1,Lr(s,n,i);break;case`selectionchange`:if(Mr)break;case`keydown`:case`keyup`:Lr(s,n,i)}var b;if(Xn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else ir?nr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&($n&&n.locale!==`ko`&&(ir||x!==`onCompositionStart`?x===`onCompositionEnd`&&ir&&(b=yn()):(gn=i,_n=`value`in gn?gn.value:gn.textContent,ir=!0)),y=Dd(r,x),0<y.length&&(x=new Ln(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=rr(n),b!==null&&(x.data=b)))),(b=Qn?ar(e,n):or(e,n))&&(x=Dd(r,`onBeforeInput`),0<x.length&&(y=new Ln(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),hd(s,e,r,n,i)}bd(s,t)})}function Ed(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Dd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=pn(e,n),i!=null&&r.unshift(Ed(e,i,a)),i=pn(e,t),i!=null&&r.push(Ed(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Od(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function kd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=pn(n,a),l!=null&&o.unshift(Ed(n,l,c))):i||(l=pn(n,a),l!=null&&o.push(Ed(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ad=/\r\n?/g,jd=/\u0000|\uFFFD/g;function Md(e){return(typeof e==`string`?e:``+e).replace(Ad,`
10
- `).replace(jd,``)}function Nd(e,t){return t=Md(t),Md(e)===t}function Q(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||N(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&N(e,``+r);break;case`className`:Ft(e,`class`,r);break;case`tabIndex`:Ft(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ft(e,n,r);break;case`style`:$t(e,r,o);break;case`data`:if(t!==`object`){Ft(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=rn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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 o==`function`&&(n===`formAction`?(t!==`input`&&Q(e,t,`name`,a.name,a,null),Q(e,t,`formEncType`,a.formEncType,a,null),Q(e,t,`formMethod`,a.formMethod,a,null),Q(e,t,`formTarget`,a.formTarget,a,null)):(Q(e,t,`encType`,a.encType,a,null),Q(e,t,`method`,a.method,a,null),Q(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=rn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=an);break;case`onScroll`:r!=null&&Z(`scroll`,e);break;case`onScrollEnd`:r!=null&&Z(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=rn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Z(`beforetoggle`,e),Z(`toggle`,e),Pt(e,`popover`,r);break;case`xlinkActuate`:It(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:It(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:It(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:It(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:It(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:It(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:It(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:It(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:It(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Pt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=tn.get(n)||n,Pt(e,n,r))}}function Pd(e,t,n,r,a,o){switch(n){case`style`:$t(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?N(e,r):(typeof r==`number`||typeof r==`bigint`)&&N(e,``+r);break;case`onScroll`:r!=null&&Z(`scroll`,e);break;case`onScrollEnd`:r!=null&&Z(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=an);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Dt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[pt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Pt(e,n,r)}}}function Fd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Z(`error`,e),Z(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Q(e,t,o,s,n,null)}}a&&Q(e,t,`srcSet`,n.srcSet,n,null),r&&Q(e,t,`src`,n.src,n,null);return;case`input`:Z(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Q(e,t,r,d,n,null)}}Kt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Z(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Q(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Jt(e,!!r,n,!0):Jt(e,!!r,t,!1);return;case`textarea`:for(s in Z(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Q(e,t,s,c,n,null)}Xt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Q(e,t,l,r,n,null)}return;case`dialog`:Z(`beforetoggle`,e),Z(`toggle`,e),Z(`cancel`,e),Z(`close`,e);break;case`iframe`:case`object`:Z(`load`,e);break;case`video`:case`audio`:for(r=0;r<vd.length;r++)Z(vd[r],e);break;case`image`:Z(`error`,e),Z(`load`,e);break;case`details`:Z(`toggle`,e);break;case`embed`:case`source`:case`link`:Z(`error`,e),Z(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Q(e,t,u,r,n,null)}return;default:if(en(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Pd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Q(e,t,c,r,n,null))}function Id(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Q(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Q(e,t,p,m,r,f)}}Gt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Q(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Q(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Jt(e,!!n,n?[]:``,!1):Jt(e,!!n,t,!0)):Jt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Q(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Q(e,t,s,a,r,o)}Yt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Q(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Q(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Q(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Q(e,t,u,p,r,m)}return;default:if(en(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Pd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Pd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Q(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Q(e,t,f,p,r,m)}function Ld(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Rd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Ld(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Ld(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var zd=null,Bd=null;function Vd(e){return e.nodeType===9?e:e.ownerDocument}function Hd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Ud(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Wd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Gd=null;function Kd(){var e=window.event;return e&&e.type===`popstate`?e===Gd?!1:(Gd=e,!0):(Gd=null,!1)}var qd=typeof setTimeout==`function`?setTimeout:void 0,Jd=typeof clearTimeout==`function`?clearTimeout:void 0,Yd=typeof Promise==`function`?Promise:void 0,Xd=typeof queueMicrotask==`function`?queueMicrotask:Yd===void 0?qd:function(e){return Yd.resolve(null).then(e).catch(Zd)};function Zd(e){setTimeout(function(){throw e})}function Qd(e){return e===`head`}function $d(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Pp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)mf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,mf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[yt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&mf(e.ownerDocument.body);n=i}while(n);Pp(t)}function ef(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function tf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:tf(n),bt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function nf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[yt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=lf(e.nextSibling),e===null)break}return null}function rf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lf(e.nextSibling),e===null))return null;return e}function af(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lf(e.nextSibling),e===null))return null;return e}function of(e){return e.data===`$?`||e.data===`$~`}function sf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function lf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var uf=null;function df(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function ff(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function pf(e,t,n){switch(t=Vd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function mf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bt(e)}var hf=new Map,gf=new Set;function _f(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var vf=k.d;k.d={f:yf,r:bf,D:Cf,C:wf,L:Tf,m:Ef,X:Of,S:Df,M:kf};function yf(){var e=vf.f(),t=Tu();return e||t}function bf(e){var t=St(e);t!==null&&t.tag===5&&t.type===`form`?js(t):vf.r(e)}var xf=typeof document>`u`?null:document;function Sf(e,t,n){var r=xf;if(r&&typeof t==`string`&&t){var i=Wt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),gf.has(i)||(gf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Fd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function Cf(e){vf.D(e),Sf(`dns-prefetch`,e,null)}function wf(e,t){vf.C(e,t),Sf(`preconnect`,e,t)}function Tf(e,t,n){vf.L(e,t,n);var r=xf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Wt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Wt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Wt(n.imageSizes)+`"]`)):i+=`[href="`+Wt(e)+`"]`;var a=i;switch(t){case`style`:a=jf(e);break;case`script`:a=Ff(e)}hf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),hf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Mf(a))||t===`script`&&r.querySelector(If(a))||(t=r.createElement(`link`),Fd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function Ef(e,t){vf.m(e,t);var n=xf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Wt(r)+`"][href="`+Wt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Ff(e)}if(!hf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),hf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(If(a)))return}r=n.createElement(`link`),Fd(r,`link`,e),Tt(r),n.head.appendChild(r)}}}function Df(e,t,n){vf.S(e,t,n);var r=xf;if(r&&e){var i=wt(r).hoistableStyles,a=jf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Mf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=hf.get(a))&&zf(e,n);var c=o=r.createElement(`link`);Tt(c),Fd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Rf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Of(e,t){vf.X(e,t);var n=xf;if(n&&e){var r=wt(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=f({src:e,async:!0},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),Tt(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t){vf.M(e,t);var n=xf;if(n&&e){var r=wt(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),Tt(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t,n,r){var a=(a=fe.current)?_f(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=jf(n.href),n=wt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=jf(n.href);var o=wt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Mf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),hf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},hf.set(e,n),o||Pf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Ff(n),n=wt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function jf(e){return`href="`+Wt(e)+`"`}function Mf(e){return`link[rel="stylesheet"][`+e+`]`}function Nf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Pf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Fd(t,`link`,n),Tt(t),e.head.appendChild(t))}function Ff(e){return`[src="`+Wt(e)+`"]`}function If(e){return`script[async]`+e}function Lf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Wt(n.href)+`"]`);if(r)return t.instance=r,Tt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Tt(r),Fd(r,`style`,a),Rf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=jf(n.href);var o=e.querySelector(Mf(a));if(o)return t.state.loading|=4,t.instance=o,Tt(o),o;r=Nf(n),(a=hf.get(a))&&zf(r,a),o=(e.ownerDocument||e).createElement(`link`),Tt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Fd(o,`link`,r),t.state.loading|=4,Rf(o,n.precedence,e),t.instance=o;case`script`:return o=Ff(n.src),(a=e.querySelector(If(o)))?(t.instance=a,Tt(a),a):(r=n,(a=hf.get(o))&&(r=f({},n),Bf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Tt(a),Fd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Rf(r,n.precedence,e));return t.instance}function Rf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Vf=null;function Hf(e,t,n){if(Vf===null){var r=new Map,i=Vf=new Map;i.set(n,r)}else i=Vf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[yt]||a[ft]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Uf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Wf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Gf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Kf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=jf(r.href),a=t.querySelector(Mf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Yf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Tt(a);return}a=t.ownerDocument||t,r=Nf(r),(i=hf.get(i))&&zf(r,i),a=a.createElement(`link`),Tt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Fd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Yf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var qf=0;function Jf(e,t){return e.stylesheets&&e.count===0&&Zf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Zf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&qf===0&&(qf=62500*Rd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Zf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>qf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Yf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Xf=null;function Zf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Xf=new Map,t.forEach(Qf,e),Xf=null,Yf.call(e))}function Qf(e,t){if(!(t.state.loading&4)){var n=Xf.get(e);if(n)var r=n.get(null);else{n=new Map,Xf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Yf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var $f={$$typeof:b,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function ep(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,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=nt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nt(0),this.hiddenUpdates=nt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function tp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ep(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=di(3,null,null,t),e.current=a,a.stateNode=e,t=da(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Wa(a),e}function np(e){return e?(e=li,e):li}function rp(e,t,n,r,i,a){i=np(i),r.context===null?r.context=i:r.pendingContext=i,r=Ka(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=qa(e,r,t),n!==null&&(bu(n,e,t),Ja(n,e,t))}function ip(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ap(e,t){ip(e,t),(e=e.alternate)&&ip(e,t)}function op(e){if(e.tag===13||e.tag===31){var t=oi(e,67108864);t!==null&&bu(t,e,67108864),ap(e,67108864)}}function sp(e){if(e.tag===13||e.tag===31){var t=vu();t=st(t);var n=oi(e,t);n!==null&&bu(n,e,t),ap(e,t)}}var cp=!0;function lp(e,t,n,r){var i=O.T;O.T=null;var a=k.p;try{k.p=2,dp(e,t,n,r)}finally{k.p=a,O.T=i}}function up(e,t,n,r){var i=O.T;O.T=null;var a=k.p;try{k.p=8,dp(e,t,n,r)}finally{k.p=a,O.T=i}}function dp(e,t,n,r){if(cp){var i=fp(r);if(i===null)Td(e,t,r,pp,n),wp(e,r);else if(Ep(i,e,t,n,r))r.stopPropagation();else if(wp(e,r),t&4&&-1<Cp.indexOf(e)){for(;i!==null;){var a=St(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ze(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-We(o);s.entanglements[1]|=c,o&=~c}X(a),!(H&6)&&(ou=j()+500,ad(0,!1))}}break;case 31:case 13:s=oi(a,2),s!==null&&bu(s,a,2),Tu(),ap(a,2)}if(a=fp(r),a===null&&Td(e,t,r,pp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Td(e,t,r,null,n)}}function fp(e){return e=sn(e),mp(e)}var pp=null;function mp(e){if(pp=null,e=xt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return pp=e,null}function hp(e){switch(e){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(Ne()){case Pe:return 2;case Fe:return 8;case Ie:case Le:return 32;case Re:return 268435456;default:return 32}default:return 32}}var gp=!1,_p=null,vp=null,yp=null,bp=new Map,xp=new Map,Sp=[],Cp=`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 wp(e,t){switch(e){case`focusin`:case`focusout`:_p=null;break;case`dragenter`:case`dragleave`:vp=null;break;case`mouseover`:case`mouseout`:yp=null;break;case`pointerover`:case`pointerout`:bp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:xp.delete(t.pointerId)}}function Tp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=St(t),t!==null&&op(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ep(e,t,n,r,i){switch(t){case`focusin`:return _p=Tp(_p,e,t,n,r,i),!0;case`dragenter`:return vp=Tp(vp,e,t,n,r,i),!0;case`mouseover`:return yp=Tp(yp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return bp.set(a,Tp(bp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,xp.set(a,Tp(xp.get(a)||null,e,t,n,r,i)),!0}return!1}function Dp(e){var t=xt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ut(e.priority,function(){sp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ut(e.priority,function(){sp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Op(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=fp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);on=r,n.target.dispatchEvent(r),on=null}else return t=St(n),t!==null&&op(t),e.blockedOn=n,!1;t.shift()}return!0}function kp(e,t,n){Op(e)&&n.delete(t)}function Ap(){gp=!1,_p!==null&&Op(_p)&&(_p=null),vp!==null&&Op(vp)&&(vp=null),yp!==null&&Op(yp)&&(yp=null),bp.forEach(kp),xp.forEach(kp)}function jp(e,n){e.blockedOn===n&&(e.blockedOn=null,gp||(gp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ap)))}var Mp=null;function Np(e){Mp!==e&&(Mp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Mp===e&&(Mp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(mp(r||n)===null)continue;break}var a=St(n);a!==null&&(e.splice(t,3),t-=3,ks(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Pp(e){function t(t){return jp(t,e)}_p!==null&&jp(_p,e),vp!==null&&jp(vp,e),yp!==null&&jp(yp,e),bp.forEach(t),xp.forEach(t);for(var n=0;n<Sp.length;n++){var r=Sp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Sp.length&&(n=Sp[0],n.blockedOn===null);)Dp(n),n.blockedOn===null&&Sp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[pt]||null;if(typeof a==`function`)o||Np(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[pt]||null)s=o.formAction;else if(mp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Np(n)}}}function Fp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Ip(e){this._internalRoot=e}Lp.prototype.render=Ip.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;rp(n,vu(),e,t,null,null)},Lp.prototype.unmount=Ip.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;rp(e.current,2,null,e,null,null),Tu(),t[mt]=null}};function Lp(e){this._internalRoot=e}Lp.prototype.unstable_scheduleHydration=function(e){if(e){var t=lt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Sp.length&&t!==0&&t<Sp[n].priority;n++);Sp.splice(n,0,e),n===0&&Dp(e)}};var Rp=n.version;if(Rp!==`19.2.6`)throw Error(i(527,Rp,`19.2.6`));k.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var zp={bundleType:0,version:`19.2.6`,rendererPackageName:`react-dom`,currentDispatcherRef:O,reconcilerVersion:`19.2.6`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Bp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bp.isDisabled&&Bp.supportsFiber)try{Ve=Bp.inject(zp),He=Bp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Qs,s=$s,c=ec;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=tp(e,1,!1,null,null,n,r,null,o,s,c,Fp),e[mt]=t.current,Cd(e),new Ip(t)}})),Me=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=je()})),j=a(Ee(),1),Ne=Me();function Pe(){let e=window.location.pathname;return e===`/ui`||e.startsWith(`/ui/`)?`/ui`:``}function Fe(e){let t=e.startsWith(`/`)?e:`/${e}`;return`${Pe()}${t}`}var Ie=class extends Error{constructor(e,t,n){super(e),this.status=t,this.payload=n}};async function Le(e,t){let n=await fetch(e,{credentials:`include`,headers:{accept:`application/json`,...t?.headers??{}},...t}),r=await n.text(),i=null;try{i=r?JSON.parse(r):null}catch{i=r}if(!n.ok)throw n.status===401&&(window.location.href=`${Fe(`/login`)}?next=${encodeURIComponent(window.location.pathname)}`),new Ie(i&&typeof i==`object`&&`error`in i?String(i.error):`request failed (${n.status})`,n.status,i);return i}function Re(e={}){let t=new URLSearchParams;for(let n of e.status??[])t.append(`status`,n);for(let n of e.agent??[])t.append(`agent`,n);e.limit&&t.set(`limit`,String(e.limit)),e.cursor&&t.set(`cursor`,e.cursor),e.allUsers&&t.set(`allUsers`,`1`);let n=t.toString();return Le(`/runs${n?`?${n}`:``}`)}function ze(e){return Le(`/runs/${encodeURIComponent(e)}`)}function Be(e={}){return Le(`/conversations`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e)})}function Ve(e){return Le(`/conversations/${encodeURIComponent(e)}`)}function He(e,t){return Le(`/conversations/${encodeURIComponent(e)}/messages`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t)})}function Ue(e){return Le(`/runs/${encodeURIComponent(e)}/tool-calls`)}function We(e){return Le(`/runs/${encodeURIComponent(e)}/cancel`,{method:`POST`})}function Ge(e,t){return Le(`/runs/${encodeURIComponent(e)}/input`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({input:t})})}function Ke(){return Le(`/diagnostics`)}function qe(){return Le(`/healthz`)}function Je(){return Le(`/schedules`)}function Ye(){return Le(`/inbox`)}async function Xe(){let e=await fetch(`/blueprint`,{credentials:`include`,headers:{accept:`text/yaml`}});if(!e.ok)throw new Ie(`request failed (${e.status})`,e.status,null);return e.text()}function Ze(){return Le(`/agents`)}function Qe(){return Le(`/deployment`)}function $e(){return Le(`/config/env-vars`)}function et(e,t){return Le(`/config/env-vars/${encodeURIComponent(e)}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({value:t})})}function tt(e,t){return Le(`/agents/${encodeURIComponent(e)}/model`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify({spec:t})})}function nt(e){let t=new URLSearchParams;e?.from&&t.set(`from`,e.from),e?.to&&t.set(`to`,e.to),e?.allUsers&&t.set(`allUsers`,`1`);let n=t.toString();return Le(`/usage${n?`?${n}`:``}`)}function rt(e,t){let n=`/runs/${encodeURIComponent(e)}/stream`,r=new EventSource(n,{withCredentials:!0});return r.addEventListener(`message`,e=>{try{let n=JSON.parse(e.data);t.onMessage?.(n)}catch{}}),r.addEventListener(`status`,e=>{try{let n=JSON.parse(e.data);t.onStatus?.(n.status)}catch{}}),r.addEventListener(`done`,()=>{t.onDone?.(),r.close()}),r.addEventListener(`error`,e=>{t.onError?.(e)}),()=>r.close()}function it(e,t){let n=`/conversations/${encodeURIComponent(e)}/stream`,r=new EventSource(n,{withCredentials:!0});return r.addEventListener(`message`,e=>{try{let n=JSON.parse(e.data);t.onMessage?.(n)}catch{}}),r.addEventListener(`status`,e=>{try{let n=JSON.parse(e.data);t.onStatus?.(n.runId,n.status)}catch{}}),r.addEventListener(`run_created`,e=>{try{let n=JSON.parse(e.data);t.onRunCreated?.(n.runId)}catch{}}),r.addEventListener(`error`,e=>{t.onError?.(e)}),()=>r.close()}var at=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),M=o(((e,t)=>{t.exports=at()}))(),ot=3e4;function st(){let[e,t]=(0,j.useState)([]),[n,r]=(0,j.useState)(!1);(0,j.useEffect)(()=>{let e=!1,n=null,r=async()=>{try{let n=await Ke();if(e)return;t(n.checks)}catch(t){if(e||t instanceof Ie&&t.status===401)return}finally{e||(n=setTimeout(r,ot))}};return r(),()=>{e=!0,n&&clearTimeout(n)}},[]);let i=e.filter(e=>e.level===`error`),a=e.filter(e=>e.level===`warn`);if(i.length===0&&a.length===0)return null;let o=i.length>0,s=i[0]??a[0];return s?(0,M.jsxs)(`div`,{className:`mb-4 border ${o?`border-err text-err`:`border-accent text-accent`}`,children:[(0,M.jsxs)(`button`,{type:`button`,onClick:()=>r(e=>!e),className:`flex w-full items-center justify-between gap-3 px-3 py-2 text-left text-xs`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(`span`,{className:`label !text-current`,children:o?`// setup error`:`// warning`}),(0,M.jsx)(`span`,{children:s.title}),i.length+a.length>1&&(0,M.jsxs)(`span`,{className:`text-muted`,children:[`· `,i.length+a.length-1,` more`]})]}),(0,M.jsx)(`span`,{className:`text-muted`,children:n?`[-]`:`[+]`})]}),n&&(0,M.jsx)(`ul`,{className:`border-t border-current px-3 py-2 text-xs`,children:[...i,...a].map(e=>(0,M.jsxs)(`li`,{className:`mb-2 last:mb-0`,children:[(0,M.jsxs)(`div`,{className:`font-medium`,children:[(0,M.jsxs)(`span`,{className:`mr-2 text-muted`,children:[`[`,e.level.toUpperCase(),`]`]}),e.title]}),(0,M.jsx)(`div`,{className:`text-muted`,children:e.message}),e.hint&&(0,M.jsxs)(`div`,{className:`mt-0.5 text-muted`,children:[(0,M.jsx)(`span`,{className:`text-current`,children:`→`}),` `,e.hint]})]},e.id))})]}):null}var ct=(0,j.createContext)(null);function lt({children:e}){let[t,n]=(0,j.useState)(null);return(0,j.useEffect)(()=>{let e=!1;return Qe().then(t=>{e||n(t)}).catch(()=>{}),()=>{e=!0}},[]),(0,M.jsx)(ct.Provider,{value:t,children:e})}function ut(){return(0,j.useContext)(ct)}function dt(e=`agent`){return ut()?.name??e}function ft({loading:e,error:t,empty:n,children:r}){return t?(0,M.jsxs)(`div`,{className:`border border-err p-4 text-xs text-err`,children:[(0,M.jsx)(`div`,{className:`label !text-err`,children:`ERROR`}),(0,M.jsx)(`div`,{className:`mt-1 break-all`,children:t.message})]}):e?(0,M.jsx)(pt,{children:`loading`}):n?.when?(0,M.jsx)(pt,{children:n.message}):(0,M.jsx)(M.Fragment,{children:r})}function pt({children:e}){return(0,M.jsxs)(`div`,{className:`panel p-6 text-center text-muted text-xs`,children:[e,(0,M.jsx)(`span`,{className:`blink ml-1 text-accent`,"aria-hidden":`true`,children:`▊`})]})}var mt=[{id:`claude-sonnet-4-6`,label:`Claude Sonnet 4.6`,hint:`default — best balance`,spec:{provider:`anthropic`,model:`claude-sonnet-4-6`}},{id:`claude-opus-4-7`,label:`Claude Opus 4.7`,hint:`Anthropic flagship`,spec:{provider:`anthropic`,model:`claude-opus-4-7`}},{id:`claude-haiku-4-5`,label:`Claude Haiku 4.5`,hint:`fastest Anthropic`,spec:{provider:`anthropic`,model:`claude-haiku-4-5`}},{id:`gpt-5-1`,label:`GPT-5.1`,hint:`OpenAI flagship — needs OPENAI_API_KEY`,spec:{provider:`openai-compat`,model:`gpt-5.1`,apiKeyEnv:`OPENAI_API_KEY`}},{id:`gpt-5-1-mini`,label:`GPT-5.1 Mini`,hint:`OpenAI small/fast — needs OPENAI_API_KEY`,spec:{provider:`openai-compat`,model:`gpt-5.1-mini`,apiKeyEnv:`OPENAI_API_KEY`}},{id:`gemini-2-5-pro`,label:`Gemini 2.5 Pro`,hint:`Google flagship — needs GEMINI_API_KEY`,spec:{provider:`openai-compat`,model:`gemini-2.5-pro`,baseURL:`https://generativelanguage.googleapis.com/v1beta/openai`,apiKeyEnv:`GEMINI_API_KEY`}},{id:`gemini-2-5-flash`,label:`Gemini 2.5 Flash`,hint:`Google fast — needs GEMINI_API_KEY`,spec:{provider:`openai-compat`,model:`gemini-2.5-flash`,baseURL:`https://generativelanguage.googleapis.com/v1beta/openai`,apiKeyEnv:`GEMINI_API_KEY`}},{id:`grok-4`,label:`Grok 4`,hint:`xAI — needs XAI_API_KEY`,spec:{provider:`openai-compat`,model:`grok-4`,baseURL:`https://api.x.ai/v1`,apiKeyEnv:`XAI_API_KEY`}},{id:`custom`,label:`Custom…`,hint:`any OpenAI-compatible gateway`,spec:null}],ht=[`api.anthropic.com`,`api.openai.com`,`openrouter.ai`,`api.groq.com`,`api.fireworks.ai`,`generativelanguage.googleapis.com`,`api.x.ai`,`api.deepseek.com`,`api.mistral.ai`];function gt(e){return mt.find(t=>t.id===e)??mt.find(e=>e.id===`custom`)??mt[0]}function _t(e){for(let t of mt)if(t.spec&&t.spec.provider===e.provider&&t.spec.model===e.model&&(t.spec.baseURL??null)===(e.baseURL??null)&&(t.spec.apiKeyEnv??null)===(e.apiKeyEnv??null))return t;return gt(`custom`)}function vt(e){let t={provider:e.provider,model:e.model};return e.baseURL&&e.baseURL.trim().length>0&&(t.baseURL=e.baseURL.trim()),e.apiKeyEnv&&e.apiKeyEnv.trim().length>0&&(t.apiKeyEnv=e.apiKeyEnv.trim()),e.thinking&&(t.thinking={...e.thinking}),t}function yt(e){if(!e.model||e.model.trim().length===0||e.apiKeyEnv&&!/^[A-Z][A-Z0-9_]*$/.test(e.apiKeyEnv))return!1;if(e.baseURL)try{new URL(e.baseURL)}catch{return!1}return!0}function bt({spec:e,presetId:t,onChange:n}){let r=t===`custom`;return(0,M.jsxs)(`div`,{className:`space-y-3`,children:[(0,M.jsx)(`div`,{className:`space-y-1.5`,children:mt.map(r=>(0,M.jsx)(xt,{preset:r,selected:t===r.id,onSelect:()=>{let t=gt(r.id);n({presetId:t.id,spec:t.spec??e})}},r.id))}),r?(0,M.jsx)(St,{spec:e,onChange:e=>n({presetId:t,spec:e})}):null]})}function xt({preset:e,selected:t,onSelect:n}){return(0,M.jsxs)(`label`,{className:`flex cursor-pointer items-center justify-between border p-2 text-xs ${t?`border-accent text-accent`:`border-line`}`,children:[(0,M.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(`input`,{type:`radio`,name:`model-preset`,value:e.id,checked:t,onChange:n,className:`accent-[var(--color-accent)]`}),(0,M.jsx)(`span`,{children:e.label})]}),(0,M.jsx)(`span`,{className:`text-[11px] text-muted`,children:e.hint})]})}function St({spec:e,onChange:t}){let n=n=>t(vt({...e,...n})),r=e.baseURL?wt(e.baseURL):null,i=r&&!ht.includes(r);return(0,M.jsxs)(`div`,{className:`space-y-2 border border-line p-3 text-xs`,children:[(0,M.jsx)(Ct,{label:`Provider`,children:(0,M.jsxs)(`select`,{className:`w-full border border-line bg-transparent p-1.5 text-xs`,value:e.provider,onChange:e=>n({provider:e.target.value}),children:[(0,M.jsx)(`option`,{value:`anthropic`,children:`anthropic`}),(0,M.jsx)(`option`,{value:`openai-compat`,children:`openai-compat`})]})}),(0,M.jsx)(Ct,{label:`Model id`,children:(0,M.jsx)(`input`,{type:`text`,className:`w-full border border-line bg-transparent p-1.5 font-mono text-xs`,value:e.model,placeholder:e.provider===`anthropic`?`claude-sonnet-4-6`:`openai/gpt-4o`,onChange:e=>n({model:e.target.value})})}),e.provider===`openai-compat`?(0,M.jsxs)(Ct,{label:`Base URL (blank for OpenAI's default)`,children:[(0,M.jsx)(`input`,{type:`url`,className:`w-full border border-line bg-transparent p-1.5 font-mono text-xs`,value:e.baseURL??``,placeholder:`https://openrouter.ai/api/v1`,onChange:e=>n({baseURL:e.target.value})}),i?(0,M.jsxs)(`p`,{className:`mt-1 text-[10px] text-muted`,children:[`Host `,(0,M.jsx)(`span`,{className:`font-mono`,children:r}),` isn't on the known-providers list. Proceed only if you trust it.`]}):null]}):null,(0,M.jsxs)(Ct,{label:`API key env var`,children:[(0,M.jsx)(`input`,{type:`text`,className:`w-full border border-line bg-transparent p-1.5 font-mono text-xs`,value:e.apiKeyEnv??``,placeholder:e.provider===`anthropic`?`ANTHROPIC_API_KEY`:`OPENAI_API_KEY`,onChange:e=>n({apiKeyEnv:e.target.value})}),(0,M.jsx)(`p`,{className:`mt-1 text-[10px] text-muted`,children:`Must be UPPER_SNAKE_CASE. Set the secret in the Render dashboard before saving.`})]})]})}function Ct({label:e,children:t}){return(0,M.jsxs)(`div`,{className:`block`,children:[(0,M.jsx)(`span`,{className:`block text-[10px] uppercase tracking-wide text-muted`,children:e}),(0,M.jsx)(`div`,{className:`mt-1`,children:t})]})}function wt(e){try{return new URL(e).host}catch{return null}}function Tt({agent:e,onClose:t,onSaved:n}){let r=Dt(e.model),[i,a]=(0,j.useState)(()=>_t(r).id),[o,s]=(0,j.useState)(r),[c,l]=(0,j.useState)(!1),[u,d]=(0,j.useState)(null),[f,p]=(0,j.useState)(null),m=yt(o);return(0,M.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4`,children:[(0,M.jsx)(`button`,{type:`button`,"aria-label":`Close`,className:`absolute inset-0 cursor-default`,onClick:t}),(0,M.jsxs)(`div`,{className:`panel relative max-h-[90vh] w-full max-w-lg overflow-auto bg-bg p-5 text-xs`,role:`dialog`,"aria-modal":`true`,"aria-label":`Edit model for ${e.name}`,children:[(0,M.jsxs)(`header`,{className:`mb-4 flex items-center justify-between`,children:[(0,M.jsxs)(`h2`,{className:`text-sm font-bold uppercase tracking-wide`,children:[`edit model — `,e.name]}),(0,M.jsx)(`button`,{type:`button`,onClick:t,className:`border border-line px-2 py-1 text-xs`,"aria-label":`Close`,children:`✕`})]}),(0,M.jsx)(bt,{spec:o,presetId:i,onChange:e=>{a(e.presetId),s(e.spec)}}),u?(0,M.jsxs)(`div`,{className:`mt-4 border border-line p-2 text-[11px]`,children:[(0,M.jsx)(`p`,{children:u}),f?(0,M.jsx)(`p`,{className:`mt-2`,children:(0,M.jsx)(`a`,{className:`text-accent underline`,href:f,target:`_top`,rel:`noreferrer`,children:`Install the render-harness GitHub App →`})}):null]}):null,(0,M.jsxs)(`p`,{className:`mt-3 text-[11px] text-muted`,children:[`Saving commits to `,(0,M.jsx)(`span`,{className:`font-mono`,children:`render-harness.yaml`}),` on the agent's repo. Render auto-deploys on push; the new model takes effect once the rolling restart completes.`]}),(0,M.jsxs)(`footer`,{className:`mt-4 flex items-center justify-end gap-2`,children:[(0,M.jsx)(`button`,{type:`button`,onClick:t,disabled:c,className:`border border-line px-3 py-1.5 text-xs`,children:`cancel`}),(0,M.jsx)(`button`,{type:`button`,onClick:async()=>{l(!0),d(null),p(null);try{let r=await tt(e.name,o);if(r.ok){n(o),t();return}if(r.error===`needs_install`&&r.installUrl){d(`The render-harness GitHub App isn't installed on this repo yet.`),p(r.installUrl);return}d(Et(r.error,r.details))}catch(e){d(e instanceof Error?e.message:String(e))}finally{l(!1)}},disabled:c||!m,className:`border border-accent bg-accent px-3 py-1.5 text-xs text-bg disabled:opacity-50`,children:c?`saving…`:`save & redeploy`})]})]})]})}function Et(e,t){switch(e){case`wizard_service_not_configured`:return`In-UI edits aren't wired up on this deployment. Set RENDER_HARNESS_WIZARD_URL on the worker service to enable them.`;case`wizard_shared_secret_not_configured`:return`Set WIZARD_SHARED_SECRET on both the worker and wizard services. They must match.`;case`repo_locator_missing`:return"`.render-harness/agent.json` is missing or has null org/repo. The wizard's scaffolder writes this; CLI-scaffolded repos need the install flow to populate it.";case`agent_not_found`:return`Agent id wasn't found in the deployed render-harness.yaml — has it been renamed since this deploy?`;case`stale_sha`:return`Someone else committed to render-harness.yaml under us. Reload and retry.`;case`invalid_model_spec`:return`The spec didn't validate: ${t??`unknown reason`}`;default:return t??e??`save failed`}}function Dt(e){let t={provider:e.provider,model:e.model};return e.baseURL&&(t.baseURL=e.baseURL),e.apiKeyEnv&&(t.apiKeyEnv=e.apiKeyEnv),e.thinking&&(t.thinking={...e.thinking}),t}function Ot(){let[e,t]=(0,j.useState)([]),[n,r]=(0,j.useState)(!0),[i,a]=(0,j.useState)(null);return(0,j.useEffect)(()=>{let e=!1;return r(!0),Ze().then(n=>{e||t(n.agents)}).catch(t=>{e||t instanceof Ie&&t.status===401||a(t instanceof Error?t:Error(String(t)))}).finally(()=>{e||r(!1)}),()=>{e=!0}},[]),(0,M.jsx)(ft,{loading:n,error:i,empty:{when:e.length===0,message:`// no agents loaded — pass via serveWeb({ agent }) or serveWeb({ agents })`},children:(0,M.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:e.map(e=>(0,M.jsx)(kt,{agent:e,onModelUpdated:n=>t(t=>t.map(t=>t.name===e.name?{...t,model:n}:t))},e.name))})})}function kt({agent:e,onModelUpdated:t}){let[n,r]=(0,j.useState)(!1);return(0,M.jsxs)(`div`,{className:`panel space-y-4 p-4 text-xs`,children:[(0,M.jsxs)(`header`,{children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,M.jsx)(`h2`,{className:`text-sm font-bold uppercase tracking-wide`,children:e.name}),(0,M.jsxs)(`span`,{className:`badge`,children:[`v`,e.version]})]}),(0,M.jsxs)(`div`,{className:`mt-1 flex items-center gap-2 text-muted`,children:[(0,M.jsxs)(`span`,{children:[e.model.provider,`/`,e.model.model]}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>r(!0),className:`border border-line px-1.5 py-0.5 text-[10px] text-accent hover:bg-accent hover:text-bg`,"aria-label":`Edit model for ${e.name}`,children:`edit`})]})]}),n?(0,M.jsx)(Tt,{agent:e,onClose:()=>r(!1),onSaved:t}):null,(0,M.jsx)(At,{title:`system prompt`,children:(0,M.jsxs)(`details`,{className:`border border-line p-2`,children:[(0,M.jsxs)(`summary`,{className:`cursor-pointer text-[11px] text-muted`,children:[e.systemPromptLength.toLocaleString(),` chars · click to expand preview`]}),(0,M.jsx)(`pre`,{className:`mt-2 max-h-64 overflow-auto whitespace-pre-wrap text-[11px]`,children:e.systemPromptPreview})]})}),(0,M.jsx)(At,{title:`mcp servers`,children:e.mcpServers.length===0?(0,M.jsx)(`p`,{className:`text-muted`,children:`// none configured`}):(0,M.jsx)(`ul`,{className:`space-y-1`,children:e.mcpServers.map(e=>(0,M.jsxs)(`li`,{className:`flex items-center justify-between border border-line px-2 py-1`,children:[(0,M.jsx)(`span`,{children:e.name}),(0,M.jsx)(`span`,{className:`label`,children:e.transport})]},e.name))})}),(0,M.jsx)(At,{title:`permissions`,children:(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(jt,{label:`allowed`,items:e.permissions.allowedTools??[]}),(0,M.jsx)(jt,{label:`denied`,items:e.permissions.deniedTools??[]}),(0,M.jsx)(jt,{label:`requires approval`,items:e.permissions.requireApproval??[]})]})}),(0,M.jsx)(At,{title:`tools / skills`,children:(0,M.jsxs)(`div`,{className:`text-muted`,children:[`local tools: `,e.hasLocalTools?`yes`:`no`,` · skills:`,` `,e.hasSkills?`yes`:`no`]})}),(e.budget||e.sampling)&&(0,M.jsx)(At,{title:`budget / sampling`,children:(0,M.jsx)(`pre`,{className:`overflow-auto border border-line p-2 text-[11px]`,children:JSON.stringify({budget:e.budget,sampling:e.sampling},null,2)})})]})}function At({title:e,children:t}){return(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{className:`label mb-1`,children:e}),t]})}function jt({label:e,items:t}){return t.length===0?(0,M.jsxs)(`div`,{className:`text-muted`,children:[(0,M.jsxs)(`span`,{className:`label`,children:[e,`:`]}),` —`]}):(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{className:`label`,children:e}),(0,M.jsx)(`ul`,{className:`mt-1 flex flex-wrap gap-1`,children:t.map(e=>(0,M.jsx)(`li`,{className:`border border-line px-1.5 py-0.5 text-[11px]`,children:e},e))})]})}function Mt(e){let t=[];for(let n of e.effectTasks)try{n()}catch(e){t.push(e)}if(t.length>0){if(t.length===1)throw t[0];for(let e of t)console.error(e);throw AggregateError(t,`Errors during commit`)}}function Nt(e){let t=[];for(let n of e.cells)if(n?.type===`effect`&&(n.deps=null,n.cleanup))try{n.cleanup?.()}catch(e){t.push(e)}finally{n.cleanup=void 0}if(t.length>0){if(t.length===1)throw t[0];for(let e of t)console.error(e);throw AggregateError(t,`Errors during cleanup`)}}var Pt=typeof process<`u`&&!1,Ft=null;function It(e,t){e.currentIndex=0;let n=Ft;Ft=e;try{if(t(),e.isFirstRender=!1,e.cells.length!==e.currentIndex)throw Error(`Rendered ${e.currentIndex} hooks but expected ${e.cells.length}. Hooks must be called in the exact same order in every render.`)}finally{Ft=n}}function Lt(){if(!Ft)throw Error(`No resource fiber available`);return Ft}function Rt(e){return Pt?Ft?.devStrictMode?Ft.isFirstRender?`child`:`root`:e?`root`:null:null}function zt(e,t){let n=e[Bt];if(!n)throw Error(`ResourceElement.type is not a valid Resource`);return n(t)}var Bt=Symbol(`fnSymbol`);function Vt(e,t,n=void 0,r=Rt(!1)){return{type:e,root:t,markDirty:n,devStrictMode:r,cells:[],currentIndex:0,renderContext:void 0,isFirstRender:!0,isMounted:!1,isNeverMounted:!0}}function Ht(e){if(!e.isMounted)throw Error(`Tried to unmount a fiber that is already unmounted`);e.isMounted=!1,Nt(e)}function Ut(e,t){let n={effectTasks:[],props:t,output:void 0};return It(e,()=>{e.renderContext=n;try{n.output=zt(e.type,t)}finally{e.renderContext=void 0}}),n}function Wt(e,t){e.isMounted=!0,Pt&&e.isNeverMounted&&e.devStrictMode===`root`&&(e.isNeverMounted=!1,Mt(t),Nt(e)),e.isNeverMounted=!1,Mt(t)}var Gt=e=>({version:0,committedVersion:0,dispatchUpdate:e,changelog:[],dirtyCells:[]}),Kt=e=>{for(let t of e.dirtyCells)t.dirty=!1,t.queue.clear(),t.current=t.workInProgress;e.committedVersion=e.version,e.changelog.length=0,e.dirtyCells.length=0},qt=(e,t)=>{let n=e.version>t;if(e.version=t,n){for(let t of e.dirtyCells)t.dirty=!1,t.queue.clear(),t.workInProgress=t.current;if(e.dirtyCells.length=0,t===e.committedVersion)e.changelog.length=0;else{if(e.committedVersion>t)throw Error(`Version is less than committed version`);for(;e.committedVersion+e.changelog.length>t;)e.changelog.pop();e.changelog.forEach(e=>e()),Kt(e)}}},Jt=(e,t)=>{t.dirty||(t.dirty=!0,e.markDirty?.(),e.root.dirtyCells.push(t))},Yt=()=>{if(!Pt)return null;let e=(0,j.useRef)(0),t=e.current===0;return(0,j.useState)(()=>e.current++),e.current===2?t?`child`:`root`:null};function Xt(e){let t=(0,j.useMemo)(()=>Gt(e=>r(e)),[]),[n,r]=(0,j.useReducer)((e,n)=>(qt(t,e),e+ +!!n()),0);qt(t,n);let i=Yt(),a=(0,j.useMemo)(()=>(e.key,Vt(e.type,t,void 0,i)),[e.type,e.key,t,i]),o=Ut(a,e.props);return(0,j.useLayoutEffect)(()=>()=>Ht(a),[a]),(0,j.useLayoutEffect)(()=>{Kt(t),Wt(a,o)}),o.output}function N(e){let t=e=>({type:t,props:e});return t[Bt]=e,t}function Zt(e,t){return{...t,key:e}}var Qt=(e,t)=>{let n=Lt(),r=n.currentIndex++;if(!n.isFirstRender&&r>=n.cells.length)throw Error(`Rendered more hooks than during the previous render. Hooks must be called in the exact same order in every render.`);let i=n.cells[r];if(i||(i=t(),n.cells[r]=i),i.type!==e)throw Error(`Hook order changed between renders`);return i},$t=e=>{Lt().renderContext.effectTasks.push(e)},en=(e,t)=>{if(e.renderContext)throw Error(`Resource updated during render`);if(e.isNeverMounted)throw Error(`Resource updated before mount`);e.root.dispatchUpdate(()=>{let n=t();return n?(n(),e.root.changelog.push(n),!0):!1})};function tn(e,t,n,r){let i=Qt(`reducer`,()=>{let t=Lt(),a=r?r(n):n;return Pt&&t.devStrictMode&&r&&r(n),{type:`reducer`,queue:new Set,dirty:!1,workInProgress:a,current:a,reducer:e,dispatch:n=>{let r={action:n,hasEagerState:!1,eagerState:void 0};en(t,()=>t.root.dirtyCells.length===0&&!r.hasEagerState&&(r.eagerState=e(i.workInProgress,n),r.hasEagerState=!0,Object.is(i.current,r.eagerState))?null:()=>{Jt(t,i),i.queue.add(r)})}}}),a=Lt(),o=e===i.reducer;i.reducer=e;for(let t of i.queue)(!t.hasEagerState||!o)&&(t.eagerState=e(i.workInProgress,t.action),t.hasEagerState=!0),Pt&&a.devStrictMode&&e(i.workInProgress,t.action),i.workInProgress=t.eagerState;if(i.queue.clear(),t){let e=t(i.workInProgress);Object.is(e,i.workInProgress)||(Jt(a,i),i.workInProgress=e)}return[i.workInProgress,i.dispatch]}function nn(e,t,n){return tn(e,void 0,t,n)}function rn(e,t,n,r){return tn(e,t,n,r)}var an=(e,t)=>typeof t==`function`?t(e):t,on=e=>typeof e==`function`?e():e;function sn(e){return nn(an,e,on)}var cn=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0},ln=()=>({type:`effect`,cleanup:void 0,deps:null});function un(e,t){let n=Qt(`effect`,ln);if(!(t&&n.deps&&cn(n.deps,t))){if(n.deps!==null&&!!t!=!!n.deps)throw Error(`tapEffect called with and without dependencies across re-renders`);$t(()=>{let r=[];try{n.cleanup?.()}catch(e){r.push(e)}finally{n.cleanup=void 0}try{let t=e();if(t!==void 0&&typeof t!=`function`)throw Error(`An effect function must either return a cleanup function or nothing. Received: ${typeof t}`);n.cleanup=t}catch(e){r.push(e)}if(n.deps=t,r.length>0){if(r.length===1)throw r[0];for(let e of r)console.error(e);throw AggregateError(r,`Errors during commit`)}})}}function dn(e){let[t]=sn(()=>({current:e}));return t}function fn(e,t){let[n]=sn(e);return n}var pn=()=>{throw Error(`Memo reducer should not be called`)},P=(e,t)=>{let n=Lt(),[r]=rn(pn,r=>{if(r&&cn(r.deps,t))return r;let i=e();return Pt&&n.devStrictMode&&e(),{value:i,deps:t}},null);return r.value},mn=(e,t)=>P(()=>e,t);function hn(e){let t=dn(e);un(()=>{t.current=e});let n=Lt();return mn(((...e)=>{if(Pt&&n.renderContext)throw Error(`tapEffectEvent cannot be called during render`);return t.current(...e)}),[n])}function gn(e,t){let n=Lt(),r=dn(0),i=P(()=>(e.key,Vt(e.type,n.root,()=>{r.current++,n.markDirty?.()})),[e.type,e.key,n]),a=t?P(()=>Ut(i,e.props),[i,...t,r.current]):Ut(i,e.props);return un(()=>()=>Ht(i),[i]),un(()=>{Wt(i,a)},[i,a]),a.output}function _n(e,t){let n=dn(0),r=n.current,i=fn(Lt,[]),a=fn(()=>()=>{n.current++,i.markDirty?.()},[]),o=fn(()=>new Map,[]),s=t?mn(e,t):e,c=P(()=>{let e=s(),t=new Set,n=[],r=0;for(let s=0;s<e.length;s++){let c=e[s],l=c.key;if(l===void 0)throw Error(`tapResources did not provide a key for array at index ${s}`);if(t.has(l))throw Error(`Duplicate key ${l} in tapResources`);t.add(l);let u=o.get(l);if(!u){let e=Vt(c.type,i.root,a),t=Ut(e,c.props);u={fiber:e,next:t},r++,o.set(l,u),n.push(t.output)}else if(u.fiber.type!==c.type){let e=Vt(c.type,i.root,a),t=Ut(e,c.props);u.next=[e,t],n.push(t.output)}else u.next=Ut(u.fiber,c.props),n.push(u.next.output)}if(o.size>n.length-r)for(let e of o.keys())t.has(e)||(o.get(e).next=`delete`);return n},[s,r]);return un(()=>()=>{for(let e of o.keys()){let t=o.get(e).fiber;Ht(t)}},[]),un(()=>{for(let[e,t]of o.entries())t.next===`delete`?(t.fiber.isMounted&&Ht(t.fiber),o.delete(e)):Array.isArray(t.next)?(Ht(t.fiber),t.fiber=t.next[0],Wt(t.fiber,t.next[1])):Wt(t.fiber,t.next)},[c]),c}var vn=50,yn={schedulers:new Set([]),isScheduled:!1},bn=class{_task;_isDirty=!1;constructor(e){this._task=e}get isDirty(){return this._isDirty}markDirty(){this._isDirty=!0,yn.schedulers.add(this),xn()}runTask(){this._isDirty=!1,this._task()}},xn=()=>{yn.isScheduled||(yn.isScheduled=!0,Cn())},Sn=()=>{try{let e=[],t=0;for(let n of yn.schedulers)if(yn.schedulers.delete(n),n.isDirty){if(t++,t>vn)throw Error(`Maximum update depth exceeded. This can happen when a resource repeatedly calls setState inside tapEffect.`);try{n.runTask()}catch(t){e.push(t)}}if(e.length>0){if(e.length===1)throw e[0];for(let t of e)console.error(t);throw AggregateError(e,`Errors occurred during flushSync`)}}finally{yn.schedulers.clear(),yn.isScheduled=!1}},Cn=(()=>{if(typeof MessageChannel<`u`){let e=new MessageChannel;return e.port1.onmessage=Sn,()=>e.port2.postMessage(null)}return()=>setTimeout(Sn,0)})(),wn=e=>{let t=yn;yn={schedulers:new Set([]),isScheduled:!0};try{let t=e();return Sn(),t}finally{yn=t}},Tn=e=>{let t=fn(()=>new bn(()=>l(null)),[]),n=fn(()=>[],[]),r=P(()=>(e.key,Vt(e.type,Gt(e=>{!t.isDirty&&!e()||(n.push(e),t.markDirty())}))),[e.type,e.key]);qt(r.root,r.root.committedVersion);let i=Ut(r,e.props),a=dn(!1),o=dn(e.props),s=dn(i.output),c=fn(()=>new Set,[]),l=hn(e=>{if(e===null&&(qt(r.root,2),qt(r.root,1),n.forEach(e=>{Pt&&r.devStrictMode&&e(),e()}),Pt&&r.devStrictMode&&Ut(r,o.current),e=Ut(r,o.current)),t.isDirty)throw Error(`Scheduler is dirty, this should never happen`);Kt(r.root),n.length=0,a.current&&Wt(r,e),!(t.isDirty||s.current===e.output)&&(s.current=e.output,c.forEach(e=>e()))});return un(()=>(a.current=!0,()=>{a.current=!1,Ht(r)}),[r]),un(()=>{o.current=i.props,Kt(r.root),Wt(r,i),!(t.isDirty||s.current===i.output)&&(s.current=i.output,c.forEach(e=>e()))}),P(()=>({getValue:()=>s.current,subscribe:e=>(c.add(e),()=>c.delete(e))}),[])},En=Symbol(`tap.Context`),Dn=e=>({[En]:e}),On=(e,t,n)=>{let r=e[En];e[En]=t;try{return n()}finally{e[En]=r}},kn=e=>e[En],An=Symbol(`assistant-ui.store.clientIndex`),jn=e=>e[An],Mn=Dn([]),Nn=()=>kn(Mn),Pn=(e,t)=>{let n=Nn();return On(Mn,P(()=>[...n,e],[n,e]),t)},Fn=new Set([`$$typeof`,`nodeType`,`then`]),In=(e,t)=>{if(e===Symbol.toStringTag)return t;if(typeof e!=`symbol`){if(e===`toJSON`)return()=>t;if(!Fn.has(e))return!1}},Ln=class{getOwnPropertyDescriptor(e,t){let n=this.get(e,t);if(n!==void 0)return{value:n,writable:!1,enumerable:!0,configurable:!1}}set(){return!1}setPrototypeOf(){return!1}defineProperty(){return!1}deleteProperty(){return!1}preventExtensions(){return!1}},Rn=e=>{let t=N(e);return e=>{let n=t(e);return e.key===void 0?n:Zt(e.key,n)}},zn=Symbol(`assistant-ui.store.getValue`),Bn=e=>{let t=e[zn];if(!t)throw Error(`Client scope contains a non-client resource. Ensure your Derived get() returns a client created with tapClientResource(), not a plain resource.`);return t.getState?.()},Vn=new Map;function Hn(e){let t=Vn.get(e);return t||(t=function(...t){if(!this||typeof this!=`object`)throw Error(`Method "${String(e)}" called without proper context. This may indicate the function was called incorrectly.`);let n=this[zn];if(!n)throw Error(`Method "${String(e)}" called on invalid client proxy. Ensure you are calling this method on a valid client instance.`);let r=n[e];if(!r)throw Error(`Method "${String(e)}" is not implemented.`);if(typeof r!=`function`)throw Error(`"${String(e)}" is not a function.`);return r(...t)},Vn.set(e,t)),t}var Un=class extends Ln{outputRef;index;boundFns;cachedReceiver;constructor(e,t){super(),this.outputRef=e,this.index=t}get(e,t,n){if(t===zn)return this.outputRef.current;if(t===An)return this.index;let r=In(t,`ClientProxy`);if(r!==!1)return r;let i=this.outputRef.current[t];if(typeof i==`function`){this.cachedReceiver!==n&&(this.boundFns=new Map,this.cachedReceiver=n);let e=this.boundFns.get(t);return e||(e=Hn(t).bind(n),this.boundFns.set(t,e)),e}return i}ownKeys(){return Object.keys(this.outputRef.current)}has(e,t){return t===zn||t===An?!0:t in this.outputRef.current}},Wn=Rn(e=>{let t=dn(null),n=Nn().length,r=P(()=>new Proxy({},new Un(t,n)),[n]),i=Pn(r,()=>gn(e));return t.current||=i,un(()=>{t.current=i}),{methods:r,state:i.getState?.(),key:e.key}}),Gn=e=>gn(Wn(e)),Kn=Symbol(`assistant-ui.store.proxiedAssistantState`),qn=e=>e===`on`||e===`subscribe`||typeof e==`symbol`,Jn=e=>{class t extends Ln{get(t,n){let r=In(n,`AssistantState`);if(r!==!1)return r;let i=n;if(!qn(i))return Bn(e[i]())}ownKeys(){return Object.keys(e).filter(e=>!qn(e))}has(t,n){return!qn(n)&&n in e}}return new Proxy({},new t)},Yn=e=>e[Kn],Xn=()=>()=>{},Zn=e=>{let t=(()=>{throw Error(e)});return t.source=null,t.query=null,t},Qn=new Proxy({},new class extends Ln{get(e,t){if(t===`subscribe`||t===`on`)return Xn;if(t===Kn)return $n;let n=In(t,`DefaultAssistantClient`);return n===!1?Zn(`You are using a component or hook that requires an AuiProvider. Wrap your component in an <AuiProvider> component.`):n}ownKeys(){return[`subscribe`,`on`,Kn]}has(e,t){return t===`subscribe`||t===`on`||t===Kn}}),$n=Jn(Qn),er=()=>new Proxy({},{get(e,t){let n=In(t,`AssistantClient`);return n===!1?Zn(`The current scope does not have a "${String(t)}" property.`):n}}),tr=(0,j.createContext)(Qn),nr=()=>(0,j.useContext)(tr),rr=({value:e,children:t})=>(0,M.jsx)(tr.Provider,{value:e,children:t}),ir=N(e=>null),ar=Symbol(`assistant-ui.transform-scopes`);function or(e,t){let n=e;if(n[ar])throw Error(`transformScopes is already attached to this resource`);n[ar]=t}function sr(e){return e[ar]}function cr(e,t){let n={...e},r=new Set,i=!0;for(;i;){i=!1;for(let e of Object.values(n)){if(e.type===ir||r.has(e.type))continue;r.add(e.type);let a=sr(e.type);if(a){a(n,t),i=!0;break}}}let a={},o={};for(let[e,t]of Object.entries(n))t.type===ir?o[e]=t:a[e]=t;return{rootClients:a,derivedClients:o}}var lr=e=>P(()=>e,[...Object.entries(e).flat()]),ur=(e,t)=>{let{rootClients:n,derivedClients:r}=cr(e,t);return{rootClients:lr(n),derivedClients:lr(r)}},dr=e=>typeof e==`string`?{scope:e.split(`.`)[0],event:e}:{scope:e.scope,event:e.event},fr=N(()=>fn(()=>{let e=new Map,t=new Set,n=new Set;return{on(n,r){let i=r;if(n===`*`)return t.add(i),()=>t.delete(i);let a=e.get(n);return a||(a=new Set,e.set(n,a)),a.add(i),()=>{a.delete(i),a.size===0&&e.delete(n)}},emit(n,r,i){let a=e.get(n);!a&&t.size===0||queueMicrotask(()=>{let e=[];if(a)for(let t of a)try{t(r,i)}catch(t){e.push(t)}if(t.size>0){let a={event:n,payload:r};for(let n of t)try{n(a,i)}catch(t){e.push(t)}}if(e.length>0){if(e.length===1)throw e[0];for(let t of e)console.error(t);throw AggregateError(e,`Errors occurred during event emission`)}})},subscribe(e){return n.add(e),()=>n.delete(e)},notifySubscribers(){for(let e of n)try{e()}catch(e){console.error(`NotificationManager: subscriber callback error`,e)}}}},[])),pr=Dn(null),mr=(e,t)=>On(pr,e,t),hr=()=>{let e=kn(pr);if(!e)throw Error(`AssistantTapContext is not available`);return e},gr=()=>hr().clientRef,_r=()=>{let{emit:e}=hr(),t=Nn();return hn((n,r)=>{e(n,r,t)})},vr=e=>P(()=>e,e),yr=N(({element:e,emit:t,clientRef:n})=>{let{methods:r,state:i}=mr({clientRef:n,emit:t},()=>Gn(e));return P(()=>({state:i,methods:r}),[r,i])}),br=N(({element:e,notifications:t,clientRef:n,name:r})=>{let i=Tn(yr({element:e,emit:t.emit,clientRef:n}));return un(()=>i.subscribe(t.notifySubscribers),[i,t]),P(()=>{let e=()=>i.getValue().methods;return Object.defineProperties(e,{source:{value:`root`,writable:!1},query:{value:{},writable:!1},name:{value:r,configurable:!0}}),e},[i,r])}),xr=N(()=>P(()=>({clients:[],subscribe:void 0,on:void 0}),[])),Sr=N(({clients:e,clientRef:t})=>{let n=gn(fr());un(()=>t.parent.subscribe(n.notifySubscribers),[t,n]);let r=vr(_n(()=>Object.keys(e).map(r=>Zt(r,br({element:e[r],notifications:n,clientRef:t,name:r}))),[e,n,t]));return P(()=>({clients:r,subscribe:n.subscribe,on:function(e,r){if(!this)throw Error(`const { on } = useAui() is not supported. Use aui.on() instead.`);let{scope:i,event:a}=dr(e);if(i!==`*`&&this[i].source===null)throw Error(`Scope "${i}" is not available. Use { scope: "*", event: "${a}" } to listen globally.`);let o=n.on(a,(e,t)=>{if(i===`*`){r(e);return}let n=this[i]();n===t[jn(n)]&&r(e)});if(i!==`*`&&t.parent[i].source===null)return o;let s=t.parent.on(e,r);return()=>{o(),s()}}}),[r,n,t])}),Cr=(e,t,n)=>{if(`source`in e&&`query`in e)return e;if(n.dep===e)return n.meta;let r=e.getMeta(t.current);return n.meta=r,n.dep=e,r},wr=N(({element:e,clientRef:t,name:n})=>{let r=hn(()=>e.props);return P(()=>{let e=()=>r().get(t.current),i={};return Object.defineProperties(e,{source:{get:()=>Cr(r(),t,i).source},query:{get:()=>Cr(r(),t,i).query},name:{value:n,configurable:!0}}),e},[t,n])}),Tr=N(({clients:e,clientRef:t})=>vr(_n(()=>Object.keys(e).map(n=>Zt(n,wr({element:e[n],clientRef:t,name:n}))),[e,t]))),Er=N(({parent:e,clients:t})=>{let{rootClients:n,derivedClients:r}=ur(t,e),i=dn({parent:e,current:null}).current;un(()=>{i.current=s});let a=gn(Object.keys(n).length>0?Sr({clients:n,clientRef:i}):xr()),o=gn(Tr({clients:r,clientRef:i})),s=P(()=>{let t=e===Qn?er():e,n=Object.create(t);Object.assign(n,{subscribe:a.subscribe??e.subscribe,on:a.on??e.on,[Kn]:Jn(n)});for(let e of a.clients)n[e.name]=e;for(let e of o)n[e.name]=e;return n},[e,a,o]);return i.current===null&&(i.current=s),s});function Dr(e,{parent:t}={parent:nr()}){if(e)return Xt(Er({parent:t??Qn,clients:e}));if(t===null)throw Error(`received null parent, this usage is not allowed`);return t}var F=e=>{let t=Dr(),n=Yn(t),r=(0,j.useSyncExternalStore)(t.subscribe,()=>e(n),()=>e(n));if(r===n)throw Error(`You tried to return the entire AssistantState. This is not supported due to technical limitations.`);return(0,j.useDebugValue)(r),r},Or=j.createContext(!0);function kr(){throw Error(`A function wrapped in useEffectEvent can't be called during rendering.`)}var Ar=`use`in j.default?()=>{try{return j.use(Or)}catch{return!1}}:()=>!1;function jr(e){let t=j.useRef(kr);return j.useInsertionEffect(()=>{t.current=e},[e]),(...e)=>{Ar()&&kr();let n=t.current;return n(...e)}}var Mr=(e,t)=>{let n=Dr(),r=jr(t),{scope:i,event:a}=dr(e);(0,j.useEffect)(()=>n.on({scope:i,event:a},r),[n,i,a,r])},Nr=e=>{let t=Dr(),n=(0,j.useRef)(!1),r=n.current?null:e(t);return F(()=>n.current?e(t):r),()=>(n.current=!0,e(t))},Pr=Object.freeze({});function Fr({getItemState:e,children:t}){return Ir(t(Nr(e)))}var Ir=e=>{let t=typeof e==`object`&&e&&`type`in e?e:null,n=t?.type,r=t?.key;return(0,j.useMemo)(()=>t,[n,r,typeof t?.props==`object`&&t.props!=null&&Object.entries(t.props).length===0?Pr:t?.props])??e},Lr=Rn(e=>{if(e.key===void 0)throw Error(`tapClientResource: Element has no key`);return gn(Wn(e))});function Rr(e,t){let n=_n(()=>e().map(e=>Lr(e)),t),r=P(()=>Object.keys(n),[n]),i=P(()=>n.reduce((e,t,n)=>(e[t.key]=n,e),{}),[n]);return{state:P(()=>n.map(e=>e.state),[n]),get:e=>{if(`index`in e){if(e.index<0||e.index>=r.length)throw Error(`tapClientLookup: Index ${e.index} out of bounds (length: ${r.length})`);return n[e.index].methods}let t=i[e.key];if(t===void 0)throw Error(`tapClientLookup: Key "${e.key}" not found`);return n[t].methods}}}var zr=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},Br=(e=>e?zr(e):zr),Vr=e=>e;function Hr(e,t=Vr){let n=j.useSyncExternalStore(e.subscribe,j.useCallback(()=>t(e.getState()),[e,t]),j.useCallback(()=>t(e.getInitialState()),[e,t]));return j.useDebugValue(n),n}var Ur=e=>{let t=Br(e),n=e=>Hr(t,e);return Object.assign(n,t),n},Wr=(e=>e?Ur(e):Ur),Gr=o(((e,t)=>{var n=typeof Buffer<`u`,r=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,i=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function a(e,t,a){a==null&&typeof t==`object`&&t&&(a=t,t=void 0),n&&Buffer.isBuffer(e)&&(e=e.toString()),e&&e.charCodeAt(0)===65279&&(e=e.slice(1));let s=JSON.parse(e,t);if(typeof s!=`object`||!s)return s;let c=a&&a.protoAction||`error`,l=a&&a.constructorAction||`error`;if(c===`ignore`&&l===`ignore`)return s;if(c!==`ignore`&&l!==`ignore`){if(r.test(e)===!1&&i.test(e)===!1)return s}else if(c!==`ignore`&&l===`ignore`){if(r.test(e)===!1)return s}else if(i.test(e)===!1)return s;return o(s,{protoAction:c,constructorAction:l,safe:a&&a.safe})}function o(e,{protoAction:t=`error`,constructorAction:n=`error`,safe:r}={}){let i=[e];for(;i.length;){let e=i;i=[];for(let a of e){if(t!==`ignore`&&Object.prototype.hasOwnProperty.call(a,`__proto__`)){if(r===!0)return null;if(t===`error`)throw SyntaxError(`Object contains forbidden prototype property`);delete a.__proto__}if(n!==`ignore`&&Object.prototype.hasOwnProperty.call(a,`constructor`)&&a.constructor!==null&&typeof a.constructor==`object`&&Object.prototype.hasOwnProperty.call(a.constructor,`prototype`)){if(r===!0)return null;if(n===`error`)throw SyntaxError(`Object contains forbidden prototype property`);delete a.constructor}for(let e in a){let t=a[e];t&&typeof t==`object`&&i.push(t)}}}return e}function s(e,t,n){let{stackTraceLimit:r}=Error;Error.stackTraceLimit=0;try{return a(e,t,n)}finally{Error.stackTraceLimit=r}}function c(e,t){let{stackTraceLimit:n}=Error;Error.stackTraceLimit=0;try{return a(e,t,{safe:!0})}catch{return}finally{Error.stackTraceLimit=n}}t.exports=s,t.exports.default=s,t.exports.parse=s,t.exports.safeParse=c,t.exports.scan=o}));function Kr(e){let t=[`ROOT`],n=-1,r=null,i=[],a;function o(){a!==void 0&&(i.push(JSON.parse(`"${a}"`)),a=void 0)}function s(e,i,a){switch(e){case`"`:n=i,t.pop(),t.push(a),t.push(`INSIDE_STRING`),o();break;case`f`:case`t`:case`n`:n=i,r=i,t.pop(),t.push(a),t.push(`INSIDE_LITERAL`);break;case`-`:t.pop(),t.push(a),t.push(`INSIDE_NUMBER`),o();break;case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n=i,t.pop(),t.push(a),t.push(`INSIDE_NUMBER`),o();break;case`{`:n=i,t.pop(),t.push(a),t.push(`INSIDE_OBJECT_START`),o();break;case`[`:n=i,t.pop(),t.push(a),t.push(`INSIDE_ARRAY_START`),o();break}}function c(e,r){switch(e){case`,`:t.pop(),t.push(`INSIDE_OBJECT_AFTER_COMMA`);break;case`}`:n=r,t.pop(),a=i.pop();break}}function l(e,r){switch(e){case`,`:t.pop(),t.push(`INSIDE_ARRAY_AFTER_COMMA`),a=(Number(a)+1).toString();break;case`]`:n=r,t.pop(),a=i.pop();break}}for(let o=0;o<e.length;o++){let u=e[o];switch(t[t.length-1]){case`ROOT`:s(u,o,`FINISH`);break;case`INSIDE_OBJECT_START`:switch(u){case`"`:t.pop(),t.push(`INSIDE_OBJECT_KEY`),a=``;break;case`}`:n=o,t.pop(),a=i.pop();break}break;case`INSIDE_OBJECT_AFTER_COMMA`:switch(u){case`"`:t.pop(),t.push(`INSIDE_OBJECT_KEY`),a=``;break}break;case`INSIDE_OBJECT_KEY`:switch(u){case`"`:t.pop(),t.push(`INSIDE_OBJECT_AFTER_KEY`);break;case`\\`:t.push(`INSIDE_STRING_ESCAPE`),a+=u;break;default:a+=u;break}break;case`INSIDE_OBJECT_AFTER_KEY`:switch(u){case`:`:t.pop(),t.push(`INSIDE_OBJECT_BEFORE_VALUE`);break}break;case`INSIDE_OBJECT_BEFORE_VALUE`:s(u,o,`INSIDE_OBJECT_AFTER_VALUE`);break;case`INSIDE_OBJECT_AFTER_VALUE`:c(u,o);break;case`INSIDE_STRING`:switch(u){case`"`:t.pop(),n=o,a=i.pop();break;case`\\`:t.push(`INSIDE_STRING_ESCAPE`);break;default:n=o}break;case`INSIDE_ARRAY_START`:switch(u){case`]`:n=o,t.pop(),a=i.pop();break;default:n=o,a=`0`,s(u,o,`INSIDE_ARRAY_AFTER_VALUE`);break}break;case`INSIDE_ARRAY_AFTER_VALUE`:switch(u){case`,`:t.pop(),t.push(`INSIDE_ARRAY_AFTER_COMMA`),a=(Number(a)+1).toString();break;case`]`:n=o,t.pop(),a=i.pop();break;default:n=o;break}break;case`INSIDE_ARRAY_AFTER_COMMA`:s(u,o,`INSIDE_ARRAY_AFTER_VALUE`);break;case`INSIDE_STRING_ESCAPE`:t.pop(),t[t.length-1]===`INSIDE_STRING`?n=o:t[t.length-1]===`INSIDE_OBJECT_KEY`&&(a+=u);break;case`INSIDE_NUMBER`:switch(u){case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n=o;break;case`e`:case`E`:case`-`:case`.`:break;case`,`:t.pop(),a=i.pop(),t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&l(u,o),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`&&c(u,o);break;case`}`:t.pop(),a=i.pop(),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`&&c(u,o);break;case`]`:t.pop(),a=i.pop(),t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&l(u,o);break;default:t.pop(),a=i.pop();break}break;case`INSIDE_LITERAL`:{let i=e.substring(r,o+1);!`false`.startsWith(i)&&!`true`.startsWith(i)&&!`null`.startsWith(i)?(t.pop(),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`?c(u,o):t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&l(u,o)):n=o;break}}}let u=e.slice(0,n+1);for(let n=t.length-1;n>=0;n--)switch(t[n]){case`INSIDE_STRING`:u+=`"`;break;case`INSIDE_OBJECT_KEY`:case`INSIDE_OBJECT_AFTER_KEY`:case`INSIDE_OBJECT_AFTER_COMMA`:case`INSIDE_OBJECT_START`:case`INSIDE_OBJECT_BEFORE_VALUE`:case`INSIDE_OBJECT_AFTER_VALUE`:u+=`}`;break;case`INSIDE_ARRAY_START`:case`INSIDE_ARRAY_AFTER_COMMA`:case`INSIDE_ARRAY_AFTER_VALUE`:u+=`]`;break;case`INSIDE_LITERAL`:{let t=e.substring(r,e.length);`true`.startsWith(t)?u+=`true`.slice(t.length):`false`.startsWith(t)?u+=`false`.slice(t.length):`null`.startsWith(t)&&(u+=`null`.slice(t.length))}}return[u,i]}var qr=a(Gr(),1),Jr=Symbol(`aui.parse-partial-json-object.meta`),Yr=e=>{if(e.length===0)return{[Jr]:{state:`partial`,partialPath:[]}};try{let t=qr.default.parse(e);if(typeof t!=`object`||!t)throw Error(`argsText is expected to be an object`);return t[Jr]={state:`complete`,partialPath:[]},t}catch{try{let[t,n]=Kr(e),r=qr.default.parse(t);if(typeof r!=`object`||!r)throw Error(`argsText is expected to be an object`);return r[Jr]={state:`partial`,partialPath:n},r}catch{return}}},Xr=(e,t=21)=>(n=t)=>{let r=``,i=n|0;for(;i--;)r+=e[Math.random()*e.length|0];return r},Zr=N(e=>({getState:()=>e})),Qr=N(e=>{let[t]=sn(()=>({suggestions:(e??[]).map(e=>typeof e==`string`?{title:e,label:``,prompt:e}:{title:e.title,label:e.label,prompt:e.prompt})})),n=Rr(()=>t.suggestions.map((e,t)=>Zt(t,Zr(e))),[t.suggestions]);return{getState:()=>t,suggestion:({index:e})=>n.get({index:e})}}),$r=Object.freeze({type:`complete`}),ei=N(({parts:e,getMessagePart:t})=>{let[n,r]=sn(!0),i=P(()=>e[e.length-1]?.status??$r,[e]),a=P(()=>({parts:e,collapsed:n,status:i}),[e,n,i]);return{getState:()=>a,setCollapsed:r,part:t}}),ti=e=>Array.from(e).map(e=>e.getModelContext()).sort((e,t)=>(t.priority??0)-(e.priority??0)).reduce((e,t)=>{if(t.system&&(e.system?e.system+=`\n\n${t.system}`:e.system=t.system),t.tools)for(let[n,r]of Object.entries(t.tools)){let t=e.tools?.[n];if(t&&t!==r)throw Error(`You tried to define a tool with the name ${n}, but it already exists.`);e.tools||={},e.tools[n]=r}return t.config&&(e.config={...e.config,...t.config}),t.callSettings&&(e.callSettings={...e.callSettings,...t.callSettings}),e},{}),ni=class{_providers=new Set;getModelContext(){return ti(this._providers)}registerModelContextProvider(e){this._providers.add(e);let t=e.subscribe?.(()=>{this.notifySubscribers()});return this.notifySubscribers(),()=>{this._providers.delete(e),t?.(),this.notifySubscribers()}}_subscribers=new Set;notifySubscribers(){for(let e of this._subscribers)e()}subscribe(e){return this._subscribers.add(e),()=>this._subscribers.delete(e)}},ri=1,ii=N(()=>{let[e]=sn(()=>({version:ri+1})),t=P(()=>new ni,[]);return{getState:()=>e,getModelContext:()=>t.getModelContext(),subscribe:e=>t.subscribe(e),register:e=>t.registerModelContextProvider(e)}}),ai=N(({toolkit:e})=>{let[t,n]=sn(()=>({tools:{}})),r=gr(),i=mn((e,t)=>(n(n=>({...n,tools:{...n.tools,[e]:[...n.tools[e]??[],t]}})),()=>{n(n=>({...n,tools:{...n.tools,[e]:n.tools[e]?.filter(e=>e!==t)??[]}}))}),[]);return un(()=>{if(!e)return;let t=[];for(let[n,r]of Object.entries(e))r.render&&t.push(i(n,r.render));let n=Object.entries(e).reduce((e,[t,n])=>{let{render:r,...i}=n;return e[t]=i,e},{});return t.push(r.current.modelContext().register({getModelContext:()=>({tools:n})})),()=>{t.forEach(e=>e())}},[e,i,r]),{getState:()=>t,setToolUI:i}});or(ai,(e,t)=>{!e.modelContext&&t.modelContext.source===null&&(e.modelContext=ii())});var oi=N(()=>{let[e,t]=sn(()=>({renderers:{},fallbacks:[]}));return{getState:()=>e,setDataUI:mn((e,n)=>(t(t=>({...t,renderers:{...t.renderers,[e]:[...t.renderers[e]??[],n]}})),()=>{t(t=>({...t,renderers:{...t.renderers,[e]:t.renderers[e]?.filter(e=>e!==n)??[]}}))}),[]),setFallbackDataUI:mn(e=>(t(t=>({...t,fallbacks:[...t.fallbacks,e]})),()=>{t(t=>({...t,fallbacks:t.fallbacks.filter(t=>t!==e)}))}),[])}}),si=Symbol.for(`aui.tool-response`),ci=class e{get[si](){return!0}artifact;result;isError;messages;constructor(e){e.artifact!==void 0&&(this.artifact=e.artifact),this.result=e.result,this.isError=e.isError??!1,e.messages!==void 0&&(this.messages=e.messages)}static[Symbol.hasInstance](e){return typeof e==`object`&&!!e&&si in e}static toResponse(t){return t instanceof e?t:new e({result:t===void 0?`<no result>`:t})}},li=e=>{let[,t]=sn(e.getState);return un(()=>(t(e.getState()),e.subscribe(()=>{t(e.getState())})),[e]),e.getState()},ui=N(({runtime:e})=>{let t=li(e);return{getState:()=>t,remove:e.remove,__internal_getRuntime:()=>e}}),di=N(({runtime:e})=>{let t=li(e);return{getState:()=>t,addToolResult:t=>e.addToolResult(t),resumeToolCall:t=>e.resumeToolCall(t),__internal_getRuntime:()=>e}}),fi=N(({runtime:e,index:t})=>gn(ui({runtime:P(()=>e.getAttachmentByIndex(t),[e,t])}))),pi=N(({threadIdRef:e,messageIdRef:t,runtime:n})=>{let r=li(n),i=_r();un(()=>{let r=[];for(let a of[`send`,`attachmentAdd`]){let o=n.unstable_on(a,()=>{i(`composer.${a}`,{threadId:e.current,...t&&{messageId:t.current}})});r.push(o)}return r.push(n.unstable_on(`attachmentAddError`,n=>{i(`composer.attachmentAddError`,{threadId:e.current,...t&&{messageId:t.current},...n.attachmentId&&{attachmentId:n.attachmentId},reason:n.reason,message:n.message})})),()=>{for(let e of r)e()}},[n,i,e,t]);let a=Rr(()=>r.attachments.map((e,t)=>Zt(e.id,fi({runtime:n,index:t}))),[r.attachments,n]),o=P(()=>({text:r.text,role:r.role,attachments:a.state,runConfig:r.runConfig,isEditing:r.isEditing,canCancel:r.canCancel,attachmentAccept:r.attachmentAccept,isEmpty:r.isEmpty,type:r.type??`thread`,dictation:r.dictation,quote:r.quote,queue:[]}),[r,a.state]);return{getState:()=>o,setText:n.setText,setRole:n.setRole,setRunConfig:n.setRunConfig,addAttachment:n.addAttachment,reset:n.reset,clearAttachments:n.clearAttachments,send:n.send,cancel:n.cancel,beginEdit:n.beginEdit??(()=>{throw Error(`beginEdit is not supported in this runtime`)}),startDictation:n.startDictation,stopDictation:n.stopDictation,setQuote:n.setQuote,attachment:e=>`id`in e?a.get({key:e.id}):a.get(e),queueItem:()=>{throw Error(`Queue is not supported in this runtime`)},__internal_getRuntime:()=>n}}),mi=N(({runtime:e,index:t})=>gn(ui({runtime:P(()=>e.getAttachmentByIndex(t),[e,t])}))),hi=N(({runtime:e,index:t})=>gn(di({runtime:P(()=>e.getMessagePartByIndex(t),[e,t])}))),gi=N(({runtime:e,threadIdRef:t})=>{let n=li(e),[r,i]=sn(!1),[a,o]=sn(!1),s=P(()=>({get current(){return e.getState().id}}),[e]),c=Gn(pi({runtime:e.composer,threadIdRef:t,messageIdRef:s})),l=Rr(()=>n.content.map((t,n)=>Zt(`toolCallId`in t&&t.toolCallId!=null?`toolCallId-${t.toolCallId}`:`index-${n}`,hi({runtime:e,index:n}))),[n.content,e]),u=Rr(()=>(n.attachments??[]).map((t,n)=>Zt(t.id,mi({runtime:e,index:n}))),[n.attachments,e]),d=P(()=>({...n,parts:l.state,composer:c.state,isCopied:r,isHovering:a}),[n,l.state,c.state,r,a]);return{getState:()=>d,composer:()=>c.methods,reload:t=>e.reload(t),speak:()=>e.speak(),stopSpeaking:()=>e.stopSpeaking(),submitFeedback:t=>e.submitFeedback(t),switchToBranch:t=>e.switchToBranch(t),getCopyText:()=>e.unstable_getCopyText(),part:e=>`index`in e?l.get({index:e.index}):l.get({key:`toolCallId-${e.toolCallId}`}),attachment:e=>`id`in e?u.get({key:e.id}):u.get(e),setIsCopied:i,setIsHovering:o,__internal_getRuntime:()=>e}}),_i=N(({runtime:e,id:t,threadIdRef:n})=>gn(gi({runtime:P(()=>e.getMessageById(t),[e,t]),threadIdRef:n}))),vi=N(({runtime:e})=>{let t=li(e),n=_r();un(()=>{let t=[];for(let r of[`runStart`,`runEnd`,`initialize`,`modelContextUpdate`]){let i=e.unstable_on(r,()=>{let t=e.getState()?.threadId||`unknown`;n(`thread.${r}`,{threadId:t})});t.push(i)}return()=>{for(let e of t)e()}},[e,n]);let r=P(()=>({get current(){return e.getState().threadId}}),[e]),i=Gn(pi({runtime:e.composer,threadIdRef:r})),a=Rr(()=>t.messages.map(t=>Zt(t.id,_i({runtime:e,id:t.id,threadIdRef:r}))),[t.messages,e,r]),o=P(()=>({isEmpty:a.state.length===0&&!t.isLoading,isDisabled:t.isDisabled,isLoading:t.isLoading,isRunning:t.isRunning,capabilities:t.capabilities,state:t.state,suggestions:t.suggestions,extras:t.extras,speech:t.speech,voice:t.voice,composer:i.state,messages:a.state}),[t,a,i.state]);return{getState:()=>o,composer:()=>i.methods,append:e.append,startRun:e.startRun,resumeRun:e.resumeRun,cancelRun:e.cancelRun,getModelContext:e.getModelContext,export:e.export,import:e.import,reset:e.reset,stopSpeaking:e.stopSpeaking,connectVoice:e.connectVoice,disconnectVoice:e.disconnectVoice,getVoiceVolume:e.getVoiceVolume,subscribeVoiceVolume:e.subscribeVoiceVolume,muteVoice:e.muteVoice,unmuteVoice:e.unmuteVoice,message:e=>`id`in e?a.get({key:e.id}):a.get(e),__internal_getRuntime:()=>e}}),yi=N(({runtime:e})=>{let t=li(e),n=_r();return un(()=>{let t=[];for(let r of[`switchedTo`,`switchedAway`]){let i=e.unstable_on(r,()=>{n(`threadListItem.${r}`,{threadId:e.getState().id})});t.push(i)}return()=>{for(let e of t)e()}},[e,n]),{getState:()=>t,switchTo:e.switchTo,rename:e.rename,archive:e.archive,unarchive:e.unarchive,delete:e.delete,generateTitle:e.generateTitle,initialize:e.initialize,detach:e.detach,__internal_getRuntime:()=>e}}),bi=N(({runtime:e,id:t})=>gn(yi({runtime:P(()=>e.getItemById(t),[e,t])}))),xi=N(({runtime:e,__internal_assistantRuntime:t})=>{let n=li(e),r=Gn(vi({runtime:e.main})),i=Rr(()=>Object.keys(n.threadItems).map(t=>Zt(t,bi({runtime:e,id:t}))),[n.threadItems,e]),a=P(()=>({mainThreadId:n.mainThreadId,newThreadId:n.newThreadId??null,isLoading:n.isLoading,isLoadingMore:n.isLoadingMore,hasMore:n.hasMore,threadIds:n.threadIds,archivedThreadIds:n.archivedThreadIds,threadItems:i.state,main:r.state}),[n,i.state,r.state]);return{getState:()=>a,thread:()=>r.methods,item:e=>{if(e===`main`)return i.get({key:a.mainThreadId});if(`id`in e)return i.get({key:e.id});let{index:t,archived:n=!1}=e,r=n?a.archivedThreadIds[t]:a.threadIds[t];return i.get({key:r})},switchToThread:async t=>{await e.switchToThread(t)},switchToNewThread:async()=>{await e.switchToNewThread()},getLoadThreadsPromise:()=>e.getLoadThreadsPromise(),reload:()=>e.reload(),loadMore:()=>e.loadMore(),__internal_getAssistantRuntime:()=>t}}),Si=N(e=>{let t=gr();return un(()=>e.registerModelContextProvider(t.current.modelContext()),[e,t]),gn(xi({runtime:e.threads,__internal_assistantRuntime:e}))}),Ci=(e,t)=>{e.thread??=ir({source:`threads`,query:{type:`main`},get:e=>e.threads().thread(`main`)}),e.threadListItem??=ir({source:`threads`,query:{type:`main`},get:e=>e.threads().item(`main`)}),e.composer??=ir({source:`thread`,query:{},get:e=>e.threads().thread(`main`).composer()}),!e.modelContext&&t.modelContext.source===null&&(e.modelContext=ii()),!e.suggestions&&t.suggestions.source===null&&(e.suggestions=Qr())},wi=({index:e,children:t})=>(0,M.jsx)(rr,{value:Dr({message:ir({source:`thread`,query:{type:`index`,index:e},get:t=>t.thread().message({index:e})}),composer:ir({source:`message`,query:{},get:t=>t.thread().message({index:e}).composer()})}),children:t}),Ti=({index:e,children:t})=>(0,M.jsx)(rr,{value:Dr({part:ir({source:`message`,query:{type:`index`,index:e},get:t=>t.message().part({index:e})})}),children:t}),Ei=N(({text:e,isRunning:t})=>{let n=P(()=>({type:`text`,text:e,status:t?{type:`running`}:{type:`complete`}}),[e,t]);return{getState:()=>n,addToolResult:()=>{throw Error(`Not supported`)},resumeToolCall:()=>{throw Error(`Not supported`)}}}),Di=({text:e,isRunning:t=!1,children:n})=>(0,M.jsx)(rr,{value:Dr({part:Ei({text:e,isRunning:t})}),children:n}),Oi=({startIndex:e,endIndex:t,children:n})=>{let r=F(e=>e.message.parts).slice(e,t+1),i=Dr();return(0,M.jsx)(rr,{value:Dr({chainOfThought:ei({parts:r,getMessagePart:({index:t})=>{if(t<0||t>=r.length)throw Error(`ChainOfThought part index ${t} is out of bounds (0..${r.length-1})`);return i.message().part({index:e+t})}})}),children:n})},ki=Symbol(`skip-update`);function Ai(e,t){if(e===void 0&&t===void 0)return!0;if(e===void 0||t===void 0)return!1;for(let n of Object.keys(e)){let r=e[n],i=t[n];if(!Object.is(r,i))return!1}return!0}var ji=class{_subscribers=new Set;subscribe(e){return this._subscribers.add(e),()=>this._subscribers.delete(e)}waitForUpdate(){return new Promise(e=>{let t=this.subscribe(()=>{t(),e()})})}_notifySubscribers(){let e=[];for(let t of this._subscribers)try{t()}catch(t){e.push(t)}if(e.length>0){if(e.length===1)throw e[0];for(let t of e)console.error(t);throw AggregateError(e)}}},Mi=class{_subscriptions=new Set;_connection;get isConnected(){return!!this._connection}notifySubscribers(e){for(let t of this._subscriptions)t(e)}_updateConnection(){if(this._subscriptions.size>0){if(this._connection)return;this._connection=this._connect()}else this._connection?.(),this._connection=void 0}subscribe(e){return this._subscriptions.add(e),this._updateConnection(),()=>{this._subscriptions.delete(e),this._updateConnection()}}},Ni=class extends Mi{binding;get path(){return this.binding.path}constructor(e){super(),this.binding=e;let t=e.getState();if(t===ki)throw Error(`Entry not available in the store`);this._previousState=t}_previousState;getState=()=>(this.isConnected||this._syncState(),this._previousState);_syncState(){let e=this.binding.getState();return e===ki||Ai(e,this._previousState)?!1:(this._previousState=e,!0)}_connect(){return this.binding.subscribe(()=>{this._syncState()&&this.notifySubscribers()})}},Pi=class extends Mi{binding;get path(){return this.binding.path}constructor(e){super(),this.binding=e}_previousStateDirty=!0;_previousState;getState=()=>{if(!this.isConnected||this._previousStateDirty){let e=this.binding.getState();e!==ki&&(this._previousState=e),this._previousStateDirty=!1}if(this._previousState===void 0)throw Error(`Entry not available in the store`);return this._previousState};_connect(){return this.binding.subscribe(()=>{this._previousStateDirty=!0,this.notifySubscribers()})}},Fi=class extends Mi{binding;get path(){return this.binding.path}constructor(e){super(),this.binding=e}getState(){return this.binding.getState()}outerSubscribe(e){return this.binding.subscribe(e)}_connect(){let e=()=>{this.notifySubscribers()},t=this.binding.getState(),n=t?.subscribe(e),r=this.outerSubscribe(()=>{let r=this.binding.getState();r!==t&&(t=r,n?.(),n=r?.subscribe(e),e())});return()=>{r?.(),n?.()}}},Ii=class extends Mi{config;constructor(e){super(),this.config=e}getState(){return this.config.binding.getState()}outerSubscribe(e){return this.config.binding.subscribe(e)}_connect(){let e=e=>{this.notifySubscribers(e)},t=this.config.binding.getState(),n=t?.unstable_on(this.config.event,e),r=this.outerSubscribe(()=>{let r=this.config.binding.getState();r!==t&&(t=r,n?.(),n=r?.unstable_on(this.config.event,e))});return()=>{r?.(),n?.()}}},Li=class{_contextProvider=new ni;registerModelContextProvider(e){return this._contextProvider.registerModelContextProvider(e)}getModelContextProvider(){return this._contextProvider}},I=e=>e.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
11
-
12
- `),Ri=Xr(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,7),zi=`__optimistic__`,Bi=()=>`${zi}${Ri()}`,Vi=Symbol(`autoStatus`),Hi=Object.freeze(Object.assign({type:`running`},{[Vi]:!0})),Ui=Object.freeze(Object.assign({type:`complete`,reason:`unknown`},{[Vi]:!0})),Wi=Object.freeze(Object.assign({type:`requires-action`,reason:`tool-calls`},{[Vi]:!0})),Gi=Object.freeze(Object.assign({type:`requires-action`,reason:`interrupt`},{[Vi]:!0})),Ki=e=>e[Vi]===!0,qi=(e,t,n,r,i)=>e&&i?Object.assign({type:`incomplete`,reason:`error`,error:i},{[Vi]:!0}):e&&t?Hi:n?Gi:r?Wi:Ui,Ji=(e,t)=>{if(e.startsWith(`data-`))return{type:`data`,name:e.substring(5),data:t}},Yi=(e,t,n)=>{let{role:r,id:i,createdAt:a,attachments:o,status:s,metadata:c}=e,l={id:i??t,createdAt:a??new Date},u=typeof e.content==`string`?[{type:`text`,text:e.content}]:e.content,d=({image:e,...t})=>e.match(/^data:image\/(png|jpeg|jpg|gif|webp);base64,(.*)$/)?{...t,image:e}:(console.warn(`Invalid image data format detected`),null);if(r!==`user`&&o?.length)throw Error(`attachments are only supported for user messages`);if(r!==`assistant`&&s)throw Error(`status is only supported for assistant messages`);if(r!==`assistant`&&c?.steps)throw Error(`metadata.steps is only supported for assistant messages`);switch(r){case`assistant`:return{...l,role:r,content:u.map(e=>{let t=e.type;switch(t){case`text`:case`reasoning`:return e.text.trim().length===0?null:e;case`file`:case`source`:return e;case`image`:return d(e);case`data`:return e;case`tool-call`:{let{parentId:t,messages:n,...r}=e,i={...r,toolCallId:e.toolCallId??`tool-${Ri()}`,...t!==void 0&&{parentId:t},...n!==void 0&&{messages:n}};return e.args?{...i,args:e.args,argsText:e.argsText??JSON.stringify(e.args)}:{...i,args:Yr(e.argsText??``)??{},argsText:e.argsText??``}}default:{let n=Ji(t,e.data);if(n)return n;throw Error(`Unsupported assistant message part type: ${t}`)}}}).filter(e=>!!e),status:s??n,metadata:{unstable_state:c?.unstable_state??null,unstable_annotations:c?.unstable_annotations??[],unstable_data:c?.unstable_data??[],custom:c?.custom??{},steps:c?.steps??[],...c?.timing&&{timing:c.timing},...c?.submittedFeedback&&{submittedFeedback:c.submittedFeedback}}};case`user`:return{...l,role:r,content:u.map(e=>{let t=e.type;switch(t){case`text`:case`image`:case`audio`:case`file`:case`data`:return e;default:{let n=Ji(t,e.data);if(n)return n;throw Error(`Unsupported user message part type: ${t}`)}}}),attachments:(o??[]).map(e=>({...e,content:e.content.map(e=>Ji(e.type,e.data)??e)})),metadata:{custom:c?.custom??{}}};case`system`:if(u.length!==1||u[0].type!==`text`)throw Error(`System messages must have exactly one text message part.`);return{...l,role:r,content:u,metadata:{custom:c?.custom??{}}};default:throw Error(`Unknown message role: ${r}`)}},Xi={fromArray:e=>{let t=e.map(e=>Yi(e,Ri(),qi(!1,!1,!1,!1,void 0)));return{messages:t.map((e,n)=>({parentId:n>0?t[n-1].id:null,message:e}))}},fromBranchableArray:(e,t)=>{let n=qi(!1,!1,!1,!1,void 0);return{...t?.headId===void 0?void 0:{headId:t.headId},messages:e.map(({message:e,parentId:t})=>{if(!e.id)throw Error(`ExportedMessageRepository.fromBranchableArray: Each message must have an 'id' field set.`);return{parentId:t,message:Yi(e,e.id,n)}})}}},Zi=e=>e.next?Zi(e.next):`current`in e?e:null,Qi=class{func;_value=null;constructor(e){this.func=e}get value(){return this._value===null&&(this._value=this.func()),this._value}dirty(){this._value=null}},$i=class{messages=new Map;head=null;root={children:[],next:null};updateLevels(e,t){e.level=t;for(let n of e.children){let e=this.messages.get(n);e&&this.updateLevels(e,t+1)}}performOp(e,t,n){let r=t.prev??this.root,i=e??this.root;if(!(n===`relink`&&r===i)){if(n!==`link`&&(r.children=r.children.filter(e=>e!==t.current.id),r.next===t)){let e=r.children.at(-1),t=e?this.messages.get(e):null;if(t===void 0)throw Error(`MessageRepository(performOp/cut): Fallback sibling message not found. This is likely an internal bug in assistant-ui.`);r.next=t}if(n!==`cut`){for(let n=e;n;n=n.prev)if(n.current.id===t.current.id)throw Error(`MessageRepository(performOp/link): A message with the same id already exists in the parent tree. This error occurs if the same message id is found multiple times. This is likely an internal bug in assistant-ui.`);i.children=[...i.children,t.current.id],(Zi(t)===this.head||i.next===null)&&(i.next=t),t.prev=e;let n=e?e.level+1:0;this.updateLevels(t,n)}}}_messages=new Qi(()=>{let e=Array((this.head?.level??-1)+1);for(let t=this.head;t;t=t.prev)e[t.level]=t.current;return e});get headId(){return this.head?.current.id??null}getMessages(e){if(e===void 0||e===this.head?.current.id)return this._messages.value;let t=this.messages.get(e);if(!t)throw Error(`MessageRepository(getMessages): Head message not found. This is likely an internal bug in assistant-ui.`);let n=Array(t.level+1);for(let e=t;e;e=e.prev)n[e.level]=e.current;return n}addOrUpdateMessage(e,t){let n=this.messages.get(t.id),r=e?this.messages.get(e):null;if(r===void 0)throw Error(`MessageRepository(addOrUpdateMessage): Parent message not found. This is likely an internal bug in assistant-ui.`);if(n){n.current=t,this.performOp(r,n,`relink`),this._messages.dirty();return}let i={prev:r,current:t,next:null,children:[],level:r?r.level+1:0};this.messages.set(t.id,i),this.performOp(r,i,`link`),this.head===r&&(this.head=i),this._messages.dirty()}getMessage(e){let t=this.messages.get(e);if(!t)throw Error(`MessageRepository(updateMessage): Message not found. This is likely an internal bug in assistant-ui.`);return{parentId:t.prev?.current.id??null,message:t.current,index:t.level}}appendOptimisticMessage(e,t){let n;do n=Bi();while(this.messages.has(n));return this.addOrUpdateMessage(e,Yi(t,n,{type:`running`})),n}deleteMessage(e,t){let n=this.messages.get(e);if(!n)throw Error(`MessageRepository(deleteMessage): Message not found. This is likely an internal bug in assistant-ui.`);let r=t===void 0?n.prev:t===null?null:this.messages.get(t);if(r===void 0)throw Error(`MessageRepository(deleteMessage): Replacement not found. This is likely an internal bug in assistant-ui.`);for(let e of n.children){let t=this.messages.get(e);if(!t)throw Error(`MessageRepository(deleteMessage): Child message not found. This is likely an internal bug in assistant-ui.`);this.performOp(r,t,`relink`)}this.performOp(null,n,`cut`),this.messages.delete(e),this.head===n&&(this.head=Zi(r??this.root)),this._messages.dirty()}getBranches(e){let t=this.messages.get(e);if(!t)throw Error(`MessageRepository(getBranches): Message not found. This is likely an internal bug in assistant-ui.`);let{children:n}=t.prev??this.root;return n}switchToBranch(e){let t=this.messages.get(e);if(!t)throw Error(`MessageRepository(switchToBranch): Branch not found. This is likely an internal bug in assistant-ui.`);let n=t.prev??this.root;n.next=t,this.head=Zi(t),this._messages.dirty()}resetHead(e){if(e===null){this.clear();return}let t=this.messages.get(e);if(!t)throw Error(`MessageRepository(resetHead): Branch not found. This is likely an internal bug in assistant-ui.`);if(t.children.length>0){let e=t=>{for(let n of t.children){let t=this.messages.get(n);t&&(e(t),this.messages.delete(n))}};e(t),t.children=[],t.next=null}this.head=t;for(let e=t;e;e=e.prev)e.prev?e.prev.next=e:this.root.next=e;this._messages.dirty()}clear(){this.messages.clear(),this.head=null,this.root={children:[],next:null},this._messages.dirty()}export(){let e=[];for(let[,t]of this.messages)e.push({message:t.current,parentId:t.prev?.current.id??null});return{headId:this.head?.current.id??null,messages:e}}import({headId:e,messages:t}){for(let{message:e,parentId:n}of t)this.addOrUpdateMessage(n,e);this.resetHead(e??t.at(-1)?.message.id??null)}};function ea(e,t){if(t===`*`)return!0;let n=t.split(`,`).map(e=>e.trim().toLowerCase()),r=`.${e.name.split(`.`).pop().toLowerCase()}`,i=e.type.toLowerCase();for(let e of n){if(e.startsWith(`.`)&&e===r||e.includes(`/`)&&e===i)return!0;if(e.endsWith(`/*`)){let t=e.split(`/`)[0];if(i.startsWith(`${t}/`))return!0}}return!1}function ta(e,t){return e.length===t.length?e.every((e,n)=>e.id===t[n].id):!1}function na(e){let t=Ri();return e.type===`image`?{id:t,type:`image`,name:e.filename??`image`,content:[e],status:{type:`complete`}}:e.type===`file`?{id:t,type:`document`,name:e.filename??`document`,contentType:e.mimeType,content:[e],status:{type:`complete`}}:e.type===`audio`?{id:t,type:`audio`,name:`audio.${e.audio.format}`,contentType:`audio/${e.audio.format}`,content:[e],status:{type:`complete`}}:{id:t,type:`data`,name:e.name,content:[e],status:{type:`complete`}}}function ra(e){let t=[];for(let n of e)n.type!==`text`&&t.push(na(n));return t}var ia=e=>e.status.type===`complete`,aa=class extends ji{isEditing=!0;get attachmentAccept(){return this.getAttachmentAdapter()?.accept??`*`}_attachments=[];get attachments(){return this._attachments}setAttachments(e){this._attachments=e,this._notifySubscribers()}get isEmpty(){return!this.text.trim()&&!this.attachments.length}_text=``;get text(){return this._text}_role=`user`;get role(){return this._role}_runConfig={};get runConfig(){return this._runConfig}_quote=void 0;get quote(){return this._quote}setQuote(e){this._quote!==e&&(this._quote=e,this._notifySubscribers())}setText(e){if(this._text!==e){if(this._text=e,this._dictation){this._dictationBaseText=e,this._currentInterimText=``;let{status:t,inputDisabled:n}=this._dictation;this._dictation=n?{status:t,inputDisabled:n}:{status:t}}this._notifySubscribers()}}setRole(e){this._role!==e&&(this._role=e,this._notifySubscribers())}setRunConfig(e){this._runConfig!==e&&(this._runConfig=e,this._notifySubscribers())}_emptyTextAndAttachments(){this._attachments=[],this._text=``,this._notifySubscribers()}async _onClearAttachments(){let e=this.getAttachmentAdapter();if(e){let t=this._attachments.filter(e=>!ia(e));await Promise.all(t.map(t=>e.remove(t)))}}async reset(){if(this._attachments.length===0&&this._text===``&&this._role===`user`&&Object.keys(this._runConfig).length===0&&this._quote===void 0)return;this._role=`user`,this._runConfig={},this._quote=void 0;let e=this._onClearAttachments();this._emptyTextAndAttachments(),await e}async clearAttachments(){let e=this._onClearAttachments();this.setAttachments([]),await e}async send(e){if(this.isEmpty)return;this._dictationSession&&(this._dictationSession.cancel(),this._cleanupDictation());let t=this.getAttachmentAdapter(),n=this.attachments.length>0?Promise.all(this.attachments.map(async e=>{if(ia(e))return e;if(!t)throw Error(`Attachments are not supported`);return await t.send(e)})):[],r=this.text,i=this._quote;this._quote=void 0,this._emptyTextAndAttachments();let a={createdAt:new Date,role:this.role,content:r?[{type:`text`,text:r}]:[],attachments:await n,runConfig:this.runConfig,metadata:{custom:{...i?{quote:i}:{}}}};this.handleSend(a,e),this._notifyEventSubscribers(`send`,{})}cancel(){this.handleCancel()}async addAttachment(e){if(!(e instanceof File)){let t=this.getAttachmentAdapter();if(t&&!ea({name:e.name,type:e.contentType??``},t.accept)){let n=`File type ${e.contentType||`unknown`} is not accepted. Accepted types: ${t.accept}`,r=Error(n);throw this._safeEmitAttachmentAddError(`not-accepted`,n,void 0,r),r}let n={id:e.id??Ri(),type:e.type??`document`,name:e.name,contentType:e.contentType,content:e.content,status:{type:`complete`}};this._attachments=[...this._attachments,n],this._notifySubscribers(),this._notifyEventSubscribers(`attachmentAdd`,{});return}let t=e=>{let t=this._attachments.findIndex(t=>t.id===e.id);t===-1?this._attachments=[...this._attachments,e]:this._attachments=[...this._attachments.slice(0,t),e,...this._attachments.slice(t+1)],this._notifySubscribers()},n=this.getAttachmentAdapter();if(!n){let e=`Attachments are not supported`,t=Error(e);throw this._safeEmitAttachmentAddError(`no-adapter`,e,void 0,t),t}if(!ea({name:e.name,type:e.type},n.accept)){let t=`File type ${e.type||`unknown`} is not accepted. Accepted types: ${n.accept}`,r=Error(t);throw this._safeEmitAttachmentAddError(`not-accepted`,t,void 0,r),r}let r;try{let i=n.add({file:e});if(Symbol.asyncIterator in i)for await(let e of i)r=e,t(e);else r=await i,t(r)}catch(e){throw r&&t({...r,status:{type:`incomplete`,reason:`error`}}),this._safeEmitAttachmentAddError(`adapter-error`,e instanceof Error?e.message:String(e),r?.id,e instanceof Error?e:void 0),e}r?.status.type===`incomplete`&&r.status.reason===`error`?this._safeEmitAttachmentAddError(`adapter-error`,`Attachment upload did not complete successfully.`,r?.id):this._notifyEventSubscribers(`attachmentAdd`,{})}_safeEmitAttachmentAddError(e,t,n,r){try{this._notifyEventSubscribers(`attachmentAddError`,{reason:e,message:t,...n!==void 0&&{attachmentId:n},...r!==void 0&&{error:r}})}catch(e){console.error(`[assistant-ui] attachmentAddError subscriber threw:`,e)}}async removeAttachment(e){let t=this._attachments.findIndex(t=>t.id===e);if(t===-1)throw Error(`Attachment not found`);let n=this._attachments[t];if(!ia(n)){let e=this.getAttachmentAdapter();if(!e)throw Error(`Attachments are not supported`);await e.remove(n)}this._attachments=this._attachments.filter(t=>t.id!==e),this._notifySubscribers()}_dictation;_dictationSession;_dictationUnsubscribes=[];_dictationBaseText=``;_currentInterimText=``;_dictationSessionIdCounter=0;_activeDictationSessionId;_isCleaningDictation=!1;get dictation(){return this._dictation}_isActiveSession(e,t){return this._activeDictationSessionId===e&&this._dictationSession===t}startDictation(){let e=this.getDictationAdapter();if(!e)throw Error(`Dictation adapter not configured`);if(this._dictationSession){for(let e of this._dictationUnsubscribes)e();this._dictationUnsubscribes=[],this._dictationSession.stop().catch(()=>{}),this._dictationSession=void 0}let t=e.disableInputDuringDictation??!1;this._dictationBaseText=this._text,this._currentInterimText=``;let n=e.listen();this._dictationSession=n;let r=++this._dictationSessionIdCounter;this._activeDictationSessionId=r,this._dictation={status:n.status,inputDisabled:t},this._notifySubscribers();let i=n.onSpeech(e=>{if(!this._isActiveSession(r,n))return;let t=e.isFinal!==!1,i=this._dictationBaseText&&!this._dictationBaseText.endsWith(` `)&&e.transcript?` `:``;if(t){if(this._dictationBaseText=this._dictationBaseText+i+e.transcript,this._currentInterimText=``,this._text=this._dictationBaseText,this._dictation){let{transcript:e,...t}=this._dictation;this._dictation=t}this._notifySubscribers()}else this._currentInterimText=i+e.transcript,this._text=this._dictationBaseText+this._currentInterimText,this._dictation&&={...this._dictation,transcript:e.transcript},this._notifySubscribers()});this._dictationUnsubscribes.push(i);let a=n.onSpeechStart(()=>{this._isActiveSession(r,n)&&(this._dictation={status:{type:`running`},inputDisabled:t,...this._dictation?.transcript&&{transcript:this._dictation.transcript}},this._notifySubscribers())});this._dictationUnsubscribes.push(a);let o=n.onSpeechEnd(()=>{this._cleanupDictation({sessionId:r})});this._dictationUnsubscribes.push(o);let s=setInterval(()=>{this._isActiveSession(r,n)&&n.status.type===`ended`&&this._cleanupDictation({sessionId:r})},100);this._dictationUnsubscribes.push(()=>clearInterval(s))}stopDictation(){if(!this._dictationSession)return;let e=this._dictationSession,t=this._activeDictationSessionId;e.stop().finally(()=>{this._cleanupDictation({sessionId:t})})}_cleanupDictation(e){if(!(e?.sessionId!==void 0&&e.sessionId!==this._activeDictationSessionId||this._isCleaningDictation)){this._isCleaningDictation=!0;try{for(let e of this._dictationUnsubscribes)e();this._dictationUnsubscribes=[],this._dictationSession=void 0,this._activeDictationSessionId=void 0,this._dictation=void 0,this._dictationBaseText=``,this._currentInterimText=``,this._notifySubscribers()}finally{this._isCleaningDictation=!1}}}_eventSubscribers=new Map;_notifyEventSubscribers(e,t){let n=this._eventSubscribers.get(e);if(n)for(let e of n)e(t)}unstable_on(e,t){let n=t,r=this._eventSubscribers.get(e);return r||(r=new Set,this._eventSubscribers.set(e,r)),r.add(n),()=>{this._eventSubscribers.get(e)?.delete(n)}}},oa=class extends aa{runtime;_canCancel=!1;get canCancel(){return this._canCancel}getAttachmentAdapter(){return this.runtime.adapters?.attachments}getDictationAdapter(){return this.runtime.adapters?.dictation}constructor(e){super(),this.runtime=e,this.connect()}connect(){return this.runtime.subscribe(()=>{this.canCancel!==this.runtime.capabilities.cancel&&(this._canCancel=this.runtime.capabilities.cancel,this._notifySubscribers())})}async handleSend(e,t){this.runtime.append({...e,parentId:this.runtime.messages.at(-1)?.id??null,sourceId:null,startRun:t?.startRun})}async handleCancel(){this.runtime.cancelRun()}},sa=class extends aa{runtime;endEditCallback;get canCancel(){return!0}getAttachmentAdapter(){return this.runtime.adapters?.attachments}getDictationAdapter(){return this.runtime.adapters?.dictation}_previousText;_previousAttachments;_nonTextPassthrough;_parentId;_sourceId;constructor(e,t,{parentId:n,message:r}){super(),this.runtime=e,this.endEditCallback=t,this._parentId=n,this._sourceId=r.id,this._previousText=I(r),this.setText(this._previousText),this.setRole(r.role),r.role===`user`?(this._previousAttachments=[...r.attachments??[],...ra(r.content)],this._nonTextPassthrough=[]):(this._previousAttachments=r.attachments??[],this._nonTextPassthrough=r.content.filter(e=>e.type!==`text`)),this.setAttachments(this._previousAttachments),this.setRunConfig({...e.composer.runConfig})}get parentId(){return this._parentId}get sourceId(){return this._sourceId}async handleSend(e,t){let n=I(e),r=!ta(e.attachments??[],this._previousAttachments);if(n!==this._previousText||r||t?.startRun){let n=this._nonTextPassthrough.length>0?[...e.content,...this._nonTextPassthrough]:e.content;this.runtime.append({...e,content:n,parentId:this._parentId,sourceId:this._sourceId,startRun:t?.startRun})}this.handleCancel()}handleCancel(){this.endEditCallback(),this._notifySubscribers()}},ca=class{_contextProvider;_subscriptions=new Set;_isInitialized=!1;repository=new $i;_voiceMessages=[];_voiceGeneration=0;_cachedMergedMessages=null;_cachedVoiceGeneration=-1;_cachedMergedBase=null;_markVoiceMessagesDirty(){this._voiceGeneration++,this._cachedMergedMessages=null}_getBaseMessages(){return this.repository.getMessages()}get messages(){if(this._voiceMessages.length===0)return this._getBaseMessages();let e=this._getBaseMessages();return(this._cachedVoiceGeneration!==this._voiceGeneration||this._cachedMergedBase!==e)&&(this._cachedMergedMessages=[...e,...this._voiceMessages],this._cachedVoiceGeneration=this._voiceGeneration,this._cachedMergedBase=e),this._cachedMergedMessages}get state(){let e;for(let t of this.messages)t.role===`assistant`&&(e=t);return e?.metadata.unstable_state??null}composer=new oa(this);constructor(e){this._contextProvider=e}getModelContext(){return this._contextProvider.getModelContext()}_editComposers=new Map;getEditComposer(e){return this._editComposers.get(e)}beginEdit(e){if(this._editComposers.has(e))throw Error(`Edit already in progress`);this._editComposers.set(e,new sa(this,()=>this._editComposers.delete(e),this.repository.getMessage(e))),this._notifySubscribers()}getMessageById(e){try{return this.repository.getMessage(e)}catch{let t=this.repository.getMessages(),n=this._voiceMessages.findIndex(t=>t.id===e);return n===-1?void 0:{parentId:n>0?this._voiceMessages[n-1].id:t.at(-1)?.id??null,message:this._voiceMessages[n],index:t.length+n}}}getBranches(e){return this._voiceMessages.some(t=>t.id===e)?[]:this.repository.getBranches(e)}switchToBranch(e){this.repository.switchToBranch(e),this._notifySubscribers()}_notifySubscribers(){for(let e of this._subscriptions)e()}_notifyEventSubscribers(e,t){let n=this._eventSubscribers.get(e);if(n)for(let e of n)e(t)}subscribe(e){return this._subscriptions.add(e),()=>this._subscriptions.delete(e)}submitFeedback({messageId:e,type:t}){let n=this.adapters?.feedback;if(!n)throw Error(`Feedback adapter not configured`);let{message:r,parentId:i}=this.repository.getMessage(e);if(n.submit({message:r,type:t}),r.role===`assistant`){let e={...r,metadata:{...r.metadata,submittedFeedback:{type:t}}};this.repository.addOrUpdateMessage(i,e)}this._notifySubscribers()}_stopSpeaking;speech;speak(e){let t=this.adapters?.speech;if(!t)throw Error(`Speech adapter not configured`);let{message:n}=this.repository.getMessage(e);this._stopSpeaking?.();let r=t.speak(I(n)),i=r.subscribe(()=>{r.status.type===`ended`?(this._stopSpeaking=void 0,this.speech=void 0):this.speech={messageId:e,status:r.status},this._notifySubscribers()});this.speech={messageId:e,status:r.status},this._notifySubscribers(),this._stopSpeaking=()=>{r.cancel(),i(),this.speech=void 0,this._stopSpeaking=void 0}}stopSpeaking(){if(!this._stopSpeaking)throw Error(`No message is being spoken`);this._stopSpeaking(),this._notifySubscribers()}_voiceSession;_voiceUnsubs=[];voice;_voiceVolume=0;_voiceVolumeSubscribers=new Set;getVoiceVolume=()=>this._voiceVolume;subscribeVoiceVolume=e=>(this._voiceVolumeSubscribers.add(e),()=>this._voiceVolumeSubscribers.delete(e));connectVoice(){let e=this.adapters?.voice;if(!e)throw Error(`Voice adapter not configured`);this.disconnectVoice();let t=e.connect({});this._voiceSession=t;let n=[],r=`listening`;this.voice={status:t.status,isMuted:t.isMuted,mode:r},this._voiceVolume=0,this._notifySubscribers(),n.push(t.onStatusChange(e=>{e.type===`ended`?(this._finishVoiceAssistantMessage(),this._voiceSession=void 0,this.voice=void 0):this.voice={status:e,isMuted:t.isMuted,mode:r},this._notifySubscribers()})),n.push(t.onModeChange(e=>{r=e,this.voice&&(this.voice={...this.voice,mode:e},this._notifySubscribers())})),n.push(t.onVolumeChange(e=>{this._voiceVolume=e;for(let e of this._voiceVolumeSubscribers)e()})),n.push(t.onTranscript(e=>{this._handleVoiceTranscript(e)})),this._voiceUnsubs=n}_currentAssistantMsg=null;_handleVoiceTranscript(e){if(this.ensureInitialized(),e.role===`user`)this._finishVoiceAssistantMessage(),this._currentAssistantMsg=null,e.isFinal&&(this._voiceMessages.push({id:Ri(),role:`user`,content:[{type:`text`,text:e.text}],metadata:{custom:{}},createdAt:new Date,status:{type:`complete`,reason:`unknown`},attachments:[]}),this._markVoiceMessagesDirty(),this._notifySubscribers());else{if(!this._currentAssistantMsg)this._currentAssistantMsg={id:Ri(),role:`assistant`,content:[{type:`text`,text:e.text}],metadata:{unstable_state:this.state,unstable_annotations:[],unstable_data:[],steps:[],custom:{}},status:{type:`running`},createdAt:new Date},this._voiceMessages.push(this._currentAssistantMsg);else{let t=this._voiceMessages.indexOf(this._currentAssistantMsg);if(t===-1)return;let n={...this._currentAssistantMsg,content:[{type:`text`,text:e.text}],...e.isFinal?{status:{type:`complete`,reason:`stop`}}:{}};this._voiceMessages[t]=n,this._currentAssistantMsg=n}e.isFinal&&(this._currentAssistantMsg=null),this._markVoiceMessagesDirty(),this._notifySubscribers()}}_finishVoiceAssistantMessage(){let e=this._voiceMessages.at(-1);if(e?.role===`assistant`&&e.status.type===`running`){let t=this._voiceMessages.length-1;this._voiceMessages[t]={...e,status:{type:`complete`,reason:`stop`}},this._markVoiceMessagesDirty(),this._notifySubscribers()}}disconnectVoice(){this._finishVoiceAssistantMessage(),this._currentAssistantMsg=null;for(let e of this._voiceUnsubs)e();this._voiceUnsubs=[],this._voiceSession?.disconnect(),this._voiceSession=void 0,this.voice=void 0,this._voiceVolume=0;for(let e of this._voiceVolumeSubscribers)e();this._voiceMessages=[],this._markVoiceMessagesDirty(),this._notifySubscribers()}muteVoice(){if(!this._voiceSession)throw Error(`No active voice session`);this._voiceSession.mute(),this.voice={...this.voice,isMuted:!0},this._notifySubscribers()}unmuteVoice(){if(!this._voiceSession)throw Error(`No active voice session`);this._voiceSession.unmute(),this.voice={...this.voice,isMuted:!1},this._notifySubscribers()}ensureInitialized(){this._isInitialized||(this._isInitialized=!0,this._notifyEventSubscribers(`initialize`,{}))}export(){return this.repository.export()}import(e){this.ensureInitialized(),this.repository.clear(),this.repository.import(e),this._notifySubscribers()}reset(e){this.import(Xi.fromArray(e??[]))}_eventSubscribers=new Map;unstable_on(e,t){let n=t;if(e===`modelContextUpdate`)return this._contextProvider.subscribe?.(()=>n({}))??(()=>{});let r=this._eventSubscribers.get(e);return r||(r=new Set,this._eventSubscribers.set(e,r)),r.add(n),()=>{this._eventSubscribers.get(e)?.delete(n)}}},la=class{_core;_threadListBinding;get path(){return this._core.path}constructor(e,t){this._core=e,this._threadListBinding=t,this.__internal_bindMethods()}__internal_bindMethods(){this.switchTo=this.switchTo.bind(this),this.rename=this.rename.bind(this),this.archive=this.archive.bind(this),this.unarchive=this.unarchive.bind(this),this.delete=this.delete.bind(this),this.initialize=this.initialize.bind(this),this.generateTitle=this.generateTitle.bind(this),this.subscribe=this.subscribe.bind(this),this.unstable_on=this.unstable_on.bind(this),this.getState=this.getState.bind(this),this.detach=this.detach.bind(this)}getState(){return this._core.getState()}switchTo(){let e=this._core.getState();return this._threadListBinding.switchToThread(e.id)}rename(e){let t=this._core.getState();return this._threadListBinding.rename(t.id,e)}archive(){let e=this._core.getState();return this._threadListBinding.archive(e.id)}unarchive(){let e=this._core.getState();return this._threadListBinding.unarchive(e.id)}delete(){let e=this._core.getState();return this._threadListBinding.delete(e.id)}initialize(){let e=this._core.getState();return this._threadListBinding.initialize(e.id)}generateTitle(){let e=this._core.getState();return this._threadListBinding.generateTitle(e.id)}unstable_on(e,t){let n=this._core.getState().isMain,r=this._core.getState().id;return this.subscribe(()=>{let i=this._core.getState(),a=i.isMain,o=i.id;n===a&&r===o||(n=a,r=o,!(e===`switchedTo`&&!a)&&(e===`switchedAway`&&a||t({})))})}subscribe(e){return this._core.subscribe(e)}detach(){let e=this._core.getState();this._threadListBinding.detach(e.id)}__internal_getRuntime(){return this}},ua=Symbol(`innerMessage`),da=Symbol(`innerMessages`),fa=[],pa=(e,t)=>{ua in e||(e[ua]=t)},ma=e=>{let t=`messages`in e?e.messages:e,n=t[da]||t[ua];return n?Array.isArray(n)?n:(t[da]=[n],t[da]):fa},ha=class{_core;get path(){return this._core.path}constructor(e){this._core=e,this.__internal_bindMethods()}__internal_bindMethods(){this.getState=this.getState.bind(this),this.remove=this.remove.bind(this),this.subscribe=this.subscribe.bind(this)}getState(){return this._core.getState()}subscribe(e){return this._core.subscribe(e)}},ga=class extends ha{_composerApi;constructor(e,t){super(e),this._composerApi=t}remove(){let e=this._composerApi.getState();if(!e)throw Error(`Composer is not available`);return e.removeAttachment(this.getState().id)}},_a=class extends ga{get source(){return`thread-composer`}},va=class extends ga{get source(){return`edit-composer`}},ya=class extends ha{get source(){return`message`}remove(){throw Error(`Message attachments cannot be removed`)}},ba=Object.freeze([]),xa=Object.freeze({}),Sa=e=>Object.freeze({type:`thread`,isEditing:e?.isEditing??!1,canCancel:e?.canCancel??!1,isEmpty:e?.isEmpty??!0,attachments:e?.attachments??ba,text:e?.text??``,role:e?.role??`user`,runConfig:e?.runConfig??xa,attachmentAccept:e?.attachmentAccept??``,dictation:e?.dictation,quote:e?.quote,value:e?.text??``}),Ca=e=>Object.freeze({type:`edit`,isEditing:e?.isEditing??!1,canCancel:e?.canCancel??!1,isEmpty:e?.isEmpty??!0,text:e?.text??``,role:e?.role??`user`,attachments:e?.attachments??ba,runConfig:e?.runConfig??xa,attachmentAccept:e?.attachmentAccept??``,dictation:e?.dictation,quote:e?.quote,parentId:e?.parentId??null,sourceId:e?.sourceId??null,value:e?.text??``}),wa=class{_core;get path(){return this._core.path}constructor(e){this._core=e}__internal_bindMethods(){this.setText=this.setText.bind(this),this.setRunConfig=this.setRunConfig.bind(this),this.getState=this.getState.bind(this),this.subscribe=this.subscribe.bind(this),this.addAttachment=this.addAttachment.bind(this),this.reset=this.reset.bind(this),this.clearAttachments=this.clearAttachments.bind(this),this.send=this.send.bind(this),this.cancel=this.cancel.bind(this),this.setRole=this.setRole.bind(this),this.getAttachmentByIndex=this.getAttachmentByIndex.bind(this),this.startDictation=this.startDictation.bind(this),this.stopDictation=this.stopDictation.bind(this),this.setQuote=this.setQuote.bind(this),this.unstable_on=this.unstable_on.bind(this)}setText(e){let t=this._core.getState();if(!t)throw Error(`Composer is not available`);t.setText(e)}setRunConfig(e){let t=this._core.getState();if(!t)throw Error(`Composer is not available`);t.setRunConfig(e)}addAttachment(e){let t=this._core.getState();if(!t)throw Error(`Composer is not available`);return t.addAttachment(e)}reset(){let e=this._core.getState();if(!e)throw Error(`Composer is not available`);return e.reset()}clearAttachments(){let e=this._core.getState();if(!e)throw Error(`Composer is not available`);return e.clearAttachments()}send(e){let t=this._core.getState();if(!t)throw Error(`Composer is not available`);t.send(e)}cancel(){let e=this._core.getState();if(!e)throw Error(`Composer is not available`);e.cancel()}setRole(e){let t=this._core.getState();if(!t)throw Error(`Composer is not available`);t.setRole(e)}startDictation(){let e=this._core.getState();if(!e)throw Error(`Composer is not available`);e.startDictation()}stopDictation(){let e=this._core.getState();if(!e)throw Error(`Composer is not available`);e.stopDictation()}setQuote(e){let t=this._core.getState();if(!t)throw Error(`Composer is not available`);t.setQuote(e)}subscribe(e){return this._core.subscribe(e)}_eventSubscriptionSubjects=new Map;unstable_on(e,t){let n=this._eventSubscriptionSubjects.get(e);return n||(n=new Ii({event:e,binding:this._core}),this._eventSubscriptionSubjects.set(e,n)),n.subscribe(t)}},Ta=class extends wa{get path(){return this._core.path}get type(){return`thread`}_getState;constructor(e){let t=new Pi({path:e.path,getState:()=>Sa(e.getState()),subscribe:t=>e.subscribe(t)});super({path:e.path,getState:()=>e.getState(),subscribe:e=>t.subscribe(e)}),this._getState=t.getState.bind(t),this.__internal_bindMethods()}getState(){return this._getState()}getAttachmentByIndex(e){return new _a(new Ni({path:{...this.path,attachmentSource:`thread-composer`,attachmentSelector:{type:`index`,index:e},ref:`${this.path.ref}.attachments[${e}]`},getState:()=>{let t=this.getState().attachments[e];return t?{...t,source:`thread-composer`}:ki},subscribe:e=>this._core.subscribe(e)}),this._core)}},Ea=class extends wa{_beginEdit;get path(){return this._core.path}get type(){return`edit`}_getState;constructor(e,t){let n=new Pi({path:e.path,getState:()=>Ca(e.getState()),subscribe:t=>e.subscribe(t)});super({path:e.path,getState:()=>e.getState(),subscribe:e=>n.subscribe(e)}),this._beginEdit=t,this._getState=n.getState.bind(n),this.__internal_bindMethods()}__internal_bindMethods(){super.__internal_bindMethods(),this.beginEdit=this.beginEdit.bind(this)}getState(){return this._getState()}beginEdit(){this._beginEdit()}getAttachmentByIndex(e){return new va(new Ni({path:{...this.path,attachmentSource:`edit-composer`,attachmentSelector:{type:`index`,index:e},ref:`${this.path.ref}.attachments[${e}]`},getState:()=>{let t=this.getState().attachments[e];return t?{...t,source:`edit-composer`}:ki},subscribe:e=>this._core.subscribe(e)}),this._core)}},Da=class{contentBinding;messageApi;threadApi;get path(){return this.contentBinding.path}constructor(e,t,n){this.contentBinding=e,this.messageApi=t,this.threadApi=n,this.__internal_bindMethods()}__internal_bindMethods(){this.addToolResult=this.addToolResult.bind(this),this.resumeToolCall=this.resumeToolCall.bind(this),this.getState=this.getState.bind(this),this.subscribe=this.subscribe.bind(this)}getState(){return this.contentBinding.getState()}addToolResult(e){let t=this.contentBinding.getState();if(!t)throw Error(`Message part is not available`);if(t.type!==`tool-call`)throw Error(`Tried to add tool result to non-tool message part`);if(!this.messageApi)throw Error(`Message API is not available. This is likely a bug in assistant-ui.`);if(!this.threadApi)throw Error(`Thread API is not available`);let n=this.messageApi.getState();if(!n)throw Error(`Message is not available`);let r=t.toolName,i=t.toolCallId,a=ci.toResponse(e);this.threadApi.getState().addToolResult({messageId:n.id,toolName:r,toolCallId:i,result:a.result,artifact:a.artifact,isError:a.isError})}resumeToolCall(e){let t=this.contentBinding.getState();if(!t)throw Error(`Message part is not available`);if(t.type!==`tool-call`)throw Error(`Tried to resume tool call on non-tool message part`);if(!this.threadApi)throw Error(`Thread API is not available`);let n=t.toolCallId;this.threadApi.getState().resumeToolCall({toolCallId:n,payload:e})}subscribe(e){return this.contentBinding.subscribe(e)}},Oa=Object.freeze({type:`complete`}),ka=(e,t,n)=>{if(e.role!==`assistant`)return Oa;if(n.type===`tool-call`)return n.result?Oa:e.status;let r=t===Math.max(0,e.content.length-1);return e.status.type===`requires-action`?Oa:r?e.status:Oa},Aa=(e,t)=>{let n=e.content[t];if(!n)return ki;let r=ka(e,t,n);return Object.freeze({...n,[ua]:n[ua],status:r})},ja=class{_core;_threadBinding;get path(){return this._core.path}constructor(e,t){this._core=e,this._threadBinding=t,this.composer=new Ea(new Fi({path:{...this.path,ref:`${this.path.ref}${this.path.ref}.composer`,composerSource:`edit`},getState:this._getEditComposerRuntimeCore,subscribe:e=>this._threadBinding.subscribe(e)}),()=>this._threadBinding.getState().beginEdit(this._core.getState().id)),this.__internal_bindMethods()}__internal_bindMethods(){this.reload=this.reload.bind(this),this.getState=this.getState.bind(this),this.subscribe=this.subscribe.bind(this),this.getMessagePartByIndex=this.getMessagePartByIndex.bind(this),this.getMessagePartByToolCallId=this.getMessagePartByToolCallId.bind(this),this.getAttachmentByIndex=this.getAttachmentByIndex.bind(this),this.unstable_getCopyText=this.unstable_getCopyText.bind(this),this.speak=this.speak.bind(this),this.stopSpeaking=this.stopSpeaking.bind(this),this.submitFeedback=this.submitFeedback.bind(this),this.switchToBranch=this.switchToBranch.bind(this)}composer;_getEditComposerRuntimeCore=()=>this._threadBinding.getState().getEditComposer(this._core.getState().id);getState(){return this._core.getState()}reload(e={}){let t=this._getEditComposerRuntimeCore(),n=t??this._threadBinding.getState().composer,r=t??n,{runConfig:i=r.runConfig}=e,a=this._core.getState();if(a.role!==`assistant`)throw Error(`Can only reload assistant messages`);this._threadBinding.getState().startRun({parentId:a.parentId,sourceId:a.id,runConfig:i})}speak(){let e=this._core.getState();return this._threadBinding.getState().speak(e.id)}stopSpeaking(){let e=this._core.getState();if(this._threadBinding.getState().speech?.messageId===e.id)this._threadBinding.getState().stopSpeaking();else throw Error(`Message is not being spoken`)}submitFeedback({type:e}){let t=this._core.getState();this._threadBinding.getState().submitFeedback({messageId:t.id,type:e})}switchToBranch({position:e,branchId:t}){let n=this._core.getState();if(t&&e)throw Error(`May not specify both branchId and position`);if(!t&&!e)throw Error(`Must specify either branchId or position`);let r=this._threadBinding.getState().getBranches(n.id),i=t;if(e===`previous`?i=r[n.branchNumber-2]:e===`next`&&(i=r[n.branchNumber]),!i)throw Error(`Branch not found`);this._threadBinding.getState().switchToBranch(i)}unstable_getCopyText(){return I(this.getState())}subscribe(e){return this._core.subscribe(e)}getMessagePartByIndex(e){if(e<0)throw Error(`Message part index must be >= 0`);return new Da(new Ni({path:{...this.path,ref:`${this.path.ref}${this.path.ref}.content[${e}]`,messagePartSelector:{type:`index`,index:e}},getState:()=>Aa(this.getState(),e),subscribe:e=>this._core.subscribe(e)}),this._core,this._threadBinding)}getMessagePartByToolCallId(e){return new Da(new Ni({path:{...this.path,ref:this.path.ref+`${this.path.ref}.content[toolCallId=${JSON.stringify(e)}]`,messagePartSelector:{type:`toolCallId`,toolCallId:e}},getState:()=>{let t=this._core.getState(),n=t.content.findIndex(t=>t.type===`tool-call`&&t.toolCallId===e);return n===-1?ki:Aa(t,n)},subscribe:e=>this._core.subscribe(e)}),this._core,this._threadBinding)}getAttachmentByIndex(e){return new ya(new Ni({path:{...this.path,ref:`${this.path.ref}${this.path.ref}.attachments[${e}]`,attachmentSource:`message`,attachmentSelector:{type:`index`,index:e}},getState:()=>{let t=this.getState().attachments?.[e];return t?{...t,source:`message`}:ki},subscribe:e=>this._core.subscribe(e)}))}},Ma=e=>({parentId:e.parentId??null,sourceId:e.sourceId??null,runConfig:e.runConfig??{},...e.stream?{stream:e.stream}:{}}),Na=e=>({parentId:e.parentId??null,sourceId:e.sourceId??null,runConfig:e.runConfig??{}}),Pa=(e,t)=>typeof t==`string`?{createdAt:new Date,parentId:e.at(-1)?.id??null,sourceId:null,runConfig:{},role:`user`,content:[{type:`text`,text:t}],attachments:[],metadata:{custom:{}}}:{createdAt:t.createdAt??new Date,parentId:t.parentId??e.at(-1)?.id??null,sourceId:t.sourceId??null,role:t.role??`user`,content:t.content,attachments:t.attachments??[],metadata:t.metadata??{custom:{}},runConfig:t.runConfig??{},startRun:t.startRun},Fa=(e,t)=>{let n=e.messages.at(-1);return Object.freeze({threadId:t.id,metadata:t,capabilities:e.capabilities,isDisabled:e.isDisabled,isLoading:e.isLoading,isRunning:e.isRunning??(n?.role===`assistant`?n.status.type===`running`:!1),messages:e.messages,state:e.state,suggestions:e.suggestions,extras:e.extras,speech:e.speech,voice:e.voice})},Ia=class{get path(){return this._threadBinding.path}get __internal_threadBinding(){return this._threadBinding}_threadBinding;constructor(e,t){let n=new Ni({path:e.path,getState:()=>Fa(e.getState(),t.getState()),subscribe:n=>{let r=e.subscribe(n),i=t.subscribe(n);return()=>{r(),i()}}});this._threadBinding={path:e.path,getState:()=>e.getState(),getStateState:()=>n.getState(),outerSubscribe:t=>e.outerSubscribe(t),subscribe:t=>e.subscribe(t)},this.composer=new Ta(new Fi({path:{...this.path,ref:`${this.path.ref}.composer`,composerSource:`thread`},getState:()=>this._threadBinding.getState().composer,subscribe:e=>this._threadBinding.subscribe(e)})),this.__internal_bindMethods()}__internal_bindMethods(){this.append=this.append.bind(this),this.resumeRun=this.resumeRun.bind(this),this.importExternalState=this.importExternalState.bind(this),this.exportExternalState=this.exportExternalState.bind(this),this.startRun=this.startRun.bind(this),this.cancelRun=this.cancelRun.bind(this),this.stopSpeaking=this.stopSpeaking.bind(this),this.connectVoice=this.connectVoice.bind(this),this.disconnectVoice=this.disconnectVoice.bind(this),this.muteVoice=this.muteVoice.bind(this),this.unmuteVoice=this.unmuteVoice.bind(this),this.getVoiceVolume=this.getVoiceVolume.bind(this),this.subscribeVoiceVolume=this.subscribeVoiceVolume.bind(this),this.export=this.export.bind(this),this.import=this.import.bind(this),this.reset=this.reset.bind(this),this.getMessageByIndex=this.getMessageByIndex.bind(this),this.getMessageById=this.getMessageById.bind(this),this.subscribe=this.subscribe.bind(this),this.unstable_on=this.unstable_on.bind(this),this.getModelContext=this.getModelContext.bind(this),this.getState=this.getState.bind(this)}composer;getState(){return this._threadBinding.getStateState()}append(e){this._threadBinding.getState().append(Pa(this._threadBinding.getState().messages,e))}subscribe(e){return this._threadBinding.subscribe(e)}getModelContext(){return this._threadBinding.getState().getModelContext()}startRun(e){return this._threadBinding.getState().startRun(Na(e))}resumeRun(e){return this._threadBinding.getState().resumeRun(Ma(e))}exportExternalState(){return this._threadBinding.getState().exportExternalState()}importExternalState(e){this._threadBinding.getState().importExternalState(e)}cancelRun(){this._threadBinding.getState().cancelRun()}stopSpeaking(){return this._threadBinding.getState().stopSpeaking()}connectVoice(){this._threadBinding.getState().connectVoice()}disconnectVoice(){this._threadBinding.getState().disconnectVoice()}getVoiceVolume(){return this._threadBinding.getState().getVoiceVolume()}subscribeVoiceVolume(e){return this._threadBinding.getState().subscribeVoiceVolume(e)}muteVoice(){this._threadBinding.getState().muteVoice()}unmuteVoice(){this._threadBinding.getState().unmuteVoice()}export(){return this._threadBinding.getState().export()}import(e){this._threadBinding.getState().import(e)}reset(e){this._threadBinding.getState().reset(e)}getMessageByIndex(e){if(e<0)throw Error(`Message index must be >= 0`);return this._getMessageRuntime({...this.path,ref:`${this.path.ref}.messages[${e}]`,messageSelector:{type:`index`,index:e}},()=>{let t=this._threadBinding.getState().messages,n=t[e];if(n)return{message:n,parentId:t[e-1]?.id??null,index:e}})}getMessageById(e){return this._getMessageRuntime({...this.path,ref:`${this.path.ref}.messages[messageId=${JSON.stringify(e)}]`,messageSelector:{type:`messageId`,messageId:e}},()=>this._threadBinding.getState().getMessageById(e))}_getMessageRuntime(e,t){return new ja(new Ni({path:e,getState:()=>{let{message:e,parentId:n,index:r}=t()??{},{messages:i,speech:a}=this._threadBinding.getState();if(!e||n===void 0||r===void 0)return ki;let o=this._threadBinding.getState().getBranches(e.id);return{...e,[ua]:e[ua],index:r,isLast:i.at(-1)?.id===e.id,parentId:n,branchNumber:o.indexOf(e.id)+1,branchCount:o.length,speech:a?.messageId===e.id?a:void 0}},subscribe:e=>this._threadBinding.subscribe(e)}),this._threadBinding)}_eventSubscriptionSubjects=new Map;unstable_on(e,t){let n=this._eventSubscriptionSubjects.get(e);return n||(n=new Ii({event:e,binding:this._threadBinding}),this._eventSubscriptionSubjects.set(e,n)),n.subscribe(t)}},La=Promise.resolve(),Ra=e=>({mainThreadId:e.mainThreadId,newThreadId:e.newThreadId,threadIds:e.threadIds,archivedThreadIds:e.archivedThreadIds,isLoading:e.isLoading,isLoadingMore:e.isLoadingMore??!1,hasMore:e.hasMore??!1,threadItems:e.threadItems}),za=(e,t)=>{if(t===void 0)return ki;let n=e.getItemById(t);return n?{id:n.id,remoteId:n.remoteId,externalId:n.externalId,title:n.title,status:n.status,custom:n.custom,isMain:n.id===e.mainThreadId}:ki},Ba=class{_core;_runtimeFactory;_getState;constructor(e,t=Ia){this._core=e,this._runtimeFactory=t;let n=new Pi({path:{},getState:()=>Ra(e),subscribe:t=>e.subscribe(t)});this._getState=n.getState.bind(n),this._mainThreadListItemRuntime=new la(new Ni({path:{ref:`threadItems[main]`,threadSelector:{type:`main`}},getState:()=>za(this._core,this._core.mainThreadId),subscribe:e=>this._core.subscribe(e)}),this._core),this.main=new t(new Fi({path:{ref:`threads.main`,threadSelector:{type:`main`}},getState:()=>e.getMainThreadRuntimeCore(),subscribe:t=>e.subscribe(t)}),this._mainThreadListItemRuntime),this.__internal_bindMethods()}__internal_bindMethods(){this.switchToThread=this.switchToThread.bind(this),this.switchToNewThread=this.switchToNewThread.bind(this),this.getLoadThreadsPromise=this.getLoadThreadsPromise.bind(this),this.reload=this.reload.bind(this),this.loadMore=this.loadMore.bind(this),this.getState=this.getState.bind(this),this.subscribe=this.subscribe.bind(this),this.getById=this.getById.bind(this),this.getItemById=this.getItemById.bind(this),this.getItemByIndex=this.getItemByIndex.bind(this),this.getArchivedItemByIndex=this.getArchivedItemByIndex.bind(this)}switchToThread(e){return this._core.switchToThread(e)}switchToNewThread(){return this._core.switchToNewThread()}getLoadThreadsPromise(){return this._core.getLoadThreadsPromise()}reload(){return this._core.reload?.()??La}loadMore(){return this._core.loadMore?.()??La}getState(){return this._getState()}subscribe(e){return this._core.subscribe(e)}_mainThreadListItemRuntime;main;get mainItem(){return this._mainThreadListItemRuntime}getById(e){return new this._runtimeFactory(new Fi({path:{ref:`threads[threadId=${JSON.stringify(e)}]`,threadSelector:{type:`threadId`,threadId:e}},getState:()=>this._core.getThreadRuntimeCore(e),subscribe:e=>this._core.subscribe(e)}),this.mainItem)}getItemByIndex(e){return new la(new Ni({path:{ref:`threadItems[${e}]`,threadSelector:{type:`index`,index:e}},getState:()=>za(this._core,this._core.threadIds[e]),subscribe:e=>this._core.subscribe(e)}),this._core)}getArchivedItemByIndex(e){return new la(new Ni({path:{ref:`archivedThreadItems[${e}]`,threadSelector:{type:`archiveIndex`,index:e}},getState:()=>za(this._core,this._core.archivedThreadIds[e]),subscribe:e=>this._core.subscribe(e)}),this._core)}getItemById(e){return new la(new Ni({path:{ref:`threadItems[threadId=${e}]`,threadSelector:{type:`threadId`,threadId:e}},getState:()=>za(this._core,e),subscribe:e=>this._core.subscribe(e)}),this._core)}},Va=class{_core;threads;_thread;constructor(e){this._core=e,this.threads=new Ba(e.threads),this._thread=this.threads.main,this.__internal_bindMethods()}__internal_bindMethods(){this.registerModelContextProvider=this.registerModelContextProvider.bind(this)}get thread(){return this._thread}registerModelContextProvider(e){return this._core.registerModelContextProvider(e)}},Ha=N(e=>gn(Si(e)));or(Ha,(e,t)=>{Ci(e,t),!e.tools&&t.tools.source===null&&(e.tools=ai({})),!e.dataRenderers&&t.dataRenderers.source===null&&(e.dataRenderers=oi())});var Ua=(0,j.createContext)(null),Wa=()=>(0,j.useContext)(Ua),Ga=Object.freeze([]),Ka=`DEFAULT_THREAD_ID`,qa=Object.freeze([Ka]),Ja=Object.freeze({id:Ka,remoteId:void 0,externalId:void 0,status:`regular`}),Ya=Promise.resolve(),Xa=Object.freeze({[Ka]:Ja}),Za=class{threadFactory;_mainThreadId=Ka;_threads=qa;_archivedThreads=Ga;_threadData=Xa;adapter={};get isLoading(){return this.adapter.isLoading??!1}get newThreadId(){}get threadIds(){return this._threads}get archivedThreadIds(){return this._archivedThreads}get threadItems(){return this._threadData}getLoadThreadsPromise(){return Ya}_mainThread;get mainThreadId(){return this._mainThreadId}constructor(e={},t){this.threadFactory=t,this.__internal_setAdapter(e,!0)}getMainThreadRuntimeCore(){return this._mainThread}getThreadRuntimeCore(){throw Error(`Method not implemented.`)}getItemById(e){for(let t of this.adapter.threads??[])if(t.id===e)return t;for(let t of this.adapter.archivedThreads??[])if(t.id===e)return t;if(e===Ka)return Ja}__internal_setAdapter(e,t=!1){let n=this.adapter;this.adapter=e;let r=e.threadId??Ka,i=e.threads??Ga,a=e.archivedThreads??Ga,o=n.threadId??Ka,s=n.threads??Ga,c=n.archivedThreads??Ga;!t&&o===r&&s===i&&c===a||((s!==i||c!==a)&&(this._threadData={...Xa,...Object.fromEntries(e.threads?.map(e=>[e.id,{...e,remoteId:e.remoteId,externalId:e.externalId,status:`regular`}])??[]),...Object.fromEntries(e.archivedThreads?.map(e=>[e.id,{...e,remoteId:e.remoteId,externalId:e.externalId,status:`archived`}])??[])}),s!==i&&(this._threads=this.adapter.threads?.map(e=>e.id)??Ga),c!==a&&(this._archivedThreads=this.adapter.archivedThreads?.map(e=>e.id)??Ga),(t||o!==r)&&(this._mainThreadId=r,this._mainThread=this.threadFactory()),this._notifySubscribers())}async switchToThread(e){if(this._mainThreadId===e)return;let t=this.adapter.onSwitchToThread;if(!t)throw Error(`External store adapter does not support switching to thread`);await t(e)}async switchToNewThread(){let e=this.adapter.onSwitchToNewThread;if(!e)throw Error(`External store adapter does not support switching to new thread`);await e()}async rename(e,t){let n=this.adapter.onRename;if(!n)throw Error(`External store adapter does not support renaming`);await n(e,t)}async detach(){}async archive(e){let t=this.adapter.onArchive;if(!t)throw Error(`External store adapter does not support archiving`);await t(e)}async unarchive(e){let t=this.adapter.onUnarchive;if(!t)throw Error(`External store adapter does not support unarchiving`);await t(e)}async delete(e){let t=this.adapter.onDelete;if(!t)throw Error(`External store adapter does not support deleting`);await t(e)}initialize(e){return Promise.resolve({remoteId:e,externalId:void 0})}generateTitle(){throw Error(`Method not implemented.`)}_subscriptions=new Set;subscribe(e){return this._subscriptions.add(e),()=>this._subscriptions.delete(e)}_notifySubscribers(){for(let e of this._subscriptions)e()}},Qa=class{cache=new WeakMap;convertMessages(e,t){return e.map((e,n)=>{let r=t(this.cache.get(e),e,n);return this.cache.set(e,r),r})}},$a=Object.freeze([]),eo=(e,t)=>{let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0},to=(e,t)=>e&&t[t.length-1]?.role!==`assistant`,no=class extends ca{_assistantOptimisticId=null;_capabilities={switchToBranch:!1,switchBranchDuringRun:!1,edit:!1,reload:!1,cancel:!1,unstable_copy:!1,speech:!1,dictation:!1,voice:!1,attachments:!1,feedback:!1,queue:!1};get capabilities(){return this._capabilities}_messages;isDisabled;get isLoading(){return this._store.isLoading??!1}get isRunning(){return this._store.isRunning}_getBaseMessages(){return this._messages}get state(){return this._store.state??super.state}get adapters(){return this._store.adapters}suggestions=[];extras=void 0;_converter=new Qa;_store;beginEdit(e){if(!this._store.onEdit)throw Error(`Runtime does not support editing.`);super.beginEdit(e)}constructor(e,t){super(e),this.__internal_setAdapter(t)}__internal_setAdapter(e){if(this._store===e)return;let t=e.isRunning??!1;this.isDisabled=e.isDisabled??!1;let n=this._store;this._store=e,this.extras!==e.extras&&(this.extras=e.extras);let r=e.suggestions??$a;eo(this.suggestions,r)||(this.suggestions=r);let i={switchToBranch:this._store.setMessages!==void 0,switchBranchDuringRun:!1,edit:this._store.onEdit!==void 0,reload:this._store.onReload!==void 0,cancel:this._store.onCancel!==void 0,speech:this._store.adapters?.speech!==void 0,dictation:this._store.adapters?.dictation!==void 0,voice:this._store.adapters?.voice!==void 0,unstable_copy:this._store.unstable_capabilities?.copy!==!1,attachments:!!this._store.adapters?.attachments,feedback:!!this._store.adapters?.feedback,queue:!1};eo(this._capabilities,i)||(this._capabilities=i);let a;if(e.messageRepository){if(n&&n.isRunning===e.isRunning&&n.messageRepository===e.messageRepository){this._notifySubscribers();return}this.repository.clear(),this._assistantOptimisticId=null,this.repository.import(e.messageRepository),a=this.repository.getMessages()}else if(e.messages){if(n){if(n.convertMessage!==e.convertMessage)this._converter=new Qa;else if(n.isRunning===e.isRunning&&n.messages===e.messages){this._notifySubscribers();return}}a=e.convertMessage?this._converter.convertMessages(e.messages,(n,r,i)=>{if(!e.convertMessage)return r;let a=qi(i===(e.messages?.length??0)-1,t,!1,!1,void 0);if(n&&(n.role!==`assistant`||!Ki(n.status)||n.status===a))return n;let o=Yi(e.convertMessage(r,i),i.toString(),a);return pa(o,r),o}):e.messages;for(let e=0;e<a.length;e++){let t=a[e],n=a[e-1];this.repository.addOrUpdateMessage(n?.id??null,t)}}else throw Error(`ExternalStoreAdapter must provide either 'messages' or 'messageRepository'`);a.length>0&&this.ensureInitialized(),(n?.isRunning??!1)!==(e.isRunning??!1)&&(e.isRunning?this._notifyEventSubscribers(`runStart`,{}):this._notifyEventSubscribers(`runEnd`,{})),this._assistantOptimisticId&&=(this.repository.deleteMessage(this._assistantOptimisticId),null),to(t,a)&&(this._assistantOptimisticId=this.repository.appendOptimisticMessage(a.at(-1)?.id??null,{role:`assistant`,content:[]})),this.repository.resetHead(this._assistantOptimisticId??a.at(-1)?.id??null),this._messages=this.repository.getMessages(),this._notifySubscribers()}switchToBranch(e){if(!this._store.setMessages)throw Error(`Runtime does not support switching branches.`);this._store.isRunning||(this.repository.switchToBranch(e),this.updateMessages(this.repository.getMessages()))}async append(e){if(e.parentId!==(this.messages.at(-1)?.id??null)){if(!this._store.onEdit)throw Error(`Runtime does not support editing messages.`);await this._store.onEdit(e)}else await this._store.onNew(e)}async startRun(e){if(!this._store.onReload)throw Error(`Runtime does not support reloading messages.`);await this._store.onReload(e.parentId,e)}async resumeRun(e){if(!this._store.onResume)throw Error(`Runtime does not support resuming runs.`);await this._store.onResume(e)}exportExternalState(){if(!this._store.onExportExternalState)throw Error(`Runtime does not support exporting external states.`);return this._store.onExportExternalState()}importExternalState(e){if(!this._store.onLoadExternalState)throw Error(`Runtime does not support importing external states.`);this._store.onLoadExternalState(e)}cancelRun(){if(!this._store.onCancel)throw Error(`Runtime does not support cancelling runs.`);this._store.onCancel(),this._assistantOptimisticId&&=(this.repository.deleteMessage(this._assistantOptimisticId),null);let e=this.repository.getMessages(),t=e[e.length-1];t?.role===`user`&&t.id===e.at(-1)?.id?(this.repository.deleteMessage(t.id),this.composer.text.trim()||this.composer.setText(I(t)),e=this.repository.getMessages()):this._notifySubscribers(),setTimeout(()=>{this.updateMessages(e)},0)}addToolResult(e){if(!this._store.onAddToolResult&&!this._store.onAddToolResult)throw Error(`Runtime does not support tool results.`);this._store.onAddToolResult?.(e)}resumeToolCall(e){if(!this._store.onResumeToolCall)throw Error(`Runtime does not support resuming tool calls.`);this._store.onResumeToolCall(e)}reset(e){let t=new $i;t.import(Xi.fromArray(e??[])),this.updateMessages(t.getMessages())}import(e){this._assistantOptimisticId=null,super.import(e),this._store.onImport&&this._store.onImport(this.repository.getMessages())}updateMessages=e=>{this._store.convertMessage===void 0?this._store.setMessages?.(e):this._store.setMessages?.(e.flatMap(ma))}},ro=e=>e.adapters?.threadList??{},io=class extends Li{threads;constructor(e){super(),this.threads=new Za(ro(e),()=>new no(this._contextProvider,e))}setAdapter(e){this.threads.__internal_setAdapter(ro(e)),this.threads.getMainThreadRuntimeCore().__internal_setAdapter(e)}},ao=e=>{let[t]=(0,j.useState)(()=>new io(e));(0,j.useEffect)(()=>{t.setAdapter(e)});let{modelContext:n}=Wa()??{};return(0,j.useEffect)(()=>{if(n)return t.registerModelContextProvider(n)},[n,t]),(0,j.useMemo)(()=>new Va(t),[t])},oo=e=>e._core?.RenderComponent,so=(0,j.memo)(({runtime:e,aui:t=null,children:n})=>{let r=Dr({threads:Ha(e)},{parent:t}),i=oo(e);return(0,M.jsxs)(rr,{value:r,children:[i&&(0,M.jsx)(i,{}),n]})}),co=(e,t)=>e.Message===t.Message&&e.EditComposer===t.EditComposer&&e.UserEditComposer===t.UserEditComposer&&e.AssistantEditComposer===t.AssistantEditComposer&&e.SystemEditComposer===t.SystemEditComposer&&e.UserMessage===t.UserMessage&&e.AssistantMessage===t.AssistantMessage&&e.SystemMessage===t.SystemMessage,lo=()=>null,uo=(e,t,n)=>{switch(t){case`user`:return n?e.UserEditComposer??e.EditComposer??e.UserMessage??e.Message:e.UserMessage??e.Message;case`assistant`:return n?e.AssistantEditComposer??e.EditComposer??e.AssistantMessage??e.Message:e.AssistantMessage??e.Message;case`system`:return n?e.SystemEditComposer??e.EditComposer??e.SystemMessage??e.Message:e.SystemMessage??e.Message??lo;default:throw Error(`Unknown message role: ${t}`)}},fo=({components:e})=>(0,M.jsx)(uo(e,F(e=>e.message.role),F(e=>e.message.composer.isEditing)),{}),po=(0,j.memo)(({index:e,components:t})=>(0,M.jsx)(wi,{index:e,children:(0,M.jsx)(fo,{components:t})}),(e,t)=>e.index===t.index&&co(e.components,t.components));po.displayName=`ThreadPrimitive.MessageByIndex`;var mo=({children:e})=>{let t=F(e=>e.thread.messages.length);return(0,j.useMemo)(()=>t===0?null:Array.from({length:t},(t,n)=>(0,M.jsx)(wi,{index:n,children:(0,M.jsx)(Fr,{getItemState:e=>e.thread().message({index:n}).getState(),children:t=>e({get message(){return t()}})})},n)),[t,e])},ho=({components:e,children:t})=>e?(0,M.jsx)(mo,{children:()=>(0,M.jsx)(fo,{components:e})}):(0,M.jsx)(mo,{children:t});ho.displayName=`ThreadPrimitive.Messages`;var go=(0,j.memo)(ho,(e,t)=>e.children||t.children?e.children===t.children:co(e.components,t.components)),L=e=>{let t=e.message.metadata;if(!(!t||typeof t!=`object`))return t.custom?.quote},R=e=>Symbol.iterator in e,_o=e=>`entries`in e,vo=(e,t)=>{let n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(let[e,t]of n)if(!r.has(e)||!Object.is(t,r.get(e)))return!1;return!0},yo=(e,t)=>{let n=e[Symbol.iterator](),r=t[Symbol.iterator](),i=n.next(),a=r.next();for(;!i.done&&!a.done;){if(!Object.is(i.value,a.value))return!1;i=n.next(),a=r.next()}return!!i.done&&!!a.done};function bo(e,t){return Object.is(e,t)?!0:typeof e!=`object`||!e||typeof t!=`object`||!t||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:R(e)&&R(t)?_o(e)&&_o(t)?vo(e,t):yo(e,t):vo({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function xo(e){let t=j.useRef(void 0);return n=>{let r=e(n);return bo(t.current,r)?t.current:t.current=r}}var So=e=>{let t=-1;return{startGroup:e=>{t===-1&&(t=e)},endGroup:(n,r)=>{t!==-1&&(r.push({type:e,startIndex:t,endIndex:n}),t=-1)},finalize:(n,r)=>{t!==-1&&r.push({type:e,startIndex:t,endIndex:n})}}},Co=(e,t)=>{let n=[];if(t){let t=So(`chainOfThoughtGroup`);for(let r=0;r<e.length;r++){let i=e[r];i===`tool-call`||i===`reasoning`?t.startGroup(r):(t.endGroup(r-1,n),n.push({type:`single`,index:r}))}t.finalize(e.length-1,n)}else{let t=So(`toolGroup`),r=So(`reasoningGroup`);for(let i=0;i<e.length;i++){let a=e[i];a===`tool-call`?(r.endGroup(i-1,n),t.startGroup(i)):a===`reasoning`?(t.endGroup(i-1,n),r.startGroup(i)):(t.endGroup(i-1,n),r.endGroup(i-1,n),n.push({type:`single`,index:i}))}t.finalize(e.length-1,n),r.finalize(e.length-1,n)}return n},wo=e=>{let t=F(xo(e=>e.message.parts.map(e=>e.type)));return(0,j.useMemo)(()=>t.length===0?[]:Co(t,e),[t,e])},To=({Fallback:e,...t})=>{let n=F(n=>{let r=n.tools.tools[t.toolName]??e;return Array.isArray(r)?r[0]??e:r});return n?(0,M.jsx)(n,{...t}):null},Eo=(e,t,n)=>e.renderers[t]?.[0]||(e.fallbacks[0]??n),Do=({Fallback:e,...t})=>{let n=F(n=>Eo(n.dataRenderers,t.name,e));return n?(0,M.jsx)(n,{...t}):null},Oo={Text:()=>null,Reasoning:()=>null,Source:()=>null,Image:()=>null,File:()=>null,Unstable_Audio:()=>null,ToolGroup:({children:e})=>e,ReasoningGroup:({children:e})=>e},ko=({components:{Text:e=Oo.Text,Reasoning:t=Oo.Reasoning,Image:n=Oo.Image,Source:r=Oo.Source,File:i=Oo.File,Unstable_Audio:a=Oo.Unstable_Audio,tools:o={},data:s}={}})=>{let c=Dr(),l=F(e=>e.part),u=l.type;if(u===`tool-call`){let e=c.part().addToolResult,t=c.part().resumeToolCall;if(`Override`in o)return(0,M.jsx)(o.Override,{...l,addResult:e,resume:t});let n=o.by_name?.[l.toolName]??o.Fallback;return(0,M.jsx)(To,{...l,Fallback:n,addResult:e,resume:t})}if(l.status?.type===`requires-action`)throw Error(`Encountered unexpected requires-action status`);switch(u){case`text`:return(0,M.jsx)(e,{...l});case`reasoning`:return(0,M.jsx)(t,{...l});case`source`:return(0,M.jsx)(r,{...l});case`image`:return(0,M.jsx)(n,{...l});case`file`:return(0,M.jsx)(i,{...l});case`audio`:return(0,M.jsx)(a,{...l});case`data`:{let e=s?.by_name?.[l.name]??s?.Fallback;return(0,M.jsx)(Do,{...l,Fallback:e})}default:return console.warn(`Unknown message part type: ${u}`),null}},Ao=(0,j.memo)(({index:e,components:t})=>(0,M.jsx)(Ti,{index:e,children:(0,M.jsx)(ko,{components:t})}),(e,t)=>e.index===t.index&&e.components?.Text===t.components?.Text&&e.components?.Reasoning===t.components?.Reasoning&&e.components?.Source===t.components?.Source&&e.components?.Image===t.components?.Image&&e.components?.File===t.components?.File&&e.components?.Unstable_Audio===t.components?.Unstable_Audio&&e.components?.tools===t.components?.tools&&e.components?.data===t.components?.data&&e.components?.ToolGroup===t.components?.ToolGroup&&e.components?.ReasoningGroup===t.components?.ReasoningGroup);Ao.displayName=`MessagePrimitive.PartByIndex`;var jo=({status:e,component:t})=>(0,M.jsx)(Di,{text:``,isRunning:e.type===`running`,children:(0,M.jsx)(t,{type:`text`,text:``,status:e})}),Mo=Object.freeze({type:`complete`}),No=Object.freeze({type:`running`}),Po=(0,j.memo)(({components:e})=>{let t=F(e=>e.message.status??Mo);return e?.Empty?(0,M.jsx)(e.Empty,{status:t}):t.type===`running`?(0,M.jsx)(jo,{status:t,component:e?.Text??Oo.Text}):null},(e,t)=>e.components?.Empty===t.components?.Empty&&e.components?.Text===t.components?.Text),Fo=(0,j.memo)(({components:e,enabled:t})=>F(e=>{if(!t||e.message.parts.length===0)return!1;let n=e.message.parts[e.message.parts.length-1];return n?.type!==`text`&&n?.type!==`reasoning`})?(0,M.jsx)(Po,{components:e}):null,(e,t)=>e.enabled===t.enabled&&e.components?.Empty===t.components?.Empty&&e.components?.Text===t.components?.Text),Io=(0,j.memo)(({Quote:e})=>{let t=F(L);return t?(0,M.jsx)(e,{text:t.text,messageId:t.messageId}):null}),Lo=()=>{let e=Dr(),t=F(e=>e.part),n=F(e=>{if(e.part.type!==`tool-call`)return null;let t=e.tools.tools[e.part.toolName];return Array.isArray(t)?t[0]??null:t??null});return!n||t.type!==`tool-call`?null:(0,M.jsx)(n,{...t,addResult:e.part().addToolResult,resume:e.part().resumeToolCall})},Ro=()=>{let e=F(e=>e.part),t=F(e=>e.part.type===`data`?Eo(e.dataRenderers,e.part.name,void 0)??null:null);return!t||e.type!==`data`?null:(0,M.jsx)(t,{...e})},zo=()=>{let e=F(e=>e.part.type);return e===`tool-call`?(0,M.jsx)(Lo,{}):e===`data`?(0,M.jsx)(Ro,{}):null},Bo=Object.freeze({type:`text`,text:``,status:No}),Vo=({index:e,children:t})=>{let n=Dr(),r=F(e=>e.dataRenderers);return(0,M.jsx)(Ti,{index:e,children:(0,M.jsx)(Fr,{getItemState:t=>t.message().part({index:e}).getState(),children:i=>t({get part(){let t=i();if(t.type===`tool-call`){let r=n.tools().getState().tools[t.toolName],i=Array.isArray(r)?!!r[0]:!!r,a=n.message().part({index:e});return{...t,toolUI:i?(0,M.jsx)(Lo,{}):null,addResult:a.addToolResult,resume:a.resumeToolCall}}if(t.type===`data`){let e=Eo(r,t.name,void 0)!==void 0;return{...t,dataRendererUI:e?(0,M.jsx)(Ro,{}):null}}return t}})})})},Ho=({children:e})=>{let t=F(e=>e.message.parts.length),n=F(e=>(e.message.status?.type??`complete`)===`running`);return t===0?t===0&&n?(0,M.jsx)(Di,{text:``,isRunning:!0,children:e({part:Bo})}):null:(0,M.jsx)(M.Fragment,{children:Array.from({length:t},(t,n)=>(0,M.jsx)(Vo,{index:n,children:t=>e(t)??(0,M.jsx)(zo,{})},n))})},Uo=({components:e,unstable_showEmptyOnNonTextEnd:t=!0,children:n})=>n?(0,M.jsx)(Ho,{children:n}):(0,M.jsx)(Wo,{components:e,unstable_showEmptyOnNonTextEnd:t});Uo.displayName=`MessagePrimitive.Parts`;var Wo=({components:e,unstable_showEmptyOnNonTextEnd:t})=>{let n=F(e=>e.message.parts.length),r=wo(!!e?.ChainOfThought),i=(0,j.useMemo)(()=>n===0?(0,M.jsx)(Po,{components:e}):r.map(t=>{if(t.type===`single`)return(0,M.jsx)(Ao,{index:t.index,components:e},t.index);if(t.type===`chainOfThoughtGroup`){let n=e?.ChainOfThought;return n?(0,M.jsx)(Oi,{startIndex:t.startIndex,endIndex:t.endIndex,children:(0,M.jsx)(n,{})},`chainOfThought-${t.startIndex}`):null}else if(t.type===`toolGroup`)return(0,M.jsx)(e?.ToolGroup??Oo.ToolGroup,{startIndex:t.startIndex,endIndex:t.endIndex,children:Array.from({length:t.endIndex-t.startIndex+1},(n,r)=>(0,M.jsx)(Ao,{index:t.startIndex+r,components:e},r))},`tool-${t.startIndex}`);else return(0,M.jsx)(e?.ReasoningGroup??Oo.ReasoningGroup,{startIndex:t.startIndex,endIndex:t.endIndex,children:Array.from({length:t.endIndex-t.startIndex+1},(n,r)=>(0,M.jsx)(Ao,{index:t.startIndex+r,components:e},r))},`reasoning-${t.startIndex}`)}),[r,e,n]);return(0,M.jsxs)(M.Fragment,{children:[e?.Quote&&(0,M.jsx)(Io,{Quote:e.Quote}),i,(0,M.jsx)(Fo,{components:e,enabled:t})]})},Go=()=>{let e=Dr(),t=F(e=>e.thread.isRunning&&!e.thread.capabilities.queue||!e.composer.isEditing||e.composer.isEmpty);return{send:(0,j.useCallback)(t=>{e.composer().send(t)},[e]),disabled:t}},Ko=e=>{let t=new Map,n=()=>{let n=0;for(let e of t.values())n+=e;e(n)};return{register:()=>{let e=Symbol();return t.set(e,0),{setHeight:r=>{t.get(e)!==r&&(t.set(e,r),n())},unregister:()=>{t.delete(e),n()}}}}},qo=(e={})=>{let t=new Set,n=Ko(e=>{a.setState({height:{...a.getState().height,viewport:e}})}),r=Ko(e=>{a.setState({height:{...a.getState().height,inset:e}})}),i=(e,t)=>(a.setState({element:{...a.getState().element,[e]:t}}),()=>{a.getState().element[e]===t&&a.setState({element:{...a.getState().element,[e]:null}})}),a=Wr(()=>({isAtBottom:!0,scrollToBottom:({behavior:e=`auto`}={})=>{for(let n of t)n({behavior:e})},onScrollToBottom:e=>(t.add(e),()=>{t.delete(e)}),turnAnchor:e.turnAnchor??`bottom`,topAnchorMessageClamp:{tallerThan:e.topAnchorMessageClamp?.tallerThan??`10em`,visibleHeight:e.topAnchorMessageClamp?.visibleHeight??`6em`},height:{viewport:0,inset:0},element:{viewport:null,anchor:null,target:null},targetConfig:null,topAnchorTurn:null,registerViewport:n.register,registerContentInset:r.register,registerViewportElement:e=>i(`viewport`,e),registerAnchorElement:e=>i(`anchor`,e),registerAnchorTargetElement:(e,t)=>(a.setState({element:{...a.getState().element,target:e},targetConfig:e&&t?t:null}),()=>{a.getState().element.target===e&&a.setState({element:{...a.getState().element,target:null},targetConfig:null})}),setTopAnchorTurn:e=>{a.setState({topAnchorTurn:e})}}));return a};function Jo(e,t){function n(n){let r=(0,j.useContext)(e);if(!n?.optional&&!r)throw Error(`This component must be used within ${t}.`);return r}return n}function Yo(e,t){function n(n){let r=e(n);return r?r[t]:null}function r(e){let t=!1,r;typeof e==`function`?r=e:e&&typeof e==`object`&&(t=!!e.optional,r=e.selector);let i=n({optional:t});return i?r?i(r):i():null}return{[t]:r,[`${t}Store`]:n}}var Xo=(0,j.createContext)(null),{useThreadViewport:Zo,useThreadViewportStore:Qo}=Yo(Jo(Xo,`ThreadPrimitive.Viewport`),`useThreadViewport`),$o=e=>e,es=e=>{let t=Qo({optional:!0}),[n]=(0,j.useState)(()=>qo(e));return(0,j.useEffect)(()=>t?.getState().onScrollToBottom(()=>{n.getState().scrollToBottom()}),[t,n]),(0,j.useEffect)(()=>{if(t)return n.subscribe(e=>{t.getState().isAtBottom!==e.isAtBottom&&$o(t).setState({isAtBottom:e.isAtBottom})})},[n,t]),n},ts=({children:e,options:t={}})=>{let n=es(t),[r]=(0,j.useState)(()=>({useThreadViewport:n}));return(0,M.jsx)(Xo.Provider,{value:r,children:e})},ns=()=>((0,j.useEffect)(()=>{},[Dr()]),null),rs=(0,j.memo)(({children:e,aui:t,runtime:n})=>(0,M.jsxs)(so,{runtime:n,aui:t??null,children:[(0,M.jsx)(ns,{}),(0,M.jsx)(ts,{children:e})]}));function is(e){let t=Dr(),n=F(()=>t.thread.source?t.thread().__internal_getRuntime?.()??null:null);if(!n&&!e?.optional)throw Error(`ThreadRuntime is not available`);return n}function as(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function os(...e){return t=>{let n=!1,r=e.map(e=>{let r=as(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():as(e[t],null)}}}}function ss(...e){return j.useCallback(os(...e),e)}var cs=Symbol.for(`react.lazy`),ls=j.use;function us(e){return typeof e==`object`&&!!e&&`then`in e}function ds(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===cs&&`_payload`in e&&us(e._payload)}function fs(e){let t=ps(e),n=j.forwardRef((e,n)=>{let{children:r,...i}=e;ds(r)&&typeof ls==`function`&&(r=ls(r._payload));let a=j.Children.toArray(r),o=a.find(hs);if(o){let e=o.props.children,r=a.map(t=>t===o?j.Children.count(e)>1?j.Children.only(null):j.isValidElement(e)?e.props.children:null:t);return(0,M.jsx)(t,{...i,ref:n,children:j.isValidElement(e)?j.cloneElement(e,void 0,r):null})}return(0,M.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function ps(e){let t=j.forwardRef((e,t)=>{let{children:n,...r}=e;if(ds(n)&&typeof ls==`function`&&(n=ls(n._payload)),j.isValidElement(n)){let e=_s(n),i=gs(r,n.props);return n.type!==j.Fragment&&(i.ref=t?os(t,e):e),j.cloneElement(n,i)}return j.Children.count(n)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ms=Symbol(`radix.slottable`);function hs(e){return j.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ms}function gs(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function _s(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Ae();var vs=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=fs(`Primitive.${t}`),r=j.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,M.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ys=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`];function bs(e){let t=(0,j.forwardRef)(({render:t,asChild:n,children:r,...i},a)=>{let o=e;if(t&&(0,j.isValidElement)(t)){let e=r===void 0?t.props.children:r;return(0,M.jsx)(o,{...i,asChild:!0,ref:a,children:(0,j.cloneElement)(t,void 0,e)})}return(0,M.jsx)(o,{...i,asChild:n,ref:a,children:r})});return t.displayName=typeof e==`string`?e:e.displayName??e.name??`Component`,t}function xs(e){let t=vs[e],n=bs(t);return n.displayName=`Primitive.${e}`,n}var Ss=ys.reduce((e,t)=>(e[t]=xs(t),e),{});typeof window<`u`&&window.document&&window.document.createElement;function Cs(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var ws=(e,t,n=[])=>{let r=(0,j.forwardRef)((e,r)=>{let i={},a={};Object.keys(e).forEach(t=>{n.includes(t)?i[t]=e[t]:a[t]=e[t]});let o=t(i)??void 0;return(0,M.jsx)(Ss.button,{...a,type:`button`,ref:r,disabled:a.disabled||!o,onClick:Cs(a.onClick,o)})});return r.displayName=e,r};function Ts(e){let t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>(...e)=>t.current?.(...e),[])}function Es(e,t=globalThis?.document){let n=Ts(e);j.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}function Ds(e){let t=ks(e),n=j.forwardRef((e,n)=>{let{children:r,...i}=e,a=j.Children.toArray(r),o=a.find(js);if(o){let e=o.props.children,r=a.map(t=>t===o?j.Children.count(e)>1?j.Children.only(null):j.isValidElement(e)?e.props.children:null:t);return(0,M.jsx)(t,{...i,ref:n,children:j.isValidElement(e)?j.cloneElement(e,void 0,r):null})}return(0,M.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var Os=Ds(`Slot`);function ks(e){let t=j.forwardRef((e,t)=>{let{children:n,...r}=e;if(j.isValidElement(n)){let e=Ns(n),i=Ms(r,n.props);return n.type!==j.Fragment&&(i.ref=t?os(t,e):e),j.cloneElement(n,i)}return j.Children.count(n)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var As=Symbol(`radix.slottable`);function js(e){return j.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===As}function Ms(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Ns(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ps=()=>{let{disabled:e,send:t}=Go(),n=(0,j.useCallback)(()=>t(),[t]);return e?null:n},Fs=ws(`ComposerPrimitive.Send`,Ps),Is=(0,j.forwardRef)(({onSubmit:e,...t},n)=>{let r=Ps(),i=e=>{e.preventDefault(),r&&r()};return(0,M.jsx)(Ss.form,{...t,ref:n,onSubmit:Cs(e,i)})});Is.displayName=`ComposerPrimitive.Root`;function Ls(){return Ls=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ls.apply(null,arguments)}function Rs(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var zs=j.useLayoutEffect,Bs=function(e){var t=j.useRef(e);return zs(function(){t.current=e}),t},Vs=function(e,t){if(typeof e==`function`){e(t);return}e.current=t},Hs=function(e,t){var n=j.useRef();return j.useCallback(function(r){e.current=r,n.current&&Vs(n.current,null),n.current=t,t&&Vs(t,r)},[t])},Us={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`},Ws=function(e){Object.keys(Us).forEach(function(t){e.style.setProperty(t,Us[t],`important`)})},Gs=null,Ks=function(e,t){var n=e.scrollHeight;return t.sizingStyle.boxSizing===`border-box`?n+t.borderSize:n-t.paddingSize};function qs(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),Gs||(Gs=document.createElement(`textarea`),Gs.setAttribute(`tabindex`,`-1`),Gs.setAttribute(`aria-hidden`,`true`),Ws(Gs)),Gs.parentNode===null&&document.body.appendChild(Gs);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(e){var t=e;Gs.style[t]=o[t]}),Ws(Gs),Gs.value=t;var c=Ks(Gs,e);Gs.value=t,c=Ks(Gs,e),Gs.value=`x`;var l=Gs.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);var d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}var Js=function(){},Ys=function(e,t){return e.reduce(function(e,n){return e[n]=t[n],e},{})},Xs=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],Zs=!!document.documentElement.currentStyle,Qs=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var n=Ys(Xs,t),r=n.boxSizing;return r===``?null:(Zs&&r===`border-box`&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+`px`),{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)})};function $s(e,t,n){var r=Bs(n);j.useLayoutEffect(function(){var n=function(e){return r.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var ec=function(e,t){$s(document.body,`reset`,function(n){e.current.form===n.target&&t(n)})},tc=function(e){$s(window,`resize`,e)},nc=function(e){$s(document.fonts,`loadingdone`,e)},rc=[`cacheMeasurements`,`maxRows`,`minRows`,`onChange`,`onHeightChange`],ic=j.forwardRef(function(e,t){var n=e.cacheMeasurements,r=e.maxRows,i=e.minRows,a=e.onChange,o=a===void 0?Js:a,s=e.onHeightChange,c=s===void 0?Js:s,l=Rs(e,rc),u=l.value!==void 0,d=j.useRef(null),f=Hs(d,t),p=j.useRef(0),m=j.useRef(),h=function(){var e=d.current,t=n&&m.current?m.current:Qs(e);if(t){m.current=t;var a=qs(t,e.value||e.placeholder||`x`,i,r),o=a[0],s=a[1];p.current!==o&&(p.current=o,e.style.setProperty(`height`,o+`px`,`important`),c(o,{rowHeight:s}))}};return j.useLayoutEffect(h),ec(d,function(){if(!u){var e=d.current.value;requestAnimationFrame(function(){var t=d.current;t&&e!==t.value&&h()})}}),tc(h),nc(h),j.createElement(`textarea`,Ls({},l,{onChange:function(e){u||h(),o(e)},ref:f}))}),ac=e=>{let t=Ts(e),n=Zo(e=>e.onScrollToBottom);(0,j.useEffect)(()=>n(t),[n,t])},oc=(0,j.createContext)(null),sc=()=>(0,j.useContext)(oc),cc=(0,j.forwardRef)(({autoFocus:e=!1,asChild:t,render:n,disabled:r,onChange:i,onKeyDown:a,onPaste:o,onSelect:s,submitOnEnter:c,submitMode:l,cancelOnEscape:u=!0,unstable_focusOnRunStart:d=!0,unstable_focusOnScrollToBottom:f=!0,unstable_focusOnThreadSwitched:p=!0,addAttachmentOnPaste:m=!0,...h},g)=>{let _=Dr(),v=sc(),y=l??(c===!1?`none`:`enter`),b=F(e=>e.composer.isEditing?e.composer.text:``),x=F(e=>e.thread.isDisabled||e.composer.dictation?.inputDisabled)||r,S=(0,j.useRef)(null),C=ss(g,S),w=(0,j.useRef)(!1);Es(e=>{if(!S.current?.contains(e.target))return;if(v){for(let t of v.getPlugins())if(t.handleKeyDown(e))return}if(!u)return;let t=_.composer();t.getState().canCancel&&(t.cancel(),e.preventDefault())});let T=e=>{if(!x&&!e.nativeEvent.isComposing){if(v){for(let t of v.getPlugins())if(t.handleKeyDown(e))return}if(e.key===`Enter`){let t=_.thread().getState(),n=t.capabilities.queue;if(e.shiftKey&&(e.ctrlKey||e.metaKey)&&n&&y!==`none`&&!_.composer().getState().isEmpty){e.preventDefault(),_.composer().send({steer:!0});return}if(e.shiftKey||t.isRunning&&!n)return;let r=!1;y===`ctrlEnter`?r=e.ctrlKey||e.metaKey:y===`enter`&&(r=!0),r&&(e.preventDefault(),S.current?.closest(`form`)?.requestSubmit())}}},E=async e=>{if(!m)return;let t=_.thread().getState().capabilities,n=Array.from(e.clipboardData?.files||[]);if(t.attachments&&n.length>0)try{e.preventDefault(),await Promise.all(n.map(e=>_.composer().addAttachment(e)))}catch(e){console.error(`Error adding attachment:`,e)}},ee=e&&!x,D=(0,j.useCallback)(()=>{let e=S.current;!e||!ee||(e.focus({preventScroll:!0}),e.setSelectionRange(e.value.length,e.value.length))},[ee]);(0,j.useEffect)(()=>D(),[D]),ac(()=>{_.composer().getState().type===`thread`&&f&&D()}),(0,j.useEffect)(()=>{if(!(_.composer().getState().type!==`thread`||!d))return _.on(`thread.runStart`,D)},[d,D,_]),(0,j.useEffect)(()=>{if(!(_.composer().getState().type!==`thread`||!p))return _.on(`threadListItem.switchedTo`,D)},[p,D,_]);let te={name:`input`,value:b,...h,ref:C,disabled:x,onChange:Cs(i,e=>{if(!_.composer().getState().isEditing)return;let t=e.nativeEvent.isComposing===!0;w.current&&!t&&(w.current=!1);let n=t||w.current;if(wn(()=>{_.composer().setText(e.target.value)}),n)return;let r=e.target.selectionStart??e.target.value.length;if(v)for(let e of v.getPlugins())e.setCursorPosition(r)}),onKeyDown:Cs(a,T),onCompositionStart:Cs(h.onCompositionStart,()=>{w.current=!0}),onCompositionEnd:Cs(h.onCompositionEnd,e=>{if(w.current=!1,!_.composer().getState().isEditing)return;let t=e.target;wn(()=>{_.composer().setText(t.value)});let n=t.selectionStart??t.value.length;if(v)for(let e of v.getPlugins())e.setCursorPosition(n)}),onSelect:Cs(s,e=>{if(w.current)return;let t=e.target,n=t.selectionStart??t.value.length;if(v)for(let e of v.getPlugins())e.setCursorPosition(n)}),onPaste:Cs(o,E)};if(n&&(0,j.isValidElement)(n)){let e=h.children===void 0?n.props.children:h.children;return(0,M.jsx)(Os,{...te,children:(0,j.cloneElement)(n,void 0,e)})}return(0,M.jsx)(t?Os:ic,{...te})});cc.displayName=`ComposerPrimitive.Input`;var lc=()=>F(e=>{if(e.part.type!==`text`&&e.part.type!==`reasoning`)throw Error(`MessagePartText can only be used inside text or reasoning message parts.`);return e.part}),uc=(0,j.createContext)(null);function dc(e){let t=(0,j.useContext)(uc);if(!e?.optional&&!t)throw Error(`This component must be used within a SmoothContextProvider.`);return t}var{useSmoothStatus:fc,useSmoothStatusStore:pc}=Yo(dc,`useSmoothStatus`),mc=class{currentText;setText;animationFrameId=null;lastUpdateTime=Date.now();targetText=``;constructor(e,t){this.currentText=e,this.setText=t}start(){this.animationFrameId===null&&(this.lastUpdateTime=Date.now(),this.animate())}stop(){this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}animate=()=>{let e=Date.now(),t=e-this.lastUpdateTime,n=this.targetText.length-this.currentText.length,r=Math.min(5,250/n),i=0;for(;t>=r&&i<n;)i++,t-=r;i===n?this.animationFrameId=null:this.animationFrameId=requestAnimationFrame(this.animate),i!==0&&(this.currentText=this.targetText.slice(0,this.currentText.length+i),this.lastUpdateTime=e-t,this.setText(this.currentText))}},hc=Object.freeze({type:`running`}),gc=(e,t=!1)=>{let{text:n}=e,r=F(e=>e.message.id),i=(0,j.useRef)(r),[a,o]=(0,j.useState)(e.status.type===`running`?``:n),s=pc({optional:!0}),c=Ts(t=>{if(o(t),s){let n=a!==t||e.status.type===`running`?hc:e.status;$o(s).setState(n,!0)}});(0,j.useEffect)(()=>{if(s){let r=t&&(a!==n||e.status.type===`running`)?hc:e.status;$o(s).setState(r,!0)}},[s,t,n,a,e.status]);let[l]=(0,j.useState)(new mc(a,c));return(0,j.useEffect)(()=>{if(!t){l.stop();return}if(i.current!==r||!n.startsWith(l.targetText)){i.current=r,e.status.type===`running`?(c(``),l.currentText=``,l.targetText=n,l.start()):(c(n),l.currentText=n,l.targetText=n,l.stop());return}l.targetText=n,l.start()},[c,l,r,t,n,e.status.type]),(0,j.useEffect)(()=>()=>{l.stop()},[l]),(0,j.useMemo)(()=>t?{type:`text`,text:a,status:n===a?e.status:hc}:e,[t,a,e,n])},_c=(0,j.forwardRef)(({smooth:e=!0,component:t=`span`,...n},r)=>{let{text:i,status:a}=gc(lc(),e);return(0,M.jsx)(t,{"data-status":a.type,...n,ref:r,children:i})});_c.displayName=`MessagePartPrimitive.Text`;var vc=()=>F(e=>{if(e.part.type!==`image`)throw Error(`MessagePartImage can only be used inside image message parts.`);return e.part}),yc=(0,j.forwardRef)((e,t)=>{let{image:n}=vc();return(0,M.jsx)(Ss.img,{src:n,...e,ref:t})});yc.displayName=`MessagePartPrimitive.Image`;var bc=({children:e})=>F(e=>e.part.status.type===`running`)?e:null;bc.displayName=`MessagePartPrimitive.InProgress`;var xc=e=>{let t=(0,j.useRef)(void 0);return(0,j.useCallback)(n=>{t.current&&=(t.current(),void 0),n&&(t.current=e(n))},[e])},Sc=e=>e.dataset.messageId,Cc=()=>{let e=document.createElement(`div`);return e.dataset.auiTopAnchorReserve=``,e.style.height=`0px`,e.style.flexShrink=`0`,e.style.pointerEvents=`none`,e.setAttribute(`aria-hidden`,`true`),e},wc=(e,t)=>{let n=`${t}px`;return e.style.height===n?!1:(e.style.height=n,!0)},Tc=e=>{let t=window.devicePixelRatio||1;return Math.round(e*t)/t},Ec={...Oo,Text:()=>(0,M.jsxs)(`p`,{style:{whiteSpace:`pre-line`},children:[(0,M.jsx)(_c,{}),(0,M.jsx)(bc,{children:(0,M.jsx)(`span`,{style:{fontFamily:`revert`},children:` ●`})})]}),Image:()=>(0,M.jsx)(yc,{})},Dc=e=>{if(`children`in e)return(0,M.jsx)(Uo,{children:e.children});let{components:t,...n}=e;return(0,M.jsx)(Uo,{components:t?{Text:t.Text??Ec.Text,Image:t.Image??Ec.Image,Reasoning:t.Reasoning??Oo.Reasoning,Source:t.Source??Oo.Source,File:t.File??Oo.File,Unstable_Audio:t.Unstable_Audio??Oo.Unstable_Audio,...`ChainOfThought`in t?{ChainOfThought:t.ChainOfThought}:{tools:t.tools,data:t.data,ToolGroup:t.ToolGroup??Oo.ToolGroup,ReasoningGroup:t.ReasoningGroup??Oo.ReasoningGroup},Empty:t.Empty,Quote:t.Quote}:Ec,...n})};Dc.displayName=`MessagePrimitive.Parts`;var Oc=(0,j.forwardRef)((e,t)=>(0,M.jsx)(Ss.div,{...e,ref:t}));Oc.displayName=`ThreadPrimitive.Root`;var kc=({children:e})=>F(e=>e.thread.isEmpty)?e:null;kc.displayName=`ThreadPrimitive.Empty`;var Ac=e=>F(t=>!(e.empty===!0&&!t.thread.isEmpty||e.empty===!1&&t.thread.isEmpty||e.running===!0&&!t.thread.isRunning||e.running===!1&&t.thread.isRunning||e.disabled===!0&&!t.thread.isDisabled||e.disabled===!1&&t.thread.isDisabled)),jc=({children:e,...t})=>Ac(t)?e:null;jc.displayName=`ThreadPrimitive.If`;var Mc=e=>{let t=Ts(e);return xc((0,j.useCallback)(e=>{let n=new ResizeObserver(()=>{t()}),r=new MutationObserver(e=>{e.some(e=>e.type!==`attributes`||e.attributeName!==`style`)&&t()});return n.observe(e),r.observe(e,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),()=>{n.disconnect(),r.disconnect()}},[t]))},Nc=({autoScroll:e,scrollToBottomOnRunStart:t=!0,scrollToBottomOnInitialize:n=!0,scrollToBottomOnThreadSwitch:r=!0})=>{let i=(0,j.useRef)(null),a=Qo();e===void 0&&(e=a.getState().turnAnchor!==`top`);let o=(0,j.useRef)(0),s=(0,j.useRef)(null),c=(0,j.useCallback)(e=>{let t=i.current;t&&(s.current=e,t.scrollTo({top:t.scrollHeight,behavior:e}))},[]),l=(0,j.useCallback)(()=>{let e=a.getState();return e.turnAnchor===`top`&&e.element.viewport===i.current&&e.element.anchor!==null},[a]),u=()=>{let e=i.current;if(!e)return;let t=a.getState().isAtBottom,n=Math.abs(e.scrollHeight-e.scrollTop-e.clientHeight)<1||e.scrollHeight<=e.clientHeight;!n&&o.current<e.scrollTop||(n&&(s.current=null),(n||s.current===null)&&n!==t&&$o(a).setState({isAtBottom:n})),o.current=e.scrollTop},d=Mc(()=>{let t=s.current;t&&l()?s.current=null:t?c(t):e&&a.getState().isAtBottom&&c(`instant`),u()}),f=xc(e=>(e.addEventListener(`scroll`,u),()=>{e.removeEventListener(`scroll`,u)}));return ac(({behavior:e})=>{c(e)}),Mr(`thread.runStart`,()=>{t&&a.getState().turnAnchor!==`top`&&(s.current=`auto`,requestAnimationFrame(()=>{c(`auto`)}))}),Mr(`thread.initialize`,()=>{n&&(s.current=`instant`,requestAnimationFrame(()=>{c(`instant`)}))}),Mr(`threadListItem.switchedTo`,()=>{r&&(s.current=`instant`,requestAnimationFrame(()=>{c(`instant`)}))}),ss(d,f,i)},Pc=(e,t)=>xc((0,j.useCallback)(n=>{if(!e)return;let r=e(),i=()=>{let e=t?t(n):n.offsetHeight;r.setHeight(e)},a=new ResizeObserver(i);return a.observe(n),i(),()=>{a.disconnect(),r.unregister()}},[e,t])),Fc=e=>{let t=0,n=e;for(;n;)t+=n.offsetTop,n=n.offsetParent;return t},Ic=(e,t)=>{let n=0,r=e;for(;r&&r!==t;)n+=r.offsetTop,r=r.offsetParent;return r===t?n:Fc(e)-Fc(t)},Lc=({viewport:e,anchor:t,tallerThan:n,visibleHeight:r})=>{let i=Ic(t,e),a=t.offsetHeight;return i+Math.max(0,a-(a<=n?a:r))},Rc=({scrollHeight:e,...t})=>{let{viewport:n}=t,r=Lc(t)+n.clientHeight;return Math.max(0,r-e)},zc=({viewport:e,reserve:t,...n})=>Rc({viewport:e,...n,scrollHeight:e.scrollHeight-t.offsetHeight}),Bc=e=>{let t=new ResizeObserver(e),n=new MutationObserver(e),r=null,i=null,a=null,o=()=>{t.disconnect(),n.disconnect(),r=null,i=null,a=null};return{target:(e,s,c)=>{r===e&&i===s&&a===c||(o(),t.observe(e),t.observe(s),t.observe(c),n.observe(c,{childList:!0,subtree:!0,characterData:!0}),r=e,i=s,a=c)},disconnect:o}},Vc=e=>{let t=null;return{schedule:()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,e()}))},cancel:()=>{t!==null&&(cancelAnimationFrame(t),t=null)}}},Hc=e=>{let t=null,n;function r(){let r=e.getState(),{viewport:o,anchor:s,target:c}=r.element,l=r.targetConfig;if(r.turnAnchor!==`top`||!o||!s||!c||!l){a.disconnect(),t&&(wc(t,0),t.remove());return}if(t??=Cc(),(t.parentElement!==c.parentElement||t.previousElementSibling!==c)&&c.after(t),a.target(o,s,c),wc(t,zc({viewport:o,anchor:s,reserve:t,...l}))){i.schedule();return}let u=Sc(s);if(u!==void 0&&n===u)return;let d=Tc(Lc({viewport:o,anchor:s,...l}));Math.abs(o.scrollTop-d)>1&&o.scrollTo({top:d,behavior:`smooth`}),u!==void 0&&(n=u)}let i=Vc(r),a=Bc(i.schedule);i.schedule();let o=e.subscribe(i.schedule);return()=>{i.cancel(),o(),a.disconnect(),t?.remove()}},Uc=e=>{let t=Qo();(0,j.useLayoutEffect)(()=>{if(e)return Hc(t)},[e,t])},Wc=({isRunning:e,messages:t})=>{if(!e)return null;let n=t.at(-1),r=t.at(-2);return r?.role!==`user`||n?.role!==`assistant`?null:{anchorId:r.id,targetId:n.id}},Gc=e=>Wc(e)?.anchorId,Kc=e=>Wc(e)?.targetId,qc=()=>Pc(Zo(e=>e.registerViewport),(0,j.useCallback)(e=>e.clientHeight,[])),Jc=()=>xc(Zo(e=>e.registerViewportElement)),Yc=e=>{let t=Qo(),n=F(t=>{if(e)return Gc(t.thread)}),r=F(t=>{if(e)return Kc(t.thread)}),i=(0,j.useMemo)(()=>!n||!r?null:{anchorId:n,targetId:r},[n,r]);(0,j.useLayoutEffect)(()=>{if(!i)return;let e=t.getState(),n=e.topAnchorTurn;n?.anchorId===i.anchorId&&n.targetId===i.targetId||e.setTopAnchorTurn(i)},[i,t]);let a=(0,j.useCallback)(()=>{t.getState().setTopAnchorTurn(null)},[t]);Mr(`thread.initialize`,a),Mr(`threadListItem.switchedTo`,a)},Xc=(0,j.forwardRef)(({autoScroll:e,scrollToBottomOnRunStart:t,scrollToBottomOnInitialize:n,scrollToBottomOnThreadSwitch:r,children:i,...a},o)=>{let s=Nc({autoScroll:e,scrollToBottomOnRunStart:t,scrollToBottomOnInitialize:n,scrollToBottomOnThreadSwitch:r}),c=qc(),l=Jc(),u=Qo().getState().turnAnchor===`top`;Yc(u),Uc(u);let d=ss(o,s,c,l);return(0,M.jsx)(Ss.div,{...a,ref:d,children:i})});Xc.displayName=`ThreadPrimitive.ViewportScrollable`;var Zc=(0,j.forwardRef)(({turnAnchor:e,topAnchorMessageClamp:t,...n},r)=>(0,M.jsx)(ts,{options:{turnAnchor:e,topAnchorMessageClamp:t},children:(0,M.jsx)(Xc,{...n,ref:r})}));Zc.displayName=`ThreadPrimitive.Viewport`;function Qc(e){let t=e.role===`tool`?`system`:e.role,n=e.content.map(el),r=t===`system`?[$c(n)]:n;return{id:e.id,role:t,content:r,createdAt:new Date(e.createdAt)}}function $c(e){if(e.length===0)return{type:`text`,text:``};let t=[];for(let n of e)n.type===`text`||n.type===`reasoning`?t.push(n.text):n.type===`tool-call`?t.push(`[tool-call ${n.toolName}] ${n.argsText??``}`):t.push(JSON.stringify(n));return{type:`text`,text:t.join(`
13
-
14
- `)}}function el(e){if(e.type===`text`)return{type:`text`,text:e.text};if(e.type===`thinking`)return{type:`reasoning`,text:e.thinking};if(e.type===`tool_use`){let t=nl(e.input);return{type:`tool-call`,toolCallId:e.id,toolName:e.name,args:t,argsText:tl(e.input)}}return e.type===`tool_result`?{type:`text`,text:e.is_error?`[tool error] ${e.content}`:`[tool result] ${e.content}`}:{type:`text`,text:JSON.stringify(e)}}function tl(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function nl(e){if(typeof e!=`object`||!e||Array.isArray(e))return{};try{let t=JSON.parse(JSON.stringify(e));return typeof t!=`object`||!t||Array.isArray(t)?{}:t}catch{return{}}}var rl=new Set([`pending`,`running`,`paused`]);function il(e){let{agentName:t}=e,n=e.conversationId??null,[r,i]=(0,j.useState)(n),[a,o]=(0,j.useState)([]),[s,c]=(0,j.useState)(null),[l,u]=(0,j.useState)(null),[d,f]=(0,j.useState)(null),[p,m]=(0,j.useState)(n!==null),[h,g]=(0,j.useState)(0),_=(0,j.useRef)(e.onConversationIdChange);_.current=e.onConversationIdChange;let v=(0,j.useCallback)(e=>{i(t=>t===e?t:(_.current?.(e),e))},[]),y=l!==null&&rl.has(l);(0,j.useEffect)(()=>{if(!y){g(0);return}let e=window.setInterval(()=>g(e=>e+1),1800);return()=>window.clearInterval(e)},[y]),(0,j.useEffect)(()=>{let e=!1;if(f(null),!n){v(null),o([]),c(null),u(null),m(!1);return}return m(!0),(async()=>{try{let t=await Ve(n);if(e)return;v(t.conversation.id),o(t.messages),c(null),u(null)}catch(t){if(e||t instanceof Ie&&t.status===401)return;f(t instanceof Error?t:Error(String(t)))}finally{e||m(!1)}})(),()=>{e=!0}},[n,v]),(0,j.useEffect)(()=>{if(r)return it(r,{onMessage:e=>{o(t=>t.some(t=>t.id===e.id)?t:[...t.filter(e=>!e.id.startsWith(`local-`)),e])},onStatus:(e,t)=>{c(t=>t??e),u(e=>e===null||e!==null?t:e)},onRunCreated:e=>{c(e),u(`pending`)},onError:()=>{}})},[r]);let b=(0,j.useCallback)(()=>{v(null),o([]),c(null),u(null),f(null)},[v]),x=(0,j.useCallback)(async e=>{let n=al(e.content);if(n.trim()){if(!t){f(Error(`no agent selected`));return}f(null);try{let e=r;e||(e=(await Be({agentName:t})).conversation.id,v(e));let i=await He(e,{input:n});c(i.runId),u(i.status)}catch(e){f(e instanceof Error?e:Error(String(e)))}}},[t,r,v]),S=(0,j.useCallback)(async()=>{if(s){f(null);try{await We(s)}catch(e){f(e instanceof Error?e:Error(String(e)))}}},[s]);return{runtime:ao({messages:(0,j.useMemo)(()=>sl(a,y,h),[a,y,h]),isRunning:y,convertMessage:Qc,onNew:x,onCancel:S}),conversationId:r,activeRunId:s,status:l,isRunning:y,error:d,hydrating:p,reset:b}}function al(e){let t=[];for(let n of e)n.type===`text`&&typeof n.text==`string`&&t.push(n.text);return t.join(`
15
- `)}var ol=[`checking memory`,`queueing the run`,`warming tools`,`reading context`,`waiting on the model`,`streaming soon`];function sl(e,t,n){if(!t||e.length===0)return e;let r=e[e.length-1];if(!r||r.role===`assistant`)return e;let i=ol[n%ol.length]??`thinking`;return[...e,{id:`local-thinking-${r.id}`,role:`assistant`,content:[{type:`text`,text:i}],createdAt:new Date().toISOString()}]}function cl(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var ll=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ul=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dl={};function fl(e,t){return((t||dl).jsx?ul:ll).test(e)}var pl=/[ \t\n\f\r]/g;function ml(e){return typeof e==`object`?e.type===`text`?hl(e.value):!1:hl(e)}function hl(e){return e.replace(pl,``)===``}var gl=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};gl.prototype.normal={},gl.prototype.property={},gl.prototype.space=void 0;function _l(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new gl(n,r,t)}function vl(e){return e.toLowerCase()}var yl=class{constructor(e,t){this.attribute=t,this.property=e}};yl.prototype.attribute=``,yl.prototype.booleanish=!1,yl.prototype.boolean=!1,yl.prototype.commaOrSpaceSeparated=!1,yl.prototype.commaSeparated=!1,yl.prototype.defined=!1,yl.prototype.mustUseProperty=!1,yl.prototype.number=!1,yl.prototype.overloadedBoolean=!1,yl.prototype.property=``,yl.prototype.spaceSeparated=!1,yl.prototype.space=void 0;var bl=t({boolean:()=>z,booleanish:()=>B,commaOrSpaceSeparated:()=>Tl,commaSeparated:()=>wl,number:()=>V,overloadedBoolean:()=>Sl,spaceSeparated:()=>Cl}),xl=0,z=El(),B=El(),Sl=El(),V=El(),Cl=El(),wl=El(),Tl=El();function El(){return 2**++xl}var Dl=Object.keys(bl),Ol=class extends yl{constructor(e,t,n,r){let i=-1;if(super(e,t),kl(this,`space`,r),typeof n==`number`)for(;++i<Dl.length;){let e=Dl[i];kl(this,Dl[i],(n&bl[e])===bl[e])}}};Ol.prototype.defined=!0;function kl(e,t,n){n&&(e[t]=n)}function Al(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Ol(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[vl(r)]=r,n[vl(a.attribute)]=r}return new gl(t,n,e.space)}var jl=Al({properties:{ariaActiveDescendant:null,ariaAtomic:B,ariaAutoComplete:null,ariaBusy:B,ariaChecked:B,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:Cl,ariaCurrent:null,ariaDescribedBy:Cl,ariaDetails:null,ariaDisabled:B,ariaDropEffect:Cl,ariaErrorMessage:null,ariaExpanded:B,ariaFlowTo:Cl,ariaGrabbed:B,ariaHasPopup:null,ariaHidden:B,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Cl,ariaLevel:V,ariaLive:null,ariaModal:B,ariaMultiLine:B,ariaMultiSelectable:B,ariaOrientation:null,ariaOwns:Cl,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:B,ariaReadOnly:B,ariaRelevant:null,ariaRequired:B,ariaRoleDescription:Cl,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:B,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Ml(e,t){return t in e?e[t]:t}function Nl(e,t){return Ml(e,t.toLowerCase())}var Pl=Al({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:wl,acceptCharset:Cl,accessKey:Cl,action:null,allow:null,allowFullScreen:z,allowPaymentRequest:z,allowUserMedia:z,alt:null,as:null,async:z,autoCapitalize:null,autoComplete:Cl,autoFocus:z,autoPlay:z,blocking:Cl,capture:null,charSet:null,checked:z,cite:null,className:Cl,cols:V,colSpan:null,content:null,contentEditable:B,controls:z,controlsList:Cl,coords:V|wl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:z,defer:z,dir:null,dirName:null,disabled:z,download:Sl,draggable:B,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:z,formTarget:null,headers:Cl,height:V,hidden:Sl,high:V,href:null,hrefLang:null,htmlFor:Cl,httpEquiv:Cl,id:null,imageSizes:null,imageSrcSet:null,inert:z,inputMode:null,integrity:null,is:null,isMap:z,itemId:null,itemProp:Cl,itemRef:Cl,itemScope:z,itemType:Cl,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:z,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:z,muted:z,name:null,nonce:null,noModule:z,noValidate:z,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:z,optimum:V,pattern:null,ping:Cl,placeholder:null,playsInline:z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:z,referrerPolicy:null,rel:Cl,required:z,reversed:z,rows:V,rowSpan:V,sandbox:Cl,scope:null,scoped:z,seamless:z,selected:z,shadowRootClonable:z,shadowRootDelegatesFocus:z,shadowRootMode:null,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:B,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:z,useMap:null,value:B,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Cl,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:z,declare:z,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:z,noHref:z,noShade:z,noWrap:z,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:B,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:z,disableRemotePlayback:z,prefix:null,property:null,results:V,security:null,unselectable:null},space:`html`,transform:Nl}),Fl=Al({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,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`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,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`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,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`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Tl,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:Cl,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:z,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:wl,g2:wl,glyphName:wl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:Tl,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:V,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Cl,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Tl,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Tl,rev:Tl,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Tl,requiredFeatures:Tl,requiredFonts:Tl,requiredFormats:Tl,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:Tl,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Tl,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Tl,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Ml}),Il=Al({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Ll=Al({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Nl}),Rl=Al({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),zl={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Bl=/[A-Z]/g,Vl=/-[a-z]/g,Hl=/^data[-\w.:]+$/i;function H(e,t){let n=vl(t),r=t,i=yl;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Hl.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Vl,U);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Vl.test(e)){let n=e.replace(Bl,Ul);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Ol}return new i(r,t)}function Ul(e){return`-`+e.toLowerCase()}function U(e){return e.charAt(1).toUpperCase()}var W=_l([jl,Pl,Il,Ll,Rl],`html`),G=_l([jl,Fl,Il,Ll,Rl],`svg`);function Wl(e){return e.join(` `).trim()}var Gl=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
16
- `,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function ee(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),ee()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Kl=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(Gl());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),ql=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Jl=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Kl()),r=ql();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Yl=Zl(`end`),Xl=Zl(`start`);function Zl(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Ql(e){let t=Xl(e),n=Yl(e);if(t&&n)return{start:t,end:n}}function $l(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?tu(e.position):`start`in e||`end`in e?tu(e):`line`in e||`column`in e?eu(e):``}function eu(e){return nu(e&&e.line)+`:`+nu(e&&e.column)}function tu(e){return eu(e&&e.start)+`-`+eu(e&&e.end)}function nu(e){return e&&typeof e==`number`?e:1}var ru=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=$l(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};ru.prototype.file=``,ru.prototype.name=``,ru.prototype.reason=``,ru.prototype.message=``,ru.prototype.stack=``,ru.prototype.column=void 0,ru.prototype.line=void 0,ru.prototype.ancestors=void 0,ru.prototype.cause=void 0,ru.prototype.fatal=void 0,ru.prototype.place=void 0,ru.prototype.ruleId=void 0,ru.prototype.source=void 0;var iu=a(Jl(),1),au={}.hasOwnProperty,ou=new Map,su=/[A-Z]/g,cu=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),lu=new Set([`td`,`th`]),uu=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function du(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Su(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=xu(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?G:W,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=fu(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function fu(e,t,n){if(t.type===`element`)return pu(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return mu(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return gu(e,t,n);if(t.type===`mdxjsEsm`)return hu(e,t);if(t.type===`root`)return _u(e,t,n);if(t.type===`text`)return vu(e,t)}function pu(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=G,e.schema=i),e.ancestors.push(t);let a=Ou(e,t.tagName,!1),o=Cu(e,t),s=Tu(e,t);return cu.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!ml(e):!0})),yu(e,o,a,t),bu(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function mu(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}ku(e,t.position)}function hu(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ku(e,t.position)}function gu(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=G,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Ou(e,t.name,!0),o=wu(e,t),s=Tu(e,t);return yu(e,o,a,t),bu(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function _u(e,t,n){let r={};return bu(r,Tu(e,t)),e.create(t,e.Fragment,r,n)}function vu(e,t){return t.value}function yu(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function bu(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function xu(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Su(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Xl(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Cu(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&au.call(t.properties,i)){let a=Eu(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&lu.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function wu(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else ku(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else ku(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Tu(e,t){let n=[],r=-1,i=e.passKeys?new Map:ou;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=fu(e,a,o);s!==void 0&&n.push(s)}return n}function Eu(e,t,n){let r=H(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?cl(n):Wl(n)),r.property===`style`){let t=typeof n==`object`?n:Du(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Au(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?zl[r.property]||r.property:r.attribute,n]}}function Du(e,t){try{return(0,iu.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new ru("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=uu+`#cannot-parse-style-attribute`,r}}function Ou(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=fl(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=fl(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return au.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);ku(e)}function ku(e,t){let n=new ru("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=uu+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Au(e){let t={},n;for(n in e)au.call(e,n)&&(t[ju(n)]=e[n]);return t}function ju(e){let t=e.replace(su,Mu);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Mu(e){return`-`+e.toLowerCase()}var Nu={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},Pu={};function Fu(e,t){let n=t||Pu;return Iu(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function Iu(e,t,n){if(Ru(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Lu(e.children,t,n)}return Array.isArray(e)?Lu(e,t,n):``}function Lu(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Iu(e[i],t,n);return r.join(``)}function Ru(e){return!!(e&&typeof e==`object`)}var zu=document.createElement(`i`);function Bu(e){let t=`&`+e+`;`;zu.innerHTML=t;let n=zu.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function Vu(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Hu(e,t){return e.length>0?(Vu(e,e.length,0,t),e):t}var Uu={}.hasOwnProperty;function Wu(e){let t={},n=-1;for(;++n<e.length;)Gu(t,e[n]);return t}function Gu(e,t){let n;for(n in t){let r=(Uu.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Uu.call(r,a)||(r[a]=[]);let e=i[a];Ku(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Ku(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Vu(e,0,0,r)}function qu(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Ju(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Yu=rd(/[A-Za-z]/),K=rd(/[\dA-Za-z]/),Xu=rd(/[#-'*+\--9=?A-Z^-~]/);function Zu(e){return e!==null&&(e<32||e===127)}var Qu=rd(/\d/),$u=rd(/[\dA-Fa-f]/),ed=rd(/[!-/:-@[-`{-~]/);function q(e){return e!==null&&e<-2}function J(e){return e!==null&&(e<0||e===32)}function Y(e){return e===-2||e===-1||e===32}var td=rd(/\p{P}|\p{S}/u),nd=rd(/\s/);function rd(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function id(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&K(e.charCodeAt(n+1))&&K(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function X(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Y(r)?(e.enter(n),s(r)):t(r)}function s(r){return Y(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var ad={tokenize:od};function od(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),X(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return q(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var sd={tokenize:ld},cd={tokenize:ud};function ld(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Vu(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(cd,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(cd,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return q(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;Vu(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ud(e,t,n){return X(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function dd(e){if(e===null||J(e)||nd(e))return 1;if(td(e))return 2}function fd(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var pd={name:`attention`,resolveAll:md,tokenize:hd};function md(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};gd(d,-c),gd(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Hu(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=Hu(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=Hu(l,fd(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Hu(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Hu(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,Vu(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function hd(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=dd(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=dd(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function gd(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var _d={name:`autolink`,tokenize:vd};function vd(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Yu(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||K(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||K(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Zu(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Xu(t)?(e.consume(t),l):n(t)}function u(e){return K(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||K(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var yd={partial:!0,tokenize:bd};function bd(e,t,n){return r;function r(t){return Y(t)?X(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||q(e)?t(e):n(e)}}var Z={continuation:{tokenize:Sd},exit:Cd,name:`blockQuote`,tokenize:xd};function xd(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Y(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Sd(e,t,n){let r=this;return i;function i(t){return Y(t)?X(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Z,t,n)(r)}}function Cd(e){e.exit(`blockQuote`)}var wd={name:`characterEscape`,tokenize:Td};function Td(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return ed(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Ed={name:`characterReference`,tokenize:Dd};function Dd(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=K,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=$u,u):(e.enter(`characterReferenceValue`),a=7,o=Qu,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===K&&!Bu(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Od={partial:!0,tokenize:jd},kd={concrete:!0,name:`codeFenced`,tokenize:Ad};function Ad(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Y(t)?X(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||q(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Od,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Y(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),X(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||q(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Y(t)?X(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||q(t)?e.check(Od,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||q(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Y(t)?X(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Y(t)?X(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||q(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function jd(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Md={name:`codeIndented`,tokenize:Q},Nd={partial:!0,tokenize:Pd};function Q(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),X(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):q(t)?e.attempt(Nd,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||q(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Pd(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):X(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):q(e)?i(e):n(e)}}var Fd={name:`codeText`,previous:Ld,resolve:Id,tokenize:Rd};function Id(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Ld(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Rd(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||q(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var zd=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Bd(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Bd(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Bd(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);Bd(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Bd(this.left,t.reverse())}}};function Bd(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Vd(e){let t={},n=-1,r,i,a,o,s,c,l,u=new zd(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Hd(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Vu(e,0,1/0,u.slice(0)),!l}function Hd(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Ud={resolve:Gd,tokenize:Kd},Wd={partial:!0,tokenize:qd};function Gd(e){return Vd(e),e}function Kd(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):q(t)?e.check(Wd,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function qd(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),X(e,a,`linePrefix`)}function a(i){if(i===null||q(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Jd(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Zu(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||q(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||J(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Zu(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Yd(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):q(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||q(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Y(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Xd(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),X(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||q(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Zd(e,t){let n;return r;function r(i){return q(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Y(i)?X(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Qd={name:`definition`,tokenize:ef},$d={partial:!0,tokenize:tf};function ef(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Yd.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Ju(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return J(t)?Zd(e,l)(t):l(t)}function l(t){return Jd(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt($d,d,d)(t)}function d(t){return Y(t)?X(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||q(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function tf(e,t,n){return r;function r(t){return J(t)?Zd(e,i)(t):n(t)}function i(t){return Xd(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Y(t)?X(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||q(e)?t(e):n(e)}}var nf={name:`hardBreakEscape`,tokenize:rf};function rf(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return q(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var af={name:`headingAtx`,resolve:of,tokenize:sf};function of(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},Vu(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function sf(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||J(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||q(n)?(e.exit(`atxHeading`),t(n)):Y(n)?X(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||J(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var cf=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),lf=[`pre`,`script`,`style`,`textarea`],uf={concrete:!0,name:`htmlFlow`,resolveTo:pf,tokenize:mf},df={partial:!0,tokenize:gf},ff={partial:!0,tokenize:hf};function pf(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function mf(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:oe):Yu(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Yu(a)?(e.consume(a),i=4,r.interrupt?t:oe):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:oe):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:D:m):n(i)}function h(t){return Yu(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||J(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&lf.includes(l)?(i=1,r.interrupt?t(s):D(s)):cf.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):D(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||K(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:D):n(i)}function v(t){return Y(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Yu(t)?(e.consume(t),b):Y(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||K(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Y(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Y(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||q(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||J(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Y(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),ee):n(t)}function ee(t){return t===null||q(t)?D(t):Y(t)?(e.consume(t),ee):n(t)}function D(t){return t===45&&i===2?(e.consume(t),ie):t===60&&i===1?(e.consume(t),O):t===62&&i===4?(e.consume(t),se):t===63&&i===3?(e.consume(t),oe):t===93&&i===5?(e.consume(t),ae):q(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(df,ce,te)(t)):t===null||q(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),D)}function te(t){return e.check(ff,ne,ce)(t)}function ne(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||q(t)?te(t):(e.enter(`htmlFlowData`),D(t))}function ie(t){return t===45?(e.consume(t),oe):D(t)}function O(t){return t===47?(e.consume(t),o=``,k):D(t)}function k(t){if(t===62){let n=o.toLowerCase();return lf.includes(n)?(e.consume(t),se):D(t)}return Yu(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),k):D(t)}function ae(t){return t===93?(e.consume(t),oe):D(t)}function oe(t){return t===62?(e.consume(t),se):t===45&&i===2?(e.consume(t),oe):D(t)}function se(t){return t===null||q(t)?(e.exit(`htmlFlowData`),ce(t)):(e.consume(t),se)}function ce(n){return e.exit(`htmlFlow`),t(n)}}function hf(e,t,n){let r=this;return i;function i(t){return q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function gf(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(yd,t,n)}}var _f={name:`htmlText`,tokenize:vf};function vf(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Yu(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Yu(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):q(t)?(o=d,O(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ie(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):q(t)?(o=h,O(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ie(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ie(t):q(t)?(o=v,O(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):q(t)?(o=y,O(t)):(e.consume(t),y)}function b(e){return e===62?ie(e):y(e)}function x(t){return Yu(t)?(e.consume(t),S):n(t)}function S(t){return t===45||K(t)?(e.consume(t),S):C(t)}function C(t){return q(t)?(o=C,O(t)):Y(t)?(e.consume(t),C):ie(t)}function w(t){return t===45||K(t)?(e.consume(t),w):t===47||t===62||J(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ie):t===58||t===95||Yu(t)?(e.consume(t),E):q(t)?(o=T,O(t)):Y(t)?(e.consume(t),T):ie(t)}function E(t){return t===45||t===46||t===58||t===95||K(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),D):q(t)?(o=ee,O(t)):Y(t)?(e.consume(t),ee):T(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,te):q(t)?(o=D,O(t)):Y(t)?(e.consume(t),D):(e.consume(t),ne)}function te(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):q(t)?(o=te,O(t)):(e.consume(t),te)}function ne(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||J(t)?T(t):(e.consume(t),ne)}function re(e){return e===47||e===62||J(e)?T(e):n(e)}function ie(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function O(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),k}function k(t){return Y(t)?X(e,ae,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ae(t)}function ae(t){return e.enter(`htmlTextData`),o(t)}}var yf={name:`labelEnd`,resolveAll:Cf,resolveTo:wf,tokenize:Tf},bf={tokenize:Ef},xf={tokenize:Df},Sf={tokenize:Of};function Cf(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Vu(e,0,e.length,n),e}function wf(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=Hu(s,e.slice(a+1,a+r+3)),s=Hu(s,[[`enter`,u,t]]),s=Hu(s,fd(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Hu(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=Hu(s,e.slice(o+1)),s=Hu(s,[[`exit`,c,t]]),Vu(e,a,e.length,s),e}function Tf(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Ju(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(bf,u,o?u:d)(t):t===91?e.attempt(xf,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Sf,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Ef(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return J(t)?Zd(e,a)(t):a(t)}function a(t){return t===41?u(t):Jd(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return J(t)?Zd(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Xd(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return J(t)?Zd(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Df(e,t,n){let r=this;return i;function i(t){return Yd.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Ju(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Of(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var kf={name:`labelStartImage`,resolveAll:yf.resolveAll,tokenize:Af};function Af(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var jf={name:`labelStartLink`,resolveAll:yf.resolveAll,tokenize:Mf};function Mf(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Nf={name:`lineEnding`,tokenize:Pf};function Pf(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),X(e,t,`linePrefix`)}}var Ff={name:`thematicBreak`,tokenize:If};function If(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||q(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Y(t)?X(e,s,`whitespace`)(t):s(t))}}var Lf={continuation:{tokenize:Vf},exit:Uf,name:`list`,tokenize:Bf},Rf={partial:!0,tokenize:Wf},zf={partial:!0,tokenize:Hf};function Bf(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Qu(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Ff,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Qu(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(yd,r.interrupt?n:u,e.attempt(Rf,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Y(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Vf(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(yd,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,X(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Y(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(zf,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,X(e,e.attempt(Lf,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Hf(e,t,n){let r=this;return X(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Uf(e){e.exit(this.containerState.type)}function Wf(e,t,n){let r=this;return X(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Y(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Gf={name:`setextUnderline`,resolveTo:Kf,tokenize:qf};function Kf(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function qf(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Y(t)?X(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||q(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Jf={tokenize:Yf};function Yf(e){let t=this,n=e.attempt(yd,r,e.attempt(this.parser.constructs.flowInitial,i,X(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ud,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Xf={resolveAll:ep()},Zf=$f(`string`),Qf=$f(`text`);function $f(e){return{resolveAll:ep(e===`text`?tp:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function ep(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function tp(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var np=t({attentionMarkers:()=>up,contentInitial:()=>ip,disable:()=>dp,document:()=>rp,flow:()=>op,flowInitial:()=>ap,insideSpan:()=>lp,string:()=>sp,text:()=>cp}),rp={42:Lf,43:Lf,45:Lf,48:Lf,49:Lf,50:Lf,51:Lf,52:Lf,53:Lf,54:Lf,55:Lf,56:Lf,57:Lf,62:Z},ip={91:Qd},ap={[-2]:Md,[-1]:Md,32:Md},op={35:af,42:Ff,45:[Gf,Ff],60:uf,61:Gf,95:Ff,96:kd,126:kd},sp={38:Ed,92:wd},cp={[-5]:Nf,[-4]:Nf,[-3]:Nf,33:kf,38:Ed,42:pd,60:[_d,_f],91:jf,92:[nf,wd],93:yf,95:pd,96:Fd},lp={null:[pd,Xf]},up={null:[42,95]},dp={null:[]};function fp(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Hu(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=fd(a,l.events,l),l.events):[]}function f(e,t){return mp(p(e),t)}function p(e){return pp(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){q(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Vu(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function pp(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function mp(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
17
- `;break;case-3:o=`\r
18
- `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function hp(e){let t={constructs:Wu([np,...(e||{}).extensions||[]]),content:n(ad),defined:[],document:n(sd),flow:n(Jf),lazy:{},string:n(Zf),text:n(Qf)};return t;function n(e){return n;function n(n){return fp(t,e,n)}}}function gp(e){for(;!Vd(e););return e}var _p=/[\0\t\n\r]/g;function vp(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(_p.lastIndex=u,c=_p.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var yp=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function bp(e){return e.replace(yp,xp)}function xp(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return qu(n.slice(t?2:1),t?16:10)}return Bu(n)||e}var Sp={}.hasOwnProperty;function Cp(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),wp(n)(gp(hp(n).document().write(vp()(e,t,!0))))}function wp(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(we),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(be),blockQuote:a(he),characterEscape:T,characterReference:T,codeFenced:a(ge),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ge,o),codeText:a(_e,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ve),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ye),hardBreakEscape:a(xe),hardBreakTrailing:a(xe),htmlFlow:a(Se,o),htmlFlowData:T,htmlText:a(Se,o),htmlTextData:T,image:a(Ce),label:o,link:a(we),listItem:a(Ee),listItemValue:f,listOrdered:a(Te,d),listUnordered:a(Te),paragraph:a(De),reference:le,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(be),strong:a(Oe),thematicBreak:a(Ae)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:me,autolinkProtocol:pe,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ue,characterReferenceMarkerNumeric:ue,characterReferenceValue:de,characterReference:fe,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(re),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(te),htmlFlowData:E,htmlText:c(ne),htmlTextData:E,image:c(O),label:ae,labelText:k,lineEnding:ee,link:c(ie),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:A,resourceDestinationString:oe,resourceTitleString:se,resource:ce,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Ep(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Sp.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Op).call(a,void 0,e[0])}for(r.position={start:Tp(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Tp(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Tp(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Op).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+$l({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Tp(e.end)}function u(){return Fu(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ju(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=ke(),n.position={start:Tp(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Tp(e.end)}function ee(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Tp(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function D(){this.data.atHardBreak=!0}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ie(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function k(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=bp(t),n.identifier=Ju(t).toLowerCase()}function ae(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function oe(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function se(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ce(){this.data.inReference=void 0}function le(){this.data.referenceType=`collapsed`}function A(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ju(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ue(e){this.data.characterReferenceType=e.type}function de(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=qu(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Bu(t);let i=this.stack[this.stack.length-1];i.value+=r}function fe(e){let t=this.stack.pop();t.position.end=Tp(e.end)}function pe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function me(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function he(){return{type:`blockquote`,children:[]}}function ge(){return{type:`code`,lang:null,meta:null,value:``}}function _e(){return{type:`inlineCode`,value:``}}function ve(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function ye(){return{type:`emphasis`,children:[]}}function be(){return{type:`heading`,depth:0,children:[]}}function xe(){return{type:`break`}}function Se(){return{type:`html`,value:``}}function Ce(){return{type:`image`,title:null,url:``,alt:null}}function we(){return{type:`link`,title:null,url:``,children:[]}}function Te(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Ee(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function De(){return{type:`paragraph`,children:[]}}function Oe(){return{type:`strong`,children:[]}}function ke(){return{type:`text`,value:``}}function Ae(){return{type:`thematicBreak`}}}function Tp(e){return{line:e.line,column:e.column,offset:e.offset}}function Ep(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Ep(e,r):Dp(e,r)}}function Dp(e,t){let n;for(n in t)if(Sp.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Op(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+$l({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+$l({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+$l({start:t.start,end:t.end})+`) is still open`)}function kp(e){let t=this;t.parser=n;function n(n){return Cp(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Ap(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function jp(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
19
- `}]}function Mp(e,t){let n=t.value?t.value+`
20
- `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Np(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pp(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Fp(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=id(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Ip(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lp(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Rp(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function zp(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Rp(e,t);let i={src:id(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Bp(e,t){let n={src:id(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Vp(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Hp(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Rp(e,t);let i={href:id(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Up(e,t){let n={href:id(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Wp(e,t,n){let r=e.all(t),i=n?Gp(n):Kp(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
21
- `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
22
- `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Gp(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Kp(n[r])}return t}function Kp(e){return e.spread??e.children.length>1}function qp(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Jp(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Yp(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Xp(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Zp(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Xl(t.children[1]),o=Yl(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Qp(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function $p(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var em=9,tm=32;function nm(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(rm(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(rm(t.slice(i),i>0,!1)),a.join(``)}function rm(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===em||t===tm;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===em||t===tm;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function im(e,t){let n={type:`text`,value:nm(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function am(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var om={blockquote:Ap,break:jp,code:Mp,delete:Np,emphasis:Pp,footnoteReference:Fp,heading:Ip,html:Lp,imageReference:zp,image:Bp,inlineCode:Vp,linkReference:Hp,link:Up,listItem:Wp,list:qp,paragraph:Jp,root:Yp,strong:Xp,table:Zp,tableCell:$p,tableRow:Qp,text:im,thematicBreak:am,toml:sm,yaml:sm,definition:sm,footnoteDefinition:sm};function sm(){}var cm=typeof self==`object`?self:globalThis,lm=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new cm[e](t)},um=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(lm(e,t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(lm(a,o),i)};return r},dm=e=>um(new Map,e)(0),fm=``,{toString:pm}={},{keys:mm}=Object,hm=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=pm.call(e).slice(8,-1);switch(n){case`Array`:return[1,fm];case`Object`:return[2,fm];case`Date`:return[3,fm];case`RegExp`:return[4,fm];case`Map`:return[5,fm];case`Set`:return[6,fm];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},gm=([e,t])=>e===0&&(t===`function`||t===`symbol`),_m=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=hm(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of mm(r))(e||!gm(hm(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(gm(hm(n))||gm(hm(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!gm(hm(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},vm=(e,{json:t,lossy:n}={})=>{let r=[];return _m(!(t||n),!!t,new Map,r)(e),r},ym=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?dm(vm(e,t)):structuredClone(e):(e,t)=>dm(vm(e,t));function bm(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function xm(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Sm(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||bm,r=e.options.footnoteBackLabel||xm,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=id(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...ym(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
23
- `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
24
- `}]}}var Cm=(function(e){if(e==null)return Om;if(typeof e==`function`)return Dm(e);if(typeof e==`object`)return Array.isArray(e)?wm(e):Tm(e);if(typeof e==`string`)return Em(e);throw Error(`Expected function, string, or object as test`)});function wm(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Cm(e[n]);return Dm(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Tm(e){let t=e;return Dm(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Em(e){return Dm(t);function t(t){return t&&t.type===e}}function Dm(e){return t;function t(t,n,r){return!!(km(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Om(){return!0}function km(e){return typeof e==`object`&&!!e&&`type`in e}function Am(e){return e}var jm=[];function Mm(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Cm(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+Am(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=jm,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Nm(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Nm(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?jm:[e]}function Pm(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Mm(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Fm={}.hasOwnProperty,Im={};function Lm(e,t){let n=t||Im,r=new Map,i=new Map,a={all:s,applyData:zm,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...om,...n.handlers},one:o,options:n,patch:Rm,wrap:Vm};return Pm(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Fm.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=ym(n);return r.children=a.all(e),r}return ym(e)}return(a.options.unknownHandler||Bm)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=Hm(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Hm(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Rm(e,t){e.position&&(t.position=Ql(e))}function zm(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,ym(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Bm(e,t){let n=t.data||{},r=`value`in t&&!(Fm.call(n,`hProperties`)||Fm.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Vm(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
25
- `});++r<e.length;)r&&n.push({type:`text`,value:`
26
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
27
- `}),n}function Hm(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Um(e,t){let n=Lm(e,t),r=n.one(e,void 0),i=Sm(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
28
- `},i)),a}function Wm(e,t){return e&&`run`in e?async function(n,r){let i=Um(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Um(n,{file:r,...e||t})}}function Gm(e){if(e)throw e}var Km=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function qm(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Jm(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Ym(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Ym(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Xm={basename:Zm,dirname:Qm,extname:$m,join:eh,sep:`/`};function Zm(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);rh(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Qm(e){if(rh(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function $m(e){rh(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function eh(...e){let t=-1,n;for(;++t<e.length;)rh(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:th(n)}function th(e){rh(e);let t=e.codePointAt(0)===47,n=nh(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function nh(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function rh(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var ih={cwd:ah};function ah(){return`/`}function oh(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function sh(e){if(typeof e==`string`)e=new URL(e);else if(!oh(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return ch(e)}function ch(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var lh=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],uh=class{constructor(e){let t;t=e?oh(e)?{path:e}:typeof e==`string`||mh(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:ih.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<lh.length;){let e=lh[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)lh.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Xm.basename(this.path):void 0}set basename(e){fh(e,`basename`),dh(e,`basename`),this.path=Xm.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Xm.dirname(this.path):void 0}set dirname(e){ph(this.basename,`dirname`),this.path=Xm.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Xm.extname(this.path):void 0}set extname(e){if(dh(e,`extname`),ph(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Xm.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){oh(e)&&(e=sh(e)),fh(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Xm.basename(this.path,this.extname):void 0}set stem(e){fh(e,`stem`),dh(e,`stem`),this.path=Xm.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new ru(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function dh(e,t){if(e&&e.includes(Xm.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Xm.sep+"`")}function fh(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function ph(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function mh(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var hh=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),gh=a(Km(),1),_h={}.hasOwnProperty,vh=new class e extends hh{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Jm()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,gh.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(xh(`data`,this.frozen),this.namespace[e]=t,this):_h.call(this.namespace,e)&&this.namespace[e]||void 0:e?(xh(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=wh(e),n=this.parser||this.Parser;return yh(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),yh(`process`,this.parser||this.Parser),bh(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=wh(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Eh(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),yh(`processSync`,this.parser||this.Parser),bh(`processSync`,this.compiler||this.Compiler),this.process(e,r),Ch(`processSync`,`process`,t),n;function r(e,r){t=!0,Gm(e),n=r}}run(e,t,n){Sh(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=wh(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Ch(`runSync`,`run`,n),r;function i(e,t){Gm(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=wh(t),r=this.compiler||this.Compiler;return bh(`stringify`,r),Sh(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(xh(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,gh.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];qm(o)&&qm(r)&&(r=(0,gh.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function yh(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function bh(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function xh(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Sh(e){if(!qm(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Ch(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function wh(e){return Th(e)?e:new uh(e)}function Th(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Eh(e){return typeof e==`string`||Dh(e)}function Dh(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Oh=[],kh={allowDangerousHtml:!0},Ah=/^(https?|ircs?|mailto|xmpp)$/i,jh=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Mh(e){let t=Nh(e),n=Ph(e);return Fh(t.runSync(t.parse(n),n),e)}function Nh(e){let t=e.rehypePlugins||Oh,n=e.remarkPlugins||Oh,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...kh}:kh;return vh().use(kp).use(n).use(Wm,r).use(t)}function Ph(e){let t=e.children||``,n=new uh;return typeof t==`string`?n.value=t:``+t,n}function Fh(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Ih;for(let e of jh)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Pm(e,l),du(e,{Fragment:M.Fragment,components:i,ignoreInvalidStyle:!0,jsx:M.jsx,jsxs:M.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Nu)if(Object.hasOwn(Nu,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Nu[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Ih(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Ah.test(e.slice(0,t))?e:``}function Lh(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Rh(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function zh(e,t,n){let r=Cm((n||{}).ignore||[]),i=Bh(t),a=-1;for(;++a<i.length;)Mm(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function Bh(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Vh(e[0]),Hh(e[1])])}return t}function Vh(e){return typeof e==`string`?new RegExp(Rh(e),`g`):e}function Hh(e){return typeof e==`function`?e:function(){return e}}var Uh=`phrasing`,Wh=[`autolink`,`link`,`image`,`label`];function Gh(){return{transforms:[$h],enter:{literalAutolink:qh,literalAutolinkEmail:Jh,literalAutolinkHttp:Jh,literalAutolinkWww:Jh},exit:{literalAutolink:Qh,literalAutolinkEmail:Zh,literalAutolinkHttp:Yh,literalAutolinkWww:Xh}}}function Kh(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Uh,notInConstruct:Wh},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Uh,notInConstruct:Wh},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Uh,notInConstruct:Wh}]}}function qh(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Jh(e){this.config.enter.autolinkProtocol.call(this,e)}function Yh(e){this.config.exit.autolinkProtocol.call(this,e)}function Xh(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Zh(e){this.config.exit.autolinkEmail.call(this,e)}function Qh(e){this.exit(e)}function $h(e){zh(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,eg],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,tg]],{ignore:[`link`,`linkReference`]})}function eg(e,t,n,r,i){let a=``;if(!ig(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!ng(n)))return!1;let o=rg(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function tg(e,t,n,r){return!ig(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function ng(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function rg(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Lh(e,`(`),a=Lh(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function ig(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||nd(n)||td(n))&&(!t||n!==47)}mg.peek=pg;function ag(){this.buffer()}function og(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function sg(){this.buffer()}function cg(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function lg(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ju(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ug(e){this.exit(e)}function dg(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ju(this.sliceSerialize(e)).toLowerCase(),n.label=t}function fg(e){this.exit(e)}function pg(){return`[`}function mg(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function hg(){return{enter:{gfmFootnoteCallString:ag,gfmFootnoteCall:og,gfmFootnoteDefinitionLabelString:sg,gfmFootnoteDefinition:cg},exit:{gfmFootnoteCallString:lg,gfmFootnoteCall:ug,gfmFootnoteDefinitionLabelString:dg,gfmFootnoteDefinition:fg}}}function gg(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:mg},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
29
- `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?vg:_g))),s(),o}}function _g(e,t,n){return t===0?e:vg(e,t,n)}function vg(e,t,n){return(n?``:` `)+e}var yg=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];wg.peek=Tg;function bg(){return{canContainEols:[`delete`],enter:{strikethrough:Sg},exit:{strikethrough:Cg}}}function xg(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:yg}],handlers:{delete:wg}}}function Sg(e){this.enter({type:`delete`,children:[]},e)}function Cg(e){this.exit(e)}function wg(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Tg(){return`~`}function Eg(e){return e.length}function Dg(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Eg,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Og(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=kg(r[d]);else{let e=kg(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
30
- `)}function Og(e){return e==null?``:String(e)}function kg(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var Ag={}.hasOwnProperty;function jg(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Ag.call(t,e)){let n=String(t[e]);i=Ag.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function Mg(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Ng);return i(),o}function Ng(e,t,n){return`>`+(n?``:` `)+e}function Pg(e,t){return Fg(e,t.inConstruct,!0)&&!Fg(e,t.notInConstruct,!1)}function Fg(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Ig(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
31
- `&&Pg(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
32
- `}function Lg(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Rg(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function zg(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Bg(e,t,n,r){let i=zg(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(Rg(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Vg);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(Lg(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
33
- `,encode:["`"],...s.current()})),t()}return u+=s.move(`
34
- `),a&&(u+=s.move(a+`
35
- `)),u+=s.move(c),l(),u}function Vg(e,t,n){return(n?``:` `)+e}function Hg(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Ug(e,t,n,r){let i=Hg(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
36
- `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Wg(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Gg(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Kg(e,t,n){let r=dd(e),i=dd(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}qg.peek=Jg;function qg(e,t,n,r){let i=Wg(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Kg(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Gg(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Kg(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Gg(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Jg(e,t,n){return n.options.emphasis||`*`}function Yg(e,t){let n=!1;return Pm(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Fu(e)&&(t.options.setext||n))}function Xg(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Yg(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
37
- `,after:`
38
- `});return r(),t(),o+`
39
- `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
40
- `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
41
- `,...a.current()});return/^[\t ]/.test(l)&&(l=Gg(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Zg.peek=Qg;function Zg(e){return e.value||``}function Qg(){return`<`}$g.peek=e_;function $g(e,t,n,r){let i=Hg(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function e_(){return`!`}t_.peek=n_;function t_(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function n_(){return`!`}r_.peek=i_;function r_(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function i_(){return"`"}function a_(e,t){let n=Fu(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}o_.peek=s_;function o_(e,t,n,r){let i=Hg(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(a_(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function s_(e,t,n){return a_(e,n)?`<`:`[`}c_.peek=l_;function c_(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function l_(){return`[`}function u_(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function d_(e){let t=u_(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function f_(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function p_(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function m_(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?f_(n):u_(n),s=e.ordered?o===`.`?`)`:`.`:d_(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),p_(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function h_(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function g_(e,t,n,r){let i=h_(n),a=n.bulletCurrent||u_(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function __(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var v_=Cm([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function y_(e,t,n,r){return(e.children.some(function(e){return v_(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function b_(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}x_.peek=S_;function x_(e,t,n,r){let i=b_(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Kg(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Gg(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Kg(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Gg(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function S_(e,t,n){return n.options.strong||`*`}function C_(e,t,n,r){return n.safe(e.value,r)}function w_(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function T_(e,t,n){let r=(p_(n)+(n.options.ruleSpaces?` `:``)).repeat(w_(n));return n.options.ruleSpaces?r.slice(0,-1):r}var E_={blockquote:Mg,break:Ig,code:Bg,definition:Ug,emphasis:qg,hardBreak:Ig,heading:Xg,html:Zg,image:$g,imageReference:t_,inlineCode:r_,link:o_,linkReference:c_,list:m_,listItem:g_,paragraph:__,root:y_,strong:x_,text:C_,thematicBreak:T_};function D_(){return{enter:{table:O_,tableData:M_,tableHeader:M_,tableRow:A_},exit:{codeText:N_,table:k_,tableData:j_,tableHeader:j_,tableRow:j_}}}function O_(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function k_(e){this.exit(e),this.data.inTable=void 0}function A_(e){this.enter({type:`tableRow`,children:[]},e)}function j_(e){this.exit(e)}function M_(e){this.enter({type:`tableCell`,children:[]},e)}function N_(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,P_));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function P_(e,t){return t===`|`?t:e}function F_(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
42
- `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
43
- `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Dg(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=E_.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function I_(){return{exit:{taskListCheckValueChecked:R_,taskListCheckValueUnchecked:R_,paragraph:z_}}}function L_(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:B_}}}function R_(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function z_(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function B_(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=E_.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function V_(){return[Gh(),hg(),bg(),D_(),I_()]}function H_(e){return{extensions:[Kh(),gg(e),xg(),F_(e),L_()]}}var U_={tokenize:rv,partial:!0},W_={tokenize:iv,partial:!0},G_={tokenize:av,partial:!0},K_={tokenize:ov,partial:!0},q_={tokenize:sv,partial:!0},J_={name:`wwwAutolink`,tokenize:tv,previous:cv},Y_={name:`protocolAutolink`,tokenize:nv,previous:lv},X_={name:`emailAutolink`,tokenize:ev,previous:uv},Z_={};function Q_(){return{text:Z_}}for(var $_=48;$_<123;)Z_[$_]=X_,$_++,$_===58?$_=65:$_===91&&($_=97);Z_[43]=X_,Z_[45]=X_,Z_[46]=X_,Z_[95]=X_,Z_[72]=[X_,Y_],Z_[104]=[X_,Y_],Z_[87]=[X_,J_],Z_[119]=[X_,J_];function ev(e,t,n){let r=this,i,a;return o;function o(t){return!dv(t)||!uv.call(r,r.previous)||fv(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return dv(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(q_,u,l)(t):t===45||t===95||K(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Yu(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function tv(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!cv.call(r,r.previous)||fv(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(U_,e.attempt(W_,e.attempt(G_,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function nv(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&lv.call(r,r.previous)&&!fv(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Yu(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Zu(t)||J(t)||nd(t)||td(t)?n(t):e.attempt(W_,e.attempt(G_,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function rv(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function iv(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(K_,c,s)(t):t===null||J(t)||nd(t)||t!==45&&td(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function av(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(K_,t,a)(o):o===null||J(o)||nd(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function ov(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||J(o)||nd(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||J(e)||nd(e)?t(e):r(e)}function a(e){return Yu(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Yu(t)?(e.consume(t),o):n(t)}}function sv(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return K(e)?n(e):t(e)}}function cv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||J(e)}function lv(e){return!Yu(e)}function uv(e){return!(e===47||dv(e))}function dv(e){return e===43||e===45||e===46||e===95||K(e)}function fv(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var pv={tokenize:xv,partial:!0};function mv(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:vv,continuation:{tokenize:yv},exit:bv}},text:{91:{name:`gfmFootnoteCall`,tokenize:_v},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:hv,resolveTo:gv}}}}function hv(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Ju(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function gv(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function _v(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||J(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Ju(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return J(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function vv(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||J(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Ju(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return J(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),X(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function yv(e,t,n){return e.check(yd,t,e.attempt(pv,t,n))}function bv(e){e.exit(`gfmFootnoteDefinition`)}function xv(e,t,n){let r=this;return X(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Sv(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Vu(o,o.length,0,fd(s,e.slice(r+1,n),t)),Vu(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Vu(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=dd(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=dd(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Cv=class{constructor(){this.map=[]}add(e,t,n){wv(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function wv(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Tv(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Ev(){return{flow:{null:{name:`table`,tokenize:Dv,resolveAll:Ov}}}}function Dv(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):q(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Y(t)?X(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||J(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Y(t)?X(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Y(t)?X(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||q(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Y(t)?X(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||q(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||q(n)?(e.exit(`tableRow`),t(n)):Y(n)?X(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||J(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Ov(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Cv;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Av(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=kv(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=kv(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=kv(f,t,o,i,n,d)):(o[0]=o[1],d=kv(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Av(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Tv(t.events,n))}return e}function kv(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},jv(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=jv(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=jv(t.events,n[2]),a=jv(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},jv(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Av(e,t,n,r,i){let a=[],o=jv(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function jv(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Mv={name:`tasklistCheck`,tokenize:Pv};function Nv(){return{text:{91:Mv}}}function Pv(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return J(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return q(r)?t(r):Y(r)?e.check({tokenize:Fv},t,n)(r):n(r)}}function Fv(e,t,n){return X(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Iv(e){return Wu([Q_(),mv(),Sv(e),Ev(),Nv()])}var Lv={};function Rv(e){let t=this,n=e||Lv,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Iv(n)),a.push(V_()),o.push(H_(n))}var zv=r(e=>{let{securityLevel:t}=ae(),n=i(`body`);return t===`sandbox`&&(n=i((i(`#i${e}`).node()?.contentDocument??document).body)),n.select(`#${e}`)},`selectSvgElement`);function Bv(e){return e==null}r(Bv,`isNothing`);function Vv(e){return typeof e==`object`&&!!e}r(Vv,`isObject`);function Hv(e){return Array.isArray(e)?e:Bv(e)?[]:[e]}r(Hv,`toArray`);function Uv(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;n<r;n+=1)i=a[n],e[i]=t[i];return e}r(Uv,`extend`);function Wv(e,t){var n=``,r;for(r=0;r<t;r+=1)n+=e;return n}r(Wv,`repeat`);function Gv(e){return e===0&&1/e==-1/0}r(Gv,`isNegativeZero`);var Kv={isNothing:Bv,isObject:Vv,toArray:Hv,repeat:Wv,isNegativeZero:Gv,extend:Uv};function qv(e,t){var n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
44
-
45
- `+e.mark.snippet),r+` `+n):r}r(qv,`formatError`);function Jv(e,t){Error.call(this),this.name=`YAMLException`,this.reason=e,this.mark=t,this.message=qv(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}r(Jv,`YAMLException$1`),Jv.prototype=Object.create(Error.prototype),Jv.prototype.constructor=Jv,Jv.prototype.toString=r(function(e){return this.name+`: `+qv(this,e)},`toString`);var Yv=Jv;function Xv(e,t,n,r,i){var a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}r(Xv,`getLine`);function Zv(e,t){return Kv.repeat(` `,t-e.length)+e}r(Zv,`padStart`);function Qv(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||=79,typeof t.indent!=`number`&&(t.indent=1),typeof t.linesBefore!=`number`&&(t.linesBefore=3),typeof t.linesAfter!=`number`&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],a,o=-1;a=n.exec(e.buffer);)i.push(a.index),r.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var s=``,c,l,u=Math.min(e.line+t.linesAfter,i.length).toString().length,d=t.maxLength-(t.indent+u+3);for(c=1;c<=t.linesBefore&&!(o-c<0);c++)l=Xv(e.buffer,r[o-c],i[o-c],e.position-(r[o]-r[o-c]),d),s=Kv.repeat(` `,t.indent)+Zv((e.line-c+1).toString(),u)+` | `+l.str+`
46
- `+s;for(l=Xv(e.buffer,r[o],i[o],e.position,d),s+=Kv.repeat(` `,t.indent)+Zv((e.line+1).toString(),u)+` | `+l.str+`
47
- `,s+=Kv.repeat(`-`,t.indent+u+3+l.pos)+`^
48
- `,c=1;c<=t.linesAfter&&!(o+c>=i.length);c++)l=Xv(e.buffer,r[o+c],i[o+c],e.position-(r[o]-r[o+c]),d),s+=Kv.repeat(` `,t.indent)+Zv((e.line+c+1).toString(),u)+` | `+l.str+`
49
- `;return s.replace(/\n$/,``)}r(Qv,`makeSnippet`);var $v=Qv,ey=[`kind`,`multi`,`resolve`,`construct`,`instanceOf`,`predicate`,`represent`,`representName`,`defaultStyle`,`styleAliases`],ty=[`scalar`,`sequence`,`mapping`];function ny(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}r(ny,`compileStyleAliases`);function ry(e,t){if(t||={},Object.keys(t).forEach(function(t){if(ey.indexOf(t)===-1)throw new Yv(`Unknown option "`+t+`" is met in definition of "`+e+`" YAML type.`)}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=ny(t.styleAliases||null),ty.indexOf(this.kind)===-1)throw new Yv(`Unknown kind "`+this.kind+`" is specified for "`+e+`" YAML type.`)}r(ry,`Type$1`);var iy=ry;function ay(e,t){var n=[];return e[t].forEach(function(e){var t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}r(ay,`compileList`);function oy(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function i(t){t.multi?(e.multi[t.kind].push(t),e.multi.fallback.push(t)):e[t.kind][t.tag]=e.fallback[t.tag]=t}for(r(i,`collectType`),t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(i);return e}r(oy,`compileMap`);function sy(e){return this.extend(e)}r(sy,`Schema$1`),sy.prototype.extend=r(function(e){var t=[],n=[];if(e instanceof iy)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&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new Yv(`Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })`);t.forEach(function(e){if(!(e instanceof iy))throw new Yv(`Specified list of YAML types (or a single Type object) contains a non-Type object.`);if(e.loadKind&&e.loadKind!==`scalar`)throw new Yv(`There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.`);if(e.multi)throw new Yv(`There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.`)}),n.forEach(function(e){if(!(e instanceof iy))throw new Yv(`Specified list of YAML types (or a single Type object) contains a non-Type object.`)});var r=Object.create(sy.prototype);return r.implicit=(this.implicit||[]).concat(t),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=ay(r,`implicit`),r.compiledExplicit=ay(r,`explicit`),r.compiledTypeMap=oy(r.compiledImplicit,r.compiledExplicit),r},`extend`);var cy=new sy({explicit:[new iy(`tag:yaml.org,2002:str`,{kind:`scalar`,construct:r(function(e){return e===null?``:e},`construct`)}),new iy(`tag:yaml.org,2002:seq`,{kind:`sequence`,construct:r(function(e){return e===null?[]:e},`construct`)}),new iy(`tag:yaml.org,2002:map`,{kind:`mapping`,construct:r(function(e){return e===null?{}:e},`construct`)})]});function ly(e){if(e===null)return!0;var t=e.length;return t===1&&e===`~`||t===4&&(e===`null`||e===`Null`||e===`NULL`)}r(ly,`resolveYamlNull`);function uy(){return null}r(uy,`constructYamlNull`);function dy(e){return e===null}r(dy,`isNull`);var fy=new iy(`tag:yaml.org,2002:null`,{kind:`scalar`,resolve:ly,construct:uy,predicate:dy,represent:{canonical:r(function(){return`~`},`canonical`),lowercase:r(function(){return`null`},`lowercase`),uppercase:r(function(){return`NULL`},`uppercase`),camelcase:r(function(){return`Null`},`camelcase`),empty:r(function(){return``},`empty`)},defaultStyle:`lowercase`});function py(e){if(e===null)return!1;var t=e.length;return t===4&&(e===`true`||e===`True`||e===`TRUE`)||t===5&&(e===`false`||e===`False`||e===`FALSE`)}r(py,`resolveYamlBoolean`);function my(e){return e===`true`||e===`True`||e===`TRUE`}r(my,`constructYamlBoolean`);function hy(e){return Object.prototype.toString.call(e)===`[object Boolean]`}r(hy,`isBoolean`);var gy=new iy(`tag:yaml.org,2002:bool`,{kind:`scalar`,resolve:py,construct:my,predicate:hy,represent:{lowercase:r(function(e){return e?`true`:`false`},`lowercase`),uppercase:r(function(e){return e?`TRUE`:`FALSE`},`uppercase`),camelcase:r(function(e){return e?`True`:`False`},`camelcase`)},defaultStyle:`lowercase`});function _y(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}r(_y,`isHexCode`);function vy(e){return 48<=e&&e<=55}r(vy,`isOctCode`);function yy(e){return 48<=e&&e<=57}r(yy,`isDecCode`);function by(e){if(e===null)return!1;var t=e.length,n=0,r=!1,i;if(!t)return!1;if(i=e[n],(i===`-`||i===`+`)&&(i=e[++n]),i===`0`){if(n+1===t)return!0;if(i=e[++n],i===`b`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(i!==`0`&&i!==`1`)return!1;r=!0}return r&&i!==`_`}if(i===`x`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(!_y(e.charCodeAt(n)))return!1;r=!0}return r&&i!==`_`}if(i===`o`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(!vy(e.charCodeAt(n)))return!1;r=!0}return r&&i!==`_`}}if(i===`_`)return!1;for(;n<t;n++)if(i=e[n],i!==`_`){if(!yy(e.charCodeAt(n)))return!1;r=!0}return!(!r||i===`_`)}r(by,`resolveYamlInteger`);function xy(e){var t=e,n=1,r;if(t.indexOf(`_`)!==-1&&(t=t.replace(/_/g,``)),r=t[0],(r===`-`||r===`+`)&&(r===`-`&&(n=-1),t=t.slice(1),r=t[0]),t===`0`)return 0;if(r===`0`){if(t[1]===`b`)return n*parseInt(t.slice(2),2);if(t[1]===`x`)return n*parseInt(t.slice(2),16);if(t[1]===`o`)return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}r(xy,`constructYamlInteger`);function Sy(e){return Object.prototype.toString.call(e)===`[object Number]`&&e%1==0&&!Kv.isNegativeZero(e)}r(Sy,`isInteger`);var Cy=new iy(`tag:yaml.org,2002:int`,{kind:`scalar`,resolve:by,construct:xy,predicate:Sy,represent:{binary:r(function(e){return e>=0?`0b`+e.toString(2):`-0b`+e.toString(2).slice(1)},`binary`),octal:r(function(e){return e>=0?`0o`+e.toString(8):`-0o`+e.toString(8).slice(1)},`octal`),decimal:r(function(e){return e.toString(10)},`decimal`),hexadecimal:r(function(e){return e>=0?`0x`+e.toString(16).toUpperCase():`-0x`+e.toString(16).toUpperCase().slice(1)},`hexadecimal`)},defaultStyle:`decimal`,styleAliases:{binary:[2,`bin`],octal:[8,`oct`],decimal:[10,`dec`],hexadecimal:[16,`hex`]}}),wy=RegExp(`^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function Ty(e){return!(e===null||!wy.test(e)||e[e.length-1]===`_`)}r(Ty,`resolveYamlFloat`);function Ey(e){var t=e.replace(/_/g,``).toLowerCase(),n=t[0]===`-`?-1:1;return`+-`.indexOf(t[0])>=0&&(t=t.slice(1)),t===`.inf`?n===1?1/0:-1/0:t===`.nan`?NaN:n*parseFloat(t,10)}r(Ey,`constructYamlFloat`);var Dy=/^[-+]?[0-9]+e/;function Oy(e,t){var n;if(isNaN(e))switch(t){case`lowercase`:return`.nan`;case`uppercase`:return`.NAN`;case`camelcase`:return`.NaN`}else if(e===1/0)switch(t){case`lowercase`:return`.inf`;case`uppercase`:return`.INF`;case`camelcase`:return`.Inf`}else if(e===-1/0)switch(t){case`lowercase`:return`-.inf`;case`uppercase`:return`-.INF`;case`camelcase`:return`-.Inf`}else if(Kv.isNegativeZero(e))return`-0.0`;return n=e.toString(10),Dy.test(n)?n.replace(`e`,`.e`):n}r(Oy,`representYamlFloat`);function ky(e){return Object.prototype.toString.call(e)===`[object Number]`&&(e%1!=0||Kv.isNegativeZero(e))}r(ky,`isFloat`);var Ay=new iy(`tag:yaml.org,2002:float`,{kind:`scalar`,resolve:Ty,construct:Ey,predicate:ky,represent:Oy,defaultStyle:`lowercase`}),jy=cy.extend({implicit:[fy,gy,Cy,Ay]}),My=jy,Ny=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`),Py=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 Fy(e){return e===null?!1:Ny.exec(e)!==null||Py.exec(e)!==null}r(Fy,`resolveYamlTimestamp`);function Iy(e){var t,n,r,i,a,o,s,c=0,l=null,u,d,f;if(t=Ny.exec(e),t===null&&(t=Py.exec(e)),t===null)throw Error(`Date resolve error`);if(n=+t[1],r=t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+=`0`;c=+c}return t[9]&&(u=+t[10],d=+(t[11]||0),l=(u*60+d)*6e4,t[9]===`-`&&(l=-l)),f=new Date(Date.UTC(n,r,i,a,o,s,c)),l&&f.setTime(f.getTime()-l),f}r(Iy,`constructYamlTimestamp`);function Ly(e){return e.toISOString()}r(Ly,`representYamlTimestamp`);var Ry=new iy(`tag:yaml.org,2002:timestamp`,{kind:`scalar`,resolve:Fy,construct:Iy,instanceOf:Date,represent:Ly});function zy(e){return e===`<<`||e===null}r(zy,`resolveYamlMerge`);var By=new iy(`tag:yaml.org,2002:merge`,{kind:`scalar`,resolve:zy}),Vy=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
50
- \r`;function Hy(e){if(e===null)return!1;var t,n,r=0,i=e.length,a=Vy;for(n=0;n<i;n++)if(t=a.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8==0}r(Hy,`resolveYamlBinary`);function Uy(e){var t,n,r=e.replace(/[\r\n=]/g,``),i=r.length,a=Vy,o=0,s=[];for(t=0;t<i;t++)t%4==0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(r.charAt(t));return n=i%4*6,n===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):n===18?(s.push(o>>10&255),s.push(o>>2&255)):n===12&&s.push(o>>4&255),new Uint8Array(s)}r(Uy,`constructYamlBinary`);function Wy(e){var t=``,n=0,r,i,a=e.length,o=Vy;for(r=0;r<a;r++)r%3==0&&r&&(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]),n=(n<<8)+e[r];return i=a%3,i===0?(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]):i===2?(t+=o[n>>10&63],t+=o[n>>4&63],t+=o[n<<2&63],t+=o[64]):i===1&&(t+=o[n>>2&63],t+=o[n<<4&63],t+=o[64],t+=o[64]),t}r(Wy,`representYamlBinary`);function Gy(e){return Object.prototype.toString.call(e)===`[object Uint8Array]`}r(Gy,`isBinary`);var Ky=new iy(`tag:yaml.org,2002:binary`,{kind:`scalar`,resolve:Hy,construct:Uy,predicate:Gy,represent:Wy}),qy=Object.prototype.hasOwnProperty,Jy=Object.prototype.toString;function Yy(e){if(e===null)return!0;var t=[],n,r,i,a,o,s=e;for(n=0,r=s.length;n<r;n+=1){if(i=s[n],o=!1,Jy.call(i)!==`[object Object]`)return!1;for(a in i)if(qy.call(i,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}r(Yy,`resolveYamlOmap`);function Xy(e){return e===null?[]:e}r(Xy,`constructYamlOmap`);var Zy=new iy(`tag:yaml.org,2002:omap`,{kind:`sequence`,resolve:Yy,construct:Xy}),Qy=Object.prototype.toString;function $y(e){if(e===null)return!0;var t,n,r,i,a,o=e;for(a=Array(o.length),t=0,n=o.length;t<n;t+=1){if(r=o[t],Qy.call(r)!==`[object Object]`||(i=Object.keys(r),i.length!==1))return!1;a[t]=[i[0],r[i[0]]]}return!0}r($y,`resolveYamlPairs`);function eb(e){if(e===null)return[];var t,n,r,i,a,o=e;for(a=Array(o.length),t=0,n=o.length;t<n;t+=1)r=o[t],i=Object.keys(r),a[t]=[i[0],r[i[0]]];return a}r(eb,`constructYamlPairs`);var tb=new iy(`tag:yaml.org,2002:pairs`,{kind:`sequence`,resolve:$y,construct:eb}),nb=Object.prototype.hasOwnProperty;function rb(e){if(e===null)return!0;var t,n=e;for(t in n)if(nb.call(n,t)&&n[t]!==null)return!1;return!0}r(rb,`resolveYamlSet`);function ib(e){return e===null?{}:e}r(ib,`constructYamlSet`);var ab=new iy(`tag:yaml.org,2002:set`,{kind:`mapping`,resolve:rb,construct:ib}),ob=My.extend({implicit:[Ry,By],explicit:[Ky,Zy,tb,ab]}),sb=Object.prototype.hasOwnProperty,cb=1,lb=2,ub=3,db=4,fb=1,pb=2,mb=3,hb=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,gb=/[\x85\u2028\u2029]/,_b=/[,\[\]\{\}]/,vb=/^(?:!|!!|![a-z\-]+!)$/i,yb=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function bb(e){return Object.prototype.toString.call(e)}r(bb,`_class`);function xb(e){return e===10||e===13}r(xb,`is_EOL`);function Sb(e){return e===9||e===32}r(Sb,`is_WHITE_SPACE`);function Cb(e){return e===9||e===32||e===10||e===13}r(Cb,`is_WS_OR_EOL`);function wb(e){return e===44||e===91||e===93||e===123||e===125}r(wb,`is_FLOW_INDICATOR`);function Tb(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}r(Tb,`fromHexCode`);function Eb(e){return e===120?2:e===117?4:e===85?8:0}r(Eb,`escapedHexLen`);function Db(e){return 48<=e&&e<=57?e-48:-1}r(Db,`fromDecimalCode`);function Ob(e){return e===48?`\0`:e===97?`\x07`:e===98?`\b`:e===116||e===9?` `:e===110?`
51
- `:e===118?`\v`:e===102?`\f`:e===114?`\r`:e===101?`\x1B`:e===32?` `:e===34?`"`:e===47?`/`:e===92?`\\`:e===78?`…`:e===95?`\xA0`:e===76?`\u2028`:e===80?`\u2029`:``}r(Ob,`simpleEscapeSequence`);function kb(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}r(kb,`charFromCodepoint`);function Ab(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}r(Ab,`setProperty`);var jb=Array(256),Mb=Array(256);for(Nb=0;Nb<256;Nb++)jb[Nb]=+!!Ob(Nb),Mb[Nb]=Ob(Nb);var Nb;function Pb(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||ob,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}r(Pb,`State$1`);function Fb(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=$v(n),new Yv(t,n)}r(Fb,`generateError`);function $(e,t){throw Fb(e,t)}r($,`throwError`);function Ib(e,t){e.onWarning&&e.onWarning.call(null,Fb(e,t))}r(Ib,`throwWarning`);var Lb={YAML:r(function(e,t,n){var r,i,a;e.version!==null&&$(e,`duplication of %YAML directive`),n.length!==1&&$(e,`YAML directive accepts exactly one argument`),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),r===null&&$(e,`ill-formed argument of the YAML directive`),i=parseInt(r[1],10),a=parseInt(r[2],10),i!==1&&$(e,`unacceptable YAML version of the document`),e.version=n[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&Ib(e,`unsupported YAML version of the document`)},`handleYamlDirective`),TAG:r(function(e,t,n){var r,i;n.length!==2&&$(e,`TAG directive accepts exactly two arguments`),r=n[0],i=n[1],vb.test(r)||$(e,`ill-formed tag handle (first argument) of the TAG directive`),sb.call(e.tagMap,r)&&$(e,`there is a previously declared suffix for "`+r+`" tag handle`),yb.test(i)||$(e,`ill-formed tag prefix (second argument) of the TAG directive`);try{i=decodeURIComponent(i)}catch{$(e,`tag prefix is malformed: `+i)}e.tagMap[r]=i},`handleTagDirective`)};function Rb(e,t,n,r){var i,a,o,s;if(t<n){if(s=e.input.slice(t,n),r)for(i=0,a=s.length;i<a;i+=1)o=s.charCodeAt(i),o===9||32<=o&&o<=1114111||$(e,`expected valid JSON character`);else hb.test(s)&&$(e,`the stream contains non-printable characters`);e.result+=s}}r(Rb,`captureSegment`);function zb(e,t,n,r){var i,a,o,s;for(Kv.isObject(n)||$(e,`cannot merge mappings; the provided source object is unacceptable`),i=Object.keys(n),o=0,s=i.length;o<s;o+=1)a=i[o],sb.call(t,a)||(Ab(t,a,n[a]),r[a]=!0)}r(zb,`mergeMappings`);function Bb(e,t,n,r,i,a,o,s,c){var l,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,u=i.length;l<u;l+=1)Array.isArray(i[l])&&$(e,`nested arrays are not supported inside keys`),typeof i==`object`&&bb(i[l])===`[object Object]`&&(i[l]=`[object Object]`);if(typeof i==`object`&&bb(i)===`[object Object]`&&(i=`[object Object]`),i=String(i),t===null&&(t={}),r===`tag:yaml.org,2002:merge`)if(Array.isArray(a))for(l=0,u=a.length;l<u;l+=1)zb(e,t,a[l],n);else zb(e,t,a,n);else !e.json&&!sb.call(n,i)&&sb.call(t,i)&&(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,$(e,`duplicated mapping key`)),Ab(t,i,a),delete n[i];return t}r(Bb,`storeMappingPair`);function Vb(e){var t=e.input.charCodeAt(e.position);t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):$(e,`a line break is expected`),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}r(Vb,`readLineBreak`);function Hb(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;Sb(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(xb(i))for(Vb(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&Ib(e,`deficient indentation`),r}r(Hb,`skipSeparationSpace`);function Ub(e){var t=e.position,n=e.input.charCodeAt(t);return!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||Cb(n)))}r(Ub,`testDocumentSeparator`);function Wb(e,t){t===1?e.result+=` `:t>1&&(e.result+=Kv.repeat(`
52
- `,t-1))}r(Wb,`writeFoldedLines`);function Gb(e,t,n){var r,i,a,o,s,c,l,u,d=e.kind,f=e.result,p=e.input.charCodeAt(e.position);if(Cb(p)||wb(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=e.input.charCodeAt(e.position+1),Cb(i)||n&&wb(i)))return!1;for(e.kind=`scalar`,e.result=``,a=o=e.position,s=!1;p!==0;){if(p===58){if(i=e.input.charCodeAt(e.position+1),Cb(i)||n&&wb(i))break}else if(p===35){if(r=e.input.charCodeAt(e.position-1),Cb(r))break}else if(e.position===e.lineStart&&Ub(e)||n&&wb(p))break;else if(xb(p))if(c=e.line,l=e.lineStart,u=e.lineIndent,Hb(e,!1,-1),e.lineIndent>=t){s=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=l,e.lineIndent=u;break}s&&=(Rb(e,a,o,!1),Wb(e,e.line-c),a=o=e.position,!1),Sb(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return Rb(e,a,o,!1),e.result?!0:(e.kind=d,e.result=f,!1)}r(Gb,`readPlainScalar`);function Kb(e,t){var n=e.input.charCodeAt(e.position),r,i;if(n!==39)return!1;for(e.kind=`scalar`,e.result=``,e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(Rb(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else xb(n)?(Rb(e,r,i,!0),Wb(e,Hb(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ub(e)?$(e,`unexpected end of the document within a single quoted scalar`):(e.position++,i=e.position);$(e,`unexpected end of the stream within a single quoted scalar`)}r(Kb,`readSingleQuotedScalar`);function qb(e,t){var n,r,i,a,o,s=e.input.charCodeAt(e.position);if(s!==34)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(s=e.input.charCodeAt(e.position))!==0;)if(s===34)return Rb(e,n,e.position,!0),e.position++,!0;else if(s===92){if(Rb(e,n,e.position,!0),s=e.input.charCodeAt(++e.position),xb(s))Hb(e,!1,t);else if(s<256&&jb[s])e.result+=Mb[s],e.position++;else if((o=Eb(s))>0){for(i=o,a=0;i>0;i--)s=e.input.charCodeAt(++e.position),(o=Tb(s))>=0?a=(a<<4)+o:$(e,`expected hexadecimal character`);e.result+=kb(a),e.position++}else $(e,`unknown escape sequence`);n=r=e.position}else xb(s)?(Rb(e,n,r,!0),Wb(e,Hb(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Ub(e)?$(e,`unexpected end of the document within a double quoted scalar`):(e.position++,r=e.position);$(e,`unexpected end of the stream within a double quoted scalar`)}r(qb,`readDoubleQuotedScalar`);function Jb(e,t){var n=!0,r,i,a,o=e.tag,s,c=e.anchor,l,u,d,f,p,m=Object.create(null),h,g,_,v=e.input.charCodeAt(e.position);if(v===91)u=93,p=!1,s=[];else if(v===123)u=125,p=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),v=e.input.charCodeAt(++e.position);v!==0;){if(Hb(e,!0,t),v=e.input.charCodeAt(e.position),v===u)return e.position++,e.tag=o,e.anchor=c,e.kind=p?`mapping`:`sequence`,e.result=s,!0;n?v===44&&$(e,`expected the node content, but found ','`):$(e,`missed comma between flow collection entries`),g=h=_=null,d=f=!1,v===63&&(l=e.input.charCodeAt(e.position+1),Cb(l)&&(d=f=!0,e.position++,Hb(e,!0,t))),r=e.line,i=e.lineStart,a=e.position,tx(e,t,cb,!1,!0),g=e.tag,h=e.result,Hb(e,!0,t),v=e.input.charCodeAt(e.position),(f||e.line===r)&&v===58&&(d=!0,v=e.input.charCodeAt(++e.position),Hb(e,!0,t),tx(e,t,cb,!1,!0),_=e.result),p?Bb(e,s,m,g,h,_,r,i,a):d?s.push(Bb(e,null,m,g,h,_,r,i,a)):s.push(h),Hb(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(n=!0,v=e.input.charCodeAt(++e.position)):n=!1}$(e,`unexpected end of the stream within a flow collection`)}r(Jb,`readFlowCollection`);function Yb(e,t){var n,r,i=fb,a=!1,o=!1,s=t,c=0,l=!1,u,d=e.input.charCodeAt(e.position);if(d===124)r=!1;else if(d===62)r=!0;else return!1;for(e.kind=`scalar`,e.result=``;d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)fb===i?i=d===43?mb:pb:$(e,`repeat of a chomping mode identifier`);else if((u=Db(d))>=0)u===0?$(e,`bad explicit indentation width of a block scalar; it cannot be less than one`):o?$(e,`repeat of an indentation width identifier`):(s=t+u-1,o=!0);else break;if(Sb(d)){do d=e.input.charCodeAt(++e.position);while(Sb(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!xb(d)&&d!==0)}for(;d!==0;){for(Vb(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!o||e.lineIndent<s)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>s&&(s=e.lineIndent),xb(d)){c++;continue}if(e.lineIndent<s){i===mb?e.result+=Kv.repeat(`
53
- `,a?1+c:c):i===fb&&a&&(e.result+=`
54
- `);break}for(r?Sb(d)?(l=!0,e.result+=Kv.repeat(`
55
- `,a?1+c:c)):l?(l=!1,e.result+=Kv.repeat(`
56
- `,c+1)):c===0?a&&(e.result+=` `):e.result+=Kv.repeat(`
57
- `,c):e.result+=Kv.repeat(`
58
- `,a?1+c:c),a=!0,o=!0,c=0,n=e.position;!xb(d)&&d!==0;)d=e.input.charCodeAt(++e.position);Rb(e,n,e.position,!1)}return!0}r(Yb,`readBlockScalar`);function Xb(e,t){var n,r=e.tag,i=e.anchor,a=[],o,s=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,$(e,`tab characters must not be used in indentation`)),!(c!==45||(o=e.input.charCodeAt(e.position+1),!Cb(o))));){if(s=!0,e.position++,Hb(e,!0,-1)&&e.lineIndent<=t){a.push(null),c=e.input.charCodeAt(e.position);continue}if(n=e.line,tx(e,t,ub,!1,!0),a.push(e.result),Hb(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&c!==0)$(e,`bad indentation of a sequence entry`);else if(e.lineIndent<t)break}return s?(e.tag=r,e.anchor=i,e.kind=`sequence`,e.result=a,!0):!1}r(Xb,`readBlockSequence`);function Zb(e,t,n){var r,i,a,o,s,c,l=e.tag,u=e.anchor,d={},f=Object.create(null),p=null,m=null,h=null,g=!1,_=!1,v;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),v=e.input.charCodeAt(e.position);v!==0;){if(!g&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,$(e,`tab characters must not be used in indentation`)),r=e.input.charCodeAt(e.position+1),a=e.line,(v===63||v===58)&&Cb(r))v===63?(g&&(Bb(e,d,f,p,m,null,o,s,c),p=m=h=null),_=!0,g=!0,i=!0):g?(g=!1,i=!0):$(e,`incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line`),e.position+=1,v=r;else{if(o=e.line,s=e.lineStart,c=e.position,!tx(e,n,lb,!1,!0))break;if(e.line===a){for(v=e.input.charCodeAt(e.position);Sb(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),Cb(v)||$(e,`a whitespace character is expected after the key-value separator within a block mapping`),g&&(Bb(e,d,f,p,m,null,o,s,c),p=m=h=null),_=!0,g=!1,i=!1,p=e.tag,m=e.result;else if(_)$(e,`can not read an implicit mapping pair; a colon is missed`);else return e.tag=l,e.anchor=u,!0}else if(_)$(e,`can not read a block mapping entry; a multiline key may not be an implicit key`);else return e.tag=l,e.anchor=u,!0}if((e.line===a||e.lineIndent>t)&&(g&&(o=e.line,s=e.lineStart,c=e.position),tx(e,t,db,!0,i)&&(g?m=e.result:h=e.result),g||(Bb(e,d,f,p,m,h,o,s,c),p=m=h=null),Hb(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&v!==0)$(e,`bad indentation of a mapping entry`);else if(e.lineIndent<t)break}return g&&Bb(e,d,f,p,m,null,o,s,c),_&&(e.tag=l,e.anchor=u,e.kind=`mapping`,e.result=d),_}r(Zb,`readBlockMapping`);function Qb(e){var t,n=!1,r=!1,i,a,o=e.input.charCodeAt(e.position);if(o!==33)return!1;if(e.tag!==null&&$(e,`duplication of a tag property`),o=e.input.charCodeAt(++e.position),o===60?(n=!0,o=e.input.charCodeAt(++e.position)):o===33?(r=!0,i=`!!`,o=e.input.charCodeAt(++e.position)):i=`!`,t=e.position,n){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):$(e,`unexpected end of the stream within a verbatim tag`)}else{for(;o!==0&&!Cb(o);)o===33&&(r?$(e,`tag suffix cannot contain exclamation marks`):(i=e.input.slice(t-1,e.position+1),vb.test(i)||$(e,`named tag handle cannot contain such characters`),r=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),_b.test(a)&&$(e,`tag suffix cannot contain flow indicator characters`)}a&&!yb.test(a)&&$(e,`tag name cannot contain such characters: `+a);try{a=decodeURIComponent(a)}catch{$(e,`tag name is malformed: `+a)}return n?e.tag=a:sb.call(e.tagMap,i)?e.tag=e.tagMap[i]+a:i===`!`?e.tag=`!`+a:i===`!!`?e.tag=`tag:yaml.org,2002:`+a:$(e,`undeclared tag handle "`+i+`"`),!0}r(Qb,`readTagProperty`);function $b(e){var t,n=e.input.charCodeAt(e.position);if(n!==38)return!1;for(e.anchor!==null&&$(e,`duplication of an anchor property`),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Cb(n)&&!wb(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&$(e,`name of an anchor node must contain at least one character`),e.anchor=e.input.slice(t,e.position),!0}r($b,`readAnchorProperty`);function ex(e){var t,n,r=e.input.charCodeAt(e.position);if(r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Cb(r)&&!wb(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&$(e,`name of an alias node must contain at least one character`),n=e.input.slice(t,e.position),sb.call(e.anchorMap,n)||$(e,`unidentified alias "`+n+`"`),e.result=e.anchorMap[n],Hb(e,!0,-1),!0}r(ex,`readAlias`);function tx(e,t,n,r,i){var a,o,s,c=1,l=!1,u=!1,d,f,p,m,h,g;if(e.listener!==null&&e.listener(`open`,e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=db===n||ub===n,r&&Hb(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;Qb(e)||$b(e);)Hb(e,!0,-1)?(l=!0,s=a,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1;if(s&&=l||i,(c===1||db===n)&&(h=cb===n||lb===n?t:t+1,g=e.position-e.lineStart,c===1?s&&(Xb(e,g)||Zb(e,g,h))||Jb(e,h)?u=!0:(o&&Yb(e,h)||Kb(e,h)||qb(e,h)?u=!0:ex(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&$(e,`alias node should not have any properties`)):Gb(e,h,cb===n)&&(u=!0,e.tag===null&&(e.tag=`?`)),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(u=s&&Xb(e,g))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag===`?`){for(e.result!==null&&e.kind!==`scalar`&&$(e,`unacceptable node kind for !<?> tag; it should be "scalar", not "`+e.kind+`"`),d=0,f=e.implicitTypes.length;d<f;d+=1)if(m=e.implicitTypes[d],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!==`!`){if(sb.call(e.typeMap[e.kind||`fallback`],e.tag))m=e.typeMap[e.kind||`fallback`][e.tag];else for(m=null,p=e.typeMap.multi[e.kind||`fallback`],d=0,f=p.length;d<f;d+=1)if(e.tag.slice(0,p[d].tag.length)===p[d].tag){m=p[d];break}m||$(e,`unknown tag !<`+e.tag+`>`),e.result!==null&&m.kind!==e.kind&&$(e,`unacceptable node kind for !<`+e.tag+`> tag; it should be "`+m.kind+`", not "`+e.kind+`"`),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):$(e,`cannot resolve a node with !<`+e.tag+`> explicit tag`)}return e.listener!==null&&e.listener(`close`,e),e.tag!==null||e.anchor!==null||u}r(tx,`composeNode`);function nx(e){var t=e.position,n,r,i,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(Hb(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),n=e.position;o!==0&&!Cb(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&$(e,`directive name must not be less than one character in length`);o!==0;){for(;Sb(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!xb(o));break}if(xb(o))break;for(n=e.position;o!==0&&!Cb(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}o!==0&&Vb(e),sb.call(Lb,r)?Lb[r](e,r,i):Ib(e,`unknown document directive "`+r+`"`)}if(Hb(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Hb(e,!0,-1)):a&&$(e,`directives end mark is expected`),tx(e,e.lineIndent-1,db,!1,!0),Hb(e,!0,-1),e.checkLineBreaks&&gb.test(e.input.slice(t,e.position))&&Ib(e,`non-ASCII line breaks are interpreted as content`),e.documents.push(e.result),e.position===e.lineStart&&Ub(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Hb(e,!0,-1));return}if(e.position<e.length-1)$(e,`end of the stream or a document separator is expected`);else return}r(nx,`readDocument`);function rx(e,t){e=String(e),t||={},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
59
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new Pb(e,t),r=e.indexOf(`\0`);for(r!==-1&&(n.position=r,$(n,`null byte is not allowed in input`)),n.input+=`\0`;n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)nx(n);return n.documents}r(rx,`loadDocuments`);function ix(e,t,n){typeof t==`object`&&t&&n===void 0&&(n=t,t=null);var r=rx(e,n);if(typeof t!=`function`)return r;for(var i=0,a=r.length;i<a;i+=1)t(r[i])}r(ix,`loadAll$1`);function ax(e,t){var n=rx(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new Yv(`expected a single document in the stream, but found more`)}}r(ax,`load$1`);var ox={loadAll:ix,load:ax},sx=Object.prototype.toString,cx=Object.prototype.hasOwnProperty,lx=65279,ux=9,dx=10,fx=13,px=32,mx=33,hx=34,gx=35,_x=37,vx=38,yx=39,bx=42,xx=44,Sx=45,Cx=58,wx=61,Tx=62,Ex=63,Dx=64,Ox=91,kx=93,Ax=96,jx=123,Mx=124,Nx=125,Px={};Px[0]=`\\0`,Px[7]=`\\a`,Px[8]=`\\b`,Px[9]=`\\t`,Px[10]=`\\n`,Px[11]=`\\v`,Px[12]=`\\f`,Px[13]=`\\r`,Px[27]=`\\e`,Px[34]=`\\"`,Px[92]=`\\\\`,Px[133]=`\\N`,Px[160]=`\\_`,Px[8232]=`\\L`,Px[8233]=`\\P`;var Fx=[`y`,`Y`,`yes`,`Yes`,`YES`,`on`,`On`,`ON`,`n`,`N`,`no`,`No`,`NO`,`off`,`Off`,`OFF`],Ix=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Lx(e,t){var n,r,i,a,o,s,c;if(t===null)return{};for(n={},r=Object.keys(t),i=0,a=r.length;i<a;i+=1)o=r[i],s=String(t[o]),o.slice(0,2)===`!!`&&(o=`tag:yaml.org,2002:`+o.slice(2)),c=e.compiledTypeMap.fallback[o],c&&cx.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[o]=s;return n}r(Lx,`compileStyleMap`);function Rx(e){var t=e.toString(16).toUpperCase(),n,r;if(e<=255)n=`x`,r=2;else if(e<=65535)n=`u`,r=4;else if(e<=4294967295)n=`U`,r=8;else throw new Yv(`code point within a string may not be greater than 0xFFFFFFFF`);return`\\`+n+Kv.repeat(`0`,r-t.length)+t}r(Rx,`encodeHex`);var zx=1,Bx=2;function Vx(e){this.schema=e.schema||ob,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Kv.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Lx(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType===`"`?Bx:zx,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer==`function`?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=``,this.duplicates=[],this.usedDuplicates=null}r(Vx,`State`);function Hx(e,t){for(var n=Kv.repeat(` `,t),r=0,i=-1,a=``,o,s=e.length;r<s;)i=e.indexOf(`
60
- `,r),i===-1?(o=e.slice(r),r=s):(o=e.slice(r,i+1),r=i+1),o.length&&o!==`
61
- `&&(a+=n),a+=o;return a}r(Hx,`indentString`);function Ux(e,t){return`
62
- `+Kv.repeat(` `,e.indent*t)}r(Ux,`generateNextLine`);function Wx(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}r(Wx,`testImplicitResolving`);function Gx(e){return e===px||e===ux}r(Gx,`isWhitespace`);function Kx(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==lx||65536<=e&&e<=1114111}r(Kx,`isPrintable`);function qx(e){return Kx(e)&&e!==lx&&e!==fx&&e!==dx}r(qx,`isNsCharOrWhitespace`);function Jx(e,t,n){var r=qx(e),i=r&&!Gx(e);return(n?r:r&&e!==xx&&e!==Ox&&e!==kx&&e!==jx&&e!==Nx)&&e!==gx&&!(t===Cx&&!i)||qx(t)&&!Gx(t)&&e===gx||t===Cx&&i}r(Jx,`isPlainSafe`);function Yx(e){return Kx(e)&&e!==lx&&!Gx(e)&&e!==Sx&&e!==Ex&&e!==Cx&&e!==xx&&e!==Ox&&e!==kx&&e!==jx&&e!==Nx&&e!==gx&&e!==vx&&e!==bx&&e!==mx&&e!==Mx&&e!==wx&&e!==Tx&&e!==yx&&e!==hx&&e!==_x&&e!==Dx&&e!==Ax}r(Yx,`isPlainSafeFirst`);function Xx(e){return!Gx(e)&&e!==Cx}r(Xx,`isPlainSafeLast`);function Zx(e,t){var n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}r(Zx,`codePointAt`);function Qx(e){return/^\n* /.test(e)}r(Qx,`needIndentIndicator`);var $x=1,eS=2,tS=3,nS=4,rS=5;function iS(e,t,n,r,i,a,o,s){var c,l=0,u=null,d=!1,f=!1,p=r!==-1,m=-1,h=Yx(Zx(e,0))&&Xx(Zx(e,e.length-1));if(t||o)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Zx(e,c),!Kx(l))return rS;h&&=Jx(l,u,s),u=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Zx(e,c),l===dx)d=!0,p&&(f||=c-m-1>r&&e[m+1]!==` `,m=c);else if(!Kx(l))return rS;h&&=Jx(l,u,s),u=l}f||=p&&c-m-1>r&&e[m+1]!==` `}return!d&&!f?h&&!o&&!i(e)?$x:a===Bx?rS:eS:n>9&&Qx(e)?rS:o?a===Bx?rS:eS:f?nS:tS}r(iS,`chooseScalarStyle`);function aS(e,t,n,i,a){e.dump=(function(){if(t.length===0)return e.quotingType===Bx?`""`:`''`;if(!e.noCompatMode&&(Fx.indexOf(t)!==-1||Ix.test(t)))return e.quotingType===Bx?`"`+t+`"`:`'`+t+`'`;var o=e.indent*Math.max(1,n),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),c=i||e.flowLevel>-1&&n>=e.flowLevel;function l(t){return Wx(e,t)}switch(r(l,`testAmbiguity`),iS(t,c,e.indent,s,l,e.quotingType,e.forceQuotes&&!i,a)){case $x:return t;case eS:return`'`+t.replace(/'/g,`''`)+`'`;case tS:return`|`+oS(t,e.indent)+sS(Hx(t,o));case nS:return`>`+oS(t,e.indent)+sS(Hx(cS(t,s),o));case rS:return`"`+uS(t)+`"`;default:throw new Yv(`impossible error: invalid scalar style`)}})()}r(aS,`writeScalar`);function oS(e,t){var n=Qx(e)?String(t):``,r=e[e.length-1]===`
63
- `;return n+(r&&(e[e.length-2]===`
64
- `||e===`
65
- `)?`+`:r?``:`-`)+`
66
- `}r(oS,`blockHeader`);function sS(e){return e[e.length-1]===`
67
- `?e.slice(0,-1):e}r(sS,`dropEndingNewline`);function cS(e,t){for(var n=/(\n+)([^\n]*)/g,r=(function(){var r=e.indexOf(`
68
- `);return r=r===-1?e.length:r,n.lastIndex=r,lS(e.slice(0,r),t)})(),i=e[0]===`
69
- `||e[0]===` `,a,o;o=n.exec(e);){var s=o[1],c=o[2];a=c[0]===` `,r+=s+(!i&&!a&&c!==``?`
70
- `:``)+lS(c,t),i=a}return r}r(cS,`foldString`);function lS(e,t){if(e===``||e[0]===` `)return e;for(var n=/ [^ ]/g,r,i=0,a,o=0,s=0,c=``;r=n.exec(e);)s=r.index,s-i>t&&(a=o>i?o:s,c+=`
71
- `+e.slice(i,a),i=a+1),o=s;return c+=`
72
- `,e.length-i>t&&o>i?c+=e.slice(i,o)+`
73
- `+e.slice(o+1):c+=e.slice(i),c.slice(1)}r(lS,`foldLine`);function uS(e){for(var t=``,n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=Zx(e,i),r=Px[n],!r&&Kx(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||Rx(n);return t}r(uS,`escapeString`);function dS(e,t,n){var r=``,i=e.tag,a,o,s;for(a=0,o=n.length;a<o;a+=1)s=n[a],e.replacer&&(s=e.replacer.call(n,String(a),s)),(gS(e,t,s,!1,!1)||s===void 0&&gS(e,t,null,!1,!1))&&(r!==``&&(r+=`,`+(e.condenseFlow?``:` `)),r+=e.dump);e.tag=i,e.dump=`[`+r+`]`}r(dS,`writeFlowSequence`);function fS(e,t,n,r){var i=``,a=e.tag,o,s,c;for(o=0,s=n.length;o<s;o+=1)c=n[o],e.replacer&&(c=e.replacer.call(n,String(o),c)),(gS(e,t+1,c,!0,!0,!1,!0)||c===void 0&&gS(e,t+1,null,!0,!0,!1,!0))&&((!r||i!==``)&&(i+=Ux(e,t)),e.dump&&dx===e.dump.charCodeAt(0)?i+=`-`:i+=`- `,i+=e.dump);e.tag=a,e.dump=i||`[]`}r(fS,`writeBlockSequence`);function pS(e,t,n){var r=``,i=e.tag,a=Object.keys(n),o,s,c,l,u;for(o=0,s=a.length;o<s;o+=1)u=``,r!==``&&(u+=`, `),e.condenseFlow&&(u+=`"`),c=a[o],l=n[c],e.replacer&&(l=e.replacer.call(n,c,l)),gS(e,t,c,!1,!1)&&(e.dump.length>1024&&(u+=`? `),u+=e.dump+(e.condenseFlow?`"`:``)+`:`+(e.condenseFlow?``:` `),gS(e,t,l,!1,!1)&&(u+=e.dump,r+=u));e.tag=i,e.dump=`{`+r+`}`}r(pS,`writeFlowMapping`);function mS(e,t,n,r){var i=``,a=e.tag,o=Object.keys(n),s,c,l,u,d,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys==`function`)o.sort(e.sortKeys);else if(e.sortKeys)throw new Yv(`sortKeys must be a boolean or a function`);for(s=0,c=o.length;s<c;s+=1)f=``,(!r||i!==``)&&(f+=Ux(e,t)),l=o[s],u=n[l],e.replacer&&(u=e.replacer.call(n,l,u)),gS(e,t+1,l,!0,!0,!0)&&(d=e.tag!==null&&e.tag!==`?`||e.dump&&e.dump.length>1024,d&&(e.dump&&dx===e.dump.charCodeAt(0)?f+=`?`:f+=`? `),f+=e.dump,d&&(f+=Ux(e,t)),gS(e,t+1,u,!0,d)&&(e.dump&&dx===e.dump.charCodeAt(0)?f+=`:`:f+=`: `,f+=e.dump,i+=f));e.tag=a,e.dump=i||`{}`}r(mS,`writeBlockMapping`);function hS(e,t,n){var r,i=n?e.explicitTypes:e.implicitTypes,a,o,s,c;for(a=0,o=i.length;a<o;a+=1)if(s=i[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t==`object`&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(n?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag=`?`,s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,sx.call(s.represent)===`[object Function]`)r=s.represent(t,c);else if(cx.call(s.represent,c))r=s.represent[c](t,c);else throw new Yv(`!<`+s.tag+`> tag resolver accepts not "`+c+`" style`);e.dump=r}return!0}return!1}r(hS,`detectType`);function gS(e,t,n,r,i,a,o){e.tag=null,e.dump=n,hS(e,n,!1)||hS(e,n,!0);var s=sx.call(e.dump),c=r,l;r&&=e.flowLevel<0||e.flowLevel>t;var u=s===`[object Object]`||s===`[object Array]`,d,f;if(u&&(d=e.duplicates.indexOf(n),f=d!==-1),(e.tag!==null&&e.tag!==`?`||f||e.indent!==2&&t>0)&&(i=!1),f&&e.usedDuplicates[d])e.dump=`*ref_`+d;else{if(u&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),s===`[object Object]`)r&&Object.keys(e.dump).length!==0?(mS(e,t,e.dump,i),f&&(e.dump=`&ref_`+d+e.dump)):(pS(e,t,e.dump),f&&(e.dump=`&ref_`+d+` `+e.dump));else if(s===`[object Array]`)r&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?fS(e,t-1,e.dump,i):fS(e,t,e.dump,i),f&&(e.dump=`&ref_`+d+e.dump)):(dS(e,t,e.dump),f&&(e.dump=`&ref_`+d+` `+e.dump));else if(s===`[object String]`)e.tag!==`?`&&aS(e,e.dump,t,a,c);else if(s===`[object Undefined]`)return!1;else{if(e.skipInvalid)return!1;throw new Yv(`unacceptable kind of an object to dump `+s)}e.tag!==null&&e.tag!==`?`&&(l=encodeURI(e.tag[0]===`!`?e.tag.slice(1):e.tag).replace(/!/g,`%21`),l=e.tag[0]===`!`?`!`+l:l.slice(0,18)===`tag:yaml.org,2002:`?`!!`+l.slice(18):`!<`+l+`>`,e.dump=l+` `+e.dump)}return!0}r(gS,`writeNode`);function _S(e,t){var n=[],r=[],i,a;for(vS(e,n,r),i=0,a=r.length;i<a;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=Array(a)}r(_S,`getDuplicateReferences`);function vS(e,t,n){var r,i,a;if(typeof e==`object`&&e)if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)vS(e[i],t,n);else for(r=Object.keys(e),i=0,a=r.length;i<a;i+=1)vS(e[r[i]],t,n)}r(vS,`inspectNode`);function yS(e,t){t||={};var n=new Vx(t);n.noRefs||_S(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},``,r)),gS(n,0,r,!0,!0)?n.dump+`
74
- `:``}r(yS,`dump$1`);var bS={dump:yS};function xS(e,t){return function(){throw Error(`Function yaml.`+e+` is removed in js-yaml 4. Use yaml.`+t+` instead, which is now safe by default.`)}}r(xS,`renamed`);var SS=jy,CS=ox.load;ox.loadAll,bS.dump;function wS(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function TS(e){if(e==null)return!0;if(oe(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!ce(e)&&!me(e)&&!he(e)?!1:e.length===0;if(typeof e==`object`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return wS(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}var ES={common:ie,getConfig:S,insertCluster:ye,insertEdge:Ce,insertEdgeLabel:we,insertMarkers:Se,insertNode:ve,interpolateToCurve:le,labelHelper:be,log:n,positionEdgeLabel:xe},DS={},OS=r(e=>{for(let t of e)DS[t.name]=t},`registerLayoutLoaders`);r(()=>{OS([{name:`dagre`,loader:r(async()=>await s(()=>import(`./dagre-BM42HDAG-au4dCVgC.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url),`loader`)},{name:`cose-bilkent`,loader:r(async()=>await s(()=>import(`./cose-bilkent-S5V4N54A-CsjsMgdo.js`),__vite__mapDeps([17,1,18]),import.meta.url),`loader`)}])},`registerDefaultLayoutLoaders`)();var kS=r(async(e,t)=>{if(!(e.layoutAlgorithm in DS))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=DS[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:c}=a,l=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${l}-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`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${l}-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`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,c).attr(`stop-opacity`,1)}return r.render(e,t,ES,{algorithm:n.algorithm})},`render`),AS=r((e=``,{fallback:t=`dagre`}={})=>{if(e in DS)return e;if(t in DS)return n.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`),jS=`comm`,MS=`rule`,NS=`decl`,PS=`@import`,FS=`@namespace`,IS=`@keyframes`,LS=`@layer`,RS=Math.abs,zS=String.fromCharCode;function BS(e){return e.trim()}function VS(e,t,n){return e.replace(t,n)}function HS(e,t){return e.charCodeAt(t)|0}function US(e,t,n){return e.slice(t,n)}function WS(e){return e.length}function GS(e){return e.length}function KS(e,t){return t.push(e),e}var qS=1,JS=1,YS=0,XS=0,ZS=0,QS=``;function $S(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:qS,column:JS,length:o,return:``,siblings:s}}function eC(){return ZS}function tC(){return ZS=XS>0?HS(QS,--XS):0,JS--,ZS===10&&(JS=1,qS--),ZS}function nC(){return ZS=XS<YS?HS(QS,XS++):0,JS++,ZS===10&&(JS=1,qS++),ZS}function rC(){return HS(QS,XS)}function iC(){return XS}function aC(e,t){return US(QS,e,t)}function oC(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function sC(e){return qS=JS=1,YS=WS(QS=e),XS=0,[]}function cC(e){return QS=``,e}function lC(e){return BS(aC(XS-1,fC(e===91?e+2:e===40?e+1:e)))}function uC(e){for(;(ZS=rC())&&ZS<33;)nC();return oC(e)>2||oC(ZS)>3?``:` `}function dC(e,t){for(;--t&&nC()&&!(ZS<48||ZS>102||ZS>57&&ZS<65||ZS>70&&ZS<97););return aC(e,iC()+(t<6&&rC()==32&&nC()==32))}function fC(e){for(;nC();)switch(ZS){case e:return XS;case 34:case 39:e!==34&&e!==39&&fC(ZS);break;case 40:e===41&&fC(e);break;case 92:nC();break}return XS}function pC(e,t){for(;nC()&&e+ZS!==57&&!(e+ZS===84&&rC()===47););return`/*`+aC(t,XS-1)+`*`+zS(e===47?e:nC())}function mC(e){for(;!oC(rC());)nC();return aC(e,XS)}function hC(e){return cC(gC(``,null,null,null,[``],e=sC(e),0,[0],e))}function gC(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=0,b=``,x=i,S=a,C=r,w=b;g;)switch(m=y,y=nC()){case 40:m!=108&&HS(w,d-1)==58?(v++,w+=`(`):w+=lC(y);break;case 41:v--,w+=`)`;break;case 34:case 39:case 91:w+=lC(y);break;case 9:case 10:case 13:case 32:if(v>0){w+=zS(y);break}w+=uC(m);break;case 92:w+=dC(iC()-1,7);continue;case 47:switch(rC()){case 42:case 47:KS(vC(pC(nC(),iC()),t,n,c),c),(oC(m||1)==5||oC(rC()||1)==5)&&WS(w)&&US(w,-1,void 0)!==` `&&(w+=` `);break;default:w+=`/`}break;case 123*h:s[l++]=WS(w)*_;case 125*h:case 59:case 0:if(v>0&&y){w+=zS(y);break}switch(y){case 0:case 125:g=0;case 59+u:_==-1&&(w=VS(w,/\f/g,``)),p>0&&(WS(w)-d||h===0)&&KS(p>32?yC(w+`;`,r,n,d-1,c):yC(VS(w,` `,``)+`;`,r,n,d-2,c),c);break;case 59:w+=`;`;default:if(KS(C=_C(w,t,n,l,u,i,s,b,x=[],S=[],d,a),a),y===123)if(u===0)gC(w,t,C,C,x,a,d,s,S);else{switch(f){case 99:if(HS(w,3)===110)break;case 108:if(HS(w,2)===97)break;default:u=0;case 100:case 109:case 115:}u?gC(e,C,C,r&&KS(_C(e,C,C,0,0,i,s,b,i,x=[],d,S),S),i,S,d,s,r?x:S):gC(w,C,C,C,[``],S,0,s,S)}}l=u=p=0,h=_=1,b=w=``,d=o;break;case 58:d=1+WS(w),p=m;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&tC()==125)continue}switch(w+=zS(y),y*h){case 38:_=u>0?1:(w+=`\f`,-1);break;case 44:if(v>0)break;s[l++]=(WS(w)-1)*_,_=1;break;case 64:rC()===45&&(w+=lC(nC())),f=rC(),u=d=WS(b=w+=mC(iC())),y++;break;case 45:m===45&&WS(w)==2&&(h=0)}}return a}function _C(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=GS(p),h=0,g=0,_=0;h<r;++h)for(var v=0,y=US(e,f+1,f=RS(g=o[h])),b=e;v<m;++v)(b=BS(g>0?p[v]+` `+y:VS(y,/&\f/g,p[v])))&&(c[_++]=b);return $S(e,t,n,i===0?MS:s,c,l,u,d)}function vC(e,t,n,r){return $S(e,t,n,jS,zS(eC()),US(e,2,-2),0,r)}function yC(e,t,n,r,i){return $S(e,t,n,NS,US(e,0,r),US(e,r+1,-1),r,i)}function bC(e,t){for(var n=``,r=0;r<e.length;r++)n+=t(e[r],r,e,t)||``;return n}function xC(e,t,n,r){switch(e.type){case LS:if(e.children.length)break;case PS:case FS:case NS:return e.return=e.return||e.value;case jS:return``;case IS:return e.return=e.value+`{`+bC(e.children,r)+`}`;case MS:if(!WS(e.value=e.props.join(`,`)))return``}return WS(n=bC(e.children,r))?e.return=e.value+`{`+n+`}`:``}function SC(e){var t=GS(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}var CC=`c4`,wC={id:CC,detector:r(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./c4Diagram-AAUBKEIU-qO0tZRXO.js`);return{diagram:e}},__vite__mapDeps([19,1,2,5,4,20]),import.meta.url);return{id:CC,diagram:e}},`loader`)},TC=`flowchart`,EC={id:TC,detector:r((e,t)=>t?.flowchart?.defaultRenderer===`dagre-wrapper`||t?.flowchart?.defaultRenderer===`elk`?!1:/^\s*graph/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./flowDiagram-I6XJVG4X-DaguIeM_.js`);return{diagram:e}},__vite__mapDeps([21,1,2,3,4,5,22,23,8,9,10,11,24,12,25,13,14,15,16,20]),import.meta.url);return{id:TC,diagram:e}},`loader`)},DC=`flowchart-v2`,OC={id:DC,detector:r((e,t)=>t?.flowchart?.defaultRenderer===`dagre-d3`?!1:(t?.flowchart?.defaultRenderer===`elk`&&(t.layout=`elk`),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer===`dagre-wrapper`?!0:/^\s*flowchart/.test(e)),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./flowDiagram-I6XJVG4X-DaguIeM_.js`);return{diagram:e}},__vite__mapDeps([21,1,2,3,4,5,22,23,8,9,10,11,24,12,25,13,14,15,16,20]),import.meta.url);return{id:DC,diagram:e}},`loader`)},kC=`er`,AC={id:kC,detector:r(e=>/^\s*erDiagram/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./erDiagram-TEJ5UH35-CgifrqeZ.js`);return{diagram:e}},__vite__mapDeps([26,1,2,3,4,5,22,23,8,9,10,11,24,12,13,14,15,16]),import.meta.url);return{id:kC,diagram:e}},`loader`)},jC=`gitGraph`,MC={id:jC,detector:r(e=>/^\s*gitGraph/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./gitGraphDiagram-PVQCEYII-Ht-SDjxh.js`);return{diagram:e}},__vite__mapDeps([27,1,2,28,29,30,31,32,33,34,35,36,37,38,39,4,5,40,41]),import.meta.url);return{id:jC,diagram:e}},`loader`)},NC=`gantt`,PC={id:NC,detector:r(e=>/^\s*gantt/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./ganttDiagram-6RSMTGT7-DIFubQTa.js`);return{diagram:e}},__vite__mapDeps([42,1,2,5,43,44,45,4]),import.meta.url);return{id:NC,diagram:e}},`loader`)},FC=`info`,IC={id:FC,detector:r(e=>/^\s*info/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./infoDiagram-5YYISTIA-CwLGA7Zu.js`);return{diagram:e}},__vite__mapDeps([46,1,2,28,29,30,31,32,33,34,35,36,37,38,39]),import.meta.url);return{id:FC,diagram:e}},`loader`)},LC=`pie`,RC={id:LC,detector:r(e=>/^\s*pie/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./pieDiagram-4H26LBE5-DTVmF_CH.js`);return{diagram:e}},__vite__mapDeps([47,1,2,5,28,29,30,31,32,33,34,35,36,37,38,39,15,48,45,49,16,4,40]),import.meta.url);return{id:LC,diagram:e}},`loader`)},zC=`quadrantChart`,BC={id:zC,detector:r(e=>/^\s*quadrantChart/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./quadrantDiagram-W4KKPZXB-Bho6zy_y.js`);return{diagram:e}},__vite__mapDeps([50,1,2,43,44,45]),import.meta.url);return{id:zC,diagram:e}},`loader`)},VC=`xychart`,HC={id:VC,detector:r(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./xychartDiagram-2RQKCTM6-CuyUQvFt.js`);return{diagram:e}},__vite__mapDeps([51,1,2,3,4,5,43,44,45,48,14,15,16]),import.meta.url);return{id:VC,diagram:e}},`loader`)},UC=`requirement`,WC={id:UC,detector:r(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./requirementDiagram-4Y6WPE33-CLyoVwlh.js`);return{diagram:e}},__vite__mapDeps([52,1,2,3,4,5,23,8,9,10,11,24,12,13,14,15,16]),import.meta.url);return{id:UC,diagram:e}},`loader`)},GC=`sequence`,KC={id:GC,detector:r(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./sequenceDiagram-3UESZ5HK-Dp03aXVk.js`);return{diagram:e}},__vite__mapDeps([53,1,2,5,4,20,41]),import.meta.url);return{id:GC,diagram:e}},`loader`)},qC=`class`,JC={id:qC,detector:r((e,t)=>t?.class?.defaultRenderer===`dagre-wrapper`?!1:/^\s*classDiagram/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./classDiagram-4FO5ZUOK-oexPF7ww.js`);return{diagram:e}},__vite__mapDeps([54,1,2,3,4,5,23,8,9,10,11,24,55,25,20,12,13,14,15,16]),import.meta.url);return{id:qC,diagram:e}},`loader`)},YC=`classDiagram`,XC={id:YC,detector:r((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer===`dagre-wrapper`?!0:/^\s*classDiagram-v2/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./classDiagram-v2-Q7XG4LA2-Dc4jeSLj.js`);return{diagram:e}},__vite__mapDeps([56,1,2,3,4,5,23,8,9,10,11,24,55,25,20,12,13,14,15,16]),import.meta.url);return{id:YC,diagram:e}},`loader`)},ZC=`state`,QC={id:ZC,detector:r((e,t)=>t?.state?.defaultRenderer===`dagre-wrapper`?!1:/^\s*stateDiagram/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./stateDiagram-AJRCARHV-BEJW-_HK.js`);return{diagram:e}},__vite__mapDeps([57,1,2,3,4,5,14,15,16,6,7,23,8,9,10,11,24,58,12,13]),import.meta.url);return{id:ZC,diagram:e}},`loader`)},$C=`stateDiagram`,ew={id:$C,detector:r((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer===`dagre-wrapper`),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./stateDiagram-v2-BHNVJYJU-Bo19-vKE.js`);return{diagram:e}},__vite__mapDeps([59,1,2,3,4,5,23,8,9,10,11,24,58,12,13,14,15,16]),import.meta.url);return{id:$C,diagram:e}},`loader`)},tw=`journey`,nw={id:tw,detector:r(e=>/^\s*journey/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./journeyDiagram-JHISSGLW-C-j_GoJi.js`);return{diagram:e}},__vite__mapDeps([60,1,2,49,5,15,25,20]),import.meta.url);return{id:tw,diagram:e}},`loader`)},rw={draw:r((e,t,r)=>{n.debug(`rendering svg for syntax error
75
- `);let i=zv(t),a=i.append(`g`);i.attr(`viewBox`,`0 0 2412 512`),C(i,100,512,!0),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z`),a.append(`text`).attr(`class`,`error-text`).attr(`x`,1440).attr(`y`,250).attr(`font-size`,`150px`).style(`text-anchor`,`middle`).text(`Syntax error in text`),a.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${r}`)},`draw`)},iw=rw,aw={db:{},renderer:rw,parser:{parse:r(()=>{},`parse`)}},ow=`flowchart-elk`,sw={id:ow,detector:r((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer===`elk`?(t.layout=`elk`,!0):!1,`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./flowDiagram-I6XJVG4X-DaguIeM_.js`);return{diagram:e}},__vite__mapDeps([21,1,2,3,4,5,22,23,8,9,10,11,24,12,25,13,14,15,16,20]),import.meta.url);return{id:ow,diagram:e}},`loader`)},cw=`timeline`,lw={id:cw,detector:r(e=>/^\s*timeline/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./timeline-definition-PNZ67QCA-C4KTq0mQ.js`);return{diagram:e}},__vite__mapDeps([61,1,2,49,5,15,4]),import.meta.url);return{id:cw,diagram:e}},`loader`)},uw=`mindmap`,dw={id:uw,detector:r(e=>/^\s*mindmap/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./mindmap-definition-RKZ34NQL-CPJIWJdQ.js`);return{diagram:e}},__vite__mapDeps([62,1,2,3,4,5,23,8,9,10,11,24,12,13,14,15,16]),import.meta.url);return{id:uw,diagram:e}},`loader`)},fw=`kanban`,pw={id:fw,detector:r(e=>/^\s*kanban/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./kanban-definition-UN3LZRKU-DlYha85J.js`);return{diagram:e}},__vite__mapDeps([63,1,2,3,4,5,8,9,10,11,25]),import.meta.url);return{id:fw,diagram:e}},`loader`)},mw=`sankey`,hw={id:mw,detector:r(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./sankeyDiagram-5OEKKPKP-V2yvk-0Z.js`);return{diagram:e}},__vite__mapDeps([64,1,2,48,45]),import.meta.url);return{id:mw,diagram:e}},`loader`)},gw=`packet`,_w={id:gw,detector:r(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./diagram-LMA3HP47-BtdvpqaH.js`);return{diagram:e}},__vite__mapDeps([65,1,2,28,29,30,31,32,33,34,35,36,37,38,39,4,5,40]),import.meta.url);return{id:gw,diagram:e}},`loader`)},vw=`radar`,yw={id:vw,detector:r(e=>/^\s*radar-beta/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./diagram-2AECGRRQ-rJMnDhBW.js`);return{diagram:e}},__vite__mapDeps([66,1,2,28,29,30,31,32,33,34,35,36,37,38,39,4,5,40]),import.meta.url);return{id:vw,diagram:e}},`loader`)},bw=`block`,xw={id:bw,detector:r(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./blockDiagram-GPEHLZMM-CCWTkWe6.js`);return{diagram:e}},__vite__mapDeps([67,1,2,3,4,5,14,15,16,7,22,12,25,9]),import.meta.url);return{id:bw,diagram:e}},`loader`)},Sw=`treeView`,Cw={id:Sw,detector:r(e=>/^\s*treeView-beta/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./diagram-5GNKFQAL-diIxjA-v.js`);return{diagram:e}},__vite__mapDeps([68,1,2,28,29,30,31,32,33,34,35,36,37,38,39,4,5,40,41]),import.meta.url);return{id:Sw,diagram:e}},`loader`)},ww=`architecture`,Tw={id:ww,detector:r(e=>/^\s*architecture/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./architectureDiagram-3BPJPVTR-DLNRxqTW.js`);return{diagram:e}},__vite__mapDeps([69,1,2,3,4,5,28,29,30,31,32,33,34,35,36,37,38,39,18,40]),import.meta.url);return{id:ww,diagram:e}},`loader`)},Ew=`eventmodeling`,Dw={id:Ew,detector:r(e=>/^\s*eventmodeling/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./diagram-KO2AKTUF-D9IYocVR.js`);return{diagram:e}},__vite__mapDeps([70,1,2,30,28,29,31,32,33,34,35,36,37,38,39,4,5,40]),import.meta.url);return{id:Ew,diagram:e}},`loader`)},Ow=`ishikawa`,kw={id:Ow,detector:r(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./ishikawaDiagram-YF4QCWOH-CaZCrUUR.js`);return{diagram:e}},__vite__mapDeps([71,1,2,4,5,11]),import.meta.url);return{id:Ow,diagram:e}},`loader`)},Aw=`venn`,jw={id:Aw,detector:r(e=>/^\s*venn-beta/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./vennDiagram-CIIHVFJN-1jmBZPSZ.js`);return{diagram:e}},__vite__mapDeps([72,1,2,4,5,11]),import.meta.url);return{id:Aw,diagram:e}},`loader`)},Mw=`treemap`,Nw={id:Mw,detector:r(e=>/^\s*treemap/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./diagram-OG6HWLK6-CaRkxDoj.js`);return{diagram:e}},__vite__mapDeps([73,1,2,28,29,30,31,32,33,34,35,36,37,38,39,44,48,45,4,5,23,40,10]),import.meta.url);return{id:Mw,diagram:e}},`loader`)},Pw=`wardley-beta`,Fw={id:Pw,detector:r(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./wardleyDiagram-YWT4CUSO-A8XYzYTW.js`);return{diagram:e}},__vite__mapDeps([74,1,2,28,29,30,31,32,33,34,35,36,37,38,39,4,5,40]),import.meta.url);return{id:Pw,diagram:e}},`loader`)},Iw=!1,Lw=r(()=>{Iw||(Iw=!0,f(`error`,aw,e=>e.toLowerCase().trim()===`error`),f(`---`,{db:{clear:r(()=>{},`clear`)},styles:{},renderer:{draw:r(()=>{},`draw`)},parser:{parse:r(()=>{throw 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:r(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),p(sw,dw,Tw),p(wC,pw,XC,JC,AC,PC,IC,RC,WC,KC,OC,EC,lw,MC,ew,QC,nw,BC,hw,_w,HC,xw,Dw,Cw,yw,kw,Nw,jw,Fw))},`addDiagrams`),Rw=r(async()=>{n.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(ee).map(async([e,{detector:t,loader:r}])=>{if(r)try{h(e)}catch{try{let{diagram:e,id:n}=await r();f(n,e,t)}catch(t){throw n.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete ee[e],t}}}))).filter(e=>e.status===`rejected`);if(e.length>0){n.error(`Failed to load ${e.length} external diagrams`);for(let t of e)n.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),zw=`graphics-document document`;function Bw(e,t){e.attr(`role`,zw),t!==``&&e.attr(`aria-roledescription`,t)}r(Bw,`setA11yDiagramInfo`);function Vw(e,t,n,r){if(e.insert!==void 0){if(n){let t=`chart-desc-${r}`;e.attr(`aria-describedby`,t),e.insert(`desc`,`:first-child`).attr(`id`,t).text(n)}if(t){let n=`chart-title-${r}`;e.attr(`aria-labelledby`,n),e.insert(`title`,`:first-child`).attr(`id`,n).text(t)}}}r(Vw,`addSVGa11yTitleDescription`);var Hw=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{r(this,`Diagram`)}static async fromText(t,n={}){let r=S(),i=te(t,r);t=pe(t)+`
76
- `;try{h(i)}catch{let e=c(i);if(!e)throw new O(`Diagram ${i} not found.`);let{id:t,diagram:n}=await e();f(t,n)}let{db:a,parser:o,renderer:s,init:l}=h(i);return o.parser&&(o.parser.yy=a),a.clear?.(),l?.(r),n.title&&a.setDiagramTitle?.(n.title),await o.parse(t),new e(i,t,a,o,s)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},Uw=[],Ww=r(()=>{Uw.forEach(e=>{e()}),Uw=[]},`attachFunctions`),Gw=r(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,``).trimStart(),`cleanupComments`);function Kw(e){let t=e.match(x);if(!t)return{text:e,metadata:{}};let n=CS(t[1],{schema:SS})??{};n=typeof n==`object`&&!Array.isArray(n)?n:{};let r={};return n.displayMode&&(r.displayMode=n.displayMode.toString()),n.title&&(r.title=n.title.toString()),n.config&&(r.config=n.config),{text:e.slice(t[0].length),metadata:r}}r(Kw,`extractFrontMatter`);var qw=r(e=>e.replace(/\r\n?/g,`
77
- `).replace(/<(\w+)([^>]*)>/g,(e,t,n)=>`<`+t+n.replace(/="([^"]*)"/g,`='$1'`)+`>`),`cleanupText`),Jw=r(e=>{let{text:t,metadata:n}=Kw(e),{displayMode:r,title:i,config:a={}}=n;return r&&(a.gantt||={},a.gantt.displayMode=r),{title:i,config:a,text:t}},`processFrontmatter`),Yw=r(e=>{let t=ue.detectInit(e)??{},n=ue.detectDirective(e,`wrap`);return Array.isArray(n)?t.wrap=n.some(({type:e})=>e===`wrap`):n?.type===`wrap`&&(t.wrap=!0),{text:de(e),directive:t}},`processDirectives`);function Xw(e){let t=Jw(qw(e)),n=Yw(t.text),r=fe(t.config,n.directive);return e=Gw(n.text),{code:e,title:t.title,config:r}}r(Xw,`preprocessDiagram`);function Zw(e){let t=new TextEncoder().encode(e),n=Array.from(t,e=>String.fromCodePoint(e)).join(``);return btoa(n)}r(Zw,`toBase64`);var Qw=5e4,$w=`graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa`,eT=`sandbox`,tT=`loose`,nT=`http://www.w3.org/2000/svg`,rT=`http://www.w3.org/1999/xlink`,iT=`http://www.w3.org/1999/xhtml`,aT=`100%`,oT=`100%`,sT=`border:0;margin:0;`,cT=`margin:0`,lT=`allow-top-navigation-by-user-activation allow-popups`,uT=`The "iframe" tag is not supported by your browser.`,dT=[`foreignobject`],fT=[`dominant-baseline`];function pT(e){let t=Xw(e);return u(),D(t.config??{}),t}r(pT,`processAndSetConfigs`);async function mT(e,t){Lw();try{let{code:t,config:n}=pT(e);return{diagramType:(await ET(t)).type,config:n}}catch(e){if(t?.suppressErrors)return!1;throw e}}r(mT,`parse`);var hT=r((e,t,n=[])=>`.${e} ${t} ${d(`{ ${n.join(` !important; `)} !important; }`)}`,`cssImportantStyles`),gT=r((e,t=new Map)=>{let n=new CSSStyleSheet;if(e.fontFamily!==void 0&&n.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,n.cssRules.length),e.altFontFamily!==void 0&&n.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,n.cssRules.length),t instanceof Map){let r=g(e)?[`> *`,`span`]:[`rect`,`polygon`,`ellipse`,`circle`,`path`];t.forEach(e=>{TS(e.styles)||r.forEach(t=>{n.insertRule(hT(e.id,t,e.styles),n.cssRules.length)}),TS(e.textStyles)||n.insertRule(hT(e.id,`tspan`,(e?.textStyles||[]).map(e=>e.replace(`color`,`fill`))),n.cssRules.length)})}let r=``;if(e.themeCSS!==void 0)if(typeof n.replaceSync==`function`){let t=new CSSStyleSheet;t.replaceSync(e.themeCSS),r=E(t)+`
78
- `}else r+=`${e.themeCSS}
79
- `;return r+E(n)},`createCssStyles`),_T=r((e,t)=>bC(hC(`${e}{${t}}`),SC([r(function(t,r,i,a){if(t.type===`rule`&&Array.isArray(t.props)){if(t.parent&&t.parent.type===`@keyframes`)return;t.props=t.props.map(t=>t.startsWith(e)?t:`${e} ${t}`)}else t.type.startsWith(`@`)&&([`@media`,`@supports`,`@layer`,`@scope`,`@container`,`@starting-style`,`@keyframes`].includes(t.type)||(n.warn(`Removing unsupported at-rule ${t.type} from CSS`),t.type=jS))},`addNamespace`),xC])),`compileCSS`),vT=r((e,t,n,r)=>_T(r,y(t,gT(e,n),{...e.themeVariables,theme:e.theme,look:e.look},r)),`createUserStyles`),yT=r((e=``,t,n)=>{let r=e;return!n&&!t&&(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,`marker-end="url(#`)),r=se(r),r=r.replace(/<br>/g,`<br/>`),r},`cleanUpSvgCode`),bT=r((e=``,t)=>`<iframe style="width:${aT};height:${t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+`px`:oT};${sT}" src="data:text/html;charset=UTF-8;base64,${Zw(`<body style="${cT}">${e}</body>`)}" sandbox="${lT}">
80
- ${uT}
81
- </iframe>`,`putIntoIFrame`),xT=r((e,t,n,r,i)=>{let a=e.append(`div`);a.attr(`id`,n),r&&a.attr(`style`,r);let o=a.append(`svg`).attr(`id`,t).attr(`width`,`100%`).attr(`xmlns`,nT);return i&&o.attr(`xmlns:xlink`,i),o.append(`g`),e},`appendDivSvgG`);function ST(e,t){return e.append(`iframe`).attr(`id`,t).attr(`style`,`width: 100%; height: 100%;`).attr(`sandbox`,``)}r(ST,`sandboxedIframe`);var CT=r((e,t,n,r)=>{e.getElementById(t)?.remove(),e.getElementById(n)?.remove(),e.getElementById(r)?.remove()},`removeExistingElements`),wT=r(async function(e,t,a){Lw();let o=pT(t);t=o.code;let s=S();n.debug(s),t.length>(s?.maxTextSize??Qw)&&(t=$w);let c=`#${e}`,l=`i`+e,u=`#`+l,d=`d`+e,f=`#`+d,p=r(()=>{let e=i(h?u:f).node();e&&`remove`in e&&e.remove()},`removeTempElements`),m=i(document.body),h=s.securityLevel===eT,g=s.securityLevel===tT,_=s.fontFamily;a===void 0?(CT(document,e,d,l),h?(m=i(ST(i(document.body),l).nodes()[0].contentDocument.body),m.node().style.margin=`0`):m=i(`body`),xT(m,e,d)):(a&&(a.innerHTML=``),h?(m=i(ST(i(a),l).nodes()[0].contentDocument.body),m.node().style.margin=`0`):m=i(a),xT(m,e,d,`font-family: ${_}`,rT));let v,y;try{v=await Hw.fromText(t,{title:o.title})}catch(e){if(s.suppressErrorRendering)throw p(),e;v=await Hw.fromText(`error`),y=e}let b=m.select(f).node(),x=v.type,C=b.firstChild,E=C.firstChild,ee=v.renderer.getClasses?.(t,v),D=vT(s,x,ee,c),te=document.createElement(`style`);te.innerHTML=D,C.insertBefore(te,E);try{await v.renderer.draw(t,e,`11.15.0`,v)}catch(n){throw s.suppressErrorRendering?p():iw.draw(t,e,`11.15.0`),n}let ne=m.select(`${f} svg`),re=v.db.getAccTitle?.(),ie=v.db.getAccDescription?.();DT(x,ne,re,ie),m.select(`[id="${e}"]`).selectAll(`foreignobject > *`).attr(`xmlns`,iT);let O=m.select(f).node().innerHTML;if(n.debug(`config.arrowMarkerAbsolute`,s.arrowMarkerAbsolute),O=yT(O,h,T(s.arrowMarkerAbsolute)),h){let e=m.select(f+` svg`).node();O=bT(O,e)}else g||(O=w.sanitize(O,{ADD_TAGS:dT,ADD_ATTR:fT,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Ww(),y)throw y;return p(),{diagramType:x,svg:O,bindFunctions:v.db.bindFunctions}},`render`);function TT(t={}){let n=re({},t);n?.fontFamily&&!n.themeVariables?.fontFamily&&(n.themeVariables||={},n.themeVariables.fontFamily=n.fontFamily),_(n),n?.theme&&n.theme in b?n.themeVariables=b[n.theme].getThemeVariables(n.themeVariables):n&&(n.themeVariables=b.default.getThemeVariables(n.themeVariables)),e((typeof n==`object`?ne(n):l()).logLevel),Lw()}r(TT,`initialize`);var ET=r((e,t={})=>{let{code:n}=Xw(e);return Hw.fromText(n,t)},`getDiagramFromText`);function DT(e,t,n,r){Bw(t,e),Vw(t,n,r,t.attr(`id`))}r(DT,`addA11yInfo`);var OT=Object.freeze({render:wT,parse:mT,getDiagramFromText:ET,initialize:TT,getConfig:S,setConfig:v,getSiteConfig:l,updateSiteConfig:m,reset:r(()=>{u()},`reset`),globalReset:r(()=>{u(k)},`globalReset`),defaultConfig:k});e(S().logLevel),u(S());var kT=r((e,t,r)=>{n.warn(e),A(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},`handleError`),AT=r(async function(e={querySelector:`.mermaid`}){try{await jT(e)}catch(t){if(A(t)&&n.error(t.str),HT.parseError&&HT.parseError(t),!e.suppressErrors)throw n.error(`Use the suppressErrors option to suppress these errors`),t}},`run`),jT=r(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:`.mermaid`}){let i=OT.getConfig();n.debug(`${e?``:`No `}Callback function found`);let a;if(r)a=r;else if(t)a=document.querySelectorAll(t);else throw Error(`Nodes and querySelector are both undefined`);n.debug(`Found ${a.length} diagrams`),i?.startOnLoad!==void 0&&(n.debug(`Start On Load: `+i?.startOnLoad),OT.updateSiteConfig({startOnLoad:i?.startOnLoad}));let o=new ue.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),s,c=[];for(let t of Array.from(a)){if(n.info(`Rendering diagram: `+t.id),t.getAttribute(`data-processed`))continue;t.setAttribute(`data-processed`,`true`);let r=`mermaid-${o.next()}`;s=t.innerHTML,s=_e(ue.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,`<br/>`);let i=ue.detectInit(s);i&&n.debug(`Detected early reinit: `,i);try{let{svg:n,bindFunctions:i}=await VT(r,s,t);t.innerHTML=n,e&&await e(r),i&&i(t)}catch(e){kT(e,c,HT.parseError)}}if(c.length>0)throw c[0]},`runThrowsErrors`),MT=r(function(e){OT.initialize(e)},`initialize`),NT=r(async function(e,t,r){n.warn(`mermaid.init is deprecated. Please use run instead.`),e&&MT(e);let i={postRenderCallback:r,querySelector:`.mermaid`};typeof t==`string`?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await AT(i)},`init`),PT=r(async(e,{lazyLoad:t=!0}={})=>{Lw(),p(...e),t===!1&&await Rw()},`registerExternalDiagrams`),FT=r(function(){if(HT.startOnLoad){let{startOnLoad:e}=OT.getConfig();e&&HT.run().catch(e=>n.error(`Mermaid failed to initialize`,e))}},`contentLoaded`);typeof document<`u`&&window.addEventListener(`load`,FT,!1);var IT=r(function(e){HT.parseError=e},`setParseErrorHandler`),LT=[],RT=!1,zT=r(async()=>{if(!RT){for(RT=!0;LT.length>0;){let e=LT.shift();if(e)try{await e()}catch(e){n.error(`Error executing queue`,e)}}RT=!1}},`executeQueue`),BT=r(async(e,t)=>new Promise((i,a)=>{let o=r(()=>new Promise((r,o)=>{OT.parse(e,t).then(e=>{r(e),i(e)},e=>{n.error(`Error parsing`,e),HT.parseError?.(e),o(e),a(e)})}),`performCall`);LT.push(o),zT().catch(a)}),`parse`),VT=r((e,t,i)=>new Promise((a,o)=>{let s=r(()=>new Promise((r,s)=>{OT.render(e,t,i).then(e=>{r(e),a(e)},e=>{n.error(`Error parsing`,e),HT.parseError?.(e),s(e),o(e)})}),`performCall`);LT.push(s),zT().catch(o)}),`render`),HT={startOnLoad:!0,mermaidAPI:OT,parse:BT,render:VT,init:NT,run:AT,registerExternalDiagrams:PT,registerLayoutLoaders:OS,initialize:MT,parseError:void 0,contentLoaded:FT,setParseErrorHandler:IT,detectType:te,registerIconPacks:ge,getRegisteredDiagramsMetadata:r(()=>Object.keys(ee).map(e=>({id:e})),`getRegisteredDiagramsMetadata`)},UT=HT;UT.initialize({startOnLoad:!1,securityLevel:`strict`,theme:`base`,themeVariables:{background:`transparent`,mainBkg:`#050505`,primaryColor:`#050505`,primaryBorderColor:`#2a2a2a`,primaryTextColor:`#ffffff`,lineColor:`#c084fc`,secondaryColor:`#101010`,tertiaryColor:`#000000`,fontFamily:`JetBrains Mono Variable, ui-monospace, monospace`}});function WT({chart:e}){let t=(0,j.useId)().replaceAll(`:`,``),[n,r]=(0,j.useState)(null),[i,a]=(0,j.useState)(null);return(0,j.useEffect)(()=>{let n=!1;return r(null),a(null),UT.render(`mermaid-${t}`,e).then(({svg:e})=>{n||r(e)}).catch(e=>{n||a(e instanceof Error?e.message:String(e))}),()=>{n=!0}},[e,t]),i?(0,M.jsx)(`pre`,{className:`my-2 overflow-auto border border-err p-3 text-[11px] text-err`,children:i}):n?(0,M.jsx)(`div`,{className:`mermaid-host panel my-3 overflow-auto p-3`,dangerouslySetInnerHTML:{__html:n}}):(0,M.jsx)(`div`,{className:`panel my-2 p-3 text-xs text-muted`,children:`rendering diagram…`})}var GT=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function KT(e){return qT(e)}function qT(e){return Array.isArray(e)?JT(e):e instanceof RegExp?e:typeof e==`object`?YT(e):e}function JT(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=qT(e[n]);return t}function YT(e){let t={};for(let n in e)t[n]=qT(e[n]);return t}function XT(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function ZT(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?ZT(e.substring(0,e.length-1)):e.substr(~t+1)}var QT=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,$T=class{static hasCaptures(e){return e===null?!1:(QT.lastIndex=0,QT.test(e))}static replaceCaptures(e,t,n){return e.replace(QT,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function eE(e,t){return e<t?-1:+(e>t)}function tE(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=eE(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function nE(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function rE(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var iE=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},aE=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(uE(e),t)}static createFromParsedTheme(e,t){return pE(e,t)}_cachedMatchRoot=new iE(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>sE(e.parent,t.parentScopes));return n?new lE(n.fontStyle,n.foreground,n.background):null}},oE=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function sE(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!cE(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function cE(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var lE=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function uE(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8;break}}let s=null;typeof i.settings.foreground==`string`&&nE(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&nE(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new dE(l,u,e,o,s,c)}}return n}var dE=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},fE=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(fE||{});function pE(e,t){e.sort((e,t)=>{let n=eE(e.scope,t.scope);return n!==0||(n=tE(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new mE(t),o=new lE(n,a.getId(r),a.getId(i)),s=new _E(new gE(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new aE(a,o,s)}var mE=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},hE=Object.freeze([]),gE=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||hE,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},_E=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),gE.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(tE(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new gE(e,t,n,r,i))}},vE=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!=0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=bE(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function yE(e){return e}function bE(e){return e}function xE(e,t){let n=[],r=CE(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(SE(i)){let e=[];do e.push(i),i=r.next();while(SE(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function SE(e){return!!e&&!!e.match(/[\w\.:]+/)}function CE(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function wE(e){typeof e.dispose==`function`&&e.dispose()}var TE=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},EE=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},DE=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},OE=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new TE(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new DE;for(let n of e)kE(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof TE){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function kE(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof TE?jE({baseGrammar:a,selfGrammar:i},r):AE(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new TE(e))}function AE(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];ME([r],t,n)}}function jE(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&ME(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&ME(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function ME(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?XT({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&ME(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=RE(i);switch(a.kind){case 0:jE({...t,selfGrammar:t.baseGrammar},n);break;case 1:jE(t,n);break;case 2:AE(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?AE(a.ruleName,i,n):jE(i,n)}else a.kind===4?n.add(new EE(a.scopeName,a.ruleName)):n.add(new TE(a.scopeName));break}}}var NE=class{kind=0},PE=class{kind=1},FE=class{constructor(e){this.ruleName=e}kind=2},IE=class{constructor(e){this.scopeName=e}kind=3},LE=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function RE(e){if(e===`$base`)return new NE;if(e===`$self`)return new PE;let t=e.indexOf(`#`);return t===-1?new IE(e):t===0?new FE(e.substring(1)):new LE(e.substring(0,t),e.substring(t+1))}var zE=/\\(\d+)/,BE=/\\(\d+)/g,VE=-1,HE=-2;function UE(e){return e}function WE(e){return e}var GE=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=$T.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=$T.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${ZT(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:$T.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:$T.replaceCaptures(this._contentName,e,t)}},KE=class extends GE{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},qE=class extends GE{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new QE(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new $E,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},JE=class extends GE{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new $E,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},YE=class extends GE{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new QE(i,this.id),this.beginCaptures=a,this._end=new QE(o||`￿`,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new $E;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},XE=class extends GE{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new QE(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new QE(o,HE),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new $E;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new $E,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},ZE=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new KE(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new qE(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=XT({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new JE(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new XE(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new YE(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=RE(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof JE||e instanceof YE||e instanceof XE)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},QE=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=zE.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return BE.lastIndex=0,this.source.replace(BE,(e,t)=>rE(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=`￿`,t[i+1]=`￿`,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=`￿`,t[i+1]=`G`,n[i+1]=`￿`,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},$E=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new eD(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new eD(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},eD=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
82
- `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},tD=class{constructor(e,t){this.languageId=e,this.tokenType=t}},nD=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new tD(e,8),this._embeddedLanguagesMatcher=new rD(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new tD(0,0);_getBasicScopeAttributes=new iE(e=>new tD(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},rD=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>rE(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var iD=!1,aD=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function oD(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=sD(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new aD(i,!0);f()}return new aD(i,!1);function f(){let o=cD(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===VE){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),mD(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof YE){let r=o;mD(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof XE){let r=o;mD(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(mD(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function sD(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof XE&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=fD(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==HE){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),mD(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function cD(e,t,n,r,i,a){let o=lD(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=uD(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function lD(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=dD(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function uD(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=dD(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function dD(e,t,n,r,i){return iD?{ruleScanner:e.compile(t,n),findOptions:pD(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function fD(e,t,n,r,i){return iD?{ruleScanner:e.compileWhile(t,n),findOptions:pD(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function pD(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function mD(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));oD(e,p,n&&d.start===0,d.start,f,i,!1,0),wE(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new hD(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var hD=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function gD(e,t,n,r,i,a,o,s){return new bD(e,t,n,r,i,a,o,s)}function _D(e,t,n,r,i){let a=xE(t,vD),o=ZE.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function vD(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(yD(t[r],e))return n=r+1,!0;return!1})}function yD(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var bD=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new nD(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=xD(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=xE(e,vD);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)_D(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&_D(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(UE(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[WE(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=xD(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=ZE.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===CD.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=vE.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?SD.createRootAndLookUpScopeName(a,r,this):SD.createRoot(`unknown`,r),t=new CD(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
83
- `;let a=this.createOnigString(e),o=a.content.length,s=new TD(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=oD(this,a,i,0,t,s,!0,r);return wE(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function xD(e,t){return e=KT(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var SD=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=oE.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new oE(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new oE(null,t),o=r.themeProvider.themeMatch(a);return new e(null,a,e.mergeAttributes(n,i,o))}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),vE.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a);return new e(t,a,e.mergeAttributes(t.tokenAttributes,i,o))}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},CD=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?SD.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:WE(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=SD.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,UE(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,SD.fromExtension(r,n.contentNameScopesList))}},wD=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):xE(e,vD).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>xE(e,vD).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},TD=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=vE.set(n,0,yE(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=vE.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},ED=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,gD(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},DD=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new ED(aE.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(aE.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new wD(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new OE(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},OD=CD.NULL,kD=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],AD=/["&'<>`]/g,jD=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,MD=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,ND=/[|\\{}()[\]^$+*?.]/g,PD=new WeakMap;function FD(e,t){if(e=e.replace(t.subset?ID(t.subset):AD,r),t.subset||t.escapeOnly)return e;return e.replace(jD,n).replace(MD,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function ID(e){let t=PD.get(e);return t||(t=LD(e),PD.set(e,t)),t}function LD(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(ND,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var RD=/[\dA-Fa-f]/;function zD(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!RD.test(String.fromCharCode(t))?r:r+`;`}var BD=/\d/;function VD(e,t,n){let r=`&#`+String(e);return n&&t&&!BD.test(String.fromCharCode(t))?r:r+`;`}var HD=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),UD={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},WD=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],GD={}.hasOwnProperty,KD={},qD;for(qD in UD)GD.call(UD,qD)&&(KD[UD[qD]]=qD);var JD=/[^\dA-Za-z]/;function YD(e,t,n,r){let i=String.fromCharCode(e);if(GD.call(KD,i)){let e=KD[i],a=`&`+e;return n&&HD.includes(e)&&!WD.includes(e)&&(!r||t&&t!==61&&JD.test(String.fromCharCode(t)))?a:a+`;`}return``}function XD(e,t,n){let r=zD(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=YD(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=VD(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function ZD(e,t){return FD(e,Object.assign({format:XD},t))}var QD=/^>|^->|<!--|-->|--!>|<!-$/g,$D=[`>`],eO=[`<`,`>`];function tO(e,t,n,r){return r.settings.bogusComments?`<?`+ZD(e.value,Object.assign({},r.settings.characterReferences,{subset:$D}))+`>`:`<!--`+e.value.replace(QD,i)+`-->`;function i(e){return ZD(e,Object.assign({},r.settings.characterReferences,{subset:eO}))}}function nO(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var rO=oO(1),iO=oO(-1),aO=[];function oO(e){return t;function t(t,n,r){let i=t?t.children:aO,a=(n||0)+e,o=i[a];if(!r)for(;o&&ml(o);)a+=e,o=i[a];return o}}var sO={}.hasOwnProperty;function cO(e){return t;function t(t,n,r){return sO.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var lO=cO({body:fO,caption:uO,colgroup:uO,dd:gO,dt:hO,head:uO,html:dO,li:mO,optgroup:vO,option:yO,p:pO,rp:_O,rt:_O,tbody:xO,td:wO,tfoot:SO,th:wO,thead:bO,tr:CO});function uO(e,t,n){let r=rO(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&ml(r.value.charAt(0)))}function dO(e,t,n){let r=rO(n,t);return!r||r.type!==`comment`}function fO(e,t,n){let r=rO(n,t);return!r||r.type!==`comment`}function pO(e,t,n){let r=rO(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function mO(e,t,n){let r=rO(n,t);return!r||r.type===`element`&&r.tagName===`li`}function hO(e,t,n){let r=rO(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function gO(e,t,n){let r=rO(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function _O(e,t,n){let r=rO(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function vO(e,t,n){let r=rO(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function yO(e,t,n){let r=rO(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function bO(e,t,n){let r=rO(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function xO(e,t,n){let r=rO(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function SO(e,t,n){return!rO(n,t)}function CO(e,t,n){let r=rO(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function wO(e,t,n){let r=rO(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var TO=cO({body:OO,colgroup:kO,head:DO,html:EO,tbody:AO});function EO(e){let t=rO(e,-1);return!t||t.type!==`comment`}function DO(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function OO(e){let t=rO(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&ml(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function kO(e,t,n){let r=iO(n,t),i=rO(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&lO(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function AO(e,t,n){let r=iO(n,t),i=rO(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&lO(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var jO={name:[[`
84
- \f\r &/=>`.split(``),`
85
- \f\r "&'/=>\``.split(``)],[`\0
86
- \f\r "&'/<=>`.split(``),`\0
87
- \f\r "&'/<=>\``.split(``)]],unquoted:[[`
88
- \f\r &>`.split(``),`\0
89
- \f\r "&'<=>\``.split(``)],[`\0
90
- \f\r "&'<=>\``.split(``),`\0
91
- \f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function MO(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=G);let l=NO(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!TO(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!lO(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function NO(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=PO(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function PO(e,t,n){let r=H(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=ZD(r.attribute,Object.assign({},e.settings.characterReferences,{subset:jO.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?cl:Wl)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=ZD(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:jO.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&Lh(n,o)>Lh(n,e.alternative)&&(o=e.alternative),s=o+ZD(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?jO.single:jO.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var FO=[`<`,`&`];function IO(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:ZD(e.value,Object.assign({},r.settings.characterReferences,{subset:FO}))}function LO(e,t,n,r){return r.settings.allowDangerousHtml?e.value:IO(e,t,n,r)}function RO(e,t,n,r){return r.all(e)}var zO=jg(`type`,{invalid:BO,unknown:VO,handlers:{comment:tO,doctype:nO,element:MO,raw:LO,root:RO,text:IO}});function BO(e){throw Error("Expected node, not `"+e+"`")}function VO(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var HO={},UO={},WO=[];function GO(e,t){let n=t||HO,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:KO,all:qO,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||kD,characterReferences:n.characterReferences||UO,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?G:W,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function KO(e,t,n){return zO(e,t,n,this)}function qO(e){let t=[],n=e&&e.children||WO,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function JO(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function YO(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function XO(e){return Array.isArray(e)?e:[e]}async function ZO(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function QO(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function $O(e){return e===`ansi`||QO(e)}function ek(e){return e===`none`}function tk(e){return ek(e)}function nk(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(/\s+/g);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function rk(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}function ik(e){let t=rk(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function ak(e,t,n){let r=new Set;for(let t of e.matchAll(/:?lang=["']([^"']+)["']/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/(?:```|~~~)([\w-]+)/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/\\begin\{([\w-]+)\}/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return Array.from(r);let i=n.getBundledLanguages();return Array.from(r).filter(e=>e&&i[e])}var ok=`light-dark()`,sk=[`color`,`background-color`];function ck(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function lk(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?ck(e,t):e})):e}function uk(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>dk(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&sk.includes(a))if(r===ok&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new GT('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s;else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function dk(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&fE.Italic&&(t[`font-style`]=`italic`),e.fontStyle&fE.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&fE.Underline&&n.push(`underline`),e.fontStyle&fE.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function fk(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}var pk=new WeakMap;function mk(e,t){pk.set(e,t)}function hk(e){return pk.get(e)}var gk=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(XO(n).map(e=>[e,OD])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return _k(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function _k(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function vk(e,t){if(!(e instanceof gk))throw new GT(`Invalid grammar state`);return e.getInternalStack(t)}function yk(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new GT(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}else{let t=r.lines[e.line];if(t===void 0)throw new GT(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new GT(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}},r=ik(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));bk(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return lk(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new GT(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=xk(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new GT(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new GT(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&nk(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function bk(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new GT(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new GT(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function xk(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(xk).join(``):``}var Sk=[yk()];function Ck(e){let t=wk(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Sk]}function wk(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var Tk=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],Ek={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function Dk(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function Ok(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function kk(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:`resetAll`});else if(r<=9)Ek[r]&&t.push({type:`setDecoration`,value:Ek[r]});else if(r<=29){let e=Ek[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:Tk[r-30]}});else if(r===38){let n=Ok(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:Tk[r-40]}});else if(r===48){let n=Ok(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:Tk[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:Tk[r-100+8]}})}return t}function Ak(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=Dk(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=kk(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var jk={black:`#000000`,red:`#bb0000`,green:`#00bb00`,yellow:`#bbbb00`,blue:`#0000bb`,magenta:`#ff00ff`,cyan:`#00bbbb`,white:`#eeeeee`,brightBlack:`#555555`,brightRed:`#ff5555`,brightGreen:`#00ff00`,brightYellow:`#ffff55`,brightBlue:`#5555ff`,brightMagenta:`#ff55ff`,brightCyan:`#55ffff`,brightWhite:`#ffffff`};function Mk(e=jk){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<Tk.length;e++)r.push(t(Tk[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var Nk={black:`#000000`,red:`#cd3131`,green:`#0DBC79`,yellow:`#E5E510`,blue:`#2472C8`,magenta:`#BC3FBC`,cyan:`#11A8CD`,white:`#E5E5E5`,brightBlack:`#666666`,brightRed:`#F14C4C`,brightGreen:`#23D18B`,brightYellow:`#F5F543`,brightBlue:`#3B8EEA`,brightMagenta:`#D670D6`,brightCyan:`#29B8DB`,brightWhite:`#FFFFFF`};function Pk(e,t,n){let r=JO(e,n),i=rk(t),a=Mk(Object.fromEntries(Tk.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||Nk[t]]}))),o=Ak();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=YO(i,r),o=YO(o,r),n.decorations.has(`dim`)&&(i=Fk(i));let s=fE.None;return n.decorations.has(`bold`)&&(s|=fE.Bold),n.decorations.has(`italic`)&&(s|=fE.Italic),n.decorations.has(`underline`)&&(s|=fE.Underline),n.decorations.has(`strikethrough`)&&(s|=fE.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function Fk(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}else if(e.length===6)return`#${e}80`;else if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}else if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Ik(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||`text`);if(QO(i)||ek(r))return rk(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:a,colorMap:o}=e.setTheme(r);if(i===`ansi`)return Pk(a,t,n);let s=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==s.name)throw new GT(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(a.name))throw new GT(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return Rk(t,s,a,o,n)}function Lk(...e){if(e.length===2)return hk(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(QO(i)||ek(a))throw new GT(`Plain language does not have grammar state`);if(i===`ansi`)throw new GT(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new gk(zk(n,c,o,s,r).stateStack,c.name,o.name)}function Rk(e,t,n,r,i){let a=zk(e,t,n,r,i),o=new gk(a.stateStack,t.name,n.name);return mk(a.tokens,o),a.tokens}function zk(e,t,n,r,i){let a=JO(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=rk(e),l=i.grammarState?vk(i.grammarState,n.name)??OD:i.grammarContextCode==null?OD:zk(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=YO(r[vE.getForeground(s)],a),l=vE.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(/,/).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?Bk(t.scopes):Vk(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function Bk(e){return e.map(e=>({scopeName:e}))}function Vk(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:Wk(e,i,t.slice(0,r))}}return n}function Hk(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function Uk(e,t,n){if(!Hk(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Hk(e[r],n[i])&&--r,--i;return r===-1}function Wk(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(Uk(e,t,n)){r.push(a);break}return r}function Gk(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=Ik(e,t,{...n,theme:r.theme});return{tokens:i,state:hk(i),theme:typeof r.theme==`string`?r.theme:r.theme.name}}),a=Kk(...i.map(e=>e.tokens)),o=a[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(o.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:s,offset:c,...l}=e[t][i];o.variants[r[n].color]=l}),o})),s=i[0].state?new gk(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return s&&mk(o,s),o}function Kk(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}function qk(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new GT("`themes` option must not be empty");let p=Gk(e,t,n);if(c=hk(p),l&&ok!==l&&!f.find(e=>e.color===l))throw new GT(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>uk(e,h,u,l,d))),c&&mk(a,c);let g=f.map(e=>JO(e.theme,n));i=Jk(f,m,g,u,l,`fg`,d),r=Jk(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=JO(n.theme,n);a=Ik(e,t,n);let l=e.getTheme(n.theme);r=YO(l.bg,s),i=YO(l.fg,s),o=l.name,c=hk(a)}else throw new GT("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function Jk(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=YO(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===ok&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new GT('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${YO(t[r][a],n[r])||`inherit`}, ${YO(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function Yk(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>Yk(e,t,n),codeToTokens:(t,n)=>qk(e,t,n)}){let i=t;for(let e of Ck(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=qk(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=Zk(a):d===`never`&&(a=Qk(a)),f&&(a=$k(a));let p={...r,get source(){return i}};for(let e of Ck(n))a=e.tokens?.call(p,a)||a;return Xk(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function Xk(e,t,n,r=hk(e)){let i=Ck(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:nk,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
92
- `}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=fk(a.htmlStyle||dk(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&mk(m,r),m}function Zk(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&fE.Underline||i.fontStyle&fE.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function Qk(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function $k(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=fk(e.htmlStyle||dk(e)),i=fk(n.htmlStyle||dk(n)),a=e.fontStyle&&(e.fontStyle&fE.Underline||e.fontStyle&fE.Strikethrough),o=n.fontStyle&&(n.fontStyle&fE.Underline||n.fontStyle&fE.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var eA=GO;function tA(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>Yk(e,t,n),codeToTokens:(t,n)=>qk(e,t,n)},i=eA(Yk(e,t,n,r));for(let e of Ck(n))i=e.postprocess?.call(r,i,n)||i;return i}var nA={light:`#333333`,dark:`#bbbbbb`},rA={light:`#fffffe`,dark:`#1e1e1e`},iA=`__shiki_resolved`;function aA(e){if(e?.[iA])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?nA.light:nA.dark,n||=t.type===`light`?rA.light:rA.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,iA,{enumerable:!1,writable:!1,value:!0}),t}async function oA(e){return Array.from(new Set((await Promise.all(e.filter(e=>!$O(e)).map(async e=>await ZO(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function sA(e){return(await Promise.all(e.map(async e=>tk(e)?null:aA(await ZO(e))))).filter(e=>!!e)}var cA=3,lA=!1;function uA(e,t=3){if(cA&&!(typeof cA==`number`&&t>cA)){if(lA)throw Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}var dA=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function fA(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new dA(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var pA=class extends DD{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=aA(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=aE.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=fA(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new dA(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},mA=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},hA=0;function gA(e){hA+=1,e.warnings!==!1&&hA>=10&&hA%10==0&&console.warn(`[Shiki] ${hA} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new dA("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(aA),i=new pA(new mA(e.engine,n),r,n,e.langAlias),a;function o(t){return fA(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new dA(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new dA(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await oA(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await sA(e))}function g(){if(t)throw new dA(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--hA)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function _A(e){e.engine||uA("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([sA(e.themes||[]),oA(e.langs||[]),e.engine]);return gA({...e,themes:t,langs:n,engine:r})}async function vA(e){let t=await _A(e);return{getLastGrammarState:(...e)=>Lk(t,...e),codeToTokensBase:(e,n)=>Ik(t,e,n),codeToTokensWithThemes:(e,n)=>Gk(t,e,n),codeToTokens:(e,n)=>qk(t,e,n),codeToHast:(e,n)=>Yk(t,e,n),codeToHtml:(e,n)=>tA(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function yA(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,$O(n))return[];let r=t[n];if(!r)throw new GT(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(tk(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new GT(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await vA({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function bA(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}else{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function xA(e,t){let n=bA(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var SA=[{id:`abap`,name:`ABAP`,import:(()=>s(()=>import(`./abap-KdbeOgWW.js`),[],import.meta.url))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>s(()=>import(`./actionscript-3-3WlWJhVE.js`),[],import.meta.url))},{id:`ada`,name:`Ada`,import:(()=>s(()=>import(`./ada-UX949e0K.js`),[],import.meta.url))},{id:`angular-html`,name:`Angular HTML`,import:(()=>s(()=>import(`./angular-html-BTPgvNVF.js`).then(e=>e.n),__vite__mapDeps([75,1,76,77,78]),import.meta.url))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>s(()=>import(`./angular-ts-DlluasyV.js`),__vite__mapDeps([79,75,1,76,77,78,80]),import.meta.url))},{id:`apache`,name:`Apache Conf`,import:(()=>s(()=>import(`./apache-DRCaPXs2.js`),[],import.meta.url))},{id:`apex`,name:`Apex`,import:(()=>s(()=>import(`./apex-DP1SARVr.js`),[],import.meta.url))},{id:`apl`,name:`APL`,import:(()=>s(()=>import(`./apl-DXNMM5sn.js`),__vite__mapDeps([81,77,1,76,78,82,83,84]),import.meta.url))},{id:`applescript`,name:`AppleScript`,import:(()=>s(()=>import(`./applescript-D9G0c8qw.js`),[],import.meta.url))},{id:`ara`,name:`Ara`,import:(()=>s(()=>import(`./ara-BgeZ4gDq.js`),[],import.meta.url))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>s(()=>import(`./asciidoc-DA7OahK-.js`),[],import.meta.url))},{id:`asm`,name:`Assembly`,import:(()=>s(()=>import(`./asm-jkcfc58s.js`),[],import.meta.url))},{id:`astro`,name:`Astro`,import:(()=>s(()=>import(`./astro-Chivy__8.js`),__vite__mapDeps([85,77,1,78,82,86,87,88]),import.meta.url))},{id:`awk`,name:`AWK`,import:(()=>s(()=>import(`./awk-BwMjoh3C.js`),[],import.meta.url))},{id:`ballerina`,name:`Ballerina`,import:(()=>s(()=>import(`./ballerina-Df6bvtmj.js`),[],import.meta.url))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>s(()=>import(`./bat-D6313cgA.js`),[],import.meta.url))},{id:`beancount`,name:`Beancount`,import:(()=>s(()=>import(`./beancount-DBJ7TpTK.js`),[],import.meta.url))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>s(()=>import(`./berry-BRSrtxoH.js`),[],import.meta.url))},{id:`bibtex`,name:`BibTeX`,import:(()=>s(()=>import(`./bibtex-DWHt0I1s.js`),[],import.meta.url))},{id:`bicep`,name:`Bicep`,import:(()=>s(()=>import(`./bicep-CmLWFcFA.js`),[],import.meta.url))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>s(()=>import(`./bird2-DTXdeZCk.js`),[],import.meta.url))},{id:`blade`,name:`Blade`,import:(()=>s(()=>import(`./blade-CbK4h373.js`),__vite__mapDeps([89,77,1,90,76,78,82,91,83,84]),import.meta.url))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>s(()=>import(`./bsl-CdDFyo5F.js`),__vite__mapDeps([92,93]),import.meta.url))},{id:`c`,name:`C`,import:(()=>s(()=>import(`./c-XAfXzHJL.js`).then(e=>e.n),__vite__mapDeps([94,1]),import.meta.url))},{id:`c3`,name:`C3`,import:(()=>s(()=>import(`./c3-NoRyU2Ya.js`),[],import.meta.url))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>s(()=>import(`./cadence-hUAU7YJY.js`),[],import.meta.url))},{id:`cairo`,name:`Cairo`,import:(()=>s(()=>import(`./cairo-CCizMn05.js`),__vite__mapDeps([95,96]),import.meta.url))},{id:`clarity`,name:`Clarity`,import:(()=>s(()=>import(`./clarity-CZYgpMAM.js`),[],import.meta.url))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>s(()=>import(`./clojure-Cov_fIof.js`),[],import.meta.url))},{id:`cmake`,name:`CMake`,import:(()=>s(()=>import(`./cmake-Ci4NQnAb.js`),[],import.meta.url))},{id:`cobol`,name:`COBOL`,import:(()=>s(()=>import(`./cobol-D99n3iqc.js`),__vite__mapDeps([97,76,1,77,78,84]),import.meta.url))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>s(()=>import(`./codeowners-CojwFqaS.js`),[],import.meta.url))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>s(()=>import(`./codeql-DSYUnmiC.js`),[],import.meta.url))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>s(()=>import(`./coffee-D1LQvIkF.js`),__vite__mapDeps([98,78,1]),import.meta.url))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>s(()=>import(`./common-lisp-DGmU2khh.js`),[],import.meta.url))},{id:`coq`,name:`Coq`,import:(()=>s(()=>import(`./coq-B0d8jPsA.js`),[],import.meta.url))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>s(()=>import(`./cpp-CKg5ZwjL.js`).then(e=>e.n),__vite__mapDeps([99,1,100,94,101,91]),import.meta.url))},{id:`crystal`,name:`Crystal`,import:(()=>s(()=>import(`./crystal-CYzaTz8d.js`),__vite__mapDeps([102,94,1,77,76,78,103,91]),import.meta.url))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>s(()=>import(`./csharp-7zj_5c7P.js`),[],import.meta.url))},{id:`css`,name:`CSS`,import:(()=>s(()=>import(`./css-D6U_Ko9J.js`).then(e=>e.n),__vite__mapDeps([77,1]),import.meta.url))},{id:`csv`,name:`CSV`,import:(()=>s(()=>import(`./csv-C9AlRNbg.js`),[],import.meta.url))},{id:`cue`,name:`CUE`,import:(()=>s(()=>import(`./cue-9Ltq98qN.js`),[],import.meta.url))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>s(()=>import(`./cypher-C6-_SkCs.js`),[],import.meta.url))},{id:`d`,name:`D`,import:(()=>s(()=>import(`./d-BRESyypb.js`),[],import.meta.url))},{id:`dart`,name:`Dart`,import:(()=>s(()=>import(`./dart-6m3pGlVS.js`),[],import.meta.url))},{id:`dax`,name:`DAX`,import:(()=>s(()=>import(`./dax-DSg8tGIm.js`),[],import.meta.url))},{id:`desktop`,name:`Desktop`,import:(()=>s(()=>import(`./desktop-BvBIfhCq.js`),[],import.meta.url))},{id:`diff`,name:`Diff`,import:(()=>s(()=>import(`./diff-CFBZUcgj.js`),[],import.meta.url))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>s(()=>import(`./docker-DhiNHNs9.js`),[],import.meta.url))},{id:`dotenv`,name:`dotEnv`,import:(()=>s(()=>import(`./dotenv-CQ4OwQjk.js`),[],import.meta.url))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>s(()=>import(`./dream-maker-DWc07rTN.js`),[],import.meta.url))},{id:`edge`,name:`Edge`,import:(()=>s(()=>import(`./edge-CkCaSgQh.js`),__vite__mapDeps([104,90,76,1,77,78,88]),import.meta.url))},{id:`elixir`,name:`Elixir`,import:(()=>s(()=>import(`./elixir-CjHA8w1Y.js`),__vite__mapDeps([105,76,1,77,78]),import.meta.url))},{id:`elm`,name:`Elm`,import:(()=>s(()=>import(`./elm-DXIXYSVh.js`),__vite__mapDeps([106,100,1,94]),import.meta.url))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>s(()=>import(`./emacs-lisp-CtWVyDfk.js`),[],import.meta.url))},{id:`erb`,name:`ERB`,import:(()=>s(()=>import(`./erb-CnzDf1w5.js`),__vite__mapDeps([107,76,1,77,78,108,94,99,100,101,91,109,110,87,88,111,112,103,83,84,113]),import.meta.url))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>s(()=>import(`./erlang-CNbCQ89n.js`),__vite__mapDeps([114,115]),import.meta.url))},{id:`fennel`,name:`Fennel`,import:(()=>s(()=>import(`./fennel-pY91A3cM.js`),[],import.meta.url))},{id:`fish`,name:`Fish`,import:(()=>s(()=>import(`./fish-CMqYuwXA.js`),[],import.meta.url))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>s(()=>import(`./fluent-CmVa3NNV.js`),[],import.meta.url))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>s(()=>import(`./fortran-fixed-form-BNQstKjF.js`),__vite__mapDeps([116,117]),import.meta.url))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>s(()=>import(`./fortran-free-form-BnXTqrXt.js`),[],import.meta.url))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>s(()=>import(`./fsharp-CjygqGHI.js`),__vite__mapDeps([118,115]),import.meta.url))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>s(()=>import(`./gdresource-CdJwksfi.js`),__vite__mapDeps([119,120,121]),import.meta.url))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>s(()=>import(`./gdscript-Bv1IS9z0.js`),[],import.meta.url))},{id:`gdshader`,name:`GDShader`,import:(()=>s(()=>import(`./gdshader-DkHuiVRJ.js`),[],import.meta.url))},{id:`genie`,name:`Genie`,import:(()=>s(()=>import(`./genie-n-5G3rfW.js`),[],import.meta.url))},{id:`gherkin`,name:`Gherkin`,import:(()=>s(()=>import(`./gherkin-CspC4QG0.js`),[],import.meta.url))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>s(()=>import(`./git-commit-tF6n3zME.js`),__vite__mapDeps([122,123]),import.meta.url))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>s(()=>import(`./git-rebase-KgX8Og1c.js`),__vite__mapDeps([124,103,1]),import.meta.url))},{id:`gleam`,name:`Gleam`,import:(()=>s(()=>import(`./gleam-BX5i_nxD.js`),[],import.meta.url))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>s(()=>import(`./glimmer-js-BGDyd0fi.js`),__vite__mapDeps([125,77,1,76,78,88]),import.meta.url))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>s(()=>import(`./glimmer-ts-BgpDMnVZ.js`),__vite__mapDeps([126,77,1,76,78,88]),import.meta.url))},{id:`glsl`,name:`GLSL`,import:(()=>s(()=>import(`./glsl-Bjsk2TMh.js`).then(e=>e.n),__vite__mapDeps([100,1,94]),import.meta.url))},{id:`gn`,name:`GN`,import:(()=>s(()=>import(`./gn-DZw9o4Gq.js`),[],import.meta.url))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>s(()=>import(`./gnuplot-CXzBKzj-.js`),[],import.meta.url))},{id:`go`,name:`Go`,import:(()=>s(()=>import(`./go-DrxTzaFE.js`),[],import.meta.url))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>s(()=>import(`./graphql-Cx4kQnkL.js`).then(e=>e.n),__vite__mapDeps([109,1,78,110,87,88]),import.meta.url))},{id:`groovy`,name:`Groovy`,import:(()=>s(()=>import(`./groovy-DL6IQdPy.js`),[],import.meta.url))},{id:`hack`,name:`Hack`,import:(()=>s(()=>import(`./hack-DUr7hpoX.js`),__vite__mapDeps([127,76,1,77,78,91]),import.meta.url))},{id:`haml`,name:`Ruby Haml`,import:(()=>s(()=>import(`./haml-tmAx7Gde.js`).then(e=>e.n),__vite__mapDeps([111,1,77,78]),import.meta.url))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>s(()=>import(`./handlebars-Bjly3GZc.js`),__vite__mapDeps([128,77,1,76,78,113]),import.meta.url))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>s(()=>import(`./haskell-DpD2Pom4.js`),[],import.meta.url))},{id:`haxe`,name:`Haxe`,import:(()=>s(()=>import(`./haxe-C5IMy4J9.js`),[],import.meta.url))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>s(()=>import(`./hcl-CnxdhTif.js`),[],import.meta.url))},{id:`hjson`,name:`Hjson`,import:(()=>s(()=>import(`./hjson-D6z9MXmd.js`),[],import.meta.url))},{id:`hlsl`,name:`HLSL`,import:(()=>s(()=>import(`./hlsl-Bnp3EqHT.js`),[],import.meta.url))},{id:`html`,name:`HTML`,import:(()=>s(()=>import(`./html-Dim8R87k.js`).then(e=>e.n),__vite__mapDeps([76,1,77,78]),import.meta.url))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>s(()=>import(`./html-derivative-wv0mpNga.js`),__vite__mapDeps([90,76,1,77,78]),import.meta.url))},{id:`http`,name:`HTTP`,import:(()=>s(()=>import(`./http-BEgFKWFd.js`),__vite__mapDeps([129,109,1,78,110,87,88,82,103,83,84]),import.meta.url))},{id:`hurl`,name:`Hurl`,import:(()=>s(()=>import(`./hurl-wrVcT4bK.js`),__vite__mapDeps([130,131,109,1,78,110,87,88,83,84]),import.meta.url))},{id:`hxml`,name:`HXML`,import:(()=>s(()=>import(`./hxml-D3FneN50.js`),__vite__mapDeps([132,133]),import.meta.url))},{id:`hy`,name:`Hy`,import:(()=>s(()=>import(`./hy-B3dnkU1O.js`),[],import.meta.url))},{id:`imba`,name:`Imba`,import:(()=>s(()=>import(`./imba-WIgfrEvA.js`),[],import.meta.url))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>s(()=>import(`./ini-WpXUS-oh.js`),[],import.meta.url))},{id:`java`,name:`Java`,import:(()=>s(()=>import(`./java-DCQryRjA.js`).then(e=>e.n),__vite__mapDeps([84,1]),import.meta.url))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>s(()=>import(`./javascript-BL10MWEh.js`).then(e=>e.n),__vite__mapDeps([78,1]),import.meta.url))},{id:`jinja`,name:`Jinja`,import:(()=>s(()=>import(`./jinja-B6phq7Ig.js`),__vite__mapDeps([134,76,1,77,78]),import.meta.url))},{id:`jison`,name:`Jison`,import:(()=>s(()=>import(`./jison-OaSAm_Y-.js`),__vite__mapDeps([135,78,1]),import.meta.url))},{id:`json`,name:`JSON`,import:(()=>s(()=>import(`./json-ByVheYRi.js`).then(e=>e.n),__vite__mapDeps([82,1]),import.meta.url))},{id:`json5`,name:`JSON5`,import:(()=>s(()=>import(`./json5-DWNKCJwi.js`),[],import.meta.url))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>s(()=>import(`./jsonc-CdEpFp1R.js`),[],import.meta.url))},{id:`jsonl`,name:`JSON Lines`,import:(()=>s(()=>import(`./jsonl-B9YUX8Zz.js`),[],import.meta.url))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>s(()=>import(`./jsonnet-BB_Y5U6D.js`),[],import.meta.url))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>s(()=>import(`./jssm-ztQz58D2.js`),[],import.meta.url))},{id:`jsx`,name:`JSX`,import:(()=>s(()=>import(`./jsx-CXM6RMr-.js`).then(e=>e.n),__vite__mapDeps([110,1]),import.meta.url))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>s(()=>import(`./julia-CmDZ9WDU.js`),__vite__mapDeps([136,99,1,100,94,101,91,78,96,137]),import.meta.url))},{id:`just`,name:`Just`,import:(()=>s(()=>import(`./just-CXlTXez_.js`),__vite__mapDeps([138,78,1,139,77,76,91,83,84,96,108,94,99,100,101,109,110,87,88,111,112,103,113]),import.meta.url))},{id:`kdl`,name:`KDL`,import:(()=>s(()=>import(`./kdl-CnTWAnOU.js`),[],import.meta.url))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>s(()=>import(`./kotlin-CEdaY2pE.js`),[],import.meta.url))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>s(()=>import(`./kusto-DDo06G-l.js`),[],import.meta.url))},{id:`latex`,name:`LaTeX`,import:(()=>s(()=>import(`./latex-Dftgeikp.js`),__vite__mapDeps([140,141,137,1]),import.meta.url))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>s(()=>import(`./lean-C4W8O2K9.js`),[],import.meta.url))},{id:`less`,name:`Less`,import:(()=>s(()=>import(`./less-BvF2kiCY.js`),[],import.meta.url))},{id:`liquid`,name:`Liquid`,import:(()=>s(()=>import(`./liquid-DJaAYdFW.js`),__vite__mapDeps([142,77,1,76,78,82]),import.meta.url))},{id:`llvm`,name:`LLVM IR`,import:(()=>s(()=>import(`./llvm-BtLXPzeV.js`),[],import.meta.url))},{id:`log`,name:`Log file`,import:(()=>s(()=>import(`./log-ux9_5OLb.js`),[],import.meta.url))},{id:`logo`,name:`Logo`,import:(()=>s(()=>import(`./logo-BlBVs1Eo.js`),[],import.meta.url))},{id:`lua`,name:`Lua`,import:(()=>s(()=>import(`./lua-DLD2Zr6L.js`).then(e=>e.n),__vite__mapDeps([112,1,94]),import.meta.url))},{id:`luau`,name:`Luau`,import:(()=>s(()=>import(`./luau-DklCyoQG.js`),[],import.meta.url))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>s(()=>import(`./make-DkWIE-Pu.js`),[],import.meta.url))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>s(()=>import(`./markdown-YB84TJfD.js`),[],import.meta.url))},{id:`marko`,name:`Marko`,import:(()=>s(()=>import(`./marko-DT7MtIul.js`),__vite__mapDeps([143,77,1,144,80,88]),import.meta.url))},{id:`matlab`,name:`MATLAB`,import:(()=>s(()=>import(`./matlab-eyjqOB3u.js`),[],import.meta.url))},{id:`mdc`,name:`MDC`,import:(()=>s(()=>import(`./mdc-Sj7HqqlM.js`),__vite__mapDeps([145,90,76,1,77,78,115,113]),import.meta.url))},{id:`mdx`,name:`MDX`,import:(()=>s(()=>import(`./mdx-HMzOIHIt.js`),[],import.meta.url))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>s(()=>import(`./mermaid-IpivAU1W.js`),[],import.meta.url))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>s(()=>import(`./mipsasm-FQCttMQB.js`),[],import.meta.url))},{id:`mojo`,name:`Mojo`,import:(()=>s(()=>import(`./mojo-DO_LVzYO.js`),[],import.meta.url))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>s(()=>import(`./moonbit-CmItaUeq.js`),[],import.meta.url))},{id:`move`,name:`Move`,import:(()=>s(()=>import(`./move-CeYGv5N6.js`),[],import.meta.url))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>s(()=>import(`./narrat-CyEgqgdC.js`),[],import.meta.url))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>s(()=>import(`./nextflow-ORht-cRv.js`),__vite__mapDeps([146,147]),import.meta.url))},{id:`nextflow-groovy`,name:`nextflow-groovy`,import:(()=>s(()=>import(`./nextflow-groovy-oNZt-evu.js`),[],import.meta.url))},{id:`nginx`,name:`Nginx`,import:(()=>s(()=>import(`./nginx-B8SA1rN2.js`),__vite__mapDeps([148,112,1,94]),import.meta.url))},{id:`nim`,name:`Nim`,import:(()=>s(()=>import(`./nim-c4YDKhvV.js`),__vite__mapDeps([149,94,1,77,100,76,78,115,83,84]),import.meta.url))},{id:`nix`,name:`Nix`,import:(()=>s(()=>import(`./nix-BnX2CKzB.js`),[],import.meta.url))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>s(()=>import(`./nushell-CYRTMHZa.js`),[],import.meta.url))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>s(()=>import(`./objective-c-BBkC2fIW.js`),[],import.meta.url))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>s(()=>import(`./objective-cpp-6h-OCXBm.js`),[],import.meta.url))},{id:`ocaml`,name:`OCaml`,import:(()=>s(()=>import(`./ocaml-D9kMWurc.js`),[],import.meta.url))},{id:`odin`,name:`Odin`,import:(()=>s(()=>import(`./odin-DKor8PTs.js`),[],import.meta.url))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>s(()=>import(`./openscad-C9_k9PPP.js`),[],import.meta.url))},{id:`pascal`,name:`Pascal`,import:(()=>s(()=>import(`./pascal-BuRrvbrc.js`),[],import.meta.url))},{id:`perl`,name:`Perl`,import:(()=>s(()=>import(`./perl-Cbj4nRfk.js`),__vite__mapDeps([139,77,1,76,78,91,83,84]),import.meta.url))},{id:`php`,name:`PHP`,import:(()=>s(()=>import(`./php-DrQT-g-m.js`),__vite__mapDeps([150,77,1,76,78,82,91,83,84]),import.meta.url))},{id:`pkl`,name:`Pkl`,import:(()=>s(()=>import(`./pkl-aVb0ESav.js`),[],import.meta.url))},{id:`plsql`,name:`PL/SQL`,import:(()=>s(()=>import(`./plsql-CfyJKao0.js`),[],import.meta.url))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>s(()=>import(`./po-BlGYJCZb.js`),[],import.meta.url))},{id:`polar`,name:`Polar`,import:(()=>s(()=>import(`./polar-BUpphIWw.js`),[],import.meta.url))},{id:`postcss`,name:`PostCSS`,import:(()=>s(()=>import(`./postcss-B05sTlrk.js`),[],import.meta.url))},{id:`powerquery`,name:`PowerQuery`,import:(()=>s(()=>import(`./powerquery-CYophLop.js`),[],import.meta.url))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>s(()=>import(`./powershell-a_hlQtap.js`),[],import.meta.url))},{id:`prisma`,name:`Prisma`,import:(()=>s(()=>import(`./prisma-CdlmpFSA.js`),[],import.meta.url))},{id:`prolog`,name:`Prolog`,import:(()=>s(()=>import(`./prolog-CGqI61Xk.js`),[],import.meta.url))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>s(()=>import(`./proto-BWdEsXnQ.js`),[],import.meta.url))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>s(()=>import(`./pug-BK4UlN0b.js`),__vite__mapDeps([151,77,1,76,78]),import.meta.url))},{id:`puppet`,name:`Puppet`,import:(()=>s(()=>import(`./puppet-6r8jTajy.js`),[],import.meta.url))},{id:`purescript`,name:`PureScript`,import:(()=>s(()=>import(`./purescript-D2zjhXmH.js`),[],import.meta.url))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>s(()=>import(`./python-DdQYuMIU.js`),[],import.meta.url))},{id:`qml`,name:`QML`,import:(()=>s(()=>import(`./qml-BfKmfN_Y.js`),__vite__mapDeps([152,78,1]),import.meta.url))},{id:`qmldir`,name:`QML Directory`,import:(()=>s(()=>import(`./qmldir-CgCLQY8E.js`),[],import.meta.url))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>s(()=>import(`./qss-dTyh7yTV.js`),[],import.meta.url))},{id:`r`,name:`R`,import:(()=>s(()=>import(`./r-BG-aUxp7.js`).then(e=>e.n),__vite__mapDeps([137,1]),import.meta.url))},{id:`racket`,name:`Racket`,import:(()=>s(()=>import(`./racket-UypKzy0j.js`),[],import.meta.url))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>s(()=>import(`./raku-DtRCR4aG.js`),[],import.meta.url))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>s(()=>import(`./razor-gw0eNghw.js`),__vite__mapDeps([153,154,76,1,77,78]),import.meta.url))},{id:`reg`,name:`Windows Registry Script`,import:(()=>s(()=>import(`./reg-CLo2Erzq.js`),[],import.meta.url))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>s(()=>import(`./regexp-DcDCrGpo.js`).then(e=>e.n),__vite__mapDeps([101,1]),import.meta.url))},{id:`rel`,name:`Rel`,import:(()=>s(()=>import(`./rel-mYsn4YLc.js`),[],import.meta.url))},{id:`riscv`,name:`RISC-V`,import:(()=>s(()=>import(`./riscv-BLj4o9M9.js`),[],import.meta.url))},{id:`ron`,name:`RON`,import:(()=>s(()=>import(`./ron-B47UL_2S.js`),[],import.meta.url))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>s(()=>import(`./rosmsg-BLL5cSQT.js`),[],import.meta.url))},{id:`rst`,name:`reStructuredText`,import:(()=>s(()=>import(`./rst-RXpGCPX3.js`),__vite__mapDeps([155,156,99,1,100,94,101,91,90,76,77,78,96,108,109,110,87,88,111,112,103,83,84,113]),import.meta.url))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>s(()=>import(`./ruby-C8G-I-gY.js`),__vite__mapDeps([108,94,1,99,100,101,91,77,109,78,110,87,88,111,76,112,103,83,84,113]),import.meta.url))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>s(()=>import(`./rust-BB34tfhZ.js`),[],import.meta.url))},{id:`sas`,name:`SAS`,import:(()=>s(()=>import(`./sas-BbMHg9d6.js`),__vite__mapDeps([157,91,1]),import.meta.url))},{id:`sass`,name:`Sass`,import:(()=>s(()=>import(`./sass-CK5TQbFO.js`),[],import.meta.url))},{id:`scala`,name:`Scala`,import:(()=>s(()=>import(`./scala-CqcvaPSa.js`),[],import.meta.url))},{id:`scheme`,name:`Scheme`,import:(()=>s(()=>import(`./scheme-BiQA0y8V.js`),[],import.meta.url))},{id:`scss`,name:`SCSS`,import:(()=>s(()=>import(`./scss-Bk85YZ5B.js`).then(e=>e.n),__vite__mapDeps([80,1,77]),import.meta.url))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>s(()=>import(`./sdbl-CFMWR8pX.js`),[],import.meta.url))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>s(()=>import(`./shaderlab-gtHHzeHH.js`),__vite__mapDeps([158,159]),import.meta.url))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>s(()=>import(`./shellscript-D7bH9K7P.js`).then(e=>e.n),__vite__mapDeps([103,1]),import.meta.url))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>s(()=>import(`./shellsession-BxkAMrvC.js`),__vite__mapDeps([160,103,1]),import.meta.url))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>s(()=>import(`./smalltalk-YAUCjzSo.js`),[],import.meta.url))},{id:`solidity`,name:`Solidity`,import:(()=>s(()=>import(`./solidity-B54yhlKd.js`),[],import.meta.url))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>s(()=>import(`./soy-BzuqaVTA.js`),__vite__mapDeps([161,76,1,77,78]),import.meta.url))},{id:`sparql`,name:`SPARQL`,import:(()=>s(()=>import(`./sparql-PRQhoTwI.js`),__vite__mapDeps([162,163]),import.meta.url))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>s(()=>import(`./splunk-DCVCZFIM.js`),[],import.meta.url))},{id:`sql`,name:`SQL`,import:(()=>s(()=>import(`./sql-BJUy431w.js`).then(e=>e.n),__vite__mapDeps([91,1]),import.meta.url))},{id:`ssh-config`,name:`SSH Config`,import:(()=>s(()=>import(`./ssh-config-Bo46VIzm.js`),[],import.meta.url))},{id:`stata`,name:`Stata`,import:(()=>s(()=>import(`./stata-DbL7Ndl2.js`),__vite__mapDeps([164,91,1]),import.meta.url))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>s(()=>import(`./stylus-CrmL_SSE.js`),[],import.meta.url))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>s(()=>import(`./surrealql-YEW9swFu.js`),__vite__mapDeps([165,78,1]),import.meta.url))},{id:`svelte`,name:`Svelte`,import:(()=>s(()=>import(`./svelte-BsO-M6w8.js`),__vite__mapDeps([166,77,1,78,86,88]),import.meta.url))},{id:`swift`,name:`Swift`,import:(()=>s(()=>import(`./swift-JGYdIIES.js`),[],import.meta.url))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>s(()=>import(`./system-verilog-71p6-W_u.js`),[],import.meta.url))},{id:`systemd`,name:`Systemd Units`,import:(()=>s(()=>import(`./systemd-Bv2wDC90.js`),[],import.meta.url))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>s(()=>import(`./talonscript-BMOduTZV.js`),[],import.meta.url))},{id:`tasl`,name:`Tasl`,import:(()=>s(()=>import(`./tasl-eSRMgwBx.js`),[],import.meta.url))},{id:`tcl`,name:`Tcl`,import:(()=>s(()=>import(`./tcl-1fExNKbP.js`),[],import.meta.url))},{id:`templ`,name:`Templ`,import:(()=>s(()=>import(`./templ-zMTXDva2.js`),__vite__mapDeps([167,77,1,168,78]),import.meta.url))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>s(()=>import(`./terraform-DFR4nCnh.js`),[],import.meta.url))},{id:`tex`,name:`TeX`,import:(()=>s(()=>import(`./tex-BlSODC1j.js`),__vite__mapDeps([141,137,1]),import.meta.url))},{id:`toml`,name:`TOML`,import:(()=>s(()=>import(`./toml-BvGJhzg4.js`),[],import.meta.url))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>s(()=>import(`./ts-tags-Di_YeGim.js`),__vite__mapDeps([169,77,1,100,94,76,78,91,88,83,84]),import.meta.url))},{id:`tsv`,name:`TSV`,import:(()=>s(()=>import(`./tsv-LHzL7ka1.js`),[],import.meta.url))},{id:`tsx`,name:`TSX`,import:(()=>s(()=>import(`./tsx-CCae5zBp.js`).then(e=>e.n),__vite__mapDeps([87,1]),import.meta.url))},{id:`turtle`,name:`Turtle`,import:(()=>s(()=>import(`./turtle-BdKlZW8d.js`),[],import.meta.url))},{id:`twig`,name:`Twig`,import:(()=>s(()=>import(`./twig-Dmp-uJhk.js`),__vite__mapDeps([170,77,1,78,150,76,82,91,83,84,96,108,94,99,100,101,109,110,87,88,111,112,103,113,80]),import.meta.url))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>s(()=>import(`./typescript-DYRUzQ4v.js`).then(e=>e.n),__vite__mapDeps([88,1]),import.meta.url))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>s(()=>import(`./typespec-CEkEAnja.js`),[],import.meta.url))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>s(()=>import(`./typst-CEQwssu2.js`),[],import.meta.url))},{id:`v`,name:`V`,import:(()=>s(()=>import(`./v-DX44c0Fb.js`),[],import.meta.url))},{id:`vala`,name:`Vala`,import:(()=>s(()=>import(`./vala-Hxv1isxk.js`),[],import.meta.url))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>s(()=>import(`./vb-DQbP3oUY.js`),[],import.meta.url))},{id:`verilog`,name:`Verilog`,import:(()=>s(()=>import(`./verilog-esZPqbkB.js`),[],import.meta.url))},{id:`vhdl`,name:`VHDL`,import:(()=>s(()=>import(`./vhdl-PwqNA34x.js`),[],import.meta.url))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>s(()=>import(`./viml-DUpBM0Gk.js`),[],import.meta.url))},{id:`vue`,name:`Vue`,import:(()=>s(()=>import(`./vue-Bjt7AYG8.js`),__vite__mapDeps([171,77,1,90,76,78,82,88]),import.meta.url))},{id:`vue-html`,name:`Vue HTML`,import:(()=>s(()=>import(`./vue-html-DbfHTuzQ.js`),__vite__mapDeps([172,78,1]),import.meta.url))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>s(()=>import(`./vue-vine-fHOt7AV6.js`),__vite__mapDeps([173,77,1,78,144,86,80,174]),import.meta.url))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>s(()=>import(`./vyper-BcUoHONt.js`),[],import.meta.url))},{id:`wasm`,name:`WebAssembly`,import:(()=>s(()=>import(`./wasm-DnZ0BHfN.js`),[],import.meta.url))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>s(()=>import(`./wenyan-bQjTuGHj.js`),[],import.meta.url))},{id:`wgsl`,name:`WGSL`,import:(()=>s(()=>import(`./wgsl-BgzputEt.js`),[],import.meta.url))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>s(()=>import(`./wikitext-D7JRoz1f.js`),[],import.meta.url))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>s(()=>import(`./wit-CppNxjpi.js`),[],import.meta.url))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>s(()=>import(`./wolfram-DIPQCD7J.js`),[],import.meta.url))},{id:`xml`,name:`XML`,import:(()=>s(()=>import(`./xml-BGJ8DYcz.js`).then(e=>e.n),__vite__mapDeps([83,1,84]),import.meta.url))},{id:`xsl`,name:`XSL`,import:(()=>s(()=>import(`./xsl-DUB-ai0Q.js`),__vite__mapDeps([175,83,1,84]),import.meta.url))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>s(()=>import(`./yaml-Cc1kud-L.js`).then(e=>e.n),__vite__mapDeps([113,1]),import.meta.url))},{id:`zenscript`,name:`ZenScript`,import:(()=>s(()=>import(`./zenscript-DBuir66n.js`),[],import.meta.url))},{id:`zig`,name:`Zig`,import:(()=>s(()=>import(`./zig-CslG60KY.js`),[],import.meta.url))}],CA=Object.fromEntries(SA.map(e=>[e.id,e.import])),wA=Object.fromEntries(SA.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),TA={...CA,...wA},EA=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>s(()=>import(`./andromeeda-B_gVJxvp.js`),[],import.meta.url))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>s(()=>import(`./aurora-x-BozDXyw2.js`),[],import.meta.url))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>s(()=>import(`./ayu-dark-B_CJvu_v.js`),[],import.meta.url))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>s(()=>import(`./ayu-light-BQK54nNp.js`),[],import.meta.url))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>s(()=>import(`./ayu-mirage-7kt2NZXi.js`),[],import.meta.url))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>s(()=>import(`./catppuccin-frappe-9febZXyT.js`),[],import.meta.url))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>s(()=>import(`./catppuccin-latte-Chncf9--.js`),[],import.meta.url))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>s(()=>import(`./catppuccin-macchiato-C_WuLQJY.js`),[],import.meta.url))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>s(()=>import(`./catppuccin-mocha-CLqVJARs.js`),[],import.meta.url))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>s(()=>import(`./dark-plus-DiQC4aeN.js`),[],import.meta.url))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>s(()=>import(`./dracula-lcDuW9Go.js`),[],import.meta.url))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>s(()=>import(`./dracula-soft-Ce6GMbeF.js`),[],import.meta.url))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>s(()=>import(`./everforest-dark-gx4OARDl.js`),[],import.meta.url))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>s(()=>import(`./everforest-light-DVJtoQBa.js`),[],import.meta.url))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>s(()=>import(`./github-dark-BYLuEE8-.js`),[],import.meta.url))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>s(()=>import(`./github-dark-default-CWXoKcju.js`),[],import.meta.url))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>s(()=>import(`./github-dark-dimmed-BSdXOUgX.js`),[],import.meta.url))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>s(()=>import(`./github-dark-high-contrast-BV2T6K5m.js`),[],import.meta.url))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>s(()=>import(`./github-light-CiOdyZHM.js`),[],import.meta.url))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>s(()=>import(`./github-light-default-Cv00Zdvi.js`),[],import.meta.url))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>s(()=>import(`./github-light-high-contrast-DmsX_iF3.js`),[],import.meta.url))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>s(()=>import(`./gruvbox-dark-hard-B4fgIElJ.js`),[],import.meta.url))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>s(()=>import(`./gruvbox-dark-medium-BDXnTutg.js`),[],import.meta.url))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>s(()=>import(`./gruvbox-dark-soft-DbxoAQHm.js`),[],import.meta.url))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>s(()=>import(`./gruvbox-light-hard-YZYZeyEo.js`),[],import.meta.url))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>s(()=>import(`./gruvbox-light-medium-CUq7dINd.js`),[],import.meta.url))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>s(()=>import(`./gruvbox-light-soft-yL34W2vf.js`),[],import.meta.url))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>s(()=>import(`./horizon-Bi8LXjxX.js`),[],import.meta.url))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`dark`,import:(()=>s(()=>import(`./horizon-bright-DBDDPcKI.js`),[],import.meta.url))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>s(()=>import(`./houston-B89kVvEi.js`),[],import.meta.url))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>s(()=>import(`./kanagawa-dragon-DgoaOaF7.js`),[],import.meta.url))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>s(()=>import(`./kanagawa-lotus-3NgVzoaJ.js`),[],import.meta.url))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>s(()=>import(`./kanagawa-wave-DSUZ61FQ.js`),[],import.meta.url))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>s(()=>import(`./laserwave-AYDA8rzg.js`),[],import.meta.url))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>s(()=>import(`./light-plus-Dd3s1voW.js`),[],import.meta.url))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>s(()=>import(`./material-theme-B8W_NLTj.js`),[],import.meta.url))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>s(()=>import(`./material-theme-darker-CdyXo4FZ.js`),[],import.meta.url))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>s(()=>import(`./material-theme-lighter-CymOU8Y5.js`),[],import.meta.url))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>s(()=>import(`./material-theme-ocean-Dk9zBTaP.js`),[],import.meta.url))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>s(()=>import(`./material-theme-palenight-CINYHeyf.js`),[],import.meta.url))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>s(()=>import(`./min-dark-C2gvlkG_.js`),[],import.meta.url))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>s(()=>import(`./min-light-Bz9gKlTR.js`),[],import.meta.url))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>s(()=>import(`./monokai-6XVgd8Lb.js`),[],import.meta.url))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>s(()=>import(`./night-owl-CVr1Acvt.js`),[],import.meta.url))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>s(()=>import(`./night-owl-light-oYg6SlB2.js`),[],import.meta.url))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>s(()=>import(`./nord-o0gm5mt_.js`),[],import.meta.url))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>s(()=>import(`./one-dark-pro-ClpNRdFi.js`),[],import.meta.url))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>s(()=>import(`./one-light-DF-70uIM.js`),[],import.meta.url))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>s(()=>import(`./plastic-DWi5jYUY.js`),[],import.meta.url))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>s(()=>import(`./poimandres-MXtqikSE.js`),[],import.meta.url))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>s(()=>import(`./red-BdLeDZaD.js`),[],import.meta.url))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>s(()=>import(`./rose-pine-BdV45vil.js`),[],import.meta.url))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>s(()=>import(`./rose-pine-dawn-Dos80YGn.js`),[],import.meta.url))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>s(()=>import(`./rose-pine-moon-DbRqALZG.js`),[],import.meta.url))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>s(()=>import(`./slack-dark-DmjKz1P2.js`),[],import.meta.url))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>s(()=>import(`./slack-ochin-wTZATI9h.js`),[],import.meta.url))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>s(()=>import(`./snazzy-light-B42aLgZJ.js`),[],import.meta.url))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>s(()=>import(`./solarized-dark-DInn5w8o.js`),[],import.meta.url))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>s(()=>import(`./solarized-light-CEaI6xSe.js`),[],import.meta.url))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>s(()=>import(`./synthwave-84-yMxuZek_.js`),[],import.meta.url))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>s(()=>import(`./tokyo-night-C-nBGA2n.js`),[],import.meta.url))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>s(()=>import(`./vesper-Bc6c4xT4.js`),[],import.meta.url))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>s(()=>import(`./vitesse-black-CbgIKamS.js`),[],import.meta.url))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>s(()=>import(`./vitesse-dark-DZgc4dHD.js`),[],import.meta.url))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>s(()=>import(`./vitesse-light-D7auQmSc.js`),[],import.meta.url))}].map(e=>[e.id,e.import])),DA=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function OA(){return 2147483648}function kA(){return typeof performance<`u`?performance.now():Date.now()}var AA=(e,t)=>e+(t-e%t)%t;async function jA(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=OA();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,AA(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:kA,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var MA=Object.defineProperty,NA=(e,t,n)=>t in e?MA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,PA=(e,t,n)=>NA(e,typeof t==`symbol`?t:t+``,n),FA=null;function IA(e){throw new DA(e.UTF8ToString(e.getLastOnigError()))}var LA=class e{constructor(t){PA(this,`utf16Length`),PA(this,`utf8Length`),PA(this,`utf16Value`),PA(this,`utf8Value`),PA(this,`utf16OffsetToUtf8`),PA(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},RA=class e{constructor(t){if(PA(this,`id`,++e.LAST_ID),PA(this,`_onigBinding`),PA(this,`content`),PA(this,`utf16Length`),PA(this,`utf8Length`),PA(this,`utf16OffsetToUtf8`),PA(this,`utf8OffsetToUtf16`),PA(this,`ptr`),!FA)throw new DA(`Must invoke loadWasm first.`);this._onigBinding=FA,this.content=t;let n=new LA(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=FA.omalloc(1e4),e._sharedPtrInUse=!0,FA.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(FA)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};PA(RA,`LAST_ID`,0),PA(RA,`_sharedPtr`,0),PA(RA,`_sharedPtrInUse`,!1);var zA=RA,BA=class{constructor(e){if(PA(this,`_onigBinding`),PA(this,`_ptr`),!FA)throw new DA(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new LA(e[r]);t[r]=i.createString(FA),n[r]=i.utf8Length}let r=FA.omalloc(4*e.length);FA.HEAPU32.set(t,r/4);let i=FA.omalloc(4*e.length);FA.HEAPU32.set(n,i/4);let a=FA.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)FA.ofree(t[n]);FA.ofree(i),FA.ofree(r),a===0&&IA(FA),this._onigBinding=FA,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new zA(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function VA(e){return typeof e.instantiator==`function`}function HA(e){return typeof e.default==`function`}function UA(e){return e.data!==void 0}function WA(e){return typeof Response<`u`&&e instanceof Response}function GA(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var KA;function qA(e){if(KA)return KA;async function t(){FA=await jA(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),VA(n)?n=await n.instantiator(t):HA(n)?n=await n.default(t):(UA(n)&&(n=n.data),WA(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await YA(n)(t):await XA(n)(t):GA(n)||n instanceof WebAssembly.Module?n=await JA(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await JA(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return KA=t(),KA}function JA(e){return t=>WebAssembly.instantiate(e,t)}function YA(e){return t=>WebAssembly.instantiateStreaming(e,t)}function XA(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function ZA(e){return e&&await qA(e),{createScanner(e){return new BA(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new zA(e)}}}var QA=yA({langs:TA,themes:EA,engine:()=>ZA(s(()=>import(`./wasm-ALLkb1hB.js`),[],import.meta.url))}),{codeToHtml:$A,codeToHast:ej,codeToTokens:tj,codeToTokensBase:nj,codeToTokensWithThemes:rj,getSingletonHighlighter:ij,getLastGrammarState:aj}=xA(QA,{guessEmbeddedLanguages:ak}),oj=`typescript.tsx.javascript.jsx.json.yaml.toml.xml.bash.shell.powershell.python.rust.go.java.kotlin.swift.ruby.php.csharp.c.cpp.sql.html.css.scss.markdown.diff.dockerfile`.split(`.`),sj=[`github-light`,`github-dark`],cj=null;function lj(){return cj||=QA({themes:[...sj],langs:[...oj]}),cj}var uj={ts:`typescript`,js:`javascript`,yml:`yaml`,sh:`bash`,zsh:`bash`,py:`python`,rs:`rust`,golang:`go`,rb:`ruby`,cs:`csharp`,"c++":`cpp`,cxx:`cpp`,"c#":`csharp`,ps1:`powershell`,pwsh:`powershell`,text:`markdown`,txt:`markdown`};function dj(e){if(!e)return`text`;let t=e.toLowerCase();return oj.includes(t)?t:t in uj?uj[t]??`text`:`text`}function fj({code:e,language:t,label:n,maxHeight:r}){let[i,a]=(0,j.useState)(null);(0,j.useEffect)(()=>{let n=!1,r=dj(t);return lj().then(t=>{n||a(t.codeToHtml(e,{lang:r,themes:{light:`github-light`,dark:`github-dark`},defaultColor:!1,cssVariablePrefix:`--shiki-`}))}).catch(()=>{}),()=>{n=!0}},[e,t]);let o=n??t,s=r??`max-h-96`;return(0,M.jsxs)(`div`,{className:`my-2 overflow-hidden border border-line text-[12px] first:mt-0 last:mb-0`,children:[o&&(0,M.jsx)(`div`,{className:`label border-b border-line px-3 py-1`,children:o}),i?(0,M.jsx)(`div`,{className:`shiki-host ${s} overflow-auto`,dangerouslySetInnerHTML:{__html:i}}):(0,M.jsx)(`pre`,{className:`${s} overflow-auto p-3`,children:(0,M.jsx)(`code`,{children:e})})]})}var pj={p:({children:e})=>(0,M.jsx)(`p`,{className:`my-2 first:mt-0 last:mb-0`,children:e}),h1:({children:e})=>(0,M.jsx)(`h1`,{className:`mt-5 mb-2 text-base font-bold tracking-tight first:mt-0`,children:e}),h2:({children:e})=>(0,M.jsx)(`h2`,{className:`mt-4 mb-2 text-base font-bold tracking-tight first:mt-0`,children:e}),h3:({children:e})=>(0,M.jsx)(`h3`,{className:`mt-4 mb-1.5 text-sm font-bold tracking-tight first:mt-0`,children:e}),h4:({children:e})=>(0,M.jsx)(`h4`,{className:`mt-3 mb-1 text-sm font-bold tracking-tight first:mt-0`,children:e}),ul:({children:e})=>(0,M.jsx)(`ul`,{className:`my-2 ml-5 list-disc space-y-0.5 first:mt-0 last:mb-0 marker:text-muted`,children:e}),ol:({children:e})=>(0,M.jsx)(`ol`,{className:`my-2 ml-5 list-decimal space-y-0.5 first:mt-0 last:mb-0 marker:text-muted`,children:e}),li:({children:e})=>(0,M.jsx)(`li`,{className:`pl-1`,children:e}),blockquote:({children:e})=>(0,M.jsx)(`blockquote`,{className:`my-2 border-l-2 border-muted pl-3 text-muted first:mt-0 last:mb-0`,children:e}),hr:()=>(0,M.jsx)(`hr`,{className:`my-3 border-line`}),a:({children:e,href:t})=>(0,M.jsx)(`a`,{href:t,target:`_blank`,rel:`noreferrer noopener`,className:`text-accent underline underline-offset-2 hover:opacity-80`,children:e}),strong:({children:e})=>(0,M.jsx)(`strong`,{className:`font-bold`,children:e}),em:({children:e})=>(0,M.jsx)(`em`,{className:`italic`,children:e}),del:({children:e})=>(0,M.jsx)(`del`,{className:`text-muted line-through`,children:e}),code:({className:e,children:t,...n})=>{if(!e)return(0,M.jsx)(`code`,{className:`bg-code-bg px-1 text-[0.85em]`,...n,children:t});let r=/language-([\w-]+)/.exec(e??``),i=String(t).replace(/\n$/,``);return r?.[1]===`mermaid`?(0,M.jsx)(WT,{chart:i}):r?.[1]?(0,M.jsx)(fj,{code:i,language:r[1]}):(0,M.jsx)(fj,{code:i})},pre:({children:e})=>(0,M.jsx)(M.Fragment,{children:e}),table:({children:e})=>(0,M.jsx)(`div`,{className:`my-2 overflow-auto first:mt-0 last:mb-0`,children:(0,M.jsx)(`table`,{className:`w-full border-collapse border border-line text-xs`,children:e})}),thead:({children:e})=>(0,M.jsx)(`thead`,{className:`border-b border-line`,children:e}),th:({children:e})=>(0,M.jsx)(`th`,{className:`border-r border-line px-2 py-1 text-left text-xs font-bold uppercase tracking-wider last:border-r-0`,children:e}),td:({children:e})=>(0,M.jsx)(`td`,{className:`border-t border-r border-line px-2 py-1 last:border-r-0`,children:e})},mj=(0,j.memo)(function({text:e}){return(0,M.jsx)(`div`,{className:`leading-relaxed`,children:(0,M.jsx)(Mh,{remarkPlugins:[Rv],components:pj,children:e})})});function hj({conversationId:e,onConversationChange:t}){let[n,r]=(0,j.useState)([]),[i,a]=(0,j.useState)(!0),[o,s]=(0,j.useState)(null),[c,l]=(0,j.useState)(null);return(0,j.useEffect)(()=>{let e=!1;return a(!0),Ze().then(t=>{e||(r(t.agents),t.agents[0]&&l(e=>e??t.agents[0]?.name??null))}).catch(t=>{e||t instanceof Ie&&t.status===401||s(t instanceof Error?t:Error(String(t)))}).finally(()=>{e||a(!1)}),()=>{e=!0}},[]),(0,M.jsx)(ft,{loading:i,error:o,empty:{when:n.length===0,message:`// no agents loaded — pass via serveWeb({ agent }) or serveWeb({ agents })`},children:(0,M.jsx)(gj,{agents:n,selectedAgent:c,onSelectAgent:l,conversationId:e,onConversationChange:t})})}function gj({agents:e,selectedAgent:t,onSelectAgent:n,conversationId:r,onConversationChange:i}){let a=il({agentName:t,conversationId:r,onConversationIdChange:i}),o=(0,j.useCallback)(()=>{a.reset(),i(null)},[a,i]),s=e.find(e=>e.name===t)??null;return(0,M.jsx)(`div`,{className:`mx-auto flex h-[calc(100vh-3rem)] max-w-5xl flex-col`,children:(0,M.jsxs)(`div`,{className:`panel flex min-h-0 flex-1 flex-col overflow-hidden`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between border-b border-line px-3 py-2`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px] uppercase tracking-widest text-muted`,children:[(0,M.jsx)(`span`,{className:`text-accent`,children:`●`}),(0,M.jsx)(`span`,{children:`terminal`}),(0,M.jsx)(`span`,{children:`/`}),(0,M.jsx)(`span`,{children:`chat`})]}),(0,M.jsx)(`div`,{className:`font-mono text-[10px] text-muted`,children:a.conversationId??`new`})]}),(0,M.jsx)(`div`,{className:`border-b border-line px-3 py-2`,children:(0,M.jsx)(_j,{agents:e,selectedAgent:t,onSelectAgent:n,conversationId:a.conversationId,status:a.status,onNewChat:o})}),a.error&&(0,M.jsxs)(`div`,{className:`border-b border-err p-2 text-xs text-err`,children:[(0,M.jsx)(`span`,{className:`label text-err!`,children:`error:`}),` `,a.error.message]}),(0,M.jsx)(rs,{runtime:a.runtime,children:(0,M.jsxs)(Oc,{className:`flex min-h-0 flex-1 flex-col px-4`,children:[(0,M.jsxs)(Zc,{autoScroll:!0,className:`flex-1 overflow-y-auto py-4`,children:[(0,M.jsx)(kc,{children:(0,M.jsx)(yj,{agent:s,hydrating:a.hydrating})}),(0,M.jsx)(go,{components:{UserMessage:bj,AssistantMessage:xj,SystemMessage:Cj}})]}),(0,M.jsx)(Aj,{})]})})]})})}function _j({agents:e,selectedAgent:t,onSelectAgent:n,conversationId:r,status:i,onNewChat:a}){return(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs`,children:[(0,M.jsx)(`span`,{className:`label`,children:`agent:`}),e.length===1?(0,M.jsxs)(`span`,{children:[e[0]?.name,` `,(0,M.jsxs)(`span`,{className:`text-muted`,children:[`v`,e[0]?.version]})]}):(0,M.jsx)(`select`,{value:t??``,onChange:e=>n(e.target.value),className:`px-1 py-0.5`,children:e.map(e=>(0,M.jsxs)(`option`,{value:e.name,children:[e.name,` v`,e.version]},e.name))}),i&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{className:`label ml-3`,children:`status:`}),(0,M.jsx)(`span`,{className:vj(i),children:i})]}),(0,M.jsx)(`button`,{type:`button`,onClick:a,className:`btn ml-auto`,disabled:!r,title:`Start a new conversation (the previous one stays in the Runs tab).`,children:`new chat`})]})}function vj(e){return e===`running`||e===`pending`?`badge badge-fill`:e===`paused`?`badge badge-warn`:e===`failed`||e===`cancelled`?`badge badge-err`:`badge`}function yj({agent:e,hydrating:t}){return t?(0,M.jsxs)(`div`,{className:`text-center text-xs text-muted`,children:[`loading session`,(0,M.jsx)(`span`,{className:`blink ml-1 text-accent`,"aria-hidden":`true`,children:`▊`})]}):(0,M.jsxs)(`div`,{className:`space-y-2 text-xs text-muted`,children:[(0,M.jsx)(`div`,{children:(0,M.jsx)(`span`,{className:`label`,children:`// chat`})}),e?(0,M.jsxs)(`div`,{children:[`ready · `,e.name,` v`,e.version,(0,M.jsx)(`span`,{className:`blink ml-1 text-accent`,"aria-hidden":`true`,children:`▊`})]}):(0,M.jsx)(`div`,{children:`// pick an agent above to start chatting`})]})}function bj(){return(0,M.jsxs)(`div`,{className:`mb-5 text-sm last:mb-0`,children:[(0,M.jsx)(`div`,{className:`label mb-1.5`,children:`you`}),(0,M.jsx)(`div`,{className:`border-l-2 border-line pl-3`,children:(0,M.jsx)(Dc,{components:{Text:wj}})})]})}function xj(){return(0,M.jsxs)(`div`,{className:`mb-5 text-sm last:mb-0`,children:[(0,M.jsx)(`div`,{className:`label text-accent! mb-1.5`,children:`agent`}),(0,M.jsx)(`div`,{className:`border-l-2 border-accent pl-3`,children:(0,M.jsx)(Sj,{})})]})}function Sj(){return(0,M.jsx)(Dc,{components:{Text:wj,Reasoning:Dj,tools:{Fallback:Oj}}})}function Cj(){return(0,M.jsxs)(`div`,{className:`mb-5 text-xs last:mb-0`,children:[(0,M.jsx)(`div`,{className:`label mb-1.5`,children:`tool`}),(0,M.jsx)(`div`,{className:`border-l-2 border-muted pl-3`,children:(0,M.jsxs)(`details`,{children:[(0,M.jsx)(`summary`,{className:`label cursor-pointer text-muted`,children:`raw result`}),(0,M.jsx)(`div`,{className:`mt-2 text-muted`,children:(0,M.jsx)(Dc,{components:{Text:wj}})})]})})]})}function wj(e){return Tj(e.text)?(0,M.jsx)(Ej,{text:e.text}):(0,M.jsx)(mj,{text:e.text})}function Tj(e){return[`checking memory`,`queueing the run`,`warming tools`,`reading context`,`waiting on the model`,`streaming soon`].includes(e)}function Ej({text:e}){return(0,M.jsxs)(`span`,{className:`text-muted`,children:[e,(0,M.jsx)(`span`,{className:`cli-dots`,"aria-hidden":`true`}),(0,M.jsx)(`span`,{className:`sr-only`,children:`...`})]})}function Dj(e){return(0,M.jsxs)(`details`,{className:`my-1 border border-line p-2 text-xs`,children:[(0,M.jsx)(`summary`,{className:`cursor-pointer text-muted`,children:`thinking`}),(0,M.jsx)(`pre`,{className:`mt-2 whitespace-pre-wrap text-[11px]`,children:e.text})]})}function Oj(e){let t=typeof e.argsText==`string`?e.argsText:kj(e.args??{});return(0,M.jsxs)(`div`,{className:`my-1 border border-line p-2 text-xs`,children:[(0,M.jsxs)(`div`,{className:`label text-accent!`,children:[`tool · `,e.toolName]}),(0,M.jsxs)(`details`,{className:`mt-1`,children:[(0,M.jsx)(`summary`,{className:`label cursor-pointer text-muted`,children:`raw input`}),(0,M.jsx)(`pre`,{className:`mt-1 max-h-48 overflow-auto whitespace-pre-wrap text-[11px]`,children:t})]}),e.result!==void 0&&(0,M.jsxs)(`details`,{className:`mt-2 border-t border-line pt-2`,children:[(0,M.jsx)(`summary`,{className:`label cursor-pointer text-muted`,children:`raw result`}),(0,M.jsx)(`pre`,{className:`mt-1 max-h-48 overflow-auto whitespace-pre-wrap text-[11px]`,children:typeof e.result==`string`?e.result:kj(e.result)})]})]})}function kj(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function Aj(){return(0,M.jsxs)(Is,{className:`flex items-center gap-3 border-t border-line py-3 pr-3 pl-0`,children:[(0,M.jsx)(`span`,{"aria-hidden":`true`,className:`flex items-center text-accent leading-none`,children:(0,M.jsx)(`span`,{children:`$`})}),(0,M.jsx)(cc,{autoFocus:!0,rows:1,maxRows:8,placeholder:`ask the agent…`,className:`min-h-0 flex-1 resize-none border-0 bg-transparent p-0 text-sm leading-none focus:outline-none`,submitMode:`enter`}),(0,M.jsx)(jc,{running:!1,children:(0,M.jsx)(Fs,{asChild:!0,children:(0,M.jsx)(`button`,{type:`submit`,className:`btn btn-primary`,children:`send`})})}),(0,M.jsx)(jc,{running:!0,children:(0,M.jsx)(jj,{})})]})}function jj(){let e=is();return(0,M.jsx)(`button`,{type:`button`,className:`btn btn-danger`,onClick:()=>e.cancelRun(),children:`stop`})}function Mj({title:e}){return(0,M.jsx)(`h2`,{className:`hr-section`,children:(0,M.jsx)(`span`,{children:`// ${e}`})})}function Nj(){let e=ut(),[t,n]=(0,j.useState)([]),[r,i]=(0,j.useState)(!0),[a,o]=(0,j.useState)(null),[s,c]=(0,j.useState)(null),l=(0,j.useCallback)(async()=>{try{n((await $e()).envVars)}catch(e){o(e instanceof Error?e:Error(String(e)))}finally{i(!1)}},[]);(0,j.useEffect)(()=>{l()},[l]);let u=!!(e?.renderService?.serviceId&&e.renderService.apiKeyConfigured),d=e?.renderService?.serviceId??null;return(0,M.jsxs)(`div`,{className:`space-y-6`,children:[(0,M.jsxs)(`section`,{children:[(0,M.jsx)(Mj,{title:`ENV VARS`}),(0,M.jsx)(Pj,{deployment:e}),(0,M.jsx)(ft,{loading:r,error:a,empty:{when:t.length===0,message:`// no env vars declared in render-harness.yaml — capability packs and the harness manifest can add entries to envSchema`},children:(0,M.jsx)(`ul`,{className:`space-y-1.5`,children:t.map(e=>(0,M.jsx)(Fj,{envVar:e,onEdit:()=>c(e)},e.name))})})]}),s?(0,M.jsx)(Ij,{envVar:s,canWrite:u,renderServiceId:d,onClose:()=>c(null),onSaved:()=>{c(null),l(),window.setTimeout(()=>void l(),5e3),window.setTimeout(()=>void l(),15e3)}}):null]})}function Pj({deployment:e}){if(!e)return null;if(e.renderService?.serviceId&&e.renderService.apiKeyConfigured)return(0,M.jsx)(`p`,{className:`mb-3 text-[11px] text-muted`,children:`// edits write through the Render API — service auto-restarts on save`});let t=[];return e.renderService?.serviceId||t.push(`RENDER_SERVICE_ID`),e.renderService?.apiKeyConfigured||t.push(`RENDER_API_KEY`),(0,M.jsx)(`p`,{className:`mb-3 border border-line p-2 text-[11px] text-muted`,children:`// ${t.join(` + `)} not set — edits will open the Render dashboard instead. Set those env vars on this service to enable in-UI writes.`})}function Fj({envVar:e,onEdit:t}){let n=e.isSet?`btn`:e.required?`btn btn-danger-solid`:`btn btn-primary`;return(0,M.jsxs)(`li`,{className:`flex items-start gap-3 border border-line p-3 text-xs`,children:[(0,M.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-2`,children:[(0,M.jsx)(`span`,{className:`font-mono text-sm`,children:e.name}),e.secret?(0,M.jsx)(`span`,{className:`badge`,children:`secret`}):null,e.source===`capability`&&e.packName?(0,M.jsx)(`span`,{className:`text-[10px] text-muted`,children:e.packName}):null]}),e.description?(0,M.jsx)(`p`,{className:`mt-1 text-[11px] text-muted`,children:e.description}):null,e.default!==void 0&&!e.isSet?(0,M.jsxs)(`p`,{className:`mt-1 text-[11px] text-muted`,children:[`default: `,(0,M.jsx)(`span`,{className:`font-mono`,children:e.default})]}):null]}),(0,M.jsx)(`button`,{type:`button`,onClick:t,className:n,children:e.isSet?`rotate`:`set`})]})}function Ij({envVar:e,canWrite:t,renderServiceId:n,onClose:r,onSaved:i}){let[a,o]=(0,j.useState)(``),[s,c]=(0,j.useState)(!1),[l,u]=(0,j.useState)(null),[d,f]=(0,j.useState)(!1),p=n?`https://dashboard.render.com/services/${encodeURIComponent(n)}/env`:`https://dashboard.render.com`;return(0,M.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4`,children:[(0,M.jsx)(`button`,{type:`button`,"aria-label":`Close`,className:`absolute inset-0 cursor-default`,onClick:r}),(0,M.jsxs)(`div`,{className:`panel relative max-h-[90vh] w-full max-w-lg overflow-auto bg-bg p-5 text-xs`,role:`dialog`,"aria-modal":`true`,"aria-label":`Edit ${e.name}`,children:[(0,M.jsxs)(`header`,{className:`mb-4 flex items-center justify-between`,children:[(0,M.jsxs)(`h2`,{className:`text-sm font-bold uppercase tracking-wide`,children:[e.isSet?`rotate`:`set`,` — `,(0,M.jsx)(`span`,{className:`font-mono`,children:e.name})]}),(0,M.jsx)(`button`,{type:`button`,onClick:r,className:`border border-line px-2 py-1 text-xs`,"aria-label":`Close`,children:`✕`})]}),e.description?(0,M.jsx)(`p`,{className:`mb-3 text-[11px] text-muted`,children:e.description}):null,t?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`label`,{className:`block`,children:[(0,M.jsx)(`span`,{className:`block text-[10px] uppercase tracking-wide text-muted`,children:`value`}),(0,M.jsxs)(`div`,{className:`mt-1 flex gap-2`,children:[(0,M.jsx)(`input`,{type:e.secret&&!d?`password`:`text`,className:`w-full border border-line bg-transparent p-2 font-mono text-xs`,value:a,onChange:e=>o(e.target.value)}),e.secret?(0,M.jsx)(`button`,{type:`button`,onClick:()=>f(e=>!e),className:`border border-line px-2 py-1 text-[10px]`,children:d?`hide`:`show`}):null]})]}),(0,M.jsx)(`p`,{className:`mt-2 text-[10px] text-muted`,children:`Saving writes through the Render API. The service will restart automatically once the new value is committed.`}),l?(0,M.jsx)(`p`,{className:`mt-3 border border-line p-2 text-[11px] text-err`,children:l}):null,(0,M.jsxs)(`footer`,{className:`mt-4 flex items-center justify-end gap-2`,children:[(0,M.jsx)(`button`,{type:`button`,onClick:r,disabled:s,className:`border border-line px-3 py-1.5 text-xs`,children:`cancel`}),(0,M.jsx)(`button`,{type:`button`,onClick:async()=>{c(!0),u(null);try{let t=await et(e.name,a);if(t.ok||t.restart){i();return}u(t.details??t.error??`save failed`)}catch(e){if(e instanceof TypeError){i();return}u(e instanceof Error?e.message:String(e))}finally{c(!1)}},disabled:s||a.length===0,className:`border border-accent bg-accent px-3 py-1.5 text-xs text-bg disabled:opacity-50`,children:s?`saving…`:`save & restart`})]})]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`p`,{className:`mb-3 text-[11px]`,children:[`In-UI writes aren't enabled on this deployment. To set`,` `,(0,M.jsx)(`span`,{className:`font-mono`,children:e.name}),`, open the Render dashboard and add it to this service's env vars.`]}),(0,M.jsxs)(`p`,{className:`mb-3 text-[10px] text-muted`,children:[`To enable in-UI editing, set `,(0,M.jsx)(`span`,{className:`font-mono`,children:`RENDER_API_KEY`}),` on this service. (RENDER_SERVICE_ID is injected by Render automatically.)`]}),(0,M.jsxs)(`footer`,{className:`mt-4 flex items-center justify-end gap-2`,children:[(0,M.jsx)(`button`,{type:`button`,onClick:r,className:`border border-line px-3 py-1.5 text-xs`,children:`close`}),(0,M.jsx)(`a`,{href:p,target:`_blank`,rel:`noreferrer`,className:`border border-accent bg-accent px-3 py-1.5 text-xs text-bg`,children:`open Render dashboard →`})]})]})]})]})}var Lj=`https://render-agent-harness.onrender.com/`;function Rj(){return(0,M.jsx)(`div`,{className:`h-screen overflow-hidden`,children:(0,M.jsx)(`iframe`,{title:`Render Harness documentation`,src:Lj,className:`h-full w-full bg-canvas`})})}function zj({title:e,lede:t,body:n,livePanel:r}){return(0,M.jsxs)(`article`,{className:`space-y-6`,children:[(0,M.jsxs)(`header`,{className:`space-y-1`,children:[(0,M.jsx)(`h1`,{className:`text-base font-bold uppercase tracking-wider`,children:`// ${e}`}),(0,M.jsx)(`p`,{className:`text-xs text-muted`,children:t})]}),(0,M.jsxs)(`div`,{className:r?`grid grid-cols-1 gap-6 lg:grid-cols-[1fr_280px]`:`max-w-3xl`,children:[(0,M.jsx)(`div`,{className:`min-w-0 space-y-4 text-sm leading-relaxed`,children:n}),r&&(0,M.jsx)(`aside`,{className:`lg:sticky lg:top-4 lg:self-start`,children:r})]})]})}function Bj({children:e,language:t}){let n=t?Vj(t):void 0;return(0,M.jsx)(fj,{code:e,...n?{language:n}:{},...t?{label:t}:{}})}function Vj(e){return!e.includes(`.`)&&!e.includes(`/`)&&!e.includes(` `)?e:/\.([\w]+)$/.exec(e)?.[1]??`text`}function Hj({cmd:e}){return(0,M.jsx)(`button`,{type:`button`,onClick:()=>{navigator.clipboard.writeText(e)},title:`Copy command to clipboard`,className:`bg-code-bg cursor-pointer px-1 text-[0.85em] hover:text-accent`,children:e})}function Uj({title:e,children:t}){return(0,M.jsxs)(`div`,{className:`border border-line p-3`,children:[(0,M.jsx)(`div`,{className:`label mb-3`,children:`// live · ${e}`}),(0,M.jsx)(`div`,{className:`space-y-2 text-xs`,children:t})]})}function Wj({k:e,v:t}){return(0,M.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,M.jsx)(`span`,{className:`text-muted`,children:e}),(0,M.jsx)(`span`,{className:`text-right break-all`,children:t})]})}function Gj({label:e,hint:t,onClick:n,href:r}){let i=(0,M.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(`span`,{className:`text-accent`,children:`→`}),(0,M.jsx)(`span`,{children:e}),t&&(0,M.jsx)(`span`,{className:`text-muted`,children:t})]});return r?(0,M.jsx)(`a`,{href:r,target:`_blank`,rel:`noreferrer noopener`,className:`block w-full border border-line px-3 py-2 text-xs hover:border-accent hover:text-accent`,children:i}):(0,M.jsx)(`button`,{type:`button`,onClick:n,className:`block w-full border border-line px-3 py-2 text-left text-xs hover:border-accent hover:text-accent`,children:i})}var Kj=`
93
- Every agent in the harness is just a value passed to \`defineAgent()\`. There's no class hierarchy and no implicit registry — what you write is what runs. The example below shows the canonical shape of an agent declaration:
94
- `;function qj(e,t){return`
95
- The agent is a value; the runtime is what actually drives it. The harness ships four runtime adapters that share the same loop in \`@render-harness/core\`. **${e}** uses ${t?`the web + worker pair`:`the single-process web runtime`}:
96
-
97
- ${["- `@render-harness/web` — multi-tenant HTTP service. Mounts the UI, exposes `/runs`, persists messages, streams via SSE, doesn't call the model itself.",t?"- `@render-harness/runtime-worker` — long-lived process. Pulls jobs from a Postgres queue (pg-boss) and runs the agent loop.":"- `@render-harness/runtime-web` — single-process synchronous shape. Runs the agent loop inline in the request handler. Best for sub-30s interactions."].join(`
98
- `)}
99
-
100
- ${t?"Both processes load the **same agent definition** from `render-harness.yaml` via `defineFromConfig()`. One agent, two adapters, separate scaling.":"The web service loads the agent definition from `render-harness.yaml` via `defineFromConfig()` and runs the agent loop in-process — no separate worker needed."}
101
-
102
- For other shapes the harness has \`@render-harness/runtime-cron\` (one-shot scheduled runs) and \`@render-harness/runtime-workflows\` (durable, multi-day, human-in-the-loop). Same \`AgentDefinition\` runs unchanged on any of them.
103
- `}var Jj='\nMulti-turn chat is built on `agent_conversations`: one row groups many runs together. Each user turn enqueues a fresh run on the same `conversationId`; the run loads message history across every prior run in the conversation, completes normally, and the next user turn starts another run. The Chat tab uses `POST /conversations/:id/messages` for every turn and subscribes to `GET /conversations/:id/stream` (which stays open across run boundaries). Runs always end in a terminal state — `paused` is now strictly HITL (`ask_user`, approval gates), never "waiting for the next user message."\n';function Yj(){let e=dt(),t=(ut()?.agents??[]).some(e=>e.runtimes.some(e=>e.kind===`worker`)),n=`${e}-runs`;return(0,M.jsx)(zj,{title:`agent + runtime — the smallest moving parts`,lede:t?`One AgentDefinition, two adapters, one shared agent loop.`:`One AgentDefinition, one runtime adapter, one shared agent loop.`,body:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(mj,{text:Kj}),(0,M.jsx)(Bj,{language:`src/agent.ts`,children:`import { type AgentDefinition, defineAgent } from "@render-harness/core";
104
-
105
- const SYSTEM_PROMPT = \`\\
106
- You are a helpful agent. Read the latest user message in context with
107
- the prior turns and respond in Markdown.
108
-
109
- Keep answers short — usually one or two paragraphs.\`;
110
-
111
- export function buildAgent(): AgentDefinition {
112
- return defineAgent({
113
- name: "${e}",
114
- version: "0.1.0",
115
- model: {
116
- provider: "anthropic",
117
- model: process.env.LLM_MODEL ?? "claude-sonnet-4-6",
118
- },
119
- systemPrompt: SYSTEM_PROMPT,
120
- sampling: { temperature: 0.4, maxOutputTokens: 1024 },
121
- });
122
- }`}),(0,M.jsx)(mj,{text:qj(e,t)}),t?(0,M.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2`,children:[(0,M.jsx)(Bj,{language:`src/web.ts`,children:`import { serveWeb } from "@render-harness/web";
123
- import { buildAgent } from "./agent.js";
124
-
125
- await serveWeb({
126
- agent: buildAgent(),
127
- queue: process.env.WORKER_QUEUE ?? "${n}",
128
- ui: true,
129
- });`}),(0,M.jsx)(Bj,{language:`src/worker.ts`,children:`import { startWorkerAndWait } from "@render-harness/runtime-worker";
130
- import { buildAgent } from "./agent.js";
131
-
132
- await startWorkerAndWait({
133
- agent: buildAgent(),
134
- queue: process.env.WORKER_QUEUE ?? "${n}",
135
- });`})]}):(0,M.jsx)(Bj,{language:`src/web.ts`,children:`import { serveAgent } from "@render-harness/runtime-web";
136
- import { buildAgent } from "./agent.js";
137
-
138
- await serveAgent({ agent: buildAgent() });`}),t&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`h3`,{className:`label mt-6`,children:`why two processes?`}),(0,M.jsx)(`p`,{children:`Splitting the public API from the agent loop lets you scale them independently and put the worker on the private network in production. The web service stays cheap, predictable, and answerable to load balancers; the worker can be CPU-heavy and run for hours without breaking the request budget.`}),(0,M.jsxs)(`p`,{children:[`Locally they share the same image — Compose just runs`,` `,(0,M.jsx)(`code`,{className:`bg-code-bg px-1`,children:`node dist/web.js`}),` for one and`,` `,(0,M.jsx)(`code`,{className:`bg-code-bg px-1`,children:`node dist/worker.js`}),` for the other.`]})]}),(0,M.jsx)(`h3`,{className:`label mt-6`,children:`how multi-turn chat works`}),(0,M.jsx)(mj,{text:Jj})]}),livePanel:(0,M.jsx)(Xj,{})})}function Xj(){let[e,t]=(0,j.useState)(null),[n,r]=(0,j.useState)(null);return(0,j.useEffect)(()=>{let e=!1;return Ze().then(n=>{e||t(n.agents)}).catch(t=>{e||t instanceof Ie&&t.status===401||r(t instanceof Error?t:Error(String(t)))}),()=>{e=!0}},[]),(0,M.jsx)(Uj,{title:`loaded agent`,children:n?(0,M.jsx)(`div`,{className:`text-err`,children:n.message}):e?e[0]?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Wj,{k:`name`,v:e[0].name}),(0,M.jsx)(Wj,{k:`version`,v:e[0].version}),(0,M.jsx)(Wj,{k:`model`,v:`${e[0].model.provider}/${e[0].model.model}`}),(0,M.jsx)(Wj,{k:`prompt`,v:`${e[0].systemPromptLength.toLocaleString()} chars`}),(0,M.jsx)(Wj,{k:`mcp servers`,v:String(e[0].mcpServers.length)}),(0,M.jsx)(Wj,{k:`local tools`,v:e[0].hasLocalTools?`yes`:`no`}),(0,M.jsx)(Wj,{k:`skills`,v:e[0].hasSkills?`yes`:`no`})]}):(0,M.jsx)(`div`,{className:`text-muted`,children:`no agents loaded`}):(0,M.jsx)(`div`,{className:`text-muted`,children:`loading…`})})}var Zj=`
139
- **Capability packs** are the harness's extension surface for "give the agent a new ability without me writing tool code." A pack is a small TypeScript module that exposes some combination of:
140
-
141
- - one or more MCP servers,
142
- - a skills directory the model can pull into context,
143
- - env-var declarations the harness validates at boot,
144
- - and a pre-validated default config.
145
-
146
- First-party packs live in [\`packages/capabilities/\`](https://github.com/render/render-harness/tree/main/packages/capabilities) and on npm with the \`render-harness-cap\` keyword. Community packs follow the same shape.
147
- `,Qj="\n### What ships in the box\n\n| Pack | What it adds | Env vars |\n| --- | --- | --- |\n| `@render-harness/cap-search-exa` | Exa MCP — high-recall web search | `EXA_API_KEY` |\n| `@render-harness/cap-search-tavily` | Tavily MCP — search + answer engine | `TAVILY_API_KEY` |\n| `@render-harness/cap-scrape-firecrawl` | Firecrawl MCP — page scraping | `FIRECRAWL_API_KEY` |\n| `@render-harness/cap-memory-pg` | Long-term memory in Postgres | (uses `DATABASE_URL`) |\n| `@render-harness/cap-browser-browserbase` | Browserbase MCP — full browser automation | `BROWSERBASE_API_KEY` |\n",$j=`
148
- ### Worked example: add web search
149
-
150
- Three steps. After this, the agent can search the web mid-conversation.
151
- `,eM="\n### The declarative path\n\nInside the harness's config registry, capabilities compose declaratively in `render-harness.yaml` instead of TypeScript. The same pack works in either path; `defineFromConfig()` reads the YAML, the build emits a Render Blueprint, and one click deploys it. See [`docs/registry-guide.md`](https://github.com/render/render-harness/blob/main/docs/registry-guide.md) for the full walkthrough.\n";function tM(){return(0,M.jsx)(zj,{title:`capabilities — extend without rewriting`,lede:`Plug-ins for the agent loop. Search, scrape, memory, browser.`,body:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(mj,{text:Zj}),(0,M.jsx)(mj,{text:Qj}),(0,M.jsx)(mj,{text:$j}),(0,M.jsxs)(`ol`,{className:`list-decimal space-y-3 pl-6 text-sm`,children:[(0,M.jsxs)(`li`,{children:[(0,M.jsx)(`p`,{children:`Install the pack:`}),(0,M.jsx)(Hj,{cmd:`pnpm add @render-harness/cap-search-exa`})]}),(0,M.jsxs)(`li`,{children:[(0,M.jsxs)(`p`,{children:[`Reference it in `,(0,M.jsx)(`code`,{className:`bg-code-bg px-1`,children:`render-harness.yaml`}),` under`,` `,(0,M.jsx)(`code`,{className:`bg-code-bg px-1`,children:`capabilities`}),`. The harness materializes the pack at boot, wires its MCP servers into each agent, and the live panel below reads the pack list to show what's installed:`]}),(0,M.jsx)(Bj,{language:`excerpt — render-harness.yaml`,children:`capabilities:
152
- - pack: "@render-harness/cap-search-exa"
153
- config:
154
- defaultMaxResults: 10`})]}),(0,M.jsxs)(`li`,{children:[(0,M.jsxs)(`p`,{children:[`Add the API key to `,(0,M.jsx)(`code`,{className:`bg-code-bg px-1`,children:`.env`}),`:`]}),(0,M.jsx)(Hj,{cmd:`echo "EXA_API_KEY=..." >> .env`})]}),(0,M.jsx)(`li`,{children:(0,M.jsxs)(`p`,{children:[`Restart `,(0,M.jsx)(Hj,{cmd:`pnpm dev`}),`. Now ask the chat agent to "search the web for…" and watch the new tool fire.`]})})]}),(0,M.jsx)(mj,{text:eM})]}),livePanel:(0,M.jsx)(nM,{})})}function nM(){let e=ut(),[t,n]=(0,j.useState)(null),[r,i]=(0,j.useState)(null);(0,j.useEffect)(()=>{let e=!1;return Ze().then(t=>{e||n(t.agents)}).catch(t=>{e||t instanceof Ie&&t.status===401||i(t instanceof Error?t:Error(String(t)))}),()=>{e=!0}},[]);let a=e?.capabilityPacks&&e.capabilityPacks.length>0?e.capabilityPacks:t?.[0]?.capabilityPacks??[];return(0,M.jsx)(Uj,{title:`installed packs`,children:r?(0,M.jsx)(`div`,{className:`text-err`,children:r.message}):t?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Wj,{k:`capabilityPacks`,v:String(a.length)}),a.length>0?(0,M.jsx)(`ul`,{className:`space-y-1 text-[11px]`,children:a.map(e=>(0,M.jsx)(`li`,{className:`border border-line px-2 py-1 font-mono`,children:e},e))}):(0,M.jsx)(`div`,{className:`text-[11px] text-muted`,children:`// none yet. Follow the recipe on the left and the pack name will show up here after restart.`}),t[0]&&(0,M.jsxs)(`div`,{className:`hairline-top mt-3 border-t border-line pt-3 text-[11px] text-muted`,children:[(0,M.jsxs)(`div`,{children:[`mcp servers: `,t[0].mcpServers.length]}),(0,M.jsxs)(`div`,{children:[`local tools: `,t[0].hasLocalTools?`yes`:`no`]}),(0,M.jsxs)(`div`,{children:[`skills: `,t[0].hasSkills?`yes`:`no`]})]})]}):(0,M.jsx)(`div`,{className:`text-muted`,children:`loading…`})})}var rM=365.2425,iM=6048e5,aM=864e5,oM=6e4,sM=36e5,cM=525600,lM=43200,uM=1440,dM=3600*24;dM*7,dM*rM/12*3;var fM=Symbol.for(`constructDateFrom`);function pM(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&fM in e?e[fM](t):e instanceof Date?new e.constructor(t):new Date(t)}function mM(e,t){return pM(t||e,e)}var hM={};function gM(){return hM}function _M(e,t){let n=gM(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=mM(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function vM(e,t){return _M(e,{...t,weekStartsOn:1})}function yM(e,t){let n=mM(e,t?.in),r=n.getFullYear(),i=pM(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let a=vM(i),o=pM(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let s=vM(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function bM(e){let t=mM(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function xM(e,...t){let n=pM.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function SM(e,t){let n=mM(e,t?.in);return n.setHours(0,0,0,0),n}function CM(e,t,n){let[r,i]=xM(n?.in,e,t),a=SM(r),o=SM(i),s=+a-bM(a),c=+o-bM(o);return Math.round((s-c)/aM)}function wM(e,t){let n=yM(e,t),r=pM(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),vM(r)}function TM(e,t){let n=mM(e)-+mM(t);return n<0?-1:n>0?1:n}function EM(e){return pM(e,Date.now())}function DM(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function OM(e){return!(!DM(e)&&typeof e!=`number`||isNaN(+mM(e)))}function kM(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function AM(e,t){let n=mM(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}var jM={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},MM=(e,t,n)=>{let r,i=jM[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function NM(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var PM={date:NM({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:NM({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:NM({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},FM={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},IM=(e,t,n,r)=>FM[e];function LM(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var RM={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:LM({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:LM({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:LM({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:LM({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:LM({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function zM(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?VM(s,e=>e.test(o)):BM(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function BM(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function VM(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function HM(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var UM={code:`en-US`,formatDistance:MM,formatLong:PM,formatRelative:IM,localize:RM,match:{ordinalNumber:HM({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:zM({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:zM({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:zM({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:zM({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:zM({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function WM(e,t){let n=mM(e,t?.in);return CM(n,AM(n))+1}function GM(e,t){let n=mM(e,t?.in),r=vM(n)-+wM(n);return Math.round(r/iM)+1}function KM(e,t){let n=mM(e,t?.in),r=n.getFullYear(),i=gM(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=pM(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=_M(o,t),c=pM(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=_M(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function qM(e,t){let n=gM(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=KM(e,t),a=pM(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),_M(a,t)}function JM(e,t){let n=mM(e,t?.in),r=_M(n,t)-+qM(n,t);return Math.round(r/iM)+1}function YM(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var XM={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return YM(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):YM(n+1,2)},d(e,t){return YM(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return YM(e.getHours()%12||12,t.length)},H(e,t){return YM(e.getHours(),t.length)},m(e,t){return YM(e.getMinutes(),t.length)},s(e,t){return YM(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return YM(Math.trunc(r*10**(n-3)),t.length)}},ZM={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},QM={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return XM.y(e,t)},Y:function(e,t,n,r){let i=KM(e,r),a=i>0?i:1-i;return t===`YY`?YM(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):YM(a,t.length)},R:function(e,t){return YM(yM(e),t.length)},u:function(e,t){return YM(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return YM(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return YM(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return XM.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return YM(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=JM(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):YM(i,t.length)},I:function(e,t,n){let r=GM(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):YM(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):XM.d(e,t)},D:function(e,t,n){let r=WM(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):YM(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return YM(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return YM(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return YM(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?ZM.noon:r===0?ZM.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?ZM.evening:r>=12?ZM.afternoon:r>=4?ZM.morning:ZM.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return XM.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):XM.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):YM(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):YM(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):XM.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):XM.s(e,t)},S:function(e,t){return XM.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return eN(r);case`XXXX`:case`XX`:return tN(r);default:return tN(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return eN(r);case`xxxx`:case`xx`:return tN(r);default:return tN(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+$M(r,`:`);default:return`GMT`+tN(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+$M(r,`:`);default:return`GMT`+tN(r,`:`)}},t:function(e,t,n){return YM(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return YM(+e,t.length)}};function $M(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+YM(a,2)}function eN(e,t){return e%60==0?(e>0?`-`:`+`)+YM(Math.abs(e)/60,2):tN(e,t)}function tN(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=YM(Math.trunc(r/60),2),a=YM(r%60,2);return n+i+t+a}var nN=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},rN=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},iN={p:rN,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return nN(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,nN(r,t)).replace(`{{time}}`,rN(i,t))}},aN=/^D+$/,oN=/^Y+$/,sN=[`D`,`DD`,`YY`,`YYYY`];function cN(e){return aN.test(e)}function lN(e){return oN.test(e)}function uN(e,t,n){let r=dN(e,t,n);if(console.warn(r),sN.includes(e))throw RangeError(r)}function dN(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var fN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,mN=/^'([^]*?)'?$/,hN=/''/g,gN=/[a-zA-Z]/;function _N(e,t,n){let r=gM(),i=n?.locale??r.locale??UM,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=mM(e,n?.in);if(!OM(s))throw RangeError(`Invalid time value`);let c=t.match(pN).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=iN[t];return n(e,i.formatLong)}return e}).join(``).match(fN).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:vN(e)};if(QM[t])return{isToken:!0,value:e};if(t.match(gN))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&lN(a)||!n?.useAdditionalDayOfYearTokens&&cN(a))&&uN(a,t,String(e));let o=QM[a[0]];return o(s,a,i.localize,l)}).join(``)}function vN(e){let t=e.match(mN);return t?t[1].replace(hN,`'`):e}function yN(e,t,n){let r=gM(),i=n?.locale??r.locale??UM,a=TM(e,t);if(isNaN(a))throw RangeError(`Invalid time value`);let o=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),[s,c]=xM(n?.in,...a>0?[t,e]:[e,t]),l=kM(n?.roundingMethod??`round`),u=c.getTime()-s.getTime(),d=u/oM,f=(u-(bM(c)-bM(s)))/oM,p=n?.unit,m;if(m=p||(d<1?`second`:d<60?`minute`:d<1440?`hour`:f<43200?`day`:f<525600?`month`:`year`),m===`second`){let e=l(u/1e3);return i.formatDistance(`xSeconds`,e,o)}else if(m===`minute`){let e=l(d);return i.formatDistance(`xMinutes`,e,o)}else if(m===`hour`){let e=l(d/60);return i.formatDistance(`xHours`,e,o)}else if(m===`day`){let e=l(f/uM);return i.formatDistance(`xDays`,e,o)}else if(m===`month`){let e=l(f/lM);return e===12&&p!==`month`?i.formatDistance(`xYears`,1,o):i.formatDistance(`xMonths`,e,o)}else{let e=l(f/cM);return i.formatDistance(`xYears`,e,o)}}function bN(e,t){return yN(e,EM(e),t)}function xN(e,t){let n=()=>pM(t?.in,NaN),r=t?.additionalDigits??2,i=EN(e),a;if(i.date){let e=DN(i.date,r);a=ON(e.restDateString,e.year)}if(!a||isNaN(+a))return n();let o=+a,s=0,c;if(i.time&&(s=AN(i.time),isNaN(s)))return n();if(i.timezone){if(c=MN(i.timezone),isNaN(c))return n()}else{let e=new Date(o+s),n=mM(0,t?.in);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}return mM(o+s+c,t?.in)}var SN={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},CN=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,wN=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,TN=/^([+-])(\d{2})(?::?(\d{2}))?$/;function EN(e){let t={},n=e.split(SN.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],SN.timeZoneDelimiter.test(t.date)&&(t.date=e.split(SN.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){let e=SN.timezone.exec(r);e?(t.time=r.replace(e[1],``),t.timezone=e[1]):t.time=r}return t}function DN(e,t){let n=RegExp(`^(?:(\\d{4}|[+-]\\d{`+(4+t)+`})|(\\d{2}|[+-]\\d{`+(2+t)+`})$)`),r=e.match(n);if(!r)return{year:NaN,restDateString:``};let i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function ON(e,t){if(t===null)return new Date(NaN);let n=e.match(CN);if(!n)return new Date(NaN);let r=!!n[4],i=kN(n[1]),a=kN(n[2])-1,o=kN(n[3]),s=kN(n[4]),c=kN(n[5])-1;if(r)return RN(t,s,c)?NN(t,s,c):new Date(NaN);{let e=new Date(0);return!IN(t,a,o)||!LN(t,i)?new Date(NaN):(e.setUTCFullYear(t,a,Math.max(i,o)),e)}}function kN(e){return e?parseInt(e):1}function AN(e){let t=e.match(wN);if(!t)return NaN;let n=jN(t[1]),r=jN(t[2]),i=jN(t[3]);return zN(n,r,i)?n*sM+r*oM+i*1e3:NaN}function jN(e){return e&&parseFloat(e.replace(`,`,`.`))||0}function MN(e){if(e===`Z`)return 0;let t=e.match(TN);if(!t)return 0;let n=t[1]===`+`?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return BN(r,i)?n*(r*sM+i*oM):NaN}function NN(e,t,n){let r=new Date(0);r.setUTCFullYear(e,0,4);let i=r.getUTCDay()||7,a=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var PN=[31,null,31,30,31,30,31,31,30,31,30,31];function FN(e){return e%400==0||e%4==0&&e%100!=0}function IN(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(PN[t]||(FN(e)?29:28))}function LN(e,t){return t>=1&&t<=(FN(e)?366:365)}function RN(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function zN(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function BN(e,t){return t>=0&&t<=59}var VN="\nThree changes you'll likely make first. Each is a one or two-line edit in `render-harness.yaml` (or the agent's TS source). Restart the dev process — `tsx` watches for changes and reboots the runtimes in a couple of seconds. No image rebuild, no reinstall, no Docker layer cache fights.\n",HN=`pnpm dev`,UN=`
155
- ### 1. Change the system prompt
156
-
157
- It's a string. Replace it with whatever shape you want the agent to take — a customer-support persona, a coding assistant, a bedtime-story writer.
158
- `,WN=`
159
- ### 2. Swap the model
160
-
161
- The harness has two model adapters: \`anthropic\` (direct Anthropic SDK) and \`openai-compat\` (any OpenAI-compatible gateway, including OpenRouter, Bedrock-via-LiteLLM, vLLM, Ollama, etc.). Switching providers is one config block.
162
- `,GN=`
163
- ### 3. Add an MCP server
164
-
165
- MCP gives the agent tools without you writing tool code. Drop a server into \`mcpServers\` and the harness connects, lists the tools, and exposes them to the model. Render's own MCP works as a read-only example — the agent can list services, fetch deploy logs, and inspect Postgres / Key Value resources.
166
- `,KN=`
167
- ### Putting it together
168
-
169
- Each of these is a small edit. The reload loop is fast enough that you can iterate on prompts and tool wiring with the chat tab open in the next monitor — change a line, hit reload, send a message, see the new behavior immediately.
170
- `;function qN(){let e=dt();return(0,M.jsx)(zj,{title:`customizing — make it yours`,lede:`Three concrete recipes; each ~5 lines and a 5-second reload.`,body:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(mj,{text:VN}),(0,M.jsxs)(`div`,{className:`border border-line p-3 text-xs`,children:[(0,M.jsx)(`div`,{className:`label mb-2`,children:`// the reload loop`}),(0,M.jsxs)(`div`,{className:`space-y-1`,children:[(0,M.jsxs)(`div`,{children:[`1. edit `,(0,M.jsx)(`code`,{className:`bg-code-bg px-1`,children:`render-harness.yaml`}),` (or the agent's`,` `,(0,M.jsx)(`code`,{className:`bg-code-bg px-1`,children:`src/*.ts`}),`)`]}),(0,M.jsxs)(`div`,{children:[`2. restart `,(0,M.jsx)(Hj,{cmd:HN}),` (or let`,` `,(0,M.jsx)(`code`,{className:`bg-code-bg px-1`,children:`tsx`}),` reload it for you)`]}),(0,M.jsx)(`div`,{children:`3. refresh the chat tab; the new behavior is live`})]})]}),(0,M.jsx)(mj,{text:UN}),(0,M.jsx)(Bj,{language:`excerpt — render-harness.yaml`,children:`agents:
171
- - id: ${e}
172
- agent:
173
- kind: builtin
174
- ref: chat
175
- systemPrompt: |
176
- You are a customer-support agent for Acme Co. Be empathetic and
177
- concrete. Always end with: "Anything else I can help with?"
178
- runtimes:
179
- - kind: web`}),(0,M.jsx)(mj,{text:WN}),(0,M.jsx)(Bj,{language:`excerpt — render-harness.yaml`,children:`shared:
180
- model:
181
- provider: openai-compat
182
- model: anthropic/claude-sonnet-4
183
- baseURL: https://openrouter.ai/api/v1
184
- apiKeyEnv: OPENROUTER_API_KEY`}),(0,M.jsxs)(`p`,{className:`text-xs text-muted`,children:[`Then add `,(0,M.jsx)(`code`,{className:`bg-code-bg px-1`,children:`OPENROUTER_API_KEY=sk-...`}),` to your`,(0,M.jsx)(`code`,{className:`bg-code-bg px-1`,children:`.env`}),` and restart.`]}),(0,M.jsx)(mj,{text:GN}),(0,M.jsx)(Bj,{language:`excerpt — render-harness.yaml`,children:`agents:
185
- - id: ${e}
186
- mcpServers:
187
- - name: render
188
- transport: http
189
- url: https://mcp.render.com/mcp
190
- headers:
191
- Authorization: "Bearer \${RENDER_API_KEY}"
192
- permissions:
193
- deniedTools:
194
- - render__delete_service
195
- - render__delete_postgres
196
- - render__delete_keyvalue`}),(0,M.jsxs)(`p`,{className:`text-xs text-muted`,children:[`Set `,(0,M.jsx)(`code`,{className:`bg-code-bg px-1`,children:`RENDER_API_KEY`}),` in`,` `,(0,M.jsx)(`code`,{className:`bg-code-bg px-1`,children:`.env`}),` (read-only is the default behavior; the explicit deny list above hardens it).`]}),(0,M.jsx)(mj,{text:KN})]}),livePanel:(0,M.jsx)(JN,{})})}function JN(){let[e,t]=(0,j.useState)(null),[n,r]=(0,j.useState)(null),[i,a]=(0,j.useState)(null),[,o]=(0,j.useState)(0);return(0,j.useEffect)(()=>{let e=!1,n=()=>{Promise.all([qe(),Ze()]).then(([n,i])=>{e||(t(n),r(i.agents))}).catch(t=>{e||t instanceof Ie&&t.status===401||a(t instanceof Error?t:Error(String(t)))})};n();let i=setInterval(n,5e3),s=setInterval(()=>o(e=>e+1),3e4);return()=>{e=!0,clearInterval(i),clearInterval(s)}},[]),(0,M.jsx)(Uj,{title:`reload state`,children:i?(0,M.jsx)(`div`,{className:`text-err`,children:i.message}):!e||!n?(0,M.jsx)(`div`,{className:`text-muted`,children:`loading…`}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Wj,{k:`last reload`,v:bN(xN(e.bootedAt),{addSuffix:!0})}),(0,M.jsx)(Wj,{k:`version`,v:n[0]?.version??`—`}),(0,M.jsx)(Wj,{k:`model`,v:n[0]?`${n[0].model.provider}/${n[0].model.model}`:`—`}),(0,M.jsx)(Wj,{k:`mcp servers`,v:String(n[0]?.mcpServers.length??0)}),(0,M.jsxs)(`div`,{className:`hairline-top mt-3 border-t border-line pt-3 text-[11px] text-muted`,children:[`Edit `,(0,M.jsx)(`code`,{className:`bg-code-bg px-1`,children:`agent.ts`}),`, run`,` `,(0,M.jsx)(Hj,{cmd:HN}),`, watch this number go to "just now".`]})]})})}function YN(e){return`
197
- The local Compose stack you're running has a one-to-one mapping to a Render Blueprint. Every container becomes a Render resource: \`postgres\` becomes a Managed Postgres, \`valkey\` becomes Render Key Value, \`${e}-web\` becomes a public web service, and \`${e}-worker\` becomes a background worker. The harness uses the same image and same code; only the runtime layout changes.
198
- `}var XN=`
199
- ### The Blueprint
200
-
201
- A starter \`render.yaml\` that matches your loaded agent is just one HTTP call away — see the live panel on the right. The shape mirrors [\`blueprints/render.private.yaml\`](https://github.com/render/render-harness/blob/main/blueprints/render.private.yaml):
202
-
203
- - a managed Postgres for state + queue
204
- - Render Key Value for cancel signals
205
- - a public \`type: web\` for the agent console / JSON API
206
- - a background \`type: worker\` for the queue consumer
207
-
208
- Why a background worker? It runs the agent loop, drains jobs from the queue, and doesn't accept inbound HTTP traffic.
209
- `,ZN="\n### Required env vars\n\nEach generated service needs these set in the Render Dashboard before the first deploy:\n\n- **`WEB_API_KEY`** — bearer token for the JSON API and the agent console's login form. Use a strong shared secret.\n- **`UI_COOKIE_SECRET`** — Render generates this automatically with `generateValue: true` in the Blueprint. Don't override.\n- **`ANTHROPIC_API_KEY`** (or `OPENAI_API_KEY`, etc., based on your model adapter) — model provider key.\n- Pack-specific keys (e.g. `EXA_API_KEY`, `RENDER_API_KEY`) — only the ones you've actually wired in.\n",QN="\n### Deploy\n\n1. Push the repo (with your edited `agent.ts`) to GitHub.\n2. In the Render Dashboard, **New → Blueprint**, point it at your repo's `render.yaml`.\n3. Render reads the file, prompts for the `sync: false` env vars, and provisions all four services together.\n4. Once the build finishes, the agent console is at the assigned `*.onrender.com` URL.\n\nFor zero-downtime rolling deploys, keep each conversation turn idempotent (state lives in `agent_conversations` + `agent_runs`, not in process memory) and let Render's rolling deploy handle the rest. Worker jobs in flight finish before the old container exits — the worker has a SIGTERM handler that waits up to 30s for in-flight runs.\n";function $N(e){let t=[...e].map(e=>`\`runtime-${e}\``).join(` + `),n=e.has(`cron`),r=e.has(`workflows`),i=[];return e.has(`web`)||i.push("- [`runtime-web`](https://github.com/render/render-harness/tree/main/packages/runtime-web) — synchronous HTTP shape (sub-30s). The bundled `runtime-worker` pair (above) is the multi-tenant production default."),n||i.push("- [`runtime-cron`](https://github.com/render/render-harness/tree/main/packages/runtime-cron) — one-shot scheduled runs, max 12 hours each. See the [`citations-monitor`](https://github.com/render/render-harness/tree/main/examples/citations-monitor) example."),r||i.push("- [`runtime-workflows`](https://github.com/render/render-harness/tree/main/packages/runtime-workflows) — durable, multi-day, human-in-the-loop. See the [`deploy-agent`](https://github.com/render/render-harness/tree/main/examples/deploy-agent) example."),i.length===0?`\n### Other runtimes\n\nThis bundle already uses every runtime adapter the harness ships (${t}). Same \`AgentDefinition\` would run unchanged on any of them — different deploy shape, same code.\n`:`\n### Other runtimes\n\nThis bundle uses ${t}. The harness also ships:\n\n${i.join(`
210
- `)}\n\nSame \`AgentDefinition\`. Same skills. Same MCP wiring. Different deploy shape.\n`}function eP(){let e=dt(),t=ut(),n=tP(e,t),r=new Set;for(let e of t?.agents??[]){for(let t of e.runtimes)r.add(t.kind);e.workflowTask&&r.add(`workflows`)}return(0,M.jsx)(zj,{title:`deploy — go to render`,lede:`Local Compose stack → render.yaml. One file, every service.`,body:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(mj,{text:YN(e)}),n.length>0&&(0,M.jsxs)(`div`,{className:`border border-line p-3 text-xs`,children:[(0,M.jsx)(`div`,{className:`label mb-2`,children:`// services this bundle deploys`}),(0,M.jsx)(`ul`,{className:`space-y-1 font-mono`,children:n.map(e=>(0,M.jsxs)(`li`,{children:[(0,M.jsx)(`code`,{className:`bg-code-bg px-1`,children:e.label}),` — `,e.role]},e.label))})]}),(0,M.jsx)(mj,{text:XN}),(0,M.jsx)(`p`,{className:`text-xs text-muted`,children:`Want to see the generated yaml inline? The live panel on the right has a "fetch blueprint" button — it returns a starter file based on the agent and queue this instance is configured with.`}),(0,M.jsx)(mj,{text:ZN}),(0,M.jsx)(mj,{text:QN}),(0,M.jsx)(`h3`,{className:`label mt-6`,children:`handy commands`}),(0,M.jsxs)(`div`,{className:`space-y-2 text-xs`,children:[(0,M.jsxs)(`div`,{children:[`Validate your Blueprint locally before pushing:`,` `,(0,M.jsx)(Hj,{cmd:`render blueprints validate render.yaml`})]}),(0,M.jsxs)(`div`,{children:[`Tail logs in production:`,` `,(0,M.jsx)(Hj,{cmd:`render logs --tail --service ${e}-worker`})]})]}),(0,M.jsx)(mj,{text:$N(r)})]}),livePanel:(0,M.jsx)(nP,{})})}function tP(e,t){if(!t)return[];let n=[],r=new Set,i=!1;for(let a of t.agents){a.workflowTask&&(i=!0);for(let t of a.runtimes)r.add(t.kind),t.kind===`cron`&&n.push({label:t.via===`workflow`?`${e}-cron-trigger-${a.id}`:`${e}-cron-${a.id}`,role:t.via===`workflow`?`triggers ${a.id} as a workflow task on \`${t.schedule}\``:`runs ${a.id} inline on \`${t.schedule}\``})}if(r.has(`web`)&&n.unshift({label:`${e}-web`,role:`public HTTP / SSE + agent console`}),r.has(`worker`)){let t=n.findIndex(t=>t.label===`${e}-web`);n.splice(t+1,0,{label:`${e}-worker`,role:`background worker — pulls jobs from the pg-boss queue`})}return i&&n.push({label:`${e}-workflows`,role:`Render Workflows service (Dashboard-provisioned)`}),n}function nP(){let[e,t]=(0,j.useState)(null),[n,r]=(0,j.useState)(!1),[i,a]=(0,j.useState)(null),[o,s]=(0,j.useState)(!1);return(0,M.jsxs)(Uj,{title:`blueprint`,children:[(0,M.jsx)(Wj,{k:`endpoint`,v:(0,M.jsx)(`a`,{href:`/blueprint`,target:`_blank`,rel:`noreferrer noopener`,className:`text-accent hover:underline`,children:`GET /blueprint`})}),!e&&(0,M.jsx)(Gj,{label:n?`fetching…`:`generate blueprint`,hint:`render.yaml`,onClick:()=>{r(!0),a(null),s(!1),Xe().then(e=>t(e)).catch(e=>{e instanceof Ie&&e.status===401||a(e instanceof Error?e:Error(String(e)))}).finally(()=>r(!1))}}),i&&(0,M.jsx)(`div`,{className:`text-err`,children:i.message}),e&&(0,M.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,M.jsxs)(`span`,{className:`label`,children:[`render.yaml (`,e.length.toLocaleString(),` chars)`]}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>{e&&(navigator.clipboard.writeText(e),s(!0),setTimeout(()=>s(!1),2e3))},className:`border border-line px-2 py-0.5 text-[10px] uppercase tracking-wider hover:border-accent hover:text-accent`,children:o?`copied!`:`copy`})]}),(0,M.jsx)(Bj,{language:`render.yaml`,children:e}),(0,M.jsx)(Gj,{label:`open Render dashboard`,hint:`new blueprint`,href:`https://dashboard.render.com/blueprints`})]})]})}function rP(e){return`
211
- You're looking at the **${e}** stack — an end-to-end agent deployment built on the Render agent harness. Everything you see in the UI is powered by four cooperating containers running locally via Docker Compose:
212
-
213
- - \`${e}-web\` — the public web service. It serves this UI, exposes the JSON+SSE API (\`/runs\`, \`/agents\`, \`/usage\`, \`/diagnostics\`), and enqueues new run jobs onto a Postgres-backed queue.
214
- - \`${e}-worker\` — a separate process that pulls jobs off the queue and actually drives the agent loop. Same image as the web service, just a different command.
215
- - \`postgres\` — durable state. Runs, messages, tool calls, and the queue itself all live here.
216
- - \`valkey\` — Redis-compatible. Holds short-lived signals like cancel flags. Cancellation only works because we have it.
217
-
218
- When you send a chat message:
219
-
220
- 1. Your browser POSTs to \`/runs\` (or \`/runs/:id/input\` on a follow-up turn).
221
- 2. The web service persists the message and pushes a job onto the queue in Postgres.
222
- 3. The worker pulls the job, calls Anthropic, writes assistant messages back to Postgres, and emits Postgres \`NOTIFY\` events.
223
- 4. The web service tails \`NOTIFY\` and forwards everything to your browser as Server-Sent Events on \`/runs/:id/stream\`.
224
-
225
- That separation is deliberate: the public web service stays cheap and stateless, the worker can be put on the private network in production. The same code shape works for Slack agents, scheduled jobs, and durable Workflows tasks — only the runtime adapter changes.
226
- `}function iP(){let e=dt(),t=ut(),[n,r]=(0,j.useState)(null),[i,a]=(0,j.useState)(null),[o,s]=(0,j.useState)(null);return(0,j.useEffect)(()=>{let e=!1;return Promise.all([Ze(),Ke()]).then(([t,n])=>{e||(r(t.agents),a(n.checks))}).catch(t=>{e||t instanceof Ie&&t.status===401||s(t instanceof Error?t:Error(String(t)))}),()=>{e=!0}},[]),(0,M.jsx)(zj,{title:`tour — what's running`,lede:`Five minutes from cold-start to grokking the moving parts.`,body:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(mj,{text:rP(e)}),(0,M.jsx)(oP,{name:e,deployment:t}),(0,M.jsx)(`h3`,{className:`label mt-6`,children:`peek at the wiring`}),(0,M.jsx)(`p`,{children:`From your shell, watch what each container is doing right now:`}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(Hj,{cmd:`docker compose logs -f ${e}-worker`}),` — agent loop, model calls, tool use.`]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(Hj,{cmd:`docker compose logs -f ${e}-web`}),` — HTTP requests, SSE streams.`]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(Hj,{cmd:`docker compose exec postgres psql -U harness -d harness`}),` — runs and messages live in `,(0,M.jsx)(`code`,{className:`bg-code-bg px-1`,children:`agent_runs`}),` and`,` `,(0,M.jsx)(`code`,{className:`bg-code-bg px-1`,children:`agent_messages`}),`.`]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(Hj,{cmd:`docker compose exec valkey valkey-cli`}),` — try`,` `,(0,M.jsx)(`code`,{className:`bg-code-bg px-1`,children:`KEYS cancel:*`}),` after you click cancel on an active run.`]})]})]}),livePanel:(0,M.jsx)(Uj,{title:`this deployment`,children:o?(0,M.jsx)(`div`,{className:`text-err`,children:o.message}):!n||!i?(0,M.jsx)(`div`,{className:`text-muted`,children:`loading…`}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Wj,{k:`agents loaded`,v:n.length===0?`0`:`${n.length} (${n.map(e=>e.name).join(`, `)})`}),(0,M.jsx)(Wj,{k:`health`,v:aP(i)}),(0,M.jsx)(Wj,{k:`errors`,v:String(i.filter(e=>e.level===`error`).length)}),(0,M.jsx)(Wj,{k:`warnings`,v:String(i.filter(e=>e.level===`warn`).length)}),(0,M.jsx)(`div`,{className:`hairline-top mt-3 border-t border-line pt-3`,children:(0,M.jsx)(Gj,{label:`see all checks`,hint:`diagnostics`,onClick:()=>{window.location.hash=`#/usage`}})})]})})})}function aP(e){let t=e.filter(e=>e.level===`error`).length,n=e.filter(e=>e.level===`warn`).length;return t>0?`needs attention`:n>0?`ok with warnings`:`all good`}function oP({name:e,deployment:t}){return(0,M.jsx)(WT,{chart:t?cP(e,t):cP(e,sP(e))})}function sP(e){return{name:e,agents:[{id:e,name:e,runtimes:[{kind:`web`},{kind:`worker`}],workflowTask:!1}]}}function cP(e,t){let n=new Set,r=[],i=[],a=[];for(let e of t.agents){e.workflowTask&&a.push(e);for(let t of e.runtimes)n.add(t.kind),t.kind===`cron`&&(t.via===`workflow`?i.push(e):r.push(e))}let o=n.has(`web`),s=n.has(`worker`),c=a.length>0,l=[`flowchart TD`];o&&(l.push(` web["${uP(`${e}-web`)}<br/>serves UI, /runs, SSE"]`),l.push(` web -->|"enqueue job (pg-boss)"| postgres`)),l.push(` postgres["postgres<br/>agent_runs, agent_messages, pgboss.job"]`),s&&(l.push(` postgres -->|"pull job + NOTIFY"| worker`),l.push(` worker["${uP(`${e}-worker`)}<br/>model + MCP loop"]`)),l.push(` valkey["valkey (KV)<br/>cancel:runId"]`),o&&l.push(` web -. "cancel signal (TTL)" .-> valkey`),s&&l.push(` worker -. check cancel .-> valkey`);for(let t of r){let n=lP(`cron`,t.id);l.push(` ${n}["${uP(`${e}-cron-${t.id}`)}<br/>inline agent loop"]`),l.push(` ${n} -->|"runs ${uP(t.id)} on schedule"| postgres`)}for(let t of i){let n=lP(`cronTrigger`,t.id);l.push(` ${n}["${uP(`${e}-cron-trigger-${t.id}`)}<br/>runTask trigger"]`),l.push(` ${n} -->|"starts ${uP(t.id)} task"| workflows`)}return c&&(l.push(` workflows["${uP(`${e}-workflows`)}<br/>Render Workflows: ${a.length} task${a.length===1?``:`s`}"]`),l.push(` workflows -->|"writes state"| postgres`)),l.join(`
227
- `)}function lP(e,t){return`${e}_${t.replaceAll(/[^a-zA-Z0-9_]/g,`_`)}`}function uP(e){return e.replaceAll(`"`,`\\"`)}var dP=[{id:`tour`,label:`01. tour`,blurb:`what's running and how it fits together`,Component:iP},{id:`agent`,label:`02. agent + runtime`,blurb:`defineAgent, serveWeb, startWorker`,Component:Yj},{id:`customizing`,label:`03. customizing`,blurb:`prompts, models, MCP servers`,Component:qN},{id:`capabilities`,label:`04. capabilities`,blurb:`first-party + community packs`,Component:tM},{id:`deploy`,label:`05. deploy`,blurb:`blueprint to Render`,Component:eP}],fP=new Set(dP.map(e=>e.id));function pP(e){return fP.has(e)}function mP({section:e,onSectionChange:t}){let n=e??dP[0]?.id??`tour`,r=dP.find(e=>e.id===n)?.Component??iP,i=(0,j.useRef)(null);return(0,j.useEffect)(()=>{n&&i.current?.scrollTo({top:0,behavior:`instant`})},[n]),(0,M.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-[200px_1fr]`,children:[(0,M.jsx)(hP,{active:n,onSectionChange:t}),(0,M.jsx)(`div`,{ref:i,className:`min-w-0`,children:(0,M.jsx)(r,{})})]})}function hP({active:e,onSectionChange:t}){return(0,M.jsxs)(`aside`,{className:`lg:sticky lg:top-4 lg:self-start`,children:[(0,M.jsx)(`div`,{className:`label mb-3`,children:`// guide`}),(0,M.jsx)(`nav`,{className:`space-y-1 text-xs`,children:dP.map(n=>(0,M.jsxs)(`button`,{type:`button`,onClick:()=>t(n.id),className:`flex w-full flex-col items-start border-l-2 px-2 py-1.5 text-left transition ${n.id===e?`border-accent text-accent`:`border-line text-ink hover:border-accent hover:text-accent`}`,children:[(0,M.jsx)(`span`,{className:`uppercase tracking-wider`,children:n.label}),(0,M.jsx)(`span`,{className:`text-[10px] normal-case text-muted`,children:n.blurb})]},n.id))})]})}var gP=e=>Number.isFinite(e)?e:0;function _P(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(gP(e*1e3)%1e3),nanoseconds:Math.trunc(gP(e*1e6)%1e3)}}function vP(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}function yP(e){switch(typeof e){case`number`:if(Number.isFinite(e))return _P(e);break;case`bigint`:return vP(e)}throw TypeError(`Expected a finite number or bigint`)}var bP=e=>e===0||e===0n,xP=(e,t)=>t===1||t===1n?e:`${e}s`,SP=1e-7,CP=24n*60n*60n*1000n;function wP(e,t){let n=typeof e==`bigint`;if(!n&&!Number.isFinite(e))throw TypeError(`Expected a finite number or bigint`);t={...t};let r=e<0?`-`:``;e=e<0?-e:e,t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let i=[],a=(e,t)=>{let n=Math.floor(e*10**t+SP);return(Math.round(n)/10**t).toFixed(t)},o=(e,n,r,a)=>{if(!((i.length===0||!t.colonNotation)&&bP(e)&&!(t.colonNotation&&r===`m`))){if(a??=String(e),t.colonNotation){let e=a.includes(`.`)?a.split(`.`)[0].length:a.length,t=i.length>0?2:1;a=`0`.repeat(Math.max(0,t-e))+a}else a+=t.verbose?` `+xP(n,e):r;i.push(a)}},s=yP(e),c=BigInt(s.days);if(t.hideYearAndDays?o(BigInt(c)*24n+BigInt(s.hours),`hour`,`h`):(t.hideYear?o(c,`day`,`d`):(o(c/365n,`year`,`y`),o(c%365n,`day`,`d`)),o(Number(s.hours),`hour`,`h`)),o(Number(s.minutes),`minute`,`m`),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){let e=Number(s.seconds),n=Number(s.milliseconds),r=Number(s.microseconds),i=Number(s.nanoseconds);if(o(e,`second`,`s`),t.formatSubMilliseconds)o(n,`millisecond`,`ms`),o(r,`microsecond`,`µs`),o(i,`nanosecond`,`ns`);else{let e=n+r/1e3+i/1e6,a=typeof t.millisecondsDecimalDigits==`number`?t.millisecondsDecimalDigits:0,s=a?e.toFixed(a):e>=1?Math.round(e):Math.ceil(e);o(Number.parseFloat(s),`millisecond`,`ms`,s)}}else{let r=a((n?Number(e%CP):e)/1e3%60,typeof t.secondsDecimalDigits==`number`?t.secondsDecimalDigits:1),i=t.keepDecimalsOnWholeSeconds?r:r.replace(/\.0+$/,``);o(Number.parseFloat(i),`second`,`s`,i)}if(i.length===0)return r+`0`+(t.verbose?` milliseconds`:`ms`);let l=t.colonNotation?`:`:` `;return typeof t.unitCount==`number`&&(i=i.slice(0,Math.max(t.unitCount,1))),r+i.join(l)}var TP=new Intl.NumberFormat(`en`,{notation:`compact`,maximumFractionDigits:1}),EP=new Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`}),DP=new Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`,minimumFractionDigits:4,maximumFractionDigits:4});function OP(e){let t=xN(e);return Number.isNaN(t.getTime())?e:`${bN(t,{addSuffix:!0})}`}function kP(e){if(!e)return`—`;let t=xN(e);return Number.isNaN(t.getTime())?e:_N(t,`yyyy-MM-dd HH:mm:ss`)}function AP(e){return e==null||!Number.isFinite(e)?`—`:wP(e,{compact:!0})}function jP(e){return Number.isFinite(e)?TP.format(e):`—`}function MP(e){return!Number.isFinite(e)||e===0?EP.format(0):e>0&&e<.01?DP.format(e):EP.format(e)}var NP={pending:`badge`,running:`badge badge-fill`,paused:`badge badge-warn`,completed:`badge`,failed:`badge badge-err`,cancelled:`badge`},PP={pending:`PENDING`,running:`RUNNING`,paused:`PAUSED`,completed:`DONE`,failed:`FAILED`,cancelled:`CANCELLED`};function FP({status:e}){return(0,M.jsxs)(`span`,{className:NP[e],children:[`[`,PP[e],`]`]})}function IP({runId:e,onBack:t,onOpenInChat:n}){let[r,i]=(0,j.useState)(null),[a,o]=(0,j.useState)([]),[s,c]=(0,j.useState)(!0),[l,u]=(0,j.useState)(null),[d,f]=(0,j.useState)(null),[p,m]=(0,j.useState)(``),[h,g]=(0,j.useState)(!1),[_,v]=(0,j.useState)(!1);(0,j.useEffect)(()=>{let t=!1;return c(!0),u(null),Promise.all([ze(e),Ue(e)]).then(([e,n])=>{t||(i(e),o(n.toolCalls))}).catch(e=>{t||e instanceof Ie&&e.status===401||u(e instanceof Error?e:Error(String(e)))}).finally(()=>{t||c(!1)}),()=>{t=!0}},[e]),(0,j.useEffect)(()=>{if(r&&!(r.run.status===`completed`||r.run.status===`failed`||r.run.status===`cancelled`))return rt(e,{onMessage:e=>{i(t=>!t||t.messages.some(t=>t.id===e.id)?t:{...t,messages:[...t.messages,e]})},onStatus:t=>{i(e=>e&&{...e,run:{...e.run,status:t}}),Ue(e).then(e=>o(e.toolCalls)).catch(()=>{})}})},[e,r]);let y=(0,j.useMemo)(()=>BP(r?.messages??[],a),[r?.messages,a]),b=async()=>{f(null),v(!0);try{await We(e)}catch(e){f(e instanceof Error?e.message:String(e))}finally{v(!1)}},x=async t=>{if(t.preventDefault(),f(null),p.trim()){g(!0);try{await Ge(e,p),m(``),i(await ze(e))}catch(e){f(e instanceof Error?e.message:String(e))}finally{g(!1)}}},S=r?.run.conversationId??null;return(0,M.jsxs)(`div`,{className:`space-y-4`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,M.jsx)(`button`,{type:`button`,onClick:t,className:`text-xs uppercase tracking-widest text-muted hover:text-accent`,children:`← back to runs`}),S&&n&&(0,M.jsx)(`button`,{type:`button`,onClick:()=>n(S),className:`btn`,title:`Open the parent conversation in the Chat tab.`,children:`open in chat`})]}),(0,M.jsx)(ft,{loading:s,error:l,children:r&&(0,M.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 lg:grid-cols-[260px_1fr_280px]`,children:[(0,M.jsx)(LP,{run:r.run}),(0,M.jsx)(VP,{items:y}),(0,M.jsx)(zP,{status:r.run.status,onCancel:b,cancelBusy:_,hitlInput:p,setHitlInput:m,hitlBusy:h,onSendInput:x,actionError:d})]})})]})}function LP({run:e}){let t=(e.cursor.usage?.inputTokens??0)+(e.cursor.usage?.outputTokens??0);return(0,M.jsxs)(`aside`,{className:`panel space-y-4 p-4 text-xs`,children:[(0,M.jsx)(`div`,{children:(0,M.jsx)(FP,{status:e.status})}),(0,M.jsx)(RP,{label:`run id`,value:(0,M.jsx)(`span`,{className:`break-all`,children:e.id})}),(0,M.jsx)(RP,{label:`agent`,value:`${e.agentName}@${e.agentVersion}`}),(0,M.jsx)(RP,{label:`user`,value:e.userId??`—`}),(0,M.jsx)(RP,{label:`created`,value:kP(e.createdAt)}),(0,M.jsx)(RP,{label:`started`,value:kP(e.startedAt)}),(0,M.jsx)(RP,{label:`finished`,value:kP(e.finishedAt)}),(0,M.jsx)(RP,{label:`turns`,value:String(e.cursor.turn??0)}),(0,M.jsx)(RP,{label:`tool calls`,value:String(e.cursor.toolCalls??0)}),(0,M.jsx)(RP,{label:`tokens`,value:jP(t)}),(0,M.jsx)(RP,{label:`cost`,value:MP(e.totalCostUsd)})]})}function RP({label:e,value:t}){return(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{className:`label`,children:e}),(0,M.jsx)(`div`,{className:`mt-0.5 break-all`,children:t})]})}function zP({status:e,onCancel:t,cancelBusy:n,hitlInput:r,setHitlInput:i,hitlBusy:a,onSendInput:o,actionError:s}){return(0,M.jsxs)(`aside`,{className:`panel space-y-3 p-4 text-xs`,children:[(0,M.jsx)(`div`,{className:`label`,children:`actions`}),(0,M.jsx)(`button`,{type:`button`,onClick:t,disabled:e===`completed`||e===`failed`||e===`cancelled`||n,className:`btn btn-danger w-full`,children:n?`Cancelling…`:`Cancel run`}),e===`paused`&&(0,M.jsxs)(`form`,{onSubmit:o,className:`space-y-2`,children:[(0,M.jsx)(`div`,{className:`label`,children:`send hitl input`}),(0,M.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,M.jsx)(`span`,{className:`text-accent`,children:`>`}),(0,M.jsx)(`textarea`,{rows:4,value:r,onChange:e=>i(e.target.value),placeholder:`reply to the paused agent…`,className:`w-full text-xs`})]}),(0,M.jsx)(`button`,{type:`submit`,disabled:a||!r.trim(),className:`btn btn-primary w-full`,children:a?`Sending…`:`Resume run`})]}),s&&(0,M.jsx)(`div`,{className:`border border-err p-2 text-xs text-err`,children:s})]})}function BP(e,t){let n=[];for(let t of e)n.push({kind:`message`,at:new Date(t.createdAt).getTime(),message:t});for(let e of t)n.push({kind:`tool`,at:new Date(e.createdAt).getTime(),call:e});return n.sort((e,t)=>e.at-t.at)}function VP({items:e}){return e.length===0?(0,M.jsx)(`div`,{className:`panel p-6 text-center text-xs text-muted`,children:`// no activity yet`}):(0,M.jsx)(`div`,{className:`space-y-3`,children:e.map(e=>e.kind===`message`?(0,M.jsx)(HP,{message:e.message},`m-${e.message.id}`):(0,M.jsx)(GP,{call:e.call},`t-${e.call.id}`))})}function HP({message:e}){return(0,M.jsxs)(`div`,{className:`panel p-4 text-xs`,children:[(0,M.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[(0,M.jsx)(`span`,{className:`badge`,children:e.role.toUpperCase()}),(0,M.jsx)(`span`,{className:`text-muted`,children:OP(e.createdAt)})]}),(0,M.jsx)(`div`,{className:`space-y-2`,children:e.content.map((t,n)=>(0,M.jsx)(WP,{block:t},UP(e.id,t,n)))}),e.usage&&(0,M.jsxs)(`div`,{className:`mt-2 text-[11px] text-muted`,children:[jP(e.usage.inputTokens),` in · `,jP(e.usage.outputTokens),` `,`out`]})]})}function UP(e,t,n){return t.type===`tool_use`?`${e}-tu-${t.id}`:t.type===`tool_result`?`${e}-tr-${t.tool_use_id}`:`${e}-${t.type}-${n}`}function WP({block:e}){return e.type===`text`?(0,M.jsx)(`pre`,{className:`whitespace-pre-wrap wrap-break-word`,children:e.text}):e.type===`thinking`?(0,M.jsxs)(`details`,{className:`border border-line p-2`,children:[(0,M.jsx)(`summary`,{className:`label cursor-pointer`,children:`[thinking]`}),(0,M.jsx)(`pre`,{className:`mt-2 whitespace-pre-wrap text-[11px] text-muted`,children:e.thinking})]}):e.type===`tool_use`?(0,M.jsxs)(`div`,{className:`border border-line p-2`,children:[(0,M.jsxs)(`div`,{className:`mb-1`,children:[(0,M.jsx)(`span`,{className:`badge`,children:`TOOL_USE`}),(0,M.jsx)(`span`,{className:`ml-2`,children:e.name})]}),(0,M.jsx)(`pre`,{className:`max-h-48 overflow-auto whitespace-pre-wrap break-all text-[11px]`,children:JSON.stringify(e.input,null,2)})]}):e.type===`tool_result`?(0,M.jsxs)(`div`,{className:`border p-2 ${e.is_error?`border-err`:`border-line`}`,children:[(0,M.jsx)(`div`,{children:(0,M.jsxs)(`span`,{className:e.is_error?`badge badge-err`:`badge`,children:[`TOOL_RESULT`,e.is_error?` · ERROR`:``]})}),(0,M.jsxs)(`details`,{className:`mt-2`,children:[(0,M.jsx)(`summary`,{className:`label cursor-pointer`,children:`raw result`}),(0,M.jsx)(`pre`,{className:`mt-1 max-h-48 overflow-auto whitespace-pre-wrap break-all text-[11px]`,children:e.content})]})]}):null}function GP({call:e}){let[t,n]=(0,j.useState)(!1),r=e.result?.isError===!0||e.status===`failed`;return(0,M.jsxs)(`div`,{className:`border p-3 text-xs ${r?`border-err`:`border-line`}`,children:[(0,M.jsxs)(`button`,{type:`button`,onClick:()=>n(e=>!e),className:`flex w-full items-center justify-between gap-3 text-left`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(`span`,{className:r?`badge badge-err`:`badge`,children:`TOOL`}),(0,M.jsx)(`span`,{children:e.name}),(0,M.jsx)(`span`,{className:`label`,children:e.status})]}),(0,M.jsxs)(`div`,{className:`text-muted`,children:[AP(e.result?.durationMs??null),(0,M.jsx)(`span`,{className:`ml-2`,children:t?`[-]`:`[+]`})]})]}),t&&(0,M.jsxs)(`div`,{className:`mt-3 space-y-3`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{className:`label`,children:`input`}),(0,M.jsx)(`pre`,{className:`mt-1 max-h-64 overflow-auto whitespace-pre-wrap break-all text-[11px]`,children:JSON.stringify(e.input,null,2)})]}),e.result?(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`label`,children:[`result · `,jP(e.result.tokenCount),` tokens`]}),(0,M.jsxs)(`details`,{className:`mt-1`,children:[(0,M.jsx)(`summary`,{className:`label cursor-pointer`,children:`raw result`}),(0,M.jsx)(`pre`,{className:`mt-1 max-h-96 overflow-auto whitespace-pre-wrap break-all text-[11px]`,children:e.result.content})]})]}):(0,M.jsx)(`div`,{className:`text-muted`,children:`// result not yet recorded`})]})]})}var KP=[`pending`,`running`,`paused`,`completed`,`failed`,`cancelled`];function qP({runId:e,onSelectRun:t,onBackToList:n,onOpenInChat:r}){return e?(0,M.jsx)(IP,{runId:e,onBack:n,onOpenInChat:r}):(0,M.jsx)(JP,{onSelect:t})}function JP({onSelect:e}){let[t,n]=(0,j.useState)([]),[r,i]=(0,j.useState)(null),[a,o]=(0,j.useState)(!0),[s,c]=(0,j.useState)(null),[l,u]=(0,j.useState)(new Set),[d,f]=(0,j.useState)(``),[p,m]=(0,j.useState)(!1),h=(0,j.useCallback)(async e=>{c(null),e?.append||o(!0);try{let t=await Re({status:Array.from(l),...d.trim()?{agent:[d.trim()]}:{},...e?.cursor?{cursor:e.cursor}:{},...p?{allUsers:!0}:{}});n(n=>e?.append?[...n,...t.runs]:t.runs),i(t.nextCursor)}catch(e){(!(e instanceof Ie)||e.status!==401)&&c(e instanceof Error?e:Error(String(e)))}finally{o(!1)}},[l,d,p]);(0,j.useEffect)(()=>{h()},[h]);let g=e=>{u(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,M.jsxs)(`div`,{className:`space-y-4`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsx)(`span`,{className:`label mr-1`,children:`FILTER`}),KP.map(e=>(0,M.jsx)(`button`,{type:`button`,onClick:()=>g(e),className:`btn ${l.has(e)?`btn-active`:``}`,children:e},e)),(0,M.jsx)(`input`,{type:`text`,placeholder:`agent name`,value:d,onChange:e=>f(e.target.value),className:`min-w-[10rem] text-xs`}),(0,M.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-muted`,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:p,onChange:e=>m(e.target.checked)}),`all users`]}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>void h(),className:`btn ml-auto`,children:`Refresh`})]}),(0,M.jsxs)(ft,{loading:a,error:s,empty:{when:t.length===0,message:`// no runs match the current filters`},children:[(0,M.jsx)(`div`,{className:`panel`,children:(0,M.jsxs)(`table`,{className:`w-full text-xs`,children:[(0,M.jsx)(`thead`,{className:`label`,children:(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(YP,{children:`STATUS`}),(0,M.jsx)(YP,{children:`RUN`}),(0,M.jsx)(YP,{children:`AGENT`}),(0,M.jsx)(YP,{children:`USER`}),(0,M.jsx)(YP,{children:`TOKENS`}),(0,M.jsx)(YP,{children:`COST`}),(0,M.jsx)(YP,{children:`CREATED`})]})}),(0,M.jsx)(`tbody`,{children:t.map((t,n)=>{let r=(t.cursor.usage?.inputTokens??0)+(t.cursor.usage?.outputTokens??0);return(0,M.jsxs)(`tr`,{className:`cursor-pointer hover:text-accent ${n>0?`border-t border-line`:``}`,onClick:()=>e(t.id),children:[(0,M.jsx)(XP,{children:(0,M.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,M.jsx)(FP,{status:t.status}),t.conversationId&&(0,M.jsx)(`span`,{className:`badge`,title:`Part of a conversation`,children:`chat`})]})}),(0,M.jsxs)(XP,{children:[t.id.slice(0,12),`…`]}),(0,M.jsxs)(XP,{children:[(0,M.jsx)(`div`,{children:t.agentName}),(0,M.jsxs)(`div`,{className:`text-[10px] text-muted`,children:[`v`,t.agentVersion]})]}),(0,M.jsx)(XP,{children:t.userId??`—`}),(0,M.jsx)(XP,{className:`tabular-nums`,children:jP(r)}),(0,M.jsx)(XP,{className:`tabular-nums`,children:MP(t.totalCostUsd)}),(0,M.jsx)(XP,{children:OP(t.createdAt)})]},t.id)})})]})}),r&&(0,M.jsx)(`div`,{className:`flex justify-center pt-2`,children:(0,M.jsx)(`button`,{type:`button`,onClick:()=>void h({append:!0,cursor:r}),className:`btn`,children:`Load more`})})]})]})}function YP({children:e}){return(0,M.jsx)(`th`,{className:`border-b border-line px-3 py-2 text-left font-medium`,children:e})}function XP({children:e,className:t}){return(0,M.jsx)(`td`,{className:`px-3 py-2 align-top ${t??``}`,children:e})}function ZP(){let[e,t]=(0,j.useState)([]),[n,r]=(0,j.useState)([]),[i,a]=(0,j.useState)(!0),[o,s]=(0,j.useState)(null),c=(0,j.useCallback)(async()=>{a(!0),s(null);try{let[e,n]=await Promise.all([Je(),Ye()]);t(e.schedules),r(n.items)}catch(e){(!(e instanceof Ie)||e.status!==401)&&s(e instanceof Error?e:Error(String(e)))}finally{a(!1)}},[]);return(0,j.useEffect)(()=>{c()},[c]),(0,M.jsxs)(`div`,{className:`space-y-6`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h2`,{className:`text-sm uppercase tracking-widest`,children:`Scheduled tasks`}),(0,M.jsx)(`p`,{className:`mt-1 text-xs text-muted`,children:`Create or change schedules from chat. This tab shows what is active and what delivered.`})]}),(0,M.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>void c(),children:`Refresh`})]}),(0,M.jsxs)(ft,{loading:i,error:o,empty:{when:e.length===0&&n.length===0,message:`// no schedules or scheduled outputs yet`},children:[(0,M.jsxs)(`section`,{className:`space-y-3`,children:[(0,M.jsx)(`div`,{className:`hr-section`,children:`Schedules`}),(0,M.jsx)(`div`,{className:`panel overflow-x-auto`,children:(0,M.jsxs)(`table`,{className:`w-full text-xs`,children:[(0,M.jsx)(`thead`,{className:`label`,children:(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(QP,{children:`STATE`}),(0,M.jsx)(QP,{children:`AGENT`}),(0,M.jsx)(QP,{children:`CRON`}),(0,M.jsx)(QP,{children:`NEXT`}),(0,M.jsx)(QP,{children:`LAST`}),(0,M.jsx)(QP,{children:`NOTIFY`})]})}),(0,M.jsx)(`tbody`,{children:e.map((e,t)=>(0,M.jsxs)(`tr`,{className:t>0?`border-t border-line`:``,children:[(0,M.jsxs)($P,{children:[(0,M.jsx)(`span`,{className:`badge ${e.enabled?`text-accent`:``}`,children:e.enabled?`enabled`:`disabled`}),(0,M.jsxs)(`div`,{className:`mt-1 text-[10px] text-muted`,children:[e.id.slice(0,12),`…`]})]}),(0,M.jsx)($P,{children:e.agentName}),(0,M.jsxs)($P,{children:[(0,M.jsx)(`code`,{children:e.cronExpr}),(0,M.jsx)(`div`,{className:`text-[10px] text-muted`,children:e.timezone})]}),(0,M.jsx)($P,{children:kP(e.nextFireAt)}),(0,M.jsx)($P,{children:kP(e.lastFiredAt)}),(0,M.jsx)($P,{children:e.notifications.map(e=>e.kind).join(`, `)||`—`})]},e.id))})]})})]}),(0,M.jsxs)(`section`,{className:`space-y-3`,children:[(0,M.jsx)(`div`,{className:`hr-section`,children:`Inbox`}),(0,M.jsx)(`div`,{className:`space-y-2`,children:n.map(e=>(0,M.jsxs)(`article`,{className:`panel p-3 text-xs`,children:[(0,M.jsxs)(`div`,{className:`mb-2 flex flex-wrap items-center gap-2 text-[10px] uppercase tracking-wider text-muted`,children:[(0,M.jsx)(`span`,{children:OP(e.createdAt)}),(0,M.jsxs)(`span`,{children:[`run `,e.runId.slice(0,12),`…`]}),e.scheduleId&&(0,M.jsxs)(`span`,{children:[`schedule `,e.scheduleId.slice(0,12),`…`]}),(0,M.jsx)(`span`,{children:e.status})]}),(0,M.jsx)(`p`,{className:`whitespace-pre-wrap`,children:e.summary})]},e.id))})]})]})]})}function QP({children:e}){return(0,M.jsx)(`th`,{className:`border-b border-line px-3 py-2 text-left font-medium`,children:e})}function $P({children:e}){return(0,M.jsx)(`td`,{className:`px-3 py-2 align-top`,children:e})}var eF=[{id:7,label:`7d`},{id:30,label:`30d`},{id:90,label:`90d`}];function tF(){let[e,t]=(0,j.useState)(30),[n,r]=(0,j.useState)(!1),[i,a]=(0,j.useState)([]),[o,s]=(0,j.useState)(!0),[c,l]=(0,j.useState)(null);(0,j.useEffect)(()=>{let t=!1;s(!0),l(null);let r=new Date;return nt({from:new Date(r.getTime()-e*24*60*60*1e3).toISOString(),to:r.toISOString(),allUsers:n}).then(e=>{t||a(e.rollups)}).catch(e=>{t||e instanceof Ie&&e.status===401||l(e instanceof Error?e:Error(String(e)))}).finally(()=>{t||s(!1)}),()=>{t=!0}},[e,n]);let u=(0,j.useMemo)(()=>{let e=0,t=0,n=0,r=0;for(let a of i)e+=a.runs,t+=a.costUsd,n+=a.inputTokens,r+=a.outputTokens;return{runs:e,cost:t,inTokens:n,outTokens:r}},[i]),d=(0,j.useMemo)(()=>{let e=new Map;for(let t of i){let n=e.get(t.agentName);n?(n.runs+=t.runs,n.costUsd+=t.costUsd,n.inputTokens+=t.inputTokens,n.outputTokens+=t.outputTokens):e.set(t.agentName,{...t,day:``})}return Array.from(e.values()).sort((e,t)=>t.costUsd-e.costUsd)},[i]);return(0,M.jsxs)(`div`,{className:`space-y-4`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsx)(`span`,{className:`label mr-1`,children:`RANGE`}),eF.map(n=>(0,M.jsx)(`button`,{type:`button`,onClick:()=>t(n.id),className:`btn ${e===n.id?`btn-active`:``}`,children:n.label},n.id)),(0,M.jsxs)(`label`,{className:`ml-2 flex items-center gap-2 text-xs text-muted`,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:n,onChange:e=>r(e.target.checked)}),`all users`]})]}),(0,M.jsxs)(ft,{loading:o,error:c,empty:{when:i.length===0,message:`// no runs in this window`},children:[(0,M.jsx)(Mj,{title:`totals`}),(0,M.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-4`,children:[(0,M.jsx)(nF,{label:`runs`,value:u.runs.toLocaleString()}),(0,M.jsx)(nF,{label:`cost`,value:MP(u.cost)}),(0,M.jsx)(nF,{label:`input tokens`,value:jP(u.inTokens)}),(0,M.jsx)(nF,{label:`output tokens`,value:jP(u.outTokens)})]}),(0,M.jsx)(Mj,{title:`by agent`}),(0,M.jsx)(rF,{rows:d.map(e=>({key:e.agentName,cells:[e.agentName,e.runs.toLocaleString(),MP(e.costUsd),jP(e.inputTokens),jP(e.outputTokens)]})),headers:[`AGENT`,`RUNS`,`COST`,`INPUT`,`OUTPUT`]}),(0,M.jsx)(Mj,{title:`by day`}),(0,M.jsx)(rF,{rows:i.map(e=>({key:`${e.day}-${e.agentName}`,cells:[e.day,e.agentName,e.runs.toLocaleString(),MP(e.costUsd),jP(e.inputTokens+e.outputTokens)]})),headers:[`DAY`,`AGENT`,`RUNS`,`COST`,`TOKENS`]})]})]})}function nF({label:e,value:t}){return(0,M.jsxs)(`div`,{className:`panel p-4`,children:[(0,M.jsx)(`div`,{className:`label`,children:e}),(0,M.jsx)(`div`,{className:`mt-1 text-xl tabular-nums`,children:t})]})}function rF({headers:e,rows:t}){return(0,M.jsx)(`div`,{className:`panel`,children:(0,M.jsxs)(`table`,{className:`w-full text-xs`,children:[(0,M.jsx)(`thead`,{className:`label`,children:(0,M.jsx)(`tr`,{children:e.map(e=>(0,M.jsx)(`th`,{className:`border-b border-line px-3 py-2 text-left font-medium`,children:e},e))})}),(0,M.jsx)(`tbody`,{children:t.map((t,n)=>(0,M.jsx)(`tr`,{className:n>0?`border-t border-line`:``,children:t.cells.map((n,r)=>{let i=e[r]??String(r);return(0,M.jsx)(`td`,{className:`px-3 py-2 tabular-nums`,children:n},`${t.key}-${i}`)})},t.key))})]})})}var iF=[{label:null,items:[{id:`chat`,label:`Chat`,mark:`>`},{id:`runs`,label:`Runs`,mark:`[]`},{id:`scheduled`,label:`Cron`,mark:`()`},{id:`agents`,label:`Agents`,mark:`{}`},{id:`usage`,label:`Usage`,mark:`%%`},{id:`config`,label:`Config`,mark:`##`}]},{label:`Learn`,items:[{id:`guide`,label:`Guide`,mark:`?`},{id:`docs`,label:`Documentation`,mark:`::`}]}],aF=new Set(iF.flatMap(e=>e.items.map(e=>e.id)));function oF(){let[e,t]=window.location.hash.replace(/^#\/?/,``).split(`/`),n=e&&aF.has(e)?e:`chat`;return{tab:n,runId:n===`runs`&&t?decodeURIComponent(t):null,conversationId:n===`chat`&&t?decodeURIComponent(t):null,guideSection:n===`guide`&&t&&pP(t)?t:null}}function sF(){return(0,M.jsx)(lt,{children:(0,M.jsx)(cF,{})})}function cF(){let[e,t]=(0,j.useState)(()=>oF()),n=dt();(0,j.useEffect)(()=>{let e=()=>t(oF());return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]);let r=(0,j.useMemo)(()=>(e,n)=>{let r=n?`#/${e}/${encodeURIComponent(n)}`:`#/${e}`;window.location.hash===r?t(oF()):window.location.hash=r},[]),i=(0,j.useCallback)(n=>{if(e.tab!==`chat`)return;let r=n?`#/chat/${encodeURIComponent(n)}`:`#/chat`;window.location.hash!==r&&(window.history.replaceState(null,``,r),t({tab:`chat`,runId:null,conversationId:n,guideSection:null}))},[e.tab]),a=(0,j.useCallback)(e=>{let n=`#/guide/${e}`;window.location.hash!==n&&(window.history.replaceState(null,``,n),t({tab:`guide`,runId:null,conversationId:null,guideSection:e}))},[]);return(0,M.jsxs)(`div`,{className:`min-h-full lg:flex`,children:[(0,M.jsxs)(`aside`,{className:`border-b border-line bg-canvas lg:sticky lg:top-0 lg:flex lg:h-screen lg:w-64 lg:shrink-0 lg:flex-col lg:border-r lg:border-b-0`,children:[(0,M.jsxs)(`div`,{className:`border-b border-line p-4`,children:[(0,M.jsxs)(`div`,{className:`text-base font-bold uppercase leading-none tracking-widest`,children:[(0,M.jsx)(`div`,{children:`Render`}),(0,M.jsx)(`div`,{children:`Harness`})]}),(0,M.jsx)(`div`,{className:`mt-3 text-[10px] uppercase tracking-wider text-muted`,children:n})]}),(0,M.jsx)(`nav`,{className:`flex flex-wrap gap-0 lg:block lg:flex-1 lg:overflow-y-auto`,children:iF.map((t,n)=>(0,M.jsxs)(`div`,{className:n>0?`border-t border-line`:``,children:[t.label&&(0,M.jsx)(`div`,{className:`px-4 pt-4 pb-2 text-[10px] uppercase tracking-widest text-muted`,children:t.label}),t.items.map(t=>(0,M.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-3 px-4 py-3 text-left text-xs uppercase tracking-[0.18em] transition ${e.tab===t.id?`bg-accent text-canvas`:`text-muted hover:bg-code-bg hover:text-ink`}`,onClick:()=>r(t.id),children:[(0,M.jsx)(`span`,{className:`w-6 font-mono text-[10px]`,children:t.mark}),(0,M.jsx)(`span`,{children:t.label})]},t.id))]},t.label??`main`))}),(0,M.jsxs)(`div`,{className:`border-t border-line p-4 text-[10px] uppercase tracking-wider text-muted`,children:[(0,M.jsx)(`div`,{children:`System`}),(0,M.jsx)(`div`,{className:`mt-2`,children:`gateway status: running`}),(0,M.jsx)(`form`,{method:`post`,action:Fe(`/logout`),className:`mt-4`,children:(0,M.jsx)(`button`,{type:`submit`,className:`btn w-full`,children:`Sign out`})})]})]}),(0,M.jsx)(`main`,{className:e.tab===`docs`?`min-w-0 flex-1 lg:h-screen lg:overflow-hidden`:`min-w-0 flex-1 px-4 py-6 lg:max-h-screen lg:overflow-y-auto`,children:e.tab===`docs`?(0,M.jsx)(Rj,{}):(0,M.jsxs)(`div`,{className:`mx-auto w-full max-w-6xl`,children:[(0,M.jsx)(st,{}),e.tab===`chat`&&(0,M.jsx)(hj,{conversationId:e.conversationId,onConversationChange:i}),e.tab===`runs`&&(0,M.jsx)(qP,{runId:e.runId,onSelectRun:e=>r(`runs`,e),onBackToList:()=>r(`runs`),onOpenInChat:e=>r(`chat`,e)}),e.tab===`agents`&&(0,M.jsx)(Ot,{}),e.tab===`scheduled`&&(0,M.jsx)(ZP,{}),e.tab===`config`&&(0,M.jsx)(Nj,{}),e.tab===`usage`&&(0,M.jsx)(tF,{}),e.tab===`guide`&&(0,M.jsx)(mP,{section:e.guideSection,onSectionChange:a})]})})]})}var lF=document.getElementById(`root`);if(!lF)throw Error(`missing #root`);(0,Ne.createRoot)(lF).render((0,M.jsx)(j.StrictMode,{children:(0,M.jsx)(sF,{})}));export{zv as a,CS as i,kS as n,SS as r,AS as t};
228
- //# sourceMappingURL=index-D5tmHkO_.js.map