@inkeep/open-knowledge 0.49.0-beta.9 → 0.49.0
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.
- package/dist/THIRD_PARTY_NOTICES.md +65 -0
- package/dist/{acp-harness-probe-DAvWLUO9.mjs → acp-harness-probe-DOXp9Wx4.mjs} +2 -2
- package/dist/assets/skills/packs/codebase-wiki/SKILL.md +1 -1
- package/dist/assets/skills/packs/entity-vault/SKILL.md +2 -2
- package/dist/assets/skills/packs/knowledge-base/SKILL.md +6 -6
- package/dist/assets/skills/packs/knowledge-base/consolidate/SKILL.md +2 -2
- package/dist/assets/skills/packs/knowledge-base/research/SKILL.md +5 -5
- package/dist/assets/skills/packs/okf/SKILL.md +1 -1
- package/dist/assets/skills/packs/plain-notes/SKILL.md +1 -1
- package/dist/assets/skills/packs/software-lifecycle/SKILL.md +6 -6
- package/dist/assets/skills/packs/software-lifecycle/frame-a-proposal/SKILL.md +3 -3
- package/dist/assets/skills/packs/software-lifecycle/record-a-decision/SKILL.md +7 -7
- package/dist/assets/skills/packs/software-lifecycle/review-a-design/SKILL.md +4 -4
- package/dist/assets/skills/packs/software-lifecycle/write-a-postmortem/SKILL.md +2 -2
- package/dist/assets/skills/packs/software-lifecycle/write-a-spec/SKILL.md +5 -5
- package/dist/assets/skills/packs/worldbuilding/SKILL.md +1 -1
- package/dist/assets/skills/packs/writing-pipeline/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +3 -3
- package/dist/assets/skills/project/references/starter-packs.md +1 -1
- package/dist/cli.mjs +50 -50
- package/dist/config-schema.json +38 -0
- package/dist/config.user.schema.json +38 -0
- package/dist/constants-J4-mibQ1.mjs +2 -0
- package/dist/{fs-traced-Cq61rC8q.mjs → fs-traced-By5aY-RE.mjs} +2 -2
- package/dist/fs-traced-CkLhqsEn.mjs +1 -0
- package/dist/git-handle-BDmbIWwd.mjs +1 -0
- package/dist/{git-handle-CwKFBC31.mjs → git-handle-BHe1p04S.mjs} +2 -2
- package/dist/index.d.mts +17 -0
- package/dist/index.mjs +1 -1
- package/dist/init-DDwncQha.mjs +1 -0
- package/dist/{init-DH-Px80S.mjs → init-ZOWQ1Th4.mjs} +3 -3
- package/dist/{launch-json-removal-D4FPrVjU.mjs → launch-json-removal-CcFuFFS1.mjs} +2 -2
- package/dist/loader-BcwbnY_K.mjs +1 -0
- package/dist/{loader-ON7dLR96.mjs → loader-ji3pPcXi.mjs} +2 -2
- package/dist/md-manager-B4-M0hXs.mjs +2 -0
- package/dist/{open-browser-Dndi6WWX.mjs → open-browser-CxnOIVsL.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-Ds5aM2R7.mjs → preview-2rQXoRuM.mjs} +2 -2
- package/dist/preview-MV-qHfzy.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-DlqRan97.js → ActivityModeContent-C08FYohG.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-C_8fbRzc.js → AgentDiffPane-T499-ugv.js} +2 -2
- package/dist/public/assets/{AgentThreadClientBinder-CAwKHBFH.js → AgentThreadClientBinder-BlMGv16y.js} +1 -1
- package/dist/public/assets/{AppMenubar-_6okky_d.js → AppMenubar-dik_dmjC.js} +1 -1
- package/dist/public/assets/BugReportHistory-DymFE_6x.js +1 -0
- package/dist/public/assets/{BugReportHistoryDialog-DgM3N4RP.js → BugReportHistoryDialog-D28ahq-6.js} +1 -1
- package/dist/public/assets/ChangedOutsideBadge-GeQfL_b-.js +1 -0
- package/dist/public/assets/CodeMirrorPropInput-3TWUbzXY.js +3 -0
- package/dist/public/assets/{ConfigSharingInfoTooltip-BhNgrS2h.js → ConfigSharingInfoTooltip-Bwt_R43K.js} +1 -1
- package/dist/public/assets/{ConsentDialogBody-CAqiYyjs.js → ConsentDialogBody-Clb82Qbo.js} +1 -1
- package/dist/public/assets/{CopyButton-DfXJBl0I.js → CopyButton-DysciFW5.js} +1 -1
- package/dist/public/assets/{DiffView-Bc5gwnAV.js → DiffView-DY54R06f.js} +1 -1
- package/dist/public/assets/DocumentContext-C-Lo65-_.js +38 -0
- package/dist/public/assets/{EditorModeToggle-C7CehDgV.js → EditorModeToggle-BjgmECAn.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-DB9uLD_C.js → EnableSyncConfirmDialog-B1Eo_sVE.js} +1 -1
- package/dist/public/assets/FeedbackForm-CmdTz11F.js +1 -0
- package/dist/public/assets/{GraphPanel-CIK3uXtb.js → GraphPanel-CxJeFUDp.js} +2 -2
- package/dist/public/assets/{ImportSkillDialog-C0lAvukp.js → ImportSkillDialog-ChsGV6eb.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-D-o_OWhj.js → LintConfigEditor-3f4-NF1O.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-B1ZA0ofn.js +2 -0
- package/dist/public/assets/ManagedArtifactProperties-B_ecuboX.js +1 -0
- package/dist/public/assets/{McpConsentDialogBody-COj_KwlR.js → McpConsentDialogBody-CG5af4os.js} +1 -1
- package/dist/public/assets/{Mermaid-DT9lZOmy.js → Mermaid-Cr48L9fH.js} +2 -2
- package/dist/public/assets/{MermaidDocEditor-CiaKVZ6r.js → MermaidDocEditor-C30-UfMg.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-CSZXCqwG.js → RegisteredAgentIcon-Cdt1gfjt.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-DexAqkb2.js → ReportBugDialogBody-BUGec7jk.js} +1 -1
- package/dist/public/assets/SchemaConfigEditor-DPK5XbMd.js +1 -0
- package/dist/public/assets/SessionsHost-BobZkNwc.js +2 -0
- package/dist/public/assets/SettingsDialogBody-COTbFRqi.js +12 -0
- package/dist/public/assets/{ShareBranchSwitchDialog-BbDROBIa.js → ShareBranchSwitchDialog-C0mAHHVQ.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-CfU4m-WF.js → ShareReceiveDialog-Coi9tYAP.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-s_ig9ymF.js → ShareReceiveMissDialog-B03ClkaE.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-zxtA22QV.js → SkillEditBanner-C7z-32HN.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-CHnC6xUF.js → SkillOriginInline-DgWSnmXH.js} +1 -1
- package/dist/public/assets/SkillToolbarControls-PvRY_LHn.js +1 -0
- package/dist/public/assets/SlidesToolbarControls-8TzXHMwI.js +1 -0
- package/dist/public/assets/SourceEditor-Duqpede9.js +1 -0
- package/dist/public/assets/TerminalPanel-Bl3bWVA_.js +146 -0
- package/dist/public/assets/{TerminalWindowApp-C8u0Fpbd.js → TerminalWindowApp-CgWp2eC-.js} +1 -1
- package/dist/public/assets/{TextDocEditor-CRK7lnOq.js → TextDocEditor-CHDC5byq.js} +1 -1
- package/dist/public/assets/ThreadView-VqdgemBS.js +10 -0
- package/dist/public/assets/{TimelineDiffPane-CcgJFm6X.js → TimelineDiffPane-DnaRcvCk.js} +2 -2
- package/dist/public/assets/{abnfDiagram-VRR7QNED-Df7YgB-u.js → abnfDiagram-VRR7QNED-zrdnvCxH.js} +1 -1
- package/dist/public/assets/{agent-diff-store-B6KZTOv6.js → agent-diff-store-B7oQn7l7.js} +1 -1
- package/dist/public/assets/agent-visibility-CHYjRInm.js +1 -0
- package/dist/public/assets/{arc-CVPlXeVn.js → arc-DNWUH4a1.js} +1 -1
- package/dist/public/assets/architecture-TIHT7OUA-DHywK0qf.js +1 -0
- package/dist/public/assets/{architectureDiagram-ZJ3FMSHR-Cid8pwpH.js → architectureDiagram-ZJ3FMSHR-C8Bd5LWV.js} +1 -1
- package/dist/public/assets/arrow-up-right-0IN5lFEX.js +1 -0
- package/dist/public/assets/auth-state-cache-BUYyIMUZ.js +11 -0
- package/dist/public/assets/{blockDiagram-677ZJIJ3-CbwD0mr1.js → blockDiagram-677ZJIJ3-B9IYmQZQ.js} +1 -1
- package/dist/public/assets/{braces-PuTG97X6.js → braces-Ytg60O62.js} +1 -1
- package/dist/public/assets/{c4Diagram-LMCZKHZV-CZHW-U3Z.js → c4Diagram-LMCZKHZV-BAmqGVbu.js} +1 -1
- package/dist/public/assets/{calendar-Dze0sDp0.js → calendar-GynmFVw0.js} +1 -1
- package/dist/public/assets/{case-sensitive-DyF7sIpA.js → case-sensitive-DvBZDISP.js} +1 -1
- package/dist/public/assets/channel-BNyr5ucm.js +1 -0
- package/dist/public/assets/check-BLuQ2zvV.js +1 -0
- package/dist/public/assets/{checkbox-DqQC4GOw.js → checkbox-V0IoPAe3.js} +1 -1
- package/dist/public/assets/{chevron-down-CRb8csep.js → chevron-down-DrpHBSgH.js} +1 -1
- package/dist/public/assets/chevron-left-BUr-yKA4.js +1 -0
- package/dist/public/assets/chevron-right-BU8AeJST.js +1 -0
- package/dist/public/assets/{chevron-up-BZk9M0QL.js → chevron-up-CsH_dTwv.js} +1 -1
- package/dist/public/assets/chunk-2Q5K7J3B-UKfnOi4g.js +1 -0
- package/dist/public/assets/{chunk-32BRIVSS-DT6F-uh7.js → chunk-32BRIVSS-DMLdlgjI.js} +1 -1
- package/dist/public/assets/{chunk-52WLFC77-z8Dc0FTi.js → chunk-52WLFC77-CA6wNZGK.js} +1 -1
- package/dist/public/assets/{chunk-5FCAYU7R-CTroACwQ.js → chunk-5FCAYU7R-DqJZ_M2Z.js} +1 -1
- package/dist/public/assets/{chunk-5HE753X5-BiVTlY9X.js → chunk-5HE753X5-xEmSuz1X.js} +1 -1
- package/dist/public/assets/{chunk-5JV3BV7I-D5PSiL8d.js → chunk-5JV3BV7I-Ck8lDs_Z.js} +1 -1
- package/dist/public/assets/{chunk-5TONJI2A-Bxf6m0R0.js → chunk-5TONJI2A-PrC_RJYQ.js} +1 -1
- package/dist/public/assets/{chunk-5VM5RSS4-CRkhjuQ5.js → chunk-5VM5RSS4-uHW5nKzV.js} +1 -1
- package/dist/public/assets/{chunk-7BUUIJ7U-CIezx2MS.js → chunk-7BUUIJ7U-QsQRXodN.js} +1 -1
- package/dist/public/assets/{chunk-BIQX33UG-4vkcoUCs.js → chunk-BIQX33UG-Bn3R7PMg.js} +1 -1
- package/dist/public/assets/{chunk-BO2N2NFS-CC8ch_fx.js → chunk-BO2N2NFS-XrP3H1kD.js} +13 -13
- package/dist/public/assets/{chunk-C7G6YPKG-CfSnkt3g.js → chunk-C7G6YPKG-Cyi6lMg0.js} +1 -1
- package/dist/public/assets/{chunk-CQNSW5MT-DY98Y9zl.js → chunk-CQNSW5MT-DcGjpkNq.js} +1 -1
- package/dist/public/assets/{chunk-CYSBUYHQ-BK-vm9jf.js → chunk-CYSBUYHQ-DtqK9e9B.js} +1 -1
- package/dist/public/assets/{chunk-EMLP6XTP-DZw4ZtXy.js → chunk-EMLP6XTP-CwGsiDUi.js} +1 -1
- package/dist/public/assets/{chunk-EX3LRPZG-Bk_23Lji.js → chunk-EX3LRPZG-DLPjvnJt.js} +1 -1
- package/dist/public/assets/{chunk-FWX5IMBZ-Bcld6_cI.js → chunk-FWX5IMBZ-Dl1Yx5lK.js} +2 -2
- package/dist/public/assets/{chunk-HOUHSVGY-CFg4tiNL.js → chunk-HOUHSVGY-DV13h0Pr.js} +1 -1
- package/dist/public/assets/{chunk-ICXQ74PX-D2_LgSCG.js → chunk-ICXQ74PX-INpeR2_Y.js} +1 -1
- package/dist/public/assets/{chunk-JG7HCLWE-DvlaYzpW.js → chunk-JG7HCLWE-DjqF4wz1.js} +1 -1
- package/dist/public/assets/{chunk-JWPE2WC7-CLgWJdHV.js → chunk-JWPE2WC7-ChNUGWh8.js} +1 -1
- package/dist/public/assets/{chunk-MOJQB5TN-ChUfYEEn.js → chunk-MOJQB5TN-DYAyc4PI.js} +1 -1
- package/dist/public/assets/{chunk-MOZMSUNE-BGXPWMly.js → chunk-MOZMSUNE-DAoBuwD4.js} +1 -1
- package/dist/public/assets/{chunk-OGEWGWER-CivbNyHY.js → chunk-OGEWGWER-_vqBGeRc.js} +1 -1
- package/dist/public/assets/{chunk-OSBZ3O6U-DWgnErEt.js → chunk-OSBZ3O6U-SeZvOun8.js} +1 -1
- package/dist/public/assets/{chunk-PUDLZKDR-B7d6ISYj.js → chunk-PUDLZKDR-C184t24_.js} +1 -1
- package/dist/public/assets/{chunk-Q4XR5HBZ-91W5kPi9.js → chunk-Q4XR5HBZ-SaCK9erE.js} +1 -1
- package/dist/public/assets/{chunk-QBLGF6JB-4F2Itui7.js → chunk-QBLGF6JB-CJVMUUtn.js} +1 -1
- package/dist/public/assets/{chunk-R7FJI6CG-hR8tQLXq.js → chunk-R7FJI6CG-q21e0CIM.js} +1 -1
- package/dist/public/assets/{chunk-RYQCIY6F-DycaSFT5.js → chunk-RYQCIY6F-nQAz-0yS.js} +1 -1
- package/dist/public/assets/{chunk-U6XO7XAA-CHI_dfPQ.js → chunk-U6XO7XAA-hembI7o8.js} +1 -1
- package/dist/public/assets/{chunk-V7JOEXUC-Bw7Trikr.js → chunk-V7JOEXUC-3RMXHrzo.js} +1 -1
- package/dist/public/assets/chunk-VAUOI2AC-ChJppfl7.js +1 -0
- package/dist/public/assets/{chunk-VR4S4FIN-td2s33cT.js → chunk-VR4S4FIN-YHQiPjFo.js} +1 -1
- package/dist/public/assets/{chunk-WYO6CB5R-BL3R8kzV.js → chunk-WYO6CB5R-tHLnBMnY.js} +2 -2
- package/dist/public/assets/chunk-XXDRQBXY-Bsh29NfZ.js +1 -0
- package/dist/public/assets/{chunk-YOTPTUD7-Cg9yDbvj.js → chunk-YOTPTUD7-u4FR_PoG.js} +1 -1
- package/dist/public/assets/{chunk-ZGVPDNZ5-DdQ8WlYq.js → chunk-ZGVPDNZ5-BFUSTZTU.js} +1 -1
- package/dist/public/assets/{chunk-ZIRB5QZD-DuiWBTeF.js → chunk-ZIRB5QZD-D120inkG.js} +1 -1
- package/dist/public/assets/classDiagram-OUVF2IWQ-6PbrHEW6.js +1 -0
- package/dist/public/assets/classDiagram-v2-EOCWNBFH-B4bz8Etj.js +1 -0
- package/dist/public/assets/client-version-DfXcf1Qf.js +1 -0
- package/dist/public/assets/{cm-theme-CUwlOcHl.js → cm-theme-BJSRL90r.js} +1 -1
- package/dist/public/assets/code-highlighter-impl-Bq6VPPCL.js +144 -0
- package/dist/public/assets/{comment-chips-B9bT1JUw.js → comment-chips-BhvfCPCk.js} +1 -1
- package/dist/public/assets/{config-context-CmQUJBcL.js → config-context-DNY4at5d.js} +1 -1
- package/dist/public/assets/config-provider-B7dMDFNr.js +5 -0
- package/dist/public/assets/{cose-bilkent-JH36ORCC-YCEFr4ip.js → cose-bilkent-JH36ORCC-D0CYnCA3.js} +1 -1
- package/dist/public/assets/cynefin-VYW2F7L2-CjkKc5Wd.js +1 -0
- package/dist/public/assets/{cynefinDiagram-TSTJHNR4-BRxY_0dy.js → cynefinDiagram-TSTJHNR4-Bgric3JJ.js} +1 -1
- package/dist/public/assets/{dagre-VKFMJZFB-BTPOxYfv.js → dagre-VKFMJZFB-BXjUnJMs.js} +1 -1
- package/dist/public/assets/{dagre-4yTvJ5bN.js → dagre-uJOGPMM-.js} +1 -1
- package/dist/public/assets/{diagram-FQU43EPY-C6lvEDUr.js → diagram-FQU43EPY-dXOWFjMG.js} +1 -1
- package/dist/public/assets/{diagram-G47NLZAW-BHMtTNZp.js → diagram-G47NLZAW-zdJG9pHl.js} +1 -1
- package/dist/public/assets/{diagram-NH7WQ7WH-CaxSgclq.js → diagram-NH7WQ7WH-BVYbs_C0.js} +1 -1
- package/dist/public/assets/{diagram-OA4YK3LP-C_1H_cmz.js → diagram-OA4YK3LP-Ds5ohbs1.js} +1 -1
- package/dist/public/assets/{diagram-WEI45ONY-hy5nz4b2.js → diagram-WEI45ONY-BluqqbZ4.js} +1 -1
- package/dist/public/assets/{dialog-DwFomKjP.js → dialog-eak3pI7G.js} +1 -1
- package/dist/public/assets/{dist-CJtNQVui.js → dist--4AcVRue.js} +1 -1
- package/dist/public/assets/{dist-BHX9GuTC.js → dist-BCM06z1D.js} +1 -1
- package/dist/public/assets/{dist-CFDOSoEm.js → dist-BDJLSjo2.js} +1 -1
- package/dist/public/assets/{dist-aEzrjz-4.js → dist-CkHhDuKZ.js} +1 -1
- package/dist/public/assets/{dist-Cz7Q9WAs.js → dist-ClczuKkQ.js} +1 -1
- package/dist/public/assets/{dist-AhKSYQhE2.js → dist-DJ3iQH0N.js} +1 -1
- package/dist/public/assets/{dist-CdZbZpjt.js → dist-DNV7r8rH.js} +1 -1
- package/dist/public/assets/{dist-DdN4_oB-.js → dist-DndwauQ3.js} +1 -1
- package/dist/public/assets/{dist-DgD72kci.js → dist-DvtYFuZI.js} +1 -1
- package/dist/public/assets/dist-PVtTd_Sj2.js +579 -0
- package/dist/public/assets/{dist-HbUc9U1a.js → dist-Wj2cwRLU.js} +1 -1
- package/dist/public/assets/{dist-BX-8uxZE.js → dist-hwUYIgzz.js} +1 -1
- package/dist/public/assets/{dist-KXQQa8Xt.js → dist-tByLfm_n.js} +1 -1
- package/dist/public/assets/{dist-C7PQBily.js → dist-yYRRvtMr.js} +1 -1
- package/dist/public/assets/{doc-paths-9WcZxMIM.js → doc-paths-CH8QyanF.js} +1 -1
- package/dist/public/assets/{documents-events-Dq_N3aGS.js → documents-events-COSAPFkC.js} +1 -1
- package/dist/public/assets/{download-QOlmqXQ8.js → download-Bq4sKAdj.js} +1 -1
- package/dist/public/assets/{dropdown-menu-DRytYgB4.js → dropdown-menu-BhMtMvZp.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-CCIWWBDH-CSOwp-KN.js → ebnfDiagram-CCIWWBDH-BWiN4nWj.js} +1 -1
- package/dist/public/assets/{erDiagram-Q63AITRT-CulC3etm.js → erDiagram-Q63AITRT-5GE6Syx5.js} +1 -1
- package/dist/public/assets/eventmodeling-45OFAUF4-GQ05Sah7.js +1 -0
- package/dist/public/assets/{eye-CArKS_Md.js → eye-DYUvwA0Z.js} +1 -1
- package/dist/public/assets/field-DN11CYjs.js +1 -0
- package/dist/public/assets/{file-tree-adapter-NUvHutlM.js → file-tree-adapter-B9dmiTPy.js} +1 -1
- package/dist/public/assets/{file-tree-utils-Bifzlv6n.js → file-tree-utils-CvsKsHRh.js} +1 -1
- package/dist/public/assets/flowDiagram-23GEKE2U-CwO12b-s.js +1 -0
- package/dist/public/assets/{folder-DxrU2PLH.js → folder-Cnftw7jd.js} +1 -1
- package/dist/public/assets/{folder-config-api-M7RkoKuk.js → folder-config-api-IGZhtkRo.js} +1 -1
- package/dist/public/assets/{folder-open-ee990ToL.js → folder-open-DoQalFip.js} +1 -1
- package/dist/public/assets/follow-file-CWSsUd-S.js +1 -0
- package/dist/public/assets/{ganttDiagram-NO4QXBWP-iVPMtR6h.js → ganttDiagram-NO4QXBWP-DGnL6oh-.js} +1 -1
- package/dist/public/assets/gherkin-DHKdvgzn.js +1 -0
- package/dist/public/assets/{git-branch-B0WeYwW-.js → git-branch-BWBPTGqT.js} +1 -1
- package/dist/public/assets/gitGraph-TEB2WS4Q-Da8kWWZb.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-IHSO6WYX-DdI0uf23.js → gitGraphDiagram-IHSO6WYX-mMfBO0xv.js} +1 -1
- package/dist/public/assets/{globals-BdT8IUNf.js → globals-C-kRTFCu.js} +2 -2
- package/dist/public/assets/globals-D9Q1kf3c.css +1 -0
- package/dist/public/assets/{graphlib-2sje7ygs.js → graphlib-CS7i3af0.js} +1 -1
- package/dist/public/assets/{hash-CDGtqqEo.js → hash-BZXl_HqD.js} +1 -1
- package/dist/public/assets/{highlighted-body-OFNGDK62-nVG7xLpg.js → highlighted-body-OFNGDK62-Bc_b2HT_.js} +1 -1
- package/dist/public/assets/history-BNEST2Cx.js +1 -0
- package/dist/public/assets/html-void-elements-Bkr32DGT.js +1 -0
- package/dist/public/assets/i18n-CIRn0AvV.js +1 -0
- package/dist/public/assets/index-Dmlpu4P1.js +2097 -0
- package/dist/public/assets/info-DKCQHKI2-BPZv5cfZ.js +1 -0
- package/dist/public/assets/{info-BnJuC0vW.js → info-Jj1j2YxC.js} +1 -1
- package/dist/public/assets/{infoDiagram-FWYZ7A6U-CCLCXbok.js → infoDiagram-FWYZ7A6U-DuU1GDQ6.js} +1 -1
- package/dist/public/assets/{input-group-BgDCDWUR.js → input-group-H-ZoGiXT.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-FXEZZL3T-DYNfj8DM.js → ishikawaDiagram-FXEZZL3T-Bg0KJFCj.js} +1 -1
- package/dist/public/assets/{journeyDiagram-5HDEW3XC-D3IdBiiM.js → journeyDiagram-5HDEW3XC-DLWkGhNH.js} +1 -1
- package/dist/public/assets/{kanban-definition-HUTT4EX6-CF_ZN-jM.js → kanban-definition-HUTT4EX6-BhYGhRMu.js} +1 -1
- package/dist/public/assets/lib-BHGXbMkc.js +9 -0
- package/dist/public/assets/lib-DcrRfjuF.js +29 -0
- package/dist/public/assets/{line-BA7emVey.js → line-e19R8FCM.js} +1 -1
- package/dist/public/assets/{linear-CUFA2OWO.js → linear-a82bFSBJ.js} +1 -1
- package/dist/public/assets/{lint-config-client-DdmzNw30.js → lint-config-client-DkwFMG_T.js} +1 -1
- package/dist/public/assets/list-plus-IYEFhKGU.js +1 -0
- package/dist/public/assets/loader-circle-Coob8S41.js +1 -0
- package/dist/public/assets/{local-menu-action-bus-iy6v2osW.js → local-menu-action-bus-DLozq_c4.js} +1 -1
- package/dist/public/assets/{map-DbAr_xa0.js → map-il90ypLM.js} +1 -1
- package/dist/public/assets/markdownlint-rule-browser-DY5CRVFm.js +1 -0
- package/dist/public/assets/mascot-outline-CtS592mc.js +1 -0
- package/dist/public/assets/mcp-consent-store-B_Tog3LX.js +1 -0
- package/dist/public/assets/mermaid-GHXKKRXX-CaB-_LCR.js +1 -0
- package/dist/public/assets/{mermaid-parser.core-B8FUrn7y.js → mermaid-parser.core-ueh8mdU-.js} +2 -2
- package/dist/public/assets/{mermaid.core-gcfl0bT0.js → mermaid.core-RZ5le45c.js} +3 -3
- package/dist/public/assets/messages-6Fd7I7zn.js +1 -0
- package/dist/public/assets/messages-BJIB1I1L.js +1 -0
- package/dist/public/assets/messages-BOXmrfhw.js +1 -0
- package/dist/public/assets/messages-BeOM8jWl.js +1 -0
- package/dist/public/assets/messages-CCWKIebo.js +1 -0
- package/dist/public/assets/messages-CQFityfC.js +1 -0
- package/dist/public/assets/messages-CzRXVtjz.js +1 -0
- package/dist/public/assets/messages-DYiuNk7y.js +1 -0
- package/dist/public/assets/messages-Db5U-G1d.js +1 -0
- package/dist/public/assets/messages-DohtKbKM.js +1 -0
- package/dist/public/assets/messages-WWFblTuV.js +1 -0
- package/dist/public/assets/{mindmap-definition-LN4V7U3C-9ySd_DkR.js → mindmap-definition-LN4V7U3C-Bcv7y0kn.js} +1 -1
- package/dist/public/assets/minus-DPAjfzCa.js +1 -0
- package/dist/public/assets/{miss-dialog-store-B3cHkf8G.js → miss-dialog-store--ihxgGwV.js} +1 -1
- package/dist/public/assets/navigation-targets-DKe7BSku.js +1 -0
- package/dist/public/assets/{now-B4vxsI1S.js → now-CZywS9tX.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-Dt-nEURF.js → open-managed-artifact-tab-DGO7syz6.js} +1 -1
- package/dist/public/assets/{ordinal-Cfxeoxe-.js → ordinal-Bj6MlRdi.js} +1 -1
- package/dist/public/assets/packet-7NZHBO7P-BtkfuFQU.js +1 -0
- package/dist/public/assets/{panel-right-open-Cc56I_GE.js → panel-right-open-BhUOm1Eq.js} +1 -1
- package/dist/public/assets/{paperclip-D7KMFbO9.js → paperclip-9gdTBktj.js} +1 -1
- package/dist/public/assets/{pegDiagram-2B236MQR-cNCSiNUP.js → pegDiagram-2B236MQR-Du6F68bP.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-B0J2CSDv.js → pending-receive-nav-store-SZ8w-xKW.js} +1 -1
- package/dist/public/assets/pie-RZYD4A2V-DipSPJ4R.js +1 -0
- package/dist/public/assets/{pieDiagram-ENE6RG2P-C2bxi6W1.js → pieDiagram-ENE6RG2P-Du-eEA1d.js} +1 -1
- package/dist/public/assets/project-paths-fLhDAPyF.js +1 -0
- package/dist/public/assets/prop-types-DoONHMUn.js +1 -0
- package/dist/public/assets/{quadrantDiagram-ABIIQ3AL-C8AftH1G.js → quadrantDiagram-ABIIQ3AL-NefyxxyK.js} +1 -1
- package/dist/public/assets/radar-I7S5WNFK-CsW1Ke6j.js +1 -0
- package/dist/public/assets/railroad-3IZDKUUU-CDGYvuvs.js +1 -0
- package/dist/public/assets/railroad-abnf-AHOZXSZD-IJHoKQ5T.js +1 -0
- package/dist/public/assets/railroad-ebnf-EBAXGLYW-DiwXL3Zg.js +1 -0
- package/dist/public/assets/railroad-peg-LSFZ7HO6-B4tduAeK.js +1 -0
- package/dist/public/assets/{railroadDiagram-RFXS5EU6-CZh61tJk.js → railroadDiagram-RFXS5EU6-CN_1Ywzn.js} +1 -1
- package/dist/public/assets/receive-store-BvkW9HUo.js +2 -0
- package/dist/public/assets/{refresh-cw-DGLnzhho.js → refresh-cw-REpEMEB2.js} +1 -1
- package/dist/public/assets/{requirementDiagram-TGXJPOKE-CQLu3M38.js → requirementDiagram-TGXJPOKE-bDLvkWBT.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-HTMAVEWB-Bjus_sTX.js → sankeyDiagram-HTMAVEWB-CyhjQEet.js} +1 -1
- package/dist/public/assets/schema-fields-view-intent-DZFjFt0c.js +1 -0
- package/dist/public/assets/{select-BU4xT6VN.js → select-CRztynyQ.js} +1 -1
- package/dist/public/assets/{selection-context-7jZla8LT.js → selection-context-CSP8zK1H.js} +1 -1
- package/dist/public/assets/separator-k0mwGcaM.js +1 -0
- package/dist/public/assets/{sequenceDiagram-DBY2YBRQ-BR7Ay_cV.js → sequenceDiagram-DBY2YBRQ-BeYilBxj.js} +1 -1
- package/dist/public/assets/{sizeCapture-X5ZJPWSS-B6c4PqMD.js → sizeCapture-X5ZJPWSS-Mb3J__hm.js} +1 -1
- package/dist/public/assets/skill-actions-98H3SnCL.js +2 -0
- package/dist/public/assets/{skill-scope-CBI04cxU.js → skill-scope-Dr7iwSW3.js} +1 -1
- package/dist/public/assets/skills-api-qDbnaMmu.js +1 -0
- package/dist/public/assets/{square-pen-CEIus1aL.js → square-pen-D3oI-YUs.js} +1 -1
- package/dist/public/assets/{src-BFmudBKQ.js → src-DT86yydp.js} +1 -1
- package/dist/public/assets/{src-Ab-J5Fjb.js → src-VcUCSe0b.js} +2 -2
- package/dist/public/assets/{stateDiagram-2N3HPSRC-DJmlM8IW.js → stateDiagram-2N3HPSRC-D0WNjYjx.js} +1 -1
- package/dist/public/assets/stateDiagram-v2-6OUMAXLB-NccT1PAw.js +1 -0
- package/dist/public/assets/{swimlanes-5IMT3BWC-D8ijXWBf.js → swimlanes-5IMT3BWC-BAPdgrYU.js} +2 -2
- package/dist/public/assets/swimlanesDiagram-G3AALYLV-CIDy7tZE.js +8 -0
- package/dist/public/assets/{tag-pill-input-DGyTCP4J.js → tag-pill-input-pBac7WXR.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-CFlZwKM6.js → target-navigation-intent-DAyeqt__.js} +1 -1
- package/dist/public/assets/{telemetry-impl-DeQzH0Qy.js → telemetry-impl-C9jF13xo.js} +2 -2
- package/dist/public/assets/{telemetry-startup-CF9C031W.js → telemetry-startup-1DamiHqT.js} +1 -1
- package/dist/public/assets/terminal-command-events-BBYZtptJ.js +1 -0
- package/dist/public/assets/terminal-launch-events-CIULxHeu.js +1 -0
- package/dist/public/assets/terminal-mGTI25Qq.js +1 -0
- package/dist/public/assets/{terminal-telemetry-DIHFpeby.js → terminal-telemetry-CqkILJJU.js} +1 -1
- package/dist/public/assets/text-viewer-languages-BTzKrM_y.js +2 -0
- package/dist/public/assets/thread-client-DSDduEdo.js +1 -0
- package/dist/public/assets/{timeline-definition-FHXFAJF6-DwBMj07Z.js → timeline-definition-FHXFAJF6-BnIpQBQO.js} +1 -1
- package/dist/public/assets/{trash-2-Ccq_llrY.js → trash-2-BSr7FcE8.js} +1 -1
- package/dist/public/assets/treeView-QDETBFTQ-DCy4i-OI.js +1 -0
- package/dist/public/assets/treemap-6X3UGDF4-BrUnfA75.js +1 -0
- package/dist/public/assets/{triangle-alert-V8YoC6ss.js → triangle-alert-DNTyNeem.js} +1 -1
- package/dist/public/assets/typing-burst-detector-BOmjXV-P.js +8 -0
- package/dist/public/assets/{undo-2-bYFSgQwb.js → undo-2-u9f9OoCF.js} +1 -1
- package/dist/public/assets/uninstall-36twrq5C.js +1 -0
- package/dist/public/assets/{use-activity-panel-CRG7InWx.js → use-activity-panel-BwANCYjg.js} +1 -1
- package/dist/public/assets/{use-collab-url-D2bQBB0t.js → use-collab-url-TKpnPAW8.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-CqKt6OLh.js → use-live-xterm-theme-B8OPZLR3.js} +1 -1
- package/dist/public/assets/{use-open-skill-CDmkCs_J.js → use-open-skill-DCSEJ3jJ.js} +1 -1
- package/dist/public/assets/use-settings-route-CKMxexs3.js +1 -0
- package/dist/public/assets/{use-skill-directory-DSeLowCq.js → use-skill-directory-D9S5f8By.js} +1 -1
- package/dist/public/assets/{use-skill-origin-CdIbGanW.js → use-skill-origin-8_nwflm6.js} +1 -1
- package/dist/public/assets/use-skills-D5kEHDif.js +1 -0
- package/dist/public/assets/{use-terminal-enabled-DvxUowUp.js → use-terminal-enabled-Ctosnrg_.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-DQLimR9f.js → use-timeline-entry-diff-CB_cI1yy.js} +4 -4
- package/dist/public/assets/use-workspace--QTATo27.js +1 -0
- package/dist/public/assets/{vennDiagram-L72KCM5P-DZxwOiUn.js → vennDiagram-L72KCM5P-C38RYC28.js} +1 -1
- package/dist/public/assets/wardley-OPB4EBWU-yXijkZ08.js +1 -0
- package/dist/public/assets/{wardleyDiagram-EHGQE667-D44Ff-nh.js → wardleyDiagram-EHGQE667-B0VRsKo1.js} +1 -1
- package/dist/public/assets/workspace-paths-EgbOaHls.js +1 -0
- package/dist/public/assets/{wrench-D8b4qpCM.js → wrench-BPXVnAE5.js} +1 -1
- package/dist/public/assets/x-COTyTduF.js +1 -0
- package/dist/public/assets/{xychartDiagram-FW5EYKEG-B_4MyxsA.js → xychartDiagram-FW5EYKEG-jAQK9E85.js} +1 -1
- package/dist/public/index.html +160 -130
- package/dist/public/uninstall.html +19 -15
- package/dist/{repair-launch-json-qTKC25he.mjs → repair-launch-json-Cq9ghST3.mjs} +2 -2
- package/dist/{repair-mcp-configs-Ck9JhU-6.mjs → repair-mcp-configs-DY0FS2-y.mjs} +2 -2
- package/dist/{repair-skills-Dnr2Baut.mjs → repair-skills-CkZZbtNk.mjs} +2 -2
- package/dist/repair-skills-l9Id0gzv.mjs +1 -0
- package/dist/schemas/v0/config.user.schema.json +38 -0
- package/dist/{server-lock-GZh5XRQk.mjs → server-lock-BleUv9m0.mjs} +2 -2
- package/dist/server-lock-uucDARDL.mjs +1 -0
- package/dist/{skill-teardown-kmCtX6GY.mjs → skill-teardown-CZnemDLF.mjs} +2 -2
- package/dist/{sleep-ByqzSHar.mjs → sleep-DVOInM4H.mjs} +5 -5
- package/dist/{src-crfhwdu0.mjs → src-9BFQh559.mjs} +6 -6
- package/dist/{src-DUBkXvUa.mjs → src-9I3GiOoK.mjs} +400 -398
- package/dist/{src-DLDOch6T.mjs → src-Dl8P6sfz.mjs} +2 -2
- package/dist/{src-BXetmbJ1.mjs → src-h5dDPK2z.mjs} +1 -1
- package/dist/start-BYY0acPS.mjs +1 -0
- package/dist/{start-AaOkShov.mjs → start-C4KuZHu5.mjs} +3 -3
- package/dist/{write-project-skill-CbLmhWjs.mjs → write-project-skill-WXZSbQlg.mjs} +2 -2
- package/package.json +4 -4
- package/dist/constants-Cs9yCGJ3.mjs +0 -2
- package/dist/fs-traced-WMTb98_i.mjs +0 -1
- package/dist/git-handle-D2Z8RT5q.mjs +0 -1
- package/dist/init-D97DTFnt.mjs +0 -1
- package/dist/loader-CRMCRkRI.mjs +0 -1
- package/dist/md-manager-CApQ8lSb.mjs +0 -2
- package/dist/preview-B5fyX2N1.mjs +0 -1
- package/dist/public/assets/BugReportHistory-C_4-NQ-j.js +0 -1
- package/dist/public/assets/ChangedOutsideBadge-EtTRyMst.js +0 -1
- package/dist/public/assets/CodeMirrorPropInput-Cc1LhUu6.js +0 -3
- package/dist/public/assets/DocumentContext-C21t23gR.js +0 -38
- package/dist/public/assets/FeedbackForm-Bxl-ARCE.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-2uKbG7zi.js +0 -2
- package/dist/public/assets/ManagedArtifactProperties-BUlDlZD7.js +0 -1
- package/dist/public/assets/SchemaConfigEditor-BM14WhF5.js +0 -1
- package/dist/public/assets/SessionsHost-BMspzxaf.js +0 -2
- package/dist/public/assets/SettingsDialogBody-BwZ4EbH9.js +0 -12
- package/dist/public/assets/SkillToolbarControls-DlqLImDa.js +0 -1
- package/dist/public/assets/SourceEditor-C_2k6Civ.js +0 -1
- package/dist/public/assets/TerminalPanel-FZwnOTrU.js +0 -146
- package/dist/public/assets/ThreadView-CQyd4n73.js +0 -6
- package/dist/public/assets/agent-visibility-DTb0lCVi.js +0 -1
- package/dist/public/assets/architecture-TIHT7OUA-Bu3B2Eu7.js +0 -1
- package/dist/public/assets/arrow-up-right-Gp4MuO-g.js +0 -1
- package/dist/public/assets/auth-state-cache-BMNySofF.js +0 -11
- package/dist/public/assets/channel-BBYqtvcN.js +0 -1
- package/dist/public/assets/check-DLRoQSSY.js +0 -1
- package/dist/public/assets/chevron-left-BRFq0qcJ.js +0 -1
- package/dist/public/assets/chevron-right-BjiB8LDf.js +0 -1
- package/dist/public/assets/chunk-2Q5K7J3B-DeGCwTid.js +0 -1
- package/dist/public/assets/chunk-VAUOI2AC-B4WVYMGW.js +0 -1
- package/dist/public/assets/chunk-XXDRQBXY-DjPNLLex.js +0 -1
- package/dist/public/assets/classDiagram-OUVF2IWQ-CusZeKDE.js +0 -1
- package/dist/public/assets/classDiagram-v2-EOCWNBFH-3Dd_UHkU.js +0 -1
- package/dist/public/assets/client-version-D7DMknC6.js +0 -1
- package/dist/public/assets/config-provider-xRIhjgw3.js +0 -4
- package/dist/public/assets/cynefin-VYW2F7L2-Dh2yc-Yt.js +0 -1
- package/dist/public/assets/dist-CW-WKphO2.js +0 -587
- package/dist/public/assets/eventmodeling-45OFAUF4-CoqTTBqG.js +0 -1
- package/dist/public/assets/field-iFofWrdC.js +0 -1
- package/dist/public/assets/flowDiagram-23GEKE2U-BKkbdW0r.js +0 -1
- package/dist/public/assets/follow-file-CRicwLk4.js +0 -1
- package/dist/public/assets/gitGraph-TEB2WS4Q-D2tde3MB.js +0 -1
- package/dist/public/assets/globals-Bl3fKb9V.css +0 -1
- package/dist/public/assets/index-BHlkZE7z.js +0 -2091
- package/dist/public/assets/info-DKCQHKI2-DIQGY0RW.js +0 -1
- package/dist/public/assets/lib-CtlgmvnR.js +0 -29
- package/dist/public/assets/loader-circle-B0OUuKph.js +0 -1
- package/dist/public/assets/markdownlint-rule-browser-DVOGLsiR.js +0 -1
- package/dist/public/assets/mcp-consent-store-Dz4H-8gV.js +0 -1
- package/dist/public/assets/mermaid-GHXKKRXX-uJrCvmwj.js +0 -1
- package/dist/public/assets/minus-CKcpBpdR.js +0 -1
- package/dist/public/assets/navigation-targets-DdhmqoI-.js +0 -1
- package/dist/public/assets/packet-7NZHBO7P-C6h6PguP.js +0 -1
- package/dist/public/assets/pie-RZYD4A2V-BgsL62qC.js +0 -1
- package/dist/public/assets/project-paths--7l9Mqe-.js +0 -1
- package/dist/public/assets/prop-types-CVvMIZSF.js +0 -1
- package/dist/public/assets/radar-I7S5WNFK-2Fukjsh1.js +0 -1
- package/dist/public/assets/railroad-3IZDKUUU-BXQstaOW.js +0 -1
- package/dist/public/assets/railroad-abnf-AHOZXSZD-D4DJxFB6.js +0 -1
- package/dist/public/assets/railroad-ebnf-EBAXGLYW-B9wL5Mgq.js +0 -1
- package/dist/public/assets/railroad-peg-LSFZ7HO6-TRaMzMt0.js +0 -1
- package/dist/public/assets/receive-store-2bhS8vt2.js +0 -2
- package/dist/public/assets/schema-fields-view-intent-Df0KnOO8.js +0 -1
- package/dist/public/assets/separator-C4EdGs_S.js +0 -1
- package/dist/public/assets/skill-actions-l08GRiO6.js +0 -2
- package/dist/public/assets/skills-api-jQmbZiBx.js +0 -1
- package/dist/public/assets/stateDiagram-v2-6OUMAXLB-DJeEhrn3.js +0 -1
- package/dist/public/assets/swimlanesDiagram-G3AALYLV-D5vkX5fS.js +0 -8
- package/dist/public/assets/terminal-launch-events-D6T-0OQp.js +0 -1
- package/dist/public/assets/text-viewer-languages-DEjz8Rlz.js +0 -2
- package/dist/public/assets/thread-client-BVh92ozO.js +0 -1
- package/dist/public/assets/treeView-QDETBFTQ-DItjR5Rl.js +0 -1
- package/dist/public/assets/treemap-6X3UGDF4-D1JSLPGs.js +0 -1
- package/dist/public/assets/typing-burst-detector-o8zxjyyw.js +0 -8
- package/dist/public/assets/uninstall-DFBJKlqL.js +0 -1
- package/dist/public/assets/use-settings-route-DBrH-P64.js +0 -1
- package/dist/public/assets/use-skills-w-wrmauP.js +0 -1
- package/dist/public/assets/use-workspace-C4drLo4u.js +0 -1
- package/dist/public/assets/wardley-OPB4EBWU-BEy33__G.js +0 -1
- package/dist/public/assets/x-B3zGPHCO.js +0 -1
- package/dist/repair-skills-e-0cKdGP.mjs +0 -1
- package/dist/server-lock-D_8go_hh.mjs +0 -1
- package/dist/start-CSBiE0HL.mjs +0 -1
- /package/dist/public/assets/{ActivityPanelDiffView-DZrMHlZH.js → ActivityPanelDiffView-aQoOngI6.js} +0 -0
- /package/dist/public/assets/{SkillModeBanner-DFgrdWyf.js → SkillModeBanner-Y5LYtJrC.js} +0 -0
- /package/dist/public/assets/{__vite-browser-external-CL4duhlG.js → __vite-browser-external-6FU8ctEn.js} +0 -0
- /package/dist/public/assets/{agent-presence-C8KjkxgZ.js → agent-presence-DntZZFlY.js} +0 -0
- /package/dist/public/assets/{array-DRGYhAwX.js → array-Ce922FV9.js} +0 -0
- /package/dist/public/assets/{asset-dispatch-O9x3rXhj.js → asset-dispatch-Dst62kKY.js} +0 -0
- /package/dist/public/assets/{auth-prompt-store-DQ_HcDxh.js → auth-prompt-store-B92v76dM.js} +0 -0
- /package/dist/public/assets/{badge-CnYDYmI5.js → badge-B89o8Vy9.js} +0 -0
- /package/dist/public/assets/{chunk-KEIR6QF5-CTDrJ2_V.js → chunk-KEIR6QF5-88h2AcFS.js} +0 -0
- /package/dist/public/assets/{chunk-Y2CYZVJY-WQQLMo_s.js → chunk-Y2CYZVJY-B-DQ9l1H.js} +0 -0
- /package/dist/public/assets/{clike-BfpXCH0g.js → clike-DDeLLKpf.js} +0 -0
- /package/dist/public/assets/{clipboard-adapter-DPkNOslT.js → clipboard-adapter-C4L1qX1X.js} +0 -0
- /package/dist/public/assets/{colors-BY0RBIvp.js → colors-DXv_7g0X.js} +0 -0
- /package/dist/public/assets/{copilot-CuzHDCzI.js → copilot-qpaFt06v.js} +0 -0
- /package/dist/public/assets/{createLucideIcon-BbgVV4EV.js → createLucideIcon-BbftclCc.js} +0 -0
- /package/dist/public/assets/{cursor-W0skD8YU.js → cursor-Df-vt--2.js} +0 -0
- /package/dist/public/assets/{cytoscape.esm-Ck6hca6m.js → cytoscape.esm-61X9Wf4W.js} +0 -0
- /package/dist/public/assets/{defaultLocale-C9lDPH35.js → defaultLocale-BypL9rsE.js} +0 -0
- /package/dist/public/assets/{desktop-bridge-types-BwR5S9HF.js → desktop-bridge-types-BjBBs_pU.js} +0 -0
- /package/dist/public/assets/{diff-CvjWTdgS.js → diff-CUOV9XAb.js} +0 -0
- /package/dist/public/assets/{dist-CTHTGkF4.js → dist-BSzXg9wc.js} +0 -0
- /package/dist/public/assets/{dist-zYQJXuRH.js → dist-BlH6jxEE.js} +0 -0
- /package/dist/public/assets/{dist-CpRBr-Ct.js → dist-C7IFraT6.js} +0 -0
- /package/dist/public/assets/{dist-DmEZHXvB.js → dist-CEwo98ia.js} +0 -0
- /package/dist/public/assets/{dist-DIZJMUWy.js → dist-CG-e4AlS.js} +0 -0
- /package/dist/public/assets/{documents-fetch-DK-kdvYE.js → documents-fetch-BTUkzxjd.js} +0 -0
- /package/dist/public/assets/{external-link-COF7NUCm.js → external-link-BkNoUOYg.js} +0 -0
- /package/dist/public/assets/{file-tree-rename-validation-DEz_ryBu.js → file-tree-rename-validation-CEz8MVWM.js} +0 -0
- /package/dist/public/assets/{form-CGbOgaUs.js → form-WTEKK5Th.js} +0 -0
- /package/dist/public/assets/{format-CFFWVvag.js → format-C7y0e043.js} +0 -0
- /package/dist/public/assets/{go-D-9nxjMR.js → go-C7e4ztpP.js} +0 -0
- /package/dist/public/assets/{init-Dpr8Tcj2.js → init-DQ9T43b9.js} +0 -0
- /package/dist/public/assets/{input-CtKG6a5B.js → input-BKUcczSW.js} +0 -0
- /package/dist/public/assets/{isObject-B_BLuINR.js → isObject-B3vD71ho.js} +0 -0
- /package/dist/public/assets/{katex-7OG0ksww.js → katex-BE6VA85g.js} +0 -0
- /package/dist/public/assets/{libesm-Dcsy_--i.js → libesm-DLjHMG6S.js} +0 -0
- /package/dist/public/assets/{lint-plugin-meta-BnniPb1r.js → lint-plugin-meta-D6yg1VIa.js} +0 -0
- /package/dist/public/assets/{lru-string-cache-jJ5hyYK1.js → lru-string-cache-D1rxjuni.js} +0 -0
- /package/dist/public/assets/{lua-qAotk3Jg.js → lua-BbsHik3c.js} +0 -0
- /package/dist/public/assets/{markdownit-DoX6x6DK.js → markdownit-CIgVFnWs.js} +0 -0
- /package/dist/public/assets/{min-CCEG0l64.js → min-LWIJDKXt.js} +0 -0
- /package/dist/public/assets/{overlay-layers-CBGNHxJK.js → overlay-layers-BqWhClsR.js} +0 -0
- /package/dist/public/assets/{panel-UxAkffLp.js → panel-CbGx_cRv.js} +0 -0
- /package/dist/public/assets/{panzoom.es-H6kNXvjN.js → panzoom.es-CnTJleIF.js} +0 -0
- /package/dist/public/assets/{parse-api-error-BFe1cdS7.js → parse-api-error-Cyn4P6OR.js} +0 -0
- /package/dist/public/assets/{path-56QyJhyg.js → path-CdhP4z-N.js} +0 -0
- /package/dist/public/assets/{pdf-CYHvv2Oq.js → pdf-CvpTyCsQ.js} +0 -0
- /package/dist/public/assets/{pdf.worker-B8Ju19hh.js → pdf.worker-Dwl0H-tq.js} +0 -0
- /package/dist/public/assets/{perl-E4P7BXaC.js → perl-B_IBZ74F.js} +0 -0
- /package/dist/public/assets/{properties-DXHbGwrb.js → properties-DC2eg36q.js} +0 -0
- /package/dist/public/assets/{r-DCDstkyG.js → r-Cuws8T_X.js} +0 -0
- /package/dist/public/assets/{rough.esm-DE_lJ5Ge.js → rough.esm-Bmw38t74.js} +0 -0
- /package/dist/public/assets/{ruby-DeKk3LV3.js → ruby-B4Exyfkx.js} +0 -0
- /package/dist/public/assets/{share-metadata-rows-B1YjvGbL.js → share-metadata-rows-a0ScdR3d.js} +0 -0
- /package/dist/public/assets/{shell-BRtU48Yb.js → shell-DA6f2ert.js} +0 -0
- /package/dist/public/assets/{skeleton-DS8zjX9Q.js → skeleton-ColtBPsg.js} +0 -0
- /package/dist/public/assets/{sortable.esm-BT6d9PDz.js → sortable.esm-DlAqBM0z.js} +0 -0
- /package/dist/public/assets/{sql-XsKG_-B3.js → sql-gKfhysbI.js} +0 -0
- /package/dist/public/assets/{src-DLd5TgYd.js → src-l8acH7-t.js} +0 -0
- /package/dist/public/assets/{startup-marks-BJYEMeGu.js → startup-marks-BzFN1cqP.js} +0 -0
- /package/dist/public/assets/{stex-B3qxBOBU.js → stex-CyLY7DTo.js} +0 -0
- /package/dist/public/assets/{swift-CGhDVaQR.js → swift-D4PiCeXt.js} +0 -0
- /package/dist/public/assets/{textarea-CUVLEZhx.js → textarea-C5-cm3M6.js} +0 -0
- /package/dist/public/assets/{thread-draft-staging-BXLyxk1u.js → thread-draft-staging-DZhf3sQU.js} +0 -0
- /package/dist/public/assets/{timeline-diff-store-sC1fl4YV.js → timeline-diff-store-BpUHW_Yp.js} +0 -0
- /package/dist/public/assets/{toml-DkvxgD0C.js → toml-BAg1ozw3.js} +0 -0
- /package/dist/public/assets/{use-installed-clis-B7_xP0xS.js → use-installed-clis-CsPJ2Mod.js} +0 -0
- /package/dist/public/assets/{useLintConfigViewMode-C3vaXrG0.js → useLintConfigViewMode-shAfv89B.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,o as t,r as n,t as r}from"./chunk-DTipWd-i.mjs";import{A as i,B as a,Ct as o,Et as s,G as c,I as l,M as u,N as d,P as f,X as p,Y as m,_t as h,at as g,bt as _,dt as v,ft as y,gt as b,it as x,j as S,mt as C,nt as w,ot as T,pt as E,st as D,tt as O,u as ee,ut as te,vt as k,xt as ne,yt as A,z as re}from"./sleep-
|
|
1
|
+
import{i as e,o as t,r as n,t as r}from"./chunk-DTipWd-i.mjs";import{A as i,B as a,Ct as o,Et as s,G as c,I as l,M as u,N as d,P as f,X as p,Y as m,_t as h,at as g,bt as _,dt as v,ft as y,gt as b,it as x,j as S,mt as C,nt as w,ot as T,pt as E,st as D,tt as O,u as ee,ut as te,vt as k,xt as ne,yt as A,z as re}from"./sleep-DVOInM4H.mjs";import{n as ie,t as ae}from"./markdownit-BNz2xGu4.mjs";import j from"node:path";import oe from"node:process";import{fileURLToPath as se}from"node:url";import{access as ce,accessSync as M,readFile as N,readFileSync as le}from"node:fs";import{EOL as ue,homedir as de}from"node:os";const fe=y({at:k(),transport:k(),outcome:k(),reference:k().optional(),error:k().optional()}),pe=y({reason:k(),at:k()});y({version:E().int().catch(1),id:k(),createdAt:k(),bundleLevel:k(),zipBytes:E().int().nonnegative().catch(0),zipDeleted:g().optional(),state:k(),systemWide:g().optional(),projectSlug:k().nullable().optional(),reference:k().optional(),lastError:pe.optional(),attempts:x(fe).optional(),note:k().optional()});const me=1,he={protocol:`x-ok-client-protocol`,runtime:`x-ok-client-runtime`,kind:`x-ok-client-kind`};function ge({kind:e,runtimeVersion:t}){return{[he.protocol]:`1`,[he.runtime]:t,[he.kind]:e}}const _e=[{name:`macos-home-path`,regex:/\/Users\/[^/]+\//g,replacement:`~/`},{name:`linux-home-path`,regex:/\/home\/[^/]+\//g,replacement:`~/`},{name:`github-pat`,regex:/\b(ghp_|gho_|ghu_|ghs_|ghr_)[A-Za-z0-9]{36,}\b/g,replacement:`[REDACTED-GH-PAT]`},{name:`aws-access-key`,regex:/\b(AKIA|ASIA|ABIA)[A-Z2-7]{16}\b/g,replacement:`[REDACTED-AWS-KEY]`},{name:`anthropic-key`,regex:/\bsk-ant-api03-[A-Za-z0-9_-]{20,}\b/g,replacement:`[REDACTED-ANTHROPIC]`},{name:`openai-key`,regex:/\bsk-[A-Za-z0-9]{20,}\b/g,replacement:`[REDACTED-OPENAI]`},{name:`bearer-token`,regex:/([Aa]uthorization:\s*[Bb]earer\s+)\S+/g,replacement:`$1[REDACTED]`},{name:`jwt`,regex:/eyJ[A-Za-z0-9_-]{8,}\.eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/g,replacement:`[REDACTED-JWT]`},{name:`url-credentials`,regex:/:\/\/[^/\s:@]+:[^/\s:@]+@/g,replacement:`://[REDACTED]@`},{name:`github-pat-fine-grained`,regex:/\bgithub_pat_[0-9A-Za-z_]{20,}/g,replacement:`[REDACTED-GH-PAT]`},{name:`openai-key-modern`,regex:/\bsk-(?:proj|svcacct|admin|None)-[A-Za-z0-9_-]{20,}/g,replacement:`[REDACTED-OPENAI]`},{name:`slack-token`,regex:/\bxox[a-z]-[A-Za-z0-9-]{10,}/g,replacement:`[REDACTED-SLACK]`},{name:`google-api-key`,regex:/\bAIza[0-9A-Za-z_-]{35}/g,replacement:`[REDACTED-GOOGLE]`},{name:`stripe-secret-key`,regex:/\b(?:sk|rk)_live_[0-9A-Za-z]{16,}\b/g,replacement:`[REDACTED-STRIPE]`},{name:`gitlab-pat`,regex:/\bglpat-[0-9A-Za-z_-]{20,}/g,replacement:`[REDACTED-GITLAB]`},{name:`bearer-token-json`,regex:/("[Aa]uthorization"\s*:\s*"[Bb]earer\s+)[^"]+/g,replacement:`$1[REDACTED]`}],P=_e.map(e=>e.name);function ve(e){let t=new Set,n=0;return{redacted:e.split(`
|
|
2
2
|
`).map(e=>{let r=e,i=!1;for(let{name:e,regex:n,replacement:a}of _e)n.lastIndex=0,n.test(r)&&(t.add(e),i=!0,n.lastIndex=0,r=r.replace(n,a));return i&&n++,r}).join(`
|
|
3
3
|
`),patterns:[...t],lineCount:n}}function ye(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?xe(e.position):`start`in e||`end`in e?xe(e):`line`in e||`column`in e?be(e):``}function be(e){return Se(e&&e.line)+`:`+Se(e&&e.column)}function xe(e){return be(e&&e.start)+`-`+be(e&&e.end)}function Se(e){return e&&typeof e==`number`?e:1}var Ce=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=ye(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Ce.prototype.file=``,Ce.prototype.name=``,Ce.prototype.reason=``,Ce.prototype.message=``,Ce.prototype.stack=``,Ce.prototype.column=void 0,Ce.prototype.line=void 0,Ce.prototype.ancestors=void 0,Ce.prototype.cause=void 0,Ce.prototype.fatal=void 0,Ce.prototype.place=void 0,Ce.prototype.ruleId=void 0,Ce.prototype.source=void 0;const we=new Set([`*`,`_`,"`",`~`,`\\`,`$`]),Te=/^={2,}/,Ee=/^<(?:[A-Za-z][A-Za-z0-9+.-]*:[^<>\s]*|[^\s<>@]+@[^\s<>]+)>/;function De(e,t){return Ee.test(e.slice(t,t+512))}function Oe(e,t){let n=e.lastIndexOf(`<`,t);return n<0||t-n>512?!1:Ee.exec(e.slice(n,t+1))?.[0].length===t+1-n}const ke=/^<\/?[A-Za-z][A-Za-z0-9-]*(?:\s[^>]*?)?\/?>/,Ae=/^!(?=\[)/,je=/^\[\^/,Me=/^\]\[[^\]]*\]/,Ne=/^\[\[[^\][|]*\|/,Pe=/^#[^\][|]*(?=\]\])/,Fe=/^\]\([^)]*\)/,Ie=/^(?:#{1,6}[ \t]+|>[ \t]?|(?:[-*+]|\d{1,9}[.)])[ \t]+(?:\[[ xX]\][ \t]+)?)/,Le=/^(?:`{3,}[^`\n]*|~{3,}[^\n]*)$/,Re=/^(?:(?:[-*_][ \t]*){3,}|=+[ \t]*|[|\-: \t]*-[|\-: \t]*)$/;function ze(e,t){let n=e.indexOf(`
|
|
4
4
|
`,t),r=n===-1?e.length:n;if(r>t&&e[r-1]===`\r`&&--r,r-t>1024)return 0;let i=e.slice(t,r);return i.length===0||!Le.test(i)&&!Re.test(i)?0:i.length}function Be(e){return e===` `||e===` `||e===`
|
|
@@ -341,8 +341,8 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
|
|
|
341
341
|
`,PLUGIN_SECURE_PROXY_MISSING_CHAT_MODEL:`Could not find a chat model defined in the secure proxy plugin configuration.
|
|
342
342
|
Please provide a chat model before proceeding with creating an answer session.
|
|
343
343
|
Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#plugin-secure-proxy
|
|
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 P4(e,...t){let n=Error(d4(N4[e]??`Unsupported Orama Error code: ${e}`,...t));return n.code=e,`captureStackTrace`in Error.prototype&&Error.captureStackTrace(n),n}function F4(e){return{raw:Number(e),formatted:h4(e)}}function I4(e){if(e.id){if(typeof e.id!=`string`)throw P4(`DOCUMENT_ID_MUST_BE_STRING`,typeof e.id);return e.id}return _4()}function L4(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(V4(r)){let e=W4(r);if(!Array.isArray(t)||t.length!==e)throw P4(`INVALID_INPUT_VECTOR`,n,e,t.length);continue}if(H4(r)){if(!Array.isArray(t))return n;let e=U4(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=L4(t,r);if(e)return n+`.`+e;continue}if(typeof t!==r)return n}}}const R4={string:!1,number:!1,boolean:!1,enum:!1,geopoint:!1,"string[]":!0,"number[]":!0,"boolean[]":!0,"enum[]":!0},z4={"string[]":`string`,"number[]":`number`,"boolean[]":`boolean`,"enum[]":`enum`};function B4(e){return e===`geopoint`}function V4(e){return typeof e==`string`&&/^vector\[\d+\]$/.test(e)}function H4(e){return typeof e==`string`&&R4[e]}function U4(e){return z4[e]}function W4(e){let t=Number(e.slice(7,-1));switch(!0){case isNaN(t):throw P4(`INVALID_VECTOR_VALUE`,e);case t<=0:throw P4(`INVALID_VECTOR_SIZE`,e);default:return t}}function G4(){return{idToInternalId:new Map,internalIdToId:[],save:K4,load:q4}}function K4(e){return{internalIdToId:e.internalIdToId}}function q4(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 J4(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?J4(e,t.toString()):t}function Y4(e,t){if(e.internalIdToId.length<t)throw Error(`Invalid internalId ${t}`);return e.internalIdToId[t-1]}function X4(e,t){return{sharedInternalDocumentStore:t,docs:{},count:0}}function Z4(e,t){let n=J4(e.sharedInternalDocumentStore,t);return e.docs[n]}function Q4(e,t){let n=t.length,r=Array.from({length:n});for(let i=0;i<n;i++){let n=J4(e.sharedInternalDocumentStore,t[i]);r[i]=e.docs[n]}return r}function $4(e){return e.docs}function e3(e,t,n,r){return e.docs[n]===void 0?(e.docs[n]=r,e.count++,!0):!1}function t3(e,t){let n=J4(e.sharedInternalDocumentStore,t);return e.docs[n]===void 0?!1:(delete e.docs[n],e.count--,!0)}function n3(e){return e.count}function r3(e,t){let n=t;return{docs:n.docs,count:n.count,sharedInternalDocumentStore:e}}function i3(e){return{docs:e.docs,count:e.count}}function a3(){return{create:X4,get:Z4,getMultiple:Q4,getAll:$4,store:e3,remove:t3,count:n3,load:r3,save:i3}}const o3=[`beforeInsert`,`afterInsert`,`beforeRemove`,`afterRemove`,`beforeUpdate`,`afterUpdate`,`beforeUpsert`,`afterUpsert`,`beforeSearch`,`afterSearch`,`beforeInsertMultiple`,`afterInsertMultiple`,`beforeRemoveMultiple`,`afterRemoveMultiple`,`beforeUpdateMultiple`,`afterUpdateMultiple`,`beforeUpsertMultiple`,`afterUpsertMultiple`,`beforeLoad`,`afterLoad`,`afterCreate`];function s3(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),P4(`PLUGIN_CRASHED`)}return n}const c3=[`tokenizer`,`index`,`documentsStore`,`sorter`,`pinning`],l3=[`validateSchema`,`getDocumentIndexId`,`getDocumentProperties`,`formatElapsedTime`];function u3(e,t,n,r){if(e.some(E4))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function d3(e,t,n){if(e.some(E4))return(async()=>{for(let r of e)await r(t,n)})();for(let r of e)r(t,n)}function f3(e,t,n,r,i){if(e.some(E4))return(async()=>{for(let a of e)await a(t,n,r,i)})();for(let a of e)a(t,n,r,i)}function p3(e,t,n,r){if(e.some(E4))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function m3(e,t){if(e.some(E4))return(async()=>{for(let n of e)await n(t)})();for(let n of e)n(t)}var h3=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}},g3=class e{root=null;insertCount=0;constructor(e,t){e!==void 0&&t!==void 0&&(this.root=new h3(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?h3.fromJSON(t.root):null,n.insertCount=t.insertCount||0,n}insertNode(e,t,n,r){if(e===null)return new h3(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 h3(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 h3(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}},_3=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 v3(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 y3(e,t,n){let r=v3(e,t,n);return{distance:r,isBounded:r>=0}}var b3=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(v4(e,i)!==null)if(r)if(Math.abs(t.length-i.length)<=r&&y3(t,i,r).isBounded)e[i]=[];else continue;else e[i]=[];if(v4(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&&(y3(e,n,r).isBounded&&(i[n]=[]),v4(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}},x3=class e extends b3{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,b3.fromJSON(t)])||[]),n}toJSON(){return super.toJSON()}},S3=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}},C3=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 S3(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=S3.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)}},w3=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 T3(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 E3=class e{size;vectors=new Map;constructor(e){this.size=e}add(e,t){t instanceof Float32Array||(t=new Float32Array(t));let n=D3(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)),O3(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 D3(e,t){let n=0;for(let r=0;r<t;r++)n+=e[r]*e[r];return Math.sqrt(n)}function O3(e,t,n,r,i){let a=D3(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 k3(e,t,n,r,i){let a=J4(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 A3(e,t,n,r,i){let a=0;for(let e of r)e===i&&a++;let o=J4(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 j3(e,t,n,r){let i=J4(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 M3(e,t,n){e.tokenOccurrences[t][n]--}function N3(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)){N3(e,t,o,r,n);continue}if(V4(o))r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o,r.vectorIndexes[n]={type:`Vector`,node:new E3(W4(o)),isArray:!1};else{let e=/\[/.test(o);switch(o){case`boolean`:case`boolean[]`:r.indexes[n]={type:`Bool`,node:new w3,isArray:e};break;case`number`:case`number[]`:r.indexes[n]={type:`AVL`,node:new g3(0,[]),isArray:e};break;case`string`:case`string[]`:r.indexes[n]={type:`Radix`,node:new x3,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 _3,isArray:e};break;case`geopoint`:r.indexes[n]={type:`BKD`,node:new C3,isArray:e};break;default:throw P4(`INVALID_SCHEMA_TYPE`,Array.isArray(o)?`array`:o,n)}r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o}}return r}function P3(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 F3(e,t,n,r,i,a,o,s,c,l,u){if(V4(o))return I3(t,n,a,r,i);let d=P3(e,t,n,i,s,c,l,u);if(!H4(o))return d(a);let f=a,p=f.length;for(let e=0;e<p;e++)d(f[e])}function I3(e,t,n,r,i){e.vectorIndexes[t].node.add(i,n)}function L3(e,t,n,r,i,a,o,s,c,l){if(V4(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 R3(e,t,n,r,i,a,o,s,c,l){if(!H4(o))return L3(e,t,n,r,i,a,o,s,c,l);let u=U4(o),d=a,f=d.length;for(let a=0;a<f;a++)L3(e,t,n,r,i,d[a],u,s,c,l);return!0}function z3(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=T3(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 B3(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 P4(`WRONG_SEARCH_PROPERTY_TYPE`,n);let d=s[n]??1;if(d<=0)throw P4(`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];z3(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 V3(e,t,n,r){if(`and`in n&&n.and&&Array.isArray(n.and)){let i=n.and;return i.length===0?new Set:O4(...i.map(n=>V3(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=>V3(e,t,n,r)).reduce((e,t)=>A4(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 j4(a,V3(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 P4(`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]=A4(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=w4(t,r),d=s.searchByRadius(n,u,c,void 0,l);a[o]=q3(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]=q3(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]=Z3(a[o],t)}}continue}let u=Object.keys(i);if(u.length>1)throw P4(`INVALID_FILTER_OPERATION`,u.length);if(c===`Flat`){let e=new Set(l?s.filterArr(i):s.filter(i));a[o]=A4(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 P4(`INVALID_FILTER_OPERATION`,e)}a[o]=A4(a[o],n)}}return O4(...Object.values(a))}function H3(e){return e.searchableProperties}function U3(e){return e.searchablePropertiesWithTypes}function W3(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:x3.fromJSON(t),isArray:i};break;case`Flat`:u[e]={type:`Flat`,node:_3.fromJSON(t),isArray:i};break;case`AVL`:u[e]={type:`AVL`,node:g3.fromJSON(t),isArray:i};break;case`BKD`:u[e]={type:`BKD`,node:C3.fromJSON(t),isArray:i};break;case`Bool`:u[e]={type:`Bool`,node:w3.fromJSON(t),isArray:i};break;default:u[e]=n[e]}}for(let e of Object.keys(r))d[e]={type:`Vector`,isArray:!1,node:E3.fromJSON(r[e])};return{sharedInternalDocumentStore:e,indexes:u,vectorIndexes:d,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}}function G3(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 K3(){return{create:N3,insert:F3,remove:R3,insertDocumentScoreParameters:k3,insertTokenScoreParameters:A3,removeDocumentScoreParameters:j3,removeTokenScoreParameters:M3,calculateResultScores:z3,search:B3,searchByWhereClause:V3,getSearchableProperties:H3,getSearchablePropertiesWithTypes:U3,load:W3,save:G3}}function q3(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 J3(e,t,n=!1){let r=n?C3.vincentyDistance:C3.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 Y3(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 X3(e,t){let n=e,r=Y3(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=w4(e,n);return s=o.searchByRadius(c,l,r,`asc`,i),J3(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=C3.calculatePolygonCentroid(e);return J3(s,r,n)}return null}function Z3(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 Q3(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=Q3(e,t,s,r,n);u4(a.sortableProperties,i.sortableProperties),a.sorts={...a.sorts,...i.sorts},a.sortablePropertiesWithTypes={...a.sortablePropertiesWithTypes,...i.sortablePropertiesWithTypes};continue}if(!V4(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 P4(`INVALID_SORT_SCHEMA_TYPE`,Array.isArray(s)?`array`:s,n)}}}return a}function $3(e,t,n,r){return r?.enabled===!1?{disabled:!0}:Q3(e,t,n,(r||{}).unsortableProperties||[],``)}function e6(e,t,n,r){if(!e.enabled)return;e.isSorted=!1;let i=J4(e.sharedInternalDocumentStore,n),a=e.sorts[t];a.orderedDocsToRemove.has(i)&&s6(e,t),a.docs.set(i,a.orderedDocs.length),a.orderedDocs.push([i,r])}function t6(e){if(e.isSorted||!e.enabled)return;let t=Object.keys(e.sorts);for(let n of t)a6(e,n);e.isSorted=!0}function n6(e,t,n){return t[1].localeCompare(n[1],r4(e))}function r6(e,t){return e[1]-t[1]}function i6(e,t){return t[1]?-1:1}function a6(e,t){let n=e.sorts[t],r;switch(n.type){case`string`:r=n6.bind(null,e.language);break;case`number`:r=r6.bind(null);break;case`boolean`:r=i6.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 o6(e){let t=Object.keys(e.sorts);for(let n of t)s6(e,n)}function s6(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 c6(e,t,n){if(!e.enabled)return;let r=e.sorts[t],i=J4(e.sharedInternalDocumentStore,n);r.docs.get(i)&&(r.docs.delete(i),r.orderedDocsToRemove.set(i,!0))}function l6(e,t,n){if(!e.enabled)throw P4(`SORT_DISABLED`);let r=n.property,i=n.order===`DESC`,a=e.sorts[r];if(!a)throw P4(`UNABLE_TO_SORT_ON_UNKNOWN_FIELD`,r,e.sortableProperties.join(`, `));return s6(e,r),t6(e),t.sort((t,n)=>{let r=a.docs.get(J4(e.sharedInternalDocumentStore,t[0])),o=a.docs.get(J4(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 u6(e){return e.enabled?e.sortableProperties:[]}function d6(e){return e.enabled?e.sortablePropertiesWithTypes:{}}function f6(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 p6(e){if(!e.enabled)return{enabled:!1};o6(e),t6(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 m6(){return{create:$3,insert:e6,remove:c6,save:p6,load:f6,sortBy:l6,getSortableProperties:u6,getSortablePropertiesWithTypes:d6}}const h6=[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 g6(e){return e<192||e>383?e:h6[e-192]||e}function _6(e){let t=[];for(let n=0;n<e.length;n++)t[n]=g6(e.charCodeAt(n));return String.fromCharCode(...t)}const v6={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`},y6={icate:`ic`,ative:``,alize:`al`,iciti:`ic`,ical:`ic`,ful:``,ness:``},b6=`[aeiouy]`,x6=`[^aeiou][^aeiouy]*`;b6+``;const S6=`^(`+x6+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*`;``+x6;const C6=`^(`+x6+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*[aeiouy][aeiou]*[^aeiou][^aeiouy]*`,w6=`^(`+x6+`)?[aeiouy]`;function T6(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(S6),r.test(t[1])&&(r=/.$/,e=e.replace(r,``))}else i.test(e)&&(t=i.exec(e)[1],i=new RegExp(w6),i.test(t)&&(e=t,i=/(at|bl|iz)$/,a=RegExp(`([^aeiouylsz])\\1$`),o=RegExp(`^`+x6+b6+`[^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(w6),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(S6),t&&r.test(t)&&(e=t+v6[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(S6),t&&r.test(t)&&(e=t+y6[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(C6),t&&r.test(t)&&(e=t);else if(i.test(e)){let n=i.exec(e);t=n?.[1]??``+n?.[2]??``,i=new RegExp(C6),i.test(t)&&(e=t)}return r=/^(.+?)e$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(C6),i=RegExp(`^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$`),a=RegExp(`^`+x6+b6+`[^aeiouwxy]$`),t&&(r.test(t)||i.test(t)&&!a.test(t))&&(e=t)),r=/ll$/,i=new RegExp(C6),r.test(e)&&i.test(e)&&(r=/.$/,e=e.replace(r,``)),s==`y`&&(e=s.toLowerCase()+e.substring(1)),e}function E6(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=_6(t),n&&this.normalizationCache.set(r,t),t)}function D6(e){for(;e[e.length-1]===``;)e.pop();for(;e[0]===``;)e.shift();return e}function O6(e,t,n,r=!0){if(t&&t!==this.language)throw P4(`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=t4[this.language];a=e.toLowerCase().split(t).map(e=>i(e,r)).filter(Boolean)}let o=D6(a);return this.allowDuplicates?o:Array.from(new Set(o))}function k6(e={}){if(!e.language)e.language=`english`;else if(!n4.includes(e.language))throw P4(`LANGUAGE_NOT_SUPPORTED`,e.language);let t;if(e.stemming||e.stemmer&&!(`stemming`in e))if(e.stemmer){if(typeof e.stemmer!=`function`)throw P4(`INVALID_STEMMER_FUNCTION_TYPE`);t=e.stemmer}else if(e.language===`english`)t=T6;else throw P4(`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 P4(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);if(!Array.isArray(n))throw P4(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);for(let e of n)if(typeof e!=`string`)throw P4(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`)}let r={tokenize:O6,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:E6,normalizationCache:new Map};return r.tokenize=O6.bind(r),r.normalizeToken=E6,r}function A6(e){return{sharedInternalDocumentStore:e,rules:new Map}}function j6(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 M6(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 N6(e,t){return e.rules.delete(t)}function P6(e,t){return e.rules.get(t)}function F6(e){return Array.from(e.rules.values())}function I6(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 L6(e,t){return e?t.conditions.every(t=>I6(e,t)):!1}function R6(e,t){if(!t)return[];let n=[];for(let r of e.rules.values())L6(t,r)&&n.push(r);return n}function z6(e,t){return{sharedInternalDocumentStore:e,rules:new Map(t?.rules??[])}}function B6(e){return{rules:Array.from(e.rules.entries())}}function V6(){return{create:A6,addRule:j6,updateRule:M6,removeRule:N6,getRule:P6,getAllRules:F6,getMatchingRules:R6,load:z6,save:B6}}function H6(e){let t={formatElapsedTime:F4,getDocumentIndexId:I4,getDocumentProperties:x4,validateSchema:L4};for(let n of l3){let r=n;if(e[r]){if(typeof e[r]!=`function`)throw P4(`COMPONENT_MUST_BE_FUNCTION`,r)}else e[r]=t[r]}for(let t of Object.keys(e))if(!c3.includes(t)&&!l3.includes(t))throw P4(`UNSUPPORTED_COMPONENT`,t)}function U6({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 P4(`PLUGIN_COMPONENT_CONFLICT`,e,t.name);r={...r,...n}}i||=_4();let o=r.tokenizer,s=r.index,c=r.documentsStore,l=r.sorter,u=r.pinning;if(o=o?o.tokenize?o:k6(o):k6({language:n??`english`}),r.tokenizer&&n)throw P4(`NO_LANGUAGE_WITH_CUSTOM_TOKENIZER`);let d=G4();s||=K3(),l||=m6(),c||=a3(),u||=V6(),H6(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:W6()};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 o3)g[e]=(g[e]??[]).concat(s3(g,e));let _=g.afterCreate;return _&&m3(_,g),g}function W6(){return`{{VERSION}}`}function G6(e){return e.documentsStore.count(e.data.docs)}function K6(e,t,n,r,i){let a=e.validateSchema(t,e.schema);if(a)throw P4(`SCHEMA_VALIDATION_FAILURE`,a);return E4(e.beforeInsert)||E4(e.afterInsert)||E4(e.index.beforeInsert)||E4(e.index.insert)||E4(e.index.afterInsert)?Y6(e,t,n,r,i):X6(e,t,n,r,i)}const q6=new Set([`enum`,`enum[]`]),J6=new Set([`string`,`number`]);async function Y6(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw P4(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=J4(e.internalDocumentIDStore,s);if(r||await u3(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw P4(`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];Z6(n,r,e,t)}return await Q6(e,s,u,f,l,n,t,i),r||await u3(e.afterInsert,e,s,t),s}function X6(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw P4(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=J4(e.internalDocumentIDStore,s);if(r||u3(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw P4(`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];Z6(n,r,e,t)}return $6(e,s,u,f,l,n,t,i),r||u3(e.afterInsert,e,s,t),s}function Z6(e,t,n,r){if(!(B4(t)&&typeof r==`object`&&typeof r.lon==`number`&&typeof r.lat==`number`)&&!(V4(t)&&Array.isArray(r))&&!(H4(t)&&Array.isArray(r))&&!(q6.has(t)&&J6.has(e))&&e!==t)throw P4(`INVALID_DOCUMENT_PROPERTY`,n,t,e)}async 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];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 $6(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=J4(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 e8(e,t,n,r,i,a){return E4(e.afterInsertMultiple)||E4(e.beforeInsertMultiple)||E4(e.index.beforeInsert)||E4(e.index.insert)||E4(e.index.afterInsert)?t8(e,t,n,r,i,a):n8(e,t,n,r,i,a)}async function t8(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 K6(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&&M4(e)}}})(),i||await d3(e.afterInsertMultiple,e,t),o}function n8(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=K6(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&&M4(e)}}}return l(),i||d3(e.afterInsertMultiple,e,t),o}function r8(e,t,n,r){return E4(e.index.beforeRemove)||E4(e.index.remove)||E4(e.index.afterRemove)?i8(e,t,n,r):a8(e,t,n,r)}async 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=J4(e.internalDocumentIDStore,t),l=Y4(e.internalDocumentIDStore,c),u=e.documentsStore.count(o);r||await u3(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 u3(e.afterRemove,e,l),e.documentsStore.remove(e.data.docs,t,c),i}function a8(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=J4(e.internalDocumentIDStore,t),l=Y4(e.internalDocumentIDStore,c),u=e.documentsStore.count(o);r||u3(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||u3(e.afterRemove,e,l),e.documentsStore.remove(e.data.docs,t,c),i}function o8(e,t,n,r,i){return E4(e.index.beforeRemove)||E4(e.index.remove)||E4(e.index.afterRemove)||E4(e.beforeRemoveMultiple)||E4(e.afterRemoveMultiple)?s8(e,t,n,r,i):c8(e,t,n,r,i)}async function s8(e,t,n,r,i){let a=0;n||=1e3;let o=i?[]:t.map(t=>Y4(e.internalDocumentIDStore,J4(e.internalDocumentIDStore,t)));return i||await d3(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 r8(e,t,r,i)&&a++}catch(e){s(e)}setTimeout(l,0)}setTimeout(l,0)}),i||await d3(e.afterRemoveMultiple,e,o),a}function c8(e,t,n,r,i){let a=0;n||=1e3;let o=i?[]:t.map(t=>Y4(e.internalDocumentIDStore,J4(e.internalDocumentIDStore,t)));i||d3(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)r8(e,t,r,i)&&a++;setTimeout(c,0)}}return c(),i||d3(e.afterRemoveMultiple,e,o),a}function l8(e,t){return e[1]-t[1]}function u8(e,t){return t[1]-e[1]}function d8(e=`desc`){return e.toLowerCase()===`asc`?l8:u8}function f8(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(`.`)?S4(t,e):t[e],a=s[e],o=r[e].values;switch(a){case`number`:{let t=n[e].ranges;p8(t,o)(i);break}case`number[]`:{let t=new Set,r=n[e].ranges,a=p8(r,o,t);for(let e of i)a(e);break}case`boolean`:case`enum`:case`string`:m8(o,a)(i);break;case`boolean[]`:case`enum[]`:case`string[]`:{let e=m8(o,a===`boolean[]`?`boolean`:`string`,new Set);for(let t of i)e(t);break}default:throw P4(`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=d8(r.sort);t.values=Object.fromEntries(Object.entries(t.values).sort(i).slice(r.offset??0,r.limit??10))}}return r}function p8(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 m8(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 h8={reducer:(e,t,n,r)=>(t[r]=n,t),getInitialValue:e=>Array.from({length:e})},g8=[`string`,`number`,`boolean`];function _8(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 P4(`UNKNOWN_GROUP_BY_PROPERTY`,t);if(!g8.includes(a[t]))throw P4(`INVALID_GROUP_BY_PROPERTY`,t,g8.join(`, `),a[t])}let o=t.map(([t])=>Y4(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=S4(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=v8(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=b4(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||h8,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 v8(e,t=0){if(t+1===e.length)return e[t].map(e=>[e]);let n=e[t],r=v8(e,t+1),i=[];for(let e of n)for(let t of r){let n=[e];u4(n,t),i.push(n)}return i}function y8(e,t,n,r){let i=R6(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=J4(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 b8(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 P4(`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=G6(e);if(l=e.index.search(a,r||``,e.tokenizer,n,o,t.exact||!1,t.tolerance||0,t.boost||{},T8(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=S8(r,e);if(typeof n==`string`&&t.every(e=>RegExp(`\\b${x8(e)}\\b`).test(n)))return!0}return!1})}}else l=s?X3(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 x8(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function S8(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 C8(e,t,n){let r=g4();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=b8(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])=>[J4(e.internalDocumentIDStore,t),n]);else d=d.sort(y4);d=y8(e,e.data.pinning,d,t.term);let f;u||(f=c?L8(e,d,s,o,c):R8(e,d,s,o));let p={elapsed:{formatted:``,raw:0},hits:[],count:d.length};return f!==void 0&&(p.hits=f.filter(Boolean),l||T4(p,i)),a&&(p.facets=f8(e,d,t.facets)),t.groupBy&&(p.groups=_8(e,d,t.groupBy)),p.elapsed=e.formatElapsedTime(g4()-r),p}async function a(){e.beforeSearch&&await p3(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await f3(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}const w8={k:1.2,b:.75,d:.5};function T8(e){let t=e??{};return t.k=t.k??w8.k,t.b=t.b??w8.b,t.d=t.d??w8.d,t}function E8(e,t,n){let r=t.vector;if(r&&(!(`value`in r)||!(`property`in r)))throw P4(`INVALID_VECTOR_INPUT`,Object.keys(r).join(`, `));let i=e.data.index.vectorIndexes[r.property];if(!i)throw P4(`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?P4(`INVALID_INPUT_VECTOR`,`undefined`,a,`undefined`):P4(`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 D8(e,t,n=`english`){let r=g4();function i(){let i=E8(e,t,n).sort(y4);i=y8(e,e.data.pinning,i,void 0);let a=[];t.facets&&Object.keys(t.facets).length>0&&(a=f8(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:Y4(e.internalDocumentIDStore,n[0]),score:n[1],document:r})}let d=[];t.groupBy&&(d=_8(e,i,t.groupBy));let f=g4()-r;return{count:i.length,hits:u.filter(Boolean),elapsed:{raw:Number(f),formatted:h4(f)},...a?{facets:a}:{},...d?{groups:d}:{}}}async function a(){e.beforeSearch&&await p3(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await f3(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function O8(e,t,n){let r=j8(b8(e,t,n)),i=E8(e,t,n),a=t.hybridWeights;return P8(r,i,t.term??``,a)}function k8(e,t,n){let r=g4();function i(){let i=O8(e,t,n);i=y8(e,e.data.pinning,i,t.term);let a;t.facets&&Object.keys(t.facets).length>0&&(a=f8(e,i,t.facets));let o;t.groupBy&&(o=_8(e,i,t.groupBy));let s=t.offset??0,c=t.limit??10,l=R8(e,i,s,c).filter(Boolean),u=g4(),d={count:i.length,elapsed:{raw:Number(u-r),formatted:h4(u-r)},hits:l,...a?{facets:a}:{},...o?{groups:o}:{}};return(t.includeVectors??!1)||T4(d,Object.keys(e.data.index.vectorIndexes)),d}async function a(){e.beforeSearch&&await p3(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await f3(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function A8(e){return e[1]}function j8(e){let t=Math.max.apply(Math,e.map(A8));return e.map(([e,n])=>[e,n/t])}function M8(e,t){return e/t}function N8(e,t){return(n,r)=>n*e+r*t}function P8(e,t,n,r){let i=Math.max.apply(Math,e.map(A8)),a=Math.max.apply(Math,t.map(A8)),{text:o,vector:s}=r&&r.text&&r.vector?r:F8(n),c=new Map,l=e.length,u=N8(o,s);for(let t=0;t<l;t++){let[n,r]=e[t],a=u(M8(r,i),0);c.set(n,a)}let d=t.length;for(let e=0;e<d;e++){let[n,r]=t[e],i=M8(r,a),o=c.get(n)??0;c.set(n,o+u(0,i))}return[...c].sort((e,t)=>t[1]-e[1])}function F8(e){return{text:.5,vector:.5}}function I8(e,t,n){let r=t.mode??`fulltext`;if(r===`fulltext`)return C8(e,t,n);if(r===`vector`)return D8(e,t);if(r===`hybrid`)return k8(e,t);throw P4(`INVALID_SEARCH_MODE`,r)}function L8(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=S4(m,i);if(!(h===void 0||o.has(h))&&(o.set(h,!0),u++,!(u<=n)&&(s.push({id:Y4(e.internalDocumentIDStore,f),score:p,document:m}),c.add(f),u>=n+r)))break}return s}function R8(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:Y4(e.internalDocumentIDStore,r),score:c,document:t},o.add(r)}}return a}const z8={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},B8=new WeakMap;function V8(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function H8(e){return e.trim().toLowerCase()}const U8=/\.(?:md|mdx)$/;function W8(e,t){if(t!==`page`)return e;let n=e.replace(U8,``);return n.length>0?n:e}function G8(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function K8(e){let t=G8(e.path),n=e.title?.trim()||t,r=e.modifiedTs??0,i=e.path.split(`/`).filter(Boolean),a=new Set(i),o=[...new Set((e.aliases??[]).flatMap(e=>e.split(`/`).filter(Boolean)).filter(e=>!a.has(e)))];return{id:`${e.kind}:${e.path}`,kind:e.kind,path:e.path,title:n,name:t,pathSegments:[...i,...o].join(` `),content:e.content??``,modifiedTs:Number.isFinite(r)?r:0}}function q8(e){let t=U6({schema:z8});return e.length>0&&e8(t,e),t}function J8(e){let t={documents:e};return B8.set(t,q8(e)),t}function Y8(e){let t=B8.get(e);if(t)return t;let n=q8(e.documents);return B8.set(e,n),n}const X8=new WeakSet;function Z8(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 Q8(e,t){let n=e=>({corpus:J8(t),inserted:0,updated:0,removed:0,rebuilt:!0,rebuildReason:e}),r=B8.get(e);if(!r)return n(`no-index`);if(X8.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?Z8(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`);X8.add(e);try{if(a.length>0&&o8(r,a),o.length>0&&e8(r,o),G6(r)!==t.length)throw Error(`Search index count ${G6(r)} diverged from document count ${t.length} after incremental update`)}catch{return n(`mutation-failed`)}let l={documents:t};return B8.set(l,r),{corpus:l,inserted:o.length-s,updated:s,removed:a.length-s,rebuilt:!1}}function $8(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function e5(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function t5(e,t){let n=H8(t);if(!n)return 0;let r=W8(n,e.kind),i=H8(e.title),a=H8(e.name),o=H8(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 n5(e,t){let n=t5(e,t);return n<=0?n:tb(e.path)?n*.5:n}function r5(e){return e===`file`?-60:0}function i5(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 a5(e,t,n,r){return e+t*20+n+r5(r)}function o5(e,t,n,r,i,a){return e===`relevance`?a5(t,n,r,i):i5(t,n,r,i,a)}function s5(e,t){return t||(e===`full_text`?`relevance`:`navigation`)}function c5(e,t){let n=0;for(let r of e){let e=t.get(r.id)??0;e>n&&(n=e)}return n}function l5(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 u5(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function d5(e){return e===`full_text`?{title:8,name:7,path:5,pathSegments:4,content:1}:e===`autocomplete`?{title:10,name:9,path:5,pathSegments:4}:{title:8,name:7,path:5,pathSegments:4}}function f5(e,t){return H8(t).length<4?0:+(e===`full_text`)}function p5(e){let{lexical:t,fullText:n}=e.signals;return t>=500?`lexical`:t===450&&n<=0?`pathOnly`:`body`}function m5(e){let t=[],n=[],r=[];for(let i of e){let e=p5(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 h5(e,t,n){if(t===`relevance`)return e.slice(0,n);let r=m5(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 g5(e,t,n={}){let r=n.intent??`omnibar`,i=s5(r,n.ranking),a=V8(n.limit),o=new Set(n.scopes??$8(r)),s=e.documents.filter(e=>e5(e,o)),c=H8(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=I8(Y8(e),{term:c,properties:u5(r),boost:d5(r),tolerance:f5(r,c),limit:Math.max(a*4,40)}),u=new Map(l.hits.filter(e=>e5(e.document,o)).map(e=>[e.document.id,e.score])),d=l5(s),f=new Map;for(let e of s)n5(e,c)>=0&&f.set(e.id,e);for(let e of l.hits)e5(e.document,o)&&f.set(e.document.id,e.document);if(!n.semantic){let e=c5(f.values(),u);return h5([...f.values()].map(t=>{let n=Math.max(0,n5(t,c)),r=u.get(t.id)??0,a=d.get(t.id)??0;return{document:t,score:o5(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 h5(v5({scopedDocuments:s,candidates:f,fullTextScores:u,recency:d,normalizedQuery:c,ranking:i,semantic:n.semantic}),i,a)}function _5(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function v5(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=c5(n.values(),r),h=[...n.values()].map(e=>{let t=Math.max(0,n5(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?o5(o,t,n,s,e.kind,m):a5(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=_5(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)),_=_5(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 y5=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),b5=globalThis;b5[y5]===void 0&&(b5[y5]=s());const x5=b5[y5],S5=[`.ok`,`skill-state.yml`],C5=[`claude-cowork`,`cli-hosts`],w5=[`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`],T5=/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,E5=y({version:k().regex(T5,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(x5,{description:`Recorded skill version for this target.`}),recordedAt:o().register(x5,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:O(w5).register(x5,{description:`Install-source surface that recorded this entry.`}).optional()}),D5=y({enabled:g().register(x5,{description:`Whether this user-global skill bundle is opted in.`}),decidedAt:o().register(x5,{description:`ISO 8601 timestamp of the opt-in / opt-out decision.`})}),O5=y({schema:v(1).register(x5,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:y({"claude-cowork":E5.optional(),"cli-hosts":E5.optional()}).register(x5,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({}),bundles:h(k(),D5).register(x5,{description:`Per-bundle opt-in decisions keyed by install name. Absent key = no recorded decision.`}).optional(),installsReported:x(k()).register(x5,{description:"Skill installs already reported to skills.sh from this machine, as `<owner/repo>#<skill>`. Append-only; presence suppresses a re-report."}).optional()});function k5(e,t){return e??t.installedOnDisk}function A5(){return{schema:1,targets:{}}}const j5=16*1024*1024,M5=64*1024*1024,N5=y({name:k(),description:k(),files:y({skillMd:k(),scripts:x(k()),references:x(k())})}),P5=y({pluginProvider:k().optional(),plugin:k().optional(),marketplace:k().optional(),version:k().optional(),gitCommitSha:k().optional(),scope:k().optional(),projectPath:k().optional()}),F5=y({commands:g(),hooks:g(),mcp:g()}),I5=y({...N5.shape,sourceHarness:k(),sourceHarnesses:x(k()),home:k(),provenance:P5,inert:F5}),L5=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()}),R5=C({skills:x(I5),packs:x(L5)}).loose(),z5=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(),B5=C({title:k(),description:k(),image:k().nullable(),skillsUrl:k().nullable(),sourceKind:O([`github`,`site`]),sourceUrl:k()}).loose(),V5=C({skills:x(C({name:k(),description:k().nullable()}).loose())}).loose(),H5=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(),U5=C({relPath:k(),content:k().nullable()}).loose(),W5=C({provider:k(),plugin:k(),version:k().optional(),marketplace:k().optional(),repositoryUrl:k().optional()}).loose(),G5=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(),K5=C({name:k(),description:k().nullable(),skillMd:k(),files:x(U5),plugin:W5.optional(),pluginBundle:G5.optional()}).loose(),q5=new Set([`project`,`local`]);function J5(e){return e!==void 0&&q5.has(e)?`project`:`global`}function Y5(e,t){let n=e=>e.replace(/\/+$/,``);return n(e)===n(t)}function X5(e,t){if(J5(e.scope)===`global`)return!0;let n=e.projectPath;return n===void 0||t===void 0?!0:Y5(n,t)}const Z5=/^([\w.-]+)\/([\w.-]+)$/,Q5=/^(?=.{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 $5(e){let t=Z5.exec(e);if(t){let[,e,n]=t;if(e&&n)return{kind:`github`,owner:e,repo:n}}return Q5.test(e)?{kind:`site`,hostname:e}:null}function e7(e,t){let n=$5(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 t7(e){return e.includes(`/`)?e.split(`/`)[0]??null:null}function n7(e){let t=e.split(`/`).pop();return t&&t.length>0?t:e}const r7=`template`;function i7(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 a7(e,t){return e.trim()===``?t:`---\n${e}\n---\n${t}`}function o7(e){let{frontmatter:t,body:n}=Cm(e);return t===``?{docFrontmatterText:``,markdown:e}:{docFrontmatterText:Tm(t),markdown:n}}function s7(e){let t=e.split(`
|
|
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=
|
|
346
|
-
`))[
|
|
347
|
-
`).replace(/\n+$/,``)}}function
|
|
348
|
-
//# sourceMappingURL=src-
|
|
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 P4(e,...t){let n=Error(d4(N4[e]??`Unsupported Orama Error code: ${e}`,...t));return n.code=e,`captureStackTrace`in Error.prototype&&Error.captureStackTrace(n),n}function F4(e){return{raw:Number(e),formatted:h4(e)}}function I4(e){if(e.id){if(typeof e.id!=`string`)throw P4(`DOCUMENT_ID_MUST_BE_STRING`,typeof e.id);return e.id}return _4()}function L4(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(V4(r)){let e=W4(r);if(!Array.isArray(t)||t.length!==e)throw P4(`INVALID_INPUT_VECTOR`,n,e,t.length);continue}if(H4(r)){if(!Array.isArray(t))return n;let e=U4(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=L4(t,r);if(e)return n+`.`+e;continue}if(typeof t!==r)return n}}}const R4={string:!1,number:!1,boolean:!1,enum:!1,geopoint:!1,"string[]":!0,"number[]":!0,"boolean[]":!0,"enum[]":!0},z4={"string[]":`string`,"number[]":`number`,"boolean[]":`boolean`,"enum[]":`enum`};function B4(e){return e===`geopoint`}function V4(e){return typeof e==`string`&&/^vector\[\d+\]$/.test(e)}function H4(e){return typeof e==`string`&&R4[e]}function U4(e){return z4[e]}function W4(e){let t=Number(e.slice(7,-1));switch(!0){case isNaN(t):throw P4(`INVALID_VECTOR_VALUE`,e);case t<=0:throw P4(`INVALID_VECTOR_SIZE`,e);default:return t}}function G4(){return{idToInternalId:new Map,internalIdToId:[],save:K4,load:q4}}function K4(e){return{internalIdToId:e.internalIdToId}}function q4(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 J4(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?J4(e,t.toString()):t}function Y4(e,t){if(e.internalIdToId.length<t)throw Error(`Invalid internalId ${t}`);return e.internalIdToId[t-1]}function X4(e,t){return{sharedInternalDocumentStore:t,docs:{},count:0}}function Z4(e,t){let n=J4(e.sharedInternalDocumentStore,t);return e.docs[n]}function Q4(e,t){let n=t.length,r=Array.from({length:n});for(let i=0;i<n;i++){let n=J4(e.sharedInternalDocumentStore,t[i]);r[i]=e.docs[n]}return r}function $4(e){return e.docs}function e3(e,t,n,r){return e.docs[n]===void 0?(e.docs[n]=r,e.count++,!0):!1}function t3(e,t){let n=J4(e.sharedInternalDocumentStore,t);return e.docs[n]===void 0?!1:(delete e.docs[n],e.count--,!0)}function n3(e){return e.count}function r3(e,t){let n=t;return{docs:n.docs,count:n.count,sharedInternalDocumentStore:e}}function i3(e){return{docs:e.docs,count:e.count}}function a3(){return{create:X4,get:Z4,getMultiple:Q4,getAll:$4,store:e3,remove:t3,count:n3,load:r3,save:i3}}const o3=[`beforeInsert`,`afterInsert`,`beforeRemove`,`afterRemove`,`beforeUpdate`,`afterUpdate`,`beforeUpsert`,`afterUpsert`,`beforeSearch`,`afterSearch`,`beforeInsertMultiple`,`afterInsertMultiple`,`beforeRemoveMultiple`,`afterRemoveMultiple`,`beforeUpdateMultiple`,`afterUpdateMultiple`,`beforeUpsertMultiple`,`afterUpsertMultiple`,`beforeLoad`,`afterLoad`,`afterCreate`];function s3(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),P4(`PLUGIN_CRASHED`)}return n}const c3=[`tokenizer`,`index`,`documentsStore`,`sorter`,`pinning`],l3=[`validateSchema`,`getDocumentIndexId`,`getDocumentProperties`,`formatElapsedTime`];function u3(e,t,n,r){if(e.some(E4))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function d3(e,t,n){if(e.some(E4))return(async()=>{for(let r of e)await r(t,n)})();for(let r of e)r(t,n)}function f3(e,t,n,r,i){if(e.some(E4))return(async()=>{for(let a of e)await a(t,n,r,i)})();for(let a of e)a(t,n,r,i)}function p3(e,t,n,r){if(e.some(E4))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function m3(e,t){if(e.some(E4))return(async()=>{for(let n of e)await n(t)})();for(let n of e)n(t)}var h3=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}},g3=class e{root=null;insertCount=0;constructor(e,t){e!==void 0&&t!==void 0&&(this.root=new h3(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?h3.fromJSON(t.root):null,n.insertCount=t.insertCount||0,n}insertNode(e,t,n,r){if(e===null)return new h3(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 h3(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 h3(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}},_3=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 v3(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 y3(e,t,n){let r=v3(e,t,n);return{distance:r,isBounded:r>=0}}var b3=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(v4(e,i)!==null)if(r)if(Math.abs(t.length-i.length)<=r&&y3(t,i,r).isBounded)e[i]=[];else continue;else e[i]=[];if(v4(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&&(y3(e,n,r).isBounded&&(i[n]=[]),v4(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}},x3=class e extends b3{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,b3.fromJSON(t)])||[]),n}toJSON(){return super.toJSON()}},S3=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}},C3=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 S3(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=S3.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)}},w3=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 T3(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 E3=class e{size;vectors=new Map;constructor(e){this.size=e}add(e,t){t instanceof Float32Array||(t=new Float32Array(t));let n=D3(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)),O3(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 D3(e,t){let n=0;for(let r=0;r<t;r++)n+=e[r]*e[r];return Math.sqrt(n)}function O3(e,t,n,r,i){let a=D3(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 k3(e,t,n,r,i){let a=J4(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 A3(e,t,n,r,i){let a=0;for(let e of r)e===i&&a++;let o=J4(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 j3(e,t,n,r){let i=J4(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 M3(e,t,n){e.tokenOccurrences[t][n]--}function N3(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)){N3(e,t,o,r,n);continue}if(V4(o))r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o,r.vectorIndexes[n]={type:`Vector`,node:new E3(W4(o)),isArray:!1};else{let e=/\[/.test(o);switch(o){case`boolean`:case`boolean[]`:r.indexes[n]={type:`Bool`,node:new w3,isArray:e};break;case`number`:case`number[]`:r.indexes[n]={type:`AVL`,node:new g3(0,[]),isArray:e};break;case`string`:case`string[]`:r.indexes[n]={type:`Radix`,node:new x3,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 _3,isArray:e};break;case`geopoint`:r.indexes[n]={type:`BKD`,node:new C3,isArray:e};break;default:throw P4(`INVALID_SCHEMA_TYPE`,Array.isArray(o)?`array`:o,n)}r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o}}return r}function P3(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 F3(e,t,n,r,i,a,o,s,c,l,u){if(V4(o))return I3(t,n,a,r,i);let d=P3(e,t,n,i,s,c,l,u);if(!H4(o))return d(a);let f=a,p=f.length;for(let e=0;e<p;e++)d(f[e])}function I3(e,t,n,r,i){e.vectorIndexes[t].node.add(i,n)}function L3(e,t,n,r,i,a,o,s,c,l){if(V4(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 R3(e,t,n,r,i,a,o,s,c,l){if(!H4(o))return L3(e,t,n,r,i,a,o,s,c,l);let u=U4(o),d=a,f=d.length;for(let a=0;a<f;a++)L3(e,t,n,r,i,d[a],u,s,c,l);return!0}function z3(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=T3(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 B3(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 P4(`WRONG_SEARCH_PROPERTY_TYPE`,n);let d=s[n]??1;if(d<=0)throw P4(`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];z3(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 V3(e,t,n,r){if(`and`in n&&n.and&&Array.isArray(n.and)){let i=n.and;return i.length===0?new Set:O4(...i.map(n=>V3(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=>V3(e,t,n,r)).reduce((e,t)=>A4(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 j4(a,V3(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 P4(`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]=A4(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=w4(t,r),d=s.searchByRadius(n,u,c,void 0,l);a[o]=q3(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]=q3(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]=Z3(a[o],t)}}continue}let u=Object.keys(i);if(u.length>1)throw P4(`INVALID_FILTER_OPERATION`,u.length);if(c===`Flat`){let e=new Set(l?s.filterArr(i):s.filter(i));a[o]=A4(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 P4(`INVALID_FILTER_OPERATION`,e)}a[o]=A4(a[o],n)}}return O4(...Object.values(a))}function H3(e){return e.searchableProperties}function U3(e){return e.searchablePropertiesWithTypes}function W3(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:x3.fromJSON(t),isArray:i};break;case`Flat`:u[e]={type:`Flat`,node:_3.fromJSON(t),isArray:i};break;case`AVL`:u[e]={type:`AVL`,node:g3.fromJSON(t),isArray:i};break;case`BKD`:u[e]={type:`BKD`,node:C3.fromJSON(t),isArray:i};break;case`Bool`:u[e]={type:`Bool`,node:w3.fromJSON(t),isArray:i};break;default:u[e]=n[e]}}for(let e of Object.keys(r))d[e]={type:`Vector`,isArray:!1,node:E3.fromJSON(r[e])};return{sharedInternalDocumentStore:e,indexes:u,vectorIndexes:d,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}}function G3(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 K3(){return{create:N3,insert:F3,remove:R3,insertDocumentScoreParameters:k3,insertTokenScoreParameters:A3,removeDocumentScoreParameters:j3,removeTokenScoreParameters:M3,calculateResultScores:z3,search:B3,searchByWhereClause:V3,getSearchableProperties:H3,getSearchablePropertiesWithTypes:U3,load:W3,save:G3}}function q3(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 J3(e,t,n=!1){let r=n?C3.vincentyDistance:C3.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 Y3(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 X3(e,t){let n=e,r=Y3(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=w4(e,n);return s=o.searchByRadius(c,l,r,`asc`,i),J3(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=C3.calculatePolygonCentroid(e);return J3(s,r,n)}return null}function Z3(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 Q3(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=Q3(e,t,s,r,n);u4(a.sortableProperties,i.sortableProperties),a.sorts={...a.sorts,...i.sorts},a.sortablePropertiesWithTypes={...a.sortablePropertiesWithTypes,...i.sortablePropertiesWithTypes};continue}if(!V4(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 P4(`INVALID_SORT_SCHEMA_TYPE`,Array.isArray(s)?`array`:s,n)}}}return a}function $3(e,t,n,r){return r?.enabled===!1?{disabled:!0}:Q3(e,t,n,(r||{}).unsortableProperties||[],``)}function e6(e,t,n,r){if(!e.enabled)return;e.isSorted=!1;let i=J4(e.sharedInternalDocumentStore,n),a=e.sorts[t];a.orderedDocsToRemove.has(i)&&s6(e,t),a.docs.set(i,a.orderedDocs.length),a.orderedDocs.push([i,r])}function t6(e){if(e.isSorted||!e.enabled)return;let t=Object.keys(e.sorts);for(let n of t)a6(e,n);e.isSorted=!0}function n6(e,t,n){return t[1].localeCompare(n[1],r4(e))}function r6(e,t){return e[1]-t[1]}function i6(e,t){return t[1]?-1:1}function a6(e,t){let n=e.sorts[t],r;switch(n.type){case`string`:r=n6.bind(null,e.language);break;case`number`:r=r6.bind(null);break;case`boolean`:r=i6.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 o6(e){let t=Object.keys(e.sorts);for(let n of t)s6(e,n)}function s6(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 c6(e,t,n){if(!e.enabled)return;let r=e.sorts[t],i=J4(e.sharedInternalDocumentStore,n);r.docs.get(i)&&(r.docs.delete(i),r.orderedDocsToRemove.set(i,!0))}function l6(e,t,n){if(!e.enabled)throw P4(`SORT_DISABLED`);let r=n.property,i=n.order===`DESC`,a=e.sorts[r];if(!a)throw P4(`UNABLE_TO_SORT_ON_UNKNOWN_FIELD`,r,e.sortableProperties.join(`, `));return s6(e,r),t6(e),t.sort((t,n)=>{let r=a.docs.get(J4(e.sharedInternalDocumentStore,t[0])),o=a.docs.get(J4(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 u6(e){return e.enabled?e.sortableProperties:[]}function d6(e){return e.enabled?e.sortablePropertiesWithTypes:{}}function f6(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 p6(e){if(!e.enabled)return{enabled:!1};o6(e),t6(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 m6(){return{create:$3,insert:e6,remove:c6,save:p6,load:f6,sortBy:l6,getSortableProperties:u6,getSortablePropertiesWithTypes:d6}}const h6=[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 g6(e){return e<192||e>383?e:h6[e-192]||e}function _6(e){let t=[];for(let n=0;n<e.length;n++)t[n]=g6(e.charCodeAt(n));return String.fromCharCode(...t)}const v6={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`},y6={icate:`ic`,ative:``,alize:`al`,iciti:`ic`,ical:`ic`,ful:``,ness:``},b6=`[aeiouy]`,x6=`[^aeiou][^aeiouy]*`;b6+``;const S6=`^(`+x6+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*`;``+x6;const C6=`^(`+x6+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*[aeiouy][aeiou]*[^aeiou][^aeiouy]*`,w6=`^(`+x6+`)?[aeiouy]`;function T6(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(S6),r.test(t[1])&&(r=/.$/,e=e.replace(r,``))}else i.test(e)&&(t=i.exec(e)[1],i=new RegExp(w6),i.test(t)&&(e=t,i=/(at|bl|iz)$/,a=RegExp(`([^aeiouylsz])\\1$`),o=RegExp(`^`+x6+b6+`[^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(w6),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(S6),t&&r.test(t)&&(e=t+v6[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(S6),t&&r.test(t)&&(e=t+y6[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(C6),t&&r.test(t)&&(e=t);else if(i.test(e)){let n=i.exec(e);t=n?.[1]??``+n?.[2]??``,i=new RegExp(C6),i.test(t)&&(e=t)}return r=/^(.+?)e$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(C6),i=RegExp(`^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$`),a=RegExp(`^`+x6+b6+`[^aeiouwxy]$`),t&&(r.test(t)||i.test(t)&&!a.test(t))&&(e=t)),r=/ll$/,i=new RegExp(C6),r.test(e)&&i.test(e)&&(r=/.$/,e=e.replace(r,``)),s==`y`&&(e=s.toLowerCase()+e.substring(1)),e}function E6(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=_6(t),n&&this.normalizationCache.set(r,t),t)}function D6(e){for(;e[e.length-1]===``;)e.pop();for(;e[0]===``;)e.shift();return e}function O6(e,t,n,r=!0){if(t&&t!==this.language)throw P4(`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=t4[this.language];a=e.toLowerCase().split(t).map(e=>i(e,r)).filter(Boolean)}let o=D6(a);return this.allowDuplicates?o:Array.from(new Set(o))}function k6(e={}){if(!e.language)e.language=`english`;else if(!n4.includes(e.language))throw P4(`LANGUAGE_NOT_SUPPORTED`,e.language);let t;if(e.stemming||e.stemmer&&!(`stemming`in e))if(e.stemmer){if(typeof e.stemmer!=`function`)throw P4(`INVALID_STEMMER_FUNCTION_TYPE`);t=e.stemmer}else if(e.language===`english`)t=T6;else throw P4(`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 P4(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);if(!Array.isArray(n))throw P4(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);for(let e of n)if(typeof e!=`string`)throw P4(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`)}let r={tokenize:O6,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:E6,normalizationCache:new Map};return r.tokenize=O6.bind(r),r.normalizeToken=E6,r}function A6(e){return{sharedInternalDocumentStore:e,rules:new Map}}function j6(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 M6(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 N6(e,t){return e.rules.delete(t)}function P6(e,t){return e.rules.get(t)}function F6(e){return Array.from(e.rules.values())}function I6(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 L6(e,t){return e?t.conditions.every(t=>I6(e,t)):!1}function R6(e,t){if(!t)return[];let n=[];for(let r of e.rules.values())L6(t,r)&&n.push(r);return n}function z6(e,t){return{sharedInternalDocumentStore:e,rules:new Map(t?.rules??[])}}function B6(e){return{rules:Array.from(e.rules.entries())}}function V6(){return{create:A6,addRule:j6,updateRule:M6,removeRule:N6,getRule:P6,getAllRules:F6,getMatchingRules:R6,load:z6,save:B6}}function H6(e){let t={formatElapsedTime:F4,getDocumentIndexId:I4,getDocumentProperties:x4,validateSchema:L4};for(let n of l3){let r=n;if(e[r]){if(typeof e[r]!=`function`)throw P4(`COMPONENT_MUST_BE_FUNCTION`,r)}else e[r]=t[r]}for(let t of Object.keys(e))if(!c3.includes(t)&&!l3.includes(t))throw P4(`UNSUPPORTED_COMPONENT`,t)}function U6({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 P4(`PLUGIN_COMPONENT_CONFLICT`,e,t.name);r={...r,...n}}i||=_4();let o=r.tokenizer,s=r.index,c=r.documentsStore,l=r.sorter,u=r.pinning;if(o=o?o.tokenize?o:k6(o):k6({language:n??`english`}),r.tokenizer&&n)throw P4(`NO_LANGUAGE_WITH_CUSTOM_TOKENIZER`);let d=G4();s||=K3(),l||=m6(),c||=a3(),u||=V6(),H6(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:W6()};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 o3)g[e]=(g[e]??[]).concat(s3(g,e));let _=g.afterCreate;return _&&m3(_,g),g}function W6(){return`{{VERSION}}`}function G6(e){return e.documentsStore.count(e.data.docs)}function K6(e,t,n,r,i){let a=e.validateSchema(t,e.schema);if(a)throw P4(`SCHEMA_VALIDATION_FAILURE`,a);return E4(e.beforeInsert)||E4(e.afterInsert)||E4(e.index.beforeInsert)||E4(e.index.insert)||E4(e.index.afterInsert)?Y6(e,t,n,r,i):X6(e,t,n,r,i)}const q6=new Set([`enum`,`enum[]`]),J6=new Set([`string`,`number`]);async function Y6(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw P4(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=J4(e.internalDocumentIDStore,s);if(r||await u3(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw P4(`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];Z6(n,r,e,t)}return await Q6(e,s,u,f,l,n,t,i),r||await u3(e.afterInsert,e,s,t),s}function X6(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw P4(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=J4(e.internalDocumentIDStore,s);if(r||u3(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw P4(`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];Z6(n,r,e,t)}return $6(e,s,u,f,l,n,t,i),r||u3(e.afterInsert,e,s,t),s}function Z6(e,t,n,r){if(!(B4(t)&&typeof r==`object`&&typeof r.lon==`number`&&typeof r.lat==`number`)&&!(V4(t)&&Array.isArray(r))&&!(H4(t)&&Array.isArray(r))&&!(q6.has(t)&&J6.has(e))&&e!==t)throw P4(`INVALID_DOCUMENT_PROPERTY`,n,t,e)}async 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];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 $6(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=J4(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 e8(e,t,n,r,i,a){return E4(e.afterInsertMultiple)||E4(e.beforeInsertMultiple)||E4(e.index.beforeInsert)||E4(e.index.insert)||E4(e.index.afterInsert)?t8(e,t,n,r,i,a):n8(e,t,n,r,i,a)}async function t8(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 K6(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&&M4(e)}}})(),i||await d3(e.afterInsertMultiple,e,t),o}function n8(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=K6(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&&M4(e)}}}return l(),i||d3(e.afterInsertMultiple,e,t),o}function r8(e,t,n,r){return E4(e.index.beforeRemove)||E4(e.index.remove)||E4(e.index.afterRemove)?i8(e,t,n,r):a8(e,t,n,r)}async 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=J4(e.internalDocumentIDStore,t),l=Y4(e.internalDocumentIDStore,c),u=e.documentsStore.count(o);r||await u3(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 u3(e.afterRemove,e,l),e.documentsStore.remove(e.data.docs,t,c),i}function a8(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=J4(e.internalDocumentIDStore,t),l=Y4(e.internalDocumentIDStore,c),u=e.documentsStore.count(o);r||u3(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||u3(e.afterRemove,e,l),e.documentsStore.remove(e.data.docs,t,c),i}function o8(e,t,n,r,i){return E4(e.index.beforeRemove)||E4(e.index.remove)||E4(e.index.afterRemove)||E4(e.beforeRemoveMultiple)||E4(e.afterRemoveMultiple)?s8(e,t,n,r,i):c8(e,t,n,r,i)}async function s8(e,t,n,r,i){let a=0;n||=1e3;let o=i?[]:t.map(t=>Y4(e.internalDocumentIDStore,J4(e.internalDocumentIDStore,t)));return i||await d3(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 r8(e,t,r,i)&&a++}catch(e){s(e)}setTimeout(l,0)}setTimeout(l,0)}),i||await d3(e.afterRemoveMultiple,e,o),a}function c8(e,t,n,r,i){let a=0;n||=1e3;let o=i?[]:t.map(t=>Y4(e.internalDocumentIDStore,J4(e.internalDocumentIDStore,t)));i||d3(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)r8(e,t,r,i)&&a++;setTimeout(c,0)}}return c(),i||d3(e.afterRemoveMultiple,e,o),a}function l8(e,t){return e[1]-t[1]}function u8(e,t){return t[1]-e[1]}function d8(e=`desc`){return e.toLowerCase()===`asc`?l8:u8}function f8(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(`.`)?S4(t,e):t[e],a=s[e],o=r[e].values;switch(a){case`number`:{let t=n[e].ranges;p8(t,o)(i);break}case`number[]`:{let t=new Set,r=n[e].ranges,a=p8(r,o,t);for(let e of i)a(e);break}case`boolean`:case`enum`:case`string`:m8(o,a)(i);break;case`boolean[]`:case`enum[]`:case`string[]`:{let e=m8(o,a===`boolean[]`?`boolean`:`string`,new Set);for(let t of i)e(t);break}default:throw P4(`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=d8(r.sort);t.values=Object.fromEntries(Object.entries(t.values).sort(i).slice(r.offset??0,r.limit??10))}}return r}function p8(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 m8(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 h8={reducer:(e,t,n,r)=>(t[r]=n,t),getInitialValue:e=>Array.from({length:e})},g8=[`string`,`number`,`boolean`];function _8(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 P4(`UNKNOWN_GROUP_BY_PROPERTY`,t);if(!g8.includes(a[t]))throw P4(`INVALID_GROUP_BY_PROPERTY`,t,g8.join(`, `),a[t])}let o=t.map(([t])=>Y4(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=S4(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=v8(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=b4(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||h8,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 v8(e,t=0){if(t+1===e.length)return e[t].map(e=>[e]);let n=e[t],r=v8(e,t+1),i=[];for(let e of n)for(let t of r){let n=[e];u4(n,t),i.push(n)}return i}function y8(e,t,n,r){let i=R6(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=J4(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 b8(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 P4(`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=G6(e);if(l=e.index.search(a,r||``,e.tokenizer,n,o,t.exact||!1,t.tolerance||0,t.boost||{},T8(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=S8(r,e);if(typeof n==`string`&&t.every(e=>RegExp(`\\b${x8(e)}\\b`).test(n)))return!0}return!1})}}else l=s?X3(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 x8(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function S8(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 C8(e,t,n){let r=g4();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=b8(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])=>[J4(e.internalDocumentIDStore,t),n]);else d=d.sort(y4);d=y8(e,e.data.pinning,d,t.term);let f;u||(f=c?L8(e,d,s,o,c):R8(e,d,s,o));let p={elapsed:{formatted:``,raw:0},hits:[],count:d.length};return f!==void 0&&(p.hits=f.filter(Boolean),l||T4(p,i)),a&&(p.facets=f8(e,d,t.facets)),t.groupBy&&(p.groups=_8(e,d,t.groupBy)),p.elapsed=e.formatElapsedTime(g4()-r),p}async function a(){e.beforeSearch&&await p3(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await f3(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}const w8={k:1.2,b:.75,d:.5};function T8(e){let t=e??{};return t.k=t.k??w8.k,t.b=t.b??w8.b,t.d=t.d??w8.d,t}function E8(e,t,n){let r=t.vector;if(r&&(!(`value`in r)||!(`property`in r)))throw P4(`INVALID_VECTOR_INPUT`,Object.keys(r).join(`, `));let i=e.data.index.vectorIndexes[r.property];if(!i)throw P4(`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?P4(`INVALID_INPUT_VECTOR`,`undefined`,a,`undefined`):P4(`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 D8(e,t,n=`english`){let r=g4();function i(){let i=E8(e,t,n).sort(y4);i=y8(e,e.data.pinning,i,void 0);let a=[];t.facets&&Object.keys(t.facets).length>0&&(a=f8(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:Y4(e.internalDocumentIDStore,n[0]),score:n[1],document:r})}let d=[];t.groupBy&&(d=_8(e,i,t.groupBy));let f=g4()-r;return{count:i.length,hits:u.filter(Boolean),elapsed:{raw:Number(f),formatted:h4(f)},...a?{facets:a}:{},...d?{groups:d}:{}}}async function a(){e.beforeSearch&&await p3(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await f3(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function O8(e,t,n){let r=j8(b8(e,t,n)),i=E8(e,t,n),a=t.hybridWeights;return P8(r,i,t.term??``,a)}function k8(e,t,n){let r=g4();function i(){let i=O8(e,t,n);i=y8(e,e.data.pinning,i,t.term);let a;t.facets&&Object.keys(t.facets).length>0&&(a=f8(e,i,t.facets));let o;t.groupBy&&(o=_8(e,i,t.groupBy));let s=t.offset??0,c=t.limit??10,l=R8(e,i,s,c).filter(Boolean),u=g4(),d={count:i.length,elapsed:{raw:Number(u-r),formatted:h4(u-r)},hits:l,...a?{facets:a}:{},...o?{groups:o}:{}};return(t.includeVectors??!1)||T4(d,Object.keys(e.data.index.vectorIndexes)),d}async function a(){e.beforeSearch&&await p3(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await f3(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function A8(e){return e[1]}function j8(e){let t=Math.max.apply(Math,e.map(A8));return e.map(([e,n])=>[e,n/t])}function M8(e,t){return e/t}function N8(e,t){return(n,r)=>n*e+r*t}function P8(e,t,n,r){let i=Math.max.apply(Math,e.map(A8)),a=Math.max.apply(Math,t.map(A8)),{text:o,vector:s}=r&&r.text&&r.vector?r:F8(n),c=new Map,l=e.length,u=N8(o,s);for(let t=0;t<l;t++){let[n,r]=e[t],a=u(M8(r,i),0);c.set(n,a)}let d=t.length;for(let e=0;e<d;e++){let[n,r]=t[e],i=M8(r,a),o=c.get(n)??0;c.set(n,o+u(0,i))}return[...c].sort((e,t)=>t[1]-e[1])}function F8(e){return{text:.5,vector:.5}}function I8(e,t,n){let r=t.mode??`fulltext`;if(r===`fulltext`)return C8(e,t,n);if(r===`vector`)return D8(e,t);if(r===`hybrid`)return k8(e,t);throw P4(`INVALID_SEARCH_MODE`,r)}function L8(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=S4(m,i);if(!(h===void 0||o.has(h))&&(o.set(h,!0),u++,!(u<=n)&&(s.push({id:Y4(e.internalDocumentIDStore,f),score:p,document:m}),c.add(f),u>=n+r)))break}return s}function R8(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:Y4(e.internalDocumentIDStore,r),score:c,document:t},o.add(r)}}return a}const z8={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},B8=new WeakMap;function V8(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function H8(e){return e.trim().toLowerCase()}const U8=/\.(?:md|mdx)$/;function W8(e,t){if(t!==`page`)return e;let n=e.replace(U8,``);return n.length>0?n:e}function G8(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function K8(e){let t=G8(e.path),n=e.title?.trim()||t,r=e.modifiedTs??0,i=e.path.split(`/`).filter(Boolean),a=new Set(i),o=[...new Set((e.aliases??[]).flatMap(e=>e.split(`/`).filter(Boolean)).filter(e=>!a.has(e)))];return{id:`${e.kind}:${e.path}`,kind:e.kind,path:e.path,title:n,name:t,pathSegments:[...i,...o].join(` `),content:e.content??``,modifiedTs:Number.isFinite(r)?r:0}}function q8(e){let t=U6({schema:z8});return e.length>0&&e8(t,e),t}function J8(e){let t={documents:e};return B8.set(t,q8(e)),t}function Y8(e){let t=B8.get(e);if(t)return t;let n=q8(e.documents);return B8.set(e,n),n}const X8=new WeakSet;function Z8(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 Q8(e,t){let n=e=>({corpus:J8(t),inserted:0,updated:0,removed:0,rebuilt:!0,rebuildReason:e}),r=B8.get(e);if(!r)return n(`no-index`);if(X8.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?Z8(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`);X8.add(e);try{if(a.length>0&&o8(r,a),o.length>0&&e8(r,o),G6(r)!==t.length)throw Error(`Search index count ${G6(r)} diverged from document count ${t.length} after incremental update`)}catch{return n(`mutation-failed`)}let l={documents:t};return B8.set(l,r),{corpus:l,inserted:o.length-s,updated:s,removed:a.length-s,rebuilt:!1}}function $8(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function e5(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function t5(e,t){let n=H8(t);if(!n)return 0;let r=W8(n,e.kind),i=H8(e.title),a=H8(e.name),o=H8(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 n5(e,t){let n=t5(e,t);return n<=0?n:tb(e.path)?n*.5:n}function r5(e){return e===`file`?-60:0}function i5(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 a5(e,t,n,r){return e+t*20+n+r5(r)}function o5(e,t,n,r,i,a){return e===`relevance`?a5(t,n,r,i):i5(t,n,r,i,a)}function s5(e,t){return t||(e===`full_text`?`relevance`:`navigation`)}function c5(e,t){let n=0;for(let r of e){let e=t.get(r.id)??0;e>n&&(n=e)}return n}function l5(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 u5(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function d5(e){return e===`full_text`?{title:8,name:7,path:5,pathSegments:4,content:1}:e===`autocomplete`?{title:10,name:9,path:5,pathSegments:4}:{title:8,name:7,path:5,pathSegments:4}}function f5(e,t){return H8(t).length<4?0:+(e===`full_text`)}function p5(e){let{lexical:t,fullText:n}=e.signals;return t>=500?`lexical`:t===450&&n<=0?`pathOnly`:`body`}function m5(e){let t=[],n=[],r=[];for(let i of e){let e=p5(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 h5(e,t,n){if(t===`relevance`)return e.slice(0,n);let r=m5(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 g5(e,t,n={}){let r=n.intent??`omnibar`,i=s5(r,n.ranking),a=V8(n.limit),o=new Set(n.scopes??$8(r)),s=e.documents.filter(e=>e5(e,o)),c=H8(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=I8(Y8(e),{term:c,properties:u5(r),boost:d5(r),tolerance:f5(r,c),limit:Math.max(a*4,40)}),u=new Map(l.hits.filter(e=>e5(e.document,o)).map(e=>[e.document.id,e.score])),d=l5(s),f=new Map;for(let e of s)n5(e,c)>=0&&f.set(e.id,e);for(let e of l.hits)e5(e.document,o)&&f.set(e.document.id,e.document);if(!n.semantic){let e=c5(f.values(),u);return h5([...f.values()].map(t=>{let n=Math.max(0,n5(t,c)),r=u.get(t.id)??0,a=d.get(t.id)??0;return{document:t,score:o5(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 h5(v5({scopedDocuments:s,candidates:f,fullTextScores:u,recency:d,normalizedQuery:c,ranking:i,semantic:n.semantic}),i,a)}function _5(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function v5(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=c5(n.values(),r),h=[...n.values()].map(e=>{let t=Math.max(0,n5(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?o5(o,t,n,s,e.kind,m):a5(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=_5(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)),_=_5(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 y5=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),b5=globalThis;b5[y5]===void 0&&(b5[y5]=s());const x5=b5[y5],S5=[`.ok`,`skill-state.yml`],C5=[`claude-cowork`,`cli-hosts`],w5=[`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`],T5=/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,E5=y({version:k().regex(T5,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(x5,{description:`Recorded skill version for this target.`}),recordedAt:o().register(x5,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:O(w5).register(x5,{description:`Install-source surface that recorded this entry.`}).optional()}),D5=y({enabled:g().register(x5,{description:`Whether this user-global skill bundle is opted in.`}),decidedAt:o().register(x5,{description:`ISO 8601 timestamp of the opt-in / opt-out decision.`})}),O5=y({schema:v(1).register(x5,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:y({"claude-cowork":E5.optional(),"cli-hosts":E5.optional()}).register(x5,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({}),bundles:h(k(),D5).register(x5,{description:`Per-bundle opt-in decisions keyed by install name. Absent key = no recorded decision.`}).optional(),installsReported:x(k()).register(x5,{description:"Skill installs already reported to skills.sh from this machine, as `<owner/repo>#<skill>`. Append-only; presence suppresses a re-report."}).optional()});function k5(e,t){return e??t.installedOnDisk}function A5(){return{schema:1,targets:{}}}const j5=16*1024*1024,M5=64*1024*1024,N5=y({name:k(),description:k(),files:y({skillMd:k(),scripts:x(k()),references:x(k())})}),P5=y({pluginProvider:k().optional(),plugin:k().optional(),marketplace:k().optional(),version:k().optional(),gitCommitSha:k().optional(),scope:k().optional(),projectPath:k().optional()}),F5=y({commands:g(),hooks:g(),mcp:g()}),I5=y({...N5.shape,sourceHarness:k(),sourceHarnesses:x(k()),home:k(),provenance:P5,inert:F5,outsideProject:g().optional()}),L5=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()}),R5=C({skills:x(I5),packs:x(L5)}).loose(),z5=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(),B5=C({title:k(),description:k(),image:k().nullable(),skillsUrl:k().nullable(),sourceKind:O([`github`,`site`]),sourceUrl:k()}).loose(),V5=C({skills:x(C({name:k(),description:k().nullable()}).loose())}).loose(),H5=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(),U5=C({relPath:k(),content:k().nullable()}).loose(),W5=C({provider:k(),plugin:k(),version:k().optional(),marketplace:k().optional(),repositoryUrl:k().optional()}).loose(),G5=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(),K5=C({name:k(),description:k().nullable(),skillMd:k(),files:x(U5),plugin:W5.optional(),pluginBundle:G5.optional()}).loose(),q5=new Set([`project`,`local`]);function J5(e){return e!==void 0&&q5.has(e)?`project`:`global`}function Y5(e,t){let n=e=>e.replace(/\/+$/,``);return n(e)===n(t)}function X5(e,t){if(J5(e.scope)===`global`)return!0;let n=e.projectPath;return n===void 0||t===void 0?!0:Y5(n,t)}function Z5(e,t,n){if(n===void 0||J5(e.scope)!==`project`)return!1;let r=t.replace(/\/+$/,``),i=n.replace(/\/+$/,``);return r!==i&&!r.startsWith(`${i}/`)}const Q5=/^([\w.-]+)\/([\w.-]+)$/,$5=/^(?=.{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 e7(e){let t=Q5.exec(e);if(t){let[,e,n]=t;if(e&&n)return{kind:`github`,owner:e,repo:n}}return $5.test(e)?{kind:`site`,hostname:e}:null}function t7(e,t){let n=e7(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 n7(e){return e.includes(`/`)?e.split(`/`)[0]??null:null}function r7(e){let t=e.split(`/`).pop();return t&&t.length>0?t:e}const i7=`template`;function a7(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 o7(e,t){return e.trim()===``?t:`---\n${e}\n---\n${t}`}function s7(e){let{frontmatter:t,body:n}=Cm(e);return t===``?{docFrontmatterText:``,markdown:e}:{docFrontmatterText:Tm(t),markdown:n}}function c7(e){let t=e.split(`
|
|
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=a7(n.join(`
|
|
346
|
+
`))[i7];return{identity:typeof i==`object`&&i&&!Array.isArray(i)?i:{},docFrontmatterText:t.slice(r).join(`
|
|
347
|
+
`).replace(/\n+$/,``)}}function l7(e){let t=e.charCodeAt(0)===65279?e.slice(1):e,{frontmatter:n,body:r}=Cm(t);if(n===``)return{identity:{},starterContent:t};let i=Tm(n),a=c7(i);if(a)return{identity:a.identity,starterContent:o7(a.docFrontmatterText,r)};let{frontmatter:o}=Cm(r);if(o!==``)return{identity:a7(i),starterContent:r};let s=a7(i);return typeof s.title==`string`?{identity:s,starterContent:r}:{identity:{},starterContent:o7(i,r)}}function u7(e,t){let{docFrontmatterText:n,markdown:r}=s7(t),i={};for(let[t,n]of Object.entries(e))n!==void 0&&(i[t]=n);let a=(0,Ye.stringify)({[i7]:i});return`---\n${n.trim()===``?a:`${a}${n}\n`}---\n${r}`}function d7(e){return l7(e).starterContent}function f7(){let e=!1,t=``,n=0;return r=>{let i=p7(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 p7(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 m7=/^(#{1,6})\s+(.+)$/;function h7(e,t){let n=(e.endsWith(`\r`)?e.slice(0,-1):e).match(m7);if(!n)return null;let r=n[2].trim(),i=KY(r,t);return i?{level:n[1].length,text:r,slug:i}:null}const g7=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],_7={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`};function v7(e,t=g7){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}const y7={"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 b7(e){return e?y7[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}const x7={claude:`Claude`,cursor:`Cursor`,windsurf:`Windsurf`,openai:`Codex`,github:`Copilot`,cline:`Cline`};function S7(e){let t=e?.trim();return t?x7[b7(t)]??t:`Agent`}function C7(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 w7=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function T7(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function E7(e){let t=e.trim();return w7.test(t)||t.startsWith(`//`)}function D7(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(E7(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=C7(n,t);if(s)return{kind:`doc`,docName:s.docName,anchor:s.anchor};let c=T7(n);return c&&c!==`md`&&c!==`mdx`?{kind:`asset`,url:n,ext:c}:null}function O7(e,t){let n=e.trim();if(!n)return null;if(E7(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=T7(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function k7(e,t){let n=e.trim();if(!n||w7.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 A7(e){let t=e;return t.startsWith(`./`)&&(t=t.slice(2)),t.startsWith(`/`)&&(t=t.slice(1)),t}function j7(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function M7(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function N7(e){return e.split(`/`).filter(e=>e!==``)}function P7(e,t){let n=M7(t);return e===``||n===e?!0:n.startsWith(`${e}/`)}function F7(e,t){let n=M7(t);if(e===n)return 0;let r=e===``?n:n.slice(e.length+1);return r===``?0:N7(r).length}function I7(e,t){let n=N7(e),r=N7(t),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return n.length-i+(r.length-i)}function L7(){let e=new Map;function t(t){let n=A7(t);if(n===``)return;let r=j7(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=A7(t),r=j7(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=M7(A7(n)),o=[],s=[];for(let e of i)P7(a,e)?o.push(e):s.push(e);return o.length>0?(e=>{let t=e[0],n=F7(a,t);for(let r=1;r<e.length;r++){let i=e[r],o=F7(a,i);(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(o):(e=>{let t=e[0],n=I7(a,M7(t));for(let r=1;r<e.length;r++){let i=e[r],o=I7(a,M7(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 R7(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 z7(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{I2 as $,ub as $a,cX as $i,f$ as $n,Et as $o,BZ as $r,y$ as $t,z5 as A,FW as Aa,QX as Ai,s1 as An,Yt as Ao,jQ as Ar,me as As,o0 as At,K8 as B,qb as Ba,RX as Bi,_1 as Bn,zt as Bo,cQ as Br,j1 as Bt,X5 as C,nY as Ca,dZ as Ci,I$ as Cn,ln as Co,yQ as Cr,qe as Cs,x0 as Ct,K5 as D,ZW as Da,$X as Di,O$ as Dn,sn as Do,wQ as Dr,ve as Ds,u0 as Dt,V5 as E,RW as Ea,nZ as Ei,D$ as En,en as Eo,bQ as Er,P as Es,v0 as Et,T5 as F,fH as Fa,yX as Fi,r1 as Fn,Wt as Fo,lQ as Fr,W1 as Ft,Q2 as G,Kb as Ga,kX as Gi,n$ as Gn,It as Go,QZ as Gr,T1 as Gt,Q8 as H,Wb as Ha,MX as Hi,E$ as Hn,Lt as Ho,tQ as Hr,A1 as Ht,O5 as I,qR as Ia,NX as Ii,a1 as In,Gt as Io,sQ as Ir,P1 as It,U2 as J,Mb as Ja,pX as Ji,p$ as Jn,Ft as Jo,IZ as Jr,x1 as Jt,$2 as K,Gb as Ka,zX as Ki,h$ as Kn,At as Ko,GZ as Kr,w1 as Kt,A5 as L,IP as La,bX as Li,o1 as Ln,Vt as Lo,aQ as Lr,z1 as Lt,M5 as M,BU as Ma,VX as Mi,j$ as Mn,Kt as Mo,kQ as Mr,n0 as Mt,S5 as N,TH as Na,HX as Ni,M$ as Nn,qt as No,XZ as Nr,r0 as Nt,H5 as O,UW as Oa,tZ as Oi,k$ as On,Zt as Oo,TQ as Or,he as Os,p0 as Ot,C5 as P,pH as Pa,DX as Pi,v$ as Pn,Ut as Po,ZZ as Pr,G1 as Pt,B2 as Q,db as Qa,lX as Qi,d$ as Qn,Dt as Qo,WZ as Qr,$$ as Qt,k5 as R,DN as Ra,PX as Ri,t1 as Rn,Ht as Ro,rQ as Rr,O1 as Rt,J5 as S,rY as Sa,iZ as Si,P$ as Sn,F as So,vQ as Sr,Xe as Ss,k0 as St,B5 as T,zW as Ta,qX as Ti,F$ as Tn,Xt as To,SQ as Tr,Je as Ts,y0 as Tt,J2 as U,zb as Ua,_X as Ui,S$ as Un,Ot as Uo,$Z as Ur,D1 as Ut,g5 as V,Bb as Va,vX as Vi,v1 as Vn,Bt as Vo,uQ as Vr,k1 as Vt,Z2 as W,Jb as Wa,jX as Wi,i$ as Wn,kt as Wo,eQ as Wr,S1 as Wt,H2 as X,Fb as Xa,QY as Xi,g$ as Xn,Pt as Xo,RZ as Xr,o$ as Xt,z2 as Y,Nb as Ya,gX as Yi,m$ as Yn,Mt as Yo,LZ as Yr,a$ as Yt,V2 as Z,cb as Za,sX as Zi,_$ as Zn,Nt as Zo,UZ as Zr,s$ as Zt,l7 as _,yY as _a,_Z as _i,b1 as _n,wm as _o,_Q as _r,St as _s,I0 as _t,O7 as a,LY as aa,kZ as ai,z$ as an,Lb as ao,KQ as ar,tt as as,j2 as at,t7 as b,vY as ba,lZ as bi,e1 as bn,mf as bo,EQ as br,ht as bs,w0 as bt,_7 as c,xY as ca,TZ as ci,J$ as cn,Ab as co,GQ as cr,it as cs,v2 as ct,b7 as d,NY as da,xZ as di,W$ as dn,Zy as do,HQ as dr,Ze as ds,_2 as dt,WY as ea,zZ as ei,l1 as en,gb as eo,u$ as er,Tt as es,F2 as et,h7 as f,cY as fa,SZ as fi,G$ as fn,Yy as fo,UQ as fr,ct as fs,m2 as ft,d7 as g,pY as ga,CZ as gi,g1 as gn,zy as go,gQ as gr,yt as gs,G0 as gt,u7 as h,aY as ha,yZ as hi,w$ as hn,Uy as ho,BQ as hr,lt as hs,U0 as ht,D7 as i,IY as ia,jZ as ii,R$ as in,Ib as io,$Q as ir,$e as is,N2 as it,j5 as j,xW as ja,ZX as ji,c1 as jn,Jt as jo,OQ as jr,l0 as jt,R5 as k,PW as ka,eZ as ki,A$ as kn,cn as ko,AQ as kr,ge as ks,a0 as kt,v7 as l,CY as la,EZ as li,q$ as ln,xb as lo,WQ as lr,at as ls,w2 as lt,i7 as m,mY as ma,vZ as mi,i1 as mn,Ky as mo,zQ as mr,wt as ms,Z0 as mt,z7 as n,zY as na,NZ as ni,f1 as nn,vb as no,t$ as nr,rt as ns,R2 as nt,k7 as o,wY as oa,OZ as oi,B$ as on,kb as oo,qQ as or,et as os,A2 as ot,f7 as p,lY as pa,wZ as pi,K$ as pn,Jy as po,RQ as pr,st as ps,q0 as pt,q2 as q,Ub as qa,BX as qi,l$ as qn,jt as qo,KZ as qr,C1 as qt,L7 as r,RY as ra,FZ as ri,N$ as rn,bb as ro,ZQ as rr,nt as rs,L2 as rt,C7 as s,DY as sa,MZ as si,V$ as sn,Cb as so,XQ as sr,dt as ss,T2 as st,R7 as t,BY as ta,HZ as ti,p1 as tn,hb as to,x$ as tr,Qe as ts,P2 as tt,S7 as u,MY as ua,DZ as ui,U$ as un,tb as uo,VQ as ur,ot as us,g2 as ut,n7 as v,bY as va,cZ as vi,Q$ as vn,Cm as vo,mQ as vr,_t as vs,L0 as vt,Z5 as w,LW as wa,mZ as wi,L$ as wn,tn as wo,pQ as wr,Ue as ws,b0 as wt,r7 as x,gY as xa,aZ as xi,Z$ as xn,ta as xo,DQ as xr,bt as xs,j0 as xt,e7 as y,sY as ya,sZ as yi,h1 as yn,Tm as yo,hQ as yr,ft as ys,P0 as yt,J8 as z,Vb as za,FX as zi,n1 as zn,Rt as zo,nQ as zr,M1 as zt};
|
|
348
|
+
//# sourceMappingURL=src-9BFQh559.mjs.map
|