@tequila99/githuman 0.13.0 → 0.13.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 (149) hide show
  1. package/dist/server/db/artifact-validation-migrations.js +6 -0
  2. package/dist/server/errors/artifacts.js +1 -0
  3. package/dist/server/repositories/artifact-validation.repo.js +17 -0
  4. package/dist/server/routes/artifact-actions.js +9 -0
  5. package/dist/server/routes/artifact-agent.js +8 -0
  6. package/dist/server/services/artifact-validation-jobs.service.js +82 -49
  7. package/dist/shared/artifact-tools/descriptions.js +2 -0
  8. package/dist/shared/artifact-tools/schemas.js +8 -1
  9. package/dist/shared/artifacts/schemas.js +13 -2
  10. package/dist/web/assets/{AccessPage-D9xfFUBC.js → AccessPage-Dmu1-YCC.js} +1 -1
  11. package/dist/web/assets/{AddButton-DKNKmS1i.js → AddButton-C58xe78T.js} +1 -1
  12. package/dist/web/assets/{AddToAgentButton-wC1dzbDE.js → AddToAgentButton-Caehgd43.js} +1 -1
  13. package/dist/web/assets/{ArtifactsPage-nRD9XiRm.css → ArtifactsPage-D46E5HIK.css} +1 -1
  14. package/dist/web/assets/{ArtifactsPage-IHUO7SbH.js → ArtifactsPage-DTZTA4AU.js} +1 -1
  15. package/dist/web/assets/{CreateReviewFabButton-D58IHr36.js → CreateReviewFabButton-DVSiNykk.js} +1 -1
  16. package/dist/web/assets/{DialogHeader-BVrtb0Ri.js → DialogHeader-zLgPQKrk.js} +1 -1
  17. package/dist/web/assets/{IndexPage-BJ1EQdlT.js → IndexPage-D_h8rKHo.js} +1 -1
  18. package/dist/web/assets/{MainLayout-CeogGMHH.js → MainLayout-ycdfACNB.js} +4 -4
  19. package/dist/web/assets/{NoteVisualEditor-DqAZZig1.js → NoteVisualEditor-CQqVJBsl.js} +2 -2
  20. package/dist/web/assets/{NotesPage-DXgI-kwN.js → NotesPage-CtxHzvJG.js} +3 -3
  21. package/dist/web/assets/{PdfPreview-ByeBjQMQ.js → PdfPreview-CFMP6Aiw.js} +1 -1
  22. package/dist/web/assets/{ProjectFilePage-DV1anYfN.js → ProjectFilePage-1ZoTdWKE.js} +1 -1
  23. package/dist/web/assets/{QSpace-CVp0CPR_.js → QSpace-BmrklWw-.js} +1 -1
  24. package/dist/web/assets/{QSplitter-K2LjbupZ.js → QSplitter-C8fuuOAP.js} +1 -1
  25. package/dist/web/assets/{ReviewDetailPage-CL4Dmz0L.js → ReviewDetailPage-B9XuqZLn.js} +1 -1
  26. package/dist/web/assets/{ReviewsPage-BPJFTulG.js → ReviewsPage-D0tj2bZD.js} +1 -1
  27. package/dist/web/assets/{SaveButton-Vtjvcbt0.css → SaveButton-C_Uk-Adf.css} +1 -1
  28. package/dist/web/assets/SaveButton-R_HjdOWt.js +3 -0
  29. package/dist/web/assets/{StatusSwitcher-BtbSIr5q.js → StatusSwitcher-fsgwyZPd.js} +1 -1
  30. package/dist/web/assets/{TagFilterField-CPl-BxtL.js → TagFilterField-CmfKZPHR.js} +1 -1
  31. package/dist/web/assets/{TerminalView-B56cEx8g.js → TerminalView-BIknwuLc.js} +1 -1
  32. package/dist/web/assets/{abnfDiagram-O67JEVCF-D_6l0gCA.js → abnfDiagram-O67JEVCF-aCHmj_Pp.js} +1 -1
  33. package/dist/web/assets/{agent-store-Cs-hu1v1.js → agent-store-BV2OAJzn.js} +1 -1
  34. package/dist/web/assets/architecture-7GRP2DOG-BhXPG-R4.js +1 -0
  35. package/dist/web/assets/{architectureDiagram-NJMV4G6O-BFgjp9nL.js → architectureDiagram-NJMV4G6O-CFeMX15R.js} +1 -1
  36. package/dist/web/assets/{blockDiagram-BEXU5L5S-BWfbJk26.js → blockDiagram-BEXU5L5S-DNKI8TuU.js} +1 -1
  37. package/dist/web/assets/{c4Diagram-YGBWAQC7-oIqgOwQa.js → c4Diagram-YGBWAQC7-ChXo3l8L.js} +1 -1
  38. package/dist/web/assets/channel-Cu3Nk4LM.js +1 -0
  39. package/dist/web/assets/{chunk-3FUC2YCW-WI2pliXT.js → chunk-3FUC2YCW-0nm_NDgT.js} +1 -1
  40. package/dist/web/assets/{chunk-5DYCD2WN-DYvaF8o2.js → chunk-5DYCD2WN-C58aRWSu.js} +1 -1
  41. package/dist/web/assets/{chunk-742MDFTN-xd7B3x5h.js → chunk-742MDFTN-C6l3D224.js} +1 -1
  42. package/dist/web/assets/{chunk-7INBJB4K-nsyx3RGB.js → chunk-7INBJB4K-DLyHAyF6.js} +1 -1
  43. package/dist/web/assets/{chunk-7M6MHVWA-BxPQ9AEv.js → chunk-7M6MHVWA-CbFCWaeF.js} +1 -1
  44. package/dist/web/assets/{chunk-7PRAP22T-CvHw2y-F.js → chunk-7PRAP22T-uKx0VBKu.js} +1 -1
  45. package/dist/web/assets/{chunk-GTNCS2PH-DIfN1SOI.js → chunk-GTNCS2PH-BfITava8.js} +1 -1
  46. package/dist/web/assets/{chunk-GWA4HPMP-2WZX1fG-.js → chunk-GWA4HPMP-r1dIv3WY.js} +1 -1
  47. package/dist/web/assets/{chunk-MBY4JIJT-BL7akw7q.js → chunk-MBY4JIJT-B32SiYZc.js} +1 -1
  48. package/dist/web/assets/{chunk-NETBCI7D-CQX1tY3W.js → chunk-NETBCI7D-BJDpswNY.js} +1 -1
  49. package/dist/web/assets/{chunk-O7XYJQB3-CtGXf4J6.js → chunk-O7XYJQB3-oJNN75W6.js} +1 -1
  50. package/dist/web/assets/{chunk-UA2S7LBM-C_3M_IIp.js → chunk-UA2S7LBM-6edzXzPi.js} +1 -1
  51. package/dist/web/assets/{chunk-WEXAMYUT-6MO559WJ.js → chunk-WEXAMYUT-DyPRB2PO.js} +1 -1
  52. package/dist/web/assets/{chunk-Z7XXMR3K-CHJ55IlF.js → chunk-Z7XXMR3K-oLw57LFn.js} +1 -1
  53. package/dist/web/assets/{chunk-ZIGJFQKS-533qcfPb.js → chunk-ZIGJFQKS-CJBzn5zg.js} +1 -1
  54. package/dist/web/assets/{classDiagram-v2-NBCMYWYE-CFySVswx.js → classDiagram-v2-NBCMYWYE-CGtUk3Eo.js} +1 -1
  55. package/dist/web/assets/{cynefin-OW5HDTMX-Dfg_2VTu.js → cynefin-OW5HDTMX-B2067LSs.js} +1 -1
  56. package/dist/web/assets/{cynefinDiagram-VND7K2PF-DaSXiPph.js → cynefinDiagram-VND7K2PF-BTclidTB.js} +1 -1
  57. package/dist/web/assets/{dagre-6A5THRUB-D7d1gbRO.js → dagre-6A5THRUB-DB4EkNP1.js} +1 -1
  58. package/dist/web/assets/{date-snFAXn1W.js → date-CGiGHbuG.js} +1 -1
  59. package/dist/web/assets/{devices-store-DB_tWC1Q.js → devices-store-B8mC7cJR.js} +1 -1
  60. package/dist/web/assets/{diagram-22UHCM2B-CNuTss_x.js → diagram-22UHCM2B-BZBpUYfR.js} +1 -1
  61. package/dist/web/assets/{diagram-3UASUU5V--Rt3-ARV.js → diagram-3UASUU5V-B3HmzPy0.js} +1 -1
  62. package/dist/web/assets/{diagram-ATOU4E4O-BP79L-gP.js → diagram-ATOU4E4O-qofz53Y-.js} +1 -1
  63. package/dist/web/assets/{diagram-CDSNMT55-CRO5cocs.js → diagram-CDSNMT55-tTpd7EcE.js} +1 -1
  64. package/dist/web/assets/{diagram-MLGK6HIB-Difu0Zmh.js → diagram-MLGK6HIB-CedlreDP.js} +1 -1
  65. package/dist/web/assets/{diagram-MPIPVDR6-grQ3ie17.js → diagram-MPIPVDR6-CTlN_TMA.js} +1 -1
  66. package/dist/web/assets/{diff-store-D4XiTkfi.js → diff-store-DCqGPv2R.js} +1 -1
  67. package/dist/web/assets/{dist-Du5VPTAq.js → dist-BHgrth9o.js} +1 -1
  68. package/dist/web/assets/{dist-BU-fZfEv.js → dist-BS_doyKJ.js} +1 -1
  69. package/dist/web/assets/{dist-DyBqP777.js → dist-BuXYTGDD.js} +1 -1
  70. package/dist/web/assets/{dist-BeUB43Ur.js → dist-CF9ODvoZ.js} +1 -1
  71. package/dist/web/assets/{dist-DNrP7O-J.js → dist-CFdeFDlk.js} +1 -1
  72. package/dist/web/assets/{dist-9rzCziV2.js → dist-Cv-Fe2Re.js} +1 -1
  73. package/dist/web/assets/{dist-B9i6cUYu.js → dist-DAm4VXST.js} +1 -1
  74. package/dist/web/assets/{dist-DFjLCq-0.js → dist-DlzjGKj2.js} +1 -1
  75. package/dist/web/assets/{dist-BxIdk5Al.js → dist-DwGuvnij.js} +1 -1
  76. package/dist/web/assets/{dist-By534Syk.js → dist-SkTbIIlQ.js} +1 -1
  77. package/dist/web/assets/{dist-75uxNoTf.js → dist-fjYccora.js} +1 -1
  78. package/dist/web/assets/{ebnfDiagram-ZINNZB2B-DX2rcvMK.js → ebnfDiagram-ZINNZB2B-Di4zjxQE.js} +1 -1
  79. package/dist/web/assets/{elk-276RUBZZ-DSHIl9hv.js → elk-276RUBZZ-CjtSBFK8.js} +1 -1
  80. package/dist/web/assets/{erDiagram-OPXOYQCR-BIZVJO8N.js → erDiagram-OPXOYQCR-BAOsBVor.js} +1 -1
  81. package/dist/web/assets/eventmodeling-NTZA5JFV-BTRmtj-P.js +1 -0
  82. package/dist/web/assets/flowDiagram-KWPJA3E3-BnACTh86.js +1 -0
  83. package/dist/web/assets/{ganttDiagram-FUAMR5RP-D4kPfh4X.js → ganttDiagram-FUAMR5RP-CdIWLsvk.js} +1 -1
  84. package/dist/web/assets/{gitGraph-4MIJSDKK-B41R-oAb.js → gitGraph-4MIJSDKK-CiEyJnox.js} +1 -1
  85. package/dist/web/assets/{gitGraphDiagram-X574FWY7-xXrZiSJI.js → gitGraphDiagram-X574FWY7-Dqbm_rnl.js} +1 -1
  86. package/dist/web/assets/i18n-DQIEbAYL.js +1 -0
  87. package/dist/web/assets/{icons-BIOTvmdT.js → icons-32lVhhPQ.js} +1 -1
  88. package/dist/web/assets/{index-B1Bugudn.js → index-CstRcwnO.js} +2 -2
  89. package/dist/web/assets/{info-A6RAGUB7-CgSmK-La.js → info-A6RAGUB7-B7ToPgJe.js} +1 -1
  90. package/dist/web/assets/{infoDiagram-VRGFBTTK-CDNEJ_R-.js → infoDiagram-VRGFBTTK-BG80lPJs.js} +1 -1
  91. package/dist/web/assets/{init-app-C3tD3faT.js → init-app-CJnqt1pf.js} +1 -1
  92. package/dist/web/assets/{ishikawaDiagram-OU5B5YK6-ZcU1IxFn.js → ishikawaDiagram-OU5B5YK6-npZEyIq2.js} +1 -1
  93. package/dist/web/assets/{journeyDiagram-ZHPQQLJL-g-8ZRhJj.js → journeyDiagram-ZHPQQLJL-B-tnjlCW.js} +1 -1
  94. package/dist/web/assets/{kanban-definition-PNTS6WVX-nfsfxVOE.js → kanban-definition-PNTS6WVX-BD6VBvkF.js} +1 -1
  95. package/dist/web/assets/{line-BpuX_ban.js → line-B-rS1U0C.js} +1 -1
  96. package/dist/web/assets/{markdown-ogvtoQzt.js → markdown-B6YvDSFL.js} +1 -1
  97. package/dist/web/assets/{mermaid-parser.core-BBj_ep7Z.js → mermaid-parser.core-kANV9P4V.js} +3 -3
  98. package/dist/web/assets/{mermaid.core-DP4USVSM.js → mermaid.core-ImeEME4Y.js} +4 -4
  99. package/dist/web/assets/{mindmap-definition-NLK3R4M7-C5GhUvi3.js → mindmap-definition-NLK3R4M7-Cg9Hkqnh.js} +1 -1
  100. package/dist/web/assets/{packet-AYTQ26CC-BIdb-vfg.js → packet-AYTQ26CC-dKpEZS3R.js} +1 -1
  101. package/dist/web/assets/{pegDiagram-GJSIUBJH-DH-SdKj6.js → pegDiagram-GJSIUBJH-DSTd7SKp.js} +1 -1
  102. package/dist/web/assets/{pie-WAS4IAKB-Du3-jRjK.js → pie-WAS4IAKB-NrwitlRB.js} +1 -1
  103. package/dist/web/assets/{pieDiagram-5QR66LMP-CJh2ngqY.js → pieDiagram-5QR66LMP-vWxrQ_73.js} +1 -1
  104. package/dist/web/assets/pinia-C077q3zy.js +1 -0
  105. package/dist/web/assets/{preview-store-DOnSmm_C.js → preview-store-C47JAa3k.js} +1 -1
  106. package/dist/web/assets/{project-files-store-CHP6RYFI.js → project-files-store-DPvUB6jk.js} +1 -1
  107. package/dist/web/assets/{quadrantDiagram-O4NWA36T-DYsSScxc.js → quadrantDiagram-O4NWA36T-BrazmucR.js} +1 -1
  108. package/dist/web/assets/{radar-RG4KPBEZ-BBjvaVVB.js → radar-RG4KPBEZ-Ltw4_W0Z.js} +1 -1
  109. package/dist/web/assets/{railroad-74A4TZTK-B-CRncBU.js → railroad-74A4TZTK-Bsvkcqwe.js} +1 -1
  110. package/dist/web/assets/railroad-abnf-HS5TGJTU-DzeS0TZG.js +1 -0
  111. package/dist/web/assets/railroad-ebnf-LZEXJU2U-DOMFcjan.js +1 -0
  112. package/dist/web/assets/railroad-peg-WCYAUIDC-Boo02G-z.js +1 -0
  113. package/dist/web/assets/{railroadDiagram-XR7U4H2S-hqp-2UHb.js → railroadDiagram-XR7U4H2S-Drf-1KoA.js} +1 -1
  114. package/dist/web/assets/{requirementDiagram-PLB6GJNP-Dhuw5jcQ.js → requirementDiagram-PLB6GJNP-RQQXWoKw.js} +1 -1
  115. package/dist/web/assets/{safe-storage-BchoYSbq.js → safe-storage-CCnof8j6.js} +1 -1
  116. package/dist/web/assets/{sankeyDiagram-IPEJSGJF-D5rCIxGR.js → sankeyDiagram-IPEJSGJF-DjkRjZ96.js} +1 -1
  117. package/dist/web/assets/{sequenceDiagram-PO4LG4MO-YEHR4Mp-.js → sequenceDiagram-PO4LG4MO-BnYL3Nyj.js} +1 -1
  118. package/dist/web/assets/{stateDiagram-v2-GCMORJYK-9iWmz6Xf.js → stateDiagram-v2-GCMORJYK-Cx-m_iwa.js} +1 -1
  119. package/dist/web/assets/{swimlanes-2SLR337P-Cjwvgt_n.js → swimlanes-2SLR337P-Eq9rHxT4.js} +1 -1
  120. package/dist/web/assets/swimlanesDiagram-TC7HE7FX-C1gvms2M.js +8 -0
  121. package/dist/web/assets/{terminal-store-i7HHlWzR.js → terminal-store-CDMBoz3b.js} +1 -1
  122. package/dist/web/assets/theme-DFHUOPmw.js +1 -0
  123. package/dist/web/assets/{timeline-definition-EJHVYXUP-Cd5n2-Py.js → timeline-definition-EJHVYXUP-DZ8AD5x7.js} +1 -1
  124. package/dist/web/assets/{treeView-Q6P3EWNA-C_QH9vtR.js → treeView-Q6P3EWNA-PHr7W0fs.js} +1 -1
  125. package/dist/web/assets/{treemap-WGGIJYW6-CVnU7TVz.js → treemap-WGGIJYW6-cMDLpLd1.js} +1 -1
  126. package/dist/web/assets/{use-add-agent-context-D5VqMr0p.js → use-add-agent-context-ZAOlkMkH.js} +1 -1
  127. package/dist/web/assets/{use-app-theme-DgC4ivPF.js → use-app-theme-Cp7uwqoM.js} +1 -1
  128. package/dist/web/assets/{use-row-height-BgHg4-J-.js → use-row-height-FkeCYR5M.js} +1 -1
  129. package/dist/web/assets/{use-workspace-navigation-Dq-Aw8Xq.js → use-workspace-navigation-BX_9XPWm.js} +1 -1
  130. package/dist/web/assets/{usecaseDiagram-POWQR4AR-Cbj2Pvab.js → usecaseDiagram-POWQR4AR-oTDoBpor.js} +1 -1
  131. package/dist/web/assets/{vennDiagram-UO4OBE2U-2j79YqCN.js → vennDiagram-UO4OBE2U-BSLtd6XL.js} +1 -1
  132. package/dist/web/assets/{wardley-WFR3VGLG-wsMK7zm3.js → wardley-WFR3VGLG-C4C0SgxA.js} +1 -1
  133. package/dist/web/assets/{wardleyDiagram-VNRHLVJA-D6PKTQIJ.js → wardleyDiagram-VNRHLVJA-RjwVQTqN.js} +1 -1
  134. package/dist/web/assets/{workspace-navigation-CoXKJJpP.js → workspace-navigation-kGtTYXtT.js} +1 -1
  135. package/dist/web/assets/{xychartDiagram-PMCCYNJV-D1fQN7KG.js → xychartDiagram-PMCCYNJV-BPvXe6DY.js} +1 -1
  136. package/dist/web/index.html +1 -1
  137. package/package.json +1 -1
  138. package/dist/web/assets/SaveButton-D1q2suzR.js +0 -3
  139. package/dist/web/assets/architecture-7GRP2DOG-KT2-_RA5.js +0 -1
  140. package/dist/web/assets/channel-CAhty-fl.js +0 -1
  141. package/dist/web/assets/eventmodeling-NTZA5JFV-Bh_xDKx6.js +0 -1
  142. package/dist/web/assets/flowDiagram-KWPJA3E3-DXkIxaXL.js +0 -1
  143. package/dist/web/assets/i18n-Cfw_OfRR.js +0 -1
  144. package/dist/web/assets/pinia-mdReENsc.js +0 -1
  145. package/dist/web/assets/railroad-abnf-HS5TGJTU-D37zpoYN.js +0 -1
  146. package/dist/web/assets/railroad-ebnf-LZEXJU2U-ZnMxH6Ym.js +0 -1
  147. package/dist/web/assets/railroad-peg-WCYAUIDC-Dg3g-VsM.js +0 -1
  148. package/dist/web/assets/swimlanesDiagram-TC7HE7FX-gJwxhWoO.js +0 -8
  149. package/dist/web/assets/theme-CQ9InaWa.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-BeUB43Ur.js","assets/dist-D2Ce45aH.js","assets/dist-3B0OaUZ-.js","assets/dist-BY24_62d.js","assets/dist-C3sBgvRy.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/dist-By534Syk.js","assets/dist-DyBqP777.js","assets/dist-Du5VPTAq.js","assets/dist-DpKJcdvz.js","assets/dist-DNrP7O-J.js","assets/dist-D7Llw4iH.js","assets/dist-CqGqStPp.js","assets/dist-B9i6cUYu.js","assets/dist-BU-fZfEv.js","assets/dist-BxIdk5Al.js","assets/dist-75uxNoTf.js","assets/dist-DZQ2IsS9.js","assets/dist-DUt0feNB.js","assets/dist-LFPPEX39.js","assets/dist-DuZv0LJj.js","assets/dist-lC0EKTFH.js","assets/dockerfile-DJkHQgkl.js","assets/simple-mode-DXiLM1-G.js","assets/factor-LKH5gN8L.js","assets/nsis-viPvXFiq.js","assets/pug-3K-JMW4g.js","assets/javascript-Bu8mWwtz.js","assets/dist-DFjLCq-0.js","assets/dist-9rzCziV2.js"])))=>i.map(i=>d[i]);
2
- import{i as e,n as t,t as n}from"./rolldown-runtime-Dd_uD5pT.js";import{A as r,D as i,I as a,M as o,N as s,Nt as c,O as l,P as u,Pt as d,S as f,X as p,Y as m,Z as h,d as g,dt as _,f as v,g as y,gt as b,ht as x,l as S,lt as C,o as ee,p as te,q as ne,r as re,u as ie,y as ae}from"./runtime-core.esm-bundler-DDnHUoIy.js";import{m as oe}from"./use-router-link-D7geCGQI.js";import{v as w}from"./index-B1Bugudn.js";import{$ as se,A as ce,At as le,B as ue,Ct as de,Dt as fe,E as pe,Et as me,F as he,G as ge,H as _e,I as ve,J as ye,K as be,L as xe,Nt as Se,O as Ce,Ot as we,P as T,Q as Te,R as Ee,S as De,St as Oe,T as ke,Tt as Ae,U as je,V as Me,W as Ne,X as Pe,Y as Fe,Z as Ie,_t as Le,a as E,at as Re,bt as ze,c as Be,ct as Ve,dt as He,et as Ue,f as We,ft as Ge,g as Ke,gt as qe,ht as Je,it as Ye,j as Xe,kt as Ze,l as Qe,lt as $e,mt as et,n as tt,nt,o as rt,ot as it,pt as D,q as at,rt as ot,st,t as ct,tt as lt,ut,v as dt,vt as ft,w as pt,wt as mt,x as ht,xt as gt,yt as _t,z as vt}from"./dist-D2Ce45aH.js";import{t as yt}from"./purify.es--06brOip.js";import{_ as bt,k as xt,w as St}from"./isArrayLikeObject-BbaDyxId.js";import{h as Ct,l as wt,n as Tt,t as Et}from"./_baseMerge-BzZFQ6mI.js";import{n as Dt,t as Ot}from"./ccount-CcG1m-Yh.js";import{$ as kt,Ct as At,D as jt,Dt as Mt,Et as Nt,F as Pt,Ft,I as It,It as Lt,Jt as Rt,L as zt,Mt as Bt,O as Vt,Xt as Ht,Yt as Ut,Zt as Wt,_ as Gt,at as Kt,ct as qt,dt as Jt,et as Yt,ft as Xt,g as Zt,ht as Qt,it as $t,lt as en,mt as tn,nt as nn,ot as rn,pt as an,qt as on,rt as sn,st as cn,tn as ln,tt as un,ut as dn,vt as fn,w as pn,y as mn}from"./mdi-Du7sIqtH.js";import{n as hn}from"./single-flight-CyDZB3rb.js";import{b as gn,p as _n}from"./agent-store-Cs-hu1v1.js";import{i as vn}from"./QSpace-CVp0CPR_.js";import{c as yn}from"./workspace-navigation-CoXKJJpP.js";import{r as bn}from"./use-add-agent-context-D5VqMr0p.js";import{a as xn,n as Sn,o as Cn,r as wn}from"./markdown-ogvtoQzt.js";import{n as Tn}from"./AddButton-DKNKmS1i.js";import{t as En}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{C as Dn,D as On,E as kn,S as An,T as jn,_ as Mn,a as Nn,b as Pn,c as Fn,d as In,f as Ln,g as Rn,h as zn,i as Bn,l as Vn,m as Hn,n as Un,o as Wn,p as Gn,r as Kn,s as qn,u as Jn,v as Yn,w as Xn,x as Zn,y as Qn}from"./NotesPage-DXgI-kwN.js";var $n=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=Xe(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(or(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e==`abort`&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function er(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function tr(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=er(t)+er(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function nr(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:tr(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function rr(e,t){return n=>{for(let t=Xe(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}var ir=class{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function ar(e){return e.selection.main.from}function or(e,t){let{source:n}=e,r=t&&n[0]!=`^`,i=n[n.length-1]!=`$`;return!r&&!i?e:RegExp(`${r?`^`:``}(?:${n})${i?`$`:``}`,e.flags??(e.ignoreCase?`i`:``))}var sr=Ve.define();function cr(e,t,n,r){let{main:i}=e.selection,a=n-i.from,o=r-i.from;return{...e.changeByRange(s=>{if(s!=i&&n!=r&&e.sliceDoc(s.from+a,s.from+o)!=e.sliceDoc(n,r))return{range:s};let c=e.toText(t);return{changes:{from:s.from+a,to:r==i.from?s.to:s.from+o,insert:c},range:D.cursor(s.from+a+c.length)}}),scrollIntoView:!0,userEvent:`input.complete`}}var lr=new WeakMap;function ur(e){if(!Array.isArray(e))return e;let t=lr.get(e);return t||lr.set(e,t=nr(e)),t}var dr=gt.define(),fr=gt.define(),pr=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=Ae(e,t),r=me(n);this.chars.push(n);let i=e.slice(t,t+r),a=i.toUpperCase();this.folded.push(Ae(a==i?i.toLowerCase():a,0)),t+=r}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:i,byWord:a}=this;if(t.length==1){let r=Ae(e,0),i=me(r),a=i==e.length?0:-100;if(r!=t[0]){if(r==n[0])a+=-200;else return null}return this.ret(a,[0,i])}let o=e.indexOf(this.pattern);if(o==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let s=t.length,c=0;if(o<0){for(let i=0,a=Math.min(e.length,200);i<a&&c<s;){let a=Ae(e,i);(a==t[c]||a==n[c])&&(r[c++]=i),i+=me(a)}if(c<s)return null}let l=0,u=0,d=!1,f=0,p=-1,m=-1,h=/[a-z]/.test(e),g=!0;for(let r=0,c=Math.min(e.length,200),_=0;r<c&&u<s;){let c=Ae(e,r);o<0&&(l<s&&c==t[l]&&(i[l++]=r),f<s&&(c==t[f]||c==n[f]?(f==0&&(p=r),m=r+1,f++):f=0));let v,y=c<255?c>=48&&c<=57||c>=97&&c<=122?2:+(c>=65&&c<=90):(v=le(c))==v.toLowerCase()?v==v.toUpperCase()?0:2:1;(!r||y==1&&h||_==0&&y!=0)&&(t[u]==c||n[u]==c&&(d=!0)?a[u++]=r:a.length&&(g=!1)),_=y,r+=me(c)}return u==s&&a[0]==0&&g?this.result(-100+(d?-200:0),a,e):f==s&&p==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):f==s?this.ret(-900-e.length,[p,m]):u==s?this.result(-100+(d?-200:0)+-700+(g?0:-1100),a,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,n){let r=[],i=0;for(let e of t){let t=e+(this.astral?me(Ae(n,e)):1);i&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return this.ret(e-n.length,r)}},mr=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}},hr=Je.define({combine(e){return fe(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>``,optionClass:()=>``,aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:_r,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>gr(e(n),t(n)),optionClass:(e,t)=>n=>gr(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function gr(e,t){return e?t?e+` `+t:e:t}function _r(e,t,n,r,i,a){let o=e.textDirection==ve.RTL,s=o,c=!1,l=`top`,u,d,f=t.left-i.left,p=i.right-t.right,m=r.right-r.left,h=r.bottom-r.top;if(s&&f<Math.min(m,p)?s=!1:!s&&p<Math.min(m,f)&&(s=!0),m<=(s?f:p))u=Math.max(i.top,Math.min(n.top,i.bottom-h))-t.top,d=Math.min(400,s?f:p);else{c=!0,d=Math.min(400,(o?t.right:i.right-t.left)-30);let e=i.bottom-t.bottom;e>=h||e>t.top?u=n.bottom-t.top:(l=`bottom`,u=t.bottom-n.top)}let g=(t.bottom-t.top)/a.offsetHeight,_=(t.right-t.left)/a.offsetWidth;return{style:`${l}: ${u/g}px; max-width: ${d/_}px`,class:`cm-completionInfo-`+(c?o?`left-narrow`:`right-narrow`:s?`left`:`right`)}}var vr=gt.define();function yr(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement(`div`);return t.classList.add(`cm-completionIcon`),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>`cm-completionIcon-`+e)),t.setAttribute(`aria-hidden`,`true`),t},position:20}),t.push({render(e,t,n,r){let i=document.createElement(`span`);i.className=`cm-completionLabel`;let a=e.displayLabel||e.label,o=0;for(let e=0;e<r.length;){let t=r[e++],n=r[e++];t>o&&i.appendChild(document.createTextNode(a.slice(o,t)));let s=i.appendChild(document.createElement(`span`));s.appendChild(document.createTextNode(a.slice(t,n))),s.className=`cm-completionMatchedText`,o=n}return o<a.length&&i.appendChild(document.createTextNode(a.slice(o))),i},position:50},{render(e){if(!e.detail)return null;let t=document.createElement(`span`);return t.className=`cm-completionDetail`,t.textContent=e.detail,t},position:80}),t.sort((e,t)=>e.position-t.position).map(e=>e.render)}function br(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.ceil((e-t)/n);return{from:e-r*n,to:e-(r-1)*n}}var xr=class{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass=``;let r=e.state.field(t),{options:i,selected:a}=r.open,o=e.state.facet(hr);this.optionContent=yr(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=br(i.length,a,o.maxRenderedOptions),this.dom=document.createElement(`div`),this.dom.className=`cm-tooltip-autocomplete`,this.updateTooltipClass(e.state),this.dom.addEventListener(`mousedown`,n=>{let{options:r}=e.state.field(t).open;for(let t=n.target,i;t&&t!=this.dom;t=t.parentNode)if(t.nodeName==`LI`&&(i=/-(\d+)$/.exec(t.id))&&+i[1]<r.length){this.applyCompletion(e,r[+i[1]]),n.preventDefault();return}if(n.target==this.list){let t=this.list.classList.contains(`cm-completionListIncompleteTop`)&&n.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains(`cm-completionListIncompleteBottom`)&&n.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;t!=null&&(e.dispatch({effects:vr.of(t)}),n.preventDefault())}}),this.dom.addEventListener(`focusout`,t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(hr).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:fr.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener(`scroll`,()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){let t=e.state.field(this.stateField),n=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),t!=n){let{options:r,selected:i,disabled:a}=t.open;(!n.open||n.open.options!=r)&&(this.range=br(r.length,i,e.state.facet(hr).maxRenderedOptions),this.showOptions(r,t.id)),this.updateSel(),a!=n.open?.disabled&&this.dom.classList.toggle(`cm-tooltip-autocomplete-disabled`,!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(` `))e&&this.dom.classList.remove(e);for(let e of t.split(` `))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=br(t.options.length,t.selected,this.view.state.facet(hr).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let a=typeof i==`string`?document.createTextNode(i):i(r);if(!a)return;`then`in a?a.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)}).catch(e=>se(this.view.state,e,`completion info`)):(this.addInfoPane(a,r),n.setAttribute(`aria-describedby`,this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement(`div`);if(n.className=`cm-tooltip cm-completionInfo`,n.id=`cm-completionInfo-`+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)n.nodeName!=`LI`||!n.id?r--:r==e?n.hasAttribute(`aria-selected`)||(n.setAttribute(`aria-selected`,`true`),t=n):n.hasAttribute(`aria-selected`)&&(n.removeAttribute(`aria-selected`),n.removeAttribute(`aria-describedby`));return t&&Cr(this.list,t),t}measureInfo(){let e=this.dom.querySelector(`[aria-selected]`);if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(hr).positionInfo(this.view,t,r,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className=`cm-tooltip cm-completionInfo `+(e.class||``)):this.info.style.cssText=`top: -1e6px`)}createListBox(e,t,n){let r=document.createElement(`ul`);r.id=t,r.setAttribute(`role`,`listbox`),r.setAttribute(`aria-expanded`,`true`),r.setAttribute(`aria-label`,this.view.state.phrase(`Completions`)),r.addEventListener(`mousedown`,e=>{e.target==r&&e.preventDefault()});let i=null;for(let a=n.from;a<n.to;a++){let{completion:o,match:s}=e[a],{section:c}=o;if(c){let e=typeof c==`string`?c:c.name;if(e!=i&&(a>n.from||n.from==0)){if(i=e,typeof c!=`string`&&c.header)r.appendChild(c.header(c));else{let t=r.appendChild(document.createElement(`completion-section`));t.textContent=e}}}let l=r.appendChild(document.createElement(`li`));l.id=t+`-`+a,l.setAttribute(`role`,`option`);let u=this.optionClass(o);u&&(l.className=u);for(let e of this.optionContent){let t=e(o,this.view.state,this.view,s);t&&l.appendChild(t)}}return n.from&&r.classList.add(`cm-completionListIncompleteTop`),n.to<e.length&&r.classList.add(`cm-completionListIncompleteBottom`),r}destroyInfo(){this.info&&=(this.infoDestroy&&this.infoDestroy(),this.info.remove(),null)}destroy(){this.destroyInfo()}};function Sr(e,t){return n=>new xr(n,e,t)}function Cr(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.top<n.top?e.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}function wr(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+ +!!e.type}function Tr(e,t){let n=[],r=null,i=null,a=e=>{n.push(e);let{section:t}=e.completion;if(t){r||=[];let e=typeof t==`string`?t:t.name;r.some(t=>t.name==e)||r.push(typeof t==`string`?{name:e}:t)}},o=t.facet(hr);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(r.result.filter===!1)for(let t of r.result.options)a(new ir(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),s,c=o.filterStrict?new mr(n):new pr(n);for(let t of r.result.options)if(s=c.match(t.label)){let n=t.displayLabel?e?e(t,s.matched):[]:s.matched,o=s.score+(t.boost||0);if(a(new ir(t,r.source,n,o)),typeof t.section==`object`&&t.section.rank===`dynamic`){let{name:e}=t.section;i||=Object.create(null),i[e]=Math.max(o,i[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0,a=(e,t)=>(e.rank===`dynamic`&&t.rank===`dynamic`?i[t.name]-i[e.name]:0)||(typeof e.rank==`number`?e.rank:1e9)-(typeof t.rank==`number`?t.rank:1e9)||(e.name<t.name?-1:1);for(let n of r.sort(a))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e[typeof n==`string`?n:n.name])}}let s=[],c=null,l=o.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||l(e.completion,t.completion))){let t=e.completion;!c||c.label!=t.label||c.detail!=t.detail||c.type!=null&&t.type!=null&&c.type!=t.type||c.apply!=t.apply||c.boost!=t.boost?s.push(e):wr(e.completion)>wr(c)&&(s[s.length-1]=e),c=e.completion}return s}var Er=class e{constructor(e,t,n,r,i,a){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=a}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new e(this.options,jr(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,r,i,a,o){if(i&&!o&&t.some(e=>e.isPending))return i.setDisabled();let s=Tr(t,n);if(!s.length)return i&&t.some(e=>e.isPending)?i.setDisabled():null;let c=n.facet(hr).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let e=i.options[i.selected].completion;for(let t=0;t<s.length;t++)if(s[t].completion==e){c=t;break}}return new e(s,jr(r,c),{pos:t.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:Br,above:a.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(t){return new e(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new e(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},Dr=class e{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new e(Mr,`cm-ac-`+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,r=n.facet(hr),i=(r.override||n.languageDataAt(`autocomplete`,ar(n)).map(ur)).map(e=>(this.active.find(t=>t.source==e)||new Pr(e,+!!this.active.some(e=>e.state!=0))).update(t,r));i.length==this.active.length&&i.every((e,t)=>e==this.active[t])&&(i=this.active);let a=this.open,o=t.effects.some(e=>e.is(Lr));a&&t.docChanged&&(a=a.map(t.changes)),t.selection||i.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!Or(i,this.active)||o?a=Er.build(i,n,this.id,a,r,o):a&&a.disabled&&!i.some(e=>e.isPending)&&(a=null),!a&&i.every(e=>!e.isPending)&&i.some(e=>e.hasResult())&&(i=i.map(e=>e.hasResult()?new Pr(e.source,0):e));for(let e of t.effects)e.is(vr)&&(a&&=a.setSelected(e.value,this.id));return i==this.active&&a==this.open?this:new e(i,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?kr:Ar}};function Or(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,a=r==t.length;if(i||a)return i==a;if(e[n++].result!=t[r++].result)return!1}}var kr={"aria-autocomplete":`list`},Ar={};function jr(e,t){let n={"aria-autocomplete":`list`,"aria-haspopup":`listbox`,"aria-controls":e};return t>-1&&(n[`aria-activedescendant`]=e+`-`+t),n}var Mr=[];function Nr(e,t){if(e.isUserEvent(`input.complete`)){let n=e.annotation(sr);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent(`input.type`);return n&&t.activateOnTyping?5:n?1:e.isUserEvent(`delete.backward`)?2:e.selection?8:e.docChanged?16:0}var Pr=class e{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let r=Nr(t,n),i=this;(r&8||r&16&&this.touches(t))&&(i=new e(i.source,0)),r&4&&i.state==0&&(i=new e(this.source,1)),i=i.updateFor(t,r);for(let n of t.effects)if(n.is(dr))i=new e(i.source,1,n.value);else if(n.is(fr))i=new e(i.source,0);else if(n.is(Lr))for(let e of n.value)e.source==i.source&&(i=e);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(ar(e.state))}},Fr=class e extends Pr{constructor(e,t,n,r,i,a){super(e,3,t),this.limit=n,this.result=r,this.from=i,this.to=a}hasResult(){return!0}updateFor(t,n){if(!(n&3))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let i=t.changes.mapPos(this.from),a=t.changes.mapPos(this.to,1),o=ar(t.state);if(o>a||!r||n&2&&(ar(t.startState)==this.from||o<this.limit))return new Pr(this.source,n&4?1:0);let s=t.changes.mapPos(this.limit);return Ir(r.validFor,t.state,i,a)?new e(this.source,this.explicit,s,r,i,a):r.update&&(r=r.update(r,i,a,new $n(t.state,o,!1)))?new e(this.source,this.explicit,s,r,r.from,r.to??ar(t.state)):new Pr(this.source,1,this.explicit)}map(t){if(t.empty)return this;let n=this.result.map?this.result.map(this.result,t):this.result;return n?new e(this.source,this.explicit,t.mapPos(this.limit),n,t.mapPos(this.from),t.mapPos(this.to,1)):new Pr(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}};function Ir(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return typeof e==`function`?e(i,n,r,t):or(e,!0).test(i)}var Lr=gt.define({map(e,t){return e.map(e=>e.map(t))}}),Rr=Oe.define({create(){return Dr.start()},update(e,t){return e.update(t)},provide:e=>[Ye.from(e,e=>e.tooltip),xe.contentAttributes.from(e,e=>e.attrs)]});function zr(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(Rr).active.find(e=>e.source==t.source);return r instanceof Fr&&(typeof n==`string`?e.dispatch({...cr(e.state,n,r.from,r.to),annotations:sr.of(t.completion)}):n(e,t.completion,r.from,r.to),!0)}var Br=Sr(Rr,zr);function Vr(e,t=`option`){return n=>{let r=n.state.field(Rr,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(hr).interactionDelay)return!1;let i=1,a;t==`page`&&(a=be(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(a.dom.offsetHeight/a.dom.querySelector(`li`).offsetHeight)-1));let{length:o}=r.open.options,s=r.open.selected>-1?r.open.selected+i*(e?1:-1):e?0:o-1;return s<0?s=t==`page`?0:o-1:s>=o&&(s=t==`page`?o-1:0),n.dispatch({effects:vr.of(s)}),!0}}var Hr=e=>{let t=e.state.field(Rr,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(hr).interactionDelay?!1:zr(e,t.open.options[t.open.selected])},Ur=e=>e.state.field(Rr,!1)?(e.dispatch({effects:dr.of(!0)}),!0):!1,Wr=e=>{let t=e.state.field(Rr,!1);return!t||!t.active.some(e=>e.state!=0)?!1:(e.dispatch({effects:fr.of(null)}),!0)},Gr=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},Kr=50,qr=1e3,Jr=Ee.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(Rr).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(Rr),n=e.state.facet(hr);if(!e.selectionSet&&!e.docChanged&&e.startState.field(Rr)==t)return;let r=e.transactions.some(e=>{let t=Nr(e,n);return t&8||(e.selection||e.docChanged)&&!(t&3)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>Kr&&Date.now()-n.time>qr){for(let e of n.context.abortListeners)try{e()}catch(e){se(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(dr)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let t of e.transactions)t.isUserEvent(`input.type`)?this.composing=2:this.composing==2&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(Rr);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(hr).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=new $n(t,ar(t),e.explicit,this.view),r=new Gr(e,n);this.running.push(r),Promise.resolve(e.source(n)).then(e=>{r.context.aborted||(r.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:fr.of(null)}),se(this.view.state,e)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(hr).updateSyncTime))}accept(){this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(hr),n=this.view.state.field(Rr);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let n=ar(i.updates.length?i.updates[0].startState:this.view.state),r=Math.min(n,i.done.from+ +!i.active.explicit),a=new Fr(i.active.source,i.active.explicit,r,i.done,i.done.from,i.done.to??n);for(let e of i.updates)a=a.update(e,t);if(a.hasResult()){e.push(a);continue}}let a=n.active.find(e=>e.source==i.active.source);if(a&&a.isPending){if(i.done==null){let n=new Pr(i.active.source,0);for(let e of i.updates)n=n.update(e,t);n.isPending||e.push(n)}else this.startQuery(a)}}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:Lr.of(e)})}},{eventHandlers:{blur(e){let t=this.view.state.field(Rr,!1);if(t&&t.tooltip&&this.view.state.facet(hr).closeOnBlur){let n=t.open&&be(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:fr.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:dr.of(!1)}),20),this.composing=0}}}),Yr=typeof navigator==`object`&&/Win/.test(navigator.platform),Xr=Le.highest(xe.domEventHandlers({keydown(e,t){let n=t.state.field(Rr,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(Yr&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(e=>e.source==r.source),a=r.completion.commitCharacters||i.result.commitCharacters;return a&&a.indexOf(e.key)>-1&&zr(t,r),!1}})),Zr=xe.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`,cursor:`pointer`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),Qr=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},$r=class e{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(t){let n=t.mapPos(this.from,-1,qe.TrackDel),r=t.mapPos(this.to,1,qe.TrackDel);return n==null||r==null?null:new e(this.field,n,r)}},ei=class e{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),a=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=a,o=/^\t*/.exec(i)[0].length;for(let t=0;t<o;t++)n+=e.facet(pe);r.push(t+n.length-o),i=n+i.slice(o)}n.push(i),t+=i.length+1}return{text:n,ranges:this.fieldPositions.map(e=>new $r(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(t){let n=[],r=[],i=[],a;for(let e of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(e);){let t=a[1]?+a[1]:null,o=a[2]||a[3]||``,s=-1;t===0&&(t=1e9);let c=o.replace(/\\[{}]/g,e=>e[1]);for(let e=0;e<n.length;e++)(t==null?c&&n[e].name==c:n[e].seq==t)&&(s=e);if(s<0){let e=0;for(;e<n.length&&(t==null||n[e].seq!=null&&n[e].seq<t);)e++;n.splice(e,0,{seq:t,name:c}),s=e;for(let e of i)e.field>=s&&e.field++}for(let e of i)if(e.line==r.length&&e.from>a.index){let t=a[2]?3+(a[1]||``).length:2;e.from-=t,e.to-=t}i.push(new Qr(s,r.length,a.index,a.index+c.length)),e=e.slice(0,a.index)+o+e.slice(a.index+a[0].length)}e=e.replace(/\\([{}])/g,(e,t,n)=>{for(let e of i)e.line==r.length&&e.from>n&&(e.from--,e.to--);return t}),r.push(e)}return new e(r,i)}},ti=he.widget({widget:new class extends vt{toDOM(){let e=document.createElement(`span`);return e.className=`cm-snippetFieldPosition`,e}ignoreEvent(){return!1}}}),ni=he.mark({class:`cm-snippetField`}),ri=class e{constructor(e,t){this.ranges=e,this.active=t,this.deco=he.set(e.map(e=>(e.from==e.to?ti:ni).range(e.from,e.to)),!0)}map(t){let n=[];for(let e of this.ranges){let r=e.map(t);if(!r)return null;n.push(r)}return new e(n,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}},ii=gt.define({map(e,t){return e&&e.map(t)}}),ai=gt.define(),oi=Oe.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(ii))return n.value;if(n.is(ai)&&e)return new ri(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>xe.decorations.from(e,e=>e?e.deco:he.none)});function si(e,t){return D.create(e.filter(e=>e.field==t).map(e=>D.range(e.from,e.to)))}function ci(e){let t=ei.parse(e);return(e,n,r,i)=>{let{text:a,ranges:o}=t.instantiate(e.state,r),{main:s}=e.state.selection,c={changes:{from:r,to:i==s.from?s.to:i,insert:de.of(a)},scrollIntoView:!0,annotations:n?[sr.of(n),mt.userEvent.of(`input.complete`)]:void 0};if(o.length&&(c.selection=si(o,0)),o.some(e=>e.field>0)){let t=new ri(o,0),n=c.effects=[ii.of(t)];e.state.field(oi,!1)===void 0&&n.push(gt.appendConfig.of([oi,fi,mi,Zr]))}e.dispatch(e.state.update(c))}}function li(e){return({state:t,dispatch:n})=>{let r=t.field(oi,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:si(r.ranges,i),effects:ii.of(a?null:new ri(r.ranges,i)),scrollIntoView:!0})),!0}}var ui=[{key:`Tab`,run:li(1),shift:li(-1)},{key:`Escape`,run:({state:e,dispatch:t})=>e.field(oi,!1)?(t(e.update({effects:ii.of(null)})),!0):!1}],di=Je.define({combine(e){return e.length?e[0]:ui}}),fi=Le.highest(Ie.compute([di],e=>e.facet(di)));function pi(e,t){return{...t,apply:ci(e)}}var mi=xe.domEventHandlers({mousedown(e,t){let n=t.state.field(oi,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(e=>e.from<=r&&e.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:si(n.ranges,i.field),effects:ii.of(n.ranges.some(e=>e.field>i.field)?new ri(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),hi={brackets:[`(`,`[`,`{`,`'`,`"`],before:`)]}:;>`,stringPrefixes:[]},gi=gt.define({map(e,t){return t.mapPos(e,-1,qe.TrackAfter)??void 0}}),_i=new class extends ze{};_i.startSide=1,_i.endSide=-1;var vi=Oe.define({create(){return ft.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(gi)&&(e=e.update({add:[_i.range(n.value,n.value+1)]}));return e}});function yi(){return[wi,vi]}var bi=`()[]{}<>«»»«[]{}`;function xi(e){for(let t=0;t<16;t+=2)if(bi.charCodeAt(t)==e)return bi.charAt(t+1);return le(e<128?e:e+1)}function Si(e,t){return e.languageDataAt(`closeBrackets`,t)[0]||hi}var Ci=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),wi=xe.inputHandler.of((e,t,n,r)=>{if((Ci?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||r.length==2&&me(Ae(r,0))==1||t!=i.from||n!=i.to)return!1;let a=Ei(e.state,r);return a?(e.dispatch(a),!0):!1}),Ti=[{key:`Backspace`,run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Si(e,e.selection.main.head).brackets||hi.brackets,r=null,i=e.changeByRange(t=>{if(t.empty){let r=ki(e.doc,t.head);for(let i of n)if(i==r&&Oi(e.doc,t.head)==xi(Ae(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:D.cursor(t.head-i.length)}}return{range:r=t}});return r||t(e.update(i,{scrollIntoView:!0,userEvent:`delete.backward`})),!r}}];function Ei(e,t){let n=Si(e,e.selection.main.head),r=n.brackets||hi.brackets;for(let i of r){let a=xi(Ae(i,0));if(t==i)return a==i?Mi(e,i,r.indexOf(i+i+i)>-1,n):Ai(e,i,a,n.before||hi.before);if(t==a&&Di(e,e.selection.main.from))return ji(e,i,a)}return null}function Di(e,t){let n=!1;return e.field(vi).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function Oi(e,t){let n=e.sliceString(t,t+2);return n.slice(0,me(Ae(n,0)))}function ki(e,t){let n=e.sliceString(t-2,t);return me(Ae(n,0))==n.length?n:n.slice(1)}function Ai(e,t,n,r){let i=null,a=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:t,from:a.from},{insert:n,from:a.to}],effects:gi.of(a.to+t.length),range:D.range(a.anchor+t.length,a.head+t.length)};let o=Oi(e.doc,a.head);return!o||/\s/.test(o)||r.indexOf(o)>-1?{changes:{insert:t+n,from:a.head},effects:gi.of(a.head+t.length),range:D.cursor(a.head+t.length)}:{range:i=a}});return i?null:e.update(a,{scrollIntoView:!0,userEvent:`input.type`})}function ji(e,t,n){let r=null,i=e.changeByRange(t=>t.empty&&Oi(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:D.cursor(t.head+n.length)}:r={range:t});return r?null:e.update(i,{scrollIntoView:!0,userEvent:`input.type`})}function Mi(e,t,n,r){let i=r.stringPrefixes||hi.stringPrefixes,a=null,o=e.changeByRange(r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:gi.of(r.to+t.length),range:D.range(r.anchor+t.length,r.head+t.length)};let o=r.head,s=Oi(e.doc,o),c;if(s==t){if(Ni(e,o))return{changes:{insert:t+t,from:o},effects:gi.of(o+t.length),range:D.cursor(o+t.length)};if(Di(e,o)){let r=n&&e.sliceDoc(o,o+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:o,to:o+r.length,insert:r},range:D.cursor(o+r.length)}}}else if(n&&e.sliceDoc(o-2*t.length,o)==t+t&&(c=Fi(e,o-2*t.length,i))>-1&&Ni(e,c))return{changes:{insert:t+t+t+t,from:o},effects:gi.of(o+t.length),range:D.cursor(o+t.length)};else if(e.charCategorizer(o)(s)!=He.Word&&Fi(e,o,i)>-1&&!Pi(e,o,t,i))return{changes:{insert:t+t,from:o},effects:gi.of(o+t.length),range:D.cursor(o+t.length)};return{range:a=r}});return a?null:e.update(o,{scrollIntoView:!0,userEvent:`input.type`})}function Ni(e,t){let n=Xe(e).resolveInner(t+1);return n.parent&&n.from==t}function Pi(e,t,n,r){let i=Xe(e).resolveInner(t,-1),a=r.reduce((e,t)=>Math.max(e,t.length),0);for(let o=0;o<5;o++){let o=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+a)),s=o.indexOf(n);if(!s||s>-1&&r.indexOf(o.slice(0,s))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+s;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let c=i.to==t&&i.parent;if(!c)break;i=c}return!1}function Fi(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=He.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=He.Word)return n}return-1}function Ii(e={}){return[Xr,Rr,hr.of(e),Jr,Ri,Zr]}var Li=[{key:`Ctrl-Space`,run:Ur},{mac:"Alt-`",run:Ur},{mac:`Alt-i`,run:Ur},{key:`Escape`,run:Wr},{key:`ArrowDown`,run:Vr(!0)},{key:`ArrowUp`,run:Vr(!1)},{key:`PageDown`,run:Vr(!0,`page`)},{key:`PageUp`,run:Vr(!1,`page`)},{key:`Enter`,run:Hr}],Ri=Le.highest(Ie.computeN([hr],e=>e.facet(hr).defaultKeymap?[Li]:[])),zi=`Expected a function`,Bi=Math.max,Vi=Math.min;function Hi(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0;if(typeof e!=`function`)throw TypeError(zi);t=Ct(t)||0,xt(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?Bi(Ct(n.maxWait)||0,t):a,f=`trailing`in n?!!n.trailing:f);function p(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function m(e){return l=e,s=setTimeout(_,t),u?p(e):o}function h(e){var n=e-c,r=e-l,i=t-n;return d?Vi(i,a-r):i}function g(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function _(){var e=Tt();if(g(e))return v(e);s=setTimeout(_,h(e))}function v(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function y(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function b(){return s===void 0?o:v(Tt())}function x(){var e=Tt(),n=g(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return m(c);if(d)return clearTimeout(s),s=setTimeout(_,t),p(c)}return s===void 0&&(s=setTimeout(_,t)),o}return x.cancel=y,x.flush=b,x}function Ui(e,t,n,r,i,a){return xt(e)&&xt(t)&&(a.set(t,e),Et(e,t,void 0,Ui,a),a.delete(t)),e}var Wi=wt(function(e,t,n,r){Et(e,t,n,r)}),Gi=bt(function(e){return e.push(void 0,Ui),St(Wi,void 0,e)}),Ki=`Expected a function`;function qi(e,t,n){var r=!0,i=!0;if(typeof e!=`function`)throw TypeError(Ki);return xt(n)&&(r=`leading`in n?!!n.leading:r,i=`trailing`in n?!!n.trailing:i),Hi(e,t,{leading:r,maxWait:t,trailing:i})}function O(e){return new rt(Be.define(e))}function Ji(e){return w(()=>import(`./dist-BeUB43Ur.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([0,1,2]))}var Yi=[E.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return w(()=>import(`./dist-BY24_62d.js`).then(e=>e.cpp()),__vite__mapDeps([3,1,2]))}}),E.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return w(()=>import(`./dist-BY24_62d.js`).then(e=>e.cpp()),__vite__mapDeps([3,1,2]))}}),E.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return Ji(`Cassandra`)}}),E.of({name:`CSS`,extensions:[`css`],load(){return w(()=>import(`./dist-C3sBgvRy.js`).then(e=>e.i).then(e=>e.css()),__vite__mapDeps([4,5,1,2]))}}),E.of({name:`Go`,extensions:[`go`],load(){return w(()=>import(`./dist-By534Syk.js`).then(e=>e.go()),__vite__mapDeps([6,1,2]))}}),E.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return w(()=>import(`./dist-DyBqP777.js`).then(e=>e.html()),__vite__mapDeps([7,1,2,4,5,8]))}}),E.of({name:`Java`,extensions:[`java`],load(){return w(()=>import(`./dist-DpKJcdvz.js`).then(e=>e.java()),__vite__mapDeps([9,1,2]))}}),E.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return w(()=>import(`./dist-Du5VPTAq.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([8,5,1,2]))}}),E.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return w(()=>import(`./dist-DNrP7O-J.js`).then(e=>e.jinja()),__vite__mapDeps([10,1,2,7,4,5,8]))}}),E.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return w(()=>import(`./dist-D7Llw4iH.js`).then(e=>e.json()),__vite__mapDeps([11,1,2]))}}),E.of({name:`JSX`,extensions:[`jsx`],load(){return w(()=>import(`./dist-Du5VPTAq.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([8,5,1,2]))}}),E.of({name:`LESS`,extensions:[`less`],load(){return w(()=>import(`./dist-CqGqStPp.js`).then(e=>e.less()),__vite__mapDeps([12,1,2,4,5]))}}),E.of({name:`Liquid`,extensions:[`liquid`],load(){return w(()=>import(`./dist-B9i6cUYu.js`).then(e=>e.liquid()),__vite__mapDeps([13,1,2,7,4,5,8]))}}),E.of({name:`MariaDB SQL`,load(){return Ji(`MariaSQL`)}}),E.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return w(()=>import(`./dist-BU-fZfEv.js`).then(e=>e.markdown()),__vite__mapDeps([14,1,7,2,4,5,8]))}}),E.of({name:`MS SQL`,load(){return Ji(`MSSQL`)}}),E.of({name:`MySQL`,load(){return Ji(`MySQL`)}}),E.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return w(()=>import(`./dist-BxIdk5Al.js`).then(e=>e.php()),__vite__mapDeps([15,1,2,7,4,5,8]))}}),E.of({name:`PLSQL`,extensions:[`pls`],load(){return Ji(`PLSQL`)}}),E.of({name:`PostgreSQL`,load(){return Ji(`PostgreSQL`)}}),E.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return w(()=>import(`./dist-75uxNoTf.js`).then(e=>e.python()),__vite__mapDeps([16,1,2]))}}),E.of({name:`Rust`,extensions:[`rs`],load(){return w(()=>import(`./dist-DZQ2IsS9.js`).then(e=>e.rust()),__vite__mapDeps([17,1,2]))}}),E.of({name:`Sass`,extensions:[`sass`],load(){return w(()=>import(`./dist-DUt0feNB.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([18,1,2,4,5]))}}),E.of({name:`SCSS`,extensions:[`scss`],load(){return w(()=>import(`./dist-DUt0feNB.js`).then(e=>e.sass()),__vite__mapDeps([18,1,2,4,5]))}}),E.of({name:`SQL`,extensions:[`sql`],load(){return Ji(`StandardSQL`)}}),E.of({name:`SQLite`,load(){return Ji(`SQLite`)}}),E.of({name:`TSX`,extensions:[`tsx`],load(){return w(()=>import(`./dist-Du5VPTAq.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([8,5,1,2]))}}),E.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return w(()=>import(`./dist-Du5VPTAq.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,5,1,2]))}}),E.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return w(()=>import(`./dist-LFPPEX39.js`).then(e=>e.wast()),__vite__mapDeps([19,1,2]))}}),E.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return w(()=>import(`./dist-DuZv0LJj.js`).then(e=>e.xml()),__vite__mapDeps([20,1,2]))}}),E.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return w(()=>import(`./dist-lC0EKTFH.js`).then(e=>e.yaml()),__vite__mapDeps([21,1,2]))}}),E.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return w(()=>import(`./apl-gfMMiTNf.js`).then(e=>O(e.apl)),[])}}),E.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return w(()=>import(`./asciiarmor-C_eisQCp.js`).then(e=>O(e.asciiArmor)),[])}}),E.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return w(()=>import(`./asn1-DCl_8MCW.js`).then(e=>O(e.asn1({}))),[])}}),E.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return w(()=>import(`./asterisk-BEn0Cwpx.js`).then(e=>O(e.asterisk)),[])}}),E.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return w(()=>import(`./brainfuck-D5EjA2JK.js`).then(e=>O(e.brainfuck)),[])}}),E.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return w(()=>import(`./cobol-DHLQUbN7.js`).then(e=>O(e.cobol)),[])}}),E.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return w(()=>import(`./clike-D_6L3tnO.js`).then(e=>O(e.csharp)),[])}}),E.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return w(()=>import(`./clojure-BflJGmDX.js`).then(e=>O(e.clojure)),[])}}),E.of({name:`ClojureScript`,extensions:[`cljs`],load(){return w(()=>import(`./clojure-BflJGmDX.js`).then(e=>O(e.clojure)),[])}}),E.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return w(()=>import(`./css-CnaYoQib.js`).then(e=>O(e.gss)),[])}}),E.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return w(()=>import(`./cmake-84nbDH0I.js`).then(e=>O(e.cmake)),[])}}),E.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return w(()=>import(`./coffeescript-De_zI4J0.js`).then(e=>O(e.coffeeScript)),[])}}),E.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return w(()=>import(`./commonlisp-DgAKBe0r.js`).then(e=>O(e.commonLisp)),[])}}),E.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return w(()=>import(`./cypher-p9eYesGn.js`).then(e=>O(e.cypher)),[])}}),E.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return w(()=>import(`./python-B_1Jd8HM.js`).then(e=>O(e.cython)),[])}}),E.of({name:`Crystal`,extensions:[`cr`],load(){return w(()=>import(`./crystal-Bsdphhtm.js`).then(e=>O(e.crystal)),[])}}),E.of({name:`D`,extensions:[`d`],load(){return w(()=>import(`./d-DWkQyNnU.js`).then(e=>O(e.d)),[])}}),E.of({name:`Dart`,extensions:[`dart`],load(){return w(()=>import(`./clike-D_6L3tnO.js`).then(e=>O(e.dart)),[])}}),E.of({name:`diff`,extensions:[`diff`,`patch`],load(){return w(()=>import(`./diff-ChtP43wD.js`).then(e=>O(e.diff)),[])}}),E.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return w(()=>import(`./dockerfile-DJkHQgkl.js`).then(e=>O(e.dockerFile)),__vite__mapDeps([22,23]))}}),E.of({name:`DTD`,extensions:[`dtd`],load(){return w(()=>import(`./dtd-DTF72YNO.js`).then(e=>O(e.dtd)),[])}}),E.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return w(()=>import(`./dylan-BCDoL_-p.js`).then(e=>O(e.dylan)),[])}}),E.of({name:`EBNF`,load(){return w(()=>import(`./ebnf-D4c0_ac3.js`).then(e=>O(e.ebnf)),[])}}),E.of({name:`ECL`,extensions:[`ecl`],load(){return w(()=>import(`./ecl-BVIeWmwY.js`).then(e=>O(e.ecl)),[])}}),E.of({name:`edn`,extensions:[`edn`],load(){return w(()=>import(`./clojure-BflJGmDX.js`).then(e=>O(e.clojure)),[])}}),E.of({name:`Eiffel`,extensions:[`e`],load(){return w(()=>import(`./eiffel-BEjRio4Q.js`).then(e=>O(e.eiffel)),[])}}),E.of({name:`Elm`,extensions:[`elm`],load(){return w(()=>import(`./elm-Cshzl8qu.js`).then(e=>O(e.elm)),[])}}),E.of({name:`Erlang`,extensions:[`erl`],load(){return w(()=>import(`./erlang-BV0c4Hdn.js`).then(e=>O(e.erlang)),[])}}),E.of({name:`Esper`,load(){return w(()=>import(`./sql-DuQMFDvy.js`).then(e=>O(e.esper)),[])}}),E.of({name:`Factor`,extensions:[`factor`],load(){return w(()=>import(`./factor-LKH5gN8L.js`).then(e=>O(e.factor)),__vite__mapDeps([24,23]))}}),E.of({name:`FCL`,load(){return w(()=>import(`./fcl-ClOhbFR7.js`).then(e=>O(e.fcl)),[])}}),E.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return w(()=>import(`./forth-D6RzAl64.js`).then(e=>O(e.forth)),[])}}),E.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return w(()=>import(`./fortran-Bt6PBEDR.js`).then(e=>O(e.fortran)),[])}}),E.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return w(()=>import(`./mllike-B45xgp2S.js`).then(e=>O(e.fSharp)),[])}}),E.of({name:`Gas`,extensions:[`s`],load(){return w(()=>import(`./gas-BHEdbvp9.js`).then(e=>O(e.gas)),[])}}),E.of({name:`Gherkin`,extensions:[`feature`],load(){return w(()=>import(`./gherkin-oBAE_ms0.js`).then(e=>O(e.gherkin)),[])}}),E.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return w(()=>import(`./groovy-CUpZ7dEl.js`).then(e=>O(e.groovy)),[])}}),E.of({name:`Haskell`,extensions:[`hs`],load(){return w(()=>import(`./haskell-BRsoo5mP.js`).then(e=>O(e.haskell)),[])}}),E.of({name:`Haxe`,extensions:[`hx`],load(){return w(()=>import(`./haxe-DjVOVvNP.js`).then(e=>O(e.haxe)),[])}}),E.of({name:`HXML`,extensions:[`hxml`],load(){return w(()=>import(`./haxe-DjVOVvNP.js`).then(e=>O(e.hxml)),[])}}),E.of({name:`HTTP`,load(){return w(()=>import(`./http-CLVgA2GD.js`).then(e=>O(e.http)),[])}}),E.of({name:`IDL`,extensions:[`pro`],load(){return w(()=>import(`./idl-BUZw3wgd.js`).then(e=>O(e.idl)),[])}}),E.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return w(()=>import(`./javascript-Bu8mWwtz.js`).then(e=>O(e.jsonld)),[])}}),E.of({name:`Julia`,extensions:[`jl`],load(){return w(()=>import(`./julia-CQfgDRfP.js`).then(e=>O(e.julia)),[])}}),E.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return w(()=>import(`./clike-D_6L3tnO.js`).then(e=>O(e.kotlin)),[])}}),E.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return w(()=>import(`./livescript-BXxG0Yva.js`).then(e=>O(e.liveScript)),[])}}),E.of({name:`Lua`,extensions:[`lua`],load(){return w(()=>import(`./lua-DPCEkfD_.js`).then(e=>O(e.lua)),[])}}),E.of({name:`mIRC`,extensions:[`mrc`],load(){return w(()=>import(`./mirc-C9zpzAZU.js`).then(e=>O(e.mirc)),[])}}),E.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return w(()=>import(`./mathematica-u8YMmbU0.js`).then(e=>O(e.mathematica)),[])}}),E.of({name:`Modelica`,extensions:[`mo`],load(){return w(()=>import(`./modelica-CqHI_q-D.js`).then(e=>O(e.modelica)),[])}}),E.of({name:`MUMPS`,extensions:[`mps`],load(){return w(()=>import(`./mumps-BSzj6Xyz.js`).then(e=>O(e.mumps)),[])}}),E.of({name:`Mbox`,extensions:[`mbox`],load(){return w(()=>import(`./mbox-BEMVcqjs.js`).then(e=>O(e.mbox)),[])}}),E.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return w(()=>import(`./nginx-8H7HVH4w.js`).then(e=>O(e.nginx)),[])}}),E.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return w(()=>import(`./nsis-viPvXFiq.js`).then(e=>O(e.nsis)),__vite__mapDeps([25,23]))}}),E.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return w(()=>import(`./ntriples-B9h1VB_g.js`).then(e=>O(e.ntriples)),[])}}),E.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return w(()=>import(`./clike-D_6L3tnO.js`).then(e=>O(e.objectiveC)),[])}}),E.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return w(()=>import(`./clike-D_6L3tnO.js`).then(e=>O(e.objectiveCpp)),[])}}),E.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return w(()=>import(`./mllike-B45xgp2S.js`).then(e=>O(e.oCaml)),[])}}),E.of({name:`Octave`,extensions:[`m`],load(){return w(()=>import(`./octave-D2Q8cUp1.js`).then(e=>O(e.octave)),[])}}),E.of({name:`Oz`,extensions:[`oz`],load(){return w(()=>import(`./oz-BwTct_5T.js`).then(e=>O(e.oz)),[])}}),E.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return w(()=>import(`./pascal-Dp_KdFgX.js`).then(e=>O(e.pascal)),[])}}),E.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return w(()=>import(`./perl-BkSkiI9m.js`).then(e=>O(e.perl)),[])}}),E.of({name:`Pig`,extensions:[`pig`],load(){return w(()=>import(`./pig-AF4Hwhju.js`).then(e=>O(e.pig)),[])}}),E.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return w(()=>import(`./powershell-BcIto6Sf.js`).then(e=>O(e.powerShell)),[])}}),E.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return w(()=>import(`./properties-C357ku5U.js`).then(e=>O(e.properties)),[])}}),E.of({name:`ProtoBuf`,extensions:[`proto`],load(){return w(()=>import(`./protobuf-D1ij_kNL.js`).then(e=>O(e.protobuf)),[])}}),E.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return w(()=>import(`./pug-3K-JMW4g.js`).then(e=>O(e.pug)),__vite__mapDeps([26,27]))}}),E.of({name:`Puppet`,extensions:[`pp`],load(){return w(()=>import(`./puppet-BZyAS7I4.js`).then(e=>O(e.puppet)),[])}}),E.of({name:`Q`,extensions:[`q`],load(){return w(()=>import(`./q-B9NhS7L_.js`).then(e=>O(e.q)),[])}}),E.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return w(()=>import(`./r-CxDmU1I4.js`).then(e=>O(e.r)),[])}}),E.of({name:`RPM Changes`,load(){return w(()=>import(`./rpm-gpDK5sbt.js`).then(e=>O(e.rpmChanges)),[])}}),E.of({name:`RPM Spec`,extensions:[`spec`],load(){return w(()=>import(`./rpm-gpDK5sbt.js`).then(e=>O(e.rpmSpec)),[])}}),E.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return w(()=>import(`./ruby-ChfNwlCY.js`).then(e=>O(e.ruby)),[])}}),E.of({name:`SAS`,extensions:[`sas`],load(){return w(()=>import(`./sas-C2OyD2Y6.js`).then(e=>O(e.sas)),[])}}),E.of({name:`Scala`,extensions:[`scala`],load(){return w(()=>import(`./clike-D_6L3tnO.js`).then(e=>O(e.scala)),[])}}),E.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return w(()=>import(`./scheme-D9qYN0V5.js`).then(e=>O(e.scheme)),[])}}),E.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return w(()=>import(`./shell-DwuoZtxw.js`).then(e=>O(e.shell)),[])}}),E.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return w(()=>import(`./sieve-tLWDfEkZ.js`).then(e=>O(e.sieve)),[])}}),E.of({name:`Smalltalk`,extensions:[`st`],load(){return w(()=>import(`./smalltalk-BLp5-jwC.js`).then(e=>O(e.smalltalk)),[])}}),E.of({name:`Solr`,load(){return w(()=>import(`./solr-B78wSQJQ.js`).then(e=>O(e.solr)),[])}}),E.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return w(()=>import(`./mllike-B45xgp2S.js`).then(e=>O(e.sml)),[])}}),E.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return w(()=>import(`./sparql-Dz-mlCAC.js`).then(e=>O(e.sparql)),[])}}),E.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return w(()=>import(`./spreadsheet-CTIncYxj.js`).then(e=>O(e.spreadsheet)),[])}}),E.of({name:`Squirrel`,extensions:[`nut`],load(){return w(()=>import(`./clike-D_6L3tnO.js`).then(e=>O(e.squirrel)),[])}}),E.of({name:`Stylus`,extensions:[`styl`],load(){return w(()=>import(`./stylus-BOVgKnng.js`).then(e=>O(e.stylus)),[])}}),E.of({name:`Swift`,extensions:[`swift`],load(){return w(()=>import(`./swift-DKB6_1j6.js`).then(e=>O(e.swift)),[])}}),E.of({name:`sTeX`,load(){return w(()=>import(`./stex-DNzd62Q_.js`).then(e=>O(e.stex)),[])}}),E.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return w(()=>import(`./stex-DNzd62Q_.js`).then(e=>O(e.stex)),[])}}),E.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return w(()=>import(`./verilog-CjI9Y6RI.js`).then(e=>O(e.verilog)),[])}}),E.of({name:`Tcl`,extensions:[`tcl`],load(){return w(()=>import(`./tcl-BGfruO1u.js`).then(e=>O(e.tcl)),[])}}),E.of({name:`Textile`,extensions:[`textile`],load(){return w(()=>import(`./textile-C4jVoHG1.js`).then(e=>O(e.textile)),[])}}),E.of({name:`TiddlyWiki`,load(){return w(()=>import(`./tiddlywiki-VlUiK86J.js`).then(e=>O(e.tiddlyWiki)),[])}}),E.of({name:`Tiki wiki`,load(){return w(()=>import(`./tiki-AK6FwT8q.js`).then(e=>O(e.tiki)),[])}}),E.of({name:`TOML`,extensions:[`toml`],load(){return w(()=>import(`./toml-BPTmHmyx.js`).then(e=>O(e.toml)),[])}}),E.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return w(()=>import(`./troff-C2dAgh7P.js`).then(e=>O(e.troff)),[])}}),E.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return w(()=>import(`./ttcn-PPSTk1ow.js`).then(e=>O(e.ttcn)),[])}}),E.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return w(()=>import(`./ttcn-cfg-2b4Gb5sE.js`).then(e=>O(e.ttcnCfg)),[])}}),E.of({name:`Turtle`,extensions:[`ttl`],load(){return w(()=>import(`./turtle-Cx3rYX2g.js`).then(e=>O(e.turtle)),[])}}),E.of({name:`Web IDL`,extensions:[`webidl`],load(){return w(()=>import(`./webidl-D5jiJvOU.js`).then(e=>O(e.webIDL)),[])}}),E.of({name:`VB.NET`,extensions:[`vb`],load(){return w(()=>import(`./vb-BthdM_4N.js`).then(e=>O(e.vb)),[])}}),E.of({name:`VBScript`,extensions:[`vbs`],load(){return w(()=>import(`./vbscript-D9f6rSsU.js`).then(e=>O(e.vbScript)),[])}}),E.of({name:`Velocity`,extensions:[`vtl`],load(){return w(()=>import(`./velocity-CqftRsjg.js`).then(e=>O(e.velocity)),[])}}),E.of({name:`Verilog`,extensions:[`v`],load(){return w(()=>import(`./verilog-CjI9Y6RI.js`).then(e=>O(e.verilog)),[])}}),E.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return w(()=>import(`./vhdl-kS471soi.js`).then(e=>O(e.vhdl)),[])}}),E.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return w(()=>import(`./xquery-BKJx4mf9.js`).then(e=>O(e.xQuery)),[])}}),E.of({name:`Yacas`,extensions:[`ys`],load(){return w(()=>import(`./yacas-CXXgtw0p.js`).then(e=>O(e.yacas)),[])}}),E.of({name:`Z80`,extensions:[`z80`],load(){return w(()=>import(`./z80-Co3PbHdE.js`).then(e=>O(e.z80)),[])}}),E.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return w(()=>import(`./mscgen-qgSLujhx.js`).then(e=>O(e.mscgen)),[])}}),E.of({name:`Xù`,extensions:[`xu`],load(){return w(()=>import(`./mscgen-qgSLujhx.js`).then(e=>O(e.xu)),[])}}),E.of({name:`MsGenny`,extensions:[`msgenny`],load(){return w(()=>import(`./mscgen-qgSLujhx.js`).then(e=>O(e.msgenny)),[])}}),E.of({name:`Vue`,extensions:[`vue`],load(){return w(()=>import(`./dist-DFjLCq-0.js`).then(e=>e.vue()),__vite__mapDeps([28,1,2,8,5,7,4]))}}),E.of({name:`Angular Template`,load(){return w(()=>import(`./dist-9rzCziV2.js`).then(e=>e.angular()),__vite__mapDeps([29,1,2,8,5,7,4]))}})],Xi=`#e5c07b`,Zi=`#e06c75`,Qi=`#56b6c2`,$i=`#ffffff`,ea=`#abb2bf`,ta=`#7d8799`,na=`#61afef`,ra=`#98c379`,ia=`#d19a66`,aa=`#c678dd`,oa=`#21252b`,sa=`#2c313a`,ca=`#282c34`,la=`#353a42`,ua=`#3E4451`,da=`#528bff`,fa=xe.theme({"&":{color:ea,backgroundColor:ca},".cm-content":{caretColor:da},".cm-cursor, .cm-dropCursor":{borderLeftColor:da},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ua},".cm-panels":{backgroundColor:oa,color:ea},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:`#72a1ff59`,outline:`1px solid #457dff`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#6199ff2f`},".cm-activeLine":{backgroundColor:`#6699ff0b`},".cm-selectionMatch":{backgroundColor:`#aafe661a`},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bad0f847`},".cm-gutters":{backgroundColor:ca,color:ta,border:`none`},".cm-activeLineGutter":{backgroundColor:sa},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:la},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:la,borderBottomColor:la},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:sa,color:ea}}},{dark:!0}),pa=ct.define([{tag:T.keyword,color:aa},{tag:[T.name,T.deleted,T.character,T.propertyName,T.macroName],color:Zi},{tag:[T.function(T.variableName),T.labelName],color:na},{tag:[T.color,T.constant(T.name),T.standard(T.name)],color:ia},{tag:[T.definition(T.name),T.separator],color:ea},{tag:[T.typeName,T.className,T.number,T.changed,T.annotation,T.modifier,T.self,T.namespace],color:Xi},{tag:[T.operator,T.operatorKeyword,T.url,T.escape,T.regexp,T.link,T.special(T.string)],color:Qi},{tag:[T.meta,T.comment],color:ta},{tag:T.strong,fontWeight:`bold`},{tag:T.emphasis,fontStyle:`italic`},{tag:T.strikethrough,textDecoration:`line-through`},{tag:T.link,color:ta,textDecoration:`underline`},{tag:T.heading,fontWeight:`bold`,color:Zi},{tag:[T.atom,T.bool,T.special(T.variableName)],color:ia},{tag:[T.processingInstruction,T.string,T.inserted],color:ra},{tag:T.invalid,color:$i}]),ma=[fa,ce(pa)],ha=function(e){return e.docTypeError=`docTypeError`,e.contextNotFound=`contextNotFound`,e.timerNotFound=`timerNotFound`,e.ctxCallOutOfScope=`ctxCallOutOfScope`,e.createNodeInParserFail=`createNodeInParserFail`,e.stackOverFlow=`stackOverFlow`,e.parserMatchError=`parserMatchError`,e.serializerMatchError=`serializerMatchError`,e.getAtomFromSchemaFail=`getAtomFromSchemaFail`,e.expectDomTypeError=`expectDomTypeError`,e.callCommandBeforeEditorView=`callCommandBeforeEditorView`,e.missingRootElement=`missingRootElement`,e.missingNodeInSchema=`missingNodeInSchema`,e.missingMarkInSchema=`missingMarkInSchema`,e.ctxNotBind=`ctxNotBind`,e.missingYjsDoc=`missingYjsDoc`,e.aiProviderError=`aiProviderError`,e.aiBuildContextError=`aiBuildContextError`,e}({}),ga=class extends Error{constructor(e,t,n){super(t,n),this.name=`MilkdownError`,this.code=e,n?.cause!==void 0&&(this.cause=n.cause)}},_a=(e,t)=>typeof t==`function`?`[Function]`:t,va=e=>JSON.stringify(e,_a);function ya(e){return new ga(ha.docTypeError,`Doc type error, unsupported type: ${va(e)}`)}function ba(e){return new ga(ha.contextNotFound,`Context "${e}" not found, do you forget to inject it?`)}function xa(e){return new ga(ha.timerNotFound,`Timer "${e}" not found, do you forget to record it?`)}function Sa(){return new ga(ha.ctxCallOutOfScope,`Should not call a context out of the plugin.`)}function Ca(e,t,n){let r=`Cannot create node for ${`name`in e?e.name:e}`,i=e=>{if(e==null)return`null`;if(Array.isArray(e))return`[${e.map(i).join(`, `)}]`;if(typeof e==`object`)return`toJSON`in e&&typeof e.toJSON==`function`?JSON.stringify(e.toJSON()):`spec`in e?JSON.stringify(e.spec):JSON.stringify(e);if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return JSON.stringify(e);if(typeof e==`function`)return`[Function: ${e.name||`anonymous`}]`;try{return String(e)}catch{return`[Unserializable]`}},a=[[`[Description]`,r],[`[Attributes]`,t],[`[Content]`,(n??[]).map(e=>e?typeof e==`object`&&`type`in e?`${e}`:i(e):`null`)]].reduce((e,[t,n])=>{let r=`${t}: ${i(n)}.`;return e.concat(r)},[]);return new ga(ha.createNodeInParserFail,a.join(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-CF9ODvoZ.js","assets/dist-D2Ce45aH.js","assets/dist-3B0OaUZ-.js","assets/dist-BY24_62d.js","assets/dist-C3sBgvRy.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/dist-SkTbIIlQ.js","assets/dist-BuXYTGDD.js","assets/dist-BHgrth9o.js","assets/dist-DpKJcdvz.js","assets/dist-CFdeFDlk.js","assets/dist-D7Llw4iH.js","assets/dist-CqGqStPp.js","assets/dist-DAm4VXST.js","assets/dist-BS_doyKJ.js","assets/dist-DwGuvnij.js","assets/dist-fjYccora.js","assets/dist-DZQ2IsS9.js","assets/dist-DUt0feNB.js","assets/dist-LFPPEX39.js","assets/dist-DuZv0LJj.js","assets/dist-lC0EKTFH.js","assets/dockerfile-DJkHQgkl.js","assets/simple-mode-DXiLM1-G.js","assets/factor-LKH5gN8L.js","assets/nsis-viPvXFiq.js","assets/pug-3K-JMW4g.js","assets/javascript-Bu8mWwtz.js","assets/dist-DlzjGKj2.js","assets/dist-Cv-Fe2Re.js"])))=>i.map(i=>d[i]);
2
+ import{i as e,n as t,t as n}from"./rolldown-runtime-Dd_uD5pT.js";import{A as r,D as i,I as a,M as o,N as s,Nt as c,O as l,P as u,Pt as d,S as f,X as p,Y as m,Z as h,d as g,dt as _,f as v,g as y,gt as b,ht as x,l as S,lt as C,o as ee,p as te,q as ne,r as re,u as ie,y as ae}from"./runtime-core.esm-bundler-DDnHUoIy.js";import{m as oe}from"./use-router-link-D7geCGQI.js";import{v as w}from"./index-CstRcwnO.js";import{$ as se,A as ce,At as le,B as ue,Ct as de,Dt as fe,E as pe,Et as me,F as he,G as ge,H as _e,I as ve,J as ye,K as be,L as xe,Nt as Se,O as Ce,Ot as we,P as T,Q as Te,R as Ee,S as De,St as Oe,T as ke,Tt as Ae,U as je,V as Me,W as Ne,X as Pe,Y as Fe,Z as Ie,_t as Le,a as E,at as Re,bt as ze,c as Be,ct as Ve,dt as He,et as Ue,f as We,ft as Ge,g as Ke,gt as qe,ht as Je,it as Ye,j as Xe,kt as Ze,l as Qe,lt as $e,mt as et,n as tt,nt,o as rt,ot as it,pt as D,q as at,rt as ot,st,t as ct,tt as lt,ut,v as dt,vt as ft,w as pt,wt as mt,x as ht,xt as gt,yt as _t,z as vt}from"./dist-D2Ce45aH.js";import{t as yt}from"./purify.es--06brOip.js";import{_ as bt,k as xt,w as St}from"./isArrayLikeObject-BbaDyxId.js";import{h as Ct,l as wt,n as Tt,t as Et}from"./_baseMerge-BzZFQ6mI.js";import{n as Dt,t as Ot}from"./ccount-CcG1m-Yh.js";import{$ as kt,Ct as At,D as jt,Dt as Mt,Et as Nt,F as Pt,Ft,I as It,It as Lt,Jt as Rt,L as zt,Mt as Bt,O as Vt,Xt as Ht,Yt as Ut,Zt as Wt,_ as Gt,at as Kt,ct as qt,dt as Jt,et as Yt,ft as Xt,g as Zt,ht as Qt,it as $t,lt as en,mt as tn,nt as nn,ot as rn,pt as an,qt as on,rt as sn,st as cn,tn as ln,tt as un,ut as dn,vt as fn,w as pn,y as mn}from"./mdi-Du7sIqtH.js";import{n as hn}from"./single-flight-CyDZB3rb.js";import{b as gn,p as _n}from"./agent-store-BV2OAJzn.js";import{i as vn}from"./QSpace-BmrklWw-.js";import{c as yn}from"./workspace-navigation-kGtTYXtT.js";import{r as bn}from"./use-add-agent-context-ZAOlkMkH.js";import{a as xn,n as Sn,o as Cn,r as wn}from"./markdown-B6YvDSFL.js";import{n as Tn}from"./AddButton-C58xe78T.js";import{t as En}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{C as Dn,D as On,E as kn,S as An,T as jn,_ as Mn,a as Nn,b as Pn,c as Fn,d as In,f as Ln,g as Rn,h as zn,i as Bn,l as Vn,m as Hn,n as Un,o as Wn,p as Gn,r as Kn,s as qn,u as Jn,v as Yn,w as Xn,x as Zn,y as Qn}from"./NotesPage-CtxHzvJG.js";var $n=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=Xe(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(or(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e==`abort`&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function er(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function tr(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=er(t)+er(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function nr(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:tr(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function rr(e,t){return n=>{for(let t=Xe(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}var ir=class{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function ar(e){return e.selection.main.from}function or(e,t){let{source:n}=e,r=t&&n[0]!=`^`,i=n[n.length-1]!=`$`;return!r&&!i?e:RegExp(`${r?`^`:``}(?:${n})${i?`$`:``}`,e.flags??(e.ignoreCase?`i`:``))}var sr=Ve.define();function cr(e,t,n,r){let{main:i}=e.selection,a=n-i.from,o=r-i.from;return{...e.changeByRange(s=>{if(s!=i&&n!=r&&e.sliceDoc(s.from+a,s.from+o)!=e.sliceDoc(n,r))return{range:s};let c=e.toText(t);return{changes:{from:s.from+a,to:r==i.from?s.to:s.from+o,insert:c},range:D.cursor(s.from+a+c.length)}}),scrollIntoView:!0,userEvent:`input.complete`}}var lr=new WeakMap;function ur(e){if(!Array.isArray(e))return e;let t=lr.get(e);return t||lr.set(e,t=nr(e)),t}var dr=gt.define(),fr=gt.define(),pr=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=Ae(e,t),r=me(n);this.chars.push(n);let i=e.slice(t,t+r),a=i.toUpperCase();this.folded.push(Ae(a==i?i.toLowerCase():a,0)),t+=r}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:i,byWord:a}=this;if(t.length==1){let r=Ae(e,0),i=me(r),a=i==e.length?0:-100;if(r!=t[0]){if(r==n[0])a+=-200;else return null}return this.ret(a,[0,i])}let o=e.indexOf(this.pattern);if(o==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let s=t.length,c=0;if(o<0){for(let i=0,a=Math.min(e.length,200);i<a&&c<s;){let a=Ae(e,i);(a==t[c]||a==n[c])&&(r[c++]=i),i+=me(a)}if(c<s)return null}let l=0,u=0,d=!1,f=0,p=-1,m=-1,h=/[a-z]/.test(e),g=!0;for(let r=0,c=Math.min(e.length,200),_=0;r<c&&u<s;){let c=Ae(e,r);o<0&&(l<s&&c==t[l]&&(i[l++]=r),f<s&&(c==t[f]||c==n[f]?(f==0&&(p=r),m=r+1,f++):f=0));let v,y=c<255?c>=48&&c<=57||c>=97&&c<=122?2:+(c>=65&&c<=90):(v=le(c))==v.toLowerCase()?v==v.toUpperCase()?0:2:1;(!r||y==1&&h||_==0&&y!=0)&&(t[u]==c||n[u]==c&&(d=!0)?a[u++]=r:a.length&&(g=!1)),_=y,r+=me(c)}return u==s&&a[0]==0&&g?this.result(-100+(d?-200:0),a,e):f==s&&p==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):f==s?this.ret(-900-e.length,[p,m]):u==s?this.result(-100+(d?-200:0)+-700+(g?0:-1100),a,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,n){let r=[],i=0;for(let e of t){let t=e+(this.astral?me(Ae(n,e)):1);i&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return this.ret(e-n.length,r)}},mr=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}},hr=Je.define({combine(e){return fe(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>``,optionClass:()=>``,aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:_r,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>gr(e(n),t(n)),optionClass:(e,t)=>n=>gr(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function gr(e,t){return e?t?e+` `+t:e:t}function _r(e,t,n,r,i,a){let o=e.textDirection==ve.RTL,s=o,c=!1,l=`top`,u,d,f=t.left-i.left,p=i.right-t.right,m=r.right-r.left,h=r.bottom-r.top;if(s&&f<Math.min(m,p)?s=!1:!s&&p<Math.min(m,f)&&(s=!0),m<=(s?f:p))u=Math.max(i.top,Math.min(n.top,i.bottom-h))-t.top,d=Math.min(400,s?f:p);else{c=!0,d=Math.min(400,(o?t.right:i.right-t.left)-30);let e=i.bottom-t.bottom;e>=h||e>t.top?u=n.bottom-t.top:(l=`bottom`,u=t.bottom-n.top)}let g=(t.bottom-t.top)/a.offsetHeight,_=(t.right-t.left)/a.offsetWidth;return{style:`${l}: ${u/g}px; max-width: ${d/_}px`,class:`cm-completionInfo-`+(c?o?`left-narrow`:`right-narrow`:s?`left`:`right`)}}var vr=gt.define();function yr(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement(`div`);return t.classList.add(`cm-completionIcon`),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>`cm-completionIcon-`+e)),t.setAttribute(`aria-hidden`,`true`),t},position:20}),t.push({render(e,t,n,r){let i=document.createElement(`span`);i.className=`cm-completionLabel`;let a=e.displayLabel||e.label,o=0;for(let e=0;e<r.length;){let t=r[e++],n=r[e++];t>o&&i.appendChild(document.createTextNode(a.slice(o,t)));let s=i.appendChild(document.createElement(`span`));s.appendChild(document.createTextNode(a.slice(t,n))),s.className=`cm-completionMatchedText`,o=n}return o<a.length&&i.appendChild(document.createTextNode(a.slice(o))),i},position:50},{render(e){if(!e.detail)return null;let t=document.createElement(`span`);return t.className=`cm-completionDetail`,t.textContent=e.detail,t},position:80}),t.sort((e,t)=>e.position-t.position).map(e=>e.render)}function br(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.ceil((e-t)/n);return{from:e-r*n,to:e-(r-1)*n}}var xr=class{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass=``;let r=e.state.field(t),{options:i,selected:a}=r.open,o=e.state.facet(hr);this.optionContent=yr(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=br(i.length,a,o.maxRenderedOptions),this.dom=document.createElement(`div`),this.dom.className=`cm-tooltip-autocomplete`,this.updateTooltipClass(e.state),this.dom.addEventListener(`mousedown`,n=>{let{options:r}=e.state.field(t).open;for(let t=n.target,i;t&&t!=this.dom;t=t.parentNode)if(t.nodeName==`LI`&&(i=/-(\d+)$/.exec(t.id))&&+i[1]<r.length){this.applyCompletion(e,r[+i[1]]),n.preventDefault();return}if(n.target==this.list){let t=this.list.classList.contains(`cm-completionListIncompleteTop`)&&n.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains(`cm-completionListIncompleteBottom`)&&n.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;t!=null&&(e.dispatch({effects:vr.of(t)}),n.preventDefault())}}),this.dom.addEventListener(`focusout`,t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(hr).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:fr.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener(`scroll`,()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){let t=e.state.field(this.stateField),n=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),t!=n){let{options:r,selected:i,disabled:a}=t.open;(!n.open||n.open.options!=r)&&(this.range=br(r.length,i,e.state.facet(hr).maxRenderedOptions),this.showOptions(r,t.id)),this.updateSel(),a!=n.open?.disabled&&this.dom.classList.toggle(`cm-tooltip-autocomplete-disabled`,!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(` `))e&&this.dom.classList.remove(e);for(let e of t.split(` `))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=br(t.options.length,t.selected,this.view.state.facet(hr).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let a=typeof i==`string`?document.createTextNode(i):i(r);if(!a)return;`then`in a?a.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)}).catch(e=>se(this.view.state,e,`completion info`)):(this.addInfoPane(a,r),n.setAttribute(`aria-describedby`,this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement(`div`);if(n.className=`cm-tooltip cm-completionInfo`,n.id=`cm-completionInfo-`+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)n.nodeName!=`LI`||!n.id?r--:r==e?n.hasAttribute(`aria-selected`)||(n.setAttribute(`aria-selected`,`true`),t=n):n.hasAttribute(`aria-selected`)&&(n.removeAttribute(`aria-selected`),n.removeAttribute(`aria-describedby`));return t&&Cr(this.list,t),t}measureInfo(){let e=this.dom.querySelector(`[aria-selected]`);if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(hr).positionInfo(this.view,t,r,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className=`cm-tooltip cm-completionInfo `+(e.class||``)):this.info.style.cssText=`top: -1e6px`)}createListBox(e,t,n){let r=document.createElement(`ul`);r.id=t,r.setAttribute(`role`,`listbox`),r.setAttribute(`aria-expanded`,`true`),r.setAttribute(`aria-label`,this.view.state.phrase(`Completions`)),r.addEventListener(`mousedown`,e=>{e.target==r&&e.preventDefault()});let i=null;for(let a=n.from;a<n.to;a++){let{completion:o,match:s}=e[a],{section:c}=o;if(c){let e=typeof c==`string`?c:c.name;if(e!=i&&(a>n.from||n.from==0)){if(i=e,typeof c!=`string`&&c.header)r.appendChild(c.header(c));else{let t=r.appendChild(document.createElement(`completion-section`));t.textContent=e}}}let l=r.appendChild(document.createElement(`li`));l.id=t+`-`+a,l.setAttribute(`role`,`option`);let u=this.optionClass(o);u&&(l.className=u);for(let e of this.optionContent){let t=e(o,this.view.state,this.view,s);t&&l.appendChild(t)}}return n.from&&r.classList.add(`cm-completionListIncompleteTop`),n.to<e.length&&r.classList.add(`cm-completionListIncompleteBottom`),r}destroyInfo(){this.info&&=(this.infoDestroy&&this.infoDestroy(),this.info.remove(),null)}destroy(){this.destroyInfo()}};function Sr(e,t){return n=>new xr(n,e,t)}function Cr(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.top<n.top?e.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}function wr(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+ +!!e.type}function Tr(e,t){let n=[],r=null,i=null,a=e=>{n.push(e);let{section:t}=e.completion;if(t){r||=[];let e=typeof t==`string`?t:t.name;r.some(t=>t.name==e)||r.push(typeof t==`string`?{name:e}:t)}},o=t.facet(hr);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(r.result.filter===!1)for(let t of r.result.options)a(new ir(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),s,c=o.filterStrict?new mr(n):new pr(n);for(let t of r.result.options)if(s=c.match(t.label)){let n=t.displayLabel?e?e(t,s.matched):[]:s.matched,o=s.score+(t.boost||0);if(a(new ir(t,r.source,n,o)),typeof t.section==`object`&&t.section.rank===`dynamic`){let{name:e}=t.section;i||=Object.create(null),i[e]=Math.max(o,i[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0,a=(e,t)=>(e.rank===`dynamic`&&t.rank===`dynamic`?i[t.name]-i[e.name]:0)||(typeof e.rank==`number`?e.rank:1e9)-(typeof t.rank==`number`?t.rank:1e9)||(e.name<t.name?-1:1);for(let n of r.sort(a))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e[typeof n==`string`?n:n.name])}}let s=[],c=null,l=o.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||l(e.completion,t.completion))){let t=e.completion;!c||c.label!=t.label||c.detail!=t.detail||c.type!=null&&t.type!=null&&c.type!=t.type||c.apply!=t.apply||c.boost!=t.boost?s.push(e):wr(e.completion)>wr(c)&&(s[s.length-1]=e),c=e.completion}return s}var Er=class e{constructor(e,t,n,r,i,a){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=a}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new e(this.options,jr(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,r,i,a,o){if(i&&!o&&t.some(e=>e.isPending))return i.setDisabled();let s=Tr(t,n);if(!s.length)return i&&t.some(e=>e.isPending)?i.setDisabled():null;let c=n.facet(hr).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let e=i.options[i.selected].completion;for(let t=0;t<s.length;t++)if(s[t].completion==e){c=t;break}}return new e(s,jr(r,c),{pos:t.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:Br,above:a.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(t){return new e(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new e(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},Dr=class e{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new e(Mr,`cm-ac-`+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,r=n.facet(hr),i=(r.override||n.languageDataAt(`autocomplete`,ar(n)).map(ur)).map(e=>(this.active.find(t=>t.source==e)||new Pr(e,+!!this.active.some(e=>e.state!=0))).update(t,r));i.length==this.active.length&&i.every((e,t)=>e==this.active[t])&&(i=this.active);let a=this.open,o=t.effects.some(e=>e.is(Lr));a&&t.docChanged&&(a=a.map(t.changes)),t.selection||i.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!Or(i,this.active)||o?a=Er.build(i,n,this.id,a,r,o):a&&a.disabled&&!i.some(e=>e.isPending)&&(a=null),!a&&i.every(e=>!e.isPending)&&i.some(e=>e.hasResult())&&(i=i.map(e=>e.hasResult()?new Pr(e.source,0):e));for(let e of t.effects)e.is(vr)&&(a&&=a.setSelected(e.value,this.id));return i==this.active&&a==this.open?this:new e(i,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?kr:Ar}};function Or(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,a=r==t.length;if(i||a)return i==a;if(e[n++].result!=t[r++].result)return!1}}var kr={"aria-autocomplete":`list`},Ar={};function jr(e,t){let n={"aria-autocomplete":`list`,"aria-haspopup":`listbox`,"aria-controls":e};return t>-1&&(n[`aria-activedescendant`]=e+`-`+t),n}var Mr=[];function Nr(e,t){if(e.isUserEvent(`input.complete`)){let n=e.annotation(sr);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent(`input.type`);return n&&t.activateOnTyping?5:n?1:e.isUserEvent(`delete.backward`)?2:e.selection?8:e.docChanged?16:0}var Pr=class e{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let r=Nr(t,n),i=this;(r&8||r&16&&this.touches(t))&&(i=new e(i.source,0)),r&4&&i.state==0&&(i=new e(this.source,1)),i=i.updateFor(t,r);for(let n of t.effects)if(n.is(dr))i=new e(i.source,1,n.value);else if(n.is(fr))i=new e(i.source,0);else if(n.is(Lr))for(let e of n.value)e.source==i.source&&(i=e);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(ar(e.state))}},Fr=class e extends Pr{constructor(e,t,n,r,i,a){super(e,3,t),this.limit=n,this.result=r,this.from=i,this.to=a}hasResult(){return!0}updateFor(t,n){if(!(n&3))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let i=t.changes.mapPos(this.from),a=t.changes.mapPos(this.to,1),o=ar(t.state);if(o>a||!r||n&2&&(ar(t.startState)==this.from||o<this.limit))return new Pr(this.source,n&4?1:0);let s=t.changes.mapPos(this.limit);return Ir(r.validFor,t.state,i,a)?new e(this.source,this.explicit,s,r,i,a):r.update&&(r=r.update(r,i,a,new $n(t.state,o,!1)))?new e(this.source,this.explicit,s,r,r.from,r.to??ar(t.state)):new Pr(this.source,1,this.explicit)}map(t){if(t.empty)return this;let n=this.result.map?this.result.map(this.result,t):this.result;return n?new e(this.source,this.explicit,t.mapPos(this.limit),n,t.mapPos(this.from),t.mapPos(this.to,1)):new Pr(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}};function Ir(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return typeof e==`function`?e(i,n,r,t):or(e,!0).test(i)}var Lr=gt.define({map(e,t){return e.map(e=>e.map(t))}}),Rr=Oe.define({create(){return Dr.start()},update(e,t){return e.update(t)},provide:e=>[Ye.from(e,e=>e.tooltip),xe.contentAttributes.from(e,e=>e.attrs)]});function zr(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(Rr).active.find(e=>e.source==t.source);return r instanceof Fr&&(typeof n==`string`?e.dispatch({...cr(e.state,n,r.from,r.to),annotations:sr.of(t.completion)}):n(e,t.completion,r.from,r.to),!0)}var Br=Sr(Rr,zr);function Vr(e,t=`option`){return n=>{let r=n.state.field(Rr,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(hr).interactionDelay)return!1;let i=1,a;t==`page`&&(a=be(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(a.dom.offsetHeight/a.dom.querySelector(`li`).offsetHeight)-1));let{length:o}=r.open.options,s=r.open.selected>-1?r.open.selected+i*(e?1:-1):e?0:o-1;return s<0?s=t==`page`?0:o-1:s>=o&&(s=t==`page`?o-1:0),n.dispatch({effects:vr.of(s)}),!0}}var Hr=e=>{let t=e.state.field(Rr,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(hr).interactionDelay?!1:zr(e,t.open.options[t.open.selected])},Ur=e=>e.state.field(Rr,!1)?(e.dispatch({effects:dr.of(!0)}),!0):!1,Wr=e=>{let t=e.state.field(Rr,!1);return!t||!t.active.some(e=>e.state!=0)?!1:(e.dispatch({effects:fr.of(null)}),!0)},Gr=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},Kr=50,qr=1e3,Jr=Ee.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(Rr).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(Rr),n=e.state.facet(hr);if(!e.selectionSet&&!e.docChanged&&e.startState.field(Rr)==t)return;let r=e.transactions.some(e=>{let t=Nr(e,n);return t&8||(e.selection||e.docChanged)&&!(t&3)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>Kr&&Date.now()-n.time>qr){for(let e of n.context.abortListeners)try{e()}catch(e){se(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(dr)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let t of e.transactions)t.isUserEvent(`input.type`)?this.composing=2:this.composing==2&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(Rr);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(hr).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=new $n(t,ar(t),e.explicit,this.view),r=new Gr(e,n);this.running.push(r),Promise.resolve(e.source(n)).then(e=>{r.context.aborted||(r.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:fr.of(null)}),se(this.view.state,e)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(hr).updateSyncTime))}accept(){this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(hr),n=this.view.state.field(Rr);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let n=ar(i.updates.length?i.updates[0].startState:this.view.state),r=Math.min(n,i.done.from+ +!i.active.explicit),a=new Fr(i.active.source,i.active.explicit,r,i.done,i.done.from,i.done.to??n);for(let e of i.updates)a=a.update(e,t);if(a.hasResult()){e.push(a);continue}}let a=n.active.find(e=>e.source==i.active.source);if(a&&a.isPending){if(i.done==null){let n=new Pr(i.active.source,0);for(let e of i.updates)n=n.update(e,t);n.isPending||e.push(n)}else this.startQuery(a)}}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:Lr.of(e)})}},{eventHandlers:{blur(e){let t=this.view.state.field(Rr,!1);if(t&&t.tooltip&&this.view.state.facet(hr).closeOnBlur){let n=t.open&&be(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:fr.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:dr.of(!1)}),20),this.composing=0}}}),Yr=typeof navigator==`object`&&/Win/.test(navigator.platform),Xr=Le.highest(xe.domEventHandlers({keydown(e,t){let n=t.state.field(Rr,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(Yr&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(e=>e.source==r.source),a=r.completion.commitCharacters||i.result.commitCharacters;return a&&a.indexOf(e.key)>-1&&zr(t,r),!1}})),Zr=xe.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`,cursor:`pointer`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),Qr=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},$r=class e{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(t){let n=t.mapPos(this.from,-1,qe.TrackDel),r=t.mapPos(this.to,1,qe.TrackDel);return n==null||r==null?null:new e(this.field,n,r)}},ei=class e{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),a=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=a,o=/^\t*/.exec(i)[0].length;for(let t=0;t<o;t++)n+=e.facet(pe);r.push(t+n.length-o),i=n+i.slice(o)}n.push(i),t+=i.length+1}return{text:n,ranges:this.fieldPositions.map(e=>new $r(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(t){let n=[],r=[],i=[],a;for(let e of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(e);){let t=a[1]?+a[1]:null,o=a[2]||a[3]||``,s=-1;t===0&&(t=1e9);let c=o.replace(/\\[{}]/g,e=>e[1]);for(let e=0;e<n.length;e++)(t==null?c&&n[e].name==c:n[e].seq==t)&&(s=e);if(s<0){let e=0;for(;e<n.length&&(t==null||n[e].seq!=null&&n[e].seq<t);)e++;n.splice(e,0,{seq:t,name:c}),s=e;for(let e of i)e.field>=s&&e.field++}for(let e of i)if(e.line==r.length&&e.from>a.index){let t=a[2]?3+(a[1]||``).length:2;e.from-=t,e.to-=t}i.push(new Qr(s,r.length,a.index,a.index+c.length)),e=e.slice(0,a.index)+o+e.slice(a.index+a[0].length)}e=e.replace(/\\([{}])/g,(e,t,n)=>{for(let e of i)e.line==r.length&&e.from>n&&(e.from--,e.to--);return t}),r.push(e)}return new e(r,i)}},ti=he.widget({widget:new class extends vt{toDOM(){let e=document.createElement(`span`);return e.className=`cm-snippetFieldPosition`,e}ignoreEvent(){return!1}}}),ni=he.mark({class:`cm-snippetField`}),ri=class e{constructor(e,t){this.ranges=e,this.active=t,this.deco=he.set(e.map(e=>(e.from==e.to?ti:ni).range(e.from,e.to)),!0)}map(t){let n=[];for(let e of this.ranges){let r=e.map(t);if(!r)return null;n.push(r)}return new e(n,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}},ii=gt.define({map(e,t){return e&&e.map(t)}}),ai=gt.define(),oi=Oe.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(ii))return n.value;if(n.is(ai)&&e)return new ri(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>xe.decorations.from(e,e=>e?e.deco:he.none)});function si(e,t){return D.create(e.filter(e=>e.field==t).map(e=>D.range(e.from,e.to)))}function ci(e){let t=ei.parse(e);return(e,n,r,i)=>{let{text:a,ranges:o}=t.instantiate(e.state,r),{main:s}=e.state.selection,c={changes:{from:r,to:i==s.from?s.to:i,insert:de.of(a)},scrollIntoView:!0,annotations:n?[sr.of(n),mt.userEvent.of(`input.complete`)]:void 0};if(o.length&&(c.selection=si(o,0)),o.some(e=>e.field>0)){let t=new ri(o,0),n=c.effects=[ii.of(t)];e.state.field(oi,!1)===void 0&&n.push(gt.appendConfig.of([oi,fi,mi,Zr]))}e.dispatch(e.state.update(c))}}function li(e){return({state:t,dispatch:n})=>{let r=t.field(oi,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:si(r.ranges,i),effects:ii.of(a?null:new ri(r.ranges,i)),scrollIntoView:!0})),!0}}var ui=[{key:`Tab`,run:li(1),shift:li(-1)},{key:`Escape`,run:({state:e,dispatch:t})=>e.field(oi,!1)?(t(e.update({effects:ii.of(null)})),!0):!1}],di=Je.define({combine(e){return e.length?e[0]:ui}}),fi=Le.highest(Ie.compute([di],e=>e.facet(di)));function pi(e,t){return{...t,apply:ci(e)}}var mi=xe.domEventHandlers({mousedown(e,t){let n=t.state.field(oi,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(e=>e.from<=r&&e.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:si(n.ranges,i.field),effects:ii.of(n.ranges.some(e=>e.field>i.field)?new ri(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),hi={brackets:[`(`,`[`,`{`,`'`,`"`],before:`)]}:;>`,stringPrefixes:[]},gi=gt.define({map(e,t){return t.mapPos(e,-1,qe.TrackAfter)??void 0}}),_i=new class extends ze{};_i.startSide=1,_i.endSide=-1;var vi=Oe.define({create(){return ft.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(gi)&&(e=e.update({add:[_i.range(n.value,n.value+1)]}));return e}});function yi(){return[wi,vi]}var bi=`()[]{}<>«»»«[]{}`;function xi(e){for(let t=0;t<16;t+=2)if(bi.charCodeAt(t)==e)return bi.charAt(t+1);return le(e<128?e:e+1)}function Si(e,t){return e.languageDataAt(`closeBrackets`,t)[0]||hi}var Ci=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),wi=xe.inputHandler.of((e,t,n,r)=>{if((Ci?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||r.length==2&&me(Ae(r,0))==1||t!=i.from||n!=i.to)return!1;let a=Ei(e.state,r);return a?(e.dispatch(a),!0):!1}),Ti=[{key:`Backspace`,run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Si(e,e.selection.main.head).brackets||hi.brackets,r=null,i=e.changeByRange(t=>{if(t.empty){let r=ki(e.doc,t.head);for(let i of n)if(i==r&&Oi(e.doc,t.head)==xi(Ae(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:D.cursor(t.head-i.length)}}return{range:r=t}});return r||t(e.update(i,{scrollIntoView:!0,userEvent:`delete.backward`})),!r}}];function Ei(e,t){let n=Si(e,e.selection.main.head),r=n.brackets||hi.brackets;for(let i of r){let a=xi(Ae(i,0));if(t==i)return a==i?Mi(e,i,r.indexOf(i+i+i)>-1,n):Ai(e,i,a,n.before||hi.before);if(t==a&&Di(e,e.selection.main.from))return ji(e,i,a)}return null}function Di(e,t){let n=!1;return e.field(vi).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function Oi(e,t){let n=e.sliceString(t,t+2);return n.slice(0,me(Ae(n,0)))}function ki(e,t){let n=e.sliceString(t-2,t);return me(Ae(n,0))==n.length?n:n.slice(1)}function Ai(e,t,n,r){let i=null,a=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:t,from:a.from},{insert:n,from:a.to}],effects:gi.of(a.to+t.length),range:D.range(a.anchor+t.length,a.head+t.length)};let o=Oi(e.doc,a.head);return!o||/\s/.test(o)||r.indexOf(o)>-1?{changes:{insert:t+n,from:a.head},effects:gi.of(a.head+t.length),range:D.cursor(a.head+t.length)}:{range:i=a}});return i?null:e.update(a,{scrollIntoView:!0,userEvent:`input.type`})}function ji(e,t,n){let r=null,i=e.changeByRange(t=>t.empty&&Oi(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:D.cursor(t.head+n.length)}:r={range:t});return r?null:e.update(i,{scrollIntoView:!0,userEvent:`input.type`})}function Mi(e,t,n,r){let i=r.stringPrefixes||hi.stringPrefixes,a=null,o=e.changeByRange(r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:gi.of(r.to+t.length),range:D.range(r.anchor+t.length,r.head+t.length)};let o=r.head,s=Oi(e.doc,o),c;if(s==t){if(Ni(e,o))return{changes:{insert:t+t,from:o},effects:gi.of(o+t.length),range:D.cursor(o+t.length)};if(Di(e,o)){let r=n&&e.sliceDoc(o,o+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:o,to:o+r.length,insert:r},range:D.cursor(o+r.length)}}}else if(n&&e.sliceDoc(o-2*t.length,o)==t+t&&(c=Fi(e,o-2*t.length,i))>-1&&Ni(e,c))return{changes:{insert:t+t+t+t,from:o},effects:gi.of(o+t.length),range:D.cursor(o+t.length)};else if(e.charCategorizer(o)(s)!=He.Word&&Fi(e,o,i)>-1&&!Pi(e,o,t,i))return{changes:{insert:t+t,from:o},effects:gi.of(o+t.length),range:D.cursor(o+t.length)};return{range:a=r}});return a?null:e.update(o,{scrollIntoView:!0,userEvent:`input.type`})}function Ni(e,t){let n=Xe(e).resolveInner(t+1);return n.parent&&n.from==t}function Pi(e,t,n,r){let i=Xe(e).resolveInner(t,-1),a=r.reduce((e,t)=>Math.max(e,t.length),0);for(let o=0;o<5;o++){let o=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+a)),s=o.indexOf(n);if(!s||s>-1&&r.indexOf(o.slice(0,s))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+s;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let c=i.to==t&&i.parent;if(!c)break;i=c}return!1}function Fi(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=He.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=He.Word)return n}return-1}function Ii(e={}){return[Xr,Rr,hr.of(e),Jr,Ri,Zr]}var Li=[{key:`Ctrl-Space`,run:Ur},{mac:"Alt-`",run:Ur},{mac:`Alt-i`,run:Ur},{key:`Escape`,run:Wr},{key:`ArrowDown`,run:Vr(!0)},{key:`ArrowUp`,run:Vr(!1)},{key:`PageDown`,run:Vr(!0,`page`)},{key:`PageUp`,run:Vr(!1,`page`)},{key:`Enter`,run:Hr}],Ri=Le.highest(Ie.computeN([hr],e=>e.facet(hr).defaultKeymap?[Li]:[])),zi=`Expected a function`,Bi=Math.max,Vi=Math.min;function Hi(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0;if(typeof e!=`function`)throw TypeError(zi);t=Ct(t)||0,xt(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?Bi(Ct(n.maxWait)||0,t):a,f=`trailing`in n?!!n.trailing:f);function p(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function m(e){return l=e,s=setTimeout(_,t),u?p(e):o}function h(e){var n=e-c,r=e-l,i=t-n;return d?Vi(i,a-r):i}function g(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function _(){var e=Tt();if(g(e))return v(e);s=setTimeout(_,h(e))}function v(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function y(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function b(){return s===void 0?o:v(Tt())}function x(){var e=Tt(),n=g(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return m(c);if(d)return clearTimeout(s),s=setTimeout(_,t),p(c)}return s===void 0&&(s=setTimeout(_,t)),o}return x.cancel=y,x.flush=b,x}function Ui(e,t,n,r,i,a){return xt(e)&&xt(t)&&(a.set(t,e),Et(e,t,void 0,Ui,a),a.delete(t)),e}var Wi=wt(function(e,t,n,r){Et(e,t,n,r)}),Gi=bt(function(e){return e.push(void 0,Ui),St(Wi,void 0,e)}),Ki=`Expected a function`;function qi(e,t,n){var r=!0,i=!0;if(typeof e!=`function`)throw TypeError(Ki);return xt(n)&&(r=`leading`in n?!!n.leading:r,i=`trailing`in n?!!n.trailing:i),Hi(e,t,{leading:r,maxWait:t,trailing:i})}function O(e){return new rt(Be.define(e))}function Ji(e){return w(()=>import(`./dist-CF9ODvoZ.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([0,1,2]))}var Yi=[E.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return w(()=>import(`./dist-BY24_62d.js`).then(e=>e.cpp()),__vite__mapDeps([3,1,2]))}}),E.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return w(()=>import(`./dist-BY24_62d.js`).then(e=>e.cpp()),__vite__mapDeps([3,1,2]))}}),E.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return Ji(`Cassandra`)}}),E.of({name:`CSS`,extensions:[`css`],load(){return w(()=>import(`./dist-C3sBgvRy.js`).then(e=>e.i).then(e=>e.css()),__vite__mapDeps([4,5,1,2]))}}),E.of({name:`Go`,extensions:[`go`],load(){return w(()=>import(`./dist-SkTbIIlQ.js`).then(e=>e.go()),__vite__mapDeps([6,1,2]))}}),E.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return w(()=>import(`./dist-BuXYTGDD.js`).then(e=>e.html()),__vite__mapDeps([7,1,2,4,5,8]))}}),E.of({name:`Java`,extensions:[`java`],load(){return w(()=>import(`./dist-DpKJcdvz.js`).then(e=>e.java()),__vite__mapDeps([9,1,2]))}}),E.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return w(()=>import(`./dist-BHgrth9o.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([8,5,1,2]))}}),E.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return w(()=>import(`./dist-CFdeFDlk.js`).then(e=>e.jinja()),__vite__mapDeps([10,1,2,7,4,5,8]))}}),E.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return w(()=>import(`./dist-D7Llw4iH.js`).then(e=>e.json()),__vite__mapDeps([11,1,2]))}}),E.of({name:`JSX`,extensions:[`jsx`],load(){return w(()=>import(`./dist-BHgrth9o.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([8,5,1,2]))}}),E.of({name:`LESS`,extensions:[`less`],load(){return w(()=>import(`./dist-CqGqStPp.js`).then(e=>e.less()),__vite__mapDeps([12,1,2,4,5]))}}),E.of({name:`Liquid`,extensions:[`liquid`],load(){return w(()=>import(`./dist-DAm4VXST.js`).then(e=>e.liquid()),__vite__mapDeps([13,1,2,7,4,5,8]))}}),E.of({name:`MariaDB SQL`,load(){return Ji(`MariaSQL`)}}),E.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return w(()=>import(`./dist-BS_doyKJ.js`).then(e=>e.markdown()),__vite__mapDeps([14,1,7,2,4,5,8]))}}),E.of({name:`MS SQL`,load(){return Ji(`MSSQL`)}}),E.of({name:`MySQL`,load(){return Ji(`MySQL`)}}),E.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return w(()=>import(`./dist-DwGuvnij.js`).then(e=>e.php()),__vite__mapDeps([15,1,2,7,4,5,8]))}}),E.of({name:`PLSQL`,extensions:[`pls`],load(){return Ji(`PLSQL`)}}),E.of({name:`PostgreSQL`,load(){return Ji(`PostgreSQL`)}}),E.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return w(()=>import(`./dist-fjYccora.js`).then(e=>e.python()),__vite__mapDeps([16,1,2]))}}),E.of({name:`Rust`,extensions:[`rs`],load(){return w(()=>import(`./dist-DZQ2IsS9.js`).then(e=>e.rust()),__vite__mapDeps([17,1,2]))}}),E.of({name:`Sass`,extensions:[`sass`],load(){return w(()=>import(`./dist-DUt0feNB.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([18,1,2,4,5]))}}),E.of({name:`SCSS`,extensions:[`scss`],load(){return w(()=>import(`./dist-DUt0feNB.js`).then(e=>e.sass()),__vite__mapDeps([18,1,2,4,5]))}}),E.of({name:`SQL`,extensions:[`sql`],load(){return Ji(`StandardSQL`)}}),E.of({name:`SQLite`,load(){return Ji(`SQLite`)}}),E.of({name:`TSX`,extensions:[`tsx`],load(){return w(()=>import(`./dist-BHgrth9o.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([8,5,1,2]))}}),E.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return w(()=>import(`./dist-BHgrth9o.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,5,1,2]))}}),E.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return w(()=>import(`./dist-LFPPEX39.js`).then(e=>e.wast()),__vite__mapDeps([19,1,2]))}}),E.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return w(()=>import(`./dist-DuZv0LJj.js`).then(e=>e.xml()),__vite__mapDeps([20,1,2]))}}),E.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return w(()=>import(`./dist-lC0EKTFH.js`).then(e=>e.yaml()),__vite__mapDeps([21,1,2]))}}),E.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return w(()=>import(`./apl-gfMMiTNf.js`).then(e=>O(e.apl)),[])}}),E.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return w(()=>import(`./asciiarmor-C_eisQCp.js`).then(e=>O(e.asciiArmor)),[])}}),E.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return w(()=>import(`./asn1-DCl_8MCW.js`).then(e=>O(e.asn1({}))),[])}}),E.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return w(()=>import(`./asterisk-BEn0Cwpx.js`).then(e=>O(e.asterisk)),[])}}),E.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return w(()=>import(`./brainfuck-D5EjA2JK.js`).then(e=>O(e.brainfuck)),[])}}),E.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return w(()=>import(`./cobol-DHLQUbN7.js`).then(e=>O(e.cobol)),[])}}),E.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return w(()=>import(`./clike-D_6L3tnO.js`).then(e=>O(e.csharp)),[])}}),E.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return w(()=>import(`./clojure-BflJGmDX.js`).then(e=>O(e.clojure)),[])}}),E.of({name:`ClojureScript`,extensions:[`cljs`],load(){return w(()=>import(`./clojure-BflJGmDX.js`).then(e=>O(e.clojure)),[])}}),E.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return w(()=>import(`./css-CnaYoQib.js`).then(e=>O(e.gss)),[])}}),E.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return w(()=>import(`./cmake-84nbDH0I.js`).then(e=>O(e.cmake)),[])}}),E.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return w(()=>import(`./coffeescript-De_zI4J0.js`).then(e=>O(e.coffeeScript)),[])}}),E.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return w(()=>import(`./commonlisp-DgAKBe0r.js`).then(e=>O(e.commonLisp)),[])}}),E.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return w(()=>import(`./cypher-p9eYesGn.js`).then(e=>O(e.cypher)),[])}}),E.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return w(()=>import(`./python-B_1Jd8HM.js`).then(e=>O(e.cython)),[])}}),E.of({name:`Crystal`,extensions:[`cr`],load(){return w(()=>import(`./crystal-Bsdphhtm.js`).then(e=>O(e.crystal)),[])}}),E.of({name:`D`,extensions:[`d`],load(){return w(()=>import(`./d-DWkQyNnU.js`).then(e=>O(e.d)),[])}}),E.of({name:`Dart`,extensions:[`dart`],load(){return w(()=>import(`./clike-D_6L3tnO.js`).then(e=>O(e.dart)),[])}}),E.of({name:`diff`,extensions:[`diff`,`patch`],load(){return w(()=>import(`./diff-ChtP43wD.js`).then(e=>O(e.diff)),[])}}),E.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return w(()=>import(`./dockerfile-DJkHQgkl.js`).then(e=>O(e.dockerFile)),__vite__mapDeps([22,23]))}}),E.of({name:`DTD`,extensions:[`dtd`],load(){return w(()=>import(`./dtd-DTF72YNO.js`).then(e=>O(e.dtd)),[])}}),E.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return w(()=>import(`./dylan-BCDoL_-p.js`).then(e=>O(e.dylan)),[])}}),E.of({name:`EBNF`,load(){return w(()=>import(`./ebnf-D4c0_ac3.js`).then(e=>O(e.ebnf)),[])}}),E.of({name:`ECL`,extensions:[`ecl`],load(){return w(()=>import(`./ecl-BVIeWmwY.js`).then(e=>O(e.ecl)),[])}}),E.of({name:`edn`,extensions:[`edn`],load(){return w(()=>import(`./clojure-BflJGmDX.js`).then(e=>O(e.clojure)),[])}}),E.of({name:`Eiffel`,extensions:[`e`],load(){return w(()=>import(`./eiffel-BEjRio4Q.js`).then(e=>O(e.eiffel)),[])}}),E.of({name:`Elm`,extensions:[`elm`],load(){return w(()=>import(`./elm-Cshzl8qu.js`).then(e=>O(e.elm)),[])}}),E.of({name:`Erlang`,extensions:[`erl`],load(){return w(()=>import(`./erlang-BV0c4Hdn.js`).then(e=>O(e.erlang)),[])}}),E.of({name:`Esper`,load(){return w(()=>import(`./sql-DuQMFDvy.js`).then(e=>O(e.esper)),[])}}),E.of({name:`Factor`,extensions:[`factor`],load(){return w(()=>import(`./factor-LKH5gN8L.js`).then(e=>O(e.factor)),__vite__mapDeps([24,23]))}}),E.of({name:`FCL`,load(){return w(()=>import(`./fcl-ClOhbFR7.js`).then(e=>O(e.fcl)),[])}}),E.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return w(()=>import(`./forth-D6RzAl64.js`).then(e=>O(e.forth)),[])}}),E.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return w(()=>import(`./fortran-Bt6PBEDR.js`).then(e=>O(e.fortran)),[])}}),E.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return w(()=>import(`./mllike-B45xgp2S.js`).then(e=>O(e.fSharp)),[])}}),E.of({name:`Gas`,extensions:[`s`],load(){return w(()=>import(`./gas-BHEdbvp9.js`).then(e=>O(e.gas)),[])}}),E.of({name:`Gherkin`,extensions:[`feature`],load(){return w(()=>import(`./gherkin-oBAE_ms0.js`).then(e=>O(e.gherkin)),[])}}),E.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return w(()=>import(`./groovy-CUpZ7dEl.js`).then(e=>O(e.groovy)),[])}}),E.of({name:`Haskell`,extensions:[`hs`],load(){return w(()=>import(`./haskell-BRsoo5mP.js`).then(e=>O(e.haskell)),[])}}),E.of({name:`Haxe`,extensions:[`hx`],load(){return w(()=>import(`./haxe-DjVOVvNP.js`).then(e=>O(e.haxe)),[])}}),E.of({name:`HXML`,extensions:[`hxml`],load(){return w(()=>import(`./haxe-DjVOVvNP.js`).then(e=>O(e.hxml)),[])}}),E.of({name:`HTTP`,load(){return w(()=>import(`./http-CLVgA2GD.js`).then(e=>O(e.http)),[])}}),E.of({name:`IDL`,extensions:[`pro`],load(){return w(()=>import(`./idl-BUZw3wgd.js`).then(e=>O(e.idl)),[])}}),E.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return w(()=>import(`./javascript-Bu8mWwtz.js`).then(e=>O(e.jsonld)),[])}}),E.of({name:`Julia`,extensions:[`jl`],load(){return w(()=>import(`./julia-CQfgDRfP.js`).then(e=>O(e.julia)),[])}}),E.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return w(()=>import(`./clike-D_6L3tnO.js`).then(e=>O(e.kotlin)),[])}}),E.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return w(()=>import(`./livescript-BXxG0Yva.js`).then(e=>O(e.liveScript)),[])}}),E.of({name:`Lua`,extensions:[`lua`],load(){return w(()=>import(`./lua-DPCEkfD_.js`).then(e=>O(e.lua)),[])}}),E.of({name:`mIRC`,extensions:[`mrc`],load(){return w(()=>import(`./mirc-C9zpzAZU.js`).then(e=>O(e.mirc)),[])}}),E.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return w(()=>import(`./mathematica-u8YMmbU0.js`).then(e=>O(e.mathematica)),[])}}),E.of({name:`Modelica`,extensions:[`mo`],load(){return w(()=>import(`./modelica-CqHI_q-D.js`).then(e=>O(e.modelica)),[])}}),E.of({name:`MUMPS`,extensions:[`mps`],load(){return w(()=>import(`./mumps-BSzj6Xyz.js`).then(e=>O(e.mumps)),[])}}),E.of({name:`Mbox`,extensions:[`mbox`],load(){return w(()=>import(`./mbox-BEMVcqjs.js`).then(e=>O(e.mbox)),[])}}),E.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return w(()=>import(`./nginx-8H7HVH4w.js`).then(e=>O(e.nginx)),[])}}),E.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return w(()=>import(`./nsis-viPvXFiq.js`).then(e=>O(e.nsis)),__vite__mapDeps([25,23]))}}),E.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return w(()=>import(`./ntriples-B9h1VB_g.js`).then(e=>O(e.ntriples)),[])}}),E.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return w(()=>import(`./clike-D_6L3tnO.js`).then(e=>O(e.objectiveC)),[])}}),E.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return w(()=>import(`./clike-D_6L3tnO.js`).then(e=>O(e.objectiveCpp)),[])}}),E.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return w(()=>import(`./mllike-B45xgp2S.js`).then(e=>O(e.oCaml)),[])}}),E.of({name:`Octave`,extensions:[`m`],load(){return w(()=>import(`./octave-D2Q8cUp1.js`).then(e=>O(e.octave)),[])}}),E.of({name:`Oz`,extensions:[`oz`],load(){return w(()=>import(`./oz-BwTct_5T.js`).then(e=>O(e.oz)),[])}}),E.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return w(()=>import(`./pascal-Dp_KdFgX.js`).then(e=>O(e.pascal)),[])}}),E.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return w(()=>import(`./perl-BkSkiI9m.js`).then(e=>O(e.perl)),[])}}),E.of({name:`Pig`,extensions:[`pig`],load(){return w(()=>import(`./pig-AF4Hwhju.js`).then(e=>O(e.pig)),[])}}),E.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return w(()=>import(`./powershell-BcIto6Sf.js`).then(e=>O(e.powerShell)),[])}}),E.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return w(()=>import(`./properties-C357ku5U.js`).then(e=>O(e.properties)),[])}}),E.of({name:`ProtoBuf`,extensions:[`proto`],load(){return w(()=>import(`./protobuf-D1ij_kNL.js`).then(e=>O(e.protobuf)),[])}}),E.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return w(()=>import(`./pug-3K-JMW4g.js`).then(e=>O(e.pug)),__vite__mapDeps([26,27]))}}),E.of({name:`Puppet`,extensions:[`pp`],load(){return w(()=>import(`./puppet-BZyAS7I4.js`).then(e=>O(e.puppet)),[])}}),E.of({name:`Q`,extensions:[`q`],load(){return w(()=>import(`./q-B9NhS7L_.js`).then(e=>O(e.q)),[])}}),E.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return w(()=>import(`./r-CxDmU1I4.js`).then(e=>O(e.r)),[])}}),E.of({name:`RPM Changes`,load(){return w(()=>import(`./rpm-gpDK5sbt.js`).then(e=>O(e.rpmChanges)),[])}}),E.of({name:`RPM Spec`,extensions:[`spec`],load(){return w(()=>import(`./rpm-gpDK5sbt.js`).then(e=>O(e.rpmSpec)),[])}}),E.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return w(()=>import(`./ruby-ChfNwlCY.js`).then(e=>O(e.ruby)),[])}}),E.of({name:`SAS`,extensions:[`sas`],load(){return w(()=>import(`./sas-C2OyD2Y6.js`).then(e=>O(e.sas)),[])}}),E.of({name:`Scala`,extensions:[`scala`],load(){return w(()=>import(`./clike-D_6L3tnO.js`).then(e=>O(e.scala)),[])}}),E.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return w(()=>import(`./scheme-D9qYN0V5.js`).then(e=>O(e.scheme)),[])}}),E.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return w(()=>import(`./shell-DwuoZtxw.js`).then(e=>O(e.shell)),[])}}),E.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return w(()=>import(`./sieve-tLWDfEkZ.js`).then(e=>O(e.sieve)),[])}}),E.of({name:`Smalltalk`,extensions:[`st`],load(){return w(()=>import(`./smalltalk-BLp5-jwC.js`).then(e=>O(e.smalltalk)),[])}}),E.of({name:`Solr`,load(){return w(()=>import(`./solr-B78wSQJQ.js`).then(e=>O(e.solr)),[])}}),E.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return w(()=>import(`./mllike-B45xgp2S.js`).then(e=>O(e.sml)),[])}}),E.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return w(()=>import(`./sparql-Dz-mlCAC.js`).then(e=>O(e.sparql)),[])}}),E.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return w(()=>import(`./spreadsheet-CTIncYxj.js`).then(e=>O(e.spreadsheet)),[])}}),E.of({name:`Squirrel`,extensions:[`nut`],load(){return w(()=>import(`./clike-D_6L3tnO.js`).then(e=>O(e.squirrel)),[])}}),E.of({name:`Stylus`,extensions:[`styl`],load(){return w(()=>import(`./stylus-BOVgKnng.js`).then(e=>O(e.stylus)),[])}}),E.of({name:`Swift`,extensions:[`swift`],load(){return w(()=>import(`./swift-DKB6_1j6.js`).then(e=>O(e.swift)),[])}}),E.of({name:`sTeX`,load(){return w(()=>import(`./stex-DNzd62Q_.js`).then(e=>O(e.stex)),[])}}),E.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return w(()=>import(`./stex-DNzd62Q_.js`).then(e=>O(e.stex)),[])}}),E.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return w(()=>import(`./verilog-CjI9Y6RI.js`).then(e=>O(e.verilog)),[])}}),E.of({name:`Tcl`,extensions:[`tcl`],load(){return w(()=>import(`./tcl-BGfruO1u.js`).then(e=>O(e.tcl)),[])}}),E.of({name:`Textile`,extensions:[`textile`],load(){return w(()=>import(`./textile-C4jVoHG1.js`).then(e=>O(e.textile)),[])}}),E.of({name:`TiddlyWiki`,load(){return w(()=>import(`./tiddlywiki-VlUiK86J.js`).then(e=>O(e.tiddlyWiki)),[])}}),E.of({name:`Tiki wiki`,load(){return w(()=>import(`./tiki-AK6FwT8q.js`).then(e=>O(e.tiki)),[])}}),E.of({name:`TOML`,extensions:[`toml`],load(){return w(()=>import(`./toml-BPTmHmyx.js`).then(e=>O(e.toml)),[])}}),E.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return w(()=>import(`./troff-C2dAgh7P.js`).then(e=>O(e.troff)),[])}}),E.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return w(()=>import(`./ttcn-PPSTk1ow.js`).then(e=>O(e.ttcn)),[])}}),E.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return w(()=>import(`./ttcn-cfg-2b4Gb5sE.js`).then(e=>O(e.ttcnCfg)),[])}}),E.of({name:`Turtle`,extensions:[`ttl`],load(){return w(()=>import(`./turtle-Cx3rYX2g.js`).then(e=>O(e.turtle)),[])}}),E.of({name:`Web IDL`,extensions:[`webidl`],load(){return w(()=>import(`./webidl-D5jiJvOU.js`).then(e=>O(e.webIDL)),[])}}),E.of({name:`VB.NET`,extensions:[`vb`],load(){return w(()=>import(`./vb-BthdM_4N.js`).then(e=>O(e.vb)),[])}}),E.of({name:`VBScript`,extensions:[`vbs`],load(){return w(()=>import(`./vbscript-D9f6rSsU.js`).then(e=>O(e.vbScript)),[])}}),E.of({name:`Velocity`,extensions:[`vtl`],load(){return w(()=>import(`./velocity-CqftRsjg.js`).then(e=>O(e.velocity)),[])}}),E.of({name:`Verilog`,extensions:[`v`],load(){return w(()=>import(`./verilog-CjI9Y6RI.js`).then(e=>O(e.verilog)),[])}}),E.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return w(()=>import(`./vhdl-kS471soi.js`).then(e=>O(e.vhdl)),[])}}),E.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return w(()=>import(`./xquery-BKJx4mf9.js`).then(e=>O(e.xQuery)),[])}}),E.of({name:`Yacas`,extensions:[`ys`],load(){return w(()=>import(`./yacas-CXXgtw0p.js`).then(e=>O(e.yacas)),[])}}),E.of({name:`Z80`,extensions:[`z80`],load(){return w(()=>import(`./z80-Co3PbHdE.js`).then(e=>O(e.z80)),[])}}),E.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return w(()=>import(`./mscgen-qgSLujhx.js`).then(e=>O(e.mscgen)),[])}}),E.of({name:`Xù`,extensions:[`xu`],load(){return w(()=>import(`./mscgen-qgSLujhx.js`).then(e=>O(e.xu)),[])}}),E.of({name:`MsGenny`,extensions:[`msgenny`],load(){return w(()=>import(`./mscgen-qgSLujhx.js`).then(e=>O(e.msgenny)),[])}}),E.of({name:`Vue`,extensions:[`vue`],load(){return w(()=>import(`./dist-DlzjGKj2.js`).then(e=>e.vue()),__vite__mapDeps([28,1,2,8,5,7,4]))}}),E.of({name:`Angular Template`,load(){return w(()=>import(`./dist-Cv-Fe2Re.js`).then(e=>e.angular()),__vite__mapDeps([29,1,2,8,5,7,4]))}})],Xi=`#e5c07b`,Zi=`#e06c75`,Qi=`#56b6c2`,$i=`#ffffff`,ea=`#abb2bf`,ta=`#7d8799`,na=`#61afef`,ra=`#98c379`,ia=`#d19a66`,aa=`#c678dd`,oa=`#21252b`,sa=`#2c313a`,ca=`#282c34`,la=`#353a42`,ua=`#3E4451`,da=`#528bff`,fa=xe.theme({"&":{color:ea,backgroundColor:ca},".cm-content":{caretColor:da},".cm-cursor, .cm-dropCursor":{borderLeftColor:da},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ua},".cm-panels":{backgroundColor:oa,color:ea},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:`#72a1ff59`,outline:`1px solid #457dff`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#6199ff2f`},".cm-activeLine":{backgroundColor:`#6699ff0b`},".cm-selectionMatch":{backgroundColor:`#aafe661a`},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bad0f847`},".cm-gutters":{backgroundColor:ca,color:ta,border:`none`},".cm-activeLineGutter":{backgroundColor:sa},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:la},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:la,borderBottomColor:la},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:sa,color:ea}}},{dark:!0}),pa=ct.define([{tag:T.keyword,color:aa},{tag:[T.name,T.deleted,T.character,T.propertyName,T.macroName],color:Zi},{tag:[T.function(T.variableName),T.labelName],color:na},{tag:[T.color,T.constant(T.name),T.standard(T.name)],color:ia},{tag:[T.definition(T.name),T.separator],color:ea},{tag:[T.typeName,T.className,T.number,T.changed,T.annotation,T.modifier,T.self,T.namespace],color:Xi},{tag:[T.operator,T.operatorKeyword,T.url,T.escape,T.regexp,T.link,T.special(T.string)],color:Qi},{tag:[T.meta,T.comment],color:ta},{tag:T.strong,fontWeight:`bold`},{tag:T.emphasis,fontStyle:`italic`},{tag:T.strikethrough,textDecoration:`line-through`},{tag:T.link,color:ta,textDecoration:`underline`},{tag:T.heading,fontWeight:`bold`,color:Zi},{tag:[T.atom,T.bool,T.special(T.variableName)],color:ia},{tag:[T.processingInstruction,T.string,T.inserted],color:ra},{tag:T.invalid,color:$i}]),ma=[fa,ce(pa)],ha=function(e){return e.docTypeError=`docTypeError`,e.contextNotFound=`contextNotFound`,e.timerNotFound=`timerNotFound`,e.ctxCallOutOfScope=`ctxCallOutOfScope`,e.createNodeInParserFail=`createNodeInParserFail`,e.stackOverFlow=`stackOverFlow`,e.parserMatchError=`parserMatchError`,e.serializerMatchError=`serializerMatchError`,e.getAtomFromSchemaFail=`getAtomFromSchemaFail`,e.expectDomTypeError=`expectDomTypeError`,e.callCommandBeforeEditorView=`callCommandBeforeEditorView`,e.missingRootElement=`missingRootElement`,e.missingNodeInSchema=`missingNodeInSchema`,e.missingMarkInSchema=`missingMarkInSchema`,e.ctxNotBind=`ctxNotBind`,e.missingYjsDoc=`missingYjsDoc`,e.aiProviderError=`aiProviderError`,e.aiBuildContextError=`aiBuildContextError`,e}({}),ga=class extends Error{constructor(e,t,n){super(t,n),this.name=`MilkdownError`,this.code=e,n?.cause!==void 0&&(this.cause=n.cause)}},_a=(e,t)=>typeof t==`function`?`[Function]`:t,va=e=>JSON.stringify(e,_a);function ya(e){return new ga(ha.docTypeError,`Doc type error, unsupported type: ${va(e)}`)}function ba(e){return new ga(ha.contextNotFound,`Context "${e}" not found, do you forget to inject it?`)}function xa(e){return new ga(ha.timerNotFound,`Timer "${e}" not found, do you forget to record it?`)}function Sa(){return new ga(ha.ctxCallOutOfScope,`Should not call a context out of the plugin.`)}function Ca(e,t,n){let r=`Cannot create node for ${`name`in e?e.name:e}`,i=e=>{if(e==null)return`null`;if(Array.isArray(e))return`[${e.map(i).join(`, `)}]`;if(typeof e==`object`)return`toJSON`in e&&typeof e.toJSON==`function`?JSON.stringify(e.toJSON()):`spec`in e?JSON.stringify(e.spec):JSON.stringify(e);if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return JSON.stringify(e);if(typeof e==`function`)return`[Function: ${e.name||`anonymous`}]`;try{return String(e)}catch{return`[Unserializable]`}},a=[[`[Description]`,r],[`[Attributes]`,t],[`[Content]`,(n??[]).map(e=>e?typeof e==`object`&&`type`in e?`${e}`:i(e):`null`)]].reduce((e,[t,n])=>{let r=`${t}: ${i(n)}.`;return e.concat(r)},[]);return new ga(ha.createNodeInParserFail,a.join(`
3
3
  `))}function wa(){return new ga(ha.stackOverFlow,`Stack over flow, cannot pop on an empty stack.`)}function Ta(e){return new ga(ha.parserMatchError,`Cannot match target parser for node: ${va(e)}.`)}function Ea(e){return new ga(ha.serializerMatchError,`Cannot match target serializer for node: ${va(e)}.`)}function Da(e,t){return new ga(ha.getAtomFromSchemaFail,`Cannot get ${e}: ${t} from schema.`)}function Oa(e){return new ga(ha.expectDomTypeError,`Expect to be a dom, but get: ${va(e)}.`)}function ka(){return new ga(ha.callCommandBeforeEditorView,`You're trying to call a command before editor view initialized, make sure to get commandManager from ctx after editor view has been initialized`)}function Aa(e){return new ga(ha.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${e}" in schema.`)}function ja(e){return new ga(ha.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${e}" in schema.`)}function Ma(e){try{return va(e)}catch{return`[Unserializable]`}}function Na(e){let t=e instanceof Error?e.message:Ma(e);return new ga(ha.aiProviderError,`AI provider error: ${t}`,{cause:e})}function Pa(e){let t=e instanceof Error?e.message:Ma(e);return new ga(ha.aiBuildContextError,`AI buildContext failed: ${t}`,{cause:e})}var Fa=class{constructor(){this.sliceMap=new Map,this.get=e=>{let t=typeof e==`string`?[...this.sliceMap.values()].find(t=>t.type.name===e):this.sliceMap.get(e.id);if(!t)throw ba(typeof e==`string`?e:e.name);return t},this.remove=e=>{let t=typeof e==`string`?[...this.sliceMap.values()].find(t=>t.type.name===e):this.sliceMap.get(e.id);t&&this.sliceMap.delete(t.type.id)},this.has=e=>typeof e==`string`?[...this.sliceMap.values()].some(t=>t.type.name===e):this.sliceMap.has(e.id)}},Ia=class{#e;#t;#n;constructor(e,t,n){this.#e=[],this.#n=()=>{this.#e.forEach(e=>e(this.#t))},this.set=e=>{this.#t=e,this.#n()},this.get=()=>this.#t,this.update=e=>{this.#t=e(this.#t),this.#n()},this.type=n,this.#t=t,e.set(n.id,this)}on(e){return this.#e.push(e),()=>{this.#e=this.#e.filter(t=>t!==e)}}once(e){let t=this.on(n=>{e(n),t()});return t}off(e){this.#e=this.#e.filter(t=>t!==e)}offAll(){this.#e=[]}},La=class{constructor(e,t){this.id=Symbol(`Context-${t}`),this.name=t,this._defaultValue=e,this._typeInfo=()=>{throw Sa()}}create(e,t=this._defaultValue){return new Ia(e,t,this)}},Ra=(e,t)=>new La(e,t),za=class{#e;#t;#n;#r;#i;#a;#o;constructor(e,t,n){this.#r=new Set,this.#i=new Set,this.#a=new Map,this.#o=new Map,this.read=()=>({metadata:this.#e,injectedSlices:[...this.#r].map(e=>({name:typeof e==`string`?e:e.name,value:this.#s(e)})),consumedSlices:[...this.#i].map(e=>({name:typeof e==`string`?e:e.name,value:this.#s(e)})),recordedTimers:[...this.#a].map(([e,{duration:t}])=>({name:e.name,duration:t,status:this.#c(e)})),waitTimers:[...this.#o].map(([e,{duration:t}])=>({name:e.name,duration:t,status:this.#c(e)}))}),this.onRecord=e=>{this.#a.set(e,{start:Date.now(),duration:0})},this.onClear=e=>{this.#a.delete(e)},this.onDone=e=>{let t=this.#a.get(e);t&&(t.duration=Date.now()-t.start)},this.onWait=(e,t)=>{let n=Date.now();t.finally(()=>{this.#o.set(e,{duration:Date.now()-n})}).catch(console.error)},this.onInject=e=>{this.#r.add(e)},this.onRemove=e=>{this.#r.delete(e)},this.onUse=e=>{this.#i.add(e)},this.#s=e=>this.#t.get(e).get(),this.#c=e=>this.#n.get(e).status,this.#t=e,this.#n=t,this.#e=n}#s;#c},Ba=class e{#e;#t;#n;#r;constructor(t,n,r){this.produce=t=>t&&Object.keys(t).length?new e(this.#e,this.#t,{...t}):this,this.inject=(e,t)=>{let n=e.create(this.#e.sliceMap);return t!=null&&n.set(t),this.#r?.onInject(e),this},this.remove=e=>(this.#e.remove(e),this.#r?.onRemove(e),this),this.record=e=>(e.create(this.#t.store),this.#r?.onRecord(e),this),this.clearTimer=e=>(this.#t.remove(e),this.#r?.onClear(e),this),this.isInjected=e=>this.#e.has(e),this.isRecorded=e=>this.#t.has(e),this.use=e=>(this.#r?.onUse(e),this.#e.get(e)),this.get=e=>this.use(e).get(),this.set=(e,t)=>this.use(e).set(t),this.update=(e,t)=>this.use(e).update(t),this.timer=e=>this.#t.get(e),this.done=e=>{this.timer(e).done(),this.#r?.onDone(e)},this.wait=e=>{let t=this.timer(e).start();return this.#r?.onWait(e,t),t},this.waitTimers=async e=>{await Promise.all(this.get(e).map(e=>this.wait(e)))},this.#e=t,this.#t=n,this.#n=r,r&&(this.#r=new za(t,n,r))}get meta(){return this.#n}get inspector(){return this.#r}},Va=class{constructor(){this.store=new Map,this.get=e=>{let t=this.store.get(e.id);if(!t)throw xa(e.name);return t},this.remove=e=>{this.store.delete(e.id)},this.has=e=>this.store.has(e.id)}},Ha=class{#e;#t;#n;#r;#i;constructor(e,t){this.#e=null,this.#t=null,this.#r=`pending`,this.#i=null,this.start=()=>(this.#e??=new Promise((e,t)=>{this.#t=t=>{t instanceof CustomEvent&&t.detail.id===this.#n&&(this.#r=`resolved`,this.#a(),t.stopImmediatePropagation(),e())},this.#o(()=>{this.#r===`pending`&&(this.#r=`rejected`),this.#a(),t(Error(`Timing ${this.type.name} timeout.`))}),this.#r=`pending`,addEventListener(this.type.name,this.#t)}),this.#e),this.done=()=>{let e=new CustomEvent(this.type.name,{detail:{id:this.#n}});dispatchEvent(e)},this.#a=()=>{this.#i!==null&&(clearTimeout(this.#i),this.#i=null),this.#t&&removeEventListener(this.type.name,this.#t)},this.#o=e=>{this.#i=setTimeout(()=>{this.#i=null,e()},this.type.timeout)},this.#n=Symbol(t.name),this.type=t,e.set(t.id,this)}get status(){return this.#r}#a;#o},Ua=class{constructor(e,t=3e3){this.create=e=>new Ha(e,this),this.id=Symbol(`Timer-${e}`),this.name=e,this.timeout=t}},Wa=(e,t=3e3)=>new Ua(e,t);function Ga(e){let t=this;t.parser=n;function n(n){return Nn(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}var Ka=(function(e){if(e==null)return Za;if(typeof e==`function`)return Xa(e);if(typeof e==`object`)return Array.isArray(e)?qa(e):Ja(e);if(typeof e==`string`)return Ya(e);throw Error(`Expected function, string, or object as test`)});function qa(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Ka(e[n]);return Xa(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Ja(e){let t=e;return Xa(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Ya(e){return Xa(t);function t(t){return t&&t.type===e}}function Xa(e){return t;function t(t,n,r){return!!(Qa(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Za(){return!0}function Qa(e){return typeof e==`object`&&!!e&&`type`in e}var $a=Ka([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]),eo={}.hasOwnProperty;function to(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)to(e,t.extensions[n]);for(r in t)if(eo.call(t,r))switch(r){case`extensions`:break;case`unsafe`:no(e[r],t[r]);break;case`join`:no(e[r],t[r]);break;case`handlers`:ro(e[r],t[r]);break;default:e.options[r]=t[r]}return e}function no(e,t){t&&e.push(...t)}function ro(e,t){t&&Object.assign(e,t)}function io(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),ao);return i(),o}function ao(e,t,n){return`>`+(n?``:` `)+e}function oo(e,t){return so(e,t.inConstruct,!0)&&!so(e,t.notInConstruct,!1)}function so(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function co(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
4
4
  `&&!e.before&&!e.after&&oo(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
5
5
  `}function lo(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function uo(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function fo(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function po(e,t,n,r){let i=fo(n),a=e.value||``;if(uo(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,mo);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(lo(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`