@inkeep/open-knowledge 0.42.1 → 0.43.0-beta.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/{acp-harness-probe-BC8-tjIs.mjs → acp-harness-probe-BI6bXf3a.mjs} +2 -2
- package/dist/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/assets/skills/write-skill/SKILL.md +1 -1
- package/dist/{build-fAc55Z_L.mjs → build-DYQrG4v7.mjs} +1 -1
- package/dist/build-DcqN8tua.mjs +1 -0
- package/dist/{chunk-TLSUDHID-BOrmK-jg.mjs → chunk-TLSUDHID-B0bd8ZfM.mjs} +2 -2
- package/dist/cli.mjs +60 -60
- package/dist/config-schema.json +154 -0
- package/dist/config.project.schema.json +154 -0
- package/dist/constants-BKJ7B5iw.mjs +2 -0
- package/dist/{diff-HJF2MPDN-BvwqXcA5.mjs → diff-HJF2MPDN-DhZaF2MX.mjs} +1 -1
- package/dist/{flag-coverage-6JEX67RU-D3X0I2ha.mjs → flag-coverage-6JEX67RU-D1byxsyF.mjs} +2 -2
- package/dist/fs-traced-B9Czc2nP.mjs +1 -0
- package/dist/{fs-traced-Cc6WsRtP.mjs → fs-traced-BmZQL7v9.mjs} +2 -2
- package/dist/git-handle-B1uGukUi.mjs +1 -0
- package/dist/{git-handle-BFhoHYr0.mjs → git-handle-bosCq-DO.mjs} +2 -2
- package/dist/index.d.mts +37 -13
- package/dist/index.mjs +1 -1
- package/dist/{init-D7cD6zok.mjs → init-BUp3cQ_4.mjs} +37 -37
- package/dist/init-CIt3KTw5.mjs +1 -0
- package/dist/{launch-json-removal-CTJjliTF.mjs → launch-json-removal-CwOqJJze.mjs} +2 -2
- package/dist/{lib-CE7ieLC-.mjs → lib-BS_oZ9bm.mjs} +4 -4
- package/dist/{libesm-CG75CrN9.mjs → libesm-DzwC_yFw.mjs} +1 -1
- package/dist/loader-Bofa7u1n.mjs +1 -0
- package/dist/{loader-CiE2EBJO.mjs → loader-y7Mn8M-Z.mjs} +2 -2
- package/dist/md-manager-DPw-b4lt.mjs +2 -0
- package/dist/{open-browser-Be1y1t9d.mjs → open-browser-CkLowmAw.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-DXg4YbDp.mjs → preview-BV8bR51k.mjs} +2 -2
- package/dist/preview-CUhu4iSu.mjs +1 -0
- package/dist/public/assets/ActivityModeContent-CCFHLlT9.js +1 -0
- package/dist/public/assets/AgentDiffPane-CQfhJYfr.js +2 -0
- package/dist/public/assets/{AgentThreadClientBinder-MaSL3zla.js → AgentThreadClientBinder-DZwzRPDa.js} +1 -1
- package/dist/public/assets/CodeMirrorPropInput-BqDZpzvH.js +3 -0
- package/dist/public/assets/{ConsentDialogBody-BjbzWR8D.js → ConsentDialogBody-CiXNBNFL.js} +1 -1
- package/dist/public/assets/DocumentContext-WcIs30H8.js +38 -0
- package/dist/public/assets/{EditorModeToggle-D0Db8Ydu.js → EditorModeToggle-1xLWvnWd.js} +2 -2
- package/dist/public/assets/{EnableSyncConfirmDialog-B2sHRtLY.js → EnableSyncConfirmDialog-CPuodmd5.js} +1 -1
- package/dist/public/assets/FeedbackForm-DXei5e26.js +1 -0
- package/dist/public/assets/GraphPanel-U2ZyS1Aa.js +44 -0
- package/dist/public/assets/{LintConfigEditor-DKgxJcvl.js → LintConfigEditor-DEUL9rFl.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-EDghUFni.js +1 -0
- package/dist/public/assets/{McpConsentDialogBody-CYOKF_sf.js → McpConsentDialogBody-C8VSVSPz.js} +1 -1
- package/dist/public/assets/MermaidDocEditor-BwjUe5g_.js +1 -0
- package/dist/public/assets/PropertyPanel-F1tECi8I.js +2 -0
- package/dist/public/assets/{RegisteredAgentIcon-8Tcfr3WP.js → RegisteredAgentIcon-C2dU04N7.js} +1 -1
- package/dist/public/assets/ReportBugDialogBody-Cz_kN3Qc.js +3 -0
- package/dist/public/assets/{SchemaConfigEditor-D7xbhgl6.js → SchemaConfigEditor-C_t3p7aQ.js} +1 -1
- package/dist/public/assets/SettingsDialogBody-_7c5ty2t.js +7 -0
- package/dist/public/assets/{ShareBranchSwitchDialog-C6G5A_aK.js → ShareBranchSwitchDialog-Dj6PdkLL.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-DLEkjmkI.js → ShareReceiveDialog-Cmfia-Vl.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-Ls1ECEge.js → ShareReceiveMissDialog-xHTJ1V_2.js} +1 -1
- package/dist/public/assets/{SkillEditorActions-AGeWFFyT.js → SkillEditorActions-Cw7itVro.js} +1 -1
- package/dist/public/assets/SourceEditor-DGpQCfDe.js +1 -0
- package/dist/public/assets/{TerminalPanel-Bf_h8SIB.js → TerminalPanel-Dfvz7JrY.js} +3 -3
- package/dist/public/assets/TerminalSessionsHost-D6vvdN1I.js +2 -0
- package/dist/public/assets/{TerminalWindowApp-2yCXBcQc.js → TerminalWindowApp-CfeLvqLD.js} +1 -1
- package/dist/public/assets/ThreadView-S_XJwwbZ.js +6 -0
- package/dist/public/assets/TimelineDiffPane-DgS-xWyU.js +2 -0
- package/dist/public/assets/{abnfDiagram-VRR7QNED-BN6xOaJK.js → abnfDiagram-VRR7QNED-BA0sca5y.js} +1 -1
- package/dist/public/assets/{agent-diff-store-Bi0IQPgd.js → agent-diff-store-Cn0Zbsuy.js} +1 -1
- package/dist/public/assets/{agent-visibility-HpfSUFqP.js → agent-visibility-B4n6jrOx.js} +1 -1
- package/dist/public/assets/{arc-DXLgvp45.js → arc-DIcYIkPb.js} +1 -1
- package/dist/public/assets/architecture-TIHT7OUA-DhKVyAdC.js +1 -0
- package/dist/public/assets/{architectureDiagram-ZJ3FMSHR-sAL9H8K0.js → architectureDiagram-ZJ3FMSHR-CyZsfJqr.js} +1 -1
- package/dist/public/assets/auth-state-cache-PC5ml3gS.js +11 -0
- package/dist/public/assets/awareness-heartbeat.worker-BYkbsKQ2.js +1 -0
- package/dist/public/assets/{blockDiagram-677ZJIJ3-CecPiwgF.js → blockDiagram-677ZJIJ3-BL4J4ddi.js} +1 -1
- package/dist/public/assets/{c4Diagram-LMCZKHZV-D8mdqYYS.js → c4Diagram-LMCZKHZV-DtpyWL_l.js} +1 -1
- package/dist/public/assets/{calendar-DEDeJBdZ.js → calendar-2iQWonjM.js} +1 -1
- package/dist/public/assets/channel-D7XYjy4a.js +1 -0
- package/dist/public/assets/chunk-2Q5K7J3B-BpVQiBsM.js +1 -0
- package/dist/public/assets/{chunk-32BRIVSS-JpxGJ5ji.js → chunk-32BRIVSS-J_rdnOiy.js} +1 -1
- package/dist/public/assets/{chunk-52WLFC77-C_iSxcYL.js → chunk-52WLFC77-BOMCKXNP.js} +1 -1
- package/dist/public/assets/{chunk-5FCAYU7R-Bq8uZn8B.js → chunk-5FCAYU7R-8Y9BJKC-.js} +1 -1
- package/dist/public/assets/{chunk-5HE753X5-Canmf8DQ.js → chunk-5HE753X5-CQEApaqU.js} +1 -1
- package/dist/public/assets/{chunk-5JV3BV7I-Dtexaqo4.js → chunk-5JV3BV7I-Wp4ieThX.js} +1 -1
- package/dist/public/assets/{chunk-5TONJI2A-QaNyDyr1.js → chunk-5TONJI2A-Dht2oB5p.js} +1 -1
- package/dist/public/assets/{chunk-5VM5RSS4-DnRDZx9C.js → chunk-5VM5RSS4-BtUIXst7.js} +1 -1
- package/dist/public/assets/{chunk-7BUUIJ7U-CjwBXrEk.js → chunk-7BUUIJ7U-B7ItXXvn.js} +1 -1
- package/dist/public/assets/{chunk-BIQX33UG-CwPTWPTQ.js → chunk-BIQX33UG-B4CjyNhu.js} +1 -1
- package/dist/public/assets/{chunk-BO2N2NFS-BTXsfKML.js → chunk-BO2N2NFS-DMgXoikU.js} +3 -3
- package/dist/public/assets/{chunk-C7G6YPKG-yRQSkwCz.js → chunk-C7G6YPKG-Bhzd4FsL.js} +1 -1
- package/dist/public/assets/{chunk-CQNSW5MT-BzGo9Za_.js → chunk-CQNSW5MT-CVrDoms_.js} +1 -1
- package/dist/public/assets/{chunk-CYSBUYHQ-CKmnpHug.js → chunk-CYSBUYHQ-N9puYKAt.js} +1 -1
- package/dist/public/assets/{chunk-EMLP6XTP-_x7IkQoS.js → chunk-EMLP6XTP-ACA6yW7o.js} +1 -1
- package/dist/public/assets/{chunk-EX3LRPZG-Dp9dLoos.js → chunk-EX3LRPZG-BIvLDOrf.js} +1 -1
- package/dist/public/assets/{chunk-FWX5IMBZ-DS2bi_oI.js → chunk-FWX5IMBZ-1CESfm5O.js} +2 -2
- package/dist/public/assets/{chunk-HOUHSVGY-CiAzcmEO.js → chunk-HOUHSVGY-DTcG17JD.js} +1 -1
- package/dist/public/assets/{chunk-ICXQ74PX-COjRz7aI.js → chunk-ICXQ74PX-CDyWyZCQ.js} +1 -1
- package/dist/public/assets/{chunk-JG7HCLWE-BIqqOtX1.js → chunk-JG7HCLWE-gt52jYPR.js} +1 -1
- package/dist/public/assets/{chunk-JWPE2WC7-DKmcMFEN.js → chunk-JWPE2WC7-BIGkO1cG.js} +1 -1
- package/dist/public/assets/{chunk-MOJQB5TN-BJQv3CxF.js → chunk-MOJQB5TN-dX_Ns_6-.js} +1 -1
- package/dist/public/assets/{chunk-MOZMSUNE-Cy6wrRA7.js → chunk-MOZMSUNE-DtIvb1II.js} +1 -1
- package/dist/public/assets/{chunk-OGEWGWER-C7C3Oiaz.js → chunk-OGEWGWER-BgCGYbch.js} +1 -1
- package/dist/public/assets/{chunk-OSBZ3O6U-DmX-gaPq.js → chunk-OSBZ3O6U-BjU8eaT1.js} +1 -1
- package/dist/public/assets/{chunk-PUDLZKDR-ZoTPQ917.js → chunk-PUDLZKDR-BtLyPGmD.js} +1 -1
- package/dist/public/assets/{chunk-Q4XR5HBZ-sjes-Yon.js → chunk-Q4XR5HBZ-B32WTAPs.js} +1 -1
- package/dist/public/assets/{chunk-QBLGF6JB-BiU9LEk8.js → chunk-QBLGF6JB-CprENtRb.js} +1 -1
- package/dist/public/assets/{chunk-R7FJI6CG-BAfUnNIm.js → chunk-R7FJI6CG-DCV9Dvbs.js} +1 -1
- package/dist/public/assets/{chunk-RYQCIY6F-IRvgwbUs.js → chunk-RYQCIY6F-DAyLri1b.js} +1 -1
- package/dist/public/assets/{chunk-U6XO7XAA-2Ds3FX_A.js → chunk-U6XO7XAA-DSdpZQB7.js} +1 -1
- package/dist/public/assets/{chunk-V7JOEXUC-Xkrljz-l.js → chunk-V7JOEXUC-9lX7N0EN.js} +1 -1
- package/dist/public/assets/chunk-VAUOI2AC-buA1NS7h.js +1 -0
- package/dist/public/assets/{chunk-VR4S4FIN-Db6y0lij.js → chunk-VR4S4FIN-CcTJJ1HA.js} +1 -1
- package/dist/public/assets/{chunk-WYO6CB5R-WjatCbeP.js → chunk-WYO6CB5R-9yPqK9ib.js} +1 -1
- package/dist/public/assets/chunk-XXDRQBXY-Dpdm1nrz.js +1 -0
- package/dist/public/assets/{chunk-YOTPTUD7-BDIMzFfd.js → chunk-YOTPTUD7-DBti7bK5.js} +1 -1
- package/dist/public/assets/{chunk-ZGVPDNZ5-DKtGLh__.js → chunk-ZGVPDNZ5-5ruaVNfo.js} +1 -1
- package/dist/public/assets/{chunk-ZIRB5QZD-JvsKOaWe.js → chunk-ZIRB5QZD-DmY1977n.js} +1 -1
- package/dist/public/assets/classDiagram-OUVF2IWQ-BdRcUr99.js +1 -0
- package/dist/public/assets/classDiagram-v2-EOCWNBFH-4fffeoHu.js +1 -0
- package/dist/public/assets/client-version-BmlQC9U8.js +1 -0
- package/dist/public/assets/{config-provider-DIuwNlqX.js → config-provider-GshVNiWq.js} +2 -2
- package/dist/public/assets/{cose-bilkent-JH36ORCC-B5xjEHuC.js → cose-bilkent-JH36ORCC-D8nyC_t4.js} +1 -1
- package/dist/public/assets/cynefin-VYW2F7L2-BlrdxSfe.js +1 -0
- package/dist/public/assets/{cynefinDiagram-TSTJHNR4-BeGFvfoc.js → cynefinDiagram-TSTJHNR4-B4B58YEO.js} +1 -1
- package/dist/public/assets/{dagre-CLVncoxl.js → dagre-DjTdhlGF.js} +1 -1
- package/dist/public/assets/{dagre-VKFMJZFB-D98i06T_.js → dagre-VKFMJZFB-DQHmtQOE.js} +1 -1
- package/dist/public/assets/{diagram-FQU43EPY--u6SeKWp.js → diagram-FQU43EPY-B28ABQG6.js} +1 -1
- package/dist/public/assets/{diagram-G47NLZAW-BqkpNwsF.js → diagram-G47NLZAW-1MthGQcj.js} +1 -1
- package/dist/public/assets/{diagram-NH7WQ7WH-eeVqGH2O.js → diagram-NH7WQ7WH-B_Fhjw29.js} +1 -1
- package/dist/public/assets/{diagram-OA4YK3LP-D_SnUALW.js → diagram-OA4YK3LP-1B7_yz5p.js} +1 -1
- package/dist/public/assets/{diagram-WEI45ONY-DKlVw8je.js → diagram-WEI45ONY-DzfuKRxf.js} +1 -1
- package/dist/public/assets/{dist-Cal4LUep.js → dist-Cgpf3BIr.js} +170 -168
- package/dist/public/assets/dist-ChSSPf9y.js +2 -0
- package/dist/public/assets/dist-CslAqn54.js +1 -0
- package/dist/public/assets/{dist-DQ4RxLMf.js → dist-DL8cni8v.js} +1 -1
- package/dist/public/assets/{doc-hash-BSK-KaTu.js → doc-hash-Bso39bSh.js} +1 -1
- package/dist/public/assets/{documents-events-1HWCdfoh.js → documents-events-CtKncdGv.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-CCIWWBDH-d0cDPEQB.js → ebnfDiagram-CCIWWBDH-BjazoYYO.js} +1 -1
- package/dist/public/assets/{erDiagram-Q63AITRT-BsZ0tL6Z.js → erDiagram-Q63AITRT-DvgiLWl5.js} +1 -1
- package/dist/public/assets/eventmodeling-45OFAUF4-D8s6Yevv.js +1 -0
- package/dist/public/assets/{file-tree-adapter-Dw7Dgyj1.js → file-tree-adapter-SJF4yRd-.js} +1 -1
- package/dist/public/assets/{file-tree-utils-DiUPuK3N.js → file-tree-utils-llNa05uo.js} +1 -1
- package/dist/public/assets/flowDiagram-23GEKE2U-hlKdkNzZ.js +1 -0
- package/dist/public/assets/{ganttDiagram-NO4QXBWP-DPxkIh3b.js → ganttDiagram-NO4QXBWP-CJgOU-j1.js} +1 -1
- package/dist/public/assets/gitGraph-TEB2WS4Q-B-5iqxxO.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-IHSO6WYX-vSvxugX5.js → gitGraphDiagram-IHSO6WYX-DYP87cJL.js} +1 -1
- package/dist/public/assets/globals-88oPHAs4.css +1 -0
- package/dist/public/assets/{globals-CXEWtNVL.js → globals-BzYms-F0.js} +1 -1
- package/dist/public/assets/{graphlib-C4UD57Nn.js → graphlib-DYCc0Y9o.js} +1 -1
- package/dist/public/assets/{highlighted-body-OFNGDK62-DCKUiY8r.js → highlighted-body-OFNGDK62-C9GzQB8c.js} +1 -1
- package/dist/public/assets/index-BVWeqqNi.js +2014 -0
- package/dist/public/assets/info-DKCQHKI2-CkzkGEPY.js +1 -0
- package/dist/public/assets/{infoDiagram-FWYZ7A6U-Crh0f5aw.js → infoDiagram-FWYZ7A6U-CbZOQ254.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-FXEZZL3T-DBJ4jEKk.js → ishikawaDiagram-FXEZZL3T-CUWPHUOP.js} +1 -1
- package/dist/public/assets/{journeyDiagram-5HDEW3XC-CUDo0rzP.js → journeyDiagram-5HDEW3XC-RLUp44OU.js} +1 -1
- package/dist/public/assets/{kanban-definition-HUTT4EX6-CJD8Oexf.js → kanban-definition-HUTT4EX6-D4TPhDQW.js} +1 -1
- package/dist/public/assets/{line-ClsiHw5g.js → line-KTG0S8eM.js} +1 -1
- package/dist/public/assets/{linear-BklRBRnp.js → linear-D6fTctUn.js} +1 -1
- package/dist/public/assets/lint-config-client-BYECwWuu.js +1 -0
- package/dist/public/assets/{map-CMaVsxPf.js → map-Rw6uJqFR.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-rS3aDGOb.js → markdownlint-rule-browser-BR80y6ho.js} +1 -1
- package/dist/public/assets/mermaid-GHXKKRXX-WtDC9WMV.js +1 -0
- package/dist/public/assets/{mermaid-parser.core-D-rj2UdW.js → mermaid-parser.core-CusxBOjy.js} +2 -2
- package/dist/public/assets/{mermaid.core-DZGNq3YZ.js → mermaid.core-okCkIUps.js} +3 -3
- package/dist/public/assets/{mindmap-definition-LN4V7U3C-Drk1V3-q.js → mindmap-definition-LN4V7U3C-D-eGlMvq.js} +1 -1
- package/dist/public/assets/{navigation-targets-Ci2h-vaL.js → navigation-targets-SdStq-nY.js} +1 -1
- package/dist/public/assets/{now-Ck_JVNC2.js → now-DRL8tqfF.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-DfGutPkc.js → open-managed-artifact-tab-CgQ5akUh.js} +1 -1
- package/dist/public/assets/{ordinal-DrDHGs3t.js → ordinal-DnmHW-WD.js} +1 -1
- package/dist/public/assets/overlay-layers-y-dNUWSd.js +1 -0
- package/dist/public/assets/packet-7NZHBO7P-DDIvLOTX.js +1 -0
- package/dist/public/assets/{pegDiagram-2B236MQR-CM3AjMbx.js → pegDiagram-2B236MQR-Bjnm3xCN.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-BuGLGemz.js → pending-receive-nav-store-DTqMgVXW.js} +1 -1
- package/dist/public/assets/pie-RZYD4A2V-DnssmCEa.js +1 -0
- package/dist/public/assets/{pieDiagram-ENE6RG2P-D8wIwdwS.js → pieDiagram-ENE6RG2P-BkLpbnFN.js} +1 -1
- package/dist/public/assets/{prop-types-B-N3_i3c.js → prop-types-CU-rIGvv.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-ABIIQ3AL-h2Dtd1uI.js → quadrantDiagram-ABIIQ3AL-eMGNkhp-.js} +1 -1
- package/dist/public/assets/radar-I7S5WNFK-0J5y2_MO.js +1 -0
- package/dist/public/assets/railroad-3IZDKUUU-BgsONsxl.js +1 -0
- package/dist/public/assets/railroad-abnf-AHOZXSZD-BhBo_9j9.js +1 -0
- package/dist/public/assets/railroad-ebnf-EBAXGLYW-B5mHA2IL.js +1 -0
- package/dist/public/assets/railroad-peg-LSFZ7HO6-BV4uZ4WL.js +1 -0
- package/dist/public/assets/{railroadDiagram-RFXS5EU6-CLc68_Sv.js → railroadDiagram-RFXS5EU6-Cs70gdc4.js} +1 -1
- package/dist/public/assets/{receive-store-CL0RH8Oa.js → receive-store-C5uRDARd.js} +1 -1
- package/dist/public/assets/{requirementDiagram-TGXJPOKE-DtJA-6Zq.js → requirementDiagram-TGXJPOKE-yQhnovOU.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-HTMAVEWB-Dw4-_oAZ.js → sankeyDiagram-HTMAVEWB-C7R3anws.js} +1 -1
- package/dist/public/assets/{selection-context-zsjvL-8N.js → selection-context-DtzxXWAX.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-DBY2YBRQ-B4Af8Tp3.js → sequenceDiagram-DBY2YBRQ-CEdbVotz.js} +1 -1
- package/dist/public/assets/{sizeCapture-X5ZJPWSS-B7J9pg7l.js → sizeCapture-X5ZJPWSS-DAh96RVo.js} +1 -1
- package/dist/public/assets/skill-actions-PBEWDc_3.js +1 -0
- package/dist/public/assets/{skills-api-ChYiP1Zv.js → skills-api-Cd3IvPjQ.js} +1 -1
- package/dist/public/assets/{src-D9eynQ26.js → src--OxBHrEw.js} +1 -1
- package/dist/public/assets/{src-D8jPu2QV.js → src-Dum6a22K.js} +2 -2
- package/dist/public/assets/{stateDiagram-2N3HPSRC-L3VR_LMr.js → stateDiagram-2N3HPSRC-q96Dmt4i.js} +1 -1
- package/dist/public/assets/stateDiagram-v2-6OUMAXLB-BCNHhMpC.js +1 -0
- package/dist/public/assets/{swimlanes-5IMT3BWC-CRfWYpqt.js → swimlanes-5IMT3BWC--g7Ac5Wk.js} +2 -2
- package/dist/public/assets/swimlanesDiagram-G3AALYLV-hRuoLGg3.js +8 -0
- package/dist/public/assets/{tag-pill-input-B27HgfRy.js → tag-pill-input-CS-2Qx-_.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-ClG4AlV8.js → target-navigation-intent-D3w-HLu3.js} +1 -1
- package/dist/public/assets/{telemetry-impl-DXiL3sBk.js → telemetry-impl-Z8PmW_aL.js} +2 -2
- package/dist/public/assets/{telemetry-startup-Db44p95P.js → telemetry-startup-Cy7C8oSF.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-N4CMVbPT.js → terminal-launch-events-CTVJjVZG.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-DxTZB2oZ.js → terminal-telemetry-pdIn1zDv.js} +1 -1
- package/dist/public/assets/thread-client-C0O75Kza.js +1 -0
- package/dist/public/assets/{timeline-definition-FHXFAJF6-C1Qc7Dba.js → timeline-definition-FHXFAJF6-DqrkK_6w.js} +1 -1
- package/dist/public/assets/treeView-QDETBFTQ-N2YNex2I.js +1 -0
- package/dist/public/assets/treemap-6X3UGDF4-DkzYKeau.js +1 -0
- package/dist/public/assets/{typing-burst-detector-BP7d86JP.js → typing-burst-detector-BEbZgL9-.js} +2 -2
- package/dist/public/assets/{uninstall-DHjtqCbn.js → uninstall-BpVYvA3J.js} +1 -1
- package/dist/public/assets/use-activity-panel-B8RDBgok.js +1 -0
- package/dist/public/assets/use-apply-config-color-theme-A0jx7vnI.js +2 -0
- package/dist/public/assets/{use-collab-url-D0INpn_f.js → use-collab-url-bpUtly6S.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-C-fHLeXw.js → use-live-xterm-theme-w8QeNUlq.js} +1 -1
- package/dist/public/assets/{use-settings-route-CXFzIfYo.js → use-settings-route-CFvCFlXS.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-fhwpyN81.js → use-terminal-enabled-CuFAAh8J.js} +1 -1
- package/dist/public/assets/use-timeline-entry-diff-DlW9hmrR.js +6 -0
- package/dist/public/assets/{use-workspace-3T40FR83.js → use-workspace-CNWEPWim.js} +1 -1
- package/dist/public/assets/{vennDiagram-L72KCM5P-C4cNDPVl.js → vennDiagram-L72KCM5P-DFSXk11G.js} +1 -1
- package/dist/public/assets/wardley-OPB4EBWU-OOiOMSoP.js +1 -0
- package/dist/public/assets/{wardleyDiagram-EHGQE667-B2UY3KQf.js → wardleyDiagram-EHGQE667-Bw65HviB.js} +1 -1
- package/dist/public/assets/{workspace-paths-B-NChZS2.js → workspace-paths-DQOJHVhV.js} +1 -1
- package/dist/public/assets/{xychartDiagram-FW5EYKEG-CMsrwnL2.js → xychartDiagram-FW5EYKEG-CEVfZ0d5.js} +1 -1
- package/dist/public/index.html +55 -53
- package/dist/public/uninstall.html +5 -5
- package/dist/{repair-launch-json-CyiLC6sz.mjs → repair-launch-json-_2TGq22B.mjs} +2 -2
- package/dist/{repair-mcp-configs-MZhuDeWK.mjs → repair-mcp-configs-Cf6t84yK.mjs} +2 -2
- package/dist/repair-skills-CtpTVpw_.mjs +1 -0
- package/dist/{repair-skills-CBmnNSO7.mjs → repair-skills-DwQqF8O8.mjs} +2 -2
- package/dist/schemas/v0/config.project.schema.json +154 -0
- package/dist/server-lock-CZMSbPZ0.mjs +1 -0
- package/dist/{server-lock-vdpThyb4.mjs → server-lock-DpWXnrNF.mjs} +2 -2
- package/dist/{sleep-B2L0pvp4.mjs → sleep-DTzPXGtM.mjs} +5 -5
- package/dist/src-BFcAqZ_V.mjs +1 -0
- package/dist/src-BkP5u3RK.mjs +3269 -0
- package/dist/{src-DtcKZLt0.mjs → src-DY417osM.mjs} +120 -116
- package/dist/src-JZ7OJ1TB.mjs +20 -0
- package/dist/start-0twfe-vW.mjs +1 -0
- package/dist/{start-BRjY-38U.mjs → start-BcTJLNem.mjs} +2 -2
- package/dist/{write-project-skill-B_HecSEZ.mjs → write-project-skill-cxdqSDsT.mjs} +4 -4
- package/package.json +5 -5
- package/dist/build-L3kflBeC.mjs +0 -1
- package/dist/constants-DafFdWJR.mjs +0 -2
- package/dist/fs-traced-BpCA6YXG.mjs +0 -1
- package/dist/git-handle-CRnnMEIm.mjs +0 -1
- package/dist/init-CY3jgzP0.mjs +0 -1
- package/dist/loader-BjQNNJAX.mjs +0 -1
- package/dist/md-manager-CAqfesEA.mjs +0 -2
- package/dist/preview-BMVXzzrS.mjs +0 -1
- package/dist/public/assets/ActivityModeContent-CnhDNi-c.js +0 -1
- package/dist/public/assets/AgentDiffPane-BKvov9S5.js +0 -2
- package/dist/public/assets/CodeMirrorPropInput-ZGACWLSy.js +0 -3
- package/dist/public/assets/DocumentContext-DDkluS7D.js +0 -38
- package/dist/public/assets/FeedbackForm-DuEQbMOb.js +0 -1
- package/dist/public/assets/GraphPanel-1CKwHElx.js +0 -44
- package/dist/public/assets/ManagedArtifactProperties-9e_jj3hZ.js +0 -1
- package/dist/public/assets/MermaidDocEditor-BNURUYJE.js +0 -1
- package/dist/public/assets/PropertyPanel-BMIcO_AS.js +0 -2
- package/dist/public/assets/ReportBugDialogBody-ByMe7BRT.js +0 -2
- package/dist/public/assets/SettingsDialogBody-Bkz3Bpgp.js +0 -7
- package/dist/public/assets/SourceEditor-DI6JkRTr.js +0 -1
- package/dist/public/assets/TerminalSessionsHost-B2cWbpj-.js +0 -2
- package/dist/public/assets/ThreadView-D2BFrI_O.js +0 -6
- package/dist/public/assets/TimelineDiffPane-B9KqEt7q.js +0 -2
- package/dist/public/assets/architecture-TIHT7OUA-D0qm7G-3.js +0 -1
- package/dist/public/assets/auth-state-cache-BUVYaS5m.js +0 -11
- package/dist/public/assets/channel-DA_5WVVG.js +0 -1
- package/dist/public/assets/chunk-2Q5K7J3B-CZvundFv.js +0 -1
- package/dist/public/assets/chunk-VAUOI2AC-CzpwkaIj.js +0 -1
- package/dist/public/assets/chunk-XXDRQBXY-aujsIsPx.js +0 -1
- package/dist/public/assets/classDiagram-OUVF2IWQ-DaJYvXbz.js +0 -1
- package/dist/public/assets/classDiagram-v2-EOCWNBFH-naGS_xxO.js +0 -1
- package/dist/public/assets/client-version-FVbajnsJ.js +0 -1
- package/dist/public/assets/cynefin-VYW2F7L2-BIoIBt-C.js +0 -1
- package/dist/public/assets/dist-B1qkpf98.js +0 -2
- package/dist/public/assets/eventmodeling-45OFAUF4-DJJWSxES.js +0 -1
- package/dist/public/assets/flowDiagram-23GEKE2U-BDvIWhMq.js +0 -1
- package/dist/public/assets/gitGraph-TEB2WS4Q-DbaUaLPe.js +0 -1
- package/dist/public/assets/globals-GYHxaktb.css +0 -1
- package/dist/public/assets/index-Bh6-_Nba.js +0 -2014
- package/dist/public/assets/info-DKCQHKI2-t_ReTPP2.js +0 -1
- package/dist/public/assets/lint-config-client-G_mrikOJ.js +0 -1
- package/dist/public/assets/mermaid-GHXKKRXX-Cj1_l2m9.js +0 -1
- package/dist/public/assets/packet-7NZHBO7P-DvVA7lgt.js +0 -1
- package/dist/public/assets/pie-RZYD4A2V-THg35hJ6.js +0 -1
- package/dist/public/assets/radar-I7S5WNFK-Cnae5YqF.js +0 -1
- package/dist/public/assets/railroad-3IZDKUUU-z19uKrUP.js +0 -1
- package/dist/public/assets/railroad-abnf-AHOZXSZD-BUg9AO49.js +0 -1
- package/dist/public/assets/railroad-ebnf-EBAXGLYW-DuBtfJ_K.js +0 -1
- package/dist/public/assets/railroad-peg-LSFZ7HO6-BSfcErEJ.js +0 -1
- package/dist/public/assets/skill-actions-C_5-d4BC.js +0 -1
- package/dist/public/assets/stateDiagram-v2-6OUMAXLB-DM5o7mT7.js +0 -1
- package/dist/public/assets/swimlanesDiagram-G3AALYLV-BTrTvdTh.js +0 -8
- package/dist/public/assets/thread-client-CurKSSA8.js +0 -1
- package/dist/public/assets/treeView-QDETBFTQ-nC4bzLZB.js +0 -1
- package/dist/public/assets/treemap-6X3UGDF4-D1MGcMAJ.js +0 -1
- package/dist/public/assets/use-activity-panel-35_3901z.js +0 -1
- package/dist/public/assets/use-apply-config-color-theme-CK97Jvup.js +0 -2
- package/dist/public/assets/use-timeline-entry-diff-CHWJnnz2.js +0 -6
- package/dist/public/assets/wardley-OPB4EBWU-Dt2lEMaH.js +0 -1
- package/dist/repair-skills-B1Zc-g_X.mjs +0 -1
- package/dist/server-lock-DKRUWCqU.mjs +0 -1
- package/dist/src--Oy-0xgD.mjs +0 -22
- package/dist/src-mOlBaMpr.mjs +0 -3267
- package/dist/src-o9XsfdYT.mjs +0 -1
- package/dist/start-BnM87E8e.mjs +0 -1
- /package/dist/public/assets/{ActivityPanelDiffView-CSOgz1F9.js → ActivityPanelDiffView-B03Wzvap.js} +0 -0
- /package/dist/public/assets/{AppMenubar-CXadCCMc.js → AppMenubar-Bisp0k8X.js} +0 -0
- /package/dist/public/assets/{BugReportHistoryDialog-B5Yf5rAM.js → BugReportHistoryDialog-Bp4PHyEI.js} +0 -0
- /package/dist/public/assets/{__vite-browser-external-T_MG5_bv.js → __vite-browser-external-BckCY-VI.js} +0 -0
- /package/dist/public/assets/{agent-presence-CTJkQnoU.js → agent-presence-CEfNcJUY.js} +0 -0
- /package/dist/public/assets/{array-BAI_NyvG.js → array-D9gZmznT.js} +0 -0
- /package/dist/public/assets/{chunk-KEIR6QF5-BSqm2tNO.js → chunk-KEIR6QF5-zkgbDrf9.js} +0 -0
- /package/dist/public/assets/{chunk-Y2CYZVJY-BCLrJxO_.js → chunk-Y2CYZVJY-BAUBUeAF.js} +0 -0
- /package/dist/public/assets/{clike-CkWR_Slw.js → clike-ccBqxK3t.js} +0 -0
- /package/dist/public/assets/{clipboard-adapter--Ja4oXEM.js → clipboard-adapter-Cxzkvc1d.js} +0 -0
- /package/dist/public/assets/{colors-C1oQkVlI.js → colors-BZ7r12jC.js} +0 -0
- /package/dist/public/assets/{copilot-BAzfPGty.js → copilot-CjOGWDvv.js} +0 -0
- /package/dist/public/assets/{cursor-C1n4GZG0.js → cursor-B8rehP9c.js} +0 -0
- /package/dist/public/assets/{cytoscape.esm-ewu4kfMU.js → cytoscape.esm-GtliGICm.js} +0 -0
- /package/dist/public/assets/{defaultLocale-C0VJf-tm.js → defaultLocale-CqKPYlUZ.js} +0 -0
- /package/dist/public/assets/{diff-BsdYbIgD.js → diff-oW0nWZgn.js} +0 -0
- /package/dist/public/assets/{dist-DDqBNQiG.js → dist-B1Jbz0yl.js} +0 -0
- /package/dist/public/assets/{dist-d-7NE8aL.js → dist-Cqbn6bM9.js} +0 -0
- /package/dist/public/assets/{dist-BF6U-ayK.js → dist-D1zECWv_.js} +0 -0
- /package/dist/public/assets/{dist-BocybIB-.js → dist-zCmaEyrL.js} +0 -0
- /package/dist/public/assets/{follow-file-DBnmqlyk.js → follow-file-BghdVu5J.js} +0 -0
- /package/dist/public/assets/{form-D-z6QdLf.js → form-coxG-8Qw.js} +0 -0
- /package/dist/public/assets/{format-BVhfvqw3.js → format-CejNFduS.js} +0 -0
- /package/dist/public/assets/{go-D-ZJPtwk.js → go-CCS4kWKN.js} +0 -0
- /package/dist/public/assets/{init-BX0_4ZBD.js → init-CMTNTj66.js} +0 -0
- /package/dist/public/assets/{isObject-BkQ5hIlp.js → isObject-Ho9jn-6g.js} +0 -0
- /package/dist/public/assets/{libesm-CHqp8owk.js → libesm-Db-3Gx3Z.js} +0 -0
- /package/dist/public/assets/{lint-plugin-meta-B3N1DKgL.js → lint-plugin-meta-J-wb-uxW.js} +0 -0
- /package/dist/public/assets/{lru-string-cache-hwDoWobi.js → lru-string-cache-BZxOuxTi.js} +0 -0
- /package/dist/public/assets/{lua-Cx3bDzQk.js → lua-DgAwqJ0D.js} +0 -0
- /package/dist/public/assets/{mcp-consent-store-Xk9UA_MB.js → mcp-consent-store-wvrClpLC.js} +0 -0
- /package/dist/public/assets/{min-Bd9Lorof.js → min-BQPeeNfF.js} +0 -0
- /package/dist/public/assets/{panel-Cyobla0Z.js → panel-C8ZhM4q-.js} +0 -0
- /package/dist/public/assets/{panzoom.es-B9Lp3OVt.js → panzoom.es-CxTS7ZPP.js} +0 -0
- /package/dist/public/assets/{path-C1_RvjGX.js → path-DoEWlp6O.js} +0 -0
- /package/dist/public/assets/{pdf-B7Y_z-D1.js → pdf-Da_O_GF5.js} +0 -0
- /package/dist/public/assets/{pdf.worker-B6TdDPWM.js → pdf.worker-Pbs_-93C.js} +0 -0
- /package/dist/public/assets/{perl-CV3dlsd7.js → perl-DMwerdcj.js} +0 -0
- /package/dist/public/assets/{properties-D1GaCcfv.js → properties-Du1Kuwqc.js} +0 -0
- /package/dist/public/assets/{r-CHRF940O.js → r-wSvpRg5h.js} +0 -0
- /package/dist/public/assets/{rough.esm-B1nzhEZO.js → rough.esm-esi5HKC4.js} +0 -0
- /package/dist/public/assets/{ruby-YzQuyklS.js → ruby-DuM6hMQW.js} +0 -0
- /package/dist/public/assets/{schema-fields-view-intent-Dz1ZzVCe.js → schema-fields-view-intent-BeD8vY0v.js} +0 -0
- /package/dist/public/assets/{share-metadata-rows-BlaR96La.js → share-metadata-rows-CbXHISQ4.js} +0 -0
- /package/dist/public/assets/{shell-BvVJAeXE.js → shell-BZ7mgeL0.js} +0 -0
- /package/dist/public/assets/{skeleton-HLkcMp95.js → skeleton-BG12Hmzn.js} +0 -0
- /package/dist/public/assets/{sortable.esm-B6whf_t-.js → sortable.esm-C565D25d.js} +0 -0
- /package/dist/public/assets/{sql-CECtKdDi.js → sql-BXdRuz6d.js} +0 -0
- /package/dist/public/assets/{src-BaTc8y5c.js → src-DNE52RZP.js} +0 -0
- /package/dist/public/assets/{swift-DLct3DJs.js → swift-DZwxTp-L.js} +0 -0
- /package/dist/public/assets/{textarea-RSYJwPz9.js → textarea-tdCJViKf.js} +0 -0
- /package/dist/public/assets/{thread-draft-staging-B4_1TigQ.js → thread-draft-staging-BuvCYJwg.js} +0 -0
- /package/dist/public/assets/{toml-Bl-Vp4wG.js → toml-C5KR4pi6.js} +0 -0
- /package/dist/public/assets/{use-installed-clis-B_nDAq7A.js → use-installed-clis-UlK7P1aH.js} +0 -0
- /package/dist/public/assets/{useLintConfigViewMode-BYm6FwC5.js → useLintConfigViewMode-DKPENttR.js} +0 -0
package/dist/public/assets/{typing-burst-detector-BP7d86JP.js → typing-burst-detector-BEbZgL9-.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{$t as n,S as r,n as i}from"./DocumentContext-DDkluS7D.js";import{t as a}from"./react-f2sANaYj.js";import{n as o,r as s}from"./dist-Nvb76hAm.js";import{r as c,t as l}from"./useQuery-ZeEDLtxh.js";import{t as u}from"./compiler-runtime-BfE3aGVn.js";import{s as d}from"./createLucideIcon-DAkhoPjT.js";import{t as f}from"./button-Gol9BgNB.js";import{i as p,n as m,t as h}from"./tooltip-B4J7VHmA.js";import{n as g,r as _,t as v}from"./collapsible-B1mS1n9y.js";import{N as y,ct as b,k as x}from"./CodeMirrorPropInput-ZGACWLSy.js";import{n as S,t as C}from"./toggle-group-CjXmmTGy.js";import{Kt as w,_r as T,_t as E,mt as D,ni as O}from"./dist-Cal4LUep.js";import{t as k}from"./chevron-right-C8oTR6gu.js";import{n as A}from"./CopyButton-1Q6Wnnjb.js";import{i as j,r as M}from"./prop-types-B-N3_i3c.js";import{l as N}from"./workspace-paths-B-NChZS2.js";import{t as P}from"./refresh-cw-BfeWGCsv.js";import{t as F}from"./triangle-alert-Clgvyc7B.js";import{t as I}from"./wrench-BfoTvqT9.js";import{n as L}from"./dist-BLAMau9Z.js";import{t as R}from"./dist-q14fBS3T.js";import{a as z}from"./use-settings-route-CXFzIfYo.js";import{c as B}from"./documents-events-1HWCdfoh.js";import{i as V}from"./startup-marks-CqVzdU1y.js";import{a as H,s as U}from"./doc-hash-BSK-KaTu.js";import{t as W}from"./badge-Dba4cvJR.js";import{a as G,i as ee,n as te,o as ne,r as re,s as ie,t as ae}from"./panel-Cyobla0Z.js";import{t as oe}from"./lint-plugin-meta-B3N1DKgL.js";import{t as K}from"./skeleton-HLkcMp95.js";import{a as se,d as ce}from"./lint-config-client-G_mrikOJ.js";var q=e(a(),1),J=u(),le=3e4,Y=new Map;function X(e){return e?Date.now()-e.rememberedAt>le?null:e.navigation:null}function ue(e,t){Y.set(e,{navigation:t,rememberedAt:Date.now()})}function Z(e){return X(Y.get(e))}function de(e){let t=Y.get(e);return Y.delete(e),X(t)}function fe(e){Y.delete(e)}function pe(e,t){let n=(0,J.c)(4),r=t===void 0?!1:t,[i,a]=(0,q.useState)(void 0),o=(0,q.useRef)(null),s,c;return n[0]!==r||n[1]!==e?(s=()=>{if(r||e.length===0){a(void 0);return}let t=function(){let t=window.innerHeight/2,n,r;for(let i of e){let e=document.getElementById(i);if(!e)continue;let a=e.getBoundingClientRect().top;a<0?n=i:r===void 0&&a<t&&(r=i)}a(r??n??e[0])},n=function(){o.current===null&&(o.current=requestAnimationFrame(()=>{o.current=null,t()}))};return document.addEventListener(`scroll`,n,{capture:!0,passive:!0}),t(),()=>{document.removeEventListener(`scroll`,n,{capture:!0}),o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)}},c=[e,r],n[0]=r,n[1]=e,n[2]=s,n[3]=c):(s=n[2],c=n[3]),(0,q.useEffect)(s,c),i}var Q=t(),me=300;async function he(e){let t=await fetch(`/api/page-headings?docName=${encodeURIComponent(e)}`),n;try{n=await t.json()}catch(e){throw new y(R._({id:`qAQVSD`}),{cause:e,status:t.status})}if(!t.ok){let e=E.safeParse(n);throw e.success?Error(e.data.title):new y(R._({id:`zlErBl`}),{status:t.status})}let r=D.safeParse(n);if(!r.success)throw new y(R._({id:`XW18jo`}),{status:t.status});return r.data.headings??[]}var ge=32,_e=12,ve=6,ye=`open-knowledge:outline-nav`;function be(e){let t=(0,J.c)(2),n;return t[0]===e?n=t[1]:(n=(0,Q.jsx)(V,{name:`outline-panel`,children:(0,Q.jsx)(xe,{...e})}),t[0]=e,t[1]=n),n}function xe(e){let t=(0,J.c)(50),{docName:n,isSourceMode:r,className:a}=e,u=a===void 0?``:a,{_:f}=s(),{pages:p,loading:m}=j(),h=c(),{activeProvider:g,activeDocName:_}=i(),v,y;t[0]===n?(v=t[1],y=t[2]):(v=[`page-headings`,n],y=()=>he(n),t[0]=n,t[1]=v,t[2]=y);let b;t[3]!==n||t[4]!==m||t[5]!==p?(b=!m&&(p.has(n)||T(n)),t[3]=n,t[4]=m,t[5]=p,t[6]=b):b=t[6];let x;t[7]!==v||t[8]!==y||t[9]!==b?(x={queryKey:v,queryFn:y,enabled:b,staleTime:1/0},t[7]=v,t[8]=y,t[9]=b,t[10]=x):x=t[10];let{data:S,isLoading:C,error:w}=l(x),E;t[11]===S?E=t[12]:(E=S===void 0?[]:S,t[11]=S,t[12]=E);let D=E,O,k;t[13]!==_||t[14]!==g||t[15]!==n||t[16]!==h?(O=()=>{if(!g||_!==n)return;let e=g.document,t=null,r=()=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{t=null,h.invalidateQueries({queryKey:[`page-headings`,n]})},me)};return e.on(`update`,r),()=>{e.off(`update`,r),t!==null&&clearTimeout(t)}},k=[g,_,n,h],t[13]=_,t[14]=g,t[15]=n,t[16]=h,t[17]=O,t[18]=k):(O=t[17],k=t[18]),(0,q.useEffect)(O,k);let A;t[19]===D?A=t[20]:(A=D.map(Se),t[19]=D,t[20]=A);let M=pe(A,r),N;t[21]!==M||t[22]!==D?(N=M?D.findIndex(e=>e.slug===M):-1,t[21]=M,t[22]=D,t[23]=N):N=t[23];let P=N,F;t[24]!==n||t[25]!==r?(F=function(e,t){let i={index:e,slug:t,mode:r?`source`:`wysiwyg`};i.mode===`source`&&ue(n,{kind:`outline`,detail:i}),window.dispatchEvent(new CustomEvent(ye,{detail:i}))},t[24]=n,t[25]=r,t[26]=F):F=t[26];let I=F,L=((P>=0?D[P].level:1)-1)*_e+(_e-ve)/2,R=P*ge+(ge-ve)/2,z;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,Q.jsx)(ie,{children:(0,Q.jsx)(o,{id:`dD7NPy`})}),t[27]=z):z=t[27];let B;t[28]!==D.length||t[29]!==C?(B=!C&&(0,Q.jsx)(re,{children:D.length}),t[28]=D.length,t[29]=C,t[30]=B):B=t[30];let V;t[31]===B?V=t[32]:(V=(0,Q.jsxs)(ne,{children:[z,B]}),t[31]=B,t[32]=V);let H;t[33]!==f||t[34]!==P||t[35]!==M||t[36]!==w||t[37]!==I||t[38]!==D||t[39]!==C||t[40]!==L||t[41]!==R?(H=w?(0,Q.jsx)(G,{className:`px-2`,children:w instanceof Error?w.message:f({id:`GuqOb1`})}):D.length===0&&!C?(0,Q.jsx)(ee,{className:`px-2`,children:(0,Q.jsx)(o,{id:`0BB9ID`})}):(0,Q.jsxs)(`nav`,{"aria-label":f({id:`BymzO4`}),className:`relative`,children:[P>=0&&(0,Q.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute left-0 top-0 rounded-full bg-primary motion-safe:[transition:transform_0.25s_var(--ease-out-strong)]`,style:{width:ve,height:ve,transform:`translate(${L}px, ${R}px)`}}),D.map((e,t)=>{let n=e.slug===M;return(0,Q.jsx)(`button`,{type:`button`,"aria-current":n?`location`:void 0,onClick:()=>I(t,e.slug),className:d(`w-full cursor-pointer truncate py-1.5 pe-2 text-left text-sm transition-colors`,n?`font-medium text-primary`:`text-muted-foreground hover:text-foreground`),style:{paddingLeft:`${(e.level-1)*_e+20}px`},title:e.text,children:e.text},t)})]}),t[33]=f,t[34]=P,t[35]=M,t[36]=w,t[37]=I,t[38]=D,t[39]=C,t[40]=L,t[41]=R,t[42]=H):H=t[42];let U;t[43]!==C||t[44]!==H?(U=(0,Q.jsx)(te,{className:`px-3 py-2`,"aria-busy":C,children:H}),t[43]=C,t[44]=H,t[45]=U):U=t[45];let W;return t[46]!==u||t[47]!==V||t[48]!==U?(W=(0,Q.jsxs)(ae,{className:u,children:[V,U]}),t[46]=u,t[47]=V,t[48]=U,t[49]=W):W=t[49],W}function Se(e){return e.slug}function Ce(e){let t=(0,J.c)(10),{scope:n,onScopeChange:r}=e,{_:i}=s(),a;t[0]===r?a=t[1]:(a=e=>{e&&r(e)},t[0]=r,t[1]=a);let c;t[2]===i?c=t[3]:(c=i({id:`aBgwis`}),t[2]=i,t[3]=c);let l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Q.jsx)(S,{value:`doc`,className:`flex-1`,"data-testid":`panel-scope-doc`,children:(0,Q.jsx)(o,{id:`UpCz01`})}),t[4]=l):l=t[4];let u;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Q.jsx)(S,{value:`project`,className:`flex-1`,"data-testid":`panel-scope-project`,children:(0,Q.jsx)(o,{id:`e0NrBM`})}),t[5]=u):u=t[5];let d;return t[6]!==n||t[7]!==a||t[8]!==c?(d=(0,Q.jsx)(`div`,{className:`shrink-0 px-4 pb-2`,children:(0,Q.jsxs)(C,{type:`single`,variant:`segmented`,size:`sm`,spacing:1,value:n,onValueChange:a,"aria-label":c,className:`w-full rounded-md bg-muted p-0.5 dark:bg-background`,children:[l,u]})}),t[6]=n,t[7]=a,t[8]=c,t[9]=d):d=t[9],d}async function we(e={kind:`project`}){try{let t=e.kind===`path`?`?path=${encodeURIComponent(e.path)}`:e.kind===`doc`?`?doc=${encodeURIComponent(e.docName)}`:``,n=await fetch(`/api/audit${t}`);if(!n.ok)return console.warn(`[audit] request failed`,n.status,n.statusText),null;let r=await n.json().catch(()=>null),i=w.safeParse(r);return i.success?i.data:(console.warn(`[audit] response failed schema validation`,i.error.issues),null)}catch(e){return console.warn(`[audit] fetch threw`,e),null}}function Te(e){let t=(0,J.c)(4),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[],t[0]=n):n=t[0];let[r,i]=(0,q.useState)(n),a,o;return t[1]===e?(a=t[2],o=t[3]):(a=()=>{if(i(Oe),e===null)return;let t=!1,n=()=>{we({kind:`doc`,docName:e}).then(e=>{if(t||e===null)return;let n=e.files.flatMap(De).filter(Ee);i(e=>e.length===0&&n.length===0?e:n)})};n();let r=B(e=>{e.includes(`backlinks`)&&n()});return()=>{t=!0,r()}},o=[e],t[1]=e,t[2]=a,t[3]=o),(0,q.useEffect)(a,o),r}function Ee(e){return e.source===`links`}function De(e){return e.diagnostics}function Oe(e){return e.length===0?e:[]}var ke={errorCount:0,warningCount:0},$=new Map,Ae=new Set,je=new Map;function Me(){let e=new Map;for(let[t,n]of $){let r=n.lint.errorCount+n.links.errorCount,i=n.lint.warningCount+n.links.warningCount;r===0&&i===0||e.set(t,{errorCount:r,warningCount:i})}je=e;for(let e of Ae)e()}function Ne(e){let t={lint:{errorCount:0,warningCount:0},links:{errorCount:0,warningCount:0}};for(let n of e){let e=n.source===`links`?t.links:t.lint;n.severity===`error`?e.errorCount+=1:e.warningCount+=1}return t}function Pe(e){return Ae.add(e),()=>{Ae.delete(e)}}function Fe(){return je}function Ie(e){$.clear();for(let t of e)$.set(H(t.file),Ne(t.diagnostics));Me()}function Le(e,t){$.set(e,Ne(t)),Me()}function Re(e,t,n){let r=$.get(e)??{lint:ke,links:ke},i=r[t];i.errorCount===n.errorCount&&i.warningCount===n.warningCount||($.set(e,{...r,[t]:n}),Me())}var ze=`open-knowledge:lint-nav`;function Be(e,t){return e.range.start.line-t.range.start.line||e.range.start.character-t.range.start.character}function Ve(e){return{line:e.range.start.line+1,column:e.range.start.character+1}}function He(e){let t=(0,J.c)(29),{diagnostic:r}=e,{_:i}=s(),a=r.severity===`error`?A:F,c=`${r.source}/${r.code}`,l=r.range.start.line+1,u=r.source===`links`,f=r.severity===`error`?`text-destructive`:`text-amber-500`,p;t[0]===f?p=t[1]:(p=d(`mt-0.5 size-3.5 shrink-0`,f),t[0]=f,t[1]=p);let m;t[2]!==a||t[3]!==p?(m=(0,Q.jsx)(a,{"aria-hidden":`true`,className:p}),t[2]=a,t[3]=p,t[4]=m):m=t[4];let h;t[5]===r.message?h=t[6]:(h=(0,Q.jsx)(`span`,{className:`text-foreground`,children:r.message}),t[5]=r.message,t[6]=h);let g;t[7]!==m||t[8]!==h?(g=(0,Q.jsxs)(`span`,{className:`flex items-start gap-1.5 text-sm`,children:[m,h]}),t[7]=m,t[8]=h,t[9]=g):g=t[9];let _=u&&`gap-0.5`,v;t[10]===_?v=t[11]:(v=d(`h-4 shrink-0 px-1 font-sans text-[10px] uppercase leading-none`,_),t[10]=_,t[11]=v);let y;t[12]===u?y=t[13]:(y=u?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(n,{"aria-hidden":`true`,className:`size-2.5`}),(0,Q.jsx)(o,{id:`LdyooL`})]}):(0,Q.jsx)(o,{id:`STOrpI`}),t[12]=u,t[13]=y);let b;t[14]!==v||t[15]!==y?(b=(0,Q.jsx)(W,{variant:`gray`,"data-testid":`problems-source-tag`,className:v,children:y}),t[14]=v,t[15]=y,t[16]=b):b=t[16];let x;t[17]!==i||t[18]!==l?(x=i({id:`enPTnx`,values:{displayLine:l}}),t[17]=i,t[18]=l,t[19]=x):x=t[19];let S;t[20]!==c||t[21]!==x?(S=(0,Q.jsxs)(`span`,{className:`min-w-0 truncate`,children:[c,` · `,x]}),t[20]=c,t[21]=x,t[22]=S):S=t[22];let C;t[23]!==S||t[24]!==b?(C=(0,Q.jsxs)(`span`,{className:`flex items-center gap-1.5 ps-5 font-mono text-xs text-muted-foreground`,children:[b,S]}),t[23]=S,t[24]=b,t[25]=C):C=t[25];let w;return t[26]!==C||t[27]!==g?(w=(0,Q.jsxs)(Q.Fragment,{children:[g,C]}),t[26]=C,t[27]=g,t[28]=w):w=t[28],w}function Ue(e){return`${e.source}/${e.code}-${e.range.start.line}-${e.range.start.character}-${e.message}`}function We(e){return e.reduce((e,t)=>e+ +((t.fixes?.length??0)>0),0)}function Ge(e){let t=(0,J.c)(11),{target:n,creating:r,disabled:i,onCreate:a}=e,{_:c}=s(),l;t[0]!==c||t[1]!==n?(l=c({id:`oWsZk8`,values:{target:n}}),t[0]=c,t[1]=n,t[2]=l):l=t[2];let u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Q.jsx)(b,{"aria-hidden":`true`,className:`size-3`}),t[3]=u):u=t[3];let d;t[4]===r?d=t[5]:(d=r?(0,Q.jsx)(o,{id:`E9bKSA`}):(0,Q.jsx)(o,{id:`XRuL0i`}),t[4]=r,t[5]=d);let p;return t[6]!==i||t[7]!==a||t[8]!==l||t[9]!==d?(p=(0,Q.jsxs)(f,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,disabled:i,onClick:a,"aria-label":l,"data-testid":`problems-create-page`,children:[u,d]}),t[6]=i,t[7]=a,t[8]=l,t[9]=d,t[10]=p):p=t[10],p}function Ke(e){let t=(0,J.c)(13),{count:n,disabled:r,onClick:i,children:a}=e,{_:c}=s(),l;t[0]!==c||t[1]!==a||t[2]!==n?(l=a===void 0?c({id:`Izb10l`,values:{count:n}}):void 0,t[0]=c,t[1]=a,t[2]=n,t[3]=l):l=t[3];let u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Q.jsx)(I,{"aria-hidden":`true`,className:`size-3`}),t[4]=u):u=t[4];let d;t[5]!==a||t[6]!==n?(d=a??(0,Q.jsx)(o,{id:`5_8TCr`,values:{count:n}}),t[5]=a,t[6]=n,t[7]=d):d=t[7];let p;return t[8]!==r||t[9]!==i||t[10]!==l||t[11]!==d?(p=(0,Q.jsxs)(f,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,disabled:r,onClick:i,"aria-label":l,"data-testid":`problems-fix-all`,children:[u,d]}),t[8]=r,t[9]=i,t[10]=l,t[11]=d,t[12]=p):p=t[12],p}function qe(e){let t=(0,J.c)(14),{docName:n,diagnostics:i,onFix:a,onFixAll:c,onAskAi:l}=e,{_:u}=s(),[d,g]=(0,q.useState)(`doc`),{data:_}=ce(),v=_===null?null:_.effective.enabled?oe.filter(e=>_.effective.plugins[e.id].enabled):[],y=v!==null&&v.length===0,b;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={status:`idle`},t[0]=b):b=t[0];let[x,S]=(0,q.useState)(b),[C,w]=(0,q.useState)(null),T=M(),[E,D]=(0,q.useState)(null),O=(0,q.useRef)(!0),k,A;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(k=()=>(O.current=!0,()=>{O.current=!1}),A=[],t[1]=k,t[2]=A):(k=t[1],A=t[2]),(0,q.useEffect)(k,A);let j=[...i].sort(Be),P=async function(e){let t=e.linkTarget;if(!(t===void 0||E!==null||T===null)){D(t);try{await r({initialDir:``,suggestedName:t},{addPage:T.addPage})}catch(e){let t=e;L.error(t instanceof Error?t.message:u({id:`tfi40B`})),O.current&&D(null);return}L.success(u({id:`EWCJFu`,values:{target:t}})),O.current&&D(null),O.current&&x.status===`loaded`&&await F()}};async function F(){S({status:`loading`});let e=await we();e!==null&&Ie(e.files),O.current&&S(e===null?{status:`failed`}:{status:`loaded`,result:e})}let R=x.status===`loaded`?x.result.files.filter(Ze):[],B=async function(){if(C!==null||R.length===0)return;w({done:0,total:R.length});let e=[];for(let t of R){let n=await se(H(t.file));if(!O.current)return;n.ok||e.push({file:t.file,detail:n.errorDetail}),w(Xe)}if(w(null),e.length>0){let t=e[0];L.error(u({id:`fru3T7`,values:{0:e.length,1:R.length}}),{description:t===void 0?void 0:`${t.file}${t.detail===null?``:` — ${t.detail}`}`})}try{await F()}catch{O.current&&S({status:`failed`})}},V=function(e){g(e),e===`project`&&x.status===`idle`&&F()},W;t[3]===n?W=t[4]:(W=function(e){let t=Ve(e);ue(n,{kind:`lint`,detail:t}),window.dispatchEvent(new CustomEvent(ze,{detail:t}))},t[3]=n,t[4]=W);let G=W,K;t[5]!==n||t[6]!==G?(K=function(e,t){let r=H(e);if(r===n){G(t);return}ue(r,{kind:`lint`,detail:Ve(t)}),window.location.hash=U(r)},t[5]=n,t[6]=G,t[7]=K):K=t[7];let le=K,Y;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,Q.jsx)(ie,{children:(0,Q.jsx)(o,{id:`OXdGnd`})}),t[8]=Y):Y=t[8];let X=v!==null&&v.length>0&&(0,Q.jsxs)(h,{children:[(0,Q.jsx)(p,{className:`shrink-0 cursor-default rounded-md bg-muted-foreground/5 px-2 py-1 font-mono text-xs text-muted-foreground`,"data-testid":`problems-active-plugins`,children:(0,Q.jsx)(o,{id:`yxF19Y`,values:{0:v.length}})}),(0,Q.jsx)(m,{"data-testid":`problems-active-plugins-tooltip`,children:(0,Q.jsx)(o,{id:`ws5o1F`,values:{0:v.map(Ye).join(`, `)}})})]}),Z;t[9]===X?Z=t[10]:(Z=(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[Y,X]}),t[9]=X,t[10]=Z);let de=d===`doc`&&j.length>0&&(0,Q.jsx)(re,{children:j.length}),fe;return t[11]!==de||t[12]!==Z?(fe=(0,Q.jsxs)(ne,{children:[Z,de]}),t[11]=de,t[12]=Z,t[13]=fe):fe=t[13],(0,Q.jsxs)(ae,{children:[fe,(0,Q.jsx)(Ce,{scope:d,onScopeChange:V}),d===`doc`?(0,Q.jsx)(te,{className:`px-2 py-2`,children:j.length===0?y?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(ee,{className:`px-2`,"data-testid":`problems-no-plugins`,children:(0,Q.jsx)(o,{id:`Hngy37`})}),(0,Q.jsx)(`div`,{className:`px-2 pt-2`,children:(0,Q.jsx)(f,{variant:`outline`,size:`sm`,onClick:z,"data-testid":`problems-enable-plugins`,children:(0,Q.jsx)(o,{id:`rnX-1S`})})})]}):(0,Q.jsx)(ee,{className:`px-2`,children:(0,Q.jsx)(o,{id:`ZI8uvA`})}):(0,Q.jsxs)(Q.Fragment,{children:[c!==void 0&&(0,Q.jsx)(`div`,{className:`flex items-center justify-end gap-2 px-2 pb-1`,children:(0,Q.jsx)(Ke,{count:We(j),disabled:We(j)===0,onClick:c})}),(0,Q.jsx)(`ul`,{"aria-label":u({id:`OXdGnd`}),className:`flex flex-col gap-0.5`,children:j.map(e=>{let t=e.range.start.line+1,n=a!==void 0&&(e.fixes?.length??0)>0,r=e.linkTarget!==void 0&&T!==null,i=`${e.source}/${e.code}`;return(0,Q.jsxs)(`li`,{className:`group relative rounded transition-colors hover:bg-muted`,children:[(0,Q.jsx)(`button`,{type:`button`,onClick:()=>G(e),className:`flex w-full cursor-pointer flex-col gap-0.5 rounded px-2 py-1.5 text-left`,title:u({id:`aHPdYV`,values:{displayLine:t}}),children:(0,Q.jsx)(He,{diagnostic:e})}),n||l!==void 0||r?(0,Q.jsxs)(`div`,{className:`absolute bottom-1 right-1 flex items-center gap-1 rounded bg-muted opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100 motion-reduce:transition-none`,children:[r?(0,Q.jsx)(Ge,{target:e.linkTarget??``,creating:E===e.linkTarget,disabled:E!==null,onCreate:()=>void P(e)}):null,n?(0,Q.jsxs)(f,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,onClick:()=>a?.(e),"aria-label":u({id:`fZj9em`,values:{flatId:i}}),"data-testid":`problems-fix`,children:[(0,Q.jsx)(I,{"aria-hidden":`true`,className:`size-3`}),(0,Q.jsx)(o,{id:`c4fVUV`})]}):null,l===void 0?null:(0,Q.jsxs)(f,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,onClick:()=>l(e),"aria-label":u({id:`hh4mVC`,values:{flatId:i}}),"data-testid":`problems-ask-ai`,children:[(0,Q.jsx)(N,{"aria-hidden":`true`,className:`size-3`}),(0,Q.jsx)(o,{id:`xWEvuo`})]})]}):null]},Ue(e))})})]})}):(0,Q.jsx)($e,{audit:x,onRefresh:()=>void F(),onNavigate:le,fixableCount:R.reduce(Je,0),fixing:C,onFixAll:()=>void B(),onCreateTarget:T===null?void 0:e=>void P(e),creatingTarget:E})]})}function Je(e,t){return e+We(t.diagnostics)}function Ye(e){return e.label}function Xe(e){return e===null?e:{...e,done:e.done+1}}function Ze(e){return e.diagnostics.some(Qe)}function Qe(e){return(e.fixes?.length??0)>0}function $e(e){let t=(0,J.c)(45),{audit:n,onRefresh:r,onNavigate:i,fixableCount:a,fixing:c,onFixAll:l,onCreateTarget:u,creatingTarget:d}=e,{_:p}=s(),m=n.status===`loading`||n.status===`idle`,h;t[0]!==n.result||t[1]!==n.status?(h=n.status===`loaded`&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(o,{id:`DsDwR-`,values:{0:n.result.errorCount}}),` · `,(0,Q.jsx)(o,{id:`W1SI2K`,values:{0:n.result.warningCount}})]}),t[0]=n.result,t[1]=n.status,t[2]=h):h=t[2];let g;t[3]===h?g=t[4]:(g=(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,"data-testid":`problems-audit-summary`,children:h}),t[3]=h,t[4]=g);let _;t[5]!==p||t[6]!==c?(_=c===null?null:(0,Q.jsx)(`span`,{className:`sr-only`,role:`status`,children:p({id:`gZElfU`,values:{0:c.done,1:c.total}})}),t[5]=p,t[6]=c,t[7]=_):_=t[7];let v=m||c!==null||a===0,y;t[8]===c?y=t[9]:(y=c===null?void 0:(0,Q.jsx)(o,{id:`S9t1PI`,values:{0:c.done,1:c.total}}),t[8]=c,t[9]=y);let b;t[10]!==a||t[11]!==l||t[12]!==v||t[13]!==y?(b=(0,Q.jsx)(Ke,{count:a,disabled:v,onClick:l,children:y}),t[10]=a,t[11]=l,t[12]=v,t[13]=y,t[14]=b):b=t[14];let x;t[15]===p?x=t[16]:(x=p({id:`WRdYfS`}),t[15]=p,t[16]=x);let S=m||c!==null,C;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsx)(P,{"aria-hidden":`true`,className:`size-3.5`}),t[17]=C):C=t[17];let w;t[18]!==r||t[19]!==x||t[20]!==S?(w=(0,Q.jsx)(f,{variant:`ghost`,size:`icon`,className:`size-6 shrink-0 text-muted-foreground`,"aria-label":x,"data-testid":`problems-audit-refresh`,disabled:S,onClick:r,children:C}),t[18]=r,t[19]=x,t[20]=S,t[21]=w):w=t[21];let T;t[22]!==w||t[23]!==_||t[24]!==b?(T=(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[_,b,w]}),t[22]=w,t[23]=_,t[24]=b,t[25]=T):T=t[25];let E;t[26]!==T||t[27]!==g?(E=(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-2 pb-1`,children:[g,T]}),t[26]=T,t[27]=g,t[28]=E):E=t[28];let D;t[29]!==p||t[30]!==m?(D=m&&(0,Q.jsx)(`div`,{className:`flex flex-col gap-1`,role:`status`,"aria-busy":`true`,"aria-label":p({id:`dx-TwN`}),children:[1,2,3].map(et)}),t[29]=p,t[30]=m,t[31]=D):D=t[31];let O;t[32]===n.status?O=t[33]:(O=n.status===`failed`&&(0,Q.jsx)(G,{className:`px-2 text-xs`,children:(0,Q.jsx)(o,{id:`IFezUv`})}),t[32]=n.status,t[33]=O);let k;t[34]!==n.result||t[35]!==n.status||t[36]!==d||t[37]!==u||t[38]!==i?(k=n.status===`loaded`&&(0,Q.jsx)(tt,{result:n.result,onNavigate:i,onCreateTarget:u,creatingTarget:d}),t[34]=n.result,t[35]=n.status,t[36]=d,t[37]=u,t[38]=i,t[39]=k):k=t[39];let A;return t[40]!==E||t[41]!==D||t[42]!==O||t[43]!==k?(A=(0,Q.jsxs)(te,{className:`px-2 py-2`,"data-testid":`problems-project-scope`,children:[E,D,O,k]}),t[40]=E,t[41]=D,t[42]=O,t[43]=k,t[44]=A):A=t[44],A}function et(e){return(0,Q.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded px-2 py-1.5`,children:[(0,Q.jsx)(K,{className:`mt-0.5 size-3.5 shrink-0 rounded`}),(0,Q.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,Q.jsx)(K,{className:`h-3 w-28`}),(0,Q.jsx)(K,{className:`h-3 w-40`})]})]},e)}function tt(e){let t=(0,J.c)(12),{result:n,onNavigate:r,onCreateTarget:i,creatingTarget:a}=e,{_:c}=s(),l;t[0]!==c||t[1]!==n.warnings?(l=n.warnings.length>0&&(0,Q.jsx)(`ul`,{"aria-label":c({id:`Rsdhj9`}),className:`flex flex-col gap-0.5 pb-1`,children:n.warnings.map(nt)}),t[0]=c,t[1]=n.warnings,t[2]=l):l=t[2];let u;t[3]!==a||t[4]!==i||t[5]!==r||t[6]!==n.fileCount||t[7]!==n.files?(u=n.files.length===0?(0,Q.jsx)(ee,{className:`px-2`,children:(0,Q.jsx)(o,{id:`k_Dqw1`,values:{0:n.fileCount}})}):n.files.map(e=>(0,Q.jsx)(rt,{file:e,onNavigate:r,onCreateTarget:i,creatingTarget:a},e.file)),t[3]=a,t[4]=i,t[5]=r,t[6]=n.fileCount,t[7]=n.files,t[8]=u):u=t[8];let d;return t[9]!==l||t[10]!==u?(d=(0,Q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[l,u]}),t[9]=l,t[10]=u,t[11]=d):d=t[11],d}function nt(e,t){return(0,Q.jsxs)(`li`,{className:`flex items-start gap-1.5 px-2 text-xs`,children:[(0,Q.jsx)(F,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-amber-500`}),(0,Q.jsx)(`span`,{className:`min-w-0 text-foreground`,children:e})]},`${t}-${e}`)}function rt(e){let t=(0,J.c)(41),{file:n,onNavigate:r,onCreateTarget:i,creatingTarget:a}=e,{_:o}=s(),c,l,u,d,f,p,m,h,y;if(t[0]!==o||t[1]!==a||t[2]!==n.diagnostics||t[3]!==n.file||t[4]!==i||t[5]!==r){let e=[...n.diagnostics].sort(Be);l=v,m=!0,h=`problems-audit-group`;let s;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Q.jsx)(k,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`}),t[15]=s):s=t[15];let b;t[16]===n.file?b=t[17]:(b=(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs text-foreground`,title:n.file,children:n.file}),t[16]=n.file,t[17]=b),y=(0,Q.jsxs)(_,{className:`group flex w-full cursor-pointer items-center gap-1.5 rounded px-2 py-1.5 text-left transition-colors hover:bg-muted`,children:[s,b,(0,Q.jsx)(W,{variant:`gray`,"data-testid":`problems-audit-file-count`,className:`shrink-0`,children:e.length})]}),c=g,p=`overflow-hidden data-[state=open]:animate-[collapsible-down_150ms_ease-out] data-[state=closed]:animate-[collapsible-up_150ms_ease-in]`,t[18]!==o||t[19]!==n.file?(u=o({id:`zAJzIg`,values:{0:n.file}}),t[18]=o,t[19]=n.file,t[20]=u):u=t[20],d=`flex flex-col gap-0.5 pb-1 ps-3`;let x;t[21]!==o||t[22]!==a||t[23]!==n.file||t[24]!==i||t[25]!==r?(x=e=>{let t=e.range.start.line+1,s=e.linkTarget!==void 0&&i!==void 0;return(0,Q.jsxs)(`li`,{className:`group relative rounded transition-colors hover:bg-muted`,children:[(0,Q.jsx)(`button`,{type:`button`,onClick:()=>r(n.file,e),className:`flex w-full cursor-pointer flex-col gap-0.5 rounded px-2 py-1.5 text-left`,title:o({id:`kDwcbW`,values:{0:n.file,displayLine:t}}),children:(0,Q.jsx)(He,{diagnostic:e})}),s?(0,Q.jsx)(`div`,{className:`absolute bottom-1 right-1 flex items-center gap-1 rounded bg-muted opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100 motion-reduce:transition-none`,children:(0,Q.jsx)(Ge,{target:e.linkTarget??``,creating:a===e.linkTarget,disabled:a!==null,onCreate:()=>i?.(e)})}):null]},Ue(e))},t[21]=o,t[22]=a,t[23]=n.file,t[24]=i,t[25]=r,t[26]=x):x=t[26],f=e.map(x),t[0]=o,t[1]=a,t[2]=n.diagnostics,t[3]=n.file,t[4]=i,t[5]=r,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=m,t[13]=h,t[14]=y}else c=t[6],l=t[7],u=t[8],d=t[9],f=t[10],p=t[11],m=t[12],h=t[13],y=t[14];let b;t[27]!==u||t[28]!==d||t[29]!==f?(b=(0,Q.jsx)(`ul`,{"aria-label":u,className:d,children:f}),t[27]=u,t[28]=d,t[29]=f,t[30]=b):b=t[30];let x;t[31]!==c||t[32]!==p||t[33]!==b?(x=(0,Q.jsx)(c,{className:p,children:b}),t[31]=c,t[32]=p,t[33]=b,t[34]=x):x=t[34];let S;return t[35]!==l||t[36]!==m||t[37]!==h||t[38]!==y||t[39]!==x?(S=(0,Q.jsxs)(l,{defaultOpen:m,"data-testid":h,children:[y,x]}),t[35]=l,t[36]=m,t[37]=h,t[38]=y,t[39]=x,t[40]=S):S=t[40],S}var it={words:0,chars:0,tokens:0},at=/[ -〿-ゟ゠-ヿ㐀-䶿一-鿿豈---ក-]/,ot=/[\p{L}\p{N}]/u,st=new Set([`text`,`inlineCode`,`code`,`tag`]),ct=new Set([`html`,`definition`,`footnoteDefinition`,`yaml`,`toml`,`image`,`imageReference`,`mdxFlowExpression`,`mdxTextExpression`,`mdxjsEsm`,`rawMdxFallback`,`rawMdxFallbackMdast`]),lt=new Set([`paragraph`,`heading`,`blockquote`,`list`,`listItem`,`thematicBreak`,`table`,`tableRow`,`tableCell`,`mdxJsxFlowElement`,`commentBlock`]);function ut(e,t){if(!e)return;let n=e.type;if(!ct.has(n)){if(st.has(n)){e.value&&(t.push(e.value),n===`code`&&t.push(`
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{C as n,nn as r,r as i}from"./DocumentContext-WcIs30H8.js";import{t as a}from"./react-f2sANaYj.js";import{n as o,r as s}from"./dist-Nvb76hAm.js";import{r as c,t as l}from"./useQuery-ZeEDLtxh.js";import{t as u}from"./compiler-runtime-BfE3aGVn.js";import{s as d}from"./createLucideIcon-DAkhoPjT.js";import{t as f}from"./button-Gol9BgNB.js";import{i as p,n as m,t as h}from"./tooltip-B4J7VHmA.js";import{n as g,r as _,t as v}from"./collapsible-B1mS1n9y.js";import{N as y,ct as b,k as x}from"./CodeMirrorPropInput-BqDZpzvH.js";import{n as S,t as C}from"./toggle-group-CjXmmTGy.js";import{Jt as w,ai as T,gt as E,yr as D,yt as O}from"./dist-Cgpf3BIr.js";import{t as k}from"./chevron-right-C8oTR6gu.js";import{n as A}from"./CopyButton-1Q6Wnnjb.js";import{i as j,r as M}from"./prop-types-CU-rIGvv.js";import{l as N}from"./workspace-paths-DQOJHVhV.js";import{t as P}from"./refresh-cw-BfeWGCsv.js";import{t as F}from"./triangle-alert-Clgvyc7B.js";import{t as I}from"./wrench-BfoTvqT9.js";import{n as L}from"./dist-BLAMau9Z.js";import{t as R}from"./dist-q14fBS3T.js";import{a as z}from"./use-settings-route-CFvCFlXS.js";import{c as B}from"./documents-events-CtKncdGv.js";import{i as V}from"./startup-marks-CqVzdU1y.js";import{a as H,s as U}from"./doc-hash-Bso39bSh.js";import{t as W}from"./badge-Dba4cvJR.js";import{a as G,i as ee,n as te,o as ne,r as re,s as ie,t as ae}from"./panel-C8ZhM4q-.js";import{t as oe}from"./lint-plugin-meta-J-wb-uxW.js";import{t as K}from"./skeleton-BG12Hmzn.js";import{a as se,d as ce}from"./lint-config-client-BYECwWuu.js";var q=e(a(),1),J=u(),le=3e4,Y=new Map;function X(e){return e?Date.now()-e.rememberedAt>le?null:e.navigation:null}function ue(e,t){Y.set(e,{navigation:t,rememberedAt:Date.now()})}function Z(e){return X(Y.get(e))}function de(e){let t=Y.get(e);return Y.delete(e),X(t)}function fe(e){Y.delete(e)}function pe(e,t){let n=(0,J.c)(4),r=t===void 0?!1:t,[i,a]=(0,q.useState)(void 0),o=(0,q.useRef)(null),s,c;return n[0]!==r||n[1]!==e?(s=()=>{if(r||e.length===0){a(void 0);return}let t=function(){let t=window.innerHeight/2,n,r;for(let i of e){let e=document.getElementById(i);if(!e)continue;let a=e.getBoundingClientRect().top;a<0?n=i:r===void 0&&a<t&&(r=i)}a(r??n??e[0])},n=function(){o.current===null&&(o.current=requestAnimationFrame(()=>{o.current=null,t()}))};return document.addEventListener(`scroll`,n,{capture:!0,passive:!0}),t(),()=>{document.removeEventListener(`scroll`,n,{capture:!0}),o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)}},c=[e,r],n[0]=r,n[1]=e,n[2]=s,n[3]=c):(s=n[2],c=n[3]),(0,q.useEffect)(s,c),i}var Q=t(),me=300;async function he(e){let t=await fetch(`/api/page-headings?docName=${encodeURIComponent(e)}`),n;try{n=await t.json()}catch(e){throw new y(R._({id:`qAQVSD`}),{cause:e,status:t.status})}if(!t.ok){let e=O.safeParse(n);throw e.success?Error(e.data.title):new y(R._({id:`zlErBl`}),{status:t.status})}let r=E.safeParse(n);if(!r.success)throw new y(R._({id:`XW18jo`}),{status:t.status});return r.data.headings??[]}var ge=32,_e=12,ve=6,ye=`open-knowledge:outline-nav`;function be(e){let t=(0,J.c)(2),n;return t[0]===e?n=t[1]:(n=(0,Q.jsx)(V,{name:`outline-panel`,children:(0,Q.jsx)(xe,{...e})}),t[0]=e,t[1]=n),n}function xe(e){let t=(0,J.c)(50),{docName:n,isSourceMode:r,className:a}=e,u=a===void 0?``:a,{_:f}=s(),{pages:p,loading:m}=j(),h=c(),{activeProvider:g,activeDocName:_}=i(),v,y;t[0]===n?(v=t[1],y=t[2]):(v=[`page-headings`,n],y=()=>he(n),t[0]=n,t[1]=v,t[2]=y);let b;t[3]!==n||t[4]!==m||t[5]!==p?(b=!m&&(p.has(n)||D(n)),t[3]=n,t[4]=m,t[5]=p,t[6]=b):b=t[6];let x;t[7]!==v||t[8]!==y||t[9]!==b?(x={queryKey:v,queryFn:y,enabled:b,staleTime:1/0},t[7]=v,t[8]=y,t[9]=b,t[10]=x):x=t[10];let{data:S,isLoading:C,error:w}=l(x),T;t[11]===S?T=t[12]:(T=S===void 0?[]:S,t[11]=S,t[12]=T);let E=T,O,k;t[13]!==_||t[14]!==g||t[15]!==n||t[16]!==h?(O=()=>{if(!g||_!==n)return;let e=g.document,t=null,r=()=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{t=null,h.invalidateQueries({queryKey:[`page-headings`,n]})},me)};return e.on(`update`,r),()=>{e.off(`update`,r),t!==null&&clearTimeout(t)}},k=[g,_,n,h],t[13]=_,t[14]=g,t[15]=n,t[16]=h,t[17]=O,t[18]=k):(O=t[17],k=t[18]),(0,q.useEffect)(O,k);let A;t[19]===E?A=t[20]:(A=E.map(Se),t[19]=E,t[20]=A);let M=pe(A,r),N;t[21]!==M||t[22]!==E?(N=M?E.findIndex(e=>e.slug===M):-1,t[21]=M,t[22]=E,t[23]=N):N=t[23];let P=N,F;t[24]!==n||t[25]!==r?(F=function(e,t){let i={index:e,slug:t,mode:r?`source`:`wysiwyg`};i.mode===`source`&&ue(n,{kind:`outline`,detail:i}),window.dispatchEvent(new CustomEvent(ye,{detail:i}))},t[24]=n,t[25]=r,t[26]=F):F=t[26];let I=F,L=((P>=0?E[P].level:1)-1)*_e+(_e-ve)/2,R=P*ge+(ge-ve)/2,z;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,Q.jsx)(ie,{children:(0,Q.jsx)(o,{id:`dD7NPy`})}),t[27]=z):z=t[27];let B;t[28]!==E.length||t[29]!==C?(B=!C&&(0,Q.jsx)(re,{children:E.length}),t[28]=E.length,t[29]=C,t[30]=B):B=t[30];let V;t[31]===B?V=t[32]:(V=(0,Q.jsxs)(ne,{children:[z,B]}),t[31]=B,t[32]=V);let H;t[33]!==f||t[34]!==P||t[35]!==M||t[36]!==w||t[37]!==I||t[38]!==E||t[39]!==C||t[40]!==L||t[41]!==R?(H=w?(0,Q.jsx)(G,{className:`px-2`,children:w instanceof Error?w.message:f({id:`GuqOb1`})}):E.length===0&&!C?(0,Q.jsx)(ee,{className:`px-2`,children:(0,Q.jsx)(o,{id:`0BB9ID`})}):(0,Q.jsxs)(`nav`,{"aria-label":f({id:`BymzO4`}),className:`relative`,children:[P>=0&&(0,Q.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute left-0 top-0 rounded-full bg-primary motion-safe:[transition:transform_0.25s_var(--ease-out-strong)]`,style:{width:ve,height:ve,transform:`translate(${L}px, ${R}px)`}}),E.map((e,t)=>{let n=e.slug===M;return(0,Q.jsx)(`button`,{type:`button`,"aria-current":n?`location`:void 0,onClick:()=>I(t,e.slug),className:d(`w-full cursor-pointer truncate py-1.5 pe-2 text-left text-sm transition-colors`,n?`font-medium text-primary`:`text-muted-foreground hover:text-foreground`),style:{paddingLeft:`${(e.level-1)*_e+20}px`},title:e.text,children:e.text},t)})]}),t[33]=f,t[34]=P,t[35]=M,t[36]=w,t[37]=I,t[38]=E,t[39]=C,t[40]=L,t[41]=R,t[42]=H):H=t[42];let U;t[43]!==C||t[44]!==H?(U=(0,Q.jsx)(te,{className:`px-3 py-2`,"aria-busy":C,children:H}),t[43]=C,t[44]=H,t[45]=U):U=t[45];let W;return t[46]!==u||t[47]!==V||t[48]!==U?(W=(0,Q.jsxs)(ae,{className:u,children:[V,U]}),t[46]=u,t[47]=V,t[48]=U,t[49]=W):W=t[49],W}function Se(e){return e.slug}function Ce(e){let t=(0,J.c)(10),{scope:n,onScopeChange:r}=e,{_:i}=s(),a;t[0]===r?a=t[1]:(a=e=>{e&&r(e)},t[0]=r,t[1]=a);let c;t[2]===i?c=t[3]:(c=i({id:`aBgwis`}),t[2]=i,t[3]=c);let l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Q.jsx)(S,{value:`doc`,className:`flex-1`,"data-testid":`panel-scope-doc`,children:(0,Q.jsx)(o,{id:`UpCz01`})}),t[4]=l):l=t[4];let u;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Q.jsx)(S,{value:`project`,className:`flex-1`,"data-testid":`panel-scope-project`,children:(0,Q.jsx)(o,{id:`e0NrBM`})}),t[5]=u):u=t[5];let d;return t[6]!==n||t[7]!==a||t[8]!==c?(d=(0,Q.jsx)(`div`,{className:`shrink-0 px-4 pb-2`,children:(0,Q.jsxs)(C,{type:`single`,variant:`segmented`,size:`sm`,spacing:1,value:n,onValueChange:a,"aria-label":c,className:`w-full rounded-md bg-muted p-0.5 dark:bg-background`,children:[l,u]})}),t[6]=n,t[7]=a,t[8]=c,t[9]=d):d=t[9],d}async function we(e={kind:`project`}){try{let t=e.kind===`path`?`?path=${encodeURIComponent(e.path)}`:e.kind===`doc`?`?doc=${encodeURIComponent(e.docName)}`:``,n=await fetch(`/api/audit${t}`);if(!n.ok)return console.warn(`[audit] request failed`,n.status,n.statusText),null;let r=await n.json().catch(()=>null),i=w.safeParse(r);return i.success?i.data:(console.warn(`[audit] response failed schema validation`,i.error.issues),null)}catch(e){return console.warn(`[audit] fetch threw`,e),null}}function Te(e){let t=(0,J.c)(4),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[],t[0]=n):n=t[0];let[r,i]=(0,q.useState)(n),a,o;return t[1]===e?(a=t[2],o=t[3]):(a=()=>{if(i(Oe),e===null)return;let t=!1,n=()=>{we({kind:`doc`,docName:e}).then(e=>{if(t||e===null)return;let n=e.files.flatMap(De).filter(Ee);i(e=>e.length===0&&n.length===0?e:n)})};n();let r=B(e=>{e.includes(`backlinks`)&&n()});return()=>{t=!0,r()}},o=[e],t[1]=e,t[2]=a,t[3]=o),(0,q.useEffect)(a,o),r}function Ee(e){return e.source===`links`}function De(e){return e.diagnostics}function Oe(e){return e.length===0?e:[]}var ke={errorCount:0,warningCount:0},$=new Map,Ae=new Set,je=new Map;function Me(){let e=new Map;for(let[t,n]of $){let r=n.lint.errorCount+n.links.errorCount,i=n.lint.warningCount+n.links.warningCount;r===0&&i===0||e.set(t,{errorCount:r,warningCount:i})}je=e;for(let e of Ae)e()}function Ne(e){let t={lint:{errorCount:0,warningCount:0},links:{errorCount:0,warningCount:0}};for(let n of e){let e=n.source===`links`?t.links:t.lint;n.severity===`error`?e.errorCount+=1:e.warningCount+=1}return t}function Pe(e){return Ae.add(e),()=>{Ae.delete(e)}}function Fe(){return je}function Ie(e){$.clear();for(let t of e)$.set(H(t.file),Ne(t.diagnostics));Me()}function Le(e,t){$.set(e,Ne(t)),Me()}function Re(e,t,n){let r=$.get(e)??{lint:ke,links:ke},i=r[t];i.errorCount===n.errorCount&&i.warningCount===n.warningCount||($.set(e,{...r,[t]:n}),Me())}var ze=`open-knowledge:lint-nav`;function Be(e,t){return e.range.start.line-t.range.start.line||e.range.start.character-t.range.start.character}function Ve(e){return{line:e.range.start.line+1,column:e.range.start.character+1}}function He(e){let t=(0,J.c)(29),{diagnostic:n}=e,{_:i}=s(),a=n.severity===`error`?A:F,c=`${n.source}/${n.code}`,l=n.range.start.line+1,u=n.source===`links`,f=n.severity===`error`?`text-destructive`:`text-amber-500`,p;t[0]===f?p=t[1]:(p=d(`mt-0.5 size-3.5 shrink-0`,f),t[0]=f,t[1]=p);let m;t[2]!==a||t[3]!==p?(m=(0,Q.jsx)(a,{"aria-hidden":`true`,className:p}),t[2]=a,t[3]=p,t[4]=m):m=t[4];let h;t[5]===n.message?h=t[6]:(h=(0,Q.jsx)(`span`,{className:`text-foreground`,children:n.message}),t[5]=n.message,t[6]=h);let g;t[7]!==m||t[8]!==h?(g=(0,Q.jsxs)(`span`,{className:`flex items-start gap-1.5 text-sm`,children:[m,h]}),t[7]=m,t[8]=h,t[9]=g):g=t[9];let _=u&&`gap-0.5`,v;t[10]===_?v=t[11]:(v=d(`h-4 shrink-0 px-1 font-sans text-[10px] uppercase leading-none`,_),t[10]=_,t[11]=v);let y;t[12]===u?y=t[13]:(y=u?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(r,{"aria-hidden":`true`,className:`size-2.5`}),(0,Q.jsx)(o,{id:`LdyooL`})]}):(0,Q.jsx)(o,{id:`STOrpI`}),t[12]=u,t[13]=y);let b;t[14]!==v||t[15]!==y?(b=(0,Q.jsx)(W,{variant:`gray`,"data-testid":`problems-source-tag`,className:v,children:y}),t[14]=v,t[15]=y,t[16]=b):b=t[16];let x;t[17]!==i||t[18]!==l?(x=i({id:`enPTnx`,values:{displayLine:l}}),t[17]=i,t[18]=l,t[19]=x):x=t[19];let S;t[20]!==c||t[21]!==x?(S=(0,Q.jsxs)(`span`,{className:`min-w-0 truncate`,children:[c,` · `,x]}),t[20]=c,t[21]=x,t[22]=S):S=t[22];let C;t[23]!==S||t[24]!==b?(C=(0,Q.jsxs)(`span`,{className:`flex items-center gap-1.5 ps-5 font-mono text-xs text-muted-foreground`,children:[b,S]}),t[23]=S,t[24]=b,t[25]=C):C=t[25];let w;return t[26]!==C||t[27]!==g?(w=(0,Q.jsxs)(Q.Fragment,{children:[g,C]}),t[26]=C,t[27]=g,t[28]=w):w=t[28],w}function Ue(e){return`${e.source}/${e.code}-${e.range.start.line}-${e.range.start.character}-${e.message}`}function We(e){return e.reduce((e,t)=>e+ +((t.fixes?.length??0)>0),0)}function Ge(e){let t=(0,J.c)(11),{target:n,creating:r,disabled:i,onCreate:a}=e,{_:c}=s(),l;t[0]!==c||t[1]!==n?(l=c({id:`oWsZk8`,values:{target:n}}),t[0]=c,t[1]=n,t[2]=l):l=t[2];let u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Q.jsx)(b,{"aria-hidden":`true`,className:`size-3`}),t[3]=u):u=t[3];let d;t[4]===r?d=t[5]:(d=r?(0,Q.jsx)(o,{id:`E9bKSA`}):(0,Q.jsx)(o,{id:`XRuL0i`}),t[4]=r,t[5]=d);let p;return t[6]!==i||t[7]!==a||t[8]!==l||t[9]!==d?(p=(0,Q.jsxs)(f,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,disabled:i,onClick:a,"aria-label":l,"data-testid":`problems-create-page`,children:[u,d]}),t[6]=i,t[7]=a,t[8]=l,t[9]=d,t[10]=p):p=t[10],p}function Ke(e){let t=(0,J.c)(13),{count:n,disabled:r,onClick:i,children:a}=e,{_:c}=s(),l;t[0]!==c||t[1]!==a||t[2]!==n?(l=a===void 0?c({id:`Izb10l`,values:{count:n}}):void 0,t[0]=c,t[1]=a,t[2]=n,t[3]=l):l=t[3];let u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Q.jsx)(I,{"aria-hidden":`true`,className:`size-3`}),t[4]=u):u=t[4];let d;t[5]!==a||t[6]!==n?(d=a??(0,Q.jsx)(o,{id:`5_8TCr`,values:{count:n}}),t[5]=a,t[6]=n,t[7]=d):d=t[7];let p;return t[8]!==r||t[9]!==i||t[10]!==l||t[11]!==d?(p=(0,Q.jsxs)(f,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,disabled:r,onClick:i,"aria-label":l,"data-testid":`problems-fix-all`,children:[u,d]}),t[8]=r,t[9]=i,t[10]=l,t[11]=d,t[12]=p):p=t[12],p}function qe(e){let t=(0,J.c)(14),{docName:r,diagnostics:i,onFix:a,onFixAll:c,onAskAi:l}=e,{_:u}=s(),[d,g]=(0,q.useState)(`doc`),{data:_}=ce(),v=_===null?null:_.effective.enabled?oe.filter(e=>_.effective.plugins[e.id].enabled):[],y=v!==null&&v.length===0,b;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={status:`idle`},t[0]=b):b=t[0];let[x,S]=(0,q.useState)(b),[C,w]=(0,q.useState)(null),T=M(),[E,D]=(0,q.useState)(null),O=(0,q.useRef)(!0),k,A;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(k=()=>(O.current=!0,()=>{O.current=!1}),A=[],t[1]=k,t[2]=A):(k=t[1],A=t[2]),(0,q.useEffect)(k,A);let j=[...i].sort(Be),P=async function(e){let t=e.linkTarget;if(!(t===void 0||E!==null||T===null)){D(t);try{await n({initialDir:``,suggestedName:t},{addPage:T.addPage})}catch(e){let t=e;L.error(t instanceof Error?t.message:u({id:`tfi40B`})),O.current&&D(null);return}L.success(u({id:`EWCJFu`,values:{target:t}})),O.current&&D(null),O.current&&x.status===`loaded`&&await F()}};async function F(){S({status:`loading`});let e=await we();e!==null&&Ie(e.files),O.current&&S(e===null?{status:`failed`}:{status:`loaded`,result:e})}let R=x.status===`loaded`?x.result.files.filter(Ze):[],B=async function(){if(C!==null||R.length===0)return;w({done:0,total:R.length});let e=[];for(let t of R){let n=await se(H(t.file));if(!O.current)return;n.ok||e.push({file:t.file,detail:n.errorDetail}),w(Xe)}if(w(null),e.length>0){let t=e[0];L.error(u({id:`fru3T7`,values:{0:e.length,1:R.length}}),{description:t===void 0?void 0:`${t.file}${t.detail===null?``:` — ${t.detail}`}`})}try{await F()}catch{O.current&&S({status:`failed`})}},V=function(e){g(e),e===`project`&&x.status===`idle`&&F()},W;t[3]===r?W=t[4]:(W=function(e){let t=Ve(e);ue(r,{kind:`lint`,detail:t}),window.dispatchEvent(new CustomEvent(ze,{detail:t}))},t[3]=r,t[4]=W);let G=W,K;t[5]!==r||t[6]!==G?(K=function(e,t){let n=H(e);if(n===r){G(t);return}ue(n,{kind:`lint`,detail:Ve(t)}),window.location.hash=U(n)},t[5]=r,t[6]=G,t[7]=K):K=t[7];let le=K,Y;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,Q.jsx)(ie,{children:(0,Q.jsx)(o,{id:`OXdGnd`})}),t[8]=Y):Y=t[8];let X=v!==null&&v.length>0&&(0,Q.jsxs)(h,{children:[(0,Q.jsx)(p,{className:`shrink-0 cursor-default rounded-md bg-muted-foreground/5 px-2 py-1 font-mono text-xs text-muted-foreground`,"data-testid":`problems-active-plugins`,children:(0,Q.jsx)(o,{id:`yxF19Y`,values:{0:v.length}})}),(0,Q.jsx)(m,{"data-testid":`problems-active-plugins-tooltip`,children:(0,Q.jsx)(o,{id:`ws5o1F`,values:{0:v.map(Ye).join(`, `)}})})]}),Z;t[9]===X?Z=t[10]:(Z=(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[Y,X]}),t[9]=X,t[10]=Z);let de=d===`doc`&&j.length>0&&(0,Q.jsx)(re,{children:j.length}),fe;return t[11]!==de||t[12]!==Z?(fe=(0,Q.jsxs)(ne,{children:[Z,de]}),t[11]=de,t[12]=Z,t[13]=fe):fe=t[13],(0,Q.jsxs)(ae,{children:[fe,(0,Q.jsx)(Ce,{scope:d,onScopeChange:V}),d===`doc`?(0,Q.jsx)(te,{className:`px-2 py-2`,children:j.length===0?y?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(ee,{className:`px-2`,"data-testid":`problems-no-plugins`,children:(0,Q.jsx)(o,{id:`Hngy37`})}),(0,Q.jsx)(`div`,{className:`px-2 pt-2`,children:(0,Q.jsx)(f,{variant:`outline`,size:`sm`,onClick:z,"data-testid":`problems-enable-plugins`,children:(0,Q.jsx)(o,{id:`rnX-1S`})})})]}):(0,Q.jsx)(ee,{className:`px-2`,children:(0,Q.jsx)(o,{id:`ZI8uvA`})}):(0,Q.jsxs)(Q.Fragment,{children:[c!==void 0&&(0,Q.jsx)(`div`,{className:`flex items-center justify-end gap-2 px-2 pb-1`,children:(0,Q.jsx)(Ke,{count:We(j),disabled:We(j)===0,onClick:c})}),(0,Q.jsx)(`ul`,{"aria-label":u({id:`OXdGnd`}),className:`flex flex-col gap-0.5`,children:j.map(e=>{let t=e.range.start.line+1,n=a!==void 0&&(e.fixes?.length??0)>0,r=e.linkTarget!==void 0&&T!==null,i=`${e.source}/${e.code}`;return(0,Q.jsxs)(`li`,{className:`group relative rounded transition-colors hover:bg-muted`,children:[(0,Q.jsx)(`button`,{type:`button`,onClick:()=>G(e),className:`flex w-full cursor-pointer flex-col gap-0.5 rounded px-2 py-1.5 text-left`,title:u({id:`aHPdYV`,values:{displayLine:t}}),children:(0,Q.jsx)(He,{diagnostic:e})}),n||l!==void 0||r?(0,Q.jsxs)(`div`,{className:`absolute bottom-1 right-1 flex items-center gap-1 rounded bg-muted opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100 motion-reduce:transition-none`,children:[r?(0,Q.jsx)(Ge,{target:e.linkTarget??``,creating:E===e.linkTarget,disabled:E!==null,onCreate:()=>void P(e)}):null,n?(0,Q.jsxs)(f,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,onClick:()=>a?.(e),"aria-label":u({id:`fZj9em`,values:{flatId:i}}),"data-testid":`problems-fix`,children:[(0,Q.jsx)(I,{"aria-hidden":`true`,className:`size-3`}),(0,Q.jsx)(o,{id:`c4fVUV`})]}):null,l===void 0?null:(0,Q.jsxs)(f,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-xs`,onClick:()=>l(e),"aria-label":u({id:`hh4mVC`,values:{flatId:i}}),"data-testid":`problems-ask-ai`,children:[(0,Q.jsx)(N,{"aria-hidden":`true`,className:`size-3`}),(0,Q.jsx)(o,{id:`xWEvuo`})]})]}):null]},Ue(e))})})]})}):(0,Q.jsx)($e,{audit:x,onRefresh:()=>void F(),onNavigate:le,fixableCount:R.reduce(Je,0),fixing:C,onFixAll:()=>void B(),onCreateTarget:T===null?void 0:e=>void P(e),creatingTarget:E})]})}function Je(e,t){return e+We(t.diagnostics)}function Ye(e){return e.label}function Xe(e){return e===null?e:{...e,done:e.done+1}}function Ze(e){return e.diagnostics.some(Qe)}function Qe(e){return(e.fixes?.length??0)>0}function $e(e){let t=(0,J.c)(45),{audit:n,onRefresh:r,onNavigate:i,fixableCount:a,fixing:c,onFixAll:l,onCreateTarget:u,creatingTarget:d}=e,{_:p}=s(),m=n.status===`loading`||n.status===`idle`,h;t[0]!==n.result||t[1]!==n.status?(h=n.status===`loaded`&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(o,{id:`DsDwR-`,values:{0:n.result.errorCount}}),` · `,(0,Q.jsx)(o,{id:`W1SI2K`,values:{0:n.result.warningCount}})]}),t[0]=n.result,t[1]=n.status,t[2]=h):h=t[2];let g;t[3]===h?g=t[4]:(g=(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,"data-testid":`problems-audit-summary`,children:h}),t[3]=h,t[4]=g);let _;t[5]!==p||t[6]!==c?(_=c===null?null:(0,Q.jsx)(`span`,{className:`sr-only`,role:`status`,children:p({id:`gZElfU`,values:{0:c.done,1:c.total}})}),t[5]=p,t[6]=c,t[7]=_):_=t[7];let v=m||c!==null||a===0,y;t[8]===c?y=t[9]:(y=c===null?void 0:(0,Q.jsx)(o,{id:`S9t1PI`,values:{0:c.done,1:c.total}}),t[8]=c,t[9]=y);let b;t[10]!==a||t[11]!==l||t[12]!==v||t[13]!==y?(b=(0,Q.jsx)(Ke,{count:a,disabled:v,onClick:l,children:y}),t[10]=a,t[11]=l,t[12]=v,t[13]=y,t[14]=b):b=t[14];let x;t[15]===p?x=t[16]:(x=p({id:`WRdYfS`}),t[15]=p,t[16]=x);let S=m||c!==null,C;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsx)(P,{"aria-hidden":`true`,className:`size-3.5`}),t[17]=C):C=t[17];let w;t[18]!==r||t[19]!==x||t[20]!==S?(w=(0,Q.jsx)(f,{variant:`ghost`,size:`icon`,className:`size-6 shrink-0 text-muted-foreground`,"aria-label":x,"data-testid":`problems-audit-refresh`,disabled:S,onClick:r,children:C}),t[18]=r,t[19]=x,t[20]=S,t[21]=w):w=t[21];let T;t[22]!==w||t[23]!==_||t[24]!==b?(T=(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[_,b,w]}),t[22]=w,t[23]=_,t[24]=b,t[25]=T):T=t[25];let E;t[26]!==T||t[27]!==g?(E=(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-2 pb-1`,children:[g,T]}),t[26]=T,t[27]=g,t[28]=E):E=t[28];let D;t[29]!==p||t[30]!==m?(D=m&&(0,Q.jsx)(`div`,{className:`flex flex-col gap-1`,role:`status`,"aria-busy":`true`,"aria-label":p({id:`dx-TwN`}),children:[1,2,3].map(et)}),t[29]=p,t[30]=m,t[31]=D):D=t[31];let O;t[32]===n.status?O=t[33]:(O=n.status===`failed`&&(0,Q.jsx)(G,{className:`px-2 text-xs`,children:(0,Q.jsx)(o,{id:`IFezUv`})}),t[32]=n.status,t[33]=O);let k;t[34]!==n.result||t[35]!==n.status||t[36]!==d||t[37]!==u||t[38]!==i?(k=n.status===`loaded`&&(0,Q.jsx)(tt,{result:n.result,onNavigate:i,onCreateTarget:u,creatingTarget:d}),t[34]=n.result,t[35]=n.status,t[36]=d,t[37]=u,t[38]=i,t[39]=k):k=t[39];let A;return t[40]!==E||t[41]!==D||t[42]!==O||t[43]!==k?(A=(0,Q.jsxs)(te,{className:`px-2 py-2`,"data-testid":`problems-project-scope`,children:[E,D,O,k]}),t[40]=E,t[41]=D,t[42]=O,t[43]=k,t[44]=A):A=t[44],A}function et(e){return(0,Q.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded px-2 py-1.5`,children:[(0,Q.jsx)(K,{className:`mt-0.5 size-3.5 shrink-0 rounded`}),(0,Q.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,Q.jsx)(K,{className:`h-3 w-28`}),(0,Q.jsx)(K,{className:`h-3 w-40`})]})]},e)}function tt(e){let t=(0,J.c)(12),{result:n,onNavigate:r,onCreateTarget:i,creatingTarget:a}=e,{_:c}=s(),l;t[0]!==c||t[1]!==n.warnings?(l=n.warnings.length>0&&(0,Q.jsx)(`ul`,{"aria-label":c({id:`Rsdhj9`}),className:`flex flex-col gap-0.5 pb-1`,children:n.warnings.map(nt)}),t[0]=c,t[1]=n.warnings,t[2]=l):l=t[2];let u;t[3]!==a||t[4]!==i||t[5]!==r||t[6]!==n.fileCount||t[7]!==n.files?(u=n.files.length===0?(0,Q.jsx)(ee,{className:`px-2`,children:(0,Q.jsx)(o,{id:`k_Dqw1`,values:{0:n.fileCount}})}):n.files.map(e=>(0,Q.jsx)(rt,{file:e,onNavigate:r,onCreateTarget:i,creatingTarget:a},e.file)),t[3]=a,t[4]=i,t[5]=r,t[6]=n.fileCount,t[7]=n.files,t[8]=u):u=t[8];let d;return t[9]!==l||t[10]!==u?(d=(0,Q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[l,u]}),t[9]=l,t[10]=u,t[11]=d):d=t[11],d}function nt(e,t){return(0,Q.jsxs)(`li`,{className:`flex items-start gap-1.5 px-2 text-xs`,children:[(0,Q.jsx)(F,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-amber-500`}),(0,Q.jsx)(`span`,{className:`min-w-0 text-foreground`,children:e})]},`${t}-${e}`)}function rt(e){let t=(0,J.c)(41),{file:n,onNavigate:r,onCreateTarget:i,creatingTarget:a}=e,{_:o}=s(),c,l,u,d,f,p,m,h,y;if(t[0]!==o||t[1]!==a||t[2]!==n.diagnostics||t[3]!==n.file||t[4]!==i||t[5]!==r){let e=[...n.diagnostics].sort(Be);l=v,m=!0,h=`problems-audit-group`;let s;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Q.jsx)(k,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`}),t[15]=s):s=t[15];let b;t[16]===n.file?b=t[17]:(b=(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs text-foreground`,title:n.file,children:n.file}),t[16]=n.file,t[17]=b),y=(0,Q.jsxs)(_,{className:`group flex w-full cursor-pointer items-center gap-1.5 rounded px-2 py-1.5 text-left transition-colors hover:bg-muted`,children:[s,b,(0,Q.jsx)(W,{variant:`gray`,"data-testid":`problems-audit-file-count`,className:`shrink-0`,children:e.length})]}),c=g,p=`overflow-hidden data-[state=open]:animate-[collapsible-down_150ms_ease-out] data-[state=closed]:animate-[collapsible-up_150ms_ease-in]`,t[18]!==o||t[19]!==n.file?(u=o({id:`zAJzIg`,values:{0:n.file}}),t[18]=o,t[19]=n.file,t[20]=u):u=t[20],d=`flex flex-col gap-0.5 pb-1 ps-3`;let x;t[21]!==o||t[22]!==a||t[23]!==n.file||t[24]!==i||t[25]!==r?(x=e=>{let t=e.range.start.line+1,s=e.linkTarget!==void 0&&i!==void 0;return(0,Q.jsxs)(`li`,{className:`group relative rounded transition-colors hover:bg-muted`,children:[(0,Q.jsx)(`button`,{type:`button`,onClick:()=>r(n.file,e),className:`flex w-full cursor-pointer flex-col gap-0.5 rounded px-2 py-1.5 text-left`,title:o({id:`kDwcbW`,values:{0:n.file,displayLine:t}}),children:(0,Q.jsx)(He,{diagnostic:e})}),s?(0,Q.jsx)(`div`,{className:`absolute bottom-1 right-1 flex items-center gap-1 rounded bg-muted opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100 motion-reduce:transition-none`,children:(0,Q.jsx)(Ge,{target:e.linkTarget??``,creating:a===e.linkTarget,disabled:a!==null,onCreate:()=>i?.(e)})}):null]},Ue(e))},t[21]=o,t[22]=a,t[23]=n.file,t[24]=i,t[25]=r,t[26]=x):x=t[26],f=e.map(x),t[0]=o,t[1]=a,t[2]=n.diagnostics,t[3]=n.file,t[4]=i,t[5]=r,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=m,t[13]=h,t[14]=y}else c=t[6],l=t[7],u=t[8],d=t[9],f=t[10],p=t[11],m=t[12],h=t[13],y=t[14];let b;t[27]!==u||t[28]!==d||t[29]!==f?(b=(0,Q.jsx)(`ul`,{"aria-label":u,className:d,children:f}),t[27]=u,t[28]=d,t[29]=f,t[30]=b):b=t[30];let x;t[31]!==c||t[32]!==p||t[33]!==b?(x=(0,Q.jsx)(c,{className:p,children:b}),t[31]=c,t[32]=p,t[33]=b,t[34]=x):x=t[34];let S;return t[35]!==l||t[36]!==m||t[37]!==h||t[38]!==y||t[39]!==x?(S=(0,Q.jsxs)(l,{defaultOpen:m,"data-testid":h,children:[y,x]}),t[35]=l,t[36]=m,t[37]=h,t[38]=y,t[39]=x,t[40]=S):S=t[40],S}var it={words:0,chars:0,tokens:0},at=/[ -〿-ゟ゠-ヿ㐀-䶿一-鿿豈---ក-]/,ot=/[\p{L}\p{N}]/u,st=new Set([`text`,`inlineCode`,`code`,`tag`]),ct=new Set([`html`,`definition`,`footnoteDefinition`,`yaml`,`toml`,`image`,`imageReference`,`mdxFlowExpression`,`mdxTextExpression`,`mdxjsEsm`,`rawMdxFallback`,`rawMdxFallbackMdast`]),lt=new Set([`paragraph`,`heading`,`blockquote`,`list`,`listItem`,`thematicBreak`,`table`,`tableRow`,`tableCell`,`mdxJsxFlowElement`,`commentBlock`]);function ut(e,t){if(!e)return;let n=e.type;if(!ct.has(n)){if(st.has(n)){e.value&&(t.push(e.value),n===`code`&&t.push(`
|
|
2
2
|
`));return}if(n===`wikiLink`||n===`wikiLinkEmbed`){let n=e.data?.alias??e.value??``;n&&t.push(n);return}if(Array.isArray(e.children)){for(let n of e.children)ut(n,t);if(lt.has(n)&&t.length>0){let e=t[t.length-1];e&&!e.endsWith(`
|
|
3
3
|
`)&&t.push(`
|
|
4
|
-
`)}}}}function dt(e){try{let t=x().parseToMdast(e),n=[];return ut(t,n),n.join(``).trim()}catch(t){return console.warn(`[document-stats] mdast parse failed, falling back to raw text`,t),e.trim()}}function ft(e){if(!e)return 0;let t=0;for(let n of e.split(/\s+/))ot.test(n)&&t++;return t}function pt(e){let t=globalThis.Intl.Segmenter;if(!t)return ft(e);let n=new t(void 0,{granularity:`word`}),r=0;for(let t of n.segment(e))t.isWordLike&&r++;return r}function mt(e){let t=at.test(e)?1.5:4;return Math.ceil(e.length/t)}function ht(e){return e?{words:at.test(e)?pt(e):ft(e),chars:e.length,tokens:mt(e)}:{words:0,chars:0,tokens:0}}function gt(e){if(!e)return{words:0,chars:0,tokens:0};let{body:t}=
|
|
4
|
+
`)}}}}function dt(e){try{let t=x().parseToMdast(e),n=[];return ut(t,n),n.join(``).trim()}catch(t){return console.warn(`[document-stats] mdast parse failed, falling back to raw text`,t),e.trim()}}function ft(e){if(!e)return 0;let t=0;for(let n of e.split(/\s+/))ot.test(n)&&t++;return t}function pt(e){let t=globalThis.Intl.Segmenter;if(!t)return ft(e);let n=new t(void 0,{granularity:`word`}),r=0;for(let t of n.segment(e))t.isWordLike&&r++;return r}function mt(e){let t=at.test(e)?1.5:4;return Math.ceil(e.length/t)}function ht(e){return e?{words:at.test(e)?pt(e):ft(e),chars:e.length,tokens:mt(e)}:{words:0,chars:0,tokens:0}}function gt(e){if(!e)return{words:0,chars:0,tokens:0};let{body:t}=T(e);return t.trim()?ht(dt(t)):{words:0,chars:0,tokens:0}}function _t(e,{isMarkdown:t}){let n=e.trim();return n?ht(t?dt(e):n):it}var vt=new Map,yt=new Set,bt=(e,t)=>`${t}:${e}`;function xt(){for(let e of yt)e()}function St(e,t,n){let r=bt(e,t);if(n===null){vt.delete(r)&&xt();return}let i=vt.get(r);i&&i.words===n.words&&i.chars===n.chars&&i.tokens===n.tokens||(vt.set(r,n),xt())}function Ct(e,t){return e===null?null:vt.get(bt(e,t))??null}function wt(e){return yt.add(e),()=>{yt.delete(e)}}function Tt(e){let{from:t,to:n,empty:r}=e.state.selection;if(r)return null;let i=e.state.doc.textBetween(t,n,`
|
|
5
5
|
`,` `);return i.trim()?_t(i,{isMarkdown:!1}):null}function Et(e){let t=[];for(let n of e.state.selection.ranges)n.empty||t.push(e.state.sliceDoc(n.from,n.to));if(t.length===0)return null;let n=t.join(`
|
|
6
6
|
`);return n.trim()?_t(n,{isMarkdown:!0}):null}export{be as _,wt as a,Z as b,ze as c,Le as d,Re as f,ye as g,Te as h,Tt as i,qe as l,we as m,St as n,it as o,Pe as p,Et as r,gt as s,Ct as t,Fe as u,fe as v,ue as x,de as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./globals-CXEWtNVL.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a,t as o}from"./dist-Nvb76hAm.js";import{t as s}from"./compiler-runtime-BfE3aGVn.js";import{s as c}from"./createLucideIcon-DAkhoPjT.js";import{t as l}from"./button-Gol9BgNB.js";import{t as u}from"./checkbox-DY-vIhnZ.js";import{t as d}from"./label-DyipnO5I.js";import{n as f,t as p}from"./radio-group-CGEdWasQ.js";import{Ut as m,Wt as h}from"./dist-Cal4LUep.js";import{t as g}from"./check-GqWaoTdV.js";import{t as _}from"./loader-circle-Cg5SU7AZ.js";import{t as v}from"./input-D0ZW0Opq.js";import{t as y}from"./dist-q14fBS3T.js";import{t as b}from"./badge-Dba4cvJR.js";import{t as x}from"./textarea-RSYJwPz9.js";var S=e(r(),1),C=t(),w=s();async function T(){let e=typeof window>`u`?void 0:window.okUninstall;if(e===void 0)return null;try{let t=await e.ready();return t.kind===`screen`?t.screen:null}catch{return null}}function E(e){let t=typeof window>`u`?void 0:window.okUninstall;t!==void 0&&t.send(e).catch(()=>void 0)}var D=n();function O(e){let t=(0,w.c)(6),{items:n}=e,r;if(t[0]!==n){let e;t[2]===n.length?e=t[3]:(e=(e,t)=>(0,D.jsxs)(`li`,{className:`relative pb-5 pl-[30px] last:pb-1`,children:[t<n.length-1&&(0,D.jsx)(`span`,{"aria-hidden":`true`,className:`absolute top-[22px] bottom-0.5 left-[9px] w-0.5 bg-border`}),(0,D.jsx)(`span`,{"aria-hidden":`true`,className:c(`absolute top-px left-0 inline-flex size-5 items-center justify-center rounded-full`,e.done?`bg-primary/15 text-primary`:`border-[1.5px] border-muted-foreground/50`),children:e.done&&(0,D.jsx)(g,{className:`size-3`})}),(0,D.jsx)(`span`,{className:`sr-only`,children:e.done?(0,D.jsx)(i,{id:`clJ3qM`}):(0,D.jsx)(i,{id:`yU_9ur`})}),(0,D.jsxs)(`span`,{className:`block`,children:[(0,D.jsx)(`span`,{className:`font-medium`,children:e.label}),e.detail!==void 0&&(0,D.jsx)(`span`,{className:`mt-0.5 block text-muted-foreground leading-snug`,children:e.detail})]})]},e.label),t[2]=n.length,t[3]=e),r=n.map(e),t[0]=n,t[1]=r}else r=t[1];let a;return t[4]===r?a=t[5]:(a=(0,D.jsx)(`ol`,{className:`mb-1.5`,children:r}),t[4]=r,t[5]=a),a}function k(e){let t=(0,w.c)(49),{notice:n,onConfirm:r,onCancel:i,onRevealLog:o}=e,{_:s}=a(),c=(0,S.useId)(),u=(0,S.useId)(),d=n.cancelLabel!==void 0,f,p;t[0]!==d||t[1]!==i||t[2]!==r?(f=()=>{let e=e=>{e.key===`Escape`&&(d?i():r())};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},p=[d,i,r],t[0]=d,t[1]=i,t[2]=r,t[3]=f,t[4]=p):(f=t[3],p=t[4]),(0,S.useEffect)(f,p);let m;t[5]!==n.title||t[6]!==c?(m=(0,D.jsx)(`h1`,{id:c,className:`font-medium text-base leading-none`,children:n.title}),t[5]=n.title,t[6]=c,t[7]=m):m=t[7];let h;t[8]===n.subtitle?h=t[9]:(h=n.subtitle!==void 0&&(0,D.jsx)(`p`,{className:`text-muted-foreground text-sm leading-snug`,children:n.subtitle}),t[8]=n.subtitle,t[9]=h);let g;t[10]!==m||t[11]!==h?(g=(0,D.jsxs)(`header`,{className:`shrink-0 space-y-4 px-6 pt-5 pb-3.5`,children:[m,h]}),t[10]=m,t[11]=h,t[12]=g):g=t[12];let _;t[13]===n.paragraphs?_=t[14]:(_=n.paragraphs.map(A),t[13]=n.paragraphs,t[14]=_);let v;t[15]===n.checklist?v=t[16]:(v=n.checklist!==void 0&&(0,D.jsx)(O,{items:n.checklist}),t[15]=n.checklist,t[16]=v);let y;t[17]!==s||t[18]!==n.log?(y=n.log!==void 0&&(0,D.jsx)(`section`,{"aria-label":s({id:`Oi56Cu`}),tabIndex:0,className:`subtle-scrollbar mt-0.5 mb-2.5 min-h-20 flex-1 overflow-auto rounded-lg border border-border border-dotted bg-muted/40 px-3 py-2.5 focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50`,children:(0,D.jsx)(`pre`,{className:`select-text whitespace-pre-wrap font-mono text-xs leading-relaxed wrap-anywhere`,children:n.log})}),t[17]=s,t[18]=n.log,t[19]=y):y=t[19];let b;t[20]===n.footnote?b=t[21]:(b=n.footnote!==void 0&&(0,D.jsx)(`p`,{className:`select-text text-muted-foreground text-xs wrap-anywhere`,children:n.footnote}),t[20]=n.footnote,t[21]=b);let x;t[22]!==n.logRevealLabel||t[23]!==o?(x=n.logRevealLabel!==void 0&&(0,D.jsx)(`p`,{className:`mt-0.5`,children:(0,D.jsx)(l,{type:`button`,variant:`link-muted`,size:`xs`,className:`h-auto px-0 underline underline-offset-2`,onClick:o,children:n.logRevealLabel})}),t[22]=n.logRevealLabel,t[23]=o,t[24]=x):x=t[24];let C;t[25]!==u||t[26]!==x||t[27]!==_||t[28]!==v||t[29]!==y||t[30]!==b?(C=(0,D.jsxs)(`div`,{id:u,className:`flex min-h-0 flex-1 flex-col px-6 pt-1 pb-4 text-sm`,children:[_,v,y,b,x]}),t[25]=u,t[26]=x,t[27]=_,t[28]=v,t[29]=y,t[30]=b,t[31]=C):C=t[31];let T;t[32]!==n.cancelLabel||t[33]!==i?(T=n.cancelLabel!==void 0&&(0,D.jsx)(l,{type:`button`,variant:`outline-mono`,autoFocus:!0,onClick:i,children:n.cancelLabel}),t[32]=n.cancelLabel,t[33]=i,t[34]=T):T=t[34];let E=n.danger===!0?`destructive`:`default`,k=!d,j;t[35]!==n.confirmLabel||t[36]!==r||t[37]!==E||t[38]!==k?(j=(0,D.jsx)(l,{type:`button`,variant:E,autoFocus:k,onClick:r,children:n.confirmLabel}),t[35]=n.confirmLabel,t[36]=r,t[37]=E,t[38]=k,t[39]=j):j=t[39];let M;t[40]!==T||t[41]!==j?(M=(0,D.jsxs)(`footer`,{className:`flex items-center justify-end gap-2.5 border-border border-t bg-muted/50 px-6 pt-3.5 pb-4`,children:[T,j]}),t[40]=T,t[41]=j,t[42]=M):M=t[42];let N;return t[43]!==u||t[44]!==C||t[45]!==M||t[46]!==g||t[47]!==c?(N=(0,D.jsxs)(`div`,{role:`alertdialog`,"aria-labelledby":c,"aria-describedby":u,className:`flex h-dvh flex-col bg-background text-foreground`,children:[g,C,M]}),t[43]=u,t[44]=C,t[45]=M,t[46]=g,t[47]=c,t[48]=N):N=t[48],N}function A(e){return(0,D.jsx)(`p`,{className:`mb-2.5 leading-normal`,children:e},e)}function j(e){return e.open||e.running?`active`:e.recent?`recent`:null}function M(e){return e.split(`/`).filter(Boolean).at(-1)??e}function N(e){let t=(0,w.c)(9),{status:n}=e,{_:r}=a(),i;t[0]===r?i=t[1]:(i=r({id:`s_ereB`}),t[0]=r,t[1]=i);let o;t[2]===r?o=t[3]:(o=r({id:`_2cM9E`}),t[2]=r,t[3]=o);let s;t[4]!==i||t[5]!==o?(s={active:i,recent:o},t[4]=i,t[5]=o,t[6]=s):s=t[6];let c=s[n],l;return t[7]===c?l=t[8]:(l=(0,D.jsx)(b,{variant:`secondary`,className:`rounded-sm text-muted-foreground`,children:c}),t[7]=c,t[8]=l),l}function P(e){let t=(0,w.c)(28),{project:n,checked:r,onCheckedChange:i}=e,{_:o}=a(),s=(0,S.useId)(),c;t[0]===n?c=t[1]:(c=j(n),t[0]=n,t[1]=c);let l=c,f;t[2]===i?f=t[3]:(f=e=>i(e===!0),t[2]=i,t[3]=f);let p;t[4]!==o||t[5]!==n.path?(p=o({id:`CHfFN_`,values:{0:n.path}}),t[4]=o,t[5]=n.path,t[6]=p):p=t[6];let m;t[7]!==s||t[8]!==r||t[9]!==f||t[10]!==p?(m=(0,D.jsx)(u,{id:s,className:`mt-0.5`,checked:r,onCheckedChange:f,"aria-label":p}),t[7]=s,t[8]=r,t[9]=f,t[10]=p,t[11]=m):m=t[11];let h;t[12]===n.path?h=t[13]:(h=M(n.path),t[12]=n.path,t[13]=h);let g;t[14]===h?g=t[15]:(g=(0,D.jsx)(`span`,{className:`w-full truncate font-medium text-sm`,children:h}),t[14]=h,t[15]=g);let _;t[16]===n.path?_=t[17]:(_=(0,D.jsx)(`span`,{className:`w-full select-text break-words text-muted-foreground text-xs`,children:n.path}),t[16]=n.path,t[17]=_);let v;t[18]!==s||t[19]!==g||t[20]!==_?(v=(0,D.jsxs)(d,{htmlFor:s,className:`min-w-0 flex-col items-start gap-0.5 font-normal`,children:[g,_]}),t[18]=s,t[19]=g,t[20]=_,t[21]=v):v=t[21];let y;t[22]===l?y=t[23]:(y=l!==null&&(0,D.jsx)(`div`,{className:`flex justify-end max-sm:col-start-2 max-sm:justify-start`,children:(0,D.jsx)(N,{status:l})}),t[22]=l,t[23]=y);let b;return t[24]!==m||t[25]!==v||t[26]!==y?(b=(0,D.jsxs)(`div`,{className:`grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-2.5 border-border/60 border-b px-3 py-2.5 last:border-b-0 hover:bg-accent/40 max-sm:grid-cols-[auto_minmax(0,1fr)]`,children:[m,v,y]}),t[24]=m,t[25]=v,t[26]=y,t[27]=b):b=t[27],b}function F(e){let t=(0,w.c)(45),{projects:n,onConfirm:r,onCancel:o}=e,{_:s}=a(),[c,f]=(0,S.useState)(ne),p=(0,S.useId)(),m=(0,S.useId)(),h=(0,S.useId)(),g=n.length>0&&c.size===n.length?!0:c.size>0?`indeterminate`:!1,_;t[0]===n?_=t[1]:(_=e=>f(e?new Set(n.map(I)):new Set),t[0]=n,t[1]=_);let v=_,y,b;t[2]!==o||t[3]!==n?(y=()=>{let e=e=>{if(e.key===`Escape`){o();return}(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`a`&&(e.preventDefault(),f(new Set(n.map(te))))};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},b=[o,n],t[2]=o,t[3]=n,t[4]=y,t[5]=b):(y=t[4],b=t[5]),(0,S.useEffect)(y,b);let x;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,D.jsx)(i,{id:`PrVaZo`}),t[6]=x):x=t[6];let C;t[7]===p?C=t[8]:(C=(0,D.jsx)(`h1`,{id:p,className:`font-medium leading-none text-base`,children:x}),t[7]=p,t[8]=C);let T;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,D.jsx)(i,{id:`keop3U`}),t[9]=T):T=t[9];let E;t[10]===m?E=t[11]:(E=(0,D.jsx)(`p`,{id:m,className:`text-sm text-muted-foreground`,children:T}),t[10]=m,t[11]=E);let O;t[12]!==C||t[13]!==E?(O=(0,D.jsxs)(`header`,{className:`shrink-0 px-6 pt-5 pb-3.5 space-y-4`,children:[C,E]}),t[12]=C,t[13]=E,t[14]=O):O=t[14];let k;t[15]===s?k=t[16]:(k=s({id:`QySH4I`}),t[15]=s,t[16]=k);let A;t[17]!==s||t[18]!==n||t[19]!==h||t[20]!==g||t[21]!==c||t[22]!==v?(A=n.length===0?(0,D.jsx)(`div`,{className:`rounded-lg border border-border p-4`,children:(0,D.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:(0,D.jsx)(i,{id:`bKt9Jk`})})}):(0,D.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-border`,children:[(0,D.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2.5 border-border border-b px-3 py-2.5 bg-muted/30`,children:[(0,D.jsx)(u,{id:h,checked:g,onCheckedChange:e=>v(e===!0)}),(0,D.jsx)(d,{htmlFor:h,className:`flex-1 font-medium text-sm`,children:(0,D.jsx)(i,{id:`wgNoIs`})}),(0,D.jsxs)(`span`,{role:`status`,"aria-label":s({id:`nsUDL8`,values:{0:c.size,1:n.length}}),className:`text-muted-foreground text-xs tabular-nums`,children:[c.size,` / `,n.length]})]}),(0,D.jsx)(`div`,{className:`subtle-scrollbar min-h-0 flex-1 overflow-y-scroll [scrollbar-gutter:stable]`,children:n.map((e,t)=>(0,D.jsx)(P,{project:e,checked:c.has(t),onCheckedChange:e=>{f(n=>{let r=new Set(n);return e?r.add(t):r.delete(t),r})}},e.path))})]}),t[17]=s,t[18]=n,t[19]=h,t[20]=g,t[21]=c,t[22]=v,t[23]=A):A=t[23];let j;t[24]!==A||t[25]!==k?(j=(0,D.jsx)(`section`,{"aria-label":k,className:`flex min-h-0 flex-1 flex-col px-6 py-3.5`,children:A}),t[24]=A,t[25]=k,t[26]=j):j=t[26];let M;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,D.jsx)(i,{id:`dEgA5A`}),t[27]=M):M=t[27];let N;t[28]===o?N=t[29]:(N=(0,D.jsx)(l,{type:`button`,variant:`outline-mono`,autoFocus:!0,onClick:o,children:M}),t[28]=o,t[29]=N);let F;t[30]!==r||t[31]!==c?(F=()=>r([...c].sort(ee)),t[30]=r,t[31]=c,t[32]=F):F=t[32];let L;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,D.jsx)(i,{id:`J7nMqi`}),t[33]=L):L=t[33];let R;t[34]===F?R=t[35]:(R=(0,D.jsx)(l,{type:`button`,variant:`destructive`,onClick:F,children:L}),t[34]=F,t[35]=R);let z;t[36]!==N||t[37]!==R?(z=(0,D.jsxs)(`footer`,{className:`flex items-center justify-end gap-2.5 border-border border-t bg-muted/50 px-6 pt-3.5 pb-4`,children:[N,R]}),t[36]=N,t[37]=R,t[38]=z):z=t[38];let B;return t[39]!==m||t[40]!==j||t[41]!==z||t[42]!==O||t[43]!==p?(B=(0,D.jsxs)(`div`,{role:`dialog`,"aria-labelledby":p,"aria-describedby":m,className:`flex h-dvh flex-col overflow-hidden bg-background text-foreground`,children:[O,j,z]}),t[39]=m,t[40]=j,t[41]=z,t[42]=O,t[43]=p,t[44]=B):B=t[44],B}function ee(e,t){return e-t}function te(e,t){return t}function I(e,t){return t}function ne(){return new Set}function L(){let e=(0,w.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,D.jsx)(_,{"aria-hidden":`true`,className:`mx-auto mb-4 size-8 animate-spin text-primary motion-reduce:animate-none`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,D.jsx)(`h1`,{className:`mb-2 font-medium text-base leading-none`,children:(0,D.jsx)(i,{id:`j2229h`})}),e[1]=n):n=e[1];let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,D.jsx)(`main`,{className:`grid h-dvh place-items-center bg-background text-foreground`,children:(0,D.jsxs)(`div`,{role:`status`,className:`max-w-vw px-7 py-7 text-center`,children:[t,n,(0,D.jsx)(`p`,{className:`text-muted-foreground text-sm leading-relaxed`,children:(0,D.jsx)(i,{id:`kCjkGY`})})]})}),e[2]=r):r=e[2],r}function R(){let{_:e}=a();return{"workflow-fit":e({id:`5vAI6Z`}),"missing-feature":e({id:`cH0dkG`}),"hard-to-start":e({id:`uoJF_D`}),unreliable:e({id:`WGMoTY`}),"switched-tool":e({id:`jO18NZ`}),"one-off":e({id:`S3qu11`}),other:e({id:`aQyGJc`})}}function z(e){let t=(0,w.c)(86),{onSend:n,onSkip:r}=e,{_:o}=a(),s=R(),[c,g]=(0,S.useState)(``),[_,y]=(0,S.useState)(``),[b,C]=(0,S.useState)(!1),[T,E]=(0,S.useState)(``),O=(0,S.useRef)(null),k=(0,S.useId)(),A=(0,S.useId)(),j=(0,S.useId)(),M=(0,S.useId)(),N=(0,S.useId)(),P=(0,S.useId)(),F,ee;t[0]===b?(F=t[1],ee=t[2]):(F=()=>{b&&O.current?.focus()},ee=[b],t[0]=b,t[1]=F,t[2]=ee),(0,S.useEffect)(F,ee);let te;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,D.jsx)(i,{id:`ElyuiT`}),t[3]=te):te=t[3];let I;t[4]===k?I=t[5]:(I=(0,D.jsx)(`h1`,{id:k,className:`font-medium leading-none text-base`,children:te}),t[4]=k,t[5]=I);let ne;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,D.jsx)(i,{id:`ZDOq9A`}),t[6]=ne):ne=t[6];let L;t[7]===A?L=t[8]:(L=(0,D.jsx)(`p`,{id:A,className:`text-muted-foreground text-sm`,children:ne}),t[7]=A,t[8]=L);let z;t[9]!==I||t[10]!==L?(z=(0,D.jsxs)(`header`,{className:`px-6 pt-5 pb-3.5 space-y-4`,children:[I,L]}),t[9]=I,t[10]=L,t[11]=z):z=t[11];let B;t[12]!==T||t[13]!==b||t[14]!==_||t[15]!==n||t[16]!==c?(B=e=>{e.preventDefault();let t=_.trim(),r=b?T.trim():``;n({...c===``?{}:{reason:c},...t===``?{}:{note:t},...r===``?{}:{email:r}})},t[12]=T,t[13]=b,t[14]=_,t[15]=n,t[16]=c,t[17]=B):B=t[17];let re;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,D.jsx)(i,{id:`oxdGJn`}),t[18]=re):re=t[18];let V;t[19]===j?V=t[20]:(V=(0,D.jsx)(`p`,{id:j,className:`mb-2 font-medium text-sm`,children:re}),t[19]=j,t[20]=V);let H;t[21]!==j||t[22]!==s?(H=h.map(e=>(0,D.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-1 py-1`,children:[(0,D.jsx)(f,{id:`${j}-${e.value}`,value:e.value}),(0,D.jsx)(d,{htmlFor:`${j}-${e.value}`,className:`font-normal text-sm leading-snug`,children:s[e.value]})]},e.value)),t[21]=j,t[22]=s,t[23]=H):H=t[23];let U;t[24]!==j||t[25]!==c||t[26]!==H?(U=(0,D.jsx)(p,{"aria-labelledby":j,value:c,onValueChange:g,children:H}),t[24]=j,t[25]=c,t[26]=H,t[27]=U):U=t[27];let W;t[28]!==V||t[29]!==U?(W=(0,D.jsxs)(`div`,{className:`mb-6`,children:[V,U]}),t[28]=V,t[29]=U,t[30]=W):W=t[30];let ie;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,D.jsx)(i,{id:`axQ1h6`}),t[31]=ie):ie=t[31];let G;t[32]===M?G=t[33]:(G=(0,D.jsx)(d,{htmlFor:M,className:`mb-2 font-medium text-sm`,children:ie}),t[32]=M,t[33]=G);let K;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(K=e=>y(e.target.value),t[34]=K):K=t[34];let q;t[35]!==_||t[36]!==M?(q=(0,D.jsx)(x,{id:M,rows:3,maxLength:m,value:_,onChange:K}),t[35]=_,t[36]=M,t[37]=q):q=t[37];let J;t[38]!==G||t[39]!==q?(J=(0,D.jsxs)(`div`,{className:`mb-6`,children:[G,q]}),t[38]=G,t[39]=q,t[40]=J):J=t[40];let ae;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(ae=e=>C(e===!0),t[41]=ae):ae=t[41];let Y;t[42]!==b||t[43]!==N?(Y=(0,D.jsx)(u,{id:N,checked:b,onCheckedChange:ae}),t[42]=b,t[43]=N,t[44]=Y):Y=t[44];let oe;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,D.jsx)(i,{id:`xEb24l`}),t[45]=oe):oe=t[45];let X;t[46]===N?X=t[47]:(X=(0,D.jsx)(d,{htmlFor:N,className:`font-medium text-sm`,children:oe}),t[46]=N,t[47]=X);let Z;t[48]!==Y||t[49]!==X?(Z=(0,D.jsxs)(`div`,{className:`mb-2 flex items-center gap-2.5`,children:[Y,X]}),t[48]=Y,t[49]=X,t[50]=Z):Z=t[50];let se=!b,ce;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,D.jsx)(i,{id:`ATGYL1`}),t[51]=ce):ce=t[51];let Q;t[52]===P?Q=t[53]:(Q=(0,D.jsx)(d,{htmlFor:P,className:`mb-2 font-medium text-sm sr-only`,children:ce}),t[52]=P,t[53]=Q);let le;t[54]===o?le=t[55]:(le=o({id:`JHf6qZ`}),t[54]=o,t[55]=le);let ue=!b,de;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(de=e=>E(e.target.value),t[56]=de):de=t[56];let fe;t[57]!==T||t[58]!==P||t[59]!==le||t[60]!==ue?(fe=(0,D.jsx)(v,{id:P,ref:O,type:`email`,maxLength:320,autoComplete:`email`,spellCheck:!1,placeholder:le,disabled:ue,value:T,onChange:de}),t[57]=T,t[58]=P,t[59]=le,t[60]=ue,t[61]=fe):fe=t[61];let $;t[62]!==se||t[63]!==Q||t[64]!==fe?($=(0,D.jsxs)(`div`,{className:`mb-6`,hidden:se,children:[Q,fe]}),t[62]=se,t[63]=Q,t[64]=fe,t[65]=$):$=t[65];let pe;t[66]!==W||t[67]!==J||t[68]!==Z||t[69]!==$?(pe=(0,D.jsxs)(`div`,{className:`subtle-scrollbar min-h-0 flex-1 overflow-y-auto px-6 pt-1 pb-4`,children:[W,J,Z,$]}),t[66]=W,t[67]=J,t[68]=Z,t[69]=$,t[70]=pe):pe=t[70];let me;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,D.jsx)(i,{id:`6Uau97`}),t[71]=me):me=t[71];let he;t[72]===r?he=t[73]:(he=(0,D.jsx)(l,{type:`button`,variant:`outline-mono`,autoFocus:!0,onClick:r,children:me}),t[72]=r,t[73]=he);let ge;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,D.jsx)(l,{type:`submit`,children:(0,D.jsx)(i,{id:`xMsnTe`})}),t[74]=ge):ge=t[74];let _e;t[75]===he?_e=t[76]:(_e=(0,D.jsxs)(`footer`,{className:`flex items-center justify-end gap-2.5 border-border border-t bg-muted/50 px-6 pt-3.5 pb-4`,children:[he,ge]}),t[75]=he,t[76]=_e);let ve;t[77]!==pe||t[78]!==_e||t[79]!==B?(ve=(0,D.jsxs)(`form`,{className:`flex min-h-0 flex-1 flex-col`,onSubmit:B,children:[pe,_e]}),t[77]=pe,t[78]=_e,t[79]=B,t[80]=ve):ve=t[80];let ye;return t[81]!==A||t[82]!==ve||t[83]!==z||t[84]!==k?(ye=(0,D.jsxs)(`div`,{role:`dialog`,"aria-labelledby":k,"aria-describedby":A,className:`flex h-dvh flex-col bg-background text-foreground`,children:[z,ve]}),t[81]=A,t[82]=ve,t[83]=z,t[84]=k,t[85]=ye):ye=t[85],ye}function B(){let e=(0,w.c)(9),[t,n]=(0,S.useState)(null),r,a;if(e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=!0;return T().then(t=>{e&&n(t)}),()=>{e=!1}},a=[],e[0]=r,e[1]=a):(r=e[0],a=e[1]),(0,S.useEffect)(r,a),t!==null)switch(t.kind){case`picker`:{let n;return e[2]===t.projects?n=e[3]:(n=(0,D.jsx)(F,{projects:t.projects,onConfirm:G,onCancel:ie}),e[2]=t.projects,e[3]=n),n}case`survey`:{let t;return e[4]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,D.jsx)(z,{onSend:W,onSkip:U}),e[4]=t):t=e[4],t}case`progress`:{let t;return e[5]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,D.jsx)(L,{}),e[5]=t):t=e[5],t}case`notice`:{let n;return e[6]===t.notice?n=e[7]:(n=(0,D.jsx)(k,{notice:t.notice,onConfirm:H,onCancel:V,onRevealLog:re}),e[6]=t.notice,e[7]=n),n}default:return t}let o;return e[8]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,D.jsx)(`main`,{className:`flex min-h-dvh items-center justify-center bg-background p-8 text-foreground`,children:(0,D.jsx)(`p`,{className:`text-center text-muted-foreground text-sm`,children:(0,D.jsx)(i,{id:`tzGWeg`})})}),e[8]=o):o=e[8],o}function re(){return E({kind:`notice-reveal-log`})}function V(){return E({kind:`notice-cancel`})}function H(){return E({kind:`notice-confirm`})}function U(){return E({kind:`survey-skip`})}function W(e){return E({kind:`survey-send`,...e})}function ie(){return E({kind:`picker-cancel`})}function G(e){return E({kind:`picker-confirm`,selectedIndexes:e})}var K=document.getElementById(`root`);if(!K)throw Error(`Root element not found`);(0,C.createRoot)(K).render((0,D.jsx)(S.StrictMode,{children:(0,D.jsx)(o,{i18n:y,children:(0,D.jsx)(B,{})})}));
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./globals-BzYms-F0.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a,t as o}from"./dist-Nvb76hAm.js";import{t as s}from"./compiler-runtime-BfE3aGVn.js";import{s as c}from"./createLucideIcon-DAkhoPjT.js";import{t as l}from"./button-Gol9BgNB.js";import{t as u}from"./checkbox-DY-vIhnZ.js";import{t as d}from"./label-DyipnO5I.js";import{n as f,t as p}from"./radio-group-CGEdWasQ.js";import{Gt as m,Kt as h}from"./dist-Cgpf3BIr.js";import{t as g}from"./check-GqWaoTdV.js";import{t as _}from"./loader-circle-Cg5SU7AZ.js";import{t as v}from"./input-D0ZW0Opq.js";import{t as y}from"./dist-q14fBS3T.js";import{t as b}from"./badge-Dba4cvJR.js";import{t as x}from"./textarea-tdCJViKf.js";var S=e(r(),1),C=t(),w=s();async function T(){let e=typeof window>`u`?void 0:window.okUninstall;if(e===void 0)return null;try{let t=await e.ready();return t.kind===`screen`?t.screen:null}catch{return null}}function E(e){let t=typeof window>`u`?void 0:window.okUninstall;t!==void 0&&t.send(e).catch(()=>void 0)}var D=n();function O(e){let t=(0,w.c)(6),{items:n}=e,r;if(t[0]!==n){let e;t[2]===n.length?e=t[3]:(e=(e,t)=>(0,D.jsxs)(`li`,{className:`relative pb-5 pl-[30px] last:pb-1`,children:[t<n.length-1&&(0,D.jsx)(`span`,{"aria-hidden":`true`,className:`absolute top-[22px] bottom-0.5 left-[9px] w-0.5 bg-border`}),(0,D.jsx)(`span`,{"aria-hidden":`true`,className:c(`absolute top-px left-0 inline-flex size-5 items-center justify-center rounded-full`,e.done?`bg-primary/15 text-primary`:`border-[1.5px] border-muted-foreground/50`),children:e.done&&(0,D.jsx)(g,{className:`size-3`})}),(0,D.jsx)(`span`,{className:`sr-only`,children:e.done?(0,D.jsx)(i,{id:`clJ3qM`}):(0,D.jsx)(i,{id:`yU_9ur`})}),(0,D.jsxs)(`span`,{className:`block`,children:[(0,D.jsx)(`span`,{className:`font-medium`,children:e.label}),e.detail!==void 0&&(0,D.jsx)(`span`,{className:`mt-0.5 block text-muted-foreground leading-snug`,children:e.detail})]})]},e.label),t[2]=n.length,t[3]=e),r=n.map(e),t[0]=n,t[1]=r}else r=t[1];let a;return t[4]===r?a=t[5]:(a=(0,D.jsx)(`ol`,{className:`mb-1.5`,children:r}),t[4]=r,t[5]=a),a}function k(e){let t=(0,w.c)(49),{notice:n,onConfirm:r,onCancel:i,onRevealLog:o}=e,{_:s}=a(),c=(0,S.useId)(),u=(0,S.useId)(),d=n.cancelLabel!==void 0,f,p;t[0]!==d||t[1]!==i||t[2]!==r?(f=()=>{let e=e=>{e.key===`Escape`&&(d?i():r())};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},p=[d,i,r],t[0]=d,t[1]=i,t[2]=r,t[3]=f,t[4]=p):(f=t[3],p=t[4]),(0,S.useEffect)(f,p);let m;t[5]!==n.title||t[6]!==c?(m=(0,D.jsx)(`h1`,{id:c,className:`font-medium text-base leading-none`,children:n.title}),t[5]=n.title,t[6]=c,t[7]=m):m=t[7];let h;t[8]===n.subtitle?h=t[9]:(h=n.subtitle!==void 0&&(0,D.jsx)(`p`,{className:`text-muted-foreground text-sm leading-snug`,children:n.subtitle}),t[8]=n.subtitle,t[9]=h);let g;t[10]!==m||t[11]!==h?(g=(0,D.jsxs)(`header`,{className:`shrink-0 space-y-4 px-6 pt-5 pb-3.5`,children:[m,h]}),t[10]=m,t[11]=h,t[12]=g):g=t[12];let _;t[13]===n.paragraphs?_=t[14]:(_=n.paragraphs.map(A),t[13]=n.paragraphs,t[14]=_);let v;t[15]===n.checklist?v=t[16]:(v=n.checklist!==void 0&&(0,D.jsx)(O,{items:n.checklist}),t[15]=n.checklist,t[16]=v);let y;t[17]!==s||t[18]!==n.log?(y=n.log!==void 0&&(0,D.jsx)(`section`,{"aria-label":s({id:`Oi56Cu`}),tabIndex:0,className:`subtle-scrollbar mt-0.5 mb-2.5 min-h-20 flex-1 overflow-auto rounded-lg border border-border border-dotted bg-muted/40 px-3 py-2.5 focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50`,children:(0,D.jsx)(`pre`,{className:`select-text whitespace-pre-wrap font-mono text-xs leading-relaxed wrap-anywhere`,children:n.log})}),t[17]=s,t[18]=n.log,t[19]=y):y=t[19];let b;t[20]===n.footnote?b=t[21]:(b=n.footnote!==void 0&&(0,D.jsx)(`p`,{className:`select-text text-muted-foreground text-xs wrap-anywhere`,children:n.footnote}),t[20]=n.footnote,t[21]=b);let x;t[22]!==n.logRevealLabel||t[23]!==o?(x=n.logRevealLabel!==void 0&&(0,D.jsx)(`p`,{className:`mt-0.5`,children:(0,D.jsx)(l,{type:`button`,variant:`link-muted`,size:`xs`,className:`h-auto px-0 underline underline-offset-2`,onClick:o,children:n.logRevealLabel})}),t[22]=n.logRevealLabel,t[23]=o,t[24]=x):x=t[24];let C;t[25]!==u||t[26]!==x||t[27]!==_||t[28]!==v||t[29]!==y||t[30]!==b?(C=(0,D.jsxs)(`div`,{id:u,className:`flex min-h-0 flex-1 flex-col px-6 pt-1 pb-4 text-sm`,children:[_,v,y,b,x]}),t[25]=u,t[26]=x,t[27]=_,t[28]=v,t[29]=y,t[30]=b,t[31]=C):C=t[31];let T;t[32]!==n.cancelLabel||t[33]!==i?(T=n.cancelLabel!==void 0&&(0,D.jsx)(l,{type:`button`,variant:`outline-mono`,autoFocus:!0,onClick:i,children:n.cancelLabel}),t[32]=n.cancelLabel,t[33]=i,t[34]=T):T=t[34];let E=n.danger===!0?`destructive`:`default`,k=!d,j;t[35]!==n.confirmLabel||t[36]!==r||t[37]!==E||t[38]!==k?(j=(0,D.jsx)(l,{type:`button`,variant:E,autoFocus:k,onClick:r,children:n.confirmLabel}),t[35]=n.confirmLabel,t[36]=r,t[37]=E,t[38]=k,t[39]=j):j=t[39];let M;t[40]!==T||t[41]!==j?(M=(0,D.jsxs)(`footer`,{className:`flex items-center justify-end gap-2.5 border-border border-t bg-muted/50 px-6 pt-3.5 pb-4`,children:[T,j]}),t[40]=T,t[41]=j,t[42]=M):M=t[42];let N;return t[43]!==u||t[44]!==C||t[45]!==M||t[46]!==g||t[47]!==c?(N=(0,D.jsxs)(`div`,{role:`alertdialog`,"aria-labelledby":c,"aria-describedby":u,className:`flex h-dvh flex-col bg-background text-foreground`,children:[g,C,M]}),t[43]=u,t[44]=C,t[45]=M,t[46]=g,t[47]=c,t[48]=N):N=t[48],N}function A(e){return(0,D.jsx)(`p`,{className:`mb-2.5 leading-normal`,children:e},e)}function j(e){return e.open||e.running?`active`:e.recent?`recent`:null}function M(e){return e.split(`/`).filter(Boolean).at(-1)??e}function N(e){let t=(0,w.c)(9),{status:n}=e,{_:r}=a(),i;t[0]===r?i=t[1]:(i=r({id:`s_ereB`}),t[0]=r,t[1]=i);let o;t[2]===r?o=t[3]:(o=r({id:`_2cM9E`}),t[2]=r,t[3]=o);let s;t[4]!==i||t[5]!==o?(s={active:i,recent:o},t[4]=i,t[5]=o,t[6]=s):s=t[6];let c=s[n],l;return t[7]===c?l=t[8]:(l=(0,D.jsx)(b,{variant:`secondary`,className:`rounded-sm text-muted-foreground`,children:c}),t[7]=c,t[8]=l),l}function P(e){let t=(0,w.c)(28),{project:n,checked:r,onCheckedChange:i}=e,{_:o}=a(),s=(0,S.useId)(),c;t[0]===n?c=t[1]:(c=j(n),t[0]=n,t[1]=c);let l=c,f;t[2]===i?f=t[3]:(f=e=>i(e===!0),t[2]=i,t[3]=f);let p;t[4]!==o||t[5]!==n.path?(p=o({id:`CHfFN_`,values:{0:n.path}}),t[4]=o,t[5]=n.path,t[6]=p):p=t[6];let m;t[7]!==s||t[8]!==r||t[9]!==f||t[10]!==p?(m=(0,D.jsx)(u,{id:s,className:`mt-0.5`,checked:r,onCheckedChange:f,"aria-label":p}),t[7]=s,t[8]=r,t[9]=f,t[10]=p,t[11]=m):m=t[11];let h;t[12]===n.path?h=t[13]:(h=M(n.path),t[12]=n.path,t[13]=h);let g;t[14]===h?g=t[15]:(g=(0,D.jsx)(`span`,{className:`w-full truncate font-medium text-sm`,children:h}),t[14]=h,t[15]=g);let _;t[16]===n.path?_=t[17]:(_=(0,D.jsx)(`span`,{className:`w-full select-text break-words text-muted-foreground text-xs`,children:n.path}),t[16]=n.path,t[17]=_);let v;t[18]!==s||t[19]!==g||t[20]!==_?(v=(0,D.jsxs)(d,{htmlFor:s,className:`min-w-0 flex-col items-start gap-0.5 font-normal`,children:[g,_]}),t[18]=s,t[19]=g,t[20]=_,t[21]=v):v=t[21];let y;t[22]===l?y=t[23]:(y=l!==null&&(0,D.jsx)(`div`,{className:`flex justify-end max-sm:col-start-2 max-sm:justify-start`,children:(0,D.jsx)(N,{status:l})}),t[22]=l,t[23]=y);let b;return t[24]!==m||t[25]!==v||t[26]!==y?(b=(0,D.jsxs)(`div`,{className:`grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-2.5 border-border/60 border-b px-3 py-2.5 last:border-b-0 hover:bg-accent/40 max-sm:grid-cols-[auto_minmax(0,1fr)]`,children:[m,v,y]}),t[24]=m,t[25]=v,t[26]=y,t[27]=b):b=t[27],b}function F(e){let t=(0,w.c)(45),{projects:n,onConfirm:r,onCancel:o}=e,{_:s}=a(),[c,f]=(0,S.useState)(ne),p=(0,S.useId)(),m=(0,S.useId)(),h=(0,S.useId)(),g=n.length>0&&c.size===n.length?!0:c.size>0?`indeterminate`:!1,_;t[0]===n?_=t[1]:(_=e=>f(e?new Set(n.map(I)):new Set),t[0]=n,t[1]=_);let v=_,y,b;t[2]!==o||t[3]!==n?(y=()=>{let e=e=>{if(e.key===`Escape`){o();return}(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`a`&&(e.preventDefault(),f(new Set(n.map(te))))};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},b=[o,n],t[2]=o,t[3]=n,t[4]=y,t[5]=b):(y=t[4],b=t[5]),(0,S.useEffect)(y,b);let x;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,D.jsx)(i,{id:`PrVaZo`}),t[6]=x):x=t[6];let C;t[7]===p?C=t[8]:(C=(0,D.jsx)(`h1`,{id:p,className:`font-medium leading-none text-base`,children:x}),t[7]=p,t[8]=C);let T;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,D.jsx)(i,{id:`keop3U`}),t[9]=T):T=t[9];let E;t[10]===m?E=t[11]:(E=(0,D.jsx)(`p`,{id:m,className:`text-sm text-muted-foreground`,children:T}),t[10]=m,t[11]=E);let O;t[12]!==C||t[13]!==E?(O=(0,D.jsxs)(`header`,{className:`shrink-0 px-6 pt-5 pb-3.5 space-y-4`,children:[C,E]}),t[12]=C,t[13]=E,t[14]=O):O=t[14];let k;t[15]===s?k=t[16]:(k=s({id:`QySH4I`}),t[15]=s,t[16]=k);let A;t[17]!==s||t[18]!==n||t[19]!==h||t[20]!==g||t[21]!==c||t[22]!==v?(A=n.length===0?(0,D.jsx)(`div`,{className:`rounded-lg border border-border p-4`,children:(0,D.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:(0,D.jsx)(i,{id:`bKt9Jk`})})}):(0,D.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-border`,children:[(0,D.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2.5 border-border border-b px-3 py-2.5 bg-muted/30`,children:[(0,D.jsx)(u,{id:h,checked:g,onCheckedChange:e=>v(e===!0)}),(0,D.jsx)(d,{htmlFor:h,className:`flex-1 font-medium text-sm`,children:(0,D.jsx)(i,{id:`wgNoIs`})}),(0,D.jsxs)(`span`,{role:`status`,"aria-label":s({id:`nsUDL8`,values:{0:c.size,1:n.length}}),className:`text-muted-foreground text-xs tabular-nums`,children:[c.size,` / `,n.length]})]}),(0,D.jsx)(`div`,{className:`subtle-scrollbar min-h-0 flex-1 overflow-y-scroll [scrollbar-gutter:stable]`,children:n.map((e,t)=>(0,D.jsx)(P,{project:e,checked:c.has(t),onCheckedChange:e=>{f(n=>{let r=new Set(n);return e?r.add(t):r.delete(t),r})}},e.path))})]}),t[17]=s,t[18]=n,t[19]=h,t[20]=g,t[21]=c,t[22]=v,t[23]=A):A=t[23];let j;t[24]!==A||t[25]!==k?(j=(0,D.jsx)(`section`,{"aria-label":k,className:`flex min-h-0 flex-1 flex-col px-6 py-3.5`,children:A}),t[24]=A,t[25]=k,t[26]=j):j=t[26];let M;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,D.jsx)(i,{id:`dEgA5A`}),t[27]=M):M=t[27];let N;t[28]===o?N=t[29]:(N=(0,D.jsx)(l,{type:`button`,variant:`outline-mono`,autoFocus:!0,onClick:o,children:M}),t[28]=o,t[29]=N);let F;t[30]!==r||t[31]!==c?(F=()=>r([...c].sort(ee)),t[30]=r,t[31]=c,t[32]=F):F=t[32];let L;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,D.jsx)(i,{id:`J7nMqi`}),t[33]=L):L=t[33];let R;t[34]===F?R=t[35]:(R=(0,D.jsx)(l,{type:`button`,variant:`destructive`,onClick:F,children:L}),t[34]=F,t[35]=R);let z;t[36]!==N||t[37]!==R?(z=(0,D.jsxs)(`footer`,{className:`flex items-center justify-end gap-2.5 border-border border-t bg-muted/50 px-6 pt-3.5 pb-4`,children:[N,R]}),t[36]=N,t[37]=R,t[38]=z):z=t[38];let B;return t[39]!==m||t[40]!==j||t[41]!==z||t[42]!==O||t[43]!==p?(B=(0,D.jsxs)(`div`,{role:`dialog`,"aria-labelledby":p,"aria-describedby":m,className:`flex h-dvh flex-col overflow-hidden bg-background text-foreground`,children:[O,j,z]}),t[39]=m,t[40]=j,t[41]=z,t[42]=O,t[43]=p,t[44]=B):B=t[44],B}function ee(e,t){return e-t}function te(e,t){return t}function I(e,t){return t}function ne(){return new Set}function L(){let e=(0,w.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,D.jsx)(_,{"aria-hidden":`true`,className:`mx-auto mb-4 size-8 animate-spin text-primary motion-reduce:animate-none`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,D.jsx)(`h1`,{className:`mb-2 font-medium text-base leading-none`,children:(0,D.jsx)(i,{id:`j2229h`})}),e[1]=n):n=e[1];let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,D.jsx)(`main`,{className:`grid h-dvh place-items-center bg-background text-foreground`,children:(0,D.jsxs)(`div`,{role:`status`,className:`max-w-vw px-7 py-7 text-center`,children:[t,n,(0,D.jsx)(`p`,{className:`text-muted-foreground text-sm leading-relaxed`,children:(0,D.jsx)(i,{id:`kCjkGY`})})]})}),e[2]=r):r=e[2],r}function R(){let{_:e}=a();return{"workflow-fit":e({id:`5vAI6Z`}),"missing-feature":e({id:`cH0dkG`}),"hard-to-start":e({id:`uoJF_D`}),unreliable:e({id:`WGMoTY`}),"switched-tool":e({id:`jO18NZ`}),"one-off":e({id:`S3qu11`}),other:e({id:`aQyGJc`})}}function z(e){let t=(0,w.c)(86),{onSend:n,onSkip:r}=e,{_:o}=a(),s=R(),[c,g]=(0,S.useState)(``),[_,y]=(0,S.useState)(``),[b,C]=(0,S.useState)(!1),[T,E]=(0,S.useState)(``),O=(0,S.useRef)(null),k=(0,S.useId)(),A=(0,S.useId)(),j=(0,S.useId)(),M=(0,S.useId)(),N=(0,S.useId)(),P=(0,S.useId)(),F,ee;t[0]===b?(F=t[1],ee=t[2]):(F=()=>{b&&O.current?.focus()},ee=[b],t[0]=b,t[1]=F,t[2]=ee),(0,S.useEffect)(F,ee);let te;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,D.jsx)(i,{id:`ElyuiT`}),t[3]=te):te=t[3];let I;t[4]===k?I=t[5]:(I=(0,D.jsx)(`h1`,{id:k,className:`font-medium leading-none text-base`,children:te}),t[4]=k,t[5]=I);let ne;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,D.jsx)(i,{id:`ZDOq9A`}),t[6]=ne):ne=t[6];let L;t[7]===A?L=t[8]:(L=(0,D.jsx)(`p`,{id:A,className:`text-muted-foreground text-sm`,children:ne}),t[7]=A,t[8]=L);let z;t[9]!==I||t[10]!==L?(z=(0,D.jsxs)(`header`,{className:`px-6 pt-5 pb-3.5 space-y-4`,children:[I,L]}),t[9]=I,t[10]=L,t[11]=z):z=t[11];let B;t[12]!==T||t[13]!==b||t[14]!==_||t[15]!==n||t[16]!==c?(B=e=>{e.preventDefault();let t=_.trim(),r=b?T.trim():``;n({...c===``?{}:{reason:c},...t===``?{}:{note:t},...r===``?{}:{email:r}})},t[12]=T,t[13]=b,t[14]=_,t[15]=n,t[16]=c,t[17]=B):B=t[17];let re;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,D.jsx)(i,{id:`oxdGJn`}),t[18]=re):re=t[18];let V;t[19]===j?V=t[20]:(V=(0,D.jsx)(`p`,{id:j,className:`mb-2 font-medium text-sm`,children:re}),t[19]=j,t[20]=V);let H;t[21]!==j||t[22]!==s?(H=h.map(e=>(0,D.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-1 py-1`,children:[(0,D.jsx)(f,{id:`${j}-${e.value}`,value:e.value}),(0,D.jsx)(d,{htmlFor:`${j}-${e.value}`,className:`font-normal text-sm leading-snug`,children:s[e.value]})]},e.value)),t[21]=j,t[22]=s,t[23]=H):H=t[23];let U;t[24]!==j||t[25]!==c||t[26]!==H?(U=(0,D.jsx)(p,{"aria-labelledby":j,value:c,onValueChange:g,children:H}),t[24]=j,t[25]=c,t[26]=H,t[27]=U):U=t[27];let W;t[28]!==V||t[29]!==U?(W=(0,D.jsxs)(`div`,{className:`mb-6`,children:[V,U]}),t[28]=V,t[29]=U,t[30]=W):W=t[30];let ie;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,D.jsx)(i,{id:`axQ1h6`}),t[31]=ie):ie=t[31];let G;t[32]===M?G=t[33]:(G=(0,D.jsx)(d,{htmlFor:M,className:`mb-2 font-medium text-sm`,children:ie}),t[32]=M,t[33]=G);let K;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(K=e=>y(e.target.value),t[34]=K):K=t[34];let q;t[35]!==_||t[36]!==M?(q=(0,D.jsx)(x,{id:M,rows:3,maxLength:m,value:_,onChange:K}),t[35]=_,t[36]=M,t[37]=q):q=t[37];let J;t[38]!==G||t[39]!==q?(J=(0,D.jsxs)(`div`,{className:`mb-6`,children:[G,q]}),t[38]=G,t[39]=q,t[40]=J):J=t[40];let ae;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(ae=e=>C(e===!0),t[41]=ae):ae=t[41];let Y;t[42]!==b||t[43]!==N?(Y=(0,D.jsx)(u,{id:N,checked:b,onCheckedChange:ae}),t[42]=b,t[43]=N,t[44]=Y):Y=t[44];let oe;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,D.jsx)(i,{id:`xEb24l`}),t[45]=oe):oe=t[45];let X;t[46]===N?X=t[47]:(X=(0,D.jsx)(d,{htmlFor:N,className:`font-medium text-sm`,children:oe}),t[46]=N,t[47]=X);let Z;t[48]!==Y||t[49]!==X?(Z=(0,D.jsxs)(`div`,{className:`mb-2 flex items-center gap-2.5`,children:[Y,X]}),t[48]=Y,t[49]=X,t[50]=Z):Z=t[50];let se=!b,ce;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,D.jsx)(i,{id:`ATGYL1`}),t[51]=ce):ce=t[51];let Q;t[52]===P?Q=t[53]:(Q=(0,D.jsx)(d,{htmlFor:P,className:`mb-2 font-medium text-sm sr-only`,children:ce}),t[52]=P,t[53]=Q);let le;t[54]===o?le=t[55]:(le=o({id:`JHf6qZ`}),t[54]=o,t[55]=le);let ue=!b,de;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(de=e=>E(e.target.value),t[56]=de):de=t[56];let fe;t[57]!==T||t[58]!==P||t[59]!==le||t[60]!==ue?(fe=(0,D.jsx)(v,{id:P,ref:O,type:`email`,maxLength:320,autoComplete:`email`,spellCheck:!1,placeholder:le,disabled:ue,value:T,onChange:de}),t[57]=T,t[58]=P,t[59]=le,t[60]=ue,t[61]=fe):fe=t[61];let $;t[62]!==se||t[63]!==Q||t[64]!==fe?($=(0,D.jsxs)(`div`,{className:`mb-6`,hidden:se,children:[Q,fe]}),t[62]=se,t[63]=Q,t[64]=fe,t[65]=$):$=t[65];let pe;t[66]!==W||t[67]!==J||t[68]!==Z||t[69]!==$?(pe=(0,D.jsxs)(`div`,{className:`subtle-scrollbar min-h-0 flex-1 overflow-y-auto px-6 pt-1 pb-4`,children:[W,J,Z,$]}),t[66]=W,t[67]=J,t[68]=Z,t[69]=$,t[70]=pe):pe=t[70];let me;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,D.jsx)(i,{id:`6Uau97`}),t[71]=me):me=t[71];let he;t[72]===r?he=t[73]:(he=(0,D.jsx)(l,{type:`button`,variant:`outline-mono`,autoFocus:!0,onClick:r,children:me}),t[72]=r,t[73]=he);let ge;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,D.jsx)(l,{type:`submit`,children:(0,D.jsx)(i,{id:`xMsnTe`})}),t[74]=ge):ge=t[74];let _e;t[75]===he?_e=t[76]:(_e=(0,D.jsxs)(`footer`,{className:`flex items-center justify-end gap-2.5 border-border border-t bg-muted/50 px-6 pt-3.5 pb-4`,children:[he,ge]}),t[75]=he,t[76]=_e);let ve;t[77]!==pe||t[78]!==_e||t[79]!==B?(ve=(0,D.jsxs)(`form`,{className:`flex min-h-0 flex-1 flex-col`,onSubmit:B,children:[pe,_e]}),t[77]=pe,t[78]=_e,t[79]=B,t[80]=ve):ve=t[80];let ye;return t[81]!==A||t[82]!==ve||t[83]!==z||t[84]!==k?(ye=(0,D.jsxs)(`div`,{role:`dialog`,"aria-labelledby":k,"aria-describedby":A,className:`flex h-dvh flex-col bg-background text-foreground`,children:[z,ve]}),t[81]=A,t[82]=ve,t[83]=z,t[84]=k,t[85]=ye):ye=t[85],ye}function B(){let e=(0,w.c)(9),[t,n]=(0,S.useState)(null),r,a;if(e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=!0;return T().then(t=>{e&&n(t)}),()=>{e=!1}},a=[],e[0]=r,e[1]=a):(r=e[0],a=e[1]),(0,S.useEffect)(r,a),t!==null)switch(t.kind){case`picker`:{let n;return e[2]===t.projects?n=e[3]:(n=(0,D.jsx)(F,{projects:t.projects,onConfirm:G,onCancel:ie}),e[2]=t.projects,e[3]=n),n}case`survey`:{let t;return e[4]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,D.jsx)(z,{onSend:W,onSkip:U}),e[4]=t):t=e[4],t}case`progress`:{let t;return e[5]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,D.jsx)(L,{}),e[5]=t):t=e[5],t}case`notice`:{let n;return e[6]===t.notice?n=e[7]:(n=(0,D.jsx)(k,{notice:t.notice,onConfirm:H,onCancel:V,onRevealLog:re}),e[6]=t.notice,e[7]=n),n}default:return t}let o;return e[8]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,D.jsx)(`main`,{className:`flex min-h-dvh items-center justify-center bg-background p-8 text-foreground`,children:(0,D.jsx)(`p`,{className:`text-center text-muted-foreground text-sm`,children:(0,D.jsx)(i,{id:`tzGWeg`})})}),e[8]=o):o=e[8],o}function re(){return E({kind:`notice-reveal-log`})}function V(){return E({kind:`notice-cancel`})}function H(){return E({kind:`notice-confirm`})}function U(){return E({kind:`survey-skip`})}function W(e){return E({kind:`survey-send`,...e})}function ie(){return E({kind:`picker-cancel`})}function G(e){return E({kind:`picker-confirm`,selectedIndexes:e})}var K=document.getElementById(`root`);if(!K)throw Error(`Root element not found`);(0,C.createRoot)(K).render((0,D.jsx)(S.StrictMode,{children:(0,D.jsx)(o,{i18n:y,children:(0,D.jsx)(B,{})})}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{r as t}from"./DocumentContext-WcIs30H8.js";import{t as n}from"./react-f2sANaYj.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{N as i}from"./CodeMirrorPropInput-BqDZpzvH.js";import{a,i as o,yt as s}from"./dist-Cgpf3BIr.js";import{c}from"./documents-events-CtKncdGv.js";import{n as l}from"./agent-presence-CEfNcJUY.js";import{t as u}from"./lru-string-cache-BZxOuxTi.js";var d=r(),f=e(n(),1),p=500,m=64;async function h(e){let t=`/api/agent-activity?agentId=${encodeURIComponent(e)}`,n=await fetch(t),r;try{r=await n.json()}catch(e){throw new i(`Could not parse /api/agent-activity response.`,{cause:e,status:n.status})}if(!n.ok){let e=s.safeParse(r);throw e.success?Error(e.data.title):new i(`/api/agent-activity returned a non-RFC-9457 error response.`,{cause:e.error,status:n.status})}let a=o.safeParse(r);if(!a.success)throw new i(`/api/agent-activity returned a body that did not match AgentActivitySuccessSchema.`,{cause:a.error,status:n.status});return a.data}async function g(e,t,n){let r=`/api/agent-burst-diff?agentId=${encodeURIComponent(e)}&docName=${encodeURIComponent(t)}&keptCount=${n}`,o=await fetch(r),c;try{c=await o.json()}catch(e){throw new i(`Could not parse /api/agent-burst-diff response.`,{cause:e,status:o.status})}if(!o.ok){let e=s.safeParse(c);throw e.success?Error(e.data.title):new i(`/api/agent-burst-diff returned a non-RFC-9457 error response.`,{cause:e.error,status:o.status})}let l=a.safeParse(c);if(!l.success)throw new i(`/api/agent-burst-diff returned a body that did not match AgentBurstDiffSuccessSchema.`,{cause:l.error,status:o.status});let{diff:u,before:d,after:f}=l.data;return{diff:u,before:d,after:f}}function _(e){let n=(0,d.c)(23),{systemProvider:r}=t(),[i,a]=(0,f.useState)(null),[o,s]=(0,f.useState)(`idle`),[l,_]=(0,f.useState)(null),b;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=new u(m),n[0]=b):b=n[0];let x=(0,f.useRef)(b),S=(0,f.useRef)(0),C;n[1]===r?C=n[2]:(C=e=>{let t=S.current+=1;s(`loading`),_(null),h(e).then(n=>{if(S.current!==t)return;let i=y(r,e);a({...n,writingDocs:i}),s(`ready`)}).catch(e=>{S.current===t&&(_(e instanceof Error?e.message:String(e)),s(`error`))})},n[1]=r,n[2]=C);let w=C,T;n[3]!==e||n[4]!==w?(T=()=>{if(!e){S.current+=1,a(null),s(`idle`),_(null),x.current.clear();return}x.current.clear(),w(e);let t=null,n=c(n=>{n.includes(`session-activity`)&&(t&&clearTimeout(t),t=setTimeout(()=>{t=null,w(e)},p))});return()=>{t&&clearTimeout(t),n()}},n[3]=e,n[4]=w,n[5]=T):T=n[5];let E;n[6]===e?E=n[7]:(E=[e],n[6]=e,n[7]=E),(0,f.useEffect)(T,E);let D,O;n[8]!==e||n[9]!==r?(D=()=>{if(!e||!r)return;let t=()=>{if(!r.awareness)return;let t=y(r,e);a(e=>!e||v(e.writingDocs,t)?e:{...e,writingDocs:t})},n=r.awareness;if(!n||typeof n.on!=`function`){t();return}n.on(`update`,t),t();let i=setInterval(t,1e3);return()=>{clearInterval(i),typeof n.off==`function`&&n.off(`update`,t)}},O=[e,r],n[8]=e,n[9]=r,n[10]=D,n[11]=O):(D=n[10],O=n[11]),(0,f.useEffect)(D,O);let k;n[12]===e?k=n[13]:(k=async(t,n)=>{if(!e)return``;let r=`${t}\0${n}`,i=x.current.get(r);if(i!==void 0)return i;let{diff:a}=await g(e,t,n);return x.current.set(r,a),a},n[12]=e,n[13]=k);let A=k,j;n[14]!==e||n[15]!==w?(j=()=>{e&&w(e)},n[14]=e,n[15]=w,n[16]=j):j=n[16];let M=j,N;return n[17]!==i||n[18]!==l||n[19]!==A||n[20]!==M||n[21]!==o?(N={data:i,status:o,error:l,reload:M,fetchBurstDiff:A},n[17]=i,n[18]=l,n[19]=A,n[20]=M,n[21]=o,n[22]=N):N=n[22],N}function v(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function y(e,t){let n=new Set;if(!e)return n;let r=e.awareness;if(!l(r))return n;let i=[t,t.startsWith(`agent-`)?t.slice(6):`agent-${t}`];for(let e of r.getStates().values()){let t=e.agentPresence;if(t)for(let e of i){let r=t[e];r&&r.mode===`writing`&&r.currentDoc&&n.add(r.currentDoc)}}return n}export{_ as n,g as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{La as r,Za as i,g as a,h as o,mt as s}from"./dist-Cgpf3BIr.js";var c=e(t(),1),l=n(),u=new Map(s.map(e=>[e.name,e]));function d(e,t){let n=u.get(e);if(!n)throw Error(`color-themes: ${e} is not a generated base-theme token`);return n[t]}function f(e){return{sidebar:e===`dark`?o:a,background:d(`--background`,e),primary:d(`--primary`,e),border:d(`--border`,e),"syntax-string":d(`--chart-2`,e),"syntax-keyword":d(`--chart-4`,e),"syntax-atom":d(`--chart-3`,e)}}var p=/^#[0-9a-fA-F]{6}$/,m={background:`#0f172a`,surface:`#1e293b`,foreground:`#e2e8f0`,primary:`#6366f1`,accent:`#22d3ee`,border:`#334155`};function h(e){return typeof e==`string`&&p.test(e)}function g(e){let t={...m};if(e)for(let n of Object.keys(m)){let r=e[n];h(r)&&(t[n]=r)}return t}function _(e){let t=h(e)?e:`#000000`,n=e=>{let n=Number.parseInt(t.slice(1+e*2,3+e*2),16)/255;return n<=.03928?n/12.92:((n+.055)/1.055)**2.4};return .2126*n(0)+.7152*n(1)+.0722*n(2)}function v(e){return _(e.background)<.5?`dark`:`light`}function y(e){return _(e)<.5?`#ffffff`:`#0a0a0a`}function b(e){return{bg:e.background,bgElevated:e.surface,bgSubtle:e.surface,fg:e.foreground,fgMuted:`color-mix(in oklab, ${e.foreground} 55%, ${e.background})`,border:e.border,primary:e.primary,primaryFg:y(e.primary),red:`#e5534b`,green:`#3fb950`,yellow:`#d29922`,blue:e.accent,cyan:e.accent,orange:`#db8d3f`,purple:e.accent}}function x(e){let t=r(b(e)),n=Object.entries(t).map(([e,t])=>` --${e}: ${t};`);return`html[data-color-theme="custom"] {\n color-scheme: ${v(e)};\n${n.join(`
|
|
2
|
+
`)}\n}`}var S=`ok-color-theme-v1`,C=`ok-custom-theme-v1`,w=`data-color-theme`,T=`ok-custom-theme`;function E(e){let t=document.getElementById(T);t||(t=document.createElement(`style`),t.id=T,document.head.appendChild(t)),t.textContent!==e&&(t.textContent=e)}function D(){document.getElementById(T)?.remove()}function O(e,t,n=!0){if(typeof document>`u`)return;let r=i(n?e:`default`),a=document.documentElement;r.id===`default`?a.removeAttribute(w):a.setAttribute(w,r.id);let o=null;if(r.id===`custom`){let e=g(t),n=x(e);E(n),o=JSON.stringify({css:n,dark:v(e)===`dark`})}else D();try{r.id===`default`?localStorage.removeItem(S):localStorage.setItem(S,r.id),o?localStorage.setItem(C,o):localStorage.removeItem(C)}catch{}}function k(e,t,n){let r=(0,l.c)(12),i=n===void 0?!0:n,a;r[0]!==e||r[1]!==t||r[2]!==i?(a=i&&e===`custom`?JSON.stringify(t??null):``,r[0]=e,r[1]=t,r[2]=i,r[3]=a):a=r[3];let o=a,s;r[4]!==e||r[5]!==t||r[6]!==i?(s=()=>{O(e,t,i)},r[4]=e,r[5]=t,r[6]=i,r[7]=s):s=r[7];let u;r[8]!==e||r[9]!==i||r[10]!==o?(u=[e,o,i],r[8]=e,r[9]=i,r[10]=o,r[11]=u):u=r[11],(0,c.useEffect)(s,u)}export{v as a,h as c,m as i,g as l,O as n,f as o,k as r,b as s,w as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{d as r,f as i,l as a,m as o,p as s,u as c}from"./dist-
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{d as r,f as i,l as a,m as o,p as s,u as c}from"./dist-Cgpf3BIr.js";var l=e(t(),1),u=n();async function d(e){let t;try{t=await fetch(`/api/config`,{signal:e,headers:{Accept:`application/json`}})}catch(e){if(e.name===`AbortError`)throw e;return{status:`error`,code:`network`}}if(t.status===404||t.status===501)return{status:`absent`};if(!t.ok)return{status:`error`,code:t.status};let n;try{n=await t.json()}catch{return{status:`error`,code:`invalid-body`}}if(typeof n!=`object`||!n||Array.isArray(n))return{status:`error`,code:`invalid-body`};let r=n;return{status:`ok`,config:{collabUrl:typeof r.collabUrl==`string`?r.collabUrl:null,previewUrl:typeof r.previewUrl==`string`?r.previewUrl:null,port:typeof r.port==`number`?r.port:0,singleFile:r.singleFile===!0}}}function f(e){return b(e,i)}function p(e){return b(e,o)}function m(e){return b(e,a)}function h(e){return b(e,r)}function g(e){return b(e,c)}function _(e){let t=b(e,s);if(!t)return null;try{return{docName:t.docName,sv:v(t.sv)}}catch{return null}}function v(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function y(e,t){let n=p(e);if(n){t.onServerInfo?.(n);return}let r=m(e);if(r){t.onBranchSwitched?.(r);return}let i=_(e);if(i){t.onDiskAck?.(i);return}let a=f(e);if(a){t.onDerivedView?.(a);return}let o=h(e);if(o){t.onConfigValidationRejected?.(o);return}let s=g(e);if(s){t.onConfigIgnoreNestedError?.(s);return}t.onUnknown?.(e)}function b(e,t){let n;try{n=JSON.parse(e)}catch{return null}let r=t.safeParse(n);return r.success?r.data:null}function x(){return typeof location>`u`?`ws://localhost/collab`:`${location.protocol===`https:`?`wss`:`ws`}://${location.host}/collab`}function S(e){if(e===void 0)return null;let t=e.okDesktop;return!t||!t.config.collabUrl||t.config.collabUrl.length===0?null:t}function C(e){return{collabUrl:e.collabUrl,attempts:0,terminal:!1,lastError:null}}var w=2e3,T=15e3;function E(e){let t=e.terminalAfterMs??3e4,n=e.initialDelayMs??w,r=e.maxDelayMs??T,i=e.log??{info:console.info,warn:console.warn},a=new AbortController,o=null,s=n,c=0,l=!1,u=!1,d=null,f=e.now(),p=async()=>{c+=1;let n=null;try{let t=await e.fetchConfig(a.signal);t.status===`absent`?(n=e.fallbackUrl(),d=null):t.status===`ok`&&t.config.collabUrl!==null?(n=t.config.collabUrl,d=null):t.status===`ok`?(u||(u=!0,i.info(`[collab-url] ok ui responded but server.lock has no port yet — retrying`)),d={kind:`null-collab`}):t.status===`error`&&(i.warn(`[collab-url] /api/config error (${t.code}) — retrying in ${s}ms`),d={kind:`error`,code:t.code})}catch(e){if(e.name===`AbortError`)return;d={kind:`error`,code:`network`}}if(!l){if(n!==null){e.onStateChange({collabUrl:n,attempts:c,terminal:!1,lastError:null});return}if(e.now()-f>=t){e.onStateChange({collabUrl:null,attempts:c,terminal:!0,lastError:d});return}e.onStateChange({collabUrl:null,attempts:c,terminal:!1,lastError:d}),o=e.setTimeout(()=>{p()},s),s=Math.min(s*2,r)}};return p(),{cancel:()=>{l=!0,a.abort(),o!==null&&(e.clearTimeout(o),o=null)}}}function D(){let e=(0,u.c)(8),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={collabUrl:null,attempts:0,terminal:!1,lastError:null},e[0]=t):t=e[0];let[n,r]=(0,l.useState)(t),i;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i={token:0},e[1]=i):i=e[1];let a=(0,l.useRef)(i),[o,s]=(0,l.useState)(0),c;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=a.current.token=a.current.token+1,t=S(window);if(t){r(C(t.config));let n=t.onProjectSwitched(t=>{e===a.current.token&&r(C(t))});return()=>{n()}}let n=E({fetchConfig:d,fallbackUrl:x,now:Date.now,setTimeout:j,clearTimeout:A,onStateChange:t=>{e===a.current.token&&r(t)}});return()=>{n.cancel()}},e[2]=c):c=e[2];let f;e[3]===o?f=e[4]:(f=[o],e[3]=o,e[4]=f),(0,l.useEffect)(c,f);let p;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>{a.current.token=a.current.token+1,r(k),s(O)},e[5]=p):p=e[5];let m=p,h;return e[6]===n?h=e[7]:(h={...n,retry:m},e[6]=n,e[7]=h),h}function O(e){return e+1}function k(e){return{...e,terminal:!1,lastError:null}}function A(e){return globalThis.clearTimeout(e)}function j(e,t){return globalThis.setTimeout(e,t)}export{d as i,D as n,y as r,S as t};
|
package/dist/public/assets/{use-live-xterm-theme-C-fHLeXw.js → use-live-xterm-theme-w8QeNUlq.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{t as r}from"./use-apply-config-color-theme-
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{t as r}from"./use-apply-config-color-theme-A0jx7vnI.js";var i=e(t(),1),a=n(),o={background:`#171717`,foreground:`#e5e5e5`,cursor:`#e5e5e5`,cursorAccent:`#171717`,selectionBackground:`#3a3d41`,black:`#000000`,red:`#cd3131`,green:`#0dbc79`,yellow:`#e5e510`,blue:`#2472c8`,magenta:`#bc3fbc`,cyan:`#11a8cd`,white:`#e5e5e5`,brightBlack:`#666666`,brightRed:`#f14c4c`,brightGreen:`#23d18b`,brightYellow:`#f5f543`,brightBlue:`#3b8eea`,brightMagenta:`#d670d6`,brightCyan:`#29b8db`,brightWhite:`#ffffff`},s={background:`#ffffff`,foreground:`#262626`,cursor:`#262626`,cursorAccent:`#ffffff`,selectionBackground:`#add6ff`,black:`#000000`,red:`#cd3131`,green:`#00bc00`,yellow:`#949800`,blue:`#0451a5`,magenta:`#bc05bc`,cyan:`#0598bc`,white:`#555555`,brightBlack:`#666666`,brightRed:`#cd3131`,brightGreen:`#14ce14`,brightYellow:`#b5ba00`,brightBlue:`#0451a5`,brightMagenta:`#bc05bc`,brightCyan:`#0598bc`,brightWhite:`#a5a5a5`};function c(e){return e===`dark`?o:s}function l(e){try{let t=document.createElement(`span`);t.style.display=`none`,t.style.backgroundColor=`var(${e})`,document.body.appendChild(t);try{let e=getComputedStyle(t).backgroundColor;return!e||e===`rgba(0, 0, 0, 0)`||e===`transparent`||e.includes(`var(`)?null:e}finally{t.remove()}}catch{return null}}function u(e,t=l){let n=c(e),r=t(`--background`)??n.background,i=t(`--foreground`)??n.foreground;return{...n,background:r,foreground:i,cursor:i,cursorAccent:r,selectionBackground:t(`--selection-soft`)??n.selectionBackground}}function d(e,t){let n=new Set([...Object.keys(e),...Object.keys(t)]);for(let r of n)if(e[r]!==t[r])return!1;return!0}function f(e){let t=(0,a.c)(5),n;t[0]===e?n=t[1]:(n=()=>u(e),t[0]=e,t[1]=n);let[o,s]=(0,i.useState)(n),c,l;return t[2]===e?(c=t[3],l=t[4]):(c=()=>{let t=()=>{let t=u(e);s(e=>d(e,t)?e:t)};t();let n=new MutationObserver(t);return n.observe(document.documentElement,{attributes:!0,attributeFilter:[r,`class`]}),n.observe(document.head,{childList:!0,subtree:!0,characterData:!0}),()=>n.disconnect()},l=[e],t[2]=e,t[3]=c,t[4]=l),(0,i.useEffect)(c,l),o}export{f as t};
|
package/dist/public/assets/{use-settings-route-CXFzIfYo.js → use-settings-route-CFvCFlXS.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{Hi as r}from"./dist-Cal4LUep.js";var i=e(t(),1),a=n(),o={general:{id:`Weq9zb`},workspace:{id:`pmUArF`},search:{id:`A1taO8`},wysiwyg:{id:`ur2XSb`},source:{id:`tiWX6q`},navigation:{id:`LXfNU-`}},s=Object.keys(o),c=[{id:`command-palette`,category:`general`,title:{id:`ZjtgI-`},description:{id:`OFBmkg`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0}}]},{id:`settings`,category:`general`,title:{id:`Tz0i8g`},description:{id:`6m_7We`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ ,`,windowsLinux:`Ctrl ,`,match:{key:`,`,anyMod:!0}}]},{id:`new-item`,category:`general`,title:{id:`HdkSiO`},description:{id:`KkEAud`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ N`,windowsLinux:`Ctrl N`,match:{key:`n`,mod:!0}},{mac:`⌥⌘ N`,windowsLinux:`Ctrl Alt N`,match:{key:`n`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`new-folder`,category:`general`,title:{id:`96G6Re`},description:{id:`3cOo2C`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ N`,windowsLinux:`Ctrl Shift N`}]},{id:`toggle-files-sidebar`,category:`general`,title:{id:`rtdR4v`},description:{id:`EbZT7P`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ S`,windowsLinux:`Ctrl Alt S`,match:{code:`KeyS`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-document-panel`,category:`general`,title:{id:`lkYioO`},description:{id:`It9ARY`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ B`,windowsLinux:`Ctrl Alt B`,match:{code:`KeyB`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-terminal-panel`,category:`general`,title:{id:`dPOFid`},description:{id:`l9HUtd`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ J`,windowsLinux:`Ctrl J`,match:{key:`j`,mod:!0}}]},{id:`open-ask-ai`,category:`general`,title:{id:`xWEvuo`},description:{id:`5OTgC7`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ L`,windowsLinux:`Ctrl L`,match:{key:`l`,mod:!0}}]},{id:`new-terminal-tab`,category:`general`,title:{id:`YkvmF4`},description:{id:`j2kt1j`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ J`,windowsLinux:`Ctrl Shift J`,match:{key:`j`,mod:!0,shiftKey:!0}}]},{id:`navigate-back`,category:`navigation`,title:{id:`iH8pgl`},description:{id:`cjtjry`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ [`,windowsLinux:`Alt ←`}]},{id:`navigate-forward`,category:`navigation`,title:{id:`rxWGWX`},description:{id:`XK5cbh`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ ]`,windowsLinux:`Alt →`}]},{id:`tab-new`,category:`navigation`,title:{id:`3YvS-c`},description:{id:`t6w1cq`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ T`,windowsLinux:`Ctrl T`,match:{key:`t`,mod:!0}}]},{id:`tab-next`,category:`navigation`,title:{id:`l46MqT`},description:{id:`thnPBX`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌃ Tab`,windowsLinux:`Ctrl Tab`,match:{key:`Tab`,ctrlKey:!0}}]},{id:`tab-previous`,category:`navigation`,title:{id:`Mh_4hd`},description:{id:`DJd000`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌃⇧ Tab`,windowsLinux:`Ctrl Shift Tab`,match:{key:`Tab`,ctrlKey:!0,shiftKey:!0}}]},{id:`tab-jump`,category:`navigation`,title:{id:`_6FVBz`},description:{id:`wGSHzy`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ 1-8`,windowsLinux:`Ctrl 1-8`}]},{id:`tab-jump-last`,category:`navigation`,title:{id:`N1KkEO`},description:{id:`ZQJ1IV`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ 9`,windowsLinux:`Ctrl 9`}]},{id:`tab-reopen-closed`,category:`navigation`,title:{id:`hpzRlK`},description:{id:`E5WeIy`},scope:{id:`2GT3Hf`},bindings:[{mac:`⇧⌘ T`,windowsLinux:`Ctrl Shift T`,match:{key:`t`,mod:!0,shiftKey:!0}}]},{id:`open-folder`,category:`workspace`,title:{id:`PVUn_c`},description:{id:`VYd_YA`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ O`,windowsLinux:`Ctrl O`}]},{id:`open-file`,category:`workspace`,title:{id:`9npOH9`},description:{id:`H08D2X`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ O`,windowsLinux:`Ctrl Shift O`}]},{id:`switch-project`,category:`workspace`,title:{id:`xaDWAI`},description:{id:`oS1YpJ`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ P`,windowsLinux:`Ctrl Shift P`}]},{id:`file-tree-copy`,category:`workspace`,title:{id:`eGUbmF`},description:{id:`7uBlRT`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ C`,windowsLinux:`Ctrl C`}]},{id:`file-tree-paste`,category:`workspace`,title:{id:`_tjopj`},description:{id:`e4PbgC`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ V`,windowsLinux:`Ctrl V`}]},{id:`file-tree-duplicate`,category:`workspace`,title:{id:`ot5BRK`},description:{id:`mxY24F`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`file-tree-delete`,category:`workspace`,title:{id:`VxO6wR`},description:{id:`osRqlv`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ Backspace`,windowsLinux:`Delete`}]},{id:`file-tree-select-all`,category:`workspace`,title:{id:`1d1F11`},description:{id:`4v2Yyz`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`find`,category:`search`,title:{id:`KujtjC`},description:{id:`8OGgNM`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`,match:{key:`f`,mod:!0,allowShiftKey:!0}}]},{id:`replace`,category:`search`,title:{id:`fqSfXY`},description:{id:`wT4iQr`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ F`,windowsLinux:`Ctrl H`,match:{mac:{key:`f`,mod:!0,altKey:!0},windowsLinux:{key:`h`,mod:!0}}}]},{id:`find-next`,category:`search`,title:{id:`v7lbnC`},description:{id:`PR9FSv`},scope:{id:`EqtBXb`},bindings:[{mac:`⌘ G`,windowsLinux:`Ctrl G`,match:{key:`g`,mod:!0}},{mac:`F3`,windowsLinux:`F3`,match:{key:`F3`}}]},{id:`find-previous`,category:`search`,title:{id:`PB4upl`},description:{id:`PgzIpb`},scope:{id:`EqtBXb`},bindings:[{mac:`⇧⌘ G`,windowsLinux:`Ctrl Shift G`,match:{key:`g`,mod:!0,shiftKey:!0}},{mac:`Shift F3`,windowsLinux:`Shift F3`,match:{key:`F3`,shiftKey:!0}}]},{id:`find-field-navigation`,category:`search`,title:{id:`yMgL_E`},description:{id:`5ALjdr`},scope:{id:`BgV29F`},bindings:[{mac:`Enter / Shift Enter`,windowsLinux:`Enter / Shift Enter`}]},{id:`replace-current-from-field`,category:`search`,title:{id:`LDuM35`},description:{id:`EZVxVz`},scope:{id:`rZVMkf`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`format-bold`,category:`wysiwyg`,title:{id:`KmydK6`},description:{id:`fbdLmk`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ B`,windowsLinux:`Ctrl B`}]},{id:`format-italic`,category:`wysiwyg`,title:{id:`pzutoc`},description:{id:`TLIO3j`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ I`,windowsLinux:`Ctrl I`}]},{id:`format-underline`,category:`wysiwyg`,title:{id:`YyXtnN`},description:{id:`Okd2Xv`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ U`,windowsLinux:`Ctrl U`}]},{id:`format-strike`,category:`wysiwyg`,title:{id:`WhOsNE`},description:{id:`HCn0Ay`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ X`,windowsLinux:`Ctrl Shift X`}]},{id:`format-inline-code`,category:`wysiwyg`,title:{id:`OX2Neh`},description:{id:`mo22UP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ E`,windowsLinux:`Ctrl E`}]},{id:`format-highlight`,category:`wysiwyg`,title:{id:`gtEbeW`},description:{id:`Eji13z`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ H`,windowsLinux:`Ctrl Shift H`}]},{id:`add-link`,category:`wysiwyg`,title:{id:`VzGJRl`},description:{id:`u7U_Ij`},scope:{id:`v77jrg`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0}}]},{id:`edit-with-ai`,category:`general`,title:{id:`G4-bgo`},description:{id:`a3H_MR`},scope:{id:`C62P6b`},bindings:[{mac:`⇧⌘ I`,windowsLinux:`Ctrl Shift I`,match:{key:`i`,mod:!0,shiftKey:!0}}]},{id:`history-undo-redo`,category:`wysiwyg`,title:{id:`i9OyGp`},description:{id:`lbkOif`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z / ⌘ Y`,windowsLinux:`Ctrl Shift Z / Ctrl Y`}]},{id:`heading-paragraph`,category:`wysiwyg`,title:{id:`bkQRMh`},description:{id:`rgPqOw`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 0`,windowsLinux:`Ctrl Alt 0`}]},{id:`heading-levels`,category:`wysiwyg`,title:{id:`q_z77Z`},description:{id:`8Jm2EP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 1-6`,windowsLinux:`Ctrl Alt 1-6`}]},{id:`list-bullet`,category:`wysiwyg`,title:{id:`ijLc3m`},description:{id:`By-7Pn`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 8`,windowsLinux:`Ctrl Shift 8`}]},{id:`list-ordered`,category:`wysiwyg`,title:{id:`iSQTsg`},description:{id:`ou1hFW`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 7`,windowsLinux:`Ctrl Shift 7`}]},{id:`list-task`,category:`wysiwyg`,title:{id:`E1_c72`},description:{id:`-slrNR`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 9`,windowsLinux:`Ctrl Shift 9`}]},{id:`code-block`,category:`wysiwyg`,title:{id:`4A3Yzu`},description:{id:`pTPqMK`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ C`,windowsLinux:`Ctrl Alt C`}]},{id:`hard-break`,category:`wysiwyg`,title:{id:`-3ois8`},description:{id:`vDXqVv`},scope:{id:`ur2XSb`},bindings:[{mac:`Shift Enter`,windowsLinux:`Shift Enter`},{mac:`⌘ Enter`,windowsLinux:`Ctrl Enter`}]},{id:`move-block`,category:`wysiwyg`,title:{id:`f1XQyZ`},description:{id:`zQBg2C`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ ↑`,windowsLinux:`Ctrl Shift ↑`},{mac:`⇧⌘ ↓`,windowsLinux:`Ctrl Shift ↓`}]},{id:`list-indent`,category:`wysiwyg`,title:{id:`G0YZ-I`},description:{id:`5GKMSz`},scope:{id:`ynIa4S`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`list-split-item`,category:`wysiwyg`,title:{id:`neRy3o`},description:{id:`NpC29w`},scope:{id:`ynIa4S`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`table-cell-navigation`,category:`wysiwyg`,title:{id:`K8-WWn`},description:{id:`4NC2Ym`},scope:{id:`l1aQKz`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`table-delete-selection`,category:`wysiwyg`,title:{id:`881Uwh`},description:{id:`YEP3X2`},scope:{id:`99eR72`},bindings:[{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌘ Backspace / ⌘ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`}]},{id:`delete-atom`,category:`wysiwyg`,title:{id:`636K3K`},description:{id:`oXKEsy`},scope:{id:`ur2XSb`},bindings:[{mac:`Backspace`,windowsLinux:`Backspace`},{mac:`Delete`,windowsLinux:`Delete`}]},{id:`slash-menu`,category:`navigation`,title:{id:`shNd9t`},description:{id:`8PmoQF`},scope:{id:`ur2XSb`},bindings:[{mac:`/`,windowsLinux:`/`}]},{id:`suggestion-navigation`,category:`navigation`,title:{id:`riqekz`},description:{id:`OiHJdA`},scope:{id:`y5FUYi`},bindings:[{mac:`↑ / ↓`,windowsLinux:`↑ / ↓`},{mac:`Enter / Tab`,windowsLinux:`Enter / Tab`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`component-navigation`,category:`navigation`,title:{id:`rwrPbS`},description:{id:`0s8-e8`},scope:{id:`ur2XSb`},bindings:[{mac:`↑ / ↓ / ← / →`,windowsLinux:`↑ / ↓ / ← / →`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-indent`,category:`source`,title:{id:`fwhX-N`},description:{id:`skf5Ix`},scope:{id:`tiWX6q`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`source-navigation`,category:`source`,title:{id:`qSKu2v`},description:{id:`gITz7o`},scope:{id:`tiWX6q`},bindings:[{mac:`Arrow keys / Option Arrow / Command Arrow`,windowsLinux:`Arrow keys / Ctrl Arrow / Home / End`},{mac:`Page Up / Page Down`,windowsLinux:`Page Up / Page Down`},{mac:`Shift with movement keys`,windowsLinux:`Shift with movement keys`}]},{id:`source-editing`,category:`source`,title:{id:`pFagOn`},description:{id:`MGb89P`},scope:{id:`tiWX6q`},bindings:[{mac:`Enter / Shift Enter / ⌘ Enter`,windowsLinux:`Enter / Shift Enter / Ctrl Enter`},{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌥ Backspace / ⌥ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`},{mac:`⌥ ↑ / ⌥ ↓`,windowsLinux:`Alt ↑ / Alt ↓`},{mac:`⇧⌥ ↑ / ⇧⌥ ↓`,windowsLinux:`Shift Alt ↑ / Shift Alt ↓`},{mac:`⇧⌘ K`,windowsLinux:`Ctrl Shift K`}]},{id:`source-history`,category:`source`,title:{id:`4Sxexw`},description:{id:`r2huLx`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z`,windowsLinux:`Ctrl Y / Ctrl Shift Z`},{mac:`⌘ U / ⇧⌘ U`,windowsLinux:`Ctrl U / Alt U`}]},{id:`source-select-all`,category:`source`,title:{id:`a-cKXz`},description:{id:`UTNVyS`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`source-multi-cursor`,category:`source`,title:{id:`mg0YGL`},description:{id:`lWNpNB`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ ↑ / ⌥⌘ ↓`,windowsLinux:`Ctrl Alt ↑ / Ctrl Alt ↓`},{mac:`⇧⌘ L`,windowsLinux:`Ctrl Shift L`}]},{id:`source-search`,category:`source`,title:{id:`7OhaRy`},description:{id:`mwMF9u`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`}]},{id:`source-toggle-comment`,category:`source`,title:{id:`RfaEio`},description:{id:`MrwYIK`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ /`,windowsLinux:`Ctrl /`},{mac:`Shift Alt A`,windowsLinux:`Shift Alt A`}]},{id:`source-select-next-occurrence`,category:`source`,title:{id:`hY8pka`},description:{id:`XnlF3W`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`source-goto-line`,category:`source`,title:{id:`7FamGZ`},description:{id:`yHikCO`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ G`,windowsLinux:`Ctrl Alt G`}]},{id:`source-find-results`,category:`source`,title:{id:`rJVoVX`},description:{id:`TwYboS`},scope:{id:`qyLmWw`},bindings:[{mac:`⌘ G / ⇧⌘ G`,windowsLinux:`Ctrl G / Ctrl Shift G`},{mac:`F3 / Shift F3`,windowsLinux:`F3 / Shift F3`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`source-folding`,category:`source`,title:{id:`bcjYUA`},description:{id:`VZGh8G`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ [ / ⌥⌘ ]`,windowsLinux:`Ctrl Shift [ / Ctrl Shift ]`},{mac:`Ctrl Alt [ / Ctrl Alt ]`,windowsLinux:`Ctrl Alt [ / Ctrl Alt ]`}]},{id:`source-completion`,category:`source`,title:{id:`VuxVSP`},description:{id:`Ehkru0`},scope:{id:`tiWX6q`},bindings:[{mac:`Ctrl Space`,windowsLinux:`Ctrl Space`},{mac:"⌥ ` / ⌥ I",windowsLinux:`Ctrl Space`},{mac:`↑ / ↓ / Page Up / Page Down`,windowsLinux:`↑ / ↓ / Page Up / Page Down`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-tab-focus-mode`,category:`source`,title:{id:`eG8Jsg`},description:{id:`qRZh7J`},scope:{id:`tiWX6q`},bindings:[{mac:`Shift Alt M`,windowsLinux:`Ctrl M`}]},{id:`source-lint-panel`,category:`source`,title:{id:`yvG-l1`},description:{id:`kCqCyf`},scope:{id:`tiWX6q`},bindings:[{mac:`⇧⌘ M`,windowsLinux:`Ctrl Shift M`}]},{id:`source-next-diagnostic`,category:`source`,title:{id:`M1OfV9`},description:{id:`ExPiRQ`},scope:{id:`tiWX6q`},bindings:[{mac:`F8`,windowsLinux:`F8`}]}],l=c,u=new Map(c.map(e=>[e.id,e]));function d(e){let t=u.get(e);if(!t)throw Error(`Unknown keyboard shortcut: ${e}`);return t}function f(){return r()?`mac`:`windowsLinux`}var p=[[/⌘/g,` Command `],[/⌥/g,` Option `],[/⇧/g,` Shift `],[/⌃/g,` Control `],[/↑/g,` Up Arrow `],[/↓/g,` Down Arrow `],[/←/g,` Left Arrow `],[/→/g,` Right Arrow `],[/\[/g,` Left Bracket `],[/\]/g,` Right Bracket `],[/,/g,` Comma `],[/\bCtrl\b/g,` Control `]];function m(e){return e.split(` / `).map(e=>p.reduce((e,[t,n])=>e.replace(t,n),e).replaceAll(/\s+/g,` `).trim()).join(` or `)}function h(e,t=f()){return t===`mac`?e.mac:e.windowsLinux}function g(e,t=f()){return m(h(e,t))}function _(e,t=f()){return h(d(e).bindings[0],t)}function v(e,t=f()){return g(d(e).bindings[0],t)}function y(e){if(!e||typeof e!=`object`)return!1;if(`isContentEditable`in e&&e.isContentEditable===!0)return!0;if(!(`tagName`in e))return!1;let t=String(e.tagName).toUpperCase();return t===`INPUT`||t===`TEXTAREA`}function b(e,t,n=f()){return d(t).bindings.some(t=>{let r=x(t.match,n);return r?C(e,r,n):!1})}function x(e,t){return e?S(e)?e:e[t]??null:null}function S(e){return`key`in e||`code`in e}function C(e,t,n){if(t.key&&e.key.toLowerCase()!==t.key.toLowerCase()||t.code&&e.code!==t.code)return!1;let r=t.metaKey??(t.mod?n===`mac`:!1),i=t.ctrlKey??(t.mod?n===`windowsLinux`:!1),a=t.altKey??!1,o=t.shiftKey??!1;return t.allowExtraModifiers?!(t.anyMod&&!e.metaKey&&!e.ctrlKey||r&&!e.metaKey||i&&!e.ctrlKey||a&&!e.altKey||o&&!e.shiftKey):(t.anyMod?e.metaKey||e.ctrlKey:e.metaKey===r&&e.ctrlKey===i)&&e.altKey===a&&(t.allowShiftKey||!!e.shiftKey===o)}var w=`#settings`;function T(e){return`#settings/${e}`}var E=`configure-agents`;function D(){if(typeof window>`u`)return;let e=T(E);window.location.hash!==e&&(window.location.hash=e)}var O=`plugins-manage`;function k(){if(typeof window>`u`)return;let e=T(O);window.location.hash!==e&&(window.location.hash=e)}function A(e){return y(e.target)?!1:b(e,`settings`)}function j(e){let t=e.replace(/^#/,``);return t===`settings`?!0:t.startsWith(`settings/`)&&t.length>9}function M(e){let t=e.replace(/^#/,``);if(!t.startsWith(`settings/`))return null;let n=t.slice(9);return n.length>0?n:null}function N(){return typeof window>`u`?``:window.location.hash}function P(){let e=(0,a.c)(5),[t,n]=(0,i.useState)(L),[r,o]=(0,i.useState)(I),s,c;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=()=>{(0,i.startTransition)(()=>{let e=N();n(j(e)),o(M(e))})};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},c=[],e[0]=s,e[1]=c):(s=e[0],c=e[1]),(0,i.useEffect)(s,c);let l=F,u;return e[2]!==t||e[3]!==r?(u={open:t,section:r,close:l},e[2]=t,e[3]=r,e[4]=u):u=e[4],u}function F(){typeof window>`u`||j(N())&&window.history.back()}function I(){return M(N())}function L(){return j(N())}export{k as a,o as c,h as d,g as f,b as g,y as h,D as i,s as l,m,j as n,P as o,v as p,A as r,l as s,w as t,_ as u};
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{Ki as r}from"./dist-Cgpf3BIr.js";var i=e(t(),1),a=n(),o={general:{id:`Weq9zb`},workspace:{id:`pmUArF`},search:{id:`A1taO8`},wysiwyg:{id:`ur2XSb`},source:{id:`tiWX6q`},navigation:{id:`LXfNU-`}},s=Object.keys(o),c=[{id:`command-palette`,category:`general`,title:{id:`ZjtgI-`},description:{id:`OFBmkg`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0}}]},{id:`settings`,category:`general`,title:{id:`Tz0i8g`},description:{id:`6m_7We`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ ,`,windowsLinux:`Ctrl ,`,match:{key:`,`,anyMod:!0}}]},{id:`new-item`,category:`general`,title:{id:`HdkSiO`},description:{id:`KkEAud`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ N`,windowsLinux:`Ctrl N`,match:{key:`n`,mod:!0}},{mac:`⌥⌘ N`,windowsLinux:`Ctrl Alt N`,match:{key:`n`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`new-folder`,category:`general`,title:{id:`96G6Re`},description:{id:`3cOo2C`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ N`,windowsLinux:`Ctrl Shift N`}]},{id:`toggle-files-sidebar`,category:`general`,title:{id:`rtdR4v`},description:{id:`EbZT7P`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ S`,windowsLinux:`Ctrl Alt S`,match:{code:`KeyS`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-document-panel`,category:`general`,title:{id:`lkYioO`},description:{id:`It9ARY`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ B`,windowsLinux:`Ctrl Alt B`,match:{code:`KeyB`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-terminal-panel`,category:`general`,title:{id:`dPOFid`},description:{id:`l9HUtd`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ J`,windowsLinux:`Ctrl J`,match:{key:`j`,mod:!0}}]},{id:`open-ask-ai`,category:`general`,title:{id:`xWEvuo`},description:{id:`5OTgC7`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ L`,windowsLinux:`Ctrl L`,match:{key:`l`,mod:!0}}]},{id:`new-terminal-tab`,category:`general`,title:{id:`YkvmF4`},description:{id:`j2kt1j`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ J`,windowsLinux:`Ctrl Shift J`,match:{key:`j`,mod:!0,shiftKey:!0}}]},{id:`navigate-back`,category:`navigation`,title:{id:`iH8pgl`},description:{id:`cjtjry`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ [`,windowsLinux:`Alt ←`}]},{id:`navigate-forward`,category:`navigation`,title:{id:`rxWGWX`},description:{id:`XK5cbh`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ ]`,windowsLinux:`Alt →`}]},{id:`tab-new`,category:`navigation`,title:{id:`3YvS-c`},description:{id:`t6w1cq`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ T`,windowsLinux:`Ctrl T`,match:{key:`t`,mod:!0}}]},{id:`tab-next`,category:`navigation`,title:{id:`l46MqT`},description:{id:`thnPBX`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌃ Tab`,windowsLinux:`Ctrl Tab`,match:{key:`Tab`,ctrlKey:!0}}]},{id:`tab-previous`,category:`navigation`,title:{id:`Mh_4hd`},description:{id:`DJd000`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌃⇧ Tab`,windowsLinux:`Ctrl Shift Tab`,match:{key:`Tab`,ctrlKey:!0,shiftKey:!0}}]},{id:`tab-jump`,category:`navigation`,title:{id:`_6FVBz`},description:{id:`wGSHzy`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ 1-8`,windowsLinux:`Ctrl 1-8`}]},{id:`tab-jump-last`,category:`navigation`,title:{id:`N1KkEO`},description:{id:`ZQJ1IV`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ 9`,windowsLinux:`Ctrl 9`}]},{id:`tab-reopen-closed`,category:`navigation`,title:{id:`hpzRlK`},description:{id:`E5WeIy`},scope:{id:`2GT3Hf`},bindings:[{mac:`⇧⌘ T`,windowsLinux:`Ctrl Shift T`,match:{key:`t`,mod:!0,shiftKey:!0}}]},{id:`open-folder`,category:`workspace`,title:{id:`PVUn_c`},description:{id:`VYd_YA`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ O`,windowsLinux:`Ctrl O`}]},{id:`open-file`,category:`workspace`,title:{id:`9npOH9`},description:{id:`H08D2X`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ O`,windowsLinux:`Ctrl Shift O`}]},{id:`switch-project`,category:`workspace`,title:{id:`xaDWAI`},description:{id:`oS1YpJ`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ P`,windowsLinux:`Ctrl Shift P`}]},{id:`file-tree-copy`,category:`workspace`,title:{id:`eGUbmF`},description:{id:`7uBlRT`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ C`,windowsLinux:`Ctrl C`}]},{id:`file-tree-paste`,category:`workspace`,title:{id:`_tjopj`},description:{id:`e4PbgC`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ V`,windowsLinux:`Ctrl V`}]},{id:`file-tree-duplicate`,category:`workspace`,title:{id:`ot5BRK`},description:{id:`mxY24F`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`file-tree-delete`,category:`workspace`,title:{id:`VxO6wR`},description:{id:`osRqlv`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ Backspace`,windowsLinux:`Delete`}]},{id:`file-tree-select-all`,category:`workspace`,title:{id:`1d1F11`},description:{id:`4v2Yyz`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`find`,category:`search`,title:{id:`KujtjC`},description:{id:`8OGgNM`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`,match:{key:`f`,mod:!0,allowShiftKey:!0}}]},{id:`replace`,category:`search`,title:{id:`fqSfXY`},description:{id:`wT4iQr`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ F`,windowsLinux:`Ctrl H`,match:{mac:{key:`f`,mod:!0,altKey:!0},windowsLinux:{key:`h`,mod:!0}}}]},{id:`find-next`,category:`search`,title:{id:`v7lbnC`},description:{id:`PR9FSv`},scope:{id:`EqtBXb`},bindings:[{mac:`⌘ G`,windowsLinux:`Ctrl G`,match:{key:`g`,mod:!0}},{mac:`F3`,windowsLinux:`F3`,match:{key:`F3`}}]},{id:`find-previous`,category:`search`,title:{id:`PB4upl`},description:{id:`PgzIpb`},scope:{id:`EqtBXb`},bindings:[{mac:`⇧⌘ G`,windowsLinux:`Ctrl Shift G`,match:{key:`g`,mod:!0,shiftKey:!0}},{mac:`Shift F3`,windowsLinux:`Shift F3`,match:{key:`F3`,shiftKey:!0}}]},{id:`find-field-navigation`,category:`search`,title:{id:`yMgL_E`},description:{id:`5ALjdr`},scope:{id:`BgV29F`},bindings:[{mac:`Enter / Shift Enter`,windowsLinux:`Enter / Shift Enter`}]},{id:`replace-current-from-field`,category:`search`,title:{id:`LDuM35`},description:{id:`EZVxVz`},scope:{id:`rZVMkf`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`format-bold`,category:`wysiwyg`,title:{id:`KmydK6`},description:{id:`fbdLmk`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ B`,windowsLinux:`Ctrl B`}]},{id:`format-italic`,category:`wysiwyg`,title:{id:`pzutoc`},description:{id:`TLIO3j`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ I`,windowsLinux:`Ctrl I`}]},{id:`format-underline`,category:`wysiwyg`,title:{id:`YyXtnN`},description:{id:`Okd2Xv`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ U`,windowsLinux:`Ctrl U`}]},{id:`format-strike`,category:`wysiwyg`,title:{id:`WhOsNE`},description:{id:`HCn0Ay`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ X`,windowsLinux:`Ctrl Shift X`}]},{id:`format-inline-code`,category:`wysiwyg`,title:{id:`OX2Neh`},description:{id:`mo22UP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ E`,windowsLinux:`Ctrl E`}]},{id:`format-highlight`,category:`wysiwyg`,title:{id:`gtEbeW`},description:{id:`Eji13z`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ H`,windowsLinux:`Ctrl Shift H`}]},{id:`add-link`,category:`wysiwyg`,title:{id:`VzGJRl`},description:{id:`u7U_Ij`},scope:{id:`v77jrg`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0}}]},{id:`edit-with-ai`,category:`general`,title:{id:`G4-bgo`},description:{id:`a3H_MR`},scope:{id:`C62P6b`},bindings:[{mac:`⇧⌘ I`,windowsLinux:`Ctrl Shift I`,match:{key:`i`,mod:!0,shiftKey:!0}}]},{id:`history-undo-redo`,category:`wysiwyg`,title:{id:`i9OyGp`},description:{id:`lbkOif`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z / ⌘ Y`,windowsLinux:`Ctrl Shift Z / Ctrl Y`}]},{id:`heading-paragraph`,category:`wysiwyg`,title:{id:`bkQRMh`},description:{id:`rgPqOw`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 0`,windowsLinux:`Ctrl Alt 0`}]},{id:`heading-levels`,category:`wysiwyg`,title:{id:`q_z77Z`},description:{id:`8Jm2EP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 1-6`,windowsLinux:`Ctrl Alt 1-6`}]},{id:`list-bullet`,category:`wysiwyg`,title:{id:`ijLc3m`},description:{id:`By-7Pn`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 8`,windowsLinux:`Ctrl Shift 8`}]},{id:`list-ordered`,category:`wysiwyg`,title:{id:`iSQTsg`},description:{id:`ou1hFW`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 7`,windowsLinux:`Ctrl Shift 7`}]},{id:`list-task`,category:`wysiwyg`,title:{id:`E1_c72`},description:{id:`-slrNR`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 9`,windowsLinux:`Ctrl Shift 9`}]},{id:`code-block`,category:`wysiwyg`,title:{id:`4A3Yzu`},description:{id:`pTPqMK`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ C`,windowsLinux:`Ctrl Alt C`}]},{id:`hard-break`,category:`wysiwyg`,title:{id:`-3ois8`},description:{id:`vDXqVv`},scope:{id:`ur2XSb`},bindings:[{mac:`Shift Enter`,windowsLinux:`Shift Enter`},{mac:`⌘ Enter`,windowsLinux:`Ctrl Enter`}]},{id:`move-block`,category:`wysiwyg`,title:{id:`f1XQyZ`},description:{id:`zQBg2C`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ ↑`,windowsLinux:`Ctrl Shift ↑`},{mac:`⇧⌘ ↓`,windowsLinux:`Ctrl Shift ↓`}]},{id:`list-indent`,category:`wysiwyg`,title:{id:`G0YZ-I`},description:{id:`5GKMSz`},scope:{id:`ynIa4S`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`list-split-item`,category:`wysiwyg`,title:{id:`neRy3o`},description:{id:`NpC29w`},scope:{id:`ynIa4S`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`table-cell-navigation`,category:`wysiwyg`,title:{id:`K8-WWn`},description:{id:`4NC2Ym`},scope:{id:`l1aQKz`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`table-delete-selection`,category:`wysiwyg`,title:{id:`881Uwh`},description:{id:`YEP3X2`},scope:{id:`99eR72`},bindings:[{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌘ Backspace / ⌘ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`}]},{id:`delete-atom`,category:`wysiwyg`,title:{id:`636K3K`},description:{id:`oXKEsy`},scope:{id:`ur2XSb`},bindings:[{mac:`Backspace`,windowsLinux:`Backspace`},{mac:`Delete`,windowsLinux:`Delete`}]},{id:`slash-menu`,category:`navigation`,title:{id:`shNd9t`},description:{id:`8PmoQF`},scope:{id:`ur2XSb`},bindings:[{mac:`/`,windowsLinux:`/`}]},{id:`suggestion-navigation`,category:`navigation`,title:{id:`riqekz`},description:{id:`OiHJdA`},scope:{id:`y5FUYi`},bindings:[{mac:`↑ / ↓`,windowsLinux:`↑ / ↓`},{mac:`Enter / Tab`,windowsLinux:`Enter / Tab`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`component-navigation`,category:`navigation`,title:{id:`rwrPbS`},description:{id:`0s8-e8`},scope:{id:`ur2XSb`},bindings:[{mac:`↑ / ↓ / ← / →`,windowsLinux:`↑ / ↓ / ← / →`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-indent`,category:`source`,title:{id:`fwhX-N`},description:{id:`skf5Ix`},scope:{id:`tiWX6q`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`source-navigation`,category:`source`,title:{id:`qSKu2v`},description:{id:`gITz7o`},scope:{id:`tiWX6q`},bindings:[{mac:`Arrow keys / Option Arrow / Command Arrow`,windowsLinux:`Arrow keys / Ctrl Arrow / Home / End`},{mac:`Page Up / Page Down`,windowsLinux:`Page Up / Page Down`},{mac:`Shift with movement keys`,windowsLinux:`Shift with movement keys`}]},{id:`source-editing`,category:`source`,title:{id:`pFagOn`},description:{id:`MGb89P`},scope:{id:`tiWX6q`},bindings:[{mac:`Enter / Shift Enter / ⌘ Enter`,windowsLinux:`Enter / Shift Enter / Ctrl Enter`},{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌥ Backspace / ⌥ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`},{mac:`⌥ ↑ / ⌥ ↓`,windowsLinux:`Alt ↑ / Alt ↓`},{mac:`⇧⌥ ↑ / ⇧⌥ ↓`,windowsLinux:`Shift Alt ↑ / Shift Alt ↓`},{mac:`⇧⌘ K`,windowsLinux:`Ctrl Shift K`}]},{id:`source-history`,category:`source`,title:{id:`4Sxexw`},description:{id:`TDeOpa`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z`,windowsLinux:`Ctrl Y / Ctrl Shift Z`}]},{id:`code-field-history`,category:`wysiwyg`,title:{id:`VXGFMg`},description:{id:`BkGtRl`},scope:{id:`FWSjnp`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z`,windowsLinux:`Ctrl Y`},{mac:`⌘ U / ⇧⌘ U`,windowsLinux:`Ctrl U / Alt U`}]},{id:`source-select-all`,category:`source`,title:{id:`a-cKXz`},description:{id:`UTNVyS`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`source-multi-cursor`,category:`source`,title:{id:`mg0YGL`},description:{id:`lWNpNB`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ ↑ / ⌥⌘ ↓`,windowsLinux:`Ctrl Alt ↑ / Ctrl Alt ↓`},{mac:`⇧⌘ L`,windowsLinux:`Ctrl Shift L`}]},{id:`source-search`,category:`source`,title:{id:`7OhaRy`},description:{id:`mwMF9u`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`}]},{id:`source-toggle-comment`,category:`source`,title:{id:`RfaEio`},description:{id:`MrwYIK`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ /`,windowsLinux:`Ctrl /`},{mac:`Shift Alt A`,windowsLinux:`Shift Alt A`}]},{id:`source-select-next-occurrence`,category:`source`,title:{id:`hY8pka`},description:{id:`XnlF3W`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`source-goto-line`,category:`source`,title:{id:`7FamGZ`},description:{id:`yHikCO`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ G`,windowsLinux:`Ctrl Alt G`}]},{id:`source-find-results`,category:`source`,title:{id:`rJVoVX`},description:{id:`TwYboS`},scope:{id:`qyLmWw`},bindings:[{mac:`⌘ G / ⇧⌘ G`,windowsLinux:`Ctrl G / Ctrl Shift G`},{mac:`F3 / Shift F3`,windowsLinux:`F3 / Shift F3`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`source-folding`,category:`source`,title:{id:`bcjYUA`},description:{id:`VZGh8G`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ [ / ⌥⌘ ]`,windowsLinux:`Ctrl Shift [ / Ctrl Shift ]`},{mac:`Ctrl Alt [ / Ctrl Alt ]`,windowsLinux:`Ctrl Alt [ / Ctrl Alt ]`}]},{id:`source-completion`,category:`source`,title:{id:`VuxVSP`},description:{id:`Ehkru0`},scope:{id:`tiWX6q`},bindings:[{mac:`Ctrl Space`,windowsLinux:`Ctrl Space`},{mac:"⌥ ` / ⌥ I",windowsLinux:`Ctrl Space`},{mac:`↑ / ↓ / Page Up / Page Down`,windowsLinux:`↑ / ↓ / Page Up / Page Down`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-tab-focus-mode`,category:`source`,title:{id:`eG8Jsg`},description:{id:`qRZh7J`},scope:{id:`tiWX6q`},bindings:[{mac:`Shift Alt M`,windowsLinux:`Ctrl M`}]},{id:`source-lint-panel`,category:`source`,title:{id:`yvG-l1`},description:{id:`kCqCyf`},scope:{id:`tiWX6q`},bindings:[{mac:`⇧⌘ M`,windowsLinux:`Ctrl Shift M`}]},{id:`source-next-diagnostic`,category:`source`,title:{id:`M1OfV9`},description:{id:`ExPiRQ`},scope:{id:`tiWX6q`},bindings:[{mac:`F8`,windowsLinux:`F8`}]}],l=c,u=new Map(c.map(e=>[e.id,e]));function d(e){let t=u.get(e);if(!t)throw Error(`Unknown keyboard shortcut: ${e}`);return t}function f(){return r()?`mac`:`windowsLinux`}var p=[[/⌘/g,` Command `],[/⌥/g,` Option `],[/⇧/g,` Shift `],[/⌃/g,` Control `],[/↑/g,` Up Arrow `],[/↓/g,` Down Arrow `],[/←/g,` Left Arrow `],[/→/g,` Right Arrow `],[/\[/g,` Left Bracket `],[/\]/g,` Right Bracket `],[/,/g,` Comma `],[/\bCtrl\b/g,` Control `]];function m(e){return e.split(` / `).map(e=>p.reduce((e,[t,n])=>e.replace(t,n),e).replaceAll(/\s+/g,` `).trim()).join(` or `)}function h(e,t=f()){return t===`mac`?e.mac:e.windowsLinux}function g(e,t=f()){return m(h(e,t))}function _(e,t=f()){return h(d(e).bindings[0],t)}function v(e,t=f()){return g(d(e).bindings[0],t)}function y(e){if(!e||typeof e!=`object`)return!1;if(`isContentEditable`in e&&e.isContentEditable===!0)return!0;if(!(`tagName`in e))return!1;let t=String(e.tagName).toUpperCase();return t===`INPUT`||t===`TEXTAREA`}function b(e,t,n=f()){return d(t).bindings.some(t=>{let r=x(t.match,n);return r?C(e,r,n):!1})}function x(e,t){return e?S(e)?e:e[t]??null:null}function S(e){return`key`in e||`code`in e}function C(e,t,n){if(t.key&&e.key.toLowerCase()!==t.key.toLowerCase()||t.code&&e.code!==t.code)return!1;let r=t.metaKey??(t.mod?n===`mac`:!1),i=t.ctrlKey??(t.mod?n===`windowsLinux`:!1),a=t.altKey??!1,o=t.shiftKey??!1;return t.allowExtraModifiers?!(t.anyMod&&!e.metaKey&&!e.ctrlKey||r&&!e.metaKey||i&&!e.ctrlKey||a&&!e.altKey||o&&!e.shiftKey):(t.anyMod?e.metaKey||e.ctrlKey:e.metaKey===r&&e.ctrlKey===i)&&e.altKey===a&&(t.allowShiftKey||!!e.shiftKey===o)}var w=`#settings`;function T(e){return`#settings/${e}`}var E=`configure-agents`;function D(){if(typeof window>`u`)return;let e=T(E);window.location.hash!==e&&(window.location.hash=e)}var O=`plugins-manage`;function k(){if(typeof window>`u`)return;let e=T(O);window.location.hash!==e&&(window.location.hash=e)}function A(e){return y(e.target)?!1:b(e,`settings`)}function j(e){let t=e.replace(/^#/,``);return t===`settings`?!0:t.startsWith(`settings/`)&&t.length>9}function M(e){let t=e.replace(/^#/,``);if(!t.startsWith(`settings/`))return null;let n=t.slice(9);return n.length>0?n:null}function N(){return typeof window>`u`?``:window.location.hash}function P(){let e=(0,a.c)(5),[t,n]=(0,i.useState)(L),[r,o]=(0,i.useState)(I),s,c;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=()=>{(0,i.startTransition)(()=>{let e=N();n(j(e)),o(M(e))})};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},c=[],e[0]=s,e[1]=c):(s=e[0],c=e[1]),(0,i.useEffect)(s,c);let l=F,u;return e[2]!==t||e[3]!==r?(u={open:t,section:r,close:l},e[2]=t,e[3]=r,e[4]=u):u=e[4],u}function F(){typeof window>`u`||j(N())&&window.history.back()}function I(){return M(N())}function L(){return j(N())}export{k as a,o as c,h as d,g as f,b as g,y as h,D as i,s as l,m,j as n,P as o,v as p,A as r,l as s,w as t,_ as u};
|
package/dist/public/assets/{use-terminal-enabled-fhwpyN81.js → use-terminal-enabled-CuFAAh8J.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./compiler-runtime-BfE3aGVn.js";import{t}from"./terminal-telemetry-
|
|
1
|
+
import{t as e}from"./compiler-runtime-BfE3aGVn.js";import{t}from"./terminal-telemetry-pdIn1zDv.js";import{Ba as n}from"./dist-Cgpf3BIr.js";import"./config-provider-GshVNiWq.js";import{n as r}from"./config-context-gd3BC-iY.js";var i=e();function a(){let e=(0,i.c)(3),{projectLocalConfig:t,projectLocalSynced:n}=r(),a=t?.terminal?.enabled??null,o;return e[0]!==n||e[1]!==a?(o={enabled:a,synced:n},e[0]=n,e[1]=a,e[2]=o):o=e[2],o}function o(){let e=(0,i.c)(2),{projectLocalBinding:a}=r();if(a===null)return null;let o;return e[0]===a?o=e[1]:(o=e=>{let r=a.patch({terminal:{enabled:e}});return r.ok&&e&&t(),r.ok?{ok:!0}:{ok:!1,error:n(r.error)}},e[0]=a,e[1]=o),o}export{o as n,a as t};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{o as e,t}from"./chunk-CYidjpOJ.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{m as r,r as i}from"./DocumentContext-WcIs30H8.js";import{t as a}from"./react-f2sANaYj.js";import{t as o}from"./react-dom-DPxgxlDT.js";import{t as s}from"./compiler-runtime-BfE3aGVn.js";import{et as c,k as l,q as u}from"./CodeMirrorPropInput-BqDZpzvH.js";import{$i as d,Oi as f,Vi as p,Y as m,aa as h,ai as g,da as _,ea as v,ha as y,ia as b,la as x,ma as S,pa as C}from"./dist-Cgpf3BIr.js";import{t as ee}from"./libesm-Db-3Gx3Z.js";var w=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pointer=void 0,e.unescapeToken=t,e.escapeToken=n;function t(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function n(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.Pointer=function(){function e(e){e===void 0&&(e=[``]),this.tokens=e}return e.fromJSON=function(n){var r=n.split(`/`).map(t);if(r[0]!==``)throw Error(`Invalid JSON Pointer: ${n}`);return new e(r)},e.prototype.toString=function(){return this.tokens.map(n).join(`/`)},e.prototype.evaluate=function(e){for(var t=null,n=``,r=e,i=1,a=this.tokens.length;i<a;i++)t=r,n=this.tokens[i],!(n==`__proto__`||n==`constructor`||n==`prototype`)&&(r=(t||{})[n]);return{parent:t,key:n,value:r}},e.prototype.get=function(e){return this.evaluate(e).value},e.prototype.set=function(e,t){var n=this.evaluate(e);n.parent&&(n.parent[n.key]=t)},e.prototype.push=function(e){this.tokens.push(e)},e.prototype.add=function(t){return new e(this.tokens.concat(String(t)))},e.prototype.parent=function(){return new e(this.tokens.length>1?this.tokens.slice(0,-1):[``])},e}()})),T=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.hasOwnProperty=void 0,e.objectType=t,e.clone=r,e.hasOwnProperty=Object.prototype.hasOwnProperty;function t(e){return e===void 0?`undefined`:e===null?`null`:Array.isArray(e)?`array`:typeof e}function n(e){return typeof e==`object`&&!!e}function r(t){if(!n(t))return t;if(t.constructor==Array){for(var i=t.length,a=Array(i),o=0;o<i;o++)a[o]=r(t[o]);return a}if(t.constructor==Date)return new Date(+t);var s={};for(var c in t)e.hasOwnProperty.call(t,c)&&(s[c]=r(t[c]));return s}})),E=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isDestructive=n,e.subtract=r,e.intersection=i,e.diffArrays=l,e.diffObjects=u,e.diffAny=d;var t=T();function n(e){var t=e.op;return t===`remove`||t===`replace`||t===`copy`||t===`move`}function r(e,n){var r=[];for(var i in e)t.hasOwnProperty.call(e,i)&&e[i]!==void 0&&!(t.hasOwnProperty.call(n,i)&&n[i]!==void 0)&&r.push(i);return r}function i(e){for(var n=e.length,r={},i=0;i<n;i++){var a=e[i];for(var o in a)t.hasOwnProperty.call(a,o)&&a[o]!==void 0&&(r[o]=(r[o]||0)+1)}for(var o in r)r[o]<n&&delete r[o];return Object.keys(r)}function a(e,n){var r=[];for(var i in e)t.hasOwnProperty.call(e,i)&&e[i]!==void 0&&t.hasOwnProperty.call(n,i)&&n[i]!==void 0&&r.push(i);return r}function o(e){return e.op===`add`}function s(e){return e.op===`remove`}function c(e,t){return{operations:e.operations.concat(t),cost:e.cost+1}}function l(e,t,n,r){r===void 0&&(r=d);var i=Math.max(e.length,t.length),a=new Map([[0,{operations:[],cost:0}]]);function l(o,s){var u=o*i+s,d=a.get(u);if(d===void 0){if(o>0&&s>0&&!r(e[o-1],t[s-1],n.add(String(o-1))).length)d=l(o-1,s-1);else{var f=[];if(o>0){var p=l(o-1,s),m={op:`remove`,index:o-1};f.push(c(p,m))}if(s>0){var h=l(o,s-1),g={op:`add`,index:o-1,value:t[s-1]};f.push(c(h,g))}if(o>0&&s>0){var _=l(o-1,s-1),v={op:`replace`,index:o-1,original:e[o-1],value:t[s-1]};f.push(c(_,v))}d=f.sort(function(e,t){return e.cost-t.cost})[0]}a.set(u,d)}return d}var u=isNaN(e.length)||e.length<=0?0:e.length;return l(u,isNaN(t.length)||t.length<=0?0:t.length).operations.reduce(function(e,t){var i=e[0],a=e[1];if(o(t)){var c=t.index+1+a,l=c<u+a?String(c):`-`,d={op:t.op,path:n.add(l).toString(),value:t.value};return[i.concat(d),a+1]}else if(s(t)){var d={op:t.op,path:n.add(String(t.index+a)).toString()};return[i.concat(d),a-1]}else{var f=n.add(String(t.index+a)),p=r(t.original,t.value,f);return[i.concat.apply(i,p),a]}},[[],0])[0]}function u(e,t,n,i){i===void 0&&(i=d);var o=[];return r(e,t).forEach(function(e){o.push({op:`remove`,path:n.add(e).toString()})}),r(t,e).forEach(function(e){o.push({op:`add`,path:n.add(e).toString(),value:t[e]})}),a(e,t).forEach(function(r){o.push.apply(o,i(e[r],t[r],n.add(r)))}),o}function d(e,n,r,i){if(i===void 0&&(i=d),e===n)return[];var a=(0,t.objectType)(e),o=(0,t.objectType)(n);return a==`array`&&o==`array`?l(e,n,r,i):a==`object`&&o==`object`?u(e,n,r,i):[{op:`replace`,path:r.toString(),value:n}]}})),te=t((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.InvalidOperationError=e.TestError=e.MissingError=void 0,e.add=l,e.remove=u,e.replace=d,e.move=f,e.copy=p,e.test=m,e.apply=g;var n=w(),r=T(),i=E(),a=function(e){t(n,e);function n(t){var n=e.call(this,`Value required at path: ${t}`)||this;return n.path=t,n.name=`MissingError`,n}return n}(Error);e.MissingError=a;var o=function(e){t(n,e);function n(t,n){var r=e.call(this,`Test failed: ${t} != ${n}`)||this;return r.actual=t,r.expected=n,r.name=`TestError`,r}return n}(Error);e.TestError=o;function s(e,t,n){if(Array.isArray(e))if(t==`-`)e.push(n);else{var r=parseInt(t,10);e.splice(r,0,n)}else e[t]=n}function c(e,t){if(Array.isArray(e)){var n=parseInt(t,10);e.splice(n,1)}else delete e[t]}function l(e,t,i){var o=n.Pointer.fromJSON(t.path);if(i?.implicitArrayCreation&&o.tokens[o.tokens.length-1]===`-`){var c=o.parent().evaluate(e);c.value===void 0&&(0,r.objectType)(c.parent)===`object`&&(c.parent[c.key]=[])}var l=o.evaluate(e);return l.parent===void 0||i?.implicitArrayCreation&&l.key===`-`&&!Array.isArray(l.parent)?new a(t.path):(s(l.parent,l.key,(0,r.clone)(t.value)),null)}function u(e,t,r){var i=n.Pointer.fromJSON(t.path).evaluate(e);return i.value===void 0?new a(t.path):(c(i.parent,i.key),null)}function d(e,t,i){var o=n.Pointer.fromJSON(t.path).evaluate(e);if(o.parent===null)return new a(t.path);if(Array.isArray(o.parent)){if(parseInt(o.key,10)>=o.parent.length)return new a(t.path)}else if(o.value===void 0)return new a(t.path);return o.parent[o.key]=(0,r.clone)(t.value),null}function f(e,t,r){var i=n.Pointer.fromJSON(t.from).evaluate(e);if(i.value===void 0)return new a(t.from);var o=n.Pointer.fromJSON(t.path).evaluate(e);return o.parent===void 0?new a(t.path):(c(i.parent,i.key),s(o.parent,o.key,i.value),null)}function p(e,t,i){var o=n.Pointer.fromJSON(t.from).evaluate(e);if(o.value===void 0)return new a(t.from);var c=n.Pointer.fromJSON(t.path).evaluate(e);return c.parent===void 0?new a(t.path):(s(c.parent,c.key,(0,r.clone)(o.value)),null)}function m(e,t,r){var a=n.Pointer.fromJSON(t.path).evaluate(e);return(0,i.diffAny)(a.value,t.value,new n.Pointer).length?new o(a.value,t.value):null}var h=function(e){t(n,e);function n(t){var n=e.call(this,`Invalid operation: ${t.op}`)||this;return n.operation=t,n.name=`InvalidOperationError`,n}return n}(Error);e.InvalidOperationError=h;function g(e,t,n){switch(t.op){case`add`:return l(e,t,n);case`remove`:return u(e,t,n);case`replace`:return d(e,t,n);case`move`:return f(e,t,n);case`copy`:return p(e,t,n);case`test`:return m(e,t,n)}return new h(t)}})),ne=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pointer=void 0,e.applyPatch=i,e.createPatch=o;var t=w();Object.defineProperty(e,`Pointer`,{enumerable:!0,get:function(){return t.Pointer}});var n=te(),r=E();function i(e,t,r){return t.map(function(t){return(0,n.apply)(e,t,r)})}function a(e){function t(n,i,a){var o=e(n,i,a);return Array.isArray(o)?o:(0,r.diffAny)(n,i,a,t)}return t}function o(e,n,i){var o=new t.Pointer;return(i?a(i):r.diffAny)(e,n,o)}})),D=e(a(),1),re=e(o(),1),O=s(),k=ne();function A(){}A.prototype={diff:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.callback;typeof n==`function`&&(r=n,n={}),this.options=n;var i=this;function a(e){return r?(setTimeout(function(){r(void 0,e)},0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var o=t.length,s=e.length,c=1,l=o+s;n.maxEditLength&&(l=Math.min(l,n.maxEditLength));var u=n.timeout??1/0,d=Date.now()+u,f=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(f[0],t,e,0);if(f[0].oldPos+1>=s&&p+1>=o)return a([{value:this.join(t),count:t.length}]);var m=-1/0,h=1/0;function g(){for(var n=Math.max(m,-c);n<=Math.min(h,c);n+=2){var r=void 0,l=f[n-1],u=f[n+1];l&&(f[n-1]=void 0);var d=!1;if(u){var g=u.oldPos-n;d=u&&0<=g&&g<o}var _=l&&l.oldPos+1<s;if(!d&&!_){f[n]=void 0;continue}if(r=!_||d&&l.oldPos+1<u.oldPos?i.addToPath(u,!0,void 0,0):i.addToPath(l,void 0,!0,1),p=i.extractCommon(r,t,e,n),r.oldPos+1>=s&&p+1>=o)return a(ie(i,r.lastComponent,t,e,i.useLongestToken));f[n]=r,r.oldPos+1>=s&&(h=Math.min(h,n-1)),p+1>=o&&(m=Math.max(m,n+1))}c++}if(r)(function e(){setTimeout(function(){if(c>l||Date.now()>d)return r();g()||e()},0)})();else for(;c<=l&&Date.now()<=d;){var _=g();if(_)return _}},addToPath:function(e,t,n,r){var i=e.lastComponent;return i&&i.added===t&&i.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:i.count+1,added:t,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:i}}},extractCommon:function(e,t,n,r){for(var i=t.length,a=n.length,o=e.oldPos,s=o-r,c=0;s+1<i&&o+1<a&&this.equals(t[s+1],n[o+1]);)s++,o++,c++;return c&&(e.lastComponent={count:c,previousComponent:e.lastComponent}),e.oldPos=o,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split(``)},join:function(e){return e.join(``)}};function ie(e,t,n,r,i){for(var a=[],o;t;)a.push(t),o=t.previousComponent,delete t.previousComponent,t=o;a.reverse();for(var s=0,c=a.length,l=0,u=0;s<c;s++){var d=a[s];if(!d.removed){if(!d.added&&i){var f=n.slice(l,l+d.count);f=f.map(function(e,t){var n=r[u+t];return n.length>e.length?n:e}),d.value=e.join(f)}else d.value=e.join(n.slice(l,l+d.count));l+=d.count,d.added||(u+=d.count)}else if(d.value=e.join(r.slice(u,u+d.count)),u+=d.count,s&&a[s-1].added){var p=a[s-1];a[s-1]=a[s],a[s]=p}}var m=a[c-1];return c>1&&typeof m.value==`string`&&(m.added||m.removed)&&e.equals(``,m.value)&&(a[c-2].value+=m.value,a.pop()),a}var j=new A;function ae(e,t,n){return j.diff(e,t,n)}var M=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,N=/\S/,P=new A;P.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!N.test(e)&&!N.test(t)},P.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&M.test(t[n])&&M.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};function oe(e,t,n){return P.diff(e,t,n)}var F=new A;F.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
2
|
+
`));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};var I=new A;I.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var se=new A;se.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function L(e){"@babel/helpers - typeof";return L=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},L(e)}var ce=Object.prototype.toString,R=new A;R.useLongestToken=!0,R.tokenize=F.tokenize,R.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=r===void 0?function(e,t){return t===void 0?n:t}:r;return typeof e==`string`?e:JSON.stringify(z(e,null,null,i),i,` `)},R.equals=function(e,t){return A.prototype.equals.call(R,e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`))};function z(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i,e));var a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];var o;if(ce.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=z(e[a],t,n,r,i);return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),L(e)===`object`&&e!==null){t.push(e),o={},n.push(o);var s=[],c;for(c in e)e.hasOwnProperty(c)&&s.push(c);for(s.sort(),a=0;a<s.length;a+=1)c=s[a],o[c]=z(e[c],t,n,r,c);t.pop(),n.pop()}else o=e;return o}var B=new A;B.tokenize=function(e){return e.slice()},B.join=B.removeEmpty=function(e){return e};function V(e,t){let n=t.content.findDiffStart(e.content);if(n===null)return!1;let{a:r,b:i}=t.content.findDiffEnd(e.content),a=n-Math.min(r,i);return a>0&&(e.resolve(n-a).depth<t.resolve(r+a).depth?n-=a:(r+=a,i+=a)),new C(n,i,t.slice(n,r))}function le(e){if(!e.steps.length)return;let t=new S(e.docs[0]),n=e.steps.slice();for(;n.length;){let e=n.shift();for(;n.length&&e.merge(n[0]);){let r=n.shift();e=e instanceof C&&r instanceof C?V(t.doc,r.apply(e.apply(t.doc).doc).doc):e.merge(r)}t.step(e)}return t}function H(e){let t=new S(e);return t.removeMark(0,e.nodeSize-2),t.doc}function U(e,t){let n=t.split(`/`);for(n.shift();n.length;){if(typeof e!=`object`)throw Error();let t=n.shift();e=e[t]}return e}function W(e){return JSON.parse(JSON.stringify(e))}var ue=class{fromDoc;toDoc;complexSteps;wordDiffs;simplifyDiff;schema;tr;currentJSON;finalJSON;ops;constructor(e,t,n={}){let r={complexSteps:!0,wordDiffs:!1,simplifyDiff:!0,...n};this.fromDoc=e,this.toDoc=t,this.complexSteps=r.complexSteps,this.wordDiffs=r.wordDiffs,this.simplifyDiff=r.simplifyDiff,this.schema=e.type.schema,this.tr=new S(e),this.currentJSON={},this.finalJSON={},this.ops=[]}init(){return this.complexSteps?(this.currentJSON=H(this.fromDoc).toJSON(),this.finalJSON=H(this.toDoc).toJSON(),this.ops=(0,k.createPatch)(this.currentJSON,this.finalJSON),this.recreateChangeContentSteps(),this.recreateChangeMarkSteps()):(this.currentJSON=this.fromDoc.toJSON(),this.finalJSON=this.toDoc.toJSON(),this.ops=(0,k.createPatch)(this.currentJSON,this.finalJSON),this.recreateChangeContentSteps()),this.simplifyDiff&&(this.tr=le(this.tr)||this.tr),this.tr}recreateChangeContentSteps(){let e=[];for(;this.ops.length;){let t=this.ops.shift();e.push(t);let n,r=W(this.currentJSON),i=t.path.split(`/`);for(;n==null;){(0,k.applyPatch)(r,[t]);try{n=this.schema.nodeFromJSON(r),n.check()}catch{if(n=null,this.ops.length>0)t=this.ops.shift(),e.push(t);else throw Error(`No valid diff possible applying ${t.path}`)}}this.complexSteps&&e.length===1&&(i.includes(`attrs`)||i.includes(`type`))?(this.addSetNodeMarkup(),e=[]):e.length===1&&t.op===`replace`&&i[i.length-1]===`text`?(this.addReplaceTextSteps(t,r),e=[]):this.addReplaceStep(n,r)&&(e=[])}}addSetNodeMarkup(){let e=this.schema.nodeFromJSON(this.currentJSON),t=this.schema.nodeFromJSON(this.finalJSON),n=t.content.findDiffStart(e.content),r=e.nodeAt(n),i=t.nodeAt(n);if(n!=null){let e=r.type===i.type?null:i.type;try{this.tr.setNodeMarkup(n,e,i.attrs,i.marks)}catch(t){if(e&&t.message.includes(`Invalid content`))this.tr.replaceWith(n,n+r.nodeSize,i);else throw t}return this.currentJSON=H(this.tr.doc).toJSON(),this.ops=(0,k.createPatch)(this.currentJSON,this.finalJSON),!0}return!1}recreateChangeMarkSteps(){this.toDoc.descendants((e,t)=>{if(!e.isInline)return!0;this.tr.doc.nodesBetween(t,t+e.nodeSize,(n,r)=>{if(!n.isInline)return!0;let i=Math.max(t,r),a=Math.min(t+e.nodeSize,r+n.nodeSize);n.marks.forEach(t=>{t.isInSet(e.marks)||this.tr.removeMark(i,a,t)}),e.marks.forEach(e=>{e.isInSet(n.marks)||this.tr.addMark(i,a,e)})})})}addReplaceStep(e,t){let n=V(this.schema.nodeFromJSON(this.currentJSON),e);if(!n)return!1;if(!this.tr.maybeStep(n).failed)return this.currentJSON=t,!0;throw Error(`No valid step found.`)}addReplaceTextSteps(e,t){let n={...e,value:`xx`},r={...e,value:`yy`},i=W(this.currentJSON),a=W(this.currentJSON);(0,k.applyPatch)(i,[n]),(0,k.applyPatch)(a,[r]);let o=this.schema.nodeFromJSON(i),s=this.schema.nodeFromJSON(a),c=e.value,l=U(this.currentJSON,e.path),u=this.wordDiffs?oe(l,c):ae(l,c),d=o.content.findDiffStart(s.content),f=o.resolve(d+1).marks();for(;u.length;){let e=u.shift();if(e.added){let t=this.schema.nodeFromJSON({type:`text`,text:e.value}).mark(f);if(u.length&&u[0].removed){let e=u.shift();this.tr.replaceWith(d,d+e.value.length,t)}else this.tr.insert(d,t);d+=e.value.length}else if(e.removed)if(u.length&&u[0].added){let t=u.shift(),n=this.schema.nodeFromJSON({type:`text`,text:t.value}).mark(f);this.tr.replaceWith(d,d+e.value.length,n),d+=t.value.length}else this.tr.delete(d,d+e.value.length);else d+=e.value.length}this.currentJSON=t}};function de(e,t,n={}){return new ue(e,t,n).init()}var G=new Set([`list`,`bulletList`,`orderedList`,`taskList`]);function K(e){let t=[];return e.forEach((e,n)=>{if(G.has(e.type.name)){let r=n+1,i=0;e.forEach(e=>{let n=r+i;t.push({from:n,to:n+e.nodeSize,key:`${e.type.name}:${e.textContent}`}),i+=e.nodeSize})}else t.push({from:n,to:n+e.nodeSize,key:`${e.type.name}:${e.textContent}`})}),t}function fe(e,t){let n=e.length,r=t.length,i=Array.from({length:n+1},()=>Array(r+1).fill(0));for(let a=n-1;a>=0;a--)for(let n=r-1;n>=0;n--)i[a][n]=e[a].key===t[n].key?i[a+1][n+1]+1:Math.max(i[a+1][n],i[a][n+1]);let a=[],o=0,s=0;for(;o<n&&s<r;)e[o].key===t[s].key?(a.push({type:`same`,b:t[s]}),o++,s++):i[o+1][s]>=i[o][s+1]?(a.push({type:`del`,a:e[o]}),o++):(a.push({type:`ins`,b:t[s]}),s++);for(;o<n;)a.push({type:`del`,a:e[o++]});for(;s<r;)a.push({type:`ins`,b:t[s++]});return a}function pe(e,t){let n=fe(K(e),K(t)),r=[],i=0;for(let e of n)e.type===`same`?i=e.b.to:e.type===`ins`?(r.push({fromA:0,toA:0,fromB:e.b.from,toB:e.b.to}),i=e.b.to):r.push({fromA:e.a.from,toA:e.a.to,fromB:i,toB:i});return r}var me=400;function q(e,t,n){return t.nodeFromJSON(e.parseWithFallback(n))}function he(e,t){let n=t.filter(e=>e.toB>e.fromB),r=[];return e.steps.forEach((t,i)=>{let a=t instanceof x?`add`:t instanceof _?`remove`:null;if(a===null)return;let o=t,s=e.mapping.slice(i+1),c=s.map(o.from,-1),l=s.map(o.to,1);if(l<=c||n.some(e=>e.fromB<=c&&l<=e.toB))return;let u=e.mapping.slice(0,i).invert(),d=u.map(o.from),f=u.map(o.to);f<=d||r.push({fromA:d,toA:f,fromB:c,toB:l,markName:o.mark.type.name,kind:a})}),r}function ge(e,t,n,r){if(e.length>2e5||t.length>2e5)return{ok:!1,reason:`ceiling`};let i,a;try{i=q(r,n,e),a=q(r,n,t)}catch{return{ok:!1,reason:`parse`}}let o=a,s=null;try{s=de(i,a,{complexSteps:!0,wordDiffs:!0,simplifyDiff:!0}),o=s.doc}catch{}let c=pe(i,o),l=s?he(s,c):[];return c.length+l.length>me?{ok:!1,reason:`ceiling`}:{ok:!0,afterDoc:o,beforeDoc:i,changes:c,markChanges:l}}var _e=`.ok-diff-ins, .ok-diff-ins-block, [data-diff-deleted]`;function ve(e){return e.changes.length+2*e.markChanges.length}function J(e){let t=!1;return e.forEach(e=>{e.isBlock&&(t=!0)}),t}function ye(e){if(e.childCount===0)return!1;let t=!0;return e.forEach(e=>{e.type.name!==`listItem`&&e.type.name!==`taskItem`&&(t=!1)}),t}function Y(e,t,n){let r=document.createElement(n?`div`:`span`);r.className=n?`ok-diff-del ok-diff-del-block`:`ok-diff-del`,r.setAttribute(`data-diff-deleted`,``);let i=e.serializeFragment(t);if(n&&ye(t)){let e=document.createElement(`ul`);e.appendChild(i),r.appendChild(e)}else r.appendChild(i);return r}function be(e,t,n,r,i){let a=y.fromSchema(i),o=[];for(let e of r){let n=t.slice(e.fromA,e.toA),r=J(n.content);o.push(d.widget(e.fromB,()=>Y(a,n.content,r),{side:-1,ignoreSelection:!0,marks:[]})),o.push(d.inline(e.fromB,e.toB,{class:`ok-diff-ins`},{inclusiveEnd:!0}))}for(let e of n)if(e.toB>e.fromB&&o.push(d.node(e.fromB,e.toB,{class:`ok-diff-ins-block`})),e.toA>e.fromA){let n=t.slice(e.fromA,e.toA),r=J(n.content);o.push(d.widget(e.fromB,()=>Y(a,n.content,r),{side:-1,ignoreSelection:!0,marks:[]}))}return v.create(e,o)}var xe=new Set([`slashCommand`,`blockDragHandle`,`blockMover`,`tableInsertControls`,`fileHandler`,`gfmAutolink`,`inlineLinkInputRule`,`keyboardNav`,`tiptapFindReplace`,`selectionState`,`sourceDirtyObserver`,`tabFocusTrap`]),X=r.filter(e=>!xe.has(e.name)).map(e=>e.name===`jsxComponent`?m:e),Z=n(),Q=p(X);function Se(e,t){return ge(e,t,Q,l())}var Ce=f.create({name:`renderedDiffDecorations`,addOptions(){return{decorations:v.empty}},addProseMirrorPlugins(){let e=this.options.decorations;return[new b({key:new h(`renderedDiffDecorations`),props:{decorations:()=>e}})]}});function we(e){let t=(0,O.c)(31),{diff:n}=e,r,i,a,o;if(t[0]!==n.afterDoc||t[1]!==n.beforeDoc||t[2]!==n.changes||t[3]!==n.markChanges){let e=be(n.afterDoc,n.beforeDoc,n.changes,n.markChanges,Q);o=c,a=!1,r=X,i=Ce.configure({decorations:e}),t[0]=n.afterDoc,t[1]=n.beforeDoc,t[2]=n.changes,t[3]=n.markChanges,t[4]=r,t[5]=i,t[6]=a,t[7]=o}else r=t[4],i=t[5],a=t[6],o=t[7];let s;t[8]!==r||t[9]!==i?(s=[...r,i],t[8]=r,t[9]=i,t[10]=s):s=t[10];let l;t[11]===n.afterDoc?l=t[12]:(l=n.afterDoc.toJSON(),t[11]=n.afterDoc,t[12]=l);let d;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(d={attributes:{class:`pt-4`}},t[13]=d):d=t[13];let f;t[14]!==a||t[15]!==s||t[16]!==l?(f={editable:a,extensions:s,content:l,editorProps:d},t[14]=a,t[15]=s,t[16]=l,t[17]=f):f=t[17];let p;t[18]===n?p=t[19]:(p=[n],t[18]=n,t[19]=p);let m=o(f,p),[h]=(0,D.useState)(Te),g=(0,D.useRef)(null),_,v;t[20]===h?(_=t[21],v=t[22]):(_=()=>{let e=g.current;if(e)return e.appendChild(h),()=>{h.parentNode===e&&e.removeChild(h)}},v=[h],t[20]=h,t[21]=_,t[22]=v),(0,D.useLayoutEffect)(_,v);let y;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(`div`,{className:`tiptap-editor`,children:(0,Z.jsx)(`div`,{ref:g,style:{display:`contents`}})}),t[23]=y):y=t[23];let b;t[24]===m?b=t[25]:(b=(0,Z.jsx)(u,{editor:m,className:`tiptap-editor-portal-content`}),t[24]=m,t[25]=b);let x;t[26]!==h||t[27]!==b?(x=(0,re.createPortal)(b,h),t[26]=h,t[27]=b,t[28]=x):x=t[28];let S;return t[29]===x?S=t[30]:(S=(0,Z.jsxs)(`div`,{className:`editor-doc-scroll min-h-0 flex-1`,"data-testid":`rendered-diff-view`,children:[y,x]}),t[29]=x,t[30]=S),S}function Te(){let e=document.createElement(`div`);return e.style.display=`contents`,e}function Ee(e){let t=0,n=!1;for(let r of e.split(`
|
|
3
|
+
`)){let e=r.startsWith(`+`)&&!r.startsWith(`+++`)||r.startsWith(`-`)&&!r.startsWith(`---`);e&&!n&&(t+=1),n=e}return t}function De(e){let t=Array.from(e.querySelectorAll(`.diff-code-insert, .diff-code-delete`)),n=[],r=null;for(let e of t){let t=e.closest(`tr`);t&&((r===null||t.previousElementSibling!==r)&&n.push(e),r=t)}return n}function $(e){let t=0,n=0;for(let r of e.split(`
|
|
4
|
+
`))r.startsWith(`+`)&&!r.startsWith(`+++`)?t++:r.startsWith(`-`)&&!r.startsWith(`---`)&&n++;return{additions:t,deletions:n}}function Oe(e,t){return`${e}\u0000${t}`}function ke(e,t,n){let r=g(e).body,i=g(t).body;return r===i?``:ee(n,r,i,``,``,{context:Math.max(r.split(`
|
|
5
|
+
`).length,i.split(`
|
|
6
|
+
`).length)})}function Ae(e,t,n,r,a){let o=(0,O.c)(10),s=r===void 0?`vs-live`:r,c=a===void 0?null:a,{activeProvider:l}=i(),u;o[0]===Symbol.for(`react.memo_cache_sentinel`)?(u={status:`idle`,diff:null},o[0]=u):u=o[0];let[d,f]=(0,D.useState)(u),p=(0,D.useRef)(l),m;o[1]===l?m=o[2]:(m=()=>{p.current=l},o[1]=l,o[2]=m),(0,D.useEffect)(m);let h,_;return o[3]!==n||o[4]!==t||o[5]!==s||o[6]!==c||o[7]!==e?(h=()=>{if(!e){f({status:`idle`,diff:null});return}let r=e,i=!1;f({status:`loading`,diff:null});let a=async function(e){let r=Oe(t,e),i=n.get(r);if(i!==void 0)return i;let a=await fetch(`/api/history/${e}?docName=${encodeURIComponent(t)}`);if(!a.ok)return console.error(`[timeline-diff] history fetch returned non-ok response`,{sha:e,docName:t,status:a.status}),null;let o=(await a.json()).content??``;return n.set(r,o),o};return(async function(){try{let e=await a(r);if(i)return;if(e===null){f({status:`error`,diff:null});return}let n,o;if(s===`vs-parent`){let t=c?await a(c):``;if(i)return;if(t===null){f({status:`error`,diff:null});return}n=t,o=e}else n=e,o=p.current?.document.getText(`source`).toString()??``;let l=g(n).body,u=g(o).body,d=ke(n,o,t);if(i)return;let{additions:m,deletions:h}=$(d);f({status:`ready`,diff:d,additions:m,deletions:h,before:l,after:u})}catch(e){i||(console.error(`[timeline-diff] failed to load entry diff`,{sha:r,docName:t,mode:s,err:e}),f({status:`error`,diff:null}))}})(),()=>{i=!0}},_=[e,t,n,s,c],o[3]=n,o[4]=t,o[5]=s,o[6]=c,o[7]=e,o[8]=h,o[9]=_):(h=o[8],_=o[9]),(0,D.useEffect)(h,_),d}export{we as a,ve as c,Ee as i,Ae as n,Se as o,De as r,_e as s,$ as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{Zt as r}from"./dist-Cgpf3BIr.js";var i=n(),a=e(t(),1);function o(){let e=(0,i.c)(3),[t,n]=(0,a.useState)(l),o,u;return e[0]===t?(o=e[1],u=e[2]):(o=()=>{if(t!==null||window.okDesktop)return;let e=!0;return fetch(`/api/workspace`).then(async t=>{let i=await t.json().catch(c);if(!e||!t.ok)return;let a=r.safeParse(i);a.success&&n({contentDir:a.data.contentDir,pathSeparator:a.data.pathSeparator})}).catch(s),()=>{e=!1}},u=[t],e[0]=t,e[1]=o,e[2]=u),(0,a.useEffect)(o,u),t}function s(e){console.warn(`[useWorkspace] /api/workspace fetch failed:`,e)}function c(){return null}function l(){return u()}function u(e=typeof window>`u`?void 0:window){if(!e)return null;let t=e.okDesktop;return t?{contentDir:t.config.projectPath,pathSeparator:t.platform===`win32`?`\\`:`/`}:null}export{o as t};
|
package/dist/public/assets/{vennDiagram-L72KCM5P-C4cNDPVl.js → vennDiagram-L72KCM5P-DFSXk11G.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-BCLrJxO_.js";import"./src-D9eynQ26.js";import{H as t,K as n,U as r,a as i,b as a,c as o,et as s,f as c,nt as l,rt as u,tt as d,v as f,w as p,y as m}from"./chunk-WYO6CB5R-WjatCbeP.js";import{C as h}from"./src-BaTc8y5c.js";import{i as g}from"./chunk-ICXQ74PX-COjRz7aI.js";import{t as _}from"./chunk-VAUOI2AC-CzpwkaIj.js";import{t as v}from"./rough.esm-B1nzhEZO.js";var y=(e,t)=>l(e,`a`,-t),b=1e-10;function x(e,t){let n=C(e),r=n.filter(t=>S(t,e)),i=0,a=0,o=[];if(r.length>1){let t=O(r);for(let e=0;e<r.length;++e){let n=r[e];n.angle=Math.atan2(n.x-t.x,n.y-t.y)}r.sort((e,t)=>t.angle-e.angle);let n=r[r.length-1];for(let t=0;t<r.length;++t){let s=r[t];a+=(n.x+s.x)*(s.y-n.y);let c={x:(s.x+n.x)/2,y:(s.y+n.y)/2},l=null;for(let t=0;t<s.parentIndex.length;++t)if(n.parentIndex.includes(s.parentIndex[t])){let r=e[s.parentIndex[t]],i=Math.atan2(s.x-r.x,s.y-r.y),a=Math.atan2(n.x-r.x,n.y-r.y),o=a-i;o<0&&(o+=2*Math.PI);let u=a-o/2,d=T(c,{x:r.x+r.radius*Math.sin(u),y:r.y+r.radius*Math.cos(u)});d>r.radius*2&&(d=r.radius*2),(l==null||l.width>d)&&(l={circle:r,width:d,p1:s,p2:n,large:d>r.radius,sweep:!0})}l!=null&&(o.push(l),i+=w(l.circle.radius,l.width),n=s)}}else{let t=e[0];for(let n=1;n<e.length;++n)e[n].radius<t.radius&&(t=e[n]);let n=!1;for(let r=0;r<e.length;++r)if(T(e[r],t)>Math.abs(t.radius-e[r].radius)){n=!0;break}n?i=a=0:(i=t.radius*t.radius*Math.PI,o.push({circle:t,p1:{x:t.x,y:t.y+t.radius},p2:{x:t.x-b,y:t.y+t.radius},width:t.radius*2,large:!0,sweep:!0}))}return a/=2,t&&(t.area=i+a,t.arcArea=i,t.polygonArea=a,t.arcs=o,t.innerPoints=r,t.intersectionPoints=n),i+a}function S(e,t){return t.every(t=>T(e,t)<t.radius+b)}function C(e){let t=[];for(let n=0;n<e.length;++n)for(let r=n+1;r<e.length;++r){let i=D(e[n],e[r]);for(let e of i)e.parentIndex=[n,r],t.push(e)}return t}function w(e,t){return e*e*Math.acos(1-t/e)-(e-t)*Math.sqrt(t*(2*e-t))}function T(e,t){return Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))}function E(e,t,n){if(n>=e+t)return 0;if(n<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);let r=e-(n*n-t*t+e*e)/(2*n),i=t-(n*n-e*e+t*t)/(2*n);return w(e,r)+w(t,i)}function D(e,t){let n=T(e,t),r=e.radius,i=t.radius;if(n>=r+i||n<=Math.abs(r-i))return[];let a=(r*r-i*i+n*n)/(2*n),o=Math.sqrt(r*r-a*a),s=e.x+a*(t.x-e.x)/n,c=e.y+a*(t.y-e.y)/n,l=-(t.y-e.y)*(o/n),u=-(t.x-e.x)*(o/n);return[{x:s+l,y:c-u},{x:s-l,y:c+u}]}function O(e){let t={x:0,y:0};for(let n of e)t.x+=n.x,t.y+=n.y;return t.x/=e.length,t.y/=e.length,t}function k(e,t,n,r){r||={};let i=r.maxIterations||100,a=r.tolerance||1e-10,o=e(t),s=e(n),c=n-t;if(o*s>0)throw`Initial bisect points must have opposite signs`;if(o===0)return t;if(s===0)return n;for(let n=0;n<i;++n){c/=2;let n=t+c,r=e(n);if(r*o>=0&&(t=n),Math.abs(c)<a||r===0)return n}return t+c}function A(e){let t=Array(e);for(let n=0;n<e;++n)t[n]=0;return t}function j(e,t){return A(e).map(()=>A(t))}function M(e,t){let n=0;for(let r=0;r<e.length;++r)n+=e[r]*t[r];return n}function N(e){return Math.sqrt(M(e,e))}function P(e,t,n){for(let r=0;r<t.length;++r)e[r]=t[r]*n}function F(e,t,n,r,i){for(let a=0;a<e.length;++a)e[a]=t*n[a]+r*i[a]}function I(e,t,n){n||={};let r=n.maxIterations||t.length*200,i=n.nonZeroDelta||1.05,a=n.zeroDelta||.001,o=n.minErrorDelta||1e-6,s=n.minErrorDelta||1e-5,c=n.rho===void 0?1:n.rho,l=n.chi===void 0?2:n.chi,u=n.psi===void 0?-.5:n.psi,d=n.sigma===void 0?.5:n.sigma,f,p=t.length,m=Array(p+1);m[0]=t,m[0].fx=e(t),m[0].id=0;for(let n=0;n<p;++n){let r=t.slice();r[n]=r[n]?r[n]*i:a,m[n+1]=r,m[n+1].fx=e(r),m[n+1].id=n+1}function h(e){for(let t=0;t<e.length;t++)m[p][t]=e[t];m[p].fx=e.fx}let g=(e,t)=>e.fx-t.fx,_=t.slice(),v=t.slice(),y=t.slice(),b=t.slice();for(let t=0;t<r;++t){if(m.sort(g),n.history){let e=m.map(e=>{let t=e.slice();return t.fx=e.fx,t.id=e.id,t});e.sort((e,t)=>e.id-t.id),n.history.push({x:m[0].slice(),fx:m[0].fx,simplex:e})}f=0;for(let e=0;e<p;++e)f=Math.max(f,Math.abs(m[0][e]-m[1][e]));if(Math.abs(m[0].fx-m[p].fx)<o&&f<s)break;for(let e=0;e<p;++e){_[e]=0;for(let t=0;t<p;++t)_[e]+=m[t][e];_[e]/=p}let t=m[p];if(F(v,1+c,_,-c,t),v.fx=e(v),v.fx<m[0].fx)F(b,1+l,_,-l,t),b.fx=e(b),b.fx<v.fx?h(b):h(v);else if(v.fx>=m[p-1].fx){let n=!1;if(v.fx>t.fx?(F(y,1+u,_,-u,t),y.fx=e(y),y.fx<t.fx?h(y):n=!0):(F(y,1-u*c,_,u*c,t),y.fx=e(y),y.fx<v.fx?h(y):n=!0),n){if(d>=1)break;for(let t=1;t<m.length;++t)F(m[t],1-d,m[0],d,m[t]),m[t].fx=e(m[t])}}else h(v)}return m.sort(g),{fx:m[0].fx,x:m[0]}}function L(e,t,n,r,i,a,o){let s=n.fx,c=M(n.fxprime,t),l=s,u=s,d=c,f=0;i||=1,a||=1e-6,o||=.1;function p(u,f,p){for(let m=0;m<16;++m)if(i=(u+f)/2,F(r.x,1,n.x,i,t),l=r.fx=e(r.x,r.fxprime),d=M(r.fxprime,t),l>s+a*i*c||l>=p)f=i;else{if(Math.abs(d)<=-o*c)return i;d*(f-u)>=0&&(f=u),u=i,p=l}return 0}for(let m=0;m<10;++m){if(F(r.x,1,n.x,i,t),l=r.fx=e(r.x,r.fxprime),d=M(r.fxprime,t),l>s+a*i*c||m&&l>=u)return p(f,i,u);if(Math.abs(d)<=-o*c)return i;if(d>=0)return p(i,f,l);u=l,f=i,i*=2}return i}function R(e,t,n){let r={x:t.slice(),fx:0,fxprime:t.slice()},i={x:t.slice(),fx:0,fxprime:t.slice()},a=t.slice(),o,s,c=1,l;n||={},l=n.maxIterations||t.length*20,r.fx=e(r.x,r.fxprime),o=r.fxprime.slice(),P(o,r.fxprime,-1);for(let t=0;t<l;++t){if(c=L(e,o,r,i,c),n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:c}),!c)P(o,r.fxprime,-1);else{F(a,1,i.fxprime,-1,r.fxprime);let e=M(r.fxprime,r.fxprime),t=Math.max(0,M(a,i.fxprime)/e);F(o,t,o,-1,i.fxprime),s=r,r=i,i=s}if(N(r.fxprime)<=1e-5)break}return n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:c}),r}function ee(e,t={}){t.maxIterations=t.maxIterations||500;let n=t.initialLayout||ae,r=t.lossFunction||B,i=ne(e,t),a=n(i,t),o=Object.keys(a),s=[];for(let e of o)s.push(a[e].x),s.push(a[e].y);let c=I(e=>{let t={};for(let n=0;n<o.length;++n){let r=o[n];t[r]={x:e[2*n],y:e[2*n+1],radius:a[r].radius}}return r(t,i)},s,t).x;for(let e=0;e<o.length;++e){let t=o[e];a[t].x=c[2*e],a[t].y=c[2*e+1]}return a}var te=1e-10;function z(e,t,n){return Math.min(e,t)*Math.min(e,t)*Math.PI<=n+te?Math.abs(e-t):k(r=>E(e,t,r)-n,0,e+t)}function ne(e,t={}){let n=t.distinct,r=e.map(e=>Object.assign({},e));function i(e){return e.join(`;`)}if(n){let e=new Map;for(let t of r)for(let n=0;n<t.sets.length;n++){let r=String(t.sets[n]);e.set(r,t.size+(e.get(r)||0));for(let i=n+1;i<t.sets.length;i++){let n=String(t.sets[i]),a=`${r};${n}`,o=`${n};${r}`;e.set(a,t.size+(e.get(a)||0)),e.set(o,t.size+(e.get(o)||0))}}for(let t of r)t.sets.length<3&&(t.size=e.get(i(t.sets)))}let a=[],o=new Set;for(let e of r)if(e.sets.length===1)a.push(e.sets[0]);else if(e.sets.length===2){let t=e.sets[0],n=e.sets[1];o.add(i(e.sets)),o.add(i([n,t]))}a.sort((e,t)=>e===t?0:e<t?-1:1);for(let e=0;e<a.length;++e){let t=a[e];for(let n=e+1;n<a.length;++n){let e=a[n];o.has(i([t,e]))||r.push({sets:[t,e],size:0})}}return r}function re(e,t,n){let r=j(t.length,t.length),i=j(t.length,t.length);return e.filter(e=>e.sets.length===2).forEach(e=>{let a=n[e.sets[0]],o=n[e.sets[1]],s=z(Math.sqrt(t[a].size/Math.PI),Math.sqrt(t[o].size/Math.PI),e.size);r[a][o]=r[o][a]=s;let c=0;e.size+1e-10>=Math.min(t[a].size,t[o].size)?c=1:e.size<=1e-10&&(c=-1),i[a][o]=i[o][a]=c}),{distances:r,constraints:i}}function ie(e,t,n,r){for(let e=0;e<t.length;++e)t[e]=0;let i=0;for(let a=0;a<n.length;++a){let o=e[2*a],s=e[2*a+1];for(let c=a+1;c<n.length;++c){let l=e[2*c],u=e[2*c+1],d=n[a][c],f=r[a][c],p=(l-o)*(l-o)+(u-s)*(u-s),m=Math.sqrt(p),h=p-d*d;f>0&&m<=d||f<0&&m>=d||(i+=2*h*h,t[2*a]+=4*h*(o-l),t[2*a+1]+=4*h*(s-u),t[2*c]+=4*h*(l-o),t[2*c+1]+=4*h*(u-s))}}return i}function ae(e,t={}){let n=se(e,t),r=t.lossFunction||B;if(e.length>=8){let i=oe(e,t),a=r(i,e),o=r(n,e);a+1e-8<o&&(n=i)}return n}function oe(e,t={}){let n=t.restarts||10,r=[],i={};for(let t of e)t.sets.length===1&&(i[t.sets[0]]=r.length,r.push(t));let{distances:a,constraints:o}=re(e,r,i),s=N(a.map(N))/a.length;a=a.map(e=>e.map(e=>e/s));let c=(e,t)=>ie(e,t,a,o),l=null;for(let e=0;e<n;++e){let e=R(c,A(a.length*2).map(Math.random),t);(!l||e.fx<l.fx)&&(l=e)}let u=l.x,d={};for(let e=0;e<r.length;++e){let t=r[e];d[t.sets[0]]={x:u[2*e]*s,y:u[2*e+1]*s,radius:Math.sqrt(t.size/Math.PI)}}if(t.history)for(let e of t.history)P(e.x,s);return d}function se(e,t){let n=t&&t.lossFunction?t.lossFunction:B,r={},i={};for(let t of e)if(t.sets.length===1){let e=t.sets[0];r[e]={x:1e10,y:1e10,rowid:r.length,size:t.size,radius:Math.sqrt(t.size/Math.PI)},i[e]=[]}e=e.filter(e=>e.sets.length===2);for(let t of e){let e=t.weight==null?1:t.weight,n=t.sets[0],a=t.sets[1];t.size+te>=Math.min(r[n].size,r[a].size)&&(e=0),i[n].push({set:a,size:t.size,weight:e}),i[a].push({set:n,size:t.size,weight:e})}let a=[];Object.keys(i).forEach(e=>{let t=0;for(let n=0;n<i[e].length;++n)t+=i[e][n].size*i[e][n].weight;a.push({set:e,size:t})});function o(e,t){return t.size-e.size}a.sort(o);let s={};function c(e){return e.set in s}function l(e,t){r[t].x=e.x,r[t].y=e.y,s[t]=!0}l({x:0,y:0},a[0].set);for(let t=1;t<a.length;++t){let s=a[t].set,d=i[s].filter(c),f=r[s];if(d.sort(o),d.length===0)throw`ERROR: missing pairwise overlap information`;let p=[];for(var u=0;u<d.length;++u){let e=r[d[u].set],t=z(f.radius,e.radius,d[u].size);p.push({x:e.x+t,y:e.y}),p.push({x:e.x-t,y:e.y}),p.push({y:e.y+t,x:e.x}),p.push({y:e.y-t,x:e.x});for(let n=u+1;n<d.length;++n){let i=r[d[n].set],a=z(f.radius,i.radius,d[n].size),o=D({x:e.x,y:e.y,radius:t},{x:i.x,y:i.y,radius:a});p.push(...o)}}let m=1e50,h=p[0];for(let t of p){r[s].x=t.x,r[s].y=t.y;let i=n(r,e);i<m&&(m=i,h=t)}l(h,s)}return r}function B(e,t){let n=0;for(let r of t){if(r.sets.length===1)continue;let t;if(r.sets.length===2){let n=e[r.sets[0]],i=e[r.sets[1]];t=E(n.radius,i.radius,T(n,i))}else t=x(r.sets.map(t=>e[t]));let i=r.weight==null?1:r.weight;n+=i*(t-r.size)*(t-r.size)}return n}function ce(e,t){let n=0;for(let r of t){if(r.sets.length===1)continue;let t;if(r.sets.length===2){let n=e[r.sets[0]],i=e[r.sets[1]];t=E(n.radius,i.radius,T(n,i))}else t=x(r.sets.map(t=>e[t]));let i=r.weight==null?1:r.weight,a=Math.log((t+1)/(r.size+1));n+=i*a*a}return n}function le(e,t,n){if(n==null?e.sort((e,t)=>t.radius-e.radius):e.sort(n),e.length>0){let t=e[0].x,n=e[0].y;for(let r of e)r.x-=t,r.y-=n}if(e.length===2&&T(e[0],e[1])<Math.abs(e[1].radius-e[0].radius)&&(e[1].x=e[0].x+e[0].radius-e[1].radius-1e-10,e[1].y=e[0].y),e.length>1){let n=Math.atan2(e[1].x,e[1].y)-t,r=Math.cos(n),i=Math.sin(n);for(let t of e){let e=t.x,n=t.y;t.x=r*e-i*n,t.y=i*e+r*n}}if(e.length>2){let n=Math.atan2(e[2].x,e[2].y)-t;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){let t=e[1].y/(1e-10+e[1].x);for(let n of e){var r=(n.x+t*n.y)/(1+t*t);n.x=2*r-n.x,n.y=2*r*t-n.y}}}}function ue(e){e.forEach(e=>{e.parent=e});function t(e){return e.parent!==e&&(e.parent=t(e.parent)),e.parent}function n(e,n){let r=t(e);r.parent=t(n)}for(let t=0;t<e.length;++t)for(let r=t+1;r<e.length;++r){let i=e[t].radius+e[r].radius;T(e[t],e[r])+1e-10<i&&n(e[r],e[t])}let r=new Map;for(let n=0;n<e.length;++n){let i=t(e[n]).parent.setid;r.has(i)||r.set(i,[]),r.get(i).push(e[n])}return e.forEach(e=>{delete e.parent}),Array.from(r.values())}function V(e){let t=t=>({max:e.reduce((e,n)=>Math.max(e,n[t]+n.radius),-1/0),min:e.reduce((e,n)=>Math.min(e,n[t]-n.radius),1/0)});return{xRange:t(`x`),yRange:t(`y`)}}function de(e,t,n){t??=Math.PI/2;let r=me(e).map(e=>Object.assign({},e)),i=ue(r);for(let e of i){le(e,t,n);let r=V(e);e.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),e.bounds=r}i.sort((e,t)=>t.size-e.size),r=i[0];let a=r.bounds,o=(a.xRange.max-a.xRange.min)/50;function s(e,t,n){if(!e)return;let i=e.bounds,s,c;if(t)s=a.xRange.max-i.xRange.min+o;else{s=a.xRange.max-i.xRange.max;let e=(i.xRange.max-i.xRange.min)/2-(a.xRange.max-a.xRange.min)/2;e<0&&(s+=e)}if(n)c=a.yRange.max-i.yRange.min+o;else{c=a.yRange.max-i.yRange.max;let e=(i.yRange.max-i.yRange.min)/2-(a.yRange.max-a.yRange.min)/2;e<0&&(c+=e)}for(let t of e)t.x+=s,t.y+=c,r.push(t)}let c=1;for(;c<i.length;)s(i[c],!0,!1),s(i[c+1],!1,!0),s(i[c+2],!0,!0),c+=3,a=V(r);return pe(r)}function fe(e,t,n,r,i){let a=me(e);t-=2*r,n-=2*r;let{xRange:o,yRange:s}=V(a);if(o.max===o.min||s.max===s.min)return console.log(`not scaling solution: zero size detected`),e;let c,l;if(i){let e=Math.sqrt(i/Math.PI)*2;c=t/e,l=n/e}else c=t/(o.max-o.min),l=n/(s.max-s.min);let u=Math.min(l,c),d=(t-(o.max-o.min)*u)/2,f=(n-(s.max-s.min)*u)/2;return pe(a.map(e=>({radius:u*e.radius,x:r+d+(e.x-o.min)*u,y:r+f+(e.y-s.min)*u,setid:e.setid})))}function pe(e){let t={};for(let n of e)t[n.setid]=n;return t}function me(e){return Object.keys(e).map(t=>Object.assign(e[t],{setid:t}))}function he(e={}){let t=!1,n=600,r=350,i=15,a=1e3,o=Math.PI/2,s=!0,c=null,l=!0,u=!0,d=null,f=null,p=!1,m=null,h=e&&e.symmetricalTextCentre?e.symmetricalTextCentre:!1,g={},_=e&&e.colourScheme?e.colourScheme:e&&e.colorScheme?e.colorScheme:[`#1f77b4`,`#ff7f0e`,`#2ca02c`,`#d62728`,`#9467bd`,`#8c564b`,`#e377c2`,`#7f7f7f`,`#bcbd22`,`#17becf`],v=0,y=function(e){if(e in g)return g[e];var t=g[e]=_[v];return v+=1,v>=_.length&&(v=0),t},b=ee,x=B;function S(g){let _=g.datum(),v=new Set;_.forEach(e=>{e.size==0&&e.sets.length==1&&v.add(e.sets[0])}),_=_.filter(e=>!e.sets.some(e=>v.has(e)));let S={},C={};if(_.length>0){let e=b(_,{lossFunction:x,distinct:p});s&&(e=de(e,o,f)),S=fe(e,n,r,i,c),C=ve(S,_,h)}let w={};_.forEach(e=>{e.label&&(w[e.sets]=e.label)});function T(e){if(e.sets in w)return w[e.sets];if(e.sets.length==1)return``+e.sets[0]}g.selectAll(`svg`).data([S]).enter().append(`svg`);let E=g.select(`svg`);t?E.attr(`viewBox`,`0 0 ${n} ${r}`):E.attr(`width`,n).attr(`height`,r);let D={},O=!1;E.selectAll(`.venn-area path`).each(function(e){let t=this.getAttribute(`d`);e.sets.length==1&&t&&!p&&(O=!0,D[e.sets[0]]=be(t))});function k(e){return t=>Ce(e.sets.map(e=>{let i=D[e],a=S[e];return i||={x:n/2,y:r/2,radius:1},a||={x:n/2,y:r/2,radius:1},{x:i.x*(1-t)+a.x*t,y:i.y*(1-t)+a.y*t,radius:i.radius*(1-t)+a.radius*t}}),m)}let A=E.selectAll(`.venn-area`).data(_,e=>e.sets),j=A.enter().append(`g`).attr(`class`,e=>`venn-area venn-${e.sets.length==1?`circle`:`intersection`}${e.colour||e.color?` venn-coloured`:``}`).attr(`data-venn-sets`,e=>e.sets.join(`_`)),M=j.append(`path`),N=j.append(`text`).attr(`class`,`label`).text(e=>T(e)).attr(`text-anchor`,`middle`).attr(`dy`,`.35em`).attr(`x`,n/2).attr(`y`,r/2);u&&(M.style(`fill-opacity`,`0`).filter(e=>e.sets.length==1).style(`fill`,e=>e.colour?e.colour:e.color?e.color:y(e.sets)).style(`fill-opacity`,`.25`),N.style(`fill`,t=>t.colour||t.color?`#FFF`:e.textFill?e.textFill:t.sets.length==1?y(t.sets):`#444`));function P(e){return typeof e.transition==`function`?e.transition(`venn`).duration(a):e}let F=g;O&&typeof F.transition==`function`?(F=P(g),F.selectAll(`path`).attrTween(`d`,k)):F.selectAll(`path`).attr(`d`,e=>Ce(e.sets.map(e=>S[e])),m);let I=F.selectAll(`text`).filter(e=>e.sets in C).text(e=>T(e)).attr(`x`,e=>Math.floor(C[e.sets].x)).attr(`y`,e=>Math.floor(C[e.sets].y));l&&(O?`on`in I?I.on(`end`,H(S,T)):I.each(`end`,H(S,T)):I.each(H(S,T)));let L=P(A.exit()).remove();typeof A.transition==`function`&&L.selectAll(`path`).attrTween(`d`,k);let R=L.selectAll(`text`).attr(`x`,n/2).attr(`y`,r/2);return d!==null&&(N.style(`font-size`,`0px`),I.style(`font-size`,d),R.style(`font-size`,`0px`)),{circles:S,textCentres:C,nodes:A,enter:j,update:F,exit:L}}return S.wrap=function(e){return arguments.length?(l=e,S):l},S.useViewBox=function(){return t=!0,S},S.width=function(e){return arguments.length?(n=e,S):n},S.height=function(e){return arguments.length?(r=e,S):r},S.padding=function(e){return arguments.length?(i=e,S):i},S.distinct=function(e){return arguments.length?(p=e,S):p},S.colours=function(e){return arguments.length?(y=e,S):y},S.colors=function(e){return arguments.length?(y=e,S):y},S.fontSize=function(e){return arguments.length?(d=e,S):d},S.round=function(e){return arguments.length?(m=e,S):m},S.duration=function(e){return arguments.length?(a=e,S):a},S.layoutFunction=function(e){return arguments.length?(b=e,S):b},S.normalize=function(e){return arguments.length?(s=e,S):s},S.scaleToFit=function(e){return arguments.length?(c=e,S):c},S.styled=function(e){return arguments.length?(u=e,S):u},S.orientation=function(e){return arguments.length?(o=e,S):o},S.orientationOrder=function(e){return arguments.length?(f=e,S):f},S.lossFunction=function(e){return arguments.length?(x=e===`default`?B:e===`logRatio`?ce:e,S):x},S}function H(e,t){return function(n){let r=this,i=e[n.sets[0]].radius||50,a=t(n)||``,o=a.split(/\s+/).reverse(),s=(a.length+o.length)/3,c=o.pop(),l=[c],u=0,d=1.1;r.textContent=null;let f=[];function p(e){let t=r.ownerDocument.createElementNS(r.namespaceURI,`tspan`);return t.textContent=e,f.push(t),r.append(t),t}let m=p(c);for(;c=o.pop(),c;){l.push(c);let e=l.join(` `);m.textContent=e,e.length>s&&m.getComputedTextLength()>i&&(l.pop(),m.textContent=l.join(` `),l=[c],m=p(c),u++)}let h=.35-u*d/2,g=r.getAttribute(`x`),_=r.getAttribute(`y`);f.forEach((e,t)=>{e.setAttribute(`x`,g),e.setAttribute(`y`,_),e.setAttribute(`dy`,`${h+t*d}em`)})}}function U(e,t,n){let r=t[0].radius-T(t[0],e);for(let n=1;n<t.length;++n){let i=t[n].radius-T(t[n],e);i<=r&&(r=i)}for(let t=0;t<n.length;++t){let i=T(n[t],e)-n[t].radius;i<=r&&(r=i)}return r}function ge(e,t,n){let r=[];for(let t of e)r.push({x:t.x,y:t.y}),r.push({x:t.x+t.radius/2,y:t.y}),r.push({x:t.x-t.radius/2,y:t.y}),r.push({x:t.x,y:t.y+t.radius/2}),r.push({x:t.x,y:t.y-t.radius/2});let i=r[0],a=U(r[0],e,t);for(let n=1;n<r.length;++n){let o=U(r[n],e,t);o>=a&&(i=r[n],a=o)}let o=I(n=>-1*U({x:n[0],y:n[1]},e,t),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,s={x:n?0:o[0],y:o[1]},c=!0;for(let t of e)if(T(s,t)>t.radius){c=!1;break}for(let e of t)if(T(s,e)<e.radius){c=!1;break}if(c)return s;if(e.length==1)return{x:e[0].x,y:e[0].y};let l={};return x(e,l),l.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:l.arcs.length==1?{x:l.arcs[0].circle.x,y:l.arcs[0].circle.y}:t.length?ge(e,[]):O(l.arcs.map(e=>e.p1))}function _e(e){let t={},n=Object.keys(e);for(let e of n)t[e]=[];for(let r=0;r<n.length;r++){let i=n[r],a=e[i];for(let o=r+1;o<n.length;++o){let r=n[o],s=e[r],c=T(a,s);c+s.radius<=a.radius+1e-10?t[r].push(i):c+a.radius<=s.radius+1e-10&&t[i].push(r)}}return t}function ve(e,t,n){let r={},i=_e(e);for(let a=0;a<t.length;++a){let o=t[a].sets,s={},c={};for(let e=0;e<o.length;++e){s[o[e]]=!0;let t=i[o[e]];for(let e=0;e<t.length;++e)c[t[e]]=!0}let l=[],u=[];for(let t in e)t in s?l.push(e[t]):t in c||u.push(e[t]);let d=ge(l,u,n);r[o]=d,d.disjoint&&t[a].size>0&&console.log(`WARNING: area `+o+` not represented on screen`)}return r}function ye(e,t,n){let r=[];return r.push(`
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-BAUBUeAF.js";import"./src--OxBHrEw.js";import{H as t,K as n,U as r,a as i,b as a,c as o,et as s,f as c,nt as l,rt as u,tt as d,v as f,w as p,y as m}from"./chunk-WYO6CB5R-9yPqK9ib.js";import{C as h}from"./src-DNE52RZP.js";import{i as g}from"./chunk-ICXQ74PX-CDyWyZCQ.js";import{t as _}from"./chunk-VAUOI2AC-buA1NS7h.js";import{t as v}from"./rough.esm-esi5HKC4.js";var y=(e,t)=>l(e,`a`,-t),b=1e-10;function x(e,t){let n=C(e),r=n.filter(t=>S(t,e)),i=0,a=0,o=[];if(r.length>1){let t=O(r);for(let e=0;e<r.length;++e){let n=r[e];n.angle=Math.atan2(n.x-t.x,n.y-t.y)}r.sort((e,t)=>t.angle-e.angle);let n=r[r.length-1];for(let t=0;t<r.length;++t){let s=r[t];a+=(n.x+s.x)*(s.y-n.y);let c={x:(s.x+n.x)/2,y:(s.y+n.y)/2},l=null;for(let t=0;t<s.parentIndex.length;++t)if(n.parentIndex.includes(s.parentIndex[t])){let r=e[s.parentIndex[t]],i=Math.atan2(s.x-r.x,s.y-r.y),a=Math.atan2(n.x-r.x,n.y-r.y),o=a-i;o<0&&(o+=2*Math.PI);let u=a-o/2,d=T(c,{x:r.x+r.radius*Math.sin(u),y:r.y+r.radius*Math.cos(u)});d>r.radius*2&&(d=r.radius*2),(l==null||l.width>d)&&(l={circle:r,width:d,p1:s,p2:n,large:d>r.radius,sweep:!0})}l!=null&&(o.push(l),i+=w(l.circle.radius,l.width),n=s)}}else{let t=e[0];for(let n=1;n<e.length;++n)e[n].radius<t.radius&&(t=e[n]);let n=!1;for(let r=0;r<e.length;++r)if(T(e[r],t)>Math.abs(t.radius-e[r].radius)){n=!0;break}n?i=a=0:(i=t.radius*t.radius*Math.PI,o.push({circle:t,p1:{x:t.x,y:t.y+t.radius},p2:{x:t.x-b,y:t.y+t.radius},width:t.radius*2,large:!0,sweep:!0}))}return a/=2,t&&(t.area=i+a,t.arcArea=i,t.polygonArea=a,t.arcs=o,t.innerPoints=r,t.intersectionPoints=n),i+a}function S(e,t){return t.every(t=>T(e,t)<t.radius+b)}function C(e){let t=[];for(let n=0;n<e.length;++n)for(let r=n+1;r<e.length;++r){let i=D(e[n],e[r]);for(let e of i)e.parentIndex=[n,r],t.push(e)}return t}function w(e,t){return e*e*Math.acos(1-t/e)-(e-t)*Math.sqrt(t*(2*e-t))}function T(e,t){return Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))}function E(e,t,n){if(n>=e+t)return 0;if(n<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);let r=e-(n*n-t*t+e*e)/(2*n),i=t-(n*n-e*e+t*t)/(2*n);return w(e,r)+w(t,i)}function D(e,t){let n=T(e,t),r=e.radius,i=t.radius;if(n>=r+i||n<=Math.abs(r-i))return[];let a=(r*r-i*i+n*n)/(2*n),o=Math.sqrt(r*r-a*a),s=e.x+a*(t.x-e.x)/n,c=e.y+a*(t.y-e.y)/n,l=-(t.y-e.y)*(o/n),u=-(t.x-e.x)*(o/n);return[{x:s+l,y:c-u},{x:s-l,y:c+u}]}function O(e){let t={x:0,y:0};for(let n of e)t.x+=n.x,t.y+=n.y;return t.x/=e.length,t.y/=e.length,t}function k(e,t,n,r){r||={};let i=r.maxIterations||100,a=r.tolerance||1e-10,o=e(t),s=e(n),c=n-t;if(o*s>0)throw`Initial bisect points must have opposite signs`;if(o===0)return t;if(s===0)return n;for(let n=0;n<i;++n){c/=2;let n=t+c,r=e(n);if(r*o>=0&&(t=n),Math.abs(c)<a||r===0)return n}return t+c}function A(e){let t=Array(e);for(let n=0;n<e;++n)t[n]=0;return t}function j(e,t){return A(e).map(()=>A(t))}function M(e,t){let n=0;for(let r=0;r<e.length;++r)n+=e[r]*t[r];return n}function N(e){return Math.sqrt(M(e,e))}function P(e,t,n){for(let r=0;r<t.length;++r)e[r]=t[r]*n}function F(e,t,n,r,i){for(let a=0;a<e.length;++a)e[a]=t*n[a]+r*i[a]}function I(e,t,n){n||={};let r=n.maxIterations||t.length*200,i=n.nonZeroDelta||1.05,a=n.zeroDelta||.001,o=n.minErrorDelta||1e-6,s=n.minErrorDelta||1e-5,c=n.rho===void 0?1:n.rho,l=n.chi===void 0?2:n.chi,u=n.psi===void 0?-.5:n.psi,d=n.sigma===void 0?.5:n.sigma,f,p=t.length,m=Array(p+1);m[0]=t,m[0].fx=e(t),m[0].id=0;for(let n=0;n<p;++n){let r=t.slice();r[n]=r[n]?r[n]*i:a,m[n+1]=r,m[n+1].fx=e(r),m[n+1].id=n+1}function h(e){for(let t=0;t<e.length;t++)m[p][t]=e[t];m[p].fx=e.fx}let g=(e,t)=>e.fx-t.fx,_=t.slice(),v=t.slice(),y=t.slice(),b=t.slice();for(let t=0;t<r;++t){if(m.sort(g),n.history){let e=m.map(e=>{let t=e.slice();return t.fx=e.fx,t.id=e.id,t});e.sort((e,t)=>e.id-t.id),n.history.push({x:m[0].slice(),fx:m[0].fx,simplex:e})}f=0;for(let e=0;e<p;++e)f=Math.max(f,Math.abs(m[0][e]-m[1][e]));if(Math.abs(m[0].fx-m[p].fx)<o&&f<s)break;for(let e=0;e<p;++e){_[e]=0;for(let t=0;t<p;++t)_[e]+=m[t][e];_[e]/=p}let t=m[p];if(F(v,1+c,_,-c,t),v.fx=e(v),v.fx<m[0].fx)F(b,1+l,_,-l,t),b.fx=e(b),b.fx<v.fx?h(b):h(v);else if(v.fx>=m[p-1].fx){let n=!1;if(v.fx>t.fx?(F(y,1+u,_,-u,t),y.fx=e(y),y.fx<t.fx?h(y):n=!0):(F(y,1-u*c,_,u*c,t),y.fx=e(y),y.fx<v.fx?h(y):n=!0),n){if(d>=1)break;for(let t=1;t<m.length;++t)F(m[t],1-d,m[0],d,m[t]),m[t].fx=e(m[t])}}else h(v)}return m.sort(g),{fx:m[0].fx,x:m[0]}}function L(e,t,n,r,i,a,o){let s=n.fx,c=M(n.fxprime,t),l=s,u=s,d=c,f=0;i||=1,a||=1e-6,o||=.1;function p(u,f,p){for(let m=0;m<16;++m)if(i=(u+f)/2,F(r.x,1,n.x,i,t),l=r.fx=e(r.x,r.fxprime),d=M(r.fxprime,t),l>s+a*i*c||l>=p)f=i;else{if(Math.abs(d)<=-o*c)return i;d*(f-u)>=0&&(f=u),u=i,p=l}return 0}for(let m=0;m<10;++m){if(F(r.x,1,n.x,i,t),l=r.fx=e(r.x,r.fxprime),d=M(r.fxprime,t),l>s+a*i*c||m&&l>=u)return p(f,i,u);if(Math.abs(d)<=-o*c)return i;if(d>=0)return p(i,f,l);u=l,f=i,i*=2}return i}function R(e,t,n){let r={x:t.slice(),fx:0,fxprime:t.slice()},i={x:t.slice(),fx:0,fxprime:t.slice()},a=t.slice(),o,s,c=1,l;n||={},l=n.maxIterations||t.length*20,r.fx=e(r.x,r.fxprime),o=r.fxprime.slice(),P(o,r.fxprime,-1);for(let t=0;t<l;++t){if(c=L(e,o,r,i,c),n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:c}),!c)P(o,r.fxprime,-1);else{F(a,1,i.fxprime,-1,r.fxprime);let e=M(r.fxprime,r.fxprime),t=Math.max(0,M(a,i.fxprime)/e);F(o,t,o,-1,i.fxprime),s=r,r=i,i=s}if(N(r.fxprime)<=1e-5)break}return n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:c}),r}function ee(e,t={}){t.maxIterations=t.maxIterations||500;let n=t.initialLayout||ae,r=t.lossFunction||B,i=ne(e,t),a=n(i,t),o=Object.keys(a),s=[];for(let e of o)s.push(a[e].x),s.push(a[e].y);let c=I(e=>{let t={};for(let n=0;n<o.length;++n){let r=o[n];t[r]={x:e[2*n],y:e[2*n+1],radius:a[r].radius}}return r(t,i)},s,t).x;for(let e=0;e<o.length;++e){let t=o[e];a[t].x=c[2*e],a[t].y=c[2*e+1]}return a}var te=1e-10;function z(e,t,n){return Math.min(e,t)*Math.min(e,t)*Math.PI<=n+te?Math.abs(e-t):k(r=>E(e,t,r)-n,0,e+t)}function ne(e,t={}){let n=t.distinct,r=e.map(e=>Object.assign({},e));function i(e){return e.join(`;`)}if(n){let e=new Map;for(let t of r)for(let n=0;n<t.sets.length;n++){let r=String(t.sets[n]);e.set(r,t.size+(e.get(r)||0));for(let i=n+1;i<t.sets.length;i++){let n=String(t.sets[i]),a=`${r};${n}`,o=`${n};${r}`;e.set(a,t.size+(e.get(a)||0)),e.set(o,t.size+(e.get(o)||0))}}for(let t of r)t.sets.length<3&&(t.size=e.get(i(t.sets)))}let a=[],o=new Set;for(let e of r)if(e.sets.length===1)a.push(e.sets[0]);else if(e.sets.length===2){let t=e.sets[0],n=e.sets[1];o.add(i(e.sets)),o.add(i([n,t]))}a.sort((e,t)=>e===t?0:e<t?-1:1);for(let e=0;e<a.length;++e){let t=a[e];for(let n=e+1;n<a.length;++n){let e=a[n];o.has(i([t,e]))||r.push({sets:[t,e],size:0})}}return r}function re(e,t,n){let r=j(t.length,t.length),i=j(t.length,t.length);return e.filter(e=>e.sets.length===2).forEach(e=>{let a=n[e.sets[0]],o=n[e.sets[1]],s=z(Math.sqrt(t[a].size/Math.PI),Math.sqrt(t[o].size/Math.PI),e.size);r[a][o]=r[o][a]=s;let c=0;e.size+1e-10>=Math.min(t[a].size,t[o].size)?c=1:e.size<=1e-10&&(c=-1),i[a][o]=i[o][a]=c}),{distances:r,constraints:i}}function ie(e,t,n,r){for(let e=0;e<t.length;++e)t[e]=0;let i=0;for(let a=0;a<n.length;++a){let o=e[2*a],s=e[2*a+1];for(let c=a+1;c<n.length;++c){let l=e[2*c],u=e[2*c+1],d=n[a][c],f=r[a][c],p=(l-o)*(l-o)+(u-s)*(u-s),m=Math.sqrt(p),h=p-d*d;f>0&&m<=d||f<0&&m>=d||(i+=2*h*h,t[2*a]+=4*h*(o-l),t[2*a+1]+=4*h*(s-u),t[2*c]+=4*h*(l-o),t[2*c+1]+=4*h*(u-s))}}return i}function ae(e,t={}){let n=se(e,t),r=t.lossFunction||B;if(e.length>=8){let i=oe(e,t),a=r(i,e),o=r(n,e);a+1e-8<o&&(n=i)}return n}function oe(e,t={}){let n=t.restarts||10,r=[],i={};for(let t of e)t.sets.length===1&&(i[t.sets[0]]=r.length,r.push(t));let{distances:a,constraints:o}=re(e,r,i),s=N(a.map(N))/a.length;a=a.map(e=>e.map(e=>e/s));let c=(e,t)=>ie(e,t,a,o),l=null;for(let e=0;e<n;++e){let e=R(c,A(a.length*2).map(Math.random),t);(!l||e.fx<l.fx)&&(l=e)}let u=l.x,d={};for(let e=0;e<r.length;++e){let t=r[e];d[t.sets[0]]={x:u[2*e]*s,y:u[2*e+1]*s,radius:Math.sqrt(t.size/Math.PI)}}if(t.history)for(let e of t.history)P(e.x,s);return d}function se(e,t){let n=t&&t.lossFunction?t.lossFunction:B,r={},i={};for(let t of e)if(t.sets.length===1){let e=t.sets[0];r[e]={x:1e10,y:1e10,rowid:r.length,size:t.size,radius:Math.sqrt(t.size/Math.PI)},i[e]=[]}e=e.filter(e=>e.sets.length===2);for(let t of e){let e=t.weight==null?1:t.weight,n=t.sets[0],a=t.sets[1];t.size+te>=Math.min(r[n].size,r[a].size)&&(e=0),i[n].push({set:a,size:t.size,weight:e}),i[a].push({set:n,size:t.size,weight:e})}let a=[];Object.keys(i).forEach(e=>{let t=0;for(let n=0;n<i[e].length;++n)t+=i[e][n].size*i[e][n].weight;a.push({set:e,size:t})});function o(e,t){return t.size-e.size}a.sort(o);let s={};function c(e){return e.set in s}function l(e,t){r[t].x=e.x,r[t].y=e.y,s[t]=!0}l({x:0,y:0},a[0].set);for(let t=1;t<a.length;++t){let s=a[t].set,d=i[s].filter(c),f=r[s];if(d.sort(o),d.length===0)throw`ERROR: missing pairwise overlap information`;let p=[];for(var u=0;u<d.length;++u){let e=r[d[u].set],t=z(f.radius,e.radius,d[u].size);p.push({x:e.x+t,y:e.y}),p.push({x:e.x-t,y:e.y}),p.push({y:e.y+t,x:e.x}),p.push({y:e.y-t,x:e.x});for(let n=u+1;n<d.length;++n){let i=r[d[n].set],a=z(f.radius,i.radius,d[n].size),o=D({x:e.x,y:e.y,radius:t},{x:i.x,y:i.y,radius:a});p.push(...o)}}let m=1e50,h=p[0];for(let t of p){r[s].x=t.x,r[s].y=t.y;let i=n(r,e);i<m&&(m=i,h=t)}l(h,s)}return r}function B(e,t){let n=0;for(let r of t){if(r.sets.length===1)continue;let t;if(r.sets.length===2){let n=e[r.sets[0]],i=e[r.sets[1]];t=E(n.radius,i.radius,T(n,i))}else t=x(r.sets.map(t=>e[t]));let i=r.weight==null?1:r.weight;n+=i*(t-r.size)*(t-r.size)}return n}function ce(e,t){let n=0;for(let r of t){if(r.sets.length===1)continue;let t;if(r.sets.length===2){let n=e[r.sets[0]],i=e[r.sets[1]];t=E(n.radius,i.radius,T(n,i))}else t=x(r.sets.map(t=>e[t]));let i=r.weight==null?1:r.weight,a=Math.log((t+1)/(r.size+1));n+=i*a*a}return n}function le(e,t,n){if(n==null?e.sort((e,t)=>t.radius-e.radius):e.sort(n),e.length>0){let t=e[0].x,n=e[0].y;for(let r of e)r.x-=t,r.y-=n}if(e.length===2&&T(e[0],e[1])<Math.abs(e[1].radius-e[0].radius)&&(e[1].x=e[0].x+e[0].radius-e[1].radius-1e-10,e[1].y=e[0].y),e.length>1){let n=Math.atan2(e[1].x,e[1].y)-t,r=Math.cos(n),i=Math.sin(n);for(let t of e){let e=t.x,n=t.y;t.x=r*e-i*n,t.y=i*e+r*n}}if(e.length>2){let n=Math.atan2(e[2].x,e[2].y)-t;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){let t=e[1].y/(1e-10+e[1].x);for(let n of e){var r=(n.x+t*n.y)/(1+t*t);n.x=2*r-n.x,n.y=2*r*t-n.y}}}}function ue(e){e.forEach(e=>{e.parent=e});function t(e){return e.parent!==e&&(e.parent=t(e.parent)),e.parent}function n(e,n){let r=t(e);r.parent=t(n)}for(let t=0;t<e.length;++t)for(let r=t+1;r<e.length;++r){let i=e[t].radius+e[r].radius;T(e[t],e[r])+1e-10<i&&n(e[r],e[t])}let r=new Map;for(let n=0;n<e.length;++n){let i=t(e[n]).parent.setid;r.has(i)||r.set(i,[]),r.get(i).push(e[n])}return e.forEach(e=>{delete e.parent}),Array.from(r.values())}function V(e){let t=t=>({max:e.reduce((e,n)=>Math.max(e,n[t]+n.radius),-1/0),min:e.reduce((e,n)=>Math.min(e,n[t]-n.radius),1/0)});return{xRange:t(`x`),yRange:t(`y`)}}function de(e,t,n){t??=Math.PI/2;let r=me(e).map(e=>Object.assign({},e)),i=ue(r);for(let e of i){le(e,t,n);let r=V(e);e.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),e.bounds=r}i.sort((e,t)=>t.size-e.size),r=i[0];let a=r.bounds,o=(a.xRange.max-a.xRange.min)/50;function s(e,t,n){if(!e)return;let i=e.bounds,s,c;if(t)s=a.xRange.max-i.xRange.min+o;else{s=a.xRange.max-i.xRange.max;let e=(i.xRange.max-i.xRange.min)/2-(a.xRange.max-a.xRange.min)/2;e<0&&(s+=e)}if(n)c=a.yRange.max-i.yRange.min+o;else{c=a.yRange.max-i.yRange.max;let e=(i.yRange.max-i.yRange.min)/2-(a.yRange.max-a.yRange.min)/2;e<0&&(c+=e)}for(let t of e)t.x+=s,t.y+=c,r.push(t)}let c=1;for(;c<i.length;)s(i[c],!0,!1),s(i[c+1],!1,!0),s(i[c+2],!0,!0),c+=3,a=V(r);return pe(r)}function fe(e,t,n,r,i){let a=me(e);t-=2*r,n-=2*r;let{xRange:o,yRange:s}=V(a);if(o.max===o.min||s.max===s.min)return console.log(`not scaling solution: zero size detected`),e;let c,l;if(i){let e=Math.sqrt(i/Math.PI)*2;c=t/e,l=n/e}else c=t/(o.max-o.min),l=n/(s.max-s.min);let u=Math.min(l,c),d=(t-(o.max-o.min)*u)/2,f=(n-(s.max-s.min)*u)/2;return pe(a.map(e=>({radius:u*e.radius,x:r+d+(e.x-o.min)*u,y:r+f+(e.y-s.min)*u,setid:e.setid})))}function pe(e){let t={};for(let n of e)t[n.setid]=n;return t}function me(e){return Object.keys(e).map(t=>Object.assign(e[t],{setid:t}))}function he(e={}){let t=!1,n=600,r=350,i=15,a=1e3,o=Math.PI/2,s=!0,c=null,l=!0,u=!0,d=null,f=null,p=!1,m=null,h=e&&e.symmetricalTextCentre?e.symmetricalTextCentre:!1,g={},_=e&&e.colourScheme?e.colourScheme:e&&e.colorScheme?e.colorScheme:[`#1f77b4`,`#ff7f0e`,`#2ca02c`,`#d62728`,`#9467bd`,`#8c564b`,`#e377c2`,`#7f7f7f`,`#bcbd22`,`#17becf`],v=0,y=function(e){if(e in g)return g[e];var t=g[e]=_[v];return v+=1,v>=_.length&&(v=0),t},b=ee,x=B;function S(g){let _=g.datum(),v=new Set;_.forEach(e=>{e.size==0&&e.sets.length==1&&v.add(e.sets[0])}),_=_.filter(e=>!e.sets.some(e=>v.has(e)));let S={},C={};if(_.length>0){let e=b(_,{lossFunction:x,distinct:p});s&&(e=de(e,o,f)),S=fe(e,n,r,i,c),C=ve(S,_,h)}let w={};_.forEach(e=>{e.label&&(w[e.sets]=e.label)});function T(e){if(e.sets in w)return w[e.sets];if(e.sets.length==1)return``+e.sets[0]}g.selectAll(`svg`).data([S]).enter().append(`svg`);let E=g.select(`svg`);t?E.attr(`viewBox`,`0 0 ${n} ${r}`):E.attr(`width`,n).attr(`height`,r);let D={},O=!1;E.selectAll(`.venn-area path`).each(function(e){let t=this.getAttribute(`d`);e.sets.length==1&&t&&!p&&(O=!0,D[e.sets[0]]=be(t))});function k(e){return t=>Ce(e.sets.map(e=>{let i=D[e],a=S[e];return i||={x:n/2,y:r/2,radius:1},a||={x:n/2,y:r/2,radius:1},{x:i.x*(1-t)+a.x*t,y:i.y*(1-t)+a.y*t,radius:i.radius*(1-t)+a.radius*t}}),m)}let A=E.selectAll(`.venn-area`).data(_,e=>e.sets),j=A.enter().append(`g`).attr(`class`,e=>`venn-area venn-${e.sets.length==1?`circle`:`intersection`}${e.colour||e.color?` venn-coloured`:``}`).attr(`data-venn-sets`,e=>e.sets.join(`_`)),M=j.append(`path`),N=j.append(`text`).attr(`class`,`label`).text(e=>T(e)).attr(`text-anchor`,`middle`).attr(`dy`,`.35em`).attr(`x`,n/2).attr(`y`,r/2);u&&(M.style(`fill-opacity`,`0`).filter(e=>e.sets.length==1).style(`fill`,e=>e.colour?e.colour:e.color?e.color:y(e.sets)).style(`fill-opacity`,`.25`),N.style(`fill`,t=>t.colour||t.color?`#FFF`:e.textFill?e.textFill:t.sets.length==1?y(t.sets):`#444`));function P(e){return typeof e.transition==`function`?e.transition(`venn`).duration(a):e}let F=g;O&&typeof F.transition==`function`?(F=P(g),F.selectAll(`path`).attrTween(`d`,k)):F.selectAll(`path`).attr(`d`,e=>Ce(e.sets.map(e=>S[e])),m);let I=F.selectAll(`text`).filter(e=>e.sets in C).text(e=>T(e)).attr(`x`,e=>Math.floor(C[e.sets].x)).attr(`y`,e=>Math.floor(C[e.sets].y));l&&(O?`on`in I?I.on(`end`,H(S,T)):I.each(`end`,H(S,T)):I.each(H(S,T)));let L=P(A.exit()).remove();typeof A.transition==`function`&&L.selectAll(`path`).attrTween(`d`,k);let R=L.selectAll(`text`).attr(`x`,n/2).attr(`y`,r/2);return d!==null&&(N.style(`font-size`,`0px`),I.style(`font-size`,d),R.style(`font-size`,`0px`)),{circles:S,textCentres:C,nodes:A,enter:j,update:F,exit:L}}return S.wrap=function(e){return arguments.length?(l=e,S):l},S.useViewBox=function(){return t=!0,S},S.width=function(e){return arguments.length?(n=e,S):n},S.height=function(e){return arguments.length?(r=e,S):r},S.padding=function(e){return arguments.length?(i=e,S):i},S.distinct=function(e){return arguments.length?(p=e,S):p},S.colours=function(e){return arguments.length?(y=e,S):y},S.colors=function(e){return arguments.length?(y=e,S):y},S.fontSize=function(e){return arguments.length?(d=e,S):d},S.round=function(e){return arguments.length?(m=e,S):m},S.duration=function(e){return arguments.length?(a=e,S):a},S.layoutFunction=function(e){return arguments.length?(b=e,S):b},S.normalize=function(e){return arguments.length?(s=e,S):s},S.scaleToFit=function(e){return arguments.length?(c=e,S):c},S.styled=function(e){return arguments.length?(u=e,S):u},S.orientation=function(e){return arguments.length?(o=e,S):o},S.orientationOrder=function(e){return arguments.length?(f=e,S):f},S.lossFunction=function(e){return arguments.length?(x=e===`default`?B:e===`logRatio`?ce:e,S):x},S}function H(e,t){return function(n){let r=this,i=e[n.sets[0]].radius||50,a=t(n)||``,o=a.split(/\s+/).reverse(),s=(a.length+o.length)/3,c=o.pop(),l=[c],u=0,d=1.1;r.textContent=null;let f=[];function p(e){let t=r.ownerDocument.createElementNS(r.namespaceURI,`tspan`);return t.textContent=e,f.push(t),r.append(t),t}let m=p(c);for(;c=o.pop(),c;){l.push(c);let e=l.join(` `);m.textContent=e,e.length>s&&m.getComputedTextLength()>i&&(l.pop(),m.textContent=l.join(` `),l=[c],m=p(c),u++)}let h=.35-u*d/2,g=r.getAttribute(`x`),_=r.getAttribute(`y`);f.forEach((e,t)=>{e.setAttribute(`x`,g),e.setAttribute(`y`,_),e.setAttribute(`dy`,`${h+t*d}em`)})}}function U(e,t,n){let r=t[0].radius-T(t[0],e);for(let n=1;n<t.length;++n){let i=t[n].radius-T(t[n],e);i<=r&&(r=i)}for(let t=0;t<n.length;++t){let i=T(n[t],e)-n[t].radius;i<=r&&(r=i)}return r}function ge(e,t,n){let r=[];for(let t of e)r.push({x:t.x,y:t.y}),r.push({x:t.x+t.radius/2,y:t.y}),r.push({x:t.x-t.radius/2,y:t.y}),r.push({x:t.x,y:t.y+t.radius/2}),r.push({x:t.x,y:t.y-t.radius/2});let i=r[0],a=U(r[0],e,t);for(let n=1;n<r.length;++n){let o=U(r[n],e,t);o>=a&&(i=r[n],a=o)}let o=I(n=>-1*U({x:n[0],y:n[1]},e,t),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,s={x:n?0:o[0],y:o[1]},c=!0;for(let t of e)if(T(s,t)>t.radius){c=!1;break}for(let e of t)if(T(s,e)<e.radius){c=!1;break}if(c)return s;if(e.length==1)return{x:e[0].x,y:e[0].y};let l={};return x(e,l),l.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:l.arcs.length==1?{x:l.arcs[0].circle.x,y:l.arcs[0].circle.y}:t.length?ge(e,[]):O(l.arcs.map(e=>e.p1))}function _e(e){let t={},n=Object.keys(e);for(let e of n)t[e]=[];for(let r=0;r<n.length;r++){let i=n[r],a=e[i];for(let o=r+1;o<n.length;++o){let r=n[o],s=e[r],c=T(a,s);c+s.radius<=a.radius+1e-10?t[r].push(i):c+a.radius<=s.radius+1e-10&&t[i].push(r)}}return t}function ve(e,t,n){let r={},i=_e(e);for(let a=0;a<t.length;++a){let o=t[a].sets,s={},c={};for(let e=0;e<o.length;++e){s[o[e]]=!0;let t=i[o[e]];for(let e=0;e<t.length;++e)c[t[e]]=!0}let l=[],u=[];for(let t in e)t in s?l.push(e[t]):t in c||u.push(e[t]);let d=ge(l,u,n);r[o]=d,d.disjoint&&t[a].size>0&&console.log(`WARNING: area `+o+` not represented on screen`)}return r}function ye(e,t,n){let r=[];return r.push(`
|
|
2
2
|
M`,e,t),r.push(`
|
|
3
3
|
m`,-n,0),r.push(`
|
|
4
4
|
a`,n,n,0,1,0,n*2,0),r.push(`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-KEIR6QF5-zkgbDrf9.js";import{n as e}from"./chunk-5FCAYU7R-8Y9BJKC-.js";export{e as createWardleyServices};
|