@inkeep/open-knowledge 0.46.0-beta.18 → 0.46.0-beta.19

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 (320) hide show
  1. package/dist/{acp-harness-probe-DHPdyN_q.mjs → acp-harness-probe-Citbab-5.mjs} +2 -2
  2. package/dist/assets/skills/write-skill/SKILL.md +5 -2
  3. package/dist/cli.mjs +7 -7
  4. package/dist/config-schema.json +20 -0
  5. package/dist/config.project.schema.json +3 -0
  6. package/dist/config.user.schema.json +47 -0
  7. package/dist/constants-Bs8Sdcru.mjs +2 -0
  8. package/dist/{fs-traced-wfI5VoOz.mjs → fs-traced-BxDcwVzG.mjs} +2 -2
  9. package/dist/fs-traced-C4vgso5m.mjs +1 -0
  10. package/dist/{git-handle-TtCDd9Le.mjs → git-handle-C-4njDy4.mjs} +2 -2
  11. package/dist/git-handle-DBNV29KD.mjs +1 -0
  12. package/dist/index.d.mts +3 -0
  13. package/dist/index.mjs +1 -1
  14. package/dist/{init-CDz6yU29.mjs → init-DEMEBRkr.mjs} +36 -36
  15. package/dist/init-DsvGKuD0.mjs +1 -0
  16. package/dist/{launch-json-removal-BU0Zoece.mjs → launch-json-removal-DfjmJ4T1.mjs} +2 -2
  17. package/dist/loader-CI_L6sck.mjs +1 -0
  18. package/dist/{loader-Doi6q_yH.mjs → loader-YVgaNCUP.mjs} +2 -2
  19. package/dist/md-manager-BfHofc4f.mjs +2 -0
  20. package/dist/{open-browser-BiK9JzSf.mjs → open-browser-ht7iEqMu.mjs} +2 -2
  21. package/dist/parse-worker.mjs +1 -1
  22. package/dist/{preview-B6U-Jeig.mjs → preview-Bqtgs1Zn.mjs} +2 -2
  23. package/dist/preview-DBlmue3X.mjs +1 -0
  24. package/dist/public/assets/{ActivityModeContent-kan_mI6D.js → ActivityModeContent-DuPmJelx.js} +1 -1
  25. package/dist/public/assets/{AgentDiffPane-CRpzhMdM.js → AgentDiffPane-Ca6Ds4IN.js} +2 -2
  26. package/dist/public/assets/{AgentThreadClientBinder-P7Do65Nb.js → AgentThreadClientBinder-CxZSN0mY.js} +1 -1
  27. package/dist/public/assets/{ChangedOutsideBadge-Ci6_waGe.js → ChangedOutsideBadge-CBtNiBYy.js} +1 -1
  28. package/dist/public/assets/{CodeMirrorPropInput-BTL0CFwi.js → CodeMirrorPropInput-BjY_uqg0.js} +3 -3
  29. package/dist/public/assets/{DocumentContext-CCdyI4z5.js → DocumentContext-BdXBfUst.js} +2 -2
  30. package/dist/public/assets/{EditorModeToggle-gHNi18XV.js → EditorModeToggle-EtEqcZm6.js} +1 -1
  31. package/dist/public/assets/{EnableSyncConfirmDialog-0H9Ea_Ru.js → EnableSyncConfirmDialog-CqlZIrfh.js} +1 -1
  32. package/dist/public/assets/FeedbackForm-BVthm5nK.js +1 -0
  33. package/dist/public/assets/{GraphPanel-CFCC83CO.js → GraphPanel-CDIzPzWR.js} +1 -1
  34. package/dist/public/assets/{ImportSkillDialog-TBOxO6iW.js → ImportSkillDialog-BBhvhWY2.js} +1 -1
  35. package/dist/public/assets/{LintConfigEditor-GFclPUJL.js → LintConfigEditor-BBNyuz2O.js} +1 -1
  36. package/dist/public/assets/{ManagedArtifactProperties-DCjdPs0n.js → ManagedArtifactProperties-B5DslPxD.js} +2 -2
  37. package/dist/public/assets/ManagedArtifactProperties-hpx8i1kW.js +1 -0
  38. package/dist/public/assets/{McpConsentDialogBody-DA99wtGp.js → McpConsentDialogBody-Bzy77Gzw.js} +1 -1
  39. package/dist/public/assets/{Mermaid-BQAWkx48.js → Mermaid-Ba_Bj7D1.js} +2 -2
  40. package/dist/public/assets/{MermaidDocEditor-Dp_Qn1m6.js → MermaidDocEditor-BV3EpcCc.js} +1 -1
  41. package/dist/public/assets/{ReportBugDialogBody-Bki9osi5.js → ReportBugDialogBody-CoM6D3VY.js} +1 -1
  42. package/dist/public/assets/{SchemaConfigEditor-CChi4xg-.js → SchemaConfigEditor-DvpY4XyG.js} +1 -1
  43. package/dist/public/assets/{SessionsHost-BYagBT85.js → SessionsHost-BjyGEs-m.js} +2 -2
  44. package/dist/public/assets/{SettingsDialogBody-BSVbksKQ.js → SettingsDialogBody-ClkzqCWV.js} +1 -1
  45. package/dist/public/assets/{ShareBranchSwitchDialog-ivZ2cgRA.js → ShareBranchSwitchDialog-M8nEIk2w.js} +1 -1
  46. package/dist/public/assets/{ShareReceiveDialog-DkBZW0qn.js → ShareReceiveDialog-BJ8uKULf.js} +1 -1
  47. package/dist/public/assets/{ShareReceiveMissDialog-B940MiRk.js → ShareReceiveMissDialog-Ch00HDAB.js} +1 -1
  48. package/dist/public/assets/{SkillEditBanner-rJ0nZb-T.js → SkillEditBanner-cQP3OGlb.js} +1 -1
  49. package/dist/public/assets/SkillOriginInline-DVRZGBc9.js +1 -0
  50. package/dist/public/assets/{SkillToolbarControls-CRB8aXBZ.js → SkillToolbarControls-BW5izjWm.js} +1 -1
  51. package/dist/public/assets/{SourceEditor-Cj7gcj84.js → SourceEditor-CdEukFaO.js} +1 -1
  52. package/dist/public/assets/{TerminalPanel-DmFqsT0t.js → TerminalPanel-DYpr3gZa.js} +1 -1
  53. package/dist/public/assets/{TerminalWindowApp-GrkDxDRa.js → TerminalWindowApp-CLPcrjfp.js} +1 -1
  54. package/dist/public/assets/{TextDocEditor-4-R2R7Kv.js → TextDocEditor-CZc0ittq.js} +1 -1
  55. package/dist/public/assets/{ThreadView-CO6b-1Gb.js → ThreadView-BHGSStQm.js} +1 -1
  56. package/dist/public/assets/{TimelineDiffPane-C-1Ait-P.js → TimelineDiffPane-DrjrNbpa.js} +2 -2
  57. package/dist/public/assets/{abnfDiagram-VRR7QNED-DHJtI87X.js → abnfDiagram-VRR7QNED-BR4MFhNI.js} +1 -1
  58. package/dist/public/assets/{agent-diff-store-B5wc07Cu.js → agent-diff-store-BndzgDhQ.js} +1 -1
  59. package/dist/public/assets/{agent-visibility-BLXHhBH0.js → agent-visibility-CTpE4Fld.js} +1 -1
  60. package/dist/public/assets/{arc-CcVRsw3e.js → arc-BLA1oiJE.js} +1 -1
  61. package/dist/public/assets/architecture-TIHT7OUA-4xbw6BHT.js +1 -0
  62. package/dist/public/assets/{architectureDiagram-ZJ3FMSHR-CiwaxO5n.js → architectureDiagram-ZJ3FMSHR-BrnPZKqe.js} +1 -1
  63. package/dist/public/assets/{auth-state-cache-cqskisrf.js → auth-state-cache-BuUCXNdR.js} +2 -2
  64. package/dist/public/assets/{blockDiagram-677ZJIJ3-0zO7n7Sf.js → blockDiagram-677ZJIJ3-CQbm0LEu.js} +1 -1
  65. package/dist/public/assets/{c4Diagram-LMCZKHZV-C662qesx.js → c4Diagram-LMCZKHZV-D4Y9FZQ4.js} +1 -1
  66. package/dist/public/assets/channel-CEdybrh9.js +1 -0
  67. package/dist/public/assets/chunk-2Q5K7J3B-CTVQtWlX.js +1 -0
  68. package/dist/public/assets/{chunk-32BRIVSS-CydyM0Ml.js → chunk-32BRIVSS-Nd1XGYMr.js} +1 -1
  69. package/dist/public/assets/{chunk-52WLFC77-cG-DvO_j.js → chunk-52WLFC77-DngEZdpt.js} +1 -1
  70. package/dist/public/assets/{chunk-5FCAYU7R-Bxw_oikr.js → chunk-5FCAYU7R-CVOgng3o.js} +1 -1
  71. package/dist/public/assets/{chunk-5HE753X5-DKXmxfLW.js → chunk-5HE753X5-CD6gRM54.js} +1 -1
  72. package/dist/public/assets/{chunk-5JV3BV7I-DvmJcvTR.js → chunk-5JV3BV7I-C7ouju6I.js} +1 -1
  73. package/dist/public/assets/{chunk-5TONJI2A-DzotvxWN.js → chunk-5TONJI2A-BKisaZuR.js} +1 -1
  74. package/dist/public/assets/{chunk-5VM5RSS4-BhXaeUUw.js → chunk-5VM5RSS4-DldpLG4q.js} +1 -1
  75. package/dist/public/assets/{chunk-7BUUIJ7U-nkQ2KUUq.js → chunk-7BUUIJ7U-B8p2bGIc.js} +1 -1
  76. package/dist/public/assets/{chunk-BIQX33UG-dgZifYB8.js → chunk-BIQX33UG-B-IlaACl.js} +1 -1
  77. package/dist/public/assets/{chunk-BO2N2NFS-BgpjQQXT.js → chunk-BO2N2NFS-BmPFIuzT.js} +3 -3
  78. package/dist/public/assets/{chunk-C7G6YPKG-DeJ7KSfD.js → chunk-C7G6YPKG-CTPk4N9r.js} +1 -1
  79. package/dist/public/assets/{chunk-CQNSW5MT-WJU8lHxD.js → chunk-CQNSW5MT-BoHYZDmN.js} +1 -1
  80. package/dist/public/assets/{chunk-CYSBUYHQ-5BxfdOgL.js → chunk-CYSBUYHQ-BtnyZlJv.js} +1 -1
  81. package/dist/public/assets/{chunk-EMLP6XTP-mSjYkSCS.js → chunk-EMLP6XTP-D_CFM3mi.js} +1 -1
  82. package/dist/public/assets/{chunk-EX3LRPZG-BNd6Cxwo.js → chunk-EX3LRPZG-9kHpIDAY.js} +1 -1
  83. package/dist/public/assets/{chunk-FWX5IMBZ-CXQqiinv.js → chunk-FWX5IMBZ-A1C9veGN.js} +2 -2
  84. package/dist/public/assets/{chunk-HOUHSVGY-FQeseOdw.js → chunk-HOUHSVGY-D2OO7RX0.js} +1 -1
  85. package/dist/public/assets/{chunk-ICXQ74PX-QBz75RJe.js → chunk-ICXQ74PX-CINPzArE.js} +1 -1
  86. package/dist/public/assets/{chunk-JG7HCLWE-ClAPLVoN.js → chunk-JG7HCLWE-jpq6rFyK.js} +1 -1
  87. package/dist/public/assets/{chunk-JWPE2WC7-D00QuO4l.js → chunk-JWPE2WC7-BUo8MoXj.js} +1 -1
  88. package/dist/public/assets/{chunk-MOJQB5TN-BHolK4Fc.js → chunk-MOJQB5TN-INvVDa7M.js} +1 -1
  89. package/dist/public/assets/{chunk-MOZMSUNE-B2zrwpvW.js → chunk-MOZMSUNE-bwYn0Kww.js} +1 -1
  90. package/dist/public/assets/{chunk-OGEWGWER-D9rNoxcC.js → chunk-OGEWGWER-Di8f25Zt.js} +1 -1
  91. package/dist/public/assets/{chunk-OSBZ3O6U-pMDQqwwa.js → chunk-OSBZ3O6U-CUc7n3PO.js} +1 -1
  92. package/dist/public/assets/{chunk-PUDLZKDR-zvmgn7x_.js → chunk-PUDLZKDR-C9YcryH0.js} +1 -1
  93. package/dist/public/assets/{chunk-Q4XR5HBZ-FwXZQ9hY.js → chunk-Q4XR5HBZ-DuA-1W6g.js} +1 -1
  94. package/dist/public/assets/{chunk-QBLGF6JB-gQMNwA9k.js → chunk-QBLGF6JB-DOtavLb0.js} +1 -1
  95. package/dist/public/assets/{chunk-R7FJI6CG-4qEQ9dBZ.js → chunk-R7FJI6CG-CWhtEDe1.js} +1 -1
  96. package/dist/public/assets/{chunk-RYQCIY6F-BV0ikdQB.js → chunk-RYQCIY6F-D8KQw2wV.js} +1 -1
  97. package/dist/public/assets/{chunk-U6XO7XAA-CaNmcaAV.js → chunk-U6XO7XAA-CMfN73K7.js} +1 -1
  98. package/dist/public/assets/{chunk-V7JOEXUC-CsJjje8x.js → chunk-V7JOEXUC-868ygkS5.js} +1 -1
  99. package/dist/public/assets/chunk-VAUOI2AC-BPnCZl88.js +1 -0
  100. package/dist/public/assets/{chunk-VR4S4FIN-bcHVGPIL.js → chunk-VR4S4FIN-BZrd9pWi.js} +1 -1
  101. package/dist/public/assets/{chunk-WYO6CB5R-BMZjhy31.js → chunk-WYO6CB5R-T4JOF4Cu.js} +1 -1
  102. package/dist/public/assets/chunk-XXDRQBXY-AFNsmOQr.js +1 -0
  103. package/dist/public/assets/{chunk-YOTPTUD7-NNZ-Yv3s.js → chunk-YOTPTUD7-DzE2J0ru.js} +1 -1
  104. package/dist/public/assets/{chunk-ZGVPDNZ5-DN7h9evR.js → chunk-ZGVPDNZ5-BtaLh1Pm.js} +1 -1
  105. package/dist/public/assets/{chunk-ZIRB5QZD-BUzL4gtl.js → chunk-ZIRB5QZD-DTzEX6O5.js} +1 -1
  106. package/dist/public/assets/classDiagram-OUVF2IWQ-DJJ_lD6S.js +1 -0
  107. package/dist/public/assets/classDiagram-v2-EOCWNBFH-DU_c9B2S.js +1 -0
  108. package/dist/public/assets/{client-version-DldsUr3b.js → client-version-_i4MI4fL.js} +1 -1
  109. package/dist/public/assets/{comment-chips-CmMeJM1H.js → comment-chips-BFJ87jiN.js} +1 -1
  110. package/dist/public/assets/{config-provider-CX41G-W_.js → config-provider-BwmrVQtw.js} +1 -1
  111. package/dist/public/assets/{cose-bilkent-JH36ORCC-C3tuxXMJ.js → cose-bilkent-JH36ORCC-Dfdgm0c_.js} +1 -1
  112. package/dist/public/assets/cynefin-VYW2F7L2-PIqjqGI8.js +1 -0
  113. package/dist/public/assets/{cynefinDiagram-TSTJHNR4-gF8dJ8RL.js → cynefinDiagram-TSTJHNR4-DRyLma_-.js} +1 -1
  114. package/dist/public/assets/{dagre-DqpVUR-3.js → dagre-Bx2kZZfx.js} +1 -1
  115. package/dist/public/assets/{dagre-VKFMJZFB-Bdh7Hq5O.js → dagre-VKFMJZFB-CWRpaHfL.js} +1 -1
  116. package/dist/public/assets/{diagram-FQU43EPY-BZ8uLueR.js → diagram-FQU43EPY-BWhEolBl.js} +1 -1
  117. package/dist/public/assets/{diagram-G47NLZAW-QyYub_Y-.js → diagram-G47NLZAW-CtrwOhAm.js} +1 -1
  118. package/dist/public/assets/{diagram-NH7WQ7WH-BZmKErWp.js → diagram-NH7WQ7WH-Bwg0orbY.js} +1 -1
  119. package/dist/public/assets/{diagram-OA4YK3LP-X4I0Ny_1.js → diagram-OA4YK3LP-sK_x_R3w.js} +1 -1
  120. package/dist/public/assets/{diagram-WEI45ONY-Dvn-EcwS.js → diagram-WEI45ONY-BGLea-AN.js} +1 -1
  121. package/dist/public/assets/{dist-DmGGmoBk.js → dist-2Zg1mqwY.js} +1 -1
  122. package/dist/public/assets/{dist-F3zr7p-B2.js → dist-DZN2z2Ue2.js} +3 -3
  123. package/dist/public/assets/{doc-paths-Du7H1Qdp.js → doc-paths-CR2slzEF.js} +1 -1
  124. package/dist/public/assets/{documents-events-xt1DYT7P.js → documents-events-BhxlQGXQ.js} +1 -1
  125. package/dist/public/assets/{ebnfDiagram-CCIWWBDH-Bee-0Vsa.js → ebnfDiagram-CCIWWBDH-LwDvRqCc.js} +1 -1
  126. package/dist/public/assets/{erDiagram-Q63AITRT-DxkcAaEh.js → erDiagram-Q63AITRT-ZtP-do8Y.js} +1 -1
  127. package/dist/public/assets/eventmodeling-45OFAUF4-BXfoXwmF.js +1 -0
  128. package/dist/public/assets/{file-tree-adapter-yXcdd-um.js → file-tree-adapter-DLG2-zm9.js} +1 -1
  129. package/dist/public/assets/{file-tree-utils-DXLIH0T7.js → file-tree-utils-BWXvrWAR.js} +1 -1
  130. package/dist/public/assets/flowDiagram-23GEKE2U-FFa51yc6.js +1 -0
  131. package/dist/public/assets/{folder-config-api-CLSLIZAq.js → folder-config-api-CZeUrq2G.js} +1 -1
  132. package/dist/public/assets/{ganttDiagram-NO4QXBWP-CfKrR8t0.js → ganttDiagram-NO4QXBWP-toql98c1.js} +1 -1
  133. package/dist/public/assets/gitGraph-TEB2WS4Q-CO_Nyook.js +1 -0
  134. package/dist/public/assets/{gitGraphDiagram-IHSO6WYX-l_eG9uKD.js → gitGraphDiagram-IHSO6WYX-D7D6x-Xl.js} +1 -1
  135. package/dist/public/assets/{globals-0NgAOIr4.js → globals-LiBs9D18.js} +1 -1
  136. package/dist/public/assets/{graphlib-2mbBufU8.js → graphlib-BIjbwrWA.js} +1 -1
  137. package/dist/public/assets/{highlighted-body-OFNGDK62-BIipOt-U.js → highlighted-body-OFNGDK62-Ckmp4Uen.js} +1 -1
  138. package/dist/public/assets/index-DBNyG_Ke.js +2092 -0
  139. package/dist/public/assets/info-DKCQHKI2-Qu4WNhHa.js +1 -0
  140. package/dist/public/assets/{infoDiagram-FWYZ7A6U-DgvJ7Awn.js → infoDiagram-FWYZ7A6U-D-w6lLUB.js} +1 -1
  141. package/dist/public/assets/{ishikawaDiagram-FXEZZL3T-DQ4Gskk4.js → ishikawaDiagram-FXEZZL3T-DiMtCb6J.js} +1 -1
  142. package/dist/public/assets/{journeyDiagram-5HDEW3XC-DPs0RcwQ.js → journeyDiagram-5HDEW3XC-BBd5InQB.js} +1 -1
  143. package/dist/public/assets/{kanban-definition-HUTT4EX6-Ck2HSfan.js → kanban-definition-HUTT4EX6-CA41_RYU.js} +1 -1
  144. package/dist/public/assets/{line-DWKLErsv.js → line-DE139-H6.js} +1 -1
  145. package/dist/public/assets/{linear-dbIThZWJ.js → linear-HAqJanW2.js} +1 -1
  146. package/dist/public/assets/{lint-config-client-AdeE6KRn.js → lint-config-client-B-vQycwW.js} +1 -1
  147. package/dist/public/assets/{map-DCuMc749.js → map-CUyVBcsz.js} +1 -1
  148. package/dist/public/assets/{markdownlint-rule-browser-DAMi0Yt_.js → markdownlint-rule-browser-CfejazL_.js} +1 -1
  149. package/dist/public/assets/mermaid-GHXKKRXX-C0TBTYbW.js +1 -0
  150. package/dist/public/assets/{mermaid-parser.core-B2uYfibA.js → mermaid-parser.core-CAIoUhyF.js} +2 -2
  151. package/dist/public/assets/{mermaid.core-BUTR3k00.js → mermaid.core-B8bL0otS.js} +3 -3
  152. package/dist/public/assets/{mindmap-definition-LN4V7U3C-CjuwnrRK.js → mindmap-definition-LN4V7U3C-BG4thSqa.js} +1 -1
  153. package/dist/public/assets/{navigation-targets-CAJ5VD3i.js → navigation-targets-MirHYTh2.js} +1 -1
  154. package/dist/public/assets/{now-D9M3Ys6o.js → now-DrceMm81.js} +1 -1
  155. package/dist/public/assets/{open-managed-artifact-tab-4rzIRzh9.js → open-managed-artifact-tab-DfPczkie.js} +1 -1
  156. package/dist/public/assets/{ordinal-DdrNAXbu.js → ordinal-DOdOZcEj.js} +1 -1
  157. package/dist/public/assets/packet-7NZHBO7P-DYoxmend.js +1 -0
  158. package/dist/public/assets/{pegDiagram-2B236MQR-BbkSvB2I.js → pegDiagram-2B236MQR-LXeKNT9p.js} +1 -1
  159. package/dist/public/assets/{pending-receive-nav-store-BpH6pl0A.js → pending-receive-nav-store-Bxm3O-w-.js} +1 -1
  160. package/dist/public/assets/pie-RZYD4A2V-C5oywqmk.js +1 -0
  161. package/dist/public/assets/{pieDiagram-ENE6RG2P-mC03ntFr.js → pieDiagram-ENE6RG2P-CP834p3L.js} +1 -1
  162. package/dist/public/assets/{prop-types-CEMlW6lS.js → prop-types-BWDJYVli.js} +1 -1
  163. package/dist/public/assets/{quadrantDiagram-ABIIQ3AL-C5Wf9EzX.js → quadrantDiagram-ABIIQ3AL-CRH-DZR6.js} +1 -1
  164. package/dist/public/assets/radar-I7S5WNFK-adGffv9k.js +1 -0
  165. package/dist/public/assets/railroad-3IZDKUUU-D4AY10Mc.js +1 -0
  166. package/dist/public/assets/railroad-abnf-AHOZXSZD-CSShZExy.js +1 -0
  167. package/dist/public/assets/railroad-ebnf-EBAXGLYW-Dl_rhwOm.js +1 -0
  168. package/dist/public/assets/railroad-peg-LSFZ7HO6-B2JvE7nW.js +1 -0
  169. package/dist/public/assets/{railroadDiagram-RFXS5EU6-D5k_b8X2.js → railroadDiagram-RFXS5EU6-B0y7CNEU.js} +1 -1
  170. package/dist/public/assets/{receive-store-Xy0fAFjI.js → receive-store-BISeFaHm.js} +1 -1
  171. package/dist/public/assets/{requirementDiagram-TGXJPOKE-sZXA_y1K.js → requirementDiagram-TGXJPOKE-CDOzFe2o.js} +1 -1
  172. package/dist/public/assets/{sankeyDiagram-HTMAVEWB-VaejSuXD.js → sankeyDiagram-HTMAVEWB-8LYEe9RT.js} +1 -1
  173. package/dist/public/assets/{selection-context-DcW41cyL.js → selection-context-SfeWnyax.js} +1 -1
  174. package/dist/public/assets/{sequenceDiagram-DBY2YBRQ-nCH-USjy.js → sequenceDiagram-DBY2YBRQ-DTI3lfyS.js} +1 -1
  175. package/dist/public/assets/{sizeCapture-X5ZJPWSS-CyNe-U3Z.js → sizeCapture-X5ZJPWSS-CdOK33Lp.js} +1 -1
  176. package/dist/public/assets/{skill-actions-CrY_sys-.js → skill-actions-DeToVw_b.js} +1 -1
  177. package/dist/public/assets/{skill-scope-juymWOGX.js → skill-scope-DHskNAp8.js} +1 -1
  178. package/dist/public/assets/{skills-api-C5-rQPxq.js → skills-api-DhbM0zp_.js} +1 -1
  179. package/dist/public/assets/{src-DFZupjZD.js → src-CprZUkQE.js} +1 -1
  180. package/dist/public/assets/{src-DbmaHp5n.js → src-D1fpFbQG.js} +1 -1
  181. package/dist/public/assets/{stateDiagram-2N3HPSRC-uY9Mif8t.js → stateDiagram-2N3HPSRC-Be5NtYCp.js} +1 -1
  182. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-B6a4uvcW.js +1 -0
  183. package/dist/public/assets/{swimlanes-5IMT3BWC-cGipHfZ5.js → swimlanes-5IMT3BWC-Cyw1mKbC.js} +2 -2
  184. package/dist/public/assets/swimlanesDiagram-G3AALYLV-D3egjuKf.js +8 -0
  185. package/dist/public/assets/{tag-pill-input-oczqVWOZ.js → tag-pill-input-Bz9pQv5K.js} +1 -1
  186. package/dist/public/assets/{target-navigation-intent-CMkQitMi.js → target-navigation-intent-DBjtrY9M.js} +1 -1
  187. package/dist/public/assets/{telemetry-impl-wWahzeD4.js → telemetry-impl-DWXkoD72.js} +2 -2
  188. package/dist/public/assets/{telemetry-startup-DqooJFoo.js → telemetry-startup-3Sng8oEw.js} +1 -1
  189. package/dist/public/assets/{terminal-launch-events-Bo5VXhHl.js → terminal-launch-events-U2hE6Ms1.js} +1 -1
  190. package/dist/public/assets/{terminal-telemetry-Bkt5Mcm1.js → terminal-telemetry-D-x2ahmt.js} +1 -1
  191. package/dist/public/assets/{text-viewer-languages-qm3MvP0J.js → text-viewer-languages-DFJQsbAG.js} +2 -2
  192. package/dist/public/assets/{timeline-definition-FHXFAJF6-BaWSHiEf.js → timeline-definition-FHXFAJF6-BlFXUexj.js} +1 -1
  193. package/dist/public/assets/treeView-QDETBFTQ-qMpkjbKi.js +1 -0
  194. package/dist/public/assets/treemap-6X3UGDF4-BW1Uc-Dj.js +1 -0
  195. package/dist/public/assets/{typing-burst-detector-CkgjtxUY.js → typing-burst-detector-BcckucCO.js} +1 -1
  196. package/dist/public/assets/{uninstall-aVjP-H8X.js → uninstall--VaT1wrx.js} +1 -1
  197. package/dist/public/assets/{use-activity-panel-DERulSoR.js → use-activity-panel-Boa2gsSF.js} +1 -1
  198. package/dist/public/assets/{use-apply-config-color-theme-wLo3FNBb.js → use-apply-config-color-theme-Cm_U612q.js} +1 -1
  199. package/dist/public/assets/{use-collab-url-DlXoMwAG.js → use-collab-url-26Kxxrga.js} +1 -1
  200. package/dist/public/assets/{use-live-xterm-theme-Bb1n3JUe.js → use-live-xterm-theme-PP95E3RH.js} +1 -1
  201. package/dist/public/assets/{use-open-skill-ByKgvyb3.js → use-open-skill-BQGld6Oo.js} +1 -1
  202. package/dist/public/assets/{use-settings-route-Vg54cEDB.js → use-settings-route-b9ICe6ju.js} +1 -1
  203. package/dist/public/assets/{use-skill-directory-D23xKHEd.js → use-skill-directory-BPA2CjtJ.js} +1 -1
  204. package/dist/public/assets/use-skill-origin-CYFatjkw.js +1 -0
  205. package/dist/public/assets/{use-skills-BQ2imgoS.js → use-skills-CQ22zxZh.js} +1 -1
  206. package/dist/public/assets/{use-terminal-enabled-BhS1a4V3.js → use-terminal-enabled-DD-6dEVX.js} +1 -1
  207. package/dist/public/assets/{use-timeline-entry-diff-Bzu540p0.js → use-timeline-entry-diff-B6q2MvpV.js} +1 -1
  208. package/dist/public/assets/{use-workspace-C9swsEoH.js → use-workspace-B7bQ2SZR.js} +1 -1
  209. package/dist/public/assets/{vennDiagram-L72KCM5P-boRPAxOy.js → vennDiagram-L72KCM5P-CbMxlzwT.js} +1 -1
  210. package/dist/public/assets/wardley-OPB4EBWU-BBZU6-hF.js +1 -0
  211. package/dist/public/assets/{wardleyDiagram-EHGQE667-vi90NC-5.js → wardleyDiagram-EHGQE667-CVZ_1-Ob.js} +1 -1
  212. package/dist/public/assets/{xychartDiagram-FW5EYKEG-Ckph0Tnv.js → xychartDiagram-FW5EYKEG-CiobWJYX.js} +1 -1
  213. package/dist/public/index.html +50 -49
  214. package/dist/public/uninstall.html +3 -3
  215. package/dist/{repair-launch-json-DwkgTeOV.mjs → repair-launch-json-qrFgG_0f.mjs} +2 -2
  216. package/dist/{repair-mcp-configs-BJ56Rxx0.mjs → repair-mcp-configs-BGEi4dY8.mjs} +2 -2
  217. package/dist/repair-skills-BKWnC8s9.mjs +1 -0
  218. package/dist/{repair-skills-B5s_18d0.mjs → repair-skills-Cp0zxj36.mjs} +2 -2
  219. package/dist/schemas/v0/config.project.schema.json +3 -0
  220. package/dist/schemas/v0/config.user.schema.json +47 -0
  221. package/dist/{server-lock-CCS3UzJQ.mjs → server-lock-CWyGkpt0.mjs} +2 -2
  222. package/dist/server-lock-Cd8tGKJ7.mjs +1 -0
  223. package/dist/{sleep-TXRFWg8x.mjs → sleep-CKdHmS4J.mjs} +2 -2
  224. package/dist/{src-C9yhZBbO.mjs → src-B9eLNT3o.mjs} +4 -4
  225. package/dist/src-CPkwD6c_.mjs +2030 -0
  226. package/dist/{src-DF3639Eg.mjs → src-CR3XTRFS.mjs} +2 -2
  227. package/dist/{src-Dmoupsem.mjs → src-R13rZ762.mjs} +1 -1
  228. package/dist/{start-D5pHwOcL.mjs → start-CcE78o1l.mjs} +3 -3
  229. package/dist/start-CwbVz0xz.mjs +1 -0
  230. package/dist/{write-project-skill-BIBvYtT6.mjs → write-project-skill-Dwv4krCb.mjs} +2 -2
  231. package/package.json +4 -4
  232. package/dist/constants-CroVRh60.mjs +0 -2
  233. package/dist/fs-traced-DB5c--Vd.mjs +0 -1
  234. package/dist/git-handle-CMWGPj44.mjs +0 -1
  235. package/dist/init-58dk1KJ3.mjs +0 -1
  236. package/dist/loader-DqbMewHF.mjs +0 -1
  237. package/dist/md-manager-wJEAbIvp.mjs +0 -2
  238. package/dist/preview-zmI5mM58.mjs +0 -1
  239. package/dist/public/assets/FeedbackForm-DqSMdqPM.js +0 -1
  240. package/dist/public/assets/ManagedArtifactProperties-CjoGl0l0.js +0 -1
  241. package/dist/public/assets/SkillOriginInline-zcbeWUbe.js +0 -1
  242. package/dist/public/assets/architecture-TIHT7OUA-B22-UzyM.js +0 -1
  243. package/dist/public/assets/channel-DfI0YSva.js +0 -1
  244. package/dist/public/assets/chunk-2Q5K7J3B-BSFIGC1j.js +0 -1
  245. package/dist/public/assets/chunk-VAUOI2AC-B_byVmRb.js +0 -1
  246. package/dist/public/assets/chunk-XXDRQBXY-BW_2kVvu.js +0 -1
  247. package/dist/public/assets/classDiagram-OUVF2IWQ-D-ugBPkQ.js +0 -1
  248. package/dist/public/assets/classDiagram-v2-EOCWNBFH-Bn6YRP9I.js +0 -1
  249. package/dist/public/assets/cynefin-VYW2F7L2-g7Kr3o9e.js +0 -1
  250. package/dist/public/assets/eventmodeling-45OFAUF4-DdR7ha8I.js +0 -1
  251. package/dist/public/assets/flowDiagram-23GEKE2U-BAuyQn3U.js +0 -1
  252. package/dist/public/assets/gitGraph-TEB2WS4Q-B9_Hbzw_.js +0 -1
  253. package/dist/public/assets/index-DYVOPzZ-.js +0 -2092
  254. package/dist/public/assets/info-DKCQHKI2-BQeDe2mR.js +0 -1
  255. package/dist/public/assets/mermaid-GHXKKRXX-DE1vq5OK.js +0 -1
  256. package/dist/public/assets/packet-7NZHBO7P-BW9abikZ.js +0 -1
  257. package/dist/public/assets/pie-RZYD4A2V-D86NaVqt.js +0 -1
  258. package/dist/public/assets/radar-I7S5WNFK-DQAd0dLq.js +0 -1
  259. package/dist/public/assets/railroad-3IZDKUUU-BpjxCYYP.js +0 -1
  260. package/dist/public/assets/railroad-abnf-AHOZXSZD-BVzINhcN.js +0 -1
  261. package/dist/public/assets/railroad-ebnf-EBAXGLYW-FAz3aWnD.js +0 -1
  262. package/dist/public/assets/railroad-peg-LSFZ7HO6-Smtu6BYl.js +0 -1
  263. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-BdS5vmc7.js +0 -1
  264. package/dist/public/assets/swimlanesDiagram-G3AALYLV-Do_H-wCL.js +0 -8
  265. package/dist/public/assets/treeView-QDETBFTQ-BgORrhQ0.js +0 -1
  266. package/dist/public/assets/treemap-6X3UGDF4-Zr5ZEdj0.js +0 -1
  267. package/dist/public/assets/wardley-OPB4EBWU-WeTAUrVk.js +0 -1
  268. package/dist/repair-skills-ByGIGa0z.mjs +0 -1
  269. package/dist/server-lock-CKTWPQax.mjs +0 -1
  270. package/dist/src-CJQ7Tr0x.mjs +0 -2030
  271. package/dist/start-D5JNGTyb.mjs +0 -1
  272. /package/dist/public/assets/{ActivityPanelDiffView-DzcGG-3T.js → ActivityPanelDiffView-BXFg3amj.js} +0 -0
  273. /package/dist/public/assets/{AppMenubar-rFZzqUIz.js → AppMenubar-Cub3r1zs.js} +0 -0
  274. /package/dist/public/assets/{BugReportHistoryDialog-BIDjQ_82.js → BugReportHistoryDialog-_HgchijV.js} +0 -0
  275. /package/dist/public/assets/{ConsentDialogBody-DRrUivNs.js → ConsentDialogBody-C9wS0j09.js} +0 -0
  276. /package/dist/public/assets/{DiffView-DITcPuOr.js → DiffView-DD1wPMUw.js} +0 -0
  277. /package/dist/public/assets/{__vite-browser-external-DRftbq1J.js → __vite-browser-external-CVGzy5OC.js} +0 -0
  278. /package/dist/public/assets/{agent-presence-DspgbUIJ.js → agent-presence-Dn2bQ2Pn.js} +0 -0
  279. /package/dist/public/assets/{array-BlR6RSqS.js → array-CxykTcx8.js} +0 -0
  280. /package/dist/public/assets/{calendar-BRay90Yd.js → calendar-C__xvB0F.js} +0 -0
  281. /package/dist/public/assets/{chunk-KEIR6QF5-Cvu_RfZc.js → chunk-KEIR6QF5-DQW1nIEN.js} +0 -0
  282. /package/dist/public/assets/{chunk-Y2CYZVJY-BavonG01.js → chunk-Y2CYZVJY-Dp_m2dHs.js} +0 -0
  283. /package/dist/public/assets/{clike-BTKURkAr.js → clike-D2Qtyj0W.js} +0 -0
  284. /package/dist/public/assets/{colors-DThYSuj1.js → colors-DxV0gzKw.js} +0 -0
  285. /package/dist/public/assets/{cytoscape.esm-CcKBPOPz.js → cytoscape.esm-Yabh0yK_.js} +0 -0
  286. /package/dist/public/assets/{defaultLocale-Bj1aksfd.js → defaultLocale-BwEiHuJD.js} +0 -0
  287. /package/dist/public/assets/{diff-CC9Zbhye.js → diff-Dke_3Gcp.js} +0 -0
  288. /package/dist/public/assets/{dist-Dtdr1fU5.js → dist-2t_r6dn4.js} +0 -0
  289. /package/dist/public/assets/{dist-CublDHOR.js → dist-CPBLOoKm.js} +0 -0
  290. /package/dist/public/assets/{dist-9KHzlPis.js → dist-CVBOvb5_.js} +0 -0
  291. /package/dist/public/assets/{dist-BKO-SihH.js → dist-yoZDDKeY.js} +0 -0
  292. /package/dist/public/assets/{form-DipRd6xO.js → form-CDklsKOD.js} +0 -0
  293. /package/dist/public/assets/{go-BOoSlAXr.js → go-CcjpRIwm.js} +0 -0
  294. /package/dist/public/assets/{init-tTyHApSS.js → init-c3-Nu4HJ.js} +0 -0
  295. /package/dist/public/assets/{input-group-DpE_QejY.js → input-group-Dw-FNINK.js} +0 -0
  296. /package/dist/public/assets/{isObject-CS6pZNNk.js → isObject-cN229uXS.js} +0 -0
  297. /package/dist/public/assets/{libesm-COuF-Ycc.js → libesm-DXt8eMZu.js} +0 -0
  298. /package/dist/public/assets/{lru-string-cache-DXyh0UqD.js → lru-string-cache-Dvzy2WTu.js} +0 -0
  299. /package/dist/public/assets/{lua-Dxo01oIG.js → lua-DxmBbMX2.js} +0 -0
  300. /package/dist/public/assets/{mcp-consent-store-BivjPpLe.js → mcp-consent-store-BcrhbRwc.js} +0 -0
  301. /package/dist/public/assets/{min-B52VabRz.js → min-BZE3RIbd.js} +0 -0
  302. /package/dist/public/assets/{panzoom.es-JQqfaE6_.js → panzoom.es-BG-eqGqR.js} +0 -0
  303. /package/dist/public/assets/{path-BTSnI4V0.js → path-C0vgPxDI.js} +0 -0
  304. /package/dist/public/assets/{pdf-DDNlrbvd.js → pdf-Cvbt6FaY.js} +0 -0
  305. /package/dist/public/assets/{pdf.worker-MgQT7Lb-.js → pdf.worker-D0hSc7ZI.js} +0 -0
  306. /package/dist/public/assets/{perl-L_d0-K7D.js → perl-CTbv8SzR.js} +0 -0
  307. /package/dist/public/assets/{properties-B1mL7FEj.js → properties-CJVfsSwL.js} +0 -0
  308. /package/dist/public/assets/{r-D1HJ6WJD.js → r-DePwCFla.js} +0 -0
  309. /package/dist/public/assets/{rough.esm-FREjYXwx.js → rough.esm-jZQkcmER.js} +0 -0
  310. /package/dist/public/assets/{ruby-BWJ7ZkjF.js → ruby-CbNmqTQ7.js} +0 -0
  311. /package/dist/public/assets/{schema-fields-view-intent-BMcQ1vbw.js → schema-fields-view-intent-DQNqHHeG.js} +0 -0
  312. /package/dist/public/assets/{share-metadata-rows-c17l05D6.js → share-metadata-rows-CuFlpaJB.js} +0 -0
  313. /package/dist/public/assets/{shell-ul8ysUs1.js → shell-PtNEZQbu.js} +0 -0
  314. /package/dist/public/assets/{sql-BJVFbIWu.js → sql-DLytrKWQ.js} +0 -0
  315. /package/dist/public/assets/{src-CIOeKeVw.js → src-D9TuoXKa.js} +0 -0
  316. /package/dist/public/assets/{swift-BmJYIPlb.js → swift-BqNeJfD7.js} +0 -0
  317. /package/dist/public/assets/{thread-client-CylUCx4y.js → thread-client-CACCERyj.js} +0 -0
  318. /package/dist/public/assets/{thread-draft-staging-Df0IT4FR.js → thread-draft-staging-XfhEE_6X.js} +0 -0
  319. /package/dist/public/assets/{toml-BOOm8Wvq.js → toml-Cboq-aWW.js} +0 -0
  320. /package/dist/public/assets/{useLintConfigViewMode-15VleUG7.js → useLintConfigViewMode-DHyC74de.js} +0 -0
@@ -168,7 +168,7 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
168
168
  `)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
169
169
  `,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Eu(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`explicit-key-ind`:!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case`map-value-ind`:if(t.explicitKey)if(!t.sep)if(xu(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=Tu(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(xu(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(Cu(t.key)&&!xu(t.sep,`newline`)){let e=Tu(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):xu(t.sep,`map-value-ind`)?this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!xu(t.sep,`newline`)){yield*this.pop({type:`error`,offset:this.offset,message:`Unexpected block-seq-ind on same line with key`,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Eu(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case`anchor`:case`tag`:if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case`seq-item-ind`:if(this.indent!==e.indent)break;t.value||xu(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while(e?.type===`flow-collection`)}else if(e.end.length===0){switch(this.type){case`comma`:case`explicit-key-ind`:!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case`map-value-ind`:!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case`space`:case`comment`:case`newline`:case`anchor`:case`tag`:!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case`flow-map-end`:case`flow-seq-end`:e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if(t.type===`block-map`&&(this.type===`map-value-ind`&&t.indent===e.indent||this.type===`newline`&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type===`map-value-ind`&&t.type!==`flow-collection`){let n=Tu(wu(t));Du(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf(`
170
170
  `)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
171
- `,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=Tu(wu(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=Tu(wu(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}};function ku(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new bu||null,prettyErrors:t}}function Au(e,t={}){let{lineCounter:n,prettyErrors:r}=ku(t),i=new Ou(n?.addNewLine),a=new ou(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new Cl(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(wl(e,n)),o.warnings.forEach(wl(e,n))),o}var ju=[`off`,`follow`,`full`],Mu=[`follow`,`full`],Nu=`pull`,Pu=[`off`,`follow`,`full`,Nu],Fu=[`follow`,`full`,Nu];function Iu(e){return e===Nu?`follow`:Lu(e)?e:null}function Lu(e){return typeof e==`string`&&ju.includes(e)}function Ru(e){return typeof e==`string`&&Mu.includes(e)}function zu(e){let t=e?.resumeMode;return t===Nu?`follow`:Ru(t)?t:null}function Bu(e){return Gu(e)===`off`&&zu(e)!==null}function Vu(e){let t=Gu(e);return t===`follow`||t===`full`||Bu(e)}function Hu(e){let t=Gu(e);return Ru(t)?t:zu(e)??`full`}function Uu(e){return e===!0?`full`:e===!1?`off`:null}function Wu(e){return e===!0?`full`:e===!1?`off`:Iu(e)}function Gu(e){let t=Iu(e?.mode);return t===null?Uu(e?.enabled):t}var Ku={sh:`bash`,zsh:`bash`,bash:`bash`,c:`c`,cc:`cpp`,cpp:`cpp`,cxx:`cpp`,"c++":`cpp`,h:`c`,hh:`cpp`,hpp:`cpp`,cs:`csharp`,css:`css`,less:`less`,scss:`scss`,sass:`scss`,diff:`diff`,patch:`diff`,go:`go`,gql:`graphql`,graphql:`graphql`,ini:`ini`,cfg:`ini`,conf:`ini`,properties:`ini`,java:`java`,js:`javascript`,jsx:`javascript`,mjs:`javascript`,cjs:`javascript`,json:`json`,jsonc:`json`,kt:`kotlin`,kts:`kotlin`,lua:`lua`,makefile:`makefile`,md:`markdown`,mdx:`markdown`,m:`objectivec`,mm:`objectivec`,pl:`perl`,pm:`perl`,php:`php`,phtml:`php`,py:`python`,pyi:`python`,pyx:`python`,r:`r`,rb:`ruby`,rs:`rust`,sql:`sql`,swift:`swift`,ts:`typescript`,tsx:`typescript`,xml:`xml`,yaml:`yaml`,yml:`yaml`},qu=new Set(Object.keys(Ku));function Ju(e){return Ku[e.toLowerCase().replace(/^\./,``)]??null}var Yu=new Set([`md`,`mdx`,`mmd`,`mermaid`]),Xu=new Set([...qu,`txt`,`text`,`csv`,`tsv`,`log`,`toml`,`html`,`htm`,`svg`,`vue`,`svelte`,`astro`,`lock`].filter(e=>!Yu.has(e))),Zu={html:`html`,htm:`html`,svg:`xml`,vue:`html`,svelte:`html`,astro:`html`,lock:`yaml`};function Qu(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<=0?!1:Xu.has(t.slice(n+1).toLowerCase())}var $u=[`image/jpeg`,`image/png`,`image/gif`,`image/webp`,`image/svg+xml`],ed=[`video/mp4`,`video/webm`,`video/ogg`],td=[`audio/mpeg`,`audio/wav`,`audio/ogg`],nd=[`application/pdf`],rd=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`,`svg`]),id=new Set([`mp4`,`webm`,`mov`,`m4v`,`mkv`]),ad=new Set([`pdf`]),od=new Set([`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`]),sd=new Set(`pdf.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),cd=new Set(`png.jpg.jpeg.gif.webp.avif.svg.apng.heic.heif.tiff.bmp.ico.pdf.mp4.webm.mov.m4v.mkv.avi.flv.wmv.mpeg.mpg.mp3.wav.ogg.m4a.flac.aac.opus.zip.7z.tar.gz.rar.woff.woff2.ttf.otf.eot.docx.xlsx.pptx.doc.xls.ppt.odt.ods.odp.pages.numbers.key.epub.mobi.csv.tsv.txt.rtf.json.yaml.yml.xml.toml.lock.gpx.html.htm`.split(`.`)),ld=new Set(`png.jpg.jpeg.gif.webp.avif.apng.heic.heif.tiff.bmp.ico.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.json.toml.lock`.split(`.`)),ud=`wikiembed`,dd=`toast`,fd=new Set(`png.jpg.jpeg.gif.webp.avif.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),pd=[`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`],md=[`mp4`,`webm`,`mov`,`m4v`],hd=[`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`],gd=[`pdf`],_d=[`json`,`toml`,`lock`];function vd(e,t,n){for(let r of t)if(!n.has(r))throw Error(`${e}: ${r} is not present in canonical upload constants`)}vd(`SIDEBAR_IMAGE_ASSET_EXTENSIONS`,pd,rd),vd(`SIDEBAR_VIDEO_ASSET_EXTENSIONS`,md,id),vd(`SIDEBAR_AUDIO_ASSET_EXTENSIONS`,hd,od),vd(`SIDEBAR_PDF_ASSET_EXTENSIONS`,gd,ad),vd(`FILE_ATTACHMENT_EXTENSIONS`,[...sd],fd),vd(`WIKI_EMBED_EXTENSIONS`,[...fd],cd);var yd=new Set(pd),bd=new Set(md),xd=new Set(hd),Sd=new Set(gd),Cd=new Set(_d);vd(`SIDEBAR_RENDERABLE_ASSET_EXTENSIONS`,[...new Set([...pd,...md,...hd,...gd,..._d])],ld);var wd=new Set([`base`,`canvas`]),Td=new Set([`mmd`,`mermaid`]);function Ed(e){let t=e.lastIndexOf(`.`);return t<0?!1:Td.has(e.slice(t+1).toLowerCase())}new Set([...cd,...wd,...Td]);function Dd(e){let t=e.toLowerCase().replace(/^\./,``);return yd.has(t)?`image`:bd.has(t)?`video`:xd.has(t)?`audio`:Sd.has(t)?`pdf`:Cd.has(t)||wd.has(t)?`text`:Td.has(t)?`mermaid`:qu.has(t)?`text`:null}var Od=[`off`,`warning`,`error`],kd=`warning`,Ad=[`error`,`warning`],jd={bg:`#282a36`,bgElevated:`#343746`,bgSubtle:`#21222c`,fg:`#f8f8f2`,fgMuted:`#9aa0c5`,border:`#44475a`,primary:`#bd93f9`,primaryFg:`#282a36`,red:`#ff5555`,green:`#50fa7b`,yellow:`#f1fa8c`,blue:`#8be9fd`,cyan:`#8be9fd`,orange:`#ffb86c`,purple:`#ff79c6`},Md={bg:`#303446`,bgElevated:`#414559`,bgSubtle:`#292c3c`,fg:`#c6d0f5`,fgMuted:`#a5adce`,border:`#51576d`,primary:`#ca9ee6`,primaryFg:`#303446`,red:`#e78284`,green:`#a6d189`,yellow:`#e5c890`,blue:`#8caaee`,cyan:`#81c8be`,orange:`#ef9f76`,purple:`#ca9ee6`},Nd={bg:`#eff1f5`,bgElevated:`#ffffff`,bgSubtle:`#e6e9ef`,fg:`#4c4f69`,fgMuted:`#6c6f85`,border:`#ccd0da`,primary:`#8839ef`,primaryFg:`#ffffff`,red:`#d20f39`,green:`#40a02b`,yellow:`#df8e1d`,blue:`#1e66f5`,cyan:`#179299`,orange:`#fe640b`,purple:`#8839ef`},Pd={bg:`#272822`,bgElevated:`#31322b`,bgSubtle:`#1e1f1a`,fg:`#f8f8f2`,fgMuted:`#a6a28c`,border:`#49483e`,primary:`#66d9ef`,primaryFg:`#272822`,red:`#f92672`,green:`#a6e22e`,yellow:`#e6db74`,blue:`#66d9ef`,cyan:`#66d9ef`,orange:`#fd971f`,purple:`#ae81ff`},Fd={bg:`#282828`,bgElevated:`#32302f`,bgSubtle:`#1d2021`,fg:`#ebdbb2`,fgMuted:`#a89984`,border:`#3c3836`,primary:`#83a598`,primaryFg:`#1d2021`,red:`#fb4934`,green:`#b8bb26`,yellow:`#fabd2f`,blue:`#83a598`,cyan:`#8ec07c`,orange:`#fe8019`,purple:`#d3869b`},Id={bg:`#002b36`,bgElevated:`#073642`,bgSubtle:`#00252e`,fg:`#93a1a1`,fgMuted:`#6a7f86`,border:`#0e4a56`,primary:`#268bd2`,primaryFg:`#fdf6e3`,red:`#dc322f`,green:`#859900`,yellow:`#b58900`,blue:`#268bd2`,cyan:`#2aa198`,orange:`#cb4b16`,purple:`#6c71c4`};function Ld(e){return{background:e.bg,foreground:e.fg,card:e.bgElevated,"card-foreground":e.fg,popover:e.bgElevated,"popover-foreground":e.fg,primary:e.primary,"primary-foreground":e.primaryFg,secondary:e.bgElevated,"secondary-foreground":e.fg,muted:e.bgElevated,"muted-foreground":e.fgMuted,accent:e.bgElevated,"accent-foreground":e.fg,destructive:e.red,border:e.border,input:e.border,ring:e.primary,"selection-soft":`oklch(from var(--primary) l c h / 0.3)`,"chart-1":e.primary,"chart-2":e.green,"chart-3":e.yellow,"chart-4":e.purple,"chart-5":e.red,sidebar:e.bgSubtle,"sidebar-foreground":e.fg,"sidebar-primary":e.primary,"sidebar-primary-foreground":e.primaryFg,"sidebar-accent":`oklch(from var(--primary) l c h / 0.14)`,"sidebar-accent-foreground":e.primary,"sidebar-hover":e.bgElevated,"sidebar-border":e.border,"sidebar-ring":e.primary,"syntax-keyword":e.purple,"syntax-tag":e.red,"syntax-attr":e.blue,"syntax-string":e.green,"syntax-number":e.orange,"syntax-atom":e.cyan}}function Rd(e,t,n){return{id:e,label:t,kind:`dark`,base:n,toTokens:()=>Ld(n)}}function zd(e,t,n){return{id:e,label:t,kind:`light`,base:n,toTokens:()=>Ld(n)}}function Bd(e,t){return{id:e,label:t,kind:`system`}}var Vd=[Bd(`default`,`Default`),Rd(`dracula`,`Dracula`,jd),Rd(`catppuccin-frappe`,`Catppuccin Frappé`,Md),zd(`catppuccin-latte`,`Catppuccin Latte`,Nd),Rd(`monokai`,`Monokai`,Pd),Rd(`gruvbox`,`Gruvbox`,Fd),Rd(`solarized`,`Solarized`,Id),Bd(`custom`,`Custom`)],Hd=Vd.map(e=>e.id),Ud=new Map(Vd.map(e=>[e.id,e]));function Wd(e){return e&&Ud.get(e)||Vd[0]}function Gd(e){let t=Wd(e).kind;return t===`system`?void 0:t}var Kd=Symbol.for(`@inkeep/open-knowledge/field-registry`),qd=globalThis;qd[Kd]===void 0&&(qd[Kd]=Xr());var H=qd[Kd];function Jd(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=Yd(t)?H.get(t):void 0;if(e!==void 0)return e;let n=t._zod?.def?.innerType;if(n===void 0)return;t=n}}function Yd(e){return typeof e==`object`&&!!e&&`_zod`in e&&`parse`in e}var Xd=Object.freeze([`authorization`,`auth.token`,`auth.bearer`,`cookie`,`set-cookie`,`x-api-key`,`password`,`secret`]),Zd=52428800,Qd=26214400,$d=12582912,ef=`https://api.openai.com/v1`,tf=`text-embedding-3-small`;function nf(e){let t;try{t=new URL(e)}catch{return!1}let n=t.hostname.toLowerCase();return n===`localhost`||n===`127.0.0.1`||n===`[::1]`}function rf(e){let t;try{t=new URL(e)}catch{return`invalid-url`}return t.protocol===`https:`||t.protocol===`http:`&&nf(e)?null:`insecure-scheme`}function af(e){let t=e.trim();return t===``?`./`:t}function of(e){let t=af(e);return t.includes(`\0`)||t.includes(`\\`)?!1:t===`/`?!0:!(t.startsWith(`/`)||/^[A-Za-z]:/.test(t)||t.split(`/`).some(e=>e===`..`))}var sf=z({content:z({dir:P().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Folder OpenKnowledge reads and writes documents under, relative to the project root (the folder that contains .ok/). Defaults to the project root. Exclude paths with .okignore.`}).default(`.`),attachmentFolderPath:P().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Where pasted and dropped assets are stored, relative to the content root. './' colocates beside the current document (default); '/' targets the content root; './subdir' targets a subfolder under the current document folder; 'folder' targets a fixed folder under the content root. Whitespace-only values are treated as './'.`}).refine(of,{message:`Invalid attachment folder path: must not contain '..' segments, NUL bytes, backslashes, or OS absolute paths (use '/' for the content root).`}).default(`./`)}).default({dir:`.`,attachmentFolderPath:`./`}),appearance:z({theme:B([`light`,`dark`,`system`]).register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Editor color theme: 'light', 'dark', or 'system' (follow the OS). A personal preference (user scope) — not shared with the project.`}).optional(),colorTheme:B(Hd).register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`IDE color palette: 'default' (follows the light/dark theme), one of 'dracula', 'catppuccin-frappe', 'catppuccin-latte', 'monokai', 'gruvbox', 'solarized', or 'custom' (your own colors from appearance.customTheme). A personal preference (user scope) — not shared with the project.`}).optional(),colorThemeEnabled:I().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Whether the Themes plugin appears in Settings → Plugins. A personal preference (user scope). Default on.`}).optional(),customTheme:z({background:P().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: editor canvas background, as a #rrggbb hex string.`}).optional(),surface:P().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: elevated surfaces (cards, sidebar, popovers), as a #rrggbb hex string.`}).optional(),foreground:P().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: primary text color, as a #rrggbb hex string.`}).optional(),primary:P().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: accent color for buttons, links, and focus, as a #rrggbb hex string.`}).optional(),accent:P().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: secondary accent (syntax highlights, charts), as a #rrggbb hex string.`}).optional(),border:P().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: hairline border + input color, as a #rrggbb hex string.`}).optional()}).optional(),preview:z({autoOpen:I().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`When on, the agent opens or refreshes the live preview after each edit. Turn off if you manage your own preview window. A personal preference (user scope).`}).default(!0)}).default({autoOpen:!0}),sidebar:z({showHiddenFiles:I().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show dot-prefixed entries (e.g. .ok/, .okignore) in the file tree. Per-machine (project-local) — not shared with collaborators.`}).default(!1),showOnlyMarkdownFiles:I().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show only markdown documents (.md/.mdx) and folders in the file tree, hiding other file types from view. View-only: hidden files stay on disk and remain reachable via links and search. Per-machine (project-local) — not shared with collaborators.`}).default(!1),showSkillsSection:I().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show the Skills section in the sidebar. Skill documents remain reachable via links and search while the section is hidden. Per-machine (project-local) — not shared with collaborators.`}).default(!0),showOkFolders:I().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show .ok folders (skills, templates, and other OpenKnowledge-managed state) in the file tree as read-only entries. .ok/worktrees and .ok/local never appear. Per-machine (project-local) — not shared with collaborators.`}).default(!1)}).optional()}).default({preview:{autoOpen:!0}}),editor:z({wordWrap:I().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Soft-wrap long lines in the source (CodeMirror) editor. A personal preference (user scope).`}).default(!0)}).default({wordWrap:!0}),agents:z({autoApproveOkTools:I().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:"Auto-approve OpenKnowledge's own tools (and `ok open` on Claude) for agents launched from the built-in terminal. Destructive tools (delete/move/share/install) still prompt. Per-machine personal preference (user scope)."}).default(!0)}).default({autoApproveOkTools:!0}),autoSync:z({mode:B(Pu).register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`How this machine syncs this project with its git remote: 'off' (no sync), 'follow' (one-directional — pull remote changes, never push your own; 'pull' is accepted as a legacy alias), or 'full' (bidirectional pull and push). null = not chosen yet (onboarding asks). Per-machine (project-local) — not shared. Supersedes the legacy autoSync.enabled boolean.`}).nullable().default(null),enabled:I().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Legacy per-machine sync toggle, superseded by autoSync.mode. Read only when mode is absent (true = full, false = off). null = not chosen yet. Per-machine (project-local) — not shared.`}).nullable().default(null),resumeMode:B(Fu).register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`When sync is paused (autoSync.mode 'off') after having been enabled, the active mode to resume into ('follow' | 'full'). Per-machine UI memory; ignored while a mode is active. Not shared.`}).optional(),default:so([I(),B(Pu)]).register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Committed project default for a machine's sync mode on first open: 'off' | 'follow' | 'full', or the legacy boolean (true = full, false = off). null = ask (show the onboarding prompt). Shared via git. A per-machine autoSync.mode choice overrides it.`}).nullable().default(null)}).default({mode:null,enabled:null,default:null}),terminal:z({enabled:I().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Opt-out for the in-app terminal (a real OS shell at full user privilege). The terminal is on by default; set false to disable it for this project on this machine. Per-machine (project-local) — never shared via git, clone, or sync.`}).nullable().default(null)}).default({enabled:null}),telemetry:z({localSink:z({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:"Write local diagnostic spans + logs under .ok/local/ for `ok diagnose bundle`. Local-only — never leaves the machine until you run bundle. Set false for sensitive workspaces. Shared across collaborators."}).default(!0),spans:z({maxBytes:F().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Maximum size, in bytes, of the local diagnostic spans file before it rotates (default ~50 MB).`}).default(Zd)}).default({maxBytes:Zd}),logs:z({maxBytes:F().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Maximum size, in bytes, of the local diagnostic logs file before it rotates (default ~25 MB).`}).default(Qd)}).default({maxBytes:Qd}),attributeDenylist:L(P()).register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Telemetry attribute keys whose values are redacted before any local span/log is written (credential / secret guard). Extends the built-in denylist.`}).default([...Xd])}).default({enabled:!0,spans:{maxBytes:Zd},logs:{maxBytes:Qd},attributeDenylist:[...Xd]})}).default({localSink:{enabled:!0,spans:{maxBytes:Zd},logs:{maxBytes:Qd},attributeDenylist:[...Xd]}}),lossCapture:z({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:"Record bridge loss-class events (content-free) under .ok/local/loss-capture/ for `ok diagnose bundle`. Local-only — never leaves the machine until you run bundle. Set false for sensitive workspaces. Shared across collaborators."}).default(!0),maxBytes:F().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Maximum size, in bytes, of the local loss-capture file before it rotates (default ~12 MB).`}).default($d)}).default({enabled:!0,maxBytes:$d}),bridge:z({backgroundThrottle:z({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Keep the desktop window's timers running at full rate while it holds unsynced work, so backgrounding the app never starves sync or recovery; when the window is idle the OS-default background throttling is restored (battery). Honored by the desktop app. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),deferGuard:z({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Defer a drain-shaped Observer B re-derive when the WYSIWYG fragment holds an un-propagated keystroke Y.Text lacks, so the keystroke survives instead of being stomped. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),lossDetector:z({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Detect content the bridge silently dropped at its reconciliation boundary (an Observer-A apply arm or a paired agent-undo derive) and write a recovery checkpoint plus a content-free loss event. Detection only — never blocks a write. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),fixedPoint:z({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Bound the Y.Text→WYSIWYG re-derive loop with a drain-count backstop: a run of re-derive drains that never reaches a raw-byte fixed point freezes the re-derive loop and writes a recovery checkpoint plus a content-free loss event, instead of churning unbounded. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),preDrain:z({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Before an agent write or undo rebuilds the WYSIWYG fragment, flush an un-propagated keystroke that provably does not overlap the operation into Y.Text so the keystroke survives instead of needing recovery; overlapping or unmodellable cases fall back to the checkpoint floor. Scope: appending writes and single-frame undos — a write that replaces the whole body (replace / edit) overwrites the keystroke either way, so those always take the checkpoint floor. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),flushOnHide:z({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`On tab hide/unload, force-send each doc's unsynced work to the server and commit its local cache, and re-sync on return to foreground, so a backgrounded tab never strands edits that IndexedDB alone would lose on recycle. Honored client-side. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0})}).default({backgroundThrottle:{enabled:!0},deferGuard:{enabled:!0},lossDetector:{enabled:!0},fixedPoint:{enabled:!0},preDrain:{enabled:!0},flushOnHide:{enabled:!0}}),search:z({semantic:z({enabled:I().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:"Add semantic (embeddings) ranking to the MCP search tool, fused with the lexical engine so conceptually-related pages surface even with no shared keywords. When ON and an API key is set (`ok embeddings set-key`), the search query and matching document content are sent to the configured embeddings provider — content egress. Default OFF. Per-machine (project-local) — not shared with collaborators."}).default(!1),baseUrl:P().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:"Base URL of the OpenAI-compatible embeddings API (default https://api.openai.com/v1). Override to point at a self-hosted server (Ollama / vLLM / LM Studio) or another provider. The API key is NOT stored here — set it with `ok embeddings set-key` (`~/.ok/secrets.yml`); it is sent to whichever endpoint this names."}).default(ef),model:P().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Embeddings model id (default text-embedding-3-small). Must be served by the provider at baseUrl. Changing it re-embeds the corpus (the cache is keyed by provider + model + dimensions).`}).default(tf),dimensions:F().int().positive().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Optional output vector dimensions. Omit (recommended) to detect the model's native size from its first response — that is what lets a non-OpenAI model work without knowing its size up front. Set a smaller value (text-embedding-3 supports e.g. 512 / 1024) to shrink the on-disk cache, trading a little retrieval quality; a server that ignores the request param then fails loudly instead of silently. Changing it re-embeds the corpus.`}).optional(),similarityFloor:F().min(0).max(1).register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Optional hard cutoff: drop any "by meaning" match whose cosine similarity is below this value. Off by default (0) because retrieval is rank-based (the closest pages are returned regardless of absolute score) and the right cutoff is model-specific. Set it only to suppress weak matches for a specific provider/model whose cosine scale you know. Most setups should leave it unset and rely on the result-count cap.`}).optional()}).default({enabled:!1,baseUrl:ef,model:tf})}).default({semantic:{enabled:!1,baseUrl:ef,model:tf}}),contentRules:z({markdownlint:R({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Whether the markdownlint plugin (body rules) contributes diagnostics.`}).default(!1)}).default({enabled:!1}),frontmatter:R({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Whether the frontmatter plugin (JSON-Schema validation of document frontmatter) contributes diagnostics.`}).default(!1),schemas:L(R({appliesTo:so([P(),L(P())]).optional(),file:P(),enabled:I().optional()})).register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Frontmatter schema mappings: which docs (appliesTo globs) validate against which JSON Schema file (project-root-relative path).`}).default([])}).default({enabled:!1,schemas:[]})}).default({markdownlint:{enabled:!1},frontmatter:{enabled:!1,schemas:[]}}),validation:z({links:B(Od).register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`How broken internal links are reported on the validation plane: 'off' hides them, 'warning' (default) or 'error' sets their severity.`}).default(kd),fileTreeIndicators:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Whether the file tree tints and badges files that have validation problems.`}).default(!0)}).default({links:kd,fileTreeIndicators:!0}),linkPreviews:z({enabled:I().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show a rich preview card (site name, page title, description, favicon) when you hover an external link in the editor. When ON, hovering an external link sends that link's URL to the destination site to fetch its preview metadata — outbound egress, one request per previewed link. Default ON; set to false to turn external previews off. Per-machine (project-local) — not shared with collaborators. Previews of links to other documents in this project are read from the local index with no network request and are always on.`}).default(!0)}).default({enabled:!0}),remote:z({url:P().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:"Public URL your tunnel gives you, e.g. https://myproject.ngrok.app. Used only with `ok start --remote` (config alone never enables remote access); its host is admitted through the Host-header allowlist. There is no server-side auth, so restrict access at the tunnel (ngrok OAuth, Cloudflare Access, Tailscale ACLs)."}).optional(),port:F().int().min(1).max(65535).register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`TCP port the server binds when remote access is enabled (default 24550). Fixed so the tunnel's port mapping survives restarts. Set it only on a conflict. An explicit --port still wins; the PORT env var is ignored in remote mode.`}).default(24550)}).default({port:24550})}),cf=`open-knowledge-config`;function lf(e,t,n){let r=c.getTracer(cf),i=t?{attributes:t}:{};return r.startActiveSpan(e,i,e=>{try{return n(e)}catch(t){throw e.recordException(t),e.setStatus({code:s.ERROR,message:t instanceof Error?t.message:String(t)}),t}finally{e.end()}})}function uf(e,t){let n=c.getActiveSpan();n&&n.addEvent(e,t)}function df(e){let t=e;for(let e=0;e<16;e++){if(t==null||t?._zod?.def?.shape!==void 0)return t;let e=t?._zod?.def?.innerType;if(e===void 0)return t;t=e}return t}function ff(e,t){let n=e;for(let e of t){n=df(n);let t=n?._zod?.def?.shape;if(!t||(n=t[String(e)],n===void 0))return}return n}function pf(e,t){let n=ff(e,t);if(n!==void 0)return Jd(n)}function mf(e,t){return e===`either`?!0:e===t}function hf(e,t){let n=null;function r(e,i){if(n!==null||e===void 0)return;if(typeof e==`object`&&e&&!Array.isArray(e)){for(let[t,a]of Object.entries(e))if(r(a,[...i,t]),n!==null)return;return}let a=pf(sf,i);a?.scope!==void 0&&(mf(a.scope,t)||(n={code:`SCOPE_VIOLATION`,path:i,expectedScope:a.scope,actualScope:t}))}for(let[t,i]of Object.entries(e))if(r(i,[t]),n!==null)break;return n}function gf(e,t){for(let n=1;n<t.length;n++){let r=t.slice(0,n);e.hasIn(r)&&(ns(e.getIn(r,!0))||e.deleteIn(r))}}function _f(e,t){let n=[];function r(t,i){if(t!==void 0){if(t===null){e.deleteIn(i),n.push(i.join(`.`));return}if(Array.isArray(t)){gf(e,i),e.setIn(i,t),n.push(i.join(`.`));return}if(typeof t==`object`){for(let[e,n]of Object.entries(t))r(n,[...i,e]);return}gf(e,i),e.setIn(i,t),n.push(i.join(`.`))}}for(let[e,n]of Object.entries(t))r(n,[e]);return n}function vf(e){return{path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message,issueCode:e.code}}var yf=R({file:P(),line:F().int().min(1),column:F().int().min(1),snippet:P().optional()}),bf=R({path:L(so([P(),F()])),message:P(),issueCode:P(),params:uo(P(),io()).optional(),source:yf.optional()}),xf=B([`user`,`project`,`project-local`,`either`]),Sf=B([`user`,`project`,`project-local`]),Cf=co(`code`,[R({code:V(`YAML_PARSE`),detail:P()}),R({code:V(`SCHEMA_INVALID`),issues:L(bf)}),R({code:V(`SCOPE_VIOLATION`),path:L(P()),expectedScope:xf,actualScope:Sf}),R({code:V(`NOT_AGENT_SETTABLE`),path:L(P())}),R({code:V(`MIXED_SCOPE`),paths:L(R({path:L(P()),scope:Sf}))}),R({code:V(`REMOVED_KEY`),path:L(P()),redirect:P(),source:yf.optional()}),R({code:V(`WRITE_ERROR`),detail:P()}),R({code:V(`OKIGNORE_INVALID`),detail:P(),lineNumber:F().int().min(1).optional()}),R({code:V(`UNKNOWN`),message:P().optional()})]),wf=new Set(Cf.options.map(e=>e.shape.code.value)),Tf=so([Cf,z({code:P(),message:P().optional()})]);function Ef(e){return wf.has(e.code)}function Df(e){switch(e){case`user`:return`~/.ok/global.yml`;case`project`:return`.ok/config.yml`;case`project-local`:return`.ok/local/config.yml`;case`either`:return`.ok/config.yml or ~/.ok/global.yml`}}function Of(e){switch(e){case`user`:return`personal to you, across all projects`;case`project`:return`shared with your team via git`;case`project-local`:return`this machine only, not shared`;case`either`:return`user or project`}}function kf(e){if(!Ef(e))return e.message??`Unknown error (${e.code}).`;switch(e.code){case`YAML_PARSE`:return`Failed to parse YAML: ${e.detail}`;case`SCHEMA_INVALID`:{if(e.issues.length===0)return`Invalid configuration.`;let t=new Map;for(let n of e.issues){let e=n.source?.file??`<no source>`,r=t.get(e)??[];r.push(n),t.set(e,r)}let n=[];for(let[e,r]of t){e===`<no source>`?n.push(`Invalid configuration:`):n.push(`Invalid configuration at ${e}:`);for(let t of r){let r=t.path.length===0?`<root>`:t.path.join(`.`);if(t.source){if(n.push(` ${e}:${t.source.line}:${t.source.column}`),n.push(` ${r}: ${t.message}`),t.source.snippet&&t.source.snippet.length>0)for(let e of t.source.snippet.split(`
171
+ `,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=Tu(wu(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=Tu(wu(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}};function ku(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new bu||null,prettyErrors:t}}function Au(e,t={}){let{lineCounter:n,prettyErrors:r}=ku(t),i=new Ou(n?.addNewLine),a=new ou(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new Cl(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(wl(e,n)),o.warnings.forEach(wl(e,n))),o}var ju=[`off`,`follow`,`full`],Mu=[`follow`,`full`],Nu=`pull`,Pu=[`off`,`follow`,`full`,Nu],Fu=[`follow`,`full`,Nu];function Iu(e){return e===Nu?`follow`:Lu(e)?e:null}function Lu(e){return typeof e==`string`&&ju.includes(e)}function Ru(e){return typeof e==`string`&&Mu.includes(e)}function zu(e){let t=e?.resumeMode;return t===Nu?`follow`:Ru(t)?t:null}function Bu(e){return Gu(e)===`off`&&zu(e)!==null}function Vu(e){let t=Gu(e);return t===`follow`||t===`full`||Bu(e)}function Hu(e){let t=Gu(e);return Ru(t)?t:zu(e)??`full`}function Uu(e){return e===!0?`full`:e===!1?`off`:null}function Wu(e){return e===!0?`full`:e===!1?`off`:Iu(e)}function Gu(e){let t=Iu(e?.mode);return t===null?Uu(e?.enabled):t}var Ku={sh:`bash`,zsh:`bash`,bash:`bash`,c:`c`,cc:`cpp`,cpp:`cpp`,cxx:`cpp`,"c++":`cpp`,h:`c`,hh:`cpp`,hpp:`cpp`,cs:`csharp`,css:`css`,less:`less`,scss:`scss`,sass:`scss`,diff:`diff`,patch:`diff`,go:`go`,gql:`graphql`,graphql:`graphql`,ini:`ini`,cfg:`ini`,conf:`ini`,properties:`ini`,java:`java`,js:`javascript`,jsx:`javascript`,mjs:`javascript`,cjs:`javascript`,json:`json`,jsonc:`json`,kt:`kotlin`,kts:`kotlin`,lua:`lua`,makefile:`makefile`,md:`markdown`,mdx:`markdown`,m:`objectivec`,mm:`objectivec`,pl:`perl`,pm:`perl`,php:`php`,phtml:`php`,py:`python`,pyi:`python`,pyx:`python`,r:`r`,rb:`ruby`,rs:`rust`,sql:`sql`,swift:`swift`,ts:`typescript`,tsx:`typescript`,xml:`xml`,yaml:`yaml`,yml:`yaml`},qu=new Set(Object.keys(Ku));function Ju(e){return Ku[e.toLowerCase().replace(/^\./,``)]??null}var Yu=new Set([`md`,`mdx`,`mmd`,`mermaid`]),Xu=new Set([...qu,`txt`,`text`,`csv`,`tsv`,`log`,`toml`,`html`,`htm`,`svg`,`vue`,`svelte`,`astro`,`lock`].filter(e=>!Yu.has(e))),Zu={html:`html`,htm:`html`,svg:`xml`,vue:`html`,svelte:`html`,astro:`html`,lock:`yaml`};function Qu(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<=0?!1:Xu.has(t.slice(n+1).toLowerCase())}var $u=[`image/jpeg`,`image/png`,`image/gif`,`image/webp`,`image/svg+xml`],ed=[`video/mp4`,`video/webm`,`video/ogg`],td=[`audio/mpeg`,`audio/wav`,`audio/ogg`],nd=[`application/pdf`],rd=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`,`svg`]),id=new Set([`mp4`,`webm`,`mov`,`m4v`,`mkv`]),ad=new Set([`pdf`]),od=new Set([`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`]),sd=new Set(`pdf.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),cd=new Set(`png.jpg.jpeg.gif.webp.avif.svg.apng.heic.heif.tiff.bmp.ico.pdf.mp4.webm.mov.m4v.mkv.avi.flv.wmv.mpeg.mpg.mp3.wav.ogg.m4a.flac.aac.opus.zip.7z.tar.gz.rar.woff.woff2.ttf.otf.eot.docx.xlsx.pptx.doc.xls.ppt.odt.ods.odp.pages.numbers.key.epub.mobi.csv.tsv.txt.rtf.json.yaml.yml.xml.toml.lock.gpx.html.htm`.split(`.`)),ld=new Set(`png.jpg.jpeg.gif.webp.avif.apng.heic.heif.tiff.bmp.ico.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.json.toml.lock`.split(`.`)),ud=`wikiembed`,dd=`toast`,fd=new Set(`png.jpg.jpeg.gif.webp.avif.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),pd=[`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`],md=[`mp4`,`webm`,`mov`,`m4v`],hd=[`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`],gd=[`pdf`],_d=[`json`,`toml`,`lock`];function vd(e,t,n){for(let r of t)if(!n.has(r))throw Error(`${e}: ${r} is not present in canonical upload constants`)}vd(`SIDEBAR_IMAGE_ASSET_EXTENSIONS`,pd,rd),vd(`SIDEBAR_VIDEO_ASSET_EXTENSIONS`,md,id),vd(`SIDEBAR_AUDIO_ASSET_EXTENSIONS`,hd,od),vd(`SIDEBAR_PDF_ASSET_EXTENSIONS`,gd,ad),vd(`FILE_ATTACHMENT_EXTENSIONS`,[...sd],fd),vd(`WIKI_EMBED_EXTENSIONS`,[...fd],cd);var yd=new Set(pd),bd=new Set(md),xd=new Set(hd),Sd=new Set(gd),Cd=new Set(_d);vd(`SIDEBAR_RENDERABLE_ASSET_EXTENSIONS`,[...new Set([...pd,...md,...hd,...gd,..._d])],ld);var wd=new Set([`base`,`canvas`]),Td=new Set([`mmd`,`mermaid`]);function Ed(e){let t=e.lastIndexOf(`.`);return t<0?!1:Td.has(e.slice(t+1).toLowerCase())}new Set([...cd,...wd,...Td]);function Dd(e){let t=e.toLowerCase().replace(/^\./,``);return yd.has(t)?`image`:bd.has(t)?`video`:xd.has(t)?`audio`:Sd.has(t)?`pdf`:Cd.has(t)||wd.has(t)?`text`:Td.has(t)?`mermaid`:qu.has(t)?`text`:null}var Od=[`off`,`warning`,`error`],kd=`warning`,Ad=[`error`,`warning`],jd={bg:`#282a36`,bgElevated:`#343746`,bgSubtle:`#21222c`,fg:`#f8f8f2`,fgMuted:`#9aa0c5`,border:`#44475a`,primary:`#bd93f9`,primaryFg:`#282a36`,red:`#ff5555`,green:`#50fa7b`,yellow:`#f1fa8c`,blue:`#8be9fd`,cyan:`#8be9fd`,orange:`#ffb86c`,purple:`#ff79c6`},Md={bg:`#303446`,bgElevated:`#414559`,bgSubtle:`#292c3c`,fg:`#c6d0f5`,fgMuted:`#a5adce`,border:`#51576d`,primary:`#ca9ee6`,primaryFg:`#303446`,red:`#e78284`,green:`#a6d189`,yellow:`#e5c890`,blue:`#8caaee`,cyan:`#81c8be`,orange:`#ef9f76`,purple:`#ca9ee6`},Nd={bg:`#eff1f5`,bgElevated:`#ffffff`,bgSubtle:`#e6e9ef`,fg:`#4c4f69`,fgMuted:`#6c6f85`,border:`#ccd0da`,primary:`#8839ef`,primaryFg:`#ffffff`,red:`#d20f39`,green:`#40a02b`,yellow:`#df8e1d`,blue:`#1e66f5`,cyan:`#179299`,orange:`#fe640b`,purple:`#8839ef`},Pd={bg:`#272822`,bgElevated:`#31322b`,bgSubtle:`#1e1f1a`,fg:`#f8f8f2`,fgMuted:`#a6a28c`,border:`#49483e`,primary:`#66d9ef`,primaryFg:`#272822`,red:`#f92672`,green:`#a6e22e`,yellow:`#e6db74`,blue:`#66d9ef`,cyan:`#66d9ef`,orange:`#fd971f`,purple:`#ae81ff`},Fd={bg:`#282828`,bgElevated:`#32302f`,bgSubtle:`#1d2021`,fg:`#ebdbb2`,fgMuted:`#a89984`,border:`#3c3836`,primary:`#83a598`,primaryFg:`#1d2021`,red:`#fb4934`,green:`#b8bb26`,yellow:`#fabd2f`,blue:`#83a598`,cyan:`#8ec07c`,orange:`#fe8019`,purple:`#d3869b`},Id={bg:`#002b36`,bgElevated:`#073642`,bgSubtle:`#00252e`,fg:`#93a1a1`,fgMuted:`#6a7f86`,border:`#0e4a56`,primary:`#268bd2`,primaryFg:`#fdf6e3`,red:`#dc322f`,green:`#859900`,yellow:`#b58900`,blue:`#268bd2`,cyan:`#2aa198`,orange:`#cb4b16`,purple:`#6c71c4`};function Ld(e){return{background:e.bg,foreground:e.fg,card:e.bgElevated,"card-foreground":e.fg,popover:e.bgElevated,"popover-foreground":e.fg,primary:e.primary,"primary-foreground":e.primaryFg,secondary:e.bgElevated,"secondary-foreground":e.fg,muted:e.bgElevated,"muted-foreground":e.fgMuted,accent:e.bgElevated,"accent-foreground":e.fg,destructive:e.red,border:e.border,input:e.border,ring:e.primary,"selection-soft":`oklch(from var(--primary) l c h / 0.3)`,"chart-1":e.primary,"chart-2":e.green,"chart-3":e.yellow,"chart-4":e.purple,"chart-5":e.red,sidebar:e.bgSubtle,"sidebar-foreground":e.fg,"sidebar-primary":e.primary,"sidebar-primary-foreground":e.primaryFg,"sidebar-accent":`oklch(from var(--primary) l c h / 0.14)`,"sidebar-accent-foreground":e.primary,"sidebar-hover":e.bgElevated,"sidebar-border":e.border,"sidebar-ring":e.primary,"syntax-keyword":e.purple,"syntax-tag":e.red,"syntax-attr":e.blue,"syntax-string":e.green,"syntax-number":e.orange,"syntax-atom":e.cyan}}function Rd(e,t,n){return{id:e,label:t,kind:`dark`,base:n,toTokens:()=>Ld(n)}}function zd(e,t,n){return{id:e,label:t,kind:`light`,base:n,toTokens:()=>Ld(n)}}function Bd(e,t){return{id:e,label:t,kind:`system`}}var Vd=[Bd(`default`,`Default`),Rd(`dracula`,`Dracula`,jd),Rd(`catppuccin-frappe`,`Catppuccin Frappé`,Md),zd(`catppuccin-latte`,`Catppuccin Latte`,Nd),Rd(`monokai`,`Monokai`,Pd),Rd(`gruvbox`,`Gruvbox`,Fd),Rd(`solarized`,`Solarized`,Id),Bd(`custom`,`Custom`)],Hd=Vd.map(e=>e.id),Ud=new Map(Vd.map(e=>[e.id,e]));function Wd(e){return e&&Ud.get(e)||Vd[0]}function Gd(e){let t=Wd(e).kind;return t===`system`?void 0:t}var Kd=Symbol.for(`@inkeep/open-knowledge/field-registry`),qd=globalThis;qd[Kd]===void 0&&(qd[Kd]=Xr());var H=qd[Kd];function Jd(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=Yd(t)?H.get(t):void 0;if(e!==void 0)return e;let n=t._zod?.def?.innerType;if(n===void 0)return;t=n}}function Yd(e){return typeof e==`object`&&!!e&&`_zod`in e&&`parse`in e}var Xd=Object.freeze([`authorization`,`auth.token`,`auth.bearer`,`cookie`,`set-cookie`,`x-api-key`,`password`,`secret`]),Zd=52428800,Qd=26214400,$d=12582912,ef=`https://api.openai.com/v1`,tf=`text-embedding-3-small`;function nf(e){let t;try{t=new URL(e)}catch{return!1}let n=t.hostname.toLowerCase();return n===`localhost`||n===`127.0.0.1`||n===`[::1]`}function rf(e){let t;try{t=new URL(e)}catch{return`invalid-url`}return t.protocol===`https:`||t.protocol===`http:`&&nf(e)?null:`insecure-scheme`}function af(e){let t=e.trim();return t===``?`./`:t}function of(e){let t=af(e);return t.includes(`\0`)||t.includes(`\\`)?!1:t===`/`?!0:!(t.startsWith(`/`)||/^[A-Za-z]:/.test(t)||t.split(`/`).some(e=>e===`..`))}var sf=z({content:z({dir:P().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Folder OpenKnowledge reads and writes documents under, relative to the project root (the folder that contains .ok/). Defaults to the project root. Exclude paths with .okignore.`}).default(`.`),attachmentFolderPath:P().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Where pasted and dropped assets are stored, relative to the content root. './' colocates beside the current document (default); '/' targets the content root; './subdir' targets a subfolder under the current document folder; 'folder' targets a fixed folder under the content root. Whitespace-only values are treated as './'.`}).refine(of,{message:`Invalid attachment folder path: must not contain '..' segments, NUL bytes, backslashes, or OS absolute paths (use '/' for the content root).`}).default(`./`)}).default({dir:`.`,attachmentFolderPath:`./`}),appearance:z({theme:B([`light`,`dark`,`system`]).register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Editor color theme: 'light', 'dark', or 'system' (follow the OS). A personal preference (user scope) — not shared with the project.`}).optional(),colorTheme:B(Hd).register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`IDE color palette: 'default' (follows the light/dark theme), one of 'dracula', 'catppuccin-frappe', 'catppuccin-latte', 'monokai', 'gruvbox', 'solarized', or 'custom' (your own colors from appearance.customTheme). A personal preference (user scope) — not shared with the project.`}).optional(),colorThemeEnabled:I().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Whether the Themes plugin appears in Settings → Plugins. A personal preference (user scope). Default on.`}).optional(),customTheme:z({background:P().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: editor canvas background, as a #rrggbb hex string.`}).optional(),surface:P().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: elevated surfaces (cards, sidebar, popovers), as a #rrggbb hex string.`}).optional(),foreground:P().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: primary text color, as a #rrggbb hex string.`}).optional(),primary:P().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: accent color for buttons, links, and focus, as a #rrggbb hex string.`}).optional(),accent:P().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: secondary accent (syntax highlights, charts), as a #rrggbb hex string.`}).optional(),border:P().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: hairline border + input color, as a #rrggbb hex string.`}).optional()}).optional(),preview:z({autoOpen:I().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`When on, the agent opens or refreshes the live preview after each edit. Turn off if you manage your own preview window. A personal preference (user scope).`}).default(!0)}).default({autoOpen:!0}),sidebar:z({showHiddenFiles:I().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show dot-prefixed entries (e.g. .ok/, .okignore) in the file tree. Per-machine (project-local) — not shared with collaborators.`}).default(!1),showOnlyMarkdownFiles:I().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show only markdown documents (.md/.mdx) and folders in the file tree, hiding other file types from view. View-only: hidden files stay on disk and remain reachable via links and search. Per-machine (project-local) — not shared with collaborators.`}).default(!1),showSkillsSection:I().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show the Skills section in the sidebar. Skill documents remain reachable via links and search while the section is hidden. Per-machine (project-local) — not shared with collaborators.`}).default(!0),showOkFolders:I().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show .ok folders (skills, templates, and other OpenKnowledge-managed state) in the file tree as read-only entries. .ok/worktrees and .ok/local never appear. Per-machine (project-local) — not shared with collaborators.`}).default(!1)}).optional()}).default({preview:{autoOpen:!0}}),editor:z({wordWrap:I().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Soft-wrap long lines in the source (CodeMirror) editor. A personal preference (user scope).`}).default(!0)}).default({wordWrap:!0}),agents:z({autoApproveOkTools:I().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:"Auto-approve OpenKnowledge's own tools (and `ok open` on Claude) for agents launched from the built-in terminal. Destructive tools (delete/move/share/install) still prompt. Per-machine personal preference (user scope)."}).default(!0)}).default({autoApproveOkTools:!0}),autoSync:z({mode:B(Pu).register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`How this machine syncs this project with its git remote: 'off' (no sync), 'follow' (one-directional — pull remote changes, never push your own; 'pull' is accepted as a legacy alias), or 'full' (bidirectional pull and push). null = not chosen yet (onboarding asks). Per-machine (project-local) — not shared. Supersedes the legacy autoSync.enabled boolean.`}).nullable().default(null),enabled:I().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Legacy per-machine sync toggle, superseded by autoSync.mode. Read only when mode is absent (true = full, false = off). null = not chosen yet. Per-machine (project-local) — not shared.`}).nullable().default(null),resumeMode:B(Fu).register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`When sync is paused (autoSync.mode 'off') after having been enabled, the active mode to resume into ('follow' | 'full'). Per-machine UI memory; ignored while a mode is active. Not shared.`}).optional(),default:so([I(),B(Pu)]).register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Committed project default for a machine's sync mode on first open: 'off' | 'follow' | 'full', or the legacy boolean (true = full, false = off). null = ask (show the onboarding prompt). Shared via git. A per-machine autoSync.mode choice overrides it.`}).nullable().default(null)}).default({mode:null,enabled:null,default:null}),terminal:z({enabled:I().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Opt-out for the in-app terminal (a real OS shell at full user privilege). The terminal is on by default; set false to disable it for this project on this machine. Per-machine (project-local) — never shared via git, clone, or sync.`}).nullable().default(null)}).default({enabled:null}),telemetry:z({localSink:z({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:"Write local diagnostic spans + logs under .ok/local/ for `ok diagnose bundle`. Local-only — never leaves the machine until you run bundle. Set false for sensitive workspaces. Shared across collaborators."}).default(!0),spans:z({maxBytes:F().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Maximum size, in bytes, of the local diagnostic spans file before it rotates (default ~50 MB).`}).default(Zd)}).default({maxBytes:Zd}),logs:z({maxBytes:F().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Maximum size, in bytes, of the local diagnostic logs file before it rotates (default ~25 MB).`}).default(Qd)}).default({maxBytes:Qd}),attributeDenylist:L(P()).register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Telemetry attribute keys whose values are redacted before any local span/log is written (credential / secret guard). Extends the built-in denylist.`}).default([...Xd])}).default({enabled:!0,spans:{maxBytes:Zd},logs:{maxBytes:Qd},attributeDenylist:[...Xd]}),skillInstallReports:z({enabled:I().register(H,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Report skill installs to skills.sh so a published skill shows an accurate install count. Sends the skill name, its source repo, and which agent tools it was installed for — never file contents, and never for a private or local source. One report per skill per machine. Default on; the DO_NOT_TRACK and DISABLE_TELEMETRY environment variables also turn it off.`}).default(!0)}).default({enabled:!0})}).default({localSink:{enabled:!0,spans:{maxBytes:Zd},logs:{maxBytes:Qd},attributeDenylist:[...Xd]},skillInstallReports:{enabled:!0}}),lossCapture:z({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:"Record bridge loss-class events (content-free) under .ok/local/loss-capture/ for `ok diagnose bundle`. Local-only — never leaves the machine until you run bundle. Set false for sensitive workspaces. Shared across collaborators."}).default(!0),maxBytes:F().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Maximum size, in bytes, of the local loss-capture file before it rotates (default ~12 MB).`}).default($d)}).default({enabled:!0,maxBytes:$d}),bridge:z({backgroundThrottle:z({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Keep the desktop window's timers running at full rate while it holds unsynced work, so backgrounding the app never starves sync or recovery; when the window is idle the OS-default background throttling is restored (battery). Honored by the desktop app. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),deferGuard:z({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Defer a drain-shaped Observer B re-derive when the WYSIWYG fragment holds an un-propagated keystroke Y.Text lacks, so the keystroke survives instead of being stomped. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),lossDetector:z({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Detect content the bridge silently dropped at its reconciliation boundary (an Observer-A apply arm or a paired agent-undo derive) and write a recovery checkpoint plus a content-free loss event. Detection only — never blocks a write. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),fixedPoint:z({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Bound the Y.Text→WYSIWYG re-derive loop with a drain-count backstop: a run of re-derive drains that never reaches a raw-byte fixed point freezes the re-derive loop and writes a recovery checkpoint plus a content-free loss event, instead of churning unbounded. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),preDrain:z({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Before an agent write or undo rebuilds the WYSIWYG fragment, flush an un-propagated keystroke that provably does not overlap the operation into Y.Text so the keystroke survives instead of needing recovery; overlapping or unmodellable cases fall back to the checkpoint floor. Scope: appending writes and single-frame undos — a write that replaces the whole body (replace / edit) overwrites the keystroke either way, so those always take the checkpoint floor. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),flushOnHide:z({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`On tab hide/unload, force-send each doc's unsynced work to the server and commit its local cache, and re-sync on return to foreground, so a backgrounded tab never strands edits that IndexedDB alone would lose on recycle. Honored client-side. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0})}).default({backgroundThrottle:{enabled:!0},deferGuard:{enabled:!0},lossDetector:{enabled:!0},fixedPoint:{enabled:!0},preDrain:{enabled:!0},flushOnHide:{enabled:!0}}),search:z({semantic:z({enabled:I().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:"Add semantic (embeddings) ranking to the MCP search tool, fused with the lexical engine so conceptually-related pages surface even with no shared keywords. When ON and an API key is set (`ok embeddings set-key`), the search query and matching document content are sent to the configured embeddings provider — content egress. Default OFF. Per-machine (project-local) — not shared with collaborators."}).default(!1),baseUrl:P().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:"Base URL of the OpenAI-compatible embeddings API (default https://api.openai.com/v1). Override to point at a self-hosted server (Ollama / vLLM / LM Studio) or another provider. The API key is NOT stored here — set it with `ok embeddings set-key` (`~/.ok/secrets.yml`); it is sent to whichever endpoint this names."}).default(ef),model:P().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Embeddings model id (default text-embedding-3-small). Must be served by the provider at baseUrl. Changing it re-embeds the corpus (the cache is keyed by provider + model + dimensions).`}).default(tf),dimensions:F().int().positive().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Optional output vector dimensions. Omit (recommended) to detect the model's native size from its first response — that is what lets a non-OpenAI model work without knowing its size up front. Set a smaller value (text-embedding-3 supports e.g. 512 / 1024) to shrink the on-disk cache, trading a little retrieval quality; a server that ignores the request param then fails loudly instead of silently. Changing it re-embeds the corpus.`}).optional(),similarityFloor:F().min(0).max(1).register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Optional hard cutoff: drop any "by meaning" match whose cosine similarity is below this value. Off by default (0) because retrieval is rank-based (the closest pages are returned regardless of absolute score) and the right cutoff is model-specific. Set it only to suppress weak matches for a specific provider/model whose cosine scale you know. Most setups should leave it unset and rely on the result-count cap.`}).optional()}).default({enabled:!1,baseUrl:ef,model:tf})}).default({semantic:{enabled:!1,baseUrl:ef,model:tf}}),contentRules:z({markdownlint:R({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Whether the markdownlint plugin (body rules) contributes diagnostics.`}).default(!1)}).default({enabled:!1}),frontmatter:R({enabled:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Whether the frontmatter plugin (JSON-Schema validation of document frontmatter) contributes diagnostics.`}).default(!1),schemas:L(R({appliesTo:so([P(),L(P())]).optional(),file:P(),enabled:I().optional()})).register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Frontmatter schema mappings: which docs (appliesTo globs) validate against which JSON Schema file (project-root-relative path).`}).default([])}).default({enabled:!1,schemas:[]})}).default({markdownlint:{enabled:!1},frontmatter:{enabled:!1,schemas:[]}}),validation:z({links:B(Od).register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`How broken internal links are reported on the validation plane: 'off' hides them, 'warning' (default) or 'error' sets their severity.`}).default(kd),fileTreeIndicators:I().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Whether the file tree tints and badges files that have validation problems.`}).default(!0)}).default({links:kd,fileTreeIndicators:!0}),linkPreviews:z({enabled:I().register(H,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show a rich preview card (site name, page title, description, favicon) when you hover an external link in the editor. When ON, hovering an external link sends that link's URL to the destination site to fetch its preview metadata — outbound egress, one request per previewed link. Default ON; set to false to turn external previews off. Per-machine (project-local) — not shared with collaborators. Previews of links to other documents in this project are read from the local index with no network request and are always on.`}).default(!0)}).default({enabled:!0}),remote:z({url:P().register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:"Public URL your tunnel gives you, e.g. https://myproject.ngrok.app. Used only with `ok start --remote` (config alone never enables remote access); its host is admitted through the Host-header allowlist. There is no server-side auth, so restrict access at the tunnel (ngrok OAuth, Cloudflare Access, Tailscale ACLs)."}).optional(),port:F().int().min(1).max(65535).register(H,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`TCP port the server binds when remote access is enabled (default 24550). Fixed so the tunnel's port mapping survives restarts. Set it only on a conflict. An explicit --port still wins; the PORT env var is ignored in remote mode.`}).default(24550)}).default({port:24550})}),cf=`open-knowledge-config`;function lf(e,t,n){let r=c.getTracer(cf),i=t?{attributes:t}:{};return r.startActiveSpan(e,i,e=>{try{return n(e)}catch(t){throw e.recordException(t),e.setStatus({code:s.ERROR,message:t instanceof Error?t.message:String(t)}),t}finally{e.end()}})}function uf(e,t){let n=c.getActiveSpan();n&&n.addEvent(e,t)}function df(e){let t=e;for(let e=0;e<16;e++){if(t==null||t?._zod?.def?.shape!==void 0)return t;let e=t?._zod?.def?.innerType;if(e===void 0)return t;t=e}return t}function ff(e,t){let n=e;for(let e of t){n=df(n);let t=n?._zod?.def?.shape;if(!t||(n=t[String(e)],n===void 0))return}return n}function pf(e,t){let n=ff(e,t);if(n!==void 0)return Jd(n)}function mf(e,t){return e===`either`?!0:e===t}function hf(e,t){let n=null;function r(e,i){if(n!==null||e===void 0)return;if(typeof e==`object`&&e&&!Array.isArray(e)){for(let[t,a]of Object.entries(e))if(r(a,[...i,t]),n!==null)return;return}let a=pf(sf,i);a?.scope!==void 0&&(mf(a.scope,t)||(n={code:`SCOPE_VIOLATION`,path:i,expectedScope:a.scope,actualScope:t}))}for(let[t,i]of Object.entries(e))if(r(i,[t]),n!==null)break;return n}function gf(e,t){for(let n=1;n<t.length;n++){let r=t.slice(0,n);e.hasIn(r)&&(ns(e.getIn(r,!0))||e.deleteIn(r))}}function _f(e,t){let n=[];function r(t,i){if(t!==void 0){if(t===null){e.deleteIn(i),n.push(i.join(`.`));return}if(Array.isArray(t)){gf(e,i),e.setIn(i,t),n.push(i.join(`.`));return}if(typeof t==`object`){for(let[e,n]of Object.entries(t))r(n,[...i,e]);return}gf(e,i),e.setIn(i,t),n.push(i.join(`.`))}}for(let[e,n]of Object.entries(t))r(n,[e]);return n}function vf(e){return{path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message,issueCode:e.code}}var yf=R({file:P(),line:F().int().min(1),column:F().int().min(1),snippet:P().optional()}),bf=R({path:L(so([P(),F()])),message:P(),issueCode:P(),params:uo(P(),io()).optional(),source:yf.optional()}),xf=B([`user`,`project`,`project-local`,`either`]),Sf=B([`user`,`project`,`project-local`]),Cf=co(`code`,[R({code:V(`YAML_PARSE`),detail:P()}),R({code:V(`SCHEMA_INVALID`),issues:L(bf)}),R({code:V(`SCOPE_VIOLATION`),path:L(P()),expectedScope:xf,actualScope:Sf}),R({code:V(`NOT_AGENT_SETTABLE`),path:L(P())}),R({code:V(`MIXED_SCOPE`),paths:L(R({path:L(P()),scope:Sf}))}),R({code:V(`REMOVED_KEY`),path:L(P()),redirect:P(),source:yf.optional()}),R({code:V(`WRITE_ERROR`),detail:P()}),R({code:V(`OKIGNORE_INVALID`),detail:P(),lineNumber:F().int().min(1).optional()}),R({code:V(`UNKNOWN`),message:P().optional()})]),wf=new Set(Cf.options.map(e=>e.shape.code.value)),Tf=so([Cf,z({code:P(),message:P().optional()})]);function Ef(e){return wf.has(e.code)}function Df(e){switch(e){case`user`:return`~/.ok/global.yml`;case`project`:return`.ok/config.yml`;case`project-local`:return`.ok/local/config.yml`;case`either`:return`.ok/config.yml or ~/.ok/global.yml`}}function Of(e){switch(e){case`user`:return`personal to you, across all projects`;case`project`:return`shared with your team via git`;case`project-local`:return`this machine only, not shared`;case`either`:return`user or project`}}function kf(e){if(!Ef(e))return e.message??`Unknown error (${e.code}).`;switch(e.code){case`YAML_PARSE`:return`Failed to parse YAML: ${e.detail}`;case`SCHEMA_INVALID`:{if(e.issues.length===0)return`Invalid configuration.`;let t=new Map;for(let n of e.issues){let e=n.source?.file??`<no source>`,r=t.get(e)??[];r.push(n),t.set(e,r)}let n=[];for(let[e,r]of t){e===`<no source>`?n.push(`Invalid configuration:`):n.push(`Invalid configuration at ${e}:`);for(let t of r){let r=t.path.length===0?`<root>`:t.path.join(`.`);if(t.source){if(n.push(` ${e}:${t.source.line}:${t.source.column}`),n.push(` ${r}: ${t.message}`),t.source.snippet&&t.source.snippet.length>0)for(let e of t.source.snippet.split(`
172
172
  `))n.push(` ${e}`)}else n.push(` ${r}: ${t.message}`)}}return n.join(`
173
173
  `)}case`SCOPE_VIOLATION`:return[`Setting ${e.path.join(`.`)} belongs in your ${e.expectedScope} config`,`(${Df(e.expectedScope)} — ${Of(e.expectedScope)}),`,`but it was set in the ${e.actualScope} config (${Df(e.actualScope)}).`,`Move it to ${Df(e.expectedScope)}.`].join(` `);case`NOT_AGENT_SETTABLE`:return[`Setting ${e.path.join(`.`)} is human-only and can't be changed by an agent.`,`Change it in the Settings pane, or edit the config.yml by hand.`].join(` `);case`MIXED_SCOPE`:return[`This change touches settings that live in different config files. Apply them one file at a time:`,e.paths.map(({path:e,scope:t})=>` ${e.join(`.`)} → ${Df(t)} (${t})`).join(`
174
174
  `)].join(`
@@ -567,7 +567,7 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
567
567
  ]|$)`};return delete t._compiled,t});let i;try{i=e.safe(Mre(t),n)}finally{e.unsafe=r}return i=i.replaceAll(z5,`\\&`),kre(Ire(i,n))}var V5=1,Nre=2;function H5(e){if(Number.isNaN(e))return`ws`;let t=m(e);return t===V5?`ws`:t===Nre?`punct`:`other`}function Pre(e,t,n){let r=H5(t),i=H5(n),a=i!==`ws`&&(i===`other`||r!==`other`),o=r!==`ws`&&(r===`other`||i!==`other`);return e===`_`?a&&(!o||r===`punct`)||o&&(!a||i===`punct`):a||o}function Fre(e,t,n){let r=t;for(;r<e.length&&(e[r]===` `||e[r]===` `);)r++;if(r<e.length)return e[r]===`
568
568
  `||e[r]===`\r`;let i=n.after.charCodeAt(0);return Number.isNaN(i)||i===10||i===13}function Ire(e,t){let n=``,r=0;for(;r<e.length;){let i=e.charAt(r);if(i===`\\`){n+=e.slice(r,r+2),r+=2;continue}if(i===`*`||i===`_`||i===`~`||i===`=`){let a=r+1;for(;a<e.length&&e.charAt(a)===i;)a++;let o=r===0?t.before.charCodeAt(t.before.length-1):e.charCodeAt(r-1);if(i===`=`)n+=(Number.isNaN(o)||o===10||o===13)&&Fre(e,a,t)?`\\${e.slice(r,a)}`:e.slice(r,a);else{let s=a<e.length?e.charCodeAt(a):t.after.charCodeAt(0);n+=Pre(i,o,s)?`\\${i}`.repeat(a-r):e.slice(r,a)}r=a;continue}n+=i,r+=1}return n}function U5(e,t,n){let r=n.startsWith(`_`)?`_`:`*`,i=t.before??``,a=t.after??``,o=e,s=o.charCodeAt(0);W5(i.charCodeAt(i.length-1),s,r)&&(o=G5(s)+o.slice(1));let c=o.charCodeAt(o.length-1);return W5(a.charCodeAt(0),c,r)&&(o=o.slice(0,-1)+G5(c)),o}function W5(e,t,n){return!(m(t)!==V5||n===`_`&&m(e)===void 0)}function G5(e){return`&#x${e.toString(16).toUpperCase()};`}function Lre(e,t,n,r){let i=e.value??``,a=e.data?.sourceDelimiter,o=typeof a==`string`&&/^\$+$/.test(a)?a.length:2;for(o===1&&!zre(i,r)&&(o=2);RegExp(`(^|[^$])${`\\$`.repeat(o)}([^$]|$)`).test(i);)o++;let s=`$`.repeat(o);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` ${i} `);let c=-1;for(;++c<n.unsafe.length;){let e=n.unsafe[c];if(!e.atBreak)continue;let t=n.compilePattern(e),r;for(;(r=t.exec(i))!==null;){let e=r.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=`${i.slice(0,e)} ${i.slice(r.index+1)}`}}return s+i+s}function Rre(e,t,n,r){let i=e.data?.sourceDelimiter===`~`?`~`:`~~`,a=n.createTracker(r),o=n.enter(`strikethrough`),s=a.move(i);return s+=U5(n.containerPhrasing(e,{...a.current(),before:s,after:`~`}),r,i),s+=a.move(i),o(),s}function zre(e,t){return!(e.length===0||!/^\S/.test(e)||!/\S$/.test(e)||/[$\r\n]/.test(e)||e.endsWith(`\\`)||/\\[!-/:-@[-`{-~]/.test(e)||/^\d/.test(t.after)||t.before.endsWith(`\\`))}function K5(e){if(!Number.isFinite(e)||e<0)return``;if(e<1024)return`${e} B`;let t=[`KiB`,`MiB`,`GiB`,`TiB`],n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(1).replace(/\.0$/,``)} ${t[r]}`}var Bre=class{schema;handlers;pmNodeHandlers;pmMarkHandlers;parseProcessor;serializeProcessor;parseCtx={current:{}};freshnessHolder={checker:void 0};constructor(e){this.schema=AC(e.extensions),this.handlers=Kre(this.schema,this.parseCtx),this.freshnessHolder.checker=e.deriveStructuralFreshness?T2({parse:e=>this.parseWithFallback(e)}):void 0;let{nodeHandlers:t,markHandlers:n}=qre(this.schema,this.freshnessHolder);this.pmNodeHandlers=t,this.pmMarkHandlers=n,this.parseProcessor=pre({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers}),this.serializeProcessor=mre({toMarkdownHandlers:Dre})}parse(e,t){if(!e.trim())return{type:`doc`,content:[{type:`paragraph`,content:[]}]};this.parseCtx.current=t??{};try{return gre(e,this.parseProcessor).toJSON()}finally{this.parseCtx.current={}}}parseToMdast(e){return e.trim()?_re(e,this.parseProcessor):{type:`root`,children:[]}}parseToEditorMdast(e){return e.trim()?vre(e,this.parseProcessor):{type:`root`,children:[]}}parseWithFallback(e,t){return e.trim()?U4(e,{parse:e=>this.parse(e,t)}):{type:`doc`,content:[{type:`paragraph`,content:[]}]}}serialize(e,t){let n;try{n=this.schema.nodeFromJSON(e)}catch(t){let n=`MarkdownManager.serialize() failed: schema rejected JSONContent (type=${e.type}, childCount=${e.content?.length??0})`;throw Error(n,{cause:t})}let r=this.freshnessHolder.checker;t?.skipFreshnessDerive&&(this.freshnessHolder.checker=void 0);try{return yre(n,this.serializeProcessor,{schema:this.schema,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers})}finally{this.freshnessHolder.checker=r}}},q5=v4();function Vre(e,t){let n=new Map;for(let e of t)n.set(e.name,e);let r={};for(let t of e){if(t.type===`mdxJsxExpressionAttribute`)continue;let e=t.name,i=n.get(e);if(t.value===null||t.value===void 0){r[e]=!0;continue}if(typeof t.value==`string`){if(i?.type===`number`){let n=Number(t.value);r[e]=Number.isNaN(n)?t.value:n}else i?.type===`boolean`?r[e]=t.value===`true`:r[e]=t.value;continue}let a=t.value.value;try{r[e]=JSON.parse(a)}catch{r[e]=a}}return r}function Hre(e){let t=!1;return e.descendants(e=>t||e.type.name===`jsxInline`?!1:e.type.name===`jsxComponent`&&e.attrs.sourceDirty?(t=!0,!1):!0),t}function Ure(e,t){return e.attrs.sourceDirty||Hre(e)?!0:t?t.isDiverged(e.toJSON()):!1}function Wre(e){if(e.type!==`paragraph`)return!1;let t=e.children??[];return t.length===0?!0:t.every(e=>e.type===`text`&&e.value===``)}function J5(e,t){if(!t)return e;let n={};return t.sourceFenceChar&&(n.sourceFenceChar=t.sourceFenceChar),typeof t.sourceFenceLength==`number`&&(n.sourceFenceLength=t.sourceFenceLength),t.sourcePadded===!0&&(n.sourcePadded=!0),Object.keys(n).length===0?e:{...e,data:n}}function Y5(e,t){if(e.length===0)return J5({type:`inlineCode`,value:``},t);if(e.every(e=>e.type===`text`))return J5({type:`inlineCode`,value:e.map(e=>e.value).join(``)},t);if(e.length===1&&`children`in e[0]){let n=e[0];return{...n,children:[Y5(n.children,t)]}}return J5({type:`inlineCode`,value:X5(e)},t)}function X5(e){let t=``;for(let n of e)n.type===`text`?t+=n.value:`children`in n&&Array.isArray(n.children)?t+=X5(n.children):`value`in n&&typeof n.value==`string`&&(t+=n.value);return t}var Gre=rd;function Kre(e,t){let n=e.nodes,r=e.marks,i={};n.paragraph&&(i.paragraph=(e,t,r)=>{let i=r.all(e).flat(),a=i.some(e=>e?.isBlock&&!e?.isInline),o=i.some(e=>e?.isInline||e?.isText||e?.isTextblock);if(a&&!o)return i.length===1?i[0]:i;if(a&&o){let e=i.filter(e=>!e?.isBlock||e?.isInline),t=i.filter(e=>e?.isBlock&&!e?.isInline),r=[],a=n.paragraph.createAndFill(null,e.length>0?e:null);return a&&r.push(a),r.push(...t),r.length===1?r[0]:r}return n.paragraph.createAndFill(null,i.length>0?i:null)}),n.blockquote&&(i.blockquote=SP(n.blockquote,e=>({sourceMarkerSpacings:e.data?.sourceMarkerSpacings??null}))),n.tableCell&&(i.tableCell=(e=>(t,r,i)=>{let a=i.all(t).flat();if(a.length>0&&n.paragraph){let t=n.paragraph.create(null,a);return e.createAndFill(null,[t])}return e.createAndFill(null,null)})(n.tableCell)),n.tableRow&&(i.tableRow=SP(n.tableRow)),n.table&&n.tableRow&&n.tableCell&&(i.table=(e,t,r)=>{let i=e.align??[],a=e.children??[],o=[];for(let e=0;e<a.length;e++){let t=a[e];if(t.type!==`tableRow`)continue;let s=t.children??[],c=[];for(let t=0;t<s.length;t++){let a=s[t];if(a.type!==`tableCell`)continue;let o=r.all(a).flat(),l=o.length>0&&n.paragraph?[n.paragraph.create(null,o)]:null,u=i[t]??null,d=e===0&&n.tableHeader?n.tableHeader:n.tableCell,f=a.data?.sourcePadding??null,p=d.createAndFill({align:u,sourcePadding:f},l);p&&c.push(p)}let l=n.tableRow.createAndFill(null,c.length>0?c:null);l&&o.push(l)}let s=e.data?.sourceDashCounts??null,c=e.data?.sourceOuterPipes??null,l=e.data?.sourceAlignmentPadding??null;return n.table.createAndFill({sourceDashCounts:s,sourceOuterPipes:c,sourceAlignmentPadding:l},o.length>0?o:null)}),n.image&&(i.image=e=>{let r=e.url??``,i=P5(r,t.current.sourcePath);return n.image.createAndFill({src:i,alt:e.alt??null,title:e.title??null,sourceUrl:i===r?null:r})},n.imageReference?i.imageReference=e=>n.imageReference.createAndFill({alt:e.alt??``,label:e.label??e.identifier??``,identifier:e.identifier??``,referenceType:e.referenceType??`shortcut`}):i.imageReference=e=>n.image.createAndFill({src:``,alt:e.alt??null,title:null})),r.escapeMark&&(i.text=t=>{let n=t.value??``,i=typeof t.data?.sourceRaw==`string`?t.data.sourceRaw:null;if(!n&&!i)return null;if(i)return r.sourceLiteral?e.text(n,[r.sourceLiteral.create({sourceRaw:i})]):e.text(n);let a=t.data?.escapedChars,o=t.data?.entityRefSpans;if(!a?.length&&!o?.length)return e.text(n);let s=[...(a??[]).map(e=>({kind:`escape`,offset:e.offset,length:1})),...(o??[]).map(e=>({kind:`entity`,offset:e.offset,length:e.length,raw:e.raw}))];s.sort((e,t)=>e.offset-t.offset);let c=[];for(let e of s){let t=c[c.length-1];e.kind===`entity`&&t?.kind===`entity`&&t.offset+t.length===e.offset&&OQ(t.raw)!==null&&TQ(e.raw)?c[c.length-1]={kind:`entity`,offset:t.offset,length:t.length+e.length,raw:t.raw+e.raw}:c.push(e)}let l=[],u=0;for(let t of c){if(t.offset>u){let r=n.slice(u,t.offset);r&&l.push(e.text(r))}if(t.offset<n.length){let i=n.slice(t.offset,t.offset+t.length);if(i)if(t.kind===`escape`)l.push(e.text(i,[r.escapeMark.create()]));else if(r.sourceLiteral){let n=OQ(t.raw);l.push(e.text(n??i,[r.sourceLiteral.create({sourceRaw:t.raw})]))}else l.push(e.text(i));u=t.offset+t.length}}if(u<n.length){let t=n.slice(u);t&&l.push(e.text(t))}return l.length===1?l[0]:l}),r.code&&(i.inlineCode=t=>e.text(t.value,[r.code.create({sourceFenceChar:t.data?.sourceFenceChar??"`",sourceFenceLength:typeof t.data?.sourceFenceLength==`number`?t.data.sourceFenceLength:1,sourcePadded:t.data?.sourcePadded===!0})]));let a=r.strike??r.delete;if(a&&(i.delete=CP(a,e=>({sourceDelimiter:e.data?.sourceDelimiter===`~`?`~`:`~~`}))),r.highlight&&(i.mark=CP(r.highlight)),r.underline&&(i.underline=CP(r.underline,e=>({sourceForm:e.data?.sourceForm===`ins`?`ins`:`u`}))),r.comment&&(i.comment=CP(r.comment,e=>({sourceForm:e.data?.sourceForm??`percent`}))),n.commentBlock&&(i.commentBlock=SP(n.commentBlock,e=>({sourceForm:e.data?.sourceForm??`percent`,sourceLayout:e.data?.sourceLayout??`block`}))),r.emphasis&&(i.emphasis=CP(r.emphasis,e=>({sourceDelimiter:e.data?.sourceDelimiter??`*`}))),r.strong&&(i.strong=CP(r.strong,e=>({sourceDelimiter:e.data?.sourceDelimiter??`**`}))),n.heading&&(i.heading=SP(n.heading,e=>({level:e.depth,headingStyle:e.data?.sourceStyle??`atx`,sourceTrailingHashes:e.data?.sourceTrailingHashes??null,sourceUnderlineLength:e.data?.sourceUnderlineLength??null,sourceContiguousNext:e.data?.sourceContiguousNext??!1,sourceLeadingIndent:e.data?.sourceLeadingIndent??null,sourceInteriorSpacing:e.data?.sourceInteriorSpacing??null}))),n.codeBlock&&(i.code=t=>{let r=t.value?[e.text(t.value)]:[];return n.codeBlock.createAndFill({language:t.lang??null,meta:t.meta??null,fenceDelimiter:t.data?.sourceFenceChar??"`",fenceLength:t.data?.sourceFenceLength??3,sourceStyle:t.data?.sourceStyle??`fenced`,sourceClosingFenceLength:t.data?.sourceClosingFenceLength??null,sourceUnclosedFence:t.data?.sourceUnclosedFence??!1,sourceFenceIndent:t.data?.sourceFenceIndent??null,sourceInfoPadding:t.data?.sourceInfoPadding??null,sourceIndents:t.data?.sourceIndents??null},r)}),n.thematicBreak&&(i.thematicBreak=e=>n.thematicBreak.createAndFill({sourceRaw:e.data?.sourceRaw??`---`})),n.hardBreak&&(i.break=e=>n.hardBreak.createAndFill({hardBreakStyle:e.data?.sourceStyle??`spaces`,sourceRaw:e.data?.sourceRaw??null})),n.list&&(i.list=SP(n.list,e=>({ordered:!!e.ordered,start:e.start??1,spread:!!e.spread,bulletMarker:e.data?.bulletMarker??null,listMarkerDelimiter:e.data?.listMarkerDelimiter??null}))),n.listItem&&(i.listItem=SP(n.listItem,e=>({checked:e.checked??null,spread:!!e.spread,sourceMarkerSpacing:e.data?.sourceMarkerSpacing??null,sourceOrdinal:e.data?.sourceOrdinal??null,sourceCheckboxChar:e.data?.sourceCheckboxChar??null,sourceContinuationIndent:e.data?.sourceContinuationIndent??null}))),r.link){let t=r.sourceLiteral;i.link=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[](${n.url??``})`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:n.url??``,title:n.title??null,linkStyle:n.data?.sourceStyle??`inline`,refLabel:null,sourceUrlForm:n.data?.sourceUrlForm??null,sourceTitleMarker:n.data?.sourceTitleMarker??null});return o.map(e=>e.mark(s.addToSet(e.marks)))},i.linkReference=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[${n.label??``}][${n.identifier??``}]`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:``,title:null,linkStyle:n.referenceType??`shortcut`,refLabel:n.label??n.identifier??null});return o.map(e=>e.mark(s.addToSet(e.marks)))}}n.htmlBlock&&(i.html=e=>n.htmlBlock.createAndFill({content:e.value??``}));let o=n.linkDefinition??n.linkRefDef;if(o){let e=!!o.spec.attrs?.url,t=!!o.spec.attrs?.href,n=!!o.spec.attrs?.identifier,r=!!o.spec.attrs?.sourceLayout,a=!!o.spec.attrs?.sourceTitleMarker;i.definition=i=>{let s={title:i.title??null};return n&&(s.identifier=i.identifier??``),s.label=i.label??i.identifier??``,e?s.url=i.url??``:t&&(s.href=i.url??``),r&&(s.sourceLayout=i.data?.sourceLayout??null),a&&(s.sourceTitleMarker=i.data?.sourceTitleMarker??null),o.createAndFill(s)}}if(n.jsxComponent){let r=e=>{if(e&&typeof e==`object`&&`sourceRaw`in e){let t=e.sourceRaw;if(typeof t==`string`)return t}};i.mdxJsxFlowElement=(e,i,a)=>{let o=e.name??``,s=q5.getOrWildcard(o),c=Vre(e.attributes,s.props);if(o===`CommonMarkImage`&&typeof c.src==`string`){let e=c.src,n=P5(e,t.current.sourcePath);n!==e&&(c.src=n,c.sourceUrl=e)}let l=a.all(e).flat();return n.jsxComponent.createAndFill({componentName:o,kind:`element`,attributes:e.attributes,sourceRaw:r(e.data)??``,sourceDirty:!1,props:c},l.length?l:void 0)};let a=(e,t)=>{let n=e.attributes?.find(e=>e.type===`mdxJsxAttribute`&&e.name===t);return n&&typeof n.value==`string`?n.value:null};i.mdxJsxTextElement=t=>{if(t.name===`InlineMath`&&n.mathInline){let e=a(t,`formula`)??``,r=a(t,`id`);return n.mathInline.create({formula:e,id:r??null})}if(t.name===`Tag`&&n.tag){let e=a(t,`value`)??``;return n.tag.create({value:e})}if(n.jsxInline){let i=r(t.data)??``;return n.jsxInline.createAndFill({},i?[e.text(i)]:null)}return n.jsxComponent.createAndFill({sourceRaw:r(t.data)??``})},i.mdxFlowExpression=e=>{let t=r(e.data)??`{${e.value??``}}`;return n.jsxComponent.createAndFill({kind:`expression`,sourceRaw:t,sourceDirty:!1})},i.mdxTextExpression=t=>{let n=r(t.data)??`{${t.value??``}}`;return e.text(n)}}return n.wikiLink&&(i.wikiLink=e=>n.wikiLink.createAndFill({target:e.data?.target??``,alias:e.data?.alias??null,anchor:e.data?.anchor??null,sourceTarget:e.data?.sourceTarget??null,sourceAnchor:e.data?.sourceAnchor??null,sourceAlias:e.data?.sourceAlias??null})),n.tag&&(i.tag=e=>n.tag.createAndFill({value:e.value})),n.wikiLinkEmbed&&(i.wikiLinkEmbed=(i,a)=>{let o=i.data?.target??``,s=i.data?.alias??null,c=i.data?.anchor??null,l=KQ(o),{resolveEmbed:u,sourcePath:d}=t.current,f=u&&d?u(o,d)??null:null,p=f?`/${f}`:o,m=a?.type===`paragraph`&&Array.isArray(a.children)&&a.children.length===1;if(m&&Gre.has(l)&&n.jsxComponent&&q5.has(`WikiEmbedImage`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedImage`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,alt:s??o,target:o,anchor:c,alias:s}});if(m&&id.has(l)&&n.jsxComponent&&q5.has(`WikiEmbedVideo`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedVideo`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,title:s??o,target:o,anchor:c,alias:s}});if(m&&od.has(l)&&n.jsxComponent&&q5.has(`WikiEmbedAudio`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedAudio`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,title:s??o,target:o,anchor:c,alias:s}});if(m&&sd.has(l)&&n.jsxComponent&&q5.has(`WikiEmbedFile`)){let{resolveSize:e}=t.current,r=e&&d?e(o,d)??null:null,i=r===null?null:K5(r);return n.jsxComponent.createAndFill({componentName:`WikiEmbedFile`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,target:o,anchor:c,alias:s,size:i}})}let h=s||(c?`${o}#${c}`:o);if(r.link){let t=r.link.create({href:p,title:null,linkStyle:`inline`,refLabel:null,sourceForm:`wikiembed`,target:o,anchor:c,alias:s});return e.text(h,[t])}throw Error("[wikiLinkEmbed handler] schema lacks `link` mark — cannot dispatch without violating the STOP rule against emitting PM wikiLinkEmbed server-side")}),n.mathInline&&(i.inlineMath=e=>n.mathInline.create({formula:e.value??``,sourceDelimiter:e.data?.sourceDelimiter??null})),i.math||=t=>{let r=t.value==null?`«unknown:${t.type}»`:t.value;return n.rawMdxFallback?(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled block mdast: ${t.type}`})),n.rawMdxFallback.createAndFill({reason:`Unhandled block mdast: ${t.type}`},r?[e.text(r)]:null)):null},i.inlineMath||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled inline mdast: ${t.type}`})),t.value==null?e.text(`«unknown:${t.type}»`):e.text(t.value)),n.footnoteReference?i.footnoteReference=e=>n.footnoteReference.create({identifier:e.identifier,label:e.label??e.identifier}):i.footnoteReference||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteReference`,reason:`FootnoteReference extension missing — recovering [^id] source`})),e.text(`[^${t.label??t.identifier}]`)),n.footnoteDefinition?i.footnoteDefinition=SP(n.footnoteDefinition,e=>{let t=e;return{identifier:t.identifier,label:t.label??t.identifier}}):i.footnoteDefinition||=t=>{console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteDefinition`,reason:`FootnoteDefinition extension missing — recovering [^id]: marker`}));let r=`[^${t.label??t.identifier}]: `;return n.paragraph?n.paragraph.create(null,e.text(r)):null},i.rawMdxFallbackMdast=t=>{if(!n.rawMdxFallback)return null;let r=t.position?{start:t.position.start?.offset??0,end:t.position.end?.offset??0}:{start:0,end:0};return console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.originalType,reason:`Unhandled mdast: ${t.originalType}`,unresolvedPosition:t.unresolvedPosition??!1})),n.rawMdxFallback.createAndFill({reason:`Unhandled mdast: ${t.originalType}`,originalSpan:r},t.value?[e.text(t.value)]:null)},i}function qre(e,t){let n={},r={},i=e.nodes,a=e.marks;i.paragraph&&(n.paragraph=OP(`paragraph`)),i.blockquote&&(n.blockquote=OP(`blockquote`,e=>{let t=e.attrs.sourceMarkerSpacings,n={};return Array.isArray(t)&&t.length>0&&(n.sourceMarkerSpacings=t),Object.keys(n).length>0?{data:n}:{}})),i.heading&&(n.heading=OP(`heading`,e=>({depth:e.attrs.level,data:{sourceStyle:e.attrs.headingStyle,sourceTrailingHashes:e.attrs.sourceTrailingHashes??void 0,sourceUnderlineLength:e.attrs.sourceUnderlineLength??void 0,sourceContiguousNext:e.attrs.sourceContiguousNext===!0?!0:void 0,sourceLeadingIndent:e.attrs.sourceLeadingIndent??void 0,sourceInteriorSpacing:e.attrs.sourceInteriorSpacing??void 0}}))),i.codeBlock&&(n.codeBlock=e=>{let t=e.attrs.sourceStyle===`indented`?`indented`:`fenced`;return{type:`code`,lang:t===`indented`?null:e.attrs.language??null,meta:t===`indented`?null:e.attrs.meta??null,value:e.textContent??``,data:{sourceFenceChar:e.attrs.fenceDelimiter,sourceFenceLength:e.attrs.fenceLength,sourceStyle:t,sourceClosingFenceLength:e.attrs.sourceClosingFenceLength??void 0,sourceUnclosedFence:e.attrs.sourceUnclosedFence===!0?!0:void 0,sourceFenceIndent:e.attrs.sourceFenceIndent??void 0,sourceInfoPadding:e.attrs.sourceInfoPadding??void 0,sourceIndents:e.attrs.sourceIndents??void 0}}}),i.thematicBreak&&(n.thematicBreak=e=>({type:`thematicBreak`,data:{sourceRaw:e.attrs.sourceRaw}})),i.hardBreak&&(n.hardBreak=e=>({type:`break`,data:{sourceStyle:e.attrs.hardBreakStyle,...typeof e.attrs.sourceRaw==`string`&&e.attrs.sourceRaw.length>0?{sourceRaw:e.attrs.sourceRaw}:{}}})),i.list&&(n.list=OP(`list`,e=>({ordered:e.attrs.ordered??!1,start:e.attrs.ordered?e.attrs.start??1:null,spread:e.attrs.spread??!1,data:{bulletMarker:e.attrs.bulletMarker,listMarkerDelimiter:e.attrs.listMarkerDelimiter}}))),i.listItem&&(n.listItem=(e,t,n)=>{let r=n.all(e),i=r.length>1&&Wre(r[0])?r.slice(1):r,a={};return typeof e.attrs.sourceMarkerSpacing==`number`&&(a.sourceMarkerSpacing=e.attrs.sourceMarkerSpacing),typeof e.attrs.sourceOrdinal==`number`&&(a.sourceOrdinal=e.attrs.sourceOrdinal),e.attrs.sourceCheckboxChar===`X`&&(a.sourceCheckboxChar=`X`),typeof e.attrs.sourceContinuationIndent==`number`&&(a.sourceContinuationIndent=e.attrs.sourceContinuationIndent),{type:`listItem`,checked:e.attrs.checked??null,spread:e.attrs.spread??!1,...Object.keys(a).length>0?{data:a}:{},children:i}}),i.table&&(n.table=(e,t,n)=>{let r=n.all(e),i=[],a=e.firstChild;a&&a.forEach(e=>{let t=e.attrs.align;i.push(t===`left`||t===`right`||t===`center`?t:null)});let o=r.filter(e=>e.type===`tableRow`),s=e.attrs.sourceDashCounts,c={};Array.isArray(s)&&s.length>0&&(c.sourceDashCounts=s);let l=e.attrs.sourceOuterPipes;typeof l==`object`&&l&&typeof l.leading==`boolean`&&typeof l.trailing==`boolean`&&(c.sourceOuterPipes=l);let u=e.attrs.sourceAlignmentPadding;Array.isArray(u)&&u.length>0&&(c.sourceAlignmentPadding=u);let d=Object.keys(c).length>0?c:void 0,f={type:`table`,align:i,children:o};return d&&(f.data=d),f}),i.tableRow&&(n.tableRow=OP(`tableRow`));let o=(e,t)=>{let n={type:`tableCell`,children:V0(t)},r=e.attrs.sourcePadding;return typeof r==`object`&&r&&typeof r.left==`number`&&typeof r.right==`number`&&(n.data={sourcePadding:r}),n};if(i.tableCell&&(n.tableCell=(e,t,n)=>o(e,n.all(e))),i.tableHeader&&(n.tableHeader=(e,t,n)=>o(e,n.all(e))),i.image&&(n.image=e=>({type:`image`,url:e.attrs.sourceUrl??e.attrs.src,alt:e.attrs.alt,title:e.attrs.title})),i.imageReference&&(n.imageReference=e=>{let t=e.attrs.label??``,n=e.attrs.identifier??t;return{type:`imageReference`,alt:e.attrs.alt??``,identifier:n,label:t||n,referenceType:e.attrs.referenceType??`shortcut`}}),i.htmlBlock&&(n.htmlBlock=e=>({type:`html`,value:e.attrs.content})),i.linkDefinition??i.linkRefDef){let e=i.linkDefinition?`linkDefinition`:`linkRefDef`;n[e]=e=>{let t={},n=e.attrs.sourceLayout;(n===`multiline`||n===`inline`)&&(t.sourceLayout=n);let r=e.attrs.sourceTitleMarker;(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r);let i={type:`definition`,identifier:e.attrs.identifier??e.attrs.label??``,label:e.attrs.label??e.attrs.identifier??``,url:e.attrs.url??e.attrs.href??``,title:e.attrs.title};return Object.keys(t).length>0&&(i.data=t),i}}if(i.jsxComponent&&(n.jsxComponent=(e,n,r)=>{if(e.attrs.kind===`expression`)return{type:`html`,value:e.attrs.sourceRaw??``};let i=e.attrs.componentName||null,a=Array.isArray(e.attrs.attributes)?e.attrs.attributes:[];return!Ure(e,t.checker)&&e.attrs.sourceRaw?{type:`mdxJsxFlowElement`,name:i,attributes:a,children:[],data:{sourceRaw:String(e.attrs.sourceRaw)}}:q5.getOrWildcard(i??`*`).serialize(e,{all:e=>r.all(e),registry:q5,serializeChildren:()=>{throw Error(`SerializeContext.serializeChildren is not available in the PM→mdast handler. Compat descriptors that need markdown-byte body rendering must emit a marker mdast node and let the to-markdown handler render the body via state.containerFlow.`)}})}),i.rawMdxFallback&&(n.rawMdxFallback=e=>{let t=e.textContent??``,n=typeof e.attrs.reason==`string`?e.attrs.reason:``,r=e.attrs.originalSpan;return{type:`rawMdxFallback`,value:t,data:{reason:n,originalSpan:r&&typeof r==`object`&&`start`in r&&`end`in r?{start:Number(r.start)||0,end:Number(r.end)||0}:{start:0,end:0}}}}),i.jsxInline&&(n.jsxInline=e=>{let t=e.attrs.sourceRaw||e.textContent||``;return{type:`mdxJsxTextElement`,name:null,attributes:[],children:[],data:{sourceRaw:String(t)}}}),i.mathInline&&(n.mathInline=e=>{let t=e.attrs.formula??``,n=e.attrs.id;if(typeof n==`string`&&n.length>0)return{type:`mdxJsxTextElement`,name:`InlineMath`,attributes:[{type:`mdxJsxAttribute`,name:`formula`,value:t},{type:`mdxJsxAttribute`,name:`id`,value:n}],children:[]};let r=e.attrs.sourceDelimiter;return{type:`inlineMath`,value:t,...typeof r==`string`&&r.length>0?{data:{sourceDelimiter:r}}:{}}}),i.wikiLink&&(n.wikiLink=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLink`,value:i,data:{target:t,anchor:n,alias:r,sourceTarget:typeof e.attrs.sourceTarget==`string`?e.attrs.sourceTarget:null,sourceAnchor:typeof e.attrs.sourceAnchor==`string`?e.attrs.sourceAnchor:null,sourceAlias:typeof e.attrs.sourceAlias==`string`?e.attrs.sourceAlias:null},children:[{type:`text`,value:i}]}}),i.tag&&(n.tag=e=>({type:`tag`,value:String(e.attrs.value??``)})),i.wikiLinkEmbed&&(n.wikiLinkEmbed=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLinkEmbed`,value:i,data:{target:t,anchor:n,alias:r},children:[{type:`text`,value:i}]}}),a.emphasis&&(r.emphasis=kP(`emphasis`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),a.strong&&(r.strong=kP(`strong`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),a.code&&(r.code=(e,t,n)=>{let r=e.attrs.sourceFenceChar,i=e.attrs.sourceFenceLength;return Y5(n,{sourceFenceChar:r,sourceFenceLength:i,sourcePadded:e.attrs.sourcePadded===!0?!0:void 0})}),a.strike??a.delete){let e=a.strike?`strike`:`delete`;r[e]=kP(`delete`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter===`~`?`~`:`~~`}}))}return a.highlight&&(r.highlight=kP(`mark`)),a.underline&&(r.underline=kP(`underline`,e=>({data:{sourceForm:e.attrs.sourceForm===`ins`?`ins`:`u`}}))),a.comment&&(r.comment=kP(`comment`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`}}))),i.commentBlock&&(n.commentBlock=OP(`commentBlock`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`,sourceLayout:e.attrs.sourceLayout===`inline`?`inline`:`block`}}))),i.footnoteReference&&(n.footnoteReference=e=>{let t=String(e.attrs.identifier??``);return{type:`footnoteReference`,identifier:t,label:e.attrs.label?String(e.attrs.label):t}}),i.footnoteDefinition&&(n.footnoteDefinition=OP(`footnoteDefinition`,e=>({identifier:String(e.attrs.identifier??``),label:e.attrs.label?String(e.attrs.label):String(e.attrs.identifier??``)}))),a.link&&(r.link=(e,t,n)=>{if(e.attrs.sourceForm===`wikiembed`){let t=typeof e.attrs.target==`string`&&e.attrs.target.length>0?e.attrs.target:e.attrs.href??``,r=typeof e.attrs.anchor==`string`&&e.attrs.anchor.length>0?e.attrs.anchor:null,i=typeof e.attrs.alias==`string`&&e.attrs.alias.length>0?e.attrs.alias:null,a=i||(r?`${t}#${r}`:t),o=n.map(e=>`value`in e&&typeof e.value==`string`?e.value:``).join(``);return o!==a&&o.trim().length>0&&!o.includes(`]]`)&&(i=o,a=o),{type:`wikiLinkEmbed`,value:a,data:{target:t,anchor:r,alias:i},children:[{type:`text`,value:a}]}}let r=e.attrs.linkStyle;if(r===`autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`autolink`}};if(r===`gfm-autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`gfm-autolink`}};if(r===`inline`||!r){let t={};e.attrs.sourceUrlForm===`angle-bracketed`&&(t.sourceUrlForm=`angle-bracketed`);let r=e.attrs.sourceTitleMarker;return(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r),{type:`link`,url:e.attrs.href??``,title:e.attrs.title??null,children:n,...Object.keys(t).length>0?{data:t}:{}}}return{type:`linkReference`,identifier:(e.attrs.refLabel??``).toLowerCase(),label:e.attrs.refLabel,referenceType:r,children:n}}),a.escapeMark&&(r.escapeMark=(e,t,n)=>{for(let e of n)if(e.type===`text`&&e.value){let t=e;t.data??={},t.data.escapedChars??=[];for(let e=0;e<t.value.length;e++)t.data.escapedChars.push({offset:e,char:t.value[e]})}return n.length===1?n[0]:n}),a.sourceLiteral&&(r.sourceLiteral=(e,t,n)=>{let r=typeof e.attrs.sourceRaw==`string`?e.attrs.sourceRaw:``;if(n.length===1&&n[0]?.type===`text`){let e=n[0],t=r||e.value;return AQ(t,e.value)&&(e.data??={},e.data.sourceRaw=t),e}return{type:`text`,value:n.filter(e=>e.type===`text`).map(e=>e.value??``).join(``)||r}}),{nodeHandlers:n,markHandlers:r}}var Z5={default:!0,MD013:!1};function Q5(e){return e??Z5}function Jre(e){let t=e.replace(/\\/g,`/`);for(;t.startsWith(`./`);)t=t.slice(2);let n=t.toLowerCase();for(let e of pZ)if(n.endsWith(e))return t.slice(0,-e.length);return t}function Yre(e){let t=(e===void 0?[]:Array.isArray(e)?e:[e]).map(e=>e.trim()).filter(e=>e.length>0),n=[],r=[],i=[],a=[],o=0;for(let e of t){let t=e.startsWith(`!`),s=t?e.slice(1):e;if(t||(o+=1),s.length===0){n.push({pattern:e,detail:`empty pattern`});continue}try{let e=(0,VV.default)(s,{dot:!0,strictBrackets:!0});(t?a:i).push(e)}catch(t){n.push({pattern:e,detail:t instanceof Error?t.message:String(t)});continue}if(s.endsWith(`/`))r.push({pattern:e,reason:`trailing-slash`});else if(s.startsWith(`/`))r.push({pattern:e,reason:`leading-slash`});else{let t=s.toLowerCase();pZ.some(e=>t.endsWith(e))&&r.push({pattern:e,reason:`doc-extension`})}}let s=o===0;return{invalidPatterns:n,suspiciousPatterns:r,matches(e){if(e===void 0||e===``)return!1;let t=Jre(e);return t===``||!(s||i.some(e=>e(t)))?!1:!a.some(e=>e(t))}}}var $5=/[*?[\]{}()+@!|]/;function Xre(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);if(n===-1||e.indexOf(`{`,t+1)!==-1||e.indexOf(`}`,n+1)!==-1)return null;let r=e.slice(t+1,n).split(`,`);return r.length<2||r.some(e=>e.trim()===``||$5.test(e))?null:r.map(r=>e.slice(0,t)+r+e.slice(n+1))}function e7(e){if(e.endsWith(`/`)||e.startsWith(`/`))return{kind:`matches-nothing`,pattern:e};try{(0,VV.default)(e,{dot:!0,strictBrackets:!0})}catch{return{kind:`invalid`,pattern:e}}if(e===`**`||e===`**/*`)return{kind:`everything`};{let t=e.match(/^\*\*\/(.+)\/\*\*$/)?.[1];if(t!==void 0&&!$5.test(t))return{kind:`folder-anywhere`,folder:t};let n=e.match(/^(.+)\/\*\*\/(.+)\/\*\*$/),r=n?.[1],i=n?.[2];if(r!==void 0&&i!==void 0&&!$5.test(r)&&!$5.test(i))return{kind:`folder-recursive-nested`,root:r,folder:i}}for(let t of[`/**/*`,`/**`])if(e.endsWith(t)){let n=e.slice(0,-t.length);if(n.length>0&&!$5.test(n))return{kind:`folder-recursive`,folder:n}}if(e.endsWith(`/*`)){let t=e.slice(0,-2);if(t.length>0&&!$5.test(t))return{kind:`folder-direct`,folder:t}}if(e.startsWith(`**/`)){let t=e.slice(3);if(t.length>0&&!t.includes(`/`)&&!$5.test(t))return{kind:`name-anywhere`,name:t}}return $5.test(e)?{kind:`pattern`,pattern:e}:{kind:`exact`,target:e}}function Zre(e){let t=e7(e);if(t.kind!==`pattern`)return[t];let n=Xre(e);if(n!==null){let e=n.map(e7);if(e.every(e=>e.kind!==`pattern`))return e}return[t]}function Qre(e){let t=(e===void 0?[]:Array.isArray(e)?e:[e]).map(e=>e.trim()).filter(e=>e.length>0),n=[],r=[];for(let e of t){let t=e.startsWith(`!`),i=t?e.slice(1):e;i.length!==0&&(t?r:n).push(...Zre(i))}return{includes:n,excludes:r}}function t7(e,t){let n=new Set,r=[];for(let i of e){if(i.enabled===!1||!i.schema||!Yre(i.appliesTo).matches(t))continue;let e=i.key??i.file;n.has(e)||(n.add(e),r.push({file:i.file,schema:i.schema}))}return r}var n7={"draft-06":`http://json-schema.org/draft-06/schema#`,"draft-07":`http://json-schema.org/draft-07/schema#`,"2019-09":`https://json-schema.org/draft/2019-09/schema`,"2020-12":`https://json-schema.org/draft/2020-12/schema`},$re=Object.keys(n7),eie=`draft-07`,tie=new Map($re.map(e=>[r7(n7[e]),e]));function r7(e){return e.replace(/^https?:\/\//,``).replace(/#$/,``)}function nie(e){let t=e.$schema;return t===void 0?eie:typeof t==`string`?tie.get(r7(t))??null:null}var i7=new Map;function rie(e){throw Error(`Unhandled FrontmatterSchemaDialect: ${JSON.stringify(e)}`)}function iie(e){let t=i7.get(e);if(t)return t;let n={allErrors:!0,strict:!1},r;switch(e){case`2020-12`:r=new zV.default(n);break;case`2019-09`:r=new RV.default(n);break;case`draft-06`:case`draft-07`:r=new LV.default(n);break;default:return rie(e)}return(0,BV.default)(r),i7.set(e,r),r}function aie(e){let{$schema:t,...n}=e;return n}function oie(e,t){let n=iie(e),r=t.$id;return typeof r==`string`&&r!==``&&n.removeSchema(r),n.compile(aie(t))}var a7=new Map,sie=256;function cie(e){let t=JSON.stringify(e),n=a7.get(t);if(n!==void 0)return n;let r=null,i=nie(e);if(i!==null)try{r=oie(i,e)}catch{r=null}return a7.size>=sie&&a7.clear(),a7.set(t,r),r}function lie(e){let t=new Map;if(!vp.test(e))return{data:{},keyLines:t};let{frontmatter:n}=bp(e),r=Sp(n);if(r.trim()===``)return{data:{},keyLines:t};let i=Au(r,{uniqueKeys:!1});if(i.errors.length>0)return{data:{},keyLines:t};let a=i.toJS();if(typeof a!=`object`||!a||Array.isArray(a))return{data:{},keyLines:t};if(Qo(i.contents))for(let e of i.contents.items){let n=e.key;if(!es(n)||typeof n.value!=`string`||!n.range)continue;let i=0,a=Math.min(n.range[0],r.length);for(let e=0;e<a;e++)r.charCodeAt(e)===10&&i++;t.has(n.value)||t.set(n.value,i+1)}return{data:a,keyLines:t}}function uie(e){if(e===void 0)return``;let t;if(typeof e==`string`)t=`"${e}"`;else try{t=JSON.stringify(e)??String(e)}catch{t=String(e)}return t.length>60&&(t=`${t.slice(0,57)}…`),` (got ${t})`}function die(e){if(!e.startsWith(`/`))return null;let t=e.slice(1).split(`/`)[0]??``;return t===``?null:t.replace(/~1/g,`/`).replace(/~0/g,`~`)}function fie(e){return e.split(`/`).slice(1).map(e=>e.replace(/~1/g,`/`).replace(/~0/g,`~`)).join(`.`)}function pie(e,t){if(t.length===0)return[];let{data:n,keyLines:r}=lie(e),i=e.split(`
569
569
  `),a=e=>({start:{line:e,character:0},end:{line:e,character:i[e]?.length??0}}),o=[];for(let{schema:e}of t){let t=cie(e);if(t&&!t(n))for(let e of t.errors??[]){let t=e.keyword,i=0,s;if(t===`required`&&e.instancePath===``)s=`Frontmatter property "${String(e.params.missingProperty??``)}" is required`;else if(e.instancePath===``)s=`Frontmatter ${e.message??`violates "${t}"`}`;else{let a=die(e.instancePath);a!==null&&(i=r.get(a)??0);let o=fie(e.instancePath);if(t===`enum`){let t=e.params.allowedValues??[],r=a!==null&&o===a?n[a]:void 0;s=`Frontmatter property "${o}" must be one of: ${t.map(String).join(`, `)}${uie(r)}`}else s=`Frontmatter property "${o}" ${e.message??`violates "${t}"`}`}o.push({range:a(i),severity:`warning`,source:`frontmatter`,code:t,message:s})}}return o}var o7=`doc`;function mie(e,t){return PG(e,jG({strings:{[o7]:e},config:t})[o7]??[])}function hie(e,t){let n=jG({strings:{[o7]:e},config:t})[o7]??[],r=e.split(`
570
- `),i=gie(t);return n.map(e=>vie(e,r,_ie(e,i)))}function gie(e){let t=new Map;return Object.entries(e).forEach(([e,n],r)=>{let i=e.toUpperCase();if(i===`DEFAULT`)return;let a=null;if(n===`error`||n===`warning`)a=n;else if(typeof n==`object`&&n&&!Array.isArray(n)){let e=n.severity;(e===`error`||e===`warning`)&&(a=e)}a!==null&&t.set(i,{entryIndex:r,severity:a})}),t}function _ie(e,t){let n;for(let r of e.ruleNames){let e=t.get(r.toUpperCase());e!==void 0&&(n===void 0||e.entryIndex>n.entryIndex)&&(n=e)}return n?.severity??`warning`}function vie(e,t,n){let[r,i]=e.errorRange??[1,null],a=e.lineNumber-1,o=(r??1)-1,s=t[a]?.length??0,c=i==null?s:Math.min(o+i,s),l=e.fixInfo?[yie(e.fixInfo,e.lineNumber,t)]:void 0;return{range:{start:{line:a,character:o},end:{line:a,character:Math.max(c,o)}},severity:n,source:`markdownlint`,code:e.ruleNames[0]??`MD000`,message:e.errorDetail?`${e.ruleDescription}: ${e.errorDetail}`:e.ruleDescription,...l?{fixes:l}:{}}}function yie(e,t,n){let r=e.lineNumber??t,i=r-1;if(e.deleteCount===-1){if(r<n.length)return{range:{start:{line:i,character:0},end:{line:i+1,character:0}},newText:``};if(i>0){let e=n[i-1]?.length??0;return{range:{start:{line:i-1,character:e},end:{line:i,character:n[i]?.length??0}},newText:``}}return{range:{start:{line:0,character:0},end:{line:0,character:n[0]?.length??0}},newText:``}}let a=(e.editColumn??1)-1;return{range:{start:{line:i,character:a},end:{line:i,character:a+Math.max(0,e.deleteCount??0)}},newText:e.insertText??``}}var bie=so([I(),B(Ad),uo(P(),io())]),xie={id:`markdownlint`,sliceSchema:R({enabled:I(),rules:uo(P(),bie)}),defaultSlice:{enabled:!1,rules:Z5},async lint(e,t){return hie(e,Q5(t.rules))},fix(e,t){return mie(e,Q5(t.rules))}},Sie=R({appliesTo:so([P(),L(P())]).optional(),file:P(),enabled:I().optional(),key:P().optional(),schema:uo(P(),io()).optional()}),s7=[xie,{id:`frontmatter`,sliceSchema:R({enabled:I(),schemas:L(Sie)}),defaultSlice:{enabled:!1,schemas:[]},async lint(e,t,n){return pie(e,t7(t.schemas,n.docName))}}],Cie={enabled:!0,plugins:Object.fromEntries(s7.map(e=>[e.id,e.defaultSlice]))},wie=new Set([`.markdownlint.json`,`.markdownlint.jsonc`]);function Tie(e){return wie.has(e)}function Eie(e){return{enabled:e.enabled??!0,plugins:{markdownlint:{...e.markdownlint,rules:e.markdownlint.rules??Z5},frontmatter:{enabled:e.frontmatter?.enabled??!1,schemas:e.frontmatter?.schemas??[]}}}}var Die=Object.fromEntries(s7.map(e=>[e.id,e.sliceSchema])),Oie=R({effective:R({enabled:I(),plugins:R(Die)}),configFile:P().nullable().optional(),configProblems:L(P()).optional()}),kie=so([I(),uo(P(),io())]);R({ruleId:P().min(1).max(64).regex(/^[A-Za-z][A-Za-z0-9_-]*$/),value:so([kie,no()])}),R({file:P().min(1).max(512),delete:V(!0).optional(),field:P().min(1).max(256).optional(),parentPath:L(so([P().min(1).max(256),R({items:V(!0)}).strict()])).max(8).optional(),removeField:V(!0).optional(),renameTo:P().min(1).max(256).optional(),constraint:R({type:B([`string`,`number`,`boolean`,`array`,`object`]).nullable().optional(),enum:L(so([P(),F(),I()])).nullable().optional(),itemsEnum:L(so([P(),F(),I()])).nullable().optional(),itemsType:B([`string`,`number`,`boolean`,`object`]).nullable().optional(),pattern:P().nullable().optional(),format:P().nullable().optional(),description:P().max(2048).nullable().optional(),required:I().optional()}).optional()}).refine(e=>e.delete===void 0||e.field===void 0&&e.constraint===void 0&&e.removeField===void 0&&e.renameTo===void 0,{message:`delete cannot be combined with a field edit`}).refine(e=>[e.constraint,e.removeField,e.renameTo].filter(e=>e!==void 0).length<=1,{message:`constraint, removeField, and renameTo are mutually exclusive`}).refine(e=>e.removeField===void 0&&e.renameTo===void 0||e.field!==void 0,{message:`removeField and renameTo require field`}).refine(e=>e.parentPath===void 0||e.field!==void 0,{message:`parentPath requires field`}).refine(e=>e.field===void 0?e.constraint===void 0:e.constraint!==void 0||e.removeField!==void 0||e.renameTo!==void 0,{message:`field requires constraint, removeField, or renameTo`});var Aie=R({schemas:L(P()),truncated:I()}).strict(),c7=R({line:F(),character:F()}),l7=R({start:c7,end:c7}),u7=R({range:l7,severity:B([`error`,`warning`,`info`,`hint`]),source:P(),code:P(),message:P(),fixes:L(R({range:l7,newText:P()})).optional()});R({files:L(R({file:P(),diagnostics:L(u7),warnings:L(P()).optional()})),fileCount:F(),errorCount:F(),warningCount:F(),warnings:L(P())});var jie=u7.extend({linkTarget:P().optional()}),Mie=R({files:L(R({file:P(),diagnostics:L(jie)})),fileCount:F(),errorCount:F(),warningCount:F(),warnings:L(P())}),d7=R({errorCount:F().int().nonnegative(),warningCount:F().int().nonnegative()}),Nie=R({files:L(R({file:P(),lint:d7,links:d7})),fileCount:F().int().nonnegative(),errorCount:F().int().nonnegative(),warningCount:F().int().nonnegative(),warnings:L(P())});R({docName:g1,summary:y1,...v1}).loose();var Pie=R({file:P(),fixedCount:F(),diagnostics:L(u7),errorCount:F(),warningCount:F(),warning:P().optional()});function Fie(e){let t=e.trim().replace(/^\.\//,``);if(!t.startsWith(`.ok/schemas/`))return!1;let n=t.slice(12);return n.length>0&&!n.includes(`/`)&&!n.includes(`\\`)&&n!==`.`&&n!==`..`}function Iie(e){let t=e.trim().toLowerCase().split(`/`).pop()??``;return t.endsWith(`.schema.json`)&&t.length>12?!0:Fie(e)&&t.endsWith(`.json`)}var f7=[{id:`MD001`,alias:`heading-increment`,aliases:[`heading-increment`],name:`Heading levels should only increment by one level at a time`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md001.md`,tags:[`headings`],options:[{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`}]},{id:`MD003`,alias:`heading-style`,aliases:[`heading-style`],name:`Heading style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md003.md`,tags:[`headings`],options:[{key:`style`,type:`enum`,description:`Heading style`,enum:[`consistent`,`atx`,`atx_closed`,`setext`,`setext_with_atx`,`setext_with_atx_closed`],default:`consistent`}]},{id:`MD004`,alias:`ul-style`,aliases:[`ul-style`],name:`Unordered list style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md004.md`,tags:[`bullet`,`ul`],options:[{key:`style`,type:`enum`,description:`List style`,enum:[`consistent`,`asterisk`,`plus`,`dash`,`sublist`],default:`consistent`}]},{id:`MD005`,alias:`list-indent`,aliases:[`list-indent`],name:`Inconsistent indentation for list items at the same level`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md005.md`,tags:[`bullet`,`ul`,`indentation`],options:[]},{id:`MD007`,alias:`ul-indent`,aliases:[`ul-indent`],name:`Unordered list indentation`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md007.md`,tags:[`bullet`,`ul`,`indentation`],options:[{key:`indent`,type:`integer`,description:`Spaces for indent`,default:2,minimum:1},{key:`start_indented`,type:`boolean`,description:`Whether to indent the first level of the list`,default:!1},{key:`start_indent`,type:`integer`,description:`Spaces for first level indent (when start_indented is set)`,default:2,minimum:1}]},{id:`MD009`,alias:`no-trailing-spaces`,aliases:[`no-trailing-spaces`],name:`Trailing spaces`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md009.md`,tags:[`whitespace`],options:[{key:`br_spaces`,type:`integer`,description:`Spaces for line break`,default:2,minimum:0},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!1},{key:`list_item_empty_lines`,type:`boolean`,description:`Allow spaces for empty lines in list items`,default:!1},{key:`strict`,type:`boolean`,description:`Include unnecessary breaks`,default:!1}]},{id:`MD010`,alias:`no-hard-tabs`,aliases:[`no-hard-tabs`],name:`Hard tabs`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md010.md`,tags:[`whitespace`,`hard_tab`],options:[{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`ignore_code_languages`,type:`string-array`,description:`Fenced code languages to ignore`,default:[]},{key:`spaces_per_tab`,type:`integer`,description:`Number of spaces for each hard tab`,default:1,minimum:0}]},{id:`MD011`,alias:`no-reversed-links`,aliases:[`no-reversed-links`],name:`Reversed link syntax`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md011.md`,tags:[`links`],options:[]},{id:`MD012`,alias:`no-multiple-blanks`,aliases:[`no-multiple-blanks`],name:`Multiple consecutive blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md012.md`,tags:[`whitespace`,`blank_lines`],options:[{key:`maximum`,type:`integer`,description:`Consecutive blank lines`,default:1,minimum:1}]},{id:`MD013`,alias:`line-length`,aliases:[`line-length`],name:`Line length`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md013.md`,tags:[`line_length`],options:[{key:`line_length`,type:`integer`,description:`Number of characters`,default:80,minimum:1},{key:`heading_line_length`,type:`integer`,description:`Number of characters for headings`,default:80,minimum:1},{key:`code_block_line_length`,type:`integer`,description:`Number of characters for code blocks`,default:80,minimum:1},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`tables`,type:`boolean`,description:`Include tables`,default:!0},{key:`headings`,type:`boolean`,description:`Include headings`,default:!0},{key:`strict`,type:`boolean`,description:`Strict length checking`,default:!1},{key:`stern`,type:`boolean`,description:`Stern length checking`,default:!1}]},{id:`MD014`,alias:`commands-show-output`,aliases:[`commands-show-output`],name:`Dollar signs used before commands without showing output`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md014.md`,tags:[`code`],options:[]},{id:`MD018`,alias:`no-missing-space-atx`,aliases:[`no-missing-space-atx`],name:`No space after hash on atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md018.md`,tags:[`headings`,`atx`,`spaces`],options:[]},{id:`MD019`,alias:`no-multiple-space-atx`,aliases:[`no-multiple-space-atx`],name:`Multiple spaces after hash on atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md019.md`,tags:[`headings`,`atx`,`spaces`],options:[]},{id:`MD020`,alias:`no-missing-space-closed-atx`,aliases:[`no-missing-space-closed-atx`],name:`No space inside hashes on closed atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md020.md`,tags:[`headings`,`spaces`,`atx_closed`],options:[]},{id:`MD021`,alias:`no-multiple-space-closed-atx`,aliases:[`no-multiple-space-closed-atx`],name:`Multiple spaces inside hashes on closed atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md021.md`,tags:[`headings`,`spaces`,`atx_closed`],options:[]},{id:`MD022`,alias:`blanks-around-headings`,aliases:[`blanks-around-headings`],name:`Headings should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md022.md`,tags:[`headings`,`blank_lines`],options:[{key:`include_front_matter`,type:`boolean`,description:`Include front matter content`,default:!1},{key:`lines_above`,type:`unsupported`,description:`Blank lines above heading`,default:1},{key:`lines_below`,type:`unsupported`,description:`Blank lines below heading`,default:1}]},{id:`MD023`,alias:`heading-start-left`,aliases:[`heading-start-left`],name:`Headings must start at the beginning of the line`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md023.md`,tags:[`headings`,`spaces`],options:[]},{id:`MD024`,alias:`no-duplicate-heading`,aliases:[`no-duplicate-heading`],name:`Multiple headings with the same content`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md024.md`,tags:[`headings`],options:[{key:`siblings_only`,type:`boolean`,description:`Only check sibling headings`,default:!1}]},{id:`MD025`,alias:`single-title`,aliases:[`single-title`,`single-h1`],name:`Multiple top-level headings in the same document`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md025.md`,tags:[`headings`],options:[{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`},{key:`level`,type:`integer`,description:`Heading level`,default:1,minimum:1,maximum:6}]},{id:`MD026`,alias:`no-trailing-punctuation`,aliases:[`no-trailing-punctuation`],name:`Trailing punctuation in heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md026.md`,tags:[`headings`],options:[{key:`punctuation`,type:`string`,description:`Punctuation characters`,default:`.,;:!。,;:!`}]},{id:`MD027`,alias:`no-multiple-space-blockquote`,aliases:[`no-multiple-space-blockquote`],name:`Multiple spaces after blockquote symbol`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md027.md`,tags:[`indentation`,`whitespace`,`blockquote`],options:[{key:`list_items`,type:`boolean`,description:`Include list items`,default:!0}]},{id:`MD028`,alias:`no-blanks-blockquote`,aliases:[`no-blanks-blockquote`],name:`Blank line inside blockquote`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md028.md`,tags:[`whitespace`,`blockquote`],options:[]},{id:`MD029`,alias:`ol-prefix`,aliases:[`ol-prefix`],name:`Ordered list item prefix`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md029.md`,tags:[`ol`],options:[{key:`style`,type:`enum`,description:`List style`,enum:[`one`,`ordered`,`one_or_ordered`,`zero`],default:`one_or_ordered`}]},{id:`MD030`,alias:`list-marker-space`,aliases:[`list-marker-space`],name:`Spaces after list markers`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md030.md`,tags:[`ul`,`whitespace`,`ol`],options:[{key:`ul_single`,type:`integer`,description:`Spaces for single-line unordered list items`,default:1,minimum:1},{key:`ol_single`,type:`integer`,description:`Spaces for single-line ordered list items`,default:1,minimum:1},{key:`ul_multi`,type:`integer`,description:`Spaces for multi-line unordered list items`,default:1,minimum:1},{key:`ol_multi`,type:`integer`,description:`Spaces for multi-line ordered list items`,default:1,minimum:1}]},{id:`MD031`,alias:`blanks-around-fences`,aliases:[`blanks-around-fences`],name:`Fenced code blocks should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md031.md`,tags:[`blank_lines`,`code`],options:[{key:`list_items`,type:`boolean`,description:`Include list items`,default:!0}]},{id:`MD032`,alias:`blanks-around-lists`,aliases:[`blanks-around-lists`],name:`Lists should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md032.md`,tags:[`bullet`,`ul`,`blank_lines`,`ol`],options:[]},{id:`MD033`,alias:`no-inline-html`,aliases:[`no-inline-html`],name:`Inline HTML`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md033.md`,tags:[`html`],options:[{key:`allowed_elements`,type:`string-array`,description:`Allowed elements`,default:[]},{key:`table_allowed_elements`,type:`string-array`,description:`Allowed elements in tables`,default:[]}]},{id:`MD034`,alias:`no-bare-urls`,aliases:[`no-bare-urls`],name:`Bare URL used`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md034.md`,tags:[`links`,`url`],options:[]},{id:`MD035`,alias:`hr-style`,aliases:[`hr-style`],name:`Horizontal rule style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md035.md`,tags:[`hr`],options:[{key:`style`,type:`string`,description:`Horizontal rule style`,default:`consistent`}]},{id:`MD036`,alias:`no-emphasis-as-heading`,aliases:[`no-emphasis-as-heading`],name:`Emphasis used instead of a heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md036.md`,tags:[`headings`,`emphasis`],options:[{key:`punctuation`,type:`string`,description:`Punctuation characters`,default:`.,;:!?。,;:!?`}]},{id:`MD037`,alias:`no-space-in-emphasis`,aliases:[`no-space-in-emphasis`],name:`Spaces inside emphasis markers`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md037.md`,tags:[`whitespace`,`emphasis`],options:[]},{id:`MD038`,alias:`no-space-in-code`,aliases:[`no-space-in-code`],name:`Spaces inside code span elements`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md038.md`,tags:[`whitespace`,`code`],options:[]},{id:`MD039`,alias:`no-space-in-links`,aliases:[`no-space-in-links`],name:`Spaces inside link text`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md039.md`,tags:[`whitespace`,`links`],options:[]},{id:`MD040`,alias:`fenced-code-language`,aliases:[`fenced-code-language`],name:`Fenced code blocks should have a language specified`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md040.md`,tags:[`code`,`language`],options:[{key:`allowed_languages`,type:`string-array`,description:`List of languages`,default:[]},{key:`language_only`,type:`boolean`,description:`Require language only`,default:!1}]},{id:`MD041`,alias:`first-line-heading`,aliases:[`first-line-heading`,`first-line-h1`],name:`First line in a file should be a top-level heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md041.md`,tags:[`headings`],options:[{key:`allow_preamble`,type:`boolean`,description:`Allow content before first heading`,default:!1},{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`},{key:`level`,type:`integer`,description:`Heading level`,default:1,minimum:1,maximum:6}]},{id:`MD042`,alias:`no-empty-links`,aliases:[`no-empty-links`],name:`No empty links`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md042.md`,tags:[`links`],options:[]},{id:`MD043`,alias:`required-headings`,aliases:[`required-headings`],name:`Required heading structure`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md043.md`,tags:[`headings`],options:[{key:`headings`,type:`string-array`,description:`List of headings`,default:[]},{key:`match_case`,type:`boolean`,description:`Match case of headings`,default:!1}]},{id:`MD044`,alias:`proper-names`,aliases:[`proper-names`],name:`Proper names should have the correct capitalization`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md044.md`,tags:[`spelling`],options:[{key:`names`,type:`string-array`,description:`List of proper names`,default:[]},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`html_elements`,type:`boolean`,description:`Include HTML elements`,default:!0}]},{id:`MD045`,alias:`no-alt-text`,aliases:[`no-alt-text`],name:`Images should have alternate text (alt text)`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md045.md`,tags:[`accessibility`,`images`],options:[]},{id:`MD046`,alias:`code-block-style`,aliases:[`code-block-style`],name:`Code block style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md046.md`,tags:[`code`],options:[{key:`style`,type:`enum`,description:`Block style`,enum:[`consistent`,`fenced`,`indented`],default:`consistent`}]},{id:`MD047`,alias:`single-trailing-newline`,aliases:[`single-trailing-newline`],name:`Files should end with a single newline character`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md047.md`,tags:[`blank_lines`],options:[]},{id:`MD048`,alias:`code-fence-style`,aliases:[`code-fence-style`],name:`Code fence style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md048.md`,tags:[`code`],options:[{key:`style`,type:`enum`,description:`Code fence style`,enum:[`consistent`,`backtick`,`tilde`],default:`consistent`}]},{id:`MD049`,alias:`emphasis-style`,aliases:[`emphasis-style`],name:`Emphasis style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md049.md`,tags:[`emphasis`],options:[{key:`style`,type:`enum`,description:`Emphasis style`,enum:[`consistent`,`asterisk`,`underscore`],default:`consistent`}]},{id:`MD050`,alias:`strong-style`,aliases:[`strong-style`],name:`Strong style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md050.md`,tags:[`emphasis`],options:[{key:`style`,type:`enum`,description:`Strong style`,enum:[`consistent`,`asterisk`,`underscore`],default:`consistent`}]},{id:`MD051`,alias:`link-fragments`,aliases:[`link-fragments`],name:`Link fragments should be valid`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md051.md`,tags:[`links`],options:[{key:`ignore_case`,type:`boolean`,description:`Ignore case of fragments`,default:!1},{key:`ignored_pattern`,type:`string`,description:`Pattern for ignoring additional fragments`,default:``}]},{id:`MD052`,alias:`reference-links-images`,aliases:[`reference-links-images`],name:`Reference links and images should use a label that is defined`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md052.md`,tags:[`links`,`images`],options:[{key:`ignored_labels`,type:`string-array`,description:`Ignored link labels`,default:[`x`]},{key:`shortcut_syntax`,type:`boolean`,description:`Include shortcut syntax`,default:!1}]},{id:`MD053`,alias:`link-image-reference-definitions`,aliases:[`link-image-reference-definitions`],name:`Link and image reference definitions should be needed`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md053.md`,tags:[`links`,`images`],options:[{key:`ignored_definitions`,type:`string-array`,description:`Ignored definitions`,default:[`//`]}]},{id:`MD054`,alias:`link-image-style`,aliases:[`link-image-style`],name:`Link and image style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md054.md`,tags:[`links`,`images`],options:[{key:`autolink`,type:`boolean`,description:`Allow autolinks`,default:!0},{key:`inline`,type:`boolean`,description:`Allow inline links and images`,default:!0},{key:`full`,type:`boolean`,description:`Allow full reference links and images`,default:!0},{key:`collapsed`,type:`boolean`,description:`Allow collapsed reference links and images`,default:!0},{key:`shortcut`,type:`boolean`,description:`Allow shortcut reference links and images`,default:!0},{key:`url_inline`,type:`boolean`,description:`Allow URLs as inline links`,default:!0}]},{id:`MD055`,alias:`table-pipe-style`,aliases:[`table-pipe-style`],name:`Table pipe style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md055.md`,tags:[`table`],options:[{key:`style`,type:`enum`,description:`Table pipe style`,enum:[`consistent`,`leading_only`,`trailing_only`,`leading_and_trailing`,`no_leading_or_trailing`],default:`consistent`}]},{id:`MD056`,alias:`table-column-count`,aliases:[`table-column-count`],name:`Table column count`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md056.md`,tags:[`table`],options:[]},{id:`MD058`,alias:`blanks-around-tables`,aliases:[`blanks-around-tables`],name:`Tables should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md058.md`,tags:[`table`],options:[]},{id:`MD059`,alias:`descriptive-link-text`,aliases:[`descriptive-link-text`],name:`Link text should be descriptive`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md059.md`,tags:[`links`,`accessibility`],options:[{key:`prohibited_texts`,type:`string-array`,description:`Prohibited link texts`,default:[`click here`,`here`,`link`,`more`]}]},{id:`MD060`,alias:`table-column-style`,aliases:[`table-column-style`],name:`Table column style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md060.md`,tags:[`table`],options:[{key:`style`,type:`enum`,description:`Table column style`,enum:[`any`,`aligned`,`compact`,`tight`],default:`any`},{key:`aligned_delimiter`,type:`boolean`,description:`Aligned delimiter columns`,default:!1}]}],Lie=(()=>{let e=new Map;for(let t of f7){e.set(t.id.toUpperCase(),t.id);for(let n of t.aliases)e.set(n.toUpperCase(),t.id)}return e})();function p7(e){return Lie.get(e.toUpperCase())??null}function Rie(e,t){let n=p7(t);if(n===null)return;let r;for(let[t,i]of Object.entries(e))p7(t)===n&&(r={key:t,value:i});return r}var zie=[`Headings`,`Lists`,`Whitespace`,`Code`,`Links & images`,`Style`],Bie=[[`headings`,`Headings`],[`bullet`,`Lists`],[`ul`,`Lists`],[`ol`,`Lists`],[`links`,`Links & images`],[`images`,`Links & images`],[`accessibility`,`Links & images`],[`code`,`Code`],[`language`,`Code`],[`emphasis`,`Style`],[`html`,`Style`],[`line_length`,`Whitespace`],[`whitespace`,`Whitespace`],[`hard_tab`,`Whitespace`],[`blank_lines`,`Whitespace`],[`indentation`,`Whitespace`]];function Vie(e){for(let[t,n]of Bie)if(e.tags.includes(t))return n;return`Style`}function Hie(e){let t={lint:{errorCount:0,warningCount:0},links:{errorCount:0,warningCount:0}};for(let n of e){let e=n.source===`links`?t.links:t.lint;n.severity===`error`?e.errorCount+=1:e.warningCount+=1}return t}async function Uie(e,t,n){if(!t.enabled)return[];let r=[];for(let i of s7){let a=t.plugins[i.id];a.enabled&&r.push(...await i.lint(e,a,{docName:n}))}return r}var Wie=/\p{M}+/gu,Gie=/[^\p{L}\p{N}]+/gu,Kie=/^-+|-+$/g;function m7(e){return e.trim().normalize(`NFKD`).replace(Wie,``).toLowerCase().replace(Gie,`-`).replace(Kie,``)}function qie(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function h7(e,t){let n=m7(e);return n?qie(n,t):``}function g7(e,t){let n=m7(e);return t?`#${n}-${m7(t)}`:`#${n}`}var _7=new Set([`img`,`video`,`audio`,`mark`,`u`,`ins`]),Jie=new Map(g4.flatMap(e=>e.surface===`compat`&&_7.has(e.rendersAs)?[[e.name,e]]:[]));function v7(e){let t={};for(let n of e.attributes){if(n.type!==`mdxJsxAttribute`)return null;let e=n.name.toLowerCase();if(!(e.length>=3&&e.startsWith(`on`)))if(n.value===null)t[n.name]=!0;else if(typeof n.value==`string`)t[n.name]=n.value;else return null}return t}function y7(e){let t=e.name;if(!t||!_7.has(t))return null;let n=v7(e);return n===null?null:{type:`element`,tagName:t,properties:n,children:[]}}function b7(e){let t=e.name;if(!t)return null;let n=Jie.get(t);if(!n)return null;let r=v7(e);if(r===null)return null;let i=n.translateProps(r),a={};for(let[e,t]of Object.entries(i))(typeof t==`string`||typeof t==`boolean`)&&(a[e]=t);return{type:`element`,tagName:n.rendersAs,properties:a,children:[]}}var Yie=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-link`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:g7(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},Xie=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-embed`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:g7(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},Zie=(e,t)=>{let n=t,r=y7(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=b7(n);if(i){e.patch(t,i);let n=e.applyData(t,i);return n.tagName===`img`?{type:`element`,tagName:`p`,properties:{},children:[n]}:n}let a={type:`element`,tagName:`pre`,properties:{className:[`mdx-component`]},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]}]};return e.patch(t,a),e.applyData(t,a)},Qie=(e,t)=>{let n=t,r=y7(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=b7(n);if(i)return e.patch(t,i),e.applyData(t,i);let a={type:`element`,tagName:`span`,properties:{className:[`mdx-inline`],dataJsxInline:``},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]};return e.patch(t,a),e.applyData(t,a)},$ie=(e,t)=>{let n=t,r=n.data.reason||`unknown`,i=n.value||``,a=r.replace(/--/g,`—`),o={type:`comment`,value:` Parse error: ${a} `},s={type:`element`,tagName:`pre`,properties:{className:[`mdx-fallback`],dataRawMdxFallback:``,dataReason:a},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:i}]}]};return e.patch(t,s),[o,e.applyData(t,s)]},eae=(e,t)=>{let n={type:`element`,tagName:`mark`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tae=(e,t)=>{let n=t,r={type:`element`,tagName:n.data?.sourceForm===`ins`?`ins`:`u`,properties:{},children:e.all(n)};return e.patch(t,r),e.applyData(t,r)};function x7(e){if(typeof e!=`object`||!e)return``;let t=e;return typeof t.value==`string`?t.value:Array.isArray(t.children)?t.children.map(x7).join(``):``}var S7={wikiLink:Yie,wikiLinkEmbed:Xie,mdxJsxFlowElement:Zie,mdxJsxTextElement:Qie,rawMdxFallback:$ie,mark:eae,underline:tae,tag:(e,t)=>{let n=t.value,r={type:`element`,tagName:`a`,properties:{className:[`tag`],dataTag:n,href:`#tag/${n}`},children:[{type:`text`,value:`#${n}`}]};return e.patch(t,r),e.applyData(t,r)},comment:(e,t)=>{let n={type:`comment`,value:x7(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},commentBlock:(e,t)=>{let n={type:`comment`,value:x7(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`sup`,properties:{id:`fnref-${n}`,dataFootnoteRef:``,dataFootnoteId:n,className:[`footnote-ref`]},children:[{type:`element`,tagName:`a`,properties:{href:`#fn-${n}`,className:[`footnote-ref-link`]},children:[{type:`text`,value:`[${n}]`}]}]};return e.patch(t,r),e.applyData(t,r)},footnoteDefinition:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`aside`,properties:{id:`fn-${n}`,dataFootnoteDef:``,dataFootnoteId:n,className:[`footnote-def`]},children:[{type:`element`,tagName:`div`,properties:{className:[`footnote-body`]},children:e.all(t)},{type:`element`,tagName:`a`,properties:{href:`#fnref-${n}`,className:[`footnote-backref`],ariaLabel:`Back to reference`},children:[{type:`text`,value:`↩`}]}]};return e.patch(t,r),e.applyData(t,r)}},nae=/url\s*\(\s*['"]?\s*(?:javascript|vbscript|data)\s*:/i,rae=/\bexpression\s*\(/i,iae=1e4;function aae(e){return!(e.length>iae||nae.test(e)||rae.test(e))}function C7(e){for(let t of e.split(`,`)){let e=t.trim();if(e!==``&&!qZ(e.split(/\s+/)[0]??``))return!1}return!0}var oae={a:[`href`,`title`],img:[`src`,`alt`,`title`],video:[`src`,`title`],audio:[`src`,`title`],code:[`className`]},sae=new Set([`href`,`src`]),cae=ke(`<>`),w7=()=>e=>{D(e,`element`,e=>{let t=oae[e.tagName.toLowerCase()],n=e.properties;if(!(!t||!n))for(let e of t){let t=n[e];if(Array.isArray(t)){let r=t.map(e=>typeof e==`string`?z3(e):e);r.some((e,n)=>e!==t[n])&&(n[e]=r);continue}if(typeof t!=`string`)continue;let r;if(sae.has(e))if(t===`<>`||t===cae)r=``;else{let e=z3(t);r=e===t?t:ke(e)}else r=z3(t);r!==t&&(n[e]=r)}})},T7=()=>e=>{D(e,`element`,e=>{let t=e.tagName.toLowerCase(),n=e.properties;if(!n)return;if(t===`a`||t===`area`||t===`link`||t===`base`){let e=n.href;typeof e==`string`&&!qZ(e)&&delete n.href}if(t===`img`||t===`iframe`||t===`script`||t===`embed`||t===`source`||t===`audio`||t===`video`||t===`track`){let e=n.src;typeof e==`string`&&!qZ(e)&&delete n.src}if(t===`form`){let e=n.action;typeof e==`string`&&!qZ(e)&&delete n.action}if(t===`img`||t===`source`){let e=n.srcSet;typeof e==`string`&&!C7(e)&&delete n.srcSet;let t=n.srcset;typeof t==`string`&&!C7(t)&&delete n.srcset}if(t===`video`){let e=n.poster;typeof e==`string`&&!qZ(e)&&delete n.poster}let r=n.style;typeof r==`string`&&!aae(r)&&delete n.style})};function lae(e){let t=le().use(Ee,{handlers:S7}).use(w7).use(T7).use(jK),n=t.runSync(e);return String(t.stringify(n))}function uae(e){let t=/\r?\n|\r/g,n=[],r=0,i=t.exec(e);for(;i!==null;)n.push(E7(e.slice(r,i.index),r>0,!0),i[0]),r=i.index+i[0].length,i=t.exec(e);return n.push(E7(e.slice(r),r>0,!1)),n.join(``)}function E7(e,t,n){let r=0,i=e.length,a=e=>e===9||e===32;for(;t&&r<i&&a(e.charCodeAt(r));)r++;for(;n&&i>r&&a(e.charCodeAt(i-1));)i--;return i>r?e.slice(r,i):``}var D7=/\r?\n|\r/,dae=(e,t)=>{let n=uae(String(t.value));if(!D7.test(n)){let r={type:`text`,value:n};return e.patch(t,r),e.applyData(t,r)}let r=n.split(D7),i=[];for(let e=0;e<r.length;e++)e>0&&i.push({type:`element`,tagName:`br`,properties:{},children:[]}),r[e].length>0&&i.push({type:`text`,value:r[e]});return i};function fae(e){let t=le().use(ye).use(XP,[`yaml`]).use(a5).use(ue).use(O5).use(M3).use(g5).use(q3).use(Ee,{handlers:{...S7,text:dae}}).use(w7).use(T7).use(jK);return String(t.processSync(A3(K3(e))))}qI(),fI(),pI(),R({docName:g1,summary:y1,content:P().optional(),...v1}).loose(),R({docName:g1,summary:y1,markdown:P(),position:B([`append`,`prepend`,`replace`]).optional(),extension:B(pZ).optional(),...v1}).loose(),R({docName:g1,summary:y1,find:P().min(1),replace:P(),offset:F().int().nonnegative().optional(),...v1}).loose(),R({docName:g1,connectionId:P().min(1),scope:B([`last`,`session`,`file`,`count`]).optional(),count:F().int().positive().optional(),...v1}).loose().refine(e=>e.scope!==`count`||e.count!==void 0,{message:`count is required when scope is 'count'`,path:[`count`]});var O7=R({value:P(),truncatedFrom:F().int().nonnegative().optional(),hint:P().optional()}).loose(),pae=co(`kind`,[R({kind:V(`inline`),content:P()}),R({kind:V(`truncated`),byteLength:F().int().nonnegative(),hint:P()})]),k7=R({kind:V(`content-divergence`),intendedBytes:F().int().nonnegative(),actualBytes:F().int().nonnegative(),byteDelta:F().int(),divergenceType:P().optional(),currentState:pae.optional(),hint:P().optional()}).loose(),mae=R({type:V(`orphan`),parentCandidates:L(P()),message:P()}).loose(),A7=R({kind:V(`disk-edit-reconciled`),intendedBytes:F().int().nonnegative(),actualBytes:F().int().nonnegative(),byteDelta:F().int(),mergeOutcome:P().optional(),hint:P().optional()}).loose(),j7=co(`kind`,[k7,A7]),M7=L(co(`kind`,[k7,A7,R({kind:V(`mermaid-parse-error`),fenceIndex:F().int().positive(),fenceFirstLine:P(),message:P(),line:F().int().positive().optional()}).loose(),R({kind:V(`lint-violation`),source:P(),code:P(),message:P(),severity:B([`error`,`warning`,`info`,`hint`]),line:F().int().positive(),column:F().int().positive(),linkTarget:P().optional()}).loose()])).min(1),N7=L(R({href:P(),resolvedTo:P().nullable(),reason:B([`no-such-doc`,`no-such-file`,`unresolvable`])}).loose());R({timestamp:P().min(1),summary:O7.optional(),warning:j7.optional(),warnings:M7.optional()}).loose(),R({timestamp:P().min(1),subscriberCount:F().int().nonnegative(),systemSubscriberCount:F().int().nonnegative(),hints:L(mae).optional(),summary:O7.optional(),warning:j7.optional(),warnings:M7.optional(),brokenLinks:N7}).loose(),R({timestamp:P().min(1),subscriberCount:F().int().nonnegative(),systemSubscriberCount:F().int().nonnegative(),summary:O7.optional(),warning:j7.optional(),warnings:M7.optional(),brokenLinks:N7}).loose(),R({docName:P().min(1),scope:B([`last`,`session`,`count`]),undone:I()}).loose(),R({docs:L(R({docName:_1,markdown:P(),position:B([`append`,`prepend`,`replace`]).optional(),extension:B(pZ).optional(),summary:y1}).loose()).min(1).max(100),...v1}).loose();var hae=R({type:z1,title:P(),detail:P().optional()}).loose(),gae=co(`status`,[R({status:V(`written`),docName:P().min(1),summary:O7.optional(),warnings:M7.optional(),brokenLinks:N7}).loose(),R({status:V(`error`),docName:P().min(1),error:hae}).loose()]);R({timestamp:P().min(1),results:L(gae),written:F().int().nonnegative(),failed:F().int().nonnegative()}).loose(),R({docName:g1,patch:uo(P(),so([Dp,no()])),types:uo(P(),B(wp)).optional(),summary:y1,...v1}).loose(),R({timestamp:P().min(1),subscriberCount:F().int().nonnegative(),systemSubscriberCount:F().int().nonnegative(),appliedKeys:L(P()),summary:O7.optional(),warning:j7.optional(),warnings:M7.optional(),brokenLinks:N7}).loose(),R({entries:L(R({level:B([`info`,`warn`,`error`]),message:P().max(kX),event:P().optional(),fields:uo(P(),io()).optional(),ts:F().optional(),sourceId:P().optional(),lineNumber:F().optional()}).loose()).max(100),droppedSinceLastFlush:F().int().min(0).optional()}).loose(),R({accepted:F().int().min(0)}).loose();var _ae=R({exact:P().min(1),prefix:P(),suffix:P(),start:F().int().nonnegative(),end:F().int().nonnegative()}),vae=L(so([P(),F().int().nonnegative()])),yae=co(`kind`,[R({kind:V(`body`)}),R({kind:V(`property`),key:P().min(1),path:vae.default([])})]).default({kind:`body`}),bae=B([`anchored`,`orphaned`,`resolved`]),P7=R({threadId:P().min(1),docName:P().min(1),target:yae,anchor:_ae.nullable(),state:bae,queued:I(),latestComment:P(),createdBy:P().min(1),createdAt:F()}),F7=R({docName:P(),instruction:P(),property:P().nullable(),passage:R({exact:P(),prefix:P(),suffix:P()}).nullable(),anchorLost:I(),passageRepeats:I()}).loose(),I7=R({threadId:P(),ok:V(!0)}),L7=R({threadId:P(),ok:V(!1),error:V(`not-found`)});R({threads:L(P7)}).loose();var xae=R({meta:P7,orphaned:I()}).loose(),Sae=R({threadId:P()}).loose();R({meta:P7,payload:F7}).loose();var Cae=R({results:L(so([I7.extend({meta:P7,payload:F7}),L7]))}).loose(),wae=R({results:L(so([I7.extend({meta:P7}),L7]))}).loose(),Tae=R({status:P().min(1),reason:P()}).loose(),Eae=R({docName:P().min(1),content:P(),lifecycle:Tae.nullable()}).loose(),R7=R({kind:B([`document`,`asset`,`folder`,`file`]).default(`document`),docName:P().min(1).optional(),docExt:P().min(1).default(`.md`),size:F().int().nonnegative(),modified:P().min(1),isSymlink:I().default(!1),canonicalDocName:P().nullable().default(null),targetPath:P().nullable().default(null),path:P().min(1).optional(),assetExt:P().min(1).optional(),mediaKind:B([`image`,`video`,`audio`,`pdf`,`text`,`mermaid`]).nullable().optional(),referencedBy:L(P().min(1)).optional(),hasChildren:I().optional()}).loose().refine(e=>e.kind===`document`?e.docName!==void 0&&e.path===void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.kind===`folder`?e.docName===void 0&&e.path!==void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0:e.kind===`file`?e.path!==void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.path!==void 0&&e.assetExt!==void 0&&e.referencedBy!==void 0&&e.hasChildren===void 0,{message:`document/asset/folder/file kind must match its required fields (document → docName; asset → path+assetExt+referencedBy; folder → path only, no docName; file → path, no mediaKind/referencedBy/hasChildren)`}),Dae=R({documents:L(R7),truncated:I().optional()}).loose(),Oae=R({source:P().min(1),anchor:P().nullable(),title:P(),snippet:P().nullable()}).loose(),kae=R({docName:P().min(1),backlinks:L(Oae)}).loose(),Aae=R({counts:uo(P().min(1),F().int().nonnegative())}).loose();R({counts:uo(P().min(1),F().int().nonnegative())}).loose();var jae=co(`kind`,[R({kind:V(`doc`),docName:P().min(1),anchor:P().nullable(),title:P(),snippet:P().nullable()}).loose(),R({kind:V(`external`),url:P().min(1),title:P(),snippet:P().nullable()}).loose()]),Mae=R({docName:P().min(1),forwardLinks:L(jae)}).loose(),Nae=co(`kind`,[R({id:P().min(1),kind:V(`doc`),docName:P().min(1),anchor:P().nullable(),label:P(),cluster:P().nullable(),category:P().nullable(),tags:L(P()).nullable()}).loose(),R({id:P().min(1),kind:V(`external`),url:P().min(1),label:P()}).loose()]),Pae=R({source:P().min(1),target:P().min(1)}).loose(),Fae=R({nodes:L(Nae),links:L(Pae)}).loose(),Iae=R({ts:F().int().min(0),url:P(),method:P(),ua:P().optional(),origin:P().optional(),referer:P().optional(),host:P().optional(),remote:P().optional(),secChUa:P().optional(),secChUaMobile:P().optional(),secChUaPlatform:P().optional(),secFetchSite:P().optional(),secFetchDest:P().optional(),secFetchMode:P().optional(),secFetchUser:P().optional()}).loose(),Lae=R({app:so([V(`cursor`),V(`codex`),V(`claude`),no()]),signals_fired:L(P())}).loose();R({entries:L(Iae),count:F().int().min(0),detection:Lae}).loose(),R({writers:L(R({id:P().min(1),name:P().optional(),email:P().optional()}).loose()).optional(),summary:y1,...v1}).loose(),R({checkpointRef:P().min(1)}).loose();var Rae=R({v:F().int().optional(),id:P().min(1),name:P().min(1),colorSeed:P().optional(),docs:L(P()),summaries:L(P()).optional()}).loose();R({entries:L(R({sha:P().min(1),timestamp:P().min(1),author:P(),authorEmail:P(),type:B([`checkpoint`,`wip`,`upstream`,`park`]),message:P(),contributors:L(Rae),checkpoint:io().nullable(),parentSha:P().nullable().optional()}).loose()),total:F().int().nonnegative().optional(),truncated:I().optional(),hasMore:I().optional()}).loose(),R({sha:P().regex(/^[0-9a-f]{40}$/i),content:P(),timestamp:P(),author:P()}).loose();var zae=R({contentDir:P().min(1),pathSeparator:B([`/`,`\\`]),symlinkResolved:I()}).loose();L(co(`source`,[R({docName:P().min(1),timestamp:P().min(1),size:F().int().nonnegative(),source:V(`flat`)}).loose(),R({docName:P().min(1),timestamp:P().min(1),source:V(`timeline`),sha:P().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."});var Bae=R({domain:P().min(1),title:P().optional(),description:P().optional(),siteName:P().optional(),faviconDataUri:P().optional()}).loose();R({url:P()}).loose();var Vae=co(`ok`,[R({ok:V(!0),metadata:Bae}).loose(),R({ok:V(!1),reason:P()}).loose()]),Hae=R({orphans:L(R({docName:P().min(1),title:P()}).loose())}).loose(),Uae=R({hubs:L(R({docName:P().min(1),title:P(),count:F().int().nonnegative()}).loose())}).loose(),Wae=R({source:P().min(1),title:P(),snippet:P().nullable()}).loose();R({deadLinks:L(R({target:P().min(1),sources:L(Wae)}).loose())}).loose(),R({target:R({docName:P().min(1),title:P(),aliases:L(P())}).loose(),mentions:L(R({source:P().min(1),excerpt:P(),offset:F().int().nonnegative()}).loose()),truncated:I()}).loose(),R({projectPath:P().min(1)}).loose();var Gae=B([`not-a-git-worktree`,`init-failed`]);co(`ok`,[R({ok:V(!0),projectPath:P().min(1)}).loose(),R({ok:V(!1),reason:Gae,message:P().min(1)}).loose()]),R({host:P().min(1).optional()}).loose(),R({host:P().min(1).optional(),token:P().min(1)}).loose(),R({host:P(),login:P()}).loose(),R({key:P().min(1)}).loose(),R({keyPresent:I()}).loose();var Kae=B([`no_key`,`invalid_endpoint`,`rate_limit`,`timeout`,`http_error`,`network`,`dims_mismatch`,`malformed_response`]),qae=co(`ok`,[R({ok:V(!0),endpoint:P().min(1),model:P().min(1),dimensions:F().int().positive()}).loose(),R({ok:V(!1),endpoint:P().min(1),model:P().min(1),reason:Kae,status:F().int().optional()}).loose()]);R({name:P().refine(e=>e.trim().length>0,{message:`name must be non-empty`}),email:P().refine(e=>e.trim().length>0,{message:`email must be non-empty`})}).loose(),R({authenticated:I()}).loose(),R({channel:B([`login`,`gh-login`]).default(`login`)}).loose(),R({}).loose();var Jae=R({stackIndex:F().int().min(0),ts:F().int().min(0),additions:F().int().min(0),deletions:F().int().min(0)}).loose(),Yae=R({docName:P().min(1),additionsTotal:F().int().min(0),deletionsTotal:F().int().min(0),lastTs:F().int().min(0),bursts:L(Jae)}).loose(),Xae=R({displayName:P().min(1),color:P().min(1),icon:P().optional(),connectionId:P().min(1)}).loose(),Zae=R({sessionAlive:I(),agent:Xae.nullable(),files:L(Yae)}).loose(),Qae=R({diff:P(),before:P(),after:P(),generatedAt:F().int().min(0)}).loose();R({}).loose(),R({}).loose(),R({}).loose(),R({}).loose(),R({}).loose(),R({}).loose();var $ae=R({displayName:P().min(1),icon:P(),color:P().min(1),currentDoc:P().nullable(),mode:B([`idle`,`writing`]),ts:F().int().min(0)}).loose();R({presence:uo(P().min(1),$ae)}).loose();var eoe=R({sessionId:P().min(1),agentType:P().min(1),ts:F().int().min(0),insertedChars:F().int().min(0),deletedChars:F().int().min(0)}).loose();R({effects:L(R({"doc.name":P().min(1),entries:L(eoe)}).loose())}).loose(),R({decisions:L(R({ts:F().int().min(0),decision:P().min(1),kind:P().min(1),"doc.name":P().min(1),pathRole:P().min(1)}).loose())}).loose(),uo(P().min(1),I()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`}),R({path:P().min(1,`path must be non-empty`)}).loose(),R({}).loose();var toe=R({fromDocName:P().min(1),toDocName:P().min(1)}).loose(),noe=R({fromPath:P().min(1),toPath:P().min(1)}).loose();R({}).loose(),R({path:P().min(1),...v1,summary:y1}).loose();var roe=R({docName:P().min(1)}).loose();R({path:P().min(1),...v1,summary:y1}).loose();var ioe=R({path:P().min(1)}).loose();R({kind:B([`file`,`folder`]),path:P().min(1),...v1,summary:y1}).loose();var aoe=R({kind:B([`file`,`folder`]),path:P().min(1),duplicatedDocNames:L(P().min(1))}).loose(),ooe=R({pages:L(R({docName:P().min(1),title:P(),docExt:P().min(1),size:F().int().nonnegative(),modified:P().min(1),icon:P().min(1).max(2048).optional()}).loose())}).loose(),soe=R({level:F().int().min(1).max(6),text:P(),slug:P()}).loose(),coe=R({docName:P().min(1),headings:L(soe)}).loose(),loe=R({docName:P().min(1),rewrites:F().int().nonnegative()}).loose();R({kind:B([`file`,`folder`,`asset`]),fromPath:P().min(1),toPath:P().min(1),...v1,summary:y1}).loose();var uoe=R({renamed:L(toe),renamedAssets:L(noe),rewrittenDocs:L(loe).optional(),summary:O7.optional()}).loose();R({kind:B([`file`,`folder`,`asset`]),path:P().min(1),...v1}).loose();var doe=R({deletedDocNames:L(P().min(1))}).loose();R({kind:B([`file`,`folder`,`asset`]),path:P().min(1),...v1,summary:y1}).loose();var foe=R({deletedDocNames:L(P().min(1))}).loose();R({docName:P().min(1),commitSha:P().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:y1,...v1}).loose(),R({restoredFrom:P().min(1),timestamp:P().min(1),summary:O7.optional(),warning:k7.optional(),warnings:M7.optional()}).loose();var poe=B([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),moe=R({label:P().min(1),webUrl:Fa().nullable()}).loose(),hoe=co(`checkStatus`,[R({checkStatus:V(`allowed`)}).loose(),R({checkStatus:V(`denied`),deniedReason:B([`no-collaborator`,`private-no-access`,`repo-not-found`,`not-authenticated`])}).loose(),R({checkStatus:V(`unknown`),unknownError:B([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`,`ssh-unverified`]).optional()}).loose()]),z7=B([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`semantic-protected-branch`]),goe=B(ju),_oe=B([`succeeded`,`up-to-date`,`conflict`,`refused`,`error`]);R({state:poe,lastSyncUtc:P().nullable(),lastFetchUtc:P().nullable(),lastPushedSha:P().nullable(),ahead:F().int().min(0),behind:F().int().min(0),consecutiveFailures:F().int().min(0),conflictCount:F().int().min(0),hasRemote:I(),syncEnabled:I(),identityUnresolved:I(),remote:moe.nullable().optional(),pushError:P().optional(),pushErrorCode:z7.optional(),pullError:P().optional(),pullErrorCode:z7.optional(),pausedReason:P().optional(),pushPermission:hoe.optional(),syncMode:goe.optional(),lastPullUtc:P().nullable().optional(),lastPullOutcome:_oe.nullable().optional()}).loose(),R({op:B([`sync`,`push`,`pull`]).optional()}).loose(),R({op:B([`sync`,`push`,`pull`])}).loose(),R({conflicts:L(R({file:P().min(1),detectedAt:P().min(1),oursSha:P().optional(),theirsSha:P().optional(),baseSha:P().optional()}).loose())}).loose(),R({file:P().min(1),strategy:B([`mine`,`theirs`,`content`,`delete`]),content:P().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0&&e.content!==``,{message:`content must be a non-empty string when strategy is 'content'`,path:[`content`]}),R({}).loose(),R({file:P().min(1),base:P(),ours:P(),theirs:P(),kind:B([`both-modified`,`delete-modify`,`modify-delete`]),lifecycleStatus:P().nullable()}).loose(),R({plan:Ro(e=>e!==void 0,{message:`plan is required`})}).loose(),R({plan:Ro(e=>e!==void 0,{message:`plan is required`})}).loose(),R({result:Ro(e=>e!==void 0,{message:`result is required`})}).loose();var voe=R({path:P().min(1),summary:P().min(1)}).loose(),yoe=R({files:F().int().nonnegative(),folders:F().int().nonnegative()}).loose();R({packs:L(R({id:P().min(1),name:P().min(1),description:P().min(1),defaultSubfolder:P().optional(),folders:L(voe),entryCounts:yoe}).loose())}).loose(),R({noOpen:I().optional(),out:P().min(1).optional()}).loose();var boe=R({reason:B([`unsupported-platform`,`spawn-error`]),message:P()}).loose();co(`status`,[R({status:V(`installed`),outputPath:P(),size:F().int().nonnegative(),sha256:P(),skillVersion:P()}).loose(),R({status:V(`built`),outputPath:P(),size:F().int().nonnegative(),sha256:P(),skillVersion:P(),handoffError:boe.optional()}).loose(),R({status:V(`failed`),buildError:P()}).loose(),R({status:V(`skip-current`),skillVersion:P(),recordedAt:P().optional()}).loose()]);var B7=B(dp);function xoe(e){return e===`agents`||dp.includes(e)}R({tags:L(R({name:P().min(1),count:F().int().nonnegative(),isLeaf:I()}).loose())}).loose();var Soe=R({docName:P().min(1),title:P(),matchingTags:L(P().min(1)),snippet:P().nullable()}).loose();R({name:P().min(1),docs:L(Soe)}).loose(),R({folder:io(),frontmatter_local:uo(P(),io()).nullable()}).loose(),R({path:P(),frontmatter:uo(P(),io()).optional()}).loose(),R({applied:io()}).loose();var V7=uo(P(),io()).meta({description:`Free-form frontmatter map embedded in template payloads.`});R({template:R({name:P().min(1),folder:P(),scope:B([`local`,`inherited`]),path:P().min(1),frontmatter:V7,body:P()}).strict()}).strict();var Coe=R({templates:L(R({name:P().min(1),title:P().optional(),description:P().optional(),path:P().min(1),source_folder:P()}).strict()),truncated:I()}).strict();R({folder:P(),name:P(),body:P().optional(),frontmatter:V7.optional(),...v1,summary:y1}).strict(),R({path:P().min(1),created:I(),warnings:L(P())}).strict(),R({sourcePath:P().min(1),targetFolder:P(),name:P().optional(),title:P().optional(),deleteSource:I().optional(),...v1,summary:y1}).strict(),R({path:P().min(1),created:I(),warnings:L(P())}).strict(),R({existed:I(),path:P().min(1)}).strict(),R({fromFolder:P(),fromName:P(),toFolder:P(),toName:P(),body:P().optional(),frontmatter:V7.optional(),...v1,summary:y1}).strict(),R({from:P().min(1),to:P().min(1),committed:I()}).strict();var H7=B(zf),woe=/^[a-z0-9-]+$/,Toe=/^[A-Za-z0-9_-]+$/,U7=R({name:P(),description:P()}).strict();R({skill:R({name:P().min(1),scope:H7,path:P().min(1),frontmatter:U7,body:P(),files:L(R({path:P().min(1),text:P().nullable()})).optional(),managed:I().optional()}).strict()}).strict();var Eoe=R({source:P().min(1),publisher:P().optional(),skill:P().optional(),marketplaceUrl:P().optional(),importedAt:P().min(1),autoUpdate:I().optional()}).strict(),Doe=R({skills:L(R({name:P().min(1),description:P().optional(),scope:H7,path:P().min(1),absolutePath:P().min(1).optional(),installed:I(),hosts:L(P()),driftPaths:L(P()).optional().meta({description:`Recorded locations whose on-disk form (copy vs symlink) no longer matches what OK last wrote there — evidence another tool rewrote the path.`}),hostAliases:uo(P(),P()).optional().meta({description:`Host skills roots that are symlink ALIASES of another location (host id → base-relative target root). An aliased folder is a derived view — no menu row, never a write target; the host's icon rides the target root's row.`}),conflictHosts:L(P()).optional().meta({description:`Hosts whose dir holds a DIFFERENT same-name skill (fork/conflict) — occupied, not this skill.`}),symlinkedHosts:L(P()).optional(),installableEditors:L(P()).optional(),linkMode:I().optional(),customPlacements:L(R({path:P(),mode:B([`copy`,`link`])}).strict()).optional(),managed:I().optional(),origin:Eoe.optional(),modified:I().optional(),revertable:I().optional()}).strict()),truncated:I()}).strict();R({scope:H7.default(`project`),name:P().meta({description:`Managed skill name to create or update.`}),body:P().optional(),frontmatter:U7,...v1,summary:y1}).strict(),R({path:P().min(1),created:I(),warnings:L(P())}).strict(),R({scope:H7.default(`project`),name:P(),dryRun:I().optional(),setAutoUpdate:I().optional(),...v1,summary:y1}).strict(),R({name:P().min(1),updated:I(),source:P().min(1),localBody:P().optional(),upstreamBody:P().optional(),gitTracked:I().optional(),warnings:L(P())}).strict(),R({scope:H7.default(`project`),name:P(),...v1,summary:y1}).strict(),R({name:P().min(1),baselineRef:P().min(1),restoredFiles:L(P()),warnings:L(P())}).strict(),R({existed:I(),path:P().min(1)}).strict(),R({scope:H7.default(`project`),fromName:P(),toName:P(),body:P().optional(),frontmatter:U7.optional(),...v1,summary:y1}).strict(),R({from:P().min(1),to:P().min(1),committed:I()}).strict(),R({name:P(),fromScope:H7,toScope:H7,...v1,summary:y1}).strict(),R({scope:H7,path:P().optional()}).strict(),R({scope:H7,name:P(),toName:P(),...v1,summary:y1}).strict(),R({name:P().min(1)}).strict(),R({name:P(),home:P().min(1)}).strict(),R({docName:P().min(1)}).strict();var W7=B([`reference`,`script`,`file`]);R({scope:H7.default(`project`),name:P(),path:P().min(1),content:P(),...v1,summary:y1}).strict(),R({path:P().min(1),created:I(),kind:W7,content:I()}).strict(),R({scope:H7.default(`project`),name:P(),from:P().min(1),to:P().min(1),...v1,summary:y1}).strict(),R({from:P().min(1),to:P().min(1),fromDocName:P().optional(),toDocName:P().optional()}).strict(),R({path:P().min(1),kind:W7,text:P()}).strict(),R({path:P().min(1),existed:I(),kind:W7}).strict();var G7=so([B7,V(`agents`)]),K7=P().min(1).refine(e=>!e.startsWith(`/`)&&!e.startsWith(`~`)&&!/^[A-Za-z]:/.test(e),{error:`a custom root is base-relative (e.g. ".tim/skills"), not absolute or ~-prefixed`}).refine(e=>e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`),{error:`a custom root may not contain "..", "." or empty path segments`}).refine(e=>e.includes(`/`),{error:`a custom root is a path (e.g. ".tim/skills") — bare editor names are host ids`}),q7=so([G7,K7]);R({scope:H7.default(`project`),name:P(),targets:L(G7).optional().meta({description:'SET-EXACT install targets (editor ids, plus "agents" for the .agents hub — in-place skills only): the COMPLETE resulting host set. Omit to use project-configured editors; pass [] to uninstall everywhere. Stateless callers should prefer `add`/`remove`.'}),add:L(q7).optional().meta({description:`Locations to ADD the skill to (everything else untouched). Editor ids fan out a managed copy/symlink; a custom root path (".tim/skills") places the bundle there.`}),remove:L(q7).optional().meta({description:"Locations to REMOVE the skill from (lossless only — a hand-edited fork is refused, never deleted). The source cannot be removed; move it first with `source`."}),mode:B([`copy`,`link`]).optional().meta({description:`"link": one real folder (the source); every other location becomes a symlink to it. "copy": independent real folders, refreshed from the source until hand-edited (a hand-edit forks that copy). Converts existing locations losslessly. Omit to follow the form the skill already uses.`}),source:q7.optional().meta({description:`Move the skill's REAL folder to this location (the old source becomes a symlink to it — never a removal). Sticky across rescans.`}),linkMode:I().optional(),setSource:P().min(1).optional(),place:R({dir:P().min(1).meta({description:`Project-relative directory the bundle dir is created under (e.g. ".windsurf/skills").`}),mode:B([`copy`,`link`])}).strict().optional(),convert:R({target:q7.meta({description:`The installed location to convert — an editor id, "agents", or a recorded custom placement path.`}),mode:B([`copy`,`link`]).meta({description:`"link": replace this location with a symlink to the source. "copy": replace it with an independent real folder.`})}).strict().optional(),unplace:R({path:P().min(1).meta({description:`The recorded placement bundle path (e.g. ".windsurf/skills/my-skill").`})}).strict().optional(),...v1,summary:y1,fork:R({editor:P().min(1),action:B([`align`,`make-source`,`rename`]),toName:P().optional()}).strict().optional()}).strict().refine(e=>!(e.targets!==void 0&&(e.add!==void 0||e.remove!==void 0)),{error:"`targets` is set-exact; `add`/`remove` are additive — use one style per call"}).refine(e=>e.fork===void 0||e.targets===void 0&&e.add===void 0&&e.remove===void 0&&e.source===void 0&&e.setSource===void 0,{error:"`fork` is its own operation — run it in a separate call"}).refine(e=>e.fork?.action!==`rename`||e.fork.toName!==void 0,{error:"`fork.rename` requires `toName`"}).refine(e=>!(e.source!==void 0&&(e.add!==void 0||e.remove!==void 0)),{error:"a `source` move is its own operation — run it in a separate call from `add`/`remove`"}).refine(e=>[e.targets!==void 0||e.add!==void 0||e.remove!==void 0,e.place!==void 0,e.unplace!==void 0,e.convert!==void 0,e.source!==void 0||e.setSource!==void 0,e.fork!==void 0].filter(Boolean).length<=1,{error:"one operation per call — membership (`targets`/`add`/`remove`), `place`, `unplace`, `convert`, `source`, and `fork` are mutually exclusive"}),R({name:P().min(1).meta({description:`Managed skill name installed or uninstalled.`}),hosts:L(P()).meta({description:`Editor ids the skill is projected into after the operation; [] is expected after uninstall.`}),scripts:I().meta({description:`True when the skill ships executable scripts, projected but never run.`}),warnings:L(P()).meta({description:`Non-fatal install/uninstall warnings from target projection.`}),warningCodes:L(B([`no-targets`,`scripts-present`,`name-conflict`,`no-description`,`skill-fork-name-unpatched`,`place-path-invalid`,`place-fork-refused`])).meta({description:"Machine-readable warning codes aligned with `warnings`."}),placedAt:P().optional(),sourceMovedTo:P().optional()}).strict(),R({scope:H7.default(`project`),name:P().meta({description:`Managed skill name to uninstall without deleting source.`})}).strict(),R({name:P().min(1).meta({description:`Managed skill name requested for uninstall.`}),uninstalled:I().meta({description:`True when an install marker existed and was removed; false for an idempotent no-op.`})}).strict();var Ooe=R({targets:L(B7),configured:I(),folders:L(R({scope:H7,host:P(),root:P(),state:B([`own`,`linked`,`linked-parent`,`absent`]),target:P().optional(),drift:V(!0).optional(),expected:P().optional()}).strict()).optional()}).strict();R({folderAction:co(`action`,[R({action:V(`link`),scope:H7,root:P().min(1).meta({description:`The folder to link (e.g. ".codex/skills").`}),target:P().min(1).meta({description:`The root it merges into (e.g. ".agents/skills"). Required.`})}).strict(),R({action:V(`unlink`),scope:H7,root:P().min(1).meta({description:`The linked folder to materialize back.`}),exclude:L(P().min(1)).optional().meta({description:`Skill names to LEAVE OUT when materializing — the folder keeps every other skill it currently sees (as per-skill links) and stops auto-following the target root.`})}).strict(),R({action:V(`add-root`),scope:H7,root:K7.meta({description:`New custom skills root to declare (base-relative, e.g. ".team/skills").`})}).strict()])}).strict(),R({targets:L(B7),reprojected:L(R({name:P(),hosts:L(P())}).strict()),bundleHosts:L(P()),removedFrom:L(P()),folder:R({moved:L(P()),dropped:L(P()),linked:L(P())}).strict().optional()}).strict(),R({scope:H7.default(`project`),name:P(),version:P().regex(/^[0-9a-f]{40}$/i),...v1,summary:y1}).strict(),R({name:P().min(1),version:P(),restoredFiles:L(P()),warnings:L(P())}).strict(),R({query:P().optional(),intent:B([`autocomplete`,`full_text`,`omnibar`]).optional(),ranking:B([`navigation`,`relevance`]).optional(),scopes:L(B([`page`,`folder`,`content`,`file`])).optional(),scope:P().optional(),limit:F().int().nonnegative().optional(),semantic:I().optional(),source:B([`omnibar`,`mcp`,`http`]).optional()}).loose();var koe=R({kind:B([`page`,`folder`,`content`,`file`]),path:P().min(1),title:P(),score:F(),signals:uo(P(),io()),snippet:P().optional()}).loose(),Aoe=R({capable:I(),applied:I(),coverage:R({embedded:F().int().nonnegative(),total:F().int().nonnegative()})}).loose();R({enabled:I(),keyPresent:I(),keyNotRequired:I(),keySource:B([`project`,`file`,`env`]).nullable(),keyHint:P().nullable(),ready:I(),capable:I(),embedded:F().int().nonnegative(),total:F().int().nonnegative()}).loose(),R({query:P(),intent:B([`autocomplete`,`full_text`,`omnibar`]),results:L(koe),elapsedMs:F().nonnegative(),semantic:Aoe.optional(),truncated:I().optional(),ready:I().optional()}).loose();var joe=R({version:P().min(1),recordedAt:P().min(1)}).loose();R({currentVersion:P().min(1),targets:uo(P(),joe.nullable())}).loose(),R({scope:H7.default(`project`),source:P().min(1).meta({description:`External skill source: full skills.sh skill-page URL (https://www.skills.sh/<owner>/<repo>/<skill>, or https://www.skills.sh/site/<hostname>/<skill> for a website catalog), GitHub owner/repo[/subpath], git URL, or local/file path.`}),skill:P().min(1).optional().meta({description:`Specific skill name to import from a multi-skill source.`}),install:I().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection (the caller installs explicitly afterwards). Default true.`}),...v1,summary:y1}).strict(),R({scope:H7.default(`project`),source:P().min(1).meta({description:`External skill source: full skills.sh skill-page URL, GitHub owner/repo[/subpath], git URL, or local/file path.`}),skills:L(P().min(1)).min(1).max(100).meta({description:`Skill names to import from the source.`}),install:I().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection. Default true.`}),...v1,summary:y1}).strict(),R({results:L(R({requested:P(),status:B([`imported`,`already-imported`,`not-found`,`failed`]),name:P().optional(),collisionRenamedFrom:P().optional(),warnings:L(P()),error:P().optional()}).loose()),imported:F(),alreadyImported:F(),failed:F()}).loose();var Moe=R({source:P(),ref:P().optional(),contentHash:P(),publisher:P().optional()}).loose();R({name:P().min(1).meta({description:`Managed skill name created or matched.`}),path:P().min(1).meta({description:`Store-relative path to the imported skill source.`}),created:I().meta({description:`True when this request created new source files.`}),alreadyImported:I().meta({description:`True when identical content was already present and no files changed.`}),collisionRenamedFrom:P().optional().meta({description:`Original source name when collision handling renamed the import.`}),provenance:Moe,warnings:L(P()).meta({description:`Non-fatal import warnings, such as skipped unsupported files.`})}).loose();var Noe=`server-info`,Poe=`branch-switched`,Foe=`disk-ack`,Ioe=`config-validation-rejected`,Loe=`config-ignore-nested-error`,J7=B([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`,`comments`,`lint-config`]),Roe=R({v:V(1),ch:V(Noe),seq:F(),serverInstanceId:P().min(1),currentBranch:P().min(1).optional()}).loose(),zoe=R({v:V(1),ch:V(Poe),seq:F(),branch:P().min(1)}).loose(),Boe=R({v:V(1),ch:J7,seq:F()}).loose(),Voe=R({v:V(1),ch:V(Foe),seq:F(),docName:P().min(1),sv:P().min(1)}).loose(),Hoe=R({v:V(1),ch:V(Ioe),seq:F(),docName:P().min(1),error:Tf}).loose(),Uoe=R({v:V(1),ch:V(Loe),seq:F(),path:P().min(1),error:P().min(1)}).loose();function Woe(e){let t;try{t=new URL(e)}catch{return null}let n=t.pathname.match(/^\/video\/(\d+)/);if(n)return n[1]??null;let r=t.pathname.match(/^\/(\d+)/);return r?r[1]??null:null}function Goe(e){if(typeof e!=`string`||e.length===0)return e;let t=H2(e);if(t){let e=t.noCookie?`www.youtube-nocookie.com`:`www.youtube.com`,n=t.startSeconds===null?``:`?start=${t.startSeconds}`;return`https://${e}/embed/${t.id}${n}`}if(L2(e)){let t=Woe(e);return t?`https://player.vimeo.com/video/${t}`:e}let n=P2(e);if(n){let e=n.startRaw===null?``:`?t=${n.startRaw}`;return`https://www.loom.com/embed/${n.id}${e}`}return e}var Koe=`https://api.github.com/repos/inkeep/open-knowledge`;async function qoe(e){let{signal:t,...n}=e??{},r=t?AbortSignal.any([AbortSignal.timeout(5e3),t]):AbortSignal.timeout(5e3);try{let e=await fetch(Koe,{headers:{accept:`application/vnd.github+json`,"user-agent":`openknowledge.ai`},...n,signal:r});if(!e.ok)return console.warn(`[github-stars] GitHub API responded ${e.status}`),null;let t=await e.json();return typeof t.stargazers_count==`number`?t.stargazers_count:null}catch(e){return console.warn(`[github-stars] fetch failed: ${e instanceof Error?e.message:String(e)}`),null}}function Joe(e){if(!e)return{height:null,viewerFragment:``};let t=e.split(`&`).filter(e=>e.length>0),n=null,r=[];for(let e of t){let t=e.indexOf(`=`);if(t===-1){r.push(e);continue}let i=e.slice(0,t),a=e.slice(t+1);if(i===`height`){let e=Number.parseInt(a,10);!Number.isNaN(e)&&e>0&&(n=e);continue}r.push(e)}return{height:n,viewerFragment:r.join(`&`)}}new vX.default;var Yoe=R({path:L(so([P(),F()])),message:P(),issueCode:P()});co(`code`,[R({code:V(`SCHEMA_INVALID`),issues:L(Yoe)}),R({code:V(`WRITE_ERROR`),detail:P()})]);function Xoe(e){return{path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message,issueCode:e.code}}function Zoe(e){if(e.code!==`SCHEMA_INVALID`)return{};let t={};for(let n of e.issues){let e=n.path[0];typeof e==`string`&&(t[e]=t[e]?`${t[e]}; ${n.message}`:n.message)}return t}var Y7=/^---[ \t]*\r?\n---[ \t]*(\r?\n|$)/,Qoe=/^---([ \t]*)(?=\r?\n|$)/,X7=e=>e.includes(`\r
570
+ `),i=gie(t);return n.map(e=>vie(e,r,_ie(e,i)))}function gie(e){let t=new Map;return Object.entries(e).forEach(([e,n],r)=>{let i=e.toUpperCase();if(i===`DEFAULT`)return;let a=null;if(n===`error`||n===`warning`)a=n;else if(typeof n==`object`&&n&&!Array.isArray(n)){let e=n.severity;(e===`error`||e===`warning`)&&(a=e)}a!==null&&t.set(i,{entryIndex:r,severity:a})}),t}function _ie(e,t){let n;for(let r of e.ruleNames){let e=t.get(r.toUpperCase());e!==void 0&&(n===void 0||e.entryIndex>n.entryIndex)&&(n=e)}return n?.severity??`warning`}function vie(e,t,n){let[r,i]=e.errorRange??[1,null],a=e.lineNumber-1,o=(r??1)-1,s=t[a]?.length??0,c=i==null?s:Math.min(o+i,s),l=e.fixInfo?[yie(e.fixInfo,e.lineNumber,t)]:void 0;return{range:{start:{line:a,character:o},end:{line:a,character:Math.max(c,o)}},severity:n,source:`markdownlint`,code:e.ruleNames[0]??`MD000`,message:e.errorDetail?`${e.ruleDescription}: ${e.errorDetail}`:e.ruleDescription,...l?{fixes:l}:{}}}function yie(e,t,n){let r=e.lineNumber??t,i=r-1;if(e.deleteCount===-1){if(r<n.length)return{range:{start:{line:i,character:0},end:{line:i+1,character:0}},newText:``};if(i>0){let e=n[i-1]?.length??0;return{range:{start:{line:i-1,character:e},end:{line:i,character:n[i]?.length??0}},newText:``}}return{range:{start:{line:0,character:0},end:{line:0,character:n[0]?.length??0}},newText:``}}let a=(e.editColumn??1)-1;return{range:{start:{line:i,character:a},end:{line:i,character:a+Math.max(0,e.deleteCount??0)}},newText:e.insertText??``}}var bie=so([I(),B(Ad),uo(P(),io())]),xie={id:`markdownlint`,sliceSchema:R({enabled:I(),rules:uo(P(),bie)}),defaultSlice:{enabled:!1,rules:Z5},async lint(e,t){return hie(e,Q5(t.rules))},fix(e,t){return mie(e,Q5(t.rules))}},Sie=R({appliesTo:so([P(),L(P())]).optional(),file:P(),enabled:I().optional(),key:P().optional(),schema:uo(P(),io()).optional()}),s7=[xie,{id:`frontmatter`,sliceSchema:R({enabled:I(),schemas:L(Sie)}),defaultSlice:{enabled:!1,schemas:[]},async lint(e,t,n){return pie(e,t7(t.schemas,n.docName))}}],Cie={enabled:!0,plugins:Object.fromEntries(s7.map(e=>[e.id,e.defaultSlice]))},wie=new Set([`.markdownlint.json`,`.markdownlint.jsonc`]);function Tie(e){return wie.has(e)}function Eie(e){return{enabled:e.enabled??!0,plugins:{markdownlint:{...e.markdownlint,rules:e.markdownlint.rules??Z5},frontmatter:{enabled:e.frontmatter?.enabled??!1,schemas:e.frontmatter?.schemas??[]}}}}var Die=Object.fromEntries(s7.map(e=>[e.id,e.sliceSchema])),Oie=R({effective:R({enabled:I(),plugins:R(Die)}),configFile:P().nullable().optional(),configProblems:L(P()).optional()}),kie=so([I(),uo(P(),io())]);R({ruleId:P().min(1).max(64).regex(/^[A-Za-z][A-Za-z0-9_-]*$/),value:so([kie,no()])}),R({file:P().min(1).max(512),delete:V(!0).optional(),field:P().min(1).max(256).optional(),parentPath:L(so([P().min(1).max(256),R({items:V(!0)}).strict()])).max(8).optional(),removeField:V(!0).optional(),renameTo:P().min(1).max(256).optional(),constraint:R({type:B([`string`,`number`,`boolean`,`array`,`object`]).nullable().optional(),enum:L(so([P(),F(),I()])).nullable().optional(),itemsEnum:L(so([P(),F(),I()])).nullable().optional(),itemsType:B([`string`,`number`,`boolean`,`object`]).nullable().optional(),pattern:P().nullable().optional(),format:P().nullable().optional(),description:P().max(2048).nullable().optional(),required:I().optional()}).optional()}).refine(e=>e.delete===void 0||e.field===void 0&&e.constraint===void 0&&e.removeField===void 0&&e.renameTo===void 0,{message:`delete cannot be combined with a field edit`}).refine(e=>[e.constraint,e.removeField,e.renameTo].filter(e=>e!==void 0).length<=1,{message:`constraint, removeField, and renameTo are mutually exclusive`}).refine(e=>e.removeField===void 0&&e.renameTo===void 0||e.field!==void 0,{message:`removeField and renameTo require field`}).refine(e=>e.parentPath===void 0||e.field!==void 0,{message:`parentPath requires field`}).refine(e=>e.field===void 0?e.constraint===void 0:e.constraint!==void 0||e.removeField!==void 0||e.renameTo!==void 0,{message:`field requires constraint, removeField, or renameTo`});var Aie=R({schemas:L(P()),truncated:I()}).strict(),c7=R({line:F(),character:F()}),l7=R({start:c7,end:c7}),u7=R({range:l7,severity:B([`error`,`warning`,`info`,`hint`]),source:P(),code:P(),message:P(),fixes:L(R({range:l7,newText:P()})).optional()});R({files:L(R({file:P(),diagnostics:L(u7),warnings:L(P()).optional()})),fileCount:F(),errorCount:F(),warningCount:F(),warnings:L(P())});var jie=u7.extend({linkTarget:P().optional()}),Mie=R({files:L(R({file:P(),diagnostics:L(jie)})),fileCount:F(),errorCount:F(),warningCount:F(),warnings:L(P())}),d7=R({errorCount:F().int().nonnegative(),warningCount:F().int().nonnegative()}),Nie=R({files:L(R({file:P(),lint:d7,links:d7})),fileCount:F().int().nonnegative(),errorCount:F().int().nonnegative(),warningCount:F().int().nonnegative(),warnings:L(P())});R({docName:g1,summary:y1,...v1}).loose();var Pie=R({file:P(),fixedCount:F(),diagnostics:L(u7),errorCount:F(),warningCount:F(),warning:P().optional()});function Fie(e){let t=e.trim().replace(/^\.\//,``);if(!t.startsWith(`.ok/schemas/`))return!1;let n=t.slice(12);return n.length>0&&!n.includes(`/`)&&!n.includes(`\\`)&&n!==`.`&&n!==`..`}function Iie(e){let t=e.trim().toLowerCase().split(`/`).pop()??``;return t.endsWith(`.schema.json`)&&t.length>12?!0:Fie(e)&&t.endsWith(`.json`)}var f7=[{id:`MD001`,alias:`heading-increment`,aliases:[`heading-increment`],name:`Heading levels should only increment by one level at a time`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md001.md`,tags:[`headings`],options:[{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`}]},{id:`MD003`,alias:`heading-style`,aliases:[`heading-style`],name:`Heading style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md003.md`,tags:[`headings`],options:[{key:`style`,type:`enum`,description:`Heading style`,enum:[`consistent`,`atx`,`atx_closed`,`setext`,`setext_with_atx`,`setext_with_atx_closed`],default:`consistent`}]},{id:`MD004`,alias:`ul-style`,aliases:[`ul-style`],name:`Unordered list style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md004.md`,tags:[`bullet`,`ul`],options:[{key:`style`,type:`enum`,description:`List style`,enum:[`consistent`,`asterisk`,`plus`,`dash`,`sublist`],default:`consistent`}]},{id:`MD005`,alias:`list-indent`,aliases:[`list-indent`],name:`Inconsistent indentation for list items at the same level`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md005.md`,tags:[`bullet`,`ul`,`indentation`],options:[]},{id:`MD007`,alias:`ul-indent`,aliases:[`ul-indent`],name:`Unordered list indentation`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md007.md`,tags:[`bullet`,`ul`,`indentation`],options:[{key:`indent`,type:`integer`,description:`Spaces for indent`,default:2,minimum:1},{key:`start_indented`,type:`boolean`,description:`Whether to indent the first level of the list`,default:!1},{key:`start_indent`,type:`integer`,description:`Spaces for first level indent (when start_indented is set)`,default:2,minimum:1}]},{id:`MD009`,alias:`no-trailing-spaces`,aliases:[`no-trailing-spaces`],name:`Trailing spaces`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md009.md`,tags:[`whitespace`],options:[{key:`br_spaces`,type:`integer`,description:`Spaces for line break`,default:2,minimum:0},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!1},{key:`list_item_empty_lines`,type:`boolean`,description:`Allow spaces for empty lines in list items`,default:!1},{key:`strict`,type:`boolean`,description:`Include unnecessary breaks`,default:!1}]},{id:`MD010`,alias:`no-hard-tabs`,aliases:[`no-hard-tabs`],name:`Hard tabs`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md010.md`,tags:[`whitespace`,`hard_tab`],options:[{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`ignore_code_languages`,type:`string-array`,description:`Fenced code languages to ignore`,default:[]},{key:`spaces_per_tab`,type:`integer`,description:`Number of spaces for each hard tab`,default:1,minimum:0}]},{id:`MD011`,alias:`no-reversed-links`,aliases:[`no-reversed-links`],name:`Reversed link syntax`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md011.md`,tags:[`links`],options:[]},{id:`MD012`,alias:`no-multiple-blanks`,aliases:[`no-multiple-blanks`],name:`Multiple consecutive blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md012.md`,tags:[`whitespace`,`blank_lines`],options:[{key:`maximum`,type:`integer`,description:`Consecutive blank lines`,default:1,minimum:1}]},{id:`MD013`,alias:`line-length`,aliases:[`line-length`],name:`Line length`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md013.md`,tags:[`line_length`],options:[{key:`line_length`,type:`integer`,description:`Number of characters`,default:80,minimum:1},{key:`heading_line_length`,type:`integer`,description:`Number of characters for headings`,default:80,minimum:1},{key:`code_block_line_length`,type:`integer`,description:`Number of characters for code blocks`,default:80,minimum:1},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`tables`,type:`boolean`,description:`Include tables`,default:!0},{key:`headings`,type:`boolean`,description:`Include headings`,default:!0},{key:`strict`,type:`boolean`,description:`Strict length checking`,default:!1},{key:`stern`,type:`boolean`,description:`Stern length checking`,default:!1}]},{id:`MD014`,alias:`commands-show-output`,aliases:[`commands-show-output`],name:`Dollar signs used before commands without showing output`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md014.md`,tags:[`code`],options:[]},{id:`MD018`,alias:`no-missing-space-atx`,aliases:[`no-missing-space-atx`],name:`No space after hash on atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md018.md`,tags:[`headings`,`atx`,`spaces`],options:[]},{id:`MD019`,alias:`no-multiple-space-atx`,aliases:[`no-multiple-space-atx`],name:`Multiple spaces after hash on atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md019.md`,tags:[`headings`,`atx`,`spaces`],options:[]},{id:`MD020`,alias:`no-missing-space-closed-atx`,aliases:[`no-missing-space-closed-atx`],name:`No space inside hashes on closed atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md020.md`,tags:[`headings`,`spaces`,`atx_closed`],options:[]},{id:`MD021`,alias:`no-multiple-space-closed-atx`,aliases:[`no-multiple-space-closed-atx`],name:`Multiple spaces inside hashes on closed atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md021.md`,tags:[`headings`,`spaces`,`atx_closed`],options:[]},{id:`MD022`,alias:`blanks-around-headings`,aliases:[`blanks-around-headings`],name:`Headings should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md022.md`,tags:[`headings`,`blank_lines`],options:[{key:`include_front_matter`,type:`boolean`,description:`Include front matter content`,default:!1},{key:`lines_above`,type:`unsupported`,description:`Blank lines above heading`,default:1},{key:`lines_below`,type:`unsupported`,description:`Blank lines below heading`,default:1}]},{id:`MD023`,alias:`heading-start-left`,aliases:[`heading-start-left`],name:`Headings must start at the beginning of the line`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md023.md`,tags:[`headings`,`spaces`],options:[]},{id:`MD024`,alias:`no-duplicate-heading`,aliases:[`no-duplicate-heading`],name:`Multiple headings with the same content`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md024.md`,tags:[`headings`],options:[{key:`siblings_only`,type:`boolean`,description:`Only check sibling headings`,default:!1}]},{id:`MD025`,alias:`single-title`,aliases:[`single-title`,`single-h1`],name:`Multiple top-level headings in the same document`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md025.md`,tags:[`headings`],options:[{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`},{key:`level`,type:`integer`,description:`Heading level`,default:1,minimum:1,maximum:6}]},{id:`MD026`,alias:`no-trailing-punctuation`,aliases:[`no-trailing-punctuation`],name:`Trailing punctuation in heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md026.md`,tags:[`headings`],options:[{key:`punctuation`,type:`string`,description:`Punctuation characters`,default:`.,;:!。,;:!`}]},{id:`MD027`,alias:`no-multiple-space-blockquote`,aliases:[`no-multiple-space-blockquote`],name:`Multiple spaces after blockquote symbol`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md027.md`,tags:[`indentation`,`whitespace`,`blockquote`],options:[{key:`list_items`,type:`boolean`,description:`Include list items`,default:!0}]},{id:`MD028`,alias:`no-blanks-blockquote`,aliases:[`no-blanks-blockquote`],name:`Blank line inside blockquote`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md028.md`,tags:[`whitespace`,`blockquote`],options:[]},{id:`MD029`,alias:`ol-prefix`,aliases:[`ol-prefix`],name:`Ordered list item prefix`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md029.md`,tags:[`ol`],options:[{key:`style`,type:`enum`,description:`List style`,enum:[`one`,`ordered`,`one_or_ordered`,`zero`],default:`one_or_ordered`}]},{id:`MD030`,alias:`list-marker-space`,aliases:[`list-marker-space`],name:`Spaces after list markers`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md030.md`,tags:[`ul`,`whitespace`,`ol`],options:[{key:`ul_single`,type:`integer`,description:`Spaces for single-line unordered list items`,default:1,minimum:1},{key:`ol_single`,type:`integer`,description:`Spaces for single-line ordered list items`,default:1,minimum:1},{key:`ul_multi`,type:`integer`,description:`Spaces for multi-line unordered list items`,default:1,minimum:1},{key:`ol_multi`,type:`integer`,description:`Spaces for multi-line ordered list items`,default:1,minimum:1}]},{id:`MD031`,alias:`blanks-around-fences`,aliases:[`blanks-around-fences`],name:`Fenced code blocks should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md031.md`,tags:[`blank_lines`,`code`],options:[{key:`list_items`,type:`boolean`,description:`Include list items`,default:!0}]},{id:`MD032`,alias:`blanks-around-lists`,aliases:[`blanks-around-lists`],name:`Lists should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md032.md`,tags:[`bullet`,`ul`,`blank_lines`,`ol`],options:[]},{id:`MD033`,alias:`no-inline-html`,aliases:[`no-inline-html`],name:`Inline HTML`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md033.md`,tags:[`html`],options:[{key:`allowed_elements`,type:`string-array`,description:`Allowed elements`,default:[]},{key:`table_allowed_elements`,type:`string-array`,description:`Allowed elements in tables`,default:[]}]},{id:`MD034`,alias:`no-bare-urls`,aliases:[`no-bare-urls`],name:`Bare URL used`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md034.md`,tags:[`links`,`url`],options:[]},{id:`MD035`,alias:`hr-style`,aliases:[`hr-style`],name:`Horizontal rule style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md035.md`,tags:[`hr`],options:[{key:`style`,type:`string`,description:`Horizontal rule style`,default:`consistent`}]},{id:`MD036`,alias:`no-emphasis-as-heading`,aliases:[`no-emphasis-as-heading`],name:`Emphasis used instead of a heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md036.md`,tags:[`headings`,`emphasis`],options:[{key:`punctuation`,type:`string`,description:`Punctuation characters`,default:`.,;:!?。,;:!?`}]},{id:`MD037`,alias:`no-space-in-emphasis`,aliases:[`no-space-in-emphasis`],name:`Spaces inside emphasis markers`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md037.md`,tags:[`whitespace`,`emphasis`],options:[]},{id:`MD038`,alias:`no-space-in-code`,aliases:[`no-space-in-code`],name:`Spaces inside code span elements`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md038.md`,tags:[`whitespace`,`code`],options:[]},{id:`MD039`,alias:`no-space-in-links`,aliases:[`no-space-in-links`],name:`Spaces inside link text`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md039.md`,tags:[`whitespace`,`links`],options:[]},{id:`MD040`,alias:`fenced-code-language`,aliases:[`fenced-code-language`],name:`Fenced code blocks should have a language specified`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md040.md`,tags:[`code`,`language`],options:[{key:`allowed_languages`,type:`string-array`,description:`List of languages`,default:[]},{key:`language_only`,type:`boolean`,description:`Require language only`,default:!1}]},{id:`MD041`,alias:`first-line-heading`,aliases:[`first-line-heading`,`first-line-h1`],name:`First line in a file should be a top-level heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md041.md`,tags:[`headings`],options:[{key:`allow_preamble`,type:`boolean`,description:`Allow content before first heading`,default:!1},{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`},{key:`level`,type:`integer`,description:`Heading level`,default:1,minimum:1,maximum:6}]},{id:`MD042`,alias:`no-empty-links`,aliases:[`no-empty-links`],name:`No empty links`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md042.md`,tags:[`links`],options:[]},{id:`MD043`,alias:`required-headings`,aliases:[`required-headings`],name:`Required heading structure`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md043.md`,tags:[`headings`],options:[{key:`headings`,type:`string-array`,description:`List of headings`,default:[]},{key:`match_case`,type:`boolean`,description:`Match case of headings`,default:!1}]},{id:`MD044`,alias:`proper-names`,aliases:[`proper-names`],name:`Proper names should have the correct capitalization`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md044.md`,tags:[`spelling`],options:[{key:`names`,type:`string-array`,description:`List of proper names`,default:[]},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`html_elements`,type:`boolean`,description:`Include HTML elements`,default:!0}]},{id:`MD045`,alias:`no-alt-text`,aliases:[`no-alt-text`],name:`Images should have alternate text (alt text)`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md045.md`,tags:[`accessibility`,`images`],options:[]},{id:`MD046`,alias:`code-block-style`,aliases:[`code-block-style`],name:`Code block style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md046.md`,tags:[`code`],options:[{key:`style`,type:`enum`,description:`Block style`,enum:[`consistent`,`fenced`,`indented`],default:`consistent`}]},{id:`MD047`,alias:`single-trailing-newline`,aliases:[`single-trailing-newline`],name:`Files should end with a single newline character`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md047.md`,tags:[`blank_lines`],options:[]},{id:`MD048`,alias:`code-fence-style`,aliases:[`code-fence-style`],name:`Code fence style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md048.md`,tags:[`code`],options:[{key:`style`,type:`enum`,description:`Code fence style`,enum:[`consistent`,`backtick`,`tilde`],default:`consistent`}]},{id:`MD049`,alias:`emphasis-style`,aliases:[`emphasis-style`],name:`Emphasis style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md049.md`,tags:[`emphasis`],options:[{key:`style`,type:`enum`,description:`Emphasis style`,enum:[`consistent`,`asterisk`,`underscore`],default:`consistent`}]},{id:`MD050`,alias:`strong-style`,aliases:[`strong-style`],name:`Strong style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md050.md`,tags:[`emphasis`],options:[{key:`style`,type:`enum`,description:`Strong style`,enum:[`consistent`,`asterisk`,`underscore`],default:`consistent`}]},{id:`MD051`,alias:`link-fragments`,aliases:[`link-fragments`],name:`Link fragments should be valid`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md051.md`,tags:[`links`],options:[{key:`ignore_case`,type:`boolean`,description:`Ignore case of fragments`,default:!1},{key:`ignored_pattern`,type:`string`,description:`Pattern for ignoring additional fragments`,default:``}]},{id:`MD052`,alias:`reference-links-images`,aliases:[`reference-links-images`],name:`Reference links and images should use a label that is defined`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md052.md`,tags:[`links`,`images`],options:[{key:`ignored_labels`,type:`string-array`,description:`Ignored link labels`,default:[`x`]},{key:`shortcut_syntax`,type:`boolean`,description:`Include shortcut syntax`,default:!1}]},{id:`MD053`,alias:`link-image-reference-definitions`,aliases:[`link-image-reference-definitions`],name:`Link and image reference definitions should be needed`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md053.md`,tags:[`links`,`images`],options:[{key:`ignored_definitions`,type:`string-array`,description:`Ignored definitions`,default:[`//`]}]},{id:`MD054`,alias:`link-image-style`,aliases:[`link-image-style`],name:`Link and image style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md054.md`,tags:[`links`,`images`],options:[{key:`autolink`,type:`boolean`,description:`Allow autolinks`,default:!0},{key:`inline`,type:`boolean`,description:`Allow inline links and images`,default:!0},{key:`full`,type:`boolean`,description:`Allow full reference links and images`,default:!0},{key:`collapsed`,type:`boolean`,description:`Allow collapsed reference links and images`,default:!0},{key:`shortcut`,type:`boolean`,description:`Allow shortcut reference links and images`,default:!0},{key:`url_inline`,type:`boolean`,description:`Allow URLs as inline links`,default:!0}]},{id:`MD055`,alias:`table-pipe-style`,aliases:[`table-pipe-style`],name:`Table pipe style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md055.md`,tags:[`table`],options:[{key:`style`,type:`enum`,description:`Table pipe style`,enum:[`consistent`,`leading_only`,`trailing_only`,`leading_and_trailing`,`no_leading_or_trailing`],default:`consistent`}]},{id:`MD056`,alias:`table-column-count`,aliases:[`table-column-count`],name:`Table column count`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md056.md`,tags:[`table`],options:[]},{id:`MD058`,alias:`blanks-around-tables`,aliases:[`blanks-around-tables`],name:`Tables should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md058.md`,tags:[`table`],options:[]},{id:`MD059`,alias:`descriptive-link-text`,aliases:[`descriptive-link-text`],name:`Link text should be descriptive`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md059.md`,tags:[`links`,`accessibility`],options:[{key:`prohibited_texts`,type:`string-array`,description:`Prohibited link texts`,default:[`click here`,`here`,`link`,`more`]}]},{id:`MD060`,alias:`table-column-style`,aliases:[`table-column-style`],name:`Table column style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md060.md`,tags:[`table`],options:[{key:`style`,type:`enum`,description:`Table column style`,enum:[`any`,`aligned`,`compact`,`tight`],default:`any`},{key:`aligned_delimiter`,type:`boolean`,description:`Aligned delimiter columns`,default:!1}]}],Lie=(()=>{let e=new Map;for(let t of f7){e.set(t.id.toUpperCase(),t.id);for(let n of t.aliases)e.set(n.toUpperCase(),t.id)}return e})();function p7(e){return Lie.get(e.toUpperCase())??null}function Rie(e,t){let n=p7(t);if(n===null)return;let r;for(let[t,i]of Object.entries(e))p7(t)===n&&(r={key:t,value:i});return r}var zie=[`Headings`,`Lists`,`Whitespace`,`Code`,`Links & images`,`Style`],Bie=[[`headings`,`Headings`],[`bullet`,`Lists`],[`ul`,`Lists`],[`ol`,`Lists`],[`links`,`Links & images`],[`images`,`Links & images`],[`accessibility`,`Links & images`],[`code`,`Code`],[`language`,`Code`],[`emphasis`,`Style`],[`html`,`Style`],[`line_length`,`Whitespace`],[`whitespace`,`Whitespace`],[`hard_tab`,`Whitespace`],[`blank_lines`,`Whitespace`],[`indentation`,`Whitespace`]];function Vie(e){for(let[t,n]of Bie)if(e.tags.includes(t))return n;return`Style`}function Hie(e){let t={lint:{errorCount:0,warningCount:0},links:{errorCount:0,warningCount:0}};for(let n of e){let e=n.source===`links`?t.links:t.lint;n.severity===`error`?e.errorCount+=1:e.warningCount+=1}return t}async function Uie(e,t,n){if(!t.enabled)return[];let r=[];for(let i of s7){let a=t.plugins[i.id];a.enabled&&r.push(...await i.lint(e,a,{docName:n}))}return r}var Wie=/\p{M}+/gu,Gie=/[^\p{L}\p{N}]+/gu,Kie=/^-+|-+$/g;function m7(e){return e.trim().normalize(`NFKD`).replace(Wie,``).toLowerCase().replace(Gie,`-`).replace(Kie,``)}function qie(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function h7(e,t){let n=m7(e);return n?qie(n,t):``}function g7(e,t){let n=m7(e);return t?`#${n}-${m7(t)}`:`#${n}`}var _7=new Set([`img`,`video`,`audio`,`mark`,`u`,`ins`]),Jie=new Map(g4.flatMap(e=>e.surface===`compat`&&_7.has(e.rendersAs)?[[e.name,e]]:[]));function v7(e){let t={};for(let n of e.attributes){if(n.type!==`mdxJsxAttribute`)return null;let e=n.name.toLowerCase();if(!(e.length>=3&&e.startsWith(`on`)))if(n.value===null)t[n.name]=!0;else if(typeof n.value==`string`)t[n.name]=n.value;else return null}return t}function y7(e){let t=e.name;if(!t||!_7.has(t))return null;let n=v7(e);return n===null?null:{type:`element`,tagName:t,properties:n,children:[]}}function b7(e){let t=e.name;if(!t)return null;let n=Jie.get(t);if(!n)return null;let r=v7(e);if(r===null)return null;let i=n.translateProps(r),a={};for(let[e,t]of Object.entries(i))(typeof t==`string`||typeof t==`boolean`)&&(a[e]=t);return{type:`element`,tagName:n.rendersAs,properties:a,children:[]}}var Yie=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-link`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:g7(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},Xie=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-embed`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:g7(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},Zie=(e,t)=>{let n=t,r=y7(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=b7(n);if(i){e.patch(t,i);let n=e.applyData(t,i);return n.tagName===`img`?{type:`element`,tagName:`p`,properties:{},children:[n]}:n}let a={type:`element`,tagName:`pre`,properties:{className:[`mdx-component`]},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]}]};return e.patch(t,a),e.applyData(t,a)},Qie=(e,t)=>{let n=t,r=y7(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=b7(n);if(i)return e.patch(t,i),e.applyData(t,i);let a={type:`element`,tagName:`span`,properties:{className:[`mdx-inline`],dataJsxInline:``},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]};return e.patch(t,a),e.applyData(t,a)},$ie=(e,t)=>{let n=t,r=n.data.reason||`unknown`,i=n.value||``,a=r.replace(/--/g,`—`),o={type:`comment`,value:` Parse error: ${a} `},s={type:`element`,tagName:`pre`,properties:{className:[`mdx-fallback`],dataRawMdxFallback:``,dataReason:a},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:i}]}]};return e.patch(t,s),[o,e.applyData(t,s)]},eae=(e,t)=>{let n={type:`element`,tagName:`mark`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tae=(e,t)=>{let n=t,r={type:`element`,tagName:n.data?.sourceForm===`ins`?`ins`:`u`,properties:{},children:e.all(n)};return e.patch(t,r),e.applyData(t,r)};function x7(e){if(typeof e!=`object`||!e)return``;let t=e;return typeof t.value==`string`?t.value:Array.isArray(t.children)?t.children.map(x7).join(``):``}var S7={wikiLink:Yie,wikiLinkEmbed:Xie,mdxJsxFlowElement:Zie,mdxJsxTextElement:Qie,rawMdxFallback:$ie,mark:eae,underline:tae,tag:(e,t)=>{let n=t.value,r={type:`element`,tagName:`a`,properties:{className:[`tag`],dataTag:n,href:`#tag/${n}`},children:[{type:`text`,value:`#${n}`}]};return e.patch(t,r),e.applyData(t,r)},comment:(e,t)=>{let n={type:`comment`,value:x7(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},commentBlock:(e,t)=>{let n={type:`comment`,value:x7(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`sup`,properties:{id:`fnref-${n}`,dataFootnoteRef:``,dataFootnoteId:n,className:[`footnote-ref`]},children:[{type:`element`,tagName:`a`,properties:{href:`#fn-${n}`,className:[`footnote-ref-link`]},children:[{type:`text`,value:`[${n}]`}]}]};return e.patch(t,r),e.applyData(t,r)},footnoteDefinition:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`aside`,properties:{id:`fn-${n}`,dataFootnoteDef:``,dataFootnoteId:n,className:[`footnote-def`]},children:[{type:`element`,tagName:`div`,properties:{className:[`footnote-body`]},children:e.all(t)},{type:`element`,tagName:`a`,properties:{href:`#fnref-${n}`,className:[`footnote-backref`],ariaLabel:`Back to reference`},children:[{type:`text`,value:`↩`}]}]};return e.patch(t,r),e.applyData(t,r)}},nae=/url\s*\(\s*['"]?\s*(?:javascript|vbscript|data)\s*:/i,rae=/\bexpression\s*\(/i,iae=1e4;function aae(e){return!(e.length>iae||nae.test(e)||rae.test(e))}function C7(e){for(let t of e.split(`,`)){let e=t.trim();if(e!==``&&!qZ(e.split(/\s+/)[0]??``))return!1}return!0}var oae={a:[`href`,`title`],img:[`src`,`alt`,`title`],video:[`src`,`title`],audio:[`src`,`title`],code:[`className`]},sae=new Set([`href`,`src`]),cae=ke(`<>`),w7=()=>e=>{D(e,`element`,e=>{let t=oae[e.tagName.toLowerCase()],n=e.properties;if(!(!t||!n))for(let e of t){let t=n[e];if(Array.isArray(t)){let r=t.map(e=>typeof e==`string`?z3(e):e);r.some((e,n)=>e!==t[n])&&(n[e]=r);continue}if(typeof t!=`string`)continue;let r;if(sae.has(e))if(t===`<>`||t===cae)r=``;else{let e=z3(t);r=e===t?t:ke(e)}else r=z3(t);r!==t&&(n[e]=r)}})},T7=()=>e=>{D(e,`element`,e=>{let t=e.tagName.toLowerCase(),n=e.properties;if(!n)return;if(t===`a`||t===`area`||t===`link`||t===`base`){let e=n.href;typeof e==`string`&&!qZ(e)&&delete n.href}if(t===`img`||t===`iframe`||t===`script`||t===`embed`||t===`source`||t===`audio`||t===`video`||t===`track`){let e=n.src;typeof e==`string`&&!qZ(e)&&delete n.src}if(t===`form`){let e=n.action;typeof e==`string`&&!qZ(e)&&delete n.action}if(t===`img`||t===`source`){let e=n.srcSet;typeof e==`string`&&!C7(e)&&delete n.srcSet;let t=n.srcset;typeof t==`string`&&!C7(t)&&delete n.srcset}if(t===`video`){let e=n.poster;typeof e==`string`&&!qZ(e)&&delete n.poster}let r=n.style;typeof r==`string`&&!aae(r)&&delete n.style})};function lae(e){let t=le().use(Ee,{handlers:S7}).use(w7).use(T7).use(jK),n=t.runSync(e);return String(t.stringify(n))}function uae(e){let t=/\r?\n|\r/g,n=[],r=0,i=t.exec(e);for(;i!==null;)n.push(E7(e.slice(r,i.index),r>0,!0),i[0]),r=i.index+i[0].length,i=t.exec(e);return n.push(E7(e.slice(r),r>0,!1)),n.join(``)}function E7(e,t,n){let r=0,i=e.length,a=e=>e===9||e===32;for(;t&&r<i&&a(e.charCodeAt(r));)r++;for(;n&&i>r&&a(e.charCodeAt(i-1));)i--;return i>r?e.slice(r,i):``}var D7=/\r?\n|\r/,dae=(e,t)=>{let n=uae(String(t.value));if(!D7.test(n)){let r={type:`text`,value:n};return e.patch(t,r),e.applyData(t,r)}let r=n.split(D7),i=[];for(let e=0;e<r.length;e++)e>0&&i.push({type:`element`,tagName:`br`,properties:{},children:[]}),r[e].length>0&&i.push({type:`text`,value:r[e]});return i};function fae(e){let t=le().use(ye).use(XP,[`yaml`]).use(a5).use(ue).use(O5).use(M3).use(g5).use(q3).use(Ee,{handlers:{...S7,text:dae}}).use(w7).use(T7).use(jK);return String(t.processSync(A3(K3(e))))}qI(),fI(),pI(),R({docName:g1,summary:y1,content:P().optional(),...v1}).loose(),R({docName:g1,summary:y1,markdown:P(),position:B([`append`,`prepend`,`replace`]).optional(),extension:B(pZ).optional(),...v1}).loose(),R({docName:g1,summary:y1,find:P().min(1),replace:P(),offset:F().int().nonnegative().optional(),...v1}).loose(),R({docName:g1,connectionId:P().min(1),scope:B([`last`,`session`,`file`,`count`]).optional(),count:F().int().positive().optional(),...v1}).loose().refine(e=>e.scope!==`count`||e.count!==void 0,{message:`count is required when scope is 'count'`,path:[`count`]});var O7=R({value:P(),truncatedFrom:F().int().nonnegative().optional(),hint:P().optional()}).loose(),pae=co(`kind`,[R({kind:V(`inline`),content:P()}),R({kind:V(`truncated`),byteLength:F().int().nonnegative(),hint:P()})]),k7=R({kind:V(`content-divergence`),intendedBytes:F().int().nonnegative(),actualBytes:F().int().nonnegative(),byteDelta:F().int(),divergenceType:P().optional(),currentState:pae.optional(),hint:P().optional()}).loose(),mae=R({type:V(`orphan`),parentCandidates:L(P()),message:P()}).loose(),A7=R({kind:V(`disk-edit-reconciled`),intendedBytes:F().int().nonnegative(),actualBytes:F().int().nonnegative(),byteDelta:F().int(),mergeOutcome:P().optional(),hint:P().optional()}).loose(),j7=co(`kind`,[k7,A7]),M7=L(co(`kind`,[k7,A7,R({kind:V(`mermaid-parse-error`),fenceIndex:F().int().positive(),fenceFirstLine:P(),message:P(),line:F().int().positive().optional()}).loose(),R({kind:V(`lint-violation`),source:P(),code:P(),message:P(),severity:B([`error`,`warning`,`info`,`hint`]),line:F().int().positive(),column:F().int().positive(),linkTarget:P().optional()}).loose()])).min(1),N7=L(R({href:P(),resolvedTo:P().nullable(),reason:B([`no-such-doc`,`no-such-file`,`unresolvable`])}).loose());R({timestamp:P().min(1),summary:O7.optional(),warning:j7.optional(),warnings:M7.optional()}).loose(),R({timestamp:P().min(1),subscriberCount:F().int().nonnegative(),systemSubscriberCount:F().int().nonnegative(),hints:L(mae).optional(),summary:O7.optional(),warning:j7.optional(),warnings:M7.optional(),brokenLinks:N7}).loose(),R({timestamp:P().min(1),subscriberCount:F().int().nonnegative(),systemSubscriberCount:F().int().nonnegative(),summary:O7.optional(),warning:j7.optional(),warnings:M7.optional(),brokenLinks:N7}).loose(),R({docName:P().min(1),scope:B([`last`,`session`,`count`]),undone:I()}).loose(),R({docs:L(R({docName:_1,markdown:P(),position:B([`append`,`prepend`,`replace`]).optional(),extension:B(pZ).optional(),summary:y1}).loose()).min(1).max(100),...v1}).loose();var hae=R({type:z1,title:P(),detail:P().optional()}).loose(),gae=co(`status`,[R({status:V(`written`),docName:P().min(1),summary:O7.optional(),warnings:M7.optional(),brokenLinks:N7}).loose(),R({status:V(`error`),docName:P().min(1),error:hae}).loose()]);R({timestamp:P().min(1),results:L(gae),written:F().int().nonnegative(),failed:F().int().nonnegative()}).loose(),R({docName:g1,patch:uo(P(),so([Dp,no()])),types:uo(P(),B(wp)).optional(),summary:y1,...v1}).loose(),R({timestamp:P().min(1),subscriberCount:F().int().nonnegative(),systemSubscriberCount:F().int().nonnegative(),appliedKeys:L(P()),summary:O7.optional(),warning:j7.optional(),warnings:M7.optional(),brokenLinks:N7}).loose(),R({entries:L(R({level:B([`info`,`warn`,`error`]),message:P().max(kX),event:P().optional(),fields:uo(P(),io()).optional(),ts:F().optional(),sourceId:P().optional(),lineNumber:F().optional()}).loose()).max(100),droppedSinceLastFlush:F().int().min(0).optional()}).loose(),R({accepted:F().int().min(0)}).loose();var _ae=R({exact:P().min(1),prefix:P(),suffix:P(),start:F().int().nonnegative(),end:F().int().nonnegative()}),vae=L(so([P(),F().int().nonnegative()])),yae=co(`kind`,[R({kind:V(`body`)}),R({kind:V(`property`),key:P().min(1),path:vae.default([])})]).default({kind:`body`}),bae=B([`anchored`,`orphaned`,`resolved`]),P7=R({threadId:P().min(1),docName:P().min(1),target:yae,anchor:_ae.nullable(),state:bae,queued:I(),latestComment:P(),createdBy:P().min(1),createdAt:F()}),F7=R({docName:P(),instruction:P(),property:P().nullable(),passage:R({exact:P(),prefix:P(),suffix:P()}).nullable(),anchorLost:I(),passageRepeats:I()}).loose(),I7=R({threadId:P(),ok:V(!0)}),L7=R({threadId:P(),ok:V(!1),error:V(`not-found`)});R({threads:L(P7)}).loose();var xae=R({meta:P7,orphaned:I()}).loose(),Sae=R({threadId:P()}).loose();R({meta:P7,payload:F7}).loose();var Cae=R({results:L(so([I7.extend({meta:P7,payload:F7}),L7]))}).loose(),wae=R({results:L(so([I7.extend({meta:P7}),L7]))}).loose(),Tae=R({status:P().min(1),reason:P()}).loose(),Eae=R({docName:P().min(1),content:P(),lifecycle:Tae.nullable()}).loose(),R7=R({kind:B([`document`,`asset`,`folder`,`file`]).default(`document`),docName:P().min(1).optional(),docExt:P().min(1).default(`.md`),size:F().int().nonnegative(),modified:P().min(1),isSymlink:I().default(!1),canonicalDocName:P().nullable().default(null),targetPath:P().nullable().default(null),path:P().min(1).optional(),assetExt:P().min(1).optional(),mediaKind:B([`image`,`video`,`audio`,`pdf`,`text`,`mermaid`]).nullable().optional(),referencedBy:L(P().min(1)).optional(),hasChildren:I().optional()}).loose().refine(e=>e.kind===`document`?e.docName!==void 0&&e.path===void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.kind===`folder`?e.docName===void 0&&e.path!==void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0:e.kind===`file`?e.path!==void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.path!==void 0&&e.assetExt!==void 0&&e.referencedBy!==void 0&&e.hasChildren===void 0,{message:`document/asset/folder/file kind must match its required fields (document → docName; asset → path+assetExt+referencedBy; folder → path only, no docName; file → path, no mediaKind/referencedBy/hasChildren)`}),Dae=R({documents:L(R7),truncated:I().optional()}).loose(),Oae=R({source:P().min(1),anchor:P().nullable(),title:P(),snippet:P().nullable()}).loose(),kae=R({docName:P().min(1),backlinks:L(Oae)}).loose(),Aae=R({counts:uo(P().min(1),F().int().nonnegative())}).loose();R({counts:uo(P().min(1),F().int().nonnegative())}).loose();var jae=co(`kind`,[R({kind:V(`doc`),docName:P().min(1),anchor:P().nullable(),title:P(),snippet:P().nullable()}).loose(),R({kind:V(`external`),url:P().min(1),title:P(),snippet:P().nullable()}).loose()]),Mae=R({docName:P().min(1),forwardLinks:L(jae)}).loose(),Nae=co(`kind`,[R({id:P().min(1),kind:V(`doc`),docName:P().min(1),anchor:P().nullable(),label:P(),cluster:P().nullable(),category:P().nullable(),tags:L(P()).nullable()}).loose(),R({id:P().min(1),kind:V(`external`),url:P().min(1),label:P()}).loose()]),Pae=R({source:P().min(1),target:P().min(1)}).loose(),Fae=R({nodes:L(Nae),links:L(Pae)}).loose(),Iae=R({ts:F().int().min(0),url:P(),method:P(),ua:P().optional(),origin:P().optional(),referer:P().optional(),host:P().optional(),remote:P().optional(),secChUa:P().optional(),secChUaMobile:P().optional(),secChUaPlatform:P().optional(),secFetchSite:P().optional(),secFetchDest:P().optional(),secFetchMode:P().optional(),secFetchUser:P().optional()}).loose(),Lae=R({app:so([V(`cursor`),V(`codex`),V(`claude`),no()]),signals_fired:L(P())}).loose();R({entries:L(Iae),count:F().int().min(0),detection:Lae}).loose(),R({writers:L(R({id:P().min(1),name:P().optional(),email:P().optional()}).loose()).optional(),summary:y1,...v1}).loose(),R({checkpointRef:P().min(1)}).loose();var Rae=R({v:F().int().optional(),id:P().min(1),name:P().min(1),colorSeed:P().optional(),docs:L(P()),summaries:L(P()).optional()}).loose();R({entries:L(R({sha:P().min(1),timestamp:P().min(1),author:P(),authorEmail:P(),type:B([`checkpoint`,`wip`,`upstream`,`park`]),message:P(),contributors:L(Rae),checkpoint:io().nullable(),parentSha:P().nullable().optional()}).loose()),total:F().int().nonnegative().optional(),truncated:I().optional(),hasMore:I().optional()}).loose(),R({sha:P().regex(/^[0-9a-f]{40}$/i),content:P(),timestamp:P(),author:P()}).loose();var zae=R({contentDir:P().min(1),pathSeparator:B([`/`,`\\`]),symlinkResolved:I()}).loose();L(co(`source`,[R({docName:P().min(1),timestamp:P().min(1),size:F().int().nonnegative(),source:V(`flat`)}).loose(),R({docName:P().min(1),timestamp:P().min(1),source:V(`timeline`),sha:P().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."});var Bae=R({domain:P().min(1),title:P().optional(),description:P().optional(),siteName:P().optional(),faviconDataUri:P().optional()}).loose();R({url:P()}).loose();var Vae=co(`ok`,[R({ok:V(!0),metadata:Bae}).loose(),R({ok:V(!1),reason:P()}).loose()]),Hae=R({orphans:L(R({docName:P().min(1),title:P()}).loose())}).loose(),Uae=R({hubs:L(R({docName:P().min(1),title:P(),count:F().int().nonnegative()}).loose())}).loose(),Wae=R({source:P().min(1),title:P(),snippet:P().nullable()}).loose();R({deadLinks:L(R({target:P().min(1),sources:L(Wae)}).loose())}).loose(),R({target:R({docName:P().min(1),title:P(),aliases:L(P())}).loose(),mentions:L(R({source:P().min(1),excerpt:P(),offset:F().int().nonnegative()}).loose()),truncated:I()}).loose(),R({projectPath:P().min(1)}).loose();var Gae=B([`not-a-git-worktree`,`init-failed`]);co(`ok`,[R({ok:V(!0),projectPath:P().min(1)}).loose(),R({ok:V(!1),reason:Gae,message:P().min(1)}).loose()]),R({host:P().min(1).optional()}).loose(),R({host:P().min(1).optional(),token:P().min(1)}).loose(),R({host:P(),login:P()}).loose(),R({key:P().min(1)}).loose(),R({keyPresent:I()}).loose();var Kae=B([`no_key`,`invalid_endpoint`,`rate_limit`,`timeout`,`http_error`,`network`,`dims_mismatch`,`malformed_response`]),qae=co(`ok`,[R({ok:V(!0),endpoint:P().min(1),model:P().min(1),dimensions:F().int().positive()}).loose(),R({ok:V(!1),endpoint:P().min(1),model:P().min(1),reason:Kae,status:F().int().optional()}).loose()]);R({name:P().refine(e=>e.trim().length>0,{message:`name must be non-empty`}),email:P().refine(e=>e.trim().length>0,{message:`email must be non-empty`})}).loose(),R({authenticated:I()}).loose(),R({channel:B([`login`,`gh-login`]).default(`login`)}).loose(),R({}).loose();var Jae=R({stackIndex:F().int().min(0),ts:F().int().min(0),additions:F().int().min(0),deletions:F().int().min(0)}).loose(),Yae=R({docName:P().min(1),additionsTotal:F().int().min(0),deletionsTotal:F().int().min(0),lastTs:F().int().min(0),bursts:L(Jae)}).loose(),Xae=R({displayName:P().min(1),color:P().min(1),icon:P().optional(),connectionId:P().min(1)}).loose(),Zae=R({sessionAlive:I(),agent:Xae.nullable(),files:L(Yae)}).loose(),Qae=R({diff:P(),before:P(),after:P(),generatedAt:F().int().min(0)}).loose();R({}).loose(),R({}).loose(),R({}).loose(),R({}).loose(),R({}).loose(),R({}).loose();var $ae=R({displayName:P().min(1),icon:P(),color:P().min(1),currentDoc:P().nullable(),mode:B([`idle`,`writing`]),ts:F().int().min(0)}).loose();R({presence:uo(P().min(1),$ae)}).loose();var eoe=R({sessionId:P().min(1),agentType:P().min(1),ts:F().int().min(0),insertedChars:F().int().min(0),deletedChars:F().int().min(0)}).loose();R({effects:L(R({"doc.name":P().min(1),entries:L(eoe)}).loose())}).loose(),R({decisions:L(R({ts:F().int().min(0),decision:P().min(1),kind:P().min(1),"doc.name":P().min(1),pathRole:P().min(1)}).loose())}).loose(),uo(P().min(1),I()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`}),R({path:P().min(1,`path must be non-empty`)}).loose(),R({}).loose();var toe=R({fromDocName:P().min(1),toDocName:P().min(1)}).loose(),noe=R({fromPath:P().min(1),toPath:P().min(1)}).loose();R({}).loose(),R({path:P().min(1),...v1,summary:y1}).loose();var roe=R({docName:P().min(1)}).loose();R({path:P().min(1),...v1,summary:y1}).loose();var ioe=R({path:P().min(1)}).loose();R({kind:B([`file`,`folder`]),path:P().min(1),...v1,summary:y1}).loose();var aoe=R({kind:B([`file`,`folder`]),path:P().min(1),duplicatedDocNames:L(P().min(1))}).loose(),ooe=R({pages:L(R({docName:P().min(1),title:P(),docExt:P().min(1),size:F().int().nonnegative(),modified:P().min(1),icon:P().min(1).max(2048).optional()}).loose())}).loose(),soe=R({level:F().int().min(1).max(6),text:P(),slug:P()}).loose(),coe=R({docName:P().min(1),headings:L(soe)}).loose(),loe=R({docName:P().min(1),rewrites:F().int().nonnegative()}).loose();R({kind:B([`file`,`folder`,`asset`]),fromPath:P().min(1),toPath:P().min(1),...v1,summary:y1}).loose();var uoe=R({renamed:L(toe),renamedAssets:L(noe),rewrittenDocs:L(loe).optional(),summary:O7.optional()}).loose();R({kind:B([`file`,`folder`,`asset`]),path:P().min(1),...v1}).loose();var doe=R({deletedDocNames:L(P().min(1))}).loose();R({kind:B([`file`,`folder`,`asset`]),path:P().min(1),...v1,summary:y1}).loose();var foe=R({deletedDocNames:L(P().min(1))}).loose();R({docName:P().min(1),commitSha:P().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:y1,...v1}).loose(),R({restoredFrom:P().min(1),timestamp:P().min(1),summary:O7.optional(),warning:k7.optional(),warnings:M7.optional()}).loose();var poe=B([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),moe=R({label:P().min(1),webUrl:Fa().nullable()}).loose(),hoe=co(`checkStatus`,[R({checkStatus:V(`allowed`)}).loose(),R({checkStatus:V(`denied`),deniedReason:B([`no-collaborator`,`private-no-access`,`repo-not-found`,`not-authenticated`])}).loose(),R({checkStatus:V(`unknown`),unknownError:B([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`,`ssh-unverified`]).optional()}).loose()]),z7=B([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`semantic-protected-branch`]),goe=B(ju),_oe=B([`succeeded`,`up-to-date`,`conflict`,`refused`,`error`]);R({state:poe,lastSyncUtc:P().nullable(),lastFetchUtc:P().nullable(),lastPushedSha:P().nullable(),ahead:F().int().min(0),behind:F().int().min(0),consecutiveFailures:F().int().min(0),conflictCount:F().int().min(0),hasRemote:I(),syncEnabled:I(),identityUnresolved:I(),remote:moe.nullable().optional(),pushError:P().optional(),pushErrorCode:z7.optional(),pullError:P().optional(),pullErrorCode:z7.optional(),pausedReason:P().optional(),pushPermission:hoe.optional(),syncMode:goe.optional(),lastPullUtc:P().nullable().optional(),lastPullOutcome:_oe.nullable().optional()}).loose(),R({op:B([`sync`,`push`,`pull`]).optional()}).loose(),R({op:B([`sync`,`push`,`pull`])}).loose(),R({conflicts:L(R({file:P().min(1),detectedAt:P().min(1),oursSha:P().optional(),theirsSha:P().optional(),baseSha:P().optional()}).loose())}).loose(),R({file:P().min(1),strategy:B([`mine`,`theirs`,`content`,`delete`]),content:P().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0&&e.content!==``,{message:`content must be a non-empty string when strategy is 'content'`,path:[`content`]}),R({}).loose(),R({file:P().min(1),base:P(),ours:P(),theirs:P(),kind:B([`both-modified`,`delete-modify`,`modify-delete`]),lifecycleStatus:P().nullable()}).loose(),R({plan:Ro(e=>e!==void 0,{message:`plan is required`})}).loose(),R({plan:Ro(e=>e!==void 0,{message:`plan is required`})}).loose(),R({result:Ro(e=>e!==void 0,{message:`result is required`})}).loose();var voe=R({path:P().min(1),summary:P().min(1)}).loose(),yoe=R({files:F().int().nonnegative(),folders:F().int().nonnegative()}).loose();R({packs:L(R({id:P().min(1),name:P().min(1),description:P().min(1),defaultSubfolder:P().optional(),folders:L(voe),entryCounts:yoe}).loose())}).loose(),R({noOpen:I().optional(),out:P().min(1).optional()}).loose();var boe=R({reason:B([`unsupported-platform`,`spawn-error`]),message:P()}).loose();co(`status`,[R({status:V(`installed`),outputPath:P(),size:F().int().nonnegative(),sha256:P(),skillVersion:P()}).loose(),R({status:V(`built`),outputPath:P(),size:F().int().nonnegative(),sha256:P(),skillVersion:P(),handoffError:boe.optional()}).loose(),R({status:V(`failed`),buildError:P()}).loose(),R({status:V(`skip-current`),skillVersion:P(),recordedAt:P().optional()}).loose()]);var B7=B(dp);function xoe(e){return e===`agents`||dp.includes(e)}R({tags:L(R({name:P().min(1),count:F().int().nonnegative(),isLeaf:I()}).loose())}).loose();var Soe=R({docName:P().min(1),title:P(),matchingTags:L(P().min(1)),snippet:P().nullable()}).loose();R({name:P().min(1),docs:L(Soe)}).loose(),R({folder:io(),frontmatter_local:uo(P(),io()).nullable()}).loose(),R({path:P(),frontmatter:uo(P(),io()).optional()}).loose(),R({applied:io()}).loose();var V7=uo(P(),io()).meta({description:`Free-form frontmatter map embedded in template payloads.`});R({template:R({name:P().min(1),folder:P(),scope:B([`local`,`inherited`]),path:P().min(1),frontmatter:V7,body:P()}).strict()}).strict();var Coe=R({templates:L(R({name:P().min(1),title:P().optional(),description:P().optional(),path:P().min(1),source_folder:P()}).strict()),truncated:I()}).strict();R({folder:P(),name:P(),body:P().optional(),frontmatter:V7.optional(),...v1,summary:y1}).strict(),R({path:P().min(1),created:I(),warnings:L(P())}).strict(),R({sourcePath:P().min(1),targetFolder:P(),name:P().optional(),title:P().optional(),deleteSource:I().optional(),...v1,summary:y1}).strict(),R({path:P().min(1),created:I(),warnings:L(P())}).strict(),R({existed:I(),path:P().min(1)}).strict(),R({fromFolder:P(),fromName:P(),toFolder:P(),toName:P(),body:P().optional(),frontmatter:V7.optional(),...v1,summary:y1}).strict(),R({from:P().min(1),to:P().min(1),committed:I()}).strict();var H7=B(zf),woe=/^[a-z0-9-]+$/,Toe=/^[A-Za-z0-9_-]+$/,U7=R({name:P(),description:P()}).strict();R({skill:R({name:P().min(1),scope:H7,path:P().min(1),frontmatter:U7,body:P(),files:L(R({path:P().min(1),text:P().nullable()})).optional(),managed:I().optional()}).strict()}).strict();var Eoe=R({source:P().min(1),publisher:P().optional(),skill:P().optional(),marketplaceUrl:P().optional(),importedAt:P().min(1),autoUpdate:I().optional()}).strict(),Doe=R({skills:L(R({name:P().min(1),description:P().optional(),scope:H7,path:P().min(1),absolutePath:P().min(1).optional(),installed:I(),hosts:L(P()),driftPaths:L(P()).optional().meta({description:`Recorded locations whose on-disk form (copy vs symlink) no longer matches what OK last wrote there — evidence another tool rewrote the path.`}),hostAliases:uo(P(),P()).optional().meta({description:`Host skills roots that are symlink ALIASES of another location (host id → base-relative target root). An aliased folder is a derived view — no menu row, never a write target; the host's icon rides the target root's row.`}),conflictHosts:L(P()).optional().meta({description:`Hosts whose dir holds a DIFFERENT same-name skill (fork/conflict) — occupied, not this skill.`}),symlinkedHosts:L(P()).optional(),installableEditors:L(P()).optional(),linkMode:I().optional(),customPlacements:L(R({path:P(),mode:B([`copy`,`link`])}).strict()).optional(),managed:I().optional(),origin:Eoe.optional(),modified:I().optional(),revertable:I().optional()}).strict()),truncated:I()}).strict();R({scope:H7.default(`project`),name:P().meta({description:`Managed skill name to create or update.`}),body:P().optional(),frontmatter:U7,...v1,summary:y1}).strict(),R({path:P().min(1),created:I(),warnings:L(P())}).strict(),R({scope:H7.default(`project`),name:P(),dryRun:I().optional(),setAutoUpdate:I().optional(),...v1,summary:y1}).strict(),R({name:P().min(1),updated:I(),source:P().min(1),localBody:P().optional(),upstreamBody:P().optional(),gitTracked:I().optional(),warnings:L(P())}).strict(),R({scope:H7.default(`project`),name:P(),...v1,summary:y1}).strict(),R({name:P().min(1),baselineRef:P().min(1),restoredFiles:L(P()),warnings:L(P())}).strict(),R({existed:I(),path:P().min(1)}).strict(),R({scope:H7.default(`project`),fromName:P(),toName:P(),body:P().optional(),frontmatter:U7.optional(),...v1,summary:y1}).strict(),R({from:P().min(1),to:P().min(1),committed:I()}).strict(),R({name:P(),fromScope:H7,toScope:H7,...v1,summary:y1}).strict(),R({scope:H7,path:P().optional()}).strict(),R({scope:H7,name:P(),toName:P(),...v1,summary:y1}).strict(),R({name:P().min(1)}).strict(),R({name:P(),home:P().min(1)}).strict(),R({docName:P().min(1)}).strict();var W7=B([`reference`,`script`,`file`]);R({scope:H7.default(`project`),name:P(),path:P().min(1),content:P(),...v1,summary:y1}).strict(),R({path:P().min(1),created:I(),kind:W7,content:I()}).strict(),R({scope:H7.default(`project`),name:P(),from:P().min(1),to:P().min(1),...v1,summary:y1}).strict(),R({from:P().min(1),to:P().min(1),fromDocName:P().optional(),toDocName:P().optional()}).strict(),R({path:P().min(1),kind:W7,text:P()}).strict(),R({path:P().min(1),existed:I(),kind:W7}).strict();var G7=so([B7,V(`agents`)]),K7=P().min(1).refine(e=>!e.startsWith(`/`)&&!e.startsWith(`~`)&&!/^[A-Za-z]:/.test(e),{error:`a custom root is base-relative (e.g. ".tim/skills"), not absolute or ~-prefixed`}).refine(e=>e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`),{error:`a custom root may not contain "..", "." or empty path segments`}).refine(e=>e.includes(`/`),{error:`a custom root is a path (e.g. ".tim/skills") — bare editor names are host ids`}),q7=so([G7,K7]);R({scope:H7.default(`project`),name:P(),targets:L(G7).optional().meta({description:'SET-EXACT install targets (editor ids, plus "agents" for the .agents hub — in-place skills only): the COMPLETE resulting host set. Omit to use project-configured editors; pass [] to uninstall everywhere. Stateless callers should prefer `add`/`remove`.'}),add:L(q7).optional().meta({description:`Locations to ADD the skill to (everything else untouched). Editor ids fan out a managed copy/symlink; a custom root path (".tim/skills") places the bundle there.`}),remove:L(q7).optional().meta({description:"Locations to REMOVE the skill from (lossless only — a hand-edited fork is refused, never deleted). The source cannot be removed; move it first with `source`."}),mode:B([`copy`,`link`]).optional().meta({description:`"link": one real folder (the source); every other location becomes a symlink to it. "copy": independent real folders, refreshed from the source until hand-edited (a hand-edit forks that copy). Converts existing locations losslessly. Omit to follow the form the skill already uses.`}),source:q7.optional().meta({description:`Move the skill's REAL folder to this location (the old source becomes a symlink to it — never a removal). Sticky across rescans.`}),linkMode:I().optional(),setSource:P().min(1).optional(),place:R({dir:P().min(1).meta({description:`Project-relative directory the bundle dir is created under (e.g. ".windsurf/skills").`}),mode:B([`copy`,`link`])}).strict().optional(),convert:R({target:q7.meta({description:`The installed location to convert — an editor id, "agents", or a recorded custom placement path.`}),mode:B([`copy`,`link`]).meta({description:`"link": replace this location with a symlink to the source. "copy": replace it with an independent real folder.`})}).strict().optional(),unplace:R({path:P().min(1).meta({description:`The recorded placement bundle path (e.g. ".windsurf/skills/my-skill").`})}).strict().optional(),...v1,summary:y1,fork:R({editor:P().min(1),action:B([`align`,`make-source`,`rename`]),toName:P().optional()}).strict().optional()}).strict().refine(e=>!(e.targets!==void 0&&(e.add!==void 0||e.remove!==void 0)),{error:"`targets` is set-exact; `add`/`remove` are additive — use one style per call"}).refine(e=>e.fork===void 0||e.targets===void 0&&e.add===void 0&&e.remove===void 0&&e.source===void 0&&e.setSource===void 0,{error:"`fork` is its own operation — run it in a separate call"}).refine(e=>e.fork?.action!==`rename`||e.fork.toName!==void 0,{error:"`fork.rename` requires `toName`"}).refine(e=>!(e.source!==void 0&&(e.add!==void 0||e.remove!==void 0)),{error:"a `source` move is its own operation — run it in a separate call from `add`/`remove`"}).refine(e=>[e.targets!==void 0||e.add!==void 0||e.remove!==void 0,e.place!==void 0,e.unplace!==void 0,e.convert!==void 0,e.source!==void 0||e.setSource!==void 0,e.fork!==void 0].filter(Boolean).length<=1,{error:"one operation per call — membership (`targets`/`add`/`remove`), `place`, `unplace`, `convert`, `source`, and `fork` are mutually exclusive"}),R({name:P().min(1).meta({description:`Managed skill name installed or uninstalled.`}),hosts:L(P()).meta({description:`Editor ids the skill is projected into after the operation; [] is expected after uninstall.`}),scripts:I().meta({description:`True when the skill ships executable scripts, projected but never run.`}),warnings:L(P()).meta({description:`Non-fatal install/uninstall warnings from target projection.`}),warningCodes:L(B([`no-targets`,`scripts-present`,`name-conflict`,`no-description`,`skill-fork-name-unpatched`,`place-path-invalid`,`place-fork-refused`])).meta({description:"Machine-readable warning codes aligned with `warnings`."}),placedAt:P().optional(),sourceMovedTo:P().optional()}).strict(),R({scope:H7.default(`project`),name:P().meta({description:`Managed skill name to uninstall without deleting source.`})}).strict(),R({name:P().min(1).meta({description:`Managed skill name requested for uninstall.`}),uninstalled:I().meta({description:`True when an install marker existed and was removed; false for an idempotent no-op.`})}).strict();var Ooe=R({targets:L(B7),configured:I(),folders:L(R({scope:H7,host:P(),root:P(),state:B([`own`,`linked`,`linked-parent`,`absent`]),target:P().optional(),drift:V(!0).optional(),expected:P().optional()}).strict()).optional()}).strict();R({folderAction:co(`action`,[R({action:V(`link`),scope:H7,root:P().min(1).meta({description:`The folder to link (e.g. ".codex/skills").`}),target:P().min(1).meta({description:`The root it merges into (e.g. ".agents/skills"). Required.`})}).strict(),R({action:V(`unlink`),scope:H7,root:P().min(1).meta({description:`The linked folder to materialize back.`}),exclude:L(P().min(1)).optional().meta({description:`Skill names to LEAVE OUT when materializing — the folder keeps every other skill it currently sees (as per-skill links) and stops auto-following the target root.`})}).strict(),R({action:V(`add-root`),scope:H7,root:K7.meta({description:`New custom skills root to declare (base-relative, e.g. ".team/skills").`})}).strict()])}).strict(),R({targets:L(B7),reprojected:L(R({name:P(),hosts:L(P())}).strict()),bundleHosts:L(P()),removedFrom:L(P()),folder:R({moved:L(P()),dropped:L(P()),linked:L(P())}).strict().optional()}).strict(),R({scope:H7.default(`project`),name:P(),version:P().regex(/^[0-9a-f]{40}$/i),...v1,summary:y1}).strict(),R({name:P().min(1),version:P(),restoredFiles:L(P()),warnings:L(P())}).strict(),R({query:P().optional(),intent:B([`autocomplete`,`full_text`,`omnibar`]).optional(),ranking:B([`navigation`,`relevance`]).optional(),scopes:L(B([`page`,`folder`,`content`,`file`])).optional(),scope:P().optional(),limit:F().int().nonnegative().optional(),semantic:I().optional(),source:B([`omnibar`,`mcp`,`http`]).optional()}).loose();var koe=R({kind:B([`page`,`folder`,`content`,`file`]),path:P().min(1),title:P(),score:F(),signals:uo(P(),io()),snippet:P().optional()}).loose(),Aoe=R({capable:I(),applied:I(),coverage:R({embedded:F().int().nonnegative(),total:F().int().nonnegative()})}).loose();R({enabled:I(),keyPresent:I(),keyNotRequired:I(),keySource:B([`project`,`file`,`env`]).nullable(),keyHint:P().nullable(),ready:I(),capable:I(),embedded:F().int().nonnegative(),total:F().int().nonnegative()}).loose(),R({query:P(),intent:B([`autocomplete`,`full_text`,`omnibar`]),results:L(koe),elapsedMs:F().nonnegative(),semantic:Aoe.optional(),truncated:I().optional(),ready:I().optional()}).loose();var joe=R({version:P().min(1),recordedAt:P().min(1)}).loose();R({currentVersion:P().min(1),targets:uo(P(),joe.nullable())}).loose(),R({scope:H7.default(`project`),source:P().min(1).meta({description:`External skill source: full skills.sh skill-page URL (https://www.skills.sh/<owner>/<repo>/<skill>, or https://www.skills.sh/site/<hostname>/<skill> for a website catalog), GitHub owner/repo[/subpath], git URL, or local/file path.`}),skill:P().min(1).optional().meta({description:`Specific skill name to import from a multi-skill source.`}),install:I().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection (the caller installs explicitly afterwards). Default true.`}),marketplace:I().optional().meta({description:"The source came from a skills.sh listing the user chose (the Explore tab), so the install is reported to skills.sh and counts toward that listing. Off by default: a hand-typed repo must not be announced to skills.sh. Honors the `telemetry.skillInstallReports.enabled` setting and DO_NOT_TRACK."}),...v1,summary:y1}).strict(),R({scope:H7.default(`project`),source:P().min(1).meta({description:`External skill source: full skills.sh skill-page URL, GitHub owner/repo[/subpath], git URL, or local/file path.`}),skills:L(P().min(1)).min(1).max(100).meta({description:`Skill names to import from the source.`}),install:I().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection. Default true.`}),...v1,summary:y1}).strict(),R({results:L(R({requested:P(),status:B([`imported`,`already-imported`,`not-found`,`failed`]),name:P().optional(),collisionRenamedFrom:P().optional(),warnings:L(P()),error:P().optional()}).loose()),imported:F(),alreadyImported:F(),failed:F()}).loose();var Moe=R({source:P(),ref:P().optional(),contentHash:P(),publisher:P().optional()}).loose();R({name:P().min(1).meta({description:`Managed skill name created or matched.`}),path:P().min(1).meta({description:`Store-relative path to the imported skill source.`}),created:I().meta({description:`True when this request created new source files.`}),alreadyImported:I().meta({description:`True when identical content was already present and no files changed.`}),collisionRenamedFrom:P().optional().meta({description:`Original source name when collision handling renamed the import.`}),provenance:Moe,warnings:L(P()).meta({description:`Non-fatal import warnings, such as skipped unsupported files.`})}).loose();var Noe=`server-info`,Poe=`branch-switched`,Foe=`disk-ack`,Ioe=`config-validation-rejected`,Loe=`config-ignore-nested-error`,J7=B([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`,`comments`,`lint-config`]),Roe=R({v:V(1),ch:V(Noe),seq:F(),serverInstanceId:P().min(1),currentBranch:P().min(1).optional()}).loose(),zoe=R({v:V(1),ch:V(Poe),seq:F(),branch:P().min(1)}).loose(),Boe=R({v:V(1),ch:J7,seq:F()}).loose(),Voe=R({v:V(1),ch:V(Foe),seq:F(),docName:P().min(1),sv:P().min(1)}).loose(),Hoe=R({v:V(1),ch:V(Ioe),seq:F(),docName:P().min(1),error:Tf}).loose(),Uoe=R({v:V(1),ch:V(Loe),seq:F(),path:P().min(1),error:P().min(1)}).loose();function Woe(e){let t;try{t=new URL(e)}catch{return null}let n=t.pathname.match(/^\/video\/(\d+)/);if(n)return n[1]??null;let r=t.pathname.match(/^\/(\d+)/);return r?r[1]??null:null}function Goe(e){if(typeof e!=`string`||e.length===0)return e;let t=H2(e);if(t){let e=t.noCookie?`www.youtube-nocookie.com`:`www.youtube.com`,n=t.startSeconds===null?``:`?start=${t.startSeconds}`;return`https://${e}/embed/${t.id}${n}`}if(L2(e)){let t=Woe(e);return t?`https://player.vimeo.com/video/${t}`:e}let n=P2(e);if(n){let e=n.startRaw===null?``:`?t=${n.startRaw}`;return`https://www.loom.com/embed/${n.id}${e}`}return e}var Koe=`https://api.github.com/repos/inkeep/open-knowledge`;async function qoe(e){let{signal:t,...n}=e??{},r=t?AbortSignal.any([AbortSignal.timeout(5e3),t]):AbortSignal.timeout(5e3);try{let e=await fetch(Koe,{headers:{accept:`application/vnd.github+json`,"user-agent":`openknowledge.ai`},...n,signal:r});if(!e.ok)return console.warn(`[github-stars] GitHub API responded ${e.status}`),null;let t=await e.json();return typeof t.stargazers_count==`number`?t.stargazers_count:null}catch(e){return console.warn(`[github-stars] fetch failed: ${e instanceof Error?e.message:String(e)}`),null}}function Joe(e){if(!e)return{height:null,viewerFragment:``};let t=e.split(`&`).filter(e=>e.length>0),n=null,r=[];for(let e of t){let t=e.indexOf(`=`);if(t===-1){r.push(e);continue}let i=e.slice(0,t),a=e.slice(t+1);if(i===`height`){let e=Number.parseInt(a,10);!Number.isNaN(e)&&e>0&&(n=e);continue}r.push(e)}return{height:n,viewerFragment:r.join(`&`)}}new vX.default;var Yoe=R({path:L(so([P(),F()])),message:P(),issueCode:P()});co(`code`,[R({code:V(`SCHEMA_INVALID`),issues:L(Yoe)}),R({code:V(`WRITE_ERROR`),detail:P()})]);function Xoe(e){return{path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message,issueCode:e.code}}function Zoe(e){if(e.code!==`SCHEMA_INVALID`)return{};let t={};for(let n of e.issues){let e=n.path[0];typeof e==`string`&&(t[e]=t[e]?`${t[e]}; ${n.message}`:n.message)}return t}var Y7=/^---[ \t]*\r?\n---[ \t]*(\r?\n|$)/,Qoe=/^---([ \t]*)(?=\r?\n|$)/,X7=e=>e.includes(`\r
571
571
  `)?`\r
572
572
  `:`
573
573
  `,$oe=e=>e.replace(Qoe,`***$1`),Z7=e=>`---${e}${e}---${e}`;function Q7(e,t){let n=xp(e,t);return{md:n,frontmatter:n.slice(0,n.length-t.length)}}function $7(e,t){let{md:n,frontmatter:r}=Q7(e,t),i=bp(n);return i.frontmatter===r&&i.body===t}function e9(e,t,n,r){let{md:i,frontmatter:a}=Q7(t,n);return{md:i,frontmatter:a,body:n,adjusted:r===`none`&&a!==e?`frontmatter`:r}}function ese(e,t){if($7(e,t))return e9(e,e,t,`none`);let n=$oe(t);if(n!==t&&$7(e,n))return e9(e,e,n,`body`);if(Y7.test(e)){let n=Z7(X7(e));if($7(n,t))return e9(e,n,t,`frontmatter`)}return e9(e,e,t,`unresolved`)}function tse(e,t){if($7(e,t))return e9(e,e,t,`none`);let n=Z7(X7(e||t));return(e===``||Y7.test(e))&&$7(n,t)?e9(e,n,t,`frontmatter`):e9(e,e,t,`unresolved`)}var t9=65536;function n9(e){let t=e.match(vp);return t?{fenced:t[0],body:e.slice(t[0].length)}:{fenced:``,body:e}}function nse(e){if(e.trim()===``)return{doc:new bl({}),map:{}};let t;try{t=Au(e,{uniqueKeys:!1})}catch(e){let t=e instanceof Error?e.message:String(e);return{doc:new bl({}),map:null,parseError:`parse threw: ${t}`}}if(t.errors.length>0)return{doc:t,map:null,parseError:t.errors[0]?.message??`yaml parse errors`};let n;try{n=t.toJS()}catch(e){let n=e instanceof Error?e.message:String(e);return{doc:t,map:null,parseError:`toJS threw: ${n}`}}if(typeof n!=`object`||!n||Array.isArray(n))return{doc:t,map:null,parseError:`top-level value is not a mapping`};let r=Mp.safeParse(n);if(!r.success){let e=r.error.issues[0],n=e&&Array.isArray(e.path)?e.path.join(`.`):``,i=e?.message??`unknown`;return{doc:t,map:null,parseError:n?`value at "${n}" failed schema: ${i}`:`schema validation failed: ${i}`}}return{doc:t,map:r.data}}function r9(e){return e===``?{doc:new bl({}),map:{}}:nse(Sp(e))}function i9(e){let{fenced:t}=n9(e),{map:n,parseError:r}=r9(t);return{map:n??{},parseError:r}}function a9(e){let{fenced:t}=n9(e);if(t===``)return[];let{doc:n,map:r}=r9(t);return r===null?[]:l9(n)}function o9(e){return typeof e==`object`&&!!e&&`key`in e}function s9(e){let t=e.key;return typeof t==`string`?t:t&&typeof t==`object`&&`value`in t&&typeof t.value==`string`?t.value:null}function c9(e,t){let n=e.key;if(typeof n==`string`){e.key=t;return}if(n&&typeof n==`object`){n.value=t;return}e.key=t}function l9(e){let t=e.contents;if(!t||!(`items`in t)||!Array.isArray(t.items))return[];let n=[];for(let e of t.items){if(!o9(e))continue;let t=s9(e);t!==null&&n.push(t)}return n}function u9(e){if(e.contents==null||!(`items`in e.contents)){let t=e.createNode({});return e.contents=t,t}return e.contents}function rse(e){let t=e.contents;return!t||!(`items`in t)||(t.items?.length??0)===0?``:Bp(e.toString(Ip))}function ise(e){let t=new TextEncoder().encode(e).byteLength;return t>65536?{kind:`region_too_large`,bytes:t,limit:t9}:null}function d9(e){let t=rse(e),n=ise(t);return n?{ok:!1,error:n}:{ok:!0,nextFenced:t}}function ase(e,t){if(Object.hasOwn(t,`frontmatter`))return{ok:!1,error:{kind:`reserved_key`,key:Cp}};let{doc:n,map:r}=r9(e);if(r===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};try{u9(n);for(let[e,r]of Object.entries(t)){if(r===null){n.delete(e);continue}let t=Dp.safeParse(r);if(!t.success)return{ok:!1,error:{kind:`invalid_value`,key:e,reason:t.error.issues[0]?.message??`invalid value`}};n.set(e,zp(n,n.get(e,!0),t.data))}return d9(n)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function ose(e,t,n,r={}){if(t===`frontmatter`||n===`frontmatter`)return{ok:!1,error:{kind:`reserved_key`,key:Cp}};let{doc:i,map:a}=r9(e);if(a===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};if(t===n)return{ok:!0,nextFenced:e};let o=i.contents;if(!o||!(`items`in o)||!Array.isArray(o.items))return{ok:!1,error:{kind:`unknown_key`,key:t}};let s=o.items.find(e=>o9(e)&&s9(e)===t);if(!s)return{ok:!1,error:{kind:`unknown_key`,key:t}};if(!r.allowDuplicate&&o.items.some(e=>o9(e)&&e!==s&&s9(e)===n))return{ok:!1,error:{kind:`duplicate_target`,key:n}};try{return c9(s,n),d9(i)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function f9(e,t){let{doc:n,map:r}=r9(e);if(r===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};let i=n.contents;if(!i||!(`items`in i)||!Array.isArray(i.items))return{ok:!0,nextFenced:e};let a=l9(n);if(a.length!==t.length||!p9(a,t))return{ok:!1,error:{kind:`reorder_mismatch`,expected:a,got:[...t]}};try{let e=i.items.filter(o9),r=[];for(let n of t){let i=e.findIndex(e=>s9(e)===n);if(i===-1)return{ok:!1,error:{kind:`reorder_mismatch`,expected:a,got:[...t]}};let[o]=e.splice(i,1);o&&r.push(o)}return i.items=r,d9(n)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function p9(e,t){let n=new Map;for(let t of e)n.set(t,(n.get(t)??0)+1);for(let e of t){let t=(n.get(e)??0)-1;if(t<0)return!1;n.set(e,t)}for(let e of n.values())if(e!==0)return!1;return!0}function m9(e){if(e.length===0)return{kind:`invalid_path`,path:[...e],reason:`path must have at least one segment`};for(let t=0;t<e.length;t++){let n=e[t];if(typeof n!=`string`&&typeof n!=`number`)return{kind:`invalid_path`,path:[...e],reason:`path segment at index ${t} must be string or number`};if(typeof n==`number`&&(!Number.isInteger(n)||n<0))return{kind:`invalid_path`,path:[...e],reason:`numeric path segment at index ${t} must be a non-negative integer`}}return e[0]===`frontmatter`?{kind:`reserved_key`,key:Cp}:null}function sse(e,t,n){let r=m9(t);if(r)return{ok:!1,error:r};let{doc:i,map:a}=r9(e);if(a===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};let o=Dp.safeParse(n);if(!o.success)return{ok:!1,error:{kind:`invalid_value`,key:String(t[t.length-1]),reason:o.error.issues[0]?.message??`invalid value`}};try{return u9(i),i.setIn(t,zp(i,i.getIn(t,!0),o.data)),d9(i)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function cse(e,t){let n=m9(t);if(n)return{ok:!1,error:n};let{doc:r,map:i}=r9(e);if(i===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};try{return r.getIn(t,!0)===void 0?{ok:!0,nextFenced:e}:(r.deleteIn(t),d9(r))}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function lse(e,t){if(t.length===0){let t=e.contents;return Qo(t)?t:null}let n=e.getIn(t,!0);return Qo(n)?n:null}function use(e,t,n,r={}){let i=m9(t);if(i)return{ok:!1,error:i};let a=t[t.length-1];if(typeof a!=`string`)return{ok:!1,error:{kind:`invalid_path`,path:[...t],reason:`cannot rename: last path segment must be a string (map key)`}};if(t.length===1&&n===`frontmatter`)return{ok:!1,error:{kind:`reserved_key`,key:Cp}};let{doc:o,map:s}=r9(e);if(s===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};if(a===n)return{ok:!0,nextFenced:e};let c=lse(o,t.slice(0,-1));if(!c)return{ok:!1,error:{kind:`unknown_key`,key:a}};let l=c.items.find(e=>o9(e)&&s9(e)===a);if(!l)return{ok:!1,error:{kind:`unknown_key`,key:a}};if(!r.allowDuplicate&&c.items.some(e=>o9(e)&&e!==l&&s9(e)===n))return{ok:!1,error:{kind:`duplicate_target`,key:n}};try{return c9(l,n),d9(o)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function dse(e,t,n){if(t.length===0)return f9(e,n);let r=m9(t);if(r)return{ok:!1,error:r};let{doc:i,map:a}=r9(e);if(a===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};let o=i.getIn(t,!0);if(!Qo(o))return{ok:!1,error:{kind:`invalid_path`,path:[...t],reason:`cannot reorder: target is not a map`}};let s=[];for(let e of o.items){if(!o9(e))continue;let t=s9(e);t!==null&&s.push(t)}if(s.length!==n.length||!p9(s,n))return{ok:!1,error:{kind:`reorder_mismatch`,expected:s,got:[...n]}};try{let e=o.items.filter(o9),t=[];for(let r of n){let i=e.findIndex(e=>s9(e)===r);if(i===-1)return{ok:!1,error:{kind:`reorder_mismatch`,expected:s,got:[...n]}};let[a]=e.splice(i,1);a&&t.push(a)}return o.items=t,d9(i)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function fse(e,t,n){let r=m9(t);if(r)return{ok:!1,error:r};let{doc:i,map:a}=r9(e);if(a===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};let o=i.getIn(t,!0);if(!ts(o))return{ok:!1,error:{kind:`invalid_path`,path:[...t],reason:`cannot reorder: target is not a sequence`}};let s=o,c=s.items.length,l=Array.from({length:c},(e,t)=>t),u=[...n];if(!pse(u,c))return{ok:!1,error:{kind:`reorder_mismatch`,expected:l.map(String),got:u.map(String)}};try{let e=s.items.slice();return s.items=u.map(t=>e[t]),d9(i)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function pse(e,t){if(e.length!==t)return!1;let n=Array(t).fill(!1);for(let r of e){if(!Number.isInteger(r)||r<0||r>=t||n[r])return!1;n[r]=!0}return!0}var mse=Object.freeze({source:`local`,skipStoreHooks:!1,context:Object.freeze({origin:`form-write`})});function h9(e){return{ok:!1,error:e}}function hse(e){return{ok:!0,...e}}function gse(e){return{ok:!0,...e}}function _se(e){return{ok:!0,...e}}function g9(e){return{ok:!0,...e}}function _9(e){switch(e.kind){case`unknown_key`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:`unknown key '${e.key}'`,issueCode:`unknown_key`}]};case`duplicate_target`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:`key '${e.key}' already exists`,issueCode:`duplicate_target`}]};case`invalid_value`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:e.reason,issueCode:`invalid_value`}]};case`reserved_key`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:`'${e.key}' is a reserved frontmatter key`,issueCode:`reserved_key`}]};case`reorder_mismatch`:return{code:`WRITE_ERROR`,detail:`reorder list does not match current keys (state changed mid-drag)`};case`region_too_large`:return{code:`SCHEMA_INVALID`,issues:[{path:[],message:`Frontmatter region exceeds ${t9}-byte limit (would be ${e.bytes})`,issueCode:`region_too_large`}]};case`parse_failed`:return{code:`WRITE_ERROR`,detail:`Frontmatter YAML is malformed; fix in source mode to commit (${e.reason})`};case`invalid_path`:return{code:`SCHEMA_INVALID`,issues:[{path:[...e.path],message:e.reason,issueCode:`invalid_path`}]}}}function vse(e,t){if(e.parseError!==t.parseError||e.keys.length!==t.keys.length)return!1;for(let n=0;n<e.keys.length;n++)if(e.keys[n]!==t.keys[n])return!1;for(let n of e.keys)if(!Fp(e.map[n],t.map[n]))return!1;return!0}var yse=5;function v9(e){let t=e.toString();return{snapshot:bse(t),raw:t}}function bse(e){let{map:t,parseError:n}=i9(e);return{map:t,keys:a9(e),parseError:n}}function y9(e){return e.startsWith(`---`)}function xse(e){let t=e.document,n=t.getText(`source`),r=new Set,i=v9(n),a=i.snapshot,o=n9(i.raw).fenced,s=y9(i.raw),c=!1;function l(e=!1){if(c)return;let t,i;try{let e=v9(n);t=e.snapshot,i=e.raw}catch(e){console.warn(`[bindFrontmatterDoc] readSnapshotFromYText threw:`,e);return}if(!e&&vse(a,t)){s=y9(i);return}a=t,o=n9(i).fenced,s=y9(i);for(let e of r)try{e(t)}catch(e){console.warn(`[bindFrontmatterDoc] listener threw:`,e)}}let u=e=>{c||Sse(e,o.length,s)&&l()};n.observe(u),e.on(`synced`,d);function d(){l(!0)}function f(e){let r;return t.transact(()=>{let t=n.toString(),{fenced:i}=n9(t);if(r=e(i),!r.ok||r.nextFenced===i)return;let a=tse(r.nextFenced,t.slice(i.length)).frontmatter;n.delete(0,i.length),a!==``&&n.insert(0,a)},mse),r??{ok:!1,error:{kind:`parse_failed`,reason:`commit transact produced no result`}}}function p(e){if(c)return h9({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});if(Object.hasOwn(e,`frontmatter`))return h9({code:`SCHEMA_INVALID`,issues:[{path:[Cp],message:`'${Cp}' is a reserved frontmatter key`,issueCode:`reserved_key`}]});let t=Np.safeParse(e);if(!t.success)return h9({code:`SCHEMA_INVALID`,issues:t.error.issues.map(Xoe)});let n=t.data,r=Object.keys(n),i=f(e=>ase(e,n));return i.ok?hse({appliedKeys:r}):h9(_9(i.error))}function m(e,t,n={}){if(c)return h9({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let r=f(r=>ose(r,e,t,n));return r.ok?gse({oldKey:e,newKey:t}):h9(_9(r.error))}function h(e){if(c)return h9({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let t=f(t=>f9(t,e));return t.ok?_se({orderedKeys:[...e]}):h9(_9(t.error))}function g(e,t){if(c)return h9({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let n=f(n=>sse(n,e,t));return n.ok?g9({path:[...e]}):h9(_9(n.error))}function _(e){if(c)return h9({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let t=f(t=>cse(t,e));return t.ok?g9({path:[...e]}):h9(_9(t.error))}function v(e,t,n={}){if(c)return h9({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let r=f(r=>use(r,e,t,n));return r.ok?g9({path:[...e]}):h9(_9(r.error))}function y(e,t){if(c)return h9({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let n=f(n=>dse(n,e,t));return n.ok?g9({path:[...e]}):h9(_9(n.error))}function b(e,t){if(c)return h9({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let n=f(n=>fse(n,e,t));return n.ok?g9({path:[...e]}):h9(_9(n.error))}return{current(){return v9(n).snapshot},patch(e){return p(e)},rename(e,t,n){return m(e,t,n)},reorder(e){return h(e)},patchPath(e,t){return g(e,t)},deletePath(e){return _(e)},renamePath(e,t,n){return v(e,t,n)},reorderPath(e,t){return y(e,t)},reorderSeqPath(e,t){return b(e,t)},subscribe(e){return r.add(e),()=>{r.delete(e)}},dispose(){c||(c=!0,n.unobserve(u),e.off(`synced`,d),r.clear())}}}function Sse(e,t,n){if(t===0&&n)return!0;let r=t>0?t:yse,i=0;for(let t of e.delta){if(typeof t.retain==`number`){i+=t.retain;continue}if(typeof t.insert==`string`){if(i<r)return!0;i+=t.insert.length;continue}if(t.insert!==void 0){if(i<r)return!0;i+=1;continue}if(typeof t.delete==`number`&&i<r)return!0}return!1}var Cse=new vX.default;Cse.Match_Threshold=.5;var wse=/\\([!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~])/g,b9=/^\s*\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)+\|?\s*$/,x9=/^[ \t]+([-+*]|\d+[.)]|[a-zA-Z][.)])\s/,Tse=/^\d+([.)])(?=\s)/,Ese=`1`,Dse=/\*\*\s*(`[^`]+`)\s*\*\*/g,Ose=/^(`{3,}|~{3,})/;function kse(e){let t=new Set,n=null;for(let r=0;r<e.length;r++){let i=e[r].trimEnd(),a=Ose.exec(i);if(a){let e=a[1][0];if(n===null){n=e;continue}if(n===e){n=null;continue}}if(n!==null||r===0||!b9.test(i))continue;let o=e[r-1].trimEnd();if(!(!o.startsWith(`|`)||b9.test(o))){t.add(r-1),t.add(r);for(let n=r+1;n<e.length&&e[n].trimEnd().startsWith(`|`);n++)t.add(n)}}return t}function S9(e){return e.slice(0,-1).trimEnd()}var C9=/^(?:#{1,6}[ \t]|>|(?:[-+*]|\d{1,9}[.)])[ \t]|`{3,}|~{3,}|=+[ \t]*$|-+[ \t]*$|(?:\*[ \t]*){3,}$|(?:_[ \t]*){3,}$)/;function w9(e){let t=new Set,n=null;for(let r=0;r<e.length;r++){let i=e[r]??``,a=/^(`{3,}|~{3,})/.exec(i.trimStart());if(a?.[1]){let e=a[1][0];if(n===null){n=e;continue}if(n===e){n=null;continue}}n!==null&&t.add(r)}return t}var Ase=/^<\/?[A-Z][A-Za-z0-9.]*(?:\s[^>]*)?>$/,jse=/^<[A-Z][A-Za-z0-9.]*(?:\s[^>]*)?>$/,Mse=/^<\/[A-Z][A-Za-z0-9.]*\s*>$/,Nse=/<\/?[A-Z]/;function Pse(e){let t=!1;for(let n=0;n<e.length;n++)if(Nse.test(e[n]??``)){t=!0;break}if(!t)return e;let n=w9(e),r=[],i=[],a=0;for(let t=0;t<e.length;t++){let o=e[t]??``,s=o.trim();if(n.has(t)){r.push(!1),i.push(a);continue}let c=a>=1||!/^[ \t]/.test(o);r.push(c&&Ase.test(s));let l=c&&Mse.test(s),u=c&&!l&&jse.test(s)&&!s.endsWith(`/>`);l?(a=Math.max(0,a-1),i.push(a)):(i.push(a),u&&(a+=1))}let o=Array(e.length);for(let t=0,n=-1;t<e.length;t++)o[t]=n,(e[t]??``).trim()!==``&&(n=t);let s=Array(e.length);for(let t=e.length-1,n=e.length;t>=0;t--)s[t]=n,(e[t]??``).trim()!==``&&(n=t);let c=new Set;for(let t=0;t<e.length;t++){if((e[t]??``).trim()!==``||n.has(t)||(i[t]??0)<1)continue;let a=o[t]??-1,l=s[t]??e.length;(a>=0&&r[a]===!0||l<e.length&&r[l]===!0)&&c.add(t)}let l=[];for(let t=0;t<e.length;t++){if(c.has(t))continue;let n=e[t]??``;l.push(r[t]===!0&&(i[t]??0)>=1?n.replace(/^[ \t]+/,``):n)}return l}function Fse(e){let t=Pse(e.replace(/^/,``).replace(/\r/g,``).replace(wse,`$1`).replace(Dse,`$1`).replace(/^\n+/,``).replace(/^[*-]{3,}(?=\n|$)/,`---`).replace(/(\n)([#>+-]|\d+[.)]|`{3,}|~{3,})/g,`
@@ -578,4 +578,4 @@ $2`).split(`
578
578
  `)),n=kse(t),r=w9(t);return t.map((e,i)=>{let a=e.trimEnd();if(i>0&&!r.has(i)&&/^[ \t]+\S/.test(a)&&(t[i-1]??``).trim()!==``&&!x9.test(a)&&!C9.test(a.trimStart())){let e=(t[i-1]??``).trimStart();if(!C9.test(e)&&!e.startsWith(`|`))return a.replace(/^[ \t]+/,``)}if(b9.test(a)){let e=a.replace(/\s+/g,``);return n.has(i)&&e.length>1&&e.startsWith(`|`)&&e.endsWith(`|`)?S9(e):e}let o=x9.test(a)?a.replace(/^[ \t]+/,``):a;return n.has(i)&&o.length>1&&o.startsWith(`|`)&&o.endsWith(`|`)&&(o=S9(o)),o.replace(Tse,`${Ese}$1`)}).join(`
579
579
  `).replace(/\n{3,}/g,`
580
580
 
581
- `).replace(/\n+$/,``)}function T9(e){return[...e.replace(/^\n+/,``).replace(/\n+$/,``).matchAll(/\n{2,}/g)].map(e=>e[0].length)}function Ise(e,t){let n=T9(e),r=T9(t);return n.length===r.length?r.some((e,t)=>e>(n[t]??0)):!1}var E9=/^[a-zA-Z0-9][\w/-]*$/;function Lse(e){if(typeof e!=`string`)return!1;let t=e.startsWith(`#`)?e.slice(1):e;return E9.test(t)}var Rse=`Tags must start with a letter or digit and contain only letters, digits, underscores, dashes, and slashes.`;function zse(e){return e.startsWith(`#`)?e.slice(1):e}function Bse(e){return typeof e==`string`?[e]:Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function Vse(e){if(!e||e.trim()===``)return[];let{map:t}=Lp(e);if(!t)return[];let n=Bse(t.tags),r=[];for(let e of n){let t=zse(e);E9.test(t)&&r.push(t)}return r}var Hse=B(zf),Use=z({hosts:L(P()),scope:Hse,scripts:I(),installedAt:ha(),projection:B([`symlink`,`copy`]).optional(),contentHash:P().optional()});z({schema:V(1),skills:uo(P(),Use).default({})});var Wse=100,Gse=500,Kse=450,qse={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},D9=new WeakMap;function Jse(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function O9(e){return e.trim().toLowerCase()}var Yse=/\.(?:md|mdx)$/;function Xse(e,t){if(t!==`page`)return e;let n=e.replace(Yse,``);return n.length>0?n:e}function k9(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function Zse(e){let t=k9(e.path),n=e.title?.trim()||t,r=e.modifiedTs??0,i=e.path.split(`/`).filter(Boolean),a=new Set(i),o=[...new Set((e.aliases??[]).flatMap(e=>e.split(`/`).filter(Boolean)).filter(e=>!a.has(e)))];return{id:`${e.kind}:${e.path}`,kind:e.kind,path:e.path,title:n,name:t,pathSegments:[...i,...o].join(` `),content:e.content??``,modifiedTs:Number.isFinite(r)?r:0}}function A9(e){let t=OY({schema:qse});return e.length>0&&zY(t,e),t}function Qse(e){let t={documents:e};return D9.set(t,A9(e)),t}function $se(e){let t=D9.get(e);if(t)return t;let n=A9(e.documents);return D9.set(e,n),n}function ece(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function j9(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function tce(e,t){let n=O9(t);if(!n)return 0;let r=Xse(n,e.kind),i=O9(e.title),a=O9(e.name),o=O9(e.path),s=o.split(`/`);return i===r||a===r?700:o===r?650:i.startsWith(r)||a.startsWith(r)?600:s.some(e=>e.startsWith(r))?550:i.includes(r)||a.includes(r)?500:o.includes(r)?450:-1}var nce=.5;function M9(e,t){let n=tce(e,t);return n<=0?n:m1(e.path)?n*nce:n}var rce=60;function ice(e){return e===`file`?-rce:0}var ace=1e3,N9=50,oce=1,sce=1,cce=.001;function lce(e,t,n,r,i){let a=i>0?t/i:0,o=N9>0?n/N9:0,s=r===`file`?-cce:0,c=oce*a+sce*o+s;return e*ace+c}function P9(e,t,n,r){return e+t*20+n+ice(r)}function F9(e,t,n,r,i,a){return e===`relevance`?P9(t,n,r,i):lce(t,n,r,i,a)}function uce(e,t){return t||(e===`full_text`?`relevance`:`navigation`)}function I9(e,t){let n=0;for(let r of e){let e=t.get(r.id)??0;e>n&&(n=e)}return n}function dce(e){let t=e.map(e=>e.modifiedTs).filter(e=>Number.isFinite(e)&&e>0);if(t.length===0)return new Map;let n=1/0,r=-1/0;for(let e of t)e<n&&(n=e),e>r&&(r=e);let i=Math.max(1,r-n);return new Map(e.map(e=>[e.id,e.modifiedTs>0?(e.modifiedTs-n)/i*50:0]))}function fce(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function pce(e){return e===`full_text`?{title:8,name:7,path:5,pathSegments:4,content:1}:e===`autocomplete`?{title:10,name:9,path:5,pathSegments:4}:{title:8,name:7,path:5,pathSegments:4}}function mce(e,t){return O9(t).length<4?0:+(e===`full_text`)}function hce(e){let{lexical:t,fullText:n}=e.signals;return t>=Gse?`lexical`:t===Kse&&n<=0?`pathOnly`:`body`}function gce(e){let t=[],n=[],r=[];for(let i of e){let e=hce(i);e===`lexical`?t.length<Wse&&t.push(i):e===`body`?n.length<6&&n.push(i):r.length<4&&r.push(i)}return[...t,...n,...r]}function L9(e,t,n){if(t===`relevance`)return e.slice(0,n);let r=gce(e),i=[],a=0,o=0;for(let e of r){if(e.document.kind===`folder`){if(a>=3)continue;a+=1}else if(e.document.kind===`file`){if(o>=3)continue;o+=1}if(i.push(e),i.length>=n)break}return i}function _ce(e,t,n={}){let r=n.intent??`omnibar`,i=uce(r,n.ranking),a=Jse(n.limit),o=new Set(n.scopes??ece(r)),s=e.documents.filter(e=>j9(e,o)),c=O9(t);if(!c)return s.slice().sort((e,t)=>e.path.localeCompare(t.path)).slice(0,a).map(e=>({document:e,score:0,signals:{lexical:0,fullText:0,recency:0}}));let l=hX($se(e),{term:c,properties:fce(r),boost:pce(r),tolerance:mce(r,c),limit:Math.max(a*4,40)}),u=new Map(l.hits.filter(e=>j9(e.document,o)).map(e=>[e.document.id,e.score])),d=dce(s),f=new Map;for(let e of s)M9(e,c)>=0&&f.set(e.id,e);for(let e of l.hits)j9(e.document,o)&&f.set(e.document.id,e.document);if(!n.semantic){let e=I9(f.values(),u);return L9([...f.values()].map(t=>{let n=Math.max(0,M9(t,c)),r=u.get(t.id)??0,a=d.get(t.id)??0;return{document:t,score:F9(i,n,r,a,t.kind,e),signals:{lexical:n,fullText:r,recency:a}}}).sort((e,t)=>e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score),i,a)}return L9(vce({scopedDocuments:s,candidates:f,fullTextScores:u,recency:d,normalizedQuery:c,ranking:i,semantic:n.semantic}),i,a)}function R9(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function vce(e){let{scopedDocuments:t,candidates:n,fullTextScores:r,recency:i,normalizedQuery:a,ranking:o,semantic:s}=e,c=s.rrfK??60,l=s.candidateLimit??64,u=s.similarityFloor??0,d=s.scores,f=new Map(t.map(e=>[e.id,e])),p=[...d.entries()].filter(([e,t])=>t>=u&&f.has(e)).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).slice(0,l);for(let[e]of p)if(!n.has(e)){let t=f.get(e);t&&n.set(e,t)}let m=I9(n.values(),r),h=[...n.values()].map(e=>{let t=Math.max(0,M9(e,a)),n=r.get(e.id)??0,s=i.get(e.id)??0,c=d.get(e.id),l=c!==void 0&&c>=u;return{document:e,score:t>0?F9(o,t,n,s,e.kind,m):P9(t,n,s,e.kind),signals:l?{lexical:t,fullText:n,recency:s,vector:c}:{lexical:t,fullText:n,recency:s},lexical:t,fullText:n,recency:s,cosine:c}}),g=R9(h.filter(e=>e.fullText>0).sort((e,t)=>t.fullText-e.fullText||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),_=R9(h.filter(e=>e.cosine!==void 0&&e.cosine>=u).sort((e,t)=>t.cosine-e.cosine||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),v=e=>{let t=0,n=g.get(e);n!==void 0&&(t+=1/(c+n));let r=_.get(e);return r!==void 0&&(t+=1/(c+r)),t};return h.sort((e,t)=>{let n=+(e.lexical>0),r=+(t.lexical>0);if(n!==r)return r-n;if(n===1)return e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score;let i=v(e.document.id),a=v(t.document.id);return i===a?e.recency===t.recency?e.document.path.localeCompare(t.document.path):t.recency-e.recency:a-i}).map(({document:e,score:t,signals:n})=>({document:e,score:t,signals:n}))}function yce(e){return`https://${e.host}/${e.owner}/${e.repo}.git`}function bce(e,t){return!e||e.length===0?`true`:t.detached?`detached`:t.currentBranch===null||t.currentBranch===e?`true`:`false`}var z9=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),B9=globalThis;B9[z9]===void 0&&(B9[z9]=Xr());var V9=B9[z9],H9=z({version:P().regex(/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(V9,{description:`Recorded skill version for this target.`}),recordedAt:ha().register(V9,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:B([`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`]).register(V9,{description:`Install-source surface that recorded this entry.`}).optional()}),xce=z({enabled:I().register(V9,{description:`Whether this user-global skill bundle is opted in.`}),decidedAt:ha().register(V9,{description:`ISO 8601 timestamp of the opt-in / opt-out decision.`})});z({schema:V(1).register(V9,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:z({"claude-cowork":H9.optional(),"cli-hosts":H9.optional()}).register(V9,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({}),bundles:uo(P(),xce).register(V9,{description:`Per-bundle opt-in decisions keyed by install name. Absent key = no recorded decision.`}).optional()});var Sce=new Set([`(connected)`,`(agent thread)`]);function Cce(e){return e!=null&&Sce.has(e)}var U9=class extends Error{chunksCompleted;totalChunks;bytesWritten;bytesRemaining;cause;constructor(e,t){let n=e instanceof Error?e.message:typeof e==`string`?e:`unknown error`;super(`chunked insert failed after ${t.chunksCompleted}/${t.totalChunks} chunks (${t.bytesWritten} bytes written, ${t.bytesRemaining} bytes lost): ${n}`),this.name=`ChunkedInsertError`,this.chunksCompleted=t.chunksCompleted,this.totalChunks=t.totalChunks,this.bytesWritten=t.bytesWritten,this.bytesRemaining=t.bytesRemaining,this.cause=e}};async function wce(e,t,n,r,i={}){let a=i.thresholdBytes??512e3,o=i.chunkSizeBytes??51200,s=i.origin,c=i.yieldFn??Tce,l=i.resolveOffset??(e=>e);if(r.length<=a){e.transact(()=>{t.insert(n,r)},s);return}let u=Math.ceil(r.length/o),d=0,f=n,p=0,m=0;for(;d<r.length;){let n=Math.min(d+o,r.length),i=r.slice(d,n);try{let n=l(f);e.transact(()=>{t.insert(n,i)},s)}catch(e){throw new U9(e,{chunksCompleted:p,totalChunks:u,bytesWritten:m,bytesRemaining:r.length-d})}p++,m+=i.length,f+=i.length,d=n,d<r.length&&await c()}}function Tce(){return new Promise(e=>{let t=globalThis;t.document?.hidden!==!0&&typeof t.requestAnimationFrame==`function`?t.requestAnimationFrame(()=>e()):setTimeout(()=>e(),0)})}function Ece(){let e=!1,t=``,n=0;return r=>{let i=Dce(r);return e?(i&&i.char===t&&i.len>=n&&!i.hasInfo&&(e=!1,t=``,n=0),!0):i?(e=!0,t=i.char,n=i.len,!0):!1}}function Dce(e){let t=(e.endsWith(`\r`)?e.slice(0,-1):e).match(/^ {0,3}([`~])(\1{2,})(.*)$/);return t?{char:t[1],len:1+t[2].length,hasInfo:t[3].trim()!==``}:null}var Oce=/^(#{1,6})\s+(.+)$/;function kce(e,t){let n=(e.endsWith(`\r`)?e.slice(0,-1):e).match(Oce);if(!n)return null;let r=n[2].trim(),i=h7(r,t);return i?{level:n[1].length,text:r,slug:i}:null}var Ace=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],jce={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`},Mce={cursor:`#FFFFFF`,windsurf:`#FFFFFF`},W9=[`#f0ece3`,`#fff5e1`,`#f9e1db`,`#f5def7`,`#ece2fb`,`#dce8fa`,`#DBF3FB`];function Nce(e,t=Ace){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}function Pce(e){let t=e.trim();if(!t)return`?`;let n=t.split(/[-\s]+/).filter(Boolean);if(!n.length)return`?`;if(n.length>=2)return n.slice(0,2).map(e=>e[0]??``).join(``).toUpperCase();let r=n[0],i=[r[0]];for(let e=1;e<r.length&&i.length<2;e++){let t=r[e-1],n=r[e];t===t.toLowerCase()&&n===n.toUpperCase()&&n!==n.toLowerCase()&&i.push(n)}return i.length>=2?i.join(``).toUpperCase():r.slice(0,2).toUpperCase()}function Fce(e){let t=e.trim();if(!t)return e;if(t.includes(` `)||!/[-_]/.test(t))return t;let n=t.split(/[-_]+/).filter(Boolean);return n.length?n.map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `):t}var Ice={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,"codex-mcp-client":`openai`,copilot:`github`,cline:`cline`};function Lce(e){return e?Ice[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}function Rce(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2;if(i===a)return[0,0,o*100];let s=i-a,c=o>.5?s/(2-i-a):s/(i+a),l;return l=i===t?((n-r)/s+(n<r?6:0))/6:i===n?((r-t)/s+2)/6:((t-n)/s+4)/6,[l*360,c*100,o*100]}function zce(e,t,n){let r=t/100,i=n/100,a=r*Math.min(i,1-i),o=t=>{let n=(t+e/30)%12,r=i-a*Math.max(Math.min(n-3,9-n,1),-1);return Math.round(255*r).toString(16).padStart(2,`0`)};return`#${o(0)}${o(8)}${o(4)}`}function Bce(e){let[t]=Rce(e);return zce(t,45,32)}var Vce=[`Curious`,`Brave`,`Clever`,`Swift`,`Gentle`,`Bright`,`Wise`,`Bold`,`Calm`,`Keen`],Hce=[`Bird`,`Cat`,`Dog`,`Fish`,`Mouse`,`Rabbit`,`Shrimp`,`Snail`,`Squirrel`,`Turtle`],G9=`ok-user-name-v3`,K9=`ok-user-color-v3`;function q9(e){return e[Math.floor(Math.random()*e.length)]}function Uce(){return`${q9(Vce)} ${q9(Hce)}`}function Wce(){return q9(W9)}function J9(e){try{return localStorage.getItem(e)}catch{return null}}function Y9(e,t){try{localStorage.setItem(e,t)}catch{}}function Gce(){let e=new URLSearchParams(window.location.search).get(`coeditor`)||`standalone`,t=crypto.randomUUID(),n=J9(G9),r=J9(K9);return n||(n=Uce(),Y9(G9,n)),r||(r=Wce(),Y9(K9,r)),{name:n,color:r,coeditor:e,tabId:t}}function Kce(e,t){let n=e.trim();if(!n||/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=r>=0?n.slice(0,r):n,a=r>=0?n.slice(r+1):null,o=(i.split(`?`)[0]??``).trim();if(!o)return null;let s=(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=(s[1]??``).toLowerCase();if(e!==`md`&&e!==`mdx`)return null}let c=o.toLowerCase(),l=c.endsWith(`.mdx`)?o.slice(0,-4):c.endsWith(`.md`)?o.slice(0,-3):o,u=l.startsWith(`/`),d=u?l.slice(1):l,f=u?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of d.split(`/`))if(e===`..`){if(f.length===0)return null;f.pop()}else e!==`.`&&e!==``&&f.push(e);return f.length===0?null:{docName:f.join(`/`),anchor:a||null}}function qce(e){throw Error(`Unhandled ClassifiedLinkTarget variant: ${JSON.stringify(e)}`)}var X9=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function Z9(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function Q9(e){return e.split(`/`).filter(Boolean)}function $9(e){let t=e.trim();return X9.test(t)||t.startsWith(`//`)}function Jce(e,t){let n=e.trim();if(!n)return null;if(n.startsWith(`#`)){let e=n.slice(1).trim();return e?{kind:`anchor`,anchor:e}:null}if($9(n))return{kind:`external`,url:n};let r=n.indexOf(`#`),i=r<0?n:n.slice(0,r),a=Xf(i,t);if(a)return{kind:`doc`,docName:a,anchor:r<0?null:n.slice(r+1)};let o=Yf(i,t);if(o)return{kind:`doc`,docName:o,anchor:r<0?null:n.slice(r+1)};let s=Kce(n,t);if(s)return{kind:`doc`,docName:s.docName,anchor:s.anchor};let c=Z9(n);return c&&c!==`md`&&c!==`mdx`?{kind:`asset`,url:n,ext:c}:null}function Yce(e,t){let n=e.trim();if(!n)return null;if($9(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=Z9(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function Xce(e,t){let n=e.trim();if(!n||X9.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=((r>=0?n.slice(0,r):n).split(`?`)[0]??``).trim();if(!i)return null;let a=i.startsWith(`/`),o=a?i.slice(1):i,s=a?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of o.split(`/`))if(e===`..`){if(s.length===0)return null;s.pop()}else e!==`.`&&e!==``&&s.push(e);return s.length===0?null:s.join(`/`)}function Zce(e,t,n=null,r=`.md`){let i=Q9(e);i.pop();let a=Q9(t),o=0;for(;o<i.length&&o<a.length&&i[o]===a[o];)o+=1;let s=i.slice(o).map(()=>`..`),c=a.slice(o),l=[...s,...c].join(`/`);return l||=a.at(-1)??t,!l.startsWith(`./`)&&!l.startsWith(`../`)&&(l=`./${l}`),`${l}${r}${n?`#${n}`:``}`}function Qce(e){return e.replace(/[/\\:*?"<>|\0]/g,`-`).replace(/\s+/g,` `).replace(/-+/g,`-`).trim().replace(/^[-.\s]+|[-.\s]+$/g,``)}export{Bre as $,kd as $a,Hh as $i,w4 as $n,m7 as $r,QQ as $t,R7 as A,Uf as Aa,MC as Ai,Bce as An,ja as Ao,HQ as Ar,Toe as At,H0 as B,np as Ba,Vx as Bi,FZ as Bn,Qce as Br,Nie as Bt,ioe as C,hp as Ca,mT as Ci,ese as Cn,ff as Co,fae as Cr,C1 as Ct,doe as D,Vf as Da,zC as Di,v4 as Dn,Vo as Do,NZ as Dr,B7 as Dt,hZ as E,Hf as Ea,RC as Ei,Ece as En,B as Eo,rZ as Er,j1 as Et,Rse as F,Wf as Fa,hS as Fi,KQ as Fn,jt as Fo,H2 as Fr,Coe as Ft,mZ as G,Sp as Ga,q as Gi,h7 as Gn,H1 as Gr,Ise as Gt,R8 as H,em as Ha,ex as Hi,K5 as Hn,OX as Hr,GQ as Ht,E9 as I,ep as Ia,bC as Ii,Z9 as In,wt as Io,a9 as Ir,foe as It,Vae as J,sf as Ja,G as Ji,lZ as Jn,d$ as Jr,XX as Jt,QZ as K,$u as Ka,Lg as Ki,Gce as Kn,YQ as Kr,l1 as Kt,Mae as L,ip as La,tw as Li,Vse as Ln,i9 as Lr,DZ as Lt,Eae as M,Bf as Ma,$C as Mi,Vie as Mn,R as Mo,Joe as Mr,l$ as Mt,aoe as N,_p as Na,hT as Ni,PX as Nn,P as No,MX as Nr,_Z as Nt,Sae as O,Fp as Oa,xC as Oi,Qse as On,L as Oo,Fse as Or,Ooe as Ot,sZ as P,op as Pa,RS as Pi,cZ as Pn,kt as Po,UQ as Pr,IQ as Pt,f7 as Q,ud as Qa,Ih as Qi,N4 as Qn,Eie as Qr,u$ as Qt,Aie as R,Qf as Ra,ET as Ri,Zoe as Rn,Xce as Rr,EZ as Rt,wae as S,fp as Sa,aC as Si,x$ as Sn,af as So,Uie as Sr,L1 as St,Cie as T,Xp as Ta,cC as Ti,Hie as Tn,Wd as To,Z0 as Tr,D1 as Tt,VZ as U,bp as Ua,Ox as Ui,Fce as Un,_ce as Ur,JQ as Ut,Uae as V,tp as Va,Zb as Vi,Rie as Vn,kce as Vr,Mie as Vt,HZ as W,Gf as Wa,wg as Wi,qoe as Wn,t7 as Wr,zae as Wt,Pie as X,ef as Xa,K as Xi,Lce as Xn,Qre as Xr,nZ as Xt,Oie as Y,dd as Ya,yg as Yi,X0 as Yn,XQ as Yr,xse as Yt,qae as Z,tf as Za,Vh as Zi,M4 as Zn,BZ as Zr,ZQ as Zt,FX as _,yp as _a,Ow as _i,T$ as _n,Ru as _o,JZ as _r,lQ as _t,TX as a,Dm as aa,aj as ai,bce as an,fd as ao,C4 as ar,Hae as at,OZ as b,mp as ba,AT as bi,w$ as bn,Dd as bo,Lse as br,KZ as bt,zoe as c,sp as ca,$A as ci,CX as cn,Gd as co,ZZ as cr,coe as ct,Boe as d,Pf as da,tk as di,Nce as dn,Jd as do,Iie as dr,R1 as dt,Kh as ea,NX as ei,e$ as en,Zu as eo,T4 as er,cQ as et,Voe as f,Nf as fa,sk as fi,Q$ as fn,Vu as fo,m1 as fr,B1 as ft,xX as g,up as ga,Gw as gi,d1 as gn,Ed as go,Cce as gr,zie as gt,uZ as h,pp as ha,oT as hi,C$ as hn,Ef as ho,xZ as hr,kX as ht,Qae as i,U as ia,k9 as ii,wce as in,id as io,E4 as ir,bZ as it,Dae as j,Pp as ja,NC as ji,yZ as jn,V as jo,P2 as jr,c$ as jt,J7 as k,Ap as ka,AC as ki,Zse as kn,I as ko,P5 as kr,Doe as kt,Uoe as l,Ff as la,HO as li,wX as ln,Hu as lo,gZ as lr,ooe as lt,dZ as m,lp as ma,QO as mi,E$ as mn,Qu as mo,Tie as mr,AX as mt,Mce as n,_g as na,g7 as ni,f$ as nn,rd as no,D4 as nr,b$ as nt,Aae as o,W as oa,ZA as oi,Jce as on,rf as oo,O4 as or,wZ as ot,Roe as p,cp as pa,AO as pi,D$ as pn,kf as po,F2 as pr,xae as pt,Fae as q,od as qa,Bg as qi,WQ as qn,t$ as qr,qce as qt,Zae as r,vh as ra,v$ as ri,yce as rn,Vd as ro,A4 as rr,CZ as rt,kae as s,nm as sa,ej as si,Yce as sn,Ju as so,k4 as sr,TZ as st,jce as t,Gh as ta,U1 as ti,Zce as tn,sd as to,j4 as tr,y$ as tt,Hoe as u,Mf as ua,CO as ui,PZ as un,Ld as uo,$9 as ur,Cae as ut,fZ as v,Lf as va,QC as vi,u1 as vn,Lu as vo,qZ as vr,uoe as vt,roe as w,jf as wa,sC as wi,Pce as wn,Gu as wo,lae as wr,O1 as wt,P7 as x,Cp as xa,DT as xi,S$ as xn,Wu as xo,L2 as xr,woe as xt,U9 as y,zf as ya,kT as yi,X$ as yn,Bu as yo,xoe as yr,WZ as yt,W9 as z,qf as za,lT as zi,WX as zn,Goe as zr,V1 as zt};
581
+ `).replace(/\n+$/,``)}function T9(e){return[...e.replace(/^\n+/,``).replace(/\n+$/,``).matchAll(/\n{2,}/g)].map(e=>e[0].length)}function Ise(e,t){let n=T9(e),r=T9(t);return n.length===r.length?r.some((e,t)=>e>(n[t]??0)):!1}var E9=/^[a-zA-Z0-9][\w/-]*$/;function Lse(e){if(typeof e!=`string`)return!1;let t=e.startsWith(`#`)?e.slice(1):e;return E9.test(t)}var Rse=`Tags must start with a letter or digit and contain only letters, digits, underscores, dashes, and slashes.`;function zse(e){return e.startsWith(`#`)?e.slice(1):e}function Bse(e){return typeof e==`string`?[e]:Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function Vse(e){if(!e||e.trim()===``)return[];let{map:t}=Lp(e);if(!t)return[];let n=Bse(t.tags),r=[];for(let e of n){let t=zse(e);E9.test(t)&&r.push(t)}return r}var Hse=B(zf),Use=z({hosts:L(P()),scope:Hse,scripts:I(),installedAt:ha(),projection:B([`symlink`,`copy`]).optional(),contentHash:P().optional()});z({schema:V(1),skills:uo(P(),Use).default({})});var Wse=100,Gse=500,Kse=450,qse={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},D9=new WeakMap;function Jse(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function O9(e){return e.trim().toLowerCase()}var Yse=/\.(?:md|mdx)$/;function Xse(e,t){if(t!==`page`)return e;let n=e.replace(Yse,``);return n.length>0?n:e}function k9(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function Zse(e){let t=k9(e.path),n=e.title?.trim()||t,r=e.modifiedTs??0,i=e.path.split(`/`).filter(Boolean),a=new Set(i),o=[...new Set((e.aliases??[]).flatMap(e=>e.split(`/`).filter(Boolean)).filter(e=>!a.has(e)))];return{id:`${e.kind}:${e.path}`,kind:e.kind,path:e.path,title:n,name:t,pathSegments:[...i,...o].join(` `),content:e.content??``,modifiedTs:Number.isFinite(r)?r:0}}function A9(e){let t=OY({schema:qse});return e.length>0&&zY(t,e),t}function Qse(e){let t={documents:e};return D9.set(t,A9(e)),t}function $se(e){let t=D9.get(e);if(t)return t;let n=A9(e.documents);return D9.set(e,n),n}function ece(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function j9(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function tce(e,t){let n=O9(t);if(!n)return 0;let r=Xse(n,e.kind),i=O9(e.title),a=O9(e.name),o=O9(e.path),s=o.split(`/`);return i===r||a===r?700:o===r?650:i.startsWith(r)||a.startsWith(r)?600:s.some(e=>e.startsWith(r))?550:i.includes(r)||a.includes(r)?500:o.includes(r)?450:-1}var nce=.5;function M9(e,t){let n=tce(e,t);return n<=0?n:m1(e.path)?n*nce:n}var rce=60;function ice(e){return e===`file`?-rce:0}var ace=1e3,N9=50,oce=1,sce=1,cce=.001;function lce(e,t,n,r,i){let a=i>0?t/i:0,o=N9>0?n/N9:0,s=r===`file`?-cce:0,c=oce*a+sce*o+s;return e*ace+c}function P9(e,t,n,r){return e+t*20+n+ice(r)}function F9(e,t,n,r,i,a){return e===`relevance`?P9(t,n,r,i):lce(t,n,r,i,a)}function uce(e,t){return t||(e===`full_text`?`relevance`:`navigation`)}function I9(e,t){let n=0;for(let r of e){let e=t.get(r.id)??0;e>n&&(n=e)}return n}function dce(e){let t=e.map(e=>e.modifiedTs).filter(e=>Number.isFinite(e)&&e>0);if(t.length===0)return new Map;let n=1/0,r=-1/0;for(let e of t)e<n&&(n=e),e>r&&(r=e);let i=Math.max(1,r-n);return new Map(e.map(e=>[e.id,e.modifiedTs>0?(e.modifiedTs-n)/i*50:0]))}function fce(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function pce(e){return e===`full_text`?{title:8,name:7,path:5,pathSegments:4,content:1}:e===`autocomplete`?{title:10,name:9,path:5,pathSegments:4}:{title:8,name:7,path:5,pathSegments:4}}function mce(e,t){return O9(t).length<4?0:+(e===`full_text`)}function hce(e){let{lexical:t,fullText:n}=e.signals;return t>=Gse?`lexical`:t===Kse&&n<=0?`pathOnly`:`body`}function gce(e){let t=[],n=[],r=[];for(let i of e){let e=hce(i);e===`lexical`?t.length<Wse&&t.push(i):e===`body`?n.length<6&&n.push(i):r.length<4&&r.push(i)}return[...t,...n,...r]}function L9(e,t,n){if(t===`relevance`)return e.slice(0,n);let r=gce(e),i=[],a=0,o=0;for(let e of r){if(e.document.kind===`folder`){if(a>=3)continue;a+=1}else if(e.document.kind===`file`){if(o>=3)continue;o+=1}if(i.push(e),i.length>=n)break}return i}function _ce(e,t,n={}){let r=n.intent??`omnibar`,i=uce(r,n.ranking),a=Jse(n.limit),o=new Set(n.scopes??ece(r)),s=e.documents.filter(e=>j9(e,o)),c=O9(t);if(!c)return s.slice().sort((e,t)=>e.path.localeCompare(t.path)).slice(0,a).map(e=>({document:e,score:0,signals:{lexical:0,fullText:0,recency:0}}));let l=hX($se(e),{term:c,properties:fce(r),boost:pce(r),tolerance:mce(r,c),limit:Math.max(a*4,40)}),u=new Map(l.hits.filter(e=>j9(e.document,o)).map(e=>[e.document.id,e.score])),d=dce(s),f=new Map;for(let e of s)M9(e,c)>=0&&f.set(e.id,e);for(let e of l.hits)j9(e.document,o)&&f.set(e.document.id,e.document);if(!n.semantic){let e=I9(f.values(),u);return L9([...f.values()].map(t=>{let n=Math.max(0,M9(t,c)),r=u.get(t.id)??0,a=d.get(t.id)??0;return{document:t,score:F9(i,n,r,a,t.kind,e),signals:{lexical:n,fullText:r,recency:a}}}).sort((e,t)=>e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score),i,a)}return L9(vce({scopedDocuments:s,candidates:f,fullTextScores:u,recency:d,normalizedQuery:c,ranking:i,semantic:n.semantic}),i,a)}function R9(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function vce(e){let{scopedDocuments:t,candidates:n,fullTextScores:r,recency:i,normalizedQuery:a,ranking:o,semantic:s}=e,c=s.rrfK??60,l=s.candidateLimit??64,u=s.similarityFloor??0,d=s.scores,f=new Map(t.map(e=>[e.id,e])),p=[...d.entries()].filter(([e,t])=>t>=u&&f.has(e)).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).slice(0,l);for(let[e]of p)if(!n.has(e)){let t=f.get(e);t&&n.set(e,t)}let m=I9(n.values(),r),h=[...n.values()].map(e=>{let t=Math.max(0,M9(e,a)),n=r.get(e.id)??0,s=i.get(e.id)??0,c=d.get(e.id),l=c!==void 0&&c>=u;return{document:e,score:t>0?F9(o,t,n,s,e.kind,m):P9(t,n,s,e.kind),signals:l?{lexical:t,fullText:n,recency:s,vector:c}:{lexical:t,fullText:n,recency:s},lexical:t,fullText:n,recency:s,cosine:c}}),g=R9(h.filter(e=>e.fullText>0).sort((e,t)=>t.fullText-e.fullText||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),_=R9(h.filter(e=>e.cosine!==void 0&&e.cosine>=u).sort((e,t)=>t.cosine-e.cosine||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),v=e=>{let t=0,n=g.get(e);n!==void 0&&(t+=1/(c+n));let r=_.get(e);return r!==void 0&&(t+=1/(c+r)),t};return h.sort((e,t)=>{let n=+(e.lexical>0),r=+(t.lexical>0);if(n!==r)return r-n;if(n===1)return e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score;let i=v(e.document.id),a=v(t.document.id);return i===a?e.recency===t.recency?e.document.path.localeCompare(t.document.path):t.recency-e.recency:a-i}).map(({document:e,score:t,signals:n})=>({document:e,score:t,signals:n}))}function yce(e){return`https://${e.host}/${e.owner}/${e.repo}.git`}function bce(e,t){return!e||e.length===0?`true`:t.detached?`detached`:t.currentBranch===null||t.currentBranch===e?`true`:`false`}var z9=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),B9=globalThis;B9[z9]===void 0&&(B9[z9]=Xr());var V9=B9[z9],H9=z({version:P().regex(/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(V9,{description:`Recorded skill version for this target.`}),recordedAt:ha().register(V9,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:B([`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`]).register(V9,{description:`Install-source surface that recorded this entry.`}).optional()}),xce=z({enabled:I().register(V9,{description:`Whether this user-global skill bundle is opted in.`}),decidedAt:ha().register(V9,{description:`ISO 8601 timestamp of the opt-in / opt-out decision.`})});z({schema:V(1).register(V9,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:z({"claude-cowork":H9.optional(),"cli-hosts":H9.optional()}).register(V9,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({}),bundles:uo(P(),xce).register(V9,{description:`Per-bundle opt-in decisions keyed by install name. Absent key = no recorded decision.`}).optional(),installsReported:L(P()).register(V9,{description:"Skill installs already reported to skills.sh from this machine, as `<owner/repo>#<skill>`. Append-only; presence suppresses a re-report."}).optional()});var Sce=new Set([`(connected)`,`(agent thread)`]);function Cce(e){return e!=null&&Sce.has(e)}var U9=class extends Error{chunksCompleted;totalChunks;bytesWritten;bytesRemaining;cause;constructor(e,t){let n=e instanceof Error?e.message:typeof e==`string`?e:`unknown error`;super(`chunked insert failed after ${t.chunksCompleted}/${t.totalChunks} chunks (${t.bytesWritten} bytes written, ${t.bytesRemaining} bytes lost): ${n}`),this.name=`ChunkedInsertError`,this.chunksCompleted=t.chunksCompleted,this.totalChunks=t.totalChunks,this.bytesWritten=t.bytesWritten,this.bytesRemaining=t.bytesRemaining,this.cause=e}};async function wce(e,t,n,r,i={}){let a=i.thresholdBytes??512e3,o=i.chunkSizeBytes??51200,s=i.origin,c=i.yieldFn??Tce,l=i.resolveOffset??(e=>e);if(r.length<=a){e.transact(()=>{t.insert(n,r)},s);return}let u=Math.ceil(r.length/o),d=0,f=n,p=0,m=0;for(;d<r.length;){let n=Math.min(d+o,r.length),i=r.slice(d,n);try{let n=l(f);e.transact(()=>{t.insert(n,i)},s)}catch(e){throw new U9(e,{chunksCompleted:p,totalChunks:u,bytesWritten:m,bytesRemaining:r.length-d})}p++,m+=i.length,f+=i.length,d=n,d<r.length&&await c()}}function Tce(){return new Promise(e=>{let t=globalThis;t.document?.hidden!==!0&&typeof t.requestAnimationFrame==`function`?t.requestAnimationFrame(()=>e()):setTimeout(()=>e(),0)})}function Ece(){let e=!1,t=``,n=0;return r=>{let i=Dce(r);return e?(i&&i.char===t&&i.len>=n&&!i.hasInfo&&(e=!1,t=``,n=0),!0):i?(e=!0,t=i.char,n=i.len,!0):!1}}function Dce(e){let t=(e.endsWith(`\r`)?e.slice(0,-1):e).match(/^ {0,3}([`~])(\1{2,})(.*)$/);return t?{char:t[1],len:1+t[2].length,hasInfo:t[3].trim()!==``}:null}var Oce=/^(#{1,6})\s+(.+)$/;function kce(e,t){let n=(e.endsWith(`\r`)?e.slice(0,-1):e).match(Oce);if(!n)return null;let r=n[2].trim(),i=h7(r,t);return i?{level:n[1].length,text:r,slug:i}:null}var Ace=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],jce={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`},Mce={cursor:`#FFFFFF`,windsurf:`#FFFFFF`},W9=[`#f0ece3`,`#fff5e1`,`#f9e1db`,`#f5def7`,`#ece2fb`,`#dce8fa`,`#DBF3FB`];function Nce(e,t=Ace){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}function Pce(e){let t=e.trim();if(!t)return`?`;let n=t.split(/[-\s]+/).filter(Boolean);if(!n.length)return`?`;if(n.length>=2)return n.slice(0,2).map(e=>e[0]??``).join(``).toUpperCase();let r=n[0],i=[r[0]];for(let e=1;e<r.length&&i.length<2;e++){let t=r[e-1],n=r[e];t===t.toLowerCase()&&n===n.toUpperCase()&&n!==n.toLowerCase()&&i.push(n)}return i.length>=2?i.join(``).toUpperCase():r.slice(0,2).toUpperCase()}function Fce(e){let t=e.trim();if(!t)return e;if(t.includes(` `)||!/[-_]/.test(t))return t;let n=t.split(/[-_]+/).filter(Boolean);return n.length?n.map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `):t}var Ice={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,"codex-mcp-client":`openai`,copilot:`github`,cline:`cline`};function Lce(e){return e?Ice[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}function Rce(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2;if(i===a)return[0,0,o*100];let s=i-a,c=o>.5?s/(2-i-a):s/(i+a),l;return l=i===t?((n-r)/s+(n<r?6:0))/6:i===n?((r-t)/s+2)/6:((t-n)/s+4)/6,[l*360,c*100,o*100]}function zce(e,t,n){let r=t/100,i=n/100,a=r*Math.min(i,1-i),o=t=>{let n=(t+e/30)%12,r=i-a*Math.max(Math.min(n-3,9-n,1),-1);return Math.round(255*r).toString(16).padStart(2,`0`)};return`#${o(0)}${o(8)}${o(4)}`}function Bce(e){let[t]=Rce(e);return zce(t,45,32)}var Vce=[`Curious`,`Brave`,`Clever`,`Swift`,`Gentle`,`Bright`,`Wise`,`Bold`,`Calm`,`Keen`],Hce=[`Bird`,`Cat`,`Dog`,`Fish`,`Mouse`,`Rabbit`,`Shrimp`,`Snail`,`Squirrel`,`Turtle`],G9=`ok-user-name-v3`,K9=`ok-user-color-v3`;function q9(e){return e[Math.floor(Math.random()*e.length)]}function Uce(){return`${q9(Vce)} ${q9(Hce)}`}function Wce(){return q9(W9)}function J9(e){try{return localStorage.getItem(e)}catch{return null}}function Y9(e,t){try{localStorage.setItem(e,t)}catch{}}function Gce(){let e=new URLSearchParams(window.location.search).get(`coeditor`)||`standalone`,t=crypto.randomUUID(),n=J9(G9),r=J9(K9);return n||(n=Uce(),Y9(G9,n)),r||(r=Wce(),Y9(K9,r)),{name:n,color:r,coeditor:e,tabId:t}}function Kce(e,t){let n=e.trim();if(!n||/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=r>=0?n.slice(0,r):n,a=r>=0?n.slice(r+1):null,o=(i.split(`?`)[0]??``).trim();if(!o)return null;let s=(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=(s[1]??``).toLowerCase();if(e!==`md`&&e!==`mdx`)return null}let c=o.toLowerCase(),l=c.endsWith(`.mdx`)?o.slice(0,-4):c.endsWith(`.md`)?o.slice(0,-3):o,u=l.startsWith(`/`),d=u?l.slice(1):l,f=u?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of d.split(`/`))if(e===`..`){if(f.length===0)return null;f.pop()}else e!==`.`&&e!==``&&f.push(e);return f.length===0?null:{docName:f.join(`/`),anchor:a||null}}function qce(e){throw Error(`Unhandled ClassifiedLinkTarget variant: ${JSON.stringify(e)}`)}var X9=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function Z9(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function Q9(e){return e.split(`/`).filter(Boolean)}function $9(e){let t=e.trim();return X9.test(t)||t.startsWith(`//`)}function Jce(e,t){let n=e.trim();if(!n)return null;if(n.startsWith(`#`)){let e=n.slice(1).trim();return e?{kind:`anchor`,anchor:e}:null}if($9(n))return{kind:`external`,url:n};let r=n.indexOf(`#`),i=r<0?n:n.slice(0,r),a=Xf(i,t);if(a)return{kind:`doc`,docName:a,anchor:r<0?null:n.slice(r+1)};let o=Yf(i,t);if(o)return{kind:`doc`,docName:o,anchor:r<0?null:n.slice(r+1)};let s=Kce(n,t);if(s)return{kind:`doc`,docName:s.docName,anchor:s.anchor};let c=Z9(n);return c&&c!==`md`&&c!==`mdx`?{kind:`asset`,url:n,ext:c}:null}function Yce(e,t){let n=e.trim();if(!n)return null;if($9(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=Z9(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function Xce(e,t){let n=e.trim();if(!n||X9.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=((r>=0?n.slice(0,r):n).split(`?`)[0]??``).trim();if(!i)return null;let a=i.startsWith(`/`),o=a?i.slice(1):i,s=a?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of o.split(`/`))if(e===`..`){if(s.length===0)return null;s.pop()}else e!==`.`&&e!==``&&s.push(e);return s.length===0?null:s.join(`/`)}function Zce(e,t,n=null,r=`.md`){let i=Q9(e);i.pop();let a=Q9(t),o=0;for(;o<i.length&&o<a.length&&i[o]===a[o];)o+=1;let s=i.slice(o).map(()=>`..`),c=a.slice(o),l=[...s,...c].join(`/`);return l||=a.at(-1)??t,!l.startsWith(`./`)&&!l.startsWith(`../`)&&(l=`./${l}`),`${l}${r}${n?`#${n}`:``}`}function Qce(e){return e.replace(/[/\\:*?"<>|\0]/g,`-`).replace(/\s+/g,` `).replace(/-+/g,`-`).trim().replace(/^[-.\s]+|[-.\s]+$/g,``)}export{Bre as $,kd as $a,Hh as $i,w4 as $n,m7 as $r,QQ as $t,R7 as A,Uf as Aa,MC as Ai,Bce as An,ja as Ao,HQ as Ar,Toe as At,H0 as B,np as Ba,Vx as Bi,FZ as Bn,Qce as Br,Nie as Bt,ioe as C,hp as Ca,mT as Ci,ese as Cn,ff as Co,fae as Cr,C1 as Ct,doe as D,Vf as Da,zC as Di,v4 as Dn,Vo as Do,NZ as Dr,B7 as Dt,hZ as E,Hf as Ea,RC as Ei,Ece as En,B as Eo,rZ as Er,j1 as Et,Rse as F,Wf as Fa,hS as Fi,KQ as Fn,jt as Fo,H2 as Fr,Coe as Ft,mZ as G,Sp as Ga,q as Gi,h7 as Gn,H1 as Gr,Ise as Gt,R8 as H,em as Ha,ex as Hi,K5 as Hn,OX as Hr,GQ as Ht,E9 as I,ep as Ia,bC as Ii,Z9 as In,wt as Io,a9 as Ir,foe as It,Vae as J,sf as Ja,G as Ji,lZ as Jn,d$ as Jr,XX as Jt,QZ as K,$u as Ka,Lg as Ki,Gce as Kn,YQ as Kr,l1 as Kt,Mae as L,ip as La,tw as Li,Vse as Ln,i9 as Lr,DZ as Lt,Eae as M,Bf as Ma,$C as Mi,Vie as Mn,R as Mo,Joe as Mr,l$ as Mt,aoe as N,_p as Na,hT as Ni,PX as Nn,P as No,MX as Nr,_Z as Nt,Sae as O,Fp as Oa,xC as Oi,Qse as On,L as Oo,Fse as Or,Ooe as Ot,sZ as P,op as Pa,RS as Pi,cZ as Pn,kt as Po,UQ as Pr,IQ as Pt,f7 as Q,ud as Qa,Ih as Qi,N4 as Qn,Eie as Qr,u$ as Qt,Aie as R,Qf as Ra,ET as Ri,Zoe as Rn,Xce as Rr,EZ as Rt,wae as S,fp as Sa,aC as Si,x$ as Sn,af as So,Uie as Sr,L1 as St,Cie as T,Xp as Ta,cC as Ti,Hie as Tn,Wd as To,Z0 as Tr,D1 as Tt,VZ as U,bp as Ua,Ox as Ui,Fce as Un,_ce as Ur,JQ as Ut,Uae as V,tp as Va,Zb as Vi,Rie as Vn,kce as Vr,Mie as Vt,HZ as W,Gf as Wa,wg as Wi,qoe as Wn,t7 as Wr,zae as Wt,Pie as X,ef as Xa,K as Xi,Lce as Xn,Qre as Xr,nZ as Xt,Oie as Y,dd as Ya,yg as Yi,X0 as Yn,XQ as Yr,xse as Yt,qae as Z,tf as Za,Vh as Zi,M4 as Zn,BZ as Zr,ZQ as Zt,FX as _,yp as _a,Ow as _i,T$ as _n,Ru as _o,JZ as _r,lQ as _t,TX as a,Dm as aa,aj as ai,bce as an,fd as ao,C4 as ar,Hae as at,OZ as b,mp as ba,AT as bi,w$ as bn,Dd as bo,Lse as br,KZ as bt,zoe as c,sp as ca,$A as ci,CX as cn,Gd as co,ZZ as cr,coe as ct,Boe as d,Pf as da,tk as di,Nce as dn,Jd as do,Iie as dr,R1 as dt,Kh as ea,NX as ei,e$ as en,Zu as eo,T4 as er,cQ as et,Voe as f,Nf as fa,sk as fi,Q$ as fn,Vu as fo,m1 as fr,B1 as ft,xX as g,up as ga,Gw as gi,d1 as gn,Ed as go,Cce as gr,zie as gt,uZ as h,pp as ha,oT as hi,C$ as hn,Ef as ho,xZ as hr,kX as ht,Qae as i,U as ia,k9 as ii,wce as in,id as io,E4 as ir,bZ as it,Dae as j,Pp as ja,NC as ji,yZ as jn,V as jo,P2 as jr,c$ as jt,J7 as k,Ap as ka,AC as ki,Zse as kn,I as ko,P5 as kr,Doe as kt,Uoe as l,Ff as la,HO as li,wX as ln,Hu as lo,gZ as lr,ooe as lt,dZ as m,lp as ma,QO as mi,E$ as mn,Qu as mo,Tie as mr,AX as mt,Mce as n,_g as na,g7 as ni,f$ as nn,rd as no,D4 as nr,b$ as nt,Aae as o,W as oa,ZA as oi,Jce as on,rf as oo,O4 as or,wZ as ot,Roe as p,cp as pa,AO as pi,D$ as pn,kf as po,F2 as pr,xae as pt,Fae as q,od as qa,Bg as qi,WQ as qn,t$ as qr,qce as qt,Zae as r,vh as ra,v$ as ri,yce as rn,Vd as ro,A4 as rr,CZ as rt,kae as s,nm as sa,ej as si,Yce as sn,Ju as so,k4 as sr,TZ as st,jce as t,Gh as ta,U1 as ti,Zce as tn,sd as to,j4 as tr,y$ as tt,Hoe as u,Mf as ua,CO as ui,PZ as un,Ld as uo,$9 as ur,Cae as ut,fZ as v,Lf as va,QC as vi,u1 as vn,Lu as vo,qZ as vr,uoe as vt,roe as w,jf as wa,sC as wi,Pce as wn,Gu as wo,lae as wr,O1 as wt,P7 as x,Cp as xa,DT as xi,S$ as xn,Wu as xo,L2 as xr,woe as xt,U9 as y,zf as ya,kT as yi,X$ as yn,Bu as yo,xoe as yr,WZ as yt,W9 as z,qf as za,lT as zi,WX as zn,Goe as zr,V1 as zt};