@inkeep/open-knowledge 0.50.0-beta.4 → 0.50.0-beta.6

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 (443) hide show
  1. package/dist/acp-harness-probe-PEHo_hYG.mjs +3 -0
  2. package/dist/cli.mjs +20 -20
  3. package/dist/constants-D9HRzNQG.mjs +2 -0
  4. package/dist/git-handle-B24ZRv9k.mjs +1 -0
  5. package/dist/{git-handle-oaKkz-wn.mjs → git-handle-D48CPnbp.mjs} +2 -2
  6. package/dist/index.d.mts +22 -20
  7. package/dist/index.mjs +135 -135
  8. package/dist/{init-GU2008y6.mjs → init-BJCusUuy.mjs} +3 -3
  9. package/dist/init-zePCt6tf.mjs +1 -0
  10. package/dist/{launch-json-removal-CBvAsHwv.mjs → launch-json-removal-BXFgQzfH.mjs} +2 -2
  11. package/dist/loader-DDNAwcPM.mjs +1 -0
  12. package/dist/{loader-C07VPlQo.mjs → loader-DbPx77mt.mjs} +2 -2
  13. package/dist/md-manager-DLcJdRDn.mjs +2 -0
  14. package/dist/{open-browser-S-UcIs_h.mjs → open-browser-DITljs8e.mjs} +2 -2
  15. package/dist/parse-worker.mjs +1 -1
  16. package/dist/preview-AsssSL6s.mjs +1 -0
  17. package/dist/{preview-JHv_lbF-.mjs → preview-DXyVMz8b.mjs} +2 -2
  18. package/dist/public/assets/{ActivityModeContent-oK0Ukipq.js → ActivityModeContent-c7Ng5dOt.js} +1 -1
  19. package/dist/public/assets/{AgentDiffPane-c-eXlgET.js → AgentDiffPane-CdvdlrTA.js} +2 -2
  20. package/dist/public/assets/{AgentThreadClientBinder-BjgVrGGG.js → AgentThreadClientBinder-CvHvukLZ.js} +1 -1
  21. package/dist/public/assets/{AppMenubar-Dk1BEmD9.js → AppMenubar-DzKyqu4x.js} +1 -1
  22. package/dist/public/assets/{BugReportHistory-CRlvJE2K.js → BugReportHistory-BJFLBqUw.js} +1 -1
  23. package/dist/public/assets/{BugReportHistoryDialog-DIqnZXkT.js → BugReportHistoryDialog-y4fa4pzg.js} +1 -1
  24. package/dist/public/assets/{ChangedOutsideBadge-Tm9eQzQd.js → ChangedOutsideBadge-Bu8uPTJS.js} +1 -1
  25. package/dist/public/assets/CodeMirrorPropInput-fWbdlCkS.js +3 -0
  26. package/dist/public/assets/{ConfigSharingInfoTooltip-BNI3Q3Qo.js → ConfigSharingInfoTooltip-BPA8HEYl.js} +1 -1
  27. package/dist/public/assets/{ConsentDialogBody-BlayjFQq.js → ConsentDialogBody-KXeO_ZFL.js} +1 -1
  28. package/dist/public/assets/{CopyButton-Q-6hSzy6.js → CopyButton-DhHoiQJR.js} +1 -1
  29. package/dist/public/assets/{DiffView-BnNY_4OT.js → DiffView-BjOsi4GM.js} +1 -1
  30. package/dist/public/assets/{DocumentContext-BZs9wGsy.js → DocumentContext-sNpqhUlI.js} +11 -11
  31. package/dist/public/assets/{EditorModeToggle-Dx-H0DAT.js → EditorModeToggle-D4871FSZ.js} +1 -1
  32. package/dist/public/assets/{EnableSyncConfirmDialog-Djkj66_G.js → EnableSyncConfirmDialog-cBuI6coM.js} +1 -1
  33. package/dist/public/assets/FeedbackForm-BFd0ubqI.js +1 -0
  34. package/dist/public/assets/{GraphPanel-5y13eIH-.js → GraphPanel-CAMYjjtr.js} +2 -2
  35. package/dist/public/assets/{ImportSkillDialog-BpbNmo53.js → ImportSkillDialog-BepHDHz6.js} +1 -1
  36. package/dist/public/assets/{LintConfigEditor-B8UqIDri.js → LintConfigEditor-DRA7zDJD.js} +1 -1
  37. package/dist/public/assets/ManagedArtifactProperties-CLh5T0qS.js +2 -0
  38. package/dist/public/assets/ManagedArtifactProperties-Ct_XfVJo.js +1 -0
  39. package/dist/public/assets/{McpConsentDialogBody-DmSeUtFh.js → McpConsentDialogBody-ONRUf-u9.js} +1 -1
  40. package/dist/public/assets/{Mermaid-cUFqNhzC.js → Mermaid-D-pcyGRV.js} +2 -2
  41. package/dist/public/assets/{MermaidDocEditor-yGV5TYvo.js → MermaidDocEditor-DC95RR-G.js} +1 -1
  42. package/dist/public/assets/{RegisteredAgentIcon-CCgDsAUc.js → RegisteredAgentIcon-BgDInKA9.js} +1 -1
  43. package/dist/public/assets/{ReportBugDialogBody-B0bj47YU.js → ReportBugDialogBody-7VaenClj.js} +1 -1
  44. package/dist/public/assets/{SchemaConfigEditor-OWVRrCyd.js → SchemaConfigEditor-B2VRQNhY.js} +1 -1
  45. package/dist/public/assets/SessionsHost-CJM2wXx0.js +2 -0
  46. package/dist/public/assets/SettingsDialogBody-LwuRFjnU.js +12 -0
  47. package/dist/public/assets/{ShareBranchSwitchDialog-295DE9n_.js → ShareBranchSwitchDialog-DD7xybfa.js} +1 -1
  48. package/dist/public/assets/{ShareReceiveDialog-BbOB46ar.js → ShareReceiveDialog-Bz3zpKKF.js} +1 -1
  49. package/dist/public/assets/{ShareReceiveMissDialog-iz73ffK2.js → ShareReceiveMissDialog-DqXylco3.js} +1 -1
  50. package/dist/public/assets/{SkillEditBanner-C0motCdk.js → SkillEditBanner-BwzPIxd8.js} +1 -1
  51. package/dist/public/assets/{SkillOriginInline-BKp-kWXv.js → SkillOriginInline-BFCXo8sI.js} +1 -1
  52. package/dist/public/assets/SkillToolbarControls-DF0m8f6g.js +1 -0
  53. package/dist/public/assets/{SlidesToolbarControls-CD_n21A3.js → SlidesToolbarControls-DJXDoZdd.js} +1 -1
  54. package/dist/public/assets/SourceEditor-CBToWgb8.js +1 -0
  55. package/dist/public/assets/{TerminalPanel-CLfRiG4p.js → TerminalPanel-BlK8X0ar.js} +2 -2
  56. package/dist/public/assets/{TerminalWindowApp-B2TPEGtR.js → TerminalWindowApp-Cy9Ov0_z.js} +1 -1
  57. package/dist/public/assets/{TextDocEditor-DmN6Zt5R.js → TextDocEditor-D3Hjb2Vu.js} +1 -1
  58. package/dist/public/assets/{ThreadView-Cn6Viupp.js → ThreadView-YWeuTsL5.js} +3 -3
  59. package/dist/public/assets/{TimelineDiffPane-DzMaO_MM.js → TimelineDiffPane-CGiWI4cl.js} +2 -2
  60. package/dist/public/assets/{abnfDiagram-VRR7QNED-zrdnvCxH.js → abnfDiagram-VRR7QNED-CQ5y3jGZ.js} +1 -1
  61. package/dist/public/assets/{agent-diff-store-CBfJPWXq.js → agent-diff-store-CEeOURzl.js} +1 -1
  62. package/dist/public/assets/{arc-DNWUH4a1.js → arc-DllfmQO6.js} +1 -1
  63. package/dist/public/assets/architecture-TIHT7OUA-CIR5HZsg.js +1 -0
  64. package/dist/public/assets/{architectureDiagram-ZJ3FMSHR-C8Bd5LWV.js → architectureDiagram-ZJ3FMSHR-DEDVgPeV.js} +1 -1
  65. package/dist/public/assets/arrow-up-right-D_WN0VGP.js +1 -0
  66. package/dist/public/assets/{auth-state-cache-DBVfH7MV.js → auth-state-cache-kFk2nWdi.js} +4 -4
  67. package/dist/public/assets/{blockDiagram-677ZJIJ3-B9IYmQZQ.js → blockDiagram-677ZJIJ3-Biovo5Vk.js} +1 -1
  68. package/dist/public/assets/{braces-54VO1tdr.js → braces-B2tgJ4cu.js} +1 -1
  69. package/dist/public/assets/{c4Diagram-LMCZKHZV-BAmqGVbu.js → c4Diagram-LMCZKHZV-BUMbkcfU.js} +1 -1
  70. package/dist/public/assets/{calendar-BhCmsdcp.js → calendar-q3K0fDI1.js} +1 -1
  71. package/dist/public/assets/{case-sensitive-BpYLDHFG.js → case-sensitive-Cz58rAyi.js} +1 -1
  72. package/dist/public/assets/channel-C6KgPQqg.js +1 -0
  73. package/dist/public/assets/check-xiKupoJh.js +1 -0
  74. package/dist/public/assets/{checkbox-gpfWb1pY.js → checkbox-DxTkAw0k.js} +1 -1
  75. package/dist/public/assets/{chevron-down-Ccgt58N5.js → chevron-down-DmoBYxyq.js} +1 -1
  76. package/dist/public/assets/chevron-left-CiNweXA3.js +1 -0
  77. package/dist/public/assets/chevron-right-DJvandMc.js +1 -0
  78. package/dist/public/assets/{chevron-up-DXAtCwKR.js → chevron-up-eNJS5_XA.js} +1 -1
  79. package/dist/public/assets/chunk-2Q5K7J3B-CgG_zTm9.js +1 -0
  80. package/dist/public/assets/{chunk-32BRIVSS-DMLdlgjI.js → chunk-32BRIVSS-CJfLw0io.js} +1 -1
  81. package/dist/public/assets/{chunk-52WLFC77-CA6wNZGK.js → chunk-52WLFC77-CKUXR-Lo.js} +1 -1
  82. package/dist/public/assets/{chunk-5FCAYU7R-DqJZ_M2Z.js → chunk-5FCAYU7R-Blhoqerk.js} +1 -1
  83. package/dist/public/assets/{chunk-5HE753X5-xEmSuz1X.js → chunk-5HE753X5-Be3l52OO.js} +1 -1
  84. package/dist/public/assets/{chunk-5JV3BV7I-Ck8lDs_Z.js → chunk-5JV3BV7I-COJRGdXn.js} +1 -1
  85. package/dist/public/assets/{chunk-5TONJI2A-PrC_RJYQ.js → chunk-5TONJI2A-6Fwn-ZXg.js} +1 -1
  86. package/dist/public/assets/{chunk-5VM5RSS4-uHW5nKzV.js → chunk-5VM5RSS4-CBB7ddJZ.js} +1 -1
  87. package/dist/public/assets/{chunk-7BUUIJ7U-QsQRXodN.js → chunk-7BUUIJ7U-BCqa-5nq.js} +1 -1
  88. package/dist/public/assets/{chunk-BIQX33UG-Bn3R7PMg.js → chunk-BIQX33UG-DzD4i2B0.js} +1 -1
  89. package/dist/public/assets/{chunk-BO2N2NFS-XrP3H1kD.js → chunk-BO2N2NFS-KCTBsTca.js} +3 -3
  90. package/dist/public/assets/{chunk-C7G6YPKG-Cyi6lMg0.js → chunk-C7G6YPKG-DxT1wdEz.js} +1 -1
  91. package/dist/public/assets/{chunk-CQNSW5MT-DcGjpkNq.js → chunk-CQNSW5MT-DFeH5OJq.js} +1 -1
  92. package/dist/public/assets/{chunk-CYSBUYHQ-DtqK9e9B.js → chunk-CYSBUYHQ-BnJMwkKI.js} +1 -1
  93. package/dist/public/assets/{chunk-EMLP6XTP-CwGsiDUi.js → chunk-EMLP6XTP-MSvlJ735.js} +1 -1
  94. package/dist/public/assets/{chunk-EX3LRPZG-DLPjvnJt.js → chunk-EX3LRPZG-DUzsTxw6.js} +1 -1
  95. package/dist/public/assets/{chunk-FWX5IMBZ-Dl1Yx5lK.js → chunk-FWX5IMBZ-D3EMolHi.js} +2 -2
  96. package/dist/public/assets/{chunk-HOUHSVGY-DV13h0Pr.js → chunk-HOUHSVGY-CA499J_e.js} +1 -1
  97. package/dist/public/assets/{chunk-ICXQ74PX-INpeR2_Y.js → chunk-ICXQ74PX-CNLojPkU.js} +1 -1
  98. package/dist/public/assets/{chunk-JG7HCLWE-DjqF4wz1.js → chunk-JG7HCLWE-BjvLoZ4O.js} +1 -1
  99. package/dist/public/assets/{chunk-JWPE2WC7-ChNUGWh8.js → chunk-JWPE2WC7-DKo0ygBr.js} +1 -1
  100. package/dist/public/assets/{chunk-MOJQB5TN-DYAyc4PI.js → chunk-MOJQB5TN-hxtcpfx_.js} +1 -1
  101. package/dist/public/assets/{chunk-MOZMSUNE-DAoBuwD4.js → chunk-MOZMSUNE-DQOK9LgW.js} +1 -1
  102. package/dist/public/assets/{chunk-OGEWGWER-_vqBGeRc.js → chunk-OGEWGWER-DmUP6YIh.js} +1 -1
  103. package/dist/public/assets/{chunk-OSBZ3O6U-SeZvOun8.js → chunk-OSBZ3O6U-D1WpsIpR.js} +1 -1
  104. package/dist/public/assets/{chunk-PUDLZKDR-C184t24_.js → chunk-PUDLZKDR-CQKVQESS.js} +1 -1
  105. package/dist/public/assets/{chunk-Q4XR5HBZ-SaCK9erE.js → chunk-Q4XR5HBZ-CChmYrK9.js} +1 -1
  106. package/dist/public/assets/{chunk-QBLGF6JB-CJVMUUtn.js → chunk-QBLGF6JB-CgndLuEz.js} +1 -1
  107. package/dist/public/assets/{chunk-R7FJI6CG-q21e0CIM.js → chunk-R7FJI6CG-DCv2sUq2.js} +1 -1
  108. package/dist/public/assets/{chunk-RYQCIY6F-nQAz-0yS.js → chunk-RYQCIY6F-AIaldrY4.js} +1 -1
  109. package/dist/public/assets/{chunk-U6XO7XAA-hembI7o8.js → chunk-U6XO7XAA-CxMMdww-.js} +1 -1
  110. package/dist/public/assets/{chunk-V7JOEXUC-3RMXHrzo.js → chunk-V7JOEXUC-CXy9SmJk.js} +1 -1
  111. package/dist/public/assets/chunk-VAUOI2AC-ujVxk4Ze.js +1 -0
  112. package/dist/public/assets/{chunk-VR4S4FIN-YHQiPjFo.js → chunk-VR4S4FIN-KG7H_g4c.js} +1 -1
  113. package/dist/public/assets/{chunk-WYO6CB5R-tHLnBMnY.js → chunk-WYO6CB5R-B368j75q.js} +1 -1
  114. package/dist/public/assets/chunk-XXDRQBXY-B7w13F3i.js +1 -0
  115. package/dist/public/assets/{chunk-YOTPTUD7-u4FR_PoG.js → chunk-YOTPTUD7-Cqb1OWoI.js} +1 -1
  116. package/dist/public/assets/{chunk-ZGVPDNZ5-BFUSTZTU.js → chunk-ZGVPDNZ5-BKdDRJat.js} +1 -1
  117. package/dist/public/assets/{chunk-ZIRB5QZD-D120inkG.js → chunk-ZIRB5QZD-CvXXd6Mf.js} +1 -1
  118. package/dist/public/assets/classDiagram-OUVF2IWQ-CrrbWSrl.js +1 -0
  119. package/dist/public/assets/classDiagram-v2-EOCWNBFH-BYbi6pvW.js +1 -0
  120. package/dist/public/assets/client-version-B0MkkJjB.js +1 -0
  121. package/dist/public/assets/{cm-theme-DPWSzbOc.js → cm-theme-ChFGbVCe.js} +1 -1
  122. package/dist/public/assets/{comment-chips-DYqcIz_E.js → comment-chips-CmSdX8nJ.js} +1 -1
  123. package/dist/public/assets/{config-provider-DAxeLK4k.js → config-provider-BkvKKK43.js} +3 -3
  124. package/dist/public/assets/context-menu-CYgsnEgV.js +1 -0
  125. package/dist/public/assets/{cose-bilkent-JH36ORCC-D0CYnCA3.js → cose-bilkent-JH36ORCC-CwtkHR1Y.js} +1 -1
  126. package/dist/public/assets/cynefin-VYW2F7L2-BdPtv88z.js +1 -0
  127. package/dist/public/assets/{cynefinDiagram-TSTJHNR4-Bgric3JJ.js → cynefinDiagram-TSTJHNR4-LsplRO2K.js} +1 -1
  128. package/dist/public/assets/{dagre-uJOGPMM-.js → dagre-C6VKrNvO.js} +1 -1
  129. package/dist/public/assets/{dagre-VKFMJZFB-BXjUnJMs.js → dagre-VKFMJZFB-DhzjgRUZ.js} +1 -1
  130. package/dist/public/assets/{diagram-FQU43EPY-dXOWFjMG.js → diagram-FQU43EPY-a4jh9ybB.js} +1 -1
  131. package/dist/public/assets/{diagram-G47NLZAW-zdJG9pHl.js → diagram-G47NLZAW-Jgkwuc6y.js} +1 -1
  132. package/dist/public/assets/{diagram-NH7WQ7WH-BVYbs_C0.js → diagram-NH7WQ7WH-Cz1HEitz.js} +1 -1
  133. package/dist/public/assets/{diagram-OA4YK3LP-Ds5ohbs1.js → diagram-OA4YK3LP-CIcVtjXP.js} +1 -1
  134. package/dist/public/assets/{diagram-WEI45ONY-BluqqbZ4.js → diagram-WEI45ONY-C8wU887b.js} +1 -1
  135. package/dist/public/assets/{dialog-O4u6_xiQ.js → dialog-Bxcn1sLm.js} +1 -1
  136. package/dist/public/assets/{dist-C1TyNsxp.js → dist-BOhFaMG0.js} +1 -1
  137. package/dist/public/assets/{dist-tByLfm_n.js → dist-Bb1r1o6u.js} +1 -1
  138. package/dist/public/assets/{dist-CNm9tACe.js → dist-Bx9oFJRu.js} +1 -1
  139. package/dist/public/assets/{dist-CpwfhxFl.js → dist-C9uRrl_E.js} +1 -1
  140. package/dist/public/assets/{dist-hrQOAqN1.js → dist-CFyOS6pn.js} +1 -1
  141. package/dist/public/assets/{dist-CI5_cNui.js → dist-CXSIgvvA.js} +1 -1
  142. package/dist/public/assets/{dist-D1vjmDZ_2.js → dist-Cy5lktAQ2.js} +181 -181
  143. package/dist/public/assets/{dist-CJuiZAB0.js → dist-DL1WTl5d.js} +1 -1
  144. package/dist/public/assets/{dist-CDMQmWZl.js → dist-DRg5A_HQ.js} +1 -1
  145. package/dist/public/assets/{dist-CebtYbHb.js → dist-D_1xxRDt.js} +1 -1
  146. package/dist/public/assets/{dist-DU2smIGg.js → dist-DgRDZMLf.js} +1 -1
  147. package/dist/public/assets/{dist-BpOfJRMm.js → dist-DrCK4JBL.js} +1 -1
  148. package/dist/public/assets/{dist-y6w4IT08.js → dist-DuPjpj5-.js} +1 -1
  149. package/dist/public/assets/{dist-wfUjMP-v.js → dist-EpVTQF77.js} +1 -1
  150. package/dist/public/assets/{doc-paths-v_LqWyej.js → doc-paths-CBKXYveW.js} +1 -1
  151. package/dist/public/assets/{documents-events-BVk5JL1j.js → documents-events-DNLLVEPR.js} +1 -1
  152. package/dist/public/assets/{download-BuEN0lZf.js → download-btG_KeFQ.js} +1 -1
  153. package/dist/public/assets/{dropdown-menu-CP1RnfZI.js → dropdown-menu-K4eCFwQy.js} +1 -1
  154. package/dist/public/assets/{ebnfDiagram-CCIWWBDH-BWiN4nWj.js → ebnfDiagram-CCIWWBDH-CjptFZja.js} +1 -1
  155. package/dist/public/assets/{erDiagram-Q63AITRT-5GE6Syx5.js → erDiagram-Q63AITRT-BYiJa_5G.js} +1 -1
  156. package/dist/public/assets/eventmodeling-45OFAUF4-ur3Hg9pT.js +1 -0
  157. package/dist/public/assets/{eye-CYj_zi2W.js → eye-j_4QS15C.js} +1 -1
  158. package/dist/public/assets/{field-BADrt9_J.js → field-9eXIpxzl.js} +1 -1
  159. package/dist/public/assets/{file-tree-adapter-j4_0rR4k.js → file-tree-adapter-BQ9idF-F.js} +1 -1
  160. package/dist/public/assets/{file-tree-utils-ChaLadja.js → file-tree-utils-DrTcSGTj.js} +1 -1
  161. package/dist/public/assets/flowDiagram-23GEKE2U-C1BAvCbz.js +1 -0
  162. package/dist/public/assets/{folder-CWVPrRtx.js → folder-C8rE1Soy.js} +1 -1
  163. package/dist/public/assets/{folder-config-api-Cyxss03I.js → folder-config-api-Cf3ca6iE.js} +1 -1
  164. package/dist/public/assets/{folder-open-BXfoqsrp.js → folder-open-CB-trByC.js} +1 -1
  165. package/dist/public/assets/{follow-file-BMJH7ZWv.js → follow-file-Ctr47jtP.js} +1 -1
  166. package/dist/public/assets/{ganttDiagram-NO4QXBWP-DGnL6oh-.js → ganttDiagram-NO4QXBWP-TYuuGc0X.js} +1 -1
  167. package/dist/public/assets/{git-branch-CMN6cdzm.js → git-branch-JnfmLuHd.js} +1 -1
  168. package/dist/public/assets/gitGraph-TEB2WS4Q-l_1SzZcb.js +1 -0
  169. package/dist/public/assets/{gitGraphDiagram-IHSO6WYX-mMfBO0xv.js → gitGraphDiagram-IHSO6WYX-BrjUrrk2.js} +1 -1
  170. package/dist/public/assets/globals-B-lWUzDu.css +1 -0
  171. package/dist/public/assets/{graphlib-CS7i3af0.js → graphlib-D8PlvV2o.js} +1 -1
  172. package/dist/public/assets/{hash-BS4ux6bl.js → hash-DKiwvmF3.js} +1 -1
  173. package/dist/public/assets/{highlighted-body-OFNGDK62-Bc_b2HT_.js → highlighted-body-OFNGDK62-eJrwOujA.js} +1 -1
  174. package/dist/public/assets/{history-CiIvI4I4.js → history-eaFgPZWX.js} +1 -1
  175. package/dist/public/assets/i18n-CC8DkJXO.js +1 -0
  176. package/dist/public/assets/index-DrqV8949.js +2097 -0
  177. package/dist/public/assets/{info-160SNOuG.js → info-CsTy513y.js} +1 -1
  178. package/dist/public/assets/info-DKCQHKI2-CCDXfGhV.js +1 -0
  179. package/dist/public/assets/{infoDiagram-FWYZ7A6U-DuU1GDQ6.js → infoDiagram-FWYZ7A6U-B6_Knuir.js} +1 -1
  180. package/dist/public/assets/{input-group-CPKSxoq5.js → input-group-BA2Li4LU.js} +1 -1
  181. package/dist/public/assets/{ishikawaDiagram-FXEZZL3T-Bg0KJFCj.js → ishikawaDiagram-FXEZZL3T-CqxHoebw.js} +1 -1
  182. package/dist/public/assets/{journeyDiagram-5HDEW3XC-DLWkGhNH.js → journeyDiagram-5HDEW3XC-B1-3fVtR.js} +1 -1
  183. package/dist/public/assets/{kanban-definition-HUTT4EX6-BhYGhRMu.js → kanban-definition-HUTT4EX6-CdhMOBCU.js} +1 -1
  184. package/dist/public/assets/{line-e19R8FCM.js → line-C0o9Fjf4.js} +1 -1
  185. package/dist/public/assets/{linear-a82bFSBJ.js → linear-CjM1R4zy.js} +1 -1
  186. package/dist/public/assets/{lint-config-client-CN7WtJJN.js → lint-config-client-DzdtSJp-.js} +1 -1
  187. package/dist/public/assets/{list-plus-BPvSuFZX.js → list-plus-ByOuGBSE.js} +1 -1
  188. package/dist/public/assets/loader-circle-BJLNGSB4.js +1 -0
  189. package/dist/public/assets/{local-menu-action-bus-BDB0W02w.js → local-menu-action-bus-BKJCODnD.js} +1 -1
  190. package/dist/public/assets/{map-il90ypLM.js → map-Cu759seX.js} +1 -1
  191. package/dist/public/assets/{markdownlint-rule-browser-uB5xoBRt.js → markdownlint-rule-browser-DMQXiRek.js} +1 -1
  192. package/dist/public/assets/mermaid-GHXKKRXX-C9G7CQ6h.js +1 -0
  193. package/dist/public/assets/{mermaid-parser.core-ueh8mdU-.js → mermaid-parser.core-DpHycRcl.js} +2 -2
  194. package/dist/public/assets/{mermaid.core-RZ5le45c.js → mermaid.core-BnYdLHjl.js} +3 -3
  195. package/dist/public/assets/messages-BNq0JS1I.js +1 -0
  196. package/dist/public/assets/messages-C1QZwdEx.js +1 -0
  197. package/dist/public/assets/messages-CAevTmZQ.js +1 -0
  198. package/dist/public/assets/messages-CG-GHBB9.js +1 -0
  199. package/dist/public/assets/messages-CIxg-v3C.js +1 -0
  200. package/dist/public/assets/messages-CKi8pZ4Q.js +1 -0
  201. package/dist/public/assets/messages-Cv5HHzZF.js +1 -0
  202. package/dist/public/assets/messages-DTRz3g9F.js +1 -0
  203. package/dist/public/assets/messages-DWBpIisU.js +1 -0
  204. package/dist/public/assets/messages-XzeH2iOB.js +1 -0
  205. package/dist/public/assets/messages-bBtIkGs7.js +1 -0
  206. package/dist/public/assets/{mindmap-definition-LN4V7U3C-Bcv7y0kn.js → mindmap-definition-LN4V7U3C-D6FYi_vY.js} +1 -1
  207. package/dist/public/assets/minus-H7UCODAH.js +1 -0
  208. package/dist/public/assets/{miss-dialog-store-CdaZpyLg.js → miss-dialog-store-DKfFwAsF.js} +1 -1
  209. package/dist/public/assets/navigation-targets-Ce74CisT.js +1 -0
  210. package/dist/public/assets/{now-CZywS9tX.js → now-Cd_fQsCQ.js} +1 -1
  211. package/dist/public/assets/{open-managed-artifact-tab-CFg9s1Dl.js → open-managed-artifact-tab-B84Y6EsP.js} +1 -1
  212. package/dist/public/assets/{ordinal-Bj6MlRdi.js → ordinal-oNJqAlZi.js} +1 -1
  213. package/dist/public/assets/packet-7NZHBO7P-BBeRj-Du.js +1 -0
  214. package/dist/public/assets/{panel-right-open-_nL1w4h-.js → panel-right-open-JxkSMPMb.js} +1 -1
  215. package/dist/public/assets/{paperclip-DV67TMJS.js → paperclip-BxFhnUjq.js} +1 -1
  216. package/dist/public/assets/{pegDiagram-2B236MQR-Du6F68bP.js → pegDiagram-2B236MQR-Cic2_Ooi.js} +1 -1
  217. package/dist/public/assets/{pending-receive-nav-store-By3F7IeX.js → pending-receive-nav-store-DosIhFkt.js} +1 -1
  218. package/dist/public/assets/pie-RZYD4A2V-BszLCTWh.js +1 -0
  219. package/dist/public/assets/{pieDiagram-ENE6RG2P-Du-eEA1d.js → pieDiagram-ENE6RG2P-DgqO0C3j.js} +1 -1
  220. package/dist/public/assets/{project-paths-BWmSfpDI.js → project-paths-DC6bWLUQ.js} +1 -1
  221. package/dist/public/assets/{prop-types-BUGU9oYX.js → prop-types-BxhIEdp4.js} +1 -1
  222. package/dist/public/assets/{quadrantDiagram-ABIIQ3AL-NefyxxyK.js → quadrantDiagram-ABIIQ3AL-CC3ZGpWb.js} +1 -1
  223. package/dist/public/assets/radar-I7S5WNFK-CG0ShGDu.js +1 -0
  224. package/dist/public/assets/railroad-3IZDKUUU-N5ekmrCL.js +1 -0
  225. package/dist/public/assets/railroad-abnf-AHOZXSZD-DnjoKlG9.js +1 -0
  226. package/dist/public/assets/railroad-ebnf-EBAXGLYW-qDwmtJRh.js +1 -0
  227. package/dist/public/assets/railroad-peg-LSFZ7HO6-DSfMsKSD.js +1 -0
  228. package/dist/public/assets/{railroadDiagram-RFXS5EU6-CN_1Ywzn.js → railroadDiagram-RFXS5EU6-DaoKPEli.js} +1 -1
  229. package/dist/public/assets/{receive-store-DQ2cxNlN.js → receive-store-DO5w93VK.js} +1 -1
  230. package/dist/public/assets/{refresh-cw-Bjv-Fpq5.js → refresh-cw-CAV3aG7d.js} +1 -1
  231. package/dist/public/assets/{requirementDiagram-TGXJPOKE-bDLvkWBT.js → requirementDiagram-TGXJPOKE-qmFI0ev3.js} +1 -1
  232. package/dist/public/assets/{sankeyDiagram-HTMAVEWB-CyhjQEet.js → sankeyDiagram-HTMAVEWB-CYeZQsa5.js} +1 -1
  233. package/dist/public/assets/{schema-fields-view-intent-BMlW8LRz.js → schema-fields-view-intent-CeZOW3HG.js} +1 -1
  234. package/dist/public/assets/{select-BaOsrrG7.js → select-BjNoD_FX.js} +1 -1
  235. package/dist/public/assets/{selection-context-Q2igplxe.js → selection-context-DAl-Wxy6.js} +1 -1
  236. package/dist/public/assets/{separator-BXBsYPiB.js → separator-BKbgOjgy.js} +1 -1
  237. package/dist/public/assets/{sequenceDiagram-DBY2YBRQ-BeYilBxj.js → sequenceDiagram-DBY2YBRQ-DfXkoRwp.js} +1 -1
  238. package/dist/public/assets/{sizeCapture-X5ZJPWSS-Mb3J__hm.js → sizeCapture-X5ZJPWSS-Bd7A4fpz.js} +1 -1
  239. package/dist/public/assets/skill-actions-1VvTttnO.js +2 -0
  240. package/dist/public/assets/{skill-scope-CLm-DjVO.js → skill-scope-uWACL-4X.js} +1 -1
  241. package/dist/public/assets/{skills-api-Do-yD8Wd.js → skills-api-S9b1zvZ6.js} +1 -1
  242. package/dist/public/assets/{square-pen-CW0s3lqC.js → square-pen-hwoIfi3M.js} +1 -1
  243. package/dist/public/assets/{src-rGs2GXpJ.js → src-CVA7Dtfv.js} +1 -1
  244. package/dist/public/assets/{src-DT86yydp.js → src-XHagG0Wj.js} +1 -1
  245. package/dist/public/assets/{stateDiagram-2N3HPSRC-D0WNjYjx.js → stateDiagram-2N3HPSRC-CCh_abZC.js} +1 -1
  246. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-CUhlDos5.js +1 -0
  247. package/dist/public/assets/{swimlanes-5IMT3BWC-BAPdgrYU.js → swimlanes-5IMT3BWC-Dk2uoutn.js} +2 -2
  248. package/dist/public/assets/swimlanesDiagram-G3AALYLV-DHL99Ckz.js +8 -0
  249. package/dist/public/assets/{tag-pill-input-DLcAHAth.js → tag-pill-input-er0MqvFK.js} +1 -1
  250. package/dist/public/assets/{target-navigation-intent-AJHzhxLh.js → target-navigation-intent-DBvgpA7l.js} +1 -1
  251. package/dist/public/assets/{telemetry-impl-DFcgjFFc.js → telemetry-impl-LPWb9DJh.js} +2 -2
  252. package/dist/public/assets/{telemetry-startup-0F_AW_hr.js → telemetry-startup-B-jACYNe.js} +1 -1
  253. package/dist/public/assets/terminal-bCsp6kPz.js +1 -0
  254. package/dist/public/assets/{terminal-cli-display-DcmUJBJ0.js → terminal-cli-display-CBMTYLbQ.js} +1 -1
  255. package/dist/public/assets/terminal-launch-events-CbqKUJ57.js +1 -0
  256. package/dist/public/assets/{terminal-telemetry-BaIL0R4h.js → terminal-telemetry-BRNk9k9Y.js} +1 -1
  257. package/dist/public/assets/{text-viewer-languages-BBrkAtBf.js → text-viewer-languages-BmEIetCD.js} +2 -2
  258. package/dist/public/assets/{timeline-definition-FHXFAJF6-BnIpQBQO.js → timeline-definition-FHXFAJF6-tb13RhWP.js} +1 -1
  259. package/dist/public/assets/{trash-2-rgduGgZB.js → trash-2-CSpv7np3.js} +1 -1
  260. package/dist/public/assets/treeView-QDETBFTQ-DwFOcFO4.js +1 -0
  261. package/dist/public/assets/treemap-6X3UGDF4-D_-cggQd.js +1 -0
  262. package/dist/public/assets/{triangle-alert-CnW4IElJ.js → triangle-alert-xKPljhlK.js} +1 -1
  263. package/dist/public/assets/typing-burst-detector-D114TNgO.js +8 -0
  264. package/dist/public/assets/{undo-2-BmxrL5XS.js → undo-2-D5cqFzyJ.js} +1 -1
  265. package/dist/public/assets/{uninstall-DEqbq9oi.js → uninstall-B7OIrc24.js} +1 -1
  266. package/dist/public/assets/{use-activity-panel-HhWhJyPS.js → use-activity-panel-DnpzFXIs.js} +1 -1
  267. package/dist/public/assets/{use-apply-config-color-theme-dRh7Xul9.js → use-apply-config-color-theme-DLZre1dS.js} +1 -1
  268. package/dist/public/assets/{use-collab-url-CtzTnNTo.js → use-collab-url-CjkHphlr.js} +1 -1
  269. package/dist/public/assets/{use-live-xterm-theme-CEFo40Qe.js → use-live-xterm-theme-CVQrPooY.js} +1 -1
  270. package/dist/public/assets/{use-open-skill-Cscl8Yx2.js → use-open-skill-DImLrKgY.js} +1 -1
  271. package/dist/public/assets/{use-popular-skills-Yh3HxWUQ.js → use-popular-skills-Dj_DcxJ4.js} +1 -1
  272. package/dist/public/assets/{use-settings-route-BDWFTRtx.js → use-settings-route-DEoOHvHf.js} +1 -1
  273. package/dist/public/assets/{use-skill-origin-JUAmtC9e.js → use-skill-origin-Bj3wYKq2.js} +1 -1
  274. package/dist/public/assets/{use-skills-BmTj83Vv.js → use-skills-k_NyqOb0.js} +1 -1
  275. package/dist/public/assets/{use-terminal-enabled-BJe4ZzuL.js → use-terminal-enabled-D2ShR7ZJ.js} +1 -1
  276. package/dist/public/assets/{use-timeline-entry-diff-BEA4Wm90.js → use-timeline-entry-diff-CjhWQfrw.js} +4 -4
  277. package/dist/public/assets/{use-workspace-BJfeN9YT.js → use-workspace-D0EhHpoU.js} +1 -1
  278. package/dist/public/assets/{vennDiagram-L72KCM5P-C38RYC28.js → vennDiagram-L72KCM5P-Cyp_-2xs.js} +1 -1
  279. package/dist/public/assets/wardley-OPB4EBWU-Dz0s9mBi.js +1 -0
  280. package/dist/public/assets/{wardleyDiagram-EHGQE667-B0VRsKo1.js → wardleyDiagram-EHGQE667-C5z1_r-x.js} +1 -1
  281. package/dist/public/assets/{wrench-DtGaC8XY.js → wrench-yAsO-Pm9.js} +1 -1
  282. package/dist/public/assets/x-BopM5CF8.js +1 -0
  283. package/dist/public/assets/{xychartDiagram-FW5EYKEG-jAQK9E85.js → xychartDiagram-FW5EYKEG-DH9RxgRE.js} +1 -1
  284. package/dist/public/index.html +134 -133
  285. package/dist/public/uninstall.html +14 -14
  286. package/dist/{repair-launch-json-Dnhl7E_E.mjs → repair-launch-json-DJCBlxLw.mjs} +2 -2
  287. package/dist/{repair-mcp-configs-BTst6dOY.mjs → repair-mcp-configs-C8bpTpxh.mjs} +2 -2
  288. package/dist/repair-skills-BK1EcvXS.mjs +1 -0
  289. package/dist/{repair-skills-hf9Efmkp.mjs → repair-skills-CMm13M8P.mjs} +2 -2
  290. package/dist/server-lock-Dy_yO6Nk.mjs +1 -0
  291. package/dist/{server-lock-DEOF_T1n.mjs → server-lock-V3bg8zL0.mjs} +2 -2
  292. package/dist/{skill-teardown-B7FIoHkS.mjs → skill-teardown-CO4xteJC.mjs} +2 -2
  293. package/dist/{src-EOJBnmi7.mjs → src-C2Gyjygx.mjs} +1 -1
  294. package/dist/src-CRHuZPcr.mjs +1 -0
  295. package/dist/src-DwT4IlXo.mjs +20 -0
  296. package/dist/{src-v83peLAF.mjs → src-IM6msWeV.mjs} +2 -2
  297. package/dist/{src-T22OxNCJ.mjs → src-bozJXbns.mjs} +4 -4
  298. package/dist/start-BGjifSjp.mjs +1 -0
  299. package/dist/start-Bua6MR2W.mjs +4 -0
  300. package/dist/{write-project-skill-Ds6QPmhs.mjs → write-project-skill-BoeD2RUw.mjs} +2 -2
  301. package/package.json +5 -5
  302. package/dist/acp-harness-probe-BL-kL5a3.mjs +0 -3
  303. package/dist/constants-BsKxR1wP.mjs +0 -2
  304. package/dist/git-handle-Rma56ZDs.mjs +0 -1
  305. package/dist/init-Dc-aeDeC.mjs +0 -1
  306. package/dist/loader-BLWCSy5o.mjs +0 -1
  307. package/dist/md-manager-wsrK03Vr.mjs +0 -2
  308. package/dist/preview-DMl0bCHE.mjs +0 -1
  309. package/dist/public/assets/CodeMirrorPropInput-D6Vpy6cC.js +0 -3
  310. package/dist/public/assets/FeedbackForm-DK3Eafhu.js +0 -1
  311. package/dist/public/assets/ManagedArtifactProperties-BoQaa-VP.js +0 -2
  312. package/dist/public/assets/ManagedArtifactProperties-F3vbLcfn.js +0 -1
  313. package/dist/public/assets/SessionsHost-CldPPD2R.js +0 -2
  314. package/dist/public/assets/SettingsDialogBody-B-5j1KKE.js +0 -12
  315. package/dist/public/assets/SkillToolbarControls-DnCihwAh.js +0 -1
  316. package/dist/public/assets/SourceEditor-BuOJMaXx.js +0 -1
  317. package/dist/public/assets/architecture-TIHT7OUA-DHywK0qf.js +0 -1
  318. package/dist/public/assets/arrow-up-right-CXYxHO7Z.js +0 -1
  319. package/dist/public/assets/channel-BNyr5ucm.js +0 -1
  320. package/dist/public/assets/check-DA6LolTH.js +0 -1
  321. package/dist/public/assets/chevron-left-DY9flfyc.js +0 -1
  322. package/dist/public/assets/chevron-right-2RK4DD3b.js +0 -1
  323. package/dist/public/assets/chunk-2Q5K7J3B-UKfnOi4g.js +0 -1
  324. package/dist/public/assets/chunk-VAUOI2AC-ChJppfl7.js +0 -1
  325. package/dist/public/assets/chunk-XXDRQBXY-Bsh29NfZ.js +0 -1
  326. package/dist/public/assets/classDiagram-OUVF2IWQ-6PbrHEW6.js +0 -1
  327. package/dist/public/assets/classDiagram-v2-EOCWNBFH-B4bz8Etj.js +0 -1
  328. package/dist/public/assets/client-version-BESEvZR7.js +0 -1
  329. package/dist/public/assets/cynefin-VYW2F7L2-CjkKc5Wd.js +0 -1
  330. package/dist/public/assets/eventmodeling-45OFAUF4-GQ05Sah7.js +0 -1
  331. package/dist/public/assets/flowDiagram-23GEKE2U-CwO12b-s.js +0 -1
  332. package/dist/public/assets/gitGraph-TEB2WS4Q-Da8kWWZb.js +0 -1
  333. package/dist/public/assets/globals-CyYdI-wx.css +0 -1
  334. package/dist/public/assets/i18n-CqChyNE3.js +0 -1
  335. package/dist/public/assets/index-CJ9IqjVe.js +0 -2097
  336. package/dist/public/assets/info-DKCQHKI2-BPZv5cfZ.js +0 -1
  337. package/dist/public/assets/loader-circle-BbuX0POi.js +0 -1
  338. package/dist/public/assets/mermaid-GHXKKRXX-CaB-_LCR.js +0 -1
  339. package/dist/public/assets/messages-BTQ6QHGD.js +0 -1
  340. package/dist/public/assets/messages-C1_vqjO0.js +0 -1
  341. package/dist/public/assets/messages-CcNmHSRm.js +0 -1
  342. package/dist/public/assets/messages-CuCFXL8u.js +0 -1
  343. package/dist/public/assets/messages-D-wGArHz.js +0 -1
  344. package/dist/public/assets/messages-DCORBVvf.js +0 -1
  345. package/dist/public/assets/messages-DK20PMTg.js +0 -1
  346. package/dist/public/assets/messages-DaaRRAol.js +0 -1
  347. package/dist/public/assets/messages-TrWXqll1.js +0 -1
  348. package/dist/public/assets/messages-_5gcf9E8.js +0 -1
  349. package/dist/public/assets/messages-l5kO2Bq5.js +0 -1
  350. package/dist/public/assets/minus-Ba4o_31L.js +0 -1
  351. package/dist/public/assets/navigation-targets-BmGfXtLg.js +0 -1
  352. package/dist/public/assets/packet-7NZHBO7P-BtkfuFQU.js +0 -1
  353. package/dist/public/assets/pie-RZYD4A2V-DipSPJ4R.js +0 -1
  354. package/dist/public/assets/radar-I7S5WNFK-CsW1Ke6j.js +0 -1
  355. package/dist/public/assets/railroad-3IZDKUUU-CDGYvuvs.js +0 -1
  356. package/dist/public/assets/railroad-abnf-AHOZXSZD-IJHoKQ5T.js +0 -1
  357. package/dist/public/assets/railroad-ebnf-EBAXGLYW-DiwXL3Zg.js +0 -1
  358. package/dist/public/assets/railroad-peg-LSFZ7HO6-B4tduAeK.js +0 -1
  359. package/dist/public/assets/skill-actions-CBlHW4d_.js +0 -2
  360. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-NccT1PAw.js +0 -1
  361. package/dist/public/assets/swimlanesDiagram-G3AALYLV-CIDy7tZE.js +0 -8
  362. package/dist/public/assets/terminal-BNdVsbND.js +0 -1
  363. package/dist/public/assets/terminal-launch-events-DL9JJPUH.js +0 -1
  364. package/dist/public/assets/treeView-QDETBFTQ-DCy4i-OI.js +0 -1
  365. package/dist/public/assets/treemap-6X3UGDF4-BrUnfA75.js +0 -1
  366. package/dist/public/assets/typing-burst-detector-CPW5PZdn.js +0 -8
  367. package/dist/public/assets/wardley-OPB4EBWU-yXijkZ08.js +0 -1
  368. package/dist/public/assets/x-D8xzRaMT.js +0 -1
  369. package/dist/repair-skills-BmOui_rF.mjs +0 -1
  370. package/dist/server-lock-Rh5J9yH2.mjs +0 -1
  371. package/dist/src-CDtgwazs.mjs +0 -20
  372. package/dist/src-f1gCZ4_a.mjs +0 -1
  373. package/dist/start-D1GiMBz1.mjs +0 -4
  374. package/dist/start-DvQmqx2l.mjs +0 -1
  375. /package/dist/public/assets/{ActivityPanelDiffView-aQoOngI6.js → ActivityPanelDiffView-fDxLwTi2.js} +0 -0
  376. /package/dist/public/assets/{SkillModeBanner-Y5LYtJrC.js → SkillModeBanner-d0ZDkWTk.js} +0 -0
  377. /package/dist/public/assets/{__vite-browser-external-6FU8ctEn.js → __vite-browser-external-D_48KNDi.js} +0 -0
  378. /package/dist/public/assets/{agent-presence-DntZZFlY.js → agent-presence-DK_W4GTa.js} +0 -0
  379. /package/dist/public/assets/{array-Ce922FV9.js → array-DYKIbRR-.js} +0 -0
  380. /package/dist/public/assets/{asset-dispatch-_dEhJuVP.js → asset-dispatch-DsHoHhCG.js} +0 -0
  381. /package/dist/public/assets/{auth-prompt-store-CeaWNesV.js → auth-prompt-store-CyiGTt3C.js} +0 -0
  382. /package/dist/public/assets/{badge-CY_v_nGy.js → badge-zHd29IKW.js} +0 -0
  383. /package/dist/public/assets/{chunk-KEIR6QF5-88h2AcFS.js → chunk-KEIR6QF5-Z0IgTo4K.js} +0 -0
  384. /package/dist/public/assets/{chunk-Y2CYZVJY-B-DQ9l1H.js → chunk-Y2CYZVJY-Bmis3P2F.js} +0 -0
  385. /package/dist/public/assets/{clike-DDeLLKpf.js → clike-l3ublWpW.js} +0 -0
  386. /package/dist/public/assets/{clipboard-adapter-C4L1qX1X.js → clipboard-adapter-DEJxizFj.js} +0 -0
  387. /package/dist/public/assets/{code-highlighter-impl-Bq6VPPCL.js → code-highlighter-impl-CHS525hA.js} +0 -0
  388. /package/dist/public/assets/{colors-DXv_7g0X.js → colors-C77NTF6g.js} +0 -0
  389. /package/dist/public/assets/{copilot-D0J83lOh.js → copilot-BdGxiVpg.js} +0 -0
  390. /package/dist/public/assets/{createLucideIcon-BcLKHslE.js → createLucideIcon-6iYxif1u.js} +0 -0
  391. /package/dist/public/assets/{cursor-B6-YoFzF.js → cursor-CUtcHGV-.js} +0 -0
  392. /package/dist/public/assets/{cytoscape.esm-61X9Wf4W.js → cytoscape.esm-C2gIT5zZ.js} +0 -0
  393. /package/dist/public/assets/{defaultLocale-BypL9rsE.js → defaultLocale-BugBqEWo.js} +0 -0
  394. /package/dist/public/assets/{desktop-bridge-types-rBjHIYSI.js → desktop-bridge-types-oYPdTDmz.js} +0 -0
  395. /package/dist/public/assets/{diff-CUOV9XAb.js → diff-TXhtTD_D.js} +0 -0
  396. /package/dist/public/assets/{dist-BSzXg9wc.js → dist-1ia0sKe1.js} +0 -0
  397. /package/dist/public/assets/{dist-BTu6o3T-.js → dist-B0Beym3_.js} +0 -0
  398. /package/dist/public/assets/{dist-CG-e4AlS.js → dist-DNiTklSL.js} +0 -0
  399. /package/dist/public/assets/{documents-fetch-B8A9IAH3.js → documents-fetch-I34CgFeh.js} +0 -0
  400. /package/dist/public/assets/{external-link-Bw5EK5AQ.js → external-link-CHCx4FXC.js} +0 -0
  401. /package/dist/public/assets/{file-tree-rename-validation-Dt6fQYnB.js → file-tree-rename-validation-DEuNOzhg.js} +0 -0
  402. /package/dist/public/assets/{form-WTEKK5Th.js → form-_Bm7VdZa.js} +0 -0
  403. /package/dist/public/assets/{format-C7y0e043.js → format-Dx1Bv63R.js} +0 -0
  404. /package/dist/public/assets/{gherkin-DHKdvgzn.js → gherkin-Bu_VunKM.js} +0 -0
  405. /package/dist/public/assets/{globals-fH7sZOn9.js → globals-CZJtsuL5.js} +0 -0
  406. /package/dist/public/assets/{go-C7e4ztpP.js → go-BYJ3ESi0.js} +0 -0
  407. /package/dist/public/assets/{init-DQ9T43b9.js → init-B44NBVpk.js} +0 -0
  408. /package/dist/public/assets/{input-_CzMpvY9.js → input-VnbFvuKd.js} +0 -0
  409. /package/dist/public/assets/{isObject-B3vD71ho.js → isObject-Dhzo1ma6.js} +0 -0
  410. /package/dist/public/assets/{libesm-DLjHMG6S.js → libesm-BYxokP1G.js} +0 -0
  411. /package/dist/public/assets/{lint-plugin-meta-D6yg1VIa.js → lint-plugin-meta-FPoTE-0t.js} +0 -0
  412. /package/dist/public/assets/{lru-string-cache-D1rxjuni.js → lru-string-cache-BgNKFfCO.js} +0 -0
  413. /package/dist/public/assets/{lua-BbsHik3c.js → lua-De9v6Xwm.js} +0 -0
  414. /package/dist/public/assets/{mcp-consent-store-yqsuAEir.js → mcp-consent-store-CBPF1Ll9.js} +0 -0
  415. /package/dist/public/assets/{min-LWIJDKXt.js → min-CgRbfTQR.js} +0 -0
  416. /package/dist/public/assets/{panel-DVJ8gssn.js → panel-9S5Pf2VO.js} +0 -0
  417. /package/dist/public/assets/{panzoom.es-CnTJleIF.js → panzoom.es-CebiCTnw.js} +0 -0
  418. /package/dist/public/assets/{path-CdhP4z-N.js → path-DNVjzh9n.js} +0 -0
  419. /package/dist/public/assets/{pdf-CvpTyCsQ.js → pdf-19dxfod4.js} +0 -0
  420. /package/dist/public/assets/{pdf.worker-Dwl0H-tq.js → pdf.worker-Cn0IyjYR.js} +0 -0
  421. /package/dist/public/assets/{perl-B_IBZ74F.js → perl-DAC-0-L4.js} +0 -0
  422. /package/dist/public/assets/{properties-DC2eg36q.js → properties-BuEq0L0N.js} +0 -0
  423. /package/dist/public/assets/{r-Cuws8T_X.js → r-D6J_8GbJ.js} +0 -0
  424. /package/dist/public/assets/{rough.esm-Bmw38t74.js → rough.esm-hH2VdTtm.js} +0 -0
  425. /package/dist/public/assets/{ruby-B4Exyfkx.js → ruby-BulDdqGQ.js} +0 -0
  426. /package/dist/public/assets/{share-metadata-rows-a0ScdR3d.js → share-metadata-rows-CBd7DuHz.js} +0 -0
  427. /package/dist/public/assets/{shell-DA6f2ert.js → shell-FYbPjPiK.js} +0 -0
  428. /package/dist/public/assets/{skeleton-ColtBPsg.js → skeleton-BOVIbSHk.js} +0 -0
  429. /package/dist/public/assets/{sortable.esm-DlAqBM0z.js → sortable.esm-mqYoEMD5.js} +0 -0
  430. /package/dist/public/assets/{sql-gKfhysbI.js → sql-BTcd-g6A.js} +0 -0
  431. /package/dist/public/assets/{src-l8acH7-t.js → src-D2oHIihg.js} +0 -0
  432. /package/dist/public/assets/{startup-marks-BPO-vrjH.js → startup-marks-BYurBbnW.js} +0 -0
  433. /package/dist/public/assets/{stex-Cj2UNqUe.js → stex-BmYSnOnf.js} +0 -0
  434. /package/dist/public/assets/{swift-D4PiCeXt.js → swift-CnW5XUwC.js} +0 -0
  435. /package/dist/public/assets/{terminal-command-events-BBYZtptJ.js → terminal-command-events-mSM3ArSl.js} +0 -0
  436. /package/dist/public/assets/{textarea-C5-cm3M6.js → textarea-D59GB_Zy.js} +0 -0
  437. /package/dist/public/assets/{thread-client-CER-baRK.js → thread-client-DySYYPC9.js} +0 -0
  438. /package/dist/public/assets/{thread-draft-staging-DZhf3sQU.js → thread-draft-staging-BZaq81Sj.js} +0 -0
  439. /package/dist/public/assets/{timeline-diff-store-BpUHW_Yp.js → timeline-diff-store-cCBpDgND.js} +0 -0
  440. /package/dist/public/assets/{toml-BAg1ozw3.js → toml-vEnVjPi4.js} +0 -0
  441. /package/dist/public/assets/{use-installed-clis-CsPJ2Mod.js → use-installed-clis-CdB0ME5s.js} +0 -0
  442. /package/dist/public/assets/{useLintConfigViewMode-shAfv89B.js → useLintConfigViewMode-C89oTBHY.js} +0 -0
  443. /package/dist/public/assets/{workspace-paths-D7hYulMY.js → workspace-paths-C2pS_Pbn.js} +0 -0
@@ -1 +1 @@
1
- import{$o as e,As as t,Fo as n,P as r,R as i,Ro as a,d as o,ds as s,l as c,ts as l,zo as u}from"./src-v83peLAF.mjs";import{$ as d,$i as f,$n as p,$r as m,$t as h,A as g,Ai as _,An as v,Ar as y,At as b,B as x,Bi as S,Bn as C,Br as w,Bt as T,C as E,Ci as D,Cn as O,Cr as k,Ct as A,D as j,Di as M,Dn as N,Dr as P,Dt as F,E as I,Ei as L,En as R,Er as z,Et as B,F as V,Fi as H,Fn as U,Ft as W,G,Gi as K,Gn as q,Gr as J,Gt as Y,H as X,Hi as Z,Hn as Q,Hr as $,Ht as ee,I as te,Ii as ne,In as re,It as ie,J as ae,Ji as oe,Jn as se,Jr as ce,Jt as le,K as ue,Ki as de,Kn as fe,Kr as pe,Kt as me,L as he,Li as ge,Ln as _e,Lt as ve,M as ye,Mi as be,Mn as xe,Mr as Se,Mt as Ce,N as we,Ni as Te,Nn as Ee,Nt as De,O as Oe,Oi as ke,On as Ae,Or as je,Ot as Me,P as Ne,Pi as Pe,Pn as Fe,Pt as Ie,Q as Le,Qi as Re,Qn as ze,Qr as Be,Qt as Ve,R as He,Ri as Ue,Rn as We,Rr as Ge,Rt as Ke,S as qe,Si as Je,Sn as Ye,Sr as Xe,St as Ze,T as Qe,Ti as $e,Tn as et,Tr as tt,Tt as nt,U as rt,Ui as it,Un as at,Ur as ot,Ut as st,V as ct,Vi as lt,Vn as ut,Vr as dt,Vt as ft,W as pt,Wi as mt,Wn as ht,Wr as gt,Wt as _t,X as vt,Xi as yt,Xn as bt,Xr as xt,Xt as St,Y as Ct,Yi as wt,Yn as Tt,Yr as Et,Yt as Dt,Z as Ot,Zi as kt,Zn as At,Zr as jt,Zt as Mt,_ as Nt,_a as Pt,_i as Ft,_n as It,_r as Lt,_t as Rt,a as zt,aa as Bt,ai as Vt,an as Ht,ar as Ut,at as Wt,b as Gt,ba as Kt,bi as qt,bn as Jt,br as Yt,bt as Xt,c as Zt,ca as Qt,ci as $t,cn as en,cr as tn,d as nn,da as rn,di as an,dn as on,dr as sn,ea as cn,ei as ln,en as un,er as dn,et as fn,f as pn,fa as mn,fi as hn,fn as gn,fr as _n,g as vn,ga as yn,gi as bn,gn as xn,gr as Sn,gt as Cn,h as wn,ha as Tn,hi as En,hn as Dn,hr as On,ht as kn,i as An,ia as jn,ii as Mn,in as Nn,ir as Pn,it as Fn,j as In,ji as Ln,jn as Rn,jr as zn,jt as Bn,k as Vn,ki as Hn,kn as Un,kr as Wn,kt as Gn,l as Kn,la as qn,li as Jn,ln as Yn,lr as Xn,m as Zn,ma as Qn,mi as $n,mn as er,mr as tr,mt as nr,n as rr,na as ir,ni as ar,nn as or,nr as sr,nt as cr,o as lr,oa as ur,oi as dr,on as fr,or as pr,ot as mr,p as hr,pa as gr,pi as _r,pn as vr,pr as yr,q as br,qi as xr,qn as Sr,qr as Cr,qt as wr,r as Tr,ra as Er,ri as Dr,rn as Or,rr as kr,rt as Ar,s as jr,sa as Mr,si as Nr,sn as Pr,sr as Fr,st as Ir,t as Lr,ta as Rr,ti as zr,tn as Br,tr as Vr,tt as Hr,u as Ur,ua as Wr,ui as Gr,un as Kr,ur as qr,v as Jr,va as Yr,vn as Xr,vr as Zr,vt as Qr,w as $r,wi as ei,wn as ti,wr as ni,wt as ri,x as ii,xi as ai,xn as oi,xr as si,xt as ci,y as li,ya as ui,yi as di,yn as fi,yr as pi,yt as mi,z as hi,zi as gi,zn as _i,zr as vi,zt as yi}from"./src-T22OxNCJ.mjs";import{C as bi,E as xi,T as Si,_ as Ci,b as wi,c as Ti,d as Ei,g as Di,i as Oi,l as ki,m as Ai,n as ji,p as Mi,s as Ni,t as Pi,u as Fi,v as Ii,w as Li,x as Ri,y as zi}from"./fs-traced-DVpoNaQJ.mjs";import{a as Bi,d as Vi,f as Hi,i as Ui,l as Wi,n as Gi,r as Ki,t as qi,u as Ji}from"./logger-DFxEUjvj.mjs";import{C as Yi,S as Xi,_ as Zi,a as Qi,c as $i,d as ea,g as ta,h as na,i as ra,l as ia,m as aa,n as oa,o as sa,p as ca,r as la,s as ua,t as da,u as fa,v as pa,y as ma}from"./server-lock-DEOF_T1n.mjs";export{rn as AGENT_ID_MAX_LEN,mn as AGENT_ID_RE,M as AGENT_WRITE_ORIGIN,Yr as AcpPermissionStore,Tn as AcpRegistry,Je as AcpThreadManager,qt as AgentFocusBroadcaster,di as AgentPresenceBroadcaster,ke as AgentSessionCapacityError,Hn as AgentSessionManager,kn as AutoStartDisabledError,Zr as BUNDLE_IDS,pi as BUNDLE_SCOPE,Yt as BUNDLE_SKILL_NAME,Sr as BacklinkIndex,gi as CC1Broadcaster,l as CC1_CONTRACT_VERSION,Kr as CONFIG_FILENAME,ut as CONFLICT_MARKER_RE,w as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Nt as ConfigSchema,K as DEFAULT_CHECKPOINT_RETENTION,Vt as DEFAULT_EMBEDDINGS_DIMENSIONS,W as DEFAULT_PACK_ID,ct as DocumentDurabilityState,dr as EMBEDDINGS_API_KEY_ENV,yn as FEATURED_AGENT_IDS,de as FILE_SYSTEM_WRITER,q as FILE_WATCHER_ORIGIN,m as FileEmbeddingsBackend,Mt as GIT_PREFLIGHT_FAIL_SPAN_NAME,xr as GIT_UPSTREAM_WRITER,ui as GitDirAccessError,h as GitNotAvailableError,un as GitTooOldError,Cn as HOCUSPOCUS_AUTH_REJECTION_REASONS,Rt as HocuspocusAuthRejection,Qr as HocuspocusAuthTokenSchema,pe as INSTALLED_AGENTS_SCHEMES,e as LINEAGE_EPOCH_KEY,He as LIVE_DERIVED_INDEX_DEBOUNCE_MS,ie as LOG_MD_TEMPLATE,nt as MANAGED_RENAME_ORIGIN,D as MAX_ACP_THREADS,_ as MAX_AGENT_SESSIONS,$e as MCP_CONNECTION_ID_HEADER,n as MCP_SERVER_NAME,Ln as MIN_EVICTABLE_IDLE_MS,Br as MIN_GIT_VERSION,X as MISSING_OK_CONFIG_MESSAGE,Kt as MalformedGitPointerError,fn as McpLogger,rt as MissingOkConfigError,Te as OBSERVER_SYNC_ORIGIN,on as OK_OKIGNORE_TEMPLATE,a as ORPHAN_MODES,t as PROTOCOL_VERSION,qi as PinoLogger,$i as ProcessLockCollisionError,Kn as ProjectGitInitError,B as ROLLBACK_ORIGIN,gn as ROOT_GITIGNORE_TEMPLATE,Zi as RUNTIME_VERSION,fi as RemoteConfigError,oe as SERVICE_WRITER,yr as SKILL_INSTALL_EVENTS_FILE_REL,r as SKILL_STATE_TARGETS,ve as STARTER_FOLDERS,Ke as STARTER_FOLDER_FRONTMATTER_FILENAME,yi as STARTER_PACKS,T as STARTER_PACK_IDS,ft as STARTER_TEMPLATES,Qe as STATE_MANIFEST_FILENAME,pa as STATE_SCHEMA_VERSION,s as SYSTEM_DOC_NAME,wr as SeedPrerequisiteError,le as SeedRootDirError,da as ServerLockCollisionError,Lr as SingleFileNotAFileError,rr as SingleFileNotFoundError,Tr as SingleFileNotMarkdownError,I as StateManifestError,fe as TagIndex,si as USER_GLOBAL_BUNDLE_IDS,Tt as UiLockCollisionError,F as __getShowAllWalkStatsForTesting,Me as __resetShowAllWalkStatsForTesting,ia as acquireProcessLock,oa as acquireServerLock,bt as acquireUiLock,be as applyAgentMarkdownWrite,_i as applyExternalChange,Ie as applySeed,j as assertCompatibleStateManifest,or as assertGitAvailable,N as assertNeverDiskEvent,ai as attachAcpThreadSocket,nr as attachIdleShutdown,Jr as bootServer,dn as buildAndOpenSkill,vr as buildConfigYmlContent,Ct as buildExecResult,ei as buildOkMcpStdioCommand,On as buildSkillZip,ee as buildStarterFolderFrontmatterYaml,wt as buildWipTree,Xe as bundleSkillMdPath,ln as canonicalProjectKey,Ae as classifyEvents,Pi as classifyFsPath,zr as clearAllEmbeddingsKeys,$t as clearContributors,st as coercePackId,c as colorFromSeed,yt as commitUpstreamImport,kt as commitWip,Re as commitWipFromTree,Or as compareSemver,tt as composeEffectiveLinterConfig,z as composeFrontmatterSchemasConfig,Q as containsConflictMarkers,Un as contentHash,Jn as contributorCount,Ne as countShadowObjects,V as countStaleAgentWipRefs,te as countWipRefs,Gn as createApiExtension,ri as createAssetServeMiddleware,G as createCollaborationHost,Ge as createContentFilter,vi as createContentFilterAsync,ar as createEmbeddingsSecretStore,An as createEphemeralProjectDir,C as createExternalChangeHandler,pn as createFileLogger,hi as createLiveDerivedIndexExtension,br as createMcpHttpHandler,Cr as createOsProbe,we as createPersistenceExtension,E as createServer,In as createServerObserverExtension,ne as createStreamingErrorWriter,Gi as createTestLogger,Dr as describeStoredEmbeddingsKey,vn as detectClaudeDesktopPresence,Nn as detectGit,Oe as detectProjectShape,Vr as detectUserSkillHosts,Ar as discoverLockDirs,Wn as discoverMarkdownlintConfig,Ve as emitPreflightFailureSpan,vt as encodeDocName,Ot as encodeFolderRoute,Le as encodeSkillRoute,Ur as ensureProjectGit,er as ensureProjectSkillGitignore,ge as errorResponse,v as evictStaleTrackerEntries,b as extractHeadings,Fn as extractOkBinaryPath,se as extractWikiLinksFromMarkdown,Ht as fallbackPaths,nn as findEnclosingGitRoot,et as findEnclosingProjectRoot,y as findNativeMarkdownlintFile,hr as flushFileLogger,mi as formatAuthRejectionWire,Gr as formatContributors,an as formatContributorsFrom,Ce as formatPackRationale,f as gcCheckpointRefs,Hr as getCurrentMcpLogger,En as getLocalDir,Zn as getLogFilePath,Ki as getLogger,wn as getLogsDir,ma as getMachineId,zi as getMeter,ur as getMetrics,wi as getTracer,Mr as handleCollabSocketError,dt as handleSpawnCursor,Jt as hasForwardingHeaders,he as hasGcLogLatch,o as iconFromClientName,Qt as incrementCollabSocketFilteredError,qn as incrementServerObserverFire,Dn as initContent,cn as initShadowRepo,Ri as initTelemetry,Gt as initToleranceTelemetryWriter,Ir as installPrettyZodErrors,Ui as installTestLoggers,sr as installUserSkill,Xr as isAllowedApiOrigin,O as isAllowedWorkspaceHostHeader,S as isConfigDoc,Xt as isHocuspocusAuthRejectionReason,_t as isKnownPackId,lt as isLinkIndexExcludedDoc,ti as isLoopbackAddress,Z as isManagedArtifactDoc,u as isOrphanMode,Pe as isPairedWriteOrigin,$ as isPathWithinDir,Xi as isProcessAlive,R as isProjectRoot,oi as isRemoteAdmitted,it as isReservedForUserTree,Rn as isSelfWrite,mt as isSystemDoc,ii as isToleranceTelemetryEnabled,Yi as isValidLockPid,xe as lastKnownHash,Rr as listRescueCheckpoints,Y as listStarterPacks,Pt as loadCustomAgents,ye as loadPrincipal,fa as lockBaseUrl,ea as lockFilePath,Bi as loggerFactory,Wi as logsCurrentPath,Ji as logsPreviousPath,Mn as makeLazyEmbeddingsKeyStore,la as markServerLockDraining,pt as mountMcpAndApi,ji as normalizeFsPath,k as originGitHubHost,xn as packageVersionMajorMinor,ci as parseAuthRejectionWire,fr as parseGitVersion,Ze as parseHocuspocusAuthToken,ue as parseKeepaliveConnectionId,Ee as pathToDocName,De as planSeed,zt as prepareSingleFileOpen,Wt as processCommand,mr as processUsage,Pn as readAllTargets,Ut as readBundleDecision,zn as readOwnNativeRules,ca as readProcessLock,aa as readProcessLockDetailed,x as readProjectHeadState,Be as readProjectLocalSemanticConfig,ra as readServerLock,pr as readServerPackageVersion,Fr as readSkillInstallStateSnapshot,Vn as readStateManifest,tn as readTargetRecordedAt,Xn as readTargetVersion,At as readUiLock,at as reconcile,hn as recordContributor,tr as recordSkillInstallEvent,ae as registerAllTools,Fe as registerWrite,na as releaseProcessLock,Qi as releaseServerLock,ze as releaseUiLock,U as removeLastKnownHash,kr as reportSkillInstall,Wr as resetMetrics,i as resolveBundleEnabled,Sn as resolveBundledSkillDir,bn as resolveContentDir,ot as resolveCursorBinaryDefault,gt as resolveCursorSpawnInvocation,P as resolveEffectiveLinterConfig,Nr as resolveEmbeddingsCredential,Ft as resolveLockDir,je as resolveNativeConfigForDoc,Se as resolveNativeMarkdownlintConfig,me as resolvePack,jr as resolvePackageVersion,Ye as resolveRemoteAccess,_n as resolveSkillInstallReportSettings,d as resolveUiInfo,_r as restoreContributors,li as restoreLifecycleFromConflictsJson,xt as rewriteMarkdownLinksForDocumentRename,jt as rewriteWikiLinksForDocumentRename,Pr as runAuthReposSubprocess,en as runAuthStatusSubprocess,Dt as runCloneSubprocess,Yn as runDeviceFlowSubprocess,cr as runWithMcpLogger,Et as safeContentPath,Bn as safeSubdir,ir as safetyCheckpoint,L as sanitizeClientName,Er as saveInMemoryCheckpoint,jn as saveVersion,A as seedBasenameIndex,lr as serializeError,bi as setActiveSpanAttributes,H as setupServerObservers,Bt as shadowGit,Li as shutdownTelemetry,Vi as spansCurrentPath,Hi as spansPreviousPath,J as spawnDetached,ht as splitMarkdownBlocks,re as startWatcher,Ue as streamingProblemEvent,$n as swapContributors,qe as teardownToleranceTelemetryWriter,gr as toBroadcasterKey,Oi as tracedAppendFileSync,Ni as tracedLinkSync,Ti as tracedMkdir,ki as tracedMkdirSync,Fi as tracedRename,Ei as tracedRenameSync,Mi as tracedRmSync,Ai as tracedRmdirSync,Di as tracedUnlinkSync,Ci as tracedWriteFile,Ii as tracedWriteFileSync,$r as trustSystemCertificates,Zt as untrackTrackedProjectSkillProjection,_e as updateLastKnownHash,ta as updateProcessLockPort,sa as updateServerLockPort,p as updateUiLockPort,Qn as validateAgentId,St as validateCloneInputs,Lt as validateSkillZip,ua as waitForServerLockDrain,ce as withHiddenWindowsConsole,Si as withSpan,xi as withSpanSync,qr as writeBundleDecision,ni as writeMarkdownlintRule,It as writeRootGitignoreForNewRepo,g as writeStateManifest,sn as writeTargetVersion,We as writeTracker};
1
+ import{$o as e,As as t,Fo as n,P as r,R as i,Ro as a,d as o,ds as s,l as c,ts as l,zo as u}from"./src-IM6msWeV.mjs";import{$ as d,$i as f,$n as p,$r as m,$t as h,A as g,Ai as _,An as v,Ar as y,At as b,B as x,Bi as S,Bn as C,Br as w,Bt as T,C as E,Ci as D,Cn as O,Cr as k,Ct as A,D as j,Di as M,Dn as N,Dr as P,Dt as F,E as I,Ei as L,En as R,Er as z,Et as B,F as V,Fi as H,Fn as U,Ft as W,G,Gi as K,Gn as q,Gr as J,Gt as Y,H as X,Hi as Z,Hn as Q,Hr as $,Ht as ee,I as te,Ii as ne,In as re,It as ie,J as ae,Ji as oe,Jn as se,Jr as ce,Jt as le,K as ue,Ki as de,Kn as fe,Kr as pe,Kt as me,L as he,Li as ge,Ln as _e,Lt as ve,M as ye,Mi as be,Mn as xe,Mr as Se,Mt as Ce,N as we,Ni as Te,Nn as Ee,Nt as De,O as Oe,Oi as ke,On as Ae,Or as je,Ot as Me,P as Ne,Pi as Pe,Pn as Fe,Pt as Ie,Q as Le,Qi as Re,Qn as ze,Qr as Be,Qt as Ve,R as He,Ri as Ue,Rn as We,Rr as Ge,Rt as Ke,S as qe,Si as Je,Sn as Ye,Sr as Xe,St as Ze,T as Qe,Ti as $e,Tn as et,Tr as tt,Tt as nt,U as rt,Ui as it,Un as at,Ur as ot,Ut as st,V as ct,Vi as lt,Vn as ut,Vr as dt,Vt as ft,W as pt,Wi as mt,Wn as ht,Wr as gt,Wt as _t,X as vt,Xi as yt,Xn as bt,Xr as xt,Xt as St,Y as Ct,Yi as wt,Yn as Tt,Yr as Et,Yt as Dt,Z as Ot,Zi as kt,Zn as At,Zr as jt,Zt as Mt,_ as Nt,_a as Pt,_i as Ft,_n as It,_r as Lt,_t as Rt,a as zt,aa as Bt,ai as Vt,an as Ht,ar as Ut,at as Wt,b as Gt,ba as Kt,bi as qt,bn as Jt,br as Yt,bt as Xt,c as Zt,ca as Qt,ci as $t,cn as en,cr as tn,d as nn,da as rn,di as an,dn as on,dr as sn,ea as cn,ei as ln,en as un,er as dn,et as fn,f as pn,fa as mn,fi as hn,fn as gn,fr as _n,g as vn,ga as yn,gi as bn,gn as xn,gr as Sn,gt as Cn,h as wn,ha as Tn,hi as En,hn as Dn,hr as On,ht as kn,i as An,ia as jn,ii as Mn,in as Nn,ir as Pn,it as Fn,j as In,ji as Ln,jn as Rn,jr as zn,jt as Bn,k as Vn,ki as Hn,kn as Un,kr as Wn,kt as Gn,l as Kn,la as qn,li as Jn,ln as Yn,lr as Xn,m as Zn,ma as Qn,mi as $n,mn as er,mr as tr,mt as nr,n as rr,na as ir,ni as ar,nn as or,nr as sr,nt as cr,o as lr,oa as ur,oi as dr,on as fr,or as pr,ot as mr,p as hr,pa as gr,pi as _r,pn as vr,pr as yr,q as br,qi as xr,qn as Sr,qr as Cr,qt as wr,r as Tr,ra as Er,ri as Dr,rn as Or,rr as kr,rt as Ar,s as jr,sa as Mr,si as Nr,sn as Pr,sr as Fr,st as Ir,t as Lr,ta as Rr,ti as zr,tn as Br,tr as Vr,tt as Hr,u as Ur,ua as Wr,ui as Gr,un as Kr,ur as qr,v as Jr,va as Yr,vn as Xr,vr as Zr,vt as Qr,w as $r,wi as ei,wn as ti,wr as ni,wt as ri,x as ii,xi as ai,xn as oi,xr as si,xt as ci,y as li,ya as ui,yi as di,yn as fi,yr as pi,yt as mi,z as hi,zi as gi,zn as _i,zr as vi,zt as yi}from"./src-bozJXbns.mjs";import{C as bi,E as xi,T as Si,_ as Ci,b as wi,c as Ti,d as Ei,g as Di,i as Oi,l as ki,m as Ai,n as ji,p as Mi,s as Ni,t as Pi,u as Fi,v as Ii,w as Li,x as Ri,y as zi}from"./fs-traced-DVpoNaQJ.mjs";import{a as Bi,d as Vi,f as Hi,i as Ui,l as Wi,n as Gi,r as Ki,t as qi,u as Ji}from"./logger-DFxEUjvj.mjs";import{C as Yi,S as Xi,_ as Zi,a as Qi,c as $i,d as ea,g as ta,h as na,i as ra,l as ia,m as aa,n as oa,o as sa,p as ca,r as la,s as ua,t as da,u as fa,v as pa,y as ma}from"./server-lock-V3bg8zL0.mjs";export{rn as AGENT_ID_MAX_LEN,mn as AGENT_ID_RE,M as AGENT_WRITE_ORIGIN,Yr as AcpPermissionStore,Tn as AcpRegistry,Je as AcpThreadManager,qt as AgentFocusBroadcaster,di as AgentPresenceBroadcaster,ke as AgentSessionCapacityError,Hn as AgentSessionManager,kn as AutoStartDisabledError,Zr as BUNDLE_IDS,pi as BUNDLE_SCOPE,Yt as BUNDLE_SKILL_NAME,Sr as BacklinkIndex,gi as CC1Broadcaster,l as CC1_CONTRACT_VERSION,Kr as CONFIG_FILENAME,ut as CONFLICT_MARKER_RE,w as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Nt as ConfigSchema,K as DEFAULT_CHECKPOINT_RETENTION,Vt as DEFAULT_EMBEDDINGS_DIMENSIONS,W as DEFAULT_PACK_ID,ct as DocumentDurabilityState,dr as EMBEDDINGS_API_KEY_ENV,yn as FEATURED_AGENT_IDS,de as FILE_SYSTEM_WRITER,q as FILE_WATCHER_ORIGIN,m as FileEmbeddingsBackend,Mt as GIT_PREFLIGHT_FAIL_SPAN_NAME,xr as GIT_UPSTREAM_WRITER,ui as GitDirAccessError,h as GitNotAvailableError,un as GitTooOldError,Cn as HOCUSPOCUS_AUTH_REJECTION_REASONS,Rt as HocuspocusAuthRejection,Qr as HocuspocusAuthTokenSchema,pe as INSTALLED_AGENTS_SCHEMES,e as LINEAGE_EPOCH_KEY,He as LIVE_DERIVED_INDEX_DEBOUNCE_MS,ie as LOG_MD_TEMPLATE,nt as MANAGED_RENAME_ORIGIN,D as MAX_ACP_THREADS,_ as MAX_AGENT_SESSIONS,$e as MCP_CONNECTION_ID_HEADER,n as MCP_SERVER_NAME,Ln as MIN_EVICTABLE_IDLE_MS,Br as MIN_GIT_VERSION,X as MISSING_OK_CONFIG_MESSAGE,Kt as MalformedGitPointerError,fn as McpLogger,rt as MissingOkConfigError,Te as OBSERVER_SYNC_ORIGIN,on as OK_OKIGNORE_TEMPLATE,a as ORPHAN_MODES,t as PROTOCOL_VERSION,qi as PinoLogger,$i as ProcessLockCollisionError,Kn as ProjectGitInitError,B as ROLLBACK_ORIGIN,gn as ROOT_GITIGNORE_TEMPLATE,Zi as RUNTIME_VERSION,fi as RemoteConfigError,oe as SERVICE_WRITER,yr as SKILL_INSTALL_EVENTS_FILE_REL,r as SKILL_STATE_TARGETS,ve as STARTER_FOLDERS,Ke as STARTER_FOLDER_FRONTMATTER_FILENAME,yi as STARTER_PACKS,T as STARTER_PACK_IDS,ft as STARTER_TEMPLATES,Qe as STATE_MANIFEST_FILENAME,pa as STATE_SCHEMA_VERSION,s as SYSTEM_DOC_NAME,wr as SeedPrerequisiteError,le as SeedRootDirError,da as ServerLockCollisionError,Lr as SingleFileNotAFileError,rr as SingleFileNotFoundError,Tr as SingleFileNotMarkdownError,I as StateManifestError,fe as TagIndex,si as USER_GLOBAL_BUNDLE_IDS,Tt as UiLockCollisionError,F as __getShowAllWalkStatsForTesting,Me as __resetShowAllWalkStatsForTesting,ia as acquireProcessLock,oa as acquireServerLock,bt as acquireUiLock,be as applyAgentMarkdownWrite,_i as applyExternalChange,Ie as applySeed,j as assertCompatibleStateManifest,or as assertGitAvailable,N as assertNeverDiskEvent,ai as attachAcpThreadSocket,nr as attachIdleShutdown,Jr as bootServer,dn as buildAndOpenSkill,vr as buildConfigYmlContent,Ct as buildExecResult,ei as buildOkMcpStdioCommand,On as buildSkillZip,ee as buildStarterFolderFrontmatterYaml,wt as buildWipTree,Xe as bundleSkillMdPath,ln as canonicalProjectKey,Ae as classifyEvents,Pi as classifyFsPath,zr as clearAllEmbeddingsKeys,$t as clearContributors,st as coercePackId,c as colorFromSeed,yt as commitUpstreamImport,kt as commitWip,Re as commitWipFromTree,Or as compareSemver,tt as composeEffectiveLinterConfig,z as composeFrontmatterSchemasConfig,Q as containsConflictMarkers,Un as contentHash,Jn as contributorCount,Ne as countShadowObjects,V as countStaleAgentWipRefs,te as countWipRefs,Gn as createApiExtension,ri as createAssetServeMiddleware,G as createCollaborationHost,Ge as createContentFilter,vi as createContentFilterAsync,ar as createEmbeddingsSecretStore,An as createEphemeralProjectDir,C as createExternalChangeHandler,pn as createFileLogger,hi as createLiveDerivedIndexExtension,br as createMcpHttpHandler,Cr as createOsProbe,we as createPersistenceExtension,E as createServer,In as createServerObserverExtension,ne as createStreamingErrorWriter,Gi as createTestLogger,Dr as describeStoredEmbeddingsKey,vn as detectClaudeDesktopPresence,Nn as detectGit,Oe as detectProjectShape,Vr as detectUserSkillHosts,Ar as discoverLockDirs,Wn as discoverMarkdownlintConfig,Ve as emitPreflightFailureSpan,vt as encodeDocName,Ot as encodeFolderRoute,Le as encodeSkillRoute,Ur as ensureProjectGit,er as ensureProjectSkillGitignore,ge as errorResponse,v as evictStaleTrackerEntries,b as extractHeadings,Fn as extractOkBinaryPath,se as extractWikiLinksFromMarkdown,Ht as fallbackPaths,nn as findEnclosingGitRoot,et as findEnclosingProjectRoot,y as findNativeMarkdownlintFile,hr as flushFileLogger,mi as formatAuthRejectionWire,Gr as formatContributors,an as formatContributorsFrom,Ce as formatPackRationale,f as gcCheckpointRefs,Hr as getCurrentMcpLogger,En as getLocalDir,Zn as getLogFilePath,Ki as getLogger,wn as getLogsDir,ma as getMachineId,zi as getMeter,ur as getMetrics,wi as getTracer,Mr as handleCollabSocketError,dt as handleSpawnCursor,Jt as hasForwardingHeaders,he as hasGcLogLatch,o as iconFromClientName,Qt as incrementCollabSocketFilteredError,qn as incrementServerObserverFire,Dn as initContent,cn as initShadowRepo,Ri as initTelemetry,Gt as initToleranceTelemetryWriter,Ir as installPrettyZodErrors,Ui as installTestLoggers,sr as installUserSkill,Xr as isAllowedApiOrigin,O as isAllowedWorkspaceHostHeader,S as isConfigDoc,Xt as isHocuspocusAuthRejectionReason,_t as isKnownPackId,lt as isLinkIndexExcludedDoc,ti as isLoopbackAddress,Z as isManagedArtifactDoc,u as isOrphanMode,Pe as isPairedWriteOrigin,$ as isPathWithinDir,Xi as isProcessAlive,R as isProjectRoot,oi as isRemoteAdmitted,it as isReservedForUserTree,Rn as isSelfWrite,mt as isSystemDoc,ii as isToleranceTelemetryEnabled,Yi as isValidLockPid,xe as lastKnownHash,Rr as listRescueCheckpoints,Y as listStarterPacks,Pt as loadCustomAgents,ye as loadPrincipal,fa as lockBaseUrl,ea as lockFilePath,Bi as loggerFactory,Wi as logsCurrentPath,Ji as logsPreviousPath,Mn as makeLazyEmbeddingsKeyStore,la as markServerLockDraining,pt as mountMcpAndApi,ji as normalizeFsPath,k as originGitHubHost,xn as packageVersionMajorMinor,ci as parseAuthRejectionWire,fr as parseGitVersion,Ze as parseHocuspocusAuthToken,ue as parseKeepaliveConnectionId,Ee as pathToDocName,De as planSeed,zt as prepareSingleFileOpen,Wt as processCommand,mr as processUsage,Pn as readAllTargets,Ut as readBundleDecision,zn as readOwnNativeRules,ca as readProcessLock,aa as readProcessLockDetailed,x as readProjectHeadState,Be as readProjectLocalSemanticConfig,ra as readServerLock,pr as readServerPackageVersion,Fr as readSkillInstallStateSnapshot,Vn as readStateManifest,tn as readTargetRecordedAt,Xn as readTargetVersion,At as readUiLock,at as reconcile,hn as recordContributor,tr as recordSkillInstallEvent,ae as registerAllTools,Fe as registerWrite,na as releaseProcessLock,Qi as releaseServerLock,ze as releaseUiLock,U as removeLastKnownHash,kr as reportSkillInstall,Wr as resetMetrics,i as resolveBundleEnabled,Sn as resolveBundledSkillDir,bn as resolveContentDir,ot as resolveCursorBinaryDefault,gt as resolveCursorSpawnInvocation,P as resolveEffectiveLinterConfig,Nr as resolveEmbeddingsCredential,Ft as resolveLockDir,je as resolveNativeConfigForDoc,Se as resolveNativeMarkdownlintConfig,me as resolvePack,jr as resolvePackageVersion,Ye as resolveRemoteAccess,_n as resolveSkillInstallReportSettings,d as resolveUiInfo,_r as restoreContributors,li as restoreLifecycleFromConflictsJson,xt as rewriteMarkdownLinksForDocumentRename,jt as rewriteWikiLinksForDocumentRename,Pr as runAuthReposSubprocess,en as runAuthStatusSubprocess,Dt as runCloneSubprocess,Yn as runDeviceFlowSubprocess,cr as runWithMcpLogger,Et as safeContentPath,Bn as safeSubdir,ir as safetyCheckpoint,L as sanitizeClientName,Er as saveInMemoryCheckpoint,jn as saveVersion,A as seedBasenameIndex,lr as serializeError,bi as setActiveSpanAttributes,H as setupServerObservers,Bt as shadowGit,Li as shutdownTelemetry,Vi as spansCurrentPath,Hi as spansPreviousPath,J as spawnDetached,ht as splitMarkdownBlocks,re as startWatcher,Ue as streamingProblemEvent,$n as swapContributors,qe as teardownToleranceTelemetryWriter,gr as toBroadcasterKey,Oi as tracedAppendFileSync,Ni as tracedLinkSync,Ti as tracedMkdir,ki as tracedMkdirSync,Fi as tracedRename,Ei as tracedRenameSync,Mi as tracedRmSync,Ai as tracedRmdirSync,Di as tracedUnlinkSync,Ci as tracedWriteFile,Ii as tracedWriteFileSync,$r as trustSystemCertificates,Zt as untrackTrackedProjectSkillProjection,_e as updateLastKnownHash,ta as updateProcessLockPort,sa as updateServerLockPort,p as updateUiLockPort,Qn as validateAgentId,St as validateCloneInputs,Lt as validateSkillZip,ua as waitForServerLockDrain,ce as withHiddenWindowsConsole,Si as withSpan,xi as withSpanSync,qr as writeBundleDecision,ni as writeMarkdownlintRule,It as writeRootGitignoreForNewRepo,g as writeStateManifest,sn as writeTargetVersion,We as writeTracker};
@@ -0,0 +1 @@
1
+ import"./src-IM6msWeV.mjs";import"./write-project-skill-BoeD2RUw.mjs";import"./src-DwT4IlXo.mjs";import"./acp-harness-probe-PEHo_hYG.mjs";import"./init-BJCusUuy.mjs";import{n as e}from"./loader-DbPx77mt.mjs";import"./skill-teardown-CO4xteJC.mjs";import"./preview-DXyVMz8b.mjs";import"./mcp-migrate-event-B1gJf6bG.mjs";export{e as loadConfig};
@@ -0,0 +1,20 @@
1
+ import{o as e}from"./chunk-DTipWd-i.mjs";import{Y as t}from"./sleep-DVOInM4H.mjs";import{Ds as n,Es as r,X as i,Z as a}from"./src-IM6msWeV.mjs";import{Jr as o,Tn as s,_i as c,at as l,it as u,ot as d,rt as f}from"./src-bozJXbns.mjs";import{O as p,P as m}from"./fs-traced-DVpoNaQJ.mjs";import{C as h,S as g,d as _,y as v}from"./server-lock-V3bg8zL0.mjs";import{t as y}from"./yazl-DZr4PyKA.mjs";import{m as b,p as x,v as S}from"./write-project-skill-BoeD2RUw.mjs";import{c as C}from"./colors-BsmVIwfM.mjs";import{n as w}from"./acp-harness-probe-PEHo_hYG.mjs";import{E as T,T as E,_ as ee,o as D,w as O,x as te,y as ne}from"./init-BJCusUuy.mjs";import{n as k}from"./constants-D9HRzNQG.mjs";import{t as A}from"./is-object-ByG7RnjH.mjs";import"./loader-DbPx77mt.mjs";import"./skill-teardown-CO4xteJC.mjs";import"./preview-DXyVMz8b.mjs";import{execSync as j,spawnSync as M}from"node:child_process";import{basename as N,dirname as P,join as F,relative as re,resolve as I,sep as ie}from"node:path";import{cpSync as ae,createWriteStream as oe,existsSync as L,lstatSync as se,mkdirSync as R,mkdtempSync as ce,readFileSync as z,readdirSync as B,readlinkSync as le,rmSync as V,statSync as ue,writeFileSync as H}from"node:fs";import{arch as de,freemem as fe,homedir as U,hostname as pe,platform as me,release as he,tmpdir as ge,totalmem as _e,type as ve,uptime as ye}from"node:os";import"node:fs/promises";import{createHash as be}from"node:crypto";var W=t();const xe=new Set([`start`,`stop`,`status`,`clean`,`ui`,`mcp`,`preview`,`lint`,`deinit`,`auth`]);function Se(e,t,n=s){if(e!==void 0&&!xe.has(e))return null;let r=n(t);return r===null||r.distance===0?null:r.rootPath}let Ce=null;function we(e){Ce=e}function Te(){return Ce??process.cwd()}function Ee(){return F(U(),`.ok`,`bug-reports`)}function De(e=new Date){let t=e.toISOString().replace(/[:.]/g,`-`),n=Ee(),r=`${t}-bugreport`,i=F(n,`${r}.zip`);for(let e=2;L(i);e+=1)i=F(n,`${r}-${e}.zip`);return i}function Oe(e,t){let n=F(e,`.ok`,`config.yml`);if(L(n))try{let e=z(n,`utf8`).match(/^\s*name:\s*['"]?(.+?)['"]?\s*$/m);if(e?.[1])return e[1]}catch(e){t?.warn({configPath:n,err:e},`bug-report: failed to read .ok/config.yml for project slug; using path-hash fallback`)}return L(F(e,`.ok`))?be(`sha256`).update(I(e)).digest(`hex`).slice(0,12):null}function ke(){let e={timestamp:new Date().toISOString(),platform:me(),osType:ve(),osRelease:he(),hostname:`[redacted]`,uptime:ye(),freeMem:fe(),totalMem:_e(),nodeVersion:process.version,bunVersion:process.versions.bun??null,v8Version:process.versions.v8??null,pid:process.pid};try{e.macosVersion=j(`sw_vers -productVersion 2>/dev/null`,o({encoding:`utf8`})).trim()}catch{}try{let t=F(__dirname,`..`,`..`,`package.json`);L(t)&&(e.okVersion=JSON.parse(z(t,`utf8`)).version)}catch{}return e}const Ae=[{prefix:`cli`,projectTagged:!0},{prefix:`desktop`,projectTagged:!1},{prefix:`mcp`,projectTagged:!1}];function G(e){let t=N(e);return Ae.some(e=>e.projectTagged&&t.startsWith(`${e.prefix}.`))}function je(e,t){return Pe(e,t).files}const Me=[`ShipIt_stderr.log`,`ShipIt_stdout.log`];function Ne(e,t=w){let n=F(e,`${t}.ShipIt`);return L(n)?Me.map(e=>F(n,e)).filter(e=>L(e)):[]}function Pe(e,t){if(!L(t))return{files:[],excludedByProjectSlug:0};let n=B(t).filter(e=>e.endsWith(`.log`)||/\.log\.\d+$/.test(e)).map(e=>F(t,e));if(!e)return{files:n,excludedByProjectSlug:0};let r=n.filter(G),i=[],a=r.filter(t=>{try{return z(t,`utf8`).includes(`"project":"${e}"`)}catch{return i.push(t),!1}});if(a.length===0)return{files:n,excludedByProjectSlug:0};let o=new Set([...a,...i]);return{files:n.filter(e=>!G(e)||o.has(e)),excludedByProjectSlug:r.length-o.size}}function Fe(e){let t=F(e,`.ok`,`local`);return L(t)?{files:[`server.lock`,`last-spawn-error.log`,i].map(e=>F(t,e)).filter(e=>L(e))}:{files:[]}}function Ie(e){let t=F(e,`.ok`,`local`,`logs`);return L(t)?{files:[`server-current.jsonl`,`server-prev.jsonl`].map(e=>F(t,e)).filter(e=>L(e))}:{files:[]}}function Le(e){if(e.redact){let{redacted:t,patterns:r,lineCount:i}=n(e.content);e.zipfile.addBuffer(Buffer.from(t,`utf8`),e.name),e.bundleFiles.push(e.name),r.length>0&&e.redactions.push({file:e.name,lineCount:i,patterns:r})}else e.zipfile.addBuffer(Buffer.from(e.content,`utf8`),e.name),e.bundleFiles.push(e.name)}function Re(e){for(let t of e.files)try{Le({zipfile:e.zipfile,name:`${e.prefix}/${N(t)}`,content:z(t,`utf8`),redact:e.redact,bundleFiles:e.bundleFiles,redactions:e.redactions})}catch(n){e.logger?.warn({file:t,prefix:e.prefix,err:n},`bug-report: skipped unreadable file`)}}async function ze(t){let{redact:n,outputPath:i,logger:a}=t,o=t.userLogsDir??F(U(),`.ok`,`logs`),s=t.projectDir?Oe(t.projectDir,a):null;R(P(i),{recursive:!0}),a?.info({projectSlug:s},`gathering diagnostic data`);let c=ke();c.desktop=t.desktop??null;let{files:l,excludedByProjectSlug:u}=Pe(s,o),{files:d}=t.projectDir?Fe(t.projectDir):{files:[]},{files:f}=t.projectDir?Ie(t.projectDir):{files:[]},p=t.shipItLogFiles??[];a?.info({logFileCount:l.length,logFilesExcludedByProjectSlug:u,lockFileCount:d.length,localSinkFileCount:f.length,shipItLogFileCount:p.length},`files collected`);let m=[],h=[],{ZipFile:g}=await import(`./yazl-jVENrf5i.mjs`).then(t=>e(t.default,1)),_=new g;Re({zipfile:_,files:[...l,...p],prefix:`logs`,redact:n,bundleFiles:h,redactions:m,logger:a}),Re({zipfile:_,files:d,prefix:`lockdir`,redact:n,bundleFiles:h,redactions:m,logger:a}),Re({zipfile:_,files:f,prefix:`local-logs`,redact:n,bundleFiles:h,redactions:m,logger:a});for(let e of t.extraFiles??[])try{let t=z(e.sourcePath),n=`extra/${e.zipName??N(e.sourcePath)}`;_.addBuffer(t,n),h.push(n)}catch(t){a?.warn({sourcePath:e.sourcePath,err:t},`extra file unreadable; omitted from bundle`)}t.note&&Le({zipfile:_,name:`note.txt`,content:t.note,redact:n,bundleFiles:h,redactions:m});let v=JSON.stringify(c,null,2);_.addBuffer(Buffer.from(v,`utf8`),`sysinfo.json`),h.push(`sysinfo.json`);let y={generatedAt:new Date().toISOString(),disciplineVersion:`1.0.0`,projectSlug:s,files:h,redactions:m,sysinfo:c};_.addBuffer(Buffer.from(JSON.stringify(y,null,2),`utf8`),`MANIFEST.json`);let b=m.reduce((e,t)=>e+t.lineCount,0),x=new Set(p.map(e=>`logs/${N(e)}`)),S=h.filter(e=>x.has(e)),C=s?h.filter(e=>e.startsWith(`logs/`)&&!G(e)&&!x.has(e)):[],w=[`# Bug Report Bundle`,``,`Generated: ${y.generatedAt}`,`Project: ${s??`(unscoped)`}`,`Discipline version: ${y.disciplineVersion}`,``,`## Contents`,``,...h.map(e=>`- ${e}`),``,`## Privacy`,``,...C.length>0?[`Scope: some collected logs are user-wide rather than project-scoped.`,`These are written once per machine per day and can contain activity`,`from other projects open on this machine, including captured console`,`output:`,...C.map(e=>`- ${e}`),``]:[],...S.length>0?[`Installer logs: written by the macOS update helper rather than by`,`OpenKnowledge itself, and machine-wide rather than scoped to any one`,`project. They record the install and update history of this app on`,`this machine. Only this app is collected, never other applications`,`that use the same update mechanism:`,...S.map(e=>`- ${e}`),``]:[],...n?[`This bundle was auto-redacted before packaging.`,`Patterns checked: ${r.join(`, `)}`,b>0?`${b} line(s) were scrubbed across ${m.length} file(s).`:`No redactions were needed.`,`See MANIFEST.json for the full redaction audit report.`,``,`This bundle is safe to attach to a GitHub issue.`]:[`Redaction was disabled for this bundle; file contents are unmodified.`]].join(`
2
+ `);_.addBuffer(Buffer.from(w,`utf8`),`README.md`),_.end();let T=oe(i);return _.outputStream.pipe(T),await new Promise((e,t)=>{T.on(`close`,e),T.on(`error`,t)}),a?.info({bundlePath:i,fileCount:h.length,redactionCount:b},`bundle written`),{zipPath:i,summary:{projectSlug:s,files:h,redactions:m,redactedLineCount:b,generatedAt:y.generatedAt}}}var Be=e(y(),1),K=e(C(),1);function Ve(e,t){return t.length===0||!e.includes(t)?e:e.split(t).join(`<CONTENT_DIR>`)}function He(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function q(e,t){if(typeof e==`string`)return Ve(e,t.contentDir);if(Array.isArray(e))return e.map(e=>q(e,t));if(!He(e))return e;let n={};for(let[r,i]of Object.entries(e))n[r]=q(i,t);return n}function Ue(e,t){let n=z(e,`utf-8`);if(n.length===0)return;let r=n.endsWith(`
3
+ `),i=n.split(`
4
+ `),a=[];for(let e=0;e<i.length;e++){let n=i[e]??``;if(!(e===i.length-1&&n===``)){if(n.length===0){a.push(``);continue}try{let e=q(JSON.parse(n),t);a.push(JSON.stringify(e))}catch{a.push(n)}}}H(e,r?`${a.join(`
5
+ `)}\n`:a.join(`
6
+ `))}function We(e,t){let n=z(e,`utf-8`);if(n.trim().length!==0)try{let r=q(JSON.parse(n),t),i=n.endsWith(`
7
+ `)?`
8
+ `:``;H(e,`${JSON.stringify(r,null,2)}${i}`)}catch{let r=Ve(n,t.contentDir);r!==n&&H(e,r)}}function Ge(e,t){let n=z(e,`utf-8`),r=Ve(n,t.contentDir);r!==n&&H(e,r)}function Ke(e){try{return B(e,{withFileTypes:!0}).filter(e=>e.isFile()).map(t=>F(e,t.name))}catch{return[]}}const qe=new Set([`agent-presence.json`,`agent-effects.json`,`runtime.json`]);function Je(e){return/\.log\.\d+$/.test(e)}function Ye(e){return e.endsWith(`.jsonl`)||e.endsWith(`.log`)||Je(e)}function Xe(e){let t={contentDir:e.contentDir};for(let n of[`telemetry`,`logs`,`process`])for(let r of Ke(F(e.stagingDir,n)))Ye(r)?Ue(r,t):r.endsWith(`.json`)?We(r,t):Ge(r,t);for(let n of Ke(F(e.stagingDir,`state`))){let e=N(n);n.endsWith(`.jsonl`)?Ue(n,t):qe.has(e)?We(n,t):Ge(n,t)}}const Ze=[`.ok`,`local`,`telemetry`],Qe=[`.ok`,`local`,`logs`],$e=[`.ok`,`local`,`loss-capture`],et=`spans-current.jsonl`,tt=`spans-prev.jsonl`,nt=`server-current.jsonl`,rt=`server-prev.jsonl`,it=`loss-current.jsonl`,at=`loss-prev.jsonl`;function ot(e){return F(e,...Ze,et)}function st(e){return F(e,...Ze,tt)}function ct(e){return F(e,...Qe,nt)}function lt(e){return F(e,...Qe,rt)}function ut(e){return F(e,...$e,it)}function dt(e){return F(e,...$e,at)}const ft=1e3;async function pt(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-presence`,{signal:AbortSignal.timeout(ft)});return t.ok?await t.text():null}catch{return null}}async function mt(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-effects`,{signal:AbortSignal.timeout(ft)});return t.ok?await t.text():null}catch{return null}}async function ht(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/watcher-recent`,{signal:AbortSignal.timeout(ft)});return t.ok?await t.text():null}catch{return null}}function gt(e){try{let t=JSON.parse(e);if(typeof t!=`object`||!t)return null;let n=t.decisions;return Array.isArray(n)?n.length===0?``:`${n.map(e=>JSON.stringify(e)).join(`
9
+ `)}\n`:null}catch{return null}}function _t(e){let t=F(e,`.git`,`ok`);if(!L(t))return null;let n=M(`git`,[`-C`,t,`log`,`--oneline`,`-50`],o({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function vt(e){let t=F(e,`.git`,`ok`);if(!L(t))return null;let n=M(`git`,[`-C`,t,`for-each-ref`,`--sort=-creatordate`,`--count=50`,`--format=%(refname)%09%(creatordate:iso-strict)%09%(contents:subject)`,`refs/checkpoints/`],o({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function yt(){let e=process.env.OK_DESKTOP_VERSION,t=process.env.OK_DESKTOP_PACKAGED,n=process.env.OK_DESKTOP_CHANNEL;return e===void 0||t===void 0||n===void 0?null:{electronVersion:e,packaged:t===`1`||t.toLowerCase()===`true`,channel:n}}function bt(){return{nodeVersion:process.version,platform:me(),arch:de()}}function xt(){return process.env.OTEL_SDK_DISABLED===`false`}function J(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function St(e){if(!L(e))return{};let t;try{t=(0,W.parse)(z(e,`utf-8`))}catch(t){return console.warn(`[ok diagnose bundle] failed to parse ${e} for manifest config; manifest will report schema defaults. Reason: ${t instanceof Error?t.message:String(t)}`),{}}if(!J(t))return{};let n=t.telemetry;if(!J(n))return{};let r=n.localSink;return J(r)?r:{}}function Ct(e){return typeof e==`boolean`?e:void 0}function wt(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:void 0}function Y(e){if(J(e))return wt(e.maxBytes)}function Tt(e){let t=St(p(`project`,e)),n=St(p(`project-local`,e));return{enabled:Ct(n.enabled)??Ct(t.enabled)??!0,spansMaxBytes:Y(n.spans)??Y(t.spans)??52428800,logsMaxBytes:Y(n.logs)??Y(t.logs)??26214400}}function Et(e){return be(`sha256`).update(e).digest(`hex`)}function Dt(e){let t=z(e),n=0;for(let e=0;e<t.length;e++)t[e]===10&&n++;return n}function Ot(e){let t=z(e,`utf-8`),n=`"doc.name"`,r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+10);return r}function X(e,t){if(!L(e))return!1;try{return R(P(t),{recursive:!0}),ae(e,t),!0}catch{return!1}}function kt(e){let t=[],n=e=>{let r=B(e,{withFileTypes:!0});for(let i of r){let r=F(e,i.name);i.isDirectory()?n(r):i.isFile()&&t.push(r)}};return n(e),t.sort()}const At=new Set([`.jsonl`]);function jt(e){let t=e.lastIndexOf(`.`);return t===-1?!1:At.has(e.slice(t))}const Mt=new Set([`.jsonl`,`.json`,`.txt`,`.log`,`.lock`]);function Nt(e){if(Je(e))return!0;let t=e.lastIndexOf(`.`);return t===-1?!1:Mt.has(e.slice(t))}function Pt(e){let t=[];for(let r of kt(e)){let i=Ft(e,r);if(!Nt(i))continue;let{redacted:a,patterns:o,lineCount:s}=n(z(r,`utf-8`));o.length!==0&&(H(r,a),t.push({file:i,lineCount:s,patterns:o}))}return{redactions:t,redactedLineCount:t.reduce((e,t)=>e+t.lineCount,0)}}function Ft(e,t){return re(e,t).split(ie).join(`/`)}async function It(e){let t=I(e.contentDir),n=I(e.projectDir??e.contentDir),r=e.deps??{},o=r.fetchAgentPresence??pt,s=r.fetchAgentEffects??mt,c=r.fetchWatcherRecent??ht,l=r.readShadowHead??_t,u=r.readCheckpointRefs??vt,d=r.now??(()=>new Date),f=r.okVersion??(()=>k),p=r.readDesktopEnv??yt,m=r.readRuntime??bt,h=r.isOtlpPushEnabled??xt,g=ce(F(ge(),`ok-bundle-`));try{R(F(g,`telemetry`),{recursive:!0}),R(F(g,`logs`),{recursive:!0}),R(F(g,`state`),{recursive:!0}),X(ot(n),F(g,`telemetry`,et)),X(st(n),F(g,`telemetry`,tt)),X(ct(n),F(g,`logs`,nt)),X(lt(n),F(g,`logs`,rt));for(let t of e.userLogFiles??[])X(t,F(g,`logs`,N(t)));let _=F(n,`.ok`,`local`),v=F(_,`server.lock`),y=`not-running`,b=`no server.lock`,x=null;if(L(v)){X(v,F(g,`state`,`server.lock`));try{let e=z(v,`utf-8`),t=JSON.parse(e);typeof t.port==`number`?x=t.port:b=`lock present but no port`}catch{b=`lock present but unparseable`}}if(x!==null){let e=await o(x);e===null?b=`agent-presence endpoint at :${x} unreachable`:(H(F(g,`state`,`agent-presence.json`),e),y=`running`,b=``);let t=await s(x);t!==null&&H(F(g,`state`,`agent-effects.json`),t);let n=await c(x);if(n!==null){let e=gt(n);e!==null&&H(F(g,`state`,`watcher-recent.jsonl`),e)}}let S=l(t);S!==null&&H(F(g,`state`,`shadow-head.txt`),S);let C=u(t);C!==null&&H(F(g,`state`,`checkpoint-refs.txt`),C),X(ut(n),F(g,`state`,it)),X(dt(n),F(g,`state`,at)),X(F(_,`last-spawn-error.log`),F(g,`state`,`last-spawn-error.log`)),X(F(_,a),F(g,`state`,a)),X(F(_,i),F(g,`state`,i));let w=m(),T=p(),E={ok:{version:f(),nodeVersion:w.nodeVersion,platform:w.platform,arch:w.arch},host:{desktop:T}};H(F(g,`state`,`runtime.json`),`${JSON.stringify(E,null,2)}\n`);let ee=y===`running`?`running
10
+ `:`not-running (${b})\n`;if(H(F(g,`state`,`server-status.txt`),ee),e.processDir&&L(e.processDir)){let t=F(g,`process`);R(t,{recursive:!0}),ae(e.processDir,t,{recursive:!0})}let D=e.redact===!0;D&&Xe({stagingDir:g,contentDir:t}),e.note&&H(F(g,`note.txt`),e.note);let O=null;e.scrubSecrets===!0&&(O=Pt(g));for(let t of e.extraFiles??[])X(t.sourcePath,F(g,`extra`,t.zipName??N(t.sourcePath)))||r.logger?.warn({sourcePath:t.sourcePath},`extra file missing; omitted from bundle`);let te=Tt(n),ne=kt(g),k=[],A=0,j=0;for(let e of ne){let t=Ft(g,e),n=ue(e).size,r=jt(t)?Dt(e):0;k.push({path:t,bytes:n,lines:r}),A+=n,t.startsWith(`telemetry/`)&&jt(t)&&(j+=Ot(e))}let M={applied:D};O!==null&&(M.secretScrub=O);let P={schemaVersion:2,createdAt:d().toISOString(),ok:{version:f(),nodeVersion:w.nodeVersion,platform:w.platform,arch:w.arch},host:{desktop:T},contentDir:{pathSha256:Et(t),absolutePath:D?`<CONTENT_DIR>`:t},telemetry:{localSink:te,otlpPushEnabled:h()},redaction:M,serverStatus:y,files:k};H(F(g,`manifest.json`),`${JSON.stringify(P,null,2)}\n`);let re=ne.some(e=>{try{return z(e,`utf-8`).includes(t)}catch{return!1}}),I={totalBytes:A,fileCount:k.length,docNameCount:j,contentDirVisible:re,redacted:D},ie=!1;return{stagingDir:g,manifest:P,summary:I,cleanup:()=>{ie||(ie=!0,V(g,{recursive:!0,force:!0}))}}}catch(e){throw V(g,{recursive:!0,force:!0}),e}}async function Lt(e){let{collected:t,outputPath:n}=e,r=P(n);if(!L(r))throw Error(`ok diagnose bundle: parent directory does not exist: ${r}. Create it or pass --out with an existing parent.`);let i=new Be.ZipFile,a=kt(t.stagingDir);for(let e of a){let n=Ft(t.stagingDir,e);i.addFile(e,n)}i.end();let o=oe(n);return i.outputStream.pipe(o),await new Promise((e,t)=>{o.on(`close`,e),o.on(`error`,t),i.outputStream.on(`error`,t)}),n}function Rt(e,t){let n=F(e,`.ok`,`config.yml`);if(L(n))try{let t=(0,W.parse)(z(n,`utf-8`)),r=A(t)?t.content:void 0,i=A(r)?r.dir:void 0;if(typeof i==`string`&&i.length>0)return I(e,i)}catch(e){t?.warn({configPath:n,err:e},`bug-report: failed to read .ok/config.yml; falling back to project root as content dir`)}return I(e)}async function zt(e,t,n){let r=Oe(t,e.logger),i=await It({contentDir:Rt(t,e.logger),projectDir:t,redact:e.redact,scrubSecrets:e.redact,note:e.note,extraFiles:e.extraFiles,userLogFiles:[...je(r,e.userLogsDir??F(U(),`.ok`,`logs`)),...Ne(e.cachesDir??F(U(),`Library`,`Caches`))],deps:{readDesktopEnv:n,logger:e.logger}});try{R(P(e.outputPath),{recursive:!0}),await Lt({collected:i,outputPath:e.outputPath});let t=i.manifest.redaction.secretScrub;return{zipPath:e.outputPath,summary:{level:`full`,systemWide:!1,projectSlug:r,files:i.manifest.files.map(e=>e.path),redactions:t?.redactions??[],redactedLineCount:t?.redactedLineCount??0,generatedAt:i.manifest.createdAt}}}finally{i.cleanup()}}async function Bt(e){let{projectDir:t}=e,n=e.readDesktopEnv??yt;if(e.level===`full`&&t!==void 0)return zt(e,t,n);let{zipPath:r,summary:i}=await ze({projectDir:t,redact:e.redact,outputPath:e.outputPath,userLogsDir:e.userLogsDir,shipItLogFiles:Ne(e.cachesDir??F(U(),`Library`,`Caches`)),logger:e.logger,note:e.note,extraFiles:e.extraFiles,desktop:n()});return{zipPath:r,summary:{level:e.level,systemWide:t===void 0,projectSlug:i.projectSlug,files:i.files,redactions:i.redactions,redactedLineCount:i.redactedLineCount,generatedAt:i.generatedAt}}}function Z(e,t,n={}){let r=_(e,t);if(!L(r))return{status:`missing`,lockPath:r};let i;try{i=JSON.parse(z(r,`utf-8`))}catch{return{status:`corrupt`,lockPath:r}}if(!i||typeof i!=`object`||!h(i.pid))return{status:`corrupt`,lockPath:r};let a=i;if(!(n.isAlive??g)(a.pid))return{status:`dead-pid`,lockPath:r,lock:a};if(typeof a.machineId==`string`)return a.machineId===(n.machineId??v())?{status:`alive`,lockPath:r,lock:a}:{status:`foreign-host`,lockPath:r,lock:a};let o=n.host??pe();return a.hostname===o?{status:`alive`,lockPath:r,lock:a}:{status:`foreign-host`,lockPath:r,lock:a}}function Vt(e){return e.replace(/:\d+$/,``)}function Ht(e){let t=e.trim();if(!t)return null;{let e=/^https?:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`https`,hostname:Vt(e[1]),owner:e[2],name:e[3]}}{let e=/^ssh:\/\/(?:[\w.-]+@)?([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`ssh`,hostname:Vt(e[1]),owner:e[2],name:e[3]}}{let e=/^git:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:Vt(e[1]),owner:e[2],name:e[3]}}{let e=/^(?:[\w.-]+@)?([\w.-]+):([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e?.[1].includes(`.`)||e&&t.startsWith(`git@`))return{protocol:`ssh`,hostname:e[1],owner:e[2],name:e[3]}}{let e=/^git:([\w.-]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:e[1],owner:e[2],name:e[3]}}if(!t.includes(`://`)&&!t.includes(`@`)&&!t.startsWith(`/`)){let e=/^([\w.-]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e)return{protocol:`https`,hostname:`github.com`,owner:e[1],name:e[2]}}return null}const Ut=/^# >>> open-knowledge cli >>>\n[\s\S]*?^# <<< open-knowledge cli <<<\n?/m;function Wt(e){return F(e,`Library`,`Application Support`,`OpenKnowledge`,`path-install.json`)}const Gt={existsSync:e=>L(e),readFileSync:(e,t)=>z(e,t),lstatSync:e=>se(e),readlinkSync:e=>le(e)};function Kt(e,t=Gt){let n=Wt(e);if(!t.existsSync(n))return null;try{let e=JSON.parse(t.readFileSync(n,`utf8`));return e?.version===1?e:null}catch{return null}}function qt(e){let t=e.replace(Ut,``);return{text:t,changed:t!==e,emptyAfter:t.trim()===``}}function Jt(e,t,n=Gt){try{return n.lstatSync(e).isSymbolicLink()?n.readlinkSync(e)===t:!1}catch{return!1}}function Yt(e){return x(e)||b(e)||te(e)}const Xt=10*1024*1024;function Zt(e,t,n,r){let i=D(e,t,n,r);if(i.kind===`absent`||i.kind===`no-entry`)return{kind:`not-present`};if(i.kind===`decline`)return{kind:`declined`,reason:i.reason};if(!Yt(i.entry))return{kind:`left-foreign`};let a;try{a=r??e.configPath(t,n)}catch{return{kind:`not-present`}}let o=e.serverName(t);return e.format===`file`?(V(a,{force:!0}),{kind:`removed`}):e.format===`toml`?en(a,o):e.format===`yaml`?$t(a,e.topLevelKey,o):Qt(a,e.topLevelKey,e.serverMapSubKey,o)}function Qt(e,t,n,r){let i;try{i=z(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}if(Buffer.byteLength(i,`utf-8`)>Xt)return{kind:`declined`,reason:`oversize`};let{text:a,changed:o}=T(i,ee(t,n,r));return o?(m(e,a,{mode:O(e)}),{kind:`removed`}):{kind:`not-present`}}function $t(e,t,n){let r;try{r=z(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}if(Buffer.byteLength(r,`utf-8`)>Xt)return{kind:`declined`,reason:`oversize`};let i=r.charCodeAt(0)===65279,a=i?r.slice(1):r,o=(0,W.parseDocument)(a);if(o.errors.length>0)return{kind:`declined`,reason:`unparseable`};let s=[t,n];if(!o.hasIn(s))return{kind:`not-present`};o.deleteIn(s);let c=o.toString(),l=E(a);a.trim()===``||a.endsWith(`
11
+ `)?c.endsWith(`
12
+ `)||(c=`${c}\n`):c=c.replace(/\n+$/,``),l&&(c=c.replace(/\r\n/g,`
13
+ `).replace(/\n/g,`\r
14
+ `));let u=`${i?``:``}${c}`;return u!==r&&m(e,u,{mode:O(e)}),{kind:`removed`}}function en(e,t){let n=ne();if(n.backend===`fallback`)return{kind:`declined`,reason:`no-native-writer`};let r;try{r=z(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}let i=r.charCodeAt(0)===65279,a=i?r.slice(1):r,o=E(a),s=a.trim()===``||a.endsWith(`
15
+ `),c;try{c=n.removeEntry(a,t)}catch{return{kind:`declined`,reason:`unparseable`}}if(!c.existed)return{kind:`not-present`};let l=c.text;s?l.endsWith(`
16
+ `)||(l=`${l}\n`):l=l.replace(/\n+$/,``),o&&(l=l.replace(/\r\n/g,`
17
+ `).replace(/\n/g,`\r
18
+ `));let u=`${i?``:``}${l}`;return u!==r&&m(e,u,{mode:O(e)}),{kind:`removed`}}function tn(e){return e==null?!1:e.includes(`--type=utility`)&&e.includes(`--utility-sub-type=node.mojom.NodeService`)}function nn(e,t=Date.now()){let n=new Date(e).getTime();if(Number.isNaN(n))return`—`;let r=t-n,i=Math.floor(r/1e3);if(i<60)return`${i}s`;let a=Math.floor(i/60);if(a<60)return`${a}m ago`;let o=Math.floor(a/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function rn(e,t,n,r,i,a){if(t.status===`missing`||t.status===`corrupt`)return null;let o=t.lock,s=null;if(n.status!==`missing`&&n.status!==`corrupt`){let e=n.lock;s={port:e.port,status:n.status,pid:e.pid,startedAt:e.startedAt,usage:a}}return{directory:o.worktreeRoot,server:{port:o.port,status:t.status,pid:o.pid,startedAt:o.startedAt,usage:i},ui:s,hostname:o.hostname,lockPath:t.lockPath,binary:r==null?null:u(r),command:r,isDesktop:tn(r)}}function an(e){return e.ui==null?!1:e.ui.status===`alive`||e.ui.status===`foreign-host`}function Q(e){let t=e.server.status;return t===`alive`||t===`foreign-host`?e.isDesktop?`desktop`:t===`alive`?`running`:`foreign`:t===`dead-pid`&&an(e)?`ui-orphan`:`stale`}const on=new Set([`running`,`desktop`,`foreign`,`ui-orphan`]);function sn(e){switch(e){case`running`:return K.default.green(e);case`desktop`:return K.default.blue(e);case`foreign`:return K.default.cyan(e);case`ui-orphan`:return K.default.magenta(e);case`stale`:return K.default.yellow(e)}}function cn(e){return e==null?`—`:`${e.cpuPercent.toFixed(1)}% / ${e.memPercent.toFixed(1)}%`}function ln(e){return`${cn(e.server.usage)} | ${cn(e.ui?.usage??null)}`}function un(e){return`${e.server.port===0?`(starting)`:String(e.server.port)} / ${e.ui==null||e.ui.status===`dead-pid`?`—`:String(e.ui.port)}`}function dn(e){if(e.length===0)return`No open-knowledge servers found.`;let t=[`DIRECTORY`,`PORTS (API/UI)`,`CPU/MEM (API | UI)`,`STATUS`,`PID`,`STARTED`,`BINARY`],n=e.map(e=>{let t=Q(e),n=t===`ui-orphan`&&e.ui!=null?e.ui.pid:e.server.pid;return[e.directory,un(e),ln(e),t,String(n),nn(e.server.startedAt),e.binary??`—`]}),r=t.length,i=t.map(e=>e.length);for(let e of n)for(let t=0;t<r;t++)i[t]=Math.max(i[t]??0,(e[t]??``).length);let a=t.map((e,t)=>e.padEnd(i[t]??0)).join(` `).trimEnd(),o=e.map((e,t)=>{let a=n[t]??[],o=[];for(let t=0;t<r;t++){let n=(a[t]??``).padEnd(i[t]??0);if(t===3){let r=a[t]??``;n=sn(Q(e))+` `.repeat(Math.max(0,(i[t]??0)-r.length))}o.push(n)}return o.join(` `).trimEnd()}),s=K.default.dim(`To stop a server: ok stop <port|pid|directory|all>`);return[a,...o,``,s].join(`
19
+ `)}async function fn(e={}){let t=e.discover??f,n=e.inspect??Z,r=e.log??(e=>console.log(e)),i=e.resolveCommand??l,a=e.resolveUsage??d,o=await t(),s=[];for(let e of o){let t=n(e,`server`),r=n(e,`ui`),o=rn(e,t,r,t.status===`missing`||t.status===`corrupt`?null:i(t.lock.pid),t.status===`missing`||t.status===`corrupt`?null:a(t.lock.pid),r.status===`missing`||r.status===`corrupt`?null:a(r.lock.pid));o!=null&&s.push(o)}if(e.json){let e=s.map(e=>({...e,displayStatus:Q(e)}));r(JSON.stringify(e,null,2));return}r(dn(e.all?s:s.filter(e=>on.has(Q(e)))))}function pn(){return new S(`ps`).description(`List all running open-knowledge servers`).argument(`[modifier]`,`"all" to include stale (dead-pid) entries`).option(`--all`,`Include stale (dead-pid) entries (foreign-host shows by default)`).option(`--json`,`Emit structured JSON (always includes all statuses)`).action(async(e,t)=>{await fn({all:t.all===!0||e===`all`,json:t.json===!0})})}function mn(e,t,n={}){let r=n.isAlive??g,i=[];for(let[n,a]of[[`server`,e],[`ui`,t]])(a.status===`alive`||a.status===`foreign-host`&&r(a.lock.pid))&&i.push({name:n,pid:a.lock.pid,port:a.lock.port});return{targets:i}}function hn(e){let t=e.inspect??(t=>Z(e.lockDir,t)),n=e.kill??((e,t)=>process.kill(e,t)),r=e.log??(e=>console.log(e)),i=e.error??(e=>console.error(e)),a=mn(t(`server`),t(`ui`),{isAlive:e.isAlive});if(a.targets.length===0)return r(`No running open-knowledge processes.`),{stopped:[],failed:[],hadTargets:!1};let o=[],s=[];for(let e of a.targets)try{n(e.pid,`SIGTERM`),o.push(e)}catch(t){s.push({target:e,error:t instanceof Error?t.message:String(t)})}return o.length>0&&r(`Stopped: ${o.map(e=>`${e.name} (pid=${e.pid}, port=${e.port})`).join(`, `)}`),s.length>0&&i(`Failed to stop: ${s.map(({target:e,error:t})=>`${e.name} (pid=${e.pid}): ${t}`).join(`; `)}`),{stopped:o,failed:s,hadTargets:!0}}function $(e,t){return e.status===`alive`?!0:e.status===`foreign-host`?t(e.lock.pid):!1}async function gn(e,t=g){let n=await f(),r=null;for(let i of n){let n=Z(i,`server`),a=Z(i,`ui`);if($(n,t)&&n.lock.port===e||$(a,t)&&a.lock.port===e)return i;r===null&&($(n,t)&&n.lock.pid===e||$(a,t)&&a.lock.pid===e)&&(r=i)}return r}function _n(e){let t=hn({lockDir:e});return t.failed.length>0&&(process.exitCode=1),t}function vn(e){return new S(`stop`).description(`Stop open-knowledge server(s). With no argument: stops the server for the current directory. Pass a port number, a directory path, or "all" to target globally.`).argument(`[target...]`,`port number, directory path (spaces OK), or "all"`).action(async t=>{let n=t.length===0?void 0:t.join(` `);if(n===void 0){e();let t=hn({lockDir:c(process.cwd()),log:()=>{}});if(t.hadTargets){if(t.stopped.length>0){let e=t.stopped.map(e=>`${e.name} (pid=${e.pid}, port=${e.port})`).join(`, `);console.log(`Stopped: ${e}`)}t.failed.length>0&&(process.exitCode=1)}else await fn({});return}if(n===`all`){let e=await f();if(e.length===0){console.log(`No running open-knowledge servers found.`);return}let t=0;for(let n of e){let e=Z(n,`server`),r=Z(n,`ui`);!$(e,g)&&!$(r,g)||(_n(n),t++)}t===0&&console.log(`No running open-knowledge servers found.`);return}if(/^\d+$/.test(n)){let e=Number.parseInt(n,10),t=await gn(e);if(t===null){console.log(`No running open-knowledge server found with port or PID ${e}.`);return}_n(t);return}_n(c(I(Te(),n)))})}export{Te as _,Ut as a,Kt as c,Z as d,Bt as f,Ee as g,De as h,Zt as i,qt as l,Lt as m,vn as n,Jt as o,It as p,pn as r,Wt as s,hn as t,Ht as u,we as v,Se as y};
20
+ //# sourceMappingURL=src-DwT4IlXo.mjs.map
@@ -344,5 +344,5 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
344
344
  `,ANSWER_SESSION_LAST_MESSAGE_IS_NOT_ASSISTANT:`The last message in the session is not an assistant message. Cannot regenerate non-assistant messages.`,PLUGIN_COMPONENT_CONFLICT:`The component "%s" is already defined. The plugin "%s" is trying to redefine it.`};function N4(e,...t){let n=Error(u4(M4[e]??`Unsupported Orama Error code: ${e}`,...t));return n.code=e,`captureStackTrace`in Error.prototype&&Error.captureStackTrace(n),n}function P4(e){return{raw:Number(e),formatted:m4(e)}}function F4(e){if(e.id){if(typeof e.id!=`string`)throw N4(`DOCUMENT_ID_MUST_BE_STRING`,typeof e.id);return e.id}return g4()}function I4(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];if(t!==void 0&&!(r===`geopoint`&&typeof t==`object`&&typeof t.lon==`number`&&typeof t.lat==`number`)&&!(r===`enum`&&(typeof t==`string`||typeof t==`number`))){if(r===`enum[]`&&Array.isArray(t)){let e=t.length;for(let r=0;r<e;r++)if(typeof t[r]!=`string`&&typeof t[r]!=`number`)return n+`.`+r;continue}if(B4(r)){let e=U4(r);if(!Array.isArray(t)||t.length!==e)throw N4(`INVALID_INPUT_VECTOR`,n,e,t.length);continue}if(V4(r)){if(!Array.isArray(t))return n;let e=H4(r),i=t.length;for(let r=0;r<i;r++)if(typeof t[r]!==e)return n+`.`+r;continue}if(typeof r==`object`){if(!t||typeof t!=`object`)return n;let e=I4(t,r);if(e)return n+`.`+e;continue}if(typeof t!==r)return n}}}const L4={string:!1,number:!1,boolean:!1,enum:!1,geopoint:!1,"string[]":!0,"number[]":!0,"boolean[]":!0,"enum[]":!0},R4={"string[]":`string`,"number[]":`number`,"boolean[]":`boolean`,"enum[]":`enum`};function z4(e){return e===`geopoint`}function B4(e){return typeof e==`string`&&/^vector\[\d+\]$/.test(e)}function V4(e){return typeof e==`string`&&L4[e]}function H4(e){return R4[e]}function U4(e){let t=Number(e.slice(7,-1));switch(!0){case isNaN(t):throw N4(`INVALID_VECTOR_VALUE`,e);case t<=0:throw N4(`INVALID_VECTOR_SIZE`,e);default:return t}}function W4(){return{idToInternalId:new Map,internalIdToId:[],save:G4,load:K4}}function G4(e){return{internalIdToId:e.internalIdToId}}function K4(e,t){let{internalIdToId:n}=t;e.internalDocumentIDStore.idToInternalId.clear(),e.internalDocumentIDStore.internalIdToId=[];let r=n.length;for(let t=0;t<r;t++){let r=n[t];e.internalDocumentIDStore.idToInternalId.set(r,t+1),e.internalDocumentIDStore.internalIdToId.push(r)}}function q4(e,t){if(typeof t==`string`){let n=e.idToInternalId.get(t);if(n)return n;let r=e.idToInternalId.size+1;return e.idToInternalId.set(t,r),e.internalIdToId.push(t),r}return t>e.internalIdToId.length?q4(e,t.toString()):t}function J4(e,t){if(e.internalIdToId.length<t)throw Error(`Invalid internalId ${t}`);return e.internalIdToId[t-1]}function Y4(e,t){return{sharedInternalDocumentStore:t,docs:{},count:0}}function X4(e,t){let n=q4(e.sharedInternalDocumentStore,t);return e.docs[n]}function Z4(e,t){let n=t.length,r=Array.from({length:n});for(let i=0;i<n;i++){let n=q4(e.sharedInternalDocumentStore,t[i]);r[i]=e.docs[n]}return r}function Q4(e){return e.docs}function $4(e,t,n,r){return e.docs[n]===void 0?(e.docs[n]=r,e.count++,!0):!1}function e3(e,t){let n=q4(e.sharedInternalDocumentStore,t);return e.docs[n]===void 0?!1:(delete e.docs[n],e.count--,!0)}function t3(e){return e.count}function n3(e,t){let n=t;return{docs:n.docs,count:n.count,sharedInternalDocumentStore:e}}function r3(e){return{docs:e.docs,count:e.count}}function i3(){return{create:Y4,get:X4,getMultiple:Z4,getAll:Q4,store:$4,remove:e3,count:t3,load:n3,save:r3}}const a3=[`beforeInsert`,`afterInsert`,`beforeRemove`,`afterRemove`,`beforeUpdate`,`afterUpdate`,`beforeUpsert`,`afterUpsert`,`beforeSearch`,`afterSearch`,`beforeInsertMultiple`,`afterInsertMultiple`,`beforeRemoveMultiple`,`afterRemoveMultiple`,`beforeUpdateMultiple`,`afterUpdateMultiple`,`beforeUpsertMultiple`,`afterUpsertMultiple`,`beforeLoad`,`afterLoad`,`afterCreate`];function o3(e,t){let n=[],r=e.plugins?.length;if(!r)return n;for(let i=0;i<r;i++)try{let r=e.plugins[i];typeof r[t]==`function`&&n.push(r[t])}catch(e){throw console.error(`Caught error in getAllPluginsByHook:`,e),N4(`PLUGIN_CRASHED`)}return n}const s3=[`tokenizer`,`index`,`documentsStore`,`sorter`,`pinning`],c3=[`validateSchema`,`getDocumentIndexId`,`getDocumentProperties`,`formatElapsedTime`];function l3(e,t,n,r){if(e.some(T4))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function u3(e,t,n){if(e.some(T4))return(async()=>{for(let r of e)await r(t,n)})();for(let r of e)r(t,n)}function d3(e,t,n,r,i){if(e.some(T4))return(async()=>{for(let a of e)await a(t,n,r,i)})();for(let a of e)a(t,n,r,i)}function f3(e,t,n,r){if(e.some(T4))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function p3(e,t){if(e.some(T4))return(async()=>{for(let n of e)await n(t)})();for(let n of e)n(t)}var m3=class e{k;v;l=null;r=null;h=1;constructor(e,t){this.k=e,this.v=new Set(t)}updateHeight(){this.h=Math.max(e.getHeight(this.l),e.getHeight(this.r))+1}static getHeight(e){return e?e.h:0}getBalanceFactor(){return e.getHeight(this.l)-e.getHeight(this.r)}rotateLeft(){let e=this.r;return this.r=e.l,e.l=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){let e=this.l;return this.l=e.r,e.r=this,this.updateHeight(),e.updateHeight(),e}toJSON(){return{k:this.k,v:Array.from(this.v),l:this.l?this.l.toJSON():null,r:this.r?this.r.toJSON():null,h:this.h}}static fromJSON(t){let n=new e(t.k,t.v);return n.l=t.l?e.fromJSON(t.l):null,n.r=t.r?e.fromJSON(t.r):null,n.h=t.h,n}},h3=class e{root=null;insertCount=0;constructor(e,t){e!==void 0&&t!==void 0&&(this.root=new m3(e,t))}insert(e,t,n=1e3){this.root=this.insertNode(this.root,e,t,n)}insertMultiple(e,t,n=1e3){for(let r of t)this.insert(e,r,n)}rebalance(){this.root&&=this.rebalanceNode(this.root)}toJSON(){return{root:this.root?this.root.toJSON():null,insertCount:this.insertCount}}static fromJSON(t){let n=new e;return n.root=t.root?m3.fromJSON(t.root):null,n.insertCount=t.insertCount||0,n}insertNode(e,t,n,r){if(e===null)return new m3(t,[n]);let i=[],a=e,o=null;for(;a!==null;)if(i.push({parent:o,node:a}),t<a.k)if(a.l===null){a.l=new m3(t,[n]),i.push({parent:a,node:a.l});break}else o=a,a=a.l;else if(t>a.k)if(a.r===null){a.r=new m3(t,[n]),i.push({parent:a,node:a.r});break}else o=a,a=a.r;else return a.v.add(n),e;let s=!1;this.insertCount++%r===0&&(s=!0);for(let t=i.length-1;t>=0;t--){let{parent:n,node:r}=i[t];if(r.updateHeight(),s){let t=this.rebalanceNode(r);n?n.l===r?n.l=t:n.r===r&&(n.r=t):e=t}}return e}rebalanceNode(e){let t=e.getBalanceFactor();if(t>1){if(e.l&&e.l.getBalanceFactor()>=0)return e.rotateRight();if(e.l)return e.l=e.l.rotateLeft(),e.rotateRight()}if(t<-1){if(e.r&&e.r.getBalanceFactor()<=0)return e.rotateLeft();if(e.r)return e.r=e.r.rotateRight(),e.rotateLeft()}return e}find(e){let t=this.findNodeByKey(e);return t?t.v:null}contains(e){return this.find(e)!==null}getSize(){let e=0,t=[],n=this.root;for(;n||t.length>0;){for(;n;)t.push(n),n=n.l;n=t.pop(),e++,n=n.r}return e}isBalanced(){if(!this.root)return!0;let e=[this.root];for(;e.length>0;){let t=e.pop(),n=t.getBalanceFactor();if(Math.abs(n)>1)return!1;t.l&&e.push(t.l),t.r&&e.push(t.r)}return!0}remove(e){this.root=this.removeNode(this.root,e)}removeDocument(e,t){let n=this.findNodeByKey(e);n&&(n.v.size===1?this.root=this.removeNode(this.root,e):n.v=new Set([...n.v.values()].filter(e=>e!==t)))}findNodeByKey(e){let t=this.root;for(;t;)if(e<t.k)t=t.l;else if(e>t.k)t=t.r;else return t;return null}removeNode(e,t){if(e===null)return null;let n=[],r=e;for(;r!==null&&r.k!==t;)n.push(r),r=t<r.k?r.l:r.r;if(r===null)return e;if(r.l===null||r.r===null){let t=r.l?r.l:r.r;if(n.length===0)e=t;else{let e=n[n.length-1];e.l===r?e.l=t:e.r=t}}else{let e=r,t=r.r;for(;t.l!==null;)e=t,t=t.l;r.k=t.k,r.v=t.v,e.l===t?e.l=t.r:e.r=t.r,r=e}n.push(r);for(let t=n.length-1;t>=0;t--){let r=n[t];r.updateHeight();let i=this.rebalanceNode(r);if(t>0){let e=n[t-1];e.l===r?e.l=i:e.r===r&&(e.r=i)}else e=i}return e}rangeSearch(e,t){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),i.k>=e&&i.k<=t)for(let e of i.v)n.add(e);if(i.k>t)break;i=i.r}return n}greaterThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.r;if(i=r.pop(),t&&i.k>=e||!t&&i.k>e)for(let e of i.v)n.add(e);else if(i.k<=e)break;i=i.l}return n}lessThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),t&&i.k<=e||!t&&i.k<e)for(let e of i.v)n.add(e);else if(i.k>e)break;i=i.r}return n}},g3=class e{numberToDocumentId;constructor(){this.numberToDocumentId=new Map}insert(e,t){this.numberToDocumentId.has(e)?this.numberToDocumentId.get(e).add(t):this.numberToDocumentId.set(e,new Set([t]))}find(e){let t=this.numberToDocumentId.get(e);return t?Array.from(t):null}remove(e){this.numberToDocumentId.delete(e)}removeDocument(e,t){let n=this.numberToDocumentId.get(t);n&&(n.delete(e),n.size===0&&this.numberToDocumentId.delete(t))}contains(e){return this.numberToDocumentId.has(e)}getSize(){let e=0;for(let t of this.numberToDocumentId.values())e+=t.size;return e}filter(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`eq`:{let t=e[n],r=this.numberToDocumentId.get(t);return r?Array.from(r):[]}case`in`:{let t=e[n],r=new Set;for(let e of t){let t=this.numberToDocumentId.get(e);if(t)for(let e of t)r.add(e)}return Array.from(r)}case`nin`:{let t=new Set(e[n]),r=new Set;for(let[e,n]of this.numberToDocumentId.entries())if(!t.has(e))for(let e of n)r.add(e);return Array.from(r)}default:throw Error(`Invalid operation`)}}filterArr(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`containsAll`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e].filter(e=>t.has(e))));return Array.from(r)}case`containsAny`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e,...t]));return Array.from(r)}default:throw Error(`Invalid operation`)}}static fromJSON(t){if(!t.numberToDocumentId)throw Error(`Invalid Flat Tree JSON`);let n=new e;for(let[e,r]of t.numberToDocumentId)n.numberToDocumentId.set(e,new Set(r));return n}toJSON(){return{numberToDocumentId:Array.from(this.numberToDocumentId.entries()).map(([e,t])=>[e,Array.from(t)])}}};function _3(e,t,n){if(n<0)return-1;if(e===t)return 0;let r=e.length,i=t.length;if(r===0)return i<=n?i:-1;if(i===0)return r<=n?r:-1;let a=Math.abs(r-i);if(e.startsWith(t))return a<=n?a:-1;if(t.startsWith(e))return 0;if(a>n)return-1;let o=[];for(let e=0;e<=r;e++){o[e]=[e];for(let t=1;t<=i;t++)o[e][t]=e===0?t:0}for(let a=1;a<=r;a++){let r=1/0;for(let n=1;n<=i;n++)e[a-1]===t[n-1]?o[a][n]=o[a-1][n-1]:o[a][n]=Math.min(o[a-1][n]+1,o[a][n-1]+1,o[a-1][n-1]+1),r=Math.min(r,o[a][n]);if(r>n)return-1}return o[r][i]<=n?o[r][i]:-1}function v3(e,t,n){let r=_3(e,t,n);return{distance:r,isBounded:r>=0}}var y3=class e{k;s;c=new Map;d=new Set;e;w=``;constructor(e,t,n){this.k=e,this.s=t,this.e=n}updateParent(e){this.w=e.w+this.s}addDocument(e){this.d.add(e)}removeDocument(e){return this.d.delete(e)}findAllWords(e,t,n,r){let i=[this];for(;i.length>0;){let a=i.pop();if(a.e){let{w:i,d:o}=a;if(n&&i!==t)continue;if(_4(e,i)!==null)if(r)if(Math.abs(t.length-i.length)<=r&&v3(t,i,r).isBounded)e[i]=[];else continue;else e[i]=[];if(_4(e,i)!=null&&o.size>0){let t=e[i];for(let e of o)t.includes(e)||t.push(e)}}a.c.size>0&&i.push(...a.c.values())}return e}insert(t,n){let r=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=r.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c){if(r=s,i+=l,i===a){s.e||=!0,s.addDocument(n);return}continue}let u=o.slice(0,l),d=o.slice(l),f=t.slice(i+l),p=new e(u[0],u,!1);if(r.c.set(u[0],p),p.updateParent(r),s.s=d,s.k=d[0],p.c.set(d[0],s),s.updateParent(p),f){let t=new e(f[0],f,!0);t.addDocument(n),p.c.set(f[0],t),t.updateParent(p)}else p.e=!0,p.addDocument(n);return}else{let a=new e(o,t.slice(i),!0);a.addDocument(n),r.c.set(o,a),a.updateParent(r);return}}r.e||=!0,r.addDocument(n)}_findLevenshtein(e,t,n,r,i){let a=[{node:this,index:t,tolerance:n}];for(;a.length>0;){let{node:t,index:n,tolerance:o}=a.pop();if(t.w.startsWith(e)){t.findAllWords(i,e,!1,0);continue}if(o<0)continue;if(t.e){let{w:n,d:a}=t;if(n&&(v3(e,n,r).isBounded&&(i[n]=[]),_4(i,n)!==void 0&&a.size>0)){let e=new Set(i[n]);for(let t of a)e.add(t);i[n]=Array.from(e)}}if(n>=e.length)continue;let s=e[n];if(t.c.has(s)){let e=t.c.get(s);a.push({node:e,index:n+1,tolerance:o})}a.push({node:t,index:n+1,tolerance:o-1});for(let[e,r]of t.c)a.push({node:r,index:n,tolerance:o-1}),e!==s&&a.push({node:r,index:n+1,tolerance:o-1})}}find(e){let{term:t,exact:n,tolerance:r}=e;if(r&&!n){let e={};return this._findLevenshtein(t,0,r,r,e),e}else{let e=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=e.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c)e=s,i+=l;else if(i+l===a)if(l===a-i){if(n)return{};{let e={};return s.findAllWords(e,t,n,r),e}}else return{};else return{}}else return{}}let o={};return e.findAllWords(o,t,n,r),o}}contains(e){let t=this,n=0,r=e.length;for(;n<r;){let i=e[n],a=t.c.get(i);if(a){let i=a.s,o=i.length,s=0;for(;s<o&&n+s<r&&i[s]===e[n+s];)s++;if(s<o)return!1;n+=o,t=a}else return!1}return!0}removeWord(e){if(!e)return!1;let t=this,n=e.length,r=[];for(let i=0;i<n;i++){let n=e[i];if(t.c.has(n)){let e=t.c.get(n);r.push({parent:t,character:n}),i+=e.s.length-1,t=e}else return!1}for(t.d.clear(),t.e=!1;r.length>0&&t.c.size===0&&!t.e&&t.d.size===0;){let{parent:e,character:n}=r.pop();e.c.delete(n),t=e}return!0}removeDocumentByWord(e,t,n=!0){if(!e)return!0;let r=this,i=e.length;for(let a=0;a<i;a++){let i=e[a];if(r.c.has(i)){let o=r.c.get(i);a+=o.s.length-1,r=o,n&&r.w!==e||r.removeDocument(t)}else return!1}return!0}static getCommonPrefix(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e.charCodeAt(r)===t.charCodeAt(r);)r++;return e.slice(0,r)}toJSON(){return{w:this.w,s:this.s,e:this.e,k:this.k,d:Array.from(this.d),c:Array.from(this.c?.entries())?.map(([e,t])=>[e,t.toJSON()])}}static fromJSON(t){let n=new e(t.k,t.s,t.e);return n.w=t.w,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([t,n])=>[t,e.fromJSON(n)])||[]),n}},b3=class e extends y3{constructor(){super(``,``,!1)}static fromJSON(t){let n=new e;return n.w=t.w,n.s=t.s,n.e=t.e,n.k=t.k,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([e,t])=>[e,y3.fromJSON(t)])||[]),n}toJSON(){return super.toJSON()}},x3=class e{point;docIDs;left;right;parent;constructor(e,t){this.point=e,this.docIDs=new Set(t),this.left=null,this.right=null,this.parent=null}toJSON(){return{point:this.point,docIDs:Array.from(this.docIDs),left:this.left?this.left.toJSON():null,right:this.right?this.right.toJSON():null}}static fromJSON(t,n=null){let r=new e(t.point,t.docIDs);return r.parent=n,t.left&&(r.left=e.fromJSON(t.left,r)),t.right&&(r.right=e.fromJSON(t.right,r)),r}},S3=class e{root;nodeMap;constructor(){this.root=null,this.nodeMap=new Map}getPointKey(e){return`${e.lon},${e.lat}`}insert(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);if(r){t.forEach(e=>r.docIDs.add(e));return}let i=new x3(e,t);if(this.nodeMap.set(n,i),this.root==null){this.root=i;return}let a=this.root,o=0;for(;;){if(o%2==0)if(e.lon<a.point.lon){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}else if(e.lat<a.point.lat){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}o++}}contains(e){let t=this.getPointKey(e);return this.nodeMap.has(t)}getDocIDsByCoordinates(e){let t=this.getPointKey(e),n=this.nodeMap.get(t);return n?Array.from(n.docIDs):null}removeDocByID(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);r&&(r.docIDs.delete(t),r.docIDs.size===0&&(this.nodeMap.delete(n),this.deleteNode(r)))}deleteNode(e){let t=e.parent,n=e.left?e.left:e.right;n&&(n.parent=t),t?t.left===e?t.left=n:t.right===e&&(t.right=n):(this.root=n,this.root&&(this.root.parent=null))}searchByRadius(t,n,r=!0,i=`asc`,a=!1){let o=a?e.vincentyDistance:e.haversineDistance,s=[{node:this.root,depth:0}],c=[];for(;s.length>0;){let{node:e,depth:i}=s.pop();if(e==null)continue;let a=o(t,e.point);(r?a<=n:a>n)&&c.push({point:e.point,docIDs:Array.from(e.docIDs)}),e.left!=null&&s.push({node:e.left,depth:i+1}),e.right!=null&&s.push({node:e.right,depth:i+1})}return i&&c.sort((e,n)=>{let r=o(t,e.point),a=o(t,n.point);return i.toLowerCase()===`asc`?r-a:a-r}),c}searchByPolygon(t,n=!0,r=null,i=!1){let a=[{node:this.root,depth:0}],o=[];for(;a.length>0;){let{node:r,depth:i}=a.pop();if(r==null)continue;r.left!=null&&a.push({node:r.left,depth:i+1}),r.right!=null&&a.push({node:r.right,depth:i+1});let s=e.isPointInPolygon(t,r.point);(s&&n||!s&&!n)&&o.push({point:r.point,docIDs:Array.from(r.docIDs)})}let s=e.calculatePolygonCentroid(t);if(r){let t=i?e.vincentyDistance:e.haversineDistance;o.sort((e,n)=>{let i=t(s,e.point),a=t(s,n.point);return r.toLowerCase()===`asc`?i-a:a-i})}return o}toJSON(){return{root:this.root?this.root.toJSON():null}}static fromJSON(t){let n=new e;return t.root&&(n.root=x3.fromJSON(t.root),n.buildNodeMap(n.root)),n}buildNodeMap(e){if(e==null)return;let t=this.getPointKey(e.point);this.nodeMap.set(t,e),e.left&&this.buildNodeMap(e.left),e.right&&this.buildNodeMap(e.right)}static calculatePolygonCentroid(e){let t=0,n=0,r=0,i=e.length;for(let a=0,o=i-1;a<i;o=a++){let i=e[a].lon,s=e[a].lat,c=e[o].lon,l=e[o].lat,u=i*l-c*s;t+=u,n+=(i+c)*u,r+=(s+l)*u}t/=2;let a=6*t;return n/=a,r/=a,{lon:n,lat:r}}static isPointInPolygon(e,t){let n=!1,r=t.lon,i=t.lat,a=e.length;for(let t=0,o=a-1;t<a;o=t++){let a=e[t].lon,s=e[t].lat,c=e[o].lon,l=e[o].lat;s>i!=l>i&&r<(c-a)*(i-s)/(l-s)+a&&(n=!n)}return n}static haversineDistance(e,t){let n=Math.PI/180,r=e.lat*n,i=t.lat*n,a=(t.lat-e.lat)*n,o=(t.lon-e.lon)*n,s=Math.sin(a/2)*Math.sin(a/2)+Math.cos(r)*Math.cos(i)*Math.sin(o/2)*Math.sin(o/2);return 6371e3*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))}static vincentyDistance(e,t){let n=6378137,r=1/298.257223563,i=(1-r)*n,a=Math.PI/180,o=e.lat*a,s=t.lat*a,c=(t.lon-e.lon)*a,l=Math.atan((1-r)*Math.tan(o)),u=Math.atan((1-r)*Math.tan(s)),d=Math.sin(l),f=Math.cos(l),p=Math.sin(u),m=Math.cos(u),h=c,g,_=1e3,v,y,b,x,S,C;do{let e=Math.sin(h),t=Math.cos(h);if(v=Math.sqrt(m*e*(m*e)+(f*p-d*m*t)*(f*p-d*m*t)),v===0)return 0;y=d*p+f*m*t,b=Math.atan2(v,y),x=f*m*e/v,S=1-x*x,C=y-2*d*p/S,isNaN(C)&&(C=0);let n=r/16*S*(4+r*(4-3*S));g=h,h=c+(1-n)*r*x*(b+n*v*(C+n*y*(-1+2*C*C)))}while(Math.abs(h-g)>1e-12&&--_>0);if(_===0)return NaN;let w=S*(n*n-i*i)/(i*i),T=1+w/16384*(4096+w*(-768+w*(320-175*w))),E=w/1024*(256+w*(-128+w*(74-47*w))),D=E*v*(C+E/4*(y*(-1+2*C*C)-E/6*C*(-3+4*v*v)*(-3+4*C*C)));return i*T*(b-D)}},C3=class e{true;false;constructor(){this.true=new Set,this.false=new Set}insert(e,t){t?this.true.add(e):this.false.add(e)}delete(e,t){t?this.true.delete(e):this.false.delete(e)}getSize(){return this.true.size+this.false.size}toJSON(){return{true:Array.from(this.true),false:Array.from(this.false)}}static fromJSON(t){let n=new e;return n.true=new Set(t.true),n.false=new Set(t.false),n}};function w3(e,t,n,r,i,{k:a,b:o,d:s}){return Math.log(1+(n-t+.5)/(t+.5))*(s+e*(a+1))/(e+a*(1-o+o*r/i))}var T3=class e{size;vectors=new Map;constructor(e){this.size=e}add(e,t){t instanceof Float32Array||(t=new Float32Array(t));let n=E3(t,this.size);this.vectors.set(e,[n,t])}remove(e){this.vectors.delete(e)}find(e,t,n){return e instanceof Float32Array||(e=new Float32Array(e)),D3(e,n,this.vectors,this.size,t)}toJSON(){let e=[];for(let[t,[n,r]]of this.vectors)e.push([t,[n,Array.from(r)]]);return{size:this.size,vectors:e}}static fromJSON(t){let n=t,r=new e(n.size);for(let[e,[t,i]]of n.vectors)r.vectors.set(e,[t,new Float32Array(i)]);return r}};function E3(e,t){let n=0;for(let r=0;r<t;r++)n+=e[r]*e[r];return Math.sqrt(n)}function D3(e,t,n,r,i){let a=E3(e,r),o=[],s=t||n.keys();for(let t of s){let s=n.get(t);if(!s)continue;let c=s[0],l=s[1],u=0;for(let t=0;t<r;t++)u+=e[t]*l[t];let d=u/(a*c);d>=i&&o.push([t,d])}return o}function O3(e,t,n,r,i){let a=q4(e.sharedInternalDocumentStore,n);e.avgFieldLength[t]=((e.avgFieldLength[t]??0)*(i-1)+r.length)/i,e.fieldLengths[t][a]=r.length,e.frequencies[t][a]={}}function k3(e,t,n,r,i){let a=0;for(let e of r)e===i&&a++;let o=q4(e.sharedInternalDocumentStore,n),s=a/r.length;e.frequencies[t][o][i]=s,i in e.tokenOccurrences[t]||(e.tokenOccurrences[t][i]=0),e.tokenOccurrences[t][i]=(e.tokenOccurrences[t][i]??0)+1}function A3(e,t,n,r){let i=q4(e.sharedInternalDocumentStore,n);r>1?e.avgFieldLength[t]=(e.avgFieldLength[t]*r-e.fieldLengths[t][i])/(r-1):e.avgFieldLength[t]=void 0,e.fieldLengths[t][i]=void 0,e.frequencies[t][i]=void 0}function j3(e,t,n){e.tokenOccurrences[t][n]--}function M3(e,t,n,r,i=``){r||={sharedInternalDocumentStore:t,indexes:{},vectorIndexes:{},searchableProperties:[],searchablePropertiesWithTypes:{},frequencies:{},tokenOccurrences:{},avgFieldLength:{},fieldLengths:{}};for(let[a,o]of Object.entries(n)){let n=`${i}${i?`.`:``}${a}`;if(typeof o==`object`&&!Array.isArray(o)){M3(e,t,o,r,n);continue}if(B4(o))r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o,r.vectorIndexes[n]={type:`Vector`,node:new T3(U4(o)),isArray:!1};else{let e=/\[/.test(o);switch(o){case`boolean`:case`boolean[]`:r.indexes[n]={type:`Bool`,node:new C3,isArray:e};break;case`number`:case`number[]`:r.indexes[n]={type:`AVL`,node:new h3(0,[]),isArray:e};break;case`string`:case`string[]`:r.indexes[n]={type:`Radix`,node:new b3,isArray:e},r.avgFieldLength[n]=0,r.frequencies[n]={},r.tokenOccurrences[n]={},r.fieldLengths[n]={};break;case`enum`:case`enum[]`:r.indexes[n]={type:`Flat`,node:new g3,isArray:e};break;case`geopoint`:r.indexes[n]={type:`BKD`,node:new S3,isArray:e};break;default:throw N4(`INVALID_SCHEMA_TYPE`,Array.isArray(o)?`array`:o,n)}r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o}}return r}function N3(e,t,n,r,i,a,o,s){return c=>{let{type:l,node:u}=t.indexes[n];switch(l){case`Bool`:u[c?`true`:`false`].add(r);break;case`AVL`:{let e=s?.avlRebalanceThreshold??1;u.insert(c,r,e);break}case`Radix`:{let s=a.tokenize(c,i,n,!1);e.insertDocumentScoreParameters(t,n,r,s,o);for(let i of s)e.insertTokenScoreParameters(t,n,r,s,i),u.insert(i,r);break}case`Flat`:u.insert(c,r);break;case`BKD`:u.insert(c,[r]);break}}}function P3(e,t,n,r,i,a,o,s,c,l,u){if(B4(o))return F3(t,n,a,r,i);let d=N3(e,t,n,i,s,c,l,u);if(!V4(o))return d(a);let f=a,p=f.length;for(let e=0;e<p;e++)d(f[e])}function F3(e,t,n,r,i){e.vectorIndexes[t].node.add(i,n)}function I3(e,t,n,r,i,a,o,s,c,l){if(B4(o))return t.vectorIndexes[n].node.remove(i),!0;let{type:u,node:d}=t.indexes[n];switch(u){case`AVL`:return d.removeDocument(a,i),!0;case`Bool`:return d[a?`true`:`false`].delete(i),!0;case`Radix`:{let o=c.tokenize(a,s,n);e.removeDocumentScoreParameters(t,n,r,l);for(let r of o)e.removeTokenScoreParameters(t,n,r),d.removeDocumentByWord(r,i);return!0}case`Flat`:return d.removeDocument(i,a),!0;case`BKD`:return d.removeDocByID(a,i),!1}}function L3(e,t,n,r,i,a,o,s,c,l){if(!V4(o))return I3(e,t,n,r,i,a,o,s,c,l);let u=H4(o),d=a,f=d.length;for(let a=0;a<f;a++)I3(e,t,n,r,i,d[a],u,s,c,l);return!0}function R3(e,t,n,r,i,a,o,s,c,l){let u=Array.from(r),d=e.avgFieldLength[t],f=e.fieldLengths[t],p=e.tokenOccurrences[t],m=e.frequencies[t],h=typeof p[n]==`number`?p[n]??0:0,g=u.length;for(let e=0;e<g;e++){let r=u[e];if(c&&!c.has(r))continue;l.has(r)||l.set(r,new Map);let p=l.get(r);p.set(t,(p.get(t)||0)+1);let g=w3(m?.[r]?.[n]??0,h,i,f[r],d,a);o.has(r)?o.set(r,o.get(r)+g*s):o.set(r,g*s)}}function z3(e,t,n,r,i,a,o,s,c,l,u,d=0){let f=n.tokenize(t,r),p=f.length||1,m=new Map,h=new Map,g=new Map;for(let n of i){if(!(n in e.indexes))continue;let r=e.indexes[n],{type:i}=r;if(i!==`Radix`)throw N4(`WRONG_SEARCH_PROPERTY_TYPE`,n);let d=s[n]??1;if(d<=0)throw N4(`INVALID_BOOST_VALUE`,d);f.length===0&&!t&&f.push(``);let p=f.length;for(let t=0;t<p;t++){let i=f[t],s=r.node.find({term:i,exact:a,tolerance:o}),p=Object.keys(s);p.length>0&&h.set(i,!0);let _=p.length;for(let t=0;t<_;t++){let r=p[t],i=s[r];R3(e,n,r,i,l,c,g,d,u,m)}}}let _=Array.from(g.entries()).map(([e,t])=>[e,t]).sort((e,t)=>t[1]-e[1]);if(_.length===0)return[];if(d===1)return _;if(d===0){if(p===1)return _;for(let e of f)if(!h.get(e))return[];return _.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1})}let v=_.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1});if(v.length>0){let e=_.filter(([e])=>!v.some(([t])=>t===e)),t=Math.ceil(e.length*d);return[...v,...e.slice(0,t)]}return _}function B3(e,t,n,r){if(`and`in n&&n.and&&Array.isArray(n.and)){let i=n.and;return i.length===0?new Set:D4(...i.map(n=>B3(e,t,n,r)))}if(`or`in n&&n.or&&Array.isArray(n.or)){let i=n.or;return i.length===0?new Set:i.map(n=>B3(e,t,n,r)).reduce((e,t)=>k4(e,t),new Set)}if(`not`in n&&n.not){let i=n.not,a=new Set,o=e.sharedInternalDocumentStore;for(let e=1;e<=o.internalIdToId.length;e++)a.add(e);return A4(a,B3(e,t,i,r))}let i=Object.keys(n),a=i.reduce((e,t)=>({[t]:new Set,...e}),{});for(let o of i){let i=n[o];if(e.indexes[o]===void 0)throw N4(`UNKNOWN_FILTER_PROPERTY`,o);let{node:s,type:c,isArray:l}=e.indexes[o];if(c===`Bool`){let e=s,t=i?e.true:e.false;a[o]=k4(a[o],t);continue}if(c===`BKD`){let e;if(`radius`in i)e=`radius`;else if(`polygon`in i)e=`polygon`;else throw Error(`Invalid operation ${i}`);if(e===`radius`){let{value:t,coordinates:n,unit:r=`m`,inside:c=!0,highPrecision:l=!1}=i[e],u=C4(t,r),d=s.searchByRadius(n,u,c,void 0,l);a[o]=K3(a[o],d)}else{let{coordinates:t,inside:n=!0,highPrecision:r=!1}=i[e],c=s.searchByPolygon(t,n,void 0,r);a[o]=K3(a[o],c)}continue}if(c===`Radix`&&(typeof i==`string`||Array.isArray(i))){for(let e of[i].flat()){let n=t.tokenize(e,r,o);for(let e of n){let t=s.find({term:e,exact:!0});a[o]=X3(a[o],t)}}continue}let u=Object.keys(i);if(u.length>1)throw N4(`INVALID_FILTER_OPERATION`,u.length);if(c===`Flat`){let e=new Set(l?s.filterArr(i):s.filter(i));a[o]=k4(a[o],e);continue}if(c===`AVL`){let e=u[0],t=i[e],n;switch(e){case`gt`:n=s.greaterThan(t,!1);break;case`gte`:n=s.greaterThan(t,!0);break;case`lt`:n=s.lessThan(t,!1);break;case`lte`:n=s.lessThan(t,!0);break;case`eq`:n=s.find(t)??new Set;break;case`between`:{let[e,r]=t;n=s.rangeSearch(e,r);break}default:throw N4(`INVALID_FILTER_OPERATION`,e)}a[o]=k4(a[o],n)}}return D4(...Object.values(a))}function V3(e){return e.searchableProperties}function H3(e){return e.searchablePropertiesWithTypes}function U3(e,t){let{indexes:n,vectorIndexes:r,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}=t,u={},d={};for(let e of Object.keys(n)){let{node:t,type:r,isArray:i}=n[e];switch(r){case`Radix`:u[e]={type:`Radix`,node:b3.fromJSON(t),isArray:i};break;case`Flat`:u[e]={type:`Flat`,node:g3.fromJSON(t),isArray:i};break;case`AVL`:u[e]={type:`AVL`,node:h3.fromJSON(t),isArray:i};break;case`BKD`:u[e]={type:`BKD`,node:S3.fromJSON(t),isArray:i};break;case`Bool`:u[e]={type:`Bool`,node:C3.fromJSON(t),isArray:i};break;default:u[e]=n[e]}}for(let e of Object.keys(r))d[e]={type:`Vector`,isArray:!1,node:T3.fromJSON(r[e])};return{sharedInternalDocumentStore:e,indexes:u,vectorIndexes:d,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}}function W3(e){let{indexes:t,vectorIndexes:n,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}=e,l={};for(let e of Object.keys(n))l[e]=n[e].node.toJSON();let u={};for(let e of Object.keys(t)){let{type:n,node:r,isArray:i}=t[e];n===`Flat`||n===`Radix`||n===`AVL`||n===`BKD`||n===`Bool`?u[e]={type:n,node:r.toJSON(),isArray:i}:(u[e]=t[e],u[e].node=u[e].node.toJSON())}return{indexes:u,vectorIndexes:l,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}}function G3(){return{create:M3,insert:P3,remove:L3,insertDocumentScoreParameters:O3,insertTokenScoreParameters:k3,removeDocumentScoreParameters:A3,removeTokenScoreParameters:j3,calculateResultScores:R3,search:z3,searchByWhereClause:B3,getSearchableProperties:V3,getSearchablePropertiesWithTypes:H3,load:U3,save:W3}}function K3(e,t){e||=new Set;let n=t.length;for(let r=0;r<n;r++){let n=t[r].docIDs,i=n.length;for(let t=0;t<i;t++)e.add(n[t])}return e}function q3(e,t,n=!1){let r=n?S3.vincentyDistance:S3.haversineDistance,i=[],a=[];for(let{point:n}of e)a.push(r(t,n));let o=Math.max(...a),s=0;for(let{docIDs:t}of e){let e=o-a[s]+1;for(let n of t)i.push([n,e]);s++}return i.sort((e,t)=>t[1]-e[1]),i}function J3(e,t){let n=Object.keys(e);if(n.length!==1)return{isGeoOnly:!1};let r=n[0],i=e[r];if(t.indexes[r]===void 0)return{isGeoOnly:!1};let{type:a}=t.indexes[r];return a===`BKD`&&i&&(`radius`in i||`polygon`in i)?{isGeoOnly:!0,geoProperty:r,geoOperation:i}:{isGeoOnly:!1}}function Y3(e,t){let n=e,r=J3(t,n);if(!r.isGeoOnly||!r.geoProperty||!r.geoOperation)return null;let{node:i}=n.indexes[r.geoProperty],a=r.geoOperation,o=i,s;if(`radius`in a){let{value:e,coordinates:t,unit:n=`m`,inside:r=!0,highPrecision:i=!1}=a.radius,c=t,l=C4(e,n);return s=o.searchByRadius(c,l,r,`asc`,i),q3(s,c,i)}else if(`polygon`in a){let{coordinates:e,inside:t=!0,highPrecision:n=!1}=a.polygon;s=o.searchByPolygon(e,t,`asc`,n);let r=S3.calculatePolygonCentroid(e);return q3(s,r,n)}return null}function X3(e,t){e||=new Set;let n=Object.keys(t),r=n.length;for(let i=0;i<r;i++){let r=t[n[i]],a=r.length;for(let t=0;t<a;t++)e.add(r[t])}return e}function Z3(e,t,n,r,i){let a={language:e.tokenizer.language,sharedInternalDocumentStore:t,enabled:!0,isSorted:!0,sortableProperties:[],sortablePropertiesWithTypes:{},sorts:{}};for(let[o,s]of Object.entries(n)){let n=`${i}${i?`.`:``}${o}`;if(!r.includes(n)){if(typeof s==`object`&&!Array.isArray(s)){let i=Z3(e,t,s,r,n);l4(a.sortableProperties,i.sortableProperties),a.sorts={...a.sorts,...i.sorts},a.sortablePropertiesWithTypes={...a.sortablePropertiesWithTypes,...i.sortablePropertiesWithTypes};continue}if(!B4(s))switch(s){case`boolean`:case`number`:case`string`:a.sortableProperties.push(n),a.sortablePropertiesWithTypes[n]=s,a.sorts[n]={docs:new Map,orderedDocsToRemove:new Map,orderedDocs:[],type:s};break;case`geopoint`:case`enum`:continue;case`enum[]`:case`boolean[]`:case`number[]`:case`string[]`:continue;default:throw N4(`INVALID_SORT_SCHEMA_TYPE`,Array.isArray(s)?`array`:s,n)}}}return a}function Q3(e,t,n,r){return r?.enabled===!1?{disabled:!0}:Z3(e,t,n,(r||{}).unsortableProperties||[],``)}function $3(e,t,n,r){if(!e.enabled)return;e.isSorted=!1;let i=q4(e.sharedInternalDocumentStore,n),a=e.sorts[t];a.orderedDocsToRemove.has(i)&&o6(e,t),a.docs.set(i,a.orderedDocs.length),a.orderedDocs.push([i,r])}function e6(e){if(e.isSorted||!e.enabled)return;let t=Object.keys(e.sorts);for(let n of t)i6(e,n);e.isSorted=!0}function t6(e,t,n){return t[1].localeCompare(n[1],n4(e))}function n6(e,t){return e[1]-t[1]}function r6(e,t){return t[1]?-1:1}function i6(e,t){let n=e.sorts[t],r;switch(n.type){case`string`:r=t6.bind(null,e.language);break;case`number`:r=n6.bind(null);break;case`boolean`:r=r6.bind(null);break}n.orderedDocs.sort(r);let i=n.orderedDocs.length;for(let e=0;e<i;e++){let t=n.orderedDocs[e][0];n.docs.set(t,e)}}function a6(e){let t=Object.keys(e.sorts);for(let n of t)o6(e,n)}function o6(e,t){let n=e.sorts[t];n.orderedDocsToRemove.size&&(n.orderedDocs=n.orderedDocs.filter(e=>!n.orderedDocsToRemove.has(e[0])),n.orderedDocsToRemove.clear())}function s6(e,t,n){if(!e.enabled)return;let r=e.sorts[t],i=q4(e.sharedInternalDocumentStore,n);r.docs.get(i)&&(r.docs.delete(i),r.orderedDocsToRemove.set(i,!0))}function c6(e,t,n){if(!e.enabled)throw N4(`SORT_DISABLED`);let r=n.property,i=n.order===`DESC`,a=e.sorts[r];if(!a)throw N4(`UNABLE_TO_SORT_ON_UNKNOWN_FIELD`,r,e.sortableProperties.join(`, `));return o6(e,r),e6(e),t.sort((t,n)=>{let r=a.docs.get(q4(e.sharedInternalDocumentStore,t[0])),o=a.docs.get(q4(e.sharedInternalDocumentStore,n[0])),s=r!==void 0,c=o!==void 0;return!s&&!c?0:s?c?i?o-r:r-o:-1:1}),t}function l6(e){return e.enabled?e.sortableProperties:[]}function u6(e){return e.enabled?e.sortablePropertiesWithTypes:{}}function d6(e,t){let n=t;if(!n.enabled)return{enabled:!1};let r=Object.keys(n.sorts).reduce((e,t)=>{let{docs:r,orderedDocs:i,type:a}=n.sorts[t];return e[t]={docs:new Map(Object.entries(r).map(([e,t])=>[+e,t])),orderedDocsToRemove:new Map,orderedDocs:i,type:a},e},{});return{sharedInternalDocumentStore:e,language:n.language,sortableProperties:n.sortableProperties,sortablePropertiesWithTypes:n.sortablePropertiesWithTypes,sorts:r,enabled:!0,isSorted:n.isSorted}}function f6(e){if(!e.enabled)return{enabled:!1};a6(e),e6(e);let t=Object.keys(e.sorts).reduce((t,n)=>{let{docs:r,orderedDocs:i,type:a}=e.sorts[n];return t[n]={docs:Object.fromEntries(r.entries()),orderedDocs:i,type:a},t},{});return{language:e.language,sortableProperties:e.sortableProperties,sortablePropertiesWithTypes:e.sortablePropertiesWithTypes,sorts:t,enabled:e.enabled,isSorted:e.isSorted}}function p6(){return{create:Q3,insert:$3,remove:s6,save:f6,load:d6,sortBy:c6,getSortableProperties:l6,getSortablePropertiesWithTypes:u6}}const m6=[65,65,65,65,65,65,65,67,69,69,69,69,73,73,73,73,69,78,79,79,79,79,79,null,79,85,85,85,85,89,80,115,97,97,97,97,97,97,97,99,101,101,101,101,105,105,105,105,101,110,111,111,111,111,111,null,111,117,117,117,117,121,112,121,65,97,65,97,65,97,67,99,67,99,67,99,67,99,68,100,68,100,69,101,69,101,69,101,69,101,69,101,71,103,71,103,71,103,71,103,72,104,72,104,73,105,73,105,73,105,73,105,73,105,73,105,74,106,75,107,107,76,108,76,108,76,108,76,108,76,108,78,110,78,110,78,110,110,78,110,79,111,79,111,79,111,79,111,82,114,82,114,82,114,83,115,83,115,83,115,83,115,84,116,84,116,84,116,85,117,85,117,85,117,85,117,85,117,85,117,87,119,89,121,89,90,122,90,122,90,122,115];function h6(e){return e<192||e>383?e:m6[e-192]||e}function g6(e){let t=[];for(let n=0;n<e.length;n++)t[n]=h6(e.charCodeAt(n));return String.fromCharCode(...t)}const _6={ational:`ate`,tional:`tion`,enci:`ence`,anci:`ance`,izer:`ize`,bli:`ble`,alli:`al`,entli:`ent`,eli:`e`,ousli:`ous`,ization:`ize`,ation:`ate`,ator:`ate`,alism:`al`,iveness:`ive`,fulness:`ful`,ousness:`ous`,aliti:`al`,iviti:`ive`,biliti:`ble`,logi:`log`},v6={icate:`ic`,ative:``,alize:`al`,iciti:`ic`,ical:`ic`,ful:``,ness:``},y6=`[aeiouy]`,b6=`[^aeiou][^aeiouy]*`;y6+``;const x6=`^(`+b6+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*`;``+b6;const S6=`^(`+b6+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*[aeiouy][aeiou]*[^aeiou][^aeiouy]*`,C6=`^(`+b6+`)?[aeiouy]`;function w6(e){let t,n,r,i,a,o;if(e.length<3)return e;let s=e.substring(0,1);if(s==`y`&&(e=s.toUpperCase()+e.substring(1)),r=/^(.+?)(ss|i)es$/,i=/^(.+?)([^s])s$/,r.test(e)?e=e.replace(r,`$1$2`):i.test(e)&&(e=e.replace(i,`$1$2`)),r=/^(.+?)eed$/,i=/^(.+?)(ed|ing)$/,r.test(e)){let t=r.exec(e);r=new RegExp(x6),r.test(t[1])&&(r=/.$/,e=e.replace(r,``))}else i.test(e)&&(t=i.exec(e)[1],i=new RegExp(C6),i.test(t)&&(e=t,i=/(at|bl|iz)$/,a=RegExp(`([^aeiouylsz])\\1$`),o=RegExp(`^`+b6+y6+`[^aeiouwxy]$`),i.test(e)?e+=`e`:a.test(e)?(r=/.$/,e=e.replace(r,``)):o.test(e)&&(e+=`e`)));if(r=/^(.+?)y$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(C6),t&&r.test(t)&&(e=t+`i`)),r=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(x6),t&&r.test(t)&&(e=t+_6[n])}if(r=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(x6),t&&r.test(t)&&(e=t+v6[n])}if(r=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,i=/^(.+?)(s|t)(ion)$/,r.test(e))t=r.exec(e)?.[1],r=new RegExp(S6),t&&r.test(t)&&(e=t);else if(i.test(e)){let n=i.exec(e);t=n?.[1]??``+n?.[2]??``,i=new RegExp(S6),i.test(t)&&(e=t)}return r=/^(.+?)e$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(S6),i=RegExp(`^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$`),a=RegExp(`^`+b6+y6+`[^aeiouwxy]$`),t&&(r.test(t)||i.test(t)&&!a.test(t))&&(e=t)),r=/ll$/,i=new RegExp(S6),r.test(e)&&i.test(e)&&(r=/.$/,e=e.replace(r,``)),s==`y`&&(e=s.toLowerCase()+e.substring(1)),e}function T6(e,t,n=!0){let r=`${this.language}:${e}:${t}`;return n&&this.normalizationCache.has(r)?this.normalizationCache.get(r):this.stopWords?.includes(t)?(n&&this.normalizationCache.set(r,``),``):(this.stemmer&&!this.stemmerSkipProperties.has(e)&&(t=this.stemmer(t)),t=g6(t),n&&this.normalizationCache.set(r,t),t)}function E6(e){for(;e[e.length-1]===``;)e.pop();for(;e[0]===``;)e.shift();return e}function D6(e,t,n,r=!0){if(t&&t!==this.language)throw N4(`LANGUAGE_NOT_SUPPORTED`,t);if(typeof e!=`string`)return[e];let i=this.normalizeToken.bind(this,n??``),a;if(n&&this.tokenizeSkipProperties.has(n))a=[i(e,r)];else{let t=e4[this.language];a=e.toLowerCase().split(t).map(e=>i(e,r)).filter(Boolean)}let o=E6(a);return this.allowDuplicates?o:Array.from(new Set(o))}function O6(e={}){if(!e.language)e.language=`english`;else if(!t4.includes(e.language))throw N4(`LANGUAGE_NOT_SUPPORTED`,e.language);let t;if(e.stemming||e.stemmer&&!(`stemming`in e))if(e.stemmer){if(typeof e.stemmer!=`function`)throw N4(`INVALID_STEMMER_FUNCTION_TYPE`);t=e.stemmer}else if(e.language===`english`)t=w6;else throw N4(`MISSING_STEMMER`,e.language);let n;if(e.stopWords!==!1){if(n=[],Array.isArray(e.stopWords))n=e.stopWords;else if(typeof e.stopWords==`function`)n=e.stopWords(n);else if(e.stopWords)throw N4(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);if(!Array.isArray(n))throw N4(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);for(let e of n)if(typeof e!=`string`)throw N4(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`)}let r={tokenize:D6,language:e.language,stemmer:t,stemmerSkipProperties:new Set(e.stemmerSkipProperties?[e.stemmerSkipProperties].flat():[]),tokenizeSkipProperties:new Set(e.tokenizeSkipProperties?[e.tokenizeSkipProperties].flat():[]),stopWords:n,allowDuplicates:!!e.allowDuplicates,normalizeToken:T6,normalizationCache:new Map};return r.tokenize=D6.bind(r),r.normalizeToken=T6,r}function k6(e){return{sharedInternalDocumentStore:e,rules:new Map}}function A6(e,t){if(e.rules.has(t.id))throw Error(`PINNING_RULE_ALREADY_EXISTS: A pinning rule with id "${t.id}" already exists. Use updateRule to modify it.`);e.rules.set(t.id,t)}function j6(e,t){if(!e.rules.has(t.id))throw Error(`PINNING_RULE_NOT_FOUND: Cannot update pinning rule with id "${t.id}" because it does not exist. Use addRule to create it.`);e.rules.set(t.id,t)}function M6(e,t){return e.rules.delete(t)}function N6(e,t){return e.rules.get(t)}function P6(e){return Array.from(e.rules.values())}function F6(e,t){let n=e.toLowerCase().trim(),r=t.pattern.toLowerCase().trim();switch(t.anchoring){case`is`:return n===r;case`starts_with`:return n.startsWith(r);case`contains`:return n.includes(r);default:return!1}}function I6(e,t){return e?t.conditions.every(t=>F6(e,t)):!1}function L6(e,t){if(!t)return[];let n=[];for(let r of e.rules.values())I6(t,r)&&n.push(r);return n}function R6(e,t){return{sharedInternalDocumentStore:e,rules:new Map(t?.rules??[])}}function z6(e){return{rules:Array.from(e.rules.entries())}}function B6(){return{create:k6,addRule:A6,updateRule:j6,removeRule:M6,getRule:N6,getAllRules:P6,getMatchingRules:L6,load:R6,save:z6}}function V6(e){let t={formatElapsedTime:P4,getDocumentIndexId:F4,getDocumentProperties:b4,validateSchema:I4};for(let n of c3){let r=n;if(e[r]){if(typeof e[r]!=`function`)throw N4(`COMPONENT_MUST_BE_FUNCTION`,r)}else e[r]=t[r]}for(let t of Object.keys(e))if(!s3.includes(t)&&!c3.includes(t))throw N4(`UNSUPPORTED_COMPONENT`,t)}function H6({schema:e,sort:t,language:n,components:r,id:i,plugins:a}){r||={};for(let t of a??[]){if(!(`getComponents`in t)||typeof t.getComponents!=`function`)continue;let n=t.getComponents(e),i=Object.keys(n);for(let e of i)if(r[e])throw N4(`PLUGIN_COMPONENT_CONFLICT`,e,t.name);r={...r,...n}}i||=g4();let o=r.tokenizer,s=r.index,c=r.documentsStore,l=r.sorter,u=r.pinning;if(o=o?o.tokenize?o:O6(o):O6({language:n??`english`}),r.tokenizer&&n)throw N4(`NO_LANGUAGE_WITH_CUSTOM_TOKENIZER`);let d=W4();s||=G3(),l||=p6(),c||=i3(),u||=B6(),V6(r);let{getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,formatElapsedTime:h}=r,g={data:{},caches:{},schema:e,tokenizer:o,index:s,sorter:l,documentsStore:c,pinning:u,internalDocumentIDStore:d,getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,beforeInsert:[],afterInsert:[],beforeRemove:[],afterRemove:[],beforeUpdate:[],afterUpdate:[],beforeUpsert:[],afterUpsert:[],beforeSearch:[],afterSearch:[],beforeInsertMultiple:[],afterInsertMultiple:[],beforeRemoveMultiple:[],afterRemoveMultiple:[],beforeUpdateMultiple:[],afterUpdateMultiple:[],beforeUpsertMultiple:[],afterUpsertMultiple:[],afterCreate:[],formatElapsedTime:h,id:i,plugins:a,version:U6()};g.data={index:g.index.create(g,d,e),docs:g.documentsStore.create(g,d),sorting:g.sorter.create(g,d,e,t),pinning:g.pinning.create(d)};for(let e of a3)g[e]=(g[e]??[]).concat(o3(g,e));let _=g.afterCreate;return _&&p3(_,g),g}function U6(){return`{{VERSION}}`}function W6(e){return e.documentsStore.count(e.data.docs)}function G6(e,t,n,r,i){let a=e.validateSchema(t,e.schema);if(a)throw N4(`SCHEMA_VALIDATION_FAILURE`,a);return T4(e.beforeInsert)||T4(e.afterInsert)||T4(e.index.beforeInsert)||T4(e.index.insert)||T4(e.index.afterInsert)?J6(e,t,n,r,i):Y6(e,t,n,r,i)}const K6=new Set([`enum`,`enum[]`]),q6=new Set([`string`,`number`]);async function J6(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw N4(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=q4(e.internalDocumentIDStore,s);if(r||await l3(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw N4(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];X6(n,r,e,t)}return await Z6(e,s,u,f,l,n,t,i),r||await l3(e.afterInsert,e,s,t),s}function Y6(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw N4(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=q4(e.internalDocumentIDStore,s);if(r||l3(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw N4(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];X6(n,r,e,t)}return Q6(e,s,u,f,l,n,t,i),r||l3(e.afterInsert,e,s,t),s}function X6(e,t,n,r){if(!(z4(t)&&typeof r==`object`&&typeof r.lon==`number`&&typeof r.lat==`number`)&&!(B4(t)&&Array.isArray(r))&&!(V4(t)&&Array.isArray(r))&&!(K6.has(t)&&q6.has(e))&&e!==t)throw N4(`INVALID_DOCUMENT_PROPERTY`,n,t,e)}async function Z6(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o];await e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i);let l=e.internalDocumentIDStore.idToInternalId.get(t);await e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),await e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function Q6(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o],l=q4(e.internalDocumentIDStore,t);e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i),e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function $6(e,t,n,r,i,a){return T4(e.afterInsertMultiple)||T4(e.beforeInsertMultiple)||T4(e.index.beforeInsert)||T4(e.index.insert)||T4(e.index.afterInsert)?e8(e,t,n,r,i,a):t8(e,t,n,r,i,a)}async function e8(e,t,n=1e3,r,i,a=0){let o=[],s=async a=>{let s=Math.min(a+n,t.length),c=t.slice(a,s);for(let t of c){let n=await G6(e,t,r,i,{avlRebalanceThreshold:c.length});o.push(n)}return s};return await(async()=>{let e=0;for(;e<t.length;){let t=Date.now();if(e=await s(e),a>0){let e=a-(Date.now()-t);e>0&&j4(e)}}})(),i||await u3(e.afterInsertMultiple,e,t),o}function t8(e,t,n=1e3,r,i,a=0){let o=[],s=0;function c(){let a=t.slice(s*n,(s+1)*n);if(a.length===0)return!1;for(let t of a){let n=G6(e,t,r,i,{avlRebalanceThreshold:a.length});o.push(n)}return s++,!0}function l(){let e=Date.now();for(;c();)if(a>0){let t=Date.now()-e;if(t>=a){let e=a-t%a;e>0&&j4(e)}}}return l(),i||u3(e.afterInsertMultiple,e,t),o}function n8(e,t,n,r){return T4(e.index.beforeRemove)||T4(e.index.remove)||T4(e.index.afterRemove)?r8(e,t,n,r):i8(e,t,n,r)}async function r8(e,t,n,r){let i=!0,{index:a,docs:o}=e.data,s=e.documentsStore.get(o,t);if(!s)return!1;let c=q4(e.internalDocumentIDStore,t),l=J4(e.internalDocumentIDStore,c),u=e.documentsStore.count(o);r||await l3(e.beforeRemove,e,l);let d=e.index.getSearchableProperties(a),f=e.index.getSearchablePropertiesWithTypes(a),p=e.getDocumentProperties(s,d);for(let r of d){let a=p[r];if(a===void 0)continue;let o=f[r];await e.index.beforeRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u),await e.index.remove(e.index,e.data.index,r,t,c,a,o,n,e.tokenizer,u)||(i=!1),await e.index.afterRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u)}let m=await e.sorter.getSortableProperties(e.data.sorting),h=await e.getDocumentProperties(s,m);for(let n of m)h[n]!==void 0&&e.sorter.remove(e.data.sorting,n,t);return r||await l3(e.afterRemove,e,l),e.documentsStore.remove(e.data.docs,t,c),i}function i8(e,t,n,r){let i=!0,{index:a,docs:o}=e.data,s=e.documentsStore.get(o,t);if(!s)return!1;let c=q4(e.internalDocumentIDStore,t),l=J4(e.internalDocumentIDStore,c),u=e.documentsStore.count(o);r||l3(e.beforeRemove,e,l);let d=e.index.getSearchableProperties(a),f=e.index.getSearchablePropertiesWithTypes(a),p=e.getDocumentProperties(s,d);for(let r of d){let a=p[r];if(a===void 0)continue;let o=f[r];e.index.beforeRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u),e.index.remove(e.index,e.data.index,r,t,c,a,o,n,e.tokenizer,u)||(i=!1),e.index.afterRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u)}let m=e.sorter.getSortableProperties(e.data.sorting),h=e.getDocumentProperties(s,m);for(let n of m)h[n]!==void 0&&e.sorter.remove(e.data.sorting,n,t);return r||l3(e.afterRemove,e,l),e.documentsStore.remove(e.data.docs,t,c),i}function a8(e,t,n,r,i){return T4(e.index.beforeRemove)||T4(e.index.remove)||T4(e.index.afterRemove)||T4(e.beforeRemoveMultiple)||T4(e.afterRemoveMultiple)?o8(e,t,n,r,i):s8(e,t,n,r,i)}async function o8(e,t,n,r,i){let a=0;n||=1e3;let o=i?[]:t.map(t=>J4(e.internalDocumentIDStore,q4(e.internalDocumentIDStore,t)));return i||await u3(e.beforeRemoveMultiple,e,o),await new Promise((o,s)=>{let c=0;async function l(){let u=t.slice(c*n,++c*n);if(!u.length)return o();for(let t of u)try{await n8(e,t,r,i)&&a++}catch(e){s(e)}setTimeout(l,0)}setTimeout(l,0)}),i||await u3(e.afterRemoveMultiple,e,o),a}function s8(e,t,n,r,i){let a=0;n||=1e3;let o=i?[]:t.map(t=>J4(e.internalDocumentIDStore,q4(e.internalDocumentIDStore,t)));i||u3(e.beforeRemoveMultiple,e,o);let s=0;function c(){let o=t.slice(s*n,++s*n);if(o.length){for(let t of o)n8(e,t,r,i)&&a++;setTimeout(c,0)}}return c(),i||u3(e.afterRemoveMultiple,e,o),a}function c8(e,t){return e[1]-t[1]}function l8(e,t){return t[1]-e[1]}function u8(e=`desc`){return e.toLowerCase()===`asc`?c8:l8}function d8(e,t,n){let r={},i=t.map(([e])=>e),a=e.documentsStore.getMultiple(e.data.docs,i),o=Object.keys(n),s=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e of o){let t;if(s[e]===`number`){let{ranges:r}=n[e],i=r.length,a=Array.from({length:i});for(let e=0;e<i;e++){let t=r[e];a[e]=[`${t.from}-${t.to}`,0]}t=Object.fromEntries(a)}r[e]={count:0,values:t??{}}}let c=a.length;for(let e=0;e<c;e++){let t=a[e];for(let e of o){let i=e.includes(`.`)?x4(t,e):t[e],a=s[e],o=r[e].values;switch(a){case`number`:{let t=n[e].ranges;f8(t,o)(i);break}case`number[]`:{let t=new Set,r=n[e].ranges,a=f8(r,o,t);for(let e of i)a(e);break}case`boolean`:case`enum`:case`string`:p8(o,a)(i);break;case`boolean[]`:case`enum[]`:case`string[]`:{let e=p8(o,a===`boolean[]`?`boolean`:`string`,new Set);for(let t of i)e(t);break}default:throw N4(`FACET_NOT_SUPPORTED`,a)}}}for(let e of o){let t=r[e];if(t.count=Object.keys(t.values).length,s[e]===`string`){let r=n[e],i=u8(r.sort);t.values=Object.fromEntries(Object.entries(t.values).sort(i).slice(r.offset??0,r.limit??10))}}return r}function f8(e,t,n){return r=>{for(let i of e){let e=`${i.from}-${i.to}`;n?.has(e)||r>=i.from&&r<=i.to&&(t[e]===void 0?t[e]=1:(t[e]++,n?.add(e)))}}}function p8(e,t,n){let r=t===`boolean`?`false`:``;return t=>{let i=t?.toString()??r;n?.has(i)||(e[i]=(e[i]??0)+1,n?.add(i))}}const m8={reducer:(e,t,n,r)=>(t[r]=n,t),getInitialValue:e=>Array.from({length:e})},h8=[`string`,`number`,`boolean`];function g8(e,t,n){let r=n.properties,i=r.length,a=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e=0;e<i;e++){let t=r[e];if(a[t]===void 0)throw N4(`UNKNOWN_GROUP_BY_PROPERTY`,t);if(!h8.includes(a[t]))throw N4(`INVALID_GROUP_BY_PROPERTY`,t,h8.join(`, `),a[t])}let o=t.map(([t])=>J4(e.internalDocumentIDStore,t)),s=e.documentsStore.getMultiple(e.data.docs,o),c=s.length,l=n.maxResult||2**53-1,u=[],d={};for(let e=0;e<i;e++){let t=r[e],n={property:t,perValue:{}},i=new Set;for(let e=0;e<c;e++){let r=s[e],a=x4(r,t);if(a===void 0)continue;let o=typeof a==`boolean`?``+a:a,c=n.perValue[o]??{indexes:[],count:0};c.count>=l||(c.indexes.push(e),c.count++,n.perValue[o]=c,i.add(a))}u.push(Array.from(i)),d[t]=n}let f=_8(u),p=f.length,m=[];for(let e=0;e<p;e++){let t=f[e],n=t.length,i={values:[],indexes:[]},a=[];for(let e=0;e<n;e++){let n=t[e],o=r[e];a.push(d[o].perValue[typeof n==`boolean`?``+n:n].indexes),i.values.push(n)}i.indexes=y4(a).sort((e,t)=>e-t),i.indexes.length!==0&&m.push(i)}let h=m.length,g=Array.from({length:h});for(let e=0;e<h;e++){let r=m[e],i=n.reduce||m8,a=r.indexes.map(e=>({id:o[e],score:t[e][1],document:s[e]})),c=i.reducer.bind(null,r.values),l=i.getInitialValue(r.indexes.length),u=a.reduce(c,l);g[e]={values:r.values,result:u}}return g}function _8(e,t=0){if(t+1===e.length)return e[t].map(e=>[e]);let n=e[t],r=_8(e,t+1),i=[];for(let e of n)for(let t of r){let n=[e];l4(n,t),i.push(n)}return i}function v8(e,t,n,r){let i=L6(t,r);if(i.length===0)return n;let a=i.flatMap(e=>e.consequence.promote);a.sort((e,t)=>e.position-t.position);let o=new Set,s=new Map,c=new Set;for(let t of a){let n=q4(e.internalDocumentIDStore,t.doc_id);if(n!==void 0){if(s.has(n)){let e=s.get(n);t.position<e&&s.set(n,t.position);continue}c.has(t.position)||(o.add(n),s.set(n,t.position),c.add(t.position))}}if(s.size===0)return n;let l=n.filter(([e])=>!o.has(e)),u=[];for(let[t,r]of s.entries())n.find(([e])=>e===t)?u.push([t,1e6-r]):e.documentsStore.get(e.data.docs,t)&&u.push([t,0]);u.sort((e,t)=>(s.get(e[0])??1/0)-(s.get(t[0])??1/0));let d=[],f=new Map;for(let e of u){let t=s.get(e[0]);f.set(t,e)}let p=0,m=0;for(;m<l.length+u.length;)if(f.has(m))d.push(f.get(m)),m++;else if(p<l.length)d.push(l[p]),p++,m++;else break;for(let[e,t]of f.entries())e>=d.length&&d.push(t);return d}function y8(e,t,n){let{term:r,properties:i}=t,a=e.data.index,o=e.caches.propertiesToSearch;if(!o){let t=e.index.getSearchablePropertiesWithTypes(a);o=e.index.getSearchableProperties(a),o=o.filter(e=>t[e].startsWith(`string`)),e.caches.propertiesToSearch=o}if(i&&i!==`*`){for(let e of i)if(!o.includes(e))throw N4(`UNKNOWN_INDEX`,e,o.join(`, `));o=o.filter(e=>i.includes(e))}let s=Object.keys(t.where??{}).length>0,c;s&&(c=e.index.searchByWhereClause(a,e.tokenizer,t.where,n));let l,u=t.threshold!==void 0&&t.threshold!==null?t.threshold:1;if(r||i){let i=W6(e);if(l=e.index.search(a,r||``,e.tokenizer,n,o,t.exact||!1,t.tolerance||0,t.boost||{},w8(t.relevance),i,c,u),t.exact&&r){let t=r.trim().split(/\s+/);l=l.filter(([n])=>{let r=e.documentsStore.get(e.data.docs,n);if(!r)return!1;for(let e of o){let n=x8(r,e);if(typeof n==`string`&&t.every(e=>RegExp(`\\b${b8(e)}\\b`).test(n)))return!0}return!1})}}else l=s?Y3(a,t.where)||(c?Array.from(c):[]).map(e=>[+e,0]):Object.keys(e.documentsStore.getAll(e.data.docs)).map(e=>[+e,0]);return l}function b8(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function x8(e,t){let n=t.split(`.`),r=e;for(let e of n)if(r&&typeof r==`object`&&e in r)r=r[e];else return;return r}function S8(e,t,n){let r=h4();function i(){let i=Object.keys(e.data.index.vectorIndexes),a=t.facets&&Object.keys(t.facets).length>0,{limit:o=10,offset:s=0,distinctOn:c,includeVectors:l=!1}=t,u=t.preflight===!0,d=y8(e,t,n);if(t.sortBy)if(typeof t.sortBy==`function`){let n=d.map(([e])=>e),r=e.documentsStore.getMultiple(e.data.docs,n).map((e,t)=>[d[t][0],d[t][1],e]);r.sort(t.sortBy),d=r.map(([e,t])=>[e,t])}else d=e.sorter.sortBy(e.data.sorting,d,t.sortBy).map(([t,n])=>[q4(e.internalDocumentIDStore,t),n]);else d=d.sort(v4);d=v8(e,e.data.pinning,d,t.term);let f;u||(f=c?I8(e,d,s,o,c):L8(e,d,s,o));let p={elapsed:{formatted:``,raw:0},hits:[],count:d.length};return f!==void 0&&(p.hits=f.filter(Boolean),l||w4(p,i)),a&&(p.facets=d8(e,d,t.facets)),t.groupBy&&(p.groups=g8(e,d,t.groupBy)),p.elapsed=e.formatElapsedTime(h4()-r),p}async function a(){e.beforeSearch&&await f3(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await d3(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}const C8={k:1.2,b:.75,d:.5};function w8(e){let t=e??{};return t.k=t.k??C8.k,t.b=t.b??C8.b,t.d=t.d??C8.d,t}function T8(e,t,n){let r=t.vector;if(r&&(!(`value`in r)||!(`property`in r)))throw N4(`INVALID_VECTOR_INPUT`,Object.keys(r).join(`, `));let i=e.data.index.vectorIndexes[r.property];if(!i)throw N4(`UNKNOWN_VECTOR_PROPERTY`,r.property);let a=i.node.size;if(r?.value.length!==a)throw r?.property===void 0||r?.value.length===void 0?N4(`INVALID_INPUT_VECTOR`,`undefined`,a,`undefined`):N4(`INVALID_INPUT_VECTOR`,r.property,a,r.value.length);let o=e.data.index,s;return Object.keys(t.where??{}).length>0&&(s=e.index.searchByWhereClause(o,e.tokenizer,t.where,n)),i.node.find(r.value,t.similarity??.8,s)}function E8(e,t,n=`english`){let r=h4();function i(){let i=T8(e,t,n).sort(v4);i=v8(e,e.data.pinning,i,void 0);let a=[];t.facets&&Object.keys(t.facets).length>0&&(a=d8(e,i,t.facets));let o=t.vector.property,s=t.includeVectors??!1,c=t.limit??10,l=t.offset??0,u=Array.from({length:c});for(let t=0;t<c;t++){let n=i[t+l];if(!n)break;let r=e.data.docs.docs[n[0]];r&&(s||(r[o]=null),u[t]={id:J4(e.internalDocumentIDStore,n[0]),score:n[1],document:r})}let d=[];t.groupBy&&(d=g8(e,i,t.groupBy));let f=h4()-r;return{count:i.length,hits:u.filter(Boolean),elapsed:{raw:Number(f),formatted:m4(f)},...a?{facets:a}:{},...d?{groups:d}:{}}}async function a(){e.beforeSearch&&await f3(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await d3(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function D8(e,t,n){let r=A8(y8(e,t,n)),i=T8(e,t,n),a=t.hybridWeights;return N8(r,i,t.term??``,a)}function O8(e,t,n){let r=h4();function i(){let i=D8(e,t,n);i=v8(e,e.data.pinning,i,t.term);let a;t.facets&&Object.keys(t.facets).length>0&&(a=d8(e,i,t.facets));let o;t.groupBy&&(o=g8(e,i,t.groupBy));let s=t.offset??0,c=t.limit??10,l=L8(e,i,s,c).filter(Boolean),u=h4(),d={count:i.length,elapsed:{raw:Number(u-r),formatted:m4(u-r)},hits:l,...a?{facets:a}:{},...o?{groups:o}:{}};return(t.includeVectors??!1)||w4(d,Object.keys(e.data.index.vectorIndexes)),d}async function a(){e.beforeSearch&&await f3(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await d3(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function k8(e){return e[1]}function A8(e){let t=Math.max.apply(Math,e.map(k8));return e.map(([e,n])=>[e,n/t])}function j8(e,t){return e/t}function M8(e,t){return(n,r)=>n*e+r*t}function N8(e,t,n,r){let i=Math.max.apply(Math,e.map(k8)),a=Math.max.apply(Math,t.map(k8)),{text:o,vector:s}=r&&r.text&&r.vector?r:P8(n),c=new Map,l=e.length,u=M8(o,s);for(let t=0;t<l;t++){let[n,r]=e[t],a=u(j8(r,i),0);c.set(n,a)}let d=t.length;for(let e=0;e<d;e++){let[n,r]=t[e],i=j8(r,a),o=c.get(n)??0;c.set(n,o+u(0,i))}return[...c].sort((e,t)=>t[1]-e[1])}function P8(e){return{text:.5,vector:.5}}function F8(e,t,n){let r=t.mode??`fulltext`;if(r===`fulltext`)return S8(e,t,n);if(r===`vector`)return E8(e,t);if(r===`hybrid`)return O8(e,t);throw N4(`INVALID_SEARCH_MODE`,r)}function I8(e,t,n,r,i){let a=e.data.docs,o=new Map,s=[],c=new Set,l=t.length,u=0;for(let d=0;d<l;d++){let l=t[d];if(l===void 0)continue;let[f,p]=l;if(c.has(f))continue;let m=e.documentsStore.get(a,f),h=x4(m,i);if(!(h===void 0||o.has(h))&&(o.set(h,!0),u++,!(u<=n)&&(s.push({id:J4(e.internalDocumentIDStore,f),score:p,document:m}),c.add(f),u>=n+r)))break}return s}function L8(e,t,n,r){let i=e.data.docs,a=Array.from({length:r}),o=new Set;for(let s=n;s<r+n;s++){let n=t[s];if(n===void 0)break;let[r,c]=n;if(!o.has(r)){let t=e.documentsStore.get(i,r);a[s]={id:J4(e.internalDocumentIDStore,r),score:c,document:t},o.add(r)}}return a}const R8={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},z8=new WeakMap;function B8(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function V8(e){return e.trim().toLowerCase()}const H8=/\.(?:md|mdx)$/;function U8(e,t){if(t!==`page`)return e;let n=e.replace(H8,``);return n.length>0?n:e}function W8(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function G8(e){let t=W8(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}}const K8=/[^\P{L}a-zàèéìòóù]|[^\P{Nd}0-9]|\p{Nl}/iu,q8=(()=>{let e=globalThis.Intl.Segmenter;return e?new e(`en`,{granularity:`word`}):null})();function J8(){let e=O6({language:`english`}),t=e.tokenize.bind(e);return e.tokenize=(e,n,r,i)=>{let a=t(e,n,r,i);if(!q8||typeof e!=`string`||!K8.test(e))return a;let o=new Set(a);for(let{segment:t,isWordLike:n}of q8.segment(e)){if(!n||!K8.test(t))continue;let e=t.toLowerCase();o.has(e)||(o.add(e),a.push(e))}return a},e}function Y8(e){let t=H6({schema:R8,components:{tokenizer:J8()}});return e.length>0&&$6(t,e),t}function X8(e){let t={documents:e};return z8.set(t,Y8(e)),t}function Z8(e){let t=z8.get(e);if(t)return t;let n=Y8(e.documents);return z8.set(e,n),n}const Q8=new WeakSet;function $8(e,t){return e===t||e.kind===t.kind&&e.path===t.path&&e.title===t.title&&e.name===t.name&&e.pathSegments===t.pathSegments&&e.modifiedTs===t.modifiedTs&&e.content===t.content}function e5(e,t){let n=e=>({corpus:X8(t),inserted:0,updated:0,removed:0,rebuilt:!0,rebuildReason:e}),r=z8.get(e);if(!r)return n(`no-index`);if(Q8.has(e))return n(`stale-base`);let i=new Map(t.map(e=>[e.id,e]));if(i.size!==t.length)return n(`duplicate-id`);let a=[],o=[],s=0;for(let t of e.documents){let e=i.get(t.id);e?$8(t,e)||(a.push(t.id),o.push(e),s+=1):a.push(t.id)}let c=new Set(e.documents.map(e=>e.id));for(let e of t)c.has(e.id)||o.push(e);if(a.length+o.length>t.length)return n(`bulk-change`);Q8.add(e);try{if(a.length>0&&a8(r,a),o.length>0&&$6(r,o),W6(r)!==t.length)throw Error(`Search index count ${W6(r)} diverged from document count ${t.length} after incremental update`)}catch{return n(`mutation-failed`)}let l={documents:t};return z8.set(l,r),{corpus:l,inserted:o.length-s,updated:s,removed:a.length-s,rebuilt:!1}}function t5(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function n5(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function r5(e,t){let n=V8(t);if(!n)return 0;let r=U8(n,e.kind),i=V8(e.title),a=V8(e.name),o=V8(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}function i5(e,t){let n=r5(e,t);return n<=0?n:eb(e.path)?n*.5:n}function a5(e){return e===`file`?-60:0}function o5(e,t,n,r,i){let a=i>0?t/i:0,o=n/50,s=r===`file`?-.001:0,c=1*a+1*o+s;return e*1e3+c}function s5(e,t,n,r){return e+t*20+n+a5(r)}function c5(e,t,n,r,i,a){return e===`relevance`?s5(t,n,r,i):o5(t,n,r,i,a)}function l5(e,t){return t||(e===`full_text`?`relevance`:`navigation`)}function u5(e,t){let n=0;for(let r of e){let e=t.get(r.id)??0;e>n&&(n=e)}return n}function d5(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 f5(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function p5(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}}const m5=/[฀-๿ក-៿ -〿぀-ゟ゠-ヿ㐀-䶿一-鿿\uf900-﫿＀-￯\u1100-\u11ff\u3130-\u318f\ua960-\ua97f\uac00-\ud7ff]/;function h5(e,t){let n=V8(t);return n.length<4||m5.test(n)?0:+(e===`full_text`)}function g5(e){let{lexical:t,fullText:n}=e.signals;return t>=500?`lexical`:t===450&&n<=0?`pathOnly`:`body`}function _5(e){let t=[],n=[],r=[];for(let i of e){let e=g5(i);e===`lexical`?t.length<100&&t.push(i):e===`body`?n.length<6&&n.push(i):r.length<4&&r.push(i)}return[...t,...n,...r]}function v5(e,t,n){if(t===`relevance`)return e.slice(0,n);let r=_5(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 y5(e,t,n={}){let r=n.intent??`omnibar`,i=l5(r,n.ranking),a=B8(n.limit),o=new Set(n.scopes??t5(r)),s=e.documents.filter(e=>n5(e,o)),c=V8(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=F8(Z8(e),{term:c,properties:f5(r),boost:p5(r),tolerance:h5(r,c),limit:Math.max(a*4,40)}),u=new Map(l.hits.filter(e=>n5(e.document,o)).map(e=>[e.document.id,e.score])),d=d5(s),f=new Map;for(let e of s)i5(e,c)>=0&&f.set(e.id,e);for(let e of l.hits)n5(e.document,o)&&f.set(e.document.id,e.document);if(!n.semantic){let e=u5(f.values(),u);return v5([...f.values()].map(t=>{let n=Math.max(0,i5(t,c)),r=u.get(t.id)??0,a=d.get(t.id)??0;return{document:t,score:c5(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 v5(x5({scopedDocuments:s,candidates:f,fullTextScores:u,recency:d,normalizedQuery:c,ranking:i,semantic:n.semantic}),i,a)}function b5(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function x5(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=u5(n.values(),r),h=[...n.values()].map(e=>{let t=Math.max(0,i5(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?c5(o,t,n,s,e.kind,m):s5(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=b5(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)),_=b5(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}))}const S5=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),C5=globalThis;C5[S5]===void 0&&(C5[S5]=s());const w5=C5[S5],T5=[`.ok`,`skill-state.yml`],E5=[`claude-cowork`,`cli-hosts`],D5=[`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`],O5=/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,k5=y({version:k().regex(O5,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(w5,{description:`Recorded skill version for this target.`}),recordedAt:o().register(w5,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:O(D5).register(w5,{description:`Install-source surface that recorded this entry.`}).optional()}),A5=y({enabled:g().register(w5,{description:`Whether this user-global skill bundle is opted in.`}),decidedAt:o().register(w5,{description:`ISO 8601 timestamp of the opt-in / opt-out decision.`})}),j5=y({schema:v(1).register(w5,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:y({"claude-cowork":k5.optional(),"cli-hosts":k5.optional()}).register(w5,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({}),bundles:h(k(),A5).register(w5,{description:`Per-bundle opt-in decisions keyed by install name. Absent key = no recorded decision.`}).optional(),installsReported:x(k()).register(w5,{description:"Skill installs already reported to skills.sh from this machine, as `<owner/repo>#<skill>`. Append-only; presence suppresses a re-report."}).optional()});function M5(e,t){return e??t.installedOnDisk}function N5(){return{schema:1,targets:{}}}const P5=16*1024*1024,F5=64*1024*1024,I5=y({name:k(),description:k(),files:y({skillMd:k(),scripts:x(k()),references:x(k())})}),L5=y({pluginProvider:k().optional(),plugin:k().optional(),marketplace:k().optional(),version:k().optional(),gitCommitSha:k().optional(),scope:k().optional(),projectPath:k().optional()}),R5=y({commands:g(),hooks:g(),mcp:g()}),z5=y({...I5.shape,sourceHarness:k(),sourceHarnesses:x(k()),home:k(),provenance:L5,inert:R5,outsideProject:g().optional()}),B5=y({schema:v(1),name:k(),version:k(),description:k().optional(),author:y({name:k()}).optional(),skills:x(k()),hostCompatibility:x(k()).optional(),capabilities:y({scripts:k(),network:k(),inert:x(k())}).optional(),provenance:y({source:k(),ref:k(),contentHash:k()}).optional()}),V5=C({skills:x(z5),packs:x(B5)}).loose(),H5=C({results:x(C({id:k().min(1),name:k().min(1),source:k().min(1),description:k(),installs:E().int().nonnegative().nullable(),publisher:k().nullable()}).loose()),backend:O([`skills.sh`,`github-fallback`]),degraded:g()}).loose(),U5=C({title:k(),description:k(),image:k().nullable(),skillsUrl:k().nullable(),sourceKind:O([`github`,`site`]),sourceUrl:k()}).loose(),W5=C({skills:x(C({name:k(),description:k().nullable()}).loose())}).loose(),G5=C({kind:O([`local`,`import`,`none`]),scope:O(ot).optional(),name:k().optional(),dir:k().optional(),source:k().optional(),ref:k().optional(),via:O([`source`,`publisher`]).optional()}).loose(),K5=C({relPath:k(),content:k().nullable()}).loose(),q5=C({provider:k(),plugin:k(),version:k().optional(),marketplace:k().optional(),repositoryUrl:k().optional()}).loose(),J5=C({provider:k(),plugin:k(),version:k().optional(),description:k().optional(),repositoryUrl:k().optional(),bundledSkills:x(k()),capabilities:C({commands:g(),hooks:g(),mcp:g(),agents:g()}),setupSupported:g()}).loose(),Y5=C({name:k(),description:k().nullable(),skillMd:k(),files:x(K5),plugin:q5.optional(),pluginBundle:J5.optional()}).loose(),X5=new Set([`project`,`local`]);function Z5(e){return e!==void 0&&X5.has(e)?`project`:`global`}function Q5(e,t){let n=e=>e.replace(/\/+$/,``);return n(e)===n(t)}function $5(e,t){if(Z5(e.scope)===`global`)return!0;let n=e.projectPath;return n===void 0||t===void 0?!0:Q5(n,t)}function e7(e,t,n){if(n===void 0||Z5(e.scope)!==`project`)return!1;let r=t.replace(/\/+$/,``),i=n.replace(/\/+$/,``);return r!==i&&!r.startsWith(`${i}/`)}const t7=/^([\w.-]+)\/([\w.-]+)$/,n7=/^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function r7(e){let t=t7.exec(e);if(t){let[,e,n]=t;if(e&&n)return{kind:`github`,owner:e,repo:n}}return n7.test(e)?{kind:`site`,hostname:e}:null}function i7(e,t){let n=r7(e),r=t.trim();if(!n||!r)return null;let i=encodeURIComponent(r);if(n.kind===`github`){let e=encodeURIComponent(n.owner),t=encodeURIComponent(n.repo);return{sourceKind:`github`,skillsUrl:`https://www.skills.sh/${e}/${t}/${i}`,sourceUrl:`https://github.com/${e}/${t}`}}return{sourceKind:`site`,skillsUrl:`https://www.skills.sh/site/${encodeURIComponent(n.hostname)}/${i}`,sourceUrl:`https://${n.hostname}`}}function a7(e){return e.includes(`/`)?e.split(`/`)[0]??null:null}function o7(e){let t=e.split(`/`).pop();return t&&t.length>0?t:e}const s7=`template`;function c7(e){if(e.trim()===``)return{};let t;try{t=(0,Ye.parse)(e)}catch{return{}}return typeof t!=`object`||!t||Array.isArray(t)?{}:t}function l7(e,t){return e.trim()===``?t:`---\n${e}\n---\n${t}`}function u7(e){let{frontmatter:t,body:n}=Sm(e);return t===``?{docFrontmatterText:``,markdown:e}:{docFrontmatterText:wm(t),markdown:n}}function d7(e){let t=e.split(`
345
345
  `);if(!(t[0]??``).startsWith(`template:`))return null;let n=[t[0]??``],r=1;for(;r<t.length;){let e=t[r]??``;if(/^[ \t]/.test(e)){n.push(e),r++;continue}if(e.trim()===``){let i=r+1;for(;i<t.length&&(t[i]??``).trim()===``;)i++;if(i<t.length&&/^[ \t]/.test(t[i]??``)){n.push(e),r++;continue}}break}let i=c7(n.join(`
346
346
  `))[s7];return{identity:typeof i==`object`&&i&&!Array.isArray(i)?i:{},docFrontmatterText:t.slice(r).join(`
347
- `).replace(/\n+$/,``)}}function f7(e){let t=e.charCodeAt(0)===65279?e.slice(1):e,{frontmatter:n,body:r}=Sm(t);if(n===``)return{identity:{},starterContent:t};let i=wm(n),a=d7(i);if(a)return{identity:a.identity,starterContent:l7(a.docFrontmatterText,r)};let{frontmatter:o}=Sm(r);if(o!==``)return{identity:c7(i),starterContent:r};let s=c7(i);return typeof s.title==`string`?{identity:s,starterContent:r}:{identity:{},starterContent:l7(i,r)}}function p7(e,t){let{docFrontmatterText:n,markdown:r}=u7(t),i={};for(let[t,n]of Object.entries(e))n!==void 0&&(i[t]=n);let a=(0,Ye.stringify)({[s7]:i});return`---\n${n.trim()===``?a:`${a}${n}\n`}---\n${r}`}function m7(e){return f7(e).starterContent}function h7(){let e=!1,t=``,n=0;return r=>{let i=g7(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 g7(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}const _7=/^(#{1,6})\s+(.+)$/;function v7(e,t){let n=(e.endsWith(`\r`)?e.slice(0,-1):e).match(_7);if(!n)return null;let r=n[2].trim(),i=GY(r,t);return i?{level:n[1].length,text:r,slug:i}:null}const y7=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],b7={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`};function x7(e,t=y7){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}const S7={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,"codex-mcp-client":`openai`,copilot:`github`,cline:`cline`,"claude-acp":`claude`,"codex-acp":`openai`,"github-copilot-cli":`github`};function C7(e){return e?S7[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}const w7={claude:`Claude`,cursor:`Cursor`,windsurf:`Windsurf`,openai:`Codex`,github:`Copilot`,cline:`Cline`};function T7(e){let t=e?.trim();return t?w7[C7(t)]??t:`Agent`}function E7(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}}const D7=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function O7(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function k7(e){let t=e.trim();return D7.test(t)||t.startsWith(`//`)}function A7(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(k7(n))return{kind:`external`,url:n};let r=n.indexOf(`#`),i=r<0?n:n.slice(0,r),a=ht(i,t);if(a)return{kind:`doc`,docName:a,anchor:r<0?null:n.slice(r+1)};let o=mt(i,t);if(o)return{kind:`doc`,docName:o,anchor:r<0?null:n.slice(r+1)};let s=E7(n,t);if(s)return{kind:`doc`,docName:s.docName,anchor:s.anchor};let c=O7(n);return c&&c!==`md`&&c!==`mdx`?{kind:`asset`,url:n,ext:c}:null}function j7(e,t){let n=e.trim();if(!n)return null;if(k7(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=O7(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function M7(e,t){let n=e.trim();if(!n||D7.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 N7(e){let t=e;return t.startsWith(`./`)&&(t=t.slice(2)),t.startsWith(`/`)&&(t=t.slice(1)),t}function P7(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function F7(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function I7(e){return e.split(`/`).filter(e=>e!==``)}function L7(e,t){let n=F7(t);return e===``||n===e?!0:n.startsWith(`${e}/`)}function R7(e,t){let n=F7(t);if(e===n)return 0;let r=e===``?n:n.slice(e.length+1);return r===``?0:I7(r).length}function z7(e,t){let n=I7(e),r=I7(t),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return n.length-i+(r.length-i)}function B7(){let e=new Map;function t(t){let n=N7(t);if(n===``)return;let r=P7(n);if(r===``)return;let i=r.toLowerCase(),a=e.get(i);if(!a){e.set(i,[n]);return}a.includes(n)||a.push(n)}function n(t){let n=N7(t),r=P7(n).toLowerCase(),i=e.get(r);if(!i)return;let a=i.indexOf(n);a!==-1&&(i.splice(a,1),i.length===0&&e.delete(r))}function r(e,r){n(e),t(r)}function i(t,n){let r=t.toLowerCase(),i=e.get(r);if(!i||i.length===0)return null;if(i.length===1)return i[0];let a=F7(N7(n)),o=[],s=[];for(let e of i)L7(a,e)?o.push(e):s.push(e);return o.length>0?(e=>{let t=e[0],n=R7(a,t);for(let r=1;r<e.length;r++){let i=e[r],o=R7(a,i);(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(o):(e=>{let t=e[0],n=z7(a,F7(t));for(let r=1;r<e.length;r++){let i=e[r],o=z7(a,F7(i));(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(s)}function a(){let t=new Map;for(let[n,r]of e)t.set(n,[...r]);return t}function o(){e.clear()}return{add:t,remove:n,rename:r,resolveEmbed:i,clear:o,snapshot:a,size:()=>e.size}}function V7(e){if(!e)return[];let t=e.split(`/`),n=[],r=``;for(let e of t)r=r?`${r}/${e}`:e,n.push(r);return n}function H7(e,t){if(e.size===0)return new Set;if(t===``)return new Set(e);let n=new Set,r=`${t}/`;for(let i of e)(i===t||i.startsWith(r))&&n.add(i);return n}export{F2 as $,lb as $a,sX as $i,d$ as $n,Tt as $o,zZ as $r,v$ as $t,H5 as A,PW as Aa,ZX as Ai,o1 as An,sn as Ao,AQ as Ar,me as As,a0 as At,G8 as B,Kb as Ba,LX as Bi,g1 as Bn,Lt as Bo,sQ as Br,A1 as Bt,$5 as C,tY as Ca,uZ as Ci,F$ as Cn,cn as Co,vQ as Cr,qe as Cs,b0 as Ct,Y5 as D,XW as Da,QX as Di,D$ as Dn,on as Do,CQ as Dr,ve as Ds,l0 as Dt,W5 as E,LW as Ea,tZ as Ei,E$ as En,Qt as Eo,yQ as Er,P as Es,_0 as Et,O5 as F,dH as Fa,vX as Fi,n1 as Fn,Vt as Fo,cQ as Fr,U1 as Ft,Z2 as G,Gb as Ga,OX as Gi,t$ as Gn,Ft as Go,ZZ as Gr,w1 as Gt,e5 as H,Ub as Ha,jX as Hi,T$ as Hn,It as Ho,eQ as Hr,k1 as Ht,j5 as I,KR as Ia,MX as Ii,i1 as In,Ht as Io,oQ as Ir,N1 as It,H2 as J,jb as Ja,fX as Ji,f$ as Jn,Pt as Jo,FZ as Jr,b1 as Jt,Q2 as K,Wb as Ka,RX as Ki,m$ as Kn,kt as Ko,WZ as Kr,C1 as Kt,N5 as L,FP as La,yX as Li,a1 as Ln,Ut as Lo,iQ as Lr,R1 as Lt,F5 as M,zU as Ma,BX as Mi,A$ as Mn,Kt as Mo,OQ as Mr,t0 as Mt,T5 as N,wH as Na,VX as Ni,j$ as Nn,Wt as No,YZ as Nr,n0 as Nt,G5 as O,HW as Oa,eZ as Oi,O$ as On,Yt as Oo,wQ as Or,he as Os,f0 as Ot,E5 as P,fH as Pa,EX as Pi,_$ as Pn,Gt as Po,XZ as Pr,W1 as Pt,z2 as Q,ub as Qa,cX as Qi,u$ as Qn,Et as Qo,UZ as Qr,Q$ as Qt,M5 as R,EN as Ra,NX as Ri,e1 as Rn,zt as Ro,nQ as Rr,D1 as Rt,Z5 as S,nY as Sa,rZ as Si,N$ as Sn,F as So,_Q as Sr,Xe as Ss,O0 as St,U5 as T,RW as Ta,KX as Ti,P$ as Tn,Jt as To,xQ as Tr,Je as Ts,v0 as Tt,q2 as U,Rb as Ua,gX as Ui,x$ as Un,Dt as Uo,QZ as Ur,E1 as Ut,y5 as V,zb as Va,_X as Vi,_1 as Vn,Rt as Vo,lQ as Vr,O1 as Vt,X2 as W,qb as Wa,AX as Wi,r$ as Wn,Ot as Wo,$Z as Wr,x1 as Wt,V2 as X,Pb as Xa,ZY as Xi,h$ as Xn,Nt as Xo,LZ as Xr,a$ as Xt,R2 as Y,Mb as Ya,hX as Yi,p$ as Yn,jt as Yo,IZ as Yr,i$ as Yt,B2 as Z,sb as Za,oX as Zi,g$ as Zn,Mt as Zo,HZ as Zr,o$ as Zt,f7 as _,vY as _a,gZ as _i,y1 as _n,Cm as _o,gQ as _r,_t as _s,F0 as _t,j7 as a,IY as aa,OZ as ai,R$ as an,Ib as ao,GQ as ar,tt as as,A2 as at,i7 as b,_Y as ba,cZ as bi,$$ as bn,pf as bo,TQ as br,bt as bs,C0 as bt,b7 as c,bY as ca,wZ as ci,q$ as cn,kb as co,WQ as cr,it as cs,_2 as ct,C7 as d,MY as da,bZ as di,U$ as dn,Xy as do,VQ as dr,Ze as ds,g2 as dt,UY as ea,RZ as ei,c1 as en,hb as eo,l$ as er,wt as es,P2 as et,v7 as f,sY as fa,xZ as fi,W$ as fn,Jy as fo,HQ as fr,ct as fs,p2 as ft,m7 as g,fY as ga,SZ as gi,h1 as gn,Ry as go,hQ as gr,St as gs,W0 as gt,p7 as h,iY as ha,vZ as hi,C$ as hn,Hy as ho,zQ as hr,yt as hs,H0 as ht,A7 as i,FY as ia,AZ as ii,L$ as in,Fb as io,QQ as ir,$e as is,M2 as it,P5 as j,bW as ja,XX as ji,s1 as jn,qt as jo,DQ as jr,c0 as jt,V5 as k,NW as ka,$X as ki,k$ as kn,en as ko,kQ as kr,ge as ks,i0 as kt,x7 as l,SY as la,TZ as li,K$ as ln,bb as lo,UQ as lr,at as ls,C2 as lt,s7 as m,pY as ma,_Z as mi,r1 as mn,Gy as mo,RQ as mr,lt as ms,X0 as mt,H7 as n,RY as na,MZ as ni,d1 as nn,_b as no,e$ as nr,rt as ns,L2 as nt,M7 as o,CY as oa,DZ as oi,z$ as on,Ob as oo,KQ as or,et as os,k2 as ot,h7 as p,cY as pa,CZ as pi,G$ as pn,qy as po,LQ as pr,st as ps,K0 as pt,K2 as q,Hb as qa,zX as qi,c$ as qn,At as qo,GZ as qr,S1 as qt,B7 as r,LY as ra,PZ as ri,M$ as rn,yb as ro,XQ as rr,nt as rs,I2 as rt,E7 as s,EY as sa,jZ as si,B$ as sn,Sb as so,YQ as sr,dt as ss,w2 as st,V7 as t,zY as ta,VZ as ti,f1 as tn,mb as to,b$ as tr,Qe as ts,N2 as tt,T7 as u,jY as ua,EZ as ui,H$ as un,eb as uo,BQ as ur,ot as us,h2 as ut,a7 as v,yY as va,sZ as vi,Z$ as vn,Sm as vo,pQ as vr,ft as vs,I0 as vt,e7 as w,IW as wa,pZ as wi,I$ as wn,$t as wo,fQ as wr,Ue as ws,y0 as wt,o7 as x,hY as xa,iZ as xi,X$ as xn,ea as xo,EQ as xr,Ct as xs,A0 as xt,r7 as y,oY as ya,oZ as yi,m1 as yn,wm as yo,mQ as yr,ht as ys,N0 as yt,X8 as z,Bb as za,PX as zi,t1 as zn,Bt as zo,tQ as zr,j1 as zt};
348
- //# sourceMappingURL=src-v83peLAF.mjs.map
347
+ `).replace(/\n+$/,``)}}function f7(e){let t=e.charCodeAt(0)===65279?e.slice(1):e,{frontmatter:n,body:r}=Sm(t);if(n===``)return{identity:{},starterContent:t};let i=wm(n),a=d7(i);if(a)return{identity:a.identity,starterContent:l7(a.docFrontmatterText,r)};let{frontmatter:o}=Sm(r);if(o!==``)return{identity:c7(i),starterContent:r};let s=c7(i);return typeof s.title==`string`?{identity:s,starterContent:r}:{identity:{},starterContent:l7(i,r)}}function p7(e,t){let{docFrontmatterText:n,markdown:r}=u7(t),i={};for(let[t,n]of Object.entries(e))n!==void 0&&(i[t]=n);let a=(0,Ye.stringify)({[s7]:i});return`---\n${n.trim()===``?a:`${a}${n}\n`}---\n${r}`}function m7(e){return f7(e).starterContent}const h7=e=>e*8+4;h7(92),h7(40);function g7(){let e=!1,t=``,n=0;return r=>{let i=_7(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 _7(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}const v7=/^(#{1,6})\s+(.+)$/;function y7(e,t){let n=(e.endsWith(`\r`)?e.slice(0,-1):e).match(v7);if(!n)return null;let r=n[2].trim(),i=GY(r,t);return i?{level:n[1].length,text:r,slug:i}:null}const b7=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],x7={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`};function S7(e,t=b7){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}const C7={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,"codex-mcp-client":`openai`,copilot:`github`,cline:`cline`,"claude-acp":`claude`,"codex-acp":`openai`,"github-copilot-cli":`github`};function w7(e){return e?C7[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}const T7={claude:`Claude`,cursor:`Cursor`,windsurf:`Windsurf`,openai:`Codex`,github:`Copilot`,cline:`Cline`};function E7(e){let t=e?.trim();return t?T7[w7(t)]??t:`Agent`}function D7(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}}const O7=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function k7(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function A7(e){let t=e.trim();return O7.test(t)||t.startsWith(`//`)}function j7(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(A7(n))return{kind:`external`,url:n};let r=n.indexOf(`#`),i=r<0?n:n.slice(0,r),a=ht(i,t);if(a)return{kind:`doc`,docName:a,anchor:r<0?null:n.slice(r+1)};let o=mt(i,t);if(o)return{kind:`doc`,docName:o,anchor:r<0?null:n.slice(r+1)};let s=D7(n,t);if(s)return{kind:`doc`,docName:s.docName,anchor:s.anchor};let c=k7(n);return c&&c!==`md`&&c!==`mdx`?{kind:`asset`,url:n,ext:c}:null}function M7(e,t){let n=e.trim();if(!n)return null;if(A7(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=k7(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function N7(e,t){let n=e.trim();if(!n||O7.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 P7(e){let t=e;return t.startsWith(`./`)&&(t=t.slice(2)),t.startsWith(`/`)&&(t=t.slice(1)),t}function F7(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function I7(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function L7(e){return e.split(`/`).filter(e=>e!==``)}function R7(e,t){let n=I7(t);return e===``||n===e?!0:n.startsWith(`${e}/`)}function z7(e,t){let n=I7(t);if(e===n)return 0;let r=e===``?n:n.slice(e.length+1);return r===``?0:L7(r).length}function B7(e,t){let n=L7(e),r=L7(t),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return n.length-i+(r.length-i)}function V7(){let e=new Map;function t(t){let n=P7(t);if(n===``)return;let r=F7(n);if(r===``)return;let i=r.toLowerCase(),a=e.get(i);if(!a){e.set(i,[n]);return}a.includes(n)||a.push(n)}function n(t){let n=P7(t),r=F7(n).toLowerCase(),i=e.get(r);if(!i)return;let a=i.indexOf(n);a!==-1&&(i.splice(a,1),i.length===0&&e.delete(r))}function r(e,r){n(e),t(r)}function i(t,n){let r=t.toLowerCase(),i=e.get(r);if(!i||i.length===0)return null;if(i.length===1)return i[0];let a=I7(P7(n)),o=[],s=[];for(let e of i)R7(a,e)?o.push(e):s.push(e);return o.length>0?(e=>{let t=e[0],n=z7(a,t);for(let r=1;r<e.length;r++){let i=e[r],o=z7(a,i);(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(o):(e=>{let t=e[0],n=B7(a,I7(t));for(let r=1;r<e.length;r++){let i=e[r],o=B7(a,I7(i));(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(s)}function a(){let t=new Map;for(let[n,r]of e)t.set(n,[...r]);return t}function o(){e.clear()}return{add:t,remove:n,rename:r,resolveEmbed:i,clear:o,snapshot:a,size:()=>e.size}}function H7(e){if(!e)return[];let t=e.split(`/`),n=[],r=``;for(let e of t)r=r?`${r}/${e}`:e,n.push(r);return n}function U7(e,t){if(e.size===0)return new Set;if(t===``)return new Set(e);let n=new Set,r=`${t}/`;for(let i of e)(i===t||i.startsWith(r))&&n.add(i);return n}export{F2 as $,lb as $a,sX as $i,d$ as $n,Tt as $o,zZ as $r,v$ as $t,H5 as A,PW as Aa,ZX as Ai,o1 as An,sn as Ao,AQ as Ar,me as As,a0 as At,G8 as B,Kb as Ba,LX as Bi,g1 as Bn,Lt as Bo,sQ as Br,A1 as Bt,$5 as C,tY as Ca,uZ as Ci,F$ as Cn,cn as Co,vQ as Cr,qe as Cs,b0 as Ct,Y5 as D,XW as Da,QX as Di,D$ as Dn,on as Do,CQ as Dr,ve as Ds,l0 as Dt,W5 as E,LW as Ea,tZ as Ei,E$ as En,Qt as Eo,yQ as Er,P as Es,_0 as Et,O5 as F,dH as Fa,vX as Fi,n1 as Fn,Vt as Fo,cQ as Fr,U1 as Ft,Z2 as G,Gb as Ga,OX as Gi,t$ as Gn,Ft as Go,ZZ as Gr,w1 as Gt,e5 as H,Ub as Ha,jX as Hi,T$ as Hn,It as Ho,eQ as Hr,k1 as Ht,j5 as I,KR as Ia,MX as Ii,i1 as In,Ht as Io,oQ as Ir,N1 as It,H2 as J,jb as Ja,fX as Ji,f$ as Jn,Pt as Jo,FZ as Jr,b1 as Jt,Q2 as K,Wb as Ka,RX as Ki,m$ as Kn,kt as Ko,WZ as Kr,C1 as Kt,N5 as L,FP as La,yX as Li,a1 as Ln,Ut as Lo,iQ as Lr,R1 as Lt,F5 as M,zU as Ma,BX as Mi,A$ as Mn,Kt as Mo,OQ as Mr,t0 as Mt,T5 as N,wH as Na,VX as Ni,j$ as Nn,Wt as No,YZ as Nr,n0 as Nt,G5 as O,HW as Oa,eZ as Oi,O$ as On,Yt as Oo,wQ as Or,he as Os,f0 as Ot,E5 as P,fH as Pa,EX as Pi,_$ as Pn,Gt as Po,XZ as Pr,W1 as Pt,z2 as Q,ub as Qa,cX as Qi,u$ as Qn,Et as Qo,UZ as Qr,Q$ as Qt,M5 as R,EN as Ra,NX as Ri,e1 as Rn,zt as Ro,nQ as Rr,D1 as Rt,Z5 as S,nY as Sa,rZ as Si,N$ as Sn,F as So,_Q as Sr,Xe as Ss,O0 as St,U5 as T,RW as Ta,KX as Ti,P$ as Tn,Jt as To,xQ as Tr,Je as Ts,v0 as Tt,q2 as U,Rb as Ua,gX as Ui,x$ as Un,Dt as Uo,QZ as Ur,E1 as Ut,y5 as V,zb as Va,_X as Vi,_1 as Vn,Rt as Vo,lQ as Vr,O1 as Vt,X2 as W,qb as Wa,AX as Wi,r$ as Wn,Ot as Wo,$Z as Wr,x1 as Wt,V2 as X,Pb as Xa,ZY as Xi,h$ as Xn,Nt as Xo,LZ as Xr,a$ as Xt,R2 as Y,Mb as Ya,hX as Yi,p$ as Yn,jt as Yo,IZ as Yr,i$ as Yt,B2 as Z,sb as Za,oX as Zi,g$ as Zn,Mt as Zo,HZ as Zr,o$ as Zt,f7 as _,vY as _a,gZ as _i,y1 as _n,Cm as _o,gQ as _r,_t as _s,F0 as _t,M7 as a,IY as aa,OZ as ai,R$ as an,Ib as ao,GQ as ar,tt as as,A2 as at,i7 as b,_Y as ba,cZ as bi,$$ as bn,pf as bo,TQ as br,bt as bs,C0 as bt,x7 as c,bY as ca,wZ as ci,q$ as cn,kb as co,WQ as cr,it as cs,_2 as ct,w7 as d,MY as da,bZ as di,U$ as dn,Xy as do,VQ as dr,Ze as ds,g2 as dt,UY as ea,RZ as ei,c1 as en,hb as eo,l$ as er,wt as es,P2 as et,y7 as f,sY as fa,xZ as fi,W$ as fn,Jy as fo,HQ as fr,ct as fs,p2 as ft,m7 as g,fY as ga,SZ as gi,h1 as gn,Ry as go,hQ as gr,St as gs,W0 as gt,p7 as h,iY as ha,vZ as hi,C$ as hn,Hy as ho,zQ as hr,yt as hs,H0 as ht,j7 as i,FY as ia,AZ as ii,L$ as in,Fb as io,QQ as ir,$e as is,M2 as it,P5 as j,bW as ja,XX as ji,s1 as jn,qt as jo,DQ as jr,c0 as jt,V5 as k,NW as ka,$X as ki,k$ as kn,en as ko,kQ as kr,ge as ks,i0 as kt,S7 as l,SY as la,TZ as li,K$ as ln,bb as lo,UQ as lr,at as ls,C2 as lt,s7 as m,pY as ma,_Z as mi,r1 as mn,Gy as mo,RQ as mr,lt as ms,X0 as mt,U7 as n,RY as na,MZ as ni,d1 as nn,_b as no,e$ as nr,rt as ns,L2 as nt,N7 as o,CY as oa,DZ as oi,z$ as on,Ob as oo,KQ as or,et as os,k2 as ot,g7 as p,cY as pa,CZ as pi,G$ as pn,qy as po,LQ as pr,st as ps,K0 as pt,K2 as q,Hb as qa,zX as qi,c$ as qn,At as qo,GZ as qr,S1 as qt,V7 as r,LY as ra,PZ as ri,M$ as rn,yb as ro,XQ as rr,nt as rs,I2 as rt,D7 as s,EY as sa,jZ as si,B$ as sn,Sb as so,YQ as sr,dt as ss,w2 as st,H7 as t,zY as ta,VZ as ti,f1 as tn,mb as to,b$ as tr,Qe as ts,N2 as tt,E7 as u,jY as ua,EZ as ui,H$ as un,eb as uo,BQ as ur,ot as us,h2 as ut,a7 as v,yY as va,sZ as vi,Z$ as vn,Sm as vo,pQ as vr,ft as vs,I0 as vt,e7 as w,IW as wa,pZ as wi,I$ as wn,$t as wo,fQ as wr,Ue as ws,y0 as wt,o7 as x,hY as xa,iZ as xi,X$ as xn,ea as xo,EQ as xr,Ct as xs,A0 as xt,r7 as y,oY as ya,oZ as yi,m1 as yn,wm as yo,mQ as yr,ht as ys,N0 as yt,X8 as z,Bb as za,PX as zi,t1 as zn,Bt as zo,tQ as zr,j1 as zt};
348
+ //# sourceMappingURL=src-IM6msWeV.mjs.map