@yorz/cli 0.9.3 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/README.md +27 -44
  2. package/dist/cli/index.js +802 -326
  3. package/dist/gui/assets/{abnfDiagram-VRR7QNED-BXdYbq3y.js → abnfDiagram-VRR7QNED-ChpNHKmG.js} +1 -1
  4. package/dist/{gui-mobile/assets/arc-BinP16HO.js → gui/assets/arc-BSWQE9li.js} +1 -1
  5. package/dist/{gui-mobile/assets/architectureDiagram-ZJ3FMSHR-DPaYnoe2.js → gui/assets/architectureDiagram-ZJ3FMSHR-BGI0Ue9c.js} +1 -1
  6. package/dist/{gui-mobile/assets/blockDiagram-677ZJIJ3-CcdgoWjg.js → gui/assets/blockDiagram-677ZJIJ3-DzJ0su4P.js} +1 -1
  7. package/dist/gui/assets/{c4Diagram-LMCZKHZV-BQRLrFmd.js → c4Diagram-LMCZKHZV-BijbkJk0.js} +1 -1
  8. package/dist/gui/assets/channel-S36nQ2lf.js +1 -0
  9. package/dist/gui/assets/{chunk-2Q5K7J3B-Bb01F4JY.js → chunk-2Q5K7J3B-Ds8H4SMx.js} +1 -1
  10. package/dist/gui/assets/{chunk-32BRIVSS-D_fmYp0w.js → chunk-32BRIVSS-CaodSuYb.js} +1 -1
  11. package/dist/gui/assets/{chunk-5VM5RSS4-CSVRyWUl.js → chunk-5VM5RSS4-Dk7weLtE.js} +1 -1
  12. package/dist/gui/assets/{chunk-EX3LRPZG-0tMlNePS.js → chunk-EX3LRPZG-Dc4TtD4O.js} +1 -1
  13. package/dist/gui/assets/{chunk-JWPE2WC7-BjMvMllJ.js → chunk-JWPE2WC7-BXjLPdIx.js} +1 -1
  14. package/dist/gui/assets/{chunk-MOJQB5TN-kCAEgJRp.js → chunk-MOJQB5TN-Ct0R-MTA.js} +1 -1
  15. package/dist/gui/assets/{chunk-RYQCIY6F-Bux4XgPK.js → chunk-RYQCIY6F-BkMMhSkU.js} +1 -1
  16. package/dist/gui/assets/{chunk-V7JOEXUC-BP87KF_P.js → chunk-V7JOEXUC-CA_5lNDX.js} +1 -1
  17. package/dist/gui/assets/{chunk-VR4S4FIN-DTiqIx-p.js → chunk-VR4S4FIN-BP0qSlug.js} +1 -1
  18. package/dist/gui/assets/{chunk-XXDRQBXY-B7k8EFM_.js → chunk-XXDRQBXY-ChJ7HYsh.js} +1 -1
  19. package/dist/gui/assets/classDiagram-OUVF2IWQ-DfrKIwL2.js +1 -0
  20. package/dist/gui/assets/classDiagram-v2-EOCWNBFH-DfrKIwL2.js +1 -0
  21. package/dist/{gui-mobile/assets/cose-bilkent-JH36ORCC--rhAXZui.js → gui/assets/cose-bilkent-JH36ORCC-DH_K5WAp.js} +1 -1
  22. package/dist/gui/assets/{cynefin-VYW2F7L2-DzMBSujh.js → cynefin-VYW2F7L2-BBIjNWwX.js} +1 -1
  23. package/dist/{gui-mobile/assets/cynefinDiagram-TSTJHNR4-CQ3yGfYY.js → gui/assets/cynefinDiagram-TSTJHNR4-BRRBlTKf.js} +1 -1
  24. package/dist/{gui-mobile/assets/dagre-VKFMJZFB-BbgmZx8f.js → gui/assets/dagre-VKFMJZFB-CiENng6J.js} +1 -1
  25. package/dist/gui/assets/{diagram-FQU43EPY-CMCJAQGZ.js → diagram-FQU43EPY-BpAJWtF0.js} +1 -1
  26. package/dist/{gui-mobile/assets/diagram-G47NLZAW-CqXfBP6i.js → gui/assets/diagram-G47NLZAW-VQzk2Zt3.js} +1 -1
  27. package/dist/gui/assets/{diagram-NH7WQ7WH-C4WG9hEr.js → diagram-NH7WQ7WH-BETlyFIV.js} +1 -1
  28. package/dist/{gui-mobile/assets/diagram-OA4YK3LP-DF9IybfH.js → gui/assets/diagram-OA4YK3LP-D7kweveS.js} +1 -1
  29. package/dist/gui/assets/{diagram-WEI45ONY-DE9_2qZ8.js → diagram-WEI45ONY-4xazks6b.js} +1 -1
  30. package/dist/gui/assets/{ebnfDiagram-CCIWWBDH-BL7vwncJ.js → ebnfDiagram-CCIWWBDH-x6c2P9Gq.js} +1 -1
  31. package/dist/{gui-mobile/assets/erDiagram-Q63AITRT-DWpkkPmJ.js → gui/assets/erDiagram-Q63AITRT-Dwu_NmfY.js} +1 -1
  32. package/dist/gui/assets/{flowDiagram-23GEKE2U-DcgdUDC_.js → flowDiagram-23GEKE2U-mlV2EfUY.js} +1 -1
  33. package/dist/{gui-mobile/assets/ganttDiagram-NO4QXBWP-B3b1yqDR.js → gui/assets/ganttDiagram-NO4QXBWP-sRHt6-K7.js} +1 -1
  34. package/dist/gui/assets/{gitGraphDiagram-IHSO6WYX-Bh16bq4A.js → gitGraphDiagram-IHSO6WYX-DAmAE7m_.js} +1 -1
  35. package/dist/gui/assets/index-C3kFbt2F.js +34 -0
  36. package/dist/gui/assets/index-CF8GzEat.css +1 -0
  37. package/dist/gui/assets/{infoDiagram-FWYZ7A6U-CKRUUIby.js → infoDiagram-FWYZ7A6U-B4Uf4vez.js} +1 -1
  38. package/dist/gui/assets/{ishikawaDiagram-FXEZZL3T-CEMvAMgC.js → ishikawaDiagram-FXEZZL3T-BF78753F.js} +1 -1
  39. package/dist/{gui-mobile/assets/journeyDiagram-5HDEW3XC-C0pTHZiP.js → gui/assets/journeyDiagram-5HDEW3XC-BO6V3zi-.js} +1 -1
  40. package/dist/gui/assets/{kanban-definition-HUTT4EX6-D2JIKO0d.js → kanban-definition-HUTT4EX6-C6Abp-Z0.js} +1 -1
  41. package/dist/gui/assets/{linear-1sIzYuR6.js → linear-4_sZdUed.js} +1 -1
  42. package/dist/gui/assets/{mermaid.core-_0eTmAI-.js → mermaid.core-BoPHxIg3.js} +4 -4
  43. package/dist/gui/assets/{mindmap-definition-LN4V7U3C-Pci6rYHR.js → mindmap-definition-LN4V7U3C-EcN1F0cO.js} +1 -1
  44. package/dist/gui/assets/{pegDiagram-2B236MQR-q2F8rPpc.js → pegDiagram-2B236MQR-giOW1xob.js} +1 -1
  45. package/dist/gui/assets/{pieDiagram-ENE6RG2P-Bxs2H0I9.js → pieDiagram-ENE6RG2P-D9cIRAxf.js} +1 -1
  46. package/dist/{gui-mobile/assets/quadrantDiagram-ABIIQ3AL-C0mOJrSQ.js → gui/assets/quadrantDiagram-ABIIQ3AL-1jwzcF1N.js} +1 -1
  47. package/dist/gui/assets/{railroadDiagram-RFXS5EU6-DLkA9HFf.js → railroadDiagram-RFXS5EU6-kp1xeMyA.js} +1 -1
  48. package/dist/gui/assets/{requirementDiagram-TGXJPOKE-DmqV2XMZ.js → requirementDiagram-TGXJPOKE-yspWGQMw.js} +1 -1
  49. package/dist/{gui-mobile/assets/sankeyDiagram-HTMAVEWB-C5rsz_9V.js → gui/assets/sankeyDiagram-HTMAVEWB-Ylm3QxdV.js} +1 -1
  50. package/dist/{gui-mobile/assets/sequenceDiagram-DBY2YBRQ-CJPJqG5C.js → gui/assets/sequenceDiagram-DBY2YBRQ-CJJnMk2d.js} +1 -1
  51. package/dist/gui/assets/{sizeCapture-X5ZJPWSS-dcpaI63h.js → sizeCapture-X5ZJPWSS-F3cALp3d.js} +1 -1
  52. package/dist/{gui-mobile/assets/stateDiagram-2N3HPSRC-CcuZbZ-q.js → gui/assets/stateDiagram-2N3HPSRC-D7aZ2O-l.js} +1 -1
  53. package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-D8vtVO10.js +1 -0
  54. package/dist/{gui-mobile/assets/swimlanes-5IMT3BWC-C3tNR3sN.js → gui/assets/swimlanes-5IMT3BWC-UrlubmXy.js} +2 -2
  55. package/dist/gui/assets/swimlanesDiagram-G3AALYLV-BAhohxIt.js +8 -0
  56. package/dist/{gui-mobile/assets/timeline-definition-FHXFAJF6-DJxPM33l.js → gui/assets/timeline-definition-FHXFAJF6-Bl_hCpye.js} +1 -1
  57. package/dist/gui/assets/{vennDiagram-L72KCM5P-CgwpgHPj.js → vennDiagram-L72KCM5P-CvGLve2y.js} +1 -1
  58. package/dist/gui/assets/{wardleyDiagram-EHGQE667-Cnc-fgIC.js → wardleyDiagram-EHGQE667-DLRGPeZX.js} +1 -1
  59. package/dist/{gui-mobile/assets/xychartDiagram-FW5EYKEG-X6HGdnuS.js → gui/assets/xychartDiagram-FW5EYKEG-bB6p1K59.js} +1 -1
  60. package/dist/gui/index.html +2 -2
  61. package/dist/gui-mobile/assets/{abnfDiagram-VRR7QNED-3aNc_9tC.js → abnfDiagram-VRR7QNED-Cii3YIsO.js} +1 -1
  62. package/dist/{gui/assets/arc-BDaL1Z0T.js → gui-mobile/assets/arc-D5zxWTc6.js} +1 -1
  63. package/dist/{gui/assets/architectureDiagram-ZJ3FMSHR-DBV2eI0R.js → gui-mobile/assets/architectureDiagram-ZJ3FMSHR-BUrFMtmN.js} +1 -1
  64. package/dist/{gui/assets/blockDiagram-677ZJIJ3-BukUw8ke.js → gui-mobile/assets/blockDiagram-677ZJIJ3-CLXT0p5K.js} +1 -1
  65. package/dist/gui-mobile/assets/{c4Diagram-LMCZKHZV-Dt-ebUaz.js → c4Diagram-LMCZKHZV-XZDjR7Pf.js} +1 -1
  66. package/dist/gui-mobile/assets/channel-DAACRh1k.js +1 -0
  67. package/dist/gui-mobile/assets/{chunk-2Q5K7J3B-Dkn1JJmn.js → chunk-2Q5K7J3B-C0SSdrgO.js} +1 -1
  68. package/dist/gui-mobile/assets/{chunk-32BRIVSS-Cou5wk8N.js → chunk-32BRIVSS-B-l29SGQ.js} +1 -1
  69. package/dist/gui-mobile/assets/{chunk-5VM5RSS4-DE1VWYBj.js → chunk-5VM5RSS4-2Oc13ID8.js} +1 -1
  70. package/dist/gui-mobile/assets/{chunk-EX3LRPZG-DIJfdh0r.js → chunk-EX3LRPZG-tRiKUhHg.js} +1 -1
  71. package/dist/gui-mobile/assets/{chunk-JWPE2WC7-DMTNZnRa.js → chunk-JWPE2WC7-CWxLnmGK.js} +1 -1
  72. package/dist/gui-mobile/assets/{chunk-MOJQB5TN-C37wZo1y.js → chunk-MOJQB5TN-CRo9axdS.js} +1 -1
  73. package/dist/gui-mobile/assets/{chunk-RYQCIY6F-B00F7z4X.js → chunk-RYQCIY6F-BWk2tC2V.js} +1 -1
  74. package/dist/gui-mobile/assets/{chunk-V7JOEXUC-BBhJsm6x.js → chunk-V7JOEXUC-CAf_TQ8c.js} +1 -1
  75. package/dist/gui-mobile/assets/{chunk-VR4S4FIN-BaRfY0Qz.js → chunk-VR4S4FIN-Djvb-G48.js} +1 -1
  76. package/dist/gui-mobile/assets/{chunk-XXDRQBXY-DLP_jCaJ.js → chunk-XXDRQBXY-DcdCewNm.js} +1 -1
  77. package/dist/gui-mobile/assets/classDiagram-OUVF2IWQ-k67r25Hl.js +1 -0
  78. package/dist/gui-mobile/assets/classDiagram-v2-EOCWNBFH-k67r25Hl.js +1 -0
  79. package/dist/{gui/assets/cose-bilkent-JH36ORCC-BaKMo0vy.js → gui-mobile/assets/cose-bilkent-JH36ORCC-DQd0ag_q.js} +1 -1
  80. package/dist/gui-mobile/assets/{cynefin-VYW2F7L2-DP4VQrg7.js → cynefin-VYW2F7L2-O3JIjwWq.js} +1 -1
  81. package/dist/{gui/assets/cynefinDiagram-TSTJHNR4-BeUiEs05.js → gui-mobile/assets/cynefinDiagram-TSTJHNR4-Ca9ChAoZ.js} +1 -1
  82. package/dist/{gui/assets/dagre-VKFMJZFB-Ds02vw0z.js → gui-mobile/assets/dagre-VKFMJZFB-Dz84jzyH.js} +1 -1
  83. package/dist/gui-mobile/assets/{diagram-FQU43EPY-B3ayJYFS.js → diagram-FQU43EPY-Ddl2aZsD.js} +1 -1
  84. package/dist/{gui/assets/diagram-G47NLZAW-BsBRMo6j.js → gui-mobile/assets/diagram-G47NLZAW-BUUkAM1L.js} +1 -1
  85. package/dist/gui-mobile/assets/{diagram-NH7WQ7WH-DPg20-Zs.js → diagram-NH7WQ7WH-Bhp3-t7h.js} +1 -1
  86. package/dist/{gui/assets/diagram-OA4YK3LP-BA2cjwAc.js → gui-mobile/assets/diagram-OA4YK3LP-Dz2X8j8T.js} +1 -1
  87. package/dist/gui-mobile/assets/{diagram-WEI45ONY-BSAcECq5.js → diagram-WEI45ONY-m28jBgF4.js} +1 -1
  88. package/dist/gui-mobile/assets/{ebnfDiagram-CCIWWBDH-BhJETAAk.js → ebnfDiagram-CCIWWBDH-Dh-_tj-T.js} +1 -1
  89. package/dist/{gui/assets/erDiagram-Q63AITRT-rCrtODep.js → gui-mobile/assets/erDiagram-Q63AITRT-C-3poaMf.js} +1 -1
  90. package/dist/gui-mobile/assets/{flowDiagram-23GEKE2U-CHAjzU36.js → flowDiagram-23GEKE2U-BopsgXAH.js} +1 -1
  91. package/dist/{gui/assets/ganttDiagram-NO4QXBWP-BsWsRaQX.js → gui-mobile/assets/ganttDiagram-NO4QXBWP-Bn7GJbzm.js} +1 -1
  92. package/dist/gui-mobile/assets/{gitGraphDiagram-IHSO6WYX-BqRTGYY0.js → gitGraphDiagram-IHSO6WYX-DfLUxTzH.js} +1 -1
  93. package/dist/gui-mobile/assets/{index-BwPHOQF7.js → index--agUQ6GR.js} +16 -16
  94. package/dist/gui-mobile/assets/index-CNDPS9z2.css +1 -0
  95. package/dist/gui-mobile/assets/{infoDiagram-FWYZ7A6U-4PN9nRxs.js → infoDiagram-FWYZ7A6U-nrBaoqsE.js} +1 -1
  96. package/dist/gui-mobile/assets/{ishikawaDiagram-FXEZZL3T-wzGQWfQz.js → ishikawaDiagram-FXEZZL3T-DEVq4aJ1.js} +1 -1
  97. package/dist/{gui/assets/journeyDiagram-5HDEW3XC-hPSE5KSG.js → gui-mobile/assets/journeyDiagram-5HDEW3XC-CA-AnD2i.js} +1 -1
  98. package/dist/gui-mobile/assets/{kanban-definition-HUTT4EX6-D_XwIFzm.js → kanban-definition-HUTT4EX6-BtUD4217.js} +1 -1
  99. package/dist/gui-mobile/assets/{linear-DHPIiHoC.js → linear-Cs1nDCen.js} +1 -1
  100. package/dist/gui-mobile/assets/{mermaid.core-DWa29NaI.js → mermaid.core-CjlnyTvi.js} +4 -4
  101. package/dist/gui-mobile/assets/{mindmap-definition-LN4V7U3C-BsAz9DiI.js → mindmap-definition-LN4V7U3C-DpHq0ntz.js} +1 -1
  102. package/dist/gui-mobile/assets/{pegDiagram-2B236MQR-k9xbtGjh.js → pegDiagram-2B236MQR-UB1lVTuX.js} +1 -1
  103. package/dist/gui-mobile/assets/{pieDiagram-ENE6RG2P-vrMiQFQU.js → pieDiagram-ENE6RG2P-7qkPFOFY.js} +1 -1
  104. package/dist/{gui/assets/quadrantDiagram-ABIIQ3AL-jhiPHiLV.js → gui-mobile/assets/quadrantDiagram-ABIIQ3AL-DPM04b8X.js} +1 -1
  105. package/dist/gui-mobile/assets/{railroadDiagram-RFXS5EU6-BuXb1GwD.js → railroadDiagram-RFXS5EU6-BY7DXXsK.js} +1 -1
  106. package/dist/gui-mobile/assets/{requirementDiagram-TGXJPOKE-zuyAg5UY.js → requirementDiagram-TGXJPOKE-RJuz8ezU.js} +1 -1
  107. package/dist/{gui/assets/sankeyDiagram-HTMAVEWB-DKKUsQKC.js → gui-mobile/assets/sankeyDiagram-HTMAVEWB-DIHqskb-.js} +1 -1
  108. package/dist/{gui/assets/sequenceDiagram-DBY2YBRQ-DFX-fI6J.js → gui-mobile/assets/sequenceDiagram-DBY2YBRQ-B91bF6fy.js} +1 -1
  109. package/dist/gui-mobile/assets/{sizeCapture-X5ZJPWSS-Dfmt1n7j.js → sizeCapture-X5ZJPWSS-Bb8LgAbm.js} +1 -1
  110. package/dist/{gui/assets/stateDiagram-2N3HPSRC-DOBn8whp.js → gui-mobile/assets/stateDiagram-2N3HPSRC-ef4n7bGq.js} +1 -1
  111. package/dist/gui-mobile/assets/stateDiagram-v2-6OUMAXLB-D5KNiKni.js +1 -0
  112. package/dist/{gui/assets/swimlanes-5IMT3BWC-CrvE3E_z.js → gui-mobile/assets/swimlanes-5IMT3BWC-ZdNv29bw.js} +2 -2
  113. package/dist/gui-mobile/assets/swimlanesDiagram-G3AALYLV-CTHOZVwF.js +8 -0
  114. package/dist/{gui/assets/timeline-definition-FHXFAJF6-Cg8Rxg6S.js → gui-mobile/assets/timeline-definition-FHXFAJF6-fXhjYYU8.js} +1 -1
  115. package/dist/gui-mobile/assets/{vennDiagram-L72KCM5P-C95GuO2U.js → vennDiagram-L72KCM5P-BxTJzmPG.js} +1 -1
  116. package/dist/gui-mobile/assets/{wardleyDiagram-EHGQE667-ULJzIJRO.js → wardleyDiagram-EHGQE667-CiAx3NHL.js} +1 -1
  117. package/dist/{gui/assets/xychartDiagram-FW5EYKEG-Do9QbE6u.js → gui-mobile/assets/xychartDiagram-FW5EYKEG-OM8YLeYP.js} +1 -1
  118. package/dist/gui-mobile/index.html +2 -2
  119. package/dist/gui-mobile/sw.js +1 -1
  120. package/package.json +3 -2
  121. package/dist/gui/assets/channel-CmM-rnSu.js +0 -1
  122. package/dist/gui/assets/classDiagram-OUVF2IWQ-foBbbuIG.js +0 -1
  123. package/dist/gui/assets/classDiagram-v2-EOCWNBFH-foBbbuIG.js +0 -1
  124. package/dist/gui/assets/index-e5JFp5J1.css +0 -1
  125. package/dist/gui/assets/index-oIjkNbg4.js +0 -34
  126. package/dist/gui/assets/stateDiagram-v2-6OUMAXLB-CSydFa0j.js +0 -1
  127. package/dist/gui/assets/swimlanesDiagram-G3AALYLV-CqM-5nJs.js +0 -8
  128. package/dist/gui-mobile/assets/channel-BwGfICk5.js +0 -1
  129. package/dist/gui-mobile/assets/classDiagram-OUVF2IWQ-BC5JEZFR.js +0 -1
  130. package/dist/gui-mobile/assets/classDiagram-v2-EOCWNBFH-BC5JEZFR.js +0 -1
  131. package/dist/gui-mobile/assets/index-BABBu2VR.css +0 -1
  132. package/dist/gui-mobile/assets/stateDiagram-v2-6OUMAXLB-D1oP_d1q.js +0 -1
  133. package/dist/gui-mobile/assets/swimlanesDiagram-G3AALYLV-auRnO-sL.js +0 -8
@@ -1,34 +0,0 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();const Be={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return td(this.context.count)},getNextContextId(){return td(this.context.count++)}};function td(e){const t=String(e),n=t.length-1;return Be.context.id+(n?String.fromCharCode(96+n):"")+t}function ni(e){Be.context=e}const L1=!1,P1=(e,t)=>e===t,$n=Symbol("solid-proxy"),Dp=typeof Proxy=="function",fi=Symbol("solid-track"),ks={equals:P1};let Ip=Lp;const Fn=1,gi=2,Op={owned:null,cleanups:null,context:null,owner:null},za={};var qe=null;let be=null,$1=null,Qe=null,Gt=null,qt=null,Qs=0;function Tn(e,t){const n=Qe,r=qe,o=e.length===0,i=t===void 0?r:t,s=o?Op:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>ut(()=>zr(s)));qe=s,Qe=null;try{return vn(a,!0)}finally{Qe=n,qe=r}}function D(e,t){t=t?Object.assign({},ks,t):ks;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(be&&be.running&&be.sources.has(n)?o=o(n.tValue):o=o(n.value)),Mp(n,o));return[Np.bind(n),r]}function uc(e,t,n){const r=ta(e,t,!0,Fn);Ho(r)}function Le(e,t,n){const r=ta(e,t,!1,Fn);Ho(r)}function te(e,t,n){Ip=K1;const r=ta(e,t,!1,Fn),o=ao&&nt(ao);o&&(r.suspense=o),(!n||!n.render)&&(r.user=!0),qt?qt.push(r):Ho(r)}function ee(e,t,n){n=n?Object.assign({},ks,n):ks;const r=ta(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Ho(r),Np.bind(r)}function F1(e){return e&&typeof e=="object"&&"then"in e}function Wt(e,t,n){let r,o,i;typeof t=="function"?(r=e,o=t,i={}):(r=!0,o=e,i=t||{});let s=null,a=za,u=null,c=!1,l=!1,d="initialValue"in i,g=typeof r=="function"&&ee(r);const h=new Set,[p,m]=(i.storage||D)(i.initialValue),[b,v]=D(void 0),[y,x]=D(void 0,{equals:!1}),[E,S]=D(d?"ready":"unresolved");Be.context&&(u=Be.getNextContextId(),i.ssrLoadFrom==="initial"?a=i.initialValue:Be.load&&Be.has(u)&&(a=Be.load(u)));function T($,V,B,N){return s===$&&(s=null,N!==void 0&&(d=!0),($===a||V===a)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(N,{value:V})),a=za,be&&$&&c?(be.promises.delete($),c=!1,vn(()=>{be.running=!0,A(V,B)},!1)):A(V,B)),V}function A($,V){vn(()=>{V===void 0&&m(()=>$),S(V!==void 0?"errored":d?"ready":"unresolved"),v(V);for(const B of h.keys())B.decrement();h.clear()},!1)}function C(){const $=ao&&nt(ao),V=p(),B=b();if(B!==void 0&&!s)throw B;return Qe&&!Qe.user&&$&&uc(()=>{y(),s&&($.resolved&&be&&c?be.promises.add(s):h.has($)||($.increment(),h.add($)))}),V}function L($=!0){if($!==!1&&l)return;l=!1;const V=g?g():r;if(c=be&&be.running,V==null||V===!1){T(s,ut(p));return}be&&s&&be.promises.delete(s);let B;const N=a!==za?a:ut(()=>{try{return o(V,{value:p(),refetching:$})}catch(W){B=W}});if(B!==void 0){T(s,void 0,Ss(B),V);return}else if(!F1(N))return T(s,N,void 0,V),N;return s=N,"v"in N?(N.s===1?T(s,N.v,void 0,V):T(s,void 0,Ss(N.v),V),N):(l=!0,queueMicrotask(()=>l=!1),vn(()=>{S(d?"refreshing":"pending"),x()},!1),N.then(W=>T(N,W,void 0,V),W=>T(N,void 0,Ss(W),V)))}Object.defineProperties(C,{state:{get:()=>E()},error:{get:()=>b()},loading:{get(){const $=E();return $==="pending"||$==="refreshing"}},latest:{get(){if(!d)return C();const $=b();if($&&!s)throw $;return p()}}});let j=qe;return g?uc(()=>(j=qe,L(!1))):L(!1),[C,{refetch:$=>ea(j,()=>L($)),mutate:m}]}function Hc(e){return vn(e,!1)}function ut(e){if(Qe===null)return e();const t=Qe;Qe=null;try{return e()}finally{Qe=t}}function bt(e,t,n){const r=Array.isArray(e);let o,i=n&&n.defer;return s=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]()}else a=e();if(i)return i=!1,s;const u=ut(()=>t(a,o,s));return o=a,u}}function Dn(e){te(()=>ut(e))}function oe(e){return qe===null||(qe.cleanups===null?qe.cleanups=[e]:qe.cleanups.push(e)),e}function cc(){return Qe}function pi(){return qe}function ea(e,t){const n=qe,r=Qe;qe=e,Qe=null;try{return vn(t,!0)}catch(o){qc(o)}finally{qe=n,Qe=r}}function Rp(e){if(be&&be.running)return e(),be.done;const t=Qe,n=qe;return Promise.resolve().then(()=>{Qe=t,qe=n;let r;return ao&&(r=be||(be={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(o=>r.resolve=o)),r.running=!0),vn(e,!1),Qe=qe=null,r?r.done:void 0})}const[uM,nd]=D(!1);function B1(e){qt.push.apply(qt,e),e.length=0}function it(e,t){const n=Symbol("context");return{id:n,Provider:j1(n),defaultValue:e}}function nt(e){let t;return qe&&qe.context&&(t=qe.context[e.id])!==void 0?t:e.defaultValue}function jo(e){const t=ee(e),n=ee(()=>lc(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let ao;function z1(){return ao||(ao=it())}function Np(){const e=be&&be.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===Fn)Ho(this);else{const t=Gt;Gt=null,vn(()=>Ts(this),!1),Gt=t}if(Qe){const t=this.observers;if(!t||t[t.length-1]!==Qe){const n=t?t.length:0;Qe.sources?(Qe.sources.push(this),Qe.sourceSlots.push(n)):(Qe.sources=[this],Qe.sourceSlots=[n]),t?(t.push(Qe),this.observerSlots.push(Qe.sources.length-1)):(this.observers=[Qe],this.observerSlots=[Qe.sources.length-1])}}return e&&be.sources.has(this)?this.tValue:this.value}function Mp(e,t,n){let r=be&&be.running&&be.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(be){const o=be.running;(o||!n&&be.sources.has(e))&&(be.sources.add(e),e.tValue=t),o||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&vn(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],s=be&&be.running;s&&be.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?Gt.push(i):qt.push(i),i.observers&&Pp(i)),s?i.tState=Fn:i.state=Fn)}if(Gt.length>1e6)throw Gt=[],new Error},!1)}return t}function Ho(e){if(!e.fn)return;zr(e);const t=Qs;rd(e,be&&be.running&&be.sources.has(e)?e.tValue:e.value,t),be&&!be.running&&be.sources.has(e)&&queueMicrotask(()=>{vn(()=>{be&&(be.running=!0),Qe=qe=e,rd(e,e.tValue,t),Qe=qe=null},!1)})}function rd(e,t,n){let r;const o=qe,i=Qe;Qe=qe=e;try{r=e.fn(t)}catch(s){return e.pure&&(be&&be.running?(e.tState=Fn,e.tOwned&&e.tOwned.forEach(zr),e.tOwned=void 0):(e.state=Fn,e.owned&&e.owned.forEach(zr),e.owned=null)),e.updatedAt=n+1,qc(s)}finally{Qe=i,qe=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Mp(e,r,!0):be&&be.running&&e.pure?(be.sources.has(e)||(e.value=r),be.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function ta(e,t,n,r=Fn,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:qe,context:qe?qe.context:null,pure:n};return be&&be.running&&(i.state=0,i.tState=r),qe===null||qe!==Op&&(be&&be.running&&qe.pure?qe.tOwned?qe.tOwned.push(i):qe.tOwned=[i]:qe.owned?qe.owned.push(i):qe.owned=[i]),i}function As(e){const t=be&&be.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===gi)return Ts(e);if(e.suspense&&ut(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Qs);){if(t&&be.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let o=e,i=n[r+1];for(;(o=o.owner)&&o!==i;)if(be.disposed.has(o))return}if((t?e.tState:e.state)===Fn)Ho(e);else if((t?e.tState:e.state)===gi){const o=Gt;Gt=null,vn(()=>Ts(e,n[0]),!1),Gt=o}}}function vn(e,t){if(Gt)return e();let n=!1;t||(Gt=[]),qt?n=!0:qt=[],Qs++;try{const r=e();return U1(n),r}catch(r){n||(qt=null),Gt=null,qc(r)}}function U1(e){if(Gt&&(Lp(Gt),Gt=null),e)return;let t;if(be){if(!be.promises.size&&!be.queue.size){const r=be.sources,o=be.disposed;qt.push.apply(qt,be.effects),t=be.resolve;for(const i of qt)"tState"in i&&(i.state=i.tState),delete i.tState;be=null,vn(()=>{for(const i of o)zr(i);for(const i of r){if(i.value=i.tValue,i.owned)for(let s=0,a=i.owned.length;s<a;s++)zr(i.owned[s]);i.tOwned&&(i.owned=i.tOwned),delete i.tValue,delete i.tOwned,i.tState=0}nd(!1)},!1)}else if(be.running){be.running=!1,be.effects.push.apply(be.effects,qt),qt=null,nd(!0);return}}const n=qt;qt=null,n.length&&vn(()=>Ip(n),!1),t&&t()}function Lp(e){for(let t=0;t<e.length;t++)As(e[t])}function K1(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:As(r)}if(Be.context){if(Be.count){Be.effects||(Be.effects=[]),Be.effects.push(...e.slice(0,n));return}ni()}for(Be.effects&&(Be.done||!Be.count)&&(e=[...Be.effects,...e],n+=Be.effects.length,delete Be.effects),t=0;t<n;t++)As(e[t])}function Ts(e,t){const n=be&&be.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){const o=e.sources[r];if(o.sources){const i=n?o.tState:o.state;i===Fn?o!==t&&(!o.updatedAt||o.updatedAt<Qs)&&As(o):i===gi&&Ts(o,t)}}}function Pp(e){const t=be&&be.running;for(let n=0;n<e.observers.length;n+=1){const r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=gi:r.state=gi,r.pure?Gt.push(r):qt.push(r),r.observers&&Pp(r))}}function zr(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){const i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)zr(e.tOwned[t]);delete e.tOwned}if(be&&be.running&&e.pure)$p(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)zr(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}be&&be.running?e.tState=0:e.state=0}function $p(e,t){if(t||(e.tState=0,be.disposed.add(e)),e.owned)for(let n=0;n<e.owned.length;n++)$p(e.owned[n])}function Ss(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function qc(e,t=qe){throw Ss(e)}function lc(e){if(typeof e=="function"&&!e.length)return lc(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=lc(e[n]);if(Array.isArray(r))if(r.length<32768)t.push.apply(t,r);else for(let o=0;o<r.length;o++)t.push(r[o]);else t.push(r)}return t}return e}function j1(e,t){return function(r){let o;return Le(()=>o=ut(()=>(qe.context={...qe.context,[e]:r.value},jo(()=>r.children))),void 0),o}}const dc=Symbol("fallback");function Ds(e){for(let t=0;t<e.length;t++)e[t]()}function H1(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return oe(()=>Ds(i)),()=>{let u=e()||[],c=u.length,l,d;return u[fi],ut(()=>{let h,p,m,b,v,y,x,E,S;if(c===0)s!==0&&(Ds(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[dc],o[0]=Tn(T=>(i[0]=T,n.fallback())),s=1);else if(s===0){for(o=new Array(c),d=0;d<c;d++)r[d]=u[d],o[d]=Tn(g);s=c}else{for(m=new Array(c),b=new Array(c),a&&(v=new Array(c)),y=0,x=Math.min(s,c);y<x&&r[y]===u[y];y++);for(x=s-1,E=c-1;x>=y&&E>=y&&r[x]===u[E];x--,E--)m[E]=o[x],b[E]=i[x],a&&(v[E]=a[x]);for(h=new Map,p=new Array(E+1),d=E;d>=y;d--)S=u[d],l=h.get(S),p[d]=l===void 0?-1:l,h.set(S,d);for(l=y;l<=x;l++)S=r[l],d=h.get(S),d!==void 0&&d!==-1?(m[d]=o[l],b[d]=i[l],a&&(v[d]=a[l]),d=p[d],h.set(S,d)):i[l]();for(d=y;d<c;d++)d in m?(o[d]=m[d],i[d]=b[d],a&&(a[d]=v[d],a[d](d))):o[d]=Tn(g);o=o.slice(0,s=c),r=u.slice(0)}return o});function g(h){if(i[d]=h,a){const[p,m]=D(d);return a[d]=m,t(u[d],p)}return t(u[d])}}}function q1(e,t,n={}){let r=[],o=[],i=[],s=[],a=0,u;return oe(()=>Ds(i)),()=>{const c=e()||[],l=c.length;return c[fi],ut(()=>{if(l===0)return a!==0&&(Ds(i),i=[],r=[],o=[],a=0,s=[]),n.fallback&&(r=[dc],o[0]=Tn(g=>(i[0]=g,n.fallback())),a=1),o;for(r[0]===dc&&(i[0](),i=[],r=[],o=[],a=0),u=0;u<l;u++)u<r.length&&r[u]!==c[u]?s[u](()=>c[u]):u>=r.length&&(o[u]=Tn(d));for(;u<r.length;u++)i[u]();return a=s.length=i.length=l,r=c.slice(0),o=o.slice(0,a)});function d(g){i[u]=g;const[h,p]=D(c[u]);return s[u]=p,t(h,u)}}}function f(e,t){return ut(()=>e(t||{}))}function as(){return!0}const fc={get(e,t,n){return t===$n?n:e.get(t)},has(e,t){return t===$n?!0:e.has(t)},set:as,deleteProperty:as,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:as,deleteProperty:as}},ownKeys(e){return e.keys()}};function Ua(e){return(e=typeof e=="function"?e():e)?e:{}}function G1(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function H(...e){let t=!1;for(let s=0;s<e.length;s++){const a=e[s];t=t||!!a&&$n in a,e[s]=typeof a=="function"?(t=!0,ee(a)):a}if(Dp&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const u=Ua(e[a])[s];if(u!==void 0)return u}},has(s){for(let a=e.length-1;a>=0;a--)if(s in Ua(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(Ua(e[a])));return[...new Set(s)]}},fc);const n={},r=Object.create(null);for(let s=e.length-1;s>=0;s--){const a=e[s];if(!a)continue;const u=Object.getOwnPropertyNames(a);for(let c=u.length-1;c>=0;c--){const l=u[c];if(l==="__proto__"||l==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,l);if(!r[l])r[l]=d.get?{enumerable:!0,configurable:!0,get:G1.bind(n[l]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const g=n[l];g&&(d.get?g.push(d.get.bind(a)):d.value!==void 0&&g.push(()=>d.value))}}}const o={},i=Object.keys(r);for(let s=i.length-1;s>=0;s--){const a=i[s],u=r[a];u&&u.get?Object.defineProperty(o,a,u):o[a]=u?u.value:void 0}return o}function se(e,...t){const n=t.length;if(Dp&&$n in e){const o=n>1?t.flat():t[0],i=t.map(s=>new Proxy({get(a){return s.includes(a)?e[a]:void 0},has(a){return s.includes(a)&&a in e},keys(){return s.filter(a=>a in e)}},fc));return i.push(new Proxy({get(s){return o.includes(s)?void 0:e[s]},has(s){return o.includes(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!o.includes(s))}},fc)),i}const r=[];for(let o=0;o<=n;o++)r[o]={};for(const o of Object.getOwnPropertyNames(e)){let i=n;for(let u=0;u<t.length;u++)if(t[u].includes(o)){i=u;break}const s=Object.getOwnPropertyDescriptor(e,o);!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable?r[i][o]=s.value:Object.defineProperty(r[i],o,s)}return r}let V1=0;function At(){return Be.context?Be.getNextContextId():`cl-${V1++}`}const Fp=e=>`Stale read from <${e}>.`;function rt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return ee(H1(()=>e.each,e.children,t||void 0))}function gc(e){const t="fallback"in e&&{fallback:()=>e.fallback};return ee(q1(()=>e.each,e.children,t||void 0))}function G(e){const t=e.keyed,n=ee(()=>e.when,void 0,void 0),r=t?n:ee(n,void 0,{equals:(o,i)=>!o==!i});return ee(()=>{const o=r();if(o){const i=e.children;return typeof i=="function"&&i.length>0?ut(()=>i(t?o:()=>{if(!ut(r))throw Fp("Show");return n()})):i}return e.fallback},void 0,void 0)}function W1(e){const t=jo(()=>e.children),n=ee(()=>{const r=t(),o=Array.isArray(r)?r:[r];let i=()=>{};for(let s=0;s<o.length;s++){const a=s,u=o[s],c=i,l=ee(()=>c()?void 0:u.when,void 0,void 0),d=u.keyed?l:ee(l,void 0,{equals:(g,h)=>!g==!h});i=()=>c()||(d()?[a,l,u]:void 0)}return i});return ee(()=>{const r=n()();if(!r)return e.fallback;const[o,i,s]=r,a=s.children;return typeof a=="function"&&a.length>0?ut(()=>a(s.keyed?i():()=>{if(ut(n)()?.[0]!==o)throw Fp("Match");return i()})):a},void 0,void 0)}function od(e){return e}const Y1=it();function na(e){let t=0,n,r,o,i,s;const[a,u]=D(!1),c=z1(),l={increment:()=>{++t===1&&u(!0)},decrement:()=>{--t===0&&u(!1)},inFallback:a,effects:[],resolved:!1},d=pi();if(Be.context&&Be.load){const p=Be.getContextId();let m=Be.load(p);if(m&&(typeof m!="object"||m.s!==1?o=m:Be.gather(p)),o&&o!=="$$f"){const[b,v]=D(void 0,{equals:!1});i=b,o.then(()=>{if(Be.done)return v();Be.gather(p),ni(r),v(),ni()},y=>{s=y,v()})}}const g=nt(Y1);g&&(n=g.register(l.inFallback));let h;return oe(()=>h&&h()),f(c.Provider,{value:l,get children(){return ee(()=>{if(s)throw s;if(r=Be.context,i)return i(),i=void 0;r&&o==="$$f"&&ni();const p=ee(()=>e.children);return ee(m=>{const b=l.inFallback(),{showContent:v=!0,showFallback:y=!0}=n?n():{};if((!b||o&&o!=="$$f")&&v)return l.resolved=!0,h&&h(),h=r=o=void 0,B1(l.effects),p();if(y)return h?m:Tn(x=>(h=x,r&&(ni({id:r.id+"F",count:0}),r=void 0),e.fallback),d)})})}})}const Z1=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],X1=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...Z1]),J1=new Set(["innerHTML","textContent","innerText","children"]),Q1=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),ey=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function ty(e,t){const n=ey[e];return typeof n=="object"?n[t]?n.$:void 0:n}const ny=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),ry=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),oy={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},J=e=>ee(()=>e());function iy(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,u=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const l=i<r?a?n[a-1].nextSibling:n[i-a]:u;for(;a<i;)e.insertBefore(n[a++],l)}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){const l=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],l),t[o]=n[i]}else{if(!c){c=new Map;let d=a;for(;d<i;)c.set(n[d],d++)}const l=c.get(t[s]);if(l!=null)if(a<l&&l<i){let d=s,g=1,h;for(;++d<o&&d<i&&!((h=c.get(t[d]))==null||h!==l+g);)g++;if(g>l-a){const p=t[s];for(;a<l;)e.insertBefore(n[a++],p)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}}const id="_$DX_DELEGATE";function sy(e,t,n,r={}){let o;return Tn(i=>{o=i,t===document?e():w(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}function M(e,t,n,r){let o;const i=()=>{const a=r?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return a.innerHTML=e,n?a.content.firstChild.firstChild:r?a.firstChild:a.content.firstChild},s=t?()=>ut(()=>document.importNode(o||(o=i()),!0)):()=>(o||(o=i())).cloneNode(!0);return s.cloneNode=s,s}function dn(e,t=window.document){const n=t[id]||(t[id]=new Set);for(let r=0,o=e.length;r<o;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,gy))}}function Ge(e,t,n){lo(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function ay(e,t,n,r){lo(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function uy(e,t,n){lo(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function xt(e,t){lo(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Is(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const o=n[0];e.addEventListener(t,n[0]=i=>o.call(e,n[1],i))}else e.addEventListener(t,n,typeof n!="function"&&n)}function cy(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const a=o[i];!a||a==="undefined"||t[a]||(sd(e,a,!1),delete n[a])}for(i=0,s=r.length;i<s;i++){const a=r[i],u=!!t[a];!a||a==="undefined"||n[a]===u||!u||(sd(e,a,!0),n[a]=u)}return n}function Bo(e,t,n){if(!t)return n?Ge(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function hi(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t)}function rr(e,t={},n,r){const o={};return r||Le(()=>o.children=mi(e,t.children,o.children)),Le(()=>typeof t.ref=="function"&&Bn(t.ref,e)),Le(()=>ly(e,t,n,!0,o,!0)),o}function Bn(e,t,n){return ut(()=>e(t,n))}function w(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return mi(e,t,r,n);Le(o=>mi(e,t(),o,n),r)}function ly(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=ad(e,s,null,o[s],n,i,t)}for(const s in t){if(s==="children")continue;const a=t[s];o[s]=ad(e,s,a,o[s],n,i,t)}}function dy(e){let t,n;return!lo()||!(t=Be.registry.get(n=py()))?e():(Be.completed&&Be.completed.add(t),Be.registry.delete(n),t)}function lo(e){return!!Be.context&&!Be.done&&(!e||e.isConnected)}function fy(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function sd(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function ad(e,t,n,r,o,i,s){let a,u,c,l,d;if(t==="style")return Bo(e,n,r);if(t==="classList")return cy(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const g=t.slice(3);r&&e.removeEventListener(g,r,typeof r!="function"&&r),n&&e.addEventListener(g,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const g=t.slice(10);r&&e.removeEventListener(g,r,!0),n&&e.addEventListener(g,n,!0)}else if(t.slice(0,2)==="on"){const g=t.slice(2).toLowerCase(),h=ny.has(g);if(!h&&r){const p=Array.isArray(r)?r[0]:r;e.removeEventListener(g,p)}(h||n)&&(Is(e,g,n,h),h&&dn([g]))}else if(t.slice(0,5)==="attr:")Ge(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")uy(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=J1.has(t))||!o&&((l=ty(t,e.tagName))||(u=X1.has(t)))||(a=e.nodeName.includes("-")||"is"in s)){if(d)t=t.slice(5),u=!0;else if(lo(e))return n;t==="class"||t==="className"?xt(e,n):a&&!u&&!c?e[fy(t)]=n:e[l||t]=n}else{const g=o&&t.indexOf(":")>-1&&oy[t.split(":")[0]];g?ay(e,g,t,n):Ge(e,Q1[t]||t,n)}return n}function gy(e){if(Be.registry&&Be.events&&Be.events.find(([u,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=u=>Object.defineProperty(e,"target",{configurable:!0,value:u}),s=()=>{const u=t[n];if(u&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?u.call(t,c,e):u.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},a=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),Be.registry&&!Be.done&&(Be.done=_$HY.done=!0),e.composedPath){const u=e.composedPath();i(u[0]);for(let c=0;c<u.length-2&&(t=u[c],!!s());c++){if(t._$host){t=t._$host,a();break}if(t.parentNode===o)break}}else a();i(r)}function mi(e,t,n,r,o){const i=lo(e);if(i){!n&&(n=[...e.childNodes]);let u=[];for(let c=0;c<n.length;c++){const l=n[c];l.nodeType===8&&l.data.slice(0,2)==="!$"?l.remove():u.push(l)}n=u}for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(i||s==="number"&&(t=t.toString(),t===n))return n;if(a){let u=n[0];u&&u.nodeType===3?u.data!==t&&(u.data=t):u=document.createTextNode(t),n=wo(e,n,r,u)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean"){if(i)return n;n=wo(e,n,r)}else{if(s==="function")return Le(()=>{let u=t();for(;typeof u=="function";)u=u();n=mi(e,u,n,r)}),()=>n;if(Array.isArray(t)){const u=[],c=n&&Array.isArray(n);if(pc(u,t,n,o))return Le(()=>n=mi(e,u,n,r,!0)),()=>n;if(i){if(!u.length)return n;if(r===void 0)return n=[...e.childNodes];let l=u[0];if(l.parentNode!==e)return n;const d=[l];for(;(l=l.nextSibling)!==r;)d.push(l);return n=d}if(u.length===0){if(n=wo(e,n,r),a)return n}else c?n.length===0?ud(e,u,r):iy(e,n,u):(n&&wo(e),ud(e,u));n=u}else if(t.nodeType){if(i&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=wo(e,n,r,t);wo(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function pc(e,t,n,r){let o=!1;for(let i=0,s=t.length;i<s;i++){let a=t[i],u=n&&n[e.length],c;if(!(a==null||a===!0||a===!1))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=pc(e,a,u)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=pc(e,Array.isArray(a)?a:[a],Array.isArray(u)?u:[u])||o}else e.push(a),o=!0;else{const l=String(a);u&&u.nodeType===3&&u.data===l?e.push(u):e.push(document.createTextNode(l))}}return o}function ud(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function wo(e,t,n,r){if(n===void 0)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let i=!1;for(let s=t.length-1;s>=0;s--){const a=t[s];if(o!==a){const u=a.parentNode===e;!i&&!s?u?e.replaceChild(o,a):e.insertBefore(o,n):u&&a.remove()}else i=!0}}else e.insertBefore(o,n);return[o]}function py(){return Be.getNextContextId()}const hy=!1,my="http://www.w3.org/2000/svg";function Bp(e,t=!1,n=void 0){return t?document.createElementNS(my,e):document.createElement(e,{is:n})}function Mi(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=pi();let i,s=!!Be.context;return te(()=>{s&&(pi().user=s=!1),i||(i=ea(o,()=>ee(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[u,c]=D(!1),l=()=>c(!0);Tn(d=>w(a,()=>u()?d():i(),null)),oe(l)}else{const u=Bp(e.isSVG?"g":"div",e.isSVG),c=t&&u.attachShadow?u.attachShadow({mode:"open"}):u;Object.defineProperty(u,"_$host",{get(){return n.parentNode},configurable:!0}),w(c,i),a.appendChild(u),e.ref&&e.ref(u),oe(()=>a.removeChild(u))}},void 0,{render:!s}),n}function by(e,t){const n=ee(e);return ee(()=>{const r=n();switch(typeof r){case"function":return ut(()=>r(t));case"string":const o=ry.has(r),i=Be.context?dy():Bp(r,o,ut(()=>t.is));return rr(i,t,o),i}})}function zp(e){const[,t]=se(e,["component"]);return by(()=>e.component,t)}function Up(){let e=new Set;function t(o){return e.add(o),()=>e.delete(o)}let n=!1;function r(o,i){if(n)return!(n=!1);const s={to:o,options:i,defaultPrevented:!1,preventDefault:()=>s.defaultPrevented=!0};for(const a of e)a.listener({...s,from:a.location,retry:u=>{u&&(n=!0),a.navigate(o,{...i,resolve:!1})}});return!s.defaultPrevented}return{subscribe:t,confirm:r}}let hc;function Gc(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),hc=window.history.state._depth}Gc();function yy(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function vy(e,t){let n=!1;return()=>{const r=hc;Gc();const o=r==null?null:hc-r;if(n){n=!1;return}o&&t(o)?(n=!0,window.history.go(-o)):e()}}const xy=/^(?:[a-z0-9]+:)?\/\//i,wy=/^\/+|(\/)\/+$/g,Kp="http://sr";function io(e,t=!1){const n=e.replace(wy,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function Cs(e,t,n){if(xy.test(t))return;const r=io(e),o=n&&io(n);let i="";return!o||t.startsWith("/")?i=r:o.toLowerCase().indexOf(r.toLowerCase())!==0?i=r+o:i=o,(i||"/")+io(t,!i)}function _y(e,t){if(e==null)throw new Error(t);return e}function Ey(e,t){return io(e).replace(/\/*(\*.*)?$/g,"")+io(t)}function jp(e){const t={};return e.searchParams.forEach((n,r)=>{r in t?Array.isArray(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n}),t}function Sy(e,t,n){const[r,o]=e.split("/*",2),i=r.split("/").filter(Boolean),s=i.length;return a=>{const u=a.split("/").filter(Boolean),c=u.length-s;if(c<0||c>0&&o===void 0&&!t)return null;const l={path:s?"":"/",params:{}},d=g=>n===void 0?void 0:n[g];for(let g=0;g<s;g++){const h=i[g],p=h[0]===":",m=p?u[g]:u[g].toLowerCase(),b=p?h.slice(1):h.toLowerCase();if(p&&Ka(m,d(b)))l.params[b]=m;else if(p||!Ka(m,b))return null;l.path+=`/${m}`}if(o){const g=c?u.slice(-c).join("/"):"";if(Ka(g,d(o)))l.params[o]=g;else return null}return l}}function Ka(e,t){const n=r=>r===e;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function Cy(e){const[t,n]=e.pattern.split("/*",2),r=t.split("/").filter(Boolean);return r.reduce((o,i)=>o+(i.startsWith(":")?2:3),r.length-(n===void 0?0:1))}function Hp(e){const t=new Map,n=pi();return new Proxy({},{get(r,o){return t.has(o)||ea(n,()=>t.set(o,ee(()=>e()[o]))),t.get(o)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())},has(r,o){return o in e()}})}function qp(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),r=e.slice(t.index+t[0].length);const o=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(r);)o.push(n+=t[1]),r=r.slice(t[0].length);return qp(r).reduce((i,s)=>[...i,...o.map(a=>a+s)],[])}const ky=100,Gp=it(),Vc=it(),fo=()=>_y(nt(Gp),"<A> and 'use' router primitives can be only used inside a Route."),Ay=()=>nt(Vc)||fo().base,Ty=e=>{const t=Ay();return ee(()=>t.resolvePath(e()))},Dy=e=>{const t=fo();return ee(()=>{const n=e();return n!==void 0?t.renderPath(n):n})},go=()=>fo().navigatorFactory(),qo=()=>fo().location,Iy=()=>fo().isRouting,Li=()=>fo().params,Oy=e=>{const t=fo().beforeLeave.subscribe({listener:e,location:qo(),navigate:go()});oe(t)};function Ry(e,t=""){const{component:n,preload:r,load:o,children:i,info:s}=e,a=!i||Array.isArray(i)&&!i.length,u={key:e,component:n,preload:r||o,info:s};return Vp(e.path).reduce((c,l)=>{for(const d of qp(l)){const g=Ey(t,d);let h=a?g:g.split("/*",1)[0];h=h.split("/").map(p=>p.startsWith(":")||p.startsWith("*")?p:encodeURIComponent(p)).join("/"),c.push({...u,originalPath:l,pattern:h,matcher:Sy(h,!a,e.matchFilters)})}return c},[])}function Ny(e,t=0){return{routes:e,score:Cy(e[e.length-1])*1e4-t,matcher(n){const r=[];for(let o=e.length-1;o>=0;o--){const i=e[o],s=i.matcher(n);if(!s)return null;r.unshift({...s,route:i})}return r}}}function Vp(e){return Array.isArray(e)?e:[e]}function Wp(e,t="",n=[],r=[]){const o=Vp(e);for(let i=0,s=o.length;i<s;i++){const a=o[i];if(a&&typeof a=="object"){a.hasOwnProperty("path")||(a.path="");const u=Ry(a,t);for(const c of u){n.push(c);const l=Array.isArray(a.children)&&a.children.length===0;if(a.children&&!l)Wp(a.children,c.pattern,n,r);else{const d=Ny([...n],r.length);r.push(d)}n.pop()}}}return n.length?r:r.sort((i,s)=>s.score-i.score)}function ja(e,t){for(let n=0,r=e.length;n<r;n++){const o=e[n].matcher(t);if(o)return o}return[]}function My(e,t,n){const r=new URL(Kp),o=ee(l=>{const d=e();try{return new URL(d,r)}catch{return console.error(`Invalid path ${d}`),l}},r,{equals:(l,d)=>l.href===d.href}),i=ee(()=>o().pathname),s=ee(()=>o().search,!0),a=ee(()=>o().hash),u=()=>"",c=bt(s,()=>jp(o()));return{get pathname(){return i()},get search(){return s()},get hash(){return a()},get state(){return t()},get key(){return u()},query:n?n(c):Hp(c)}}let ro;function Ly(){return ro}function Py(e,t,n,r={}){const{signal:[o,i],utils:s={}}=e,a=s.parsePath||(N=>N),u=s.renderPath||(N=>N),c=s.beforeLeave||Up(),l=Cs("",r.base||"");if(l===void 0)throw new Error(`${l} is not a valid base path`);l&&!o().value&&i({value:l,replace:!0,scroll:!1});const[d,g]=D(!1);let h;const p=(N,W)=>{W.value===m()&&W.state===v()||(h===void 0&&g(!0),ro=N,h=W,Rp(()=>{h===W&&(b(h.value),y(h.state),S[1](R=>R.filter(P=>P.pending)))}).finally(()=>{h===W&&Hc(()=>{ro=void 0,N==="navigate"&&V(h),g(!1),h=void 0})}))},[m,b]=D(o().value),[v,y]=D(o().state),x=My(m,v,s.queryWrapper),E=[],S=D([]),T=ee(()=>typeof r.transformUrl=="function"?ja(t(),r.transformUrl(x.pathname)):ja(t(),x.pathname)),A=()=>{const N=T(),W={};for(let R=0;R<N.length;R++)Object.assign(W,N[R].params);return W},C=s.paramsWrapper?s.paramsWrapper(A,t):Hp(A),L={pattern:l,path:()=>l,outlet:()=>null,resolvePath(N){return Cs(l,N)}};return Le(bt(o,N=>p("native",N),{defer:!0})),{base:L,location:x,params:C,isRouting:d,renderPath:u,parsePath:a,navigatorFactory:$,matches:T,beforeLeave:c,preloadRoute:B,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:S};function j(N,W,R){ut(()=>{if(typeof W=="number"){W&&(s.go?s.go(W):console.warn("Router integration does not support relative routing"));return}const P=!W||W[0]==="?",{replace:ne,resolve:Y,scroll:K,state:ce}={replace:!1,resolve:!P,scroll:!0,...R},z=Y?N.resolvePath(W):Cs(P&&x.pathname||"",W);if(z===void 0)throw new Error(`Path '${W}' is not a routable path`);if(E.length>=ky)throw new Error("Too many redirects");const k=m();(z!==k||ce!==v())&&(hy||c.confirm(z,R)&&(E.push({value:k,replace:ne,scroll:K,state:v()}),p("navigate",{value:z,state:ce})))})}function $(N){return N=N||nt(Vc)||L,(W,R)=>j(N,W,R)}function V(N){const W=E[0];W&&(i({...N,replace:W.replace,scroll:W.scroll}),E.length=0)}function B(N,W){const R=ja(t(),N.pathname),P=ro;ro="preload";for(let ne in R){const{route:Y,params:K}=R[ne];Y.component&&Y.component.preload&&Y.component.preload();const{preload:ce}=Y;W&&ce&&ea(n(),()=>ce({params:K,location:{pathname:N.pathname,search:N.search,hash:N.hash,query:jp(N),state:null,key:""},intent:"preload"}))}ro=P}}function $y(e,t,n,r){const{base:o,location:i,params:s}=e,{pattern:a,component:u,preload:c}=r().route,l=ee(()=>r().path);u&&u.preload&&u.preload();const d=c?c({params:s,location:i,intent:ro||"initial"}):void 0;return{parent:t,pattern:a,path:l,outlet:()=>u?f(u,{params:s,location:i,data:d,get children(){return n()}}):n(),resolvePath(h){return Cs(o.path(),h,l())}}}const Fy=e=>t=>{const{base:n}=t,r=jo(()=>t.children),o=ee(()=>Wp(r(),t.base||""));let i;const s=Py(e,o,()=>i,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(s),f(Gp.Provider,{value:s,get children(){return f(By,{routerState:s,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[J(()=>(i=pi())&&null),f(zy,{routerState:s,get branches(){return o()}})]}})}})};function By(e){const t=e.routerState.location,n=e.routerState.params,r=ee(()=>e.preload&&ut(()=>{e.preload({params:n,location:t,intent:Ly()||"initial"})}));return f(G,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:o=>f(o,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function zy(e){const t=[];let n;const r=ee(bt(e.routerState.matches,(o,i,s)=>{let a=i&&o.length===i.length;const u=[];for(let c=0,l=o.length;c<l;c++){const d=i&&i[c],g=o[c];s&&d&&g.route.key===d.route.key?u[c]=s[c]:(a=!1,t[c]&&t[c](),Tn(h=>{t[c]=h,u[c]=$y(e.routerState,u[c-1]||e.routerState.base,cd(()=>r()[c+1]),()=>{const p=e.routerState.matches();return p[c]??p[0]})}))}return t.splice(o.length).forEach(c=>c()),s&&a?s:(n=u[0],u)}));return cd(()=>r()&&n)()}const cd=e=>()=>f(G,{get when(){return e()},keyed:!0,children:t=>f(Vc.Provider,{value:t,get children(){return t.outlet()}})}),gr=e=>{const t=jo(()=>e.children);return H(e,{get children(){return t()}})};function Uy([e,t],n,r){return[e,r?o=>t(r(o)):t]}function Ky(e){let t=!1;const n=o=>typeof o=="string"?{value:o}:o,r=Uy(D(n(e.get()),{equals:(o,i)=>o.value===i.value&&o.state===i.state}),void 0,o=>(!t&&e.set(o),Be.registry&&!Be.done&&(Be.done=!0),o));return e.init&&oe(e.init((o=e.get())=>{t=!0,r[1](n(o)),t=!1})),Fy({signal:r,create:e.create,utils:e.utils})}function jy(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function Hy(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const qy=new Map;function Gy({preload:e=!0,explicitLinks:t=!1,actionBase:n="/_server",transformUrl:r}={}){return o=>{const i=o.base.path(),s=o.navigatorFactory(o.base);let a,u;function c(m){return m.namespaceURI==="http://www.w3.org/2000/svg"}function l(m){if(m.defaultPrevented||m.button!==0||m.metaKey||m.altKey||m.ctrlKey||m.shiftKey)return;const b=m.composedPath().find(T=>T instanceof Node&&T.nodeName.toUpperCase()==="A");if(!b||t&&!b.hasAttribute("link"))return;const v=c(b),y=v?b.href.baseVal:b.href;if((v?b.target.baseVal:b.target)||!y&&!b.hasAttribute("state"))return;const E=(b.getAttribute("rel")||"").split(/\s+/);if(b.hasAttribute("download")||E&&E.includes("external"))return;const S=v?new URL(y,document.baseURI):new URL(y);if(!(S.origin!==window.location.origin||i&&S.pathname&&!S.pathname.toLowerCase().startsWith(i.toLowerCase())))return[b,S]}function d(m){const b=l(m);if(!b)return;const[v,y]=b,x=o.parsePath(y.pathname+y.search+y.hash),E=v.getAttribute("state");m.preventDefault(),s(x,{resolve:!1,replace:v.hasAttribute("replace"),scroll:!v.hasAttribute("noscroll"),state:E?JSON.parse(E):void 0})}function g(m){const b=l(m);if(!b)return;const[v,y]=b;r&&(y.pathname=r(y.pathname)),o.preloadRoute(y,v.getAttribute("preload")!=="false")}function h(m){clearTimeout(a);const b=l(m);if(!b)return u=null;const[v,y]=b;u!==v&&(r&&(y.pathname=r(y.pathname)),a=setTimeout(()=>{o.preloadRoute(y,v.getAttribute("preload")!=="false"),u=v},20))}function p(m){if(m.defaultPrevented)return;let b=m.submitter&&m.submitter.hasAttribute("formaction")?m.submitter.getAttribute("formaction"):m.target.getAttribute("action");if(!b)return;if(!b.startsWith("https://action/")){const y=new URL(b,Kp);if(b=o.parsePath(y.pathname+y.search),!b.startsWith(n))return}if(m.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const v=qy.get(b);if(v){m.preventDefault();const y=new FormData(m.target,m.submitter);v.call({r:o,f:m.target},m.target.enctype==="multipart/form-data"?y:new URLSearchParams(y))}}dn(["click","submit"]),document.addEventListener("click",d),e&&(document.addEventListener("mousemove",h,{passive:!0}),document.addEventListener("focusin",g,{passive:!0}),document.addEventListener("touchstart",g,{passive:!0})),document.addEventListener("submit",p),oe(()=>{document.removeEventListener("click",d),e&&(document.removeEventListener("mousemove",h),document.removeEventListener("focusin",g),document.removeEventListener("touchstart",g)),document.removeEventListener("submit",p)})}}function Vy(e){const t=()=>{const r=window.location.pathname.replace(/^\/+/,"/")+window.location.search,o=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:r+window.location.hash,state:o}},n=Up();return Ky({get:t,set({value:r,replace:o,scroll:i,state:s}){o?window.history.replaceState(yy(s),"",r):window.history.pushState(s,"",r),Hy(decodeURIComponent(window.location.hash.slice(1)),i),Gc()},init:r=>jy(window,"popstate",vy(r,o=>{if(o)return!n.confirm(o);{const i=t();return!n.confirm(i.value,{state:i.state})}})),create:Gy({preload:e.preload,explicitLinks:e.explicitLinks,actionBase:e.actionBase,transformUrl:e.transformUrl}),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}var Wy=M("<a>");function Pn(e){e=H({inactiveClass:"inactive",activeClass:"active"},e);const[,t]=se(e,["href","state","class","activeClass","inactiveClass","end"]),n=Ty(()=>e.href),r=Dy(n),o=qo(),i=ee(()=>{const s=n();if(s===void 0)return[!1,!1];const a=io(s.split(/[?#]/,1)[0]).toLowerCase(),u=decodeURI(io(o.pathname).toLowerCase());return[e.end?a===u:u.startsWith(a+"/")||u===a,a===u]});return(()=>{var s=Wy();return rr(s,H(t,{get href(){return r()||e.href},get state(){return JSON.stringify(e.state)},get classList(){return{...e.class&&{[e.class]:!0},[e.inactiveClass]:!i()[0],[e.activeClass]:i()[0],...t.classList}},link:"",get"aria-current"(){return i()[1]?"page":void 0}}),!1,!1),s})()}function Yy(e){const t=go(),n=qo(),{href:r,state:o}=e,i=typeof r=="function"?r({navigate:t,location:n}):r;return t(i,{replace:!0,state:o}),null}const mc=Symbol("store-raw"),Mo=Symbol("store-node"),br=Symbol("store-has"),Yp=Symbol("store-self");function Zp(e){let t=e[$n];if(!t&&(Object.defineProperty(e,$n,{value:t=new Proxy(e,Jy)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e),o=Object.getPrototypeOf(e),i=o!==null&&e!==null&&typeof e=="object"&&!Array.isArray(e)&&o!==Object.prototype;if(i){const s=Object.getOwnPropertyDescriptors(o);n.push(...Object.keys(s)),Object.assign(r,s)}for(let s=0,a=n.length;s<a;s++){const u=n[s];i&&u==="constructor"||r[u].get&&Object.defineProperty(e,u,{configurable:!0,enumerable:r[u].enumerable,get:r[u].get.bind(t)})}}return t}function Os(e){let t;return e!=null&&typeof e=="object"&&(e[$n]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function bi(e,t=new Set){let n,r,o,i;if(n=e!=null&&e[mc])return n;if(!Os(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let s=0,a=e.length;s<a;s++)o=e[s],(r=bi(o,t))!==o&&(e[s]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const s=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let u=0,c=s.length;u<c;u++)i=s[u],!a[i].get&&(o=e[i],(r=bi(o,t))!==o&&(e[i]=r))}return e}function Rs(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function yi(e,t,n){if(e[t])return e[t];const[r,o]=D(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function Zy(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===$n||t===Mo||(delete n.value,delete n.writable,n.get=()=>e[$n][t]),n}function Xp(e){cc()&&yi(Rs(e,Mo),Yp)()}function Xy(e){return Xp(e),Reflect.ownKeys(e)}const Jy={get(e,t,n){if(t===mc)return e;if(t===$n)return n;if(t===fi)return Xp(e),n;const r=Rs(e,Mo),o=r[t];let i=o?o():e[t];if(t===Mo||t===br||t==="__proto__")return i;if(!o){const s=Object.getOwnPropertyDescriptor(e,t);cc()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(i=yi(r,t,i)())}return Os(i)?Zp(i):i},has(e,t){return t===mc||t===$n||t===fi||t===Mo||t===br||t==="__proto__"?!0:(cc()&&yi(Rs(e,br),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Xy,getOwnPropertyDescriptor:Zy};function Ns(e,t,n,r=!1){if(t==="__proto__"||!r&&e[t]===n)return;const o=e[t],i=e.length;n===void 0?(delete e[t],e[br]&&e[br][t]&&o!==void 0&&e[br][t].$()):(e[t]=n,e[br]&&e[br][t]&&o===void 0&&e[br][t].$());let s=Rs(e,Mo),a;if((a=yi(s,t,o))&&a.$(()=>n),Array.isArray(e)&&e.length!==i){for(let u=e.length;u<i;u++)(a=s[u])&&a.$();(a=yi(s,"length",i))&&a.$(e.length)}(a=s[Yp])&&a.$()}function Jp(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];Qp(o)||Ns(e,o,t[o])}}function Qp(e){return e==="__proto__"||e==="constructor"||e==="prototype"}function Qy(e,t){if(typeof t=="function"&&(t=t(e)),t=bi(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const o=t[n];e[n]!==o&&Ns(e,n,o)}Ns(e,"length",r)}else Jp(e,t)}function ri(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();const s=typeof r,a=Array.isArray(e);if(s==="string"&&(r==="__proto__"||t.length>1&&Qp(r)))return;if(Array.isArray(r)){for(let u=0;u<r.length;u++)ri(e,[r[u]].concat(t),n);return}else if(a&&s==="function"){for(let u=0;u<e.length;u++)r(e[u],u)&&ri(e,[u].concat(t),n);return}else if(a&&s==="object"){const{from:u=0,to:c=e.length-1,by:l=1}=r;for(let d=u;d<=c;d+=l)ri(e,[d].concat(t),n);return}else if(t.length>1){ri(e[r],t,[r].concat(n));return}o=e[r],n=[r].concat(n)}let i=t[0];typeof i=="function"&&(i=i(o,n),i===o)||r===void 0&&i==null||(i=bi(i),r===void 0||Os(o)&&Os(i)&&!Array.isArray(i)?Jp(o,i):Ns(e,r,i))}function ev(...[e,t]){const n=bi(e||{}),r=Array.isArray(n),o=Zp(n);function i(...s){Hc(()=>{r&&s.length===1?Qy(n,s[0]):ri(n,s)})}return[o,i]}const $e=e=>typeof e=="string",Yo=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},ld=e=>e==null?"":String(e),tv=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},nv=/###/g,dd=e=>e&&e.includes("###")?e.replace(nv,"."):e,fd=e=>!e||$e(e),ai=(e,t,n)=>{const r=$e(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(fd(e))return{};const i=dd(r[o]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++o}return fd(e)?{}:{obj:e,k:dd(r[o])}},gd=(e,t,n)=>{const{obj:r,k:o}=ai(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let i=t[t.length-1],s=t.slice(0,t.length-1),a=ai(e,s,Object);for(;a.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=ai(e,s,Object),a?.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},rv=(e,t,n,r)=>{const{obj:o,k:i}=ai(e,t,Object);o[i]=o[i]||[],o[i].push(n)},Ms=(e,t)=>{const{obj:n,k:r}=ai(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},ov=(e,t,n)=>{const r=Ms(e,n);return r!==void 0?r:Ms(t,n)},eh=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,r)?$e(e[r])||e[r]instanceof String||$e(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):eh(e[r],t[r],n):e[r]=t[r]);return e},pr=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),iv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},sv=e=>$e(e)?e.replace(/[&<>"'\/]/g,t=>iv[t]):e;class av{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const uv=[" ",",","?","!",";"],cv=new av(20),lv=(e,t,n)=>{t=t||"",n=n||"";const r=uv.filter(s=>!t.includes(s)&&!n.includes(s));if(r.length===0)return!0;const o=cv.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!o.test(e);if(!i){const s=e.indexOf(n);s>0&&!o.test(e.substring(0,s))&&(i=!0)}return i},bc=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let o=e;for(let i=0;i<r.length;){if(!o||typeof o!="object")return;let s,a="";for(let u=i;u<r.length;++u)if(u!==i&&(a+=n),a+=r[u],s=o[a],s!==void 0){if(["string","number","boolean"].includes(typeof s)&&u<r.length-1)continue;i+=u-i+1;break}o=s}return o},vi=e=>e?.replace(/_/g,"-"),dv={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Ls{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||dv,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(t=t.map(i=>$e(i)?i.replace(/[\r\n\x00-\x1F\x7F]/g," "):i),$e(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Ls(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Ls(this.logger,t)}}var Xn=new Ls;class ra{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}once(t,n){const r=(...o)=>{n(...o),this.off(t,r)};return this.on(t,r),this}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([o,i])=>{for(let s=0;s<i;s++)o(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,i])=>{for(let s=0;s<i;s++)o(t,...n)})}}class pd extends ra{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.includes(t)||this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,o={}){const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.includes(".")?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):$e(r)&&i?a.push(...r.split(i)):a.push(r)));const u=Ms(this.data,a);return!u&&!n&&!r&&t.includes(".")&&(t=a[0],n=a[1],r=a.slice(2).join(".")),u||!s||!$e(r)?u:bc(this.data?.[t]?.[n],r,i)}addResource(t,n,r,o,i={silent:!1}){const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.includes(".")&&(a=t.split("."),o=n,n=a[1]),this.addNamespaces(n),gd(this.data,a,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r,o={silent:!1}){for(const i in r)($e(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i,s={silent:!1,skipCopy:!1}){let a=[t,n];t.includes(".")&&(a=t.split("."),o=r,r=n,n=a[1]),this.addNamespaces(n);let u=Ms(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?eh(u,r,i):u={...u,...r},gd(this.data,a,u),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var th={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{t=this.processors[i]?.process(t,n,r,o)??t}),t}};const nh=Symbol("i18next/PATH_KEY");function fv(){const e=[],t=Object.create(null);let n;return t.get=(r,o)=>(n?.revoke?.(),o===nh?e:(e.push(o),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Lo(e,t){const{[nh]:n}=e(fv()),r=t?.keySeparator??".",o=t?.nsSeparator??":",i=t?.enableSelector==="strict";if(n.length>1&&o){const s=t?.ns,a=i?Array.isArray(s)?s:s?[s]:null:Array.isArray(s)?s:null;if(a&&(i?a:a.length>1?a.slice(1):[]).includes(n[0]))return`${n[0]}${o}${n.slice(1).join(r)}`}return n.join(r)}const Ha=e=>!$e(e)&&typeof e!="boolean"&&typeof e!="number";class Ps extends ra{constructor(t,n={}){super(),tv(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Xn.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const o=this.resolve(t,r);if(o?.res===void 0)return!1;const i=Ha(o.res);return!(r.returnObjects===!1&&i)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const s=r&&t.includes(r),a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!lv(t,r,o);if(s&&!a){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:$e(i)?[i]:i};const c=t.split(r);(r!==o||r===o&&this.options.ns.includes(c[0]))&&(i=c.shift()),t=c.join(o)}return{key:t,namespaces:$e(i)?[i]:i}}translate(t,n,r){let o=typeof n=="object"?{...n}:n;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),t==null)return"";typeof t=="function"&&(t=Lo(t,{...this.options,...o})),Array.isArray(t)||(t=[String(t)]),t=t.map(B=>typeof B=="function"?Lo(B,{...this.options,...o}):String(B));const i=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:a,namespaces:u}=this.extractFromKey(t[t.length-1],o),c=u[u.length-1];let l=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;l===void 0&&(l=":");const d=o.lng||this.language,g=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()==="cimode")return g?i?{res:`${c}${l}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:`${c}${l}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:a;const h=this.resolve(t,o);let p=h?.res;const m=h?.usedKey||a,b=h?.exactUsedKey||a,v=["[object Number]","[object Function]","[object RegExp]"],y=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,E=o.count!==void 0&&!$e(o.count),S=Ps.hasDefaultValue(o),T=E?this.pluralResolver.getSuffix(d,o.count,o):"",A=o.ordinal&&E?this.pluralResolver.getSuffix(d,o.count,{ordinal:!1}):"",C=E&&!o.ordinal&&o.count===0,L=C&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${T}`]||o[`defaultValue${A}`]||o.defaultValue;let j=p;x&&!p&&S&&(j=L);const $=Ha(j),V=Object.prototype.toString.apply(j);if(x&&j&&$&&!v.includes(V)&&!($e(y)&&Array.isArray(j))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const B=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,j,{...o,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(h.res=B,h.usedParams=this.getUsedParamsDetails(o),h):B}if(s){const B=Array.isArray(j),N=B?[]:{},W=B?b:m;for(const R in j)if(Object.prototype.hasOwnProperty.call(j,R)){const P=`${W}${s}${R}`;S&&!p?N[R]=this.translate(P,{...o,defaultValue:Ha(L)?L[R]:void 0,joinArrays:!1,ns:u}):N[R]=this.translate(P,{...o,joinArrays:!1,ns:u}),N[R]===P&&(N[R]=j[R])}p=N}}else if(x&&$e(y)&&Array.isArray(p))p=p.join(y),p&&(p=this.extendTranslation(p,t,o,r));else{let B=!1,N=!1;!this.isValidLookup(p)&&S&&(B=!0,p=L),this.isValidLookup(p)||(N=!0,p=a);const R=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&N?void 0:p,P=S&&L!==p&&this.options.updateMissing;if(N||B||P){if(this.logger.log(P?"updateKey":"missingKey",d,c,E&&!P?`${a}${this.pluralResolver.getSuffix(d,o.count,o)}`:a,P?L:p),s){const ce=this.resolve(a,{...o,keySeparator:!1});ce&&ce.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let ne=[];const Y=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Y&&Y[0])for(let ce=0;ce<Y.length;ce++)ne.push(Y[ce]);else this.options.saveMissingTo==="all"?ne=this.languageUtils.toResolveHierarchy(o.lng||this.language):ne.push(o.lng||this.language);const K=(ce,z,k)=>{const O=S&&k!==p?k:R;this.options.missingKeyHandler?this.options.missingKeyHandler(ce,c,z,O,P,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ce,c,z,O,P,o),this.emit("missingKey",ce,c,z,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?ne.forEach(ce=>{const z=this.pluralResolver.getSuffixes(ce,o);C&&o[`defaultValue${this.options.pluralSeparator}zero`]&&!z.includes(`${this.options.pluralSeparator}zero`)&&z.push(`${this.options.pluralSeparator}zero`),z.forEach(k=>{K([ce],a+k,o[`defaultValue${k}`]||L)})}):K(ne,a,L))}p=this.extendTranslation(p,t,o,h,r),N&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${c}${l}${a}`),(N||B)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${l}${a}`:a,B?p:void 0,o))}return i?(h.res=p,h.usedParams=this.getUsedParamsDetails(o),h):p}extendTranslation(t,n,r,o,i){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=$e(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const d=t.match(this.interpolator.nestingRegexp);c=d&&d.length}let l=r.replace&&!$e(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),t=this.interpolator.interpolate(t,l,r.lng||this.language||o.usedLng,r),u){const d=t.match(this.interpolator.nestingRegexp),g=d&&d.length;c<g&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...d)=>i?.[0]===d[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${n[0]}`),null):this.translate(...d,n),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,a=$e(s)?[s]:s;return t!=null&&a?.length&&r.applyPostProcessor!==!1&&(t=th.handle(a,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,o,i,s,a;return $e(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(u=>typeof u=="function"?Lo(u,{...this.options,...n}):u)),t.forEach(u=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(u,n),l=c.key;o=l;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const g=n.count!==void 0&&!$e(n.count),h=g&&!n.ordinal&&n.count===0,p=n.context!==void 0&&($e(n.context)||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(b=>{this.isValidLookup(r)||(a=b,!this.checkedLoadedFor[`${m[0]}-${b}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(a)&&(this.checkedLoadedFor[`${m[0]}-${b}`]=!0,this.logger.warn(`key "${o}" for languages "${m.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(v=>{if(this.isValidLookup(r))return;s=v;const y=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(y,l,v,b,n);else{let E;g&&(E=this.pluralResolver.getSuffix(v,n.count,n));const S=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(g&&(n.ordinal&&E.startsWith(T)&&y.push(l+E.replace(T,this.options.pluralSeparator)),y.push(l+E),h&&y.push(l+S)),p){const A=`${l}${this.options.contextSeparator||"_"}${n.context}`;y.push(A),g&&(n.ordinal&&E.startsWith(T)&&y.push(A+E.replace(T,this.options.pluralSeparator)),y.push(A+E),h&&y.push(A+S))}}let x;for(;x=y.pop();)this.isValidLookup(r)||(i=x,r=this.getResource(v,b,x,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!$e(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o={...o,count:t.count}),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&r.startsWith(n)&&t[r]!==void 0)return!0;return!1}}class hd{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Xn.create("languageUtils")}getScriptPartFromCode(t){if(t=vi(t),!t||!t.includes("-"))return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=vi(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if($e(t)&&t.includes("-")){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return n=o;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>s===i?!0:!s.includes("-")&&!i.includes("-")?!1:!!(s.includes("-")&&!i.includes("-")&&s.slice(0,s.indexOf("-"))===i||s.startsWith(i)&&i.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),$e(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),o=[],i=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return $e(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):$e(t)&&i(this.formatLanguageCode(t)),r.forEach(s=>{o.includes(s)||i(this.formatLanguageCode(s))}),o}}const md={zero:0,one:1,two:2,few:3,many:4,other:5},bd={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class gv{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=Xn.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=vi(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let s;try{s=new Intl.PluralRules(r,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),bd;if(!t.match(/-|_/))return bd;const u=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(u,n)}return this.pluralRulesCache[i]=s,s}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,i)=>md[o]-md[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,n,r={}){const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const yd=(e,t,n,r=".",o=!0)=>{let i=ov(e,t,n);return!i&&o&&$e(n)&&(i=bc(e,n,r),i===void 0&&(i=bc(t,n,r))),i},pv=e=>e.replace(/\$/g,"$$$$");class vd{constructor(t={}){this.logger=Xn.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:s,suffix:a,suffixEscaped:u,formatSeparator:c,unescapeSuffix:l,unescapePrefix:d,nestingPrefix:g,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:b,maxReplaces:v,alwaysFormat:y}=t.interpolation;this.escape=n!==void 0?n:sv,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?pr(i):s||"{{",this.suffix=a?pr(a):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=l?"":d?pr(d):"-",this.unescapeSuffix=this.unescapePrefix?"":l?pr(l):"",this.nestingPrefix=g?pr(g):h||pr("$t("),this.nestingSuffix=p?pr(p):m||pr(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=v||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let i,s,a;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=h=>{if(!h.includes(this.formatSeparator)){const v=yd(n,u,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,r,{...o,...n,interpolationkey:h}):v}const p=h.split(this.formatSeparator),m=p.shift().trim(),b=p.join(this.formatSeparator).trim();return this.format(yd(n,u,m,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...o,...n,interpolationkey:m})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const l=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>h},{regex:this.regexp,safeValue:h=>this.escapeValue?this.escape(h):h}].forEach(h=>{for(a=0;i=h.regex.exec(t);){const p=i[1].trim();if(s=c(p),s===void 0)if(typeof l=="function"){const b=l(t,i,o);s=$e(b)?b:""}else if(o&&Object.prototype.hasOwnProperty.call(o,p))s="";else if(d){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${t}`),s="";else!$e(s)&&!this.useRawValueToEscape&&(s=ld(s));const m=h.safeValue(s);if(t=t.replace(i[0],pv(m)),d?(h.regex.lastIndex+=m.length,h.regex.lastIndex-=i[0].length):h.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n,r={}){let o,i,s;const a=(u,c)=>{const l=this.nestingOptionsSeparator;if(!u.includes(l))return u;const d=u.split(new RegExp(`${pr(l)}[ ]*{`));let g=`{${d[1]}`;u=d[0],g=this.interpolate(g,s);const h=g.match(/'/g),p=g.match(/"/g);((h?.length??0)%2===0&&!p||(p?.length??0)%2!==0)&&(g=g.replace(/'/g,'"'));try{s=JSON.parse(g),c&&(s={...c,...s})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,m),`${u}${l}${g}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,u};for(;o=this.nestingRegexp.exec(t);){let u=[];s={...r},s=s.replace&&!$e(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/s.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(c!==-1&&(u=o[1].slice(c).split(this.formatSeparator).map(l=>l.trim()).filter(Boolean),o[1]=o[1].slice(0,c)),i=n(a.call(this,o[1].trim(),s),s),i&&o[0]===t&&!$e(i))return i;$e(i)||(i=ld(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),u.length&&(i=u.reduce((l,d)=>this.format(l,d,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}const hv=e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].slice(0,-1);t==="currency"&&!o.includes(":")?n.currency||(n.currency=o.trim()):t==="relativetime"&&!o.includes(":")?n.range||(n.range=o.trim()):o.split(";").forEach(s=>{if(s){const[a,...u]=s.split(":"),c=u.join(":").trim().replace(/^'+|'+$/g,""),l=a.trim();n[l]||(n[l]=c),c==="false"&&(n[l]=!1),c==="true"&&(n[l]=!0),isNaN(c)||(n[l]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},xd=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const s=r+JSON.stringify(i);let a=t[s];return a||(a=e(vi(r),o),t[s]=a),a(n)}},mv=e=>(t,n,r)=>e(vi(n),r)(t);class bv{constructor(t={}){this.logger=Xn.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?xd:mv;this.formats={number:r((o,i)=>{const s=new Intl.NumberFormat(o,{...i});return a=>s.format(a)}),currency:r((o,i)=>{const s=new Intl.NumberFormat(o,{...i,style:"currency"});return a=>s.format(a)}),datetime:r((o,i)=>{const s=new Intl.DateTimeFormat(o,{...i});return a=>s.format(a)}),relativetime:r((o,i)=>{const s=new Intl.RelativeTimeFormat(o,{...i});return a=>s.format(a,i.range||"day")}),list:r((o,i)=>{const s=new Intl.ListFormat(o,{...i});return a=>s.format(a)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=xd(n)}format(t,n,r,o={}){if(!n||t==null)return t;const i=n.split(this.formatSeparator),s=[];for(let u=0;u<i.length;u++){let c=i[u];for(;c.indexOf("(")>-1&&!c.includes(")")&&u+1<i.length;)c=`${c}${this.formatSeparator}${i[++u]}`;s.push(c)}return s.reduce((u,c)=>{const{formatName:l,formatOptions:d}=hv(c);if(this.formats[l]){let g=u;try{const h=o?.formatParams?.[o.interpolationkey]||{},p=h.locale||h.lng||o.locale||o.lng||r;g=this.formats[l](u,p,{...d,...o,...h})}catch(h){this.logger.warn(h)}return g}else this.logger.warn(`there was no format function for ${l}`);return u},t)}}const yv=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class vv extends ra{constructor(t,n,r,o={}){super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Xn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,o.backend,o)}queueLoad(t,n,r,o){const i={},s={},a={},u={};return t.forEach(c=>{let l=!0;n.forEach(d=>{const g=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[g]=2:this.state[g]<0||(this.state[g]===1?s[g]===void 0&&(s[g]=!0):(this.state[g]=1,l=!1,s[g]===void 0&&(s[g]=!0),i[g]===void 0&&(i[g]=!0),u[d]===void 0&&(u[d]=!0)))}),l||(a[c]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const o=t.split("|"),i=o[0],s=o[1];n&&this.emit("failedLoading",i,s,n),!n&&r&&this.store.addResourceBundle(i,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(u=>{rv(u.loaded,[i],s),yv(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(c=>{a[c]||(a[c]={});const l=u.loaded[c];l.length&&l.forEach(d=>{a[c][d]===void 0&&(a[c][d]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r,o=0,i=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:s});return}this.readingCalls++;const a=(c,l)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&l&&o<this.maxRetries){setTimeout(()=>{this.read(t,n,r,o+1,i*2,s)},i);return}s(c,l)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const c=u(t,n);c&&typeof c.then=="function"?c.then(l=>a(null,l)).catch(a):a(null,c)}catch(c){a(c)}return}return u(t,n,a)}prepareLoading(t,n,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();$e(t)&&(t=this.languageUtils.toResolveHierarchy(t)),$e(n)&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,o,i,s={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const u={...s,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let l;c.length===5?l=c(t,n,r,o,u):l=c(t,n,r,o),l&&typeof l.then=="function"?l.then(d=>a(null,d)).catch(a):a(null,l)}catch(l){a(l)}else c(t,n,r,o,a,u)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const qa=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),$e(e[1])&&(t.defaultValue=e[1]),$e(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),wd=e=>($e(e.ns)&&(e.ns=[e.ns]),$e(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),$e(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),us=()=>{},xv=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class ui extends ra{constructor(t={},n){if(super(),this.options=wd(t),this.services={},this.logger=Xn,this.modules={external:[]},xv(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&($e(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const r=qa();this.options={...r,...this.options,...wd(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const o=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Xn.init(o(this.modules.logger),this.options):Xn.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=bv;const l=new hd(this.options);this.store=new pd(this.options.resources,this.options);const d=this.services;d.logger=Xn,d.resourceStore=this.store,d.languageUtils=l,d.pluralResolver=new gv(l,{prepend:this.options.pluralSeparator}),c&&(d.formatter=o(c),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new vd(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new vv(o(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(g,...h)=>{this.emit(g,...h)}),this.modules.languageDetector&&(d.languageDetector=o(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=o(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new Ps(this.services,this.options),this.translator.on("*",(g,...h)=>{this.emit(g,...h)}),this.modules.external.forEach(g=>{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,n||(n=us),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...l)=>this.store[c](...l)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...l)=>(this.store[c](...l),this)});const a=Yo(),u=()=>{const c=(l,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(d),n(l,d)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),a}loadResources(t,n=us){let r=n;const o=$e(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&(i.includes(c)||i.push(c))})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>s(u)),this.options.preload?.forEach?.(a=>s(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const o=Yo();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=us),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&th.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!["cimode","dev"].includes(r)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&!this.languages.includes(t)&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=Yo();this.emit("languageChanging",t);const o=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},i=(a,u)=>{u?this.isLanguageChangingTo===t&&(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),n&&n(a,(...c)=>this.t(...c))},s=a=>{!t&&!a&&this.services.languageDetector&&(a=[]);const u=$e(a)?a:a&&a[0],c=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes($e(a)?[a]:a);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector?.cacheUserLanguage?.(c)),this.loadResources(c,l=>{i(l,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),r}getFixedT(t,n,r,o){const i=o?.scopeNs,s=(a,u,...c)=>{let l;typeof u!="object"?l=this.options.overloadTranslationOptionHandler([a,u].concat(c)):l={...u},l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs;const d=l.ns!==void 0&&l.ns!==null;l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||s.keyPrefix);const g={...this.options,...l};Array.isArray(i)&&!d&&(g.ns=i),typeof l.keyPrefix=="function"&&(l.keyPrefix=Lo(l.keyPrefix,g));const h=this.options.keySeparator||".";let p;return l.keyPrefix&&Array.isArray(a)?p=a.map(m=>(typeof m=="function"&&(m=Lo(m,g)),`${l.keyPrefix}${h}${m}`)):(typeof a=="function"&&(a=Lo(a,g)),p=l.keyPrefix?`${l.keyPrefix}${h}${a}`:a),this.t(p,l)};return $e(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,u)=>{const c=this.services.backendConnector.state[`${a}|${u}`];return c===-1||c===0||c===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!o||s(i,t)))}loadNamespaces(t,n){const r=Yo();return this.options.ns?($e(t)&&(t=[t]),t.forEach(o=>{this.options.ns.includes(o)||this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Yo();$e(t)&&(t=[t]);const o=this.options.preload||[],i=t.filter(s=>!o.includes(s)&&this.services.languageUtils.isSupportedCode(s));return i.length?(this.options.preload=o.concat(i),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const o=new Intl.Locale(t);if(o&&o.getTextInfo){const i=o.getTextInfo();if(i&&i.direction)return i.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new hd(qa());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(r.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new ui(t,n);return r.createInstance=ui.createInstance,r}cloneInstance(t={},n=us){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new ui(o);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const a=Object.keys(this.store.data).reduce((u,c)=>(u[c]={...this.store.data[c]},u[c]=Object.keys(u[c]).reduce((l,d)=>(l[d]={...u[c][d]},l),u[c]),u),{});i.store=new pd(a,o),i.services.resourceStore=i.store}if(t.interpolation){const u={...qa().interpolation,...this.options.interpolation,...t.interpolation},c={...o,interpolation:u};i.services.interpolator=new vd(c)}return i.translator=new Ps(i.services,o),i.translator.on("*",(a,...u)=>{i.emit(a,...u)}),i.init(o,n),i.translator.options=o,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const St=ui.createInstance();St.createInstance;St.dir;St.init;St.loadResources;St.reloadResources;St.use;St.changeLanguage;St.getFixedT;St.t;St.exists;St.setDefaultNamespace;St.hasLoadedNamespace;St.loadNamespaces;St.loadLanguages;const{slice:wv,forEach:_v}=[];function Ev(e){return _v.call(wv.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Sv(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const _d=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Cv=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},o=encodeURIComponent(t);let i=`${e}=${o}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!_d.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!_d.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(i+="; Partitioned"),i},Ed={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=Cv(e,t,o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var kv={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return Ed.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&typeof document<"u"&&Ed.create(n,e,r,o,i)}},Av={name:"querystring",lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:r}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const i=r.substring(1).split("&");for(let s=0;s<i.length;s++){const a=i[s].indexOf("=");a>0&&i[s].substring(0,a)===t&&(n=i[s].substring(a+1))}}return n}},Tv={name:"hash",lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const i=o.substring(1);if(t){const s=i.split("&");for(let a=0;a<s.length;a++){const u=s[a].indexOf("=");u>0&&s[a].substring(0,u)===t&&(r=s[a].substring(u+1))}}if(r)return r;if(!r&&n>-1){const s=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?s[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return r}};let _o=null;const Sd=()=>{if(_o!==null)return _o;try{if(_o=typeof window<"u"&&window.localStorage!==null,!_o)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{_o=!1}return _o};var Dv={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Sd())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Sd()&&window.localStorage.setItem(n,e)}};let Eo=null;const Cd=()=>{if(Eo!==null)return Eo;try{if(Eo=typeof window<"u"&&window.sessionStorage!==null,!Eo)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Eo=!1}return Eo};var Iv={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Cd())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Cd()&&window.sessionStorage.setItem(n,e)}},Ov={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let i=0;i<n.length;i++)t.push(n[i]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},Rv={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},Nv={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},Mv={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let rh=!1;try{document.cookie,rh=!0}catch{}const oh=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];rh||oh.splice(1,1);const Lv=()=>({order:oh,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class ih{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Ev(n,this.options||{},Lv()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(kv),this.addDetector(Av),this.addDetector(Dv),this.addDetector(Iv),this.addDetector(Ov),this.addDetector(Rv),this.addDetector(Nv),this.addDetector(Mv),this.addDetector(Tv)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.filter(r=>r!=null&&!Sv(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}ih.type="languageDetector";function Pv(e,t={}){const{fallbackLng:n="zh-CN",persistKey:r}=t,o=St.use(ih).init({resources:e,fallbackLng:n,detection:{order:r?["localStorage","navigator"]:["navigator"],caches:r?["localStorage"]:[],...r?{lookupLocalStorage:r}:{}},interpolation:{escapeValue:!1}}),[i,s]=D(St.language||n),[a,u]=D(St.isInitialized);o.then(()=>{s(St.language||n),u(!0)}),St.on("languageChanged",d=>s(d));const c=(d,g)=>(i(),St.t(d,g));return{i18next:St,initPromise:o,t:c,useTranslation:()=>({t:c,lng:ee(()=>i()),ready:ee(()=>a()),changeLanguage:d=>{St.changeLanguage(d)}})}}const $v={common:{loading:"加载中…",cancel:"取消",delete:"删除",confirmDelete:"确认删除",deleting:"删除中…",submitting:"提交中…",saving:"保存中…",refresh:"刷新",refreshing:"刷新中…",pendingAgent:"(待 Agent 补全)",close:"关闭",remove:"移除",error:"错误"},breadcrumb:{specList:"Spec 列表",newSpec:"新建 spec"},shell:{newSpec:"新建 spec",settingsMenu:"配置",languageSwitch:"切换语言",langZh:"中文",langEn:"English",themeSwitch:"外观",themeModeGroup:"色彩模式",themeSystem:"跟随系统",themeLight:"亮色",themeDark:"暗色",themeNameGroup:"主题",themeTerminal:"终端",themeGraphite:"石墨",themePaper:"纸感",globalConfig:"全局配置",userGuide:"使用指南"},systemNotifications:{title:"系统提示",delete:"删除提示",versionTitle:"发现新版本",versionMessage:"YorZ {{latest}} 已发布,当前版本 {{current}}。",update:"更新",updating:"更新中…",restart:"重启服务",restartTooltip:"重复服务会中断正在运行中的任务,可在 chat 中发送“继续”指令"},welcome:{title:"欢迎使用 YorZ",description:"YorZ 通过本地目录托管 spec 文档;请先添加一个项目目录,然后即可开始管理它的需求。",addHint:"添加项目请在终端执行:"},sidebar:{title:"项目",expand:"展开项目面板",collapse:"折叠项目面板",collapseShort:"折叠",pin:"固定展开项目面板",configure:"配置 {{name}}",projectConfig:"项目配置",removeProject:"移除 {{name}}",deleteProject:"删除项目",deleteDesc:"此操作将从 YorZ 项目列表中移除该项目。",deleteFiles:"同时删除文件目录",uncommittedChanges:"存在未提交 git 的变更",resizeHint:"拖动调整项目面板宽度",addHint:"添加项目请在终端执行:",addCmd:"yorz add <path>"},chat:{title:"Chat",expand:"展开 Chat",collapse:"折叠 Chat",newSession:"新建会话",collapseSessions:"折叠会话列表",expandSessions:"展开会话列表",sessionsLabel:"会话({{count}})",sessionsLabelPlain:"会话",sessionTitle:"{{kind}} · {{id}}",sessionTitleRunning:"{{kind}} · {{id}} · 执行中",sessionDivider:"{{kind}} · {{time}}",empty:"选择或新建一个会话开始对话。",draftEmpty:"Untitled 会话 —— 发送消息即开始。",usageLoading:"正在查询当前模型剩余用量…",usageUnavailable:"{{kind}} 暂不支持查询剩余用量。",usageInstallHint:"{{kind}} 需要安装 opencode-quota 后才能查询剩余用量:{{command}}",usageError:"{{kind}} 剩余用量查询失败。",usageAvailableNoDetails:"{{kind}} 已连接,但未返回可展示的剩余用量明细。",usageSummary:"{{kind}} 用量:{{details}}",usageWindow:"{{label}} 剩余约 {{remaining}}%(已用 {{used}}%,重置:{{reset}})",usageWindowUnknown:"{{label}} 剩余用量未知",usageResetUnknown:"未知",usageSeparator:" · ",inputPlaceholder:"输入消息,/ 触发候选指令,@ 引用文件,Enter 发送…",draftPlaceholder:"输入消息,/ 触发候选指令,@ 引用文件,发送后自动创建会话…",noSessionPlaceholder:"请先选择项目",showHistory:"显示历史",sessionListLimit:"会话显示条数",sessionListRows:"会话列表高度",sessionListRows3:"3行",sessionListRows5:"5行",sessionListRows10:"10行",untitledSession:"未命名会话",noRunningSessions:"未提交的会话",abort:"中止",send:"发送",agentContextCollapsed:"Agent 上下文 ×{{count}}",toolCollapsed:"[工具] ×{{count}}",toolTextExpand:"展开全部 {{count}} 字符",toolTextCollapse:"收起",errorMessage:"[错误] {{message}}",copyFilePath:"复制文件路径",filePathCopied:"已复制文件路径",filePathCopyFailed:"复制文件路径失败",slashCommandYorzDebug:"启动 debug 模式,尝试解决疑难问题",slashCommandYorzSpec:"基于上下文启动 spec 驱动开发",addSlashCommandOption:"新增指令",addSlashCommandOptionDescription:"创建一个自定义斜杠指令",addSlashCommandTitle:"新增指令",editSlashCommandTitle:"编辑指令",slashCommandNoMatch:"没有匹配的指令",deleteSlashCommandTitle:"删除指令",deleteSlashCommandConfirm:"确定删除自定义指令 /{{name}}?此操作不可撤销。",slashCommandScopeProject:"当前项目",slashCommandScopeGlobal:"全局",customSlashCommandScope:"保存位置",customSlashCommandScopeProjectHint:"项目指令仅在当前项目可用,同名指令项目优先,保存后不可切换",customSlashCommandScopeGlobalHint:"全局指令在所有项目可用,保存后不可切换",customSlashCommandName:"名称",customSlashCommandNamePlaceholder:"git-commit",customSlashCommandDescription:"说明",customSlashCommandDescriptionPlaceholder:"提交当前会话相关的变更文件",customSlashCommandHiddenPrompt:"隐藏提示词",customSlashCommandHiddenPromptPlaceholder:"使用 git 提交当前会话相关的变更文件",customSlashCommandHiddenPromptHint:"发送时自动附加给 Agent,不会出现在输入框和聊天记录中",customSlashCommandPrefill:"预输入内容",customSlashCommandPrefillPlaceholder:"选择该指令后回填到输入框的内容",customSlashCommandPrefillHint:"选择该指令后回填到输入框,会自动带上 /指令名 前缀,可继续编辑后再发送",customSlashCommandNameRequired:"请输入指令名称",customSlashCommandNameInvalid:"名称只能包含字母、数字、下划线和连字符",customSlashCommandNoDescription:"自定义指令",editCustomSlashCommand:"编辑 {{name}}",deleteCustomSlashCommand:"删除 {{name}}",saveCustomSlashCommand:"保存"},home:{specList:"Spec 列表",mainProject:"主项目:",merging:"合并中…",mergeToMain:"合入主项目",mergeHint:"提交 worktree 改动并合入主项目",mergeDialogTitle:"合并 worktree",mergeDialogDescription:"合入主项目前,请确认本次合并的提交信息。",mergeCommitMessage:"提交信息",runningTasksPreventMerge:"存在进行中的命令或 Agent 任务,请等待任务结束后再合并",mainUnreachable:"主项目不可达",merged:"已合入主项目,正在跳转…",conflictDispatched:"冲突 spec 已自动派给 Agent 处理,列表会在合并完成后自动刷新",noSpecs:"还没有 spec。",createFirst:"新建第一个 spec",moreActions:"更多操作",copySpecPath:"复制路径",confirmDeleteSpec:"确定删除此 spec?",newSpec:"+ 新建 spec"},newSpec:{title:"新建 spec",description:"只需选择类型与录入需求内容;文件名、概要、初始骨架由 Agent 根据需求生成,Agent 创建完文档后会自动进入 plan 阶段。",type:"类型",typeFeat:"feat",typeFeatHint:"新功能",typeRefct:"refct",typeRefctHint:"重构 / 抽取",typeFix:"fix",typeFixHint:"修复缺陷",parallelWorktree:"新开项目并行",parallelWorktreeDesc:"以 git worktree 形式开新分支并行开发,避免与主项目互相干扰;合并将通过列表页『合入主项目』按钮一键完成。",requirement:"需求内容",requirementPlaceholder:"原始诉求、痛点、期望效果、关联文档/模块(可使用 @ 引用)",attachments:"附件",attachmentsHint:"共 {{count}}/{{max}},单文件 ≤ 5 MB;图片支持 Cmd/Ctrl-V 粘贴",importAttachment:"导入附件",createAndStart:"发送",creating:"Spec 创建中…",descTooShort:"请至少输入 5 个字符的需求描述",attachmentLimit:"附件总数不能超过 {{max}} 个",unsupportedType:"不支持的文件类型:{{name}}",unsupportedMime:"不支持的 MIME:{{mime}}",fileTooLarge:"{{name}} 超过 5 MB 限制",attachmentRoomLimit:"只能再添加 {{room}} 个附件(当前 {{current}}/{{max}})",attachmentFailedCount:"有 {{count}} 个附件上传失败,请先移除或重试",attachmentUploading:"附件仍在上传中,请稍候",uploading:"上传中…",uploadFailed:"失败:{{error}}",clickToRename:"点击重命名",agentRunFailed:"Agent 运行失败",creatingSpec:"(新建 spec 中)",deleteAttachment:"删除 {{name}}"},specDetail:{appendTask:"追加任务",agentLogs:"执行日志",review:"Review",debug:"Debug 文档",running:"运行中…",forceStage:"强制设置 spec 状态",notFound:"spec 不存在或已删除",fullscreen:"全屏(临时折叠项目列表与对话面板)",exitFullscreen:"退出全屏(Esc)",copySpecPath:"复制 spec 文件路径",specPathCopied:"已复制 spec 文件路径",appendSavedSpecBusy:"追加任务已保存;该 spec 有正在执行的会话,未自动派发,请在其结束后手动运行。",specPathCopyFailed:"复制 spec 文件路径失败"},mermaid:{maximize:"最大化图表",viewerLabel:"Mermaid 图表查看器",zoomIn:"放大",zoomOut:"缩小",reset:"重置视图",close:"关闭图表查看器"},specDebug:{empty:"暂无 debug.md 记录"},review:{backToSpec:"返回 spec",heading:"Review · {{id}}",commit:"提交",discard:"丢弃",committing:"提交中…",discarding:"丢弃中…",commitPlaceholder:"commit message…({{shortcut}} 提交)",manualSelect:"手动选择",agentSelect:"Agent 智能判定",selectAll:"全选",deselectAll:"全部取消",fileCount:"{{selected}}/{{total}} 个文件",noChanges:"暂无变更文件",selectAtLeastOne:"请至少选择一个文件",discardTitle:"丢弃变更",confirmDiscardAction:"确认丢弃",confirmDiscard:"确定要丢弃选中的变更吗?此操作不可撤销。",confirmDiscardAll:"确定要丢弃当前 spec 相关的所有未提交变更吗?此操作不可撤销。",enterCommitMsg:"请输入 commit message",dispatched:"已派发:"},git:{title:"Git 状态",branchSelect:"切换分支",branchPlaceholder:"选择分支",branchFilterPlaceholder:"过滤分支…",noBranches:"没有匹配的分支",mergeBranch:"合并分支",mergeBranchPlaceholder:"选择要合并的分支",mergeFilterPlaceholder:"过滤本地 / 远程分支…",mergeAction:"合并",merging:"合并中…",merged:"已将 {{branch}} 合并到 {{current}}",mergeUpToDate:"{{current}} 已包含 {{branch}},无需合并",mergeSelfHint:"当前分支不能合并到自身",push:"推送",pushing:"推送中…",pushed:"已推送到远端({{branch}})",pull:"拉取",pulling:"拉取中…",pulled:"已拉取最新提交({{branch}})",upToDate:"已是最新,无需拉取",binaryFile:"二进制文件,无法展示差异",diffTruncated:"差异过大,已截断展示",diffEmpty:"该文件暂无可展示的差异",diffLoading:"差异加载中…"},agentLogs:{backToSpec:"← 返回 spec",title:"执行日志 · {{id}}",listTitle:"Agent 执行日志({{count}})",empty:"暂无 Agent 执行日志",truncated:"已截断显示末尾 256KB",emptyLog:"日志为空",success:"成功",notFinished:"未收尾",failed:"失败 ({{code}})"},agentDock:{title:"Agent 任务",panelLabel:"Agent 任务面板",clearFinished:"清理已完成",progressLabel:"进行中 {{running}} / 已完成 {{done}} / 失败 {{failed}}",waitingOutput:"(等待输出…)",creatingNew:"(新建中)",sourceRun:"执行 spec",sourceExplain:"解释",sourceDraft:"新建 spec",statusPending:"等待…",statusStreaming:"运行中",statusDone:"已完成",statusFailed:"失败"},selectionMenu:{annotate:"批注",explain:"解释"},annotate:{title:"批注",placeholder:"写下你对这段文本的批注…",submit:"添加批注",inSection:"中"},questionConfirm:{title:"待确认项",unanswered:"未确认",submitAll:"发送",running:"运行中…",noAnswers:"没有可提交的答复",selectionAnnotation:"选区批注",notePlaceholder:"写下你的答复…",recommended:"(推荐)",freeformLabel:"其他(自由批注)",quoteConnector:"中",confirmPlanLabel:"方案",confirmImpactLabel:"影响",decisionAccept:"确认,按此推进",decisionReject:"否决",intentAlternative:"换方案(原目标下另寻实现)",intentConstraint:"补约束(我来补充你漏掉的信息)",intentDropGoal:"弃目标(影响太大,不做)",dropGoalCurrent:"废弃当前目标,继续其余",dropGoalSpec:"放弃整个 spec",reasonPlaceholder:"请说明否决理由或约束(必填)…",reasonRequired:"否决时必须填写理由"},appendTask:{title:"追加任务",hint:"提交后将自动重开 plan 阶段,Agent 会续跑处理新增项",type:"类型",kindFeat:"feat 新增/扩展需求",kindRefct:"refct 重构/重写/抽取",kindFix:"fix 修复缺陷",description:"描述",descPlaceholder:"详细描述新增需求 / 重构意图 / 缺陷复现…",descRequired:"描述不能为空",submit:"发送",refSection:"引用章节:"},projectConfig:{title:"项目配置",inheritGlobal:"继承全局默认",agentClaude:"ClaudeCode",agentOpencode:"OpenCode",agentCodex:"Codex",agent:"Agent",specsDir:"spec 文档目录",specsDirHint:"相对项目根路径,不存在时会自动创建",invalidPath:'spec 目录不能包含 ".." 段',saved:"配置已保存",oldSpecsHint:"。旧 spec 仍在原目录,请手工迁移",save:"保存"},globalConfig:{title:"全局配置",agentDefault:"默认 Agent",sessionEnd:"会话结束提示",banner:"横幅提示",sound:"声音提示",powerTitle:"任务运行期间防休眠",powerSystemDefault:"系统默认",powerPreventDisplaySleep:"禁止息屏",powerKeepSystemAwake:"禁止休眠",shortcutsTitle:"快捷键",shortcutRecord:"录制",shortcutRecording:"按下新的组合键…",shortcutRecordingButton:"录制中",shortcutReset:"重置",shortcutConflict:"快捷键不能重复绑定",saveStatusSaving:"保存中...",saveStatusSaved:"已保存",shortcuts:{newSpec:"新建 spec",toggleSpecDetailFullscreen:"页面最大化",projectSettings:"项目设置"}},commands:{menuTitle:"命令",empty:"还没有配置命令",add:"添加命令",addTitle:"添加命令",name:"名称",namePlaceholder:"例如:dev",cli:"命令行",cliPlaceholder:"例如:pnpm dev",submit:"添加",deleteDef:"删除命令",started:"命令已启动",running:"运行中的命令",status:{running:"运行中",exited:"已退出",killed:"已终止",failed:"启动失败"},clearTitle:"终止并清空该条记录?",clearDescription:"将终止正在运行的进程,并删除该条执行记录与日志文件。",clear:"终止并清空",restart:"重启",restarted:"命令已重启",stop:"终止",stopping:"终止中…",stopped:"命令已终止",detailTitle:"命令执行详情",logFile:"日志文件",exitCode:"退出码",startedAt:"开始时间",duration:"运行时长",outputEmpty:"暂无输出",outputTruncated:"日志过长,仅显示尾部内容",notFound:"执行记录不存在或已被清空",back:"返回列表"},errors:{serverDisconnected:"Server 失联,任务可能已终止",serverRestarted:"Server 已重启,原任务未恢复"},selection:{noSection:"(无章节)"}},Fv={common:{loading:"Loading…",cancel:"Cancel",delete:"Delete",confirmDelete:"Confirm Delete",deleting:"Deleting…",submitting:"Submitting…",saving:"Saving…",refresh:"Refresh",refreshing:"Refreshing…",pendingAgent:"(Pending Agent)",close:"Close",remove:"Remove",error:"Error"},breadcrumb:{specList:"Spec List",newSpec:"New Spec"},shell:{newSpec:"New Spec",settingsMenu:"Settings",languageSwitch:"Switch Language",langZh:"中文",langEn:"English",themeSwitch:"Appearance",themeModeGroup:"Color Mode",themeSystem:"System",themeLight:"Light",themeDark:"Dark",themeNameGroup:"Theme",themeTerminal:"Terminal",themeGraphite:"Graphite",themePaper:"Paper",globalConfig:"Global Settings",userGuide:"User Guide"},systemNotifications:{title:"System Notifications",delete:"Delete notification",versionTitle:"New Version Available",versionMessage:"YorZ {{latest}} is available. Current version: {{current}}.",update:"Update",updating:"Updating…",restart:"Restart Service",restartTooltip:'Restarting the service will interrupt running tasks. You can send "continue" in chat.'},welcome:{title:"Welcome to YorZ",description:"YorZ hosts spec documents in local directories. Add a project directory first, then start managing its requirements.",addHint:"To add a project, run in terminal:"},sidebar:{title:"Projects",expand:"Expand project panel",collapse:"Collapse project panel",collapseShort:"Collapse",pin:"Keep project panel open",configure:"Configure {{name}}",projectConfig:"Project Config",removeProject:"Remove {{name}}",deleteProject:"Delete Project",deleteDesc:"This will remove the project from the YorZ project list.",deleteFiles:"Also delete file directory",uncommittedChanges:"Uncommitted git changes",resizeHint:"Drag to resize project panel width",addHint:"To add a project, run in terminal:",addCmd:"yorz add <path>"},chat:{title:"Chat",expand:"Expand Chat",collapse:"Collapse Chat",newSession:"New Session",collapseSessions:"Collapse session list",expandSessions:"Expand session list",sessionsLabel:"Sessions ({{count}})",sessionsLabelPlain:"Sessions",sessionTitle:"{{kind}} · {{id}}",sessionTitleRunning:"{{kind}} · {{id}} · Running",sessionDivider:"{{kind}} · {{time}}",empty:"Select or create a session to start chatting.",draftEmpty:"Untitled session — send a message to start.",usageLoading:"Checking current model usage…",usageUnavailable:"{{kind}} does not support remaining usage queries yet.",usageInstallHint:"{{kind}} requires opencode-quota before remaining usage can be queried: {{command}}",usageError:"Failed to query {{kind}} remaining usage.",usageAvailableNoDetails:"{{kind}} is connected, but returned no displayable usage details.",usageSummary:"{{kind}} usage: {{details}}",usageWindow:"{{label}} about {{remaining}}% remaining ({{used}}% used, resets: {{reset}})",usageWindowUnknown:"{{label}} remaining usage unknown",usageResetUnknown:"unknown",usageSeparator:" · ",inputPlaceholder:"Type a message, / for commands, @ to reference files, Enter to send…",draftPlaceholder:"Type a message, / for commands, @ to reference files — a session starts on send…",noSessionPlaceholder:"Select a project first",showHistory:"History",sessionListLimit:"Session list count",sessionListRows:"Session list height",sessionListRows3:"3 rows",sessionListRows5:"5 rows",sessionListRows10:"10 rows",untitledSession:"Untitled session",noRunningSessions:"Uncommitted sessions",abort:"Abort",send:"Send",agentContextCollapsed:"Agent context ×{{count}}",toolCollapsed:"[Tool] ×{{count}}",toolTextExpand:"Show all {{count}} chars",toolTextCollapse:"Collapse",errorMessage:"[Error] {{message}}",copyFilePath:"Copy file path",filePathCopied:"File path copied",filePathCopyFailed:"Failed to copy file path",slashCommandYorzDebug:"Start debug mode to troubleshoot difficult issues",slashCommandYorzSpec:"Start spec-driven development from the current context",addSlashCommandOption:"Add Command",addSlashCommandOptionDescription:"Create a custom slash command",addSlashCommandTitle:"Add Command",editSlashCommandTitle:"Edit Command",slashCommandNoMatch:"No matching command",deleteSlashCommandTitle:"Delete command",deleteSlashCommandConfirm:"Delete the custom command /{{name}}? This cannot be undone.",slashCommandScopeProject:"This project",slashCommandScopeGlobal:"Global",customSlashCommandScope:"Saved in",customSlashCommandScopeProjectHint:"Available only in this project, shadows a global command of the same name, and cannot be moved after saving",customSlashCommandScopeGlobalHint:"Available in every project, and cannot be moved after saving",customSlashCommandName:"Name",customSlashCommandNamePlaceholder:"git-commit",customSlashCommandDescription:"Description",customSlashCommandDescriptionPlaceholder:"Commit files related to the current session",customSlashCommandHiddenPrompt:"Hidden Prompt",customSlashCommandHiddenPromptPlaceholder:"Use git to commit files related to this session",customSlashCommandHiddenPromptHint:"Sent to the Agent automatically; never shown in the composer or the chat log",customSlashCommandPrefill:"Prefill Content",customSlashCommandPrefillPlaceholder:"Content inserted into the input when selected",customSlashCommandPrefillHint:"Inserted into the composer on select, prefixed with /command-name; you can edit before sending",customSlashCommandNameRequired:"Enter a command name",customSlashCommandNameInvalid:"Use only letters, numbers, underscores, and hyphens",customSlashCommandNoDescription:"Custom command",editCustomSlashCommand:"Edit {{name}}",deleteCustomSlashCommand:"Delete {{name}}",saveCustomSlashCommand:"Save"},home:{specList:"Specs",mainProject:"Main project: ",merging:"Merging…",mergeToMain:"Merge to Main",mergeHint:"Commit worktree changes and merge into main project",mergeDialogTitle:"Merge worktree",mergeDialogDescription:"Review the merge commit message before merging into the main project.",mergeCommitMessage:"Commit message",runningTasksPreventMerge:"Wait for running commands or Agent tasks to finish before merging",mainUnreachable:"Main project unreachable",merged:"Merged into main, redirecting…",conflictDispatched:"Conflict specs dispatched to Agent, list will refresh after merge",noSpecs:"No specs yet.",createFirst:"Create first spec",moreActions:"More actions",copySpecPath:"Copy path",confirmDeleteSpec:"Delete this spec?",newSpec:"+ New Spec"},newSpec:{title:"New Spec",description:"Just pick a type and enter your requirements. Filename, summary, and initial skeleton are generated by Agent based on your input. After document creation, it enters the plan stage automatically.",type:"Type",typeFeat:"feat",typeFeatHint:"New feature",typeRefct:"refct",typeRefctHint:"Refactor / Extract",typeFix:"fix",typeFixHint:"Bug fix",parallelWorktree:"Parallel worktree",parallelWorktreeDesc:'Create a new branch via git worktree for parallel development. Merge via the "Merge to Main" button on the list page.',requirement:"Requirement",requirementPlaceholder:"Raw needs, pain points, expected outcomes, related docs/modules (use @ to reference)",attachments:"Attachments",attachmentsHint:"{{count}}/{{max}}, max 5 MB per file; images support Cmd/Ctrl-V paste",importAttachment:"Import",createAndStart:"Send",creating:"Creating spec…",descTooShort:"Please enter at least 5 characters",attachmentLimit:"Cannot exceed {{max}} attachments",unsupportedType:"Unsupported file type: {{name}}",unsupportedMime:"Unsupported MIME: {{mime}}",fileTooLarge:"{{name}} exceeds 5 MB limit",attachmentRoomLimit:"Can only add {{room}} more ({{current}}/{{max}})",attachmentFailedCount:"{{count}} attachment(s) failed to upload, please remove or retry",attachmentUploading:"Attachments still uploading, please wait",uploading:"Uploading…",uploadFailed:"Failed: {{error}}",clickToRename:"Click to rename",agentRunFailed:"Agent run failed",creatingSpec:"(Creating spec…)",deleteAttachment:"Delete {{name}}"},specDetail:{appendTask:"Append Task",agentLogs:"Agent Logs",review:"Review",debug:"Debug document",running:"Running…",forceStage:"Force set spec stage",notFound:"Spec not found or deleted",fullscreen:"Fullscreen (temporarily collapse projects & chat)",exitFullscreen:"Exit fullscreen (Esc)",copySpecPath:"Copy spec file path",specPathCopied:"Spec file path copied",appendSavedSpecBusy:"Append saved. This spec already has a running session, so no round was dispatched — run it manually once that finishes.",specPathCopyFailed:"Failed to copy spec file path"},mermaid:{maximize:"Maximize diagram",viewerLabel:"Mermaid diagram viewer",zoomIn:"Zoom in",zoomOut:"Zoom out",reset:"Reset view",close:"Close diagram viewer"},specDebug:{empty:"No debug.md records yet"},review:{backToSpec:"Back to spec",heading:"Review · {{id}}",commit:"Commit",discard:"Discard",committing:"Committing…",discarding:"Discarding…",commitPlaceholder:"commit message… ({{shortcut}} to commit)",manualSelect:"Manual select",agentSelect:"Agent smart select",selectAll:"Select all",deselectAll:"Deselect all",fileCount:"{{selected}}/{{total}} files",noChanges:"No changed files",selectAtLeastOne:"Please select at least one file",discardTitle:"Discard changes",confirmDiscardAction:"Confirm Discard",confirmDiscard:"Discard selected changes? This cannot be undone.",confirmDiscardAll:"Discard all uncommitted changes for this spec? This cannot be undone.",enterCommitMsg:"Please enter commit message",dispatched:"Dispatched: "},git:{title:"Git status",branchSelect:"Switch branch",branchPlaceholder:"Select branch",branchFilterPlaceholder:"Filter branches…",noBranches:"No matching branches",mergeBranch:"Merge branch",mergeBranchPlaceholder:"Pick a branch to merge",mergeFilterPlaceholder:"Filter local / remote branches…",mergeAction:"Merge",merging:"Merging…",merged:"Merged {{branch}} into {{current}}",mergeUpToDate:"{{current}} already contains {{branch}}",mergeSelfHint:"The current branch cannot be merged into itself",push:"Push",pushing:"Pushing…",pushed:"Pushed to remote ({{branch}})",pull:"Pull",pulling:"Pulling…",pulled:"Pulled latest commits ({{branch}})",upToDate:"Already up to date",binaryFile:"Binary file — diff not shown",diffTruncated:"Diff too large, truncated",diffEmpty:"No diff to show for this file",diffLoading:"Loading diff…"},agentLogs:{backToSpec:"← Back to spec",title:"Agent Logs · {{id}}",listTitle:"Agent Execution Logs ({{count}})",empty:"No agent execution logs",truncated:"Showing last 256KB (truncated)",emptyLog:"Log is empty",success:"Success",notFinished:"Not finished",failed:"Failed ({{code}})"},agentDock:{title:"Agent Tasks",panelLabel:"Agent task panel",clearFinished:"Clear finished",progressLabel:"Running {{running}} / Done {{done}} / Failed {{failed}}",waitingOutput:"(Waiting for output…)",creatingNew:"(Creating…)",sourceRun:"Run spec",sourceExplain:"Explain",sourceDraft:"New spec",statusPending:"Pending…",statusStreaming:"Running",statusDone:"Done",statusFailed:"Failed"},selectionMenu:{annotate:"Annotate",explain:"Explain"},annotate:{title:"Annotation",placeholder:"Write your annotation for this text…",submit:"Add Annotation",inSection:"in"},questionConfirm:{title:"Pending Items",unanswered:"Unconfirmed",submitAll:"Send",running:"Running…",noAnswers:"No answers to submit",selectionAnnotation:"Selection Annotation",notePlaceholder:"Write your answer…",recommended:"(Recommended)",freeformLabel:"Other (free-form annotation)",quoteConnector:"in",confirmPlanLabel:"Plan",confirmImpactLabel:"Impact",decisionAccept:"Confirm & proceed",decisionReject:"Reject",intentAlternative:"Find alternative (same goal, different approach)",intentConstraint:"Add constraint (info you missed)",intentDropGoal:"Drop goal (impact too large)",dropGoalCurrent:"Drop this goal, keep the rest",dropGoalSpec:"Abandon the whole spec",reasonPlaceholder:"Explain your reason or constraint (required)…",reasonRequired:"A reason is required to reject"},appendTask:{title:"Append Task",hint:"After submission, plan stage will reopen automatically. Agent will process new items.",type:"Type",kindFeat:"feat new/extended requirement",kindRefct:"refct refactor/rewrite/extract",kindFix:"fix bug fix",description:"Description",descPlaceholder:"Describe new requirement / refactor intent / bug reproduction…",descRequired:"Description cannot be empty",submit:"Send",refSection:"Reference section: "},projectConfig:{title:"Project Config",inheritGlobal:"Use global default",agentClaude:"ClaudeCode",agentOpencode:"OpenCode",agentCodex:"Codex",agent:"Agent",specsDir:"Spec directory",specsDirHint:"Relative to project root, auto-created if missing",invalidPath:'Spec directory cannot contain ".."',saved:"Configuration saved",oldSpecsHint:". Old specs remain in original directory, please migrate manually",save:"Save"},globalConfig:{title:"Global Settings",agentDefault:"Default Agent",sessionEnd:"Session end alerts",banner:"Banner alert",sound:"Sound alert",powerTitle:"Prevent sleep while tasks run",powerSystemDefault:"System default",powerPreventDisplaySleep:"Prevent display sleep",powerKeepSystemAwake:"Prevent sleep",shortcutsTitle:"Shortcuts",shortcutRecord:"Record",shortcutRecording:"Press a new shortcut…",shortcutRecordingButton:"Recording",shortcutReset:"Reset",shortcutConflict:"Shortcut bindings must be unique",saveStatusSaving:"Saving...",saveStatusSaved:"Saved",shortcuts:{newSpec:"New Spec",toggleSpecDetailFullscreen:"Page fullscreen",projectSettings:"Project Settings"}},commands:{menuTitle:"Commands",empty:"No commands configured yet",add:"Add command",addTitle:"Add command",name:"Name",namePlaceholder:"e.g. dev",cli:"Command line",cliPlaceholder:"e.g. pnpm dev",submit:"Add",deleteDef:"Delete command",started:"Command started",running:"Running commands",status:{running:"Running",exited:"Exited",killed:"Killed",failed:"Failed to start"},clearTitle:"Stop and clear this record?",clearDescription:"Terminates the running process and deletes this run record and its log file.",clear:"Stop and clear",restart:"Restart",restarted:"Command restarted",stop:"Stop",stopping:"Stopping...",stopped:"Command stopped",detailTitle:"Command run",logFile:"Log file",exitCode:"Exit code",startedAt:"Started at",duration:"Duration",outputEmpty:"No output yet",outputTruncated:"Log is large; showing the tail only",notFound:"This run record does not exist or has been cleared",back:"Back to list"},errors:{serverDisconnected:"Server disconnected, task may have terminated",serverRestarted:"Server restarted, previous task not recovered"},selection:{noSection:"(no section)"}},Wc=Pv({"zh-CN":{translation:$v},en:{translation:Fv}}),{i18next:kd}=Wc,Bv=["system","light","dark"],zv=["terminal","graphite","paper"],sh="(prefers-color-scheme: dark)",ah="yorz.appearanceHint";function Uv(e){return Bv.includes(e)}function Kv(e){return zv.includes(e)}function jv(){if(typeof window>"u")return null;try{const e=window.localStorage.getItem(ah);if(!e)return null;const t=JSON.parse(e);if(!t||typeof t!="object")return null;const{mode:n,name:r}=t;return!Uv(n)||!Kv(r)?null:{mode:n,name:r}}catch{return null}}function uh(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(ah,JSON.stringify({mode:e,name:t}))}catch{}}function ch(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia(sh).matches?"dark":"light"}function lh(e,t){return e==="light"||e==="dark"?e:t?"dark":"light"}const Yc=jv(),[$s,Hv]=D(Yc?.mode??"system"),[Fs,dh]=D(Yc?.name??"paper"),[qv,Gv]=D(lh(Yc?.mode??"system",ch()==="dark"));let fh=!1;function Vv(e,t){typeof document>"u"||(document.documentElement.setAttribute("data-kb-theme",e),document.documentElement.setAttribute("data-kb-theme-name",t),document.documentElement.style.colorScheme=e)}function Bs(e,t){const n=lh(e,ch()==="dark");Gv(n),Vv(n,t),fh&&uh(e,t)}function gh(e){Hv(e),Bs(e,Fs())}function Wv(e){dh(e),Bs($s(),e)}function Yv(e,t){dh(t),gh(e)}let Ad=!1;function Zv(e={}){Ad||(Ad=!0,fh=e.persistHint??!1,Bs($s(),Fs()),!(typeof window>"u"||!window.matchMedia)&&window.matchMedia(sh).addEventListener("change",()=>{$s()==="system"&&Bs("system",Fs())}))}/**
2
- * @license lucide-solid v1.24.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */var Xv={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},So=Xv,Jv=it({size:24,color:"currentColor",strokeWidth:2,absoluteStrokeWidth:!1,class:""}),Qv=M("<svg>"),ex=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},tx=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),nx=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Td=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rx=e=>{const t=nx(e);return t.charAt(0).toUpperCase()+t.slice(1)},ox=e=>{const[t,n]=se(e,["color","size","strokeWidth","children","class","name","iconNode","absoluteStrokeWidth"]),r=nt(Jv);return(()=>{var o=Qv();return rr(o,H(So,{get width(){return t.size??r.size??So.width},get height(){return t.size??r.size??So.height},get stroke(){return t.color??r.color??So.stroke},get"stroke-width"(){return J(()=>(t.absoluteStrokeWidth??r.absoluteStrokeWidth)===!0)()?Number(t.strokeWidth??r.strokeWidth??So["stroke-width"])*24/Number(t.size??r.size):Number(t.strokeWidth??r.strokeWidth??So["stroke-width"])},get class(){return tx("lucide","lucide-icon",r.class,...t.name!=null?[`lucide-${Td(rx(t.name))}`,`lucide-${Td(t.name)}`]:[],t.class)},get"aria-hidden"(){return!t.children&&!ex(n)?"true":void 0}},n),!0,!0),w(o,f(rt,{get each(){return t.iconNode},children:([i,s])=>f(zp,H({component:i},s))})),o})()},We=ox,ix=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],sx=e=>f(We,H(e,{iconNode:ix,name:"arrow-left"})),ax=sx,ux=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],cx=e=>f(We,H(e,{iconNode:ux,name:"bell"})),lx=cx,dx=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],fx=e=>f(We,H(e,{iconNode:dx,name:"book-open"})),gx=fx,px=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],hx=e=>f(We,H(e,{iconNode:px,name:"check"})),cs=hx,mx=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],bx=e=>f(We,H(e,{iconNode:mx,name:"chevron-down"})),Zc=bx,yx=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],vx=e=>f(We,H(e,{iconNode:yx,name:"chevron-right"})),ph=vx,xx=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],wx=e=>f(We,H(e,{iconNode:xx,name:"chevrons-left"})),hh=wx,_x=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],Ex=e=>f(We,H(e,{iconNode:_x,name:"chevrons-right"})),yc=Ex,Sx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Cx=e=>f(We,H(e,{iconNode:Sx,name:"circle-check"})),kx=Cx,Ax=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Tx=e=>f(We,H(e,{iconNode:Ax,name:"circle-question-mark"})),Dx=Tx,Ix=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Ox=e=>f(We,H(e,{iconNode:Ix,name:"copy"})),Rx=Ox,Nx=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Mx=e=>f(We,H(e,{iconNode:Nx,name:"ellipsis"})),Lx=Mx,Px=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],$x=e=>f(We,H(e,{iconNode:Px,name:"git-branch"})),Xc=$x,Fx=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Bx=e=>f(We,H(e,{iconNode:Fx,name:"git-merge"})),mh=Bx,zx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Ux=e=>f(We,H(e,{iconNode:zx,name:"info"})),Kx=Ux,jx=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],Hx=e=>f(We,H(e,{iconNode:jx,name:"languages"})),qx=Hx,Gx=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Vx=e=>f(We,H(e,{iconNode:Gx,name:"loader-circle"})),kn=Vx,Wx=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],Yx=e=>f(We,H(e,{iconNode:Wx,name:"maximize-2"})),Zx=Yx,Xx=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Jx=e=>f(We,H(e,{iconNode:Xx,name:"menu"})),Qx=Jx,ew=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],tw=e=>f(We,H(e,{iconNode:ew,name:"minimize-2"})),nw=tw,rw=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],ow=e=>f(We,H(e,{iconNode:rw,name:"monitor"})),iw=ow,sw=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],aw=e=>f(We,H(e,{iconNode:sw,name:"moon"})),uw=aw,cw=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],lw=e=>f(We,H(e,{iconNode:cw,name:"palette"})),dw=lw,fw=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],gw=e=>f(We,H(e,{iconNode:fw,name:"paperclip"})),pw=gw,hw=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],mw=e=>f(We,H(e,{iconNode:hw,name:"pencil"})),bh=mw,bw=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],yw=e=>f(We,H(e,{iconNode:bw,name:"plus"})),Pi=yw,vw=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],xw=e=>f(We,H(e,{iconNode:vw,name:"rotate-ccw"})),ww=xw,_w=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Ew=e=>f(We,H(e,{iconNode:_w,name:"rotate-cw"})),Sw=Ew,Cw=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],kw=e=>f(We,H(e,{iconNode:Cw,name:"send"})),oa=kw,Aw=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Tw=e=>f(We,H(e,{iconNode:Aw,name:"settings"})),Dw=Tw,Iw=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Ow=e=>f(We,H(e,{iconNode:Iw,name:"square"})),yh=Ow,Rw=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Nw=e=>f(We,H(e,{iconNode:Rw,name:"sun"})),Mw=Nw,Lw=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Pw=e=>f(We,H(e,{iconNode:Lw,name:"terminal"})),$w=Pw,Fw=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Bw=e=>f(We,H(e,{iconNode:Fw,name:"trash-2"})),Jc=Bw,zw=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Uw=e=>f(We,H(e,{iconNode:zw,name:"triangle-alert"})),Kw=Uw,jw=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Hw=e=>f(We,H(e,{iconNode:jw,name:"upload"})),qw=Hw,Gw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Vw=e=>f(We,H(e,{iconNode:Gw,name:"x"})),Gr=Vw;function ze(e){return`/api/projects/${encodeURIComponent(e)}`}async function vc(e){const t=await e.text();if(!t)return"";try{return JSON.parse(t).error??t}catch{return t}}async function Ie(e,t){const n=await fetch(e,t);if(!n.ok){const r=await vc(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}const me={listSpecs:e=>Ie(`${ze(e)}/specs`),getSpec:(e,t)=>Ie(`${ze(e)}/specs/${encodeURIComponent(t)}`),deleteSpec:(e,t)=>Ie(`${ze(e)}/specs/${encodeURIComponent(t)}`,{method:"DELETE"}),setStage:(e,t,n)=>Ie(`${ze(e)}/specs/${encodeURIComponent(t)}/stage`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({stage:n})}),createSpec:(e,t)=>fetch(`${ze(e)}/specs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}).then(async n=>{if(!n.ok){const r=await vc(n);throw new Error(`${n.status} ${r||n.statusText}`)}return n.json()}),appendAnnotation:(e,t,n)=>Ie(`${ze(e)}/specs/${encodeURIComponent(t)}/inputs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:"annotate",...n})}),submitQuestionAnswers:(e,t,n)=>Ie(`${ze(e)}/specs/${encodeURIComponent(t)}/questions/answers`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),runAgent:(e,t)=>Ie(`${ze(e)}/specs/${encodeURIComponent(t)}/run`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),appendItem:(e,t,n)=>Ie(`${ze(e)}/specs/${encodeURIComponent(t)}/appends`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}),explain:(e,t,n)=>Ie(`${ze(e)}/specs/${encodeURIComponent(t)}/explain`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:n})}),gitOp:(e,t,n)=>Ie(`${ze(e)}/specs/${encodeURIComponent(t)}/git`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:n})}),getProjectChanges:e=>Ie(`${ze(e)}/git/changes`),getFileDiff:(e,t)=>Ie(`${ze(e)}/git/diff?path=${encodeURIComponent(t)}`),getGitBranches:e=>Ie(`${ze(e)}/git/branches`),checkoutGitBranch:(e,t)=>Ie(`${ze(e)}/git/checkout`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({branch:t})}),mergeGitBranch:(e,t)=>Ie(`${ze(e)}/git/merge`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({branch:t})}),projectCommit:(e,t)=>Ie(`${ze(e)}/git/commit`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),projectDiscard:(e,t)=>Ie(`${ze(e)}/git/discard`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),projectPush:e=>Ie(`${ze(e)}/git/push`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),projectPull:e=>Ie(`${ze(e)}/git/pull`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),getDebug:(e,t)=>Ie(`${ze(e)}/specs/${encodeURIComponent(t)}/debug`),listProjects:()=>Ie("/api/projects"),listSystemNotifications:()=>Ie("/api/system-notifications"),deleteSystemNotification:e=>Ie(`/api/system-notifications/${encodeURIComponent(e)}`,{method:"DELETE"}),updateSystemNotification:e=>Ie(`/api/system-notifications/${encodeURIComponent(e)}/update`,{method:"POST"}),restartSystemNotification:e=>Ie(`/api/system-notifications/${encodeURIComponent(e)}/restart`,{method:"POST"}),removeProject:e=>Ie(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE"}),removeProjectWithFiles:e=>Ie(`/api/projects/${encodeURIComponent(e)}?deleteFiles=true`,{method:"DELETE"}),createWorktree:(e,t)=>Ie(`/api/projects/${encodeURIComponent(e)}/worktrees`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),mergeWorktreeToMain:(e,t)=>Ie(`/api/projects/${encodeURIComponent(e)}/merge-main`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getProjectConfig:e=>Ie(`/api/projects/${encodeURIComponent(e)}/config`),updateProjectConfig:(e,t)=>Ie(`/api/projects/${encodeURIComponent(e)}/config`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getProjectCustomInstructions:e=>Ie(`/api/projects/${encodeURIComponent(e)}/custom-instructions`),updateProjectCustomInstructions:(e,t)=>Ie(`/api/projects/${encodeURIComponent(e)}/custom-instructions`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({customInstructions:t})}),getGlobalConfig:()=>Ie("/api/global-config"),updateGlobalConfig:e=>Ie("/api/global-config",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(e)}),createDraft:e=>Ie(`${ze(e)}/spec-drafts`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"}),uploadAttachment:async(e,t,n)=>{const r=new FormData;r.append("file",n,n.name);const o=await fetch(`${ze(e)}/spec-drafts/${encodeURIComponent(t)}/attachments`,{method:"POST",body:r});if(!o.ok){const i=await vc(o);throw new Error(`${o.status} ${i||o.statusText}`)}return o.json()},deleteAttachment:(e,t,n)=>Ie(`${ze(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"DELETE"}),renameAttachment:(e,t,n,r)=>Ie(`${ze(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({name:r})}),draftAttachmentUrl:(e,t,n)=>`${ze(e)}/spec-drafts/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,specAttachmentUrl:(e,t,n)=>`${ze(e)}/specs/${encodeURIComponent(t)}/attachments/${encodeURIComponent(n)}`,listFiles:(e,t,n=50)=>Ie(`${ze(e)}/files?query=${encodeURIComponent(t)}&limit=${n}`),listSessions:e=>Ie(`${ze(e)}/sessions`),getAgentUsageStatus:e=>Ie(`${ze(e)}/agent-usage`),createSession:(e,t={})=>Ie(`${ze(e)}/sessions`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),getSessionMessages:(e,t)=>Ie(`${ze(e)}/sessions/${encodeURIComponent(t)}/messages`),getSpecMessages:(e,t)=>Ie(`${ze(e)}/specs/${encodeURIComponent(t)}/messages`),sendSessionMessage:(e,t,n,r)=>Ie(`${ze(e)}/sessions/${encodeURIComponent(t)}/messages`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r?{prompt:n,draftId:r}:{prompt:n})}),abortSession:(e,t)=>Ie(`${ze(e)}/sessions/${encodeURIComponent(t)}/abort`,{method:"POST"}),getSpecSession:(e,t)=>Ie(`${ze(e)}/specs/${encodeURIComponent(t)}/session`),listCommands:e=>Ie(`${ze(e)}/commands`),createCommand:(e,t)=>Ie(`${ze(e)}/commands`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),deleteCommand:(e,t)=>Ie(`${ze(e)}/commands/${encodeURIComponent(t)}`,{method:"DELETE"}),listCommandRuns:e=>Ie(`${ze(e)}/command-runs`),getCommandRun:(e,t)=>Ie(`${ze(e)}/command-runs/${encodeURIComponent(t)}`),runCommand:(e,t)=>Ie(`${ze(e)}/command-runs`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({commandId:t})}),readCommandOutput:(e,t,n)=>Ie(`${ze(e)}/command-runs/${encodeURIComponent(t)}/output${n===void 0?"":`?offset=${n}`}`),stopCommandRun:(e,t)=>Ie(`${ze(e)}/command-runs/${encodeURIComponent(t)}/stop`,{method:"POST"}),clearCommandRun:(e,t)=>Ie(`${ze(e)}/command-runs/${encodeURIComponent(t)}`,{method:"DELETE"})},[Ww,vh]=D("");function Ro(e){e&&vh(e)}function Yw(){vh("")}const[ht,Zw]=D(Xw());function Xw(){if(typeof window>"u")return"";const e=window.location.pathname.match(/^\/([^/]+)/);return e&&e[1]!=="api"?e[1]:""}function po(){const e=Li();return()=>e.projectId??ht()}function Mt(e="",t){const n=ht();if(!n)return e.startsWith("/")?e:`/${e}`;const r=e.startsWith("/")?e:e?`/${e}`:"";return`/${n}${r}`}const[Jw,Qw]=D(0),[e_,Dd]=D(null);let Id=0;function t_(){Qw(e=>e+1)}function n_(e){const t=++Id;Dd(()=>e),oe(()=>{Id===t&&Dd(null)})}const[wr,Qc]=D(!1);function xh(){Qc(e=>!e)}function zs(){Qc(!1)}let xc=0,Ga=!1;function r_(){xc-=1,!Ga&&(Ga=!0,queueMicrotask(()=>{Ga=!1,xc<=0&&Qc(!1)}))}function $i(e){xc+=1,oe(r_),n_(xh),te(()=>{if(!wr())return;const t=n=>{n.key!=="Escape"||e?.()||zs()};window.addEventListener("keydown",t),oe(()=>window.removeEventListener("keydown",t))})}function o_(){const e=globalThis;return e.crypto?.randomUUID?e.crypto.randomUUID():`c-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}class i_{clientId=o_();source=null;handlers=new Map;syncTimer=null;syncInFlight=!1;syncPending=!1;subscribe(t,n){let r=this.handlers.get(t);return r||(r=new Set,this.handlers.set(t,r)),r.add(n),this.ensureOpen(),this.scheduleSync(),()=>{const o=this.handlers.get(t);o&&(o.delete(n),o.size===0&&this.handlers.delete(t),this.scheduleSync())}}readyState(){return this.source?.readyState??2}ensureOpen(){if(this.source)return;const t=`/api/events/stream?clientId=${encodeURIComponent(this.clientId)}`,n=new EventSource(t);this.source=n,n.addEventListener("open",()=>{this.scheduleSync(!0)}),n.addEventListener("server-heartbeat",r=>{let o={ts:Date.now()};try{o=JSON.parse(r.data)}catch{}for(const i of this.handlers.values())for(const s of i)try{s("server-heartbeat",o)}catch{}}),n.addEventListener("msg",r=>{let o;try{o=JSON.parse(r.data)}catch{return}const i=this.handlers.get(o.topic);if(i)for(const s of i)try{s(o.event,o.data)}catch{}}),n.addEventListener("error",()=>{})}scheduleSync(t=!1){if(this.syncTimer)return;const n=t?0:20;this.syncTimer=setTimeout(()=>{this.syncTimer=null,this.runSync()},n)}async runSync(){if(this.syncInFlight){this.syncPending=!0;return}this.syncInFlight=!0;try{const t=[...this.handlers.keys()].sort();await fetch("/api/events/subscribe",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({clientId:this.clientId,topics:t})})}catch{}finally{this.syncInFlight=!1,this.syncPending&&(this.syncPending=!1,this.scheduleSync(!0))}}}let or=new i_;function ia(e){const t=e;return t.readyState=()=>or.readyState(),t}function s_(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:spec:${t}`,o=or.subscribe(r,(i,s)=>{switch(i){case"updated":n.onUpdated?.();break;case"server-heartbeat":n.onServerHeartbeat?.(s);break}});return ia(o)}function sa(e,t,n){if(!e){const i=(()=>{});return i.readyState=()=>2,i}const r=`project:${e}:session:${t}`,o=or.subscribe(r,(i,s)=>{i==="session-msg"?n.onEvent?.(s):i==="ready"?n.onReady?.(s):i==="server-heartbeat"&&n.onServerHeartbeat?.(s)});return ia(o)}function wh(e,t){if(!e){const o=(()=>{});return o.readyState=()=>2,o}const n=`project:${e}:sessions`,r=or.subscribe(n,(o,i)=>{o==="session-status"?t.onStatus?.(i):o==="server-heartbeat"&&t.onServerHeartbeat?.(i)});return ia(r)}function _h(e,t){if(!e)return()=>{};const n=`project:${e}:specs`;return or.subscribe(n,r=>{r==="list-updated"&&t()})}function Eh(e){return or.subscribe("projects",t=>{t==="projects-changed"&&e()})}function a_(e){return or.subscribe("system-notifications",t=>{t==="updated"&&e()})}function u_(e,t){if(!e)return()=>{};const n=`project:${e}:commands`;return or.subscribe(n,(r,o)=>{r==="runs-updated"&&t(o.runs)})}function c_(e,t,n){if(!e||!t)return()=>{};const r=`project:${e}:command:${t}`;return or.subscribe(r,(o,i)=>{if(o==="output-appended")n.onOutput?.(i);else if(o==="run-updated")n.onRun?.(i.run);else if(o==="ready"){const s=i.run;s&&n.onRun?.(s)}else o==="error"&&n.onError?.(String(i.error??"unknown error"))})}function l_(e,t){if(!e){const o=(()=>{});return o.readyState=()=>2,o}const n=`project:${e}:changes`,r=or.subscribe(n,(o,i)=>{o==="changes-updated"&&t(i.changes)});return ia(r)}function Sh(e){if(!e)return"";const t=e.replace(/^['"]|['"]$/g,"").trim();return/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(t)||/^\d{4}-\d{2}-\d{2}$/.test(t)?t:t||""}const d_={plan:"bg-stage-plan/15 text-stage-plan border-stage-plan/30",tasks:"bg-stage-tasks/15 text-stage-tasks border-stage-tasks/30",execute:"bg-stage-execute/15 text-stage-execute border-stage-execute/30",done:"bg-stage-done/15 text-stage-done border-stage-done/30"},f_={feat:"text-success",refct:"text-info",fix:"text-destructive"};function Ch(e){const[t,n,...r]=e.split(".");return!t||!n||r.length===0?null:{prefix:t,type:n,suffix:r.join(".")}}function g_(e,t){const n=Ch(e)?.type??e.split(".")[1]??"feat",r=t?.trim()??"";return r?`${n}: ${r}`:`${n}: update`}function p_(e){return`@.yorz/specs/${e}/spec.md`}function h_(e){return(...t)=>{for(const n of e)n&&n(...t)}}const X=e=>typeof e=="function"&&!e.length?e():e,Od=e=>Array.isArray(e)?e:e?[e]:[];function m_(e,...t){return typeof e=="function"?e(...t):e}const b_=oe;function y_(e,t,n,r){return e.addEventListener(t,n,r),b_(e.removeEventListener.bind(e,t,n,r))}function v_(e,t,n,r){const o=()=>{Od(X(e)).forEach(i=>{i&&Od(X(t)).forEach(s=>y_(i,s,n,r))})};typeof e=="function"?te(o):Le(o)}const Va=Symbol("fallback");function Rd(e){for(const t of e)t.dispose()}function x_(e,t,n,r={}){const o=new Map;return oe(()=>Rd(o.values())),()=>{const s=e()||[];return s[fi],ut(()=>{if(!s.length)return Rd(o.values()),o.clear(),r.fallback?[Tn(d=>(o.set(Va,{dispose:d}),r.fallback()))]:[];const a=new Array(s.length),u=o.get(Va);if(!o.size||u){u?.dispose(),o.delete(Va);for(let l=0;l<s.length;l++){const d=s[l],g=t(d,l);i(a,d,l,g)}return a}const c=new Set(o.keys());for(let l=0;l<s.length;l++){const d=s[l],g=t(d,l);c.delete(g);const h=o.get(g);h?(a[l]=h.mapped,h.setIndex?.(l),h.setItem(()=>d)):i(a,d,l,g)}for(const l of c)o.get(l)?.dispose(),o.delete(l);return a})};function i(s,a,u,c){Tn(l=>{const[d,g]=D(a),h={setItem:g,dispose:l};if(n.length>1){const[p,m]=D(u);h.setIndex=m,h.mapped=n(d,p)}else h.mapped=n(d);o.set(c,h),s[u]=h.mapped})}}function w_(e){const{by:t}=e;return ee(x_(()=>e.each,typeof t=="function"?t:n=>n[t],e.children,"fallback"in e?{fallback:()=>e.fallback}:void 0))}const __=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function Nd(e){const t={};let n;for(;n=__.exec(e);)t[n[1]]=n[2];return t}function En(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=Nd(e)}else typeof t=="string"&&(t=Nd(t));return{...e,...t}}function Xe(...e){return h_(e)}function E_(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function wc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function S_(e){return typeof e=="number"}function Io(e){return Object.prototype.toString.call(e)==="[object String]"}function Fi(e){return typeof e=="function"}function rn(e){return t=>`${e()}-${t}`}function Nt(e,t){return e?e===t||e.contains(t):!1}function oi(e,t=!1){const{activeElement:n}=nn(e);if(!n?.nodeName)return null;if(kh(n)&&n.contentDocument)return oi(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=nn(n).getElementById(r);if(o)return o}}return n}function el(e){return nn(e).defaultView||window}function nn(e){return e?e.ownerDocument||e:document}function kh(e){return e.tagName==="IFRAME"}var aa=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(aa||{});function Ah(e){return typeof window>"u"||window.navigator==null?!1:window.navigator.userAgentData?.brands.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function tl(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Bi(){return tl(/^Mac/i)}function C_(){return tl(/^iPhone/i)}function k_(){return tl(/^iPad/i)||Bi()&&navigator.maxTouchPoints>1}function A_(){return C_()||k_()}function T_(){return Bi()||A_()}function D_(){return Ah(/AppleWebKit/i)&&!I_()}function I_(){return Ah(/Chrome/i)}function ke(e,t){return t&&(Fi(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function at(e){return t=>{for(const n of e)ke(t,n)}}function O_(e){return Bi()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function mt(e){if(e)if(R_())e.focus({preventScroll:!0});else{const t=N_(e);e.focus(),M_(t)}}var ls=null;function R_(){if(ls==null){ls=!1;try{document.createElement("div").focus({get preventScroll(){return ls=!0,!0}})}catch{}}return ls}function N_(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function M_(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var Th=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],L_=[...Th,'[tabindex]:not([tabindex="-1"]):not([disabled])'],nl=`${Th.join(":not([hidden]),")},[tabindex]:not([disabled]):not([hidden])`,P_=L_.join(':not([hidden]):not([tabindex="-1"]),');function Dh(e,t){const r=Array.from(e.querySelectorAll(nl)).filter(Md);return t&&Md(e)&&r.unshift(e),r.forEach((o,i)=>{if(kh(o)&&o.contentDocument){const s=o.contentDocument.body,a=Dh(s,!1);r.splice(i,1,...a)}}),r}function Md(e){return Ih(e)&&!$_(e)}function Ih(e){return e.matches(nl)&&rl(e)}function $_(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function rl(e,t){return e.nodeName!=="#comment"&&F_(e)&&B_(e,t)&&(!e.parentElement||rl(e.parentElement,e))}function F_(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:o}=e.ownerDocument.defaultView,{display:i,visibility:s}=o(e);r=i!=="none"&&s!=="hidden"&&s!=="collapse"}return r}function B_(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function z_(e,t,n){const r=t?.tabbable?P_:nl,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){return t?.from?.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&rl(i)&&(!t?.accept||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(o.currentNode=t.from),o}function Ld(e){let t=e;for(;t&&!U_(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function U_(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function K_(){}function j_(e){return[e.clientX,e.clientY]}function Oh(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=i,a=0,u=s-1;a<s;u=a++){const[c,l]=t[a],[d,g]=t[u],[,h]=t[u===0?s-1:u-1]||[0,0],p=(l-g)*(n-c)-(c-d)*(r-l);if(g<l){if(r>=g&&r<l){if(p===0)return!0;p>0&&(r===g?r>h&&(o=!o):o=!o)}}else if(l<g){if(r>l&&r<=g){if(p===0)return!0;p<0&&(r===g?r<h&&(o=!o):o=!o)}}else if(r===l&&(n>=d&&n<=c||n>=c&&n<=d))return!0}return o}function Se(e,t){return H(e,t)}var Zo=new Map,Pd=new Set;function $d(){if(typeof window>"u"||document.body===null)return;const e=n=>{if(!n.target)return;let r=Zo.get(n.target);r||(r=new Set,Zo.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=Zo.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),Zo.delete(n.target)),Zo.size===0)){for(const o of Pd)o();Pd.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?$d():document.addEventListener("DOMContentLoaded",$d));function _c(e,t){const n=Fd(e,t,"left"),r=Fd(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight;let s=e.scrollLeft,a=e.scrollTop;const u=s+e.offsetWidth,c=a+e.offsetHeight;n<=s?s=n:n+o>u&&(s+=n+o-u),r<=a?a=r:r+i>c&&(a+=r+i-c),e.scrollLeft=s,e.scrollTop=a}function Fd(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function H_(e,t){if(document.contains(e)){const n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let o=Ld(e);for(;e&&o&&e!==n&&o!==n;)_c(o,e),e=o,o=Ld(e)}else{const{left:o,top:i}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});const{left:s,top:a}=e.getBoundingClientRect();(Math.abs(o-s)>1||Math.abs(i-a)>1)&&e.scrollIntoView?.({block:"nearest"})}}}var ua={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"},xi="data-kb-top-layer",Rh,Ec=!1,er=[];function wi(e){return er.findIndex(t=>t.node===e)}function q_(e){return er[wi(e)]}function G_(e){return er.length>0&&er[er.length-1].node===e}function Nh(){return er.filter(e=>e.isPointerBlocking)}function V_(){return[...Nh()].slice(-1)[0]}function ol(){return Nh().length>0}function Mh(e){const t=wi(V_()?.node);return wi(e)<t}function W_(e){er.push(e)}function Y_(e){const t=wi(e);t<0||er.splice(t,1)}function Z_(){for(const{node:e}of er)e.style.pointerEvents=Mh(e)?"none":"auto"}function X_(e){if(ol()&&!Ec){const t=nn(e);Rh=document.body.style.pointerEvents,t.body.style.pointerEvents="none",Ec=!0}}function J_(e){if(ol())return;const t=nn(e);t.body.style.pointerEvents=Rh,t.body.style.length===0&&t.body.removeAttribute("style"),Ec=!1}var bn={layers:er,isTopMostLayer:G_,hasPointerBlockingLayer:ol,isBelowPointerBlockingLayer:Mh,addLayer:W_,removeLayer:Y_,indexOf:wi,find:q_,assignPointerEventToLayers:Z_,disableBodyPointerEvents:X_,restoreBodyPointerEvents:J_};function ca(e,t){const[n,r]=D(Bd(t?.()));return te(()=>{r(e()?.tagName.toLowerCase()||Bd(t?.()))}),n}function Bd(e){return Io(e)?e:void 0}function Re(e){const[t,n]=se(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return f(zp,H(n,{get component(){return t.as}}))}var Q_=Object.defineProperty,On=(e,t)=>{for(var n in t)Q_(e,n,{get:t[n],enumerable:!0})},e2={};On(e2,{Button:()=>Lh,Root:()=>ir});var t2=["button","color","file","image","reset","submit"];function n2(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?t2.indexOf(e.type)!==-1:!1}function ir(e){let t;const n=Se({type:"button"},e),[r,o]=se(n,["ref","type","disabled"]),i=ca(()=>t,()=>"button"),s=ee(()=>{const c=i();return c==null?!1:n2({tagName:c,type:r.type})}),a=ee(()=>i()==="input"),u=ee(()=>i()==="a"&&t?.getAttribute("href")!=null);return f(Re,H({as:"button",ref(c){var l=Xe(d=>t=d,r.ref);typeof l=="function"&&l(c)},get type(){return J(()=>!!(s()||a()))()?r.type:void 0},get role(){return!s()&&!u()?"button":void 0},get tabIndex(){return!s()&&!u()&&!r.disabled?0:void 0},get disabled(){return J(()=>!!(s()||a()))()?r.disabled:void 0},get"aria-disabled"(){return!s()&&!a()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},o))}var Lh=ir;function ct(e){return t=>(e(t),()=>e(void 0))}var Ht=e=>typeof e=="function"?e():e,r2=e=>{const t=ee(()=>{const s=Ht(e.element);if(s)return getComputedStyle(s)}),n=()=>t()?.animationName??"none",[r,o]=D(Ht(e.show)?"present":"hidden");let i="none";return te(s=>{const a=Ht(e.show);return ut(()=>{if(s===a)return a;const u=i,c=n();a?o("present"):c==="none"||t()?.display==="none"?o("hidden"):o(s===!0&&u!==c?"hiding":"hidden")}),a}),te(()=>{const s=Ht(e.element);if(!s)return;const a=c=>{c.target===s&&(i=n())},u=c=>{const d=n().includes(c.animationName);c.target===s&&d&&r()==="hiding"&&o("hidden")};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u),oe(()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:o}},o2=r2,nr=o2,i2={};On(i2,{CloseButton:()=>$h,Description:()=>Fh,List:()=>zh,ProgressFill:()=>Uh,ProgressTrack:()=>Kh,Region:()=>jh,Root:()=>Hh,Title:()=>qh,Toast:()=>oo,toaster:()=>_i,useToastContext:()=>zi});var Ph=it();function zi(){const e=nt(Ph);if(e===void 0)throw new Error("[kobalte]: `useToastContext` must be used within a `Toast.Root` component");return e}function $h(e){const t=zi(),[n,r]=se(e,["aria-label","onClick"]);return f(ir,H({get"aria-label"(){return n["aria-label"]||t.translations().close},onClick:i=>{ke(i,n.onClick),t.close()}},r))}function Fh(e){const t=zi(),n=Se({id:t.generateId("description")},e),[r,o]=se(n,["id"]);return te(()=>oe(t.registerDescriptionId(r.id))),f(Re,H({as:"div",get id(){return r.id}},o))}var Bh=it();function il(){const e=nt(Bh);if(e===void 0)throw new Error("[kobalte]: `useToastRegionContext` must be used within a `Toast.Region` component");return e}function zh(e){let t;const n=il(),[r,o]=se(e,["ref","onFocusIn","onFocusOut","onPointerMove","onPointerLeave"]),i=c=>{ke(c,r.onFocusIn),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},s=c=>{ke(c,r.onFocusOut),Nt(t,c.relatedTarget)||n.resumeAllTimer()},a=c=>{ke(c,r.onPointerMove),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},u=c=>{ke(c,r.onPointerLeave),Nt(t,nn(t).activeElement)||n.resumeAllTimer()};return te(bt([()=>t,()=>n.hotkey()],([c,l])=>{if(!c)return;const d=nn(c),g=h=>{l.every(m=>h[m]||h.code===m)&&mt(c)};d.addEventListener("keydown",g),oe(()=>d.removeEventListener("keydown",g))})),te(()=>{if(!n.pauseOnPageIdle())return;const c=el(t);c.addEventListener("blur",n.pauseAllTimer),c.addEventListener("focus",n.resumeAllTimer),oe(()=>{c.removeEventListener("blur",n.pauseAllTimer),c.removeEventListener("focus",n.resumeAllTimer)})}),f(Re,H({as:"ol",ref(c){var l=Xe(d=>t=d,r.ref);typeof l=="function"&&l(c)},tabIndex:-1,onFocusIn:i,onFocusOut:s,onPointerMove:a,onPointerLeave:u},o,{get children(){return f(rt,{get each(){return n.toasts()},children:c=>c.toastComponent({get toastId(){return c.id}})})}}))}function Uh(e){const t=il(),n=zi(),[r,o]=se(e,["style"]),[i,s]=D(100);let a=0;return te(()=>{if(t.isPaused()||n.isPersistent())return;const u=setInterval(()=>{const c=new Date().getTime()-n.closeTimerStartTime()+a,l=Math.trunc(100-c/n.duration()*100);s(l<0?0:l)});oe(()=>{a+=new Date().getTime()-n.closeTimerStartTime(),clearInterval(u)})}),f(Re,H({as:"div",get style(){return En({"--kb-toast-progress-fill-width":`${i()}%`},r.style)}},o))}function Kh(e){return f(Re,H({as:"div","aria-hidden":"true",role:"presentation"},e))}var[sl,Ui]=ev({toasts:[]});function s2(e){Ui("toasts",t=>[...t,e])}function a2(e){return sl.toasts.find(t=>t.id===e)}function u2(e,t){const n=sl.toasts.findIndex(r=>r.id===e);n!==-1&&Ui("toasts",r=>[...r.slice(0,n),t,...r.slice(n+1)])}function c2(e){Ui("toasts",t=>t.id===e,"dismiss",!0)}function l2(e){Ui("toasts",t=>t.filter(n=>n.id!==e))}function d2(){Ui("toasts",[])}var uo={toasts:()=>sl.toasts,add:s2,get:a2,update:u2,dismiss:c2,remove:l2,clear:d2},zd="{hotkey}",f2={close:"Close"},g2={notifications:e=>`Notifications (${e})`};function jh(e){const t=Se({id:`toast-region-${At()}`,hotkey:["altKey","KeyT"],duration:5e3,limit:3,swipeDirection:"right",swipeThreshold:50,pauseOnInteraction:!0,pauseOnPageIdle:!0,topLayer:!0,translations:g2},e),[n,r]=se(t,["translations","style","hotkey","duration","limit","swipeDirection","swipeThreshold","pauseOnInteraction","pauseOnPageIdle","topLayer","aria-label","regionId"]),o=ee(()=>uo.toasts().filter(g=>g.region===n.regionId&&g.dismiss===!1).slice(0,n.limit)),[i,s]=D(!1),a=()=>o().length>0,u=()=>n.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,""),c=()=>(n["aria-label"]||n.translations.notifications(zd)).replace(zd,u()),l=()=>({[xi]:n.topLayer?"":void 0}),d={isPaused:i,toasts:o,hotkey:()=>n.hotkey,duration:()=>n.duration,swipeDirection:()=>n.swipeDirection,swipeThreshold:()=>n.swipeThreshold,pauseOnInteraction:()=>n.pauseOnInteraction,pauseOnPageIdle:()=>n.pauseOnPageIdle,pauseAllTimer:()=>s(!0),resumeAllTimer:()=>s(!1),generateId:rn(()=>r.id)};return f(Bh.Provider,{value:d,get children(){return f(Re,H({as:"div",role:"region",tabIndex:-1,get"aria-label"(){return c()},get style(){return En({"pointer-events":a()?n.topLayer?"auto":void 0:"none"},n.style)}},l,r))}})}var p2="toast.swipeStart",h2="toast.swipeMove",m2="toast.swipeCancel",b2="toast.swipeEnd";function Hh(e){const t=il(),n=Se({id:`toast-${At()}`,priority:"high",translations:f2},e),[r,o]=se(n,["ref","translations","toastId","style","priority","duration","persistent","onPause","onResume","onSwipeStart","onSwipeMove","onSwipeCancel","onSwipeEnd","onEscapeKeyDown","onKeyDown","onPointerDown","onPointerMove","onPointerUp"]),[i,s]=D(!0),[a,u]=D(),[c,l]=D(),[d,g]=D(!0),[h,p]=D(),{present:m}=nr({show:i,element:()=>h()??null}),b=ee(()=>r.duration||t.duration());let v,y=0,x=b(),E=null,S=null;const T=()=>{s(!1),g(!0)},A=()=>{uo.remove(r.toastId)},C=R=>{!R||r.persistent||(window.clearTimeout(v),y=new Date().getTime(),v=window.setTimeout(T,R))},L=()=>{C(x),r.onResume?.()},j=()=>{const R=new Date().getTime()-y;x=x-R,window.clearTimeout(v),r.onPause?.()},$=R=>{ke(R,r.onKeyDown),R.key==="Escape"&&(r.onEscapeKeyDown?.(R),R.defaultPrevented||T())},V=R=>{ke(R,r.onPointerDown),R.button===0&&(E={x:R.clientX,y:R.clientY})},B=R=>{if(ke(R,r.onPointerMove),!E)return;const P=R.clientX-E.x,ne=R.clientY-E.y,Y=!!S,K=["left","right"].includes(t.swipeDirection()),ce=["left","up"].includes(t.swipeDirection())?Math.min:Math.max,z=K?ce(0,P):0,k=K?0:ce(0,ne),O=R.pointerType==="touch"?10:2,Z={x:z,y:k},re={originalEvent:R,delta:Z};if(Y){S=Z,ds(h2,r.onSwipeMove,re);const{x:F,y:q}=Z;R.currentTarget.setAttribute("data-swipe","move"),R.currentTarget.style.setProperty("--kb-toast-swipe-move-x",`${F}px`),R.currentTarget.style.setProperty("--kb-toast-swipe-move-y",`${q}px`)}else Ud(Z,t.swipeDirection(),O)?(S=Z,ds(p2,r.onSwipeStart,re),R.currentTarget.setAttribute("data-swipe","start"),R.target.setPointerCapture(R.pointerId)):(Math.abs(P)>O||Math.abs(ne)>O)&&(E=null)},N=R=>{ke(R,r.onPointerUp);const P=S,ne=R.target;if(ne.hasPointerCapture(R.pointerId)&&ne.releasePointerCapture(R.pointerId),S=null,E=null,P){const Y=R.currentTarget,K={originalEvent:R,delta:P};if(Ud(P,t.swipeDirection(),t.swipeThreshold())){ds(b2,r.onSwipeEnd,K);const{x:ce,y:z}=P;R.currentTarget.setAttribute("data-swipe","end"),R.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),R.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),R.currentTarget.style.setProperty("--kb-toast-swipe-end-x",`${ce}px`),R.currentTarget.style.setProperty("--kb-toast-swipe-end-y",`${z}px`),T()}else ds(m2,r.onSwipeCancel,K),R.currentTarget.setAttribute("data-swipe","cancel"),R.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),R.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),R.currentTarget.style.removeProperty("--kb-toast-swipe-end-x"),R.currentTarget.style.removeProperty("--kb-toast-swipe-end-y");Y.addEventListener("click",ce=>ce.preventDefault(),{once:!0})}};Dn(()=>{t.toasts().find(R=>R.id===r.toastId&&R.update)&&g(!1)}),te(bt(()=>t.isPaused(),R=>{R?j():L()},{defer:!0})),te(bt([i,b],([R,P])=>{R&&!t.isPaused()&&C(P)})),te(bt(()=>uo.get(r.toastId)?.dismiss,R=>R&&T())),te(bt(()=>m(),R=>!R&&A()));const W={translations:()=>r.translations,close:T,duration:b,isPersistent:()=>r.persistent??!1,closeTimerStartTime:()=>y,generateId:rn(()=>o.id),registerTitleId:ct(u),registerDescriptionId:ct(l)};return f(G,{get when(){return m()},get children(){return f(Ph.Provider,{value:W,get children(){return f(Re,H({as:"li",ref(R){var P=Xe(p,r.ref);typeof P=="function"&&P(R)},role:"status",tabIndex:0,get style(){return En({animation:d()?void 0:"none","user-select":"none","touch-action":"none"},r.style)},get"aria-live"(){return r.priority==="high"?"assertive":"polite"},"aria-atomic":"true",get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-opened"(){return i()?"":void 0},get"data-closed"(){return i()?void 0:""},get"data-swipe-direction"(){return t.swipeDirection()},onKeyDown:$,onPointerDown:V,onPointerMove:B,onPointerUp:N},o))}})}})}function Ud(e,t,n=0){const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n}function ds(e,t,n){const r=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(o)}function qh(e){const t=zi(),n=Se({id:t.generateId("title")},e),[r,o]=se(n,["id"]);return te(()=>oe(t.registerTitleId(r.id))),f(Re,H({as:"div",get id(){return r.id}},o))}var y2=0;function Gh(e,t){const n=y2++;return uo.add({id:n,toastComponent:e,dismiss:!1,update:!1,region:t?.region}),n}function Sc(e,t){uo.update(e,{id:e,toastComponent:t,dismiss:!1,update:!0})}function v2(e,t,n){const r=Gh(o=>t({get toastId(){return o.toastId},state:"pending"}),n);return(Fi(e)?e():e).then(o=>Sc(r,i=>t({get toastId(){return i.toastId},state:"fulfilled",data:o}))).catch(o=>Sc(r,i=>t({get toastId(){return i.toastId},state:"rejected",error:o}))),r}function x2(e){return uo.dismiss(e),e}function w2(){uo.clear()}var _i={show:Gh,update:Sc,promise:v2,dismiss:x2,clear:w2},oo=Object.assign(Hh,{CloseButton:$h,Description:Fh,List:zh,ProgressFill:Uh,ProgressTrack:Kh,Region:jh,Title:qh,toaster:_i});function Ki(e){const[t,n]=D(e.defaultValue?.()),r=ee(()=>e.value?.()!==void 0),o=ee(()=>r()?e.value?.():t());return[o,s=>{ut(()=>{const a=m_(s,o());return Object.is(a,o())||(r()||n(a),e.onChange?.(a)),a})}]}function Vh(e){const[t,n]=Ki(e);return[()=>t()??!1,n]}function _2(e){const[t,n]=Ki(e);return[()=>t()??[],n]}function Wh(e={}){const[t,n]=Vh({value:()=>X(e.isSelected),defaultValue:()=>!!X(e.defaultIsSelected),onChange:i=>e.onSelectedChange?.(i)});return{isSelected:t,setIsSelected:i=>{!X(e.isReadOnly)&&!X(e.isDisabled)&&n(i)},toggle:()=>{!X(e.isReadOnly)&&!X(e.isDisabled)&&n(!t())}}}function Yh(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],o=u=>{if(u==null)return"";const c=e.getKey??"key",l=Io(c)?u[c]:c(u);return l!=null?String(l):""},i=u=>{if(u==null)return"";const c=e.getTextValue??"textValue",l=Io(c)?u[c]:c(u);return l!=null?String(l):""},s=u=>{if(u==null)return!1;const c=e.getDisabled??"disabled";return(Io(c)?u[c]:c(u))??!1},a=u=>{if(u!=null)return Io(e.getSectionChildren)?u[e.getSectionChildren]:e.getSectionChildren?.(u)};for(const u of e.dataSource){if(Io(u)||S_(u)){r.push({type:"item",rawValue:u,key:String(u),textValue:String(u),disabled:s(u),level:n,index:t}),t++;continue}if(a(u)!=null){r.push({type:"section",rawValue:u,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const c=a(u)??[];if(c.length>0){const l=Yh({dataSource:c,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...l),t+=l.length}}else r.push({type:"item",rawValue:u,key:o(u),textValue:i(u),disabled:s(u),level:n,index:t}),t++}return r}function E2(e,t=[]){return ee(()=>{const n=Yh({dataSource:X(e.dataSource),getKey:X(e.getKey),getTextValue:X(e.getTextValue),getDisabled:X(e.getDisabled),getSectionChildren:X(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}var S2=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),C2=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function k2(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return S2.has(n)}const t=e.split("-")[0];return C2.has(t)}function A2(e){return k2(e)?"rtl":"ltr"}function Zh(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:A2(e)}}var Cc=Zh(),ii=new Set;function Kd(){Cc=Zh();for(const e of ii)e(Cc)}function T2(){const[e,t]=D(Cc),n=ee(()=>e());return Dn(()=>{ii.size===0&&window.addEventListener("languagechange",Kd),ii.add(t),oe(()=>{ii.delete(t),ii.size===0&&window.removeEventListener("languagechange",Kd)})}),{locale:()=>n().locale,direction:()=>n().direction}}var D2=it();function Vr(){const e=T2();return nt(D2)||e}var Wa=new Map;function Xh(e){const{locale:t}=Vr(),n=ee(()=>t()+(e?Object.entries(e).sort((r,o)=>r[0]<o[0]?-1:1).join():""));return ee(()=>{const r=n();let o;return Wa.has(r)&&(o=Wa.get(r)),o||(o=new Intl.Collator(t(),e),Wa.set(r,o)),o})}var Yn=class Jh extends Set{anchorKey;currentKey;constructor(t,n,r){super(t),t instanceof Jh?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}};function I2(e){const[t,n]=Ki(e);return[()=>t()??new Yn,n]}function Qh(e){return T_()?e.altKey:e.ctrlKey}function Oo(e){return Bi()?e.metaKey:e.ctrlKey}function jd(e){return new Yn(e)}function em(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function O2(e){const t=Se({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=D(!1),[o,i]=D(),s=ee(()=>{const m=X(t.selectedKeys);return m!=null?jd(m):m}),a=ee(()=>{const m=X(t.defaultSelectedKeys);return m!=null?jd(m):new Yn}),[u,c]=I2({value:s,defaultValue:a,onChange:m=>t.onSelectionChange?.(m)}),[l,d]=D(X(t.selectionBehavior)),g=()=>X(t.selectionMode),h=()=>X(t.disallowEmptySelection)??!1,p=m=>{(X(t.allowDuplicateSelectionEvents)||!em(m,u()))&&c(m)};return te(()=>{const m=u();X(t.selectionBehavior)==="replace"&&l()==="toggle"&&typeof m=="object"&&m.size===0&&d("replace")}),te(()=>{d(X(t.selectionBehavior)??"toggle")}),{selectionMode:g,disallowEmptySelection:h,selectionBehavior:l,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:o,setFocusedKey:i,selectedKeys:u,setSelectedKeys:p}}function tm(e){const[t,n]=D(""),[r,o]=D(-1);return{typeSelectHandlers:{onKeyDown:s=>{if(X(e.isDisabled))return;const a=X(e.keyboardDelegate),u=X(e.selectionManager);if(!a.getKeyForSearch)return;const c=R2(s.key);if(!c||s.ctrlKey||s.metaKey)return;c===" "&&t().trim().length>0&&(s.preventDefault(),s.stopPropagation());let l=n(g=>g+c),d=a.getKeyForSearch(l,u.focusedKey())??a.getKeyForSearch(l);d==null&&N2(l)&&(l=l[0],d=a.getKeyForSearch(l,u.focusedKey())??a.getKeyForSearch(l)),d!=null&&(u.setFocusedKey(d),e.onTypeSelect?.(d)),clearTimeout(r()),o(window.setTimeout(()=>n(""),500))}}}}function R2(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function N2(e){return e.split("").every(t=>t===e[0])}function M2(e,t,n){const o=H({selectOnFocus:()=>X(e.selectionManager).selectionBehavior()==="replace"},e),i=()=>n?.()??t(),{direction:s}=Vr();let a={top:0,left:0};v_(()=>X(o.isVirtualized)?void 0:i(),"scroll",()=>{const b=i();b&&(a={top:b.scrollTop,left:b.scrollLeft})});const{typeSelectHandlers:u}=tm({isDisabled:()=>X(o.disallowTypeAhead),keyboardDelegate:()=>X(o.keyboardDelegate),selectionManager:()=>X(o.selectionManager)}),c=()=>X(o.orientation)??"vertical",l=b=>{ke(b,u.onKeyDown),b.altKey&&b.key==="Tab"&&b.preventDefault();const v=t();if(!v?.contains(b.target))return;const y=X(o.selectionManager),x=X(o.selectOnFocus),E=C=>{C!=null&&(y.setFocusedKey(C),b.shiftKey&&y.selectionMode()==="multiple"?y.extendSelection(C):x&&!Qh(b)&&y.replaceSelection(C))},S=X(o.keyboardDelegate),T=X(o.shouldFocusWrap),A=y.focusedKey();switch(b.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(S.getKeyBelow){b.preventDefault();let C;A!=null?C=S.getKeyBelow(A):C=S.getFirstKey?.(),C==null&&T&&(C=S.getFirstKey?.(A)),E(C)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(S.getKeyAbove){b.preventDefault();let C;A!=null?C=S.getKeyAbove(A):C=S.getLastKey?.(),C==null&&T&&(C=S.getLastKey?.(A)),E(C)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(S.getKeyLeftOf){b.preventDefault();const C=s()==="rtl";let L;A!=null?L=S.getKeyLeftOf(A):L=C?S.getFirstKey?.():S.getLastKey?.(),E(L)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(S.getKeyRightOf){b.preventDefault();const C=s()==="rtl";let L;A!=null?L=S.getKeyRightOf(A):L=C?S.getLastKey?.():S.getFirstKey?.(),E(L)}break}case"Home":if(S.getFirstKey){b.preventDefault();const C=S.getFirstKey(A,Oo(b));C!=null&&(y.setFocusedKey(C),Oo(b)&&b.shiftKey&&y.selectionMode()==="multiple"?y.extendSelection(C):x&&y.replaceSelection(C))}break;case"End":if(S.getLastKey){b.preventDefault();const C=S.getLastKey(A,Oo(b));C!=null&&(y.setFocusedKey(C),Oo(b)&&b.shiftKey&&y.selectionMode()==="multiple"?y.extendSelection(C):x&&y.replaceSelection(C))}break;case"PageDown":if(S.getKeyPageBelow&&A!=null){b.preventDefault();const C=S.getKeyPageBelow(A);E(C)}break;case"PageUp":if(S.getKeyPageAbove&&A!=null){b.preventDefault();const C=S.getKeyPageAbove(A);E(C)}break;case"a":Oo(b)&&y.selectionMode()==="multiple"&&X(o.disallowSelectAll)!==!0&&(b.preventDefault(),y.selectAll());break;case"Escape":b.defaultPrevented||(b.preventDefault(),X(o.disallowEmptySelection)||y.clearSelection());break;case"Tab":if(!X(o.allowsTabNavigation)){if(b.shiftKey)v.focus();else{const C=z_(v,{tabbable:!0});let L,j;do j=C.lastChild(),j&&(L=j);while(j);L&&!L.contains(document.activeElement)&&mt(L)}break}}},d=b=>{const v=X(o.selectionManager),y=X(o.keyboardDelegate),x=X(o.selectOnFocus);if(v.isFocused()){b.currentTarget.contains(b.target)||v.setFocused(!1);return}if(b.currentTarget.contains(b.target)){if(v.setFocused(!0),v.focusedKey()==null){const E=T=>{T!=null&&(v.setFocusedKey(T),x&&v.replaceSelection(T))},S=b.relatedTarget;S&&b.currentTarget.compareDocumentPosition(S)&Node.DOCUMENT_POSITION_FOLLOWING?E(v.lastSelectedKey()??y.getLastKey?.()):E(v.firstSelectedKey()??y.getFirstKey?.())}else if(!X(o.isVirtualized)){const E=i();if(E){E.scrollTop=a.top,E.scrollLeft=a.left;const S=E.querySelector(`[data-key="${v.focusedKey()}"]`);S&&(mt(S),_c(E,S))}}}},g=b=>{const v=X(o.selectionManager);b.currentTarget.contains(b.relatedTarget)||v.setFocused(!1)},h=b=>{i()===b.target&&b.preventDefault()},p=()=>{const b=X(o.autoFocus);if(!b)return;const v=X(o.selectionManager),y=X(o.keyboardDelegate);let x;b==="first"&&(x=y.getFirstKey?.()),b==="last"&&(x=y.getLastKey?.());const E=v.selectedKeys();E.size&&(x=E.values().next().value),v.setFocused(!0),v.setFocusedKey(x);const S=t();S&&x==null&&!X(o.shouldUseVirtualFocus)&&mt(S)};return Dn(()=>{o.deferAutoFocus?setTimeout(p,0):p()}),te(bt([i,()=>X(o.isVirtualized),()=>X(o.selectionManager).focusedKey()],b=>{const[v,y,x]=b;if(y)x&&o.scrollToKey?.(x);else if(x&&v){const E=v.querySelector(`[data-key="${x}"]`);E&&_c(v,E)}})),{tabIndex:ee(()=>{if(!X(o.shouldUseVirtualFocus))return X(o.selectionManager).focusedKey()==null?0:-1}),onKeyDown:l,onMouseDown:h,onFocusIn:d,onFocusOut:g}}function al(e,t){const n=()=>X(e.selectionManager),r=()=>X(e.key),o=()=>X(e.shouldUseVirtualFocus),i=y=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):y?.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||Oo(y)||"pointerType"in y&&y.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},s=()=>n().isSelected(r()),a=()=>X(e.disabled)||n().isDisabled(r()),u=()=>!a()&&n().canSelectItem(r());let c=null;const l=y=>{u()&&(c=y.pointerType,y.pointerType==="mouse"&&y.button===0&&!X(e.shouldSelectOnPressUp)&&i(y))},d=y=>{u()&&y.pointerType==="mouse"&&y.button===0&&X(e.shouldSelectOnPressUp)&&X(e.allowsDifferentPressOrigin)&&i(y)},g=y=>{u()&&(X(e.shouldSelectOnPressUp)&&!X(e.allowsDifferentPressOrigin)||c!=="mouse")&&i(y)},h=y=>{!u()||!["Enter"," "].includes(y.key)||(Qh(y)?n().toggleSelection(r()):i(y))},p=y=>{a()&&y.preventDefault()},m=y=>{const x=t();o()||a()||!x||y.target===x&&n().setFocusedKey(r())},b=ee(()=>{if(!(o()||a()))return r()===n().focusedKey()?0:-1}),v=ee(()=>X(e.virtualized)?void 0:r());return te(bt([t,r,o,()=>n().focusedKey(),()=>n().isFocused()],([y,x,E,S,T])=>{y&&x===S&&T&&!E&&document.activeElement!==y&&(e.focus?e.focus():mt(y))})),{isSelected:s,isDisabled:a,allowsSelection:u,tabIndex:b,dataKey:v,onPointerDown:l,onPointerUp:d,onClick:g,onKeyDown:h,onMouseDown:p,onFocus:m}}var L2=class{collection;state;constructor(e,t){this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()==="none")return!1;const t=this.getKey(e);return t==null?!1:this.state.selectedKeys().has(t)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every(t=>e.has(t))}firstSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=n?.index!=null&&e?.index!=null&&n.index<e.index;(!e||r)&&(e=n)}return e?.key}lastSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=n?.index!=null&&e?.index!=null&&n.index>e.index;(!e||r)&&(e=n)}return e?.key}extendSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=this.state.selectedKeys(),r=n.anchorKey||t,o=new Yn(n,r,t);for(const i of this.getKeyRange(r,n.currentKey||t))o.delete(i);for(const i of this.getKeyRange(t,r))this.canSelectItem(i)&&o.add(i);this.state.setSelectedKeys(o)}getKeyRange(e,t){const n=this.collection().getItem(e),r=this.collection().getItem(t);return n&&r?n.index!=null&&r.index!=null&&n.index<=r.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){const n=[];let r=e;for(;r!=null;){const o=this.collection().getItem(r);if(o&&o.type==="item"&&n.push(r),r===t)return n;r=this.collection().getKeyAfter(r)}return[]}getKey(e){const t=this.collection().getItem(e);return t?!t||t.type!=="item"?null:t.key:e}toggleSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=new Yn(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection()&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode()==="none")return;const t=this.getKey(e);if(t==null)return;const n=this.canSelectItem(t)?new Yn([t],t,t):new Yn;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new Yn;for(const n of e){const r=this.getKey(n);if(r!=null&&(t.add(r),this.selectionMode()==="single"))break}this.state.setSelectedKeys(t)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new Yn)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()==="toggle"||t&&t.pointerType==="touch"?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const t=this.selectedKeys();if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;for(const n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()==="none")return!1;const t=this.collection().getItem(e);return t!=null&&!t.disabled}isDisabled(e){const t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){const e=[];return(n=>{for(;n!=null;){if(this.canSelectItem(n)){const r=this.collection().getItem(n);if(!r)continue;r.type==="item"&&e.push(n)}n=this.collection().getKeyAfter(n)}})(this.collection().getFirstKey()),e}},Hd=class{keyMap=new Map;iterable;firstKey;lastKey;constructor(e){this.iterable=e;for(const r of e)this.keyMap.set(r.key,r);if(this.keyMap.size===0)return;let t,n=0;for(const[r,o]of this.keyMap)t?(t.nextKey=r,o.prevKey=t.key):(this.firstKey=r,o.prevKey=void 0),o.type==="item"&&(o.index=n++),t=o,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){return this.keyMap.get(e)?.prevKey}getKeyAfter(e){return this.keyMap.get(e)?.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}};function ul(e){const t=O2(e),r=E2({dataSource:()=>X(e.dataSource),getKey:()=>X(e.getKey),getTextValue:()=>X(e.getTextValue),getDisabled:()=>X(e.getDisabled),getSectionChildren:()=>X(e.getSectionChildren),factory:i=>e.filter?new Hd(e.filter(i)):new Hd(i)},[()=>e.filter]),o=new L2(r,t);return uc(()=>{const i=t.focusedKey();i!=null&&!r().getItem(i)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>o}}var nm=it();function rm(){return nt(nm)}function P2(){const e=rm();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function om(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function $2(e,t){const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const o=e[r]?.ref();if(o&&om(o,n))return r+1}return 0}function F2(e){const t=e.map((r,o)=>[o,r]);let n=!1;return t.sort(([r,o],[i,s])=>{const a=o.ref(),u=s.ref();return a===u||!a||!u?0:om(a,u)?(r>i&&(n=!0),-1):(r<i&&(n=!0),1)}),n?t.map(([r,o])=>o):e}function im(e,t){const n=F2(e);e!==n&&t(n)}function B2(e){const t=e[0],n=e[e.length-1]?.ref();let r=t?.ref()?.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return nn(r).body}function z2(e,t){te(()=>{const n=setTimeout(()=>{im(e(),t)});oe(()=>clearTimeout(n))})}function U2(e,t){if(typeof IntersectionObserver!="function"){z2(e,t);return}let n=[];te(()=>{const r=()=>{const s=!!n.length;n=e(),s&&im(e(),t)},o=B2(e()),i=new IntersectionObserver(r,{root:o});for(const s of e()){const a=s.ref();a&&i.observe(a)}oe(()=>i.disconnect())})}function K2(e={}){const[t,n]=_2({value:()=>X(e.items),onChange:i=>e.onItemsChange?.(i)});U2(t,n);const r=i=>(n(s=>{const a=$2(s,i);return E_(s,i,a)}),()=>{n(s=>{const a=s.filter(u=>u.ref()!==i.ref());return s.length===a.length?s:a})});return{DomCollectionProvider:i=>f(nm.Provider,{value:{registerItem:r},get children(){return i.children}})}}function j2(e){const t=P2(),n=Se({shouldRegisterItem:!0},e);te(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());oe(r)})}const H2=["top","right","bottom","left"],Ur=Math.min,yn=Math.max,Us=Math.round,fs=Math.floor,tr=e=>({x:e,y:e}),q2={left:"right",right:"left",bottom:"top",top:"bottom"};function kc(e,t,n){return yn(e,Ur(t,n))}function ho(e,t){return typeof e=="function"?e(t):e}function Kr(e){return e.split("-")[0]}function Go(e){return e.split("-")[1]}function sm(e){return e==="x"?"y":"x"}function cl(e){return e==="y"?"height":"width"}function vr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function ll(e){return sm(vr(e))}function G2(e,t,n){n===void 0&&(n=!1);const r=Go(e),o=ll(e),i=cl(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ks(s)),[s,Ks(s)]}function V2(e){const t=Ks(e);return[Ac(e),t,Ac(t)]}function Ac(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const qd=["left","right"],Gd=["right","left"],W2=["top","bottom"],Y2=["bottom","top"];function Z2(e,t,n){switch(e){case"top":case"bottom":return n?t?Gd:qd:t?qd:Gd;case"left":case"right":return t?W2:Y2;default:return[]}}function X2(e,t,n,r){const o=Go(e);let i=Z2(Kr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Ac)))),i}function Ks(e){const t=Kr(e);return q2[t]+e.slice(t.length)}function J2(e){return{top:0,right:0,bottom:0,left:0,...e}}function am(e){return typeof e!="number"?J2(e):{top:e,right:e,bottom:e,left:e}}function js(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Vd(e,t,n){let{reference:r,floating:o}=e;const i=vr(t),s=ll(t),a=cl(s),u=Kr(t),c=i==="y",l=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,g=r[a]/2-o[a]/2;let h;switch(u){case"top":h={x:l,y:r.y-o.height};break;case"bottom":h={x:l,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Go(t)){case"start":h[s]-=g*(n&&c?-1:1);break;case"end":h[s]+=g*(n&&c?-1:1);break}return h}async function Q2(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:d="floating",altBoundary:g=!1,padding:h=0}=ho(t,e),p=am(h),b=a[g?d==="floating"?"reference":"floating":d],v=js(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:u})),y=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),E=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},S=js(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:x,strategy:u}):y);return{top:(v.top-S.top+p.top)/E.y,bottom:(S.bottom-v.bottom+p.bottom)/E.y,left:(v.left-S.left+p.left)/E.x,right:(S.right-v.right+p.right)/E.x}}const eE=50,tE=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:Q2},u=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:d}=Vd(c,r,u),g=r,h=0;const p={};for(let m=0;m<i.length;m++){const b=i[m];if(!b)continue;const{name:v,fn:y}=b,{x,y:E,data:S,reset:T}=await y({x:l,y:d,initialPlacement:r,placement:g,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});l=x??l,d=E??d,p[v]={...p[v],...S},T&&h<eE&&(h++,typeof T=="object"&&(T.placement&&(g=T.placement),T.rects&&(c=T.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:l,y:d}=Vd(c,g,u)),m=-1)}return{x:l,y:d,placement:g,strategy:o,middlewareData:p}},nE=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:u}=t,{element:c,padding:l=0}=ho(e,t)||{};if(c==null)return{};const d=am(l),g={x:n,y:r},h=ll(o),p=cl(h),m=await s.getDimensions(c),b=h==="y",v=b?"top":"left",y=b?"bottom":"right",x=b?"clientHeight":"clientWidth",E=i.reference[p]+i.reference[h]-g[h]-i.floating[p],S=g[h]-i.reference[h],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let A=T?T[x]:0;(!A||!await(s.isElement==null?void 0:s.isElement(T)))&&(A=a.floating[x]||i.floating[p]);const C=E/2-S/2,L=A/2-m[p]/2-1,j=Ur(d[v],L),$=Ur(d[y],L),V=j,B=A-m[p]-$,N=A/2-m[p]/2+C,W=kc(V,N,B),R=!u.arrow&&Go(o)!=null&&N!==W&&i.reference[p]/2-(N<V?j:$)-m[p]/2<0,P=R?N<V?N-V:N-B:0;return{[h]:g[h]+P,data:{[h]:W,centerOffset:N-W-P,...R&&{alignmentOffset:P}},reset:R}}}),rE=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:u,elements:c}=t,{mainAxis:l=!0,crossAxis:d=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...b}=ho(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Kr(o),y=vr(a),x=Kr(a)===a,E=await(u.isRTL==null?void 0:u.isRTL(c.floating)),S=g||(x||!m?[Ks(a)]:V2(a)),T=p!=="none";!g&&T&&S.push(...X2(a,m,p,E));const A=[a,...S],C=await u.detectOverflow(t,b),L=[];let j=((r=i.flip)==null?void 0:r.overflows)||[];if(l&&L.push(C[v]),d){const N=G2(o,s,E);L.push(C[N[0]],C[N[1]])}if(j=[...j,{placement:o,overflows:L}],!L.every(N=>N<=0)){var $,V;const N=((($=i.flip)==null?void 0:$.index)||0)+1,W=A[N];if(W&&(!(d==="alignment"?y!==vr(W):!1)||j.every(ne=>vr(ne.placement)===y?ne.overflows[0]>0:!0)))return{data:{index:N,overflows:j},reset:{placement:W}};let R=(V=j.filter(P=>P.overflows[0]<=0).sort((P,ne)=>P.overflows[1]-ne.overflows[1])[0])==null?void 0:V.placement;if(!R)switch(h){case"bestFit":{var B;const P=(B=j.filter(ne=>{if(T){const Y=vr(ne.placement);return Y===y||Y==="y"}return!0}).map(ne=>[ne.placement,ne.overflows.filter(Y=>Y>0).reduce((Y,K)=>Y+K,0)]).sort((ne,Y)=>ne[1]-Y[1])[0])==null?void 0:B[0];P&&(R=P);break}case"initialPlacement":R=a;break}if(o!==R)return{reset:{placement:R}}}return{}}}};function Wd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Yd(e){return H2.some(t=>e[t]>=0)}const oE=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=ho(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=Wd(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Yd(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=Wd(s,n.floating);return{data:{escapedOffsets:a,escaped:Yd(a)}}}default:return{}}}}},iE=new Set(["left","top"]);async function sE(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Kr(n),a=Go(n),u=vr(n)==="y",c=iE.has(s)?-1:1,l=i&&u?-1:1,d=ho(t,e);let{mainAxis:g,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),u?{x:h*l,y:g*c}:{x:g*c,y:h*l}}const aE=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,u=await sE(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:s}}}}},uE=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:u={fn:v=>{let{x:y,y:x}=v;return{x:y,y:x}}},...c}=ho(e,t),l={x:n,y:r},d=await i.detectOverflow(t,c),g=vr(Kr(o)),h=sm(g);let p=l[h],m=l[g];if(s){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=p+d[v],E=p-d[y];p=kc(x,p,E)}if(a){const v=g==="y"?"top":"left",y=g==="y"?"bottom":"right",x=m+d[v],E=m-d[y];m=kc(x,m,E)}const b=u.fn({...t,[h]:p,[g]:m});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[h]:s,[g]:a}}}}}},cE=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:u=()=>{},...c}=ho(e,t),l=await s.detectOverflow(t,c),d=Kr(o),g=Go(o),h=vr(o)==="y",{width:p,height:m}=i.floating;let b,v;d==="top"||d==="bottom"?(b=d,v=g===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,b=g==="end"?"top":"bottom");const y=m-l.top-l.bottom,x=p-l.left-l.right,E=Ur(m-l[b],y),S=Ur(p-l[v],x),T=!t.middlewareData.shift;let A=E,C=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=y),T&&!g){const j=yn(l.left,0),$=yn(l.right,0),V=yn(l.top,0),B=yn(l.bottom,0);h?C=p-2*(j!==0||$!==0?j+$:yn(l.left,l.right)):A=m-2*(V!==0||B!==0?V+B:yn(l.top,l.bottom))}await u({...t,availableWidth:C,availableHeight:A});const L=await s.getDimensions(a.floating);return p!==L.width||m!==L.height?{reset:{rects:!0}}:{}}}};function la(){return typeof window<"u"}function Vo(e){return um(e)?(e.nodeName||"").toLowerCase():"#document"}function xn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sr(e){var t;return(t=(um(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function um(e){return la()?e instanceof Node||e instanceof xn(e).Node:!1}function zn(e){return la()?e instanceof Element||e instanceof xn(e).Element:!1}function Ar(e){return la()?e instanceof HTMLElement||e instanceof xn(e).HTMLElement:!1}function Zd(e){return!la()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xn(e).ShadowRoot}function ji(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Un(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function lE(e){return/^(table|td|th)$/.test(Vo(e))}function da(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const dE=/transform|translate|scale|rotate|perspective|filter/,fE=/paint|layout|strict|content/,Qr=e=>!!e&&e!=="none";let Ya;function dl(e){const t=zn(e)?Un(e):e;return Qr(t.transform)||Qr(t.translate)||Qr(t.scale)||Qr(t.rotate)||Qr(t.perspective)||!fl()&&(Qr(t.backdropFilter)||Qr(t.filter))||dE.test(t.willChange||"")||fE.test(t.contain||"")}function gE(e){let t=jr(e);for(;Ar(t)&&!zo(t);){if(dl(t))return t;if(da(t))return null;t=jr(t)}return null}function fl(){return Ya==null&&(Ya=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ya}function zo(e){return/^(html|body|#document)$/.test(Vo(e))}function Un(e){return xn(e).getComputedStyle(e)}function fa(e){return zn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jr(e){if(Vo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zd(e)&&e.host||sr(e);return Zd(t)?t.host:t}function cm(e){const t=jr(e);return zo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ar(t)&&ji(t)?t:cm(t)}function Ei(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=cm(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=xn(o);if(i){const a=Tc(s);return t.concat(s,s.visualViewport||[],ji(o)?o:[],a&&n?Ei(a):[])}else return t.concat(o,Ei(o,[],n))}function Tc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lm(e){const t=Un(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ar(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Us(n)!==i||Us(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function gl(e){return zn(e)?e:e.contextElement}function Po(e){const t=gl(e);if(!Ar(t))return tr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=lm(t);let s=(i?Us(n.width):n.width)/r,a=(i?Us(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const pE=tr(0);function dm(e){const t=xn(e);return!fl()||!t.visualViewport?pE:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hE(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==xn(e)?!1:t}function co(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=gl(e);let s=tr(1);t&&(r?zn(r)&&(s=Po(r)):s=Po(e));const a=hE(i,n,r)?dm(i):tr(0);let u=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,l=o.width/s.x,d=o.height/s.y;if(i){const g=xn(i),h=r&&zn(r)?xn(r):r;let p=g,m=Tc(p);for(;m&&r&&h!==p;){const b=Po(m),v=m.getBoundingClientRect(),y=Un(m),x=v.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,E=v.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;u*=b.x,c*=b.y,l*=b.x,d*=b.y,u+=x,c+=E,p=xn(m),m=Tc(p)}}return js({width:l,height:d,x:u,y:c})}function ga(e,t){const n=fa(e).scrollLeft;return t?t.left+n:co(sr(e)).left+n}function fm(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ga(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function mE(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=sr(r),a=t?da(t.floating):!1;if(r===s||a&&i)return n;let u={scrollLeft:0,scrollTop:0},c=tr(1);const l=tr(0),d=Ar(r);if((d||!d&&!i)&&((Vo(r)!=="body"||ji(s))&&(u=fa(r)),d)){const h=co(r);c=Po(r),l.x=h.x+r.clientLeft,l.y=h.y+r.clientTop}const g=s&&!d&&!i?fm(s,u):tr(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+l.x+g.x,y:n.y*c.y-u.scrollTop*c.y+l.y+g.y}}function bE(e){return Array.from(e.getClientRects())}function yE(e){const t=sr(e),n=fa(e),r=e.ownerDocument.body,o=yn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=yn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+ga(e);const a=-n.scrollTop;return Un(r).direction==="rtl"&&(s+=yn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Xd=25;function vE(e,t){const n=xn(e),r=sr(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,u=0;if(o){i=o.width,s=o.height;const l=fl();(!l||l&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const c=ga(r);if(c<=0){const l=r.ownerDocument,d=l.body,g=getComputedStyle(d),h=l.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,p=Math.abs(r.clientWidth-d.clientWidth-h);p<=Xd&&(i-=p)}else c<=Xd&&(i+=c);return{width:i,height:s,x:a,y:u}}function xE(e,t){const n=co(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ar(e)?Po(e):tr(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,u=o*i.x,c=r*i.y;return{width:s,height:a,x:u,y:c}}function Jd(e,t,n){let r;if(t==="viewport")r=vE(e,n);else if(t==="document")r=yE(sr(e));else if(zn(t))r=xE(t,n);else{const o=dm(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return js(r)}function gm(e,t){const n=jr(e);return n===t||!zn(n)||zo(n)?!1:Un(n).position==="fixed"||gm(n,t)}function wE(e,t){const n=t.get(e);if(n)return n;let r=Ei(e,[],!1).filter(a=>zn(a)&&Vo(a)!=="body"),o=null;const i=Un(e).position==="fixed";let s=i?jr(e):e;for(;zn(s)&&!zo(s);){const a=Un(s),u=dl(s);!u&&a.position==="fixed"&&(o=null),(i?!u&&!o:!u&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||ji(s)&&!u&&gm(e,s))?r=r.filter(l=>l!==s):o=a,s=jr(s)}return t.set(e,r),r}function _E(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?da(t)?[]:wE(t,this._c):[].concat(n),r],a=Jd(t,s[0],o);let u=a.top,c=a.right,l=a.bottom,d=a.left;for(let g=1;g<s.length;g++){const h=Jd(t,s[g],o);u=yn(h.top,u),c=Ur(h.right,c),l=Ur(h.bottom,l),d=yn(h.left,d)}return{width:c-d,height:l-u,x:d,y:u}}function EE(e){const{width:t,height:n}=lm(e);return{width:t,height:n}}function SE(e,t,n){const r=Ar(t),o=sr(t),i=n==="fixed",s=co(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const u=tr(0);function c(){u.x=ga(o)}if(r||!r&&!i)if((Vo(t)!=="body"||ji(o))&&(a=fa(t)),r){const h=co(t,!0,i,t);u.x=h.x+t.clientLeft,u.y=h.y+t.clientTop}else o&&c();i&&!r&&o&&c();const l=o&&!r&&!i?fm(o,a):tr(0),d=s.left+a.scrollLeft-u.x-l.x,g=s.top+a.scrollTop-u.y-l.y;return{x:d,y:g,width:s.width,height:s.height}}function Za(e){return Un(e).position==="static"}function Qd(e,t){if(!Ar(e)||Un(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return sr(e)===n&&(n=n.ownerDocument.body),n}function pm(e,t){const n=xn(e);if(da(e))return n;if(!Ar(e)){let o=jr(e);for(;o&&!zo(o);){if(zn(o)&&!Za(o))return o;o=jr(o)}return n}let r=Qd(e,t);for(;r&&lE(r)&&Za(r);)r=Qd(r,t);return r&&zo(r)&&Za(r)&&!dl(r)?n:r||gE(e)||n}const CE=async function(e){const t=this.getOffsetParent||pm,n=this.getDimensions,r=await n(e.floating);return{reference:SE(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kE(e){return Un(e).direction==="rtl"}const hm={convertOffsetParentRelativeRectToViewportRelativeRect:mE,getDocumentElement:sr,getClippingRect:_E,getOffsetParent:pm,getElementRects:CE,getClientRects:bE,getDimensions:EE,getScale:Po,isElement:zn,isRTL:kE};function mm(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function AE(e,t){let n=null,r;const o=sr(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),i();const c=e.getBoundingClientRect(),{left:l,top:d,width:g,height:h}=c;if(a||t(),!g||!h)return;const p=fs(d),m=fs(o.clientWidth-(l+g)),b=fs(o.clientHeight-(d+h)),v=fs(l),x={rootMargin:-p+"px "+-m+"px "+-b+"px "+-v+"px",threshold:yn(0,Ur(1,u))||1};let E=!0;function S(T){const A=T[0].intersectionRatio;if(A!==u){if(!E)return s();A?s(!1,A):r=setTimeout(()=>{s(!1,1e-7)},1e3)}A===1&&!mm(c,e.getBoundingClientRect())&&s(),E=!1}try{n=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return s(!0),i}function TE(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=gl(e),l=o||i?[...c?Ei(c):[],...t?Ei(t):[]]:[];l.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?AE(c,n):null;let g=-1,h=null;s&&(h=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),n()}),c&&!u&&h.observe(c),t&&h.observe(t));let p,m=u?co(e):null;u&&b();function b(){const v=co(e);m&&!mm(m,v)&&n(),m=v,p=requestAnimationFrame(b)}return n(),()=>{var v;l.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d?.(),(v=h)==null||v.disconnect(),h=null,u&&cancelAnimationFrame(p)}}const DE=aE,IE=uE,OE=rE,RE=cE,NE=oE,ME=nE,LE=(e,t,n)=>{const r=new Map,o={platform:hm,...n},i={...o.platform,_c:r};return tE(e,t,{...o,platform:i})};var PE=M('<svg display=block viewBox="0 0 30 30"style=transform:scale(1.02)><g><path fill=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z></path><path stroke=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z>'),pl=it();function hl(){const e=nt(pl);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var Dc=30,ef=Dc/2,$E={top:180,right:-90,bottom:0,left:90};function Tr(e){const t=hl(),n=Se({size:Dc},e),[r,o]=se(n,["ref","style","size"]),i=()=>t.currentPlacement().split("-")[0],s=FE(t.contentRef),a=()=>s()?.getPropertyValue("background-color")||"none",u=()=>s()?.getPropertyValue(`border-${i()}-color`)||"none",c=()=>s()?.getPropertyValue(`border-${i()}-width`)||"0px",l=()=>Number.parseInt(c())*2*(Dc/r.size),d=()=>`rotate(${$E[i()]} ${ef} ${ef}) translate(0 2)`;return f(Re,H({as:"div",ref(g){var h=Xe(t.setArrowRef,r.ref);typeof h=="function"&&h(g)},"aria-hidden":"true",get style(){return En({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:a(),stroke:u(),"stroke-width":l()},r.style)}},o,{get children(){var g=PE(),h=g.firstChild,p=h.firstChild;return p.nextSibling,Le(()=>Ge(h,"transform",d())),g}}))}function FE(e){const[t,n]=D();return te(()=>{const r=e();r&&n(el(r).getComputedStyle(r))}),t}function BE(e){const t=hl(),[n,r]=se(e,["ref","style"]);return f(Re,H({as:"div",ref(o){var i=Xe(t.setPositionerRef,n.ref);typeof i=="function"&&i(o)},"data-popper-positioner":"",get style(){return En({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function tf(e){const{x:t=0,y:n=0,width:r=0,height:o=0}=e??{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,o);const i={x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:n+o,left:t};return{...i,toJSON:()=>i}}function zE(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?tf(r):e?e.getBoundingClientRect():tf()}}}function UE(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var KE={top:"bottom",right:"left",bottom:"top",left:"right"};function jE(e,t){const[n,r]=e.split("-"),o=KE[n];return r?n==="left"||n==="right"?`${o} ${r==="start"?"top":"bottom"}`:r==="start"?`${o} ${t==="rtl"?"right":"left"}`:`${o} ${t==="rtl"?"left":"right"}`:`${o} center`}function HE(e){const t=Se({getAnchorRect:g=>g?.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=D(),[o,i]=D(),[s,a]=D(t.placement),u=()=>zE(t.anchorRef?.(),t.getAnchorRect),{direction:c}=Vr();async function l(){const g=u(),h=n(),p=o();if(!g||!h)return;const m=(p?.clientHeight||0)/2,b=typeof t.gutter=="number"?t.gutter+m:t.gutter??m;h.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),g.getBoundingClientRect();const v=[DE(({placement:T})=>{const A=!!T.split("-")[1];return{mainAxis:b,crossAxis:A?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const T=typeof t.flip=="string"?t.flip.split(" "):void 0;if(T!==void 0&&!T.every(UE))throw new Error("`flip` expects a spaced-delimited list of placements");v.push(OE({padding:t.overflowPadding,fallbackPlacements:T}))}(t.slide||t.overlap)&&v.push(IE({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),v.push(RE({padding:t.overflowPadding,apply({availableWidth:T,availableHeight:A,rects:C}){const L=Math.round(C.reference.width);T=Math.floor(T),A=Math.floor(A),h.style.setProperty("--kb-popper-anchor-width",`${L}px`),h.style.setProperty("--kb-popper-content-available-width",`${T}px`),h.style.setProperty("--kb-popper-content-available-height",`${A}px`),t.sameWidth&&(h.style.width=`${L}px`),t.fitViewport&&(h.style.maxWidth=`${T}px`,h.style.maxHeight=`${A}px`)}})),t.hideWhenDetached&&v.push(NE({padding:t.detachedPadding})),p&&v.push(ME({element:p,padding:t.arrowPadding}));const y=await LE(g,h,{placement:t.placement,strategy:"absolute",middleware:v,platform:{...hm,isRTL:()=>c()==="rtl"}});if(a(y.placement),t.onCurrentPlacementChange?.(y.placement),!h)return;h.style.setProperty("--kb-popper-content-transform-origin",jE(y.placement,c()));const x=Math.round(y.x),E=Math.round(y.y);let S;if(t.hideWhenDetached&&(S=y.middlewareData.hide?.referenceHidden?"hidden":"visible"),Object.assign(h.style,{top:"0",left:"0",transform:`translate3d(${x}px, ${E}px, 0)`,visibility:S}),p&&y.middlewareData.arrow){const{x:T,y:A}=y.middlewareData.arrow,C=y.placement.split("-")[0];Object.assign(p.style,{left:T!=null?`${T}px`:"",top:A!=null?`${A}px`:"",[C]:"100%"})}}te(()=>{const g=u(),h=n();if(!g||!h)return;const p=TE(g,h,l,{elementResize:typeof ResizeObserver=="function"});oe(p)}),te(()=>{const g=n(),h=t.contentRef?.();!g||!h||queueMicrotask(()=>{g.style.zIndex=getComputedStyle(h).zIndex})});const d={currentPlacement:s,contentRef:()=>t.contentRef?.(),setPositionerRef:r,setArrowRef:i};return f(pl.Provider,{value:d,get children(){return t.children}})}var Wr=Object.assign(HE,{Arrow:Tr,Context:pl,usePopperContext:hl,Positioner:BE});function qE(e){const t=n=>{n.key===aa.Escape&&e.onEscapeKeyDown?.(n)};te(()=>{if(X(e.isDisabled))return;const n=e.ownerDocument?.()??nn();n.addEventListener("keydown",t),oe(()=>{n.removeEventListener("keydown",t)})})}var nf="interactOutside.pointerDownOutside",rf="interactOutside.focusOutside";function GE(e,t){let n,r=K_;const o=()=>nn(t()),i=d=>e.onPointerDownOutside?.(d),s=d=>e.onFocusOutside?.(d),a=d=>e.onInteractOutside?.(d),u=d=>{const g=d.target;return!(g instanceof Element)||g.closest(`[${xi}]`)||!Nt(o(),g)||Nt(t(),g)?!1:!e.shouldExcludeElement?.(g)},c=d=>{function g(){const h=t(),p=d.target;if(!h||!p||!u(d))return;const m=at([i,a]);p.addEventListener(nf,m,{once:!0});const b=new CustomEvent(nf,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||O_(d)&&d.button===0}});p.dispatchEvent(b)}d.pointerType==="touch"?(o().removeEventListener("click",g),r=g,o().addEventListener("click",g,{once:!0})):g()},l=d=>{const g=t(),h=d.target;if(!g||!h||!u(d))return;const p=at([s,a]);h.addEventListener(rf,p,{once:!0});const m=new CustomEvent(rf,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});h.dispatchEvent(m)};te(()=>{X(e.isDisabled)||(n=window.setTimeout(()=>{o().addEventListener("pointerdown",c,!0)},0),o().addEventListener("focusin",l,!0),oe(()=>{window.clearTimeout(n),o().removeEventListener("click",r),o().removeEventListener("pointerdown",c,!0),o().removeEventListener("focusin",l,!0)}))})}var bm=it();function VE(){return nt(bm)}function Hi(e){let t;const n=VE(),[r,o]=se(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),i=new Set([]),s=d=>{i.add(d);const g=n?.registerNestedLayer(d);return()=>{i.delete(d),g?.()}};GE({shouldExcludeElement:d=>t?r.excludedElements?.some(g=>Nt(g(),d))||[...i].some(g=>Nt(g,d)):!1,onPointerDownOutside:d=>{!t||bn.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!bn.isTopMostLayer(t)||(r.onPointerDownOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.())},onFocusOutside:d=>{r.onFocusOutside?.(d),r.onInteractOutside?.(d),d.defaultPrevented||r.onDismiss?.()}},()=>t),qE({ownerDocument:()=>nn(t),onEscapeKeyDown:d=>{!t||!bn.isTopMostLayer(t)||(r.onEscapeKeyDown?.(d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),Dn(()=>{if(!t)return;bn.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n?.registerNestedLayer(t);bn.assignPointerEventToLayers(),bn.disableBodyPointerEvents(t),oe(()=>{t&&(bn.removeLayer(t),d?.(),bn.assignPointerEventToLayers(),bn.restoreBodyPointerEvents(t))})}),te(bt([()=>t,()=>r.disableOutsidePointerEvents],([d,g])=>{if(!d)return;const h=bn.find(d);h&&h.isPointerBlocking!==g&&(h.isPointerBlocking=g,bn.assignPointerEventToLayers()),g&&bn.disableBodyPointerEvents(d),oe(()=>{bn.restoreBodyPointerEvents(d)})},{defer:!0}));const l={registerNestedLayer:s};return f(bm.Provider,{value:l,get children(){return f(Re,H({as:"div",ref(d){var g=Xe(h=>t=h,r.ref);typeof g=="function"&&g(d)}},o))}})}function mo(e={}){const[t,n]=Vh({value:()=>X(e.open),defaultValue:()=>!!X(e.defaultOpen),onChange:s=>e.onOpenChange?.(s)}),r=()=>{n(!0)},o=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:o,toggle:()=>{t()?o():r()}}}var WE={};On(WE,{Arrow:()=>Tr,Content:()=>vm,Portal:()=>xm,Root:()=>wm,Tooltip:()=>Si,Trigger:()=>_m,useTooltipContext:()=>pa});var ym=it();function pa(){const e=nt(ym);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function vm(e){const t=pa(),n=Se({id:t.generateId("content")},e),[r,o]=se(n,["ref","style"]);return te(()=>oe(t.registerContentId(o.id))),f(G,{get when(){return t.contentPresent()},get children(){return f(Wr.Positioner,{get children(){return f(Hi,H({ref(i){var s=Xe(a=>{t.setContentRef(a)},r.ref);typeof s=="function"&&s(i)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return En({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onFocusOutside:i=>i.preventDefault(),onDismiss:()=>t.hideTooltip(!0)},()=>t.dataset(),o))}})}})}function xm(e){const t=pa();return f(G,{get when(){return t.contentPresent()},get children(){return f(Mi,e)}})}function YE(e,t,n){const r=e.split("-")[0],o=t.getBoundingClientRect(),i=n.getBoundingClientRect(),s=[],a=o.left+o.width/2,u=o.top+o.height/2;switch(r){case"top":s.push([o.left,u]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([o.right,u]);break;case"right":s.push([a,o.top]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([a,o.bottom]);break;case"bottom":s.push([o.left,u]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([i.right,i.top]),s.push([o.right,u]);break;case"left":s.push([a,o.top]),s.push([i.right,i.top]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([a,o.bottom]);break}return s}var eo={},ZE=0,Co=!1,hr,Xo,ko;function wm(e){const t=`tooltip-${At()}`,n=`${++ZE}`,r=Se({id:t,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[o,i]=se(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount","onCurrentPlacementChange"]);let s;const[a,u]=D(),[c,l]=D(),[d,g]=D(),[h,p]=D(i.placement),m=mo({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:N=>o.onOpenChange?.(N)}),{present:b}=nr({show:()=>o.forceMount||m.isOpen(),element:()=>d()??null}),v=()=>{eo[n]=x},y=()=>{for(const N in eo)N!==n&&(eo[N](!0),delete eo[N])},x=(N=!1)=>{N||o.closeDelay&&o.closeDelay<=0?(window.clearTimeout(s),s=void 0,m.close()):s||(s=window.setTimeout(()=>{s=void 0,m.close()},o.closeDelay)),window.clearTimeout(hr),hr=void 0,o.skipDelayDuration&&o.skipDelayDuration>=0&&(ko=window.setTimeout(()=>{window.clearTimeout(ko),ko=void 0},o.skipDelayDuration)),Co&&(window.clearTimeout(Xo),Xo=window.setTimeout(()=>{delete eo[n],Xo=void 0,Co=!1},o.closeDelay))},E=()=>{clearTimeout(s),s=void 0,y(),v(),Co=!0,m.open(),window.clearTimeout(hr),hr=void 0,window.clearTimeout(Xo),Xo=void 0,window.clearTimeout(ko),ko=void 0},S=()=>{y(),v(),!m.isOpen()&&!hr&&!Co?hr=window.setTimeout(()=>{hr=void 0,Co=!0,E()},o.openDelay):m.isOpen()||E()},T=(N=!1)=>{!N&&o.openDelay&&o.openDelay>0&&!s&&!ko?S():E()},A=()=>{window.clearTimeout(hr),hr=void 0,Co=!1},C=()=>{window.clearTimeout(s),s=void 0},L=N=>Nt(c(),N)||Nt(d(),N),j=N=>{const W=c(),R=d();if(!(!W||!R))return YE(N,W,R)},$=N=>{const W=N.target;if(L(W)){C();return}if(!o.ignoreSafeArea){const R=j(h());if(R&&Oh(j_(N),R)){C();return}}s||x()};te(()=>{if(!m.isOpen())return;const N=nn();N.addEventListener("pointermove",$,!0),oe(()=>{N.removeEventListener("pointermove",$,!0)})}),te(()=>{const N=c();if(!N||!m.isOpen())return;const W=P=>{const ne=P.target;Nt(ne,N)&&x(!0)},R=el();R.addEventListener("scroll",W,{capture:!0}),oe(()=>{R.removeEventListener("scroll",W,{capture:!0})})}),oe(()=>{clearTimeout(s),eo[n]&&delete eo[n]});const B={dataset:ee(()=>({"data-expanded":m.isOpen()?"":void 0,"data-closed":m.isOpen()?void 0:""})),isOpen:m.isOpen,isDisabled:()=>o.disabled??!1,triggerOnFocusOnly:()=>o.triggerOnFocusOnly??!1,contentId:a,contentPresent:b,openTooltip:T,hideTooltip:x,cancelOpening:A,generateId:rn(()=>r.id),registerContentId:ct(u),isTargetOnTooltip:L,setTriggerRef:l,setContentRef:g};return f(ym.Provider,{value:B,get children(){return f(Wr,H({anchorRef:c,contentRef:d,onCurrentPlacementChange:N=>{p(N),o.onCurrentPlacementChange?.(N)}},i))}})}function _m(e){let t;const n=pa(),[r,o]=se(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let i=!1,s=!1,a=!1;const u=()=>{i=!1},c=()=>{!n.isOpen()&&(s||a)&&n.openTooltip(a)},l=v=>{n.isOpen()&&!s&&!a&&n.hideTooltip(v)},d=v=>{ke(v,r.onPointerEnter),!(v.pointerType==="touch"||n.triggerOnFocusOnly()||n.isDisabled()||v.defaultPrevented)&&(s=!0,c())},g=v=>{ke(v,r.onPointerLeave),v.pointerType!=="touch"&&(s=!1,a=!1,n.isOpen()?l():n.cancelOpening())},h=v=>{ke(v,r.onPointerDown),i=!0,nn(t).addEventListener("pointerup",u,{once:!0})},p=v=>{ke(v,r.onClick),s=!1,a=!1,l(!0)},m=v=>{ke(v,r.onFocus),!(n.isDisabled()||v.defaultPrevented||i)&&(a=!0,c())},b=v=>{ke(v,r.onBlur);const y=v.relatedTarget;n.isTargetOnTooltip(y)||(s=!1,a=!1,l(!0))};return oe(()=>{nn(t).removeEventListener("pointerup",u)}),f(Re,H({as:"button",ref(v){var y=Xe(x=>{n.setTriggerRef(x),t=x},r.ref);typeof y=="function"&&y(v)},get"aria-describedby"(){return J(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:d,onPointerLeave:g,onPointerDown:h,onClick:p,onFocus:m,onBlur:b},()=>n.dataset(),o))}var Si=Object.assign(wm,{Arrow:Tr,Content:vm,Portal:xm,Trigger:_m}),ml=["id","name","validationState","required","disabled","readOnly"];function bl(e){const t=`form-control-${At()}`,n=Se({id:t},e),[r,o]=D(),[i,s]=D(),[a,u]=D(),[c,l]=D(),d=(m,b,v)=>{const y=v!=null||r()!=null;return[v,r(),y&&b!=null?m:void 0].filter(Boolean).join(" ")||void 0},g=m=>[a(),c(),m].filter(Boolean).join(" ")||void 0,h=ee(()=>({"data-valid":X(n.validationState)==="valid"?"":void 0,"data-invalid":X(n.validationState)==="invalid"?"":void 0,"data-required":X(n.required)?"":void 0,"data-disabled":X(n.disabled)?"":void 0,"data-readonly":X(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>X(n.name)??X(n.id),dataset:h,validationState:()=>X(n.validationState),isRequired:()=>X(n.required),isDisabled:()=>X(n.disabled),isReadOnly:()=>X(n.readOnly),labelId:r,fieldId:i,descriptionId:a,errorMessageId:c,getAriaLabelledBy:d,getAriaDescribedBy:g,generateId:rn(()=>X(n.id)),registerLabel:ct(o),registerField:ct(s),registerDescription:ct(u),registerErrorMessage:ct(l)}}}var ha=it();function Rn(){const e=nt(ha);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function qi(e){const t=Rn(),n=Se({id:t.generateId("description")},e);return te(()=>oe(t.registerDescription(n.id))),f(Re,H({as:"div"},()=>t.dataset(),n))}var XE=M("<option>"),JE=M("<div aria-hidden=true><input type=text style=font-size:16px><select tabindex=-1><option>");function QE(e){let t;const[n,r]=se(e,["ref","onChange","collection","selectionManager","isOpen","isMultiple","isVirtualized","focusTrigger"]),o=Rn(),[i,s]=D(!1),a=u=>{const c=n.collection.getItem(u);return f(G,{get when(){return c?.type==="item"},get children(){var l=XE();return l.value=u,w(l,()=>c?.textValue),Le(()=>l.selected=n.selectionManager.isSelected(u)),l}})};return te(bt(()=>n.selectionManager.selectedKeys(),(u,c)=>{c&&em(u,c)||(s(!0),t?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),t?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0})))},{defer:!0})),(()=>{var u=JE(),c=u.firstChild,l=c.nextSibling;l.firstChild,c.addEventListener("focus",()=>n.focusTrigger()),l.addEventListener("change",g=>{ke(g,n.onChange),i()||n.selectionManager.setSelectedKeys(new Set([g.target.value])),s(!1)});var d=Xe(g=>t=g,n.ref);return typeof d=="function"&&Bn(d,l),rr(l,H({get multiple(){return n.isMultiple},get name(){return o.name()},get required(){return o.isRequired()},get disabled(){return o.isDisabled()},get size(){return n.collection.getSize()},get value(){return n.selectionManager.firstSelectedKey()??""}},r),!1,!0),w(l,f(G,{get when(){return n.isVirtualized},get fallback(){return f(rt,{get each(){return[...n.collection.getKeys()]},children:a})},get children(){return f(rt,{get each(){return[...n.selectionManager.selectedKeys()]},children:a})}}),null),Le(g=>{var h=ua,p=n.selectionManager.isFocused()||n.isOpen?-1:0,m=o.isRequired(),b=o.isDisabled(),v=o.isReadOnly();return g.e=Bo(u,h,g.e),p!==g.t&&Ge(c,"tabindex",g.t=p),m!==g.a&&(c.required=g.a=m),b!==g.o&&(c.disabled=g.o=b),v!==g.i&&(c.readOnly=g.i=v),g},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),u})()}var of=new WeakMap;function eS(e){let t=of.get(e);if(t!=null)return t;t=0;for(const n of e)n.type==="item"&&t++;return of.set(e,t),t}var Em=class{collection;ref;collator;constructor(e,t,n){this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){return this.ref?.()?.querySelector(`[data-key="${e}"]`)??null}getKeyPageAbove(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const r=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop>r;)o=this.getKeyAbove(o),n=o!=null?this.getItem(o):null;return o}getKeyPageBelow(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const r=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop<r;)o=this.getKeyBelow(o),n=o!=null?this.getItem(o):null;return o}getKeyForSearch(e,t){const n=this.collator?.();if(!n)return;let r=t!=null?this.getKeyBelow(t):this.getFirstKey();for(;r!=null;){const o=this.collection().getItem(r);if(o){const i=o.textValue.slice(0,e.length);if(o.textValue&&n.compare(i,e)===0)return r}r=this.getKeyBelow(r)}}};function Sm(e,t,n){const r=Xh({usage:"search",sensitivity:"base"}),o=ee(()=>{const i=X(e.keyboardDelegate);return i||new Em(e.collection,t,r)});return M2({selectionManager:()=>X(e.selectionManager),keyboardDelegate:o,autoFocus:()=>X(e.autoFocus),deferAutoFocus:()=>X(e.deferAutoFocus),shouldFocusWrap:()=>X(e.shouldFocusWrap),disallowEmptySelection:()=>X(e.disallowEmptySelection),selectOnFocus:()=>X(e.selectOnFocus),disallowTypeAhead:()=>X(e.disallowTypeAhead),shouldUseVirtualFocus:()=>X(e.shouldUseVirtualFocus),allowsTabNavigation:()=>X(e.allowsTabNavigation),isVirtualized:()=>X(e.isVirtualized),scrollToKey:i=>X(e.scrollToKey)?.(i),orientation:()=>X(e.orientation)},t,n)}var tS={};On(tS,{Item:()=>ma,ItemDescription:()=>ba,ItemIndicator:()=>ya,ItemLabel:()=>va,Listbox:()=>nS,Root:()=>vl,Section:()=>xa,useListboxContext:()=>km});var Cm=it();function km(){const e=nt(Cm);if(e===void 0)throw new Error("[kobalte]: `useListboxContext` must be used within a `Listbox` component");return e}var Am=it();function yl(){const e=nt(Am);if(e===void 0)throw new Error("[kobalte]: `useListboxItemContext` must be used within a `Listbox.Item` component");return e}function ma(e){let t;const n=km(),r=`${n.generateId("item")}-${At()}`,o=Se({id:r},e),[i,s]=se(o,["ref","item","aria-label","aria-labelledby","aria-describedby","onPointerMove","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,u]=D(),[c,l]=D(),d=()=>n.listState().selectionManager(),g=()=>d().focusedKey()===i.item.key,h=al({key:()=>i.item.key,selectionManager:d,shouldSelectOnPressUp:n.shouldSelectOnPressUp,allowsDifferentPressOrigin:()=>n.shouldSelectOnPressUp()&&n.shouldFocusOnHover(),shouldUseVirtualFocus:n.shouldUseVirtualFocus,disabled:()=>i.item.disabled},()=>t),p=()=>{if(d().selectionMode()!=="none")return h.isSelected()},m=ee(()=>!(Bi()&&D_())),b=()=>m()?i["aria-label"]:void 0,v=()=>m()?a():void 0,y=()=>m()?c():void 0,x=()=>{if(!n.isVirtualized())return;const C=n.listState().collection().getItem(i.item.key)?.index;return C!=null?C+1:void 0},E=()=>{if(n.isVirtualized())return eS(n.listState().collection())},S=C=>{ke(C,i.onPointerMove),C.pointerType==="mouse"&&!h.isDisabled()&&n.shouldFocusOnHover()&&(mt(C.currentTarget),d().setFocused(!0),d().setFocusedKey(i.item.key))},T=ee(()=>({"data-disabled":h.isDisabled()?"":void 0,"data-selected":h.isSelected()?"":void 0,"data-highlighted":g()?"":void 0})),A={isSelected:h.isSelected,dataset:T,generateId:rn(()=>s.id),registerLabelId:ct(u),registerDescriptionId:ct(l)};return f(Am.Provider,{value:A,get children(){return f(Re,H({as:"li",ref(C){var L=Xe(j=>t=j,i.ref);typeof L=="function"&&L(C)},role:"option",get tabIndex(){return h.tabIndex()},get"aria-disabled"(){return h.isDisabled()},get"aria-selected"(){return p()},get"aria-label"(){return b()},get"aria-labelledby"(){return v()},get"aria-describedby"(){return y()},get"aria-posinset"(){return x()},get"aria-setsize"(){return E()},get"data-key"(){return h.dataKey()},get onPointerDown(){return at([i.onPointerDown,h.onPointerDown])},get onPointerUp(){return at([i.onPointerUp,h.onPointerUp])},get onClick(){return at([i.onClick,h.onClick])},get onKeyDown(){return at([i.onKeyDown,h.onKeyDown])},get onMouseDown(){return at([i.onMouseDown,h.onMouseDown])},get onFocus(){return at([i.onFocus,h.onFocus])},onPointerMove:S},T,s))}})}function ba(e){const t=yl(),n=Se({id:t.generateId("description")},e);return te(()=>oe(t.registerDescriptionId(n.id))),f(Re,H({as:"div"},()=>t.dataset(),n))}function ya(e){const t=yl(),n=Se({id:t.generateId("indicator")},e),[r,o]=se(n,["forceMount"]);return f(G,{get when(){return r.forceMount||t.isSelected()},get children(){return f(Re,H({as:"div","aria-hidden":"true"},()=>t.dataset(),o))}})}function va(e){const t=yl(),n=Se({id:t.generateId("label")},e);return te(()=>oe(t.registerLabelId(n.id))),f(Re,H({as:"div"},()=>t.dataset(),n))}function vl(e){let t;const n=`listbox-${At()}`,r=Se({id:n,selectionMode:"single",virtualized:!1},e),[o,i]=se(r,["ref","children","renderItem","renderSection","value","defaultValue","onChange","options","optionValue","optionTextValue","optionDisabled","optionGroupChildren","state","keyboardDelegate","autoFocus","selectionMode","shouldFocusWrap","shouldUseVirtualFocus","shouldSelectOnPressUp","shouldFocusOnHover","allowDuplicateSelectionEvents","disallowEmptySelection","selectionBehavior","selectOnFocus","disallowTypeAhead","allowsTabNavigation","virtualized","scrollToItem","scrollRef","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),s=ee(()=>o.state?o.state:ul({selectedKeys:()=>o.value,defaultSelectedKeys:()=>o.defaultValue,onSelectionChange:o.onChange,allowDuplicateSelectionEvents:()=>X(o.allowDuplicateSelectionEvents),disallowEmptySelection:()=>X(o.disallowEmptySelection),selectionBehavior:()=>X(o.selectionBehavior),selectionMode:()=>X(o.selectionMode),dataSource:()=>o.options??[],getKey:()=>o.optionValue,getTextValue:()=>o.optionTextValue,getDisabled:()=>o.optionDisabled,getSectionChildren:()=>o.optionGroupChildren})),a=Sm({selectionManager:()=>s().selectionManager(),collection:()=>s().collection(),autoFocus:()=>X(o.autoFocus),shouldFocusWrap:()=>X(o.shouldFocusWrap),keyboardDelegate:()=>o.keyboardDelegate,disallowEmptySelection:()=>X(o.disallowEmptySelection),selectOnFocus:()=>X(o.selectOnFocus),disallowTypeAhead:()=>X(o.disallowTypeAhead),shouldUseVirtualFocus:()=>X(o.shouldUseVirtualFocus),allowsTabNavigation:()=>X(o.allowsTabNavigation),isVirtualized:()=>o.virtualized,scrollToKey:()=>o.scrollToItem},()=>t,()=>o.scrollRef?.()),u={listState:s,generateId:rn(()=>i.id),shouldUseVirtualFocus:()=>r.shouldUseVirtualFocus,shouldSelectOnPressUp:()=>r.shouldSelectOnPressUp,shouldFocusOnHover:()=>r.shouldFocusOnHover,isVirtualized:()=>o.virtualized};return f(Cm.Provider,{value:u,get children(){return f(Re,H({as:"ul",ref(c){var l=Xe(d=>t=d,o.ref);typeof l=="function"&&l(c)},role:"listbox",get tabIndex(){return a.tabIndex()},get"aria-multiselectable"(){return s().selectionManager().selectionMode()==="multiple"?!0:void 0},get onKeyDown(){return at([o.onKeyDown,a.onKeyDown])},get onMouseDown(){return at([o.onMouseDown,a.onMouseDown])},get onFocusIn(){return at([o.onFocusIn,a.onFocusIn])},get onFocusOut(){return at([o.onFocusOut,a.onFocusOut])}},i,{get children(){return f(G,{get when(){return!o.virtualized},get fallback(){return o.children?.(s().collection)},get children(){return f(w_,{get each(){return[...s().collection()]},by:"key",children:c=>f(W1,{get children(){return[f(od,{get when(){return c().type==="section"},get children(){return o.renderSection?.(c())}}),f(od,{get when(){return c().type==="item"},get children(){return o.renderItem?.(c())}})]}})})}})}}))}})}function xa(e){return f(Re,H({as:"li",role:"presentation"},e))}var nS=Object.assign(vl,{Item:ma,ItemDescription:ba,ItemIndicator:ya,ItemLabel:va,Section:xa}),Xa="focusScope.autoFocusOnMount",Ja="focusScope.autoFocusOnUnmount",sf={bubbles:!1,cancelable:!0},af={stack:[],active(){return this.stack[0]},add(e){e!==this.active()&&this.active()?.pause(),this.stack=wc(this.stack,e),this.stack.unshift(e)},remove(e){this.stack=wc(this.stack,e),this.active()?.resume()}};function wa(e,t){const[n,r]=D(!1),o={pause(){r(!0)},resume(){r(!1)}};let i=null;const s=p=>e.onMountAutoFocus?.(p),a=p=>e.onUnmountAutoFocus?.(p),u=()=>nn(t()),c=()=>{const p=u().createElement("span");return p.setAttribute("data-focus-trap",""),p.tabIndex=0,Object.assign(p.style,ua),p},l=()=>{const p=t();return p?Dh(p,!0).filter(m=>!m.hasAttribute("data-focus-trap")):[]},d=()=>{const p=l();return p.length>0?p[0]:null},g=()=>{const p=l();return p.length>0?p[p.length-1]:null},h=()=>{const p=t();if(!p)return!1;const m=oi(p);return!m||Nt(p,m)?!1:Ih(m)};te(()=>{const p=t();if(!p)return;af.add(o);const m=oi(p);if(!Nt(p,m)){const v=new CustomEvent(Xa,sf);p.addEventListener(Xa,s),p.dispatchEvent(v),v.defaultPrevented||setTimeout(()=>{mt(d()),oi(p)===m&&mt(p)},0)}oe(()=>{p.removeEventListener(Xa,s),setTimeout(()=>{const v=new CustomEvent(Ja,sf);h()&&v.preventDefault(),p.addEventListener(Ja,a),p.dispatchEvent(v),v.defaultPrevented||mt(m??u().body),p.removeEventListener(Ja,a),af.remove(o)},0)})}),te(()=>{const p=t();if(!p||!X(e.trapFocus)||n())return;const m=v=>{const y=v.target;y?.closest(`[${xi}]`)||(Nt(p,y)?i=y:mt(i))},b=v=>{const x=v.relatedTarget??oi(p);x?.closest(`[${xi}]`)||Nt(p,x)||mt(i)};u().addEventListener("focusin",m),u().addEventListener("focusout",b),oe(()=>{u().removeEventListener("focusin",m),u().removeEventListener("focusout",b)})}),te(()=>{const p=t();if(!p||!X(e.trapFocus)||n())return;const m=c();p.insertAdjacentElement("afterbegin",m);const b=c();p.insertAdjacentElement("beforeend",b);function v(x){const E=d(),S=g();x.relatedTarget===E?mt(S):mt(E)}m.addEventListener("focusin",v),b.addEventListener("focusin",v);const y=new MutationObserver(x=>{for(const E of x)E.previousSibling===b&&(b.remove(),p.insertAdjacentElement("beforeend",b)),E.nextSibling===m&&(m.remove(),p.insertAdjacentElement("afterbegin",m))});y.observe(p,{childList:!0,subtree:!1}),oe(()=>{m.removeEventListener("focusin",v),b.removeEventListener("focusin",v),m.remove(),b.remove(),y.disconnect()})})}var rS="data-live-announcer";function _a(e){te(()=>{X(e.isDisabled)||oe(oS(X(e.targets),X(e.root)))})}var Jo=new WeakMap,Cn=[];function oS(e,t=document.body){const n=new Set(e),r=new Set,o=u=>{for(const g of u.querySelectorAll(`[${rS}], [${xi}]`))n.add(g);const c=g=>{if(n.has(g)||g.parentElement&&r.has(g.parentElement)&&g.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const h of n)if(g.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},l=document.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),d=c(u);if(d===NodeFilter.FILTER_ACCEPT&&i(u),d!==NodeFilter.FILTER_REJECT){let g=l.nextNode();for(;g!=null;)i(g),g=l.nextNode()}},i=u=>{const c=Jo.get(u)??0;u.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&u.setAttribute("aria-hidden","true"),r.add(u),Jo.set(u,c+1))};Cn.length&&Cn[Cn.length-1].disconnect(),o(t);const s=new MutationObserver(u=>{for(const c of u)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(l=>l.contains(c.target))){for(const l of c.removedNodes)l instanceof Element&&(n.delete(l),r.delete(l));for(const l of c.addedNodes)(l instanceof HTMLElement||l instanceof SVGElement)&&(l.dataset.liveAnnouncer==="true"||l.dataset.reactAriaTopLayer==="true")?n.add(l):l instanceof Element&&o(l)}});s.observe(t,{childList:!0,subtree:!0});const a={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return Cn.push(a),()=>{s.disconnect();for(const u of r){const c=Jo.get(u);if(c==null)return;c===1?(u.removeAttribute("aria-hidden"),Jo.delete(u)):Jo.set(u,c-1)}a===Cn[Cn.length-1]?(Cn.pop(),Cn.length&&Cn[Cn.length-1].observe()):Cn.splice(Cn.indexOf(a),1)}}var Tm=["id","aria-label","aria-labelledby","aria-describedby"];function Dm(e){const t=Rn(),n=Se({id:t.generateId("field")},e);return te(()=>oe(t.registerField(X(n.id)))),{fieldProps:{id:()=>X(n.id),ariaLabel:()=>X(n["aria-label"]),ariaLabelledBy:()=>t.getAriaLabelledBy(X(n.id),X(n["aria-label"]),X(n["aria-labelledby"])),ariaDescribedBy:()=>t.getAriaDescribedBy(X(n["aria-describedby"]))}}}function xl(e){let t;const n=Rn(),r=Se({id:n.generateId("label")},e),[o,i]=se(r,["ref"]),s=ca(()=>t,()=>"label");return te(()=>oe(n.registerLabel(i.id))),f(Re,H({as:"label",ref(a){var u=Xe(c=>t=c,o.ref);typeof u=="function"&&u(a)},get for(){return J(()=>s()==="label")()?n.fieldId():void 0}},()=>n.dataset(),i))}function wl(e,t){te(bt(e,n=>{if(n==null)return;const r=iS(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),oe(()=>{r.removeEventListener("reset",t)}))}))}function iS(e){return sS(e)?e.form:e.closest("form")}function sS(e){return e.matches("textarea, input, select, button")}function Gi(e){const t=Rn(),n=Se({id:t.generateId("error-message")},e),[r,o]=se(n,["forceMount"]),i=()=>t.validationState()==="invalid";return te(()=>{i()&&oe(t.registerErrorMessage(o.id))}),f(G,{get when(){return r.forceMount||i()},get children(){return f(Re,H({as:"div"},()=>t.dataset(),o))}})}var Ic=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},gs=new Map,aS=e=>{te(()=>{const t=Ht(e.style)??{},n=Ht(e.properties)??[],r={};for(const i in t)r[i]=e.element.style[i];const o=gs.get(e.key);o?o.activeCount++:gs.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(i=>i.key)}),Object.assign(e.element.style,e.style);for(const i of n)e.element.style.setProperty(i.key,i.value);oe(()=>{const i=gs.get(e.key);if(i){if(i.activeCount!==1){i.activeCount--;return}gs.delete(e.key);for(const[s,a]of Object.entries(i.originalStyles))e.element.style[s]=a;for(const s of i.properties)e.element.style.removeProperty(s);e.element.style.length===0&&e.element.removeAttribute("style"),e.cleanup?.()}})})},uf=aS,uS=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},cS=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},lS=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let o=e,i=0,s=0,a=!1;do{const[u,c,l]=uS(o,t),d=l-u-r*c;(c!==0||d!==0)&&cS(o,t)&&(i+=d,s+=c),o===(n??document.documentElement)?a=!0:o=o._$host??o.parentElement}while(o&&!a);return[i,s]},[cf,lf]=D([]),dS=e=>cf().indexOf(e)===cf().length-1,fS=e=>{const t=H({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=At();let r=[0,0],o=null,i=null;te(()=>{Ht(t.enabled)&&(lf(c=>[...c,n]),oe(()=>{lf(c=>c.filter(l=>l!==n))}))}),te(()=>{if(!Ht(t.enabled)||!Ht(t.hideScrollbar))return;const{body:c}=document,l=window.innerWidth-c.offsetWidth;if(Ht(t.preventScrollbarShift)){const d={overflow:"hidden"},g=[];l>0&&(Ht(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${l}px)`:d.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${l}px)`,g.push({key:"--scrollbar-width",value:`${l}px`}));const h=window.scrollY,p=window.scrollX;uf({key:"prevent-scroll",element:c,style:d,properties:g,cleanup:()=>{Ht(t.restoreScrollPosition)&&l>0&&window.scrollTo(p,h)}})}else uf({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),te(()=>{!dS(n)||!Ht(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",u,{passive:!1}),oe(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",u)}))});const s=c=>{r=df(c),o=null,i=null},a=c=>{const l=c.target,d=Ht(t.element),g=gS(c),h=Math.abs(g[0])>Math.abs(g[1])?"x":"y",p=h==="x"?g[0]:g[1],m=ff(l,h,p,d);let b;d&&Ic(d,l)?b=!m:b=!0,b&&c.cancelable&&c.preventDefault()},u=c=>{const l=Ht(t.element),d=c.target;let g;if(c.touches.length===2)g=!Ht(t.allowPinchZoom);else{if(o==null||i===null){const h=df(c).map((m,b)=>r[b]-m),p=Math.abs(h[0])>Math.abs(h[1])?"x":"y";o=p,i=p==="x"?h[0]:h[1]}if(d.type==="range")g=!1;else{const h=ff(d,o,i,l);l&&Ic(l,d)?g=!h:g=!0}}g&&c.cancelable&&c.preventDefault()}},gS=e=>[e.deltaX,e.deltaY],df=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],ff=(e,t,n,r)=>{const o=r!==null&&Ic(r,e),[i,s]=lS(e,t,o?r:void 0);return!(n>0&&Math.abs(i)<=1||n<0&&Math.abs(s)<1)},pS=fS,Ea=pS,hS={};On(hS,{Arrow:()=>Tr,Content:()=>Om,Description:()=>qi,ErrorMessage:()=>Gi,HiddenSelect:()=>Rm,Icon:()=>Nm,Item:()=>ma,ItemDescription:()=>ba,ItemIndicator:()=>ya,ItemLabel:()=>va,Label:()=>Mm,Listbox:()=>Lm,Portal:()=>Pm,Root:()=>$m,Section:()=>xa,Select:()=>Vt,Trigger:()=>Fm,Value:()=>Bm,useSelectContext:()=>Dr});var Im=it();function Dr(){const e=nt(Im);if(e===void 0)throw new Error("[kobalte]: `useSelectContext` must be used within a `Select` component");return e}function Om(e){let t;const n=Dr(),[r,o]=se(e,["ref","style","onCloseAutoFocus","onFocusOutside"]),i=a=>{n.close()},s=a=>{r.onFocusOutside?.(a),n.isOpen()&&n.isModal()&&a.preventDefault()};return _a({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),Ea({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),wa({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:a=>{a.preventDefault()},onUnmountAutoFocus:a=>{r.onCloseAutoFocus?.(a),a.defaultPrevented||(mt(n.triggerRef()),a.preventDefault())}},()=>t),f(G,{get when(){return n.contentPresent()},get children(){return f(Wr.Positioner,{get children(){return f(Hi,H({ref(a){var u=Xe(c=>{n.setContentRef(c),t=c},r.ref);typeof u=="function"&&u(a)},get disableOutsidePointerEvents(){return J(()=>!!n.isModal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get style(){return En({"--kb-select-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onEscapeKeyDown:i,onFocusOutside:s,get onDismiss(){return n.close}},()=>n.dataset(),o))}})}})}function Rm(e){const t=Dr();return f(QE,H({get collection(){return t.listState().collection()},get selectionManager(){return t.listState().selectionManager()},get isOpen(){return t.isOpen()},get isMultiple(){return t.isMultiple()},get isVirtualized(){return t.isVirtualized()},focusTrigger:()=>t.triggerRef()?.focus()},e))}function Nm(e){const t=Dr(),n=Se({children:"▼"},e);return f(Re,H({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function Mm(e){const t=Dr(),[n,r]=se(e,["onClick"]);return f(xl,H({as:"span",onClick:i=>{ke(i,n.onClick),t.isDisabled()||t.triggerRef()?.focus()}},r))}function Lm(e){const t=Dr(),n=Se({id:t.generateId("listbox")},e),[r,o]=se(n,["ref","id","onKeyDown"]);return te(()=>oe(t.registerListboxId(r.id))),f(vl,H({ref(s){var a=Xe(t.setListboxRef,r.ref);typeof a=="function"&&a(s)},get id(){return r.id},get state(){return t.listState()},get virtualized(){return t.isVirtualized()},get autoFocus(){return t.autoFocus()},shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,get shouldFocusWrap(){return t.shouldFocusWrap()},get disallowTypeAhead(){return t.disallowTypeAhead()},get"aria-labelledby"(){return t.listboxAriaLabelledBy()},get renderItem(){return t.renderItem},get renderSection(){return t.renderSection},onKeyDown:s=>{ke(s,r.onKeyDown),s.key==="Escape"&&s.preventDefault()}},o))}function Pm(e){const t=Dr();return f(G,{get when(){return t.contentPresent()},get children(){return f(Mi,e)}})}function mS(e){const t=`select-${At()}`,n=Se({id:t,selectionMode:"single",disallowEmptySelection:!1,closeOnSelection:e.selectionMode==="single",allowDuplicateSelectionEvents:!0,gutter:8,sameWidth:!0,modal:!1},e),[r,o,i,s]=se(n,["itemComponent","sectionComponent","open","defaultOpen","onOpenChange","value","defaultValue","onChange","placeholder","options","optionValue","optionTextValue","optionDisabled","optionGroupChildren","keyboardDelegate","allowDuplicateSelectionEvents","disallowEmptySelection","closeOnSelection","disallowTypeAhead","shouldFocusWrap","selectionBehavior","selectionMode","virtualized","modal","preventScroll","forceMount"],["getAnchorRect","placement","gutter","shift","flip","slide","overlap","sameWidth","fitViewport","hideWhenDetached","detachedPadding","arrowPadding","overflowPadding"],ml),[a,u]=D(),[c,l]=D(),[d,g]=D(),[h,p]=D(),[m,b]=D(),[v,y]=D(),[x,E]=D(),[S,T]=D(!0),A=F=>{const q=r.optionValue;return q==null?String(F):String(Fi(q)?q(F):F[q])},C=ee(()=>{const F=r.optionGroupChildren;return F==null?r.options:r.options.flatMap(q=>q[F]??q)}),L=ee(()=>C().map(F=>A(F))),j=F=>[...F].map(q=>C().find(le=>A(le)===q)).filter(q=>q!=null),$=mo({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:F=>r.onOpenChange?.(F)}),V=ul({selectedKeys:()=>r.value!=null?r.value.map(A):r.value,defaultSelectedKeys:()=>r.defaultValue!=null?r.defaultValue.map(A):r.defaultValue,onSelectionChange:F=>{r.onChange?.(j(F)),r.closeOnSelection&&ne()},allowDuplicateSelectionEvents:()=>X(r.allowDuplicateSelectionEvents),disallowEmptySelection:()=>X(r.disallowEmptySelection),selectionBehavior:()=>X(r.selectionBehavior),selectionMode:()=>r.selectionMode,dataSource:()=>r.options??[],getKey:()=>r.optionValue,getTextValue:()=>r.optionTextValue,getDisabled:()=>r.optionDisabled,getSectionChildren:()=>r.optionGroupChildren}),B=ee(()=>j(V.selectionManager().selectedKeys())),N=F=>{V.selectionManager().toggleSelection(A(F))},{present:W}=nr({show:()=>r.forceMount||$.isOpen(),element:()=>m()??null}),R=()=>{const F=v();F&&mt(F)},P=F=>{if(r.options.length<=0)return;T(F),$.open();let q=V.selectionManager().firstSelectedKey();q==null&&(F==="first"?q=V.collection().getFirstKey():F==="last"&&(q=V.collection().getLastKey())),R(),V.selectionManager().setFocused(!0),V.selectionManager().setFocusedKey(q)},ne=()=>{$.close(),V.selectionManager().setFocused(!1),V.selectionManager().setFocusedKey(void 0)},Y=F=>{$.isOpen()?ne():P(F)},{formControlContext:K}=bl(i);wl(h,()=>{const F=r.defaultValue?[...r.defaultValue].map(A):new Yn;V.selectionManager().setSelectedKeys(F)});const ce=Xh({usage:"search",sensitivity:"base"}),z=ee(()=>{const F=X(r.keyboardDelegate);return F||new Em(V.collection,void 0,ce)}),k=F=>r.itemComponent?.({item:F}),O=F=>r.sectionComponent?.({section:F});te(bt([L],([F])=>{const le=[...V.selectionManager().selectedKeys()].filter(ye=>F.includes(ye));V.selectionManager().setSelectedKeys(le)},{defer:!0}));const Z=ee(()=>({"data-expanded":$.isOpen()?"":void 0,"data-closed":$.isOpen()?void 0:""})),re={dataset:Z,isOpen:$.isOpen,isDisabled:()=>K.isDisabled()??!1,isMultiple:()=>X(r.selectionMode)==="multiple",isVirtualized:()=>r.virtualized??!1,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??re.isModal(),disallowTypeAhead:()=>r.disallowTypeAhead??!1,shouldFocusWrap:()=>r.shouldFocusWrap??!1,selectedOptions:B,contentPresent:W,autoFocus:S,triggerRef:h,listState:()=>V,keyboardDelegate:z,triggerId:a,valueId:c,listboxId:d,listboxAriaLabelledBy:x,setListboxAriaLabelledBy:E,setTriggerRef:p,setContentRef:b,setListboxRef:y,open:P,close:ne,toggle:Y,placeholder:()=>r.placeholder,renderItem:k,renderSection:O,removeOptionFromSelection:N,generateId:rn(()=>X(i.id)),registerTriggerId:ct(u),registerValueId:ct(l),registerListboxId:ct(g)};return f(ha.Provider,{value:K,get children(){return f(Im.Provider,{value:re,get children(){return f(Wr,H({anchorRef:h,contentRef:m},o,{get children(){return f(Re,H({as:"div",role:"group",get id(){return X(i.id)}},()=>K.dataset(),Z,s))}}))}})}})}function $m(e){const[t,n]=se(e,["value","defaultValue","onChange","multiple"]),r=ee(()=>t.value!=null?t.multiple?t.value:[t.value]:t.value),o=ee(()=>t.defaultValue!=null?t.multiple?t.defaultValue:[t.defaultValue]:t.defaultValue);return f(mS,H({get value(){return r()},get defaultValue(){return o()},onChange:s=>{t.multiple?t.onChange?.(s??[]):t.onChange?.(s[0]??null)},get selectionMode(){return t.multiple?"multiple":"single"}},n))}function Fm(e){const t=Rn(),n=Dr(),r=Se({id:n.generateId("trigger")},e),[o,i,s]=se(r,["ref","disabled","onPointerDown","onClick","onKeyDown","onFocus","onBlur"],Tm),a=()=>n.listState().selectionManager(),u=()=>n.keyboardDelegate(),c=()=>o.disabled||n.isDisabled(),{fieldProps:l}=Dm(i),{typeSelectHandlers:d}=tm({keyboardDelegate:u,selectionManager:a,onTypeSelect:y=>a().select(y)}),g=()=>[n.listboxAriaLabelledBy(),n.valueId()].filter(Boolean).join(" ")||void 0,h=y=>{ke(y,o.onPointerDown),y.currentTarget.dataset.pointerType=y.pointerType,!c()&&y.pointerType!=="touch"&&y.button===0&&(y.preventDefault(),n.toggle(!0))},p=y=>{ke(y,o.onClick),!c()&&y.currentTarget.dataset.pointerType==="touch"&&n.toggle(!0)},m=y=>{if(ke(y,o.onKeyDown),!c())switch(ke(y,d.onKeyDown),y.key){case"Enter":case" ":case"ArrowDown":y.stopPropagation(),y.preventDefault(),n.toggle("first");break;case"ArrowUp":y.stopPropagation(),y.preventDefault(),n.toggle("last");break;case"ArrowLeft":{if(y.preventDefault(),n.isMultiple())return;const x=a().firstSelectedKey(),E=x!=null?u().getKeyAbove?.(x):u().getFirstKey?.();E!=null&&a().select(E);break}case"ArrowRight":{if(y.preventDefault(),n.isMultiple())return;const x=a().firstSelectedKey(),E=x!=null?u().getKeyBelow?.(x):u().getFirstKey?.();E!=null&&a().select(E);break}}},b=y=>{ke(y,o.onFocus),!a().isFocused()&&a().setFocused(!0)},v=y=>{ke(y,o.onBlur),!n.isOpen()&&a().setFocused(!1)};return te(()=>oe(n.registerTriggerId(l.id()))),te(()=>{n.setListboxAriaLabelledBy([l.ariaLabelledBy(),l.ariaLabel()&&!l.ariaLabelledBy()?l.id():null].filter(Boolean).join(" ")||void 0)}),f(ir,H({ref(y){var x=Xe(n.setTriggerRef,o.ref);typeof x=="function"&&x(y)},get id(){return l.id()},get disabled(){return c()},"aria-haspopup":"listbox",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return J(()=>!!n.isOpen())()?n.listboxId():void 0},get"aria-label"(){return l.ariaLabel()},get"aria-labelledby"(){return g()},get"aria-describedby"(){return l.ariaDescribedBy()},onPointerDown:h,onClick:p,onKeyDown:m,onFocus:b,onBlur:v},()=>n.dataset(),()=>t.dataset(),s))}function Bm(e){const t=Rn(),n=Dr(),r=Se({id:n.generateId("value")},e),[o,i]=se(r,["id","children"]),s=()=>n.listState().selectionManager(),a=()=>{const u=s().selectedKeys();return u.size===1&&u.has("")?!0:s().isEmpty()};return te(()=>oe(n.registerValueId(o.id))),f(Re,H({as:"span",get id(){return o.id},get"data-placeholder-shown"(){return a()?"":void 0}},()=>t.dataset(),i,{get children(){return f(G,{get when(){return!a()},get fallback(){return n.placeholder()},get children(){return f(bS,{state:{selectedOption:()=>n.selectedOptions()[0],selectedOptions:()=>n.selectedOptions(),remove:u=>n.removeOptionFromSelection(u),clear:()=>s().clearSelection()},get children(){return o.children}})}})}}))}function bS(e){const t=jo(()=>{const n=e.children;return Fi(n)?n(e.state):n});return J(t)}var Vt=Object.assign($m,{Arrow:Tr,Content:Om,Description:qi,ErrorMessage:Gi,HiddenSelect:Rm,Icon:Nm,Item:ma,ItemDescription:ba,ItemIndicator:ya,ItemLabel:va,Label:Mm,Listbox:Lm,Portal:Pm,Section:xa,Trigger:Fm,Value:Bm}),yS={};On(yS,{Anchor:()=>Um,Arrow:()=>Tr,CloseButton:()=>Km,Content:()=>jm,Description:()=>Hm,Popover:()=>Fr,Portal:()=>qm,Root:()=>Gm,Title:()=>Vm,Trigger:()=>Wm,usePopoverContext:()=>Yr});var zm=it();function Yr(){const e=nt(zm);if(e===void 0)throw new Error("[kobalte]: `usePopoverContext` must be used within a `Popover` component");return e}function Um(e){const t=Yr(),[n,r]=se(e,["ref"]);return f(Re,H({as:"div",ref(o){var i=Xe(t.setDefaultAnchorRef,n.ref);typeof i=="function"&&i(o)}},()=>t.dataset(),r))}function Km(e){const t=Yr(),[n,r]=se(e,["aria-label","onClick"]);return f(ir,H({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{ke(i,n.onClick),t.close()}},()=>t.dataset(),r))}function jm(e){let t;const n=Yr(),r=Se({id:n.generateId("content")},e),[o,i]=se(r,["ref","style","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1,u=!1;const c=h=>{o.onCloseAutoFocus?.(h),n.isModal()?(h.preventDefault(),s||mt(n.triggerRef())):(h.defaultPrevented||(a||mt(n.triggerRef()),h.preventDefault()),a=!1,u=!1)},l=h=>{o.onPointerDownOutside?.(h),n.isModal()&&(s=h.detail.isContextMenu)},d=h=>{o.onFocusOutside?.(h),n.isOpen()&&n.isModal()&&h.preventDefault()},g=h=>{o.onInteractOutside?.(h),!n.isModal()&&(h.defaultPrevented||(a=!0,h.detail.originalEvent.type==="pointerdown"&&(u=!0)),Nt(n.triggerRef(),h.target)&&h.preventDefault(),h.detail.originalEvent.type==="focusin"&&u&&h.preventDefault())};return _a({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),Ea({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),wa({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:c},()=>t),te(()=>oe(n.registerContentId(i.id))),f(G,{get when(){return n.contentPresent()},get children(){return f(Wr.Positioner,{get children(){return f(Hi,H({ref(h){var p=Xe(m=>{n.setContentRef(m),t=m},o.ref);typeof p=="function"&&p(h)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return J(()=>!!n.isOpen())()&&n.isModal()},get excludedElements(){return[n.triggerRef]},get style(){return En({"--kb-popover-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},o.style)},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:g,get onDismiss(){return n.close}},()=>n.dataset(),i))}})}})}function Hm(e){const t=Yr(),n=Se({id:t.generateId("description")},e),[r,o]=se(n,["id"]);return te(()=>oe(t.registerDescriptionId(r.id))),f(Re,H({as:"p",get id(){return r.id}},()=>t.dataset(),o))}function qm(e){const t=Yr();return f(G,{get when(){return t.contentPresent()},get children(){return f(Mi,e)}})}var gf={dismiss:"Dismiss"};function Gm(e){const t=`popover-${At()}`,n=Se({id:t,modal:!1,translations:gf},e),[r,o]=se(n,["translations","id","open","defaultOpen","onOpenChange","modal","preventScroll","forceMount","anchorRef"]),[i,s]=D(),[a,u]=D(),[c,l]=D(),[d,g]=D(),[h,p]=D(),[m,b]=D(),v=mo({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:T=>r.onOpenChange?.(T)}),y=()=>r.anchorRef?.()??i()??a(),{present:x}=nr({show:()=>r.forceMount||v.isOpen(),element:()=>c()??null}),E=ee(()=>({"data-expanded":v.isOpen()?"":void 0,"data-closed":v.isOpen()?void 0:""})),S={translations:()=>r.translations??gf,dataset:E,isOpen:v.isOpen,isModal:()=>r.modal??!1,preventScroll:()=>r.preventScroll??S.isModal(),contentPresent:x,triggerRef:a,contentId:d,titleId:h,descriptionId:m,setDefaultAnchorRef:s,setTriggerRef:u,setContentRef:l,close:v.close,toggle:v.toggle,generateId:rn(()=>r.id),registerContentId:ct(g),registerTitleId:ct(p),registerDescriptionId:ct(b)};return f(zm.Provider,{value:S,get children(){return f(Wr,H({anchorRef:y,contentRef:c},o))}})}function Vm(e){const t=Yr(),n=Se({id:t.generateId("title")},e),[r,o]=se(n,["id"]);return te(()=>oe(t.registerTitleId(r.id))),f(Re,H({as:"h2",get id(){return r.id}},()=>t.dataset(),o))}function Wm(e){const t=Yr(),[n,r]=se(e,["ref","onClick","onPointerDown"]);return f(ir,H({ref(s){var a=Xe(t.setTriggerRef,n.ref);typeof a=="function"&&a(s)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return J(()=>!!t.isOpen())()?t.contentId():void 0},onPointerDown:s=>{ke(s,n.onPointerDown),s.preventDefault()},onClick:s=>{ke(s,n.onClick),t.toggle()}},()=>t.dataset(),r))}var Fr=Object.assign(Gm,{Anchor:Um,Arrow:Tr,CloseButton:Km,Content:jm,Description:Hm,Portal:qm,Title:Vm,Trigger:Wm}),vS={};On(vS,{Description:()=>qi,ErrorMessage:()=>Gi,Item:()=>Xm,ItemControl:()=>Jm,ItemDescription:()=>Qm,ItemIndicator:()=>e0,ItemInput:()=>t0,ItemLabel:()=>n0,Label:()=>r0,RadioGroup:()=>Kn,Root:()=>o0,useRadioGroupContext:()=>_l});var Ym=it();function _l(){const e=nt(Ym);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var Zm=it();function Vi(){const e=nt(Zm);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function Xm(e){const t=Rn(),n=_l(),r=`${t.generateId("item")}-${At()}`,o=Se({id:r},e),[i,s]=se(o,["value","disabled","onPointerDown"]),[a,u]=D(),[c,l]=D(),[d,g]=D(),[h,p]=D(),[m,b]=D(!1),v=ee(()=>n.isDefaultValue(i.value)),y=ee(()=>n.isSelectedValue(i.value)),x=ee(()=>i.disabled||t.isDisabled()||!1),E=A=>{ke(A,i.onPointerDown),m()&&A.preventDefault()},S=ee(()=>({...t.dataset(),"data-disabled":x()?"":void 0,"data-checked":y()?"":void 0})),T={value:()=>i.value,dataset:S,isDefault:v,isSelected:y,isDisabled:x,inputId:a,labelId:c,descriptionId:d,inputRef:h,select:()=>n.setSelectedValue(i.value),generateId:rn(()=>s.id),registerInput:ct(u),registerLabel:ct(l),registerDescription:ct(g),setIsFocused:b,setInputRef:p};return f(Zm.Provider,{value:T,get children(){return f(Re,H({as:"div",role:"group",onPointerDown:E},S,s))}})}function Jm(e){const t=Vi(),n=Se({id:t.generateId("control")},e),[r,o]=se(n,["onClick","onKeyDown"]);return f(Re,H({as:"div",onClick:a=>{ke(a,r.onClick),t.select(),t.inputRef()?.focus({preventScroll:!0})},onKeyDown:a=>{ke(a,r.onKeyDown),a.key===aa.Space&&(t.select(),t.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),o))}function Qm(e){const t=Vi(),n=Se({id:t.generateId("description")},e);return te(()=>oe(t.registerDescription(n.id))),f(Re,H({as:"div"},()=>t.dataset(),n))}function e0(e){const t=Vi(),n=Se({id:t.generateId("indicator")},e),[r,o]=se(n,["ref","forceMount"]),[i,s]=D(),{present:a}=nr({show:()=>r.forceMount||t.isSelected(),element:()=>i()??null});return f(G,{get when(){return a()},get children(){return f(Re,H({as:"div",ref(u){var c=Xe(s,r.ref);typeof c=="function"&&c(u)}},()=>t.dataset(),o))}})}function t0(e){const t=Rn(),n=_l(),r=Vi(),o=Se({id:r.generateId("input")},e),[i,s]=se(o,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),a=()=>[i["aria-labelledby"],r.labelId(),i["aria-labelledby"]!=null&&s["aria-label"]!=null?s.id:void 0].filter(Boolean).join(" ")||void 0,u=()=>[i["aria-describedby"],r.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0,[c,l]=D(!1),d=p=>{if(ke(p,i.onChange),p.stopPropagation(),!c()){n.setSelectedValue(r.value());const m=p.target;m.checked=r.isSelected()}l(!1)},g=p=>{ke(p,i.onFocus),r.setIsFocused(!0)},h=p=>{ke(p,i.onBlur),r.setIsFocused(!1)};return te(bt([()=>r.isSelected(),()=>r.value()],p=>{if(!p[0]&&p[1]===r.value())return;l(!0);const m=r.inputRef();m?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),m?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),te(()=>oe(r.registerInput(s.id))),f(Re,H({as:"input",ref(p){var m=Xe(r.setInputRef,i.ref);typeof m=="function"&&m(p)},type:"radio",get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return En({...ua},i.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return u()},onChange:d,onFocus:g,onBlur:h},()=>r.dataset(),s))}function n0(e){const t=Vi(),n=Se({id:t.generateId("label")},e);return te(()=>oe(t.registerLabel(n.id))),f(Re,H({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function r0(e){return f(xl,H({as:"span"},e))}function o0(e){let t;const n=`radiogroup-${At()}`,r=Se({id:n,orientation:"vertical"},e),[o,i,s]=se(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],ml),[a,u]=Ki({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:b=>o.onChange?.(b)}),{formControlContext:c}=bl(i);wl(()=>t,()=>u(o.defaultValue??""));const l=()=>c.getAriaLabelledBy(X(i.id),s["aria-label"],o["aria-labelledby"]),d=()=>c.getAriaDescribedBy(o["aria-describedby"]),g=b=>b===e.defaultValue,h=b=>b===a(),m={ariaDescribedBy:d,isDefaultValue:g,isSelectedValue:h,setSelectedValue:b=>{if(!(c.isReadOnly()||c.isDisabled())&&(u(b),t))for(const v of t.querySelectorAll("[type='radio']")){const y=v;y.checked=h(y.value)}}};return f(ha.Provider,{value:c,get children(){return f(Ym.Provider,{value:m,get children(){return f(Re,H({as:"div",ref(b){var v=Xe(y=>t=y,o.ref);typeof v=="function"&&v(b)},role:"radiogroup",get id(){return X(i.id)},get"aria-invalid"(){return c.validationState()==="invalid"||void 0},get"aria-required"(){return c.isRequired()||void 0},get"aria-disabled"(){return c.isDisabled()||void 0},get"aria-readonly"(){return c.isReadOnly()||void 0},get"aria-orientation"(){return o.orientation},get"aria-labelledby"(){return l()},get"aria-describedby"(){return d()}},()=>c.dataset(),s))}})}})}var Kn=Object.assign(o0,{Description:qi,ErrorMessage:Gi,Item:Xm,ItemControl:Jm,ItemDescription:Qm,ItemIndicator:e0,ItemInput:t0,ItemLabel:n0,Label:r0}),xS=it();function Sa(){return nt(xS)}var wS=it();function i0(){return nt(wS)}var s0=it();function a0(){return nt(s0)}function Ir(){const e=a0();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var u0=it();function El(){const e=nt(u0);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var c0=it();function ar(){const e=nt(c0);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function Sl(e){let t;const n=ar(),r=Ir(),o=Se({id:n.generateId(`item-${At()}`)},e),[i,s]=se(o,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,u]=D(),[c,l]=D(),[d,g]=D(),h=()=>r.listState().selectionManager(),p=()=>s.id,m=()=>h().focusedKey()===p(),b=()=>{i.onSelect?.(),i.closeOnSelect&&setTimeout(()=>{r.close(!0)},1)};j2({getItem:()=>({ref:()=>t,type:"item",key:p(),textValue:i.textValue??d()?.textContent??t?.textContent??"",disabled:i.disabled??!1})});const v=al({key:p,selectionManager:h,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),y=L=>{ke(L,i.onPointerMove),L.pointerType==="mouse"&&(i.disabled?r.onItemLeave(L):(r.onItemEnter(L),L.defaultPrevented||(mt(L.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(p()))))},x=L=>{ke(L,i.onPointerLeave),L.pointerType==="mouse"&&r.onItemLeave(L)},E=L=>{ke(L,i.onPointerUp),!i.disabled&&L.button===0&&b()},S=L=>{if(ke(L,i.onKeyDown),!L.repeat&&!i.disabled)switch(L.key){case"Enter":case" ":b();break}},T=ee(()=>{if(i.indeterminate)return"mixed";if(i.checked!=null)return i.checked}),A=ee(()=>({"data-indeterminate":i.indeterminate?"":void 0,"data-checked":i.checked&&!i.indeterminate?"":void 0,"data-disabled":i.disabled?"":void 0,"data-highlighted":m()?"":void 0})),C={isChecked:()=>i.checked,dataset:A,setLabelRef:g,generateId:rn(()=>s.id),registerLabel:ct(u),registerDescription:ct(l)};return f(u0.Provider,{value:C,get children(){return f(Re,H({as:"div",ref(L){var j=Xe($=>t=$,i.ref);typeof j=="function"&&j(L)},get tabIndex(){return v.tabIndex()},get"aria-checked"(){return T()},get"aria-disabled"(){return i.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-key"(){return v.dataKey()},get onPointerDown(){return at([i.onPointerDown,v.onPointerDown])},get onPointerUp(){return at([E,v.onPointerUp])},get onClick(){return at([i.onClick,v.onClick])},get onKeyDown(){return at([S,v.onKeyDown])},get onMouseDown(){return at([i.onMouseDown,v.onMouseDown])},get onFocus(){return at([i.onFocus,v.onFocus])},onPointerMove:y,onPointerLeave:x},A,s))}})}function l0(e){const t=Se({closeOnSelect:!1},e),[n,r]=se(t,["checked","defaultChecked","onChange","onSelect"]),o=Wh({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:s=>n.onChange?.(s),isDisabled:()=>r.disabled});return f(Sl,H({role:"menuitemcheckbox",get checked(){return o.isSelected()},onSelect:()=>{n.onSelect?.(),o.toggle()}},r))}var Ci={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>Ci.next(e==="ltr"?"rtl":"ltr",t)},pf={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function d0(e){const t=ar(),n=Ir(),r=Sa(),{direction:o}=Vr(),i=Se({id:t.generateId("trigger")},e),[s,a]=se(i,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let u=()=>t.value();r!==void 0&&(u=()=>t.value()??s.id,r.lastValue()===void 0&&r.setLastValue(u));const c=ca(()=>n.triggerRef(),()=>"button"),l=ee(()=>c()==="a"&&n.triggerRef()?.getAttribute("href")!=null);te(bt(()=>r?.value(),v=>{l()&&v===u()&&n.triggerRef()?.focus()}));const d=()=>{r!==void 0?n.isOpen()?r.value()===u()&&r.closeMenu():(r.autoFocusMenu()||r.setAutoFocusMenu(!0),n.open(!1)):n.toggle(!0)},g=v=>{ke(v,s.onPointerDown),v.currentTarget.dataset.pointerType=v.pointerType,!s.disabled&&v.pointerType!=="touch"&&v.button===0&&d()},h=v=>{ke(v,s.onClick),s.disabled||v.currentTarget.dataset.pointerType==="touch"&&d()},p=v=>{if(ke(v,s.onKeyDown),!s.disabled){if(l())switch(v.key){case"Enter":case" ":return}switch(v.key){case"Enter":case" ":case pf.first(t.orientation()):v.stopPropagation(),v.preventDefault(),H_(v.currentTarget),n.open("first"),r?.setAutoFocusMenu(!0),r?.setValue(u);break;case pf.last(t.orientation()):v.stopPropagation(),v.preventDefault(),n.open("last");break;case Ci.next(o(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.nextMenu();break;case Ci.previous(o(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.previousMenu();break}}},m=v=>{ke(v,s.onMouseOver),n.triggerRef()?.dataset.pointerType!=="touch"&&!s.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(u)},b=v=>{ke(v,s.onFocus),r!==void 0&&v.currentTarget.dataset.pointerType!=="touch"&&r.setValue(u)};return te(()=>oe(n.registerTriggerId(s.id))),f(ir,H({ref(v){var y=Xe(n.setTriggerRef,s.ref);typeof y=="function"&&y(v)},get"data-kb-menu-value-trigger"(){return t.value()},get id(){return s.id},get disabled(){return s.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return J(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return u()!==void 0&&r?.value()===u()?!0:void 0},get tabIndex(){return r!==void 0?r.value()===u()||r.lastValue()===u()?0:-1:void 0},onPointerDown:g,onMouseOver:m,onClick:h,onKeyDown:p,onFocus:b,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}function f0(e){let t;const n=ar(),r=Ir(),o=Sa(),i=i0(),{direction:s}=Vr(),a=Se({id:n.generateId(`content-${At()}`)},e),[u,c]=se(a,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let l=0;const d=()=>r.parentMenuContext()==null&&o===void 0&&n.isModal(),g=Sm({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused(),orientation:()=>n.orientation()==="horizontal"?"vertical":"horizontal"},()=>t);wa({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:x=>{o===void 0&&u.onOpenAutoFocus?.(x)},onUnmountAutoFocus:u.onCloseAutoFocus},()=>t);const h=x=>{if(Nt(x.currentTarget,x.target)&&(x.key==="Tab"&&r.isOpen()&&x.preventDefault(),o!==void 0&&x.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(x.key){case Ci.next(s(),n.orientation()):x.stopPropagation(),x.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.nextMenu();break;case Ci.previous(s(),n.orientation()):if(x.currentTarget.hasAttribute("data-closed"))break;x.stopPropagation(),x.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.previousMenu();break}},p=x=>{u.onEscapeKeyDown?.(x),o?.setAutoFocusMenu(!1),r.close(!0)},m=x=>{u.onFocusOutside?.(x),n.isModal()&&x.preventDefault()},b=x=>{ke(x,u.onPointerEnter),r.isOpen()&&(r.parentMenuContext()?.listState().selectionManager().setFocused(!1),r.parentMenuContext()?.listState().selectionManager().setFocusedKey(void 0))},v=x=>{if(ke(x,u.onPointerMove),x.pointerType!=="mouse")return;const E=x.target,S=l!==x.clientX;Nt(x.currentTarget,E)&&S&&(r.setPointerDir(x.clientX>l?"right":"left"),l=x.clientX)};te(()=>oe(r.registerContentId(u.id))),oe(()=>r.setContentRef(void 0));const y={ref:Xe(x=>{r.setContentRef(x),t=x},u.ref),role:"menu",get id(){return u.id},get tabIndex(){return g.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:at([u.onKeyDown,g.onKeyDown,h]),onMouseDown:at([u.onMouseDown,g.onMouseDown]),onFocusIn:at([u.onFocusIn,g.onFocusIn]),onFocusOut:at([u.onFocusOut,g.onFocusOut]),onPointerEnter:b,onPointerMove:v,get"data-orientation"(){return n.orientation()}};return f(G,{get when(){return r.contentPresent()},get children(){return f(G,{get when(){return i===void 0||r.parentMenuContext()!=null},get fallback(){return f(Re,H({as:"div"},()=>r.dataset(),y,c))},get children(){return f(Wr.Positioner,{get children(){return f(Hi,H({get disableOutsidePointerEvents(){return J(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return En({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},u.style)},onEscapeKeyDown:p,onFocusOutside:m,get onDismiss(){return r.close}},()=>r.dataset(),y,c))}})}})}})}function _S(e){let t;const n=ar(),r=Ir(),[o,i]=se(e,["ref"]);return Ea({element:()=>t??null,enabled:()=>r.contentPresent()&&n.preventScroll()}),f(f0,H({ref(s){var a=Xe(u=>{t=u},o.ref);typeof a=="function"&&a(s)}},i))}var g0=it();function ES(){const e=nt(g0);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function Cl(e){const t=ar(),n=Se({id:t.generateId(`group-${At()}`)},e),[r,o]=D(),i={generateId:rn(()=>n.id),registerLabelId:ct(o)};return f(g0.Provider,{value:i,get children(){return f(Re,H({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function p0(e){const t=ES(),n=Se({id:t.generateId("label")},e),[r,o]=se(n,["id"]);return te(()=>oe(t.registerLabelId(r.id))),f(Re,H({as:"span",get id(){return r.id},"aria-hidden":"true"},o))}function h0(e){const t=Ir(),n=Se({children:"▼"},e);return f(Re,H({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function m0(e){return f(Sl,H({role:"menuitem",closeOnSelect:!0},e))}function b0(e){const t=El(),n=Se({id:t.generateId("description")},e),[r,o]=se(n,["id"]);return te(()=>oe(t.registerDescription(r.id))),f(Re,H({as:"div",get id(){return r.id}},()=>t.dataset(),o))}function y0(e){const t=El(),n=Se({id:t.generateId("indicator")},e),[r,o]=se(n,["forceMount"]);return f(G,{get when(){return r.forceMount||t.isChecked()},get children(){return f(Re,H({as:"div"},()=>t.dataset(),o))}})}function v0(e){const t=El(),n=Se({id:t.generateId("label")},e),[r,o]=se(n,["ref","id"]);return te(()=>oe(t.registerLabel(r.id))),f(Re,H({as:"div",ref(i){var s=Xe(t.setLabelRef,r.ref);typeof s=="function"&&s(i)},get id(){return r.id}},()=>t.dataset(),o))}function x0(e){const t=Ir();return f(G,{get when(){return t.contentPresent()},get children(){return f(Mi,e)}})}var w0=it();function SS(){const e=nt(w0);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function _0(e){const n=ar().generateId(`radiogroup-${At()}`),r=Se({id:n},e),[o,i]=se(r,["value","defaultValue","onChange","disabled"]),[s,a]=Ki({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:c=>o.onChange?.(c)}),u={isDisabled:()=>o.disabled,isSelectedValue:c=>c===s(),setSelectedValue:c=>a(c)};return f(w0.Provider,{value:u,get children(){return f(Cl,i)}})}function E0(e){const t=SS(),n=Se({closeOnSelect:!1},e),[r,o]=se(n,["value","onSelect"]);return f(Sl,H({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{r.onSelect?.(),t.setSelectedValue(r.value)}},o))}function CS(e,t,n){const r=e.split("-")[0],o=n.getBoundingClientRect(),i=[],s=t.clientX,a=t.clientY;switch(r){case"top":i.push([s,a+5]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]);break;case"right":i.push([s-5,a]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]);break;case"bottom":i.push([s,a-5]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]);break;case"left":i.push([s+5,a]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top]);break}return i}function kS(e,t){return t?Oh([e.clientX,e.clientY],t):!1}function S0(e){const t=ar(),n=rm(),r=a0(),o=Sa(),i=i0(),s=Se({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,u]=se(s,["open","defaultOpen","onOpenChange"]);let c=0,l=null,d="right";const[g,h]=D(),[p,m]=D(),[b,v]=D(),[y,x]=D(),[E,S]=D(!0),[T,A]=D(u.placement),[C,L]=D([]),[j,$]=D([]),{DomCollectionProvider:V}=K2({items:j,onItemsChange:$}),B=mo({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:q=>a.onOpenChange?.(q)}),{present:N}=nr({show:()=>t.forceMount()||B.isOpen(),element:()=>y()??null}),W=ul({selectionMode:"none",dataSource:j}),R=q=>{S(q),B.open()},P=(q=!1)=>{B.close(),q&&r&&r.close(!0)},ne=q=>{S(q),B.toggle()},Y=()=>{const q=y();q&&(mt(q),W.selectionManager().setFocused(!0),W.selectionManager().setFocusedKey(void 0))},K=()=>{i!=null?setTimeout(()=>Y()):Y()},ce=q=>{L(ye=>[...ye,q]);const le=r?.registerNestedMenu(q);return()=>{L(ye=>wc(ye,q)),le?.()}},z=q=>d===l?.side&&kS(q,l?.area),k=q=>{z(q)&&q.preventDefault()},O=q=>{z(q)||K()},Z=q=>{z(q)&&q.preventDefault()};_a({isDisabled:()=>!(r==null&&B.isOpen()&&t.isModal()),targets:()=>[y(),...C()].filter(Boolean)}),te(()=>{const q=y();if(!q||!r)return;const le=r.registerNestedMenu(q);oe(()=>{le()})}),te(()=>{r===void 0&&o?.registerMenu(t.value(),[y(),...C()])}),te(()=>{r!==void 0||o===void 0||(o.value()===t.value()?(b()?.focus(),o.autoFocusMenu()&&R(!0)):P())}),te(()=>{r!==void 0||o===void 0||B.isOpen()&&o.setValue(t.value())}),oe(()=>{r===void 0&&o?.unregisterMenu(t.value())});const F={dataset:ee(()=>({"data-expanded":B.isOpen()?"":void 0,"data-closed":B.isOpen()?void 0:""})),isOpen:B.isOpen,contentPresent:N,nestedMenus:C,currentPlacement:T,pointerGraceTimeoutId:()=>c,autoFocus:E,listState:()=>W,parentMenuContext:()=>r,triggerRef:b,contentRef:y,triggerId:g,contentId:p,setTriggerRef:v,setContentRef:x,open:R,close:P,toggle:ne,focusContent:K,onItemEnter:k,onItemLeave:O,onTriggerLeave:Z,setPointerDir:q=>d=q,setPointerGraceTimeoutId:q=>c=q,setPointerGraceIntent:q=>l=q,registerNestedMenu:ce,registerItemToParentDomCollection:n?.registerItem,registerTriggerId:ct(h),registerContentId:ct(m)};return f(V,{get children(){return f(s0.Provider,{value:F,get children(){return f(G,{when:i===void 0,get fallback(){return u.children},get children(){return f(Wr,H({anchorRef:b,contentRef:y,onCurrentPlacementChange:A},u))}})}})}})}function C0(e){const{direction:t}=Vr();return f(S0,H({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var AS={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function k0(e){const t=Ir(),n=ar(),[r,o]=se(e,["onFocusOutside","onKeyDown"]),{direction:i}=Vr();return f(f0,H({onOpenAutoFocus:l=>{l.preventDefault()},onCloseAutoFocus:l=>{l.preventDefault()},onFocusOutside:l=>{r.onFocusOutside?.(l);const d=l.target;Nt(t.triggerRef(),d)||t.close()},onKeyDown:l=>{ke(l,r.onKeyDown);const d=Nt(l.currentTarget,l.target),g=AS.close(i(),n.orientation()).includes(l.key),h=t.parentMenuContext()!=null;d&&g&&h&&(t.close(),mt(t.triggerRef()))}},o))}var hf=["Enter"," "],TS={open:(e,t)=>e==="ltr"?[...hf,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...hf,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function A0(e){let t;const n=ar(),r=Ir(),o=Se({id:n.generateId(`sub-trigger-${At()}`)},e),[i,s]=se(o,["ref","id","textValue","disabled","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);let a=null;const u=()=>{a&&window.clearTimeout(a),a=null},{direction:c}=Vr(),l=()=>i.id,d=()=>{const x=r.parentMenuContext();if(x==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return x.listState().selectionManager()},g=()=>r.listState().collection(),h=()=>d().focusedKey()===l(),p=al({key:l,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),m=x=>{ke(x,i.onClick),!r.isOpen()&&!i.disabled&&r.open(!0)},b=x=>{if(ke(x,i.onPointerMove),x.pointerType!=="mouse")return;const E=r.parentMenuContext();if(E?.onItemEnter(x),!x.defaultPrevented){if(i.disabled){E?.onItemLeave(x);return}!r.isOpen()&&!a&&(r.parentMenuContext()?.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),u()},100)),E?.onItemEnter(x),x.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),mt(x.currentTarget),E?.listState().selectionManager().setFocused(!0),E?.listState().selectionManager().setFocusedKey(l()))}},v=x=>{if(ke(x,i.onPointerLeave),x.pointerType!=="mouse")return;u();const E=r.parentMenuContext(),S=r.contentRef();if(S){E?.setPointerGraceIntent({area:CS(r.currentPlacement(),x,S),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(E?.pointerGraceTimeoutId());const T=window.setTimeout(()=>{E?.setPointerGraceIntent(null)},300);E?.setPointerGraceTimeoutId(T)}else{if(E?.onTriggerLeave(x),x.defaultPrevented)return;E?.setPointerGraceIntent(null)}E?.onItemLeave(x)},y=x=>{ke(x,i.onKeyDown),!x.repeat&&(i.disabled||TS.open(c(),n.orientation()).includes(x.key)&&(x.stopPropagation(),x.preventDefault(),d().setFocused(!1),d().setFocusedKey(void 0),r.isOpen()||r.open("first"),r.focusContent(),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(g().getFirstKey())))};return te(()=>{if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const x=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:l(),textValue:i.textValue??t?.textContent??"",disabled:i.disabled??!1});oe(x)}),te(bt(()=>r.parentMenuContext()?.pointerGraceTimeoutId(),x=>{oe(()=>{window.clearTimeout(x),r.parentMenuContext()?.setPointerGraceIntent(null)})})),te(()=>oe(r.registerTriggerId(i.id))),oe(()=>{u()}),f(Re,H({as:"div",ref(x){var E=Xe(S=>{r.setTriggerRef(S),t=S},i.ref);typeof E=="function"&&E(x)},get id(){return i.id},role:"menuitem",get tabIndex(){return p.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return J(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return i.disabled},get"data-key"(){return p.dataKey()},get"data-highlighted"(){return h()?"":void 0},get"data-disabled"(){return i.disabled?"":void 0},get onPointerDown(){return at([i.onPointerDown,p.onPointerDown])},get onPointerUp(){return at([i.onPointerUp,p.onPointerUp])},get onClick(){return at([m,p.onClick])},get onKeyDown(){return at([y,p.onKeyDown])},get onMouseDown(){return at([i.onMouseDown,p.onMouseDown])},get onFocus(){return at([i.onFocus,p.onFocus])},onPointerMove:b,onPointerLeave:v},()=>r.dataset(),s))}function DS(e){const t=Sa(),n=`menu-${At()}`,r=Se({id:n,modal:!0},e),[o,i]=se(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),s=mo({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:u=>o.onOpenChange?.(u)}),a={isModal:()=>o.modal??!0,preventScroll:()=>o.preventScroll??a.isModal(),forceMount:()=>o.forceMount??!1,generateId:rn(()=>o.id),value:()=>o.value,orientation:()=>o.orientation??t?.orientation()??"horizontal"};return f(c0.Provider,{value:a,get children(){return f(S0,H({get open(){return s.isOpen()},get onOpenChange(){return s.setIsOpen}},i))}})}var IS={};On(IS,{Root:()=>Ca,Separator:()=>OS});function Ca(e){let t;const n=Se({orientation:"horizontal"},e),[r,o]=se(n,["ref","orientation"]),i=ca(()=>t,()=>"hr");return f(Re,H({as:"hr",ref(s){var a=Xe(u=>t=u,r.ref);typeof a=="function"&&a(s)},get role(){return i()!=="hr"?"separator":void 0},get"aria-orientation"(){return r.orientation==="vertical"?"vertical":void 0},get"data-orientation"(){return r.orientation}},o))}var OS=Ca,RS={};On(RS,{Arrow:()=>Tr,CheckboxItem:()=>l0,Content:()=>T0,DropdownMenu:()=>wn,Group:()=>Cl,GroupLabel:()=>p0,Icon:()=>h0,Item:()=>m0,ItemDescription:()=>b0,ItemIndicator:()=>y0,ItemLabel:()=>v0,Portal:()=>x0,RadioGroup:()=>_0,RadioItem:()=>E0,Root:()=>D0,Separator:()=>Ca,Sub:()=>C0,SubContent:()=>k0,SubTrigger:()=>A0,Trigger:()=>d0});function T0(e){const t=ar(),n=Ir(),[r,o]=se(e,["onCloseAutoFocus","onInteractOutside"]);let i=!1;return f(_S,H({onCloseAutoFocus:u=>{r.onCloseAutoFocus?.(u),i||mt(n.triggerRef()),i=!1,u.preventDefault()},onInteractOutside:u=>{r.onInteractOutside?.(u),(!t.isModal()||u.detail.isContextMenu)&&(i=!0)}},o))}function D0(e){const t=`dropdownmenu-${At()}`,n=Se({id:t},e);return f(DS,n)}var wn=Object.assign(D0,{Arrow:Tr,CheckboxItem:l0,Content:T0,Group:Cl,GroupLabel:p0,Icon:h0,Item:m0,ItemDescription:b0,ItemIndicator:y0,ItemLabel:v0,Portal:x0,RadioGroup:_0,RadioItem:E0,Separator:Ca,Sub:C0,SubContent:k0,SubTrigger:A0,Trigger:d0}),NS={};On(NS,{Collapsible:()=>ka,Content:()=>O0,Root:()=>R0,Trigger:()=>N0,useCollapsibleContext:()=>kl});var I0=it();function kl(){const e=nt(I0);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function O0(e){const[t,n]=D(),r=kl(),o=Se({id:r.generateId("content")},e),[i,s]=se(o,["ref","id","style"]),{present:a}=nr({show:r.shouldMount,element:()=>t()??null}),[u,c]=D(0),[l,d]=D(0);let h=r.isOpen()||a();return Dn(()=>{const p=requestAnimationFrame(()=>{h=!1});oe(()=>{cancelAnimationFrame(p)})}),te(bt(a,()=>{if(!t())return;t().style.transitionDuration="0s",t().style.animationName="none";const p=t().getBoundingClientRect();c(p.height),d(p.width),h||(t().style.transitionDuration="",t().style.animationName="")})),te(bt(r.isOpen,p=>{!p&&t()&&(t().style.transitionDuration="",t().style.animationName="")},{defer:!0})),te(()=>oe(r.registerContentId(i.id))),f(G,{get when(){return a()},get children(){return f(Re,H({as:"div",ref(p){var m=Xe(n,i.ref);typeof m=="function"&&m(p)},get id(){return i.id},get style(){return En({"--kb-collapsible-content-height":u()?`${u()}px`:void 0,"--kb-collapsible-content-width":l()?`${l()}px`:void 0},i.style)}},()=>r.dataset(),s))}})}function R0(e){const t=`collapsible-${At()}`,n=Se({id:t},e),[r,o]=se(n,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[i,s]=D(),a=mo({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:l=>r.onOpenChange?.(l)}),u=ee(()=>({"data-expanded":a.isOpen()?"":void 0,"data-closed":a.isOpen()?void 0:"","data-disabled":r.disabled?"":void 0})),c={dataset:u,isOpen:a.isOpen,disabled:()=>r.disabled??!1,shouldMount:()=>r.forceMount||a.isOpen(),contentId:i,toggle:a.toggle,generateId:rn(()=>o.id),registerContentId:ct(s)};return f(I0.Provider,{value:c,get children(){return f(Re,H({as:"div"},u,o))}})}function N0(e){const t=kl(),[n,r]=se(e,["onClick"]);return f(ir,H({get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return J(()=>!!t.isOpen())()?t.contentId():void 0},get disabled(){return t.disabled()},onClick:i=>{ke(i,n.onClick),t.toggle()}},()=>t.dataset(),r))}var ka=Object.assign(R0,{Content:O0,Trigger:N0}),MS={};On(MS,{CloseButton:()=>L0,Content:()=>P0,Description:()=>$0,Dialog:()=>xr,Overlay:()=>F0,Portal:()=>B0,Root:()=>z0,Title:()=>U0,Trigger:()=>K0,useDialogContext:()=>Zr});var M0=it();function Zr(){const e=nt(M0);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function L0(e){const t=Zr(),[n,r]=se(e,["aria-label","onClick"]);return f(ir,H({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{ke(i,n.onClick),t.close()}},r))}function P0(e){let t;const n=Zr(),r=Se({id:n.generateId("content")},e),[o,i]=se(r,["ref","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1;const u=g=>{o.onPointerDownOutside?.(g),n.modal()&&g.detail.isContextMenu&&g.preventDefault()},c=g=>{o.onFocusOutside?.(g),n.modal()&&g.preventDefault()},l=g=>{o.onInteractOutside?.(g),!n.modal()&&(g.defaultPrevented||(s=!0,g.detail.originalEvent.type==="pointerdown"&&(a=!0)),Nt(n.triggerRef(),g.target)&&g.preventDefault(),g.detail.originalEvent.type==="focusin"&&a&&g.preventDefault())},d=g=>{o.onCloseAutoFocus?.(g),n.modal()?(g.preventDefault(),mt(n.triggerRef())):(g.defaultPrevented||(s||mt(n.triggerRef()),g.preventDefault()),s=!1,a=!1)};return _a({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),Ea({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),wa({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:d},()=>t),te(()=>oe(n.registerContentId(i.id))),f(G,{get when(){return n.contentPresent()},get children(){return f(Hi,H({ref(g){var h=Xe(p=>{n.setContentRef(p),t=p},o.ref);typeof h=="function"&&h(g)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return J(()=>!!n.modal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},get"data-expanded"(){return n.isOpen()?"":void 0},get"data-closed"(){return n.isOpen()?void 0:""},onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:l,get onDismiss(){return n.close}},i))}})}function $0(e){const t=Zr(),n=Se({id:t.generateId("description")},e),[r,o]=se(n,["id"]);return te(()=>oe(t.registerDescriptionId(r.id))),f(Re,H({as:"p",get id(){return r.id}},o))}function F0(e){const t=Zr(),[n,r]=se(e,["ref","style","onPointerDown"]),o=i=>{ke(i,n.onPointerDown),i.target===i.currentTarget&&i.preventDefault()};return f(G,{get when(){return t.overlayPresent()},get children(){return f(Re,H({as:"div",ref(i){var s=Xe(t.setOverlayRef,n.ref);typeof s=="function"&&s(i)},get style(){return En({"pointer-events":"auto"},n.style)},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onPointerDown:o},r))}})}function B0(e){const t=Zr();return f(G,{get when(){return t.contentPresent()||t.overlayPresent()},get children(){return f(Mi,e)}})}var mf={dismiss:"Dismiss"};function z0(e){const t=`dialog-${At()}`,n=Se({id:t,modal:!0,translations:mf},e),[r,o]=D(),[i,s]=D(),[a,u]=D(),[c,l]=D(),[d,g]=D(),[h,p]=D(),m=mo({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:E=>n.onOpenChange?.(E)}),b=()=>n.forceMount||m.isOpen(),{present:v}=nr({show:b,element:()=>c()??null}),{present:y}=nr({show:b,element:()=>d()??null}),x={translations:()=>n.translations??mf,isOpen:m.isOpen,modal:()=>n.modal??!0,preventScroll:()=>n.preventScroll??x.modal(),contentId:r,titleId:i,descriptionId:a,triggerRef:h,overlayRef:c,setOverlayRef:l,contentRef:d,setContentRef:g,overlayPresent:v,contentPresent:y,close:m.close,toggle:m.toggle,setTriggerRef:p,generateId:rn(()=>n.id),registerContentId:ct(o),registerTitleId:ct(s),registerDescriptionId:ct(u)};return f(M0.Provider,{value:x,get children(){return n.children}})}function U0(e){const t=Zr(),n=Se({id:t.generateId("title")},e),[r,o]=se(n,["id"]);return te(()=>oe(t.registerTitleId(r.id))),f(Re,H({as:"h2",get id(){return r.id}},o))}function K0(e){const t=Zr(),[n,r]=se(e,["ref","onClick"]);return f(ir,H({ref(i){var s=Xe(t.setTriggerRef,n.ref);typeof s=="function"&&s(i)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return J(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:i=>{ke(i,n.onClick),t.toggle()}},r))}var xr=Object.assign(z0,{CloseButton:L0,Content:P0,Description:$0,Overlay:F0,Portal:B0,Title:U0,Trigger:K0}),LS={};On(LS,{Checkbox:()=>Br,Control:()=>H0,Description:()=>q0,ErrorMessage:()=>G0,Indicator:()=>V0,Input:()=>W0,Label:()=>Y0,Root:()=>Z0,useCheckboxContext:()=>bo});var j0=it();function bo(){const e=nt(j0);if(e===void 0)throw new Error("[kobalte]: `useCheckboxContext` must be used within a `Checkbox` component");return e}function H0(e){const t=Rn(),n=bo(),r=Se({id:n.generateId("control")},e),[o,i]=se(r,["onClick","onKeyDown"]);return f(Re,H({as:"div",onClick:u=>{ke(u,o.onClick),n.toggle(),n.inputRef()?.focus({preventScroll:!0})},onKeyDown:u=>{ke(u,o.onKeyDown),u.key===aa.Space&&(n.toggle(),n.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),()=>n.dataset(),i))}function q0(e){const t=bo();return f(qi,H(()=>t.dataset(),e))}function G0(e){const t=bo();return f(Gi,H(()=>t.dataset(),e))}function V0(e){const t=Rn(),n=bo(),[r,o]=D(),i=Se({id:n.generateId("indicator")},e),[s,a]=se(i,["ref","forceMount"]),{present:u}=nr({show:()=>s.forceMount||n.indeterminate()||n.checked(),element:()=>r()??null});return f(G,{get when(){return u()},get children(){return f(Re,H({as:"div",ref(c){var l=Xe(o,s.ref);typeof l=="function"&&l(c)}},()=>t.dataset(),()=>n.dataset(),a))}})}function W0(e){let t;const n=Rn(),r=bo(),o=Se({id:r.generateId("input")},e),[i,s,a]=se(o,["ref","style","onChange","onFocus","onBlur"],Tm),{fieldProps:u}=Dm(s),[c,l]=D(!1),d=p=>{if(ke(p,i.onChange),p.stopPropagation(),!c()){const m=p.target;r.setIsChecked(m.checked),m.checked=r.checked()}l(!1)},g=p=>{ke(p,i.onFocus),r.setIsFocused(!0)},h=p=>{ke(p,i.onBlur),r.setIsFocused(!1)};return te(bt([()=>r.checked(),()=>r.value()],()=>{l(!0),t?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),t?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),te(bt([()=>t,()=>r.indeterminate(),()=>r.checked()],([p,m])=>{p&&(p.indeterminate=m)})),f(Re,H({as:"input",ref(p){var m=Xe(b=>{r.setInputRef(b),t=b},i.ref);typeof m=="function"&&m(p)},type:"checkbox",get id(){return u.id()},get name(){return n.name()},get value(){return r.value()},get checked(){return r.checked()},get required(){return n.isRequired()},get disabled(){return n.isDisabled()},get readonly(){return n.isReadOnly()},get style(){return En(ua,i.style)},get"aria-label"(){return u.ariaLabel()},get"aria-labelledby"(){return u.ariaLabelledBy()},get"aria-describedby"(){return u.ariaDescribedBy()},get"aria-invalid"(){return n.validationState()==="invalid"||void 0},get"aria-required"(){return n.isRequired()},get"aria-disabled"(){return n.isDisabled()},get"aria-readonly"(){return n.isReadOnly()},onChange:d,onFocus:g,onBlur:h},()=>n.dataset(),()=>r.dataset(),a))}function Y0(e){const t=bo();return f(xl,H(()=>t.dataset(),e))}function Z0(e){let t;const n=`checkbox-${At()}`,r=Se({value:"on",id:n},e),[o,i,s]=se(r,["ref","children","value","checked","defaultChecked","indeterminate","onChange","onPointerDown"],ml),[a,u]=D(),[c,l]=D(!1),{formControlContext:d}=bl(i),g=Wh({isSelected:()=>o.checked,defaultIsSelected:()=>o.defaultChecked,onSelectedChange:b=>o.onChange?.(b),isDisabled:()=>d.isDisabled(),isReadOnly:()=>d.isReadOnly()});wl(()=>t,()=>g.setIsSelected(o.defaultChecked??!1));const h=b=>{ke(b,o.onPointerDown),c()&&b.preventDefault()},p=ee(()=>({"data-checked":g.isSelected()?"":void 0,"data-indeterminate":o.indeterminate?"":void 0})),m={value:()=>o.value,dataset:p,checked:()=>g.isSelected(),indeterminate:()=>o.indeterminate??!1,inputRef:a,generateId:rn(()=>X(i.id)),toggle:()=>g.toggle(),setIsChecked:b=>g.setIsSelected(b),setIsFocused:l,setInputRef:u};return f(ha.Provider,{value:d,get children(){return f(j0.Provider,{value:m,get children(){return f(Re,H({as:"div",ref(b){var v=Xe(y=>t=y,o.ref);typeof v=="function"&&v(b)},role:"group",get id(){return X(i.id)},onPointerDown:h},()=>d.dataset(),p,s,{get children(){return f(PS,{state:m,get children(){return o.children}})}}))}})}})}function PS(e){const t=jo(()=>{const n=e.children;return Fi(n)?n(e.state):n});return J(t)}var Br=Object.assign(Z0,{Control:H0,Description:q0,ErrorMessage:G0,Indicator:V0,Input:W0,Label:Y0});function X0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=X0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function J0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=X0(e))&&(r&&(r+=" "),r+=t);return r}const $S=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},FS=(e,t)=>({classGroupId:e,validator:t}),Q0=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Hs="-",bf=[],BS="arbitrary..",zS=e=>{const t=KS(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return US(s);const a=s.split(Hs),u=a[0]===""&&a.length>1?1:0;return eb(a,u,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const u=r[s],c=n[s];return u?c?$S(c,u):u:c||bf}return n[s]||bf}}},eb=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=eb(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(Hs):e.slice(t).join(Hs),u=s.length;for(let c=0;c<u;c++){const l=s[c];if(l.validator(a))return l.classGroupId}},US=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?BS+r:void 0})(),KS=e=>{const{theme:t,classGroups:n}=e;return jS(n,t)},jS=(e,t)=>{const n=Q0();for(const r in e){const o=e[r];Al(o,n,r,t)}return n},Al=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];HS(s,t,n,r)}},HS=(e,t,n,r)=>{if(typeof e=="string"){qS(e,t,n);return}if(typeof e=="function"){GS(e,t,n,r);return}VS(e,t,n,r)},qS=(e,t,n)=>{const r=e===""?t:tb(t,e);r.classGroupId=n},GS=(e,t,n,r)=>{if(WS(e)){Al(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(FS(n,e))},VS=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,u]=o[s];Al(u,tb(t,a),n,r)}},tb=(e,t)=>{let n=e;const r=t.split(Hs),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=Q0(),n.nextPart.set(s,a)),n=a}return n},WS=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,YS=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},Oc="!",yf=":",ZS=[],vf=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),XS=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,u=0,c;const l=o.length;for(let m=0;m<l;m++){const b=o[m];if(s===0&&a===0){if(b===yf){i.push(o.slice(u,m)),u=m+1;continue}if(b==="/"){c=m;continue}}b==="["?s++:b==="]"?s--:b==="("?a++:b===")"&&a--}const d=i.length===0?o:o.slice(u);let g=d,h=!1;d.endsWith(Oc)?(g=d.slice(0,-1),h=!0):d.startsWith(Oc)&&(g=d.slice(1),h=!0);const p=c&&c>u?c-u:void 0;return vf(i,h,g,p)};if(t){const o=t+yf,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):vf(ZS,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},JS=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",u=t.has(s);a||u?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},QS=e=>({cache:YS(e.cacheSize),parseClassName:XS(e),sortModifiers:JS(e),postfixLookupClassGroupIds:eC(e),...zS(e)}),eC=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},tC=/\s+/,nC=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i,postfixLookupClassGroupIds:s}=t,a=[],u=e.trim().split(tC);let c="";for(let l=u.length-1;l>=0;l-=1){const d=u[l],{isExternal:g,modifiers:h,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:b}=n(d);if(g){c=d+(c.length>0?" "+c:c);continue}let v=!!b,y;if(v){const A=m.substring(0,b);y=r(A);const C=y&&s[y]?r(m):void 0;C&&C!==y&&(y=C,v=!1)}else y=r(m);if(!y){if(!v){c=d+(c.length>0?" "+c:c);continue}if(y=r(m),!y){c=d+(c.length>0?" "+c:c);continue}v=!1}const x=h.length===0?"":h.length===1?h[0]:i(h).join(":"),E=p?x+Oc:x,S=E+y;if(a.indexOf(S)>-1)continue;a.push(S);const T=o(y,v);for(let A=0;A<T.length;++A){const C=T[A];a.push(E+C)}c=d+(c.length>0?" "+c:c)}return c},rC=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=nb(n))&&(o&&(o+=" "),o+=r);return o},nb=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=nb(e[r]))&&(n&&(n+=" "),n+=t);return n},oC=(e,...t)=>{let n,r,o,i;const s=u=>{const c=t.reduce((l,d)=>d(l),e());return n=QS(c),r=n.cache.get,o=n.cache.set,i=a,a(u)},a=u=>{const c=r(u);if(c)return c;const l=nC(u,n);return o(u,l),l};return i=s,(...u)=>i(rC(...u))},iC=[],Rt=e=>{const t=n=>n[e]||iC;return t.isThemeGetter=!0,t},rb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ob=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,aC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,cC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,lC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Nr=e=>sC.test(e),He=e=>!!e&&!Number.isNaN(Number(e)),Wn=e=>!!e&&Number.isInteger(Number(e)),Qa=e=>e.endsWith("%")&&He(e.slice(0,-1)),mr=e=>aC.test(e),ib=()=>!0,fC=e=>uC.test(e)&&!cC.test(e),Tl=()=>!1,gC=e=>lC.test(e),pC=e=>dC.test(e),hC=e=>!we(e)&&!_e(e),mC=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),bC=e=>Xr(e,ub,Tl),we=e=>rb.test(e),to=e=>Xr(e,cb,fC),xf=e=>Xr(e,CC,He),yC=e=>Xr(e,db,ib),vC=e=>Xr(e,lb,Tl),wf=e=>Xr(e,sb,Tl),xC=e=>Xr(e,ab,pC),ps=e=>Xr(e,fb,gC),_e=e=>ob.test(e),Qo=e=>yo(e,cb),wC=e=>yo(e,lb),_f=e=>yo(e,sb),_C=e=>yo(e,ub),EC=e=>yo(e,ab),hs=e=>yo(e,fb,!0),SC=e=>yo(e,db,!0),Xr=(e,t,n)=>{const r=rb.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},yo=(e,t,n=!1)=>{const r=ob.exec(e);return r?r[1]?t(r[1]):n:!1},sb=e=>e==="position"||e==="percentage",ab=e=>e==="image"||e==="url",ub=e=>e==="length"||e==="size"||e==="bg-size",cb=e=>e==="length",CC=e=>e==="number",lb=e=>e==="family-name",db=e=>e==="number"||e==="weight",fb=e=>e==="shadow",kC=()=>{const e=Rt("color"),t=Rt("font"),n=Rt("text"),r=Rt("font-weight"),o=Rt("tracking"),i=Rt("leading"),s=Rt("breakpoint"),a=Rt("container"),u=Rt("spacing"),c=Rt("radius"),l=Rt("shadow"),d=Rt("inset-shadow"),g=Rt("text-shadow"),h=Rt("drop-shadow"),p=Rt("blur"),m=Rt("perspective"),b=Rt("aspect"),v=Rt("ease"),y=Rt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...E(),_e,we],T=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],C=()=>[_e,we,u],L=()=>[Nr,"full","auto",...C()],j=()=>[Wn,"none","subgrid",_e,we],$=()=>["auto",{span:["full",Wn,_e,we]},Wn,_e,we],V=()=>[Wn,"auto",_e,we],B=()=>["auto","min","max","fr",_e,we],N=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],R=()=>["auto",...C()],P=()=>[Nr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],ne=()=>[Nr,"screen","full","dvw","lvw","svw","min","max","fit",...C()],Y=()=>[Nr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],K=()=>[e,_e,we],ce=()=>[...E(),_f,wf,{position:[_e,we]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],k=()=>["auto","cover","contain",_C,bC,{size:[_e,we]}],O=()=>[Qa,Qo,to],Z=()=>["","none","full",c,_e,we],re=()=>["",He,Qo,to],F=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],le=()=>[He,Qa,_f,wf],ye=()=>["","none",p,_e,we],ae=()=>["none",He,_e,we],pe=()=>["none",He,_e,we],Ne=()=>[He,_e,we],Pe=()=>[Nr,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[mr],breakpoint:[mr],color:[ib],container:[mr],"drop-shadow":[mr],ease:["in","out","in-out"],font:[hC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[mr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[mr],shadow:[mr],spacing:["px",He],text:[mr],"text-shadow":[mr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Nr,we,_e,b]}],container:["container"],"container-type":[{"@container":["","normal","size",_e,we]}],"container-named":[mC],columns:[{columns:[He,we,_e,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{"inset-s":L(),start:L()}],end:[{"inset-e":L(),end:L()}],"inset-bs":[{"inset-bs":L()}],"inset-be":[{"inset-be":L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[Wn,"auto",_e,we]}],basis:[{basis:[Nr,"full","auto",a,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[He,Nr,"auto","initial","none",we]}],grow:[{grow:["",He,_e,we]}],shrink:[{shrink:["",He,_e,we]}],order:[{order:[Wn,"first","last","none",_e,we]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mbs:[{mbs:R()}],mbe:[{mbe:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:P()}],"inline-size":[{inline:["auto",...ne()]}],"min-inline-size":[{"min-inline":["auto",...ne()]}],"max-inline-size":[{"max-inline":["none",...ne()]}],"block-size":[{block:["auto",...Y()]}],"min-block-size":[{"min-block":["auto",...Y()]}],"max-block-size":[{"max-block":["none",...Y()]}],w:[{w:[a,"screen",...P()]}],"min-w":[{"min-w":[a,"screen","none",...P()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...P()]}],h:[{h:["screen","lh",...P()]}],"min-h":[{"min-h":["screen","lh","none",...P()]}],"max-h":[{"max-h":["screen","lh",...P()]}],"font-size":[{text:["base",n,Qo,to]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,SC,yC]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Qa,we]}],"font-family":[{font:[wC,vC,t]}],"font-features":[{"font-features":[we]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,_e,we]}],"line-clamp":[{"line-clamp":[He,"none",_e,xf]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",_e,we]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",_e,we]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:[He,"from-font","auto",_e,to]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[He,"auto",_e,we]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"tab-size":[{tab:[Wn,_e,we]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_e,we]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",_e,we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ce()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:k()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Wn,_e,we],radial:["",_e,we],conic:[Wn,_e,we]},EC,xC]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:O()}],"gradient-via-pos":[{via:O()}],"gradient-to-pos":[{to:O()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:Z()}],"rounded-s":[{"rounded-s":Z()}],"rounded-e":[{"rounded-e":Z()}],"rounded-t":[{"rounded-t":Z()}],"rounded-r":[{"rounded-r":Z()}],"rounded-b":[{"rounded-b":Z()}],"rounded-l":[{"rounded-l":Z()}],"rounded-ss":[{"rounded-ss":Z()}],"rounded-se":[{"rounded-se":Z()}],"rounded-ee":[{"rounded-ee":Z()}],"rounded-es":[{"rounded-es":Z()}],"rounded-tl":[{"rounded-tl":Z()}],"rounded-tr":[{"rounded-tr":Z()}],"rounded-br":[{"rounded-br":Z()}],"rounded-bl":[{"rounded-bl":Z()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-bs":[{"border-bs":re()}],"border-w-be":[{"border-be":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...F(),"hidden","none"]}],"divide-style":[{divide:[...F(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-bs":[{"border-bs":K()}],"border-color-be":[{"border-be":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...F(),"none","hidden"]}],"outline-offset":[{"outline-offset":[He,_e,we]}],"outline-w":[{outline:["",He,Qo,to]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",l,hs,ps]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",d,hs,ps]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[He,to]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",g,hs,ps]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[He,_e,we]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[He]}],"mask-image-linear-from-pos":[{"mask-linear-from":le()}],"mask-image-linear-to-pos":[{"mask-linear-to":le()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":le()}],"mask-image-t-to-pos":[{"mask-t-to":le()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":le()}],"mask-image-r-to-pos":[{"mask-r-to":le()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":le()}],"mask-image-b-to-pos":[{"mask-b-to":le()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":le()}],"mask-image-l-to-pos":[{"mask-l-to":le()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":le()}],"mask-image-x-to-pos":[{"mask-x-to":le()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":le()}],"mask-image-y-to-pos":[{"mask-y-to":le()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[_e,we]}],"mask-image-radial-from-pos":[{"mask-radial-from":le()}],"mask-image-radial-to-pos":[{"mask-radial-to":le()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[He]}],"mask-image-conic-from-pos":[{"mask-conic-from":le()}],"mask-image-conic-to-pos":[{"mask-conic-to":le()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ce()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:k()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",_e,we]}],filter:[{filter:["","none",_e,we]}],blur:[{blur:ye()}],brightness:[{brightness:[He,_e,we]}],contrast:[{contrast:[He,_e,we]}],"drop-shadow":[{"drop-shadow":["","none",h,hs,ps]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",He,_e,we]}],"hue-rotate":[{"hue-rotate":[He,_e,we]}],invert:[{invert:["",He,_e,we]}],saturate:[{saturate:[He,_e,we]}],sepia:[{sepia:["",He,_e,we]}],"backdrop-filter":[{"backdrop-filter":["","none",_e,we]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[He,_e,we]}],"backdrop-contrast":[{"backdrop-contrast":[He,_e,we]}],"backdrop-grayscale":[{"backdrop-grayscale":["",He,_e,we]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[He,_e,we]}],"backdrop-invert":[{"backdrop-invert":["",He,_e,we]}],"backdrop-opacity":[{"backdrop-opacity":[He,_e,we]}],"backdrop-saturate":[{"backdrop-saturate":[He,_e,we]}],"backdrop-sepia":[{"backdrop-sepia":["",He,_e,we]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",_e,we]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[He,"initial",_e,we]}],ease:[{ease:["linear","initial",v,_e,we]}],delay:[{delay:[He,_e,we]}],animate:[{animate:["none",y,_e,we]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,_e,we]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:pe()}],"scale-x":[{"scale-x":pe()}],"scale-y":[{"scale-y":pe()}],"scale-z":[{"scale-z":pe()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[_e,we,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Pe()}],"translate-x":[{"translate-x":Pe()}],"translate-y":[{"translate-y":Pe()}],"translate-z":[{"translate-z":Pe()}],"translate-none":["translate-none"],zoom:[{zoom:[Wn,_e,we]}],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",_e,we]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":K()}],"scrollbar-track-color":[{"scrollbar-track":K()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",_e,we]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[He,Qo,to,xf]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},AC=oC(kC);function tt(...e){return AC(J0(e))}const _=Wc.t,gb=Wc.useTranslation;var TC=M("<div>"),DC=M("<div class=min-w-0>");const IC={"top-left":"left-0 top-0 items-start","top-right":"right-0 top-0 items-end","bottom-left":"bottom-0 left-0 items-start","bottom-right":"bottom-0 right-0 items-end","top-center":"left-0 right-0 top-0 items-center","bottom-center":"bottom-0 left-0 right-0 items-center"},OC={default:"border-border",success:"border-success/40 text-success",info:"border-info/40 text-info",warning:"border-warning/40 text-warning",error:"border-destructive/40 text-destructive",loading:"border-border"};function RC(e){switch(e.type){case"success":return f(kx,{class:"h-4 w-4"});case"info":return f(Kx,{class:"h-4 w-4"});case"warning":case"error":return f(Kw,{class:"h-4 w-4"});case"loading":return f(kn,{class:"h-4 w-4 animate-spin"});default:return null}}function NC(e){return f(oo,{get toastId(){return e.toastId},get duration(){return e.duration},get persistent(){return e.persistent},get priority(){return e.priority},get class(){return tt("pointer-events-auto relative inline-flex w-fit max-w-[calc(100vw-2rem)] items-start gap-3 overflow-hidden rounded-md border bg-background px-4 py-3 text-sm text-foreground shadow-lg outline-none","data-[closed]:animate-out data-[opened]:animate-in data-[closed]:fade-out-0 data-[opened]:fade-in-0 data-[closed]:zoom-out-95 data-[opened]:zoom-in-95","data-[swipe=move]:translate-x-[var(--kb-toast-swipe-move-x)] data-[swipe=move]:translate-y-[var(--kb-toast-swipe-move-y)] data-[swipe=move]:transition-none","data-[swipe=end]:animate-out data-[swipe=end]:fade-out-0 sm:max-w-md")},get children(){return[(()=>{var t=TC();return w(t,f(RC,{get type(){return e.type}})),Le(()=>xt(t,tt("shrink-0 self-center",OC[e.type]))),t})(),(()=>{var t=DC();return w(t,f(oo.Title,{class:"font-medium leading-5",get children(){return e.title}}),null),w(t,(()=>{var n=J(()=>!!e.description);return()=>n()?f(oo.Description,{class:"mt-1 max-w-[22rem] leading-5 text-muted-foreground",get children(){return e.description}}):null})(),null),t})(),f(oo.CloseButton,{class:"ml-2 inline-flex h-5 w-5 shrink-0 self-center items-center justify-center rounded-sm text-muted-foreground opacity-70 transition-[opacity,box-shadow] hover:opacity-100 focus:outline-none focus:ring-[1.5px] focus:ring-ring",get"aria-label"(){return _("common.close")},get children(){return f(Gr,{class:"h-4 w-4"})}})]}})}function Ao(e,t,n={}){return _i.show(r=>f(NC,{get toastId(){return r.toastId},type:e,title:t,get description(){return n.description},get duration(){return n.duration},get persistent(){return n.persistent},get priority(){return n.priority}}),{region:n.region})}const Ct=Object.assign((e,t)=>Ao("default",e,t),{success:(e,t)=>Ao("success",e,t),info:(e,t)=>Ao("info",e,t),warning:(e,t)=>Ao("warning",e,t),error:(e,t)=>Ao("error",e,t),loading:(e,t)=>Ao("loading",e,t),dismiss:e=>{if(typeof e=="number")return _i.dismiss(e);_i.clear()}}),MC=e=>{const[t,n]=se(e,["position","duration","visibleToasts","class"]);return f(oo.Region,H({get duration(){return t.duration??5e3},get limit(){return t.visibleToasts??3},swipeDirection:"right",get class(){return tt("!pointer-events-none fixed z-[100] flex max-h-screen w-full flex-col gap-2 p-4 sm:p-6",IC[t.position??"bottom-right"],t.class)}},n,{get children(){return f(oo.List,{class:"flex w-fit max-w-full flex-col gap-2 outline-none"})}}))};async function pb(e){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(p_(e)),Ct.success(_("specDetail.specPathCopied"))}catch{Ct.error(_("specDetail.specPathCopyFailed"))}}function LC(e,t){return e.some(n=>n.status==="running")||t.some(n=>n.running)}async function Ef(e,t){const[n,r]=await Promise.all([t.listCommandRuns(e),t.listSessions(e)]);return!LC(n,r)}function PC(e,t=()=>{}){let n=!1;async function r(o){if(!n){n=!0,t(!0);try{return await o()}finally{n=!1,t(!1)}}}return{async check(o){const i=await r(()=>Ef(o,e));return i===void 0?"busy":i?"allowed":"running"},async merge(o,i){return await r(async()=>await Ef(o,e)?{status:"merged",value:await i()}:{status:"blocked",reason:"running"})??{status:"blocked",reason:"busy"}}}}const Sf=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Cf=J0,hb=(e,t)=>n=>{var r;if(t?.variants==null)return Cf(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const l=n?.[c],d=i?.[c];if(l===null)return null;const g=Sf(l)||Sf(d);return o[c][g]}),a=n&&Object.entries(n).reduce((c,l)=>{let[d,g]=l;return g===void 0||(c[d]=g),c},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,l)=>{let{class:d,className:g,...h}=l;return Object.entries(h).every(p=>{let[m,b]=p;return Array.isArray(b)?b.includes({...i,...a}[m]):{...i,...a}[m]===b})?[...c,d,g]:c},[]);return Cf(e,s,u,n?.class,n?.className)},$C=hb("inline-flex items-center justify-center rounded-md font-medium transition-[color,background-color,box-shadow] focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-2 text-sm",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Ee=e=>{const[t,n]=se(e,["class","variant","size"]);return f(Lh,H({get class(){return tt($C({size:t.size,variant:t.variant}),t.class)}},n))};var FC=M("<div>");const BC=hb("inline-flex items-center rounded-md border px-2.5 py-0.5 text-sm font-semibold transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),mb=e=>{const[t,n]=se(e,["class","variant"]);return(()=>{var r=FC();return rr(r,H({get class(){return tt(BC({variant:t.variant}),t.class)}},n),!1,!1),r})()},Wi=()=>{const e=()=>wr()?_("specDetail.exitFullscreen"):_("specDetail.fullscreen");return f(Ee,{variant:"outline",size:"sm",class:"h-6 w-6 shrink-0 p-0",onClick:xh,get title(){return e()},get"aria-label"(){return e()},get"aria-pressed"(){return wr()},get children(){return f(G,{get when(){return wr()},get fallback(){return f(Zx,{class:"h-3 w-3"})},get children(){return f(nw,{class:"h-3 w-3"})}})}})};var zC=M("<input>");const Er=e=>{const[t,n]=se(e,["class"]);return(()=>{var r=zC();return rr(r,H({get class(){return tt("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 shadow-sm transition-shadow file:border-0 file:bg-transparent file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n),!1,!1),r})()},Dl=wn.Trigger;wn.Group;const kf=wn.Sub;wn.RadioGroup;const Il=e=>{const t=H({gutter:4,flip:!1},e);return f(wn,t)},Ol=e=>{const[t,n]=se(e,["class"]);return f(wn.Portal,{get children(){return f(wn.Content,H({get class(){return tt("min-w-8rem z-50 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})},Zn=e=>{const[t,n]=se(e,["class","inset"]);return f(wn.Item,H({get class(){return tt("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.inset&&"pl-8",t.class)}},n))},Af=e=>{const[t,n]=se(e,["class","children"]);return f(wn.SubTrigger,H({get class(){return tt("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[expanded]:bg-accent data-[expanded]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.class)}},n,{get children(){return[J(()=>t.children),f(ph,{class:"ml-auto h-4 w-4 text-muted-foreground"})]}}))},Tf=e=>{const[t,n]=se(e,["class"]);return f(wn.Portal,{get children(){return f(wn.SubContent,H({get class(){return tt("min-w-8rem z-50 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md focus-visible:outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})},Rc=e=>{const[t,n]=se(e,["class"]);return f(wn.Separator,H({get class(){return tt("-mx-1 my-1 h-px bg-muted",t.class)}},n))};var UC=M('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M18 6L6 18M6 6l12 12"></path><title>Close'),bb=M("<div>");const cn=xr;xr.Trigger;const Sr=e=>{const[t,n]=se(e,["class","children"]);return f(xr.Portal,{get children(){return[f(xr.Overlay,{class:"fixed inset-0 z-50 bg-background/80 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0"}),f(xr.Content,{get class(){return tt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg data-[closed]:duration-200 data-[expanded]:duration-200 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95 data-[closed]:slide-out-to-left-1/2 data-[closed]:slide-out-to-top-[48%] data-[expanded]:slide-in-from-left-1/2 data-[expanded]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",t.class)},get children(){return[J(()=>t.children),f(xr.CloseButton,{class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-[opacity,box-shadow] hover:opacity-100 focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",get children(){return UC()}})]}})]}})},Cr=e=>{const[t,n]=se(e,["class"]);return f(xr.Title,H({get class(){return tt("text-lg font-semibold text-foreground",t.class)}},n))},Aa=e=>{const[t,n]=se(e,["class"]);return f(xr.Description,H({get class(){return tt(" text-muted-foreground",t.class)}},n))},kr=e=>{const[t,n]=se(e,["class"]);return(()=>{var r=bb();return rr(r,H({get class(){return tt("flex flex-col space-y-2 text-center sm:text-left",t.class)}},n),!1,!1),r})()},Hr=e=>{const[t,n]=se(e,["class"]);return(()=>{var r=bb();return rr(r,H({get class(){return tt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t.class)}},n),!1,!1),r})()};var KC=M('<p class="m-0 text-destructive">'),jC=M('<form class="grid gap-4"><label class="grid gap-2 text-sm font-medium"for=command-name></label><label class="grid gap-2 text-sm font-medium"for=command-cli>'),HC=M('<div class="flex items-center">'),qC=M('<div class="px-2 py-1.5 text-sm text-muted-foreground">'),GC=M('<span class="flex min-w-0 flex-col"><span class=truncate></span><span class="truncate font-mono text-[11px] text-muted-foreground">'),VC=M('<button type=button class="shrink-0 rounded p-1 opacity-0 transition-opacity hover:bg-muted group-hover:opacity-100">');const WC=e=>{const t=go(),[n,{refetch:r}]=Wt(e.projectId,v=>v?me.listCommands(v):Promise.resolve([])),[o,i]=D(!1),[s,a]=D(""),[u,c]=D(""),[l,d]=D(!1),[g,h]=D(null);async function p(v){const y=e.projectId();if(y)try{const x=await me.runCommand(y,v.id);Ct.success(_("commands.started")),e.onRunStarted?.(),t(Mt(`commands/${encodeURIComponent(x.runId)}`))}catch(x){Ct.error(x.message)}}async function m(v){const y=e.projectId();if(y)try{await me.deleteCommand(y,v.id),await r()}catch(x){Ct.error(x.message)}}async function b(v){v.preventDefault();const y=e.projectId();if(!y)return;const x=s().trim(),E=u().trim();if(!(!x||!E)){d(!0),h(null);try{await me.createCommand(y,{name:x,cli:E}),a(""),c(""),i(!1),await r()}catch(S){h(S.message)}finally{d(!1)}}}return(()=>{var v=HC();return w(v,f(Il,{placement:"bottom-start",get children(){return[f(Dl,{as:Ee,variant:"ghost",size:"icon",class:"h-8 w-8",get title(){return _("commands.menuTitle")},get children(){return f($w,{class:"h-4 w-4"})}}),f(Ol,{class:"min-w-56",get children(){return[f(G,{get when(){return(n()??[]).length>0},get fallback(){return(()=>{var y=qC();return w(y,()=>_("commands.empty")),y})()},get children(){return f(rt,{get each(){return n()??[]},children:y=>f(Zn,{class:"group flex items-center justify-between gap-2",onSelect:()=>void p(y),get children(){return[(()=>{var x=GC(),E=x.firstChild,S=E.nextSibling;return w(E,()=>y.name),w(S,()=>y.cli),x})(),(()=>{var x=VC();return x.$$click=E=>{E.stopPropagation(),E.preventDefault(),m(y)},x.$$keydown=E=>E.stopPropagation(),x.$$pointerup=E=>E.stopPropagation(),x.$$pointerdown=E=>E.stopPropagation(),w(x,f(Jc,{class:"h-3.5 w-3.5 text-destructive"})),Le(()=>Ge(x,"title",_("commands.deleteDef"))),x})()]}})})}}),f(Rc,{}),f(Zn,{onSelect:()=>i(!0),get children(){return[f(Pi,{class:"mr-1 h-4 w-4"}),J(()=>_("commands.add"))]}})]}})]}}),null),w(v,f(cn,{get open(){return o()},onOpenChange:y=>{i(y),y||h(null)},get children(){return f(Sr,{class:"max-w-md",get children(){return[f(kr,{get children(){return f(Cr,{get children(){return _("commands.addTitle")}})}}),(()=>{var y=jC(),x=y.firstChild,E=x.nextSibling;return y.addEventListener("submit",S=>void b(S)),w(x,()=>_("commands.name"),null),w(x,f(Er,{id:"command-name",get value(){return s()},get placeholder(){return _("commands.namePlaceholder")},onInput:S=>a(S.currentTarget.value),get disabled(){return l()}}),null),w(E,()=>_("commands.cli"),null),w(E,f(Er,{id:"command-cli",get value(){return u()},get placeholder(){return _("commands.cliPlaceholder")},onInput:S=>c(S.currentTarget.value),get disabled(){return l()}}),null),w(y,f(G,{get when(){return g()},get children(){var S=KC();return w(S,g),S}}),null),w(y,f(Hr,{get children(){return[f(Ee,{type:"button",variant:"outline",onClick:()=>i(!1),get disabled(){return l()},get children(){return _("common.cancel")}}),f(Ee,{type:"submit",get disabled(){return l()||!s().trim()||!u().trim()},get children(){return J(()=>!!l())()?_("common.submitting"):_("commands.submit")}})]}}),null),y})()]}})}}),null),v})()};dn(["pointerdown","pointerup","keydown","click"]);var YC=M("<span>");const ZC={running:"text-success",exited:"text-muted-foreground",killed:"text-warning",failed:"text-destructive"},yb=e=>(()=>{var t=YC();return w(t,()=>_(`commands.status.${e.status}`)),Le(()=>xt(t,`shrink-0 text-xs font-medium ${ZC[e.status]} ${e.class??""}`)),t})();var XC=M('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M18 6L6 18M6 6l12 12"></path><title>Close');const Rl=Fr.Trigger,JC=Fr.Title;Fr.Description;const Nl=e=>{const t=H({gutter:4,flip:!1},e);return f(Fr,t)},Ml=e=>{const[t,n]=se(e,["class","children"]);return f(Fr.Portal,{get children(){return f(Fr.Content,H({get class(){return tt("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n,{get children(){return[J(()=>t.children),f(Fr.CloseButton,{class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-[opacity,box-shadow] hover:opacity-100 focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",get children(){return XC()}})]}}))}})};function vb(e,t,n){const r=Math.max(0,(t??n)-e),o=Math.floor(r/1e3),i=Math.floor(o/3600),s=Math.floor(o%3600/60),a=o%60,u=c=>String(c).padStart(2,"0");return i>0?`${i}:${u(s)}:${u(a)}`:`${s}:${u(a)}`}var QC=M('<section class=mt-3><h2 class="m-0 mb-1.5 text-sm font-medium text-muted-foreground"></h2><ul class="grid list-none gap-2 p-0 [grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),1fr))]">'),ek=M('<span class="truncate font-medium">'),tk=M('<span class="truncate font-mono text-xs text-muted-foreground">'),nk=M('<span class="ml-auto shrink-0 font-mono text-xs text-muted-foreground">'),rk=M('<p class="m-0 text-sm font-medium">'),ok=M('<p class="mb-3 mt-1 text-xs text-muted-foreground">'),ik=M('<div class="flex justify-end">'),sk=M('<li class="flex items-center gap-3 rounded-lg border bg-card px-3 py-2"><div>');const ak=e=>{const[t,{refetch:n,mutate:r}]=Wt(e.projectId,h=>h?me.listCommandRuns(h):Promise.resolve([])),[o,i]=D(Date.now()),[s,a]=D(null),[u,c]=D(null),l=setInterval(()=>i(Date.now()),1e3);oe(()=>clearInterval(l)),te(()=>{e.revision?.(),n()}),te(()=>{const h=e.projectId();if(!h)return;const p=u_(h,m=>r(m));oe(p)});async function d(h){const p=e.projectId();if(p){a(h.runId);try{await me.clearCommandRun(p,h.runId),await n()}catch(m){Ct.error(m.message)}finally{a(null)}}}async function g(h){const p=e.projectId();if(p){c(h.runId);try{await me.clearCommandRun(p,h.runId),await me.runCommand(p,h.commandId),Ct.success(_("commands.restarted")),await n()}catch(m){Ct.error(m.message)}finally{c(null)}}}return f(G,{get when(){return(t()??[]).length>0},get children(){var h=QC(),p=h.firstChild,m=p.nextSibling;return w(p,()=>_("commands.running")),w(m,f(rt,{get each(){return t()??[]},children:b=>(()=>{var v=sk(),y=v.firstChild;return w(v,f(Pn,{get href(){return Mt(`commands/${encodeURIComponent(b.runId)}`)},class:"flex min-w-0 flex-1 items-center gap-3",get children(){return[f(yb,{get status(){return b.status}}),(()=>{var x=ek();return w(x,()=>b.name),x})(),(()=>{var x=tk();return w(x,()=>b.cli),x})(),(()=>{var x=nk();return w(x,()=>vb(b.startedAt,b.endedAt,o())),x})()]}}),y),w(y,f(Ee,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return _("commands.restart")},get disabled(){return u()===b.runId||s()===b.runId},onClick:()=>void g(b),get children(){return f(ww,{class:"h-4 w-4"})}}),null),w(y,f(Nl,{get children(){return[f(Rl,{as:Ee,variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return _("commands.clear")},get disabled(){return u()===b.runId},get children(){return f(Gr,{class:"h-4 w-4"})}}),f(Ml,{class:"w-72",get children(){return[(()=>{var x=rk();return w(x,()=>_("commands.clearTitle")),x})(),(()=>{var x=ok();return w(x,()=>_("commands.clearDescription")),x})(),(()=>{var x=ik();return w(x,f(Ee,{variant:"destructive",size:"sm",get disabled(){return s()===b.runId},onClick:()=>void d(b),get children(){return J(()=>s()===b.runId)()?_("common.deleting"):_("commands.clear")}})),x})()]}})]}}),null),v})()})),h}})};var uk=M('<span class=" text-muted-foreground">'),ck=M('<span class=" text-destructive">'),lk=M('<div class="mt-2 flex flex-wrap items-center gap-3"><div class="flex items-center gap-2"><span class=" text-muted-foreground">'),dk=M('<ul class="mt-4 grid list-none gap-3 p-0 [grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),1fr))]">'),fk=M('<div class="py-6 text-center text-sm text-muted-foreground">'),Df=M('<p class=" text-destructive">'),gk=M('<form class="grid gap-4"><label class="grid gap-2 text-sm font-medium"for=merge-commit-message>'),pk=M('<section class="overflow-y-auto p-2"><header class="flex items-center justify-between"><div class="flex items-center gap-2"><h1 class="mr-2 text-xl">'),hk=M('<p class=" text-muted-foreground">'),mk=M('<div class="mt-4 flex flex-col items-center gap-3 rounded-xl border border-dashed bg-card p-12"><p>'),bk=M('<div class="flex items-center justify-between text-sm text-muted-foreground"><time>'),yk=M('<h2 class="my-1.5 text-base font-semibold">'),vk=M('<p class="m-0 mb-3 flex-1 text-muted-foreground">'),xk=M('<code class="mt-auto block break-all font-mono text-sm text-muted-foreground">'),wk=M('<li class="group relative flex rounded-xl border bg-card shadow transition-transform hover:-translate-y-px"><div class="absolute right-1.5 top-1.5 z-[2] opacity-0 transition-opacity group-hover:opacity-100">'),If=M("<span>."),_k=M("<span>");const eu=40,Ek=()=>{const e=go(),t=po(),[n,{refetch:r}]=Wt(t,k=>k?me.listSpecs(k):Promise.resolve([])),[o,{refetch:i}]=Wt(()=>me.listProjects()),s=ee(()=>(o()??[]).find(k=>k.id===t())),a=ee(()=>{const k=s();return k?.worktree?(o()??[]).some(O=>O.id===k.worktree.mainProjectId):!0}),u=ee(()=>{const k=s();return k?.worktree?`feat(${k.worktree.branch}): merge from worktree`:""}),[c,l]=D(!1),[d,g]=D(!1),[h,p]=D(null),[m,b]=D(!1),[v,y]=D(""),[x,E]=D(null),[S,T]=D(0),[A,C]=D(!1),[L,j]=D(null),$=PC(me,g);$i(()=>m()||x()!==null);const[V,B]=D(eu),N=ee(()=>(n()??[]).slice(0,V())),W=ee(()=>V()<(n()??[]).length),[R,P]=D(null);te(()=>{t(),B(eu)}),Dn(()=>{const k=new IntersectionObserver(O=>{if(!O.some(re=>re.isIntersecting))return;const Z=(n()??[]).length;B(re=>re>=Z?re:Math.min(re+eu,Z))},{rootMargin:"300px"});te(()=>{const O=R();V(),O&&(k.observe(O),oe(()=>k.unobserve(O)))}),oe(()=>k.disconnect())});let ne=null;te(()=>{const k=t();ne?.(),ne=null,k&&(ne=_h(k,()=>{r()}))}),Dn(()=>{const k=Eh(()=>{(async()=>{const O=s()?.worktree?.mainProjectId??null;await i();const Z=t();!Z||(o()??[]).some(F=>F.id===Z)||O&&e(`/${encodeURIComponent(O)}`)})()});oe(k)}),oe(()=>{ne?.(),ne=null});async function Y(){const k=t();if(!k)return!1;p(null);try{const O=await $.check(k);return O==="running"?(p(_("home.runningTasksPreventMerge")),!1):O==="allowed"}catch(O){return p(O.message),!1}}async function K(){s()?.worktree&&a()&&await Y()&&(y(u()),p(null),b(!0))}async function ce(){const k=s();if(!k?.worktree||!a())return;const O=v().trim()||u();p(null);try{const Z=await $.merge(k.id,async()=>{l(!0);try{return await me.mergeWorktreeToMain(k.id,{commitMessage:O})}finally{l(!1)}});if(Z.status==="blocked"){Z.reason==="running"&&p(_("home.runningTasksPreventMerge"));return}const re=Z.value;b(!1),re.status==="merged"?(Ct.success(_("home.merged")),await i(),e(`/${encodeURIComponent(re.mainProjectId)}`)):(Ct.info(_("home.conflictDispatched")),await i(),e(`/${encodeURIComponent(re.mainProjectId)}/specs/${encodeURIComponent(re.conflictSpecId)}`))}catch(Z){p(Z.message)}}async function z(k){const O=t();if(O){C(!0),j(null);try{await me.deleteSpec(O,k),E(null),await r()}catch(Z){j(Z.message)}finally{C(!1)}}}return(()=>{var k=pk(),O=k.firstChild,Z=O.firstChild,re=Z.firstChild;return w(re,()=>_("home.specList")),w(Z,f(WC,{projectId:t,onRunStarted:()=>T(F=>F+1)}),null),w(Z,f(Ee,{as:Pn,get href(){return Mt("git")},variant:"ghost",size:"icon",class:"h-8 w-8",get title(){return _("git.title")},get children(){return f(Xc,{class:"h-4 w-4"})}}),null),w(O,f(Wi,{}),null),w(k,f(ak,{projectId:t,revision:S}),null),w(k,f(G,{get when(){return s()?.worktree},get children(){var F=lk(),q=F.firstChild,le=q.firstChild;return w(le,()=>_("home.mainProject"),null),w(le,()=>s().worktree.mainPath.split("/").filter(Boolean).pop()??s().worktree.mainPath,null),w(F,f(Ee,{variant:"default",size:"sm",onClick:()=>void K(),get disabled(){return c()||d()||!a()},get title(){return J(()=>!!a())()?_("home.mergeHint"):_("home.mainUnreachable")},get children(){return[f(mh,{class:"mr-1 h-3.5 w-3.5"}),J(()=>J(()=>!!c())()?_("home.merging"):_("home.mergeToMain"))]}}),null),w(F,f(G,{get when(){return!a()},get children(){var ye=uk();return w(ye,()=>_("home.mainUnreachable")),ye}}),null),w(F,f(G,{get when(){return h()},get children(){var ye=ck();return w(ye,h),ye}}),null),F}}),null),w(k,f(na,{get fallback(){return(()=>{var F=hk();return w(F,()=>_("common.loading")),F})()},get children(){return f(G,{get when(){return(n()??[]).length>0},get fallback(){return(()=>{var F=mk(),q=F.firstChild;return w(q,()=>_("home.noSpecs")),w(F,f(Ee,{as:Pn,get href(){return Mt("specs/new")},variant:"default",size:"sm",get children(){return[f(Pi,{class:"mr-1 h-4 w-4"}),J(()=>_("home.createFirst"))]}}),null),F})()},get children(){return[(()=>{var F=dk();return w(F,f(rt,{get each(){return N()},children:q=>{const le=Ch(q.id);return(()=>{var ye=wk(),ae=ye.firstChild;return w(ye,f(Pn,{get href(){return Mt(`specs/${encodeURIComponent(q.id)}`)},class:"flex min-h-40 flex-1 flex-col p-4",get children(){return[(()=>{var pe=bk(),Ne=pe.firstChild;return w(pe,f(mb,{variant:"outline",get class(){return`font-mono ${d_[q.stage]??"bg-muted text-muted-foreground border-border"} uppercase tracking-wider`},get children(){return q.stage}}),Ne),w(Ne,()=>Sh(q.updated_at)),pe})(),(()=>{var pe=yk();return w(pe,()=>q.title||_("common.pendingAgent")),pe})(),(()=>{var pe=vk();return w(pe,()=>q.summary||_("common.pendingAgent")),pe})(),(()=>{var pe=xk();return w(pe,f(G,{when:le,get fallback(){return q.id},children:Ne=>[(()=>{var Pe=If(),Ke=Pe.firstChild;return w(Pe,()=>Ne().prefix,Ke),Pe})(),(()=>{var Pe=_k();return w(Pe,()=>Ne().type),Le(()=>xt(Pe,`font-semibold ${f_[Ne().type]??"text-foreground"}`)),Pe})(),(()=>{var Pe=If();return Pe.firstChild,w(Pe,()=>Ne().suffix,null),Pe})()]})),pe})()]}}),ae),w(ae,f(Il,{placement:"bottom-end",get children(){return[f(Dl,{as:Ee,variant:"ghost",size:"icon",class:"h-7 w-7",get title(){return _("home.moreActions")},get children(){return f(Lx,{class:"h-4 w-4"})}}),f(Ol,{get children(){return[f(Zn,{onSelect:()=>void pb(q.id),get children(){return _("home.copySpecPath")}}),f(Zn,{class:"text-destructive focus:text-destructive",onSelect:()=>E(q.id),get children(){return _("common.delete")}})]}})]}})),ye})()}})),F})(),f(G,{get when(){return W()},get children(){var F=fk();return Bn(q=>P(q),F),w(F,()=>_("common.loading")),F}})]}})}}),null),w(k,f(cn,{get open(){return m()},onOpenChange:F=>{b(F),F||p(null)},get children(){return f(Sr,{class:"max-w-md",get children(){return[f(kr,{get children(){return[f(Cr,{get children(){return _("home.mergeDialogTitle")}}),f(Aa,{get children(){return _("home.mergeDialogDescription")}})]}}),(()=>{var F=gk(),q=F.firstChild;return F.addEventListener("submit",le=>{le.preventDefault(),ce()}),w(q,()=>_("home.mergeCommitMessage"),null),w(q,f(Er,{id:"merge-commit-message",get value(){return v()},onInput:le=>y(le.currentTarget.value),get disabled(){return c()}}),null),w(F,f(G,{get when(){return h()},get children(){var le=Df();return w(le,h),le}}),null),w(F,f(Hr,{get children(){return[f(Ee,{type:"button",variant:"outline",onClick:()=>b(!1),get disabled(){return c()},get children(){return _("common.cancel")}}),f(Ee,{type:"submit",get disabled(){return c()||d()||!a()},get children(){return J(()=>!!c())()?_("home.merging"):_("home.mergeToMain")}})]}}),null),F})()]}})}}),null),w(k,f(cn,{get open(){return x()!==null},onOpenChange:F=>{F||(E(null),j(null))},get children(){return f(Sr,{class:"max-w-sm",get children(){return[f(kr,{get children(){return f(Cr,{get children(){return _("home.confirmDeleteSpec")}})}}),f(G,{get when(){return L()},get children(){var F=Df();return w(F,L),F}}),f(Hr,{get children(){return[f(Ee,{variant:"outline",onClick:()=>E(null),get disabled(){return A()},get children(){return _("common.cancel")}}),f(Ee,{variant:"destructive",onClick:()=>x()&&void z(x()),get disabled(){return A()},get children(){return J(()=>!!A())()?_("common.deleting"):_("common.confirmDelete")}})]}})]}})}}),null),k})()},xb="image/*,application/pdf,text/plain,text/markdown,.md,.txt,.markdown",Sk=5*1024*1024,$o=10,Ck=new Set(["application/pdf","text/plain","text/markdown"]);function kk(e){const t=e.type;return t.startsWith("image/")?"image":t==="application/pdf"?"pdf":t==="text/plain"||t==="text/markdown"||t===""&&/\.(md|markdown|txt)$/i.test(e.name)?"text":null}function Ak(e){return e.type?e:/\.md$/i.test(e.name)||/\.markdown$/i.test(e.name)?new File([e],e.name,{type:"text/markdown"}):/\.txt$/i.test(e.name)?new File([e],e.name,{type:"text/plain"}):e}function Of(e){const t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}function Tk(){return Math.random().toString(36).slice(2,8)}function wb(e){const t=e.labels,[n,r]=D([]),[o,i]=D(null),[s,a]=D(null),[u,c]=D(null),[l,d]=D(""),g=ee(()=>n().length),h=ee(()=>n().some($=>$.status==="pending")),p=ee(()=>n().some($=>$.status==="failed"));oe(()=>{for(const $ of n())$.previewUrl&&URL.revokeObjectURL($.previewUrl)});async function m(){const $=o();if($)return $;const{draftId:V}=await me.createDraft(e.projectId());return i(V),V}function b($){r(V=>[...V,$])}function v($,V){r(B=>B.map(N=>N.id===$?{...N,...V}:N))}function y($){r(V=>{const B=[];for(const N of V){if(N.id===$){N.previewUrl&&URL.revokeObjectURL(N.previewUrl);continue}B.push(N)}return B})}async function x($){a(null);const V=n(),B=$o-V.length;if(B<=0){a(t.attachmentLimit($o));return}const N=[];for(const W of $.slice(0,B)){const R=Ak(W),P=kk(R);if(!P){a(t.unsupportedType(R.name));continue}if(P!=="image"&&!Ck.has(R.type)){a(t.unsupportedMime(R.type||"(unknown)"));continue}if(R.size>Sk){a(t.fileTooLarge(R.name));continue}const ne=`att-${Date.now()}-${Tk()}`,Y=P==="image"?URL.createObjectURL(R):void 0;N.push({id:ne,file:R,name:R.name,kind:P,previewUrl:Y,status:"pending"})}if(N.length!==0){$.length>B&&a(t.attachmentRoomLimit(B,V.length,$o));for(const W of N)b(W);try{const W=await m();for(const R of N)try{const P=await me.uploadAttachment(e.projectId(),W,R.file);v(R.id,{storedName:P.storedName,name:P.storedName,status:"uploaded"})}catch(P){v(R.id,{status:"failed",error:P.message})}}catch(W){a(W.message);for(const R of N)v(R.id,{status:"failed",error:W.message})}}}async function E($){const V=$.currentTarget;if(!V.files)return;const B=Array.from(V.files);V.value="",await x(B)}async function S($){const V=$.clipboardData?.items;if(!V)return;const B=[];for(const N of Array.from(V))if(N.kind==="file"&&N.type.startsWith("image/")){const W=N.getAsFile();W&&B.push(W)}B.length!==0&&($.preventDefault(),await x(B))}async function T($){const V=n().find(B=>B.id===$);if(V){if(V.storedName&&o())try{await me.deleteAttachment(e.projectId(),o(),V.storedName)}catch(B){a(B.message)}y($)}}function A($){d(Of($.name)),c($.id)}async function C($){const V=l().trim();if(c(null),!(!V||!$.storedName||!o())&&V!==Of($.name))try{const B=await me.renameAttachment(e.projectId(),o(),$.storedName,V);v($.id,{storedName:B.storedName,name:B.storedName})}catch(B){a(B.message)}}function L(){c(null)}function j(){const $=ut(n);for(const V of $)V.previewUrl&&URL.revokeObjectURL(V.previewUrl);$.length>0&&r([]),i(null),c(null),d(""),a(null)}return{attachments:n,draftId:o,error:s,setError:a,count:g,hasPending:h,hasFailed:p,renamingId:u,renameDraft:l,setRenameDraft:d,addFiles:x,onFileInputChange:E,onPaste:S,removeAttachment:T,beginRename:A,commitRename:C,cancelRename:L,reset:j}}const _b={attachmentLimit:e=>_("newSpec.attachmentLimit",{max:e}),unsupportedType:e=>_("newSpec.unsupportedType",{name:e}),unsupportedMime:e=>_("newSpec.unsupportedMime",{mime:e}),fileTooLarge:e=>_("newSpec.fileTooLarge",{name:e}),attachmentRoomLimit:(e,t,n)=>_("newSpec.attachmentRoomLimit",{room:e,current:t,max:n})},Dk=150,Ik=16,Ok=48,Rk=24,Nk=8;function tu(e){return e.replace(/^\/+/,"")}function Mk(e,t){return t===0?!0:/[\s/_.-]/.test(e[t-1]??"")}function Rf(e,t){if(!e)return 0;const n=e.toLowerCase(),r=t.toLowerCase();let o=0,i=-1;for(let s=0;s<n.length;s++){const a=r.indexOf(n[s],i+1);if(a===-1)return null;o+=Ik,a===s&&(o+=Ok),a===i+1&&(o+=Rk),Mk(t,a)&&(o+=Nk),o-=Math.max(0,a-i-1),i=a}return o-t.length*.01}function Lk(e,t){const n=tu(e.trim());if(!n)return 0;const r=Rf(n,tu(t.value)),o=t.label?Rf(n,tu(t.label)):null;return r==null?o:o==null?r:Math.max(r,o)}function Pk(e,t){return t?e.map((n,r)=>{const o=Lk(t,n);return o==null?null:{cmd:n,score:o,index:r}}).filter(n=>n!=null).sort((n,r)=>r.score-n.score||n.index-r.index).map(n=>n.cmd):e}function $k(e,t,n){const r=e.slice(0,t);if(n&&/^\/[\w-]*$/.test(r))return{kind:"slash",query:r.slice(1)};const o=r.lastIndexOf("@");if(o===-1)return null;const i=r.slice(o+1);return/^[\w./@-]*$/.test(i)?{kind:"mention",start:o,query:i}:null}function Nf(e,t,n){const r=t.kind==="slash"?0:t.start,o=e.slice(0,r),i=e.slice(r+1+t.query.length);return{next:o+n+i,cursorPos:o.length+n.length}}function Fk(e){return e.kind==="mention"?`@${e.value}`:e.replacement??`${e.value} `}function Bk(e){const[t,n]=D(!1),[r,o]=D([]),[i,s]=D(0),[a,u]=D(!1);let c=null,l=null;oe(()=>{l&&clearTimeout(l)});function d(){n(!1),u(!1),o([]),s(0),c=null,l&&(clearTimeout(l),l=null)}function g(y){l&&clearTimeout(l),l=setTimeout(async()=>{const x=e.projectId();if(x)try{const E=await me.listFiles(x,y);if(c?.kind!=="mention"||c.query!==y)return;o(E.items.map(S=>({kind:"mention",value:S}))),s(0)}catch{o([])}},e.searchDebounceMs??Dk)}function h(y){const x=e.slashCommands?.()??[],E=Pk(x,y).map(S=>({kind:"slash",value:S.value,label:S.label??S.value,description:S.description,replacement:S.replacement,action:S.action,customId:S.customId,editable:S.editable,editLabel:S.editLabel,deletable:S.deletable,deleteLabel:S.deleteLabel,icon:S.icon,command:S}));o(E),s(0),E.length>0?(u(!1),n(!0)):e.slashEmptyEnabled?.()?(u(!0),n(!0)):d()}function p(y){const x=(e.slashCommands?.()??[]).length>0,E=$k(y.value,y.selectionStart,x);if(!E){d();return}if(c=E,E.kind==="slash"){h(E.query);return}u(!1),t()||n(!0),g(E.query)}function m(y){const x=c;if(!x)return{kind:"noop"};if(y.kind==="slash"&&y.action==="add"){const{next:T}=Nf(e.value(),x,"");return e.onValueChange(T),d(),{kind:"action",command:y.command}}const{next:E,cursorPos:S}=Nf(e.value(),x,Fk(y));return e.onValueChange(E),d(),{kind:"text",cursorPos:S}}function b(y){const x=r();x.length!==0&&s(E=>(E+y+x.length)%x.length)}function v(y){if(!y)return;const x=r().filter(E=>E.kind!=="slash"||E.customId!==y);o(x),s(E=>Math.min(E,Math.max(0,x.length-1))),x.length===0&&d()}return{open:t,items:r,index:i,setIndex:s,slashEmpty:a,handleInput:p,select:m,close:d,moveIndex:b,removeSlashItem:v}}var zk=M("<textarea>");const Nc=e=>{const[t,n]=se(e,["class"]);return(()=>{var r=zk();return rr(r,H({get class(){return tt("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 shadow-sm transition-shadow placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n),!1,!1),r})()},Mf=1.5,Eb=2,Uk=10;function Kk(e,t=Eb,n=Uk){if(!e)return;const r=getComputedStyle(e),o=parseFloat(r.fontSize)||14,i=r.lineHeight==="normal"?o*Mf:parseFloat(r.lineHeight)||o*Mf,s=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),a=i*t+s,u=i*n+s;e.style.height="auto",e.style.height=`${Math.min(Math.max(e.scrollHeight,a),u)}px`,e.style.overflowY=e.scrollHeight>u?"auto":"hidden"}const qs=e=>{const[t,n]=se(e,["minRows","maxRows","class","ref","onInput"]);let r;const o=()=>Kk(r,t.minRows,t.maxRows),i=a=>{r=a;const u=t.ref;typeof u=="function"&&u(a)},s=a=>{const u=t.onInput;typeof u=="function"?u(a):Array.isArray(u)&&u[0](u[1],a),o()};return Dn(()=>{o(),requestAnimationFrame(o)}),te(bt(()=>e.value,o)),f(Nc,H({ref:i,get class(){return tt("min-h-0 resize-none",t.class)},get rows(){return t.minRows??Eb},onInput:s},n))};var jk=M('<li class="px-3 py-1.5 text-sm text-muted-foreground">'),Hk=M('<ul class="absolute bottom-full left-0 right-0 z-[100] m-0 max-h-60 list-none overflow-y-auto rounded-lg border bg-card py-1 shadow-lg">'),qk=M('<div class="relative w-full">'),Gk=M("<span>"),Vk=M('<div class="mr-1 flex shrink-0 items-center gap-0.5">'),Wk=M('<li><button type=button class="flex min-w-0 flex-1 items-center gap-2 overflow-hidden border-0 bg-transparent px-3 py-1.5 text-left text-sm text-inherit"><span class="min-w-0 flex-1"><span class="block overflow-hidden text-ellipsis whitespace-nowrap">');const Yk=150,Ta=e=>{let t,n=[],r=null;oe(()=>{r&&clearTimeout(r)});const o=Bk({projectId:()=>e.projectId,value:()=>e.value,onValueChange:l=>e.onValueChange(l),slashCommands:()=>e.slashCommands??[],slashEmptyEnabled:()=>!!e.slashEmptyLabel});function i(l){n=[];const d=o.select(l);if(d.kind!=="noop"){if(d.kind==="action"){e.onSlashCommandAction?.(d.command),requestAnimationFrame(()=>t?.focus());return}requestAnimationFrame(()=>{t&&(t.focus(),t.setSelectionRange(d.cursorPos,d.cursorPos))})}}function s(l){l.kind==="slash"&&(e.onDeleteSlashCommand?.(l.command),l.customId&&o.removeSlashItem(l.customId))}function a(l){l.kind==="slash"&&(e.onEditSlashCommand?.(l.command),o.close(),requestAnimationFrame(()=>t?.focus()))}function u(){n[o.index()]?.scrollIntoView({block:"nearest"})}function c(l){const d=o.items();if(o.open()&&d.length>0){if(l.key==="ArrowDown"){l.preventDefault(),o.moveIndex(1),requestAnimationFrame(u);return}if(l.key==="ArrowUp"){l.preventDefault(),o.moveIndex(-1),requestAnimationFrame(u);return}if(l.key==="Enter"||l.key==="Tab"){if(!l.isComposing){l.preventDefault(),i(d[o.index()]);return}}else if(l.key==="Escape"){l.preventDefault(),o.close();return}}e.onKeyDown?.(l)}return(()=>{var l=qk();return w(l,f(qs,{ref(d){var g=t;typeof g=="function"?g(d):t=d},get minRows(){return e.minRows},get maxRows(){return e.maxRows},get value(){return e.value},get placeholder(){return e.placeholder},get disabled(){return e.disabled},get required(){return e.required},get autofocus(){return e.autofocus},get class(){return e.class},onInput:d=>{e.onValueChange(d.currentTarget.value),n=[],o.handleInput(d.currentTarget)},onKeyDown:c,onPaste:d=>e.onPaste?.(d),onBlur:()=>{r&&clearTimeout(r),r=setTimeout(o.close,Yk)}}),null),w(l,f(G,{get when(){return J(()=>!!o.open())()&&(o.items().length>0||o.slashEmpty())},get children(){var d=Hk();return w(d,f(G,{get when(){return o.slashEmpty()},get children(){var g=jk();return w(g,()=>e.slashEmptyLabel),g}}),null),w(d,f(rt,{get each(){return o.items()},children:(g,h)=>(()=>{var p=Wk(),m=p.firstChild,b=m.firstChild,v=b.firstChild;return p.addEventListener("mouseenter",()=>o.setIndex(h())),Bn(y=>n[h()]=y,p),m.$$mousedown=y=>{y.preventDefault(),i(g)},w(m,f(G,{get when(){return J(()=>g.kind==="slash")()&&g.icon==="plus"},get children(){return f(Pi,{class:"h-3.5 w-3.5 shrink-0"})}}),b),w(v,(()=>{var y=J(()=>g.kind==="slash");return()=>y()?g.label:g.value})()),w(b,f(G,{get when(){return J(()=>g.kind==="slash")()&&g.description},get children(){var y=Gk();return w(y,(()=>{var x=J(()=>g.kind==="slash");return()=>x()?g.description:""})()),Le(()=>xt(y,tt("block overflow-hidden text-ellipsis whitespace-nowrap text-xs",o.index()===h()?"text-primary-foreground/80":"text-muted-foreground"))),y}}),null),w(p,f(G,{get when(){return J(()=>g.kind==="slash")()&&(g.editable||g.deletable)},get children(){var y=Vk();return w(y,f(G,{get when(){return J(()=>g.kind==="slash")()&&g.editable},get children(){return f(Ee,{type:"button",variant:"ghost",size:"sm",tabIndex:-1,get title(){return J(()=>g.kind==="slash")()?g.editLabel:void 0},get class(){return tt("h-7 w-7 p-0",o.index()===h()?"text-primary-foreground hover:bg-primary-foreground/20 hover:text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground")},onMouseDown:x=>{x.preventDefault(),x.stopPropagation(),a(g)},get children(){return f(bh,{class:"h-3.5 w-3.5"})}})}}),null),w(y,f(G,{get when(){return J(()=>g.kind==="slash")()&&g.deletable},get children(){return f(Ee,{type:"button",variant:"ghost",size:"sm",tabIndex:-1,get title(){return J(()=>g.kind==="slash")()?g.deleteLabel:void 0},get class(){return tt("h-7 w-7 p-0",o.index()===h()?"text-primary-foreground hover:bg-primary-foreground/20 hover:text-primary-foreground":"text-destructive hover:bg-destructive/10 hover:text-destructive")},onMouseDown:x=>{x.preventDefault(),x.stopPropagation(),s(g)},get children(){return f(Jc,{class:"h-3.5 w-3.5"})}})}}),null),y}}),null),Le(y=>{var x=tt("flex items-center",o.index()===h()?"bg-primary text-primary-foreground":"text-foreground hover:bg-accent hover:text-accent-foreground"),E=g.kind==="slash"&&g.description?g.description:g.value;return x!==y.e&&xt(p,y.e=x),E!==y.t&&Ge(m,"title",y.t=E),y},{e:void 0,t:void 0}),p})()}),null),d}}),null),l})()};dn(["mousedown"]);const Sb=Si.Trigger,Cb=e=>{const t=H({gutter:4,flip:!1},e);return f(Si,t)},kb=e=>{const[t,n]=se(e,["class"]);return f(Si.Portal,{get children(){return f(Si.Content,H({get class(){return tt("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-sm text-primary-foreground data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n))}})};var Zk=M('<img class="max-h-[80vh] max-w-[80vw] rounded-lg object-contain shadow-lg">');const Xk=e=>f(cn,{get open(){return e.open},get onOpenChange(){return e.onOpenChange},get children(){return f(cn.Portal,{get children(){return[f(cn.Overlay,{class:"fixed inset-0 z-50 bg-background/80 data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0"}),f(cn.Content,{class:"fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2 outline-none data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",get children(){return[f(G,{get when(){return e.src},get children(){var t=Zk();return Le(n=>{var r=e.src,o=e.alt;return r!==n.e&&Ge(t,"src",n.e=r),o!==n.t&&Ge(t,"alt",n.t=o),n},{e:void 0,t:void 0}),t}}),f(cn.CloseButton,{class:"absolute right-2 top-2 flex h-7 w-7 items-center justify-center rounded-full bg-background/80 text-foreground shadow ring-offset-background transition hover:bg-background focus:outline-none focus:ring-[1.5px] focus:ring-ring focus:ring-offset-2","aria-label":"Close",get children(){return f(Gr,{class:"h-4 w-4"})}})]}})]}})}});var Jk=M('<ul class="m-0 flex list-none flex-wrap gap-2 p-0">'),Ab=M('<img class="h-full w-full object-cover">'),Qk=M('<div class="absolute inset-0 flex items-center justify-center bg-background/50">'),e3=M('<li class="group relative shrink-0"><button type=button class="absolute right-0 top-0 z-10 flex h-4 w-4 items-center justify-center rounded-bl bg-background/80 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 disabled:opacity-0">'),t3=M('<span class="text-xs font-bold text-muted-foreground">'),n3=M('<ul class="m-0 grid list-none gap-2 [grid-template-columns:repeat(auto-fill,minmax(180px,1fr))]">'),r3=M('<li><div class="flex h-14 w-14 items-center justify-center overflow-hidden rounded-md bg-card"></div><div class="flex min-w-0 flex-col"><span class="text-sm text-muted-foreground">'),o3=M('<span class="rounded border border-border bg-background px-1 py-0.5 text-sm font-bold text-muted-foreground">'),i3=M('<button type=button class="cursor-pointer overflow-hidden whitespace-nowrap border-0 bg-transparent p-0 text-left text-ellipsis hover:underline disabled:cursor-default disabled:no-underline">');function s3(e){return e.status==="pending"?`${e.name} · ${_("newSpec.uploading")}`:e.status==="failed"?`${e.name} · ${_("newSpec.uploadFailed",{error:e.error})}`:`${e.name} · ${Math.round(e.file.size/1024)} KB · ${e.kind}`}const Tb=e=>{const t=e.ctrl,[n,r]=D(),[o,i]=D(),[s,a]=D(!1);function u(c){c.kind!=="image"||!c.previewUrl||(r(c.previewUrl),i(c.name),a(!0))}return f(G,{get when(){return e.compact},get fallback(){return f(a3,e)},get children(){return[(()=>{var c=Jk();return w(c,f(rt,{get each(){return t.attachments()},children:l=>(()=>{var d=e3(),g=d.firstChild;return w(d,f(Cb,{openDelay:150,closeDelay:0,get children(){return[f(Sb,{type:"button",get class(){return`flex h-14 w-14 items-center justify-center overflow-hidden rounded-md border bg-card ${l.status==="pending"?"opacity-75":""} ${l.status==="failed"?"border-destructive":""} ${l.kind==="image"&&l.previewUrl?"cursor-zoom-in":"cursor-default"}`},onClick:()=>u(l),get children(){return[f(G,{get when(){return J(()=>l.kind==="image")()&&l.previewUrl},get fallback(){return(()=>{var h=t3();return w(h,()=>l.kind==="pdf"?"PDF":"TXT"),h})()},get children(){var h=Ab();return Le(p=>{var m=l.previewUrl,b=l.name;return m!==p.e&&Ge(h,"src",p.e=m),b!==p.t&&Ge(h,"alt",p.t=b),p},{e:void 0,t:void 0}),h}}),f(G,{get when(){return l.status==="pending"},get children(){var h=Qk();return w(h,f(kn,{class:"h-4 w-4 animate-spin text-muted-foreground"})),h}})]}}),f(kb,{get children(){return s3(l)}})]}}),g),g.$$click=()=>void t.removeAttachment(l.id),w(g,f(Gr,{class:"h-3 w-3"})),Le(h=>{var p=e.busy,m=_("newSpec.deleteAttachment",{name:l.name});return p!==h.e&&(g.disabled=h.e=p),m!==h.t&&Ge(g,"aria-label",h.t=m),h},{e:void 0,t:void 0}),d})()})),c})(),f(Xk,{get src(){return n()},get alt(){return o()},get open(){return s()},onOpenChange:a})]}})},a3=e=>{const t=e.ctrl;return(()=>{var n=n3();return w(n,f(rt,{get each(){return t.attachments()},children:r=>(()=>{var o=r3(),i=o.firstChild,s=i.nextSibling,a=s.firstChild;return w(i,f(G,{get when(){return J(()=>r.kind==="image")()&&r.previewUrl},get fallback(){return(()=>{var u=o3();return w(u,()=>r.kind==="pdf"?"PDF":"TXT"),u})()},get children(){var u=Ab();return Le(c=>{var l=r.previewUrl,d=r.name;return l!==c.e&&Ge(u,"src",c.e=l),d!==c.t&&Ge(u,"alt",c.t=d),c},{e:void 0,t:void 0}),u}})),w(s,f(G,{get when(){return J(()=>!!e.allowRename)()&&t.renamingId()===r.id},get fallback(){return(()=>{var u=i3();return u.$$click=()=>e.allowRename&&t.beginRename(r),w(u,()=>r.name),Le(c=>{var l=e.busy||!e.allowRename||r.status!=="uploaded",d=e.allowRename?_("newSpec.clickToRename"):r.name;return l!==c.e&&(u.disabled=c.e=l),d!==c.t&&Ge(u,"title",c.t=d),c},{e:void 0,t:void 0}),u})()},get children(){return f(Er,{type:"text",get value(){return t.renameDraft()},autofocus:!0,onInput:u=>t.setRenameDraft(u.currentTarget.value),onBlur:()=>void t.commitRename(r),onKeyDown:u=>{u.key==="Enter"?(u.preventDefault(),t.commitRename(r)):u.key==="Escape"&&t.cancelRename()},class:"h-7 py-0.5 text-sm"})}}),a),w(a,f(G,{get when(){return r.status==="pending"},get children(){return[f(kn,{class:"mr-0.5 inline h-3 w-3 animate-spin"}),J(()=>_("newSpec.uploading"))]}}),null),w(a,f(G,{get when(){return r.status==="failed"},get children(){return _("newSpec.uploadFailed",{error:r.error})}}),null),w(a,f(G,{get when(){return r.status==="uploaded"},get children(){return[J(()=>Math.round(r.file.size/1024))," KB · ",J(()=>r.kind)]}}),null),w(o,f(Ee,{variant:"ghost",size:"icon",type:"button",class:"h-7 w-7",onClick:()=>void t.removeAttachment(r.id),get disabled(){return e.busy},get"aria-label"(){return _("newSpec.deleteAttachment",{name:r.name})},get children(){return f(Gr,{class:"h-3.5 w-3.5"})}}),null),Le(()=>xt(o,`grid items-center gap-2 rounded-lg border bg-background p-2 [grid-template-columns:56px_1fr_auto] ${r.status==="pending"?"opacity-75":""} ${r.status==="failed"?"border-destructive":""}`)),o})()})),n})()};dn(["click"]);var u3=M('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"class="h-4 w-4"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m5 12l5 5L20 7"></path><title>Checkbox');const Gs=Br.Label,ki=Br;Br.ErrorMessage;Br.Description;const Ai=e=>{const[t,n]=se(e,["class","children"]);return[f(Br.Input,{class:"[&:focus-visible+div]:outline-none [&:focus-visible+div]:ring-[1.5px] [&:focus-visible+div]:ring-ring [&:focus-visible+div]:ring-offset-2 [&:focus-visible+div]:ring-offset-background"}),f(Br.Control,H({get class(){return tt("h-4 w-4 shrink-0 rounded-sm border border-input shadow transition-shadow focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring data-[disabled]:cursor-not-allowed data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:text-primary-foreground data-[disabled]:opacity-50",t.class)}},n,{get children(){return f(Br.Indicator,{class:"flex items-center justify-center text-current",get children(){return u3()}})}}))]};Kn.Description;Kn.ErrorMessage;Kn.ItemDescription;const Jt=Kn.ItemInput,Qt=Kn.ItemLabel,Ti=Kn.Label,An=Kn,en=Kn.Item,un=e=>{const[t,n]=se(e,["class"]);return f(Kn.ItemControl,H({get class(){return tt("flex aspect-square h-4 w-4 items-center justify-center rounded-full border border-input bg-background shadow-sm transition-[border-color,background-color,box-shadow] focus:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[checked]:border-primary data-[checked]:bg-primary data-[checked]:shadow data-[checked]:ring-2 data-[checked]:ring-primary/20",t.class)}},n,{get children(){return f(Kn.ItemIndicator,{class:"h-2 w-2 rounded-full bg-primary-foreground"})}}))};var c3=M('<nav class="flex items-center gap-1 text-muted-foreground"aria-label=breadcrumb>'),l3=M('<span class="truncate font-medium text-foreground">');const Yi=e=>(()=>{var t=c3();return w(t,f(rt,{get each(){return e.items},children:(n,r)=>[f(G,{get when(){return r()>0},get children(){return f(ph,{class:"h-3.5 w-3.5 shrink-0 opacity-60"})}}),f(G,{get when(){return n.href},get fallback(){return(()=>{var o=l3();return w(o,()=>n.label),o})()},get children(){return f(Pn,{class:"truncate cursor-pointer hover:text-foreground",get href(){return n.href},get children(){return n.label}})}})]})),t})(),d3="yorz:new-spec-draft:";function f3(e){return e==="feat"||e==="refct"||e==="fix"}function Ll(e){return`${d3}${e}`}function g3(e){if(!e||typeof window>"u")return{};try{const t=window.localStorage.getItem(Ll(e));if(!t)return{};const n=JSON.parse(t);return{content:typeof n.content=="string"?n.content:void 0,type:f3(n.type)?n.type:void 0,useWorktree:typeof n.useWorktree=="boolean"?n.useWorktree:void 0}}catch{return{}}}function p3(e,t){if(!(!e||typeof window>"u"))try{const n=t.content.trim().length>0||t.type!=="feat"||t.useWorktree!==!1,r=Ll(e);if(!n){window.localStorage.removeItem(r);return}window.localStorage.setItem(r,JSON.stringify(t))}catch{}}function Lf(e){return JSON.stringify(e)}function Pf(e){if(!(!e||typeof window>"u"))try{window.localStorage.removeItem(Ll(e))}catch{}}function h3(e){const n=(e.split(/\r?\n/)[0]??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40);return n&&!/^[0-9]+$/.test(n)?n:`spec-${Date.now().toString(36)}`}function m3(e){let t=new Set,n=!1;return{setBaseline(r){t=new Set(r),n=!1},async poll(){if(!n)try{const o=(await e.listSpecs()).find(i=>!t.has(i.id));if(!o||n)return;n=!0,e.onFound(o.id)}catch{}},found:()=>n}}var $f=M('<span class="text-sm text-muted-foreground">'),b3=M('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2"><header class="flex flex-col gap-1"></header><p class=" text-muted-foreground"></p><form class="flex flex-col gap-4 rounded-xl border bg-card p-4"><label class="flex flex-col gap-1.5 font-medium"><span></span></label><section class="flex flex-col gap-2.5 rounded-lg border border-dashed bg-card p-3"><div class="flex flex-wrap items-center gap-2.5"><span class=font-semibold></span><span class="text-sm text-muted-foreground"></span><input type=file multiple hidden>'),y3=M('<strong class=" ">'),v3=M('<p class=" text-destructive">');const x3=[{value:"feat",labelKey:"newSpec.typeFeat",hintKey:"newSpec.typeFeatHint"},{value:"refct",labelKey:"newSpec.typeRefct",hintKey:"newSpec.typeRefctHint"},{value:"fix",labelKey:"newSpec.typeFix",hintKey:"newSpec.typeFixHint"}],w3=()=>{const e=go(),t=po(),[n,r]=D(""),[o,i]=D("feat"),[s,a]=D("idle"),[u,c]=D(!1),l=()=>s()==="creating",d=wb({projectId:t,labels:_b}),g=d.error,h=d.setError;let p=null,m=null,b="",v="",y,x=!1,E="";oe(()=>{p?.(),m?.()}),te(bt(t,A=>{x=!0;const C=g3(A);r(C.content??""),i(C.type??"feat"),c(C.useWorktree??!1),x=!1})),te(()=>{if(x||l())return;const A={content:n(),type:o(),useWorktree:u()};Lf(A)!==E&&(E="",p3(t(),A))});const S=m3({listSpecs:()=>me.listSpecs(b||t()),onFound:A=>{const C=b||t();p?.(),p=null,m?.(),m=null;const L=C?`/${C}/specs/${encodeURIComponent(A)}`:Mt(`specs/${encodeURIComponent(A)}`);e(L),v&&(Ro(v),v="")}});async function T(A){if(A.preventDefault(),s()==="creating")return;h(null);const C=n().trim();if(C.length<5){h(_("newSpec.descTooShort"));return}const L=d.attachments().filter(j=>j.status==="failed");if(L.length>0){h(_("newSpec.attachmentFailedCount",{count:L.length}));return}if(d.hasPending()){h(_("newSpec.attachmentUploading"));return}a("creating");try{const j=t();E=Lf({content:n(),type:o(),useWorktree:u()}),Pf(j);let $=j;if(u()){const R=h3(C);$=(await me.createWorktree(j,{specSlug:R})).id,Pf($)}b=$;const V=await me.listSpecs($);S.setBaseline(V.map(R=>R.id));const B={type:o(),requirement:C},N=d.draftId();N&&(B.draftId=N,$!==j&&(B.draftProjectId=j));const W=await me.createSpec($,B);"draft"in W&&W.draft?(v=W.sessionId,m=sa($,W.sessionId,{onEvent:R=>{R.type==="error"&&(a("failed"),h(R.message||_("newSpec.agentRunFailed")),m?.(),m=null)}}),p=_h($,()=>{S.poll()}),S.poll()):"id"in W&&e(`/${$}/specs/${encodeURIComponent(W.id)}`)}catch(j){h(j.message),a("failed")}}return(()=>{var A=b3(),C=A.firstChild,L=C.nextSibling,j=L.nextSibling,$=j.firstChild,V=$.firstChild,B=$.nextSibling,N=B.firstChild,W=N.firstChild,R=W.nextSibling,P=R.nextSibling;w(C,f(Yi,{get items(){return[{label:_("breadcrumb.specList"),href:Mt("")},{label:_("breadcrumb.newSpec")}]}})),w(L,()=>_("newSpec.description")),j.addEventListener("submit",T),w(j,f(An,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return o()},onChange:Y=>i(Y),get disabled(){return l()},get children(){return[f(Ti,{class:"mb-1.5 w-full font-medium",get children(){return _("newSpec.type")}}),J(()=>x3.map(Y=>f(en,{get value(){return Y.value},class:"flex min-h-[44px] flex-1",get children(){return[f(Jt,{class:"sr-only"}),f(Qt,{get class(){return`flex w-full cursor-pointer flex-col items-start gap-0.5 rounded-lg border p-3 transition-colors ${o()===Y.value?"border-primary bg-primary/10":"border-border bg-background"}`},get children(){return[(()=>{var K=y3();return w(K,()=>_(Y.labelKey)),K})(),(()=>{var K=$f();return w(K,()=>_(Y.hintKey)),K})()]}})]}})))]}}),$),w(j,f(ki,{get checked(){return u()},onChange:Y=>c(Y),get disabled(){return l()},class:"flex flex-wrap items-center gap-2",get children(){return[f(Ai,{}),f(Gs,{class:"cursor-pointer font-medium",get children(){return _("newSpec.parallelWorktree")}}),(()=>{var Y=$f();return w(Y,()=>_("newSpec.parallelWorktreeDesc")),Y})()]}}),$),w(V,()=>_("newSpec.requirement")),w($,f(Ta,{get projectId(){return t()},get value(){return n()},onValueChange:r,get onPaste(){return d.onPaste},get placeholder(){return _("newSpec.requirementPlaceholder")},minRows:10,maxRows:10,required:!0,autofocus:!0,get disabled(){return l()}}),null),Is(B,"paste",d.onPaste),w(W,()=>_("newSpec.attachments")),w(R,()=>_("newSpec.attachmentsHint",{count:d.count(),max:$o})),w(N,f(Ee,{variant:"outline",size:"sm",type:"button",onClick:()=>y?.click(),get disabled(){return l()||d.count()>=$o},get children(){return[f(qw,{class:"mr-1 h-3.5 w-3.5"}),J(()=>_("newSpec.importAttachment"))]}}),P),Is(P,"change",d.onFileInputChange);var ne=y;return typeof ne=="function"?Bn(ne,P):y=P,Ge(P,"accept",xb),w(B,f(G,{get when(){return d.count()>0},get children(){return f(Tb,{ctrl:d,get busy(){return l()},allowRename:!0})}}),null),w(j,(()=>{var Y=J(()=>!!g());return()=>Y()&&(()=>{var K=v3();return w(K,g),K})()})(),null),w(j,f(Ee,{type:"submit",variant:"default",get disabled(){return l()},get children(){return[J(()=>J(()=>!!l())()?f(kn,{class:"mr-1 h-4 w-4 animate-spin"}):f(oa,{class:"mr-1 h-4 w-4"})),J(()=>J(()=>!!l())()?_("newSpec.creating"):_("newSpec.createAndStart"))]}}),null),A})()};var Ff=11;function _3(e,t){var n=t.attributes,r,o,i,s,a;if(!(t.nodeType===Ff||e.nodeType===Ff)){for(var u=n.length-1;u>=0;u--)r=n[u],o=r.name,i=r.namespaceURI,s=r.value,i?(o=r.localName||o,a=e.getAttributeNS(i,o),a!==s&&(r.prefix==="xmlns"&&(o=r.name),e.setAttributeNS(i,o,s))):(a=e.getAttribute(o),a!==s&&e.setAttribute(o,s));for(var c=e.attributes,l=c.length-1;l>=0;l--)r=c[l],o=r.name,i=r.namespaceURI,i?(o=r.localName||o,t.hasAttributeNS(i,o)||e.removeAttributeNS(i,o)):t.hasAttribute(o)||e.removeAttribute(o)}}var ms,E3="http://www.w3.org/1999/xhtml",tn=typeof document>"u"?void 0:document,S3=!!tn&&"content"in tn.createElement("template"),C3=!!tn&&tn.createRange&&"createContextualFragment"in tn.createRange();function k3(e){var t=tn.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}function A3(e){ms||(ms=tn.createRange(),ms.selectNode(tn.body));var t=ms.createContextualFragment(e);return t.childNodes[0]}function T3(e){var t=tn.createElement("body");return t.innerHTML=e,t.childNodes[0]}function D3(e){return e=e.trim(),S3?k3(e):C3?A3(e):T3(e)}function bs(e,t){var n=e.nodeName,r=t.nodeName,o,i;return n===r?!0:(o=n.charCodeAt(0),i=r.charCodeAt(0),o<=90&&i>=97?n===r.toUpperCase():i<=90&&o>=97?r===n.toUpperCase():!1)}function I3(e,t){return!t||t===E3?tn.createElement(e):tn.createElementNS(t,e)}function O3(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function nu(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var Bf={OPTION:function(e,t){var n=e.parentNode;if(n){var r=n.nodeName.toUpperCase();r==="OPTGROUP"&&(n=n.parentNode,r=n&&n.nodeName.toUpperCase()),r==="SELECT"&&!n.hasAttribute("multiple")&&(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),n.selectedIndex=-1)}nu(e,t,"selected")},INPUT:function(e,t){nu(e,t,"checked"),nu(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var n=t.value;e.value!==n&&(e.value=n);var r=e.firstChild;if(r){var o=r.nodeValue;if(o==n||!n&&o==e.placeholder)return;r.nodeValue=n}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var n=-1,r=0,o=e.firstChild,i,s;o;)if(s=o.nodeName&&o.nodeName.toUpperCase(),s==="OPTGROUP")i=o,o=i.firstChild,o||(o=i.nextSibling,i=null);else{if(s==="OPTION"){if(o.hasAttribute("selected")){n=r;break}r++}o=o.nextSibling,!o&&i&&(o=i.nextSibling,i=null)}e.selectedIndex=n}}},ei=1,zf=11,Uf=3,Kf=8;function Mr(){}function R3(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}function N3(e){return function(n,r,o){if(o||(o={}),typeof r=="string")if(n.nodeName==="#document"||n.nodeName==="HTML"){var i=r;r=tn.createElement("html"),r.innerHTML=i}else if(n.nodeName==="BODY"){var s=r;r=tn.createElement("html"),r.innerHTML=s;var a=r.querySelector("body");a&&(r=a)}else r=D3(r);else r.nodeType===zf&&(r=r.firstElementChild);var u=o.getNodeKey||R3,c=o.onBeforeNodeAdded||Mr,l=o.onNodeAdded||Mr,d=o.onBeforeElUpdated||Mr,g=o.onElUpdated||Mr,h=o.onBeforeNodeDiscarded||Mr,p=o.onNodeDiscarded||Mr,m=o.onBeforeElChildrenUpdated||Mr,b=o.skipFromChildren||Mr,v=o.addChild||function(Y,K){return Y.appendChild(K)},y=o.childrenOnly===!0,x=Object.create(null),E=[];function S(Y){E.push(Y)}function T(Y,K){if(Y.nodeType===ei)for(var ce=Y.firstChild;ce;){var z=void 0;K&&(z=u(ce))?S(z):(p(ce),ce.firstChild&&T(ce,K)),ce=ce.nextSibling}}function A(Y,K,ce){h(Y)!==!1&&(K&&K.removeChild(Y),p(Y),T(Y,ce))}function C(Y){if(Y.nodeType===ei||Y.nodeType===zf)for(var K=Y.firstChild;K;){var ce=u(K);ce&&(x[ce]=K),C(K),K=K.nextSibling}}C(n);function L(Y){l(Y);for(var K=Y.firstChild;K;){var ce=K.nextSibling,z=u(K);if(z){var k=x[z];k&&bs(K,k)?(K.parentNode.replaceChild(k,K),$(k,K)):L(K)}else L(K);K=ce}}function j(Y,K,ce){for(;K;){var z=K.nextSibling;(ce=u(K))?S(ce):A(K,Y,!0),K=z}}function $(Y,K,ce){var z=u(K);if(z&&delete x[z],!ce){var k=d(Y,K);if(k===!1||(k instanceof HTMLElement&&(Y=k,C(Y)),e(Y,K),g(Y),m(Y,K)===!1))return}Y.nodeName!=="TEXTAREA"?V(Y,K):Bf.TEXTAREA(Y,K)}function V(Y,K){var ce=b(Y,K),z=K.firstChild,k=Y.firstChild,O,Z,re,F,q;e:for(;z;){for(F=z.nextSibling,O=u(z);!ce&&k;){if(re=k.nextSibling,z.isSameNode&&z.isSameNode(k)){z=F,k=re;continue e}Z=u(k);var le=k.nodeType,ye=void 0;if(le===z.nodeType&&(le===ei?(O?O!==Z&&((q=x[O])?re===q?ye=!1:(Y.insertBefore(q,k),Z?S(Z):A(k,Y,!0),k=q,Z=u(k)):ye=!1):Z&&(ye=!1),ye=ye!==!1&&bs(k,z),ye&&$(k,z)):(le===Uf||le==Kf)&&(ye=!0,k.nodeValue!==z.nodeValue&&(k.nodeValue=z.nodeValue))),ye){z=F,k=re;continue e}Z?S(Z):A(k,Y,!0),k=re}if(O&&(q=x[O])&&bs(q,z))ce||v(Y,q),$(q,z);else{var ae=c(z);ae!==!1&&(ae&&(z=ae),z.actualize&&(z=z.actualize(Y.ownerDocument||tn)),v(Y,z),L(z))}z=F,k=re}j(Y,k,Z);var pe=Bf[Y.nodeName];pe&&pe(Y,K)}var B=n,N=B.nodeType,W=r.nodeType;if(!y){if(N===ei)W===ei?bs(n,r)||(p(n),B=O3(n,I3(r.nodeName,r.namespaceURI))):B=r;else if(N===Uf||N===Kf){if(W===N)return B.nodeValue!==r.nodeValue&&(B.nodeValue=r.nodeValue),B;B=r}}if(B===r)p(n);else{if(r.isSameNode&&r.isSameNode(B))return;if($(B,r,y),E)for(var R=0,P=E.length;R<P;R++){var ne=x[E[R]];ne&&A(ne,ne.parentNode,!1)}}return!y&&B!==n&&n.parentNode&&(B.actualize&&(B=B.actualize(n.ownerDocument||tn)),n.parentNode.replaceChild(B,n)),B}}var M3=N3(_3);const jf={};function L3(e){let t=jf[e];if(t)return t;t=jf[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);t.push(r)}for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}function Uo(e,t){typeof t!="string"&&(t=Uo.defaultChars);const n=L3(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(r){let o="";for(let i=0,s=r.length;i<s;i+=3){const a=parseInt(r.slice(i+1,i+3),16);if(a<128){o+=n[a];continue}if((a&224)===192&&i+3<s){const u=parseInt(r.slice(i+4,i+6),16);if((u&192)===128){const c=a<<6&1984|u&63;c<128?o+="��":o+=String.fromCharCode(c),i+=3;continue}}if((a&240)===224&&i+6<s){const u=parseInt(r.slice(i+4,i+6),16),c=parseInt(r.slice(i+7,i+9),16);if((u&192)===128&&(c&192)===128){const l=a<<12&61440|u<<6&4032|c&63;l<2048||l>=55296&&l<=57343?o+="���":o+=String.fromCharCode(l),i+=6;continue}}if((a&248)===240&&i+9<s){const u=parseInt(r.slice(i+4,i+6),16),c=parseInt(r.slice(i+7,i+9),16),l=parseInt(r.slice(i+10,i+12),16);if((u&192)===128&&(c&192)===128&&(l&192)===128){let d=a<<18&1835008|u<<12&258048|c<<6&4032|l&63;d<65536||d>1114111?o+="����":(d-=65536,o+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),i+=9;continue}}o+="�"}return o})}Uo.defaultChars=";/?:@&=+$,#";Uo.componentChars="";const Hf={};function P3(e){let t=Hf[e];if(t)return t;t=Hf[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function Zi(e,t,n){typeof t!="string"&&(n=t,t=Zi.defaultChars),typeof n>"u"&&(n=!0);const r=P3(t);let o="";for(let i=0,s=e.length;i<s;i++){const a=e.charCodeAt(i);if(n&&a===37&&i+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(i+1,i+3))){o+=e.slice(i,i+3),i+=2;continue}if(a<128){o+=r[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1<s){const u=e.charCodeAt(i+1);if(u>=56320&&u<=57343){o+=encodeURIComponent(e[i]+e[i+1]),i++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[i])}return o}Zi.defaultChars=";/?:@&=+$,-_.!~*'()#";Zi.componentChars="-_.!~*'()";function Pl(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Vs(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const $3=/^([a-z0-9.+-]+:)/i,F3=/:[0-9]*$/,B3=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,z3=["<",">",'"',"`"," ","\r",`
7
- `," "],U3=["{","}","|","\\","^","`"].concat(z3),K3=["'"].concat(U3),qf=["%","/","?",";","#"].concat(K3),Gf=["/","?","#"],j3=255,Vf=/^[+a-z0-9A-Z_-]{0,63}$/,H3=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Wf={javascript:!0,"javascript:":!0},Yf={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function $l(e,t){if(e&&e instanceof Vs)return e;const n=new Vs;return n.parse(e,t),n}Vs.prototype.parse=function(e,t){let n,r,o,i=e;if(i=i.trim(),!t&&e.split("#").length===1){const c=B3.exec(i);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let s=$3.exec(i);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,i=i.substr(s.length)),(t||s||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=i.substr(0,2)==="//",o&&!(s&&Wf[s])&&(i=i.substr(2),this.slashes=!0)),!Wf[s]&&(o||s&&!Yf[s])){let c=-1;for(let p=0;p<Gf.length;p++)r=i.indexOf(Gf[p]),r!==-1&&(c===-1||r<c)&&(c=r);let l,d;c===-1?d=i.lastIndexOf("@"):d=i.lastIndexOf("@",c),d!==-1&&(l=i.slice(0,d),i=i.slice(d+1),this.auth=l),c=-1;for(let p=0;p<qf.length;p++)r=i.indexOf(qf[p]),r!==-1&&(c===-1||r<c)&&(c=r);c===-1&&(c=i.length),i[c-1]===":"&&c--;const g=i.slice(0,c);i=i.slice(c),this.parseHost(g),this.hostname=this.hostname||"";const h=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!h){const p=this.hostname.split(/\./);for(let m=0,b=p.length;m<b;m++){const v=p[m];if(v&&!v.match(Vf)){let y="";for(let x=0,E=v.length;x<E;x++)v.charCodeAt(x)>127?y+="x":y+=v[x];if(!y.match(Vf)){const x=p.slice(0,m),E=p.slice(m+1),S=v.match(H3);S&&(x.push(S[1]),E.unshift(S[2])),E.length&&(i=E.join(".")+i),this.hostname=x.join(".");break}}}}this.hostname.length>j3&&(this.hostname=""),h&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=i.indexOf("#");a!==-1&&(this.hash=i.substr(a),i=i.slice(0,a));const u=i.indexOf("?");return u!==-1&&(this.search=i.substr(u),i=i.slice(0,u)),i&&(this.pathname=i),Yf[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Vs.prototype.parseHost=function(e){let t=F3.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const q3=Object.freeze(Object.defineProperty({__proto__:null,decode:Uo,encode:Zi,format:Pl,parse:$l},Symbol.toStringTag,{value:"Module"})),Db=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ib=/[\0-\x1F\x7F-\x9F]/,G3=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Fl=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Ob=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,Rb=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,V3=Object.freeze(Object.defineProperty({__proto__:null,Any:Db,Cc:Ib,Cf:G3,P:Fl,S:Ob,Z:Rb},Symbol.toStringTag,{value:"Module"})),W3=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Y3=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var ru;const Z3=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),X3=(ru=String.fromCodePoint)!==null&&ru!==void 0?ru:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function J3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Z3.get(e))!==null&&t!==void 0?t:e}var Ft;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Ft||(Ft={}));const Q3=32;var $r;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})($r||($r={}));function Mc(e){return e>=Ft.ZERO&&e<=Ft.NINE}function eA(e){return e>=Ft.UPPER_A&&e<=Ft.UPPER_F||e>=Ft.LOWER_A&&e<=Ft.LOWER_F}function tA(e){return e>=Ft.UPPER_A&&e<=Ft.UPPER_Z||e>=Ft.LOWER_A&&e<=Ft.LOWER_Z||Mc(e)}function nA(e){return e===Ft.EQUALS||tA(e)}var $t;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})($t||($t={}));var yr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(yr||(yr={}));class rA{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=$t.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=yr.Strict}startEntity(t){this.decodeMode=t,this.state=$t.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case $t.EntityStart:return t.charCodeAt(n)===Ft.NUM?(this.state=$t.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=$t.NamedEntity,this.stateNamedEntity(t,n));case $t.NumericStart:return this.stateNumericStart(t,n);case $t.NumericDecimal:return this.stateNumericDecimal(t,n);case $t.NumericHex:return this.stateNumericHex(t,n);case $t.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Q3)===Ft.LOWER_X?(this.state=$t.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=$t.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const i=r-n;this.result=this.result*Math.pow(o,i)+parseInt(t.substr(n,i),o),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Mc(o)||eA(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Mc(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Ft.SEMI)this.consumed+=1;else if(this.decodeMode===yr.Strict)return 0;return this.emitCodePoint(J3(this.result),this.consumed),this.errors&&(t!==Ft.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],i=(o&$r.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=oA(r,o,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===yr.Attribute&&(i===0||nA(s))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],i=(o&$r.VALUE_LENGTH)>>14,i!==0){if(s===Ft.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==yr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&$r.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~$r.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case $t.NamedEntity:return this.result!==0&&(this.decodeMode!==yr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case $t.NumericDecimal:return this.emitNumericEntity(0,2);case $t.NumericHex:return this.emitNumericEntity(0,3);case $t.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case $t.EntityStart:return 0}}}function Nb(e){let t="";const n=new rA(e,r=>t+=X3(r));return function(o,i){let s=0,a=0;for(;(a=o.indexOf("&",a))>=0;){t+=o.slice(s,a),n.startEntity(i);const c=n.write(o,a+1);if(c<0){s=a+n.end();break}s=a+c,a=c===0?s+1:s}const u=t+o.slice(s);return t="",u}}function oA(e,t,n,r){const o=(t&$r.BRANCH_LENGTH)>>7,i=t&$r.JUMP_TABLE;if(o===0)return i!==0&&r===i?n:-1;if(i){const u=r-i;return u<0||u>=o?-1:e[n+u]-1}let s=n,a=s+o-1;for(;s<=a;){const u=s+a>>>1,c=e[u];if(c<r)s=u+1;else if(c>r)a=u-1;else return e[u+o]}return-1}const Mb=Nb(W3);Nb(Y3);function iA(e,t=yr.Legacy){return Mb(e,t)}function sA(e){return Mb(e,yr.Strict)}function aA(e){return Object.prototype.toString.call(e)}function Bl(e){return aA(e)==="[object String]"}const uA=Object.prototype.hasOwnProperty;function cA(e,t){return uA.call(e,t)}function Da(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function Lb(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function zl(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Di(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const Pb=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,lA=/&([a-z#][a-z0-9]{1,31});/gi,dA=new RegExp(Pb.source+"|"+lA.source,"gi"),fA=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function gA(e,t){if(t.charCodeAt(0)===35&&fA.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return zl(r)?Di(r):e}const n=iA(e);return n!==e?n:e}function pA(e){return e.indexOf("\\")<0?e:e.replace(Pb,"$1")}function Ko(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(dA,function(t,n,r){return n||gA(t,r)})}const hA=/[&<>"]/,mA=/[&<>"]/g,bA={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function yA(e){return bA[e]}function qr(e){return hA.test(e)?e.replace(mA,yA):e}const vA=/[.?*+^$[\]\\(){}|-]/g;function xA(e){return e.replace(vA,"\\$&")}function gt(e){switch(e){case 9:case 32:return!0}return!1}function Ii(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function $b(e){return Fl.test(e)||Ob.test(e)}function Oi(e){return $b(Di(e))}function Ri(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Ia(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function Zf(e){return e===32||e===9||e===10||e===13}function Oa(e){let t=0;for(;t<e.length&&Zf(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&Zf(e.charCodeAt(n));n--);return e.slice(t,n+1)}const wA={mdurl:q3,ucmicro:V3},_A=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:Lb,asciiTrim:Oa,assign:Da,escapeHtml:qr,escapeRE:xA,fromCodePoint:Di,has:cA,isMdAsciiPunct:Ri,isPunctChar:$b,isPunctCharCode:Oi,isSpace:gt,isString:Bl,isValidEntityCode:zl,isWhiteSpace:Ii,lib:wA,normalizeReference:Ia,unescapeAll:Ko,unescapeMd:pA},Symbol.toStringTag,{value:"Module"}));function EA(e,t,n){let r,o,i,s;const a=e.posMax,u=e.pos;for(e.pos=t+1,r=1;e.pos<a;){if(i=e.src.charCodeAt(e.pos),i===93&&(r--,r===0)){o=!0;break}if(s=e.pos,e.md.inline.skipToken(e),i===91){if(s===e.pos-1)r++;else if(n)return e.pos=u,-1}}let c=-1;return o&&(c=e.pos),e.pos=u,c}function SA(e,t,n){let r,o=t;const i={ok:!1,pos:0,str:""};if(e.charCodeAt(o)===60){for(o++;o<n;){if(r=e.charCodeAt(o),r===10||r===60)return i;if(r===62)return i.pos=o+1,i.str=Ko(e.slice(t+1,o)),i.ok=!0,i;if(r===92&&o+1<n){o+=2;continue}o++}return i}let s=0;for(;o<n&&(r=e.charCodeAt(o),!(r===32||r<32||r===127));){if(r===92&&o+1<n){if(e.charCodeAt(o+1)===32)break;o+=2;continue}if(r===40&&(s++,s>32))return i;if(r===41){if(s===0)break;s--}o++}return t===o||s!==0||(i.str=Ko(e.slice(t,o)),i.pos=o,i.ok=!0),i}function CA(e,t,n,r){let o,i=t;const s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(i>=n)return s;let a=e.charCodeAt(i);if(a!==34&&a!==39&&a!==40)return s;t++,i++,a===40&&(a=41),s.marker=a}for(;i<n;){if(o=e.charCodeAt(i),o===s.marker)return s.pos=i+1,s.str+=Ko(e.slice(t,i)),s.ok=!0,s;if(o===40&&s.marker===41)return s;o===92&&i+1<n&&i++,i++}return s.can_continue=!0,s.str+=Ko(e.slice(t,i)),s}const kA=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:SA,parseLinkLabel:EA,parseLinkTitle:CA},Symbol.toStringTag,{value:"Module"})),ur={};ur.code_inline=function(e,t,n,r,o){const i=e[t];return"<code"+o.renderAttrs(i)+">"+qr(i.content)+"</code>"};ur.code_block=function(e,t,n,r,o){const i=e[t];return"<pre"+o.renderAttrs(i)+"><code>"+qr(e[t].content)+`</code></pre>
8
- `};ur.fence=function(e,t,n,r,o){const i=e[t],s=i.info?Ko(i.info).trim():"";let a="",u="";if(s){const l=s.split(/(\s+)/g);a=l[0],u=l.slice(2).join("")}let c;if(n.highlight?c=n.highlight(i.content,a,u)||qr(i.content):c=qr(i.content),c.indexOf("<pre")===0)return c+`
9
- `;if(s){const l=i.attrIndex("class"),d=i.attrs?i.attrs.slice():[];l<0?d.push(["class",n.langPrefix+a]):(d[l]=d[l].slice(),d[l][1]+=" "+n.langPrefix+a);const g={attrs:d};return`<pre><code${o.renderAttrs(g)}>${c}</code></pre>
10
- `}return`<pre><code${o.renderAttrs(i)}>${c}</code></pre>
11
- `};ur.image=function(e,t,n,r,o){const i=e[t];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,n,r),o.renderToken(e,t,n)};ur.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
12
- `:`<br>
13
- `};ur.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
14
- `:`<br>
15
- `:`
16
- `};ur.text=function(e,t){return qr(e[t].content)};ur.html_block=function(e,t){return e[t].content};ur.html_inline=function(e,t){return e[t].content};function Wo(){this.rules=Da({},ur)}Wo.prototype.renderAttrs=function(t){let n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n<r;n++)o+=" "+qr(t.attrs[n][0])+'="'+qr(t.attrs[n][1])+'"';return o};Wo.prototype.renderToken=function(t,n,r){const o=t[n];let i="";if(o.hidden)return"";o.block&&o.nesting!==-1&&n&&t[n-1].hidden&&(i+=`
17
- `),i+=(o.nesting===-1?"</":"<")+o.tag,i+=this.renderAttrs(o),o.nesting===0&&r.xhtmlOut&&(i+=" /");let s=!1;if(o.block&&(s=!0,o.nesting===1&&n+1<t.length)){const a=t[n+1];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===o.tag)&&(s=!1)}return i+=s?`>
18
- `:">",i};Wo.prototype.renderInline=function(e,t,n){let r="";const o=this.rules;for(let i=0,s=e.length;i<s;i++){const a=e[i].type;typeof o[a]<"u"?r+=o[a](e,i,t,n,this):r+=this.renderToken(e,i,t)}return r};Wo.prototype.renderInlineAsText=function(e,t,n){let r="";for(let o=0,i=e.length;o<i;o++)switch(e[o].type){case"text":r+=e[o].content;break;case"image":r+=this.renderInlineAsText(e[o].children,t,n);break;case"html_inline":case"html_block":r+=e[o].content;break;case"softbreak":case"hardbreak":r+=`
19
- `;break}return r};Wo.prototype.render=function(e,t,n){let r="";const o=this.rules;for(let i=0,s=e.length;i<s;i++){const a=e[i].type;a==="inline"?r+=this.renderInline(e[i].children,t,n):typeof o[a]<"u"?r+=o[a](e,i,t,n,this):r+=this.renderToken(e,i,t,n)}return r};function ln(){this.__rules__=[],this.__cache__=null}ln.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};ln.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(r){t.indexOf(r)<0&&t.push(r)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(r){r.enabled&&(n&&r.alt.indexOf(n)<0||e.__cache__[n].push(r.fn))})})};ln.prototype.at=function(e,t,n){const r=this.__find__(e),o=n||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=o.alt||[],this.__cache__=null};ln.prototype.before=function(e,t,n,r){const o=this.__find__(e),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null};ln.prototype.after=function(e,t,n,r){const o=this.__find__(e),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null};ln.prototype.push=function(e,t,n){const r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null};ln.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!0,n.push(r)},this),this.__cache__=null,n};ln.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)};ln.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!1,n.push(r)},this),this.__cache__=null,n};ln.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function jn(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}jn.prototype.attrIndex=function(t){if(!this.attrs)return-1;const n=this.attrs;for(let r=0,o=n.length;r<o;r++)if(n[r][0]===t)return r;return-1};jn.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};jn.prototype.attrSet=function(t,n){const r=this.attrIndex(t),o=[t,n];r<0?this.attrPush(o):this.attrs[r]=o};jn.prototype.attrGet=function(t){const n=this.attrIndex(t);let r=null;return n>=0&&(r=this.attrs[n][1]),r};jn.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function Fb(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}Fb.prototype.Token=jn;const AA=/\r\n?|\n/g,TA=/\0/g;function DA(e){let t;t=e.src.replace(AA,`
20
- `),t=t.replace(TA,"�"),e.src=t}function IA(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function OA(e){const t=e.tokens;for(let n=0,r=t.length;n<r;n++){const o=t[n];o.type==="inline"&&e.md.inline.parse(o.content,e.md,e.env,o.children)}}function RA(e){return/^<a[>\s]/i.test(e)}function NA(e){return/^<\/a\s*>/i.test(e)}function MA(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let o=t[n].children,i=0;for(let s=o.length-1;s>=0;s--){const a=o[s];if(a.type==="link_close"){for(s--;o[s].level!==a.level&&o[s].type!=="link_open";)s--;continue}if(a.type==="html_inline"&&(RA(a.content)&&i>0&&i--,NA(a.content)&&i++),!(i>0)&&a.type==="text"&&e.md.linkify.test(a.content)){const u=a.content;let c=e.md.linkify.match(u);const l=[];let d=a.level,g=0;c.length>0&&c[0].index===0&&s>0&&o[s-1].type==="text_special"&&(c=c.slice(1));for(let h=0;h<c.length;h++){const p=c[h].url,m=e.md.normalizeLink(p);if(!e.md.validateLink(m))continue;let b=c[h].text;c[h].schema?c[h].schema==="mailto:"&&!/^mailto:/i.test(b)?b=e.md.normalizeLinkText("mailto:"+b).replace(/^mailto:/,""):b=e.md.normalizeLinkText(b):b=e.md.normalizeLinkText("http://"+b).replace(/^http:\/\//,"");const v=c[h].index;if(v>g){const S=new e.Token("text","",0);S.content=u.slice(g,v),S.level=d,l.push(S)}const y=new e.Token("link_open","a",1);y.attrs=[["href",m]],y.level=d++,y.markup="linkify",y.info="auto",l.push(y);const x=new e.Token("text","",0);x.content=b,x.level=d,l.push(x);const E=new e.Token("link_close","a",-1);E.level=--d,E.markup="linkify",E.info="auto",l.push(E),g=c[h].lastIndex}if(g<u.length){const h=new e.Token("text","",0);h.content=u.slice(g),h.level=d,l.push(h)}t[n].children=o=Lb(o,s,l)}}}}const Bb=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,LA=/\((c|tm|r)\)/i,PA=/\((c|tm|r)\)/ig,$A={c:"©",r:"®",tm:"™"};function FA(e,t){return $A[t.toLowerCase()]}function BA(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(PA,FA)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function zA(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&Bb.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function UA(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(LA.test(e.tokens[t].content)&&BA(e.tokens[t].children),Bb.test(e.tokens[t].content)&&zA(e.tokens[t].children))}const KA=/['"]/,Xf=/['"]/g,Jf="’";function ys(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function jA(e,t){let n="",r=0;t.sort((o,i)=>o.pos-i.pos);for(let o=0;o<t.length;o++){const i=t[o];n+=e.slice(r,i.pos)+i.ch,r=i.pos+1}return n+e.slice(r)}function HA(e,t){let n;const r=[],o={};for(let i=0;i<e.length;i++){const s=e[i],a=e[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=a);n--);if(r.length=n+1,s.type!=="text")continue;const u=s.content;let c=0;const l=u.length;e:for(;c<l;){Xf.lastIndex=c;const d=Xf.exec(u);if(!d)break;let g=!0,h=!0;c=d.index+1;const p=d[0]==="'";let m=32;if(d.index-1>=0)m=u.charCodeAt(d.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let b=32;if(c<l)b=u.charCodeAt(c);else for(n=i+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){b=e[n].content.charCodeAt(0);break}const v=Ri(m)||Oi(m),y=Ri(b)||Oi(b),x=Ii(m),E=Ii(b);if(E?g=!1:y&&(x||v||(g=!1)),x?h=!1:v&&(E||y||(h=!1)),b===34&&d[0]==='"'&&m>=48&&m<=57&&(h=g=!1),g&&h&&(g=v,h=y),!g&&!h){p&&ys(o,i,d.index,Jf);continue}if(h)for(n=r.length-1;n>=0;n--){let S=r[n];if(r[n].level<a)break;if(S.single===p&&r[n].level===a){S=r[n];let T,A;p?(T=t.md.options.quotes[2],A=t.md.options.quotes[3]):(T=t.md.options.quotes[0],A=t.md.options.quotes[1]),ys(o,i,d.index,A),ys(o,S.token,S.pos,T),r.length=n;continue e}}g?r.push({token:i,pos:d.index,single:p,level:a}):h&&p&&ys(o,i,d.index,Jf)}}Object.keys(o).forEach(function(i){e[i].content=jA(e[i].content,o[i])})}function qA(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!KA.test(e.tokens[t].content)||HA(e.tokens[t].children,e)}function GA(e){let t,n;const r=e.tokens,o=r.length;for(let i=0;i<o;i++){if(r[i].type!=="inline")continue;const s=r[i].children,a=s.length;for(t=0;t<a;t++)s[t].type==="text_special"&&(s[t].type="text");for(t=n=0;t<a;t++)s[t].type==="text"&&t+1<a&&s[t+1].type==="text"?s[t+1].content=s[t].content+s[t+1].content:(t!==n&&(s[n]=s[t]),n++);t!==n&&(s.length=n)}}const ou=[["normalize",DA],["block",IA],["inline",OA],["linkify",MA],["replacements",UA],["smartquotes",qA],["text_join",GA]];function Ul(){this.ruler=new ln;for(let e=0;e<ou.length;e++)this.ruler.push(ou[e][0],ou[e][1])}Ul.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)};Ul.prototype.State=Fb;function cr(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const o=this.src;for(let i=0,s=0,a=0,u=0,c=o.length,l=!1;s<c;s++){const d=o.charCodeAt(s);if(!l)if(gt(d)){a++,d===9?u+=4-u%4:u++;continue}else l=!0;(d===10||s===c-1)&&(d!==10&&s++,this.bMarks.push(i),this.eMarks.push(s),this.tShift.push(a),this.sCount.push(u),this.bsCount.push(0),l=!1,a=0,u=0,i=s+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}cr.prototype.push=function(e,t,n){const r=new jn(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r};cr.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};cr.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};cr.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){const r=this.src.charCodeAt(t);if(!gt(r))break}return t};cr.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!gt(this.src.charCodeAt(--t)))return t+1;return t};cr.prototype.skipChars=function(t,n){for(let r=this.src.length;t<r&&this.src.charCodeAt(t)===n;t++);return t};cr.prototype.skipCharsBack=function(t,n,r){if(t<=r)return t;for(;t>r;)if(n!==this.src.charCodeAt(--t))return t+1;return t};cr.prototype.getLines=function(t,n,r,o){if(t>=n)return"";const i=new Array(n-t);for(let s=0,a=t;a<n;a++,s++){let u=0;const c=this.bMarks[a];let l=c,d;for(a+1<n||o?d=this.eMarks[a]+1:d=this.eMarks[a];l<d&&u<r;){const g=this.src.charCodeAt(l);if(gt(g))g===9?u+=4-(u+this.bsCount[a])%4:u++;else if(l-c<this.tShift[a])u++;else break;l++}u>r?i[s]=new Array(u-r+1).join(" ")+this.src.slice(l,d):i[s]=this.src.slice(l,d)}return i.join("")};cr.prototype.Token=jn;const VA=65536;function iu(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function Qf(e){const t=[],n=e.length;let r=0,o=e.charCodeAt(r),i=!1,s=0,a="";for(;r<n;)o===124&&(i?(a+=e.substring(s,r-1),s=r):(t.push(a+e.substring(s,r)),a="",s=r+1)),i=o===92,r++,o=e.charCodeAt(r);return t.push(a+e.substring(s)),t}function WA(e,t,n,r){if(t+2>n)return!1;let o=t+1;if(e.sCount[o]<e.blkIndent||e.sCount[o]-e.blkIndent>=4)return!1;let i=e.bMarks[o]+e.tShift[o];if(i>=e.eMarks[o])return!1;const s=e.src.charCodeAt(i++);if(s!==124&&s!==45&&s!==58||i>=e.eMarks[o])return!1;const a=e.src.charCodeAt(i++);if(a!==124&&a!==45&&a!==58&&!gt(a)||s===45&&gt(a))return!1;for(;i<e.eMarks[o];){const E=e.src.charCodeAt(i);if(E!==124&&E!==45&&E!==58&&!gt(E))return!1;i++}let u=iu(e,t+1),c=u.split("|");const l=[];for(let E=0;E<c.length;E++){const S=c[E].trim();if(!S){if(E===0||E===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(S))return!1;S.charCodeAt(S.length-1)===58?l.push(S.charCodeAt(0)===58?"center":"right"):S.charCodeAt(0)===58?l.push("left"):l.push("")}if(u=iu(e,t).trim(),u.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;c=Qf(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();const d=c.length;if(d===0||d!==l.length)return!1;if(r)return!0;const g=e.parentType;e.parentType="table";const h=e.md.block.ruler.getRules("blockquote"),p=e.push("table_open","table",1),m=[t,0];p.map=m;const b=e.push("thead_open","thead",1);b.map=[t,t+1];const v=e.push("tr_open","tr",1);v.map=[t,t+1];for(let E=0;E<c.length;E++){const S=e.push("th_open","th",1);l[E]&&(S.attrs=[["style","text-align:"+l[E]]]);const T=e.push("inline","",0);T.content=c[E].trim(),T.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let y,x=0;for(o=t+2;o<n&&!(e.sCount[o]<e.blkIndent);o++){let E=!1;for(let T=0,A=h.length;T<A;T++)if(h[T](e,o,n,!0)){E=!0;break}if(E||(u=iu(e,o).trim(),!u)||e.sCount[o]-e.blkIndent>=4||(c=Qf(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),x+=d-c.length,x>VA))break;if(o===t+2){const T=e.push("tbody_open","tbody",1);T.map=y=[t+2,0]}const S=e.push("tr_open","tr",1);S.map=[o,o+1];for(let T=0;T<d;T++){const A=e.push("td_open","td",1);l[T]&&(A.attrs=[["style","text-align:"+l[T]]]);const C=e.push("inline","",0);C.content=c[T]?c[T].trim():"",C.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return y&&(e.push("tbody_close","tbody",-1),y[1]=o),e.push("table_close","table",-1),m[1]=o,e.parentType=g,e.line=o,!0}function YA(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,o=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,o=r;continue}break}e.line=o;const i=e.push("code_block","code",0);return i.content=e.getLines(t,o,4+e.blkIndent,!1)+`
21
- `,i.map=[t,e.line],!0}function ZA(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>i)return!1;const s=e.src.charCodeAt(o);if(s!==126&&s!==96)return!1;let a=o;o=e.skipChars(o,s);let u=o-a;if(u<3)return!1;const c=e.src.slice(a,o),l=e.src.slice(o,i);if(s===96&&l.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let d=t,g=!1;for(;d++,!(d>=n||(o=a=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],o<i&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(o)===s&&!(e.sCount[d]-e.blkIndent>=4)&&(o=e.skipChars(o,s),!(o-a<u)&&(o=e.skipSpaces(o),!(o<i)))){g=!0;break}u=e.sCount[t],e.line=d+(g?1:0);const h=e.push("fence","code",0);return h.info=l,h.content=e.getLines(t+1,d,u,!0),h.markup=c,h.map=[t,e.line],!0}function XA(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==62)return!1;if(r)return!0;const a=[],u=[],c=[],l=[],d=e.md.block.ruler.getRules("blockquote"),g=e.parentType;e.parentType="blockquote";let h=!1,p;for(p=t;p<n;p++){const x=e.sCount[p]<e.blkIndent;if(o=e.bMarks[p]+e.tShift[p],i=e.eMarks[p],o>=i)break;if(e.src.charCodeAt(o++)===62&&!x){let S=e.sCount[p]+1,T,A;e.src.charCodeAt(o)===32?(o++,S++,A=!1,T=!0):e.src.charCodeAt(o)===9?(T=!0,(e.bsCount[p]+S)%4===3?(o++,S++,A=!1):A=!0):T=!1;let C=S;for(a.push(e.bMarks[p]),e.bMarks[p]=o;o<i;){const L=e.src.charCodeAt(o);if(gt(L))L===9?C+=4-(C+e.bsCount[p]+(A?1:0))%4:C++;else break;o++}h=o>=i,u.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(T?1:0),c.push(e.sCount[p]),e.sCount[p]=C-S,l.push(e.tShift[p]),e.tShift[p]=o-e.bMarks[p];continue}if(h)break;let E=!1;for(let S=0,T=d.length;S<T;S++)if(d[S](e,p,n,!0)){E=!0;break}if(E){e.lineMax=p,e.blkIndent!==0&&(a.push(e.bMarks[p]),u.push(e.bsCount[p]),l.push(e.tShift[p]),c.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}a.push(e.bMarks[p]),u.push(e.bsCount[p]),l.push(e.tShift[p]),c.push(e.sCount[p]),e.sCount[p]=-1}const m=e.blkIndent;e.blkIndent=0;const b=e.push("blockquote_open","blockquote",1);b.markup=">";const v=[t,0];b.map=v,e.md.block.tokenize(e,t,p);const y=e.push("blockquote_close","blockquote",-1);y.markup=">",e.lineMax=s,e.parentType=g,v[1]=e.line;for(let x=0;x<l.length;x++)e.bMarks[x+t]=a[x],e.tShift[x+t]=l[x],e.sCount[x+t]=c[x],e.bsCount[x+t]=u[x];return e.blkIndent=m,!0}function JA(e,t,n,r){const o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(i++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;i<o;){const c=e.src.charCodeAt(i++);if(c!==s&&!gt(c))return!1;c===s&&a++}if(a<3)return!1;if(r)return!0;e.line=t+1;const u=e.push("hr","hr",0);return u.map=[t,e.line],u.markup=Array(a+1).join(String.fromCharCode(s)),!0}function eg(e,t){const n=e.eMarks[t];let r=e.bMarks[t]+e.tShift[t];const o=e.src.charCodeAt(r++);if(o!==42&&o!==45&&o!==43)return-1;if(r<n){const i=e.src.charCodeAt(r);if(!gt(i))return-1}return r}function tg(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];let o=n;if(o+1>=r)return-1;let i=e.src.charCodeAt(o++);if(i<48||i>57)return-1;for(;;){if(o>=r)return-1;if(i=e.src.charCodeAt(o++),i>=48&&i<=57){if(o-n>=10)return-1;continue}if(i===41||i===46)break;return-1}return o<r&&(i=e.src.charCodeAt(o),!gt(i))?-1:o}function QA(e,t){const n=e.level+2;for(let r=t+2,o=e.tokens.length-2;r<o;r++)e.tokens[r].level===n&&e.tokens[r].type==="paragraph_open"&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function eT(e,t,n,r){let o,i,s,a,u=t,c=!0;if(e.sCount[u]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]<e.blkIndent)return!1;let l=!1;r&&e.parentType==="paragraph"&&e.sCount[u]>=e.blkIndent&&(l=!0);let d,g,h;if((h=tg(e,u))>=0){if(d=!0,s=e.bMarks[u]+e.tShift[u],g=Number(e.src.slice(s,h-1)),l&&g!==1)return!1}else if((h=eg(e,u))>=0)d=!1;else return!1;if(l&&e.skipSpaces(h)>=e.eMarks[u])return!1;if(r)return!0;const p=e.src.charCodeAt(h-1),m=e.tokens.length;d?(a=e.push("ordered_list_open","ol",1),g!==1&&(a.attrs=[["start",g]])):a=e.push("bullet_list_open","ul",1);const b=[u,0];a.map=b,a.markup=String.fromCharCode(p);let v=!1;const y=e.md.block.ruler.getRules("list"),x=e.parentType;for(e.parentType="list";u<n;){i=h,o=e.eMarks[u];const E=e.sCount[u]+h-(e.bMarks[u]+e.tShift[u]);let S=E;for(;i<o;){const W=e.src.charCodeAt(i);if(W===9)S+=4-(S+e.bsCount[u])%4;else if(W===32)S++;else break;i++}const T=i;let A;T>=o?A=1:A=S-E,A>4&&(A=1);const C=E+A;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(p);const L=[u,0];a.map=L,d&&(a.info=e.src.slice(s,h-1));const j=e.tight,$=e.tShift[u],V=e.sCount[u],B=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=C,e.tight=!0,e.tShift[u]=T-e.bMarks[u],e.sCount[u]=S,T>=o&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||v)&&(c=!1),v=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=B,e.tShift[u]=$,e.sCount[u]=V,e.tight=j,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(p),u=e.line,L[1]=u,u>=n||e.sCount[u]<e.blkIndent||e.sCount[u]-e.blkIndent>=4)break;let N=!1;for(let W=0,R=y.length;W<R;W++)if(y[W](e,u,n,!0)){N=!0;break}if(N)break;if(d){if(h=tg(e,u),h<0)break;s=e.bMarks[u]+e.tShift[u]}else if(h=eg(e,u),h<0)break;if(p!==e.src.charCodeAt(h-1))break}return d?a=e.push("ordered_list_close","ol",-1):a=e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(p),b[1]=u,e.line=u,e.parentType=x,c&&QA(e,m),!0}function tT(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==91)return!1;function a(y){const x=e.lineMax;if(y>=x||e.isEmpty(y))return null;let E=!1;if(e.sCount[y]-e.blkIndent>3&&(E=!0),e.sCount[y]<0&&(E=!0),!E){const A=e.md.block.ruler.getRules("reference"),C=e.parentType;e.parentType="reference";let L=!1;for(let j=0,$=A.length;j<$;j++)if(A[j](e,y,x,!0)){L=!0;break}if(e.parentType=C,L)return null}const S=e.bMarks[y]+e.tShift[y],T=e.eMarks[y];return e.src.slice(S,T+1)}let u=e.src.slice(o,i+1);i=u.length;let c=-1;for(o=1;o<i;o++){const y=u.charCodeAt(o);if(y===91)return!1;if(y===93){c=o;break}else if(y===10){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}else if(y===92&&(o++,o<i&&u.charCodeAt(o)===10)){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}}if(c<0||u.charCodeAt(c+1)!==58)return!1;for(o=c+2;o<i;o++){const y=u.charCodeAt(o);if(y===10){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}else if(!gt(y))break}const l=e.md.helpers.parseLinkDestination(u,o,i);if(!l.ok)return!1;const d=e.md.normalizeLink(l.str);if(!e.md.validateLink(d))return!1;o=l.pos;const g=o,h=s,p=o;for(;o<i;o++){const y=u.charCodeAt(o);if(y===10){const x=a(s);x!==null&&(u+=x,i=u.length,s++)}else if(!gt(y))break}let m=e.md.helpers.parseLinkTitle(u,o,i);for(;m.can_continue;){const y=a(s);if(y===null)break;u+=y,o=i,i=u.length,s++,m=e.md.helpers.parseLinkTitle(u,o,i,m)}let b;for(o<i&&p!==o&&m.ok?(b=m.str,o=m.pos):(b="",o=g,s=h);o<i;){const y=u.charCodeAt(o);if(!gt(y))break;o++}if(o<i&&u.charCodeAt(o)!==10&&b)for(b="",o=g,s=h;o<i;){const y=u.charCodeAt(o);if(!gt(y))break;o++}if(o<i&&u.charCodeAt(o)!==10)return!1;const v=Ia(u.slice(1,c));return v?(r||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[v]>"u"&&(e.env.references[v]={title:b,href:d}),e.line=s),!0):!1}const nT=["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"],rT="[a-zA-Z_:][a-zA-Z0-9:._-]*",oT="[^\"'=<>`\\x00-\\x20]+",iT="'[^']*'",sT='"[^"]*"',aT="(?:"+oT+"|"+iT+"|"+sT+")",uT="(?:\\s+"+rT+"(?:\\s*=\\s*"+aT+")?)",zb="<[A-Za-z][A-Za-z0-9\\-]*"+uT+"*\\s*\\/?>",Ub="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",cT="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",lT="<[?][\\s\\S]*?[?]>",dT="<![A-Za-z][^>]*>",fT="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",gT=new RegExp("^(?:"+zb+"|"+Ub+"|"+cT+"|"+lT+"|"+dT+"|"+fT+")"),pT=new RegExp("^(?:"+zb+"|"+Ub+")"),no=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+nT.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(pT.source+"\\s*$"),/^$/,!1]];function hT(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let s=e.src.slice(o,i),a=0;for(;a<no.length&&!no[a][0].test(s);a++);if(a===no.length)return!1;if(r)return no[a][2];let u=t+1;const c=no[a][1].test("");if(!no[a][1].test(s)){for(;u<n&&!(e.sCount[u]<e.blkIndent&&(c||!e.isEmpty(u)));u++)if(o=e.bMarks[u]+e.tShift[u],i=e.eMarks[u],s=e.src.slice(o,i),no[a][1].test(s)){s.length!==0&&u++;break}}e.line=u;const l=e.push("html_block","",0);return l.map=[t,u],l.content=e.getLines(t,u,e.blkIndent,!0),!0}function mT(e,t,n,r){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.src.charCodeAt(o);if(s!==35||o>=i)return!1;let a=1;for(s=e.src.charCodeAt(++o);s===35&&o<i&&a<=6;)a++,s=e.src.charCodeAt(++o);if(a>6||o<i&&!gt(s))return!1;if(r)return!0;i=e.skipSpacesBack(i,o);const u=e.skipCharsBack(i,35,o);u>o&&gt(e.src.charCodeAt(u-1))&&(i=u),e.line=t+1;const c=e.push("heading_open","h"+String(a),1);c.markup="########".slice(0,a),c.map=[t,e.line];const l=e.push("inline","",0);l.content=Oa(e.src.slice(o,i)),l.map=[t,e.line],l.children=[];const d=e.push("heading_close","h"+String(a),-1);return d.markup="########".slice(0,a),!0}function bT(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const o=e.parentType;e.parentType="paragraph";let i=0,s,a=t+1;for(;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let h=e.bMarks[a]+e.tShift[a];const p=e.eMarks[a];if(h<p&&(s=e.src.charCodeAt(h),(s===45||s===61)&&(h=e.skipChars(h,s),h=e.skipSpaces(h),h>=p))){i=s===61?1:2;break}}if(e.sCount[a]<0)continue;let g=!1;for(let h=0,p=r.length;h<p;h++)if(r[h](e,a,n,!0)){g=!0;break}if(g)break}if(!i)return e.parentType=o,!1;const u=Oa(e.getLines(t,a,e.blkIndent,!1));e.line=a+1;const c=e.push("heading_open","h"+String(i),1);c.markup=String.fromCharCode(s),c.map=[t,e.line];const l=e.push("inline","",0);l.content=u,l.map=[t,e.line-1],l.children=[];const d=e.push("heading_close","h"+String(i),-1);return d.markup=String.fromCharCode(s),e.parentType=o,!0}function yT(e,t,n){const r=e.md.block.ruler.getRules("paragraph"),o=e.parentType;let i=t+1;for(e.parentType="paragraph";i<n&&!e.isEmpty(i);i++){if(e.sCount[i]-e.blkIndent>3||e.sCount[i]<0)continue;let c=!1;for(let l=0,d=r.length;l<d;l++)if(r[l](e,i,n,!0)){c=!0;break}if(c)break}const s=Oa(e.getLines(t,i,e.blkIndent,!1));e.line=i;const a=e.push("paragraph_open","p",1);a.map=[t,e.line];const u=e.push("inline","",0);return u.content=s,u.map=[t,e.line],u.children=[],e.push("paragraph_close","p",-1),e.parentType=o,!0}const vs=[["table",WA,["paragraph","reference"]],["code",YA],["fence",ZA,["paragraph","reference","blockquote","list"]],["blockquote",XA,["paragraph","reference","blockquote","list"]],["hr",JA,["paragraph","reference","blockquote","list"]],["list",eT,["paragraph","reference","blockquote"]],["reference",tT],["html_block",hT,["paragraph","reference","blockquote"]],["heading",mT,["paragraph","reference","blockquote"]],["lheading",bT],["paragraph",yT]];function Ra(){this.ruler=new ln;for(let e=0;e<vs.length;e++)this.ruler.push(vs[e][0],vs[e][1],{alt:(vs[e][2]||[]).slice()})}Ra.prototype.tokenize=function(e,t,n){const r=this.ruler.getRules(""),o=r.length,i=e.md.options.maxNesting;let s=t,a=!1;for(;s<n&&(e.line=s=e.skipEmptyLines(s),!(s>=n||e.sCount[s]<e.blkIndent));){if(e.level>=i){e.line=n;break}const u=e.line;let c=!1;for(let l=0;l<o;l++)if(c=r[l](e,s,n,!1),c){if(u>=e.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),s=e.line,s<n&&e.isEmpty(s)&&(a=!0,s++,e.line=s)}};Ra.prototype.parse=function(e,t,n,r){if(!e)return;const o=new this.State(e,t,n,r);this.tokenize(o,o.line,o.lineMax)};Ra.prototype.State=cr;function Xi(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Xi.prototype.pushPending=function(){const e=new jn("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};Xi.prototype.push=function(e,t,n){this.pending&&this.pushPending();const r=new jn(e,t,n);let o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r};Xi.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e);let o;if(e===0)o=32;else if(e===1)o=this.src.charCodeAt(0),(o&63488)===55296&&(o=65533);else if(o=this.src.charCodeAt(e-1),(o&64512)===56320){const b=this.src.charCodeAt(e-2);o=(b&64512)===55296?65536+(b-55296<<10)+(o-56320):65533}else(o&64512)===55296&&(o=65533);let i=e;for(;i<n&&this.src.charCodeAt(i)===r;)i++;const s=i-e;let a=i<n?this.src.charCodeAt(i):32;if((a&64512)===55296){const b=this.src.charCodeAt(i+1);a=(b&64512)===56320?65536+(a-55296<<10)+(b-56320):65533}else(a&64512)===56320&&(a=65533);const u=Ri(o)||Oi(o),c=Ri(a)||Oi(a),l=Ii(o),d=Ii(a),g=!d&&(!c||l||u),h=!l&&(!u||d||c);return{can_open:g&&(t||!h||u),can_close:h&&(t||!g||c),length:s}};Xi.prototype.Token=jn;function vT(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function xT(e,t){let n=e.pos;for(;n<e.posMax&&!vT(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const wT=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function _T(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const o=e.pending.match(wT);if(!o)return!1;const i=o[1],s=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!s)return!1;let a=s.url;if(a.length<=i.length)return!1;let u=a.length;for(;u>0&&a.charCodeAt(u-1)===42;)u--;u!==a.length&&(a=a.slice(0,u));const c=e.md.normalizeLink(a);if(!e.md.validateLink(c))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);const l=e.push("link_open","a",1);l.attrs=[["href",c]],l.markup="linkify",l.info="auto";const d=e.push("text","",0);d.content=e.md.normalizeLinkText(a);const g=e.push("link_close","a",-1);g.markup="linkify",g.info="auto"}return e.pos+=a.length-i.length,!0}function ET(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,o=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<o&&gt(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const Kl=[];for(let e=0;e<256;e++)Kl.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Kl[e.charCodeAt(0)]=1});function ST(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n<r&&(o=e.src.charCodeAt(n),!!gt(o));)n++;return e.pos=n,!0}let i=e.src[n];if(o>=55296&&o<=56319&&n+1<r){const a=e.src.charCodeAt(n+1);a>=56320&&a<=57343&&(i+=e.src[n+1],n++)}const s="\\"+i;if(!t){const a=e.push("text_special","",0);o<256&&Kl[o]!==0?a.content=i:a.content=s,a.markup=s,a.info="escape"}return e.pos=n+1,!0}function CT(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const o=n;n++;const i=e.posMax;for(;n<i&&e.src.charCodeAt(n)===96;)n++;const s=e.src.slice(o,n),a=s.length;if(e.backticksScanned&&(e.backticks[a]||0)<=o)return t||(e.pending+=s),e.pos+=a,!0;let u=n,c;for(;(c=e.src.indexOf("`",u))!==-1;){for(u=c+1;u<i&&e.src.charCodeAt(u)===96;)u++;const l=u-c;if(l===a){if(!t){const d=e.push("code_inline","code",0);d.markup=s,d.content=e.src.slice(n,c).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=u,!0}e.backticks[l]=c}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=a,!0}function kT(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t||r!==126)return!1;const o=e.scanDelims(e.pos,!0);let i=o.length;const s=String.fromCharCode(r);if(i<2)return!1;let a;i%2&&(a=e.push("text","",0),a.content=s,i--);for(let u=0;u<i;u+=2)a=e.push("text","",0),a.content=s+s,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0}function ng(e,t){let n;const r=[],o=t.length;for(let i=0;i<o;i++){const s=t[i];if(s.marker!==126||s.end===-1)continue;const a=t[s.end];n=e.tokens[s.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[a.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[a.token-1].type==="text"&&e.tokens[a.token-1].content==="~"&&r.push(a.token-1)}for(;r.length;){const i=r.pop();let s=i+1;for(;s<e.tokens.length&&e.tokens[s].type==="s_close";)s++;s--,i!==s&&(n=e.tokens[s],e.tokens[s]=e.tokens[i],e.tokens[i]=n)}}function AT(e){const t=e.tokens_meta,n=e.tokens_meta.length;ng(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&ng(e,t[r].delimiters)}const Kb={tokenize:kT,postProcess:AT};function TT(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t||r!==95&&r!==42)return!1;const o=e.scanDelims(e.pos,r===42);for(let i=0;i<o.length;i++){const s=e.push("text","",0);s.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:o.length,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close})}return e.pos+=o.length,!0}function rg(e,t){const n=t.length;for(let r=n-1;r>=0;r--){const o=t[r];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;const i=t[o.end],s=r>0&&t[r-1].end===o.end+1&&t[r-1].marker===o.marker&&t[r-1].token===o.token-1&&t[o.end+1].token===i.token+1,a=String.fromCharCode(o.marker),u=e.tokens[o.token];u.type=s?"strong_open":"em_open",u.tag=s?"strong":"em",u.nesting=1,u.markup=s?a+a:a,u.content="";const c=e.tokens[i.token];c.type=s?"strong_close":"em_close",c.tag=s?"strong":"em",c.nesting=-1,c.markup=s?a+a:a,c.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[o.end+1].token].content="",r--)}}function DT(e){const t=e.tokens_meta,n=e.tokens_meta.length;rg(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&rg(e,t[r].delimiters)}const jb={tokenize:TT,postProcess:DT};function IT(e,t){let n,r,o,i,s="",a="",u=e.pos,c=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const l=e.pos,d=e.posMax,g=e.pos+1,h=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(h<0)return!1;let p=h+1;if(p<d&&e.src.charCodeAt(p)===40){for(c=!1,p++;p<d&&(n=e.src.charCodeAt(p),!(!gt(n)&&n!==10));p++);if(p>=d)return!1;if(u=p,o=e.md.helpers.parseLinkDestination(e.src,p,e.posMax),o.ok){for(s=e.md.normalizeLink(o.str),e.md.validateLink(s)?p=o.pos:s="",u=p;p<d&&(n=e.src.charCodeAt(p),!(!gt(n)&&n!==10));p++);if(o=e.md.helpers.parseLinkTitle(e.src,p,e.posMax),p<d&&u!==p&&o.ok)for(a=o.str,p=o.pos;p<d&&(n=e.src.charCodeAt(p),!(!gt(n)&&n!==10));p++);}(p>=d||e.src.charCodeAt(p)!==41)&&(c=!0),p++}if(c){if(typeof e.env.references>"u")return!1;if(p<d&&e.src.charCodeAt(p)===91?(u=p+1,p=e.md.helpers.parseLinkLabel(e,p),p>=0?r=e.src.slice(u,p++):p=h+1):p=h+1,r||(r=e.src.slice(g,h)),i=e.env.references[Ia(r)],!i)return e.pos=l,!1;s=i.href,a=i.title}if(!t){e.pos=g,e.posMax=h;const m=e.push("link_open","a",1),b=[["href",s]];m.attrs=b,a&&b.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=p,e.posMax=d,!0}function OT(e,t){let n,r,o,i,s,a,u,c,l="";const d=e.pos,g=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const h=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(p<0)return!1;if(i=p+1,i<g&&e.src.charCodeAt(i)===40){for(i++;i<g&&(n=e.src.charCodeAt(i),!(!gt(n)&&n!==10));i++);if(i>=g)return!1;for(c=i,a=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),a.ok&&(l=e.md.normalizeLink(a.str),e.md.validateLink(l)?i=a.pos:l=""),c=i;i<g&&(n=e.src.charCodeAt(i),!(!gt(n)&&n!==10));i++);if(a=e.md.helpers.parseLinkTitle(e.src,i,e.posMax),i<g&&c!==i&&a.ok)for(u=a.str,i=a.pos;i<g&&(n=e.src.charCodeAt(i),!(!gt(n)&&n!==10));i++);else u="";if(i>=g||e.src.charCodeAt(i)!==41)return e.pos=d,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i<g&&e.src.charCodeAt(i)===91?(c=i+1,i=e.md.helpers.parseLinkLabel(e,i),i>=0?o=e.src.slice(c,i++):i=p+1):i=p+1,o||(o=e.src.slice(h,p)),s=e.env.references[Ia(o)],!s)return e.pos=d,!1;l=s.href,u=s.title}if(!t){r=e.src.slice(h,p);const m=[];e.md.inline.parse(r,e.md,e.env,m);const b=e.push("image","img",0),v=[["src",l],["alt",""]];b.attrs=v,b.children=m,b.content=r,u&&v.push(["title",u])}return e.pos=i,e.posMax=g,!0}const RT=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,NT=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function MT(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;const s=e.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}const i=e.src.slice(r+1,n);if(NT.test(i)){const s=e.md.normalizeLink(i);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(i);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=i.length+2,!0}if(RT.test(i)){const s=e.md.normalizeLink("mailto:"+i);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(i);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=i.length+2,!0}return!1}function LT(e){return/^<a[>\s]/i.test(e)}function PT(e){return/^<\/a\s*>/i.test(e)}function $T(e){const t=e|32;return t>=97&&t<=122}function FT(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!$T(o))return!1;const i=e.src.slice(r).match(gT);if(!i)return!1;if(!t){const s=e.push("html_inline","",0);s.content=i[0],LT(s.content)&&e.linkLevel++,PT(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}const BT=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,zT=/^&([a-z][a-z0-9]{1,31});/i;function UT(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const i=e.src.slice(n).match(BT);if(i){if(!t){const s=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),a=e.push("text_special","",0);a.content=zl(s)?Di(s):Di(65533),a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}else{const i=e.src.slice(n).match(zT);if(i){const s=sA(i[0]);if(s!==i[0]){if(!t){const a=e.push("text_special","",0);a.content=s,a.markup=i[0],a.info="entity"}return e.pos+=i[0].length,!0}}}return!1}function og(e){const t={},n=e.length;if(!n)return;let r=0,o=-2;const i=[];for(let s=0;s<n;s++){const a=e[s];if(i.push(0),(e[r].marker!==a.marker||o!==a.token-1)&&(r=s),o=a.token,a.length=a.length||0,!a.close)continue;t.hasOwnProperty(a.marker)||(t[a.marker]=[-1,-1,-1,-1,-1,-1]);const u=t[a.marker][(a.open?3:0)+a.length%3];let c=r-i[r]-1,l=c;for(;c>u;c-=i[c]+1){const d=e[c];if(d.marker===a.marker&&d.open&&d.end<0){let g=!1;if((d.close||a.open)&&(d.length+a.length)%3===0&&(d.length%3!==0||a.length%3!==0)&&(g=!0),!g){const h=c>0&&!e[c-1].open?i[c-1]+1:0;i[s]=s-c+h,i[c]=h,a.open=!1,d.end=s,d.close=!1,l=-1,o=-2;break}}}l!==-1&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=l)}}function KT(e){const t=e.tokens_meta,n=e.tokens_meta.length;og(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&og(t[r].delimiters)}function jT(e){let t,n,r=0;const o=e.tokens,i=e.tokens.length;for(t=n=0;t<i;t++)o[t].nesting<0&&r--,o[t].level=r,o[t].nesting>0&&r++,o[t].type==="text"&&t+1<i&&o[t+1].type==="text"?o[t+1].content=o[t].content+o[t+1].content:(t!==n&&(o[n]=o[t]),n++);t!==n&&(o.length=n)}const su=[["text",xT],["linkify",_T],["newline",ET],["escape",ST],["backticks",CT],["strikethrough",Kb.tokenize],["emphasis",jb.tokenize],["link",IT],["image",OT],["autolink",MT],["html_inline",FT],["entity",UT]],au=[["balance_pairs",KT],["strikethrough",Kb.postProcess],["emphasis",jb.postProcess],["fragments_join",jT]];function Ji(){this.ruler=new ln;for(let e=0;e<su.length;e++)this.ruler.push(su[e][0],su[e][1]);this.ruler2=new ln;for(let e=0;e<au.length;e++)this.ruler2.push(au[e][0],au[e][1])}Ji.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),r=n.length,o=e.md.options.maxNesting,i=e.cache;if(typeof i[t]<"u"){e.pos=i[t];return}let s=!1;if(e.level<o){for(let a=0;a<r;a++)if(e.level++,s=n[a](e,!0),e.level--,s){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,i[t]=e.pos};Ji.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,o=e.md.options.maxNesting;for(;e.pos<r;){const i=e.pos;let s=!1;if(e.level<o){for(let a=0;a<n;a++)if(s=t[a](e,!1),s){if(i>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Ji.prototype.parse=function(e,t,n,r){const o=new this.State(e,t,n,r);this.tokenize(o);const i=this.ruler2.getRules(""),s=i.length;for(let a=0;a<s;a++)i[a](o)};Ji.prototype.State=Xi;function HT(e){const t={};e=e||{},t.src_Any=Db.source,t.src_Cc=Ib.source,t.src_Z=Rb.source,t.src_P=Fl.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Lc(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function Na(e){return Object.prototype.toString.call(e)}function qT(e){return Na(e)==="[object String]"}function GT(e){return Na(e)==="[object Object]"}function VT(e){return Na(e)==="[object RegExp]"}function ig(e){return Na(e)==="[object Function]"}function WT(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Hb={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function YT(e){return Object.keys(e||{}).reduce(function(t,n){return t||Hb.hasOwnProperty(n)},!1)}const ZT={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},XT="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",JT="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function QT(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function sg(){return function(e,t){t.normalize(e)}}function Ws(e){const t=e.re=HT(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(XT),n.push(t.src_xn),t.src_tlds=n.join("|");function r(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(r(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(r(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(r(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const o=[];e.__compiled__={};function i(a,u){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+u)}Object.keys(e.__schemas__).forEach(function(a){const u=e.__schemas__[a];if(u===null)return;const c={validate:null,link:null};if(e.__compiled__[a]=c,GT(u)){VT(u.validate)?c.validate=QT(u.validate):ig(u.validate)?c.validate=u.validate:i(a,u),ig(u.normalize)?c.normalize=u.normalize:u.normalize?i(a,u):c.normalize=sg();return}if(qT(u)){o.push(a);return}i(a,u)}),o.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:sg()};const s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(WT).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i")}function qb(e,t,n,r){const o=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=o,this.text=o,this.url=o}function _n(e,t){if(!(this instanceof _n))return new _n(e,t);t||YT(e)&&(t=e,e={}),this.__opts__=Lc({},Hb,t),this.__schemas__=Lc({},ZT,e),this.__compiled__={},this.__tlds__=JT,this.__tlds_replaced__=!1,this.re={},Ws(this)}_n.prototype.add=function(t,n){return this.__schemas__[t]=n,Ws(this),this};_n.prototype.set=function(t){return this.__opts__=Lc(this.__opts__,t),this};_n.prototype.test=function(t){if(!t.length)return!1;let n,r;if(this.re.schema_test.test(t)){for(r=this.re.schema_search,r.lastIndex=0;(n=r.exec(t))!==null;)if(this.testSchemaAt(t,n[2],r.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};_n.prototype.pretest=function(t){return this.re.pretest.test(t)};_n.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};_n.prototype.match=function(t){const n=[],r=[],o=[],i=[];let s,a,u;function c(g,h){return g?h?g.index!==h.index?g.index<h.index?g:h:g.lastIndex>=h.lastIndex?g:h:g:h}if(!t.length)return null;if(this.re.schema_test.test(t))for(u=this.re.schema_search,u.lastIndex=0;(s=u.exec(t))!==null;)a=this.testSchemaAt(t,s[2],u.lastIndex),a&&r.push({schema:s[2],index:s.index+s[1].length,lastIndex:s.index+s[0].length+a});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(u=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,u.lastIndex=0;(s=u.exec(t))!==null;)o.push({schema:"",index:s.index+s[1].length,lastIndex:s.index+s[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(u=this.re.email_fuzzy_global,u.lastIndex=0;(s=u.exec(t))!==null;)i.push({schema:"mailto:",index:s.index+s[1].length,lastIndex:s.index+s[0].length});const l=[0,0,0];let d=0;for(;;){const g=[r[l[0]],i[l[1]],o[l[2]]],h=c(c(g[0],g[1]),g[2]);if(!h)break;if(h===g[0]?l[0]++:h===g[1]?l[1]++:l[2]++,h.index<d)continue;const p=new qb(t,h.schema,h.index,h.lastIndex);this.__compiled__[p.schema].normalize(p,this),n.push(p),d=h.lastIndex}return n.length?n:null};_n.prototype.matchAtStart=function(t){if(!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);if(!r)return null;const o=new qb(t,n[2],n.index+n[1].length,n.index+n[0].length+r);return this.__compiled__[o.schema].normalize(o,this),o};_n.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,i){return r!==i[o-1]}).reverse(),Ws(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Ws(this),this)};_n.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};_n.prototype.onCompile=function(){};const Fo=2147483647,Jn=36,jl=1,Ni=26,eD=38,tD=700,Gb=72,Vb=128,Wb="-",nD=/^xn--/,rD=/[^\0-\x7F]/,oD=/[\x2E\u3002\uFF0E\uFF61]/g,iD={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},uu=Jn-jl,Qn=Math.floor,cu=String.fromCharCode;function Pr(e){throw new RangeError(iD[e])}function sD(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function Yb(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(oD,".");const o=e.split("."),i=sD(o,t).join(".");return r+i}function Zb(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const i=e.charCodeAt(n++);(i&64512)==56320?t.push(((o&1023)<<10)+(i&1023)+65536):(t.push(o),n--)}else t.push(o)}return t}const aD=e=>String.fromCodePoint(...e),uD=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Jn},ag=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Xb=function(e,t,n){let r=0;for(e=n?Qn(e/tD):e>>1,e+=Qn(e/t);e>uu*Ni>>1;r+=Jn)e=Qn(e/uu);return Qn(r+(uu+1)*e/(e+eD))},Jb=function(e){const t=[],n=e.length;let r=0,o=Vb,i=Gb,s=e.lastIndexOf(Wb);s<0&&(s=0);for(let a=0;a<s;++a)e.charCodeAt(a)>=128&&Pr("not-basic"),t.push(e.charCodeAt(a));for(let a=s>0?s+1:0;a<n;){const u=r;for(let l=1,d=Jn;;d+=Jn){a>=n&&Pr("invalid-input");const g=uD(e.charCodeAt(a++));g>=Jn&&Pr("invalid-input"),g>Qn((Fo-r)/l)&&Pr("overflow"),r+=g*l;const h=d<=i?jl:d>=i+Ni?Ni:d-i;if(g<h)break;const p=Jn-h;l>Qn(Fo/p)&&Pr("overflow"),l*=p}const c=t.length+1;i=Xb(r-u,c,u==0),Qn(r/c)>Fo-o&&Pr("overflow"),o+=Qn(r/c),r%=c,t.splice(r++,0,o)}return String.fromCodePoint(...t)},Qb=function(e){const t=[];e=Zb(e);const n=e.length;let r=Vb,o=0,i=Gb;for(const u of e)u<128&&t.push(cu(u));const s=t.length;let a=s;for(s&&t.push(Wb);a<n;){let u=Fo;for(const l of e)l>=r&&l<u&&(u=l);const c=a+1;u-r>Qn((Fo-o)/c)&&Pr("overflow"),o+=(u-r)*c,r=u;for(const l of e)if(l<r&&++o>Fo&&Pr("overflow"),l===r){let d=o;for(let g=Jn;;g+=Jn){const h=g<=i?jl:g>=i+Ni?Ni:g-i;if(d<h)break;const p=d-h,m=Jn-h;t.push(cu(ag(h+p%m,0))),d=Qn(p/m)}t.push(cu(ag(d,0))),i=Xb(o,c,a===s),o=0,++a}++o,++r}return t.join("")},cD=function(e){return Yb(e,function(t){return nD.test(t)?Jb(t.slice(4).toLowerCase()):t})},lD=function(e){return Yb(e,function(t){return rD.test(t)?"xn--"+Qb(t):t})},e1={version:"2.3.1",ucs2:{decode:Zb,encode:aD},decode:Jb,encode:Qb,toASCII:lD,toUnicode:cD},dD={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},fD={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},gD={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},pD={default:dD,zero:fD,commonmark:gD},hD=/^(vbscript|javascript|file|data):/,mD=/^data:image\/(gif|png|jpeg|webp);/;function bD(e){const t=e.trim().toLowerCase();return hD.test(t)?mD.test(t):!0}const t1=["http:","https:","mailto:"];function yD(e){const t=$l(e,!0);if(t.hostname&&(!t.protocol||t1.indexOf(t.protocol)>=0))try{t.hostname=e1.toASCII(t.hostname)}catch{}return Zi(Pl(t))}function vD(e){const t=$l(e,!0);if(t.hostname&&(!t.protocol||t1.indexOf(t.protocol)>=0))try{t.hostname=e1.toUnicode(t.hostname)}catch{}return Uo(Pl(t),Uo.defaultChars+"%")}function In(e,t){if(!(this instanceof In))return new In(e,t);t||Bl(e)||(t=e||{},e="default"),this.inline=new Ji,this.block=new Ra,this.core=new Ul,this.renderer=new Wo,this.linkify=new _n,this.validateLink=bD,this.normalizeLink=yD,this.normalizeLinkText=vD,this.utils=_A,this.helpers=Da({},kA),this.options={},this.configure(e),t&&this.set(t)}In.prototype.set=function(e){return Da(this.options,e),this};In.prototype.configure=function(e){const t=this;if(Bl(e)){const n=e;if(e=pD[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};In.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};In.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};In.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};In.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};In.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};In.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};In.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};function Ma(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lu,ug;function xD(){if(ug)return lu;ug=1;var e=!0,t=!1,n=!1;lu=function(m,b){b&&(e=!b.enabled,t=!!b.label,n=!!b.labelAfter),m.core.ruler.after("inline","github-task-lists",function(v){for(var y=v.tokens,x=2;x<y.length;x++)i(y,x)&&(s(y[x],v.Token),r(y[x-2],"class","task-list-item"+(e?"":" enabled")),r(y[o(y,x-2)],"class","contains-task-list"))})};function r(m,b,v){var y=m.attrIndex(b),x=[b,v];y<0?m.attrPush(x):m.attrs[y]=x}function o(m,b){for(var v=m[b].level-1,y=b-1;y>=0;y--)if(m[y].level===v)return y;return-1}function i(m,b){return d(m[b])&&g(m[b-1])&&h(m[b-2])&&p(m[b])}function s(m,b){if(m.children.unshift(a(m,b)),m.children[1].content=m.children[1].content.slice(3),m.content=m.content.slice(3),t)if(n){m.children.pop();var v="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);m.children[0].content=m.children[0].content.slice(0,-1)+' id="'+v+'">',m.children.push(l(m.content,v,b))}else m.children.unshift(u(b)),m.children.push(c(b))}function a(m,b){var v=new b("html_inline","",0),y=e?' disabled="" ':"";return m.content.indexOf("[ ] ")===0?v.content='<input class="task-list-item-checkbox"'+y+'type="checkbox">':(m.content.indexOf("[x] ")===0||m.content.indexOf("[X] ")===0)&&(v.content='<input class="task-list-item-checkbox" checked=""'+y+'type="checkbox">'),v}function u(m){var b=new m("html_inline","",0);return b.content="<label>",b}function c(m){var b=new m("html_inline","",0);return b.content="</label>",b}function l(m,b,v){var y=new v("html_inline","",0);return y.content='<label class="task-list-item-label" for="'+b+'">'+m+"</label>",y.attrs=[{for:b}],y}function d(m){return m.type==="inline"}function g(m){return m.type==="paragraph_open"}function h(m){return m.type==="list_item_open"}function p(m){return m.content.indexOf("[ ] ")===0||m.content.indexOf("[x] ")===0||m.content.indexOf("[X] ")===0}return lu}var wD=xD();const _D=Ma(wD);var du,cg;function ED(){if(cg)return du;cg=1;function e(I){return I instanceof Map?I.clear=I.delete=I.set=function(){throw new Error("map is read-only")}:I instanceof Set&&(I.add=I.clear=I.delete=function(){throw new Error("set is read-only")}),Object.freeze(I),Object.getOwnPropertyNames(I).forEach(Q=>{const ge=I[Q],Fe=typeof ge;(Fe==="object"||Fe==="function")&&!Object.isFrozen(ge)&&e(ge)}),I}class t{constructor(Q){Q.data===void 0&&(Q.data={}),this.data=Q.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(I){return I.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function r(I,...Q){const ge=Object.create(null);for(const Fe in I)ge[Fe]=I[Fe];return Q.forEach(function(Fe){for(const yt in Fe)ge[yt]=Fe[yt]}),ge}const o="</span>",i=I=>!!I.scope,s=(I,{prefix:Q})=>{if(I.startsWith("language:"))return I.replace("language:","language-");if(I.includes(".")){const ge=I.split(".");return[`${Q}${ge.shift()}`,...ge.map((Fe,yt)=>`${Fe}${"_".repeat(yt+1)}`)].join(" ")}return`${Q}${I}`};class a{constructor(Q,ge){this.buffer="",this.classPrefix=ge.classPrefix,Q.walk(this)}addText(Q){this.buffer+=n(Q)}openNode(Q){if(!i(Q))return;const ge=s(Q.scope,{prefix:this.classPrefix});this.span(ge)}closeNode(Q){i(Q)&&(this.buffer+=o)}value(){return this.buffer}span(Q){this.buffer+=`<span class="${Q}">`}}const u=(I={})=>{const Q={children:[]};return Object.assign(Q,I),Q};class c{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(Q){this.top.children.push(Q)}openNode(Q){const ge=u({scope:Q});this.add(ge),this.stack.push(ge)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(Q){return this.constructor._walk(Q,this.rootNode)}static _walk(Q,ge){return typeof ge=="string"?Q.addText(ge):ge.children&&(Q.openNode(ge),ge.children.forEach(Fe=>this._walk(Q,Fe)),Q.closeNode(ge)),Q}static _collapse(Q){typeof Q!="string"&&Q.children&&(Q.children.every(ge=>typeof ge=="string")?Q.children=[Q.children.join("")]:Q.children.forEach(ge=>{c._collapse(ge)}))}}class l extends c{constructor(Q){super(),this.options=Q}addText(Q){Q!==""&&this.add(Q)}startScope(Q){this.openNode(Q)}endScope(){this.closeNode()}__addSublanguage(Q,ge){const Fe=Q.root;ge&&(Fe.scope=`language:${ge}`),this.add(Fe)}toHTML(){return new a(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(I){return I?typeof I=="string"?I:I.source:null}function g(I){return m("(?=",I,")")}function h(I){return m("(?:",I,")*")}function p(I){return m("(?:",I,")?")}function m(...I){return I.map(ge=>d(ge)).join("")}function b(I){const Q=I[I.length-1];return typeof Q=="object"&&Q.constructor===Object?(I.splice(I.length-1,1),Q):{}}function v(...I){return"("+(b(I).capture?"":"?:")+I.map(Fe=>d(Fe)).join("|")+")"}function y(I){return new RegExp(I.toString()+"|").exec("").length-1}function x(I,Q){const ge=I&&I.exec(Q);return ge&&ge.index===0}const E=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function S(I,{joinWith:Q}){let ge=0;return I.map(Fe=>{ge+=1;const yt=ge;let vt=d(Fe),Ce="";for(;vt.length>0;){const U=E.exec(vt);if(!U){Ce+=vt;break}Ce+=vt.substring(0,U.index),vt=vt.substring(U.index+U[0].length),U[0][0]==="\\"&&U[1]?Ce+="\\"+String(Number(U[1])+yt):(Ce+=U[0],U[0]==="("&&ge++)}return Ce}).map(Fe=>`(${Fe})`).join(Q)}const T=/\b\B/,A="[a-zA-Z]\\w*",C="[a-zA-Z_]\\w*",L="\\b\\d+(\\.\\d+)?",j="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",$="\\b(0b[01]+)",V="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",B=(I={})=>{const Q=/^#![ ]*\//;return I.binary&&(I.begin=m(Q,/.*\b/,I.binary,/\b.*/)),r({scope:"meta",begin:Q,end:/$/,relevance:0,"on:begin":(ge,Fe)=>{ge.index!==0&&Fe.ignoreMatch()}},I)},N={begin:"\\\\[\\s\\S]",relevance:0},W={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[N]},R={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[N]},P={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ne=function(I,Q,ge={}){const Fe=r({scope:"comment",begin:I,end:Q,contains:[]},ge);Fe.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const yt=v("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Fe.contains.push({begin:m(/[ ]+/,"(",yt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Fe},Y=ne("//","$"),K=ne("/\\*","\\*/"),ce=ne("#","$"),z={scope:"number",begin:L,relevance:0},k={scope:"number",begin:j,relevance:0},O={scope:"number",begin:$,relevance:0},Z={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[N,{begin:/\[/,end:/\]/,relevance:0,contains:[N]}]},re={scope:"title",begin:A,relevance:0},F={scope:"title",begin:C,relevance:0},q={begin:"\\.\\s*"+C,relevance:0};var ye=Object.freeze({__proto__:null,APOS_STRING_MODE:W,BACKSLASH_ESCAPE:N,BINARY_NUMBER_MODE:O,BINARY_NUMBER_RE:$,COMMENT:ne,C_BLOCK_COMMENT_MODE:K,C_LINE_COMMENT_MODE:Y,C_NUMBER_MODE:k,C_NUMBER_RE:j,END_SAME_AS_BEGIN:function(I){return Object.assign(I,{"on:begin":(Q,ge)=>{ge.data._beginMatch=Q[1]},"on:end":(Q,ge)=>{ge.data._beginMatch!==Q[1]&&ge.ignoreMatch()}})},HASH_COMMENT_MODE:ce,IDENT_RE:A,MATCH_NOTHING_RE:T,METHOD_GUARD:q,NUMBER_MODE:z,NUMBER_RE:L,PHRASAL_WORDS_MODE:P,QUOTE_STRING_MODE:R,REGEXP_MODE:Z,RE_STARTERS_RE:V,SHEBANG:B,TITLE_MODE:re,UNDERSCORE_IDENT_RE:C,UNDERSCORE_TITLE_MODE:F});function ae(I,Q){I.input[I.index-1]==="."&&Q.ignoreMatch()}function pe(I,Q){I.className!==void 0&&(I.scope=I.className,delete I.className)}function Ne(I,Q){Q&&I.beginKeywords&&(I.begin="\\b("+I.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",I.__beforeBegin=ae,I.keywords=I.keywords||I.beginKeywords,delete I.beginKeywords,I.relevance===void 0&&(I.relevance=0))}function Pe(I,Q){Array.isArray(I.illegal)&&(I.illegal=v(...I.illegal))}function Ke(I,Q){if(I.match){if(I.begin||I.end)throw new Error("begin & end are not supported with match");I.begin=I.match,delete I.match}}function et(I,Q){I.relevance===void 0&&(I.relevance=1)}const wt=(I,Q)=>{if(!I.beforeMatch)return;if(I.starts)throw new Error("beforeMatch cannot be used with starts");const ge=Object.assign({},I);Object.keys(I).forEach(Fe=>{delete I[Fe]}),I.keywords=ge.keywords,I.begin=m(ge.beforeMatch,g(ge.begin)),I.starts={relevance:0,contains:[Object.assign(ge,{endsParent:!0})]},I.relevance=0,delete ge.beforeMatch},Bt=["of","and","for","in","not","or","if","then","parent","list","value"],qn="keyword";function lr(I,Q,ge=qn){const Fe=Object.create(null);return typeof I=="string"?yt(ge,I.split(" ")):Array.isArray(I)?yt(ge,I):Object.keys(I).forEach(function(vt){Object.assign(Fe,lr(I[vt],Q,vt))}),Fe;function yt(vt,Ce){Q&&(Ce=Ce.map(U=>U.toLowerCase())),Ce.forEach(function(U){const ie=U.split("|");Fe[ie[0]]=[vt,It(ie[0],ie[1])]})}}function It(I,Q){return Q?Number(Q):Or(I)?0:1}function Or(I){return Bt.includes(I.toLowerCase())}const pt={},on=I=>{console.error(I)},fn=(I,...Q)=>{console.log(`WARN: ${I}`,...Q)},Lt=(I,Q)=>{pt[`${I}/${Q}`]||(console.log(`Deprecated as of ${I}. ${Q}`),pt[`${I}/${Q}`]=!0)},Nn=new Error;function dr(I,Q,{key:ge}){let Fe=0;const yt=I[ge],vt={},Ce={};for(let U=1;U<=Q.length;U++)Ce[U+Fe]=yt[U],vt[U+Fe]=!0,Fe+=y(Q[U-1]);I[ge]=Ce,I[ge]._emit=vt,I[ge]._multi=!0}function ue(I){if(Array.isArray(I.begin)){if(I.skip||I.excludeBegin||I.returnBegin)throw on("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Nn;if(typeof I.beginScope!="object"||I.beginScope===null)throw on("beginScope must be object"),Nn;dr(I,I.begin,{key:"beginScope"}),I.begin=S(I.begin,{joinWith:""})}}function ve(I){if(Array.isArray(I.end)){if(I.skip||I.excludeEnd||I.returnEnd)throw on("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Nn;if(typeof I.endScope!="object"||I.endScope===null)throw on("endScope must be object"),Nn;dr(I,I.end,{key:"endScope"}),I.end=S(I.end,{joinWith:""})}}function Ae(I){I.scope&&typeof I.scope=="object"&&I.scope!==null&&(I.beginScope=I.scope,delete I.scope)}function lt(I){Ae(I),typeof I.beginScope=="string"&&(I.beginScope={_wrap:I.beginScope}),typeof I.endScope=="string"&&(I.endScope={_wrap:I.endScope}),ue(I),ve(I)}function gn(I){function Q(Ce,U){return new RegExp(d(Ce),"m"+(I.case_insensitive?"i":"")+(I.unicodeRegex?"u":"")+(U?"g":""))}class ge{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(U,ie){ie.position=this.position++,this.matchIndexes[this.matchAt]=ie,this.regexes.push([ie,U]),this.matchAt+=y(U)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const U=this.regexes.map(ie=>ie[1]);this.matcherRe=Q(S(U,{joinWith:"|"}),!0),this.lastIndex=0}exec(U){this.matcherRe.lastIndex=this.lastIndex;const ie=this.matcherRe.exec(U);if(!ie)return null;const de=ie.findIndex((kt,Dt)=>Dt>0&&kt!==void 0),Me=this.matchIndexes[de];return ie.splice(0,de),Object.assign(ie,Me)}}class Fe{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(U){if(this.multiRegexes[U])return this.multiRegexes[U];const ie=new ge;return this.rules.slice(U).forEach(([de,Me])=>ie.addRule(de,Me)),ie.compile(),this.multiRegexes[U]=ie,ie}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(U,ie){this.rules.push([U,ie]),ie.type==="begin"&&this.count++}exec(U){const ie=this.getMatcher(this.regexIndex);ie.lastIndex=this.lastIndex;let de=ie.exec(U);if(this.resumingScanAtSamePosition()&&!(de&&de.index===this.lastIndex)){const Me=this.getMatcher(0);Me.lastIndex=this.lastIndex+1,de=Me.exec(U)}return de&&(this.regexIndex+=de.position+1,this.regexIndex===this.count&&this.considerAll()),de}}function yt(Ce){const U=new Fe;return Ce.contains.forEach(ie=>U.addRule(ie.begin,{rule:ie,type:"begin"})),Ce.terminatorEnd&&U.addRule(Ce.terminatorEnd,{type:"end"}),Ce.illegal&&U.addRule(Ce.illegal,{type:"illegal"}),U}function vt(Ce,U){const ie=Ce;if(Ce.isCompiled)return ie;[pe,Ke,lt,wt].forEach(Me=>Me(Ce,U)),I.compilerExtensions.forEach(Me=>Me(Ce,U)),Ce.__beforeBegin=null,[Ne,Pe,et].forEach(Me=>Me(Ce,U)),Ce.isCompiled=!0;let de=null;return typeof Ce.keywords=="object"&&Ce.keywords.$pattern&&(Ce.keywords=Object.assign({},Ce.keywords),de=Ce.keywords.$pattern,delete Ce.keywords.$pattern),de=de||/\w+/,Ce.keywords&&(Ce.keywords=lr(Ce.keywords,I.case_insensitive)),ie.keywordPatternRe=Q(de,!0),U&&(Ce.begin||(Ce.begin=/\B|\b/),ie.beginRe=Q(ie.begin),!Ce.end&&!Ce.endsWithParent&&(Ce.end=/\B|\b/),Ce.end&&(ie.endRe=Q(ie.end)),ie.terminatorEnd=d(ie.end)||"",Ce.endsWithParent&&U.terminatorEnd&&(ie.terminatorEnd+=(Ce.end?"|":"")+U.terminatorEnd)),Ce.illegal&&(ie.illegalRe=Q(Ce.illegal)),Ce.contains||(Ce.contains=[]),Ce.contains=[].concat(...Ce.contains.map(function(Me){return Ye(Me==="self"?Ce:Me)})),Ce.contains.forEach(function(Me){vt(Me,ie)}),Ce.starts&&vt(Ce.starts,U),ie.matcher=yt(ie),ie}if(I.compilerExtensions||(I.compilerExtensions=[]),I.contains&&I.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return I.classNameAliases=r(I.classNameAliases||{}),vt(I)}function xe(I){return I?I.endsWithParent||xe(I.starts):!1}function Ye(I){return I.variants&&!I.cachedVariants&&(I.cachedVariants=I.variants.map(function(Q){return r(I,{variants:null},Q)})),I.cachedVariants?I.cachedVariants:xe(I)?r(I,{starts:I.starts?r(I.starts):null}):Object.isFrozen(I)?r(I):I}var Yt="11.11.1";class _t extends Error{constructor(Q,ge){super(Q),this.name="HTMLInjectionError",this.html=ge}}const Tt=n,Zt=r,Ve=Symbol("nomatch"),pn=7,Pt=function(I){const Q=Object.create(null),ge=Object.create(null),Fe=[];let yt=!0;const vt="Could not find the language '{}', did you forget to load/include a language module?",Ce={disableAutodetect:!0,name:"Plain text",contains:[]};let U={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:l};function ie(fe){return U.noHighlightRe.test(fe)}function de(fe){let Oe=fe.className+" ";Oe+=fe.parentNode?fe.parentNode.className:"";const Ze=U.languageDetectRe.exec(Oe);if(Ze){const dt=Mn(Ze[1]);return dt||(fn(vt.replace("{}",Ze[1])),fn("Falling back to no-highlight mode for this block.",fe)),dt?Ze[1]:"no-highlight"}return Oe.split(/\s+/).find(dt=>ie(dt)||Mn(dt))}function Me(fe,Oe,Ze){let dt="",Ot="";typeof Oe=="object"?(dt=fe,Ze=Oe.ignoreIllegals,Ot=Oe.language):(Lt("10.7.0","highlight(lang, code, ...args) has been deprecated."),Lt("10.7.0",`Please use highlight(code, options) instead.
22
- https://github.com/highlightjs/highlight.js/issues/2277`),Ot=fe,dt=Oe),Ze===void 0&&(Ze=!0);const Ln={code:dt,language:Ot};rs("before:highlight",Ln);const Rr=Ln.result?Ln.result:kt(Ln.language,Ln.code,Ze);return Rr.code=Ln.code,rs("after:highlight",Rr),Rr}function kt(fe,Oe,Ze,dt){const Ot=Object.create(null);function Ln(he,De){return he.keywords[De]}function Rr(){if(!Ue.keywords){Ut.addText(ft);return}let he=0;Ue.keywordPatternRe.lastIndex=0;let De=Ue.keywordPatternRe.exec(ft),je="";for(;De;){je+=ft.substring(he,De.index);const ot=Vn.case_insensitive?De[0].toLowerCase():De[0],jt=Ln(Ue,ot);if(jt){const[fr,N1]=jt;if(Ut.addText(je),je="",Ot[ot]=(Ot[ot]||0)+1,Ot[ot]<=pn&&(ss+=N1),fr.startsWith("_"))je+=De[0];else{const M1=Vn.classNameAliases[fr]||fr;Gn(De[0],M1)}}else je+=De[0];he=Ue.keywordPatternRe.lastIndex,De=Ue.keywordPatternRe.exec(ft)}je+=ft.substring(he),Ut.addText(je)}function os(){if(ft==="")return;let he=null;if(typeof Ue.subLanguage=="string"){if(!Q[Ue.subLanguage]){Ut.addText(ft);return}he=kt(Ue.subLanguage,ft,!0,ed[Ue.subLanguage]),ed[Ue.subLanguage]=he._top}else he=zt(ft,Ue.subLanguage.length?Ue.subLanguage:null);Ue.relevance>0&&(ss+=he.relevance),Ut.__addSublanguage(he._emitter,he.language)}function mn(){Ue.subLanguage!=null?os():Rr(),ft=""}function Gn(he,De){he!==""&&(Ut.startScope(De),Ut.addText(he),Ut.endScope())}function Zl(he,De){let je=1;const ot=De.length-1;for(;je<=ot;){if(!he._emit[je]){je++;continue}const jt=Vn.classNameAliases[he[je]]||he[je],fr=De[je];jt?Gn(fr,jt):(ft=fr,Rr(),ft=""),je++}}function Xl(he,De){return he.scope&&typeof he.scope=="string"&&Ut.openNode(Vn.classNameAliases[he.scope]||he.scope),he.beginScope&&(he.beginScope._wrap?(Gn(ft,Vn.classNameAliases[he.beginScope._wrap]||he.beginScope._wrap),ft=""):he.beginScope._multi&&(Zl(he.beginScope,De),ft="")),Ue=Object.create(he,{parent:{value:Ue}}),Ue}function Jl(he,De,je){let ot=x(he.endRe,je);if(ot){if(he["on:end"]){const jt=new t(he);he["on:end"](De,jt),jt.isMatchIgnored&&(ot=!1)}if(ot){for(;he.endsParent&&he.parent;)he=he.parent;return he}}if(he.endsWithParent)return Jl(he.parent,De,je)}function T1(he){return Ue.matcher.regexIndex===0?(ft+=he[0],1):(Ba=!0,0)}function D1(he){const De=he[0],je=he.rule,ot=new t(je),jt=[je.__beforeBegin,je["on:begin"]];for(const fr of jt)if(fr&&(fr(he,ot),ot.isMatchIgnored))return T1(De);return je.skip?ft+=De:(je.excludeBegin&&(ft+=De),mn(),!je.returnBegin&&!je.excludeBegin&&(ft=De)),Xl(je,he),je.returnBegin?0:De.length}function I1(he){const De=he[0],je=Oe.substring(he.index),ot=Jl(Ue,he,je);if(!ot)return Ve;const jt=Ue;Ue.endScope&&Ue.endScope._wrap?(mn(),Gn(De,Ue.endScope._wrap)):Ue.endScope&&Ue.endScope._multi?(mn(),Zl(Ue.endScope,he)):jt.skip?ft+=De:(jt.returnEnd||jt.excludeEnd||(ft+=De),mn(),jt.excludeEnd&&(ft=De));do Ue.scope&&Ut.closeNode(),!Ue.skip&&!Ue.subLanguage&&(ss+=Ue.relevance),Ue=Ue.parent;while(Ue!==ot.parent);return ot.starts&&Xl(ot.starts,he),jt.returnEnd?0:De.length}function O1(){const he=[];for(let De=Ue;De!==Vn;De=De.parent)De.scope&&he.unshift(De.scope);he.forEach(De=>Ut.openNode(De))}let is={};function Ql(he,De){const je=De&&De[0];if(ft+=he,je==null)return mn(),0;if(is.type==="begin"&&De.type==="end"&&is.index===De.index&&je===""){if(ft+=Oe.slice(De.index,De.index+1),!yt){const ot=new Error(`0 width match regex (${fe})`);throw ot.languageName=fe,ot.badRule=is.rule,ot}return 1}if(is=De,De.type==="begin")return D1(De);if(De.type==="illegal"&&!Ze){const ot=new Error('Illegal lexeme "'+je+'" for mode "'+(Ue.scope||"<unnamed>")+'"');throw ot.mode=Ue,ot}else if(De.type==="end"){const ot=I1(De);if(ot!==Ve)return ot}if(De.type==="illegal"&&je==="")return ft+=`
23
- `,1;if(Fa>1e5&&Fa>De.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ft+=je,je.length}const Vn=Mn(fe);if(!Vn)throw on(vt.replace("{}",fe)),new Error('Unknown language: "'+fe+'"');const R1=gn(Vn);let $a="",Ue=dt||R1;const ed={},Ut=new U.__emitter(U);O1();let ft="",ss=0,Jr=0,Fa=0,Ba=!1;try{if(Vn.__emitTokens)Vn.__emitTokens(Oe,Ut);else{for(Ue.matcher.considerAll();;){Fa++,Ba?Ba=!1:Ue.matcher.considerAll(),Ue.matcher.lastIndex=Jr;const he=Ue.matcher.exec(Oe);if(!he)break;const De=Oe.substring(Jr,he.index),je=Ql(De,he);Jr=he.index+je}Ql(Oe.substring(Jr))}return Ut.finalize(),$a=Ut.toHTML(),{language:fe,value:$a,relevance:ss,illegal:!1,_emitter:Ut,_top:Ue}}catch(he){if(he.message&&he.message.includes("Illegal"))return{language:fe,value:Tt(Oe),illegal:!0,relevance:0,_illegalBy:{message:he.message,index:Jr,context:Oe.slice(Jr-100,Jr+100),mode:he.mode,resultSoFar:$a},_emitter:Ut};if(yt)return{language:fe,value:Tt(Oe),illegal:!1,relevance:0,errorRaised:he,_emitter:Ut,_top:Ue};throw he}}function Dt(fe){const Oe={value:Tt(fe),illegal:!1,relevance:0,_top:Ce,_emitter:new U.__emitter(U)};return Oe._emitter.addText(fe),Oe}function zt(fe,Oe){Oe=Oe||U.languages||Object.keys(Q);const Ze=Dt(fe),dt=Oe.filter(Mn).filter(an).map(mn=>kt(mn,fe,!1));dt.unshift(Ze);const Ot=dt.sort((mn,Gn)=>{if(mn.relevance!==Gn.relevance)return Gn.relevance-mn.relevance;if(mn.language&&Gn.language){if(Mn(mn.language).supersetOf===Gn.language)return 1;if(Mn(Gn.language).supersetOf===mn.language)return-1}return 0}),[Ln,Rr]=Ot,os=Ln;return os.secondBest=Rr,os}function Sn(fe,Oe,Ze){const dt=Oe&&ge[Oe]||Ze;fe.classList.add("hljs"),fe.classList.add(`language-${dt}`)}function hn(fe){let Oe=null;const Ze=de(fe);if(ie(Ze))return;if(rs("before:highlightElement",{el:fe,language:Ze}),fe.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",fe);return}if(fe.children.length>0&&(U.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(fe)),U.throwUnescapedHTML))throw new _t("One of your code blocks includes unescaped HTML.",fe.innerHTML);Oe=fe;const dt=Oe.textContent,Ot=Ze?Me(dt,{language:Ze,ignoreIllegals:!0}):zt(dt);fe.innerHTML=Ot.value,fe.dataset.highlighted="yes",Sn(fe,Ze,Ot.language),fe.result={language:Ot.language,re:Ot.relevance,relevance:Ot.relevance},Ot.secondBest&&(fe.secondBest={language:Ot.secondBest.language,relevance:Ot.secondBest.relevance}),rs("after:highlightElement",{el:fe,result:Ot,text:dt})}function Xt(fe){U=Zt(U,fe)}const st=()=>{Je(),Lt("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Te(){Je(),Lt("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Et=!1;function Je(){function fe(){Je()}if(document.readyState==="loading"){Et||window.addEventListener("DOMContentLoaded",fe,!1),Et=!0;return}document.querySelectorAll(U.cssSelector).forEach(hn)}function Kt(fe,Oe){let Ze=null;try{Ze=Oe(I)}catch(dt){if(on("Language definition for '{}' could not be registered.".replace("{}",fe)),yt)on(dt);else throw dt;Ze=Ce}Ze.name||(Ze.name=fe),Q[fe]=Ze,Ze.rawDefinition=Oe.bind(null,I),Ze.aliases&&xo(Ze.aliases,{languageName:fe})}function vo(fe){delete Q[fe];for(const Oe of Object.keys(ge))ge[Oe]===fe&&delete ge[Oe]}function Qi(){return Object.keys(Q)}function Mn(fe){return fe=(fe||"").toLowerCase(),Q[fe]||Q[ge[fe]]}function xo(fe,{languageName:Oe}){typeof fe=="string"&&(fe=[fe]),fe.forEach(Ze=>{ge[Ze.toLowerCase()]=Oe})}function an(fe){const Oe=Mn(fe);return Oe&&!Oe.disableAutodetect}function es(fe){fe["before:highlightBlock"]&&!fe["before:highlightElement"]&&(fe["before:highlightElement"]=Oe=>{fe["before:highlightBlock"](Object.assign({block:Oe.el},Oe))}),fe["after:highlightBlock"]&&!fe["after:highlightElement"]&&(fe["after:highlightElement"]=Oe=>{fe["after:highlightBlock"](Object.assign({block:Oe.el},Oe))})}function ts(fe){es(fe),Fe.push(fe)}function ns(fe){const Oe=Fe.indexOf(fe);Oe!==-1&&Fe.splice(Oe,1)}function rs(fe,Oe){const Ze=fe;Fe.forEach(function(dt){dt[Ze]&&dt[Ze](Oe)})}function A1(fe){return Lt("10.7.0","highlightBlock will be removed entirely in v12.0"),Lt("10.7.0","Please use highlightElement now."),hn(fe)}Object.assign(I,{highlight:Me,highlightAuto:zt,highlightAll:Je,highlightElement:hn,highlightBlock:A1,configure:Xt,initHighlighting:st,initHighlightingOnLoad:Te,registerLanguage:Kt,unregisterLanguage:vo,listLanguages:Qi,getLanguage:Mn,registerAliases:xo,autoDetection:an,inherit:Zt,addPlugin:ts,removePlugin:ns}),I.debugMode=function(){yt=!1},I.safeMode=function(){yt=!0},I.versionString=Yt,I.regex={concat:m,lookahead:g,either:v,optional:p,anyNumberOfTimes:h};for(const fe in ye)typeof ye[fe]=="object"&&e(ye[fe]);return Object.assign(I,ye),I},sn=Pt({});return sn.newInstance=()=>Pt({}),du=sn,sn.HighlightJS=sn,sn.default=sn,du}var fu,lg;function SD(){if(lg)return fu;lg=1;function e(t){const n=t.regex,r=n.concat(/[\p{L}_]/u,n.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),o=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=t.inherit(s,{begin:/\(/,end:/\)/}),u=t.inherit(t.APOS_STRING_MODE,{className:"string"}),c=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:o,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[s,c,u,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,a,c,u]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:n.concat(/</,n.lookahead(n.concat(r,n.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:l}]},{className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}return fu=e,fu}var gu,dg;function CD(){if(dg)return gu;dg=1;function e(t){const n=t.regex,r={},o={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:n.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},o]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},s=t.inherit(t.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},u={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,r,i]};i.contains.push(u);const c={match:/\\"/},l={className:"string",begin:/'/,end:/'/},d={match:/\\'/},g={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,r]},h=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=t.SHEBANG({binary:`(${h.join("|")})`,relevance:10}),m={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},b=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],v=["true","false"],y={match:/(\/[a-z._-]+)+/},x=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],E=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],S=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],T=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:b,literal:v,built_in:[...x,...E,"set","shopt",...S,...T]},contains:[p,t.SHEBANG(),m,g,s,a,y,u,c,l,d,r]}}return gu=e,gu}var pu,fg;function kD(){if(fg)return pu;fg=1;function e(t){const n=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),o="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="("+o+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",u={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},p=n.optional(i)+t.IDENT_RE+"\\s*\\(",v={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},y=[g,u,r,t.C_BLOCK_COMMENT_MODE,d,l],x={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:v,contains:y.concat([{begin:/\(/,end:/\)/,keywords:v,contains:y.concat(["self"]),relevance:0}]),relevance:0},E={begin:"("+a+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:v,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:v,relevance:0},{begin:p,returnBegin:!0,contains:[t.inherit(h,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,l,d,u,{begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,l,d,u]}]},u,r,t.C_BLOCK_COMMENT_MODE,g]};return{name:"C",aliases:["h"],keywords:v,disableAutodetect:!0,illegal:"</",contains:[].concat(x,E,y,[g,{begin:t.IDENT_RE+"::",keywords:v},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:g,strings:l,keywords:v}}}return pu=e,pu}var hu,gg;function AD(){if(gg)return hu;gg=1;function e(t){const n=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),o="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="(?!struct)("+o+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",u={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:n.optional(i)+t.IDENT_RE,relevance:0},p=n.optional(i)+t.IDENT_RE+"\\s*\\(",m=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],b=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],v=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],S={type:b,keyword:m,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:v},T={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:n.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/))},A=[T,g,u,r,t.C_BLOCK_COMMENT_MODE,d,l],C={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:S,contains:A.concat([{begin:/\(/,end:/\)/,keywords:S,contains:A.concat(["self"]),relevance:0}]),relevance:0},L={className:"function",begin:"("+a+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:S,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:o,keywords:S,relevance:0},{begin:p,returnBegin:!0,contains:[h],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[l,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,l,d,u,{begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,l,d,u]}]},u,r,t.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:S,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(C,L,T,A,[g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:S,contains:["self",u]},{begin:t.IDENT_RE+"::",keywords:S},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return hu=e,hu}var mu,pg;function TD(){if(pg)return mu;pg=1;function e(t){const n=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],r=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],o=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],a={keyword:i.concat(s),built_in:n,literal:o},u=t.inherit(t.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),c={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},l={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},d={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},g=t.inherit(d,{illegal:/\n/}),h={className:"subst",begin:/\{/,end:/\}/,keywords:a},p=t.inherit(h,{illegal:/\n/}),m={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,p]},b={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},h]},v=t.inherit(b,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});h.contains=[b,m,d,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,c,t.C_BLOCK_COMMENT_MODE],p.contains=[v,m,g,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,c,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const y={variants:[l,b,m,d,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},x={begin:"<",end:">",contains:[{beginKeywords:"in out"},u]},E=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",S={begin:"@"+t.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:a,illegal:/::/,contains:[t.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},y,c,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},u,x,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,x,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+E+"\\s+)+"+t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:a,contains:[{beginKeywords:r.join(" "),relevance:0},{begin:t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[t.TITLE_MODE,x],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,relevance:0,contains:[y,c,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},S]}}return mu=e,mu}var bu,hg;function DD(){if(hg)return bu;hg=1;const e=c=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:c.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:c.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(c){const l=c.regex,d=e(c),g={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},h="and or not only",p=/@-?\w[\w]*(-\w+)*/,m="[a-zA-Z-][a-zA-Z0-9_-]*",b=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[d.BLOCK_COMMENT,g,d.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+m,relevance:0},d.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+i.join("|")+")"},{begin:":(:)?("+s.join("|")+")"}]},d.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[d.BLOCK_COMMENT,d.HEXCOLOR,d.IMPORTANT,d.CSS_NUMBER_MODE,...b,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...b,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},d.FUNCTION_DISPATCH]},{begin:l.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:p},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:h,attribute:o.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...b,d.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b"}]}}return bu=u,bu}var yu,mg;function ID(){if(mg)return yu;mg=1;function e(t){const n=t.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},o={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},a={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},u=/[A-Za-z][A-Za-z0-9+.-]*/,c={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n.concat(/\[.+?\]\(/,u,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},l={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},g=t.inherit(l,{contains:[]}),h=t.inherit(d,{contains:[]});l.contains.push(h),d.contains.push(g);let p=[r,c];return[l,d,g,h].forEach(y=>{y.contains=y.contains.concat(p)}),p=p.concat(l,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},r,s,l,d,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},i,o,c,a,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return yu=e,yu}var vu,bg;function OD(){if(bg)return vu;bg=1;function e(t){const n=t.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:n.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:n.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}return vu=e,vu}var xu,yg;function RD(){if(yg)return xu;yg=1;function e(t){const n=t.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",o=n.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=n.concat(o,/(::\w+)*/),a={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},u={className:"doctag",begin:"@[A-Za-z]+"},c={begin:"#<",end:">"},l=[t.COMMENT("#","$",{contains:[u]}),t.COMMENT("^=begin","^=end",{contains:[u],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],d={className:"subst",begin:/#\{/,end:/\}/,keywords:a},g={className:"string",contains:[t.BACKSLASH_ESCAPE,d],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:n.concat(/<<[-~]?'?/,n.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,d]})]}]},h="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",m={className:"number",relevance:0,variants:[{begin:`\\b(${h})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},b={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},A=[g,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:a},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:a},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:o,scope:"title.class"},{match:[/def/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[b]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[g,{begin:r}],relevance:0},m,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,d],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(c,l),relevance:0}].concat(c,l);d.contains=A,b.contains=A;const $=[{begin:/^\s*=>/,starts:{end:"$",contains:A}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:a,contains:A}}];return l.unshift(c),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat($).concat(l).concat(A)}}return xu=e,xu}var wu,vg;function ND(){if(vg)return wu;vg=1;function e(t){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"string",variants:[t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[t.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,illegal:/["']/}]}]}}return wu=e,wu}var _u,xg;function MD(){if(xg)return _u;xg=1;function e(t){const n=t.regex,r=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[t.HASH_COMMENT_MODE,t.QUOTE_STRING_MODE,t.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:n.concat(r,n.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}return _u=e,_u}var Eu,wg;function LD(){if(wg)return Eu;wg=1;function e(t){const n=t.regex,r={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:t.NUMBER_RE}]},o=t.COMMENT();o.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},s={className:"literal",begin:/\bon|off|true|false|yes|no\b/},a={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},u={begin:/\[/,end:/\]/,contains:[o,s,i,a,r,"self"],relevance:0},c=/[A-Za-z0-9_-]+/,l=/"(\\"|[^"])*"/,d=/'[^']*'/,g=n.either(c,l,d),h=n.concat(g,"(\\s*\\.\\s*",g,")*",n.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[o,{className:"section",begin:/\[+/,end:/\]+/},{begin:h,className:"attr",starts:{end:/$/,contains:[o,u,s,i,a,r]}}]}}return Eu=e,Eu}var Su,_g;function PD(){if(_g)return Su;_g=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",r={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function o(s,a,u){return u===-1?"":s.replace(a,c=>o(s,a,u-1))}function i(s){const a=s.regex,u="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",c=u+o("(?:<"+u+"~~~(?:\\s*,\\s*"+u+"~~~)*>)?",/~~~/g,2),p={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},m={className:"meta",begin:"@"+u,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},b={className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[s.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:p,illegal:/<\/|#/,contains:[s.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[s.BACKSLASH_ESCAPE]},s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,u],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[a.concat(/(?!else)/,u),/\s+/,u,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,u],className:{1:"keyword",3:"title.class"},contains:[b,s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+c+"\\s+)",s.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:p,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[m,s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,r,s.C_BLOCK_COMMENT_MODE]},s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]},r,m]}}return Su=i,Su}var Cu,Eg;function $D(){if(Eg)return Cu;Eg=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],o=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],a=[].concat(i,r,o);function u(c){const l=c.regex,d=(F,{after:q})=>{const le="</"+F[0].slice(1);return F.input.indexOf(le,q)!==-1},g=e,h={begin:"<>",end:"</>"},p=/<[A-Za-z0-9\\._:-]+\s*\/>/,m={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(F,q)=>{const le=F[0].length+F.index,ye=F.input[le];if(ye==="<"||ye===","){q.ignoreMatch();return}ye===">"&&(d(F,{after:le})||q.ignoreMatch());let ae;const pe=F.input.substring(le);if(ae=pe.match(/^\s*=/)){q.ignoreMatch();return}if((ae=pe.match(/^\s+extends\s+/))&&ae.index===0){q.ignoreMatch();return}}},b={$pattern:e,keyword:t,literal:n,built_in:a,"variable.language":s},v="[0-9](_?[0-9])*",y=`\\.(${v})`,x="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",E={className:"number",variants:[{begin:`(\\b(${x})((${y})|\\.)?|(${y}))[eE][+-]?(${v})\\b`},{begin:`\\b(${x})\\b((${y})\\b|\\.)?|(${y})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},S={className:"subst",begin:"\\$\\{",end:"\\}",keywords:b,contains:[]},T={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,S],subLanguage:"xml"}},A={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,S],subLanguage:"css"}},C={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,S],subLanguage:"graphql"}},L={className:"string",begin:"`",end:"`",contains:[c.BACKSLASH_ESCAPE,S]},$={className:"comment",variants:[c.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:g+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),c.C_BLOCK_COMMENT_MODE,c.C_LINE_COMMENT_MODE]},V=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,T,A,C,L,{match:/\$\d+/},E];S.contains=V.concat({begin:/\{/,end:/\}/,keywords:b,contains:["self"].concat(V)});const B=[].concat($,S.contains),N=B.concat([{begin:/(\s*)\(/,end:/\)/,keywords:b,contains:["self"].concat(B)}]),W={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:b,contains:N},R={variants:[{match:[/class/,/\s+/,g,/\s+/,/extends/,/\s+/,l.concat(g,"(",l.concat(/\./,g),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,g],scope:{1:"keyword",3:"title.class"}}]},P={relevance:0,match:l.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...o]}},ne={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},Y={variants:[{match:[/function/,/\s+/,g,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[W],illegal:/%/},K={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ce(F){return l.concat("(?!",F.join("|"),")")}const z={match:l.concat(/\b/,ce([...i,"super","import"].map(F=>`${F}\\s*\\(`)),g,l.lookahead(/\s*\(/)),className:"title.function",relevance:0},k={begin:l.concat(/\./,l.lookahead(l.concat(g,/(?![0-9A-Za-z$_(])/))),end:g,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},O={match:[/get|set/,/\s+/,g,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},W]},Z="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+c.UNDERSCORE_IDENT_RE+")\\s*=>",re={match:[/const|var|let/,/\s+/,g,/\s*/,/=\s*/,/(async\s*)?/,l.lookahead(Z)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[W]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:b,exports:{PARAMS_CONTAINS:N,CLASS_REFERENCE:P},illegal:/#(?![$_A-z])/,contains:[c.SHEBANG({label:"shebang",binary:"node",relevance:5}),ne,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,T,A,C,L,$,{match:/\$\d+/},E,P,{scope:"attr",match:g+l.lookahead(":"),relevance:0},re,{begin:"("+c.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[$,c.REGEXP_MODE,{className:"function",begin:Z,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:c.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:b,contains:N}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:h.begin,end:h.end},{match:p},{begin:m.begin,"on:begin":m.isTrulyOpeningTag,end:m.end}],subLanguage:"xml",contains:[{begin:m.begin,end:m.end,skip:!0,contains:["self"]}]}]},Y,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+c.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[W,c.inherit(c.TITLE_MODE,{begin:g,className:"title.function"})]},{match:/\.\.\./,relevance:0},k,{match:"\\$"+g,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[W]},z,K,R,O,{match:/\$[(.]/}]}}return Cu=u,Cu}var ku,Sg;function FD(){if(Sg)return ku;Sg=1;function e(t){const n={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},o=["true","false","null"],i={scope:"literal",beginKeywords:o.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:o},contains:[n,r,t.QUOTE_STRING_MODE,i,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}return ku=e,ku}var Au,Cg;function BD(){if(Cg)return Au;Cg=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",r={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function o(i){const s={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},a={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},u={className:"symbol",begin:i.UNDERSCORE_IDENT_RE+"@"},c={className:"subst",begin:/\$\{/,end:/\}/,contains:[i.C_NUMBER_MODE]},l={className:"variable",begin:"\\$"+i.UNDERSCORE_IDENT_RE},d={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[l,c]},{begin:"'",end:"'",illegal:/\n/,contains:[i.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[i.BACKSLASH_ESCAPE,l,c]}]};c.contains.push(d);const g={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+i.UNDERSCORE_IDENT_RE+")?"},h={className:"meta",begin:"@"+i.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[i.inherit(d,{className:"string"}),"self"]}]},p=r,m=i.COMMENT("/\\*","\\*/",{contains:[i.C_BLOCK_COMMENT_MODE]}),b={variants:[{className:"type",begin:i.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},v=b;return v.variants[1].contains=[b],b.variants[1].contains=[v],{name:"Kotlin",aliases:["kt","kts"],keywords:s,contains:[i.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),i.C_LINE_COMMENT_MODE,m,a,u,g,h,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:s,relevance:5,contains:[{begin:i.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[i.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[b,i.C_LINE_COMMENT_MODE,m],relevance:0},i.C_LINE_COMMENT_MODE,m,g,h,d,i.C_NUMBER_MODE]},m]},{begin:[/class|interface|trait/,/\s+/,i.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},i.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},g,h]},d,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
24
- `},p]}}return Au=o,Au}var Tu,kg;function zD(){if(kg)return Tu;kg=1;const e=l=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:l.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:l.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),u=i.concat(s).sort().reverse();function c(l){const d=e(l),g=u,h="and or not only",p="[\\w-]+",m="("+p+"|@\\{"+p+"\\})",b=[],v=[],y=function(B){return{className:"string",begin:"~?"+B+".*?"+B}},x=function(B,N,W){return{className:B,begin:N,relevance:W}},E={$pattern:/[a-z-]+/,keyword:h,attribute:o.join(" ")},S={begin:"\\(",end:"\\)",contains:v,keywords:E,relevance:0};v.push(l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,y("'"),y('"'),d.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},d.HEXCOLOR,S,x("variable","@@?"+p,10),x("variable","@\\{"+p+"\\}"),x("built_in","~?`[^`]*?`"),{className:"attribute",begin:p+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},d.IMPORTANT,{beginKeywords:"and not"},d.FUNCTION_DISPATCH);const T=v.concat({begin:/\{/,end:/\}/,contains:b}),A={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(v)},C={begin:m+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},d.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:v}}]},L={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:E,returnEnd:!0,contains:v,relevance:0}},j={className:"variable",variants:[{begin:"@"+p+"\\s*:",relevance:15},{begin:"@"+p}],starts:{end:"[;}]",returnEnd:!0,contains:T}},$={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:m,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,A,x("keyword","all\\b"),x("variable","@\\{"+p+"\\}"),{begin:"\\b("+r.join("|")+")\\b",className:"selector-tag"},d.CSS_NUMBER_MODE,x("selector-tag",m,0),x("selector-id","#"+m),x("selector-class","\\."+m,0),x("selector-tag","&",0),d.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+s.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:T},{begin:"!important"},d.FUNCTION_DISPATCH]},V={begin:p+`:(:)?(${g.join("|")})`,returnBegin:!0,contains:[$]};return b.push(l.C_LINE_COMMENT_MODE,l.C_BLOCK_COMMENT_MODE,L,j,V,C,$,A,d.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:b}}return Tu=c,Tu}var Du,Ag;function UD(){if(Ag)return Du;Ag=1;function e(t){const n="\\[=*\\[",r="\\]=*\\]",o={begin:n,end:r,contains:["self"]},i=[t.COMMENT("--(?!"+n+")","$"),t.COMMENT("--"+n,r,{contains:[o],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:t.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[t.inherit(t.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},t.C_NUMBER_MODE,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{className:"string",begin:n,end:r,contains:[o],relevance:5}])}}return Du=e,Du}var Iu,Tg;function KD(){if(Tg)return Iu;Tg=1;function e(t){const n={className:"variable",variants:[{begin:"\\$\\("+t.UNDERSCORE_IDENT_RE+"\\)",contains:[t.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},r={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,n]},o={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[n,r]},i={begin:"^"+t.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},s={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},a={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[n]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[t.HASH_COMMENT_MODE,n,r,o,i,s,a]}}return Iu=e,Iu}var Ou,Dg;function jD(){if(Dg)return Ou;Dg=1;function e(t){const n=t.regex,r=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],o=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:r.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},a={begin:/->\{/,end:/\}/},u={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},c={scope:"variable",variants:[{begin:/\$\d/},{begin:n.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[u]},l={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},d=[t.BACKSLASH_ESCAPE,s,c],g=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],h=(b,v,y="\\1")=>{const x=y==="\\1"?y:n.concat(y,v);return n.concat(n.concat("(?:",b,")"),v,/(?:\\.|[^\\\/])*?/,x,/(?:\\.|[^\\\/])*?/,y,o)},p=(b,v,y)=>n.concat(n.concat("(?:",b,")"),v,/(?:\\.|[^\\\/])*?/,y,o),m=[c,t.HASH_COMMENT_MODE,t.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),a,{className:"string",contains:d,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},l,{begin:"(\\/\\/|"+t.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[t.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:h("s|tr|y",n.either(...g,{capture:!0}))},{begin:h("s|tr|y","\\(","\\)")},{begin:h("s|tr|y","\\[","\\]")},{begin:h("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",n.either(...g,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,u]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,u,l]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=m,a.contains=m,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:m}}return Ou=e,Ou}var Ru,Ig;function HD(){if(Ig)return Ru;Ig=1;function e(t){const n={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},r=/[a-zA-Z@][a-zA-Z0-9_]*/,u={"variable.language":["this","super"],$pattern:r,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},c={$pattern:r,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:u,illegal:"</",contains:[n,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.C_NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+c.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:c,contains:[t.UNDERSCORE_TITLE_MODE]},{begin:"\\."+t.UNDERSCORE_IDENT_RE,relevance:0}]}}return Ru=e,Ru}var Nu,Og;function qD(){if(Og)return Nu;Og=1;function e(t){const n=t.regex,r=/(?![A-Za-z0-9])(?![$])/,o=n.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),i=n.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),s=n.concat(/[A-Z]+/,r),a={scope:"variable",match:"\\$+"+o},u={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},c={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=t.inherit(t.APOS_STRING_MODE,{illegal:null}),d=t.inherit(t.QUOTE_STRING_MODE,{illegal:null,contains:t.QUOTE_STRING_MODE.contains.concat(c)}),g={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(c),"on:begin":(W,R)=>{R.data._beginMatch=W[1]||W[2]},"on:end":(W,R)=>{R.data._beginMatch!==W[1]&&R.ignoreMatch()}},h=t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[
25
- ]`,m={scope:"string",variants:[d,l,g,h]},b={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},v=["false","null","true"],y=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],x=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],S={keyword:y,literal:(W=>{const R=[];return W.forEach(P=>{R.push(P),P.toLowerCase()===P?R.push(P.toUpperCase()):R.push(P.toLowerCase())}),R})(v),built_in:x},T=W=>W.map(R=>R.replace(/\|\d+$/,"")),A={variants:[{match:[/new/,n.concat(p,"+"),n.concat("(?!",T(x).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},C=n.concat(o,"\\b(?!\\()"),L={variants:[{match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),C],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,n.concat(/::/,n.lookahead(/(?!class\b)/)),C],scope:{1:"title.class",3:"variable.constant"}},{match:[i,n.concat("::",n.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},j={scope:"attr",match:n.concat(o,n.lookahead(":"),n.lookahead(/(?!::)/))},$={relevance:0,begin:/\(/,end:/\)/,keywords:S,contains:[j,a,L,t.C_BLOCK_COMMENT_MODE,m,b,A]},V={relevance:0,match:[/\b/,n.concat("(?!fn\\b|function\\b|",T(y).join("\\b|"),"|",T(x).join("\\b|"),"\\b)"),o,n.concat(p,"*"),n.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[$]};$.contains.push(V);const B=[j,L,t.C_BLOCK_COMMENT_MODE,m,b,A],N={begin:n.concat(/#\[\s*\\?/,n.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:v,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:v,keyword:["new","array"]},contains:["self",...B]},...B,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:S,contains:[N,t.HASH_COMMENT_MODE,t.COMMENT("//","$"),t.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:t.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},u,{scope:"variable.language",match:/\$this\b/},a,V,L,{match:[/const/,/\s/,o],scope:{1:"keyword",3:"variable.constant"}},A,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},t.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:S,contains:["self",N,a,L,t.C_BLOCK_COMMENT_MODE,m,b]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},t.UNDERSCORE_TITLE_MODE]},m,b]}}return Nu=e,Nu}var Mu,Rg;function GD(){if(Rg)return Mu;Rg=1;function e(t){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},t.inherit(t.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),t.inherit(t.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}return Mu=e,Mu}var Lu,Ng;function VD(){if(Ng)return Lu;Ng=1;function e(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return Lu=e,Lu}var Pu,Mg;function WD(){if(Mg)return Pu;Mg=1;function e(t){const n=t.regex,r=/[\p{XID_Start}_]\p{XID_Continue}*/u,o=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],u={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:o,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},c={className:"meta",begin:/^(>>>|\.\.\.) /},l={className:"subst",begin:/\{/,end:/\}/,keywords:u,illegal:/#/},d={begin:/\{\{/,relevance:0},g={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,c,d,l]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,c,d,l]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[t.BACKSLASH_ESCAPE,d,l]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,d,l]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},h="[0-9](_?[0-9])*",p=`(\\b(${h}))?\\.(${h})|\\b(${h})\\.`,m=`\\b|${o.join("|")}`,b={className:"number",relevance:0,variants:[{begin:`(\\b(${h})|(${p}))[eE][+-]?(${h})[jJ]?(?=${m})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${m})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${m})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${m})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${m})`},{begin:`\\b(${h})[jJ](?=${m})`}]},v={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:u,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},y={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:["self",c,b,g,t.HASH_COMMENT_MODE]}]};return l.contains=[g,b,c],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[c,b,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},g,v,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[y]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[b,y,g]}]}}return Pu=e,Pu}var $u,Lg;function YD(){if(Lg)return $u;Lg=1;function e(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return $u=e,$u}var Fu,Pg;function ZD(){if(Pg)return Fu;Pg=1;function e(t){const n=t.regex,r=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,o=n.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=n.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:r,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[t.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:n.lookahead(n.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:r},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),t.HASH_COMMENT_MODE,{scope:"string",contains:[t.BACKSLASH_ESCAPE],variants:[t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,o]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,o]},{scope:{1:"punctuation",2:"number"},match:[s,o]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,o]}]},{scope:{3:"operator"},match:[r,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}return Fu=e,Fu}var Bu,$g;function XD(){if($g)return Bu;$g=1;function e(t){const n=t.regex,r=/(r#)?/,o=n.concat(r,t.UNDERSCORE_IDENT_RE),i=n.concat(r,t.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:n.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,n.lookahead(/\s*\(/))},a="([ui](8|16|32|64|128|size)|f(32|64))?",u=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],c=["true","false","Some","None","Ok","Err"],l=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],d=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:t.IDENT_RE+"!?",type:d,keyword:u,literal:c,built_in:l},illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.COMMENT("/\\*","\\*/",{contains:["self"]}),t.inherit(t.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+a},{begin:"\\b0o([0-7_]+)"+a},{begin:"\\b0x([A-Fa-f0-9_]+)"+a},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+a}],relevance:0},{begin:[/fn/,/\s+/,o],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,o],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,o,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,o],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,o],className:{1:"keyword",3:"title.class"}},{begin:t.IDENT_RE+"::",keywords:{keyword:"Self",built_in:l,type:d}},{className:"punctuation",begin:"->"},s]}}return Bu=e,Bu}var zu,Fg;function JD(){if(Fg)return zu;Fg=1;const e=c=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:c.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:c.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r=[...t,...n],o=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),s=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),a=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(c){const l=e(c),d=s,g=i,h="@[a-z-]+",p="and or not only",b={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,l.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},l.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+r.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+g.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+d.join("|")+")"},b,{begin:/\(/,end:/\)/,contains:[l.CSS_NUMBER_MODE]},l.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[l.BLOCK_COMMENT,b,l.HEXCOLOR,l.CSS_NUMBER_MODE,c.QUOTE_STRING_MODE,c.APOS_STRING_MODE,l.IMPORTANT,l.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:h,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:p,attribute:o.join(" ")},contains:[{begin:h,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},b,c.QUOTE_STRING_MODE,c.APOS_STRING_MODE,l.HEXCOLOR,l.CSS_NUMBER_MODE]},l.FUNCTION_DISPATCH]}}return zu=u,zu}var Uu,Bg;function QD(){if(Bg)return Uu;Bg=1;function e(t){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}return Uu=e,Uu}var Ku,zg;function eI(){if(zg)return Ku;zg=1;function e(t){const n=t.regex,r=t.COMMENT("--","$"),o={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],a=["double precision","large object","with timezone","without timezone"],u=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],c=["add","asc","collation","desc","final","first","last","view"],l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],d=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],g=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],h=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=d,m=[...l,...c].filter(T=>!d.includes(T)),b={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},v={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},y={match:n.concat(/\b/,n.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function x(T){return n.concat(/\b/,n.either(...T.map(A=>A.replace(/\s+/,"\\s+"))),/\b/)}const E={scope:"keyword",match:x(h),relevance:0};function S(T,{exceptions:A,when:C}={}){const L=C;return A=A||[],T.map(j=>j.match(/\|\d+$/)||A.includes(j)?j:L(j)?`${j}|0`:j)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:S(m,{when:T=>T.length<3}),literal:s,type:u,built_in:g},contains:[{scope:"type",match:x(a)},E,y,b,o,i,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,r,v]}}return Ku=e,Ku}var ju,Ug;function tI(){if(Ug)return ju;Ug=1;function e(C){return C?typeof C=="string"?C:C.source:null}function t(C){return n("(?=",C,")")}function n(...C){return C.map(j=>e(j)).join("")}function r(C){const L=C[C.length-1];return typeof L=="object"&&L.constructor===Object?(C.splice(C.length-1,1),L):{}}function o(...C){return"("+(r(C).capture?"":"?:")+C.map($=>e($)).join("|")+")"}const i=C=>n(/\b/,C,/\w$/.test(C)?/\b/:/\B/),s=["Protocol","Type"].map(i),a=["init","self"].map(i),u=["Any","Self"],c=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],l=["false","nil","true"],d=["assignment","associativity","higherThan","left","lowerThan","none","right"],g=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],h=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],p=o(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),m=o(p,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),b=n(p,m,"*"),v=o(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),y=o(v,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),x=n(v,y,"*"),E=n(/[A-Z]/,y,"*"),S=["attached","autoclosure",n(/convention\(/,o("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",n(/objc\(/,x,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],T=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function A(C){const L={match:/\s+/,relevance:0},j=C.COMMENT("/\\*","\\*/",{contains:["self"]}),$=[C.C_LINE_COMMENT_MODE,j],V={match:[/\./,o(...s,...a)],className:{2:"keyword"}},B={match:n(/\./,o(...c)),relevance:0},N=c.filter(Ve=>typeof Ve=="string").concat(["_|0"]),W=c.filter(Ve=>typeof Ve!="string").concat(u).map(i),R={variants:[{className:"keyword",match:o(...W,...a)}]},P={$pattern:o(/\b\w+/,/#\w+/),keyword:N.concat(g),literal:l},ne=[V,B,R],Y={match:n(/\./,o(...h)),relevance:0},K={className:"built_in",match:n(/\b/,o(...h),/(?=\()/)},ce=[Y,K],z={match:/->/,relevance:0},k={className:"operator",relevance:0,variants:[{match:b},{match:`\\.(\\.|${m})+`}]},O=[z,k],Z="([0-9]_*)+",re="([0-9a-fA-F]_*)+",F={className:"number",relevance:0,variants:[{match:`\\b(${Z})(\\.(${Z}))?([eE][+-]?(${Z}))?\\b`},{match:`\\b0x(${re})(\\.(${re}))?([pP][+-]?(${Z}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},q=(Ve="")=>({className:"subst",variants:[{match:n(/\\/,Ve,/[0\\tnr"']/)},{match:n(/\\/,Ve,/u\{[0-9a-fA-F]{1,8}\}/)}]}),le=(Ve="")=>({className:"subst",match:n(/\\/,Ve,/[\t ]*(?:[\r\n]|\r\n)/)}),ye=(Ve="")=>({className:"subst",label:"interpol",begin:n(/\\/,Ve,/\(/),end:/\)/}),ae=(Ve="")=>({begin:n(Ve,/"""/),end:n(/"""/,Ve),contains:[q(Ve),le(Ve),ye(Ve)]}),pe=(Ve="")=>({begin:n(Ve,/"/),end:n(/"/,Ve),contains:[q(Ve),ye(Ve)]}),Ne={className:"string",variants:[ae(),ae("#"),ae("##"),ae("###"),pe(),pe("#"),pe("##"),pe("###")]},Pe=[C.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[C.BACKSLASH_ESCAPE]}],Ke={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:Pe},et=Ve=>{const pn=n(Ve,/\//),Pt=n(/\//,Ve);return{begin:pn,end:Pt,contains:[...Pe,{scope:"comment",begin:`#(?!.*${Pt})`,end:/$/}]}},wt={scope:"regexp",variants:[et("###"),et("##"),et("#"),Ke]},Bt={match:n(/`/,x,/`/)},qn={className:"variable",match:/\$\d+/},lr={className:"variable",match:`\\$${y}+`},It=[Bt,qn,lr],Or={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:T,contains:[...O,F,Ne]}]}},pt={scope:"keyword",match:n(/@/,o(...S),t(o(/\(/,/\s+/)))},on={scope:"meta",match:n(/@/,x)},fn=[Or,pt,on],Lt={match:t(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:n(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,y,"+")},{className:"type",match:E,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:n(/\s+&\s+/,t(E)),relevance:0}]},Nn={begin:/</,end:/>/,keywords:P,contains:[...$,...ne,...fn,z,Lt]};Lt.contains.push(Nn);const dr={match:n(x,/\s*:/),keywords:"_|0",relevance:0},ue={begin:/\(/,end:/\)/,relevance:0,keywords:P,contains:["self",dr,...$,wt,...ne,...ce,...O,F,Ne,...It,...fn,Lt]},ve={begin:/</,end:/>/,keywords:"repeat each",contains:[...$,Lt]},Ae={begin:o(t(n(x,/\s*:/)),t(n(x,/\s+/,x,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:x}]},lt={begin:/\(/,end:/\)/,keywords:P,contains:[Ae,...$,...ne,...O,F,Ne,...fn,Lt,ue],endsParent:!0,illegal:/["']/},gn={match:[/(func|macro)/,/\s+/,o(Bt.match,x,b)],className:{1:"keyword",3:"title.function"},contains:[ve,lt,L],illegal:[/\[/,/%/]},xe={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ve,lt,L],illegal:/\[|%/},Ye={match:[/operator/,/\s+/,b],className:{1:"keyword",3:"title"}},Yt={begin:[/precedencegroup/,/\s+/,E],className:{1:"keyword",3:"title"},contains:[Lt],keywords:[...d,...l],end:/}/},_t={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Tt={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Zt={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,x,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:P,contains:[ve,...ne,{begin:/:/,end:/\{/,keywords:P,contains:[{scope:"title.class.inherited",match:E},...ne],relevance:0}]};for(const Ve of Ne.variants){const pn=Ve.contains.find(sn=>sn.label==="interpol");pn.keywords=P;const Pt=[...ne,...ce,...O,F,Ne,...It];pn.contains=[...Pt,{begin:/\(/,end:/\)/,contains:["self",...Pt]}]}return{name:"Swift",keywords:P,contains:[...$,gn,xe,_t,Tt,Zt,Ye,Yt,{beginKeywords:"import",end:/$/,contains:[...$],relevance:0},wt,...ne,...ce,...O,F,Ne,...It,...fn,Lt,ue]}}return ju=A,ju}var Hu,Kg;function nI(){if(Kg)return Hu;Kg=1;function e(t){const n="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",o={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},a={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,i]},u=t.inherit(a,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),h={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},m={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},b={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},v=[o,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},h,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},m,b,s,a],y=[...v];return y.pop(),y.push(u),p.contains=y,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:v}}return Hu=e,Hu}var qu,jg;function rI(){if(jg)return qu;jg=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],o=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],i=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],a=[].concat(i,r,o);function u(l){const d=l.regex,g=(q,{after:le})=>{const ye="</"+q[0].slice(1);return q.input.indexOf(ye,le)!==-1},h=e,p={begin:"<>",end:"</>"},m=/<[A-Za-z0-9\\._:-]+\s*\/>/,b={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(q,le)=>{const ye=q[0].length+q.index,ae=q.input[ye];if(ae==="<"||ae===","){le.ignoreMatch();return}ae===">"&&(g(q,{after:ye})||le.ignoreMatch());let pe;const Ne=q.input.substring(ye);if(pe=Ne.match(/^\s*=/)){le.ignoreMatch();return}if((pe=Ne.match(/^\s+extends\s+/))&&pe.index===0){le.ignoreMatch();return}}},v={$pattern:e,keyword:t,literal:n,built_in:a,"variable.language":s},y="[0-9](_?[0-9])*",x=`\\.(${y})`,E="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",S={className:"number",variants:[{begin:`(\\b(${E})((${x})|\\.)?|(${x}))[eE][+-]?(${y})\\b`},{begin:`\\b(${E})\\b((${x})\\b|\\.)?|(${x})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},T={className:"subst",begin:"\\$\\{",end:"\\}",keywords:v,contains:[]},A={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,T],subLanguage:"xml"}},C={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,T],subLanguage:"css"}},L={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[l.BACKSLASH_ESCAPE,T],subLanguage:"graphql"}},j={className:"string",begin:"`",end:"`",contains:[l.BACKSLASH_ESCAPE,T]},V={className:"comment",variants:[l.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:h+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),l.C_BLOCK_COMMENT_MODE,l.C_LINE_COMMENT_MODE]},B=[l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,A,C,L,j,{match:/\$\d+/},S];T.contains=B.concat({begin:/\{/,end:/\}/,keywords:v,contains:["self"].concat(B)});const N=[].concat(V,T.contains),W=N.concat([{begin:/(\s*)\(/,end:/\)/,keywords:v,contains:["self"].concat(N)}]),R={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:v,contains:W},P={variants:[{match:[/class/,/\s+/,h,/\s+/,/extends/,/\s+/,d.concat(h,"(",d.concat(/\./,h),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,h],scope:{1:"keyword",3:"title.class"}}]},ne={relevance:0,match:d.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...o]}},Y={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},K={variants:[{match:[/function/,/\s+/,h,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[R],illegal:/%/},ce={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function z(q){return d.concat("(?!",q.join("|"),")")}const k={match:d.concat(/\b/,z([...i,"super","import"].map(q=>`${q}\\s*\\(`)),h,d.lookahead(/\s*\(/)),className:"title.function",relevance:0},O={begin:d.concat(/\./,d.lookahead(d.concat(h,/(?![0-9A-Za-z$_(])/))),end:h,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Z={match:[/get|set/,/\s+/,h,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},R]},re="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+l.UNDERSCORE_IDENT_RE+")\\s*=>",F={match:[/const|var|let/,/\s+/,h,/\s*/,/=\s*/,/(async\s*)?/,d.lookahead(re)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[R]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:v,exports:{PARAMS_CONTAINS:W,CLASS_REFERENCE:ne},illegal:/#(?![$_A-z])/,contains:[l.SHEBANG({label:"shebang",binary:"node",relevance:5}),Y,l.APOS_STRING_MODE,l.QUOTE_STRING_MODE,A,C,L,j,V,{match:/\$\d+/},S,ne,{scope:"attr",match:h+d.lookahead(":"),relevance:0},F,{begin:"("+l.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[V,l.REGEXP_MODE,{className:"function",begin:re,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:l.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:v,contains:W}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:p.begin,end:p.end},{match:m},{begin:b.begin,"on:begin":b.isTrulyOpeningTag,end:b.end}],subLanguage:"xml",contains:[{begin:b.begin,end:b.end,skip:!0,contains:["self"]}]}]},K,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+l.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[R,l.inherit(l.TITLE_MODE,{begin:h,className:"title.function"})]},{match:/\.\.\./,relevance:0},O,{match:"\\$"+h,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[R]},k,ce,P,Z,{match:/\$[(.]/}]}}function c(l){const d=l.regex,g=u(l),h=e,p=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],m={begin:[/namespace/,/\s+/,l.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},b={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:p},contains:[g.exports.CLASS_REFERENCE]},v={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},y=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],x={$pattern:e,keyword:t.concat(y),literal:n,built_in:a.concat(p),"variable.language":s},E={className:"meta",begin:"@"+h},S=(L,j,$)=>{const V=L.contains.findIndex(B=>B.label===j);if(V===-1)throw new Error("can not find mode to replace");L.contains.splice(V,1,$)};Object.assign(g.keywords,x),g.exports.PARAMS_CONTAINS.push(E);const T=g.contains.find(L=>L.scope==="attr"),A=Object.assign({},T,{match:d.concat(h,d.lookahead(/\s*\?:/))});g.exports.PARAMS_CONTAINS.push([g.exports.CLASS_REFERENCE,T,A]),g.contains=g.contains.concat([E,m,b,A]),S(g,"shebang",l.SHEBANG()),S(g,"use_strict",v);const C=g.contains.find(L=>L.label==="func.def");return C.relevance=0,Object.assign(g,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),g}return qu=c,qu}var Gu,Hg;function oI(){if(Hg)return Gu;Hg=1;function e(t){const n=t.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},o={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,a=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,u=/\d{1,2}(:\d{1,2}){1,2}/,c={className:"literal",variants:[{begin:n.concat(/# */,n.either(s,i),/ *#/)},{begin:n.concat(/# */,u,/ *#/)},{begin:n.concat(/# */,a,/ *#/)},{begin:n.concat(/# */,n.either(s,i),/ +/,n.either(a,u),/ *#/)}]},l={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},d={className:"label",begin:/^\w+:/},g=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),h=t.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[r,o,c,l,d,g,h,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[h]}]}}return Gu=e,Gu}var Vu,qg;function iI(){if(qg)return Vu;qg=1;function e(t){t.regex;const n=t.COMMENT(/\(;/,/;\)/);n.contains.push("self");const r=t.COMMENT(/;;/,/$/),o=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},a={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},u={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},c={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},l={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:o},contains:[r,n,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,a,i,t.QUOTE_STRING_MODE,c,l,u]}}return Vu=e,Vu}var Wu,Gg;function sI(){if(Gg)return Wu;Gg=1;var e=ED();return e.registerLanguage("xml",SD()),e.registerLanguage("bash",CD()),e.registerLanguage("c",kD()),e.registerLanguage("cpp",AD()),e.registerLanguage("csharp",TD()),e.registerLanguage("css",DD()),e.registerLanguage("markdown",ID()),e.registerLanguage("diff",OD()),e.registerLanguage("ruby",RD()),e.registerLanguage("go",ND()),e.registerLanguage("graphql",MD()),e.registerLanguage("ini",LD()),e.registerLanguage("java",PD()),e.registerLanguage("javascript",$D()),e.registerLanguage("json",FD()),e.registerLanguage("kotlin",BD()),e.registerLanguage("less",zD()),e.registerLanguage("lua",UD()),e.registerLanguage("makefile",KD()),e.registerLanguage("perl",jD()),e.registerLanguage("objectivec",HD()),e.registerLanguage("php",qD()),e.registerLanguage("php-template",GD()),e.registerLanguage("plaintext",VD()),e.registerLanguage("python",WD()),e.registerLanguage("python-repl",YD()),e.registerLanguage("r",ZD()),e.registerLanguage("rust",XD()),e.registerLanguage("scss",JD()),e.registerLanguage("shell",QD()),e.registerLanguage("sql",eI()),e.registerLanguage("swift",tI()),e.registerLanguage("yaml",nI()),e.registerLanguage("typescript",rI()),e.registerLanguage("vbnet",oI()),e.registerLanguage("wasm",iI()),e.HighlightJS=e,e.default=e,Wu=e,Wu}var aI=sI();const Ys=Ma(aI),Hn=new In({html:!0,linkify:!0,breaks:!1,highlight(e,t){if(t&&Ys.getLanguage(t))try{const n=Ys.highlight(e,{language:t}).value;return`<pre><code class="hljs language-${t}">${n}</code></pre>`}catch{}return""}}),uI=/^<\/?(?:details|summary)>$/i,cI=/^<details\s+open\s*>$/i,lI=/^<input class="task-list-item-checkbox"(?: checked="")? disabled="" type="checkbox">$/;function dI(e){return uI.test(e)||cI.test(e)||lI.test(e)}function n1(e){const t=Hn.utils.escapeHtml;let n="",r=0;const o=/<[^>]*>/g;let i;for(;(i=o.exec(e))!==null;){n+=t(e.slice(r,i.index));const s=i[0];n+=dI(s)?s:t(s),r=i.index+s.length}return n+=t(e.slice(r)),n}Hn.renderer.rules.html_block=(e,t)=>n1(e[t].content);Hn.renderer.rules.html_inline=(e,t)=>n1(e[t].content);const fI=Hn.renderer.rules.image??((e,t,n,r,o)=>o.renderToken(e,t,n)),Vg=Hn.renderer.rules.link_open??((e,t,n,r,o)=>o.renderToken(e,t,n)),gI=Hn.renderer.rules.fence??((e,t,n,r,o)=>o.renderToken(e,t,n));function r1(e,t,n){if(!e||/^([a-z]+:)?\/\//i.test(e)||e.startsWith("/")||e.startsWith("#"))return e;const r=e.match(/^attachments\/(.+)$/);return!r||!n?e:`/api/projects/${encodeURIComponent(n)}/specs/${encodeURIComponent(t)}/attachments/${encodeURIComponent(r[1])}`}function pI(e){return e.replace(/:\d+(?::\d+)?$/,"")}function hI(e){const n=pI(e).replace(/[?#].*$/,"").split(/[\\/]/).filter(Boolean).pop()??"";return/^\.[^./\\]+$/.test(n)||/\.[A-Za-z0-9][A-Za-z0-9_-]{0,15}$/.test(n)}function mI(e){return!e||e.startsWith("#")||/^([a-z]+:)?\/\//i.test(e)||/^[a-z][a-z0-9+.-]*:/i.test(e)&&!/^[A-Za-z]:[\\/]/.test(e)||e.startsWith("attachments/")?!1:(e.startsWith("/")||/^[A-Za-z]:[\\/]/.test(e))&&hI(e)}function Yu(e,t){e.attrs&&(e.attrs=e.attrs.filter(([n])=>n!==t))}function To(e,t,n){e.attrs||(e.attrs=[]);const r=e.attrs.find(([o])=>o===t);r?r[1]=n:e.attrs.push([t,n])}Hn.renderer.rules.image=function(e,t,n,r,o){const i=r,s=i?.specId;if(s){const u=e[t].attrs?.find(([c])=>c==="src");u&&(u[1]=r1(u[1],s,i?.projectId))}return fI(e,t,n,r,o)};Hn.renderer.rules.link_open=function(e,t,n,r,o){const i=r,s=e[t],a=s.attrs?.find(([c])=>c==="href");if(i?.fileLinks==="copy"&&a&&mI(a[1])){const c=a[1];return Yu(s,"href"),Yu(s,"target"),Yu(s,"rel"),To(s,"role","button"),To(s,"tabindex","0"),To(s,"data-file-link","true"),To(s,"data-file-path",c),i.fileLinkTitle&&(To(s,"title",i.fileLinkTitle),To(s,"aria-label",i.fileLinkTitle)),Vg(e,t,n,r,o)}const u=i?.specId;if(u&&a){const c=r1(a[1],u,i?.projectId);if(c!==a[1]){a[1]=c;const l=s.attrs?.find(([d])=>d==="target");l?l[1]="_blank":s.attrs?.push(["target","_blank"]),s.attrs?.push(["rel","noopener noreferrer"])}}return Vg(e,t,n,r,o)};Hn.renderer.rules.fence=function(e,t,n,r,o){const i=e[t],s=i.info.trim(),a=r?.mermaid??"diagram";if(s==="mermaid"&&a==="diagram"){const u=i.content;return`<div class="mermaid" data-mermaid-source="${u.replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}">${u}</div>`}return gI(e,t,n,r,o)};Hn.use(_D,{enabled:!1,label:!1});function Hl(e,t={}){const n={};return t.specId&&(n.specId=t.specId),t.projectId&&(n.projectId=t.projectId),t.mermaid&&(n.mermaid=t.mermaid),t.fileLinks&&(n.fileLinks=t.fileLinks),t.fileLinkTitle&&(n.fileLinkTitle=t.fileLinkTitle),Hn.render(e,n)}function bI(e){return e.replace(/^\uFEFF?---[ \t]*\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/,"")}const yI="modulepreload",vI=function(e){return"/"+e},Wg={},xI=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let s=function(c){return Promise.all(c.map(l=>Promise.resolve(l).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),u=a?.nonce||a?.getAttribute("nonce");o=s(n.map(c=>{if(c=vI(c),c in Wg)return;Wg[c]=!0;const l=c.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const g=document.createElement("link");if(g.rel=l?"stylesheet":yI,l||(g.as="script"),g.crossOrigin="",g.href=c,u&&g.setAttribute("nonce",u),document.head.appendChild(g),l)return new Promise((h,p)=>{g.addEventListener("load",h),g.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};let Zu=null,Yg=Promise.resolve();const Pc=new WeakMap;async function wI(){return Zu||(Zu=xI(()=>import("./mermaid.core-_0eTmAI-.js").then(e=>e.bp),[]).then(e=>e.default)),Zu}function _I(){return qv()==="dark"?"dark":"default"}function Xu(){return new Promise(e=>{if(typeof window.requestAnimationFrame=="function"){window.requestAnimationFrame(()=>e());return}window.setTimeout(e,0)})}function EI(e){const t=(Pc.get(e)??0)+1;return Pc.set(e,t),t}function Ju(e,t){return Pc.get(e)===t}async function SI(e){const t=Yg.then(e,e);Yg=t.catch(()=>{}),await t}async function CI(e,t={}){if(e.querySelector(".mermaid")===null)return()=>{};const n=EI(e),r=await wI();if(!Ju(e,n))return()=>{};if(await Xu(),!Ju(e,n))return()=>{};let o=()=>{};function i(){o(),o=t.enhance?t.enhance(e):()=>{}}async function s(l){const d=l.filter(g=>g.isConnected&&e.contains(g));d.length!==0&&await SI(async()=>{if(!Ju(e,n))return;const g=d.filter(p=>p.isConnected&&e.contains(p));if(g.length===0)return;const h=_I();r.initialize({startOnLoad:!1,theme:h}),o(),o=()=>{},g.forEach(p=>{const m=p.getAttribute("data-mermaid-source");m&&(p.removeAttribute("data-processed"),p.textContent=m)});try{await r.run({nodes:g}),await Xu(),i()}catch(p){console.error("[mermaid] render error:",p)}})}const a=Array.from(e.querySelectorAll(".mermaid:not([data-processed])"));await s(a),await Xu(),i();const u=()=>void s(Array.from(e.querySelectorAll(".mermaid"))),c=new window.MutationObserver(u);return c.observe(document.documentElement,{attributes:!0,attributeFilter:["data-kb-theme"]}),()=>{o(),c.disconnect()}}const xs=new WeakMap;let No=null;const Zg=96,o1=.25,kI=8,AI=2.5;function i1(e,t,n){return Math.min(n,Math.max(t,e))}function ws(e){const t=Math.round(e*1e3)/1e3;return Object.is(t,-0)?"0":String(t)}function Xg(e){if(!e)return null;const t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function TI(e){const t=e.getBoundingClientRect();if(t.width>0&&t.height>0)return{width:t.width,height:t.height};const n=e.getAttribute("viewBox")?.trim().split(/[\s,]+/).map(Number);return n?.length===4&&n[2]>0&&n[3]>0?{width:n[2],height:n[3]}:{width:Xg(e.getAttribute("width"))??0,height:Xg(e.getAttribute("height"))??0}}function DI(e,t){const n=t.getBoundingClientRect();if(e.width<=0||e.height<=0||n.width<=0||n.height<=0)return 1;const r=Math.max(n.width-Zg,n.width*.5),o=Math.max(n.height-Zg,n.height*.5),i=Math.min(r/e.width,o/e.height);return i1(i,o1,AI)}function si(e,t,n){const r=document.createElement("button");return r.type="button",r.className=e,r.setAttribute("aria-label",t),r.title=t,r.textContent=n,r}function s1(e){return typeof SVGSVGElement<"u"&&e instanceof SVGSVGElement}function II(e,t){if(s1(e)){const r=e.parentElement;return!r||r===t?null:{host:r,svg:e}}if(!(e instanceof HTMLElement))return null;const n=e.querySelector("svg");return n?{host:e,svg:n}:null}function OI(e,t){No?.close();const n=t.parentNode,r=t.nextSibling,o=t.style.width,i=t.style.height,s=document.createElement("div");s.className="mermaid-overlay",s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.setAttribute("aria-label",_("mermaid.viewerLabel"));const a=document.createElement("div");a.className="mermaid-overlay__toolbar";const u=si("mermaid-overlay__button",_("mermaid.zoomOut"),"-"),c=si("mermaid-overlay__button",_("mermaid.zoomIn"),"+"),l=si("mermaid-overlay__button",_("mermaid.reset"),"1:1"),d=si("mermaid-overlay__button",_("mermaid.close"),"x");a.append(u,c,l,d);const g=document.createElement("div");g.className="mermaid-overlay__viewport";const h=document.createElement("div");h.className="mermaid-overlay__canvas",t.classList.add("mermaid-overlay__svg"),h.appendChild(t),g.appendChild(h),s.append(a,g),document.body.appendChild(s);const p=TI(t),m=DI(p,g);let b=m,v=0,y=0,x=!1,E=0,S=0,T=0,A=0;const C=()=>{h.style.transform=`translate(${ws(v)}px, ${ws(y)}px)`},L=()=>{p.width<=0||p.height<=0||(t.style.width=`${ws(p.width*b)}px`,t.style.height=`${ws(p.height*b)}px`)},j=()=>{L(),C()},$=(Y,K,ce)=>{const z=g.getBoundingClientRect(),k=K===void 0?z.width/2:K-z.left,O=ce===void 0?z.height/2:ce-z.top,Z=z.width/2,re=z.height/2,F=b;b=i1(Y,o1,kI),v=k-Z-(k-Z-v)/F*b,y=O-re-(O-re-y)/F*b,j()},V=()=>{b=m,v=p.width>0?-(p.width*b)/2:0,y=p.height>0?-(p.height*b)/2:0,j()},B=()=>{if(document.removeEventListener("keydown",ne),t.classList.remove("mermaid-overlay__svg"),t.style.width=o,t.style.height=i,n?.isConnected){const Y=r?.parentNode===n?r:null;n.insertBefore(t,Y)}s.remove(),No?.close===B&&(No=null)},N=Y=>{Y.preventDefault();const K=Y.deltaY>0?.9:1.1;$(b*K,Y.clientX,Y.clientY)},W=Y=>{Y.button===0&&(x=!0,E=Y.clientX,S=Y.clientY,T=v,A=y,g.setPointerCapture(Y.pointerId),g.classList.add("is-dragging"))},R=Y=>{x&&(v=T+Y.clientX-E,y=A+Y.clientY-S,C())},P=Y=>{x&&(x=!1,g.classList.remove("is-dragging"),g.hasPointerCapture(Y.pointerId)&&g.releasePointerCapture(Y.pointerId))},ne=Y=>{Y.key==="Escape"&&B()};return u.addEventListener("click",()=>$(b/1.2)),c.addEventListener("click",()=>$(b*1.2)),l.addEventListener("click",V),d.addEventListener("click",B),g.addEventListener("wheel",N,{passive:!1}),g.addEventListener("pointerdown",W),g.addEventListener("pointermove",R),g.addEventListener("pointerup",P),g.addEventListener("pointercancel",P),document.addEventListener("keydown",ne),No={host:e,sourceSvg:t,close:B},V(),d.focus(),B}function RI(e){const t=[];return e.querySelectorAll(".mermaid").forEach(n=>{const r=II(n,e);if(!r)return;const{host:o}=r,i=xs.get(o);if(i?.button.isConnected){t.push(i.cleanup);return}i?.cleanup(),o.classList.add("mermaid-control-host");const s=si("mermaid-fullscreen-button",_("mermaid.maximize"),"⤢"),a=()=>{const c=s1(n)&&n.isConnected?n:o.querySelector("svg");c&&OI(o,c)};s.addEventListener("click",a),o.appendChild(s);const u=()=>{No?.host===o&&No.close(),s.removeEventListener("click",a),s.isConnected&&s.remove(),o.classList.remove("mermaid-control-host"),xs.get(o)?.button===s&&xs.delete(o)};xs.set(o,{button:s,cleanup:u}),t.push(u)}),()=>{t.forEach(n=>n())}}async function a1(e){return CI(e,{enhance:RI})}function NI(e,t){let n=e;for(;n&&n!==t;){if(n.nodeType===1){const o=n.tagName;if(o==="H2"||o==="H3")return n}let r=n.previousSibling;if(!r){n=n.parentNode;continue}for(;r?.lastChild;)r=r.lastChild;n=r}return null}function MI(e,t){return t.contains(e.startContainer)&&t.contains(e.endContainer)&&t.contains(e.commonAncestorContainer)}function LI(e,t,n){const r=n.throttleMs??50;let o,i="";const s=()=>{window.clearTimeout(o),o=window.setTimeout(()=>{const a=window.getSelection();if(!a||a.rangeCount===0||a.isCollapsed){i!==""&&(i="",t(null));return}const u=a.getRangeAt(0);if(!MI(u,e)){i!==""&&(i="",t(null));return}const c=a.toString();if(!c.trim()){i!==""&&(i="",t(null));return}const l=u.getBoundingClientRect(),d=NI(u.startContainer,e),g=n.noSectionLabel,h=d&&d.textContent?.trim()||g;i=c,t({text:c,rect:l,sectionPath:h})},r)};return document.addEventListener("selectionchange",s),()=>{document.removeEventListener("selectionchange",s),window.clearTimeout(o)}}function PI(e,t,n={}){return LI(e,t,{...n,noSectionLabel:_("selection.noSection")})}const $I=/^##\s+(?:\d+(?:\.\d+)*\.?\s+)?待确认(?:项|问题)\s*$/,FI=/^##\s+/,BI=/^###\s+(?:\d+(?:\.\d+)*\s+)?(.+\S)\s*$/,zI=/^\d+\.\s+(.*\S)\s*$/,UI=/^\s*$/,Jg=/\s*[((]推荐[))]\s*$/,Qg=/\s*(自由文本)\s*$/,KI=/^\[(choice|confirm)\]\s*/i,jI=/^\*\*方案\*\*\s*[::]\s*(.*\S)?\s*$/,HI=/^\*\*(?:影响|代价)\*\*\s*[::]\s*(.*\S)?\s*$/;function qI(e){const t=e.split(`
26
- `);let n=0;for(;n<t.length&&!$I.test(t[n]);)n+=1;if(n>=t.length)return[];n+=1;const r=[];let o=null;for(;n<t.length;){const i=t[n];if(FI.test(i))break;const s=YI(i);s?(o={headingText:s,bodyLines:[]},r.push(o)):o&&o.bodyLines.push(i),n+=1}return r.map((i,s)=>GI(i,s))}function GI(e,t){const n=KI.exec(e.headingText),r=n?.[1]?.toLowerCase(),o=n?e.headingText.slice(n[0].length):e.headingText,i=Qg.test(o),s=i?o.replace(Qg,"").trim():o.trim();if(r==="confirm"){const{plan:c,impact:l}=VI(e.bodyLines);return{id:ep(t,s),text:s,kind:"confirm",options:[],isFreeform:!1,plan:c,impact:l}}const a=WI(e.bodyLines,t,s),u=i||a.length===0;return{id:ep(t,s),text:s,kind:u?"freeform":"choice",options:a,isFreeform:u}}function VI(e){let t,n;for(const r of e){const o=r.trim(),i=jI.exec(o);if(i){t=i[1]?.trim()||"";continue}const s=HI.exec(o);s&&(n=s[1]?.trim()||"")}return{plan:t,impact:n}}function WI(e,t,n){const r=[];let o=0;for(const i of e){if(UI.test(i))continue;const s=ZI(i);if(s===null)continue;const a=Jg.test(s),u=a?s.replace(Jg,"").trim():s.trim();u&&(a&&(o+=1),r.push({id:XI(t,r.length,u),label:u,recommended:a&&o===1}))}return o>=2&&console.warn(`[question-parse] 问题 "${n}" 含 ${o} 个 (推荐),已保留首个,其余降级`),r}function YI(e){const t=BI.exec(e);return t?t[1]:null}function ZI(e){const t=zI.exec(e);return t?t[1]:null}function ep(e,t){return`q-${e}-${u1(t)}`}function XI(e,t,n){return`q-${e}-o-${t}-${u1(n)}`}function u1(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)|0;return(t>>>0).toString(36)}var JI=M('<div class="selection-menu fixed z-50 flex gap-1 rounded-md border bg-popover p-1 shadow-md">');const QI=36,e6=140,t6=e=>{const t=()=>{const n=e.snap;if(!n)return{top:0,left:0,visible:!1};const r=n.rect.top-QI-8,o=n.rect.left,i=r<8?n.rect.bottom+8:r,s=Math.min(Math.max(8,o),window.innerWidth-e6-8);return{top:i,left:s,visible:!0}};return f(G,{get when(){return e.snap},children:n=>{const r=t();return(()=>{var o=JI();return o.$$mousedown=i=>i.preventDefault(),w(o,f(Ee,{variant:"ghost",size:"sm",onClick:()=>e.onAnnotate(n()),get children(){return _("selectionMenu.annotate")}}),null),w(o,f(Ee,{variant:"ghost",size:"sm",onClick:()=>e.onExplain(n()),get children(){return _("selectionMenu.explain")}}),null),Le(i=>{var s=`${r.top}px`,a=`${r.left}px`;return s!==i.e&&hi(o,"top",i.e=s),a!==i.t&&hi(o,"left",i.t=a),i},{e:void 0,t:void 0}),o})()}})};dn(["mousedown"]);var n6=M('<div class="fixed z-[60] flex max-h-[calc(100vh-16px)] flex-col gap-2.5 overflow-visible rounded-lg border bg-card p-3.5 shadow-xl"style=width:500px><header class="flex flex-col gap-0.5"><strong></strong></header><blockquote class="m-0 border-l-2 border-border bg-background px-2.5 py-1.5 text-[0.9em] text-muted-foreground"><em></em> <!> "<!>"</blockquote><form><div class="mt-3 flex justify-end gap-2">'),r6=M('<p class="text-destructive ">');const o6=500,Lr=8,i6=e=>{const[t,n]=D(""),[r,o]=D(!1),[i,s]=D(null),[a,u]=D(0),c=()=>{const d=e.snap;if(!d)return{top:0,left:0};const g=a()||260,h=window.innerHeight,p=d.rect.bottom+Lr,m=d.rect.top-Lr-g;let b;p+g<=h-Lr?b=p:m>=Lr?b=m:b=Math.max(Lr,h-g-Lr);const v=Math.min(Math.max(Lr,d.rect.left),window.innerWidth-o6-Lr);return{top:b,left:v}};async function l(d){if(d.preventDefault(),!!t().trim()){o(!0),s(null);try{await e.onSubmit(t().trim()),n(""),e.onCancel()}catch(g){s(g.message)}finally{o(!1)}}}return f(G,{get when(){return J(()=>!!e.open)()&&e.snap},get children(){var d=n6(),g=d.firstChild,h=g.firstChild,p=g.nextSibling,m=p.firstChild,b=m.nextSibling,v=b.nextSibling,y=v.nextSibling,x=y.nextSibling;x.nextSibling;var E=p.nextSibling,S=E.firstChild;return d.$$mousedown=T=>T.stopPropagation(),Bn(T=>{queueMicrotask(()=>{T.offsetHeight!==a()&&u(T.offsetHeight)})},d),w(h,()=>_("annotate.title")),w(m,()=>e.snap?.sectionPath),w(p,()=>_("annotate.inSection"),v),w(p,()=>(e.snap?.text??"").slice(0,200),x),E.addEventListener("submit",l),w(E,f(Ta,{get projectId(){return e.projectId},minRows:3,maxRows:3,get value(){return t()},onValueChange:n,get placeholder(){return _("annotate.placeholder")},autofocus:!0}),S),w(E,(()=>{var T=J(()=>!!i());return()=>T()&&(()=>{var A=r6();return w(A,i),A})()})(),S),w(S,f(Ee,{variant:"ghost",type:"button",get onClick(){return e.onCancel},get children(){return _("common.cancel")}}),null),w(S,f(Ee,{variant:"default",type:"submit",get disabled(){return r()||!t().trim()},get children(){return J(()=>!!r())()?_("common.submitting"):_("annotate.submit")}}),null),Le(T=>{var A=`${c().top}px`,C=`${c().left}px`;return A!==T.e&&hi(d,"top",T.e=A),C!==T.t&&hi(d,"left",T.t=C),T},{e:void 0,t:void 0}),d}})};dn(["mousedown"]);var s6=M("<div><span class=text-muted-foreground></span><code class=font-mono>"),a6=M('<blockquote class="m-0 border-l-2 border-border pl-2 text-muted-foreground">'),u6=M('<div class="flex flex-col gap-1 text-sm">'),c6=M('<p class="text-destructive ">'),l6=M('<div class="append-dialog-backdrop fixed inset-0 z-50"><div class="append-dialog fixed z-50 flex w-96 max-w-[calc(100vw-2rem)] flex-col gap-3 rounded-xl border bg-card p-4 shadow-lg"role=dialog><header class="flex flex-col gap-0.5"><strong class=" "></strong><span class="text-sm text-muted-foreground"></span></header><form class="flex flex-col gap-3"><label class="flex flex-col gap-1 "><span></span></label><div class="flex items-center justify-end gap-2">');const d6={feat:"appendTask.kindFeat",refct:"appendTask.kindRefct",fix:"appendTask.kindFix"},f6=e=>{const[t,n]=D("fix"),[r,o]=D(""),[i,s]=D(!1),[a,u]=D(null),[c,l]=D(null);te(()=>{if(!e.open){l(null);return}const p=e.anchorEl;if(!p)return;const m=p.getBoundingClientRect(),v=Math.max(16,Math.min(m.left,window.innerWidth-384-16));l({top:m.bottom+8,left:v})}),te(()=>{if(!e.open)return;const p=m=>{m.defaultPrevented||m.key==="Escape"&&(m.preventDefault(),h())};window.addEventListener("keydown",p),oe(()=>window.removeEventListener("keydown",p))});function d(){n("fix"),o(""),u(null)}async function g(p){p.preventDefault();const m=r().trim();if(!m){u(_("appendTask.descRequired"));return}s(!0),u(null);try{await e.onSubmit({kind:t(),description:m,sectionPath:e.sectionPath,quote:e.quote}),d(),e.onCancel()}catch(b){u(b.message)}finally{s(!1)}}function h(){e.onCancel()}return f(G,{get when(){return e.open},get children(){var p=l6(),m=p.firstChild,b=m.firstChild,v=b.firstChild,y=v.nextSibling,x=b.nextSibling,E=x.firstChild,S=E.firstChild,T=E.nextSibling;return p.$$mousedown=h,m.$$mousedown=A=>A.stopPropagation(),w(v,()=>_("appendTask.title")),w(y,()=>_("appendTask.hint")),x.addEventListener("submit",g),w(x,f(An,{class:"m-0 flex flex-col gap-1.5 border-0 p-0",get value(){return t()},onChange:A=>n(A),get disabled(){return i()},get children(){return[f(Ti,{class:"mb-1 font-medium",get children(){return _("appendTask.type")}}),J(()=>["feat","refct","fix"].map(A=>f(en,{value:A,class:"flex items-center gap-1.5",get children(){return[f(Jt,{}),f(un,{}),f(Qt,{class:"cursor-pointer",get children(){return _(d6[A])}})]}})))]}}),E),w(S,()=>_("appendTask.description")),w(E,f(Ta,{get projectId(){return e.projectId},minRows:5,maxRows:5,get value(){return r()},onValueChange:o,get placeholder(){return _("appendTask.descPlaceholder")},autofocus:!0,get disabled(){return i()}}),null),w(x,f(G,{get when(){return e.sectionPath||e.quote},get children(){var A=u6();return w(A,f(G,{get when(){return e.sectionPath},get children(){var C=s6(),L=C.firstChild,j=L.nextSibling;return w(L,()=>_("appendTask.refSection")),w(j,()=>e.sectionPath),C}}),null),w(A,f(G,{get when(){return e.quote},get children(){var C=a6();return w(C,()=>e.quote?.slice(0,200)),C}}),null),A}}),T),w(x,f(G,{get when(){return a()},get children(){var A=c6();return w(A,a),A}}),T),w(T,f(Ee,{type:"button",variant:"ghost",size:"sm",onClick:h,get disabled(){return i()},get children(){return _("common.cancel")}}),null),w(T,f(Ee,{type:"submit",variant:"default",size:"sm",get disabled(){return i()},get children(){return[f(oa,{class:"mr-1 h-3.5 w-3.5"}),J(()=>J(()=>!!i())()?_("common.submitting"):_("appendTask.submit"))]}}),null),Le(A=>{var C=_("appendTask.title"),L=c()?{top:`${c().top}px`,left:`${c().left}px`}:void 0;return C!==A.e&&Ge(m,"aria-label",A.e=C),A.t=Bo(m,L,A.t),A},{e:void 0,t:void 0}),p}})};dn(["mousedown"]);const Zs="__freeform__",g6={accept:"确认,按此推进",rejectAlternative:"否决·换方案",rejectConstraint:"否决·补约束",rejectDropGoal:"否决·弃目标·废弃当前目标,继续其余",rejectDropSpec:"否决·弃目标·放弃整个 spec"},p6="accept";function h6(e){return e!==p6}function m6(e,t,n){const r=g6[t],o=(n??"").trim();if(h6(t)&&!o)return null;const i={questionId:e.id,questionText:e.text,selectedOptionLabel:r};return o&&(i.note=o),i}function b6(e,t){const n=(t.note??"").trim();if(e.isFreeform)return n?{questionId:e.id,questionText:e.text,note:n}:null;const r=t.selectedOptionLabel;return r===Zs?n?{questionId:e.id,questionText:e.text,note:n}:null:r?{questionId:e.id,questionText:e.text,selectedOptionLabel:r}:null}function c1(e){if(e.confirmTop==="accept")return"accept";if(e.confirmTop!=="reject")return null;if(e.confirmIntent==="alternative")return"rejectAlternative";if(e.confirmIntent==="constraint")return"rejectConstraint";if(e.confirmIntent==="dropGoal"){if(e.confirmDrop==="current")return"rejectDropGoal";if(e.confirmDrop==="spec")return"rejectDropSpec"}return null}function y6(e){const t=c1(e);return t?t==="accept"?!0:e.note.trim().length>0:!1}function v6(e){const t={};for(const n of e){if(n.kind==="confirm"){t[n.id]={note:"",confirmTop:"accept"};continue}const r=n.options.find(o=>o.recommended);t[n.id]={selectedOptionLabel:r?.label??n.options[0]?.label,note:""}}return t}function x6(e,t){let n=0;for(const r of e){const o=t[r.id];if(!o){n+=1;continue}if(r.kind==="confirm"){y6(o)||(n+=1);continue}const i=o.note??"";r.isFreeform||o.selectedOptionLabel===Zs?i.trim()||(n+=1):o.selectedOptionLabel||(n+=1)}return n}function w6(e,t){const n=[];for(const r of e){const o=t[r.id]??{note:""};if(r.kind==="confirm"){const s=c1(o);if(!s)continue;const a=m6(r,s,o.note);if(!a)return{ok:!1,reason:"reasonRequired"};n.push(a);continue}const i=b6(r,o);i&&n.push(i)}return{ok:!0,items:n}}function _6(e){return`f-${Date.now()}-${e}`}function E6(e){return e.map(t=>({sectionPath:t.sectionPath,quote:t.quote,note:t.note}))}function S6(e){return e?e.includes("🔴")?"border-l-2 border-l-destructive":e.includes("🟡")?"border-l-2 border-l-warning":"border-border":"border-border"}var C6=M('<p class="text-destructive mx-3 mt-1 ">'),k6=M('<aside class="flex min-w-0 flex-[4] flex-col overflow-hidden rounded-lg border bg-card shadow-lg"data-testid=question-confirm-panel><header class="flex items-center justify-between gap-2 border-b bg-background px-3 py-2.5"><div class="flex min-w-0 flex-1 items-baseline gap-2"><strong class="min-w-0 truncate font-semibold"></strong><span class="shrink-0 whitespace-nowrap text-sm text-muted-foreground"> <span class="font-semibold text-warning"></span> / </span></div></header><ul class="m-0 flex min-h-0 min-w-0 list-none flex-1 flex-col gap-2 overflow-auto p-2">'),tp=M('<p class="m-0 break-words"><strong></strong>:'),A6=M("<div>"),T6=M('<li class="flex min-w-0 flex-col gap-2 rounded-lg border bg-background p-2.5"><p class="qcp-question m-0 font-medium break-words">'),D6=M('<em class="text-sm not-italic text-primary"> '),I6=M('<li class="flex min-w-0 flex-col gap-2 rounded-lg border border-accent/60 bg-background p-2.5"><header class="text-muted-foreground flex items-center justify-between text-sm"><strong></strong></header><blockquote class="border-border bg-card m-0 border-l-2 px-2 py-1 text-sm text-muted-foreground break-words"><em></em> <!> "<!>"</blockquote><p class="m-0 whitespace-pre-wrap break-words">!!!');const O6=e=>{const[t,n]=D(v6(e.questions)),[r,o]=D(!1),[i,s]=D(null);function a(m,b){n(v=>({...v,[m]:{...v[m],...b}}))}function u(m,b){a(m,{selectedOptionLabel:b})}function c(m,b){a(m,{note:b})}function l(m,b){b==="accept"?a(m,{confirmTop:b,confirmIntent:void 0,confirmDrop:void 0}):a(m,{confirmTop:b})}function d(m,b){b==="dropGoal"?a(m,{confirmIntent:b}):a(m,{confirmIntent:b,confirmDrop:void 0})}function g(m,b){a(m,{confirmDrop:b})}const h=ee(()=>x6(e.questions,t()));async function p(){o(!0),s(null);try{const m=w6(e.questions,t());if(!m.ok){s(_("questionConfirm.reasonRequired"));return}const b={answers:m.items,freeformAnnotations:E6(e.freeforms)};if(b.answers.length===0&&b.freeformAnnotations.length===0){s(_("questionConfirm.noAnswers"));return}await e.onSubmit(b)}catch(m){s(m.message)}finally{o(!1)}}return(()=>{var m=k6(),b=m.firstChild,v=b.firstChild,y=v.firstChild,x=y.nextSibling,E=x.firstChild,S=E.nextSibling;S.nextSibling;var T=b.nextSibling;return w(y,()=>_("questionConfirm.title")),w(x,()=>_("questionConfirm.unanswered"),E),w(S,h),w(x,()=>e.questions.length,null),w(b,f(Ee,{size:"sm",class:"shrink-0",get disabled(){return r()||e.running},onClick:p,get children(){return[f(oa,{class:"mr-1 h-3.5 w-3.5"}),J(()=>J(()=>!!r())()?_("common.submitting"):J(()=>!!e.running)()?_("questionConfirm.running"):_("questionConfirm.submitAll"))]}}),null),w(m,f(G,{get when(){return i()},get children(){var A=C6();return w(A,i),A}}),T),w(T,f(rt,{get each(){return e.questions},children:A=>{const C=()=>t()[A.id]??{note:""},L=()=>A.kind!=="confirm"&&(A.isFreeform||C().selectedOptionLabel===Zs),j=()=>A.kind==="confirm"&&C().confirmTop==="reject";return(()=>{var $=T6(),V=$.firstChild;return w(V,()=>A.text),w($,f(G,{get when(){return A.kind==="choice"},get children(){return f(An,{class:"m-0 flex flex-col gap-1 p-0",get value(){return C().selectedOptionLabel??""},onChange:B=>u(A.id,B),get children(){return[f(rt,{get each(){return A.options},children:B=>f(en,{get value(){return B.label},class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(Jt,{}),f(un,{}),f(Qt,{class:"min-w-0 cursor-pointer break-words",get children(){return[J(()=>B.label),f(G,{get when(){return B.recommended},get children(){var N=D6();return N.firstChild,w(N,()=>_("questionConfirm.recommended"),null),N}})]}})]}})}),f(en,{value:Zs,class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(Jt,{}),f(un,{}),f(Qt,{class:"qcp-option-freeform cursor-pointer",get children(){return _("questionConfirm.freeformLabel")}})]}})]}})}}),null),w($,f(G,{get when(){return A.kind==="confirm"},get children(){return[(()=>{var B=A6();return w(B,f(G,{get when(){return A.plan},get children(){var N=tp(),W=N.firstChild;return W.nextSibling,w(W,()=>_("questionConfirm.confirmPlanLabel")),w(N,()=>A.plan,null),N}}),null),w(B,f(G,{get when(){return A.impact},get children(){var N=tp(),W=N.firstChild;return W.nextSibling,w(W,()=>_("questionConfirm.confirmImpactLabel")),w(N,()=>A.impact,null),N}}),null),Le(()=>xt(B,`flex flex-col gap-1 rounded-md border bg-card px-2 py-1.5 text-sm ${S6(A.impact)}`)),B})(),f(An,{class:"m-0 flex flex-col gap-1 p-0",get value(){return C().confirmTop??""},onChange:B=>l(A.id,B),get children(){return[f(en,{value:"accept",class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(Jt,{}),f(un,{}),f(Qt,{class:"qcp-confirm-accept cursor-pointer",get children(){return _("questionConfirm.decisionAccept")}})]}}),f(en,{value:"reject",class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(Jt,{}),f(un,{}),f(Qt,{class:"qcp-confirm-reject cursor-pointer font-medium text-destructive",get children(){return _("questionConfirm.decisionReject")}})]}})]}}),f(G,{get when(){return C().confirmTop==="reject"},get children(){return f(An,{class:"m-0 ml-5 flex flex-col gap-1 border-l border-border pl-2",get value(){return C().confirmIntent??""},onChange:B=>d(A.id,B),get children(){return[f(rt,{get each(){return[["alternative",_("questionConfirm.intentAlternative")],["constraint",_("questionConfirm.intentConstraint")],["dropGoal",_("questionConfirm.intentDropGoal")]]},children:([B,N])=>f(en,{value:B,class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(Jt,{}),f(un,{}),f(Qt,{class:"min-w-0 cursor-pointer break-words",children:N})]}})}),f(G,{get when(){return C().confirmIntent==="dropGoal"},get children(){return f(An,{class:"m-0 ml-5 flex flex-col gap-1 border-l border-border pl-2",get value(){return C().confirmDrop??""},onChange:B=>g(A.id,B),get children(){return f(rt,{get each(){return[["current",_("questionConfirm.dropGoalCurrent")],["spec",_("questionConfirm.dropGoalSpec")]]},children:([B,N])=>f(en,{value:B,class:"flex items-center gap-1.5 rounded-md px-1 py-0.5 hover:bg-primary/5",get children(){return[f(Jt,{}),f(un,{}),f(Qt,{class:"min-w-0 cursor-pointer break-words",children:N})]}})})}})}})]}})}})]}}),null),w($,f(G,{get when(){return L()},get children(){return f(Nc,{class:"qcp-note",rows:2,get placeholder(){return _("questionConfirm.notePlaceholder")},get value(){return C().note},onInput:B=>c(A.id,B.currentTarget.value)})}}),null),w($,f(G,{get when(){return j()},get children(){return f(Nc,{class:"qcp-reject-reason",rows:2,get placeholder(){return _("questionConfirm.reasonPlaceholder")},get value(){return C().note},onInput:B=>c(A.id,B.currentTarget.value)})}}),null),$})()}}),null),w(T,f(rt,{get each(){return e.freeforms},children:A=>(()=>{var C=I6(),L=C.firstChild,j=L.firstChild,$=L.nextSibling,V=$.firstChild,B=V.nextSibling,N=B.nextSibling,W=N.nextSibling,R=W.nextSibling;R.nextSibling;var P=$.nextSibling;return P.firstChild,w(j,()=>_("questionConfirm.selectionAnnotation")),w(L,f(Ee,{variant:"ghost",size:"icon",class:"h-6 w-6",onClick:()=>e.onRemoveFreeform(A.id),"aria-label":"remove",get children(){return f(Gr,{class:"h-4 w-4"})}}),null),w(V,()=>A.sectionPath),w($,()=>_("questionConfirm.quoteConnector"),N),w($,()=>A.quote.slice(0,200),R),w(P,()=>A.note,null),C})()}),null),Le(()=>Ge(y,"title",_("questionConfirm.title"))),m})()};var R6=M('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),np=M("<p class=text-muted-foreground>"),N6=M('<header class="flex flex-col items-start justify-between gap-2"><div class="flex w-full items-center justify-between gap-2"><div class="flex min-w-0 items-center gap-1"></div></div><div><p class=" text-muted-foreground"></p></div><div class="flex items-center gap-2 text-muted-foreground"><div class="relative inline-flex shrink-0 rounded-md has-[:focus-visible]:ring-[1.5px] has-[:focus-visible]:ring-ring"><span aria-hidden=true></span><select class="absolute inset-0 h-full w-full cursor-pointer opacity-0"><option value=plan>plan</option><option value=tasks>tasks</option><option value=execute>execute</option><option value=done>done</option></select></div><time>'),M6=M('<p class="text-destructive ">'),L6=M('<div class="flex min-h-0 flex-1 items-stretch gap-4"><article class="markdown spec-main flex-[6] min-w-0 overflow-auto rounded-xl border bg-card p-4 shadow">');const P6={plan:"bg-stage-plan/15 text-stage-plan border-stage-plan/30",tasks:"bg-stage-tasks/15 text-stage-tasks border-stage-tasks/30",execute:"bg-stage-execute/15 text-stage-execute border-stage-execute/30",done:"bg-stage-done/15 text-stage-done border-stage-done/30"},$6=120,rp=3,F6=150,B6=e=>new Promise(t=>setTimeout(t,e));async function z6(e,t,n){for(let r=0;r<=rp;r+=1)try{return await me.getSpec(e,t)}catch(o){if(!o.message.startsWith("404"))throw o;r<rp&&await B6(F6)}return n??null}const U6=()=>{const e=Li(),t=po(),[n,r]=D(0),[o,i]=D(!1),[s,a]=D(""),[u]=Wt(()=>[t(),e.id,n()],async([z,k],O)=>z6(z,k,O.value)),[c]=Wt(()=>[t(),e.id,n()],async([z,k])=>{try{return await me.getDebug(z,k)}catch{return{exists:!1,text:""}}}),[l,d]=D(null),[g,h]=D(!1),[p,m]=D(null),[b,v]=D(null),[y,x]=D(null),[E,S]=D([]),[T,A]=D(!1),[C,L]=D(null);let j;const $=ee(()=>{const z=u();return z?qI(z.body):[]}),V=ee(()=>!u()||o()?!1:$().length>0||E().length>0);te(()=>{const z=e.id,k=t();if(!z||!k)return;let O;const Z=s_(k,z,{onUpdated:()=>{O&&clearTimeout(O),O=setTimeout(()=>void Rp(()=>r(re=>re+1)),$6)}});oe(()=>{O&&clearTimeout(O),Z()})}),te(()=>{const z=e.id,k=t();!z||!k||me.getSpecSession(k,z).then(({sessionId:O,running:Z})=>{O&&(a(O),i(Z),Ro(O))}).catch(()=>{})}),te(()=>{const z=t(),k=s();if(!z||!k)return;const O=wh(z,{onStatus:Z=>{Z.sessionId===k&&i(Z.running)}});oe(O)}),te(()=>{const z=t(),k=s();if(!z||!k)return;const O=sa(z,k,{onEvent:Z=>{(Z.type==="turn-completed"||Z.type==="error")&&i(!1)}});oe(O)}),te(()=>{const z=y();if(!z)return;const k=PI(z,d);oe(k)}),$i(()=>T()||g()),te(()=>{const z=y(),k=u();if(!z||!k)return;const O=t();let Z=!0,re;const F=Hl(k.body,{specId:k.id,projectId:O||void 0});M3(z,`<article>${F}</article>`,{childrenOnly:!0,onBeforeElUpdated:(q,le)=>!(q.classList?.contains("mermaid")&&q.getAttribute("data-mermaid-source")===le.getAttribute?.("data-mermaid-source"))}),a1(z).then(q=>{if(!Z){q();return}re=q}),oe(()=>{Z=!1,re?.()})});async function B(){v(null),i(!0);try{const z=t(),{sessionId:k}=await me.runAgent(z,e.id);a(k),Ro(k)}catch(z){i(!1),v(z.message)}}async function N(z){v(null);try{await me.setStage(t(),e.id,z),r(k=>k+1)}catch(k){v(k.message)}}function W(z){m(z),h(!0)}async function R(z){const k=p();k&&S(O=>[...O,{id:_6(O.length),sectionPath:k.sectionPath,quote:k.text,note:z}])}function P(z){S(k=>k.filter(O=>O.id!==z))}async function ne(z){await me.submitQuestionAnswers(t(),e.id,z),S([]),await B()}function Y(){L(l()),A(!0)}async function K(z){const k=t(),O=await me.appendItem(k,e.id,z);O.busy&&v(_("specDetail.appendSavedSpecBusy")),O.sessionId&&(i(!0),a(O.sessionId),Ro(O.sessionId))}async function ce(z){i(!0);try{const k=t(),{sessionId:O}=await me.explain(k,e.id,z.text);a(O),Ro(O)}catch(k){i(!1),v(k.message)}}return(()=>{var z=R6();return w(z,f(na,{get fallback(){return(()=>{var k=np();return w(k,()=>_("common.loading")),k})()},get children(){return f(G,{get when(){return u()},get fallback(){return(()=>{var k=np();return w(k,()=>_("specDetail.notFound")),k})()},children:k=>[(()=>{var O=N6(),Z=O.firstChild,re=Z.firstChild,F=Z.nextSibling,q=F.firstChild,le=F.nextSibling,ye=le.firstChild,ae=ye.firstChild,pe=ae.nextSibling,Ne=ye.nextSibling;return w(re,f(Yi,{get items(){return[{label:_("breadcrumb.specList"),href:Mt("")},{label:k().id}]}}),null),w(re,f(Ee,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0",get title(){return _("specDetail.copySpecPath")},get"aria-label"(){return _("specDetail.copySpecPath")},onClick:()=>void pb(e.id),get children(){return f(Rx,{class:"h-3.5 w-3.5"})}}),null),w(Z,f(Wi,{}),null),w(q,()=>k().frontmatter.summary||_("common.pendingAgent")),w(ae,()=>k().frontmatter.stage),pe.addEventListener("change",Pe=>N(Pe.currentTarget.value)),w(Ne,()=>Sh(k().frontmatter.updated_at)),w(le,f(Ee,{variant:"outline",size:"sm",class:"append-btn",ref(Pe){var Ke=j;typeof Ke=="function"?Ke(Pe):j=Pe},onClick:Y,get children(){return _("specDetail.appendTask")}}),null),w(le,f(G,{get when(){return c()?.exists},get children(){return f(Pn,{class:"inline-flex h-8 cursor-pointer items-center justify-center rounded-md px-3 font-medium hover:bg-accent hover:text-accent-foreground",get href(){return Mt(`specs/${k().id}/debug`)},get children(){return _("specDetail.debug")}})}}),null),w(le,f(Pn,{class:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground",get href(){return Mt(`specs/${k().id}/review`)},get title(){return _("git.title")},get children(){return f(Xc,{class:"h-4 w-4"})}}),null),w(le,f(G,{get when(){return o()},get children(){return f(mb,{variant:"secondary",get children(){return _("specDetail.running")}})}}),null),Le(Pe=>{var Ke=`inline-flex items-center rounded-md border px-2.5 py-0.5 font-mono text-sm font-semibold uppercase tracking-wider ${P6[k().frontmatter.stage]??"bg-muted text-muted-foreground border-border"}`,et=_("specDetail.forceStage"),wt=_("specDetail.forceStage");return Ke!==Pe.e&&xt(ae,Pe.e=Ke),et!==Pe.t&&Ge(pe,"title",Pe.t=et),wt!==Pe.a&&Ge(pe,"aria-label",Pe.a=wt),Pe},{e:void 0,t:void 0,a:void 0}),Le(()=>pe.value=k().frontmatter.stage),O})(),f(G,{get when(){return b()},get children(){var O=M6();return w(O,b),O}}),(()=>{var O=L6(),Z=O.firstChild;return w(O,f(G,{get when(){return V()},get children(){return f(O6,{get questions(){return $()},get freeforms(){return E()},get running(){return o()},onRemoveFreeform:P,onSubmit:ne})}}),Z),Bn(x,Z),O})(),f(t6,{get snap(){return J(()=>!!g())()?null:l()},onAnnotate:W,onExplain:ce}),f(i6,{get open(){return g()},get projectId(){return t()},get snap(){return p()},onCancel:()=>h(!1),onSubmit:R}),f(f6,{get open(){return T()},get projectId(){return t()},get sectionPath(){return C()?.sectionPath},get quote(){return C()?.text},anchorEl:j,onCancel:()=>A(!1),onSubmit:K})]})}})),z})()},K6={M:"text-warning",A:"text-success",D:"text-destructive","??":"text-info",R:"text-primary"};function j6(e){return K6[e]??""}function H6(e,t,n){const r=new Set(n.map(i=>i.path)),o=new Set;for(const i of e)r.has(i)&&o.add(i);return{selected:o,active:t&&r.has(t)?t:null}}function q6(e){return`${e?.index??""}${e?.worktree??""}`}var G6=M('<svg><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m8 9l4-4l4 4m0 6l-4 4l-4-4"></svg>',!1,!0,!1),V6=M('<svg xmlns=http://www.w3.org/2000/svg class="h-4 w-4"viewBox="0 0 24 24"><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m5 12l5 5L20 7"></path><title>Checked');const W6=Vt,Y6=Vt.Value;Vt.Description;Vt.ErrorMessage;Vt.ItemDescription;Vt.HiddenSelect;Vt.Section;const Z6=e=>{const[t,n]=se(e,["class","children"]);return f(Vt.Trigger,H({get class(){return tt("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 shadow-sm ring-offset-background transition-shadow placeholder:text-muted-foreground focus:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class)}},n,{get children(){return[J(()=>t.children),f(Vt.Icon,{as:"svg",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"flex size-4 items-center justify-center opacity-50",get children(){return G6()}})]}}))},X6=e=>{const[t,n]=se(e,["class","children"]);return f(Vt.Portal,{get children(){return f(Vt.Content,H({get class(){return tt("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95",t.class)}},n,{get children(){return[J(()=>t.children),f(Vt.Listbox,{class:"p-1 focus-visible:outline-none"})]}}))}})},J6=e=>{const[t,n]=se(e,["class","children"]);return f(Vt.Item,H({get class(){return tt("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.class)}},n,{get children(){return[f(Vt.ItemIndicator,{class:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",get children(){return V6()}}),f(Vt.ItemLabel,{get children(){return t.children}})]}}))};var Qu,op;function Q6(){if(op)return Qu;op=1,Qu=l=>{if(!l)return[];if(typeof l!="string"||l.match(/^\s+$/))return[];const d=l.split(`
27
- `);if(d.length===0)return[];const g=[];let h=null,p=null,m=0,b=0,v=null;const y=z=>{p?.changes.push({type:"normal",normal:!0,ln1:m++,ln2:b++,content:z}),v.oldLines--,v.newLines--},x=z=>{const[k,O]=n(z)??[];h={chunks:[],deletions:0,additions:0,from:k,to:O},g.push(h)},E=()=>{(!h||h.chunks.length)&&x()},S=(z,k)=>{E(),h.new=!0,h.newMode=k[1],h.from="/dev/null"},T=(z,k)=>{E(),h.deleted=!0,h.oldMode=k[1],h.to="/dev/null"},A=(z,k)=>{E(),h.oldMode=k[1]},C=(z,k)=>{E(),h.newMode=k[1]},L=(z,k)=>{E(),h.index=z.split(" ").slice(1),k[1]&&(h.oldMode=h.newMode=k[1].trim())},j=z=>{E(),h.from=o(z)},$=z=>{E(),h.to=o(z)},V=z=>+(z||1),B=(z,k)=>{h||x(z);const[O,Z,re,F]=k.slice(1);m=+O,b=+re,p={content:z,changes:[],oldStart:+O,oldLines:V(Z),newStart:+re,newLines:V(F)},v={oldLines:V(Z),newLines:V(F)},h.chunks.push(p)},N=z=>{p&&(p.changes.push({type:"del",del:!0,ln:m++,content:z}),h.deletions++,v.oldLines--)},W=z=>{p&&(p.changes.push({type:"add",add:!0,ln:b++,content:z}),h.additions++,v.newLines--)},R=z=>{if(!p)return;const[k]=p.changes.slice(-1);p.changes.push({type:k.type,[k.type]:!0,ln1:k.ln1,ln2:k.ln2,ln:k.ln,content:z})},P=[[/^diff\s/,x],[/^new file mode (\d+)$/,S],[/^deleted file mode (\d+)$/,T],[/^old mode (\d+)$/,A],[/^new mode (\d+)$/,C],[/^index\s[\da-zA-Z]+\.\.[\da-zA-Z]+(\s(\d+))?$/,L],[/^---\s/,j],[/^\+\+\+\s/,$],[/^@@\s+-(\d+),?(\d+)?\s+\+(\d+),?(\d+)?\s@@/,B],[/^\$/,R]],ne=[[/^\$/,R],[/^-/,N],[/^\+/,W],[/^\s*/,y]],Y=z=>{for(const[k,O]of ne){const Z=z.match(k);if(Z){O(z,Z);break}}v.oldLines===0&&v.newLines===0&&(v=null)},K=z=>{for(const[k,O]of P){const Z=z.match(k);if(Z){O(z,Z);break}}},ce=z=>{v?Y(z):K(z)};for(const z of d)ce(z);return g};const e=/(a|i|w|c|o|1|2)\/.*(?=["']? ["']?(b|i|w|c|o|1|2)\/)|(b|i|w|c|o|1|2)\/.*$/g,t=/^(a|b|i|w|c|o|1|2)\//,n=l=>l?.match(e)?.map(d=>d.replace(t,"").replace(/("|')$/,"")),r=/^\\?['"]|\\?['"]$/g,o=l=>{let d=i(l,"-+").trim();return d=a(d),d.replace(r,"").replace(t,"")},i=(l,d)=>{l=c(l);const g=u(d);return l.replace(new RegExp(`^${g}+`),"")},s=/\t.*|\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d(.\d+)?\s(\+|-)\d\d\d\d/,a=l=>{const d=s.exec(l);return d&&(l=l.substring(0,d.index).trim()),l},u=l=>l instanceof RegExp?l.source:`[${c(l).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}]`,c=l=>`${l??""}`;return Qu}var eO=Q6();const tO=Ma(eO),nO={ts:"typescript",tsx:"typescript",mts:"typescript",cts:"typescript",js:"javascript",jsx:"javascript",mjs:"javascript",cjs:"javascript",json:"json",css:"css",scss:"scss",less:"less",html:"xml",vue:"xml",xml:"xml",svg:"xml",md:"markdown",markdown:"markdown",sh:"bash",bash:"bash",zsh:"bash",yml:"yaml",yaml:"yaml",toml:"ini",ini:"ini",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",kt:"kotlin",swift:"swift",c:"c",h:"c",cpp:"cpp",hpp:"cpp",cs:"csharp",php:"php",sql:"sql"};function rO(e){const t=e.split(".").pop()?.toLowerCase()??"",n=nO[t];return n&&Ys.getLanguage(n)?n:void 0}function oO(e,t){if(!(!t||!e))try{return Ys.highlight(e,{language:t,ignoreIllegals:!0}).value}catch{return}}function iO(e){return e?tO(e).map(t=>({chunks:t.chunks.map(n=>({header:n.content,rows:n.changes.map(sO)}))})):[]}function sO(e){const t=e.type==="add"?"":e.type==="del"?e.ln:e.ln1,n=e.type==="del"?"":e.type==="add"?e.ln:e.ln2;return{oldLn:t,newLn:n,marker:e.content.slice(0,1),code:e.content.slice(1),tone:e.type==="add"?"add":e.type==="del"?"del":"normal"}}var aO=M('<span class="shrink-0 text-sm text-warning">'),uO=M('<button type=button class="ml-auto inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md border-0 bg-transparent text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-[1.5px] focus-visible:ring-ring">'),cO=M('<div data-testid=git-diff-pane class="code-highlight flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden rounded-xl border bg-card"><div class="flex items-center gap-2 border-b px-2 py-1"><span class="min-w-0 flex-1 truncate font-mono text-sm"></span></div><div class="min-h-0 flex-1 overflow-auto">'),ec=M('<p class="p-3 text-muted-foreground">'),lO=M('<p class="p-3 text-destructive">'),dO=M('<div><div class="bg-muted px-2 py-0.5 font-mono text-sm text-muted-foreground">'),fO=M('<div><span class="w-12 shrink-0 select-none px-1 text-right text-muted-foreground"></span><span class="w-12 shrink-0 select-none px-1 text-right text-muted-foreground"></span><pre class="m-0 flex-1 whitespace-pre-wrap break-all px-2"><span>'),gO=M("<span>"),pO=M("<span class=hljs>");const hO=e=>{const t=ee(()=>iO(e.patch)),n=ee(()=>t().some(o=>o.chunks.length>0)),r=ee(()=>rO(e.path));return(()=>{var o=cO(),i=o.firstChild,s=i.firstChild,a=i.nextSibling;return w(s,()=>e.path),w(i,f(G,{get when(){return e.truncated},get children(){var u=aO();return w(u,()=>_("git.diffTruncated")),u}}),null),w(i,f(G,{get when(){return e.onClose},get children(){var u=uO();return u.$$click=()=>e.onClose?.(),w(u,f(Gr,{class:"h-4 w-4"})),Le(c=>{var l=_("common.close"),d=_("common.close");return l!==c.e&&Ge(u,"aria-label",c.e=l),d!==c.t&&Ge(u,"title",c.t=d),c},{e:void 0,t:void 0}),u}}),null),w(a,f(G,{get when(){return!e.loading},get fallback(){return(()=>{var u=ec();return w(u,()=>_("git.diffLoading")),u})()},get children(){return f(G,{get when(){return!e.error},get fallback(){return(()=>{var u=lO();return w(u,()=>e.error),u})()},get children(){return f(G,{get when(){return!e.binary},get fallback(){return(()=>{var u=ec();return w(u,()=>_("git.binaryFile")),u})()},get children(){return f(G,{get when(){return n()},get fallback(){return(()=>{var u=ec();return w(u,()=>_("git.diffEmpty")),u})()},get children(){return f(rt,{get each(){return t()},children:u=>f(rt,{get each(){return u.chunks},children:c=>(()=>{var l=dO(),d=l.firstChild;return w(d,()=>c.header),w(l,f(rt,{get each(){return c.rows},children:g=>{const h=g.tone==="add"?"bg-success/10":g.tone==="del"?"bg-destructive/10":"",p=g.tone==="add"?"text-success":g.tone==="del"?"text-destructive":"text-muted-foreground",m=oO(g.code,r());return(()=>{var b=fO(),v=b.firstChild,y=v.nextSibling,x=y.nextSibling,E=x.firstChild;return xt(b,`flex font-mono text-sm ${h}`),w(v,()=>g.oldLn),w(y,()=>g.newLn),xt(E,`select-none ${p}`),w(E,()=>g.marker),w(x,f(G,{when:m,get fallback(){return(()=>{var S=gO();return w(S,()=>g.code),S})()},children:S=>(()=>{var T=pO();return Le(()=>T.innerHTML=S()),T})()}),null),b})()}}),null),l})()})})}})}})}})}})),Le(()=>Ge(s,"title",e.path)),o})()};dn(["click"]);var mO=M('<span class="min-w-0 flex-1 truncate text-left font-mono">'),bO=M('<div class="border-b p-1">'),ip=M('<div class="px-2 py-2 text-sm text-muted-foreground">'),yO=M('<div class="border-b p-1 pr-9">'),vO=M('<div class="max-h-64 overflow-auto p-1">'),xO=M('<div class="flex min-h-0 flex-1 flex-col gap-1 overflow-auto rounded-xl border"><div class="sticky top-0 flex items-center gap-2 border-b bg-card px-2 py-1"><span class=" text-muted-foreground">'),wO=M('<p class=" text-muted-foreground">'),_O=M('<p class="text-destructive ">'),EO=M('<p class=" text-muted-foreground">(runId: <code></code>)'),SO=M('<div class="flex min-h-0 flex-1 gap-4"><section data-testid=review-controls-pane class="flex min-h-0 min-w-0 flex-1 flex-col gap-3"><div class="flex flex-wrap items-center gap-2"><span aria-hidden=true class="select-none text-border">|</span><span aria-hidden=true class="select-none text-border">|'),CO=M('<span class="truncate font-mono text-sm">'),kO=M('<div><button type=button class="min-w-0 flex-1 truncate border-0 bg-transparent p-0 text-left font-mono text-sm disabled:opacity-50">'),AO=M('<div><button type=button class="flex min-w-0 flex-1 cursor-pointer items-center gap-2 border-0 bg-transparent p-0 text-left"><span></span><span class="truncate font-mono text-sm">');const TO=new Set(["commit","discard"]),DO=typeof navigator<"u"&&/mac|iphone|ipad|ipod/i.test(navigator.platform||navigator.userAgent),IO=DO?"⌘ + Enter":"Ctrl + Enter",l1=e=>{const[t,n]=D([]),[r,o]=D("manual"),[i,s]=D(new Set),[a,u]=D(null),[c,l]=D(""),[d,g]=D(!1),[h,p]=D(null),[m,b]=D(""),[v,y]=D(""),[x,E]=D(null),[S,T]=D(!1),[A,C]=D(null),[L,j]=D(null),[$,V]=D(null),[B,N]=D(null),[W,R]=D(""),[P,ne]=D(null);function Y(ue){return R(ue),new Promise(ve=>ne(()=>ve))}function K(ue){const ve=P();ve&&(ne(null),ve(ue))}const ce=()=>e.specId?.(),z=ee(()=>!!ce());let k=null;oe(()=>k?.()),oe(()=>K(!1)),te(()=>{const ue=e.initialMessage?.()??"";ue&&!d()&&l(ue)});const[O,{refetch:Z,mutate:re}]=Wt(e.projectId,ue=>me.getGitBranches(ue)),F=ee(()=>{const ue=m().trim().toLowerCase(),ve=O()?.branches??[];return ue?ve.filter(Ae=>Ae.toLowerCase().includes(ue)):ve}),q=ee(()=>{const ue=O();return[...ue?.branches??[],...ue?.remoteBranches??[]]}),le=ee(()=>{const ue=v().trim().toLowerCase(),ve=q();return ue?ve.filter(Ae=>Ae.toLowerCase().includes(ue)):ve});function ye(ue){n(ue);const ve=H6(i(),a(),ue);s(ve.selected),u(ve.active)}te(()=>{const ue=e.projectId();if(!ue)return;let ve=!1,Ae=!1;me.getProjectChanges(ue).then(gn=>{ve||Ae||ye(gn.changes)}).catch(()=>{});const lt=l_(ue,gn=>{Ae=!0,ye(gn)});oe(()=>{ve=!0,lt()})});const[ae]=Wt(()=>{const ue=a(),ve=e.projectId();if(!ue||!ve)return null;const Ae=t().find(lt=>lt.path===ue);return{pid:ve,path:ue,revision:q6(Ae)}},ue=>me.getFileDiff(ue.pid,ue.path));function pe(ue){return B()===ue}const Ne=ee(()=>A()!==null||B()!==null||h()!==null),Pe=ee(()=>L()??(O.error?O.error.message:null));function Ke(ue,ve){k?.(),N(ue),k=sa(e.projectId(),ve,{onEvent:Ae=>{(Ae.type==="turn-completed"||Ae.type==="error")&&(N(null),k?.(),k=null)}})}function et(){return r()==="agent"?t().map(ue=>ue.path):[...i()]}async function wt(ue){if(Ne())return;j(null);const ve=et();if(ve.length===0){j(_("review.selectAtLeastOne"));return}if(!(ue==="discard"&&!await Y(_("review.confirmDiscard")))){p(ue);try{if(ue==="commit"){const lt=c().trim();if(!lt){j(_("review.enterCommitMsg"));return}await me.projectCommit(e.projectId(),{message:lt,paths:ve})}else await me.projectDiscard(e.projectId(),{paths:ve});s(new Set),u(null);const Ae=await me.getProjectChanges(e.projectId());ye(Ae.changes)}catch(Ae){j(Ae.message)}finally{p(null)}}}async function Bt(ue){const ve=ce();if(!(!ve||Ne())&&(j(null),!(ue==="discard"&&!await Y(_("review.confirmDiscardAll"))))){C(ue);try{const Ae=await me.gitOp(e.projectId(),ve,ue);V({kind:ue,runId:Ae.runId}),Ro(Ae.sessionId),Ke(ue,Ae.sessionId)}catch(Ae){j(Ae.message)}finally{C(null)}}}async function qn(ue){r()==="manual"?await wt(ue):await Bt(ue)}async function lr(ue){if(!Ne()){j(null),p(ue);try{if(ue==="push"){const ve=await me.projectPush(e.projectId());Ct.success(_("git.pushed",{branch:ve.branch}))}else{const ve=await me.projectPull(e.projectId());Ct.success(ve.updated?_("git.pulled",{branch:ve.branch}):_("git.upToDate"))}}catch(ve){j(ve.message)}finally{p(null)}}}async function It(ue){const ve=ue?.trim(),Ae=e.projectId();if(!(!ve||!Ae||Ne())&&ve!==O()?.current){j(null),p("checkout");try{const lt=await me.checkoutGitBranch(Ae,ve);re(xe=>({current:lt.current,branches:xe?.branches.includes(lt.current)?xe.branches:[...xe?.branches??[],lt.current].sort(),remoteBranches:xe?.remoteBranches??[]})),s(new Set),u(null),b("");const gn=await me.getProjectChanges(Ae);n(gn.changes),await Z()}catch(lt){j(lt.message)}finally{p(null)}}}async function Or(ue){const ve=e.projectId();if(!(!ue||!ve||Ne())){j(null),p("merge");try{const Ae=await me.mergeGitBranch(ve,ue);Ct.success(Ae.alreadyUpToDate?_("git.mergeUpToDate",{current:Ae.current,branch:Ae.merged}):_("git.merged",{current:Ae.current,branch:Ae.merged})),E(null),y("");const lt=await me.getProjectChanges(ve);n(lt.changes),await Z()}catch(Ae){j(Ae.message)}finally{p(null),T(!1)}}}function pt(ue){return h()===ue||TO.has(ue)&&(pe(ue)||A()===ue)}function on(ue){s(ve=>{const Ae=new Set(ve);return Ae.has(ue)?Ae.delete(ue):Ae.add(ue),Ae})}function fn(){t().every(ue=>i().has(ue.path))?s(new Set):s(new Set(t().map(ue=>ue.path)))}const Lt=ee(()=>t().length>0&&t().every(ue=>i().has(ue.path))),Nn=ee(()=>r()==="manual"&&i().size===0),dr=ee(()=>Ne()||r()==="manual"&&(Nn()||c().trim()===""));return(()=>{var ue=SO(),ve=ue.firstChild,Ae=ve.firstChild,lt=Ae.firstChild,gn=lt.nextSibling;return w(Ae,f(W6,{get options(){return F()},get value(){return O()?.current??null},onChange:xe=>void It(xe),optionValue:xe=>xe,optionTextValue:xe=>xe,get disabled(){return Ne()||O.loading||!!O.error},get placeholder(){return _("git.branchPlaceholder")},itemComponent:xe=>f(J6,{get item(){return xe.item},get children(){var Ye=CO();return w(Ye,()=>xe.item.rawValue),Ye}}),get children(){return[f(Z6,{class:"h-8 w-56 max-w-full gap-2 px-2 text-sm",get title(){return _("git.branchSelect")},get"aria-label"(){return _("git.branchSelect")},get children(){return[f(G,{get when(){return J(()=>!O.loading)()&&h()!=="checkout"},get fallback(){return f(kn,{class:"h-3.5 w-3.5 shrink-0 animate-spin"})},get children(){return f(Xc,{class:"h-3.5 w-3.5 shrink-0"})}}),(()=>{var xe=mO();return w(xe,f(Y6,{children:Ye=>Ye.selectedOption()??_("git.branchPlaceholder")})),xe})()]}}),f(X6,{class:"w-64",get children(){return[(()=>{var xe=bO();return w(xe,f(Er,{get value(){return m()},onInput:Ye=>b(Ye.currentTarget.value),onKeyDown:Ye=>Ye.stopPropagation(),get placeholder(){return _("git.branchFilterPlaceholder")},class:"h-8 text-sm"})),xe})(),f(G,{get when(){return J(()=>!O.loading)()&&F().length===0},get children(){var xe=ip();return w(xe,()=>_("git.noBranches")),xe}})]}})]}}),lt),w(Ae,f(Ee,{variant:"default",size:"sm",get disabled(){return dr()},onClick:()=>qn("commit"),get children(){return[f(G,{get when(){return pt("commit")},get children(){return f(kn,{class:"mr-1 h-3 w-3 animate-spin"})}}),J(()=>J(()=>!!pt("commit"))()?_("review.committing"):_("review.commit"))]}}),lt),w(Ae,f(Ee,{variant:"ghost",size:"sm",class:"text-destructive",get disabled(){return Ne()||Nn()},onClick:()=>qn("discard"),get children(){return[f(G,{get when(){return pt("discard")},get children(){return f(kn,{class:"mr-1 h-3 w-3 animate-spin"})}}),J(()=>J(()=>!!pt("discard"))()?_("review.discarding"):_("review.discard"))]}}),lt),w(Ae,f(Nl,{get open(){return S()},onOpenChange:xe=>{T(xe),xe||(y(""),E(null))},get children(){return[f(Rl,{as:Ee,variant:"ghost",size:"sm",get disabled(){return Ne()||O.loading||!!O.error},get title(){return _("git.mergeBranch")},get children(){return[f(G,{get when(){return!pt("merge")},get fallback(){return f(kn,{class:"mr-1 h-3 w-3 animate-spin"})},get children(){return f(mh,{class:"mr-1 h-3 w-3"})}}),J(()=>J(()=>!!pt("merge"))()?_("git.merging"):_("git.mergeBranch"))]}}),f(Ml,{class:"w-72 p-0",get children(){return[(()=>{var xe=yO();return w(xe,f(Er,{get value(){return v()},onInput:Ye=>y(Ye.currentTarget.value),get placeholder(){return _("git.mergeFilterPlaceholder")},class:"h-8 text-sm"})),xe})(),(()=>{var xe=vO();return w(xe,f(rt,{get each(){return le()},children:Ye=>(()=>{var Yt=kO(),_t=Yt.firstChild;return _t.$$click=()=>E(Ye),w(_t,Ye),w(Yt,f(G,{get when(){return x()===Ye},get children(){return f(Ee,{size:"sm",variant:"secondary",class:"h-6 shrink-0 px-2 text-xs",get disabled(){return Ne()},onClick:()=>void Or(Ye),get children(){return[f(G,{get when(){return pt("merge")},get children(){return f(kn,{class:"mr-1 h-3 w-3 animate-spin"})}}),J(()=>J(()=>!!pt("merge"))()?_("git.merging"):_("git.mergeAction"))]}})}}),null),Le(Tt=>{var Zt=`flex items-center gap-2 rounded-sm px-2 py-1 ${x()===Ye?"bg-accent":""}`,Ve=Ye===O()?.current,pn=Ye===O()?.current?_("git.mergeSelfHint"):Ye;return Zt!==Tt.e&&xt(Yt,Tt.e=Zt),Ve!==Tt.t&&(_t.disabled=Tt.t=Ve),pn!==Tt.a&&Ge(_t,"title",Tt.a=pn),Tt},{e:void 0,t:void 0,a:void 0}),Yt})()}),null),w(xe,f(G,{get when(){return J(()=>!O.loading)()&&le().length===0},get children(){var Ye=ip();return w(Ye,()=>_("git.noBranches")),Ye}}),null),xe})()]}})]}}),gn),w(Ae,f(Ee,{variant:"ghost",size:"sm",get disabled(){return Ne()},onClick:()=>void lr("push"),get children(){return[f(G,{get when(){return pt("push")},get children(){return f(kn,{class:"mr-1 h-3 w-3 animate-spin"})}}),J(()=>J(()=>!!pt("push"))()?_("git.pushing"):_("git.push"))]}}),null),w(Ae,f(Ee,{variant:"ghost",size:"sm",get disabled(){return Ne()},onClick:()=>void lr("pull"),get children(){return[f(G,{get when(){return pt("pull")},get children(){return f(kn,{class:"mr-1 h-3 w-3 animate-spin"})}}),J(()=>J(()=>!!pt("pull"))()?_("git.pulling"):_("git.pull"))]}}),null),w(ve,f(qs,{get placeholder(){return _("review.commitPlaceholder",{shortcut:IO})},get value(){return c()},onInput:xe=>{g(!0),l(xe.currentTarget.value)},onKeyDown:xe=>{xe.key!=="Enter"||!(xe.metaKey||xe.ctrlKey)||(xe.preventDefault(),!dr()&&qn("commit"))},get disabled(){return Ne()},minRows:1,maxRows:3}),null),w(ve,f(G,{get when(){return z()},get children(){return f(An,{class:"flex gap-4",get value(){return r()},onChange:xe=>o(xe),get disabled(){return Ne()},get children(){return[f(en,{value:"manual",class:"flex items-center gap-1.5",get children(){return[f(Jt,{}),f(un,{}),f(Qt,{class:"cursor-pointer",get children(){return _("review.manualSelect")}})]}}),f(en,{value:"agent",class:"flex items-center gap-1.5",get children(){return[f(Jt,{}),f(un,{}),f(Qt,{class:"cursor-pointer",get children(){return _("review.agentSelect")}})]}})]}})}}),null),w(ve,f(G,{get when(){return J(()=>r()==="manual")()&&t().length>0},get children(){var xe=xO(),Ye=xe.firstChild,Yt=Ye.firstChild;return w(Ye,f(Ee,{variant:"ghost",size:"sm",onClick:fn,get disabled(){return Ne()},get children(){return J(()=>!!Lt())()?_("review.deselectAll"):_("review.selectAll")}}),Yt),w(Yt,()=>_("review.fileCount",{selected:i().size,total:t().length})),w(xe,f(rt,{get each(){return t()},children:_t=>(()=>{var Tt=AO(),Zt=Tt.firstChild,Ve=Zt.firstChild,pn=Ve.nextSibling;return w(Tt,f(ki,{get checked(){return i().has(_t.path)},onChange:()=>on(_t.path),get disabled(){return Ne()},get children(){return f(Ai,{})}}),Zt),Zt.$$click=()=>u(_t.path),w(Ve,()=>_t.status),w(pn,()=>_t.path),Le(Pt=>{var sn=`flex items-center gap-2 px-2 py-0.5 ${a()===_t.path?"bg-accent":""}`,I=_t.path,Q=`inline-block w-6 text-center text-sm font-bold ${j6(_t.status)}`;return sn!==Pt.e&&xt(Tt,Pt.e=sn),I!==Pt.t&&Ge(Zt,"title",Pt.t=I),Q!==Pt.a&&xt(Ve,Pt.a=Q),Pt},{e:void 0,t:void 0,a:void 0}),Tt})()}),null),xe}}),null),w(ve,f(G,{get when(){return J(()=>r()==="manual")()&&t().length===0},get children(){var xe=wO();return w(xe,()=>_("review.noChanges")),xe}}),null),w(ve,f(G,{get when(){return Pe()},get children(){var xe=_O();return w(xe,Pe),xe}}),null),w(ve,f(G,{get when(){return $()},get children(){var xe=EO(),Ye=xe.firstChild,Yt=Ye.nextSibling;return w(xe,()=>_("review.dispatched"),Ye),w(xe,(()=>{var _t=J(()=>$().kind==="commit");return()=>_t()?_("review.commit"):_("review.discard")})(),Ye),w(Yt,()=>$().runId.slice(0,8)),xe}}),null),w(ue,f(G,{get when(){return a()},children:xe=>f(hO,{get path(){return xe()},get patch(){return ae()?.patch??""},get binary(){return ae()?.binary??!1},get truncated(){return ae()?.truncated??!1},get loading(){return ae.loading},get error(){return J(()=>!!ae.error)()?ae.error.message:null},onClose:()=>u(null)})}),null),w(ue,f(cn,{get open(){return P()!==null},onOpenChange:xe=>{xe||K(!1)},get children(){return f(Sr,{class:"max-w-sm",get children(){return[f(kr,{get children(){return[f(Cr,{get children(){return _("review.discardTitle")}}),f(Aa,{get children(){return W()}})]}}),f(Hr,{get children(){return[f(Ee,{variant:"outline",onClick:()=>K(!1),get children(){return _("common.cancel")}}),f(Ee,{variant:"destructive",onClick:()=>K(!0),get children(){return _("review.confirmDiscardAction")}})]}})]}})}}),null),ue})()};dn(["click"]);var OO=M('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),RO=M('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),NO=M("<p class=text-muted-foreground>");const MO=()=>{const e=Li(),t=po(),[n]=Wt(()=>[t(),e.id],([o,i])=>me.getSpec(o,i));$i();const r=ee(()=>g_(e.id,n()?.frontmatter.summary));return(()=>{var o=RO();return w(o,f(na,{get fallback(){return(()=>{var i=NO();return w(i,()=>_("common.loading")),i})()},get children(){return[(()=>{var i=OO(),s=i.firstChild,a=s.firstChild,u=s.nextSibling;return w(s,f(Yi,{get items(){return[{label:_("breadcrumb.specList"),href:Mt("")},{label:e.id,href:Mt(`specs/${e.id}`)},{label:_("git.title")}]}}),a),w(a,()=>n()?.frontmatter.summary||_("common.pendingAgent")),w(u,f(Wi,{})),i})(),f(l1,{projectId:t,specId:()=>e.id,initialMessage:r})]}})),o})()};var LO=M('<header class="flex items-start justify-between gap-2"><div class="flex flex-col gap-1"><p class=" text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-2 text-muted-foreground">'),sp=M("<p class=text-muted-foreground>"),PO=M('<section class="flex min-h-0 min-w-0 flex-1 flex-col gap-2">'),$O=M('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2">'),FO=M('<article class="markdown review-md flex-1 overflow-auto rounded-xl border bg-card p-4 shadow">'),BO=M('<div class="flex flex-1 items-center justify-center text-muted-foreground">');const zO=()=>{const e=Li(),t=po();$i();const[n]=Wt(()=>[t(),e.id],([a,u])=>me.getSpec(a,u)),[r]=Wt(()=>[t(),e.id],([a,u])=>me.getDebug(a,u)),o=ee(()=>{const a=bI(r()?.text??"");return a.trim()?Hl(a,{specId:e.id,projectId:t()}):""}),[i,s]=D(null);return te(()=>{const a=i(),u=o();if(!a)return;a.innerHTML=u;let c=!0,l;a1(a).then(d=>{if(!c){d();return}l=d}),oe(()=>{c=!1,l?.()})}),(()=>{var a=$O();return w(a,f(na,{get fallback(){return(()=>{var u=sp();return w(u,()=>_("common.loading")),u})()},get children(){return[(()=>{var u=LO(),c=u.firstChild,l=c.firstChild,d=c.nextSibling;return w(c,f(Yi,{get items(){return[{label:_("breadcrumb.specList"),href:Mt("")},{label:e.id,href:Mt(`specs/${e.id}`)},{label:_("specDetail.debug")}]}}),l),w(l,()=>n()?.frontmatter.summary||_("common.pendingAgent")),w(d,f(Wi,{})),u})(),(()=>{var u=PO();return w(u,f(G,{get when(){return r.loading},get fallback(){return f(G,{get when(){return o()},get fallback(){return(()=>{var c=BO();return w(c,()=>_("specDebug.empty")),c})()},get children(){var c=FO();return Bn(s,c),c}})},get children(){var c=sp();return w(c,()=>_("common.loading")),c}})),u})()]}})),a})()};var UO=M('<section class="flex min-h-0 flex-1 flex-col gap-2 p-2"><header class="flex items-start justify-between gap-2"><div class="flex shrink-0 items-center gap-2 text-muted-foreground">');const KO=()=>{const e=po();return $i(),(()=>{var t=UO(),n=t.firstChild,r=n.firstChild;return w(n,f(Yi,{get items(){return[{label:_("breadcrumb.specList"),href:Mt("")},{label:_("git.title")}]}}),r),w(r,f(Wi,{})),w(t,f(l1,{projectId:e}),null),t})()};function ap(){return{text:"",nextOffset:0,truncated:!1}}function jO(e){return{text:e.text,nextOffset:e.offset+$c(e.text),truncated:e.truncated}}function HO(e,t){return t.offset===e.nextOffset?{state:{text:e.text+t.chunk,nextOffset:e.nextOffset+$c(t.chunk),truncated:e.truncated},needsRefetch:!1}:t.offset+$c(t.chunk)<=e.nextOffset?{state:e,needsRefetch:!1}:{state:e,needsRefetch:!0}}function up(e,t){return e.text.length<=t?e:{text:e.text.slice(e.text.length-t),nextOffset:e.nextOffset,truncated:!0}}function $c(e){return typeof TextEncoder<"u"?new TextEncoder().encode(e).length:e.length}const qO=80,cp=4e5;function GO(e){const[t,{mutate:n}]=Wt(()=>[e.projectId(),e.runId()],async([y,x])=>y&&x?me.getCommandRun(y,x):null),[r,o]=D(ap()),[i,s]=D(null),[a,u]=D(!1),[c,l]=D(Date.now());let d=null,g=null,h=!1;const p=setInterval(()=>l(Date.now()),1e3);oe(()=>clearInterval(p)),oe(()=>{g!==null&&window.clearTimeout(g)});function m(y){d=up(y,cp),g===null&&(g=window.setTimeout(()=>{g=null,d&&(o(d),d=null,e.onFlush?.())},qO))}async function b(){const y=e.projectId(),x=e.runId();if(!(!y||!x||h)){h=!0;try{const E=await me.readCommandOutput(y,x),S=up(jO(E),cp);d=null,o(S),s(null),e.onReset?.()}catch(E){s(E.message)}finally{h=!1}}}te(()=>{const y=e.projectId(),x=e.runId();if(!y||!x)return;o(ap()),b();const E=c_(y,x,{onOutput:S=>{const T=d??r(),A=HO(T,S);A.needsRefetch?b():m(A.state)},onRun:S=>n(S),onError:S=>s(S)});oe(E)});async function v(){const y=e.projectId(),x=t();if(!y||!x)return{ok:!1};u(!0);try{const E=await me.stopCommandRun(y,x.runId);return n(E.run),{ok:!0}}catch(E){return{ok:!1,error:E.message}}finally{u(!1)}}return{run:t,text:()=>r().text,truncated:()=>r().truncated,loadError:i,stopping:a,now:c,reload:b,stop:v}}var VO=M('<section class="flex h-full min-h-0 flex-col overflow-hidden p-2"><header class="flex items-center gap-3"><h1 class="m-0 text-xl">'),WO=M("<p class=text-muted-foreground>"),YO=M('<span class="text-xs text-muted-foreground">: '),ZO=M('<div class="mt-2 flex flex-wrap items-center gap-3 rounded-lg border bg-card px-3 py-2"><span class=font-medium></span><code class="font-mono text-xs text-muted-foreground"></code><span class="text-xs text-muted-foreground">: </span><code class="ml-auto font-mono text-xs text-muted-foreground">: '),XO=M('<p class="m-0 mt-2 text-xs text-muted-foreground">'),JO=M('<p class="m-0 mt-2 text-xs text-destructive">'),QO=M('<pre class="mt-2 min-h-0 flex-1 overflow-auto rounded-lg border bg-background p-3 font-mono text-[12px] leading-snug">');const eR=96,tR=()=>{const e=Li(),t=po();let n,r=!0;const o=GO({projectId:()=>t()||void 0,runId:()=>e.runId,onFlush:()=>{r&&n&&(n.scrollTop=n.scrollHeight)},onReset:()=>{n&&(n.scrollTop=n.scrollHeight)}}),{run:i,loadError:s,stopping:a,now:u}=o;function c(){n&&(r=n.scrollHeight-n.scrollTop-n.clientHeight<=eR)}async function l(){const d=await o.stop();d.ok?Ct.success(_("commands.stopped")):d.error&&Ct.error(d.error)}return(()=>{var d=VO(),g=d.firstChild,h=g.firstChild;return w(g,f(Ee,{as:Pn,get href(){return Mt("")},variant:"ghost",size:"sm",get children(){return[f(ax,{class:"mr-1 h-4 w-4"}),J(()=>_("commands.back"))]}}),h),w(h,()=>_("commands.detailTitle")),w(d,f(G,{get when(){return i()},get fallback(){return(()=>{var p=WO();return w(p,()=>s()??_("common.loading")),p})()},children:p=>[(()=>{var m=ZO(),b=m.firstChild,v=b.nextSibling,y=v.nextSibling,x=y.firstChild,E=y.nextSibling,S=E.firstChild;return w(m,f(G,{get when(){return p().status==="running"},get children(){return f(Ee,{variant:"destructive",size:"sm",get disabled(){return a()},onClick:()=>void l(),get children(){return[f(yh,{class:"mr-1 h-3.5 w-3.5"}),J(()=>J(()=>!!a())()?_("commands.stopping"):_("commands.stop"))]}})}}),b),w(m,f(yb,{get status(){return p().status}}),b),w(b,()=>p().name),w(v,()=>p().cli),w(y,()=>_("commands.duration"),x),w(y,()=>vb(p().startedAt,p().endedAt,u()),null),w(m,f(G,{get when(){return p().status!=="running"},get children(){var T=YO(),A=T.firstChild;return w(T,()=>_("commands.exitCode"),A),w(T,()=>p().exitCode??p().signal??"—",null),T}}),E),w(E,()=>_("commands.logFile"),S),w(E,()=>p().logFile,null),m})(),f(G,{get when(){return o.truncated()},get children(){var m=XO();return w(m,()=>_("commands.outputTruncated")),m}}),f(G,{get when(){return s()},get children(){var m=JO();return w(m,s),m}}),(()=>{var m=QO();m.addEventListener("scroll",c);var b=n;return typeof b=="function"?Bn(b,m):n=m,w(m,()=>o.text()||_("commands.outputEmpty")),m})()]}),null),d})()};var nR=M('<section class=p-8><header class=mb-4><h1 class="text-2xl font-bold"></h1></header><p class=text-muted-foreground></p><p class="mt-4 text-muted-foreground"><code class="ml-1 rounded bg-muted px-1.5 py-0.5 font-mono text-sm">yorz add &lt;path&gt;');const d1=()=>(()=>{var e=nR(),t=e.firstChild,n=t.firstChild,r=t.nextSibling,o=r.nextSibling,i=o.firstChild;return w(n,()=>_("welcome.title")),w(r,()=>_("welcome.description")),w(o,()=>_("welcome.addHint"),i),e})();var rR=M('<p class="p-8 text-muted-foreground">');const oR=()=>{const[e]=Wt(()=>me.listProjects());return f(G,{get when(){return!e.loading},get fallback(){return(()=>{var t=rR();return w(t,()=>_("common.loading")),t})()},get children(){return f(G,{get when(){return(e()??[]).length>0},get fallback(){return f(d1,{})},get children(){return(()=>{const n=(e()??[])[0];return n?f(Yy,{get href(){return`/${encodeURIComponent(n.id)}`}}):null})()}})}})},lp="data-vt";function iR(){return typeof document<"u"&&typeof document.startViewTransition=="function"}function sR(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function dp(e){return e.split("/").filter(Boolean).length}function aR(e,t){const n=dp(e),r=dp(t);return r>n?"forward":r<n?"back":"lateral"}function f1(e){const t=typeof window>"u"?"http://localhost":window.location.origin;try{return new URL(e,t).pathname}catch{return e}}function fp(e,t=600){return e()?Promise.resolve():new Promise(n=>{let r=!1,o;const i=setTimeout(s,t);function s(){r||(r=!0,clearTimeout(i),o?.(),n())}Tn(a=>{o=a,te(()=>{e()&&s()})})})}let _s=null;function uR(e,t){const n=document.documentElement;_s?.skipTransition(),n.setAttribute(lp,e);const r=document.startViewTransition(async()=>{await t()});_s=r,r.finished.catch(()=>{}).finally(()=>{_s===r&&(_s=null,n.removeAttribute(lp))})}function cR(e,t){return e.defaultPrevented||e.enabled===!1||e.replace||typeof e.to=="string"&&f1(e.to)===e.fromPathname?null:t(e.fromPathname,e.to)}function lR(e){const t=qo(),n=Iy();Oy(r=>{const o=t.pathname,i=cR({fromPathname:o,to:r.to,replace:r.options?.replace,defaultPrevented:r.defaultPrevented,enabled:iR()&&!sR()},e.resolveDirection);if(!i)return;const s=typeof r.to=="number";r.preventDefault(),uR(i,async()=>{r.retry(!0),s&&await fp(()=>t.pathname!==o),await fp(()=>!n())})})}var dR=M('<form class="flex flex-col gap-4"><label class="flex flex-col gap-1 font-medium"><span></span><span class="text-sm text-muted-foreground">'),fR=M('<p class=" text-muted-foreground">'),gR=M('<p class=" text-destructive">');const ti=".yorz/specs",pR=e=>{const[t,n]=D("inherit"),[r,o]=D(ti),[i,s]=D(ti),[a,u]=D(!1),[c,l]=D(!1),[d,g]=D(null);te(()=>{e.open&&(g(null),u(!0),(async()=>{try{const v=await me.getProjectConfig(e.projectId);h(v)}catch(v){g(v.message)}finally{u(!1)}})())});function h(v){n(v.agent.kind);const y=v.specsDir||ti;o(y),s(y)}function p(){return{kind:t()}}function m(v){return _(v==="inherit"?"projectConfig.inheritGlobal":v==="codex"?"projectConfig.agentCodex":v==="opencode"?"projectConfig.agentOpencode":"projectConfig.agentClaude")}async function b(v){v.preventDefault(),g(null);const y=p(),x=r().trim()||ti;if(x.split(/[\\/]/).some(E=>E==="..")){g(_("projectConfig.invalidPath"));return}l(!0);try{await me.updateProjectConfig(e.projectId,{agent:y,specsDir:x});let E=_("projectConfig.saved");x!==i()&&(E+=_("projectConfig.oldSpecsHint")),e.onSaved?.(E),e.onClose()}catch(E){g(E.message)}finally{l(!1)}}return f(cn,{get open(){return e.open},onOpenChange:v=>!v&&e.onClose(),get children(){return f(Sr,{class:"max-w-[480px]",get children(){return[f(kr,{get children(){return f(Cr,{get children(){return[J(()=>_("projectConfig.title"))," · ",J(()=>e.projectName)]}})}}),f(G,{get when(){return!a()},get fallback(){return(()=>{var v=fR();return w(v,()=>_("common.loading")),v})()},get children(){var v=dR(),y=v.firstChild,x=y.firstChild,E=x.nextSibling;return v.addEventListener("submit",b),w(v,f(An,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return t()},onChange:S=>n(S),get disabled(){return c()},get children(){return[f(Ti,{class:"mb-1.5 w-full font-medium",get children(){return _("projectConfig.agent")}}),J(()=>["inherit","claude","opencode","codex"].map(S=>f(en,{value:S,class:"flex items-center gap-1.5",get children(){return[f(Jt,{}),f(un,{}),f(Qt,{class:"cursor-pointer",get children(){return m(S)}})]}})))]}}),y),w(x,()=>_("projectConfig.specsDir")),w(y,f(Er,{type:"text",get value(){return r()},onInput:S=>o(S.currentTarget.value),placeholder:ti,get disabled(){return c()}}),E),w(E,()=>_("projectConfig.specsDirHint")),w(v,(()=>{var S=J(()=>!!d());return()=>S()&&(()=>{var T=gR();return w(T,d),T})()})(),null),w(v,f(Hr,{get children(){return[f(Ee,{type:"button",variant:"outline",get onClick(){return e.onClose},get disabled(){return c()},get children(){return _("common.cancel")}}),f(Ee,{type:"submit",get disabled(){return c()},get children(){return J(()=>!!c())()?_("common.saving"):_("projectConfig.save")}})]}}),null),v}})]}})}})};function gp(e){if(!e.worktree)return e.name;const t=e.worktree.mainPath.split("/").filter(Boolean).pop()??e.worktree.mainPath,n=e.worktree.cleanSlug??e.worktree.branch.replace(/^wt\//,"");return`${t} · ${n}`}var hR=M('<span class=" font-semibold tracking-wide">'),mR=M('<div class="flex items-center gap-1">'),bR=M('<ul class="m-0 flex-1 list-none overflow-y-auto py-1.5">'),yR=M('<p class="m-0 text-sm leading-relaxed text-muted-foreground break-words"><code class="mt-0.5 inline-block rounded bg-muted px-1 py-0.5 font-mono text-[0.85em] break-all">'),vR=M('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),xR=M("<aside data-testid=projects-sidebar><div data-testid=projects-sidebar-panel><header></header><footer>"),wR=M('<p class="px-2.5 py-2 text-muted-foreground">'),_R=M('<span class="block truncate">'),ER=M('<button type=button class="absolute right-6 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-accent-foreground group-hover:opacity-100">'),SR=M('<button type=button class="absolute right-1.5 top-1/2 -translate-y-1/2 p-1 text-muted-foreground opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100">'),CR=M('<li class="group relative flex items-center">'),kR=M('<span class="inline-block font-semibold">'),AR=M('<span class="flex h-5 w-5 items-center justify-center rounded bg-muted text-muted-foreground">'),TR=M('<p class="mt-1 text-sm text-destructive break-words">'),DR=M('<p class="break-all font-semibold">');const g1="yorz.projectsSidebar.collapsed",p1="yorz.projectsSidebar.width",IR=300,ql=220,OR=.2,RR=160,NR=640;function MR(){try{return typeof window<"u"&&window.localStorage.getItem(g1)==="1"}catch{return!1}}function pp(e){try{typeof window<"u"&&window.localStorage.setItem(g1,e?"1":"0")}catch{}}function La(e){return Number.isFinite(e)?Math.min(NR,Math.max(RR,Math.round(e))):ql}function tc(){return typeof window>"u"?ql:La(window.innerWidth*OR)}function LR(){try{if(typeof window>"u")return ql;const e=window.localStorage.getItem(p1);if(!e)return tc();const t=Number(e);return Number.isFinite(t)?La(t):tc()}catch{return tc()}}function PR(e){try{typeof window<"u"&&window.localStorage.setItem(p1,String(La(e)))}catch{}}const $R=()=>{const[e,t]=D(MR()),[n,r]=D(LR()),[o,{refetch:i}]=Wt(()=>me.listProjects()),[s,a]=D(null),[u,c]=D(null),[l,d]=D(null),[g,h]=D(!1),[p,m]=D(!1),b=go(),v=qo(),y=ee(()=>{const F=v.pathname.match(/^\/([^/]+)/);return F&&F[1]!=="api"?F[1]:""}),x=()=>e()||wr(),[E,S]=D(!1);let T=null;function A(){T!=null&&(window.clearTimeout(T),T=null)}const C=()=>u()!==null||l()!==null,L=()=>x()&&(E()||C()),j=()=>x()&&!L();function $(){!x()||E()||(A(),T=window.setTimeout(()=>{T=null,x()&&S(!0)},IR))}function V(){A(),S(!1)}function B(){A()}oe(A);function N(){A(),S(!1),wr()&&zs(),t(!1),pp(!1)}function W(){if(wr()){zs();return}const F=!e();t(F),pp(F)}let R=null,P=null,ne=null;Dn(()=>{const F=Eh(()=>{i()});oe(F)});let Y=0;te(()=>{const F=Jw();if(F===0||F===Y)return;if(ut(u)){Y=F,c(null);return}const q=ut(y),le=(o()??[]).find(ye=>ye.id===q);le&&(Y=F,c(le))});function K(F){x()||(F.preventDefault(),R={startX:F.clientX,startW:n(),raf:null},document.body.classList.add("is-resizing"),P=q=>{if(!R)return;const le=q.clientX-R.startX,ye=La(R.startW+le);R.raf==null&&(R.raf=requestAnimationFrame(()=>{R&&(R.raf=null,r(ye))}))},ne=()=>{R?.raf!=null&&cancelAnimationFrame(R.raf),R=null,document.body.classList.remove("is-resizing"),P&&document.removeEventListener("mousemove",P),ne&&document.removeEventListener("mouseup",ne),P=null,ne=null,PR(n())},document.addEventListener("mousemove",P),document.addEventListener("mouseup",ne))}oe(()=>{P&&document.removeEventListener("mousemove",P),ne&&document.removeEventListener("mouseup",ne),document.body.classList.remove("is-resizing")});function ce(F,q){q.preventDefault(),q.stopPropagation(),c(F)}function z(F,q="success"){q==="error"?Ct.error(F):Ct.success(F)}function k(F,q){q.preventDefault(),q.stopPropagation(),h(!1),d(F)}async function O(){const F=l();if(F){m(!0);try{g()&&F.worktree?await me.removeProjectWithFiles(F.id):await me.removeProject(F.id),await i(),y()===F.id&&b("/"),d(null)}catch(q){const le=q.message;le.includes("409")?(Ct.error(_("sidebar.uncommittedChanges")),d(null)):(a(le),Ct.error(le))}finally{m(!1)}}}const Z=()=>x()?void 0:{width:`${n()}px`},re=()=>j()?void 0:{width:`${n()}px`};return(()=>{var F=xR(),q=F.firstChild,le=q.firstChild,ye=le.nextSibling;return F.addEventListener("mouseleave",V),F.addEventListener("mouseenter",$),w(le,f(G,{get when(){return!j()},get fallback(){return f(Ee,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:W,onMouseEnter:B,onMouseLeave:$,get title(){return _("sidebar.expand")},get children(){return f(yc,{class:"h-4 w-4"})}})},get children(){return[(()=>{var ae=hR();return w(ae,()=>_("sidebar.title")),ae})(),(()=>{var ae=mR();return w(ae,f(Ee,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",get onClick(){return L()?N:W},get title(){return J(()=>!!L())()?_("sidebar.pin"):_("sidebar.collapse")},get children(){return f(G,{get when(){return L()},get fallback(){return f(hh,{class:"h-4 w-4"})},get children(){return f(yc,{class:"h-4 w-4"})}})}})),ae})()]}})),w(q,f(G,{get when(){return o()!==void 0},get fallback(){return(()=>{var ae=wR();return w(ae,()=>_("common.loading")),ae})()},get children(){var ae=bR();return w(ae,f(rt,{get each(){return o()??[]},children:pe=>{const Ne=()=>y()===pe.id;return(()=>{var Pe=CR();return w(Pe,f(Pn,{get href(){return`/${encodeURIComponent(pe.id)}`},get class(){return`flex-1 truncate px-2.5 py-1.5 no-underline ${Ne()?"bg-primary-soft text-foreground font-semibold":"hover:bg-accent"} ${j()?"px-0 text-center":""}`},get title(){return J(()=>!!pe.worktree)()?`${pe.path}
28
- worktree of ${pe.worktree.mainPath}`:pe.path},get children(){return f(G,{get when(){return!j()},get fallback(){return(()=>{var Ke=kR();return w(Ke,()=>(pe.name[0]??"?").toUpperCase()),Ke})()},get children(){var Ke=_R();return w(Ke,()=>gp(pe)),Ke}})}}),null),w(Pe,f(G,{get when(){return!j()},get children(){return[(()=>{var Ke=ER();return Ke.$$click=et=>ce(pe,et),w(Ke,f(bh,{class:"h-3.5 w-3.5"})),Le(et=>{var wt=_("sidebar.configure",{name:pe.name}),Bt=_("sidebar.projectConfig");return wt!==et.e&&Ge(Ke,"aria-label",et.e=wt),Bt!==et.t&&Ge(Ke,"title",et.t=Bt),et},{e:void 0,t:void 0}),Ke})(),(()=>{var Ke=SR();return Ke.$$click=et=>void k(pe,et),w(Ke,f(Gr,{class:"h-3.5 w-3.5"})),Le(et=>{var wt=_("sidebar.removeProject",{name:pe.name}),Bt=_("sidebar.deleteProject");return wt!==et.e&&Ge(Ke,"aria-label",et.e=wt),Bt!==et.t&&Ge(Ke,"title",et.t=Bt),et},{e:void 0,t:void 0}),Ke})()]}}),null),Pe})()}})),ae}}),ye),w(ye,f(G,{get when(){return!j()},get fallback(){return(()=>{var ae=AR();return w(ae,f(Dx,{class:"h-3.5 w-3.5"})),Le(()=>Ge(ae,"title",`${_("sidebar.addHint")}${_("sidebar.addCmd")}`)),ae})()},get children(){var ae=yR(),pe=ae.firstChild;return w(ae,()=>_("sidebar.addHint"),pe),w(pe,()=>_("sidebar.addCmd")),ae}}),null),w(ye,(()=>{var ae=J(()=>!!s());return()=>ae()&&(()=>{var pe=TR();return w(pe,s),Le(()=>Ge(pe,"title",s())),pe})()})(),null),w(q,f(G,{get when(){return!x()},get children(){var ae=vR();return ae.$$mousedown=K,Le(()=>Ge(ae,"aria-label",_("sidebar.resizeHint"))),ae}}),null),w(F,f(G,{get when(){return u()},children:ae=>f(pR,{open:!0,get projectId(){return ae().id},get projectName(){return ae().name},onClose:()=>c(null),onSaved:pe=>z(pe)})}),null),w(F,f(cn,{get open(){return l()!==null},onOpenChange:ae=>!ae&&!p()&&d(null),get children(){return f(Sr,{class:"max-w-sm",get children(){return[f(kr,{get children(){return[f(Cr,{get children(){return _("sidebar.deleteProject")}}),f(Aa,{get children(){return _("sidebar.deleteDesc")}})]}}),f(G,{get when(){return l()},children:ae=>[(()=>{var pe=DR();return w(pe,()=>gp(ae())),pe})(),f(G,{get when(){return ae().worktree},get children(){return f(ki,{get checked(){return g()},onChange:pe=>h(pe),class:"flex items-center gap-2 text-destructive",get children(){return[f(Ai,{}),f(Gs,{get children(){return _("sidebar.deleteFiles")}})]}})}})]}),f(Hr,{get children(){return[f(Ee,{variant:"outline",onClick:()=>d(null),get disabled(){return p()},get children(){return _("common.cancel")}}),f(Ee,{variant:"destructive",onClick:()=>void O(),get disabled(){return p()},get children(){return J(()=>!!p())()?_("common.deleting"):_("common.confirmDelete")}})]}})]}})}}),null),Le(ae=>{var pe=`relative shrink-0 ${x()?"w-9 transition-[width] duration-150":""}`,Ne=Z(),Pe=L()?"1":void 0,Ke=`flex flex-col border-r bg-background ${L()?"absolute left-0 top-0 z-40 h-full shadow-xl animate-in fade-in-0 slide-in-from-left-2 duration-150":"h-full w-full"}`,et=re(),wt=`flex items-center border-b ${j()?"justify-center py-2":"justify-between px-2.5 py-2"}`,Bt=`border-t ${j()?"flex justify-center py-2":"p-2"}`;return pe!==ae.e&&xt(F,ae.e=pe),ae.t=Bo(F,Ne,ae.t),Pe!==ae.a&&Ge(q,"data-peek",ae.a=Pe),Ke!==ae.o&&xt(q,ae.o=Ke),ae.i=Bo(q,et,ae.i),wt!==ae.n&&xt(le,ae.n=wt),Bt!==ae.s&&xt(ye,ae.s=Bt),ae},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),F})()};dn(["mousedown","click"]);var FR=["second","minute","hour","day","week","month","year"];function BR(e,t){if(t===0)return["just now","right now"];var n=FR[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]}var zR=["秒","分钟","小时","天","周","个月","年"];function UR(e,t){if(t===0)return["刚刚","片刻后"];var n=zR[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}var Fc={},Pa=function(e,t){Fc[e]=t},KR=function(e){return Fc[e]||Fc.en_US},nc=[60,60,24,7,365/7/12,12];function jR(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function HR(e,t){var n=e<0?1:0;e=Math.abs(e);for(var r=e,o=0;e>=nc[o]&&o<nc.length;o++)e/=nc[o];return e=Math.floor(e),o*=2,e>(o===0?9:1)&&(o+=1),t(e,o,r)[n].replace("%s",e.toString())}function qR(e,t){var n=new Date;return(+n-+jR(e))/1e3}var GR=function(e,t,n){var r=qR(e);return HR(r,KR(t))};Pa("en_US",BR);Pa("zh_CN",UR);var Es={},hp;function VR(){if(hp)return Es;hp=1,Object.defineProperty(Es,"__esModule",{value:!0});var e=["秒","分钟","小时","天","周","个月","年"];function t(n,r){if(r===0)return["刚刚","片刻后"];var o=e[~~(r/2)];return[n+" "+o+"前",n+" "+o+"后"]}return Es.default=t,Es}var WR=VR();const YR=Ma(WR),mp=[["just now","right now"],["%ss ago","in %ss"],["1m ago","in 1m"],["%sm ago","in %sm"],["1h ago","in 1h"],["%sh ago","in %sh"],["1d ago","in 1d"],["%sd ago","in %sd"],["1w ago","in 1w"],["%sw ago","in %sw"],["1mo ago","in 1mo"],["%smo ago","in %smo"],["1y ago","in 1y"],["%sy ago","in %sy"]];function ZR(e,t){return mp[t]??mp[0]}const XR=2;function JR(e,t){if(!e)return t.t("chat.usageResetUnknown");const n=new Date(e);return Number.isFinite(n.getTime())?t.formatTime(n):t.t("chat.usageResetUnknown")}function QR(e,t){if(typeof e.utilization!="number")return t.t("chat.usageWindowUnknown",{label:e.label});const n=Math.min(100,Math.max(0,Math.round(e.utilization)));return t.t("chat.usageWindow",{label:e.label,remaining:Math.max(0,100-n),used:n,reset:JR(e.resetsAt,t)})}function eN(e,t,n){if(t)return n.t("chat.usageLoading");if(!e)return"";if(e.status==="error")return n.t("chat.usageError",{kind:e.kind});if(e.status==="unavailable"&&e.installCommand)return n.t("chat.usageInstallHint",{kind:e.kind,command:e.installCommand});if(e.status==="unavailable")return n.t("chat.usageUnavailable",{kind:e.kind});const r=e.windows??[];return r.length===0?n.t("chat.usageAvailableNoDetails",{kind:e.kind}):n.t("chat.usageSummary",{kind:e.kind,details:r.slice(0,XR).map(o=>QR(o,n)).join(n.t("chat.usageSeparator"))})}const ci={agent:{defaultKind:"claude"},notifications:{sessionEnd:{banner:!1,sound:!1}},shortcuts:{},power:{inhibitWhenRunning:"system-default"},appearance:{themeMode:"system",themeName:"paper",language:"zh-CN"},customInstructions:[]},[_r,Bc]=D(ci);async function tN(){try{const e=await me.getGlobalConfig();return Bc(e),zc(e),nN(e),e}catch{return Bc(ci),zc(ci,!1),ci}}async function h1(e){const t=await me.updateGlobalConfig(e);return Bc(t.config),zc(t.config),m1(),t.config}async function li(e){return h1(e(_r()))}async function bp(e){return li(t=>({...t,customInstructions:e}))}function zc(e,t=!0){Yv(e.appearance.themeMode,e.appearance.themeName),t&&uh(e.appearance.themeMode,e.appearance.themeName),kd.language!==e.appearance.language&&kd.changeLanguage(e.appearance.language)}function nN(e){if(!(typeof window>"u"))try{const t=window.localStorage,n=t.getItem("yorz.theme"),r=t.getItem("yorz.themeName"),o=t.getItem("yorz.lang"),i=sN(t.getItem("yorz.chat.customSlashCommands")),s=e.appearance,a={themeMode:rN(n)?n:s.themeMode,themeName:oN(r)?r:s.themeName,language:iN(o)?o:s.language},u=e.customInstructions.length>0||i.length===0?e.customInstructions:i;if(a.themeMode===s.themeMode&&a.themeName===s.themeName&&a.language===s.language&&u===e.customInstructions){m1();return}li(c=>({...c,appearance:a,customInstructions:u}))}catch{}}function m1(){if(!(typeof window>"u"))try{window.localStorage.removeItem("yorz.theme"),window.localStorage.removeItem("yorz.themeName"),window.localStorage.removeItem("yorz.lang"),window.localStorage.removeItem("yorz.chat.customSlashCommands")}catch{}}function rN(e){return e==="system"||e==="light"||e==="dark"}function oN(e){return e==="terminal"||e==="graphite"||e==="paper"}function iN(e){return e==="zh-CN"||e==="en"}function sN(e){if(!e)return[];try{const t=JSON.parse(e);return Array.isArray(t)?t.map(aN).filter(n=>n!==null):[]}catch{return[]}}function aN(e){if(!e||typeof e!="object")return null;const t=e,n=typeof t.hiddenPrompt=="string"?t.hiddenPrompt:typeof t.systemPrompt=="string"?t.systemPrompt:null;return typeof t.id!="string"||typeof t.name!="string"||typeof t.description!="string"||n===null||typeof t.prefill!="string"||typeof t.createdAt!="number"?null:{id:t.id,name:t.name,description:t.description,hiddenPrompt:n,prefill:t.prefill,createdAt:t.createdAt}}const[uN,cN]=D({});function rc(e){return e?uN()[e]??[]:[]}function Uc(e,t){return cN(n=>({...n,[e]:t})),t}async function lN(e){if(!e)return[];try{const t=await me.getProjectCustomInstructions(e);return Uc(e,t.customInstructions)}catch{return Uc(e,[])}}async function yp(e,t){const n=await me.updateProjectCustomInstructions(e,t);return Uc(e,n.customInstructions)}function dN(e,t){const n=`/${e}`;return t.trim()?fN(t,e)?t:`${n} ${t}`:`${n} `}function fN(e,t){const n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^/${n}(\\s|$)`).test(e.trimStart())}function gN(e,t){const n=new Set(e.map(r=>r.name));return[...e.map(r=>({...r,scope:"project"})),...t.filter(r=>!n.has(r.name)).map(r=>({...r,scope:"global"}))]}const b1=`
29
-
30
- `,pN="<!-- yorz:hidden -->",hN=/<!-- yorz:hidden -->[\s\S]*?<!-- \/yorz:hidden -->\n?/g;function mN(e){return e.includes(pN)?e.replace(hN,"").trim():e}function bN(e,t){return t.type==="text"?t.contextKind?{kind:"context",contextKind:t.contextKind,text:t.text}:{kind:"text",role:e,text:e==="user"?mN(t.text):t.text}:t.type==="tool-use"?{kind:"tool",name:t.name,input:t.input}:{kind:"tool",result:t.text}}function y1(e){const t=[];for(const n of e){let r=!1;for(const o of n.parts){const i=bN(n.role,o);if(i.kind==="text"){const s=t[t.length-1],a=!r&&s?.kind==="text"&&s.role===i.role;t.push(a?{...i,text:b1+i.text}:i),r=!0}else t.push(i)}}return t}function yN(e){const t=[];for(const n of e){const r=y1(n.messages);r.length!==0&&(t.length>0&&t.push({kind:"divider",sessionId:n.sessionId,agentKind:n.kind,startedAt:n.createdAt}),t.push(...r))}return t}function vN(e,t){return!e||!t||e.endsWith(`
31
- `)||t.startsWith(`
32
- `)?e+t:e+b1+t}function xN(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.result===void 0){r.result=t;return}}e.push({kind:"tool",result:t})}function vp(e,t,n){return`${e}#${t}:${n}`}function wN(e){const t=[];let n=null,r=0;const o=()=>`t${r++}`,i=()=>(n||(n={kind:"assistant",segments:[]},t.push(n)),n);for(const s of e){if(s.kind==="divider"){n=null,t.push({kind:"divider",sessionId:s.sessionId,agentKind:s.agentKind,startedAt:s.startedAt});continue}if(s.kind==="context"){n=null;const c=t[t.length-1];c?.kind==="context"?c.contexts.push(s):t.push({kind:"context",contexts:[s]});continue}if(s.kind==="text"&&s.role==="user"){n=null;const c=t[t.length-1];c?.kind==="user"?c.text=vN(c.text,s.text):t.push({kind:"user",text:s.text});continue}const a=i(),u=a.segments[a.segments.length-1];if(s.kind==="text"){u?.kind==="text"?u.text+=s.text:a.segments.push({kind:"text",text:s.text});continue}u?.kind==="tools"?s.result!==void 0&&s.name===void 0?xN(u.tools,s.result):u.tools.push({...s}):a.segments.push({kind:"tools",id:o(),tools:[{...s}]})}return t.filter(s=>s.kind!=="assistant"||s.segments.length>0)}function _N(e){const{sid:t,displayedSid:n,displayedSpecId:r,fresh:o,listPending:i,known:s,specId:a,running:u}=e;if(!t)return{action:"idle"};const c=n===t;return o&&c?{action:"fresh"}:!s&&i?{action:"hold"}:u&&c&&r===a?{action:"keep"}:{action:"load",clear:!c,specId:a}}function EN(){let e=0;return{begin(){const t=++e;return()=>t===e},invalidate(){e+=1}}}const SN="\0";function oc(e,t){return`${e}${SN}${t}`}function v1(e,t){return e.kind!==t.kind?!1:e.kind==="text"&&t.kind==="text"?e.role===t.role&&e.text===t.text:e.kind==="tool"&&t.kind==="tool"?e.name===t.name&&e.result===t.result:e.kind==="context"&&t.kind==="context"?e.contextKind===t.contextKind&&e.text===t.text:e.kind==="divider"&&t.kind==="divider"?e.sessionId===t.sessionId&&e.startedAt===t.startedAt:!1}function CN(e,t){return e.length!==t.length?!1:e.length===0?!0:v1(e[e.length-1],t[t.length-1])}function kN(e,t){if(e.length>t.length)return!1;for(let n=0;n<e.length;n++)if(!v1(e[n],t[n]))return!1;return!0}const AN=80,TN=1500;function DN(e){return new Promise(t=>window.setTimeout(t,e))}function IN(e){const[t,n]=D([]),r=ee(()=>wN(t())),[o,i]=D(!1),[s,a]=D(!1),[u,c]=D({}),l={isExpanded:k=>u()[k]===!0,set:(k,O)=>c(Z=>Z[k]===O?Z:{...Z,[k]:O})};function d(){c(k=>Object.keys(k).length===0?k:{})}const g=new Set,[h,p]=D(0);let m="",b,v="";const y=EN();function x(k){return m!==k&&v!==k?!1:ut(t).length>0}function E(k,O){if(v===O||x(O))return!0;const Z=e.transcriptCache?.get(oc(k,O));return!Z||Z.parts.length===0?!1:(R(Z.parts),v=O,!0)}const S=new Map;function T(k){let O=S.get(k);if(!O){let Z=()=>{};O={promise:new Promise(F=>{Z=F}),resolve:Z},S.set(k,O)}return O.promise}function A(k){T(k),S.get(k)?.resolve()}function C(k){g.delete(k)&&k===e.sessionId()&&p(O=>O+1)}let L="",j=null;function $(k,O){const Z=k[k.length-1];return Z&&Z.kind==="text"&&Z.role==="assistant"?[...k.slice(0,-1),{...Z,text:Z.text+O}]:[...k,{kind:"text",role:"assistant",text:O}]}function V(){j!=null&&(clearTimeout(j),j=null);const k=L;L="",k&&n(O=>$(O,k))}function B(k){L+=k,j==null&&(j=window.setTimeout(V,AN))}function N(k){V(),n(O=>$(O,k))}function W(k){V(),n(O=>[...O,k])}function R(k=[]){j!=null&&(clearTimeout(j),j=null),L="",n(O=>k.length===0&&O.length===0?O:k)}function P(k){N(`
33
- ${e.errorLabel(k)}
34
- `)}te(()=>{const k=e.projectId(),O=e.sessionId(),Z=e.specId(),re=Z?e.running():!1,F=_N({sid:O,displayedSid:m,displayedSpecId:b,fresh:g.has(O),listPending:e.listPending?.()??!1,known:e.known?.()??!0,specId:Z,running:re});if(h(),!k){a(!1);return}if(F.action==="hold"){a(!E(k,O));return}if(F.action==="idle"||F.action==="keep"){a(!1);return}if(F.action==="fresh"){a(!1),e.onSubjectChange?.();return}e.onSubjectChange?.(),F.clear&&v!==O&&(R(),d()),m=O,b=F.specId;const q=y.begin();a(!E(k,O)),(F.specId?me.getSpecMessages(k,F.specId).then(yN):me.getSessionMessages(k,O).then(y1)).then(ye=>{if(!q())return;v="";const ae=ut(t),pe=CN(ae,ye)||kN(ye,ae);pe||R(ye),a(!1);const Ne=pe?ae:ye;Ne.length>0&&e.transcriptCache?.set(oc(k,O),{specId:F.specId,parts:Ne})}).catch(()=>{q()&&a(!1)})}),te(()=>{const k=e.projectId(),O=e.sessionId();if(!k||!O)return;const Z=sa(k,O,{onReady:()=>A(O),onEvent:re=>{re.type==="text"?B(re.delta):re.type==="tool-use"?W({kind:"tool",name:re.name,input:re.input}):re.type==="tool-result"?W({kind:"tool",result:re.text}):re.type==="turn-completed"?(V(),C(O),e.onRunningChange(O,!1)):re.type==="error"?(P(re.message),e.onRunningChange(O,!1)):re.type==="session-started"&&re.sessionId!==O&&Hc(()=>{g.has(O)&&g.add(re.sessionId),m===O&&(m=re.sessionId),e.onSessionIdChange(re.sessionId),e.onRunningChange(O,!1),e.onRunningChange(re.sessionId,!0),e.onSessionsChanged?.()})}});oe(()=>{S.delete(O),Z()})}),oe(()=>{j!=null&&clearTimeout(j),y.invalidate();const k=e.projectId(),O=t();k&&m&&O.length>0&&e.transcriptCache?.set(oc(k,m),{specId:b,parts:O})});function ne(){R(),d(),y.invalidate(),a(!1),m="",b=void 0,v="",e.onSubjectChange?.()}function Y(){ne(),i(!1),g.clear(),p(k=>k+1),S.clear()}async function K(k,O){const Z=e.projectId(),re=e.sessionId();if(!Z||!k||o()||e.running())return"failed";if(e.onSubjectChange?.(),!re)return ce(Z,k,O);W({kind:"text",role:"user",text:k}),a(!1),e.onRunningChange(re,!0);try{return await me.sendSessionMessage(Z,re,k,O),"sent"}catch(F){return P(F.message),e.onRunningChange(re,!1),"failed"}}async function ce(k,O,Z){i(!0);try{let re;try{re=(await me.createSession(k,{})).sessionId}catch(le){return P(le.message),"not-started"}g.add(re);const F=T(re);R([{kind:"text",role:"user",text:O}]),d(),y.invalidate(),m=re,b=void 0,v="",e.onRunningChange(re,!0),e.onSessionIdChange(re),await Promise.race([F,DN(TN)]);let q;try{await me.sendSessionMessage(k,re,O,Z),q="sent"}catch(le){P(le.message),e.onRunningChange(re,!1),q="failed"}return e.onSessionsChanged?.(),q}finally{i(!1)}}async function z(){const k=e.projectId(),O=e.sessionId();!k||!O||(await me.abortSession(k,O).catch(()=>{}),e.onRunningChange(O,!1))}return{blocks:r,running:e.running,starting:o,historyLoading:s,toolExpand:l,send:K,abort:z,reset:ne,markPersisted:C,resetAll:Y}}function ON(e,t){const n=[],r=new Map;for(const o of e){const i=t(o.id);if(!o.specId){n.push({key:o.id,sessions:[o],latest:o,updatedAt:o.updatedAt,running:i});continue}const s=r.get(o.specId);if(!s){const a={key:o.specId,specId:o.specId,sessions:[o],latest:o,updatedAt:o.updatedAt,running:i};r.set(o.specId,a),n.push(a);continue}s.sessions.push(o),o.updatedAt>s.latest.updatedAt&&(s.latest=o),s.updatedAt=Math.max(s.updatedAt,o.updatedAt),s.running||=i}for(const o of r.values())o.sessions.sort((i,s)=>i.createdAt-s.createdAt);return n}function RN(e,t){return e.find(n=>n.sessions.some(r=>r.id===t))}var NN=M("<div>");const MN=e=>{const[t,n]=se(e,["class"]);return(()=>{var r=NN();return rr(r,H({get class(){return tt("rounded-xl border bg-card text-card-foreground shadow",t.class)}},n),!1,!1),r})()},LN=300;function PN(e,t=LN){const n=e.length;return n<=t?{truncated:!1,preview:e,length:n}:{truncated:!0,preview:e.slice(0,t),length:n}}const Gl=ka;ka.Trigger;const Vl=e=>{const[t,n]=se(e,["class"]);return f(ka.Content,H({get class(){return tt("animate-collapsible-up data-[expanded]:animate-collapsible-down",t.class)}},n))};var $N=M('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 py-0.5 text-left text-xs text-muted-foreground/70"><span class=font-mono>'),FN=M('<div class="mt-1 max-h-[32rem] space-y-2 overflow-auto rounded border bg-background p-2">'),BN=M('<div class="font-mono text-xs font-semibold">'),zN=M("<div class=space-y-1>"),UN=M('<button type=button class="inline-flex w-fit cursor-pointer items-center text-left text-[11px] text-muted-foreground/70">'),KN=M("<div class=space-y-1><pre>");const jN=e=>{const t=()=>e.expand.isExpanded(e.segment.id),n=r=>e.expand.set(e.segment.id,r);return f(Gl,{get open(){return t()},onOpenChange:n,class:"my-1",get children(){return[(()=>{var r=$N(),o=r.firstChild;return r.$$click=()=>n(!t()),w(r,f(Zc,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),w(o,()=>_("chat.toolCollapsed",{count:e.segment.tools.length})),r})(),f(Vl,{get children(){var r=FN();return w(r,f(gc,{get each(){return e.segment.tools},children:(o,i)=>(()=>{var s=zN();return w(s,f(G,{get when(){return o().name},get children(){var a=BN();return w(a,()=>o().name),a}}),null),w(s,f(G,{get when(){return o().input!==void 0},get children(){return f(xp,{get text(){return HN(o().input)},get expandKey(){return vp(e.segment.id,i,"input")},get expand(){return e.expand}})}}),null),w(s,f(G,{get when(){return o().result!==void 0},get children(){return f(xp,{get text(){return o().result??""},get expandKey(){return vp(e.segment.id,i,"result")},get expand(){return e.expand},wrap:!0})}}),null),s})()})),r}})]}})},xp=e=>{const t=()=>PN(e.text),n=()=>e.expand.isExpanded(e.expandKey),r=()=>t().truncated&&!n();return(()=>{var o=KN(),i=o.firstChild;return w(i,(()=>{var s=J(()=>!!r());return()=>s()?`${t().preview}…`:e.text})()),w(o,f(G,{get when(){return t().truncated},get children(){var s=UN();return s.$$click=()=>e.expand.set(e.expandKey,!n()),w(s,(()=>{var a=J(()=>!!n());return()=>a()?_("chat.toolTextCollapse"):_("chat.toolTextExpand",{count:t().length})})()),s}}),null),Le(()=>xt(i,`overflow-x-auto rounded bg-muted px-2 py-1 text-[11px] leading-snug ${e.wrap?"whitespace-pre-wrap":""}`)),o})()};function HN(e){try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}dn(["click"]);var qN=M('<button type=button class="inline-flex w-fit cursor-pointer items-center gap-1 rounded border border-dashed px-1.5 py-0.5 text-left text-xs text-muted-foreground/80"><span class=font-mono>'),GN=M('<div class="mt-1 max-h-72 space-y-2 overflow-auto rounded border border-dashed bg-muted/40 p-2">'),VN=M('<pre class="overflow-x-auto whitespace-pre-wrap rounded bg-background px-2 py-1 text-[11px] leading-snug text-muted-foreground">');const WN=e=>{const[t,n]=D(!1);return f(Gl,{get open(){return t()},onOpenChange:n,class:"mb-2",get children(){return[(()=>{var r=qN(),o=r.firstChild;return r.$$click=()=>n(!t()),w(r,f(Zc,{get class(){return`h-3 w-3 shrink-0 transition-transform duration-150 ${t()?"":"-rotate-90"}`}}),o),w(o,()=>_("chat.agentContextCollapsed",{count:e.contexts.length})),Le(()=>Ge(r,"title",_("chat.agentContextCollapsed",{count:e.contexts.length}))),r})(),f(Vl,{get children(){var r=GN();return w(r,f(rt,{get each(){return e.contexts},children:o=>(()=>{var i=VN();return w(i,()=>o.text),i})()})),r}})]}})};dn(["click"]);var YN=M('<span class="font-semibold tracking-wide">'),wp=M("<span>"),ZN=M('<div class="flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5"><button type=button class="min-w-0 flex-1 text-left font-medium"></button><button type=button class=shrink-0>'),XN=M('<ul class="m-0 list-none overflow-y-auto border-t py-1">'),JN=M("<div class=mb-1.5>"),QN=M('<p class="mb-1 text-xs text-destructive">'),e4=M('<div class="flex min-h-0 flex-1 flex-col"><div class="min-h-0 flex-1 overflow-x-hidden overflow-y-auto p-2 pt-0 pr-1 mr-1 "></div><div class="border-t p-2"><div class="mb-1 flex items-center gap-1"><input type=file multiple hidden></div><div class="flex items-center justify-end gap-1">'),t4=M('<div class="absolute right-0 top-0 z-[2] h-full w-1 cursor-col-resize bg-transparent hover:bg-accent/40"role=separator aria-orientation=vertical>'),n4=M('<p class="m-0 text-sm text-destructive">'),r4=M('<form class="flex flex-col gap-4"><div class="flex flex-col gap-1 font-medium"><span class="text-xs font-normal text-muted-foreground"></span></div><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-name></label><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-description></label><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-hidden-prompt><span class="text-xs font-normal text-muted-foreground"></span></label><label class="flex flex-col gap-1 font-medium"for=chat-custom-command-prefill><span class="text-xs font-normal text-muted-foreground">'),o4=M("<aside><header>"),i4=M('<li class="px-2.5 py-1.5 text-xs text-muted-foreground">'),s4=M('<span class="shrink-0 text-[11px] font-normal tabular-nums text-muted-foreground">×'),a4=M('<li><button type=button><span class="shrink-0 text-xs text-muted-foreground">[<!>]</span><span class="min-w-0 flex-1 truncate"></span><span class="ml-auto max-w-20 shrink-0 truncate pl-2 text-right text-[11px] font-normal tabular-nums text-muted-foreground">'),u4=M("<div class=text-muted-foreground><p class=m-0>"),c4=M('<p class="mt-1 text-sm">'),l4=M('<div class="mb-2 whitespace-pre-wrap rounded border border-primary/20 border-l-2 border-l-primary bg-primary/10 px-2 py-1.5 font-medium text-foreground [overflow-wrap:anywhere]">'),d4=M('<div class="mb-2 min-w-0 rounded border bg-card px-2 py-1.5 [overflow-wrap:anywhere]">'),f4=M('<div class="markdown chat-md">'),g4=M('<div class="my-3 flex items-center gap-2 text-[11px] text-muted-foreground"><span class="h-px flex-1 bg-border"></span><span class="shrink-0 tabular-nums"></span><span class="h-px flex-1 bg-border">'),p4=M('<span class="text-sm font-normal text-muted-foreground">');const ic="yorz.layout.col2.collapsed",Kc="yorz.layout.col2.width",_p="yorz.chat.sessionList.collapsed",x1="yorz.chat.sessionList.rows",h4="yorz.chat.sessionList.limit",m4="yorz.chat.sessionList.showHistory",w1=[3,5,10],b4=28,Wl=340,y4=.4,_1=260,v4=960,x4=.8,w4=96,_4=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,E4=e=>e.kind==="divider"?e:null,S4=e=>e.kind==="context"?e:null,C4=e=>e.kind==="assistant"?e:null,k4=e=>e.kind==="user"?e:null,A4=e=>e.kind==="tools"?e:null,T4=e=>e.kind==="text"?e.text:"";Pa("en",ZR);Pa("zh-CN",YR);function D4(){return typeof window>"u"?v4:Math.max(_1,Math.round(window.innerWidth*x4))}function Xs(e){return Number.isFinite(e)?Math.min(D4(),Math.max(_1,Math.round(e))):Wl}function sc(){return typeof window>"u"?Wl:Xs(window.innerWidth*y4)}function Ep(e){return e instanceof Element?e.closest('[data-file-link="true"]'):null}function I4(){try{if(typeof window>"u")return Wl;const e=window.localStorage.getItem(Kc);if(!e)return sc();const t=Number(e);return Number.isFinite(t)?Xs(t):sc()}catch{return sc()}}function di(e,t){try{return typeof window<"u"&&window.localStorage.getItem(e)||t}catch{return t}}function Do(e,t){try{typeof window<"u"&&window.localStorage.setItem(e,t)}catch{}}function jc(e){return w1.includes(e)}function O4(){const e=Number(di(x1,""));if(jc(e))return e;const t=Number(di(h4,""));return jc(t)?t:di(m4,"0")==="1"?10:3}const Sp=3,Cp=10;function kp(e){return e.trim().replace(/^\/+/,"")}function R4(e){return/^[\w-]+$/.test(e)}function N4(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}const M4=()=>{let e,t;const{lng:n}=gb(),r=wb({projectId:()=>ht()||"",labels:_b}),o=ee(()=>gN(rc(ht()||""),_r().customInstructions));te(()=>{const U=ht()||"";U&&lN(U)});const[i,s]=D(!1),[a,u]=D(""),[c,l]=D(""),[d,g]=D(""),[h,p]=D(""),[m,b]=D("project"),[v,y]=D(null),[x,E]=D(!1),[S,T]=D(null),[A,C]=D(null),[L,j]=D(!1),$=ee(()=>{n();const U=o().map(ie=>{const de=`/${ie.name}`;return{value:de,label:de,description:ie.description||_("chat.customSlashCommandNoDescription"),replacement:dN(ie.name,ie.prefill),customId:ie.id,editable:!0,editLabel:_("chat.editCustomSlashCommand",{name:ie.name}),deletable:!0,deleteLabel:_("chat.deleteCustomSlashCommand",{name:ie.name})}});return[{value:"/yorz-debug",description:_("chat.slashCommandYorzDebug")},{value:"/yorz-spec",description:_("chat.slashCommandYorzSpec")},...U,{value:"/add-command",label:_("chat.addSlashCommandOption"),description:_("chat.addSlashCommandOptionDescription"),action:"add",icon:"plus"}]}),[V,B]=D(di(ic,"0")==="1"),[N,W]=D(I4()),[R,P]=D(di(_p,"0")!=="1"),[ne,Y]=D(O4()),[K,ce]=D(""),[z,k]=D(""),[O,Z]=D(!0),[re,F]=D(Date.now()),[q,le]=D({}),[ye,{refetch:ae}]=Wt(()=>ht()||void 0,U=>me.listSessions(U)),[pe]=Wt(()=>{const U=ht();return U&&!K()?U:void 0},U=>me.getAgentUsageStatus(U));te(()=>{const U=ye();if(!U)return;const ie=K();for(const de of U)de.running||It.markPersisted(de.id);le(de=>{const Me={};for(const kt of U)Me[kt.id]=!!kt.running;return ie&&!(ie in Me)&&de[ie]===!0&&(Me[ie]=!0),Me})}),te(bt(ht,()=>{ce(""),le({}),It.resetAll(),r.reset()})),te(()=>{const U=ht();if(!U)return;const ie=wh(U,{onStatus:de=>{le(Me=>({...Me,[de.sessionId]:de.running})),ae()}});oe(ie)});const Ne=U=>q()[U]===!0,Pe=ee(()=>{const U=K();return U?Ne(U):!1}),Ke=ee(()=>ON(ye()??[],Ne)),et=ee(()=>Ke().filter(U=>U.running).length),wt=ee(()=>RN(Ke(),K())),Bt=ee(()=>wt()?.specId),qn=ee(()=>!!wt()),lr=ee(()=>!qn()&&ye.loading),It=IN({projectId:()=>ht()||"",sessionId:K,specId:Bt,running:Pe,listPending:lr,known:qn,onSessionIdChange:ce,onRunningChange:(U,ie)=>le(de=>({...de,[U]:ie})),onSessionsChanged:()=>void ae(),onSubjectChange:()=>Z(!0),errorLabel:U=>_("chat.errorMessage",{message:U})});function Or(U){!U||U===K()||(ae(),ce(U))}te(()=>{const U=Ww();U&&(Yw(),Or(U),V()&&(B(!1),Do(ic,"0")))});const pt=()=>V()||wr();function on(){if(wr()){zs();return}const U=!V();B(U),Do(ic,U?"1":"0")}function fn(U){P(U),Do(_p,U?"0":"1")}function Lt(U){const ie=Number(U);jc(ie)&&(Y(ie),Do(x1,String(ie)))}function Nn(U){return _(U===3?"chat.sessionListRows3":U===5?"chat.sessionListRows5":"chat.sessionListRows10")}function dr(U){const ie=U.title.trim();return ie&&ie!==U.id&&!_4.test(ie)?ie:U.id}Dn(()=>{const U=()=>{const ie=Xs(N());ie!==N()&&(W(ie),Do(Kc,String(ie)))};window.addEventListener("resize",U),oe(()=>window.removeEventListener("resize",U))}),Dn(()=>{const U=window.setInterval(()=>F(Date.now()),6e4);oe(()=>window.clearInterval(U))});let ue=null,ve=null,Ae=null;function lt(U){pt()||(U.preventDefault(),ue={startX:U.clientX,startW:N(),raf:null},document.body.classList.add("is-resizing"),ve=ie=>{if(!ue)return;const de=Xs(ue.startW+(ie.clientX-ue.startX));ue.raf==null&&(ue.raf=requestAnimationFrame(()=>{ue&&(ue.raf=null,W(de))}))},Ae=()=>{ue?.raf!=null&&cancelAnimationFrame(ue.raf),ue=null,document.body.classList.remove("is-resizing"),ve&&document.removeEventListener("mousemove",ve),Ae&&document.removeEventListener("mouseup",Ae),ve=null,Ae=null,Do(Kc,String(N()))},document.addEventListener("mousemove",ve),document.addEventListener("mouseup",Ae))}oe(()=>{ve&&document.removeEventListener("mousemove",ve),Ae&&document.removeEventListener("mouseup",Ae),document.body.classList.remove("is-resizing")}),te(()=>{It.blocks(),O()&&requestAnimationFrame(xe)});function gn(U){return U.scrollHeight-U.scrollTop-U.clientHeight<=w4}function xe(){e&&(e.scrollTop=e.scrollHeight)}function Ye(){e&&Z(gn(e))}function Yt(U){return re(),!Number.isFinite(U)||U<=0?"":GR(U,n())}function _t(U){return!Number.isFinite(U)||U<=0?"":new Date(U).toLocaleString(n())}const Tt=ee(()=>(n(),eN(pe(),pe.loading,{t:_,formatTime:U=>U.toLocaleString(n())})));async function Zt(U){try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(U),Ct.success(_("chat.filePathCopied"))}catch{Ct.error(_("chat.filePathCopyFailed"))}}function Ve(U){const ie=Ep(U.target);if(!ie||e&&!e.contains(ie))return;const de=ie.dataset.filePath;de&&(U.preventDefault(),Zt(de))}function pn(U){if(U.key!=="Enter"&&U.key!==" ")return;const ie=Ep(U.target);if(!ie||e&&!e.contains(ie))return;const de=ie.dataset.filePath;de&&(U.preventDefault(),Zt(de))}function Pt(){!ht()||!K()||(ce(""),It.reset(),r.reset())}async function sn(){const U=z().trim();if(!ht()||!U||It.starting()||Pe()||r.hasPending())return;k("");const ie=await It.send(U,r.draftId()??void 0);ie==="sent"?r.reset():ie==="not-started"&&k(U)}function I(U){U.defaultPrevented||U.isComposing||U.key==="Enter"&&!U.shiftKey&&(U.preventDefault(),sn())}function Q(){return S()===null&&!!ht()}function ge(){u(""),l(""),g(""),p(""),b(ht()?"project":"global"),y(null),T(null)}function Fe(){ge(),s(!0)}function yt(U){const ie=U.customId,de=ie?o().find(Me=>Me.id===ie):void 0;de&&(T(de.id),u(de.name),l(de.description),g(de.hiddenPrompt),p(de.prefill),b(de.scope),y(null),s(!0))}async function vt(U){if(U.preventDefault(),x())return;const ie=kp(a());if(!ie){y(_("chat.customSlashCommandNameRequired"));return}if(!R4(ie)){y(_("chat.customSlashCommandNameInvalid"));return}const de=S(),Me=ht()||"",kt=m()==="project"&&Me?"project":"global",Dt=kt==="project"?rc(Me):_r().customInstructions,zt=de?Dt.find(Xt=>Xt.id===de):void 0,Sn={id:zt?.id??N4(),name:ie,description:c().trim(),hiddenPrompt:d().trim(),prefill:h(),createdAt:zt?.createdAt??Date.now()},hn=[...Dt.filter(Xt=>Xt.id!==Sn.id&&Xt.name!==ie),Sn];E(!0);try{kt==="project"?await yp(Me,hn):await bp(hn),s(!1),ge()}catch(Xt){y(Xt.message)}finally{E(!1)}}async function Ce(){const U=A()?.customId;if(!U)return;const ie=o().find(de=>de.id===U);if(ie){j(!0);try{if(ie.scope==="project"){const de=ht()||"";await yp(de,rc(de).filter(Me=>Me.id!==U))}else await bp(_r().customInstructions.filter(de=>de.id!==U));C(null)}catch(de){Ct.error(de.message)}finally{j(!1)}}}return(()=>{var U=o4(),ie=U.firstChild;return w(ie,f(G,{get when(){return!pt()},get fallback(){return f(Ee,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:on,get title(){return _("chat.expand")},get children(){return f(yc,{class:"h-4 w-4"})}})},get children(){return[(()=>{var de=YN();return w(de,()=>_("chat.title")),de})(),f(Ee,{variant:"outline",size:"sm",class:"h-7 w-7 p-0",onClick:on,get title(){return _("chat.collapse")},get children(){return f(hh,{class:"h-4 w-4"})}})]}})),w(U,f(G,{get when(){return!pt()},get children(){var de=e4(),Me=de.firstChild,kt=Me.nextSibling,Dt=kt.firstChild,zt=Dt.firstChild,Sn=Dt.nextSibling;w(de,f(G,{get when(){return ht()},get children(){return f(MN,{class:"m-2 rounded-lg shadow-none",get children(){return f(Gl,{get open(){return R()},onOpenChange:fn,get children(){return[(()=>{var st=ZN(),Te=st.firstChild,Et=Te.nextSibling;return Te.$$click=()=>fn(!R()),w(Te,f(G,{get when(){return et()>0},get fallback(){return(()=>{var Je=wp();return w(Je,()=>_("chat.sessionsLabelPlain")),Je})()},get children(){var Je=wp();return w(Je,()=>_("chat.sessionsLabel",{count:et()})),Je}})),w(st,f(An,{class:"flex shrink-0 items-center gap-2",get value(){return String(ne())},onChange:Lt,get"aria-label"(){return _("chat.sessionListRows")},get children(){return f(rt,{each:w1,children:Je=>f(en,{get value(){return String(Je)},class:"flex items-center gap-1",get children(){return[f(Jt,{}),f(un,{class:"h-3 w-3"}),f(Qt,{class:"cursor-pointer text-xs text-muted-foreground",get children(){return Nn(Je)}})]}})})}}),Et),Et.$$click=()=>fn(!R()),w(Et,f(Zc,{get class(){return`h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-150 ${R()?"":"-rotate-90"}`}})),Le(Je=>{var Kt=R()?_("chat.collapseSessions"):_("chat.expandSessions"),vo=R()?_("chat.collapseSessions"):_("chat.expandSessions");return Kt!==Je.e&&Ge(Te,"title",Je.e=Kt),vo!==Je.t&&Ge(Et,"title",Je.t=vo),Je},{e:void 0,t:void 0}),st})(),f(Vl,{get children(){var st=XN();return w(st,f(G,{get when(){return Ke().length>0},get fallback(){return(()=>{var Te=i4();return w(Te,()=>_("chat.noRunningSessions")),Te})()},get children(){return f(rt,{get each(){return Ke()},children:Te=>(()=>{var Et=a4(),Je=Et.firstChild,Kt=Je.firstChild,vo=Kt.firstChild,Qi=vo.nextSibling;Qi.nextSibling;var Mn=Kt.nextSibling,xo=Mn.nextSibling;return Je.$$click=()=>Or(Te.latest.id),w(Je,f(G,{get when(){return Te.running},get children(){return f(kn,{class:"h-3.5 w-3.5 shrink-0 animate-spin text-muted-foreground"})}}),Kt),w(Kt,()=>Te.latest.kind,Qi),w(Mn,()=>dr(Te.latest)),w(Je,f(G,{get when(){return Te.sessions.length>1},get children(){var an=s4();return an.firstChild,w(an,()=>Te.sessions.length,null),an}}),xo),w(xo,()=>Yt(Te.updatedAt)),Le(an=>{var es=`flex w-full items-center gap-1 px-2 py-1 text-left text-sm ${wt()?.key===Te.key?"bg-primary-soft font-semibold":"hover:bg-accent"}`,ts=Te.running?_("chat.sessionTitleRunning",{kind:Te.latest.kind,id:Te.latest.id}):_("chat.sessionTitle",{kind:Te.latest.kind,id:Te.latest.id}),ns=_t(Te.updatedAt);return es!==an.e&&xt(Je,an.e=es),ts!==an.t&&Ge(Je,"title",an.t=ts),ns!==an.a&&Ge(xo,"title",an.a=ns),an},{e:void 0,t:void 0,a:void 0}),Et})()})}})),Le(Te=>hi(st,"max-height",`${ne()*b4+4}px`)),st}})]}})}})}}),Me),Me.addEventListener("scroll",Ye),Me.$$keydown=pn,Me.$$click=Ve;var hn=e;typeof hn=="function"?Bn(hn,Me):e=Me,w(Me,f(G,{get when(){return It.blocks().length>0},get fallback(){return(()=>{var st=u4(),Te=st.firstChild;return w(Te,(()=>{var Et=J(()=>!!K());return()=>Et()?_("chat.empty"):_("chat.draftEmpty")})()),w(st,f(G,{get when(){return J(()=>!K())()&&Tt()},children:Et=>(()=>{var Je=c4();return w(Je,Et),Je})()}),null),st})()},get children(){return f(gc,{get each(){return It.blocks()},children:st=>f(G,{get when(){return E4(st())},get fallback(){return f(G,{get when(){return S4(st())},get fallback(){return f(G,{get when(){return C4(st())},get fallback(){return(()=>{var Te=l4();return w(Te,()=>k4(st())?.text),Te})()},children:Te=>(()=>{var Et=d4();return w(Et,f(gc,{get each(){return Te().segments},children:Je=>f(G,{get when(){return A4(Je())},get fallback(){return(()=>{var Kt=f4();return Le(()=>Kt.innerHTML=Hl(T4(Je()),{mermaid:"code",fileLinks:"copy",fileLinkTitle:_("chat.copyFilePath")})),Kt})()},children:Kt=>f(jN,{get segment(){return Kt()},get expand(){return It.toolExpand}})})})),Et})()})},children:Te=>f(WN,{get contexts(){return Te().contexts}})})},children:Te=>(()=>{var Et=g4(),Je=Et.firstChild,Kt=Je.nextSibling;return w(Kt,()=>_("chat.sessionDivider",{kind:Te().agentKind,time:_t(Te().startedAt)})),Et})()})})}})),w(kt,f(G,{get when(){return r.count()>0},get children(){var st=JN();return w(st,f(Tb,{ctrl:r,compact:!0})),st}}),Dt),w(kt,f(G,{get when(){return r.error()},get children(){var st=QN();return w(st,()=>r.error()),st}}),Dt),w(Dt,f(Ta,{get projectId(){return ht()||""},get value(){return z()},onValueChange:k,get slashCommands(){return $()},get slashEmptyLabel(){return _("chat.slashCommandNoMatch")},onSlashCommandAction:Fe,onEditSlashCommand:yt,onDeleteSlashCommand:C,onKeyDown:I,get onPaste(){return r.onPaste},get placeholder(){return J(()=>!ht())()?_("chat.noSessionPlaceholder"):J(()=>!!K())()?_("chat.inputPlaceholder"):_("chat.draftPlaceholder")},get disabled(){return!ht()},minRows:2,maxRows:10,class:"min-w-0 flex-1 bg-background px-2 py-1"}),zt),w(Dt,f(Ee,{variant:"outline",size:"sm",class:"h-8 w-8 shrink-0 p-0",onClick:()=>t?.click(),get disabled(){return!ht()||r.count()>=$o},get title(){return _("newSpec.importAttachment")},get children(){return f(pw,{class:"h-4 w-4"})}}),zt),Is(zt,"change",r.onFileInputChange);var Xt=t;return typeof Xt=="function"?Bn(Xt,zt):t=zt,Ge(zt,"accept",xb),w(Sn,f(Ee,{variant:"outline",size:"sm",class:"h-8 w-8 p-0",onClick:Pt,get disabled(){return!ht()||!K()},get title(){return _("chat.newSession")},get children(){return f(Pi,{class:"h-4 w-4"})}}),null),w(Sn,f(G,{get when(){return Pe()},get fallback(){return f(Ee,{size:"sm",onClick:()=>void sn(),get disabled(){return!ht()||!z().trim()||It.starting()||r.hasPending()},get children(){return[f(oa,{class:"mr-1 h-3.5 w-3.5"}),J(()=>_("chat.send"))]}})},get children(){return f(Ee,{variant:"outline",size:"sm",onClick:()=>void It.abort(),get title(){return _("chat.abort")},get children(){return[f(yh,{class:"mr-1 h-3.5 w-3.5"}),J(()=>_("chat.abort"))]}})}}),null),de}}),null),w(U,f(G,{get when(){return!pt()},get children(){var de=t4();return de.$$mousedown=lt,de}}),null),w(U,f(cn,{get open(){return i()},onOpenChange:de=>{!de&&x()||(s(de),de||ge())},get children(){return f(Sr,{class:"max-w-[700px]",get children(){return[f(kr,{get children(){return f(Cr,{get children(){return J(()=>!!S())()?_("chat.editSlashCommandTitle"):_("chat.addSlashCommandTitle")}})}}),(()=>{var de=r4(),Me=de.firstChild,kt=Me.firstChild,Dt=Me.nextSibling,zt=Dt.nextSibling,Sn=zt.nextSibling,hn=Sn.firstChild,Xt=Sn.nextSibling,st=Xt.firstChild;return de.addEventListener("submit",Te=>void vt(Te)),w(Me,()=>_("chat.customSlashCommandScope"),kt),w(Me,f(G,{get when(){return Q()},get fallback(){return(()=>{var Te=p4();return w(Te,(()=>{var Et=J(()=>m()==="project");return()=>Et()?_("chat.slashCommandScopeProject"):_("chat.slashCommandScopeGlobal")})()),Te})()},get children(){return f(An,{get value(){return m()},onChange:Te=>b(Te),class:"flex items-center gap-4",get children(){return f(rt,{get each(){return[{value:"project",label:_("chat.slashCommandScopeProject")},{value:"global",label:_("chat.slashCommandScopeGlobal")}]},children:Te=>f(en,{get value(){return Te.value},class:"flex items-center gap-1",get children(){return[f(Jt,{}),f(un,{class:"h-3 w-3"}),f(Qt,{class:"cursor-pointer text-sm font-normal",get children(){return Te.label}})]}})})}})}}),kt),w(kt,(()=>{var Te=J(()=>m()==="project");return()=>Te()?_("chat.customSlashCommandScopeProjectHint"):_("chat.customSlashCommandScopeGlobalHint")})()),w(Dt,()=>_("chat.customSlashCommandName"),null),w(Dt,f(Er,{id:"chat-custom-command-name",get value(){return a()},get placeholder(){return _("chat.customSlashCommandNamePlaceholder")},onInput:Te=>{u(Te.currentTarget.value),y(null)},required:!0}),null),w(zt,()=>_("chat.customSlashCommandDescription"),null),w(zt,f(Er,{id:"chat-custom-command-description",get value(){return c()},get placeholder(){return _("chat.customSlashCommandDescriptionPlaceholder")},onInput:Te=>l(Te.currentTarget.value)}),null),w(Sn,()=>_("chat.customSlashCommandHiddenPrompt"),hn),w(Sn,f(qs,{id:"chat-custom-command-hidden-prompt",get value(){return d()},get placeholder(){return _("chat.customSlashCommandHiddenPromptPlaceholder")},minRows:Sp,maxRows:Cp,onInput:Te=>g(Te.currentTarget.value)}),hn),w(hn,()=>_("chat.customSlashCommandHiddenPromptHint")),w(Xt,()=>_("chat.customSlashCommandPrefill"),st),w(Xt,f(qs,{id:"chat-custom-command-prefill",get value(){return h()},get placeholder(){return _("chat.customSlashCommandPrefillPlaceholder")},minRows:Sp,maxRows:Cp,onInput:Te=>p(Te.currentTarget.value)}),st),w(st,()=>_("chat.customSlashCommandPrefillHint")),w(de,f(G,{get when(){return v()},get children(){var Te=n4();return w(Te,v),Te}}),null),w(de,f(Hr,{get children(){return[f(Ee,{type:"button",variant:"outline",onClick:()=>s(!1),get disabled(){return x()},get children(){return _("common.cancel")}}),f(Ee,{type:"submit",get disabled(){return!a().trim()||x()},get children(){return J(()=>!!x())()?_("common.saving"):_("chat.saveCustomSlashCommand")}})]}}),null),de})()]}})}}),null),w(U,f(cn,{get open(){return A()!==null},onOpenChange:de=>!de&&!L()&&C(null),get children(){return f(Sr,{class:"max-w-sm",get children(){return[f(kr,{get children(){return[f(Cr,{get children(){return _("chat.deleteSlashCommandTitle")}}),f(Aa,{get children(){return _("chat.deleteSlashCommandConfirm",{name:kp(A()?.value??"")})}})]}}),f(Hr,{get children(){return[f(Ee,{variant:"outline",onClick:()=>C(null),get disabled(){return L()},get children(){return _("common.cancel")}}),f(Ee,{variant:"destructive",onClick:()=>void Ce(),get disabled(){return L()},get children(){return J(()=>!!L())()?_("common.deleting"):_("common.confirmDelete")}})]}})]}})}}),null),Le(de=>{var Me=`relative flex flex-col border-r bg-background text-base shrink-0 ${pt()?"w-9 transition-[width] duration-150":""}`,kt=pt()?void 0:{width:`${N()}px`},Dt=`flex items-center border-b ${pt()?"justify-center py-2":"justify-between px-2.5 py-2"}`;return Me!==de.e&&xt(U,de.e=Me),de.t=Bo(U,kt,de.t),Dt!==de.a&&xt(ie,de.a=Dt),de},{e:void 0,t:void 0,a:void 0}),U})()};dn(["click","keydown","mousedown"]);const E1=["newSpec","toggleSpecDetailFullscreen","projectSettings"],so={newSpec:"Ctrl+Shift+N",toggleSpecDetailFullscreen:"Ctrl+Shift+F",projectSettings:"Ctrl+Shift+S"},L4=new Set(["Control","Shift","Alt","Meta"]);function ac(e){if(!e)return null;const t=e.split("+").map(r=>r.trim()).filter(Boolean),n={key:""};for(const r of t){const o=r.toLowerCase();o==="ctrl"||o==="control"?n.ctrl=!0:o==="shift"?n.shift=!0:o==="alt"||o==="option"?n.alt=!0:o==="meta"||o==="cmd"||o==="command"?n.meta=!0:n.key=Yl(r)}return n.key?C1(n):null}function S1(e){if(L4.has(e.key))return null;const t=Yl(e.key);return t?C1({key:t,ctrl:e.ctrlKey,shift:e.shiftKey,alt:e.altKey,meta:e.metaKey}):null}function Js(e){return{newSpec:ac(e?.newSpec)??so.newSpec,toggleSpecDetailFullscreen:ac(e?.toggleSpecDetailFullscreen)??so.toggleSpecDetailFullscreen,projectSettings:ac(e?.projectSettings)??so.projectSettings}}function Ap(e){const t=Js(e),n=new Map,r=new Set;for(const o of E1){const i=t[o],s=n.get(i);s?(r.add(s),r.add(o)):n.set(i,o)}return[...r]}function P4(e){if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const t=e.tagName.toLowerCase();if(t==="textarea"||t==="select")return!0;if(t!=="input")return!1;const r=e.type.toLowerCase();return!["button","checkbox","radio","submit","reset","file","color"].includes(r)}function C1(e){const t=[];return e.ctrl&&t.push("Ctrl"),e.shift&&t.push("Shift"),e.alt&&t.push("Alt"),e.meta&&t.push("Meta"),t.push(Yl(e.key)),t.join("+")}function Yl(e){return e.length===1?e.toUpperCase():e===" "?"Space":e.startsWith("Arrow")?e:e.slice(0,1).toUpperCase()+e.slice(1)}var $4=M("<span>"),F4=M('<span class="text-xs font-normal text-muted-foreground">'),B4=M('<p class="m-0 text-sm text-destructive">'),z4=M('<div class="flex flex-col gap-4"><fieldset class="m-0 flex flex-col gap-3 border-0 p-0"><legend class=font-medium></legend><div class="flex flex-wrap items-center gap-x-6 gap-y-2"></div></fieldset><fieldset class="m-0 flex flex-col gap-2 border-0 p-0"><legend class=font-medium></legend><div class="flex flex-col gap-2">'),U4=M("<p class=text-muted-foreground>"),K4=M('<div class="grid grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 rounded-md border p-2"><div class=min-w-0><p class="m-0 font-medium"></p><p>'),j4=M("<p class=text-destructive>");const H4=e=>{const[t,n]=D("claude"),[r,o]=D(!1),[i,s]=D(!1),[a,u]=D("system-default"),[c,l]=D({}),[d,g]=D(null),[h,p]=D(!1),[m,b]=D("idle"),[v,y]=D(null),x=ee(()=>new Set(Ap(c())));let E;te(()=>{e.open&&(y(null),A(),b("idle"),p(!0),(async()=>{try{S(await me.getGlobalConfig())}catch(P){y(P.message),S(ci)}finally{p(!1)}})())});function S(P){n(P.agent.defaultKind),o(!!P.notifications.sessionEnd.banner),s(!!P.notifications.sessionEnd.sound),u(P.power?.inhibitWhenRunning??"system-default"),l(P.shortcuts??{}),g(null)}te(()=>{const P=d();if(!P)return;const ne=Y=>{if(Y.preventDefault(),Y.stopPropagation(),Y.key==="Escape"){g(null);return}if(Y.key==="Backspace"||Y.key==="Delete"){const z={...c(),[P]:null};l(z),g(null),T({shortcuts:z});return}const K=S1(Y);if(!K)return;const ce={...c(),[P]:K};l(ce),g(null),T({shortcuts:ce})};window.addEventListener("keydown",ne,!0),oe(()=>window.removeEventListener("keydown",ne,!0))});async function T(P){y(null);const ne=P.shortcuts??c();if(Ap(ne).length>0){y(_("globalConfig.shortcutConflict"));return}A(),b("saving");try{await h1({agent:{defaultKind:P.agent?.defaultKind??t()},notifications:{sessionEnd:{banner:P.notifications?.sessionEnd.banner??r(),sound:P.notifications?.sessionEnd.sound??i()}},shortcuts:ne,power:{inhibitWhenRunning:P.power?.inhibitWhenRunning??a()},appearance:_r().appearance,customInstructions:_r().customInstructions}),b("saved"),E=setTimeout(()=>b("idle"),2e3)}catch(Y){b("idle"),y(Y.message)}}function A(){E&&(clearTimeout(E),E=void 0)}oe(A);function C(P){return _(P==="codex"?"projectConfig.agentCodex":P==="opencode"?"projectConfig.agentOpencode":"projectConfig.agentClaude")}function L(P){return _(`globalConfig.shortcuts.${P}`)}function j(P){return _(P==="prevent-display-sleep"?"globalConfig.powerPreventDisplaySleep":P==="keep-system-awake"?"globalConfig.powerKeepSystemAwake":"globalConfig.powerSystemDefault")}function $(P){return d()===P?_("globalConfig.shortcutRecording"):Js(c())[P]}function V(P){const ne={...c(),[P]:null};l(ne),T({shortcuts:ne})}function B(P){n(P),T({agent:{defaultKind:P}})}function N(P){o(P),T({notifications:{sessionEnd:{banner:P,sound:i()}}})}function W(P){s(P),T({notifications:{sessionEnd:{banner:r(),sound:P}}})}function R(P){u(P),T({power:{inhibitWhenRunning:P}})}return f(cn,{get open(){return e.open},onOpenChange:P=>!P&&e.onClose(),get children(){return f(Sr,{class:"max-w-[560px]",get children(){return[f(kr,{get children(){return f(Cr,{class:"flex items-baseline gap-2",get children(){return[(()=>{var P=$4();return w(P,()=>_("globalConfig.title")),P})(),f(G,{get when(){return m()!=="idle"},get children(){var P=F4();return w(P,(()=>{var ne=J(()=>m()==="saving");return()=>ne()?_("globalConfig.saveStatusSaving"):_("globalConfig.saveStatusSaved")})()),P}})]}})}}),f(G,{get when(){return!h()},get fallback(){return(()=>{var P=U4();return w(P,()=>_("common.loading")),P})()},get children(){var P=z4(),ne=P.firstChild,Y=ne.firstChild,K=Y.nextSibling,ce=ne.nextSibling,z=ce.firstChild,k=z.nextSibling;return w(P,f(An,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return t()},onChange:O=>B(O),get children(){return[f(Ti,{class:"mb-1.5 w-full font-medium",get children(){return _("globalConfig.agentDefault")}}),J(()=>["claude","opencode","codex"].map(O=>f(en,{value:O,class:"flex items-center gap-1.5",get children(){return[f(Jt,{}),f(un,{}),f(Qt,{class:"cursor-pointer",get children(){return C(O)}})]}})))]}}),ne),w(Y,()=>_("globalConfig.sessionEnd")),w(K,f(ki,{get checked(){return r()},onChange:N,class:"flex items-center gap-2",get children(){return[f(Ai,{}),f(Gs,{get children(){return _("globalConfig.banner")}})]}}),null),w(K,f(ki,{get checked(){return i()},onChange:W,class:"flex items-center gap-2",get children(){return[f(Ai,{}),f(Gs,{get children(){return _("globalConfig.sound")}})]}}),null),w(P,f(An,{class:"m-0 flex flex-wrap gap-2 border-0 p-0",get value(){return a()},onChange:O=>R(O),get children(){return[f(Ti,{class:"mb-1.5 w-full font-medium",get children(){return _("globalConfig.powerTitle")}}),J(()=>["system-default","prevent-display-sleep","keep-system-awake"].map(O=>f(en,{value:O,class:"flex items-center gap-1.5",get children(){return[f(Jt,{}),f(un,{}),f(Qt,{class:"cursor-pointer",get children(){return j(O)}})]}})))]}}),ce),w(z,()=>_("globalConfig.shortcutsTitle")),w(k,f(rt,{each:E1,children:O=>(()=>{var Z=K4(),re=Z.firstChild,F=re.firstChild,q=F.nextSibling;return w(F,()=>L(O)),w(q,()=>$(O)),w(Z,f(Ee,{type:"button",variant:"outline",size:"sm",onClick:()=>g(O),get children(){return J(()=>d()===O)()?_("globalConfig.shortcutRecordingButton"):_("globalConfig.shortcutRecord")}}),null),w(Z,f(Ee,{type:"button",variant:"ghost",size:"sm",onClick:()=>V(O),get disabled(){return $(O)===so[O]},get children(){return _("globalConfig.shortcutReset")}}),null),Le(()=>xt(q,`m-0 font-mono text-sm ${x().has(O)?"text-destructive":"text-muted-foreground"}`)),Z})()})),w(ce,f(G,{get when(){return x().size>0},get children(){var O=B4();return w(O,()=>_("globalConfig.shortcutConflict")),O}}),null),w(P,(()=>{var O=J(()=>!!v());return()=>O()&&(()=>{var Z=j4();return w(Z,v),Z})()})(),null),P}})]}})}})},q4=200,G4=8e3;async function V4({id:e,list:t,intervalMs:n=q4,timeoutMs:r=G4,sleep:o=W4}){const i=Math.max(1,n),s=Math.max(1,Math.ceil(r/i)+1);for(let a=0;a<s;a++){try{if(!(await t()).some(c=>c.id===e))return!0}catch{}a<s-1&&await o(i)}return!1}function W4(e){return new Promise(t=>window.setTimeout(t,e))}var Y4=M('<span class="absolute right-2 top-2 h-2 w-2 rounded-full bg-destructive">'),Z4=M('<div class="border-b px-3 py-2">'),X4=M('<div class="max-h-96 overflow-auto p-2">'),J4=M('<div class="rounded-md px-2 py-2 text-sm"><div class="flex items-center gap-3"><div class="min-w-0 flex-1"><div class=font-medium></div><p class="mt-1 text-xs leading-5 text-muted-foreground"></p></div><div class="flex shrink-0 items-center gap-1 self-center">');function Q4(){const[e,t]=D([]),[n,r]=D(null);async function o(){try{t(await me.listSystemNotifications())}catch{}}te(()=>{o();const u=a_(()=>void o());oe(u)});async function i(u){r(u);try{await me.deleteSystemNotification(u),await o()}finally{r(null)}}async function s(u){r(u);try{await me.updateSystemNotification(u),await o()}finally{r(null)}}async function a(u){r(u);try{await me.restartSystemNotification(u),t(c=>c.filter(l=>l.id!==u)),await V4({id:u,list:me.listSystemNotifications}),window.location.reload()}finally{r(null)}}return f(G,{get when(){return e().length>0},get children(){return f(Nl,{placement:"bottom-start",get children(){return[f(Rl,{as:Ee,variant:"ghost",size:"icon",class:"relative h-8 w-8",get title(){return _("systemNotifications.title")},get children(){return[f(lx,{class:"h-4 w-4"}),Y4()]}}),f(Ml,{class:"w-[26rem] max-w-[calc(100vw-2rem)] p-0",get children(){return[(()=>{var u=Z4();return w(u,f(JC,{class:"text-sm font-semibold",get children(){return _("systemNotifications.title")}})),u})(),(()=>{var u=X4();return w(u,f(rt,{get each(){return e()},children:c=>(()=>{var l=J4(),d=l.firstChild,g=d.firstChild,h=g.firstChild,p=h.nextSibling,m=g.nextSibling;return w(h,()=>eM(c)),w(p,()=>tM(c)),w(m,f(G,{get when(){return c.kind==="version-update"},get children(){return f(G,{get when(){return c.action==="restart-ready"},get fallback(){return f(Ee,{variant:"ghost",size:"sm",class:"h-7 px-2 hover:bg-primary hover:text-primary-foreground",get disabled(){return n()===c.id||c.action==="updating"},onClick:()=>void s(c.id),get children(){return f(G,{get when(){return n()===c.id||c.action==="updating"},get fallback(){return _("systemNotifications.update")},get children(){return[f(Sw,{class:"mr-1 h-3.5 w-3.5 animate-spin"}),J(()=>_("systemNotifications.updating"))]}})}})},get children(){return f(Cb,{openDelay:150,closeDelay:0,get children(){return[f(Sb,{as:Ee,variant:"ghost",size:"sm",class:"h-7 px-2 hover:bg-primary hover:text-primary-foreground",get disabled(){return n()===c.id},onClick:()=>void a(c.id),get children(){return _("systemNotifications.restart")}}),f(kb,{get children(){return _("systemNotifications.restartTooltip")}})]}})}})}}),null),w(m,f(Ee,{variant:"ghost",size:"icon",class:"h-7 w-7 shrink-0 text-destructive hover:bg-destructive/10 hover:text-destructive",get title(){return _("systemNotifications.delete")},get disabled(){return n()===c.id},onClick:()=>void i(c.id),get children(){return f(Jc,{class:"h-4 w-4"})}}),null),l})()})),u})()]}})]}})}})}function eM(e){return e.kind==="version-update"?_("systemNotifications.versionTitle"):e.title}function tM(e){return e.kind!=="version-update"?e.message:_("systemNotifications.versionMessage",{current:e.metadata?.currentVersion??"",latest:e.metadata?.latestVersion??""})}function nM(e,t){return typeof t=="number"?t===0?null:t<0?"back":"forward":aR(e,f1(t))}var Tp=M('<div class="px-2 py-1 text-xs text-muted-foreground">'),rM=M('<div class="flex h-full flex-col"><header class="flex h-12 shrink-0 items-center gap-2 border-b bg-card px-4"><div class="ml-auto flex items-center gap-2"></div></header><div class="flex min-h-0 flex-1"><main class="vt-page flex min-h-0 min-w-0 flex-1 flex-col overflow-auto">');const oM=[{mode:"system",labelKey:"shell.themeSystem",icon:iw},{mode:"light",labelKey:"shell.themeLight",icon:Mw},{mode:"dark",labelKey:"shell.themeDark",icon:uw}],iM=[{name:"terminal",labelKey:"shell.themeTerminal"},{name:"graphite",labelKey:"shell.themeGraphite"},{name:"paper",labelKey:"shell.themePaper"}],sM="https://github.com/hughfenghen/YorZ/blob/main/docs",aM=e=>{const t=qo(),n=go();lR({resolveDirection:nM});const{lng:r,changeLanguage:o}=gb(),[i,s]=D(!1),a=ee(()=>t.pathname===Mt("specs/new")),u=ee(()=>`${sM}/${r().startsWith("en")?"User-Guide.md":"User-Guide-CN.md"}`);function c(m){m!==r()&&(o(m),li(b=>({...b,appearance:{...b.appearance,language:m}})))}function l(m){gh(m),li(b=>({...b,appearance:{...b.appearance,themeMode:m}}))}function d(m){Wv(m),li(b=>({...b,appearance:{...b.appearance,themeName:m}}))}function g(){if(!ht())return;const m=Mt("specs/new");a()?window.open(m,"_blank","noopener"):n(m)}function h(m){const b=Js(_r().shortcuts);if(m===b.newSpec)return g(),!0;if(m===b.projectSettings)return t_(),!0;if(m===b.toggleSpecDetailFullscreen){const v=e_();return v?(v(),!0):!1}return!1}const p=m=>{if(m.defaultPrevented)return;const b=S1(m);if(!b)return;const v=Js(_r().shortcuts),y=b===v.toggleSpecDetailFullscreen||b===v.projectSettings;P4(m.target)&&!y||b!==so.newSpec&&b!==so.projectSettings&&b!==so.toggleSpecDetailFullscreen&&!Object.values(_r().shortcuts).includes(b)||h(b)&&m.preventDefault()};return Dn(()=>{tN(),window.addEventListener("keydown",p)}),oe(()=>window.removeEventListener("keydown",p)),te(()=>{const m=t.pathname.match(/^\/([^/]+)/);Zw(m&&m[1]!=="api"?m[1]:"")}),(()=>{var m=rM(),b=m.firstChild,v=b.firstChild,y=b.nextSibling,x=y.firstChild;return w(b,f(Pn,{href:"/",class:"text-lg font-bold",children:"YorZ"}),v),w(b,f(Q4,{}),v),w(v,f(G,{get when(){return ht()},get children(){return f(Ee,{as:Pn,get href(){return Mt("specs/new")},get target(){return a()?"_blank":void 0},get rel(){return a()?"noopener":void 0},variant:"default",size:"sm",get children(){return[f(Pi,{class:"mr-1 h-4 w-4"}),J(()=>_("shell.newSpec"))]}})}}),null),w(v,f(Il,{placement:"bottom-end",get children(){return[f(Dl,{as:Ee,variant:"ghost",size:"icon",get title(){return _("shell.settingsMenu")},get children(){return f(Qx,{class:"h-4 w-4"})}}),f(Ol,{get children(){return[f(kf,{get children(){return[f(Af,{"data-submenu":"language",get children(){return[f(qx,{class:"mr-2 h-4 w-4"}),J(()=>_("shell.languageSwitch"))]}}),f(Tf,{get children(){return[f(Zn,{onSelect:()=>c("zh-CN"),get children(){return[f(cs,{get class(){return`mr-2 h-4 w-4 ${r()==="zh-CN"?"opacity-100":"opacity-0"}`}}),J(()=>_("shell.langZh"))]}}),f(Zn,{onSelect:()=>c("en"),get children(){return[f(cs,{get class(){return`mr-2 h-4 w-4 ${r()==="en"?"opacity-100":"opacity-0"}`}}),J(()=>_("shell.langEn"))]}})]}})]}}),f(kf,{get children(){return[f(Af,{"data-submenu":"theme",get children(){return[f(dw,{class:"mr-2 h-4 w-4"}),J(()=>_("shell.themeSwitch"))]}}),f(Tf,{get children(){return[(()=>{var E=Tp();return w(E,()=>_("shell.themeModeGroup")),E})(),f(rt,{each:oM,children:E=>f(Zn,{get"data-theme-option"(){return E.mode},onSelect:()=>l(E.mode),get children(){return[f(cs,{get class(){return`mr-2 h-4 w-4 ${$s()===E.mode?"opacity-100":"opacity-0"}`}}),f(E.icon,{class:"mr-2 h-4 w-4 text-muted-foreground"}),J(()=>_(E.labelKey))]}})}),f(Rc,{}),(()=>{var E=Tp();return w(E,()=>_("shell.themeNameGroup")),E})(),f(rt,{each:iM,children:E=>f(Zn,{get"data-theme-name-option"(){return E.name},onSelect:()=>d(E.name),get children(){return[f(cs,{get class(){return`mr-2 h-4 w-4 ${Fs()===E.name?"opacity-100":"opacity-0"}`}}),J(()=>_(E.labelKey))]}})})]}})]}}),f(Rc,{}),f(Zn,{onSelect:()=>s(!0),get children(){return[f(Dw,{class:"mr-2 h-4 w-4"}),J(()=>_("shell.globalConfig"))]}}),f(Zn,{as:"a","data-menu-item":"user-guide",get href(){return u()},target:"_blank",rel:"noopener noreferrer",get children(){return[f(gx,{class:"mr-2 h-4 w-4"}),J(()=>_("shell.userGuide"))]}})]}})]}}),null),w(y,f($R,{}),x),w(y,f(M4,{}),x),w(x,()=>e.children),w(m,f(MC,{position:"top-center"}),null),w(m,f(H4,{get open(){return i()},onClose:()=>s(!1)}),null),m})()};Zv({persistHint:!1});const k1=document.getElementById("app");if(!k1)throw new Error("missing #app root");sy(()=>f(Vy,{root:aM,get children(){return[f(gr,{path:"/",component:oR}),f(gr,{path:"/:projectId",component:Ek}),f(gr,{path:"/:projectId/git",component:KO}),f(gr,{path:"/:projectId/commands/:runId",component:tR}),f(gr,{path:"/:projectId/specs/new",component:w3}),f(gr,{path:"/:projectId/specs/:id",component:U6}),f(gr,{path:"/:projectId/specs/:id/review",component:MO}),f(gr,{path:"/:projectId/specs/:id/debug",component:zO}),f(gr,{path:"*",component:d1})]}}),k1);queueMicrotask(()=>{const e=document.body,t=document.documentElement;console.log("[body-overflow-diagnostic]",{bodyScrollHeight:e.scrollHeight,bodyClientHeight:e.clientHeight,docScrollHeight:t.scrollHeight,docClientHeight:t.clientHeight,windowInnerHeight:window.innerHeight,bodyOverflowing:e.scrollHeight>e.clientHeight,docOverflowing:t.scrollHeight>t.clientHeight})});export{xI as _,Ma as g};