@p4code/cli 0.8.26 → 0.8.27
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/bin.mjs +1 -1
- package/dist/{binCli-DgjAnX7K.mjs → binCli-CPTSeXBG.mjs} +2 -2
- package/dist/client/.vite/manifest.json +1322 -1322
- package/dist/client/assets/{AuthSurfaceShell-B0GeuqGG.js → AuthSurfaceShell-Io9UMk5e.js} +2 -2
- package/dist/client/assets/{ChatGptUsageButton-BsRw7PIG.js → ChatGptUsageButton-C5QxZxAY.js} +2 -2
- package/dist/client/assets/{ChatMarkdown-B_7CYt1t.js → ChatMarkdown-n-Pmpt9I.js} +4 -4
- package/dist/client/assets/{CodexSetupSection.logic-CAeeNfjx.js → CodexSetupSection.logic-452dIoYg.js} +2 -2
- package/dist/client/assets/{CommandBlock-a6FR0Qjq.js → CommandBlock-BI6CIDH1.js} +2 -2
- package/dist/client/assets/{ComposerPromptEditor-JiLuF8sa.js → ComposerPromptEditor-3AzcmrcZ.js} +4 -4
- package/dist/client/assets/{DevicePanel-BCkjPnRB.js → DevicePanel-CglyhaAG.js} +2 -2
- package/dist/client/assets/{DeviceSetup-jQhLCRQB.js → DeviceSetup-Bazjz7NZ.js} +2 -2
- package/dist/client/assets/{DiffCommentAnnotation-Ce3fywCz.js → DiffCommentAnnotation-aW33-n8Z.js} +2 -2
- package/dist/client/assets/{DiffFileTree-Ch8ghRNl.js → DiffFileTree-BUpgXQ-A.js} +2 -2
- package/dist/client/assets/{DiffPanel-BYdDuPJL.js → DiffPanel-C7V9CYKL.js} +2 -2
- package/dist/client/assets/{DiffWorkerPoolProvider-CCTRrTde.js → DiffWorkerPoolProvider-DMh_rKAW.js} +2 -2
- package/dist/client/assets/{EmbeddedDesign-BasGnrZc.js → EmbeddedDesign-C5OUFTlD.js} +2 -2
- package/dist/client/assets/{FileDiff-HO0wYuF-.js → FileDiff-CSn7_lgS.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-BWAkLnOF.js → FilePreviewPanel-3-FZcESN.js} +2 -2
- package/dist/client/assets/{FoldedSettingsSection-itwybIpg.js → FoldedSettingsSection-f9BtRG8P.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-1ktyCaCR.js → NoProjectsHero-BvLl09sT.js} +2 -2
- package/dist/client/assets/{P4ConnectAccountPages-C8kjCH2i.js → P4ConnectAccountPages-55eXXvOR.js} +2 -2
- package/dist/client/assets/{P4ConnectSidebarSignIn-De0TqOBv.js → P4ConnectSidebarSignIn-CJxHyKxw.js} +2 -2
- package/dist/client/assets/{PanelLayoutControls-CRn29ViL.js → PanelLayoutControls-BVds3zWp.js} +4 -4
- package/dist/client/assets/{PierreEntryIcon-DZSPzXnW.js → PierreEntryIcon-BfQvfMe4.js} +2 -2
- package/dist/client/assets/{PreviewPanel-CPU0sstq.js → PreviewPanel-Cj2fiJWr.js} +2 -2
- package/dist/client/assets/{ProjectDefaultsSettings-Ibem_Z4L.js → ProjectDefaultsSettings-CD7_iiCV.js} +2 -2
- package/dist/client/assets/{ProjectFavicon-CE_urBAW.js → ProjectFavicon-DZ3q6Z0H.js} +3 -3
- package/dist/client/assets/{ProjectIconPickerDialog-D0OZSLq9.js → ProjectIconPickerDialog-BHl4mXHB.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-Ddl4fv02.js → ProviderAuthTerminal-CFc0xySv.js} +2 -2
- package/dist/client/assets/{ProviderModelPicker-BTTJn7iC.js → ProviderModelPicker-C8efuVrz.js} +2 -2
- package/dist/client/assets/{ProviderSettingsForm-CGRf8WX5.js → ProviderSettingsForm-DFLuI_nx.js} +2 -2
- package/dist/client/assets/{PullRequestCodeTab-CWg3y2Hg.js → PullRequestCodeTab-DRVlxTwy.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-B2RUv5et.js → ReadOnlySourcePreview-Bu2_ZtA-.js} +2 -2
- package/dist/client/assets/{RenderErrorBoundary-BE9pu802.js → RenderErrorBoundary-D4jGtlFT.js} +2 -2
- package/dist/client/assets/{ScheduledTasksSettings-LlwIif-M.js → ScheduledTasksSettings-C0hXWVvl.js} +2 -2
- package/dist/client/assets/{ScopedSwitch-DM7op4tT.js → ScopedSwitch-LBZ02wBh.js} +2 -2
- package/dist/client/assets/{SettingsPanels-BJZmVkq6.js → SettingsPanels-DWwikGem.js} +2 -2
- package/dist/client/assets/{SettingsPanels.logic-DlcMmTBT.js → SettingsPanels.logic-CZpg8aSK.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-DvcB28n8.js → SettingsScopeNotice-DjEkL-Ym.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-Cv_FhYYJ.js → ThemeEditorPanel-DOEkSOth.js} +2 -2
- package/dist/client/assets/{ThreadTerminalDrawer-B4Hx5Gtc.js → ThreadTerminalDrawer-BZX00N_c.js} +2 -2
- package/dist/client/assets/{Virtualizer-Dka4WQhw.js → Virtualizer-CJW8pEVT.js} +2 -2
- package/dist/client/assets/{_chat-71Bl4UTO.js → _chat-Ca7FuMbD.js} +5 -5
- package/dist/client/assets/{_chat.design-L-wLlTQh.js → _chat.design-CDj4DPmx.js} +2 -2
- package/dist/client/assets/{_chat.index-Cqzn3tFu.js → _chat.index-CpvSvFZH.js} +2 -2
- package/dist/client/assets/{_chat.new-CmqMNN1q.js → _chat.new-3bIU60mQ.js} +2 -2
- package/dist/client/assets/{_chat.pull-requests-Cv4Q6L5c.js → _chat.pull-requests-BTLE24EW.js} +2 -2
- package/dist/client/assets/{abnfDiagram-VCTEODGH-DGwfULSN.js → abnfDiagram-VCTEODGH-DS1tb4Dy.js} +2 -2
- package/dist/client/assets/architecture-7GRP2DOG-qKmX7534.js +1 -0
- package/dist/client/assets/{architectureDiagram-5GKGNRK7-fZiBVATu.js → architectureDiagram-5GKGNRK7-D0zpK53v.js} +2 -2
- package/dist/client/assets/{assets-Zca4LKSx.js → assets-BG_JXxWD.js} +2 -2
- package/dist/client/assets/{blockDiagram-I7D4REHJ-Cs_imlrU.js → blockDiagram-I7D4REHJ-SL4el5ol.js} +2 -2
- package/dist/client/assets/{browserHistoryStore-9YCQpJy9.js → browserHistoryStore-TYW6lOuv.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-BnxzanaN.js → browserLinkTarget-BNoJwTBt.js} +2 -2
- package/dist/client/assets/{c4Diagram-7LVT6UL2-jxRP5rAE.js → c4Diagram-7LVT6UL2-CWJKC-4H.js} +2 -2
- package/dist/client/assets/channel-DI-bXazi.js +2 -0
- package/dist/client/assets/{chunk-4HAMMTFA-CD4tA6cX.js → chunk-4HAMMTFA-BPAna-Wv.js} +2 -2
- package/dist/client/assets/{chunk-75Z2AOVW-B4sXgwEx.js → chunk-75Z2AOVW-jKPMvGhC.js} +2 -2
- package/dist/client/assets/{chunk-DU6HZSFF-DMXcgXT_.js → chunk-DU6HZSFF-DQeySev0.js} +2 -2
- package/dist/client/assets/{chunk-F27PBJKO-CGf21cwH.js → chunk-F27PBJKO-jWPdwF7M.js} +2 -2
- package/dist/client/assets/{chunk-GMAD6QVW-mPVRZq9Z.js → chunk-GMAD6QVW-DpPhOysA.js} +2 -2
- package/dist/client/assets/{chunk-GVQU2GXP-ChBHtvjy.js → chunk-GVQU2GXP-Ci4jKLcc.js} +2 -2
- package/dist/client/assets/{chunk-IMKFNOWR-BtgRygmA.js → chunk-IMKFNOWR-D29vnX6w.js} +2 -2
- package/dist/client/assets/{chunk-L3NEJ4N5-REmklvQl.js → chunk-L3NEJ4N5-C0YH77t5.js} +2 -2
- package/dist/client/assets/{chunk-OSK3NFVY-m-QXUYaT.js → chunk-OSK3NFVY-DfSRnLdf.js} +2 -2
- package/dist/client/assets/{chunk-P2QGCYS3-CeefF5cA.js → chunk-P2QGCYS3-Bg2pIwSk.js} +2 -2
- package/dist/client/assets/{chunk-POPQ4Y6H-C-_RXsmg.js → chunk-POPQ4Y6H-CctNE5Wx.js} +2 -2
- package/dist/client/assets/{chunk-PWAF6VOD-DflyqEaS.js → chunk-PWAF6VOD-C1f1DGpf.js} +2 -2
- package/dist/client/assets/{chunk-SHT3W25Y-R_Fg17nt.js → chunk-SHT3W25Y-xnpqecbr.js} +2 -2
- package/dist/client/assets/{chunk-SVP7TREG-BTfev3Yx.js → chunk-SVP7TREG-DnMt1uxV.js} +2 -2
- package/dist/client/assets/{chunk-TICWLB2K-C7WGvYp1.js → chunk-TICWLB2K-Cu6mah4v.js} +2 -2
- package/dist/client/assets/classDiagram-ZZMXUADV-DrD0Oidb.js +2 -0
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-DrD0Oidb.js +2 -0
- package/dist/client/assets/{composer-logic-De298qJ8.js → composer-logic-ByYUEP0g.js} +2 -2
- package/dist/client/assets/{composerDraftUploads-DojMN9dn.js → composerDraftUploads-BPBBqP0N.js} +2 -2
- package/dist/client/assets/{connect-agent-Dss1yfYI.js → connect-agent-BHr4rYhL.js} +2 -2
- package/dist/client/assets/{connect-DqGJc6Zq.js → connect-rIIk2LpN.js} +2 -2
- package/dist/client/assets/{cynefin-OW5HDTMX-DnGTy7Az.js → cynefin-OW5HDTMX-awGYteF9.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-va9nLZtf.js → cynefinDiagram-5FMLGOSQ-N1-lLKT-.js} +2 -2
- package/dist/client/assets/{dagre-GXQ25YYZ-D0QXSOGs.js → dagre-GXQ25YYZ-DCPL5qNf.js} +2 -2
- package/dist/client/assets/{design-C9BU7qd7.js → design-D9pNp4fS.js} +2 -2
- package/dist/client/assets/{device-CtPu58XW.js → device-DvcJXr0e.js} +2 -2
- package/dist/client/assets/{diagram-S7CK7UJ4-cEFyiWjL.js → diagram-S7CK7UJ4-DEZdO6ar.js} +2 -2
- package/dist/client/assets/{diagram-UQ7AKVKN-CNgu8Xrb.js → diagram-UQ7AKVKN-B2XQyTB4.js} +2 -2
- package/dist/client/assets/{diagram-VSXAHHWV-BPPJ-FGp.js → diagram-VSXAHHWV-DldfdFb5.js} +2 -2
- package/dist/client/assets/{diagram-VX7I27RA-DmmJR7mF.js → diagram-VX7I27RA-CifXMdiI.js} +2 -2
- package/dist/client/assets/{diagram-Z3DM3KII-B2E7hDLy.js → diagram-Z3DM3KII-jXVmEkNO.js} +2 -2
- package/dist/client/assets/{diffRendering-Dam20Pyq.js → diffRendering-DxGUmEvq.js} +2 -2
- package/dist/client/assets/{dist-BDrj9x6z.js → dist-COvLc5b4.js} +2 -2
- package/dist/client/assets/{duoViewer-D-r4O9JA.js → duoViewer-B50bcQwg.js} +2 -2
- package/dist/client/assets/{dynamic-Cog_ioOk.js → dynamic-DDCwZvn2.js} +2 -2
- package/dist/client/assets/{ebnfDiagram-PWID7BFC-CdqWonW-.js → ebnfDiagram-PWID7BFC-CXxPKnge.js} +2 -2
- package/dist/client/assets/{embeddedScripts-twbjTzvu.js → embeddedScripts-Gpq5uvk8.js} +2 -2
- package/dist/client/assets/{entities-BhpgabTo.js → entities-CHcmKww2.js} +2 -2
- package/dist/client/assets/{erDiagram-RLTQ6QDP-Cj9VHvs2.js → erDiagram-RLTQ6QDP-Bg12tmzC.js} +2 -2
- package/dist/client/assets/eventmodeling-NTZA5JFV-DGgBiDNH.js +1 -0
- package/dist/client/assets/{fileLinks-CCxqMBvI.js → fileLinks-OMeT3EGv.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-N_KS64dO.js → fileTreeExpansion-DlEbR8A9.js} +2 -2
- package/dist/client/assets/flowDiagram-HODETNUW-DvUNziGW.js +1 -0
- package/dist/client/assets/{ganttDiagram-EL5Y4UJY--tZCMTKs.js → ganttDiagram-EL5Y4UJY-Cg6B23Gi.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-wQ-J_p6Q.js → getDiffFileInput-DU7M1ayK.js} +2 -2
- package/dist/client/assets/{gitGraph-4MIJSDKK-Dw_fdYPs.js → gitGraph-4MIJSDKK-DY1yzqnv.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-mCz7mnTd.js → gitGraphDiagram-WWUBYQGX-CuxKBsR7.js} +2 -2
- package/dist/client/assets/{guideRunStore-Dk9f0e_S.js → guideRunStore-CtlhC1A4.js} +2 -2
- package/dist/client/assets/{index-B0OiR0Ol.js → index-DT3GBOff.js} +3 -3
- package/dist/client/assets/{info-A6RAGUB7-Dm2Q2YW8.js → info-A6RAGUB7-FELuhJNt.js} +1 -1
- package/dist/client/assets/{infoDiagram-27XIBGKW-CRahhr54.js → infoDiagram-27XIBGKW-Bl4I0Plv.js} +2 -2
- package/dist/client/assets/{ishikawaDiagram-5VMMS53U-B8BPPaoL.js → ishikawaDiagram-5VMMS53U-UAMqnpij.js} +2 -2
- package/dist/client/assets/{journeyDiagram-3NMN7TZE-CyL0jLPT.js → journeyDiagram-3NMN7TZE-J6lpIBGT.js} +2 -2
- package/dist/client/assets/{kanban-definition-UXKFOSKX-cbdied2B.js → kanban-definition-UXKFOSKX-BAmj09Ml.js} +2 -2
- package/dist/client/assets/{line-qgzYahVp.js → line-BT7eNXjs.js} +2 -2
- package/dist/client/assets/{linkedPrompt-BZnl7hrP.js → linkedPrompt-BVuTIuW9.js} +2 -2
- package/dist/client/assets/{main-BgKiw-9f.js → main-CSxSeVCm.js} +7 -7
- package/dist/client/assets/main-CcPhKii6.css +2 -0
- package/dist/client/assets/{mediaReference-BhzLpYF9.js → mediaReference-4ijjnwgU.js} +2 -2
- package/dist/client/assets/{mediaSource-Bk_NKKP2.js → mediaSource-BBXGRYvD.js} +2 -2
- package/dist/client/assets/{mermaid-parser.core-Dbb1WTb8.js → mermaid-parser.core-DEiOK0ka.js} +4 -4
- package/dist/client/assets/{mermaid.core-Dtz8UzUI.js → mermaid.core-Bx8b2pKm.js} +5 -5
- package/dist/client/assets/{mindmap-definition-YA3MSWOX-D7G9MbUQ.js → mindmap-definition-YA3MSWOX-BXyIIcif.js} +2 -2
- package/dist/client/assets/{onboarding-CXb4LvSr.js → onboarding-D_AA7mEu.js} +2 -2
- package/dist/client/assets/{openFileInPreview-B8KdOFV6.js → openFileInPreview-BX2EPx-W.js} +2 -2
- package/dist/client/assets/{p4ProjectFile-BrXxii5J.js → p4ProjectFile-DCsCl5_0.js} +2 -2
- package/dist/client/assets/{packet-AYTQ26CC-3JoyTbIn.js → packet-AYTQ26CC-Bqx116EX.js} +1 -1
- package/dist/client/assets/{pair-B6bpqsN5.js → pair-B5LOQH2j.js} +2 -2
- package/dist/client/assets/{pegDiagram-XKGWAZYB-7VJjFwNR.js → pegDiagram-XKGWAZYB-BsvAGr54.js} +2 -2
- package/dist/client/assets/{phoneViewer-DDX1p0cN.js → phoneViewer-BT-wd3b1.js} +2 -2
- package/dist/client/assets/{pie-WAS4IAKB-CXeLZCFV.js → pie-WAS4IAKB-evx-Z-FQ.js} +1 -1
- package/dist/client/assets/{pieDiagram-E7YTZNPT-BY1P4Uer.js → pieDiagram-E7YTZNPT-CKykWbhU.js} +2 -2
- package/dist/client/assets/{pierre-icons-CL-szz98.js → pierre-icons-DpUmwZMv.js} +2 -2
- package/dist/client/assets/{preview-HJcGsd2o.js → preview-CgesrIRi.js} +2 -2
- package/dist/client/assets/{primary-rJDv25B2.js → primary-D90_IvSw.js} +2 -2
- package/dist/client/assets/{primaryCloudLinkState-CzF2gmHs.js → primaryCloudLinkState-BipC1sbg.js} +2 -2
- package/dist/client/assets/{projectFilesQueryState-DM9_vSRA.js → projectFilesQueryState-B0Z25WLd.js} +2 -2
- package/dist/client/assets/{projectScriptEditor-Pml2NkVE.js → projectScriptEditor-BAAT-cd6.js} +2 -2
- package/dist/client/assets/{providerSkills-waACvYAJ.js → providerSkills-WK9rr3PR.js} +2 -2
- package/dist/client/assets/{pullRequestDetail.logic-C-5flOlM.js → pullRequestDetail.logic-DU6FbcfP.js} +2 -2
- package/dist/client/assets/{pullRequests-Br_9L7m4.js → pullRequests-Cv7P2eIY.js} +2 -2
- package/dist/client/assets/{quadrantDiagram-AXDQQJYC-DyZq_mGc.js → quadrantDiagram-AXDQQJYC-DXX_yCol.js} +2 -2
- package/dist/client/assets/{queries-CuZx4Gi3.js → queries-CzWn4iT1.js} +2 -2
- package/dist/client/assets/{radar-RG4KPBEZ-B21YfCpU.js → radar-RG4KPBEZ-DVDYLdDv.js} +1 -1
- package/dist/client/assets/{railroad-74A4TZTK-CaiYAzxA.js → railroad-74A4TZTK-QbHjzV3H.js} +1 -1
- package/dist/client/assets/railroad-abnf-HS5TGJTU-cPiNHmv2.js +1 -0
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-D_qTHfDb.js +1 -0
- package/dist/client/assets/railroad-peg-WCYAUIDC-DzNZR6g5.js +1 -0
- package/dist/client/assets/{railroadDiagram-O6MQD6OU-BZ0HuIrV.js → railroadDiagram-O6MQD6OU-iJ7qhNbR.js} +2 -2
- package/dist/client/assets/{renderScheduler-xdSjl5z7.js → renderScheduler-BLVmyLhe.js} +2 -2
- package/dist/client/assets/{requirementDiagram-BXWQKSXE-C4OJUf9q.js → requirementDiagram-BXWQKSXE-xiWwbUm-.js} +2 -2
- package/dist/client/assets/{runtime-mg6KxRIi.js → runtime-D2c--mqA.js} +3 -3
- package/dist/client/assets/{runtime-V62Oyi1q.js → runtime-FrzhE_LH.js} +2 -2
- package/dist/client/assets/{sankeyDiagram-P5KCCOFB-CDOw9Kul.js → sankeyDiagram-P5KCCOFB-0nRyou7P.js} +2 -2
- package/dist/client/assets/{scheduledTasksSettings.logic-CrYg_vYi.js → scheduledTasksSettings.logic-BXS7vhZ-.js} +2 -2
- package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-C9BMDi3Q.js → sequenceDiagram-WJ2MYXX4-CC5JdpP4.js} +2 -2
- package/dist/client/assets/{server-C8OpoOTL.js → server-DZYI6rhH.js} +2 -2
- package/dist/client/assets/{session-BAH17FBJ.js → session-DhEZhn9K.js} +2 -2
- package/dist/client/assets/{session-logic-BKiIVDj0.js → session-logic-6vU9tCVO.js} +2 -2
- package/dist/client/assets/{settings-BiLwAn9B.js → settings-DHEFuexL.js} +2 -2
- package/dist/client/assets/{settings.appearance-DB8azH3Q.js → settings.appearance-5kVeILsJ.js} +2 -2
- package/dist/client/assets/settings.archived-jwpZnQSj.js +2 -0
- package/dist/client/assets/{settings.computer-use-DpcKtt2q.js → settings.computer-use-B_rhtPVE.js} +2 -2
- package/dist/client/assets/{settings.connections-RKFcKfpz.js → settings.connections-B8NEiau5.js} +2 -2
- package/dist/client/assets/{settings.data-controls-NjUH57Fr.js → settings.data-controls-B9FYgTyX.js} +2 -2
- package/dist/client/assets/{settings.decisions-B-HjeKFr.js → settings.decisions-B2cCo6C4.js} +2 -2
- package/dist/client/assets/{settings.designs-DWbfEcuK.js → settings.designs-B-dMaR0b.js} +2 -2
- package/dist/client/assets/{settings.diagnostics-DY7e0sc8.js → settings.diagnostics-DtokU1DC.js} +2 -2
- package/dist/client/assets/{settings.general-dsLXGi9j.js → settings.general-CEl6ByN_.js} +2 -2
- package/dist/client/assets/settings.integrations-B6wNRi_e.js +2 -0
- package/dist/client/assets/{settings.keybindings-Bcl4KxN4.js → settings.keybindings-r4Dy4hkg.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-ZP9ezdc4.js → settings.open-source-licenses-BGGKTeAP.js} +2 -2
- package/dist/client/assets/{settings.plugins-JjZ7Ptzj.js → settings.plugins-C6Q3vhFM.js} +2 -2
- package/dist/client/assets/{settings.projects-DhhMAw0F.js → settings.projects-DtZL3XlK.js} +3 -3
- package/dist/client/assets/{settings.providers-sowFjazx.js → settings.providers-BHl68xr7.js} +3 -3
- package/dist/client/assets/{settings.scheduled-tasks-BIfprPPD.js → settings.scheduled-tasks-DTxlZQAV.js} +2 -2
- package/dist/client/assets/{settings.snap-shot-B1go--dA.js → settings.snap-shot-CFuPNtXn.js} +2 -2
- package/dist/client/assets/{settings.source-control-BL1tH7qk.js → settings.source-control-DzHVHiHN.js} +2 -2
- package/dist/client/assets/{settings.storage-Bt_7LmzS.js → settings.storage-Bw_3CvHq.js} +2 -2
- package/dist/client/assets/{settingsLayout-DaLF8Hfm.js → settingsLayout-C1Jfxbij.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-DQInVNnY.js → sidebarProjectGrouping-CTN-1PEY.js} +2 -2
- package/dist/client/assets/{sourceControl-B9T0IPlu.js → sourceControl-Lsyqeoql.js} +2 -2
- package/dist/client/assets/{sourceControlClients-BgBu2ayZ.js → sourceControlClients-DQbmIpu5.js} +2 -2
- package/dist/client/assets/{stateDiagram-D77RDMKH-B032MgyK.js → stateDiagram-D77RDMKH-m8Y-mxXE.js} +2 -2
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-Co2rfAar.js +2 -0
- package/dist/client/assets/{swimlanes-42K2YHIH-Bn6WbS8G.js → swimlanes-42K2YHIH-wRxafkPC.js} +2 -2
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-DgApCEOp.js +9 -0
- package/dist/client/assets/{terminalSessions-BjIB3wg1.js → terminalSessions-CYOZNbmk.js} +2 -2
- package/dist/client/assets/{timeline-definition-24CTP7MA-RGCq2eyK.js → timeline-definition-24CTP7MA-rIHAblCw.js} +2 -2
- package/dist/client/assets/{toast-B2B2ECBW.js → toast-VoruYA6X.js} +2 -2
- package/dist/client/assets/{treeView-Q6P3EWNA-CkhQE3UU.js → treeView-Q6P3EWNA-Bcy74tP0.js} +1 -1
- package/dist/client/assets/{treemap-WGGIJYW6-DjBfz9t-.js → treemap-WGGIJYW6-CfQsmSnc.js} +1 -1
- package/dist/client/assets/{uiStateStore-TZf81BHB.js → uiStateStore-BvYsbiUI.js} +2 -2
- package/dist/client/assets/{usage-Dp-M0_Do.js → usage-DKGEF7z4.js} +2 -2
- package/dist/client/assets/{use-atom-command-BWLbyoVN.js → use-atom-command-DrwAZaSK.js} +2 -2
- package/dist/client/assets/{useHandleNewThread-DLupIP68.js → useHandleNewThread-CX2gg9sv.js} +2 -2
- package/dist/client/assets/{useP4ConnectAuthPrompt-C18iYCzm.js → useP4ConnectAuthPrompt-BVHt43id.js} +2 -2
- package/dist/client/assets/{usePullRequestActions-CWCz_AQW.js → usePullRequestActions-CKEsy23v.js} +2 -2
- package/dist/client/assets/{useScopedModelAvailability-D1MGYLGR.js → useScopedModelAvailability-DxkmmSwB.js} +2 -2
- package/dist/client/assets/{useSettings-BEKkRzL1.js → useSettings-u7ZNp27u.js} +2 -2
- package/dist/client/assets/{vcsRefInvalidation-Dx_cpFEA.js → vcsRefInvalidation-Cp8DmrdA.js} +2 -2
- package/dist/client/assets/{vennDiagram-4TSXK5OY-D0wsDnkf.js → vennDiagram-4TSXK5OY-BYWi9jUi.js} +2 -2
- package/dist/client/assets/{wardley-WFR3VGLG-BT7dOBGA.js → wardley-WFR3VGLG-BQv1A50b.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-VM6X3IG4-CgbZOhZ-.js → wardleyDiagram-VM6X3IG4-Cp-BLL4g.js} +2 -2
- package/dist/client/assets/{welcome-D3Kttsfe.js → welcome-COe2CLyM.js} +2 -2
- package/dist/client/assets/{xychartDiagram-S5SC5T6Z-D3RW49u7.js → xychartDiagram-S5SC5T6Z-CNBL0I4g.js} +2 -2
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
- package/dist/client/assets/architecture-7GRP2DOG-BVmWArUl.js +0 -1
- package/dist/client/assets/channel-DyV-uKW8.js +0 -2
- package/dist/client/assets/classDiagram-ZZMXUADV-B0NhU5d_.js +0 -2
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-B0NhU5d_.js +0 -2
- package/dist/client/assets/eventmodeling-NTZA5JFV-CkU6Du-F.js +0 -1
- package/dist/client/assets/flowDiagram-HODETNUW-BvniDpHa.js +0 -1
- package/dist/client/assets/main-Dk22djvP.css +0 -2
- package/dist/client/assets/railroad-abnf-HS5TGJTU-ZJmaNeUq.js +0 -1
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-C27brj-I.js +0 -1
- package/dist/client/assets/railroad-peg-WCYAUIDC-CukzLv2P.js +0 -1
- package/dist/client/assets/settings.archived-BgPgmE5p.js +0 -2
- package/dist/client/assets/settings.integrations-BLYy6l0O.js +0 -2
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-CEPamUoD.js +0 -2
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-D1eJox12.js +0 -9
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$o as n,As as r,BE as i,BT as a,Cd as o,Es as s,Ey as c,Qu as l,RT as u,S_ as d,Sm as f,Sy as p,Vc as m,Wf as h,Xs as g,Ys as _,bd as v,eb as y,es as b,hy as x,j_ as S,l as C,l_ as w,lr as T,mE as E,mp as D,my as O,o as k,rs as A,s_ as j,t as M,zd as N}from"./utils-B0w8dSf5.js";import{At as P,M as F,N as I,R as L,W as R,o as z}from"./runtime-mg6KxRIi.js";import{$ as B,G as V,f as H,w as U}from"./entities-BhpgabTo.js";import{t as W}from"./runtime-V62Oyi1q.js";import{t as G}from"./spinner-BkmZz-kc.js";import{t as K}from"./useNavigate-CSxB1zLo.js";import{t as q}from"./useLocation-XbiRdmmb.js";import{i as J}from"./toast-B2B2ECBW.js";import{D as ee,E as te}from"./useSettings-BEKkRzL1.js";import{f as Y}from"./server-C8OpoOTL.js";import{i as ne,n as X,o as re}from"./session-BAH17FBJ.js";import{t as ie}from"./query-DrtB5w10.js";import{t as ae}from"./use-atom-command-BWLbyoVN.js";import{a as oe}from"./timestampFormat-wac2e_Jz.js";import{a as se,n as ce,t as le}from"./tooltip-CuJiZzK7.js";import{t as ue}from"./input-CDBTiBJx.js";import{t as de}from"./scroll-area-CT3H0nmo.js";import{r as fe}from"./dist-BDrj9x6z.js";import{t as pe}from"./dialog-Bdi4gsq5.js";import{t as me}from"./useP4ConnectAuthPrompt-C18iYCzm.js";import{t as he}from"./CommandBlock-a6FR0Qjq.js";import{t as ge}from"./checkbox-PYOAN-IL.js";import{t as _e}from"./ThreadTerminalDrawer-B4Hx5Gtc.js";import{i as ve}from"./terminalSessions-BjIB3wg1.js";import{n as ye}from"./useHandleNewThread-DLupIP68.js";import{r as be,t as xe}from"./alert-D4hu_q2y.js";import{i as Se,n as Ce}from"./ChatGptUsageButton-BsRw7PIG.js";import{t as we}from"./onboarding-CXb4LvSr.js";import{Gt as Te,Ur as Ee,Wt as De,Yt as Oe,Zi as ke,_ as Ae,ca as je,da as Me,f as Ne,fa as Pe,la as Fe,oa as Ie,sa as Le,ua as Re}from"./main-BgKiw-9f.js";import{t as ze}from"./NoProjectsHero-1ktyCaCR.js";import{t as Be}from"./legalLinks-C4VP5hPh.js";import{r as Ve}from"./SettingsPanels.logic-DlcMmTBT.js";import{d as He,f as Ue,i as We,l as Ge,n as Ke,o as qe,t as Je,u as Ye}from"./CodexSetupSection.logic-CAeeNfjx.js";var Z=e(t(),1),Q=i(),Xe=2592e6,Ze=3;function Qe(e,t=Date.now()){let n=t-Xe;return{available:e,recent:e.filter(e=>{if(e.git===null||e.threadCount<Ze||e.lastActiveAt===null)return!1;let r=Date.parse(e.lastActiveAt);return r>=n&&r<=t})}}function $e(e,t){return e===null?t:t===null||e>t?e:t}function et(e){let t=new Map,n=[];for(let r of e){if(r.git===null){n.push(r);continue}let e=r.git??{remoteKey:null,repository:null},i=e.remoteKey===null?`path:${r.path}`:`remote:${e.remoteKey}`,a=t.get(i);if(a===void 0){t.set(i,{key:i,label:e.repository??r.title,repository:e.repository,candidates:[r],threadCount:r.threadCount,lastActiveAt:r.lastActiveAt});continue}a.candidates.push(r),t.set(i,{...a,threadCount:a.threadCount+r.threadCount,lastActiveAt:$e(a.lastActiveAt,r.lastActiveAt)})}return{repositories:[...t.values()].sort((e,t)=>e.lastActiveAt===t.lastActiveAt?e.label.localeCompare(t.label):e.lastActiveAt===null?1:t.lastActiveAt===null?-1:t.lastActiveAt.localeCompare(e.lastActiveAt)),other:n}}function tt(e,t,n){if(n.projectId!==void 0)return n.projectId;let r=e.filter(e=>e.environmentId===t),i=B(r,n.path);return i===void 0?null:i.id}function nt(e,t,n){for(let n of e){let e=t.get(n);if(e!==void 0)return e}for(let t of e){let e=n.get(t);if(e!==void 0)return e}}function rt(e){if(/^[A-Za-z]:[\\/]+$/.test(e)||/^[\\/]{2}[^\\/]+[\\/][^\\/]+[\\/]*$/.test(e))return{name:e,parent:``};let t=e.replace(/[\\/]+$/,``),n=Math.max(t.lastIndexOf(`/`),t.lastIndexOf(`\\`));return t.length===0?{name:e,parent:``}:n<0?{name:t,parent:``}:{name:t.slice(n+1),parent:t.slice(0,n+1)}}function it(e,t){return JSON.stringify([e,t])}var at=I(W,{label:`environment-data:agent-sessions:scan`,tag:m.agentSessionsScan,staleTimeMs:3e4,idleTtlMs:3e5}),ot=F(W,{label:`environment-data:agent-sessions:import`,tag:m.agentSessionsImport});function st(e){return P(e.entry)}function ct(e,t){let n=e.filter(e=>t.has(e.environmentId)),r=e=>n.filter(t=>e(t.connection.phase)).map(e=>e.environmentId),i=r(e=>e===`connected`),a=n.some(e=>e.connection.phase===`connecting`);return{ready:i.length>0&&!a,environmentIds:i,skippedIds:r(e=>e!==`connected`&&e!==`connecting`)}}function lt(e){let t=(0,Q.c)(3),r=(0,Z.useContext)(b),i;return t[0]!==e||t[1]!==r?(i=A(t=>e.map(e=>{let n=at({environmentId:e,input:{}}),i=t(n);return{environmentId:e,data:u(s(i)),error:i._tag===`Failure`?ie(i.cause):null,isPending:i.waiting||i._tag===`Initial`,refresh:()=>r.refresh(n)}})),t[0]=e,t[1]=r,t[2]=i):i=t[2],n(i)}var $=e(E(),1),ut=[],dt=p.make(`onboarding-agent-setup`),ft=[`Connect`,`Agents`,`Projects`],pt=`Scan limit reached. Some projects or conversations may be missing.`;function mt({localAvailable:e,onDone:t,resumeEnvironmentId:n}){let r=Oe(),[i,a]=(0,Z.useState)(n?`agents`:`connection`),{environments:o}=te(),[s,c]=(0,Z.useState)(null),l=(0,Z.useRef)(new Set),[u,d]=(0,Z.useState)(n?[n]:[]),[f,p]=(0,Z.useState)(!1),m=(0,Z.useRef)(null),h=(0,Z.useRef)(null),g=ee();(0,Z.useEffect)(()=>{let e=o.filter(e=>!l.current.has(e.environmentId));if(e.length===0)return;for(let t of e)l.current.add(t.environmentId);let t=e.filter(e=>e.entry.enabled);t.length!==0&&c(e=>new Set([...e??[],...t.map(e=>e.environmentId)]))},[o]);let _=s??new Set(g?[g.environmentId]:[]),v=lt(i===`import`?u:ut),y=i===`import`&&v.every(e=>e.data===null)&&v.some(e=>e.isPending),b=e=>{e.length!==0&&(d(e),a(`agents`))},x=i===`agents`?1:i===`import`?2:0,S=(0,Z.useCallback)((e,n,i=0)=>{if(m.current!==null)return m.current;h.current!==null&&(J.close(h.current),h.current=null);let a=r().then(async()=>(h.current!==null&&(J.close(h.current),h.current=null),await t(e),n?J.add({type:`warning`,title:`Some history was not imported`,description:n,timeout:0}):i>0&&J.add({type:`success`,title:`Imported ${i} ${i===1?`thread`:`threads`}`}),!0)).catch(()=>{let e={type:`error`,title:`Could not finish setup`,description:`Your settings could not be saved. Try again.`};return h.current===null?h.current=J.add(e):J.update(h.current,e),!1}).finally(()=>{m.current===a&&(m.current=null)});return m.current=a,a},[r,t]);return(0,$.jsxs)(pe,{open:!0,disablePointerDismissal:!0,onOpenChange:(e,t)=>t.cancel(),children:[(0,$.jsxs)(je,{size:`wide`,bottomStickOnMobile:!1,showCloseButton:!1,initialFocus:()=>document.getElementById(`onboarding-pairing-url`)??!0,children:[(0,$.jsx)(Ie,{title:`Set up P4 Code`,identity:(0,$.jsxs)(`div`,{className:`flex items-baseline gap-1.5`,role:`img`,"aria-label":`P4 Code`,children:[(0,$.jsx)(Ee,{className:`h-4 w-auto shrink-0`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`text-2xl font-medium tracking-tight text-muted-foreground`,children:`Code`})]}),children:(0,$.jsx)(Fe,{steps:ft,currentStep:x,isStepDisabled:e=>f||e>=x,onStepChange:e=>{f||e>x||a(e===0?`connection`:`agents`)}})}),(0,$.jsx)(Le,{holdHeight:y,children:i===`connection`?(0,$.jsx)(ht,{expandPairingInitially:!e&&!z(),selectedIds:_,autoSelectedComputers:l.current,onSelectionChange:c,onToggleEnvironment:(e,t)=>c(n=>{let r=new Set(n??_);return t?r.add(e):r.delete(e),r}),onContinue:()=>b(ct(o,_).environmentIds),onPaired:e=>{c(new Set([..._,e]))}}):i===`agents`?(0,$.jsx)(xt,{environmentIds:u,onContinue:()=>a(`import`)}):(0,$.jsx)(At,{scans:v,isImporting:f,setIsImporting:p,onDone:S})})]}),(0,$.jsx)(Ae,{})]})}function ht(e){let t=(0,Q.c)(44),{autoSelectedComputers:n,expandPairingInitially:r,selectedIds:i,onSelectionChange:a,onToggleEnvironment:s,onContinue:c,onPaired:u}=e,{environments:d}=te(),f;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(f=z(),t[0]=f):f=t[0];let p=f,m;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(m=e=>!p||!st(e),t[1]=m):m=t[1];let g=d.filter(m),[_,v]=(0,Z.useState)(r),[y,b]=(0,Z.useState)(!1),{ready:x,skippedIds:S}=ct(d,i),C=d.filter(e=>S.includes(e.environmentId)).map(gt),w=(0,Z.useRef)(null);(0,Z.useEffect)(()=>{x&&(document.activeElement===document.body||document.activeElement?.getAttribute(`role`)===`dialog`)&&w.current?.focus()},[x]);let E,O;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:`Connect your computers`}),O=(0,$.jsx)(`p`,{className:`mt-2.5 text-sm leading-relaxed text-muted-foreground`,children:`Choose one or more computers. We’ll set up agents and projects on each.`}),t[2]=E,t[3]=O):(E=t[2],O=t[3]);let k=g.length>0?(0,$.jsxs)(`fieldset`,{className:`mt-5 space-y-2`,children:[(0,$.jsx)(`legend`,{className:`sr-only`,children:`Computers to set up`}),g.map(e=>(0,$.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-lg border border-border bg-background px-3 py-3`,children:[(0,$.jsx)(ge,{checked:i.has(e.environmentId),onCheckedChange:t=>{let n=new Set(i);t?n.add(e.environmentId):n.delete(e.environmentId),a(n)}}),(0,$.jsx)(D,{className:`size-4 shrink-0 text-muted-foreground`}),(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,$.jsxs)(`span`,{className:`flex items-baseline justify-between gap-3`,children:[(0,$.jsx)(`span`,{className:`min-w-0 text-sm font-medium break-words`,children:e.label}),(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:!e.entry.enabled&&e.connection.phase!==`unsupported`?`Off`:Te(e.connection).buttonLabel})]}),e.displayUrl?(0,$.jsx)(`span`,{className:`mt-0.5 block text-xs break-all text-muted-foreground`,children:e.displayUrl}):null]})]},e.environmentId))]}):null,A;t[4]!==n||t[5]!==y||t[6]!==s||t[7]!==i?(A=p?(0,$.jsx)(_t,{autoSelectedComputers:n,disabled:y,selectedIds:i,onToggleEnvironment:s}):null,t[4]=n,t[5]=y,t[6]=s,t[7]=i,t[8]=A):A=t[8];let j,N,P;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(T,{variant:`ghost`,size:`sm-multiline`,className:`min-h-14 w-full justify-start`}),N=(0,$.jsx)(h,{className:`size-4 text-muted-foreground`}),P=(0,$.jsx)(`span`,{className:`flex-1 text-left`,children:`Add a computer`}),t[9]=j,t[10]=N,t[11]=P):(j=t[9],N=t[10],P=t[11]);let F=_&&`rotate-90`,I;t[12]===F?I=t[13]:(I=M(`size-4 text-muted-foreground`,F),t[12]=F,t[13]=I);let L;t[14]===I?L=t[15]:(L=(0,$.jsx)(o,{className:I}),t[14]=I,t[15]=L);let R;t[16]!==y||t[17]!==L?(R=(0,$.jsxs)(Pe,{disabled:y,render:j,children:[N,P,L]}),t[16]=y,t[17]=L,t[18]=R):R=t[18];let B;t[19]===u?B=t[20]:(B=e=>{v(!1),u(e),requestAnimationFrame(()=>w.current?.focus())},t[19]=u,t[20]=B);let V;t[21]!==y||t[22]!==B?(V=(0,$.jsx)(Me,{children:(0,$.jsx)(`div`,{className:`px-3 pb-3`,children:(0,$.jsx)(vt,{isPairing:y,setIsPairing:b,onPaired:B})})}),t[21]=y,t[22]=B,t[23]=V):V=t[23];let H;t[24]!==_||t[25]!==R||t[26]!==V?(H=(0,$.jsx)(`div`,{className:`rounded-lg border border-border bg-background`,children:(0,$.jsxs)(Re,{open:_,onOpenChange:v,children:[R,V]})}),t[24]=_,t[25]=R,t[26]=V,t[27]=H):H=t[27];let U;t[28]!==H||t[29]!==A?(U=(0,$.jsxs)(`div`,{className:`mt-4 space-y-2`,children:[A,H]}),t[28]=H,t[29]=A,t[30]=U):U=t[30];let W=C.length>0?(0,$.jsxs)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:[`Not connected, so setup skips `,C.join(`, `),`. You can set`,` `,C.length===1?`it`:`them`,` up later from Settings.`]}):null,G;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,$.jsxs)(`p`,{className:`min-w-0 text-xs leading-relaxed text-muted-foreground`,children:[`P4 Code collects anonymous usage data to help us improve it. To read more about how your data is used and how to opt out, see our`,` `,(0,$.jsx)(`a`,{className:`underline underline-offset-2 hover:text-foreground`,href:Be,target:`_blank`,rel:`noreferrer noopener`,children:`privacy policy`}),`.`]}),t[31]=G):G=t[31];let K=!r,q=!x||y,J;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,$.jsx)(l,{className:`size-3.5`}),t[32]=J):J=t[32];let ee;t[33]!==c||t[34]!==K||t[35]!==q?(ee=(0,$.jsxs)(`div`,{className:`mt-6 flex flex-col-reverse gap-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6`,children:[G,(0,$.jsxs)(T,{className:`shrink-0 self-end`,ref:w,autoFocus:K,disabled:q,onClick:c,children:[`Continue`,J]})]}),t[33]=c,t[34]=K,t[35]=q,t[36]=ee):ee=t[36];let Y;return t[37]!==U||t[38]!==W||t[39]!==ee||t[40]!==E||t[41]!==O||t[42]!==k?(Y=(0,$.jsxs)($.Fragment,{children:[E,O,k,U,W,ee]}),t[37]=U,t[38]=W,t[39]=ee,t[40]=E,t[41]=O,t[42]=k,t[43]=Y):Y=t[43],Y}function gt(e){return e.label}function _t(e){let t=(0,Q.c)(36),{autoSelectedComputers:n,disabled:r,selectedIds:i,onToggleEnvironment:a}=e,{environments:s}=te(),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={treatPendingAsSignedOut:!1},t[0]=c):c=t[0];let{isLoaded:l,isSignedIn:u}=fe(c),{openAuthPrompt:d}=me(),[f,p]=(0,Z.useState)(!0),[m,h]=(0,Z.useState)(!1),g;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>h(!0),t[1]=g):g=t[1];let _=g,v=f&&!!u&&m,y=r||!l,b;t[2]!==u||t[3]!==d?(b=e=>{u||(e.preventDefault(),p(!0),d())},t[2]=u,t[3]=d,t[4]=b):b=t[4];let x,S,C;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(T,{variant:`ghost`,size:`sm-multiline`,className:`min-h-14 w-full justify-start`}),S=(0,$.jsx)(N,{className:`size-4 text-muted-foreground`}),C=(0,$.jsx)(`span`,{className:`flex-1 text-left`,children:`P4 Connect`}),t[5]=x,t[6]=S,t[7]=C):(x=t[5],S=t[6],C=t[7]);let w=l?u?m?null:`Loading computers…`:`Sign in`:`Loading sign-in…`,E;t[8]===w?E=t[9]:(E=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:w}),t[8]=w,t[9]=E);let D=f&&u&&`rotate-90`,O;t[10]===D?O=t[11]:(O=M(`size-4 text-muted-foreground`,D),t[10]=D,t[11]=O);let k;t[12]===O?k=t[13]:(k=(0,$.jsx)(o,{className:O}),t[12]=O,t[13]=k);let A;t[14]!==E||t[15]!==k||t[16]!==y||t[17]!==b?(A=(0,$.jsxs)(Pe,{disabled:y,onClick:b,render:x,children:[S,C,E,k]}),t[14]=E,t[15]=k,t[16]=y,t[17]=b,t[18]=A):A=t[18];let j;t[19]!==n||t[20]!==s||t[21]!==u||t[22]!==a||t[23]!==i?(j=u?(0,$.jsx)(De,{primaryEnvironmentId:null,savedEnvironments:s,showSavedEnvironments:!0,onDiscoveryReady:_,selection:{selectedIds:i,onChange:a,autoSelectedComputers:n},refreshWhileEmpty:!0,empty:(0,$.jsx)(`p`,{className:`py-3 text-sm text-muted-foreground`,children:`No computers linked yet.`})}):null,t[19]=n,t[20]=s,t[21]=u,t[22]=a,t[23]=i,t[24]=j):j=t[24];let P;t[25]===j?P=t[26]:(P=(0,$.jsx)(`div`,{className:`mb-3 space-y-1.5`,children:j}),t[25]=j,t[26]=P);let F,I,L;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Run this on each computer you want to connect.`}),I=(0,$.jsx)(he,{command:`npx @p4code/cli connect`,className:`mt-3`}),L=(0,$.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:`Keep P4 Code running. Select the computers you want to set up above.`}),t[27]=F,t[28]=I,t[29]=L):(F=t[27],I=t[28],L=t[29]);let R;t[30]===P?R=t[31]:(R=(0,$.jsx)(Me,{keepMounted:!0,children:(0,$.jsxs)(`div`,{className:`px-3 pb-3`,children:[P,F,I,L]})}),t[30]=P,t[31]=R);let z;return t[32]!==A||t[33]!==R||t[34]!==v?(z=(0,$.jsx)(`div`,{className:`rounded-lg border border-border bg-background`,children:(0,$.jsxs)(Re,{open:v,onOpenChange:p,children:[A,R]})}),t[32]=A,t[33]=R,t[34]=v,t[35]=z):z=t[35],z}function vt(e){let t=(0,Q.c)(38),{isPairing:n,setIsPairing:r,onPaired:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1},t[0]=a):a=t[0];let s=ae(we,a),[c,l]=(0,Z.useState)(``),[u,d]=(0,Z.useState)(``),f=(0,Z.useRef)(!0),p,m;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>(f.current=!0,()=>{f.current=!1}),m=[],t[1]=p,t[2]=m):(p=t[1],m=t[2]),(0,Z.useEffect)(p,m);let h;t[3]!==s||t[4]!==n||t[5]!==i||t[6]!==c||t[7]!==r?(h=async()=>{if(n||c.trim().length===0)return;r(!0),d(``);let e=await s({pairingUrl:c.trim()});if(!f.current)return;if(r(!1),e._tag===`Success`){i(e.value);return}if(L(e))return;let t=R(e);d(t instanceof Error?t.message:`Pairing failed.`)},t[3]=s,t[4]=n,t[5]=i,t[6]=c,t[7]=r,t[8]=h):h=t[8];let g=h,_;t[9]===g?_=t[10]:(_=e=>{e.preventDefault(),g()},t[9]=g,t[10]=_);let v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(`label`,{className:`block text-sm text-muted-foreground`,htmlFor:`onboarding-pairing-url`,children:`Pairing link`}),t[11]=v):v=t[11];let y=u.length>0,b=u?`onboarding-pairing-error`:void 0,x;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>l(e.currentTarget.value),t[12]=x):x=t[12];let S;t[13]!==n||t[14]!==c||t[15]!==y||t[16]!==b?(S=(0,$.jsxs)(`div`,{children:[v,(0,$.jsx)(ue,{id:`onboarding-pairing-url`,autoFocus:!0,"aria-invalid":y,"aria-describedby":b,className:`mt-2`,size:`lg`,autoCapitalize:`none`,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,nativeInput:!0,readOnly:n,placeholder:`https://your-server:5230/pair#token=…`,value:c,onChange:x,onKeyDown:yt})]}),t[13]=n,t[14]=c,t[15]=y,t[16]=b,t[17]=S):S=t[17];let C;t[18]===u?C=t[19]:(C=u?(0,$.jsx)(xe,{id:`onboarding-pairing-error`,variant:`error`,children:(0,$.jsx)(be,{children:u})}):null,t[18]=u,t[19]=C);let w;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsxs)(Pe,{type:`button`,className:`group flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground`,children:[(0,$.jsx)(o,{className:`size-3.5 group-data-panel-open:rotate-90`}),`Need a pairing link?`]}),t[20]=w):w=t[20];let E;t[21]!==n||t[22]!==c?(E=n||c.trim().length===0,t[21]=n,t[22]=c,t[23]=E):E=t[23];let D=n?`Pairing...`:`Pair`,O;t[24]!==E||t[25]!==D?(O=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[w,(0,$.jsx)(T,{type:`submit`,disabled:E,children:D})]}),t[24]=E,t[25]=D,t[26]=O):O=t[26];let k,A;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsx)(`p`,{className:`pt-3 text-sm text-muted-foreground`,children:`Run this on the computer with your code.`}),A=(0,$.jsx)(he,{command:`npx @p4code/cli pair`,className:`mt-2`}),t[27]=k,t[28]=A):(k=t[27],A=t[28]);let j;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(`code`,{className:`font-mono`,children:`npx @p4code/cli serve`}),t[29]=j):j=t[29];let M;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsxs)(Me,{children:[k,A,(0,$.jsxs)(`p`,{className:`mt-2 text-xs leading-relaxed text-muted-foreground`,children:[`Start P4 Code first, or run `,j,`. Add `,(0,$.jsx)(`code`,{className:`font-mono`,children:`--tailscale`}),` to use your tailnet.`]})]}),t[30]=M):M=t[30];let N;t[31]===O?N=t[32]:(N=(0,$.jsxs)(Re,{children:[O,M]}),t[31]=O,t[32]=N);let P;return t[33]!==S||t[34]!==C||t[35]!==N||t[36]!==_?(P=(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`form`,{className:`space-y-3`,onSubmit:_,children:[S,C,N]})}),t[33]=S,t[34]=C,t[35]=N,t[36]=_,t[37]=P):P=t[37],P}function yt(e){e.key===`Enter`&&(e.nativeEvent.isComposing||e.keyCode===229)&&e.preventDefault()}var bt=[`codex`,`claudeAgent`];function xt(e){let t=(0,Q.c)(13),{environmentIds:n,onContinue:r}=e,{environments:i}=te(),a;if(t[0]!==n||t[1]!==i){let e;t[3]===i?e=t[4]:(e=e=>(0,$.jsx)(St,{environmentId:e,machineLabel:i.find(t=>t.environmentId===e)?.label??`Computer`},e),t[3]=i,t[4]=e),a=n.map(e),t[0]=n,t[1]=i,t[2]=a}else a=t[2];let o;t[5]===a?o=t[6]:(o=(0,$.jsx)(de,{scrollFade:!0,className:`mt-5 h-auto max-h-[min(32rem,55dvh)]`,children:(0,$.jsx)(`div`,{className:`space-y-5 pr-3`,children:a})}),t[5]=a,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(l,{className:`size-3.5`}),t[7]=s):s=t[7];let c;t[8]===r?c=t[9]:(c=(0,$.jsx)(`div`,{className:`mt-6 flex justify-end`,children:(0,$.jsxs)(T,{autoFocus:!0,onClick:r,children:[`Continue`,s]})}),t[8]=r,t[9]=c);let u;return t[10]!==o||t[11]!==c?(u=(0,$.jsxs)(Kt,{title:`Connect your agents`,description:`Choose an agent to start coding. You can add more later.`,children:[o,c]}),t[10]=o,t[11]=c,t[12]=u):u=t[12],u}function St(e){let t=(0,Q.c)(57),{environmentId:r,machineLabel:i}=e,a;t[0]===r?a=t[1]:(a=Y.providersValueAtom(r),t[0]=r,t[1]=a);let o=n(a),s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s={reportFailure:!1},t[2]=s):s=t[2];let c=ae(Y.refreshProviders,s),l;t[3]===r?l=t[4]:(l=Y.configValueAtom(r),t[3]=r,t[4]=l);let u=n(l),[d,f]=(0,Z.useState)(null),[p,m]=(0,Z.useState)(!1),[h,g]=(0,Z.useState)(null),_=ne(r,S),v,y;t[5]!==r||t[6]!==c?(v=()=>{c({environmentId:r,input:{}})},y=[r,c],t[5]=r,t[6]=c,t[7]=v,t[8]=y):(v=t[7],y=t[8]),(0,Z.useEffect)(v,y);let b;t[9]===o?b=t[10]:(b=Ue(o),t[9]=o,t[10]=b);let x=b,C,w,E,D;if(t[11]!==x||t[12]!==_||t[13]!==h||t[14]!==r||t[15]!==i||t[16]!==o||t[17]!==u||t[18]!==d?.driver){let e;t[23]!==x||t[24]!==o?(e=e=>{let t=e===`codex`?o?.filter(t=>t.driver===e):void 0;return t?.length?t.map(t=>({driver:e,provider:t,instanceId:t.instanceId})):[{driver:e,provider:x.get(e),instanceId:x.get(e)?.instanceId}]},t[23]=x,t[24]=o,t[25]=e):e=t[25];let n=bt.flatMap(e);if(h){let e;t[26]===h?e=t[27]:(e=e=>e.instanceId===h.instanceId,t[26]=h,t[27]=e);let r=n.findIndex(e),[i]=r>=0?n.splice(r,1):[];n.unshift(i??{driver:`codex`,provider:void 0,instanceId:h.instanceId})}t[28]===i?D=t[29]:(D=(0,$.jsx)(`h2`,{className:`mb-2 text-sm font-medium`,children:i}),t[28]=i,t[29]=D),t[30]===_?C=t[31]:(C=_?null:(0,$.jsx)(`p`,{className:`mb-2 text-sm text-muted-foreground`,children:`This connection cannot control terminals.`}),t[30]=_,t[31]=C),w=`space-y-1.5`;let a;t[32]!==_||t[33]!==h||t[34]!==r||t[35]!==u||t[36]!==d?.driver?(a=e=>{let{driver:t,provider:n,instanceId:i}=e;return t===`codex`&&u!==null?(0,$.jsx)(Tt,{environmentId:r,provider:n,serverConfig:u,createdAccount:i===h?.instanceId?h:null,onAutoStartConsumed:()=>g(wt),terminalOpen:d?.driver===t,onOpenTerminal:()=>{n!==void 0&&X(r,`terminal:operate`)&&f({environmentId:r,driver:t,providerInstanceId:n.instanceId,cwd:u.cwd,command:n.installed?He(n,u.settings,u.environment.platform.os):Ye(t,u.environment.platform.os),keybindings:u.keybindings})}},i??t):(0,$.jsx)(Et,{driver:t,provider:n,terminalOpen:d?.driver===t,terminalAvailable:u!==null&&_,onOpenTerminal:()=>{n!==void 0&&u!==null&&X(r,`terminal:operate`)&&f({environmentId:r,driver:t,providerInstanceId:n.instanceId,cwd:u.cwd,command:n.installed?He(n,u.settings,u.environment.platform.os):Ye(t,u.environment.platform.os),keybindings:u.keybindings})}},t)},t[32]=_,t[33]=h,t[34]=r,t[35]=u,t[36]=d?.driver,t[37]=a):a=t[37],E=n.map(a),t[11]=x,t[12]=_,t[13]=h,t[14]=r,t[15]=i,t[16]=o,t[17]=u,t[18]=d?.driver,t[19]=C,t[20]=w,t[21]=E,t[22]=D}else C=t[19],w=t[20],E=t[21],D=t[22];let O;t[38]!==w||t[39]!==E?(O=(0,$.jsx)(`div`,{className:w,children:E}),t[38]=w,t[39]=E,t[40]=O):O=t[40];let k;t[41]===o?k=t[42]:(k=o?.some(Ct)?(0,$.jsx)(`div`,{className:`mt-3`,children:(0,$.jsx)(T,{size:`xs`,variant:`ghost-muted`,onClick:()=>m(!0),children:`Connect another ChatGPT account`})}):null,t[41]=o,t[42]=k);let A;t[43]!==p||t[44]!==r?(A=p?(0,$.jsx)(Ke,{environmentId:r,onClose:()=>m(!1),onAccountCreated:(e,t)=>g({instanceId:e,displayName:t,autoStart:!0})}):null,t[43]=p,t[44]=r,t[45]=A):A=t[45];let j;t[46]!==r||t[47]!==c||t[48]!==d?(j=d===null?null:(0,$.jsx)(Dt,{session:d,onClose:()=>{f(null),c({environmentId:r,input:{}})}},`${d.environmentId}:${d.providerInstanceId}:${d.driver}`),t[46]=r,t[47]=c,t[48]=d,t[49]=j):j=t[49];let M;return t[50]!==C||t[51]!==O||t[52]!==k||t[53]!==A||t[54]!==j||t[55]!==D?(M=(0,$.jsxs)(`section`,{children:[D,C,O,k,A,j]}),t[50]=C,t[51]=O,t[52]=k,t[53]=A,t[54]=j,t[55]=D,t[56]=M):M=t[56],M}function Ct(e){return e.driver===`codex`&&Ge(e)===`ready`}function wt(e){return e?{...e,autoStart:!1}:null}function Tt(e){let t=(0,Q.c)(28),{createdAccount:n,onAutoStartConsumed:r,environmentId:i,provider:a,serverConfig:o,terminalOpen:s,onOpenTerminal:c}=e,l=ne(i,S),u=ae(Y.updateSettings,`Codex setup settings`),d;t[0]!==n?.instanceId||t[1]!==a?.instanceId?(d=n?.instanceId??a?.instanceId??w(j.make(`codex`)),t[0]=n?.instanceId,t[1]=a?.instanceId,t[2]=d):d=t[2];let f=d,p=o.settings,m;t[3]!==n||t[4]!==f||t[5]!==p.providerInstances?(m=p.providerInstances[f]??{driver:j.make(`codex`),config:n?{enabled:!0,setupMode:`managed`}:{}},t[3]=n,t[4]=f,t[5]=p.providerInstances,t[6]=m):m=t[6];let h=m,g;t[7]===h.config?g=t[8]:(g=Je(h.config),t[7]=h.config,t[8]=g);let _=g,v=_===`existing`&&h.config!==null&&typeof h.config==`object`&&`setupMode`in h.config&&h.config.setupMode===`existing`,y;t[9]!==i||t[10]!==h||t[11]!==f||t[12]!==p||t[13]!==u?(y=e=>{u({environmentId:i,input:{patch:Ve({settings:p,instanceId:f,instance:{...h,enabled:!0,config:{...h.config!==null&&typeof h.config==`object`?h.config:{},enabled:!0,setupMode:e}}})}})},t[9]=i,t[10]=h,t[11]=f,t[12]=p,t[13]=u,t[14]=y):y=t[14];let b=y,x;return t[15]!==l||t[16]!==b||t[17]!==n?.autoStart||t[18]!==n?.displayName||t[19]!==i||t[20]!==v||t[21]!==f||t[22]!==_||t[23]!==r||t[24]!==c||t[25]!==a||t[26]!==s?(x=v?(0,$.jsx)(Et,{driver:`codex`,provider:a,terminalOpen:s,terminalAvailable:l,onOpenTerminal:c}):(0,$.jsx)(We,{presentation:`onboarding`,autoStart:n?.autoStart===!0,displayName:n?.displayName,onAutoStartConsumed:r,environmentId:i,instanceId:f,provider:a,mode:_,enabled:a?.enabled??!0,onModeChange:b}),t[15]=l,t[16]=b,t[17]=n?.autoStart,t[18]=n?.displayName,t[19]=i,t[20]=v,t[21]=f,t[22]=_,t[23]=r,t[24]=c,t[25]=a,t[26]=s,t[27]=x):x=t[27],x}function Et(e){let t=(0,Q.c)(29),{driver:n,provider:r,terminalOpen:i,terminalAvailable:a,onOpenTerminal:o}=e,s;t[0]===n?s=t[1]:(s=Se.get(j.make(n)),t[0]=n,t[1]=s);let c=s,l=r?.displayName||(n===`claudeAgent`?`Claude Code`:c?.label??n),u;t[2]===r?u=t[3]:(u=qe(r),t[2]=r,t[3]=u);let d=u,p;t[4]===r?p=t[5]:(p=Ge(r),t[4]=r,t[5]=p);let m=p,h;t[6]===n?h=t[7]:(h=j.make(n),t[6]=n,t[7]=h);let g;t[8]!==l||t[9]!==h?(g=(0,$.jsx)(Ce,{driverKind:h,displayName:l,iconClassName:`size-5`}),t[8]=l,t[9]=h,t[10]=g):g=t[10];let _;t[11]===l?_=t[12]:(_=(0,$.jsx)(`span`,{className:`block text-sm font-medium text-foreground`,children:l}),t[11]=l,t[12]=_);let y=m===`ready`?`Ready to code.`:d.headline,b=m!==`ready`&&d.detail?` · ${d.detail}`:``,x;t[13]!==y||t[14]!==b?(x=(0,$.jsxs)(`p`,{className:`mt-0.5 text-xs leading-relaxed break-words whitespace-pre-wrap text-muted-foreground`,children:[y,b]}),t[13]=y,t[14]=b,t[15]=x):x=t[15];let S;t[16]!==_||t[17]!==x?(S=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[_,x]}),t[16]=_,t[17]=x,t[18]=S):S=t[18];let C;t[19]!==o||t[20]!==m||t[21]!==d||t[22]!==a||t[23]!==i?(C=(0,$.jsx)(`div`,{className:`shrink-0`,children:m===`ready`?(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-success-foreground`,children:[(0,$.jsx)(v,{className:`size-3.5`}),`Ready`]}):m===`checking`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Checking...`}):m===`disabled`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Disabled`}):m===`attention`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:d.headline}):(0,$.jsxs)(T,{size:`xs`,variant:`ghost`,onClick:o,disabled:i||!a,children:[(0,$.jsx)(f,{className:`size-3.5`}),m===`signIn`?`Sign in`:`Install`]})}),t[19]=o,t[20]=m,t[21]=d,t[22]=a,t[23]=i,t[24]=C):C=t[24];let w;return t[25]!==S||t[26]!==C||t[27]!==g?(w=(0,$.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg border border-border bg-background px-4 py-4`,children:[g,S,C]}),t[25]=S,t[26]=C,t[27]=g,t[28]=w):w=t[28],w}function Dt(e){let t=(0,Q.c)(60),{session:n,onClose:i}=e,{command:a,cwd:o,driver:s,environmentId:l,keybindings:u,providerInstanceId:d}=n,f=ne(l,S),[p]=r(ke,!1,c),m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m={reportFailure:!1},t[0]=m):m=t[0];let h=ae(ve.open,m),_;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(_={reportFailure:!1},t[1]=_):_=t[1];let v=ae(ve.write,_),y;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(y={reportFailure:!1},t[2]=y):y=t[2];let b=ae(ve.close,y),x;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(x=Promise.resolve(),t[3]=x):x=t[3];let w=(0,Z.useRef)(x),E=(0,Z.useRef)(0),D=(0,Z.useRef)(null),O;t[4]===s?O=t[5]:(O=()=>`onboarding-${s}-${C()}`,t[4]=s,t[5]=O);let[k]=(0,Z.useState)(O),A;t[6]===l?A=t[7]:(A=g(l,dt),t[6]=l,t[7]=A);let j=A,[M,N]=(0,Z.useState)(0),[P,F]=(0,Z.useState)(`preparing`),I=P===`ready`||P===`writeFailed`,L;t[8]!==b||t[9]!==a||t[10]!==o||t[11]!==l||t[12]!==h||t[13]!==d||t[14]!==k||t[15]!==v?(L=()=>{let e=E.current+1;return E.current=e,D.current=e,F(`preparing`),w.current=w.current.then(async()=>{if(D.current!==e)return;if(!X(l,`terminal:operate`)){F(`openFailed`);return}if((await h({environmentId:l,input:{threadId:dt,terminalId:k,cwd:o,providerInstanceId:d}}))._tag!==`Success`){D.current===e&&F(`openFailed`);return}if(D.current!==e)return;if(!X(l,`terminal:operate`)){F(`writeFailed`);return}let t=await v({environmentId:l,input:{threadId:dt,terminalId:k,data:a}});D.current===e&&F(t._tag===`Success`?`ready`:`writeFailed`)}),()=>{D.current===e&&(D.current=null),w.current=w.current.then(async()=>{X(l,`terminal:operate`)&&await b({environmentId:l,input:{threadId:dt,terminalId:k,deleteHistory:!0}})})}},t[8]=b,t[9]=a,t[10]=o,t[11]=l,t[12]=h,t[13]=d,t[14]=k,t[15]=v,t[16]=L):L=t[16];let R;t[17]!==b||t[18]!==a||t[19]!==o||t[20]!==l||t[21]!==h||t[22]!==d||t[23]!==M||t[24]!==k||t[25]!==v?(R=[b,a,o,l,h,d,M,k,v],t[17]=b,t[18]=a,t[19]=o,t[20]=l,t[21]=h,t[22]=d,t[23]=M,t[24]=k,t[25]=v,t[26]=R):R=t[26],(0,Z.useEffect)(L,R);let z;t[27]!==f||t[28]!==a||t[29]!==P?(z=f?P===`writeFailed`?(0,$.jsxs)($.Fragment,{children:[`Run `,(0,$.jsx)(`code`,{className:`rounded bg-muted px-1 font-mono`,children:a}),` in this terminal.`]}):P===`ready`?`Review the command, then press Enter to run it.`:P===`openFailed`?`Could not open the setup terminal.`:`Preparing command...`:`This connection cannot control terminals.`,t[27]=f,t[28]=a,t[29]=P,t[30]=z):z=t[30];let B;t[31]===z?B=t[32]:(B=(0,$.jsx)(`span`,{className:`text-2xs font-medium text-muted-foreground`,children:z}),t[31]=z,t[32]=B);let V;t[33]!==f||t[34]!==l||t[35]!==P?(V=P===`openFailed`?(0,$.jsx)(T,{size:`xs`,variant:`ghost`,disabled:!f,onClick:()=>{X(l,`terminal:operate`)&&N(Ot)},children:`Retry`}):null,t[33]=f,t[34]=l,t[35]=P,t[36]=V):V=t[36];let H;t[37]===i?H=t[38]:(H=(0,$.jsx)(T,{size:`xs`,variant:`ghost-muted`,onClick:i,children:`Close`}),t[37]=i,t[38]=H);let U;t[39]!==V||t[40]!==H?(U=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[V,H]}),t[39]=V,t[40]=H,t[41]=U):U=t[41];let W;t[42]!==B||t[43]!==U?(W=(0,$.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border/60 bg-background/60 px-3 py-1.5`,children:[B,U]}),t[42]=B,t[43]=U,t[44]=W):W=t[44];let G;t[45]!==p||t[46]!==o||t[47]!==s||t[48]!==u||t[49]!==i||t[50]!==d||t[51]!==k||t[52]!==I||t[53]!==j?(G=I?(0,$.jsx)(_e,{threadRef:j,threadId:dt,terminalId:k,terminalLabel:`Install ${s}`,cwd:o,providerInstanceId:d,advancedTypography:p,onSessionExited:i,focusRequestId:1,autoFocus:!0,visible:!0,resizeEpoch:0,drawerHeight:256,keybindings:u}):null,t[45]=p,t[46]=o,t[47]=s,t[48]=u,t[49]=i,t[50]=d,t[51]=k,t[52]=I,t[53]=j,t[54]=G):G=t[54];let K;t[55]===G?K=t[56]:(K=(0,$.jsx)(`div`,{className:`h-64`,children:G}),t[55]=G,t[56]=K);let q;return t[57]!==W||t[58]!==K?(q=(0,$.jsxs)(`div`,{"data-thread-terminal-drawer":!0,className:`mt-4 overflow-hidden rounded-lg border border-border/70 bg-background text-foreground`,children:[W,K]}),t[57]=W,t[58]=K,t[59]=q):q=t[59],q}function Ot(e){return e+1}var kt=`This connection cannot import projects or thread history.`;function At(e){let t=(0,Q.c)(81),{scans:n,isImporting:r,setIsImporting:i,onDone:a}=e,{environments:o}=te(),s=re(n,d),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={reportFailure:!1},t[0]=c):c=t[0];let l=ae(V.create,c),u;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(u={reportFailure:!1},t[1]=u):u=t[1];let f=ae(ot,u),p=U(),[m,h]=(0,Z.useState)(null),g=(0,Z.useRef)(``),v=(0,Z.useRef)(0),[y,b]=(0,Z.useState)(null),x;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(x=new Map,t[2]=x):x=t[2];let S=(0,Z.useRef)(x),C;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(C=new Map,t[3]=C):C=t[3];let w=(0,Z.useRef)(C),E;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(E=[],t[4]=E):E=t[4];let D=(0,Z.useRef)(E),A;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(A=new Map,t[5]=A):A=t[5];let j=(0,Z.useRef)(A),M=(0,Z.useRef)(0),N,P;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(N=()=>(M.current+=1,()=>{M.current+=1}),P=[],t[6]=N,t[7]=P):(N=t[6],P=t[7]),(0,Z.useEffect)(N,P);let F,I;t[8]!==y||t[9]!==a||t[10]!==p||t[11]!==i?(I=()=>{y!==null&&p.some(e=>e.id===y.projectId&&e.environmentId===y.environmentId)&&(b(null),a(y,g.current,v.current).then(e=>{e||i(!1)}))},F=[y,a,p,i],t[8]=y,t[9]=a,t[10]=p,t[11]=i,t[12]=F,t[13]=I):(F=t[12],I=t[13]),(0,Z.useEffect)(I,F);let R;t[14]===n?R=t[15]:(R=Qe(n.flatMap(Lt)),t[14]=n,t[15]=R);let{available:z,recent:B}=R,W;t[16]!==B||t[17]!==m?(W=m??new Set(B.map(It)),t[16]=B,t[17]=m,t[18]=W):W=t[18];let K=W,q,J;if(t[19]!==z||t[20]!==K||t[21]!==s){let e;t[24]===K?e=t[25]:(e=e=>K.has(e.key),t[24]=K,t[25]=e),q=z.filter(e);let n;t[26]===s?n=t[27]:(n=e=>s.has(e.environmentId),t[26]=s,t[27]=n),J=q.every(n),t[19]=z,t[20]=K,t[21]=s,t[22]=q,t[23]=J}else q=t[22],J=t[23];let ee=J,[Y,ne]=(0,Z.useState)(``),X=ee?Y===kt?``:Y:kt,ie;t[28]!==a||t[29]!==i?(ie=()=>{let e=nt(D.current,w.current,S.current);if(e===void 0){a(void 0,g.current,v.current);return}i(!0),b(e)},t[28]=a,t[29]=i,t[30]=ie):ie=t[30];let oe=ie,se;t[31]!==l||t[32]!==oe||t[33]!==f||t[34]!==r||t[35]!==a||t[36]!==n||t[37]!==i?(se=async e=>{if(r)return;let t=()=>e.every(Ft),o=()=>{i(!1),ne(kt)};if(!t()){o();return}if(e.length===0){a();return}i(!0),g.current=``,v.current=0,D.current=e.map(Pt);let s=M.current,c=S.current,u=j.current,d=c.size>0?e.filter(e=>c.has(e.key)).length:0,p=0,m=0,h=new Set;for(let n of e){let{environmentId:e}=n;if(s!==M.current||c!==S.current)return;if(!t()){o();return}if(c.has(n.key))continue;let r=tt(H(),e,n);if(r===null){let t=u.get(n.key);if(t===void 0){let e=k();t={projectId:e,commandId:O.make(`onboarding:project:create:${e}`)},u.set(n.key,t)}r=t.projectId;let i=await l({environmentId:e,input:{projectId:r,commandId:t.commandId,title:n.title,workspaceRoot:n.path,createWorkspaceRootIfMissing:!1,defaultModelSelection:null}});if(s!==M.current||c!==S.current)return;if(i._tag!==`Success`){L(i)||(u.delete(n.key),h.add(e));continue}}if(!t()){o();return}let i=await f({environmentId:e,input:{projectId:r,expectedWorkspaceRoot:n.path}});if(s!==M.current||c!==S.current)return;i._tag===`Success`?(p+=i.value.importedCount,m+=i.value.skippedCount,i.value.importedCount>0&&w.current.set(n.key,_(e,r)),i.value.skippedCount===0&&(d+=1,c.set(n.key,_(e,r)))):L(i)||(u.delete(n.key),h.add(e))}for(let e of n)h.has(e.environmentId)&&e.refresh();i(!1),v.current=p,d<e.length&&(p>0&&m>0?g.current=`Imported ${p} ${p===1?`thread`:`threads`}. ${m} ${m===1?`thread`:`threads`} could not be imported.`:m>0?g.current=`${m} ${m===1?`thread could`:`threads could`} not be imported.`:p>0?g.current=`Imported ${p} ${p===1?`thread`:`threads`}. Some thread history could not be imported.`:g.current=`Could not import thread history.`),oe()},t[31]=l,t[32]=oe,t[33]=f,t[34]=r,t[35]=a,t[36]=n,t[37]=i,t[38]=se):se=t[38];let ce=se;if(n.every(Nt)&&n.some(Mt)){let e;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:`Your projects`}),t[39]=e):e=t[39];let n;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 py-6`,children:[(0,$.jsx)(G,{size:`lg`,tone:`muted`}),(0,$.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:`Looking for projects from Claude Code and Codex…`})]}),t[40]=n):n=t[40];let r;return t[41]===a?r=t[42]:(r=(0,$.jsxs)(`div`,{className:`flex h-full min-h-40 flex-col`,children:[e,n,(0,$.jsx)(`div`,{className:`flex justify-end`,children:(0,$.jsx)(T,{variant:`ghost-muted`,onClick:()=>void a(),children:`Do not import projects`})})]}),t[41]=a,t[42]=r),r}let le;t[43]!==z||t[44]!==r||t[45]!==q?(le=z.length>0?(0,$.jsxs)(`div`,{className:`mt-5 flex items-center justify-between gap-3 text-xs text-muted-foreground`,children:[(0,$.jsxs)(`span`,{role:`status`,children:[q.length,` of `,z.length,` selected`]}),(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,$.jsx)(T,{variant:`ghost`,size:`xs`,disabled:r||q.length===z.length,onClick:()=>h(new Set(z.map(jt))),children:`Select all`}),(0,$.jsx)(T,{variant:`ghost`,size:`xs`,disabled:r||q.length===0,onClick:()=>h(new Set),children:`Select none`})]})]}):null,t[43]=z,t[44]=r,t[45]=q,t[46]=le):le=t[46];let ue;if(t[47]!==z||t[48]!==o||t[49]!==r||t[50]!==n||t[51]!==K){let e;t[53]!==z||t[54]!==o||t[55]!==r||t[56]!==n.length||t[57]!==K?(e=e=>{let t=z.filter(t=>t.environmentId===e.environmentId),i=o.find(t=>t.environmentId===e.environmentId)?.label??`Computer`;return(0,$.jsxs)(`fieldset`,{className:`min-w-0 space-y-0.5`,disabled:r,children:[n.length>1?(0,$.jsx)(`legend`,{className:`mb-2 text-sm font-medium`,children:i}):null,e.isPending&&e.data===null?(0,$.jsxs)(`div`,{className:`flex items-center gap-2 py-3 text-sm text-muted-foreground`,children:[(0,$.jsx)(G,{size:`md`}),`Looking for projects…`]}):e.error===null?t.length===0?(0,$.jsx)(`p`,{className:`py-2 text-sm text-muted-foreground`,children:`No existing Claude Code or Codex projects found.`}):null:(0,$.jsxs)(`div`,{role:`alert`,className:`flex items-center justify-between gap-3 text-sm text-muted-foreground`,children:[(0,$.jsxs)(`span`,{children:[`Could not check projects. `,e.error]}),(0,$.jsx)(T,{variant:`ghost`,size:`sm`,onClick:e.refresh,children:`Retry`})]}),e.data?.truncated?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:pt}):null,(0,$.jsx)(Rt,{candidates:t,selectedKeys:K,onSelectionChange:h})]},e.environmentId)},t[53]=z,t[54]=o,t[55]=r,t[56]=n.length,t[57]=K,t[58]=e):e=t[58],ue=n.map(e),t[47]=z,t[48]=o,t[49]=r,t[50]=n,t[51]=K,t[52]=ue}else ue=t[52];let fe;t[59]===ue?fe=t[60]:(fe=(0,$.jsx)(de,{scrollFade:!0,className:`mt-2 h-auto max-h-80`,children:(0,$.jsx)(`div`,{className:`space-y-5 pr-3`,children:ue})}),t[59]=ue,t[60]=fe);let pe;t[61]===X?pe=t[62]:(pe=X?(0,$.jsx)(`p`,{className:`mt-3 text-sm text-destructive`,children:X}):null,t[61]=X,t[62]=pe);let me;t[63]!==oe||t[64]!==r?(me=(0,$.jsx)(T,{variant:`ghost-muted`,disabled:r,onClick:oe,children:`Do not import projects`}),t[63]=oe,t[64]=r,t[65]=me):me=t[65];let he=!ee||r||q.length===0,ge;t[66]!==ce||t[67]!==q?(ge=()=>void ce(q),t[66]=ce,t[67]=q,t[68]=ge):ge=t[68];let _e=r?`Importing…`:`Import ${q.length} ${q.length===1?`project`:`projects`}`,ve;t[69]!==he||t[70]!==ge||t[71]!==_e?(ve=(0,$.jsx)(T,{autoFocus:!0,disabled:he,onClick:ge,children:_e}),t[69]=he,t[70]=ge,t[71]=_e,t[72]=ve):ve=t[72];let ye;t[73]!==me||t[74]!==ve?(ye=(0,$.jsxs)(`div`,{className:`mt-6 flex flex-wrap items-center justify-end gap-3`,children:[me,ve]}),t[73]=me,t[74]=ve,t[75]=ye):ye=t[75];let be;return t[76]!==le||t[77]!==fe||t[78]!==pe||t[79]!==ye?(be=(0,$.jsxs)(Kt,{title:`Import your projects`,description:`Import projects and conversations from Claude Code and Codex on your selected computers.`,children:[le,fe,pe,ye]}),t[76]=le,t[77]=fe,t[78]=pe,t[79]=ye,t[80]=be):be=t[80],be}function jt(e){return e.key}function Mt(e){return e.isPending}function Nt(e){return e.data===null}function Pt(e){return e.key}function Ft(e){return X(e.environmentId,d)}function It(e){return e.key}function Lt(e){return(e.data?.candidates??[]).map(t=>({...t,environmentId:e.environmentId,key:it(e.environmentId,t.path)}))}function Rt(e){let t=(0,Q.c)(25),{candidates:n,selectedKeys:r,onSelectionChange:i}=e,a;t[0]===n?a=t[1]:(a=et(n),t[0]=n,t[1]=a);let{repositories:s,other:c}=a,l;t[2]!==i||t[3]!==r?(l=(e,t)=>{let n=new Set(r);for(let r of e)t?n.add(r):n.delete(r);i(n)},t[2]=i,t[3]=r,t[4]=l):l=t[4];let u=l,d;if(t[5]!==c||t[6]!==r){let e;t[8]===r?e=t[9]:(e=e=>r.has(e.key),t[8]=r,t[9]=e),d=c.filter(e),t[5]=c,t[6]=r,t[7]=d}else d=t[7];let f=d.length,p;if(t[10]!==s||t[11]!==r||t[12]!==u){let e;t[14]!==r||t[15]!==u?(e=e=>(0,$.jsx)(Bt,{group:e,selectedKeys:r,onToggle:u},e.key),t[14]=r,t[15]=u,t[16]=e):e=t[16],p=s.map(e),t[10]=s,t[11]=r,t[12]=u,t[13]=p}else p=t[13];let m;t[17]!==c||t[18]!==f||t[19]!==r||t[20]!==u?(m=c.length>0?(0,$.jsxs)(Re,{children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40`,children:[(0,$.jsx)(ge,{checked:f===c.length,indeterminate:f>0&&f<c.length,onCheckedChange:e=>u(c.map(zt),e===!0)}),(0,$.jsxs)(Pe,{className:`group flex min-w-0 flex-1 items-center gap-1.5 text-left`,children:[(0,$.jsx)(o,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-panel-open:rotate-90`}),(0,$.jsx)(`span`,{className:`truncate text-sm text-muted-foreground`,children:`Other folders`}),(0,$.jsxs)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground tabular-nums`,children:[c.length,` `,c.length===1?`folder`:`folders`]})]})]}),(0,$.jsx)(Me,{children:c.map(e=>(0,$.jsx)(Wt,{candidate:e,path:e.path,nested:!0,checked:r.has(e.key),onCheckedChange:t=>u([e.key],t)},e.key))})]}):null,t[17]=c,t[18]=f,t[19]=r,t[20]=u,t[21]=m):m=t[21];let h;return t[22]!==p||t[23]!==m?(h=(0,$.jsxs)($.Fragment,{children:[p,m]}),t[22]=p,t[23]=m,t[24]=h):h=t[24],h}function zt(e){return e.key}function Bt(e){let t=(0,Q.c)(53),{group:n,selectedKeys:r,onToggle:i}=e,a,s;if(t[0]!==n.candidates||t[1]!==r){a=n.candidates.map(Ht);let e;t[4]===r?e=t[5]:(e=e=>r.has(e),t[4]=r,t[5]=e),s=a.filter(e),t[0]=n.candidates,t[1]=r,t[2]=a,t[3]=s}else a=t[2],s=t[3];let c=s.length,l=n.candidates.length===1,u=n.candidates[0];if(l&&u!==void 0){let e=n.label,a=u.path,o;t[6]!==u.key||t[7]!==r?(o=r.has(u.key),t[6]=u.key,t[7]=r,t[8]=o):o=t[8];let s;t[9]!==i||t[10]!==u.key?(s=e=>i([u.key],e),t[9]=i,t[10]=u.key,t[11]=s):s=t[11];let c;return t[12]!==n.label||t[13]!==u||t[14]!==o||t[15]!==s?(c=(0,$.jsx)(Wt,{candidate:u,label:e,path:a,checked:o,onCheckedChange:s}),t[12]=n.label,t[13]=u,t[14]=o,t[15]=s,t[16]=c):c=t[16],c}let d=c===a.length,f=c>0&&c<a.length,p;t[17]!==a||t[18]!==i?(p=e=>i(a,e===!0),t[17]=a,t[18]=i,t[19]=p):p=t[19];let m;t[20]!==d||t[21]!==f||t[22]!==p?(m=(0,$.jsx)(ge,{checked:d,indeterminate:f,onCheckedChange:p}),t[20]=d,t[21]=f,t[22]=p,t[23]=m):m=t[23];let h;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(o,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-panel-open:rotate-90`}),t[24]=h):h=t[24];let g;t[25]===n.label?g=t[26]:(g=(0,$.jsx)(`span`,{className:`truncate text-sm font-medium`,children:n.label}),t[25]=n.label,t[26]=g);let _;t[27]===n.candidates?_=t[28]:(_=new Set(n.candidates.flatMap(Vt)),t[27]=n.candidates,t[28]=_);let v;t[29]===_?v=t[30]:(v=[..._],t[29]=_,t[30]=v);let y;t[31]!==n.lastActiveAt||t[32]!==n.threadCount||t[33]!==v?(y=(0,$.jsx)(Gt,{sources:v,threadCount:n.threadCount,lastActiveAt:n.lastActiveAt}),t[31]=n.lastActiveAt,t[32]=n.threadCount,t[33]=v,t[34]=y):y=t[34];let b;t[35]!==y||t[36]!==g?(b=(0,$.jsxs)(Pe,{className:`group flex min-w-0 flex-1 items-center gap-1.5 text-left`,children:[h,g,y]}),t[35]=y,t[36]=g,t[37]=b):b=t[37];let x;t[38]!==b||t[39]!==m?(x=(0,$.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40`,children:[m,b]}),t[38]=b,t[39]=m,t[40]=x):x=t[40];let S;if(t[41]!==n.candidates||t[42]!==i||t[43]!==r){let e;t[45]!==i||t[46]!==r?(e=e=>(0,$.jsx)(Wt,{candidate:e,path:e.path,nested:!0,checked:r.has(e.key),onCheckedChange:t=>i([e.key],t)},e.key),t[45]=i,t[46]=r,t[47]=e):e=t[47],S=n.candidates.map(e),t[41]=n.candidates,t[42]=i,t[43]=r,t[44]=S}else S=t[44];let C;t[48]===S?C=t[49]:(C=(0,$.jsx)(Me,{children:S}),t[48]=S,t[49]=C);let w;return t[50]!==x||t[51]!==C?(w=(0,$.jsxs)(Re,{defaultOpen:!0,children:[x,C]}),t[50]=x,t[51]=C,t[52]=w):w=t[52],w}function Vt(e){return e.sources}function Ht(e){return e.key}function Ut(e){let t=(0,Q.c)(12),{path:n,className:r}=e,i;t[0]===n?i=t[1]:(i=rt(n),t[0]=n,t[1]=i);let{name:a,parent:o}=i,s;t[2]===r?s=t[3]:(s=M(`flex min-w-0 items-baseline font-mono`,r),t[2]=r,t[3]=s);let c;t[4]===o?c=t[5]:(c=o.length>0?(0,$.jsx)(`span`,{className:`truncate`,children:o}):null,t[4]=o,t[5]=c);let l;t[6]===a?l=t[7]:(l=(0,$.jsx)(`span`,{className:`max-w-full shrink-0 truncate`,children:a}),t[6]=a,t[7]=l);let u;return t[8]!==s||t[9]!==c||t[10]!==l?(u=(0,$.jsxs)(`span`,{className:s,children:[c,l]}),t[8]=s,t[9]=c,t[10]=l,t[11]=u):u=t[11],u}function Wt(e){let t=(0,Q.c)(30),{candidate:n,label:r,path:i,nested:a,checked:o,onCheckedChange:s}=e,c=a!==void 0&&a,l=c&&`pl-8`,u;t[0]===l?u=t[1]:(u=M(`flex cursor-pointer items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40 has-disabled:cursor-default`,l),t[0]=l,t[1]=u);let d;t[2]===s?d=t[3]:(d=e=>s(e===!0),t[2]=s,t[3]=d);let f;t[4]!==o||t[5]!==d?(f=(0,$.jsx)(ge,{checked:o,onCheckedChange:d}),t[4]=o,t[5]=d,t[6]=f):f=t[6];let p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-2 truncate`}),t[7]=p):p=t[7];let m;t[8]===r?m=t[9]:(m=r===void 0?null:(0,$.jsx)(`span`,{className:`truncate text-sm font-medium`,children:r}),t[8]=r,t[9]=m);let h;t[10]!==r||t[11]!==i?(h=i===void 0?null:(0,$.jsx)(Ut,{path:i,className:r===void 0?`text-xs`:`text-2xs text-muted-foreground`}),t[10]=r,t[11]=i,t[12]=h):h=t[12];let g;t[13]!==m||t[14]!==h?(g=(0,$.jsxs)(se,{render:p,children:[m,h]}),t[13]=m,t[14]=h,t[15]=g):g=t[15];let _;t[16]===n.path?_=t[17]:(_=(0,$.jsx)(ce,{variant:`code`,children:n.path}),t[16]=n.path,t[17]=_);let v;t[18]!==_||t[19]!==g?(v=(0,$.jsxs)(le,{children:[g,_]}),t[18]=_,t[19]=g,t[20]=v):v=t[20];let y=c?null:n.sources,b;t[21]!==n.lastActiveAt||t[22]!==n.threadCount||t[23]!==y?(b=(0,$.jsx)(Gt,{sources:y,threadCount:n.threadCount,lastActiveAt:n.lastActiveAt}),t[21]=n.lastActiveAt,t[22]=n.threadCount,t[23]=y,t[24]=b):b=t[24];let x;return t[25]!==v||t[26]!==b||t[27]!==u||t[28]!==f?(x=(0,$.jsxs)(`label`,{className:u,children:[f,v,b]}),t[25]=v,t[26]=b,t[27]=u,t[28]=f,t[29]=x):x=t[29],x}function Gt(e){let t=(0,Q.c)(19),{sources:n,threadCount:r,lastActiveAt:i}=e,a;t[0]===i?a=t[1]:(a=i===null?null:oe(i),t[0]=i,t[1]=a);let o=a,s=o===null?``:o.suffix===null?`now`:o.value,c;t[2]===n?c=t[3]:(c=n?.includes(`claudeAgent`)?(0,$.jsx)(`span`,{role:`img`,"aria-label":`Claude Code`,children:(0,$.jsx)(Ce,{driverKind:j.make(`claudeAgent`),displayName:`Claude Code`,iconClassName:`size-3`})}):null,t[2]=n,t[3]=c);let l;t[4]===c?l=t[5]:(l=(0,$.jsx)(`span`,{className:`flex size-4 items-center justify-center`,children:c}),t[4]=c,t[5]=l);let u;t[6]===n?u=t[7]:(u=n?.includes(`codex`)?(0,$.jsx)(`span`,{role:`img`,"aria-label":`Codex`,children:(0,$.jsx)(Ce,{driverKind:j.make(`codex`),displayName:`Codex`,iconClassName:`size-3`})}):null,t[6]=n,t[7]=u);let d;t[8]===u?d=t[9]:(d=(0,$.jsx)(`span`,{className:`flex size-4 items-center justify-center`,children:u}),t[8]=u,t[9]=d);let f;t[10]===r?f=t[11]:(f=(0,$.jsx)(`span`,{className:`text-right`,children:r}),t[10]=r,t[11]=f);let p;t[12]===s?p=t[13]:(p=(0,$.jsx)(`span`,{className:`text-right whitespace-nowrap`,children:s}),t[12]=s,t[13]=p);let m;return t[14]!==l||t[15]!==d||t[16]!==f||t[17]!==p?(m=(0,$.jsxs)(`span`,{className:`ml-auto grid shrink-0 grid-cols-[1rem_1rem_2.5rem_2.25rem] items-center gap-x-1 text-xs text-muted-foreground tabular-nums`,children:[l,d,f,p]}),t[14]=l,t[15]=d,t[16]=f,t[17]=p,t[18]=m):m=t[18],m}function Kt(e){let t=(0,Q.c)(8),{title:n,description:r,children:i}=e,a;t[0]===n?a=t[1]:(a=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:n}),t[0]=n,t[1]=a);let o;t[2]===r?o=t[3]:(o=r?(0,$.jsx)(`p`,{className:`mt-2.5 text-sm leading-relaxed text-muted-foreground`,children:r}):null,t[2]=r,t[3]=o);let s;return t[4]!==i||t[5]!==a||t[6]!==o?(s=(0,$.jsxs)($.Fragment,{children:[a,o,i]}),t[4]=i,t[5]=a,t[6]=o,t[7]=s):s=t[7],s}var qt=y(x);function Jt(){let e=(0,Q.c)(14),{authGateState:t}=Ne.useRouteContext(),n=K(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={select:Xt},e[0]=r):r=e[0];let i=q(r),o;e[1]===i?o=e[2]:(o=i.startsWith(`agents:`)?a(qt(i.slice(7))):void 0,e[1]=i,e[2]=o);let s=o,c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c={select:Yt},e[3]=c):c=e[3];let l=q(c),[u,d]=(0,Z.useState)(!1),f=ye(),p=t.status===`authenticated`,m;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(ze,{}),e[4]=m):m=e[4];let h;e[5]!==u||e[6]!==l||e[7]!==p||e[8]!==n||e[9]!==f||e[10]!==s?(h=l&&!u?(0,$.jsx)(mt,{localAvailable:p,resumeEnvironmentId:s,onDone:async e=>{if(d(!0),e!==void 0){await f(e,{replace:!0}).catch(()=>n({to:`/`,replace:!0}));return}await n({to:`/`,replace:!0})}}):null,e[5]=u,e[6]=l,e[7]=p,e[8]=n,e[9]=f,e[10]=s,e[11]=h):h=e[11];let g;return e[12]===h?g=e[13]:(g=(0,$.jsxs)($.Fragment,{children:[m,h]}),e[12]=h,e[13]=g),g}function Yt(e){return e.pathname===`/welcome`}function Xt(e){return e.hash}export{Jt as component};
|
|
2
|
-
//# sourceMappingURL=welcome-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$o as n,As as r,BE as i,BT as a,Cd as o,Es as s,Ey as c,Qu as l,RT as u,S_ as d,Sm as f,Sy as p,Vc as m,Wf as h,Xs as g,Ys as _,bd as v,eb as y,es as b,hy as x,j_ as S,l as C,l_ as w,lr as T,mE as E,mp as D,my as O,o as k,rs as A,s_ as j,t as M,zd as N}from"./utils-B0w8dSf5.js";import{At as P,M as F,N as I,R as L,W as R,o as z}from"./runtime-D2c--mqA.js";import{$ as B,G as V,f as H,w as U}from"./entities-CHcmKww2.js";import{t as W}from"./runtime-FrzhE_LH.js";import{t as G}from"./spinner-BkmZz-kc.js";import{t as K}from"./useNavigate-CSxB1zLo.js";import{t as q}from"./useLocation-XbiRdmmb.js";import{i as J}from"./toast-VoruYA6X.js";import{D as ee,E as te}from"./useSettings-u7ZNp27u.js";import{f as Y}from"./server-DZYI6rhH.js";import{i as ne,n as X,o as re}from"./session-DhEZhn9K.js";import{t as ie}from"./query-DrtB5w10.js";import{t as ae}from"./use-atom-command-DrwAZaSK.js";import{a as oe}from"./timestampFormat-wac2e_Jz.js";import{a as se,n as ce,t as le}from"./tooltip-CuJiZzK7.js";import{t as ue}from"./input-CDBTiBJx.js";import{t as de}from"./scroll-area-CT3H0nmo.js";import{r as fe}from"./dist-COvLc5b4.js";import{t as pe}from"./dialog-Bdi4gsq5.js";import{t as me}from"./useP4ConnectAuthPrompt-BVHt43id.js";import{t as he}from"./CommandBlock-BI6CIDH1.js";import{t as ge}from"./checkbox-PYOAN-IL.js";import{t as _e}from"./ThreadTerminalDrawer-BZX00N_c.js";import{i as ve}from"./terminalSessions-CYOZNbmk.js";import{n as ye}from"./useHandleNewThread-CX2gg9sv.js";import{r as be,t as xe}from"./alert-D4hu_q2y.js";import{i as Se,n as Ce}from"./ChatGptUsageButton-C5QxZxAY.js";import{t as we}from"./onboarding-D_AA7mEu.js";import{Gt as Te,Ur as Ee,Wt as De,Yt as Oe,Zi as ke,_ as Ae,ca as je,da as Me,f as Ne,fa as Pe,la as Fe,oa as Ie,sa as Le,ua as Re}from"./main-CSxSeVCm.js";import{t as ze}from"./NoProjectsHero-BvLl09sT.js";import{t as Be}from"./legalLinks-C4VP5hPh.js";import{r as Ve}from"./SettingsPanels.logic-CZpg8aSK.js";import{d as He,f as Ue,i as We,l as Ge,n as Ke,o as qe,t as Je,u as Ye}from"./CodexSetupSection.logic-452dIoYg.js";var Z=e(t(),1),Q=i(),Xe=2592e6,Ze=3;function Qe(e,t=Date.now()){let n=t-Xe;return{available:e,recent:e.filter(e=>{if(e.git===null||e.threadCount<Ze||e.lastActiveAt===null)return!1;let r=Date.parse(e.lastActiveAt);return r>=n&&r<=t})}}function $e(e,t){return e===null?t:t===null||e>t?e:t}function et(e){let t=new Map,n=[];for(let r of e){if(r.git===null){n.push(r);continue}let e=r.git??{remoteKey:null,repository:null},i=e.remoteKey===null?`path:${r.path}`:`remote:${e.remoteKey}`,a=t.get(i);if(a===void 0){t.set(i,{key:i,label:e.repository??r.title,repository:e.repository,candidates:[r],threadCount:r.threadCount,lastActiveAt:r.lastActiveAt});continue}a.candidates.push(r),t.set(i,{...a,threadCount:a.threadCount+r.threadCount,lastActiveAt:$e(a.lastActiveAt,r.lastActiveAt)})}return{repositories:[...t.values()].sort((e,t)=>e.lastActiveAt===t.lastActiveAt?e.label.localeCompare(t.label):e.lastActiveAt===null?1:t.lastActiveAt===null?-1:t.lastActiveAt.localeCompare(e.lastActiveAt)),other:n}}function tt(e,t,n){if(n.projectId!==void 0)return n.projectId;let r=e.filter(e=>e.environmentId===t),i=B(r,n.path);return i===void 0?null:i.id}function nt(e,t,n){for(let n of e){let e=t.get(n);if(e!==void 0)return e}for(let t of e){let e=n.get(t);if(e!==void 0)return e}}function rt(e){if(/^[A-Za-z]:[\\/]+$/.test(e)||/^[\\/]{2}[^\\/]+[\\/][^\\/]+[\\/]*$/.test(e))return{name:e,parent:``};let t=e.replace(/[\\/]+$/,``),n=Math.max(t.lastIndexOf(`/`),t.lastIndexOf(`\\`));return t.length===0?{name:e,parent:``}:n<0?{name:t,parent:``}:{name:t.slice(n+1),parent:t.slice(0,n+1)}}function it(e,t){return JSON.stringify([e,t])}var at=I(W,{label:`environment-data:agent-sessions:scan`,tag:m.agentSessionsScan,staleTimeMs:3e4,idleTtlMs:3e5}),ot=F(W,{label:`environment-data:agent-sessions:import`,tag:m.agentSessionsImport});function st(e){return P(e.entry)}function ct(e,t){let n=e.filter(e=>t.has(e.environmentId)),r=e=>n.filter(t=>e(t.connection.phase)).map(e=>e.environmentId),i=r(e=>e===`connected`),a=n.some(e=>e.connection.phase===`connecting`);return{ready:i.length>0&&!a,environmentIds:i,skippedIds:r(e=>e!==`connected`&&e!==`connecting`)}}function lt(e){let t=(0,Q.c)(3),r=(0,Z.useContext)(b),i;return t[0]!==e||t[1]!==r?(i=A(t=>e.map(e=>{let n=at({environmentId:e,input:{}}),i=t(n);return{environmentId:e,data:u(s(i)),error:i._tag===`Failure`?ie(i.cause):null,isPending:i.waiting||i._tag===`Initial`,refresh:()=>r.refresh(n)}})),t[0]=e,t[1]=r,t[2]=i):i=t[2],n(i)}var $=e(E(),1),ut=[],dt=p.make(`onboarding-agent-setup`),ft=[`Connect`,`Agents`,`Projects`],pt=`Scan limit reached. Some projects or conversations may be missing.`;function mt({localAvailable:e,onDone:t,resumeEnvironmentId:n}){let r=Oe(),[i,a]=(0,Z.useState)(n?`agents`:`connection`),{environments:o}=te(),[s,c]=(0,Z.useState)(null),l=(0,Z.useRef)(new Set),[u,d]=(0,Z.useState)(n?[n]:[]),[f,p]=(0,Z.useState)(!1),m=(0,Z.useRef)(null),h=(0,Z.useRef)(null),g=ee();(0,Z.useEffect)(()=>{let e=o.filter(e=>!l.current.has(e.environmentId));if(e.length===0)return;for(let t of e)l.current.add(t.environmentId);let t=e.filter(e=>e.entry.enabled);t.length!==0&&c(e=>new Set([...e??[],...t.map(e=>e.environmentId)]))},[o]);let _=s??new Set(g?[g.environmentId]:[]),v=lt(i===`import`?u:ut),y=i===`import`&&v.every(e=>e.data===null)&&v.some(e=>e.isPending),b=e=>{e.length!==0&&(d(e),a(`agents`))},x=i===`agents`?1:i===`import`?2:0,S=(0,Z.useCallback)((e,n,i=0)=>{if(m.current!==null)return m.current;h.current!==null&&(J.close(h.current),h.current=null);let a=r().then(async()=>(h.current!==null&&(J.close(h.current),h.current=null),await t(e),n?J.add({type:`warning`,title:`Some history was not imported`,description:n,timeout:0}):i>0&&J.add({type:`success`,title:`Imported ${i} ${i===1?`thread`:`threads`}`}),!0)).catch(()=>{let e={type:`error`,title:`Could not finish setup`,description:`Your settings could not be saved. Try again.`};return h.current===null?h.current=J.add(e):J.update(h.current,e),!1}).finally(()=>{m.current===a&&(m.current=null)});return m.current=a,a},[r,t]);return(0,$.jsxs)(pe,{open:!0,disablePointerDismissal:!0,onOpenChange:(e,t)=>t.cancel(),children:[(0,$.jsxs)(je,{size:`wide`,bottomStickOnMobile:!1,showCloseButton:!1,initialFocus:()=>document.getElementById(`onboarding-pairing-url`)??!0,children:[(0,$.jsx)(Ie,{title:`Set up P4 Code`,identity:(0,$.jsxs)(`div`,{className:`flex items-baseline gap-1.5`,role:`img`,"aria-label":`P4 Code`,children:[(0,$.jsx)(Ee,{className:`h-4 w-auto shrink-0`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`text-2xl font-medium tracking-tight text-muted-foreground`,children:`Code`})]}),children:(0,$.jsx)(Fe,{steps:ft,currentStep:x,isStepDisabled:e=>f||e>=x,onStepChange:e=>{f||e>x||a(e===0?`connection`:`agents`)}})}),(0,$.jsx)(Le,{holdHeight:y,children:i===`connection`?(0,$.jsx)(ht,{expandPairingInitially:!e&&!z(),selectedIds:_,autoSelectedComputers:l.current,onSelectionChange:c,onToggleEnvironment:(e,t)=>c(n=>{let r=new Set(n??_);return t?r.add(e):r.delete(e),r}),onContinue:()=>b(ct(o,_).environmentIds),onPaired:e=>{c(new Set([..._,e]))}}):i===`agents`?(0,$.jsx)(xt,{environmentIds:u,onContinue:()=>a(`import`)}):(0,$.jsx)(At,{scans:v,isImporting:f,setIsImporting:p,onDone:S})})]}),(0,$.jsx)(Ae,{})]})}function ht(e){let t=(0,Q.c)(44),{autoSelectedComputers:n,expandPairingInitially:r,selectedIds:i,onSelectionChange:a,onToggleEnvironment:s,onContinue:c,onPaired:u}=e,{environments:d}=te(),f;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(f=z(),t[0]=f):f=t[0];let p=f,m;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(m=e=>!p||!st(e),t[1]=m):m=t[1];let g=d.filter(m),[_,v]=(0,Z.useState)(r),[y,b]=(0,Z.useState)(!1),{ready:x,skippedIds:S}=ct(d,i),C=d.filter(e=>S.includes(e.environmentId)).map(gt),w=(0,Z.useRef)(null);(0,Z.useEffect)(()=>{x&&(document.activeElement===document.body||document.activeElement?.getAttribute(`role`)===`dialog`)&&w.current?.focus()},[x]);let E,O;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:`Connect your computers`}),O=(0,$.jsx)(`p`,{className:`mt-2.5 text-sm leading-relaxed text-muted-foreground`,children:`Choose one or more computers. We’ll set up agents and projects on each.`}),t[2]=E,t[3]=O):(E=t[2],O=t[3]);let k=g.length>0?(0,$.jsxs)(`fieldset`,{className:`mt-5 space-y-2`,children:[(0,$.jsx)(`legend`,{className:`sr-only`,children:`Computers to set up`}),g.map(e=>(0,$.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-lg border border-border bg-background px-3 py-3`,children:[(0,$.jsx)(ge,{checked:i.has(e.environmentId),onCheckedChange:t=>{let n=new Set(i);t?n.add(e.environmentId):n.delete(e.environmentId),a(n)}}),(0,$.jsx)(D,{className:`size-4 shrink-0 text-muted-foreground`}),(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,$.jsxs)(`span`,{className:`flex items-baseline justify-between gap-3`,children:[(0,$.jsx)(`span`,{className:`min-w-0 text-sm font-medium break-words`,children:e.label}),(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:!e.entry.enabled&&e.connection.phase!==`unsupported`?`Off`:Te(e.connection).buttonLabel})]}),e.displayUrl?(0,$.jsx)(`span`,{className:`mt-0.5 block text-xs break-all text-muted-foreground`,children:e.displayUrl}):null]})]},e.environmentId))]}):null,A;t[4]!==n||t[5]!==y||t[6]!==s||t[7]!==i?(A=p?(0,$.jsx)(_t,{autoSelectedComputers:n,disabled:y,selectedIds:i,onToggleEnvironment:s}):null,t[4]=n,t[5]=y,t[6]=s,t[7]=i,t[8]=A):A=t[8];let j,N,P;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(T,{variant:`ghost`,size:`sm-multiline`,className:`min-h-14 w-full justify-start`}),N=(0,$.jsx)(h,{className:`size-4 text-muted-foreground`}),P=(0,$.jsx)(`span`,{className:`flex-1 text-left`,children:`Add a computer`}),t[9]=j,t[10]=N,t[11]=P):(j=t[9],N=t[10],P=t[11]);let F=_&&`rotate-90`,I;t[12]===F?I=t[13]:(I=M(`size-4 text-muted-foreground`,F),t[12]=F,t[13]=I);let L;t[14]===I?L=t[15]:(L=(0,$.jsx)(o,{className:I}),t[14]=I,t[15]=L);let R;t[16]!==y||t[17]!==L?(R=(0,$.jsxs)(Pe,{disabled:y,render:j,children:[N,P,L]}),t[16]=y,t[17]=L,t[18]=R):R=t[18];let B;t[19]===u?B=t[20]:(B=e=>{v(!1),u(e),requestAnimationFrame(()=>w.current?.focus())},t[19]=u,t[20]=B);let V;t[21]!==y||t[22]!==B?(V=(0,$.jsx)(Me,{children:(0,$.jsx)(`div`,{className:`px-3 pb-3`,children:(0,$.jsx)(vt,{isPairing:y,setIsPairing:b,onPaired:B})})}),t[21]=y,t[22]=B,t[23]=V):V=t[23];let H;t[24]!==_||t[25]!==R||t[26]!==V?(H=(0,$.jsx)(`div`,{className:`rounded-lg border border-border bg-background`,children:(0,$.jsxs)(Re,{open:_,onOpenChange:v,children:[R,V]})}),t[24]=_,t[25]=R,t[26]=V,t[27]=H):H=t[27];let U;t[28]!==H||t[29]!==A?(U=(0,$.jsxs)(`div`,{className:`mt-4 space-y-2`,children:[A,H]}),t[28]=H,t[29]=A,t[30]=U):U=t[30];let W=C.length>0?(0,$.jsxs)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:[`Not connected, so setup skips `,C.join(`, `),`. You can set`,` `,C.length===1?`it`:`them`,` up later from Settings.`]}):null,G;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,$.jsxs)(`p`,{className:`min-w-0 text-xs leading-relaxed text-muted-foreground`,children:[`P4 Code collects anonymous usage data to help us improve it. To read more about how your data is used and how to opt out, see our`,` `,(0,$.jsx)(`a`,{className:`underline underline-offset-2 hover:text-foreground`,href:Be,target:`_blank`,rel:`noreferrer noopener`,children:`privacy policy`}),`.`]}),t[31]=G):G=t[31];let K=!r,q=!x||y,J;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,$.jsx)(l,{className:`size-3.5`}),t[32]=J):J=t[32];let ee;t[33]!==c||t[34]!==K||t[35]!==q?(ee=(0,$.jsxs)(`div`,{className:`mt-6 flex flex-col-reverse gap-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6`,children:[G,(0,$.jsxs)(T,{className:`shrink-0 self-end`,ref:w,autoFocus:K,disabled:q,onClick:c,children:[`Continue`,J]})]}),t[33]=c,t[34]=K,t[35]=q,t[36]=ee):ee=t[36];let Y;return t[37]!==U||t[38]!==W||t[39]!==ee||t[40]!==E||t[41]!==O||t[42]!==k?(Y=(0,$.jsxs)($.Fragment,{children:[E,O,k,U,W,ee]}),t[37]=U,t[38]=W,t[39]=ee,t[40]=E,t[41]=O,t[42]=k,t[43]=Y):Y=t[43],Y}function gt(e){return e.label}function _t(e){let t=(0,Q.c)(36),{autoSelectedComputers:n,disabled:r,selectedIds:i,onToggleEnvironment:a}=e,{environments:s}=te(),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={treatPendingAsSignedOut:!1},t[0]=c):c=t[0];let{isLoaded:l,isSignedIn:u}=fe(c),{openAuthPrompt:d}=me(),[f,p]=(0,Z.useState)(!0),[m,h]=(0,Z.useState)(!1),g;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>h(!0),t[1]=g):g=t[1];let _=g,v=f&&!!u&&m,y=r||!l,b;t[2]!==u||t[3]!==d?(b=e=>{u||(e.preventDefault(),p(!0),d())},t[2]=u,t[3]=d,t[4]=b):b=t[4];let x,S,C;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(T,{variant:`ghost`,size:`sm-multiline`,className:`min-h-14 w-full justify-start`}),S=(0,$.jsx)(N,{className:`size-4 text-muted-foreground`}),C=(0,$.jsx)(`span`,{className:`flex-1 text-left`,children:`P4 Connect`}),t[5]=x,t[6]=S,t[7]=C):(x=t[5],S=t[6],C=t[7]);let w=l?u?m?null:`Loading computers…`:`Sign in`:`Loading sign-in…`,E;t[8]===w?E=t[9]:(E=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:w}),t[8]=w,t[9]=E);let D=f&&u&&`rotate-90`,O;t[10]===D?O=t[11]:(O=M(`size-4 text-muted-foreground`,D),t[10]=D,t[11]=O);let k;t[12]===O?k=t[13]:(k=(0,$.jsx)(o,{className:O}),t[12]=O,t[13]=k);let A;t[14]!==E||t[15]!==k||t[16]!==y||t[17]!==b?(A=(0,$.jsxs)(Pe,{disabled:y,onClick:b,render:x,children:[S,C,E,k]}),t[14]=E,t[15]=k,t[16]=y,t[17]=b,t[18]=A):A=t[18];let j;t[19]!==n||t[20]!==s||t[21]!==u||t[22]!==a||t[23]!==i?(j=u?(0,$.jsx)(De,{primaryEnvironmentId:null,savedEnvironments:s,showSavedEnvironments:!0,onDiscoveryReady:_,selection:{selectedIds:i,onChange:a,autoSelectedComputers:n},refreshWhileEmpty:!0,empty:(0,$.jsx)(`p`,{className:`py-3 text-sm text-muted-foreground`,children:`No computers linked yet.`})}):null,t[19]=n,t[20]=s,t[21]=u,t[22]=a,t[23]=i,t[24]=j):j=t[24];let P;t[25]===j?P=t[26]:(P=(0,$.jsx)(`div`,{className:`mb-3 space-y-1.5`,children:j}),t[25]=j,t[26]=P);let F,I,L;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Run this on each computer you want to connect.`}),I=(0,$.jsx)(he,{command:`npx @p4code/cli connect`,className:`mt-3`}),L=(0,$.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:`Keep P4 Code running. Select the computers you want to set up above.`}),t[27]=F,t[28]=I,t[29]=L):(F=t[27],I=t[28],L=t[29]);let R;t[30]===P?R=t[31]:(R=(0,$.jsx)(Me,{keepMounted:!0,children:(0,$.jsxs)(`div`,{className:`px-3 pb-3`,children:[P,F,I,L]})}),t[30]=P,t[31]=R);let z;return t[32]!==A||t[33]!==R||t[34]!==v?(z=(0,$.jsx)(`div`,{className:`rounded-lg border border-border bg-background`,children:(0,$.jsxs)(Re,{open:v,onOpenChange:p,children:[A,R]})}),t[32]=A,t[33]=R,t[34]=v,t[35]=z):z=t[35],z}function vt(e){let t=(0,Q.c)(38),{isPairing:n,setIsPairing:r,onPaired:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1},t[0]=a):a=t[0];let s=ae(we,a),[c,l]=(0,Z.useState)(``),[u,d]=(0,Z.useState)(``),f=(0,Z.useRef)(!0),p,m;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>(f.current=!0,()=>{f.current=!1}),m=[],t[1]=p,t[2]=m):(p=t[1],m=t[2]),(0,Z.useEffect)(p,m);let h;t[3]!==s||t[4]!==n||t[5]!==i||t[6]!==c||t[7]!==r?(h=async()=>{if(n||c.trim().length===0)return;r(!0),d(``);let e=await s({pairingUrl:c.trim()});if(!f.current)return;if(r(!1),e._tag===`Success`){i(e.value);return}if(L(e))return;let t=R(e);d(t instanceof Error?t.message:`Pairing failed.`)},t[3]=s,t[4]=n,t[5]=i,t[6]=c,t[7]=r,t[8]=h):h=t[8];let g=h,_;t[9]===g?_=t[10]:(_=e=>{e.preventDefault(),g()},t[9]=g,t[10]=_);let v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(`label`,{className:`block text-sm text-muted-foreground`,htmlFor:`onboarding-pairing-url`,children:`Pairing link`}),t[11]=v):v=t[11];let y=u.length>0,b=u?`onboarding-pairing-error`:void 0,x;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>l(e.currentTarget.value),t[12]=x):x=t[12];let S;t[13]!==n||t[14]!==c||t[15]!==y||t[16]!==b?(S=(0,$.jsxs)(`div`,{children:[v,(0,$.jsx)(ue,{id:`onboarding-pairing-url`,autoFocus:!0,"aria-invalid":y,"aria-describedby":b,className:`mt-2`,size:`lg`,autoCapitalize:`none`,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,nativeInput:!0,readOnly:n,placeholder:`https://your-server:5230/pair#token=…`,value:c,onChange:x,onKeyDown:yt})]}),t[13]=n,t[14]=c,t[15]=y,t[16]=b,t[17]=S):S=t[17];let C;t[18]===u?C=t[19]:(C=u?(0,$.jsx)(xe,{id:`onboarding-pairing-error`,variant:`error`,children:(0,$.jsx)(be,{children:u})}):null,t[18]=u,t[19]=C);let w;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsxs)(Pe,{type:`button`,className:`group flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground`,children:[(0,$.jsx)(o,{className:`size-3.5 group-data-panel-open:rotate-90`}),`Need a pairing link?`]}),t[20]=w):w=t[20];let E;t[21]!==n||t[22]!==c?(E=n||c.trim().length===0,t[21]=n,t[22]=c,t[23]=E):E=t[23];let D=n?`Pairing...`:`Pair`,O;t[24]!==E||t[25]!==D?(O=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[w,(0,$.jsx)(T,{type:`submit`,disabled:E,children:D})]}),t[24]=E,t[25]=D,t[26]=O):O=t[26];let k,A;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsx)(`p`,{className:`pt-3 text-sm text-muted-foreground`,children:`Run this on the computer with your code.`}),A=(0,$.jsx)(he,{command:`npx @p4code/cli pair`,className:`mt-2`}),t[27]=k,t[28]=A):(k=t[27],A=t[28]);let j;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(`code`,{className:`font-mono`,children:`npx @p4code/cli serve`}),t[29]=j):j=t[29];let M;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsxs)(Me,{children:[k,A,(0,$.jsxs)(`p`,{className:`mt-2 text-xs leading-relaxed text-muted-foreground`,children:[`Start P4 Code first, or run `,j,`. Add `,(0,$.jsx)(`code`,{className:`font-mono`,children:`--tailscale`}),` to use your tailnet.`]})]}),t[30]=M):M=t[30];let N;t[31]===O?N=t[32]:(N=(0,$.jsxs)(Re,{children:[O,M]}),t[31]=O,t[32]=N);let P;return t[33]!==S||t[34]!==C||t[35]!==N||t[36]!==_?(P=(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`form`,{className:`space-y-3`,onSubmit:_,children:[S,C,N]})}),t[33]=S,t[34]=C,t[35]=N,t[36]=_,t[37]=P):P=t[37],P}function yt(e){e.key===`Enter`&&(e.nativeEvent.isComposing||e.keyCode===229)&&e.preventDefault()}var bt=[`codex`,`claudeAgent`];function xt(e){let t=(0,Q.c)(13),{environmentIds:n,onContinue:r}=e,{environments:i}=te(),a;if(t[0]!==n||t[1]!==i){let e;t[3]===i?e=t[4]:(e=e=>(0,$.jsx)(St,{environmentId:e,machineLabel:i.find(t=>t.environmentId===e)?.label??`Computer`},e),t[3]=i,t[4]=e),a=n.map(e),t[0]=n,t[1]=i,t[2]=a}else a=t[2];let o;t[5]===a?o=t[6]:(o=(0,$.jsx)(de,{scrollFade:!0,className:`mt-5 h-auto max-h-[min(32rem,55dvh)]`,children:(0,$.jsx)(`div`,{className:`space-y-5 pr-3`,children:a})}),t[5]=a,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(l,{className:`size-3.5`}),t[7]=s):s=t[7];let c;t[8]===r?c=t[9]:(c=(0,$.jsx)(`div`,{className:`mt-6 flex justify-end`,children:(0,$.jsxs)(T,{autoFocus:!0,onClick:r,children:[`Continue`,s]})}),t[8]=r,t[9]=c);let u;return t[10]!==o||t[11]!==c?(u=(0,$.jsxs)(Kt,{title:`Connect your agents`,description:`Choose an agent to start coding. You can add more later.`,children:[o,c]}),t[10]=o,t[11]=c,t[12]=u):u=t[12],u}function St(e){let t=(0,Q.c)(57),{environmentId:r,machineLabel:i}=e,a;t[0]===r?a=t[1]:(a=Y.providersValueAtom(r),t[0]=r,t[1]=a);let o=n(a),s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s={reportFailure:!1},t[2]=s):s=t[2];let c=ae(Y.refreshProviders,s),l;t[3]===r?l=t[4]:(l=Y.configValueAtom(r),t[3]=r,t[4]=l);let u=n(l),[d,f]=(0,Z.useState)(null),[p,m]=(0,Z.useState)(!1),[h,g]=(0,Z.useState)(null),_=ne(r,S),v,y;t[5]!==r||t[6]!==c?(v=()=>{c({environmentId:r,input:{}})},y=[r,c],t[5]=r,t[6]=c,t[7]=v,t[8]=y):(v=t[7],y=t[8]),(0,Z.useEffect)(v,y);let b;t[9]===o?b=t[10]:(b=Ue(o),t[9]=o,t[10]=b);let x=b,C,w,E,D;if(t[11]!==x||t[12]!==_||t[13]!==h||t[14]!==r||t[15]!==i||t[16]!==o||t[17]!==u||t[18]!==d?.driver){let e;t[23]!==x||t[24]!==o?(e=e=>{let t=e===`codex`?o?.filter(t=>t.driver===e):void 0;return t?.length?t.map(t=>({driver:e,provider:t,instanceId:t.instanceId})):[{driver:e,provider:x.get(e),instanceId:x.get(e)?.instanceId}]},t[23]=x,t[24]=o,t[25]=e):e=t[25];let n=bt.flatMap(e);if(h){let e;t[26]===h?e=t[27]:(e=e=>e.instanceId===h.instanceId,t[26]=h,t[27]=e);let r=n.findIndex(e),[i]=r>=0?n.splice(r,1):[];n.unshift(i??{driver:`codex`,provider:void 0,instanceId:h.instanceId})}t[28]===i?D=t[29]:(D=(0,$.jsx)(`h2`,{className:`mb-2 text-sm font-medium`,children:i}),t[28]=i,t[29]=D),t[30]===_?C=t[31]:(C=_?null:(0,$.jsx)(`p`,{className:`mb-2 text-sm text-muted-foreground`,children:`This connection cannot control terminals.`}),t[30]=_,t[31]=C),w=`space-y-1.5`;let a;t[32]!==_||t[33]!==h||t[34]!==r||t[35]!==u||t[36]!==d?.driver?(a=e=>{let{driver:t,provider:n,instanceId:i}=e;return t===`codex`&&u!==null?(0,$.jsx)(Tt,{environmentId:r,provider:n,serverConfig:u,createdAccount:i===h?.instanceId?h:null,onAutoStartConsumed:()=>g(wt),terminalOpen:d?.driver===t,onOpenTerminal:()=>{n!==void 0&&X(r,`terminal:operate`)&&f({environmentId:r,driver:t,providerInstanceId:n.instanceId,cwd:u.cwd,command:n.installed?He(n,u.settings,u.environment.platform.os):Ye(t,u.environment.platform.os),keybindings:u.keybindings})}},i??t):(0,$.jsx)(Et,{driver:t,provider:n,terminalOpen:d?.driver===t,terminalAvailable:u!==null&&_,onOpenTerminal:()=>{n!==void 0&&u!==null&&X(r,`terminal:operate`)&&f({environmentId:r,driver:t,providerInstanceId:n.instanceId,cwd:u.cwd,command:n.installed?He(n,u.settings,u.environment.platform.os):Ye(t,u.environment.platform.os),keybindings:u.keybindings})}},t)},t[32]=_,t[33]=h,t[34]=r,t[35]=u,t[36]=d?.driver,t[37]=a):a=t[37],E=n.map(a),t[11]=x,t[12]=_,t[13]=h,t[14]=r,t[15]=i,t[16]=o,t[17]=u,t[18]=d?.driver,t[19]=C,t[20]=w,t[21]=E,t[22]=D}else C=t[19],w=t[20],E=t[21],D=t[22];let O;t[38]!==w||t[39]!==E?(O=(0,$.jsx)(`div`,{className:w,children:E}),t[38]=w,t[39]=E,t[40]=O):O=t[40];let k;t[41]===o?k=t[42]:(k=o?.some(Ct)?(0,$.jsx)(`div`,{className:`mt-3`,children:(0,$.jsx)(T,{size:`xs`,variant:`ghost-muted`,onClick:()=>m(!0),children:`Connect another ChatGPT account`})}):null,t[41]=o,t[42]=k);let A;t[43]!==p||t[44]!==r?(A=p?(0,$.jsx)(Ke,{environmentId:r,onClose:()=>m(!1),onAccountCreated:(e,t)=>g({instanceId:e,displayName:t,autoStart:!0})}):null,t[43]=p,t[44]=r,t[45]=A):A=t[45];let j;t[46]!==r||t[47]!==c||t[48]!==d?(j=d===null?null:(0,$.jsx)(Dt,{session:d,onClose:()=>{f(null),c({environmentId:r,input:{}})}},`${d.environmentId}:${d.providerInstanceId}:${d.driver}`),t[46]=r,t[47]=c,t[48]=d,t[49]=j):j=t[49];let M;return t[50]!==C||t[51]!==O||t[52]!==k||t[53]!==A||t[54]!==j||t[55]!==D?(M=(0,$.jsxs)(`section`,{children:[D,C,O,k,A,j]}),t[50]=C,t[51]=O,t[52]=k,t[53]=A,t[54]=j,t[55]=D,t[56]=M):M=t[56],M}function Ct(e){return e.driver===`codex`&&Ge(e)===`ready`}function wt(e){return e?{...e,autoStart:!1}:null}function Tt(e){let t=(0,Q.c)(28),{createdAccount:n,onAutoStartConsumed:r,environmentId:i,provider:a,serverConfig:o,terminalOpen:s,onOpenTerminal:c}=e,l=ne(i,S),u=ae(Y.updateSettings,`Codex setup settings`),d;t[0]!==n?.instanceId||t[1]!==a?.instanceId?(d=n?.instanceId??a?.instanceId??w(j.make(`codex`)),t[0]=n?.instanceId,t[1]=a?.instanceId,t[2]=d):d=t[2];let f=d,p=o.settings,m;t[3]!==n||t[4]!==f||t[5]!==p.providerInstances?(m=p.providerInstances[f]??{driver:j.make(`codex`),config:n?{enabled:!0,setupMode:`managed`}:{}},t[3]=n,t[4]=f,t[5]=p.providerInstances,t[6]=m):m=t[6];let h=m,g;t[7]===h.config?g=t[8]:(g=Je(h.config),t[7]=h.config,t[8]=g);let _=g,v=_===`existing`&&h.config!==null&&typeof h.config==`object`&&`setupMode`in h.config&&h.config.setupMode===`existing`,y;t[9]!==i||t[10]!==h||t[11]!==f||t[12]!==p||t[13]!==u?(y=e=>{u({environmentId:i,input:{patch:Ve({settings:p,instanceId:f,instance:{...h,enabled:!0,config:{...h.config!==null&&typeof h.config==`object`?h.config:{},enabled:!0,setupMode:e}}})}})},t[9]=i,t[10]=h,t[11]=f,t[12]=p,t[13]=u,t[14]=y):y=t[14];let b=y,x;return t[15]!==l||t[16]!==b||t[17]!==n?.autoStart||t[18]!==n?.displayName||t[19]!==i||t[20]!==v||t[21]!==f||t[22]!==_||t[23]!==r||t[24]!==c||t[25]!==a||t[26]!==s?(x=v?(0,$.jsx)(Et,{driver:`codex`,provider:a,terminalOpen:s,terminalAvailable:l,onOpenTerminal:c}):(0,$.jsx)(We,{presentation:`onboarding`,autoStart:n?.autoStart===!0,displayName:n?.displayName,onAutoStartConsumed:r,environmentId:i,instanceId:f,provider:a,mode:_,enabled:a?.enabled??!0,onModeChange:b}),t[15]=l,t[16]=b,t[17]=n?.autoStart,t[18]=n?.displayName,t[19]=i,t[20]=v,t[21]=f,t[22]=_,t[23]=r,t[24]=c,t[25]=a,t[26]=s,t[27]=x):x=t[27],x}function Et(e){let t=(0,Q.c)(29),{driver:n,provider:r,terminalOpen:i,terminalAvailable:a,onOpenTerminal:o}=e,s;t[0]===n?s=t[1]:(s=Se.get(j.make(n)),t[0]=n,t[1]=s);let c=s,l=r?.displayName||(n===`claudeAgent`?`Claude Code`:c?.label??n),u;t[2]===r?u=t[3]:(u=qe(r),t[2]=r,t[3]=u);let d=u,p;t[4]===r?p=t[5]:(p=Ge(r),t[4]=r,t[5]=p);let m=p,h;t[6]===n?h=t[7]:(h=j.make(n),t[6]=n,t[7]=h);let g;t[8]!==l||t[9]!==h?(g=(0,$.jsx)(Ce,{driverKind:h,displayName:l,iconClassName:`size-5`}),t[8]=l,t[9]=h,t[10]=g):g=t[10];let _;t[11]===l?_=t[12]:(_=(0,$.jsx)(`span`,{className:`block text-sm font-medium text-foreground`,children:l}),t[11]=l,t[12]=_);let y=m===`ready`?`Ready to code.`:d.headline,b=m!==`ready`&&d.detail?` · ${d.detail}`:``,x;t[13]!==y||t[14]!==b?(x=(0,$.jsxs)(`p`,{className:`mt-0.5 text-xs leading-relaxed break-words whitespace-pre-wrap text-muted-foreground`,children:[y,b]}),t[13]=y,t[14]=b,t[15]=x):x=t[15];let S;t[16]!==_||t[17]!==x?(S=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[_,x]}),t[16]=_,t[17]=x,t[18]=S):S=t[18];let C;t[19]!==o||t[20]!==m||t[21]!==d||t[22]!==a||t[23]!==i?(C=(0,$.jsx)(`div`,{className:`shrink-0`,children:m===`ready`?(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-success-foreground`,children:[(0,$.jsx)(v,{className:`size-3.5`}),`Ready`]}):m===`checking`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Checking...`}):m===`disabled`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Disabled`}):m===`attention`?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:d.headline}):(0,$.jsxs)(T,{size:`xs`,variant:`ghost`,onClick:o,disabled:i||!a,children:[(0,$.jsx)(f,{className:`size-3.5`}),m===`signIn`?`Sign in`:`Install`]})}),t[19]=o,t[20]=m,t[21]=d,t[22]=a,t[23]=i,t[24]=C):C=t[24];let w;return t[25]!==S||t[26]!==C||t[27]!==g?(w=(0,$.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg border border-border bg-background px-4 py-4`,children:[g,S,C]}),t[25]=S,t[26]=C,t[27]=g,t[28]=w):w=t[28],w}function Dt(e){let t=(0,Q.c)(60),{session:n,onClose:i}=e,{command:a,cwd:o,driver:s,environmentId:l,keybindings:u,providerInstanceId:d}=n,f=ne(l,S),[p]=r(ke,!1,c),m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m={reportFailure:!1},t[0]=m):m=t[0];let h=ae(ve.open,m),_;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(_={reportFailure:!1},t[1]=_):_=t[1];let v=ae(ve.write,_),y;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(y={reportFailure:!1},t[2]=y):y=t[2];let b=ae(ve.close,y),x;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(x=Promise.resolve(),t[3]=x):x=t[3];let w=(0,Z.useRef)(x),E=(0,Z.useRef)(0),D=(0,Z.useRef)(null),O;t[4]===s?O=t[5]:(O=()=>`onboarding-${s}-${C()}`,t[4]=s,t[5]=O);let[k]=(0,Z.useState)(O),A;t[6]===l?A=t[7]:(A=g(l,dt),t[6]=l,t[7]=A);let j=A,[M,N]=(0,Z.useState)(0),[P,F]=(0,Z.useState)(`preparing`),I=P===`ready`||P===`writeFailed`,L;t[8]!==b||t[9]!==a||t[10]!==o||t[11]!==l||t[12]!==h||t[13]!==d||t[14]!==k||t[15]!==v?(L=()=>{let e=E.current+1;return E.current=e,D.current=e,F(`preparing`),w.current=w.current.then(async()=>{if(D.current!==e)return;if(!X(l,`terminal:operate`)){F(`openFailed`);return}if((await h({environmentId:l,input:{threadId:dt,terminalId:k,cwd:o,providerInstanceId:d}}))._tag!==`Success`){D.current===e&&F(`openFailed`);return}if(D.current!==e)return;if(!X(l,`terminal:operate`)){F(`writeFailed`);return}let t=await v({environmentId:l,input:{threadId:dt,terminalId:k,data:a}});D.current===e&&F(t._tag===`Success`?`ready`:`writeFailed`)}),()=>{D.current===e&&(D.current=null),w.current=w.current.then(async()=>{X(l,`terminal:operate`)&&await b({environmentId:l,input:{threadId:dt,terminalId:k,deleteHistory:!0}})})}},t[8]=b,t[9]=a,t[10]=o,t[11]=l,t[12]=h,t[13]=d,t[14]=k,t[15]=v,t[16]=L):L=t[16];let R;t[17]!==b||t[18]!==a||t[19]!==o||t[20]!==l||t[21]!==h||t[22]!==d||t[23]!==M||t[24]!==k||t[25]!==v?(R=[b,a,o,l,h,d,M,k,v],t[17]=b,t[18]=a,t[19]=o,t[20]=l,t[21]=h,t[22]=d,t[23]=M,t[24]=k,t[25]=v,t[26]=R):R=t[26],(0,Z.useEffect)(L,R);let z;t[27]!==f||t[28]!==a||t[29]!==P?(z=f?P===`writeFailed`?(0,$.jsxs)($.Fragment,{children:[`Run `,(0,$.jsx)(`code`,{className:`rounded bg-muted px-1 font-mono`,children:a}),` in this terminal.`]}):P===`ready`?`Review the command, then press Enter to run it.`:P===`openFailed`?`Could not open the setup terminal.`:`Preparing command...`:`This connection cannot control terminals.`,t[27]=f,t[28]=a,t[29]=P,t[30]=z):z=t[30];let B;t[31]===z?B=t[32]:(B=(0,$.jsx)(`span`,{className:`text-2xs font-medium text-muted-foreground`,children:z}),t[31]=z,t[32]=B);let V;t[33]!==f||t[34]!==l||t[35]!==P?(V=P===`openFailed`?(0,$.jsx)(T,{size:`xs`,variant:`ghost`,disabled:!f,onClick:()=>{X(l,`terminal:operate`)&&N(Ot)},children:`Retry`}):null,t[33]=f,t[34]=l,t[35]=P,t[36]=V):V=t[36];let H;t[37]===i?H=t[38]:(H=(0,$.jsx)(T,{size:`xs`,variant:`ghost-muted`,onClick:i,children:`Close`}),t[37]=i,t[38]=H);let U;t[39]!==V||t[40]!==H?(U=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[V,H]}),t[39]=V,t[40]=H,t[41]=U):U=t[41];let W;t[42]!==B||t[43]!==U?(W=(0,$.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border/60 bg-background/60 px-3 py-1.5`,children:[B,U]}),t[42]=B,t[43]=U,t[44]=W):W=t[44];let G;t[45]!==p||t[46]!==o||t[47]!==s||t[48]!==u||t[49]!==i||t[50]!==d||t[51]!==k||t[52]!==I||t[53]!==j?(G=I?(0,$.jsx)(_e,{threadRef:j,threadId:dt,terminalId:k,terminalLabel:`Install ${s}`,cwd:o,providerInstanceId:d,advancedTypography:p,onSessionExited:i,focusRequestId:1,autoFocus:!0,visible:!0,resizeEpoch:0,drawerHeight:256,keybindings:u}):null,t[45]=p,t[46]=o,t[47]=s,t[48]=u,t[49]=i,t[50]=d,t[51]=k,t[52]=I,t[53]=j,t[54]=G):G=t[54];let K;t[55]===G?K=t[56]:(K=(0,$.jsx)(`div`,{className:`h-64`,children:G}),t[55]=G,t[56]=K);let q;return t[57]!==W||t[58]!==K?(q=(0,$.jsxs)(`div`,{"data-thread-terminal-drawer":!0,className:`mt-4 overflow-hidden rounded-lg border border-border/70 bg-background text-foreground`,children:[W,K]}),t[57]=W,t[58]=K,t[59]=q):q=t[59],q}function Ot(e){return e+1}var kt=`This connection cannot import projects or thread history.`;function At(e){let t=(0,Q.c)(81),{scans:n,isImporting:r,setIsImporting:i,onDone:a}=e,{environments:o}=te(),s=re(n,d),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={reportFailure:!1},t[0]=c):c=t[0];let l=ae(V.create,c),u;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(u={reportFailure:!1},t[1]=u):u=t[1];let f=ae(ot,u),p=U(),[m,h]=(0,Z.useState)(null),g=(0,Z.useRef)(``),v=(0,Z.useRef)(0),[y,b]=(0,Z.useState)(null),x;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(x=new Map,t[2]=x):x=t[2];let S=(0,Z.useRef)(x),C;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(C=new Map,t[3]=C):C=t[3];let w=(0,Z.useRef)(C),E;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(E=[],t[4]=E):E=t[4];let D=(0,Z.useRef)(E),A;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(A=new Map,t[5]=A):A=t[5];let j=(0,Z.useRef)(A),M=(0,Z.useRef)(0),N,P;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(N=()=>(M.current+=1,()=>{M.current+=1}),P=[],t[6]=N,t[7]=P):(N=t[6],P=t[7]),(0,Z.useEffect)(N,P);let F,I;t[8]!==y||t[9]!==a||t[10]!==p||t[11]!==i?(I=()=>{y!==null&&p.some(e=>e.id===y.projectId&&e.environmentId===y.environmentId)&&(b(null),a(y,g.current,v.current).then(e=>{e||i(!1)}))},F=[y,a,p,i],t[8]=y,t[9]=a,t[10]=p,t[11]=i,t[12]=F,t[13]=I):(F=t[12],I=t[13]),(0,Z.useEffect)(I,F);let R;t[14]===n?R=t[15]:(R=Qe(n.flatMap(Lt)),t[14]=n,t[15]=R);let{available:z,recent:B}=R,W;t[16]!==B||t[17]!==m?(W=m??new Set(B.map(It)),t[16]=B,t[17]=m,t[18]=W):W=t[18];let K=W,q,J;if(t[19]!==z||t[20]!==K||t[21]!==s){let e;t[24]===K?e=t[25]:(e=e=>K.has(e.key),t[24]=K,t[25]=e),q=z.filter(e);let n;t[26]===s?n=t[27]:(n=e=>s.has(e.environmentId),t[26]=s,t[27]=n),J=q.every(n),t[19]=z,t[20]=K,t[21]=s,t[22]=q,t[23]=J}else q=t[22],J=t[23];let ee=J,[Y,ne]=(0,Z.useState)(``),X=ee?Y===kt?``:Y:kt,ie;t[28]!==a||t[29]!==i?(ie=()=>{let e=nt(D.current,w.current,S.current);if(e===void 0){a(void 0,g.current,v.current);return}i(!0),b(e)},t[28]=a,t[29]=i,t[30]=ie):ie=t[30];let oe=ie,se;t[31]!==l||t[32]!==oe||t[33]!==f||t[34]!==r||t[35]!==a||t[36]!==n||t[37]!==i?(se=async e=>{if(r)return;let t=()=>e.every(Ft),o=()=>{i(!1),ne(kt)};if(!t()){o();return}if(e.length===0){a();return}i(!0),g.current=``,v.current=0,D.current=e.map(Pt);let s=M.current,c=S.current,u=j.current,d=c.size>0?e.filter(e=>c.has(e.key)).length:0,p=0,m=0,h=new Set;for(let n of e){let{environmentId:e}=n;if(s!==M.current||c!==S.current)return;if(!t()){o();return}if(c.has(n.key))continue;let r=tt(H(),e,n);if(r===null){let t=u.get(n.key);if(t===void 0){let e=k();t={projectId:e,commandId:O.make(`onboarding:project:create:${e}`)},u.set(n.key,t)}r=t.projectId;let i=await l({environmentId:e,input:{projectId:r,commandId:t.commandId,title:n.title,workspaceRoot:n.path,createWorkspaceRootIfMissing:!1,defaultModelSelection:null}});if(s!==M.current||c!==S.current)return;if(i._tag!==`Success`){L(i)||(u.delete(n.key),h.add(e));continue}}if(!t()){o();return}let i=await f({environmentId:e,input:{projectId:r,expectedWorkspaceRoot:n.path}});if(s!==M.current||c!==S.current)return;i._tag===`Success`?(p+=i.value.importedCount,m+=i.value.skippedCount,i.value.importedCount>0&&w.current.set(n.key,_(e,r)),i.value.skippedCount===0&&(d+=1,c.set(n.key,_(e,r)))):L(i)||(u.delete(n.key),h.add(e))}for(let e of n)h.has(e.environmentId)&&e.refresh();i(!1),v.current=p,d<e.length&&(p>0&&m>0?g.current=`Imported ${p} ${p===1?`thread`:`threads`}. ${m} ${m===1?`thread`:`threads`} could not be imported.`:m>0?g.current=`${m} ${m===1?`thread could`:`threads could`} not be imported.`:p>0?g.current=`Imported ${p} ${p===1?`thread`:`threads`}. Some thread history could not be imported.`:g.current=`Could not import thread history.`),oe()},t[31]=l,t[32]=oe,t[33]=f,t[34]=r,t[35]=a,t[36]=n,t[37]=i,t[38]=se):se=t[38];let ce=se;if(n.every(Nt)&&n.some(Mt)){let e;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:`Your projects`}),t[39]=e):e=t[39];let n;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 py-6`,children:[(0,$.jsx)(G,{size:`lg`,tone:`muted`}),(0,$.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:`Looking for projects from Claude Code and Codex…`})]}),t[40]=n):n=t[40];let r;return t[41]===a?r=t[42]:(r=(0,$.jsxs)(`div`,{className:`flex h-full min-h-40 flex-col`,children:[e,n,(0,$.jsx)(`div`,{className:`flex justify-end`,children:(0,$.jsx)(T,{variant:`ghost-muted`,onClick:()=>void a(),children:`Do not import projects`})})]}),t[41]=a,t[42]=r),r}let le;t[43]!==z||t[44]!==r||t[45]!==q?(le=z.length>0?(0,$.jsxs)(`div`,{className:`mt-5 flex items-center justify-between gap-3 text-xs text-muted-foreground`,children:[(0,$.jsxs)(`span`,{role:`status`,children:[q.length,` of `,z.length,` selected`]}),(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,$.jsx)(T,{variant:`ghost`,size:`xs`,disabled:r||q.length===z.length,onClick:()=>h(new Set(z.map(jt))),children:`Select all`}),(0,$.jsx)(T,{variant:`ghost`,size:`xs`,disabled:r||q.length===0,onClick:()=>h(new Set),children:`Select none`})]})]}):null,t[43]=z,t[44]=r,t[45]=q,t[46]=le):le=t[46];let ue;if(t[47]!==z||t[48]!==o||t[49]!==r||t[50]!==n||t[51]!==K){let e;t[53]!==z||t[54]!==o||t[55]!==r||t[56]!==n.length||t[57]!==K?(e=e=>{let t=z.filter(t=>t.environmentId===e.environmentId),i=o.find(t=>t.environmentId===e.environmentId)?.label??`Computer`;return(0,$.jsxs)(`fieldset`,{className:`min-w-0 space-y-0.5`,disabled:r,children:[n.length>1?(0,$.jsx)(`legend`,{className:`mb-2 text-sm font-medium`,children:i}):null,e.isPending&&e.data===null?(0,$.jsxs)(`div`,{className:`flex items-center gap-2 py-3 text-sm text-muted-foreground`,children:[(0,$.jsx)(G,{size:`md`}),`Looking for projects…`]}):e.error===null?t.length===0?(0,$.jsx)(`p`,{className:`py-2 text-sm text-muted-foreground`,children:`No existing Claude Code or Codex projects found.`}):null:(0,$.jsxs)(`div`,{role:`alert`,className:`flex items-center justify-between gap-3 text-sm text-muted-foreground`,children:[(0,$.jsxs)(`span`,{children:[`Could not check projects. `,e.error]}),(0,$.jsx)(T,{variant:`ghost`,size:`sm`,onClick:e.refresh,children:`Retry`})]}),e.data?.truncated?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:pt}):null,(0,$.jsx)(Rt,{candidates:t,selectedKeys:K,onSelectionChange:h})]},e.environmentId)},t[53]=z,t[54]=o,t[55]=r,t[56]=n.length,t[57]=K,t[58]=e):e=t[58],ue=n.map(e),t[47]=z,t[48]=o,t[49]=r,t[50]=n,t[51]=K,t[52]=ue}else ue=t[52];let fe;t[59]===ue?fe=t[60]:(fe=(0,$.jsx)(de,{scrollFade:!0,className:`mt-2 h-auto max-h-80`,children:(0,$.jsx)(`div`,{className:`space-y-5 pr-3`,children:ue})}),t[59]=ue,t[60]=fe);let pe;t[61]===X?pe=t[62]:(pe=X?(0,$.jsx)(`p`,{className:`mt-3 text-sm text-destructive`,children:X}):null,t[61]=X,t[62]=pe);let me;t[63]!==oe||t[64]!==r?(me=(0,$.jsx)(T,{variant:`ghost-muted`,disabled:r,onClick:oe,children:`Do not import projects`}),t[63]=oe,t[64]=r,t[65]=me):me=t[65];let he=!ee||r||q.length===0,ge;t[66]!==ce||t[67]!==q?(ge=()=>void ce(q),t[66]=ce,t[67]=q,t[68]=ge):ge=t[68];let _e=r?`Importing…`:`Import ${q.length} ${q.length===1?`project`:`projects`}`,ve;t[69]!==he||t[70]!==ge||t[71]!==_e?(ve=(0,$.jsx)(T,{autoFocus:!0,disabled:he,onClick:ge,children:_e}),t[69]=he,t[70]=ge,t[71]=_e,t[72]=ve):ve=t[72];let ye;t[73]!==me||t[74]!==ve?(ye=(0,$.jsxs)(`div`,{className:`mt-6 flex flex-wrap items-center justify-end gap-3`,children:[me,ve]}),t[73]=me,t[74]=ve,t[75]=ye):ye=t[75];let be;return t[76]!==le||t[77]!==fe||t[78]!==pe||t[79]!==ye?(be=(0,$.jsxs)(Kt,{title:`Import your projects`,description:`Import projects and conversations from Claude Code and Codex on your selected computers.`,children:[le,fe,pe,ye]}),t[76]=le,t[77]=fe,t[78]=pe,t[79]=ye,t[80]=be):be=t[80],be}function jt(e){return e.key}function Mt(e){return e.isPending}function Nt(e){return e.data===null}function Pt(e){return e.key}function Ft(e){return X(e.environmentId,d)}function It(e){return e.key}function Lt(e){return(e.data?.candidates??[]).map(t=>({...t,environmentId:e.environmentId,key:it(e.environmentId,t.path)}))}function Rt(e){let t=(0,Q.c)(25),{candidates:n,selectedKeys:r,onSelectionChange:i}=e,a;t[0]===n?a=t[1]:(a=et(n),t[0]=n,t[1]=a);let{repositories:s,other:c}=a,l;t[2]!==i||t[3]!==r?(l=(e,t)=>{let n=new Set(r);for(let r of e)t?n.add(r):n.delete(r);i(n)},t[2]=i,t[3]=r,t[4]=l):l=t[4];let u=l,d;if(t[5]!==c||t[6]!==r){let e;t[8]===r?e=t[9]:(e=e=>r.has(e.key),t[8]=r,t[9]=e),d=c.filter(e),t[5]=c,t[6]=r,t[7]=d}else d=t[7];let f=d.length,p;if(t[10]!==s||t[11]!==r||t[12]!==u){let e;t[14]!==r||t[15]!==u?(e=e=>(0,$.jsx)(Bt,{group:e,selectedKeys:r,onToggle:u},e.key),t[14]=r,t[15]=u,t[16]=e):e=t[16],p=s.map(e),t[10]=s,t[11]=r,t[12]=u,t[13]=p}else p=t[13];let m;t[17]!==c||t[18]!==f||t[19]!==r||t[20]!==u?(m=c.length>0?(0,$.jsxs)(Re,{children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40`,children:[(0,$.jsx)(ge,{checked:f===c.length,indeterminate:f>0&&f<c.length,onCheckedChange:e=>u(c.map(zt),e===!0)}),(0,$.jsxs)(Pe,{className:`group flex min-w-0 flex-1 items-center gap-1.5 text-left`,children:[(0,$.jsx)(o,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-panel-open:rotate-90`}),(0,$.jsx)(`span`,{className:`truncate text-sm text-muted-foreground`,children:`Other folders`}),(0,$.jsxs)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground tabular-nums`,children:[c.length,` `,c.length===1?`folder`:`folders`]})]})]}),(0,$.jsx)(Me,{children:c.map(e=>(0,$.jsx)(Wt,{candidate:e,path:e.path,nested:!0,checked:r.has(e.key),onCheckedChange:t=>u([e.key],t)},e.key))})]}):null,t[17]=c,t[18]=f,t[19]=r,t[20]=u,t[21]=m):m=t[21];let h;return t[22]!==p||t[23]!==m?(h=(0,$.jsxs)($.Fragment,{children:[p,m]}),t[22]=p,t[23]=m,t[24]=h):h=t[24],h}function zt(e){return e.key}function Bt(e){let t=(0,Q.c)(53),{group:n,selectedKeys:r,onToggle:i}=e,a,s;if(t[0]!==n.candidates||t[1]!==r){a=n.candidates.map(Ht);let e;t[4]===r?e=t[5]:(e=e=>r.has(e),t[4]=r,t[5]=e),s=a.filter(e),t[0]=n.candidates,t[1]=r,t[2]=a,t[3]=s}else a=t[2],s=t[3];let c=s.length,l=n.candidates.length===1,u=n.candidates[0];if(l&&u!==void 0){let e=n.label,a=u.path,o;t[6]!==u.key||t[7]!==r?(o=r.has(u.key),t[6]=u.key,t[7]=r,t[8]=o):o=t[8];let s;t[9]!==i||t[10]!==u.key?(s=e=>i([u.key],e),t[9]=i,t[10]=u.key,t[11]=s):s=t[11];let c;return t[12]!==n.label||t[13]!==u||t[14]!==o||t[15]!==s?(c=(0,$.jsx)(Wt,{candidate:u,label:e,path:a,checked:o,onCheckedChange:s}),t[12]=n.label,t[13]=u,t[14]=o,t[15]=s,t[16]=c):c=t[16],c}let d=c===a.length,f=c>0&&c<a.length,p;t[17]!==a||t[18]!==i?(p=e=>i(a,e===!0),t[17]=a,t[18]=i,t[19]=p):p=t[19];let m;t[20]!==d||t[21]!==f||t[22]!==p?(m=(0,$.jsx)(ge,{checked:d,indeterminate:f,onCheckedChange:p}),t[20]=d,t[21]=f,t[22]=p,t[23]=m):m=t[23];let h;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(o,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-panel-open:rotate-90`}),t[24]=h):h=t[24];let g;t[25]===n.label?g=t[26]:(g=(0,$.jsx)(`span`,{className:`truncate text-sm font-medium`,children:n.label}),t[25]=n.label,t[26]=g);let _;t[27]===n.candidates?_=t[28]:(_=new Set(n.candidates.flatMap(Vt)),t[27]=n.candidates,t[28]=_);let v;t[29]===_?v=t[30]:(v=[..._],t[29]=_,t[30]=v);let y;t[31]!==n.lastActiveAt||t[32]!==n.threadCount||t[33]!==v?(y=(0,$.jsx)(Gt,{sources:v,threadCount:n.threadCount,lastActiveAt:n.lastActiveAt}),t[31]=n.lastActiveAt,t[32]=n.threadCount,t[33]=v,t[34]=y):y=t[34];let b;t[35]!==y||t[36]!==g?(b=(0,$.jsxs)(Pe,{className:`group flex min-w-0 flex-1 items-center gap-1.5 text-left`,children:[h,g,y]}),t[35]=y,t[36]=g,t[37]=b):b=t[37];let x;t[38]!==b||t[39]!==m?(x=(0,$.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40`,children:[m,b]}),t[38]=b,t[39]=m,t[40]=x):x=t[40];let S;if(t[41]!==n.candidates||t[42]!==i||t[43]!==r){let e;t[45]!==i||t[46]!==r?(e=e=>(0,$.jsx)(Wt,{candidate:e,path:e.path,nested:!0,checked:r.has(e.key),onCheckedChange:t=>i([e.key],t)},e.key),t[45]=i,t[46]=r,t[47]=e):e=t[47],S=n.candidates.map(e),t[41]=n.candidates,t[42]=i,t[43]=r,t[44]=S}else S=t[44];let C;t[48]===S?C=t[49]:(C=(0,$.jsx)(Me,{children:S}),t[48]=S,t[49]=C);let w;return t[50]!==x||t[51]!==C?(w=(0,$.jsxs)(Re,{defaultOpen:!0,children:[x,C]}),t[50]=x,t[51]=C,t[52]=w):w=t[52],w}function Vt(e){return e.sources}function Ht(e){return e.key}function Ut(e){let t=(0,Q.c)(12),{path:n,className:r}=e,i;t[0]===n?i=t[1]:(i=rt(n),t[0]=n,t[1]=i);let{name:a,parent:o}=i,s;t[2]===r?s=t[3]:(s=M(`flex min-w-0 items-baseline font-mono`,r),t[2]=r,t[3]=s);let c;t[4]===o?c=t[5]:(c=o.length>0?(0,$.jsx)(`span`,{className:`truncate`,children:o}):null,t[4]=o,t[5]=c);let l;t[6]===a?l=t[7]:(l=(0,$.jsx)(`span`,{className:`max-w-full shrink-0 truncate`,children:a}),t[6]=a,t[7]=l);let u;return t[8]!==s||t[9]!==c||t[10]!==l?(u=(0,$.jsxs)(`span`,{className:s,children:[c,l]}),t[8]=s,t[9]=c,t[10]=l,t[11]=u):u=t[11],u}function Wt(e){let t=(0,Q.c)(30),{candidate:n,label:r,path:i,nested:a,checked:o,onCheckedChange:s}=e,c=a!==void 0&&a,l=c&&`pl-8`,u;t[0]===l?u=t[1]:(u=M(`flex cursor-pointer items-center gap-2.5 rounded-md px-2 py-1.5 hover:bg-muted/40 has-disabled:cursor-default`,l),t[0]=l,t[1]=u);let d;t[2]===s?d=t[3]:(d=e=>s(e===!0),t[2]=s,t[3]=d);let f;t[4]!==o||t[5]!==d?(f=(0,$.jsx)(ge,{checked:o,onCheckedChange:d}),t[4]=o,t[5]=d,t[6]=f):f=t[6];let p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-2 truncate`}),t[7]=p):p=t[7];let m;t[8]===r?m=t[9]:(m=r===void 0?null:(0,$.jsx)(`span`,{className:`truncate text-sm font-medium`,children:r}),t[8]=r,t[9]=m);let h;t[10]!==r||t[11]!==i?(h=i===void 0?null:(0,$.jsx)(Ut,{path:i,className:r===void 0?`text-xs`:`text-2xs text-muted-foreground`}),t[10]=r,t[11]=i,t[12]=h):h=t[12];let g;t[13]!==m||t[14]!==h?(g=(0,$.jsxs)(se,{render:p,children:[m,h]}),t[13]=m,t[14]=h,t[15]=g):g=t[15];let _;t[16]===n.path?_=t[17]:(_=(0,$.jsx)(ce,{variant:`code`,children:n.path}),t[16]=n.path,t[17]=_);let v;t[18]!==_||t[19]!==g?(v=(0,$.jsxs)(le,{children:[g,_]}),t[18]=_,t[19]=g,t[20]=v):v=t[20];let y=c?null:n.sources,b;t[21]!==n.lastActiveAt||t[22]!==n.threadCount||t[23]!==y?(b=(0,$.jsx)(Gt,{sources:y,threadCount:n.threadCount,lastActiveAt:n.lastActiveAt}),t[21]=n.lastActiveAt,t[22]=n.threadCount,t[23]=y,t[24]=b):b=t[24];let x;return t[25]!==v||t[26]!==b||t[27]!==u||t[28]!==f?(x=(0,$.jsxs)(`label`,{className:u,children:[f,v,b]}),t[25]=v,t[26]=b,t[27]=u,t[28]=f,t[29]=x):x=t[29],x}function Gt(e){let t=(0,Q.c)(19),{sources:n,threadCount:r,lastActiveAt:i}=e,a;t[0]===i?a=t[1]:(a=i===null?null:oe(i),t[0]=i,t[1]=a);let o=a,s=o===null?``:o.suffix===null?`now`:o.value,c;t[2]===n?c=t[3]:(c=n?.includes(`claudeAgent`)?(0,$.jsx)(`span`,{role:`img`,"aria-label":`Claude Code`,children:(0,$.jsx)(Ce,{driverKind:j.make(`claudeAgent`),displayName:`Claude Code`,iconClassName:`size-3`})}):null,t[2]=n,t[3]=c);let l;t[4]===c?l=t[5]:(l=(0,$.jsx)(`span`,{className:`flex size-4 items-center justify-center`,children:c}),t[4]=c,t[5]=l);let u;t[6]===n?u=t[7]:(u=n?.includes(`codex`)?(0,$.jsx)(`span`,{role:`img`,"aria-label":`Codex`,children:(0,$.jsx)(Ce,{driverKind:j.make(`codex`),displayName:`Codex`,iconClassName:`size-3`})}):null,t[6]=n,t[7]=u);let d;t[8]===u?d=t[9]:(d=(0,$.jsx)(`span`,{className:`flex size-4 items-center justify-center`,children:u}),t[8]=u,t[9]=d);let f;t[10]===r?f=t[11]:(f=(0,$.jsx)(`span`,{className:`text-right`,children:r}),t[10]=r,t[11]=f);let p;t[12]===s?p=t[13]:(p=(0,$.jsx)(`span`,{className:`text-right whitespace-nowrap`,children:s}),t[12]=s,t[13]=p);let m;return t[14]!==l||t[15]!==d||t[16]!==f||t[17]!==p?(m=(0,$.jsxs)(`span`,{className:`ml-auto grid shrink-0 grid-cols-[1rem_1rem_2.5rem_2.25rem] items-center gap-x-1 text-xs text-muted-foreground tabular-nums`,children:[l,d,f,p]}),t[14]=l,t[15]=d,t[16]=f,t[17]=p,t[18]=m):m=t[18],m}function Kt(e){let t=(0,Q.c)(8),{title:n,description:r,children:i}=e,a;t[0]===n?a=t[1]:(a=(0,$.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground`,children:n}),t[0]=n,t[1]=a);let o;t[2]===r?o=t[3]:(o=r?(0,$.jsx)(`p`,{className:`mt-2.5 text-sm leading-relaxed text-muted-foreground`,children:r}):null,t[2]=r,t[3]=o);let s;return t[4]!==i||t[5]!==a||t[6]!==o?(s=(0,$.jsxs)($.Fragment,{children:[a,o,i]}),t[4]=i,t[5]=a,t[6]=o,t[7]=s):s=t[7],s}var qt=y(x);function Jt(){let e=(0,Q.c)(14),{authGateState:t}=Ne.useRouteContext(),n=K(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={select:Xt},e[0]=r):r=e[0];let i=q(r),o;e[1]===i?o=e[2]:(o=i.startsWith(`agents:`)?a(qt(i.slice(7))):void 0,e[1]=i,e[2]=o);let s=o,c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c={select:Yt},e[3]=c):c=e[3];let l=q(c),[u,d]=(0,Z.useState)(!1),f=ye(),p=t.status===`authenticated`,m;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(ze,{}),e[4]=m):m=e[4];let h;e[5]!==u||e[6]!==l||e[7]!==p||e[8]!==n||e[9]!==f||e[10]!==s?(h=l&&!u?(0,$.jsx)(mt,{localAvailable:p,resumeEnvironmentId:s,onDone:async e=>{if(d(!0),e!==void 0){await f(e,{replace:!0}).catch(()=>n({to:`/`,replace:!0}));return}await n({to:`/`,replace:!0})}}):null,e[5]=u,e[6]=l,e[7]=p,e[8]=n,e[9]=f,e[10]=s,e[11]=h):h=e[11];let g;return e[12]===h?g=e[13]:(g=(0,$.jsxs)($.Fragment,{children:[m,h]}),e[12]=h,e[13]=g),g}function Yt(e){return e.pathname===`/welcome`}function Xt(e){return e.hash}export{Jt as component};
|
|
2
|
+
//# sourceMappingURL=welcome-COe2CLyM.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-oBChb5qS.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f,z as p}from"./chunk-DU6HZSFF-
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-oBChb5qS.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f,z as p}from"./chunk-DU6HZSFF-DQeySev0.js";import{t as m}from"./linear-BUnzfXgk.js";import{t as h}from"./ordinal-BDEzSJ7C.js";import{t as g}from"./init-C-OQMol4.js";import{i as _}from"./chunk-75Z2AOVW-jKPMvGhC.js";import{t as v}from"./line-BT7eNXjs.js";import"./chunk-PWAF6VOD-C1f1DGpf.js";import{t as y}from"./chunk-GMAD6QVW-DpPhOysA.js";import{f as b}from"./mermaid.core-Bx8b2pKm.js";function x(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function S(){var e=h().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=x(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return S(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},g.apply(d(),arguments)}var C=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,10,12,14,16,18,19,21,23],r=[2,6],i=[1,3],a=[1,5],o=[1,6],s=[1,7],c=[1,5,10,12,14,16,18,19,21,23,36,37,38],l=[1,25],u=[1,26],d=[1,28],f=[1,29],p=[1,30],m=[1,31],h=[1,32],g=[1,33],_=[1,34],v=[1,35],y=[1,36],b=[1,37],x=[1,43],S=[1,42],C=[1,47],w=[1,50],T=[1,10,12,14,16,18,19,21,23,36,37,38],E=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],D=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],O=[1,65],k=[26,28],A={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:`error`,5:`XYCHART`,8:`CHART_ORIENTATION`,10:`title`,12:`X_AXIS`,14:`Y_AXIS`,16:`LINE`,18:`BAR`,19:`acc_title`,20:`acc_title_value`,21:`acc_descr`,22:`acc_descr_value`,23:`acc_descr_multiline_value`,24:`SQUARE_BRACES_START`,26:`SQUARE_BRACES_END`,28:`COMMA`,29:`NUMBER_WITH_DECIMAL`,30:`STR`,33:`ARROW_DELIMITER`,36:`NEWLINE`,37:`SEMI`,38:`EOF`,40:`MD_STR`,42:`AMP`,43:`NUM`,44:`ALPHA`,45:`PLUS`,46:`EQUALS`,47:`MULT`,48:`DOT`,49:`BRKT`,50:`MINUS`,51:`UNDERSCORE`},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.setOrientation(a[s]);break;case 9:r.setDiagramTitle(a[s].text.trim());break;case 12:r.setLineData({text:``,type:`text`},a[s]);break;case 13:r.setLineData(a[s-1],a[s]);break;case 14:r.setBarData({text:``,type:`text`},a[s]);break;case 15:r.setBarData(a[s-1],a[s]);break;case 16:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 19:this.$=a[s-1];break;case 20:case 30:this.$=[a[s-2],...a[s]];break;case 21:case 31:this.$=[a[s]];break;case 22:this.$={value:Number(a[s-1]),label:a[s]};break;case 23:this.$={value:Number(a[s]),label:``};break;case 24:r.setXAxisTitle(a[s]);break;case 25:r.setXAxisTitle(a[s-1]);break;case 26:r.setXAxisTitle({type:`text`,text:``});break;case 27:r.setXAxisBand(a[s]);break;case 28:r.setXAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 29:this.$=a[s-1];break;case 32:r.setYAxisTitle(a[s]);break;case 33:r.setYAxisTitle(a[s-1]);break;case 34:r.setYAxisTitle({type:`text`,text:``});break;case 35:r.setYAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 39:this.$={text:a[s],type:`text`};break;case 40:this.$={text:a[s],type:`text`};break;case 41:this.$={text:a[s],type:`markdown`};break;case 42:this.$=a[s];break;case 43:this.$=a[s-1]+``+a[s]}},`anonymous`),table:[t(n,r,{3:1,4:2,7:4,5:i,36:a,37:o,38:s}),{1:[3]},t(n,r,{4:2,7:4,3:8,5:i,36:a,37:o,38:s}),t(n,r,{4:2,7:4,6:9,3:10,5:i,8:[1,11],36:a,37:o,38:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(c,[2,36]),t(c,[2,37]),t(c,[2,38]),{1:[2,1]},t(n,r,{4:2,7:4,3:21,5:i,36:a,37:o,38:s}),{1:[2,3]},t(c,[2,5]),t(n,[2,7],{4:22,36:a,37:o,38:s}),{11:23,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:39,13:38,24:x,29:S,30:l,31:40,32:41,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:45,15:44,29:C,30:l,35:46,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:49,17:48,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:52,17:51,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{20:[1,53]},{22:[1,54]},t(T,[2,18]),{1:[2,2]},t(T,[2,8]),t(T,[2,9]),t(E,[2,39],{41:55,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b}),t(E,[2,40]),t(E,[2,41]),t(D,[2,42]),t(D,[2,44]),t(D,[2,45]),t(D,[2,46]),t(D,[2,47]),t(D,[2,48]),t(D,[2,49]),t(D,[2,50]),t(D,[2,51]),t(D,[2,52]),t(D,[2,53]),t(T,[2,10]),t(T,[2,24],{32:41,31:56,24:x,29:S}),t(T,[2,26]),t(T,[2,27]),{33:[1,57]},{11:59,30:l,34:58,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},t(T,[2,11]),t(T,[2,32],{35:60,29:C}),t(T,[2,34]),{33:[1,61]},t(T,[2,12]),{17:62,24:w},{25:63,27:64,29:O},t(T,[2,14]),{17:66,24:w},t(T,[2,16]),t(T,[2,17]),t(D,[2,43]),t(T,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(T,[2,33]),{29:[1,70]},t(T,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(k,[2,23],{30:[1,73]}),t(T,[2,15]),t(T,[2,28]),t(T,[2,29]),{11:59,30:l,34:74,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},t(T,[2,35]),t(T,[2,19]),{25:75,27:64,29:O},t(k,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
3
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};A.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
5
|
`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
6
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return this.popState(),36;case 3:return this.popState(),36;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState(`acc_title`),19;case 8:return this.popState(),`acc_title_value`;case 9:return this.pushState(`acc_descr`),21;case 10:return this.popState(),`acc_descr_value`;case 11:this.pushState(`acc_descr_multiline`);break;case 12:this.popState();break;case 13:return`acc_descr_multiline_value`;case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState(`axis_data`),`X_AXIS`;case 18:return this.pushState(`axis_data`),`Y_AXIS`;case 19:return this.pushState(`axis_band_data`),24;case 20:return 33;case 21:return this.pushState(`data`),16;case 22:return this.pushState(`data`),18;case 23:return this.pushState(`data_inner`),24;case 24:return 29;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState(`string`);break;case 28:this.popState();break;case 29:return`STR`;case 30:return 24;case 31:return 26;case 32:return 44;case 33:return`COLON`;case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}})();function j(){this.yy={}}return e(j,`Parser`),j.prototype=A,A.Parser=j,new j})();C.parser=C;var w=C;function T(e){return e.type===`bar`}e(T,`isBarPlot`);function E(e){return e.type===`band`}e(E,`isBandAxisData`);function D(e){return e.type===`linear`}e(D,`isLinearAxisData`);var O=class{constructor(e){this.parentGroup=e}static{e(this,`TextDimensionCalculatorWithFont`)}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((e,t)=>Math.max(t.length,e),0)*t,height:t};let n={width:0,height:0},r=this.parentGroup.append(`g`).attr(`visibility`,`hidden`).attr(`font-size`,t);for(let i of e){let e=y(r,1,i),a=e?e.width:i.length*t,o=e?e.height:t;n.width=Math.max(n.width,a),n.height=Math.max(n.height,o)}return r.remove(),n}},k=.7,A=.2,j=class{constructor(e,t,n,r){this.axisConfig=e,this.title=t,this.textDimensionCalculator=n,this.axisThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{e(this,`BaseAxis`)}setRange(e){this.range=e,this.axisPosition===`left`||this.axisPosition===`right`?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){k*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(k*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=A*e.width;this.outerPadding=Math.min(n.width/2,r);let i=n.height;this.axisPosition===`bottom`&&this.normalizedLabelRotationInRad!==0&&(i=Math.max(i,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*n.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*n.height))),i+=this.axisConfig.labelPadding*2,this.labelTextHeight=n.height,i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=A*e.height;this.outerPadding=Math.min(n.height/2,r);let i=n.width+this.axisConfig.labelPadding*2;i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width-t,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition===`left`||this.axisPosition===`right`?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let t=this.normalizedLabelRotationInRad;return t===0?0:Math.sin(t)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`left-axis`,`axisl-line`],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`left-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`middle`,horizontalPos:`right`}))}),this.showTick){let t=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`left-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${t},${this.getScaleValue(e)} L ${t-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`left-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`bottom-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`bottom-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e)+this.calculateOffsetByRotation(`height`),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation(`width`)),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`bottom-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},${t+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`bottom-axis`,`title`],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`top-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`top-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y;e.push({type:`path`,groupTexts:[`top-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`top-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElements(){if(this.axisPosition===`left`)return this.getDrawableElementsForLeftAxis();if(this.axisPosition===`right`)throw Error(`Drawing of right axis is not implemented`);return this.axisPosition===`bottom`?this.getDrawableElementsForBottomAxis():this.axisPosition===`top`?this.getDrawableElementsForTopAxis():[]}},M=class extends j{static{e(this,`BandAxis`)}constructor(e,t,n,r,i){super(e,r,i,t),this.categories=n,this.scale=S().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=S().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),t.trace(`BandAxis axis final categories, range: `,this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},ee=class extends j{static{e(this,`LinearAxis`)}constructor(e,t,n,r,i){super(e,r,i,t),this.domain=n,this.scale=m().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition===`left`&&e.reverse(),this.scale=m().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function N(e,t,n,r){let i=new O(r);return E(e)?new M(t,n,e.categories,e.title,i):new ee(t,n,[e.min,e.max],e.title,i)}e(N,`getAxis`);var te=class{constructor(e,t,n,r){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=n,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{e(this,`ChartTitle`)}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(t.width,e.width),r=t.height+2*this.chartConfig.titlePadding;return t.width<=n&&t.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:[`chart-title`],type:`text`,data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:`middle`,horizontalPos:`center`,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}};function P(e,t,n,r){return new te(new O(r),e,t,n)}e(P,`getChartTitleComponent`);var ne=.75,re=.5,ie=.35;function F(e){return{fontSize:e,markerSize:e*ne,markerSpacing:e*ie,itemSpacing:e*re}}e(F,`getLegendLayout`);var ae=class{constructor(e,t,n,r){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=n,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{e(this,`ChartLegend`)}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter(e=>e.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:t,markerSize:n,markerSpacing:r,itemSpacing:i}=F(this.chartConfig.legendFontSize),a=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map(e=>e.title),t),o=this.chartConfig.legendPadding*2+n+r+a.width,s=this.chartConfig.legendPadding*2+this.visiblePlots.length*t+(this.visiblePlots.length-1)*i;return o<=e.width&&s<=e.height?(this.boundingRect.width=o,this.boundingRect.height=s):(this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:e,markerSize:t,markerSpacing:n,itemSpacing:r}=F(this.chartConfig.legendFontSize),i=e+r,a=this.boundingRect.x+this.chartConfig.legendPadding,o=this.boundingRect.y+this.chartConfig.legendPadding,s=[],c=[];for(let[e,n]of this.visiblePlots.entries())if(T(n))s.push({x:a,y:o+e*i,width:t,height:t,fill:n.fill,strokeFill:n.fill,strokeWidth:0});else{let r=o+e*i+t/2;c.push({path:`M ${a},${r} L ${a+t},${r}`,strokeFill:n.strokeFill,strokeWidth:n.strokeWidth})}return[{groupTexts:[`legend`,`markers`],type:`rect`,data:s},{groupTexts:[`legend`,`markers`],type:`path`,data:c},{groupTexts:[`legend`,`label`],type:`text`,data:this.visiblePlots.map((r,s)=>({text:r.title,x:a+t+n,y:o+s*i+t/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:`middle`,horizontalPos:`left`}))}]}};function I(e,t,n,r){return new ae(new O(r),e,t,n)}e(I,`getChartLegendComponent`);var oe=class{constructor(e,t,n,r,i){this.plotData=e,this.xAxis=t,this.yAxis=n,this.orientation=r,this.plotIndex=i}static{e(this,`LinePlot`)}getDrawableElement(){let e=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t;if(t=this.orientation===`horizontal`?v().y(e=>e[0]).x(e=>e[1])(e):v().x(e=>e[0]).y(e=>e[1])(e),!t)return[];let n=[{groupTexts:[`plot`,`line-plot-${this.plotIndex}`],type:`path`,data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let t=[];for(let[n,[r,i]]of e.entries()){let e=this.plotData.pointLabels[n];e&&(this.orientation===`horizontal`?t.push({x:i+10,y:r,text:e,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`left`,fontSize:12,rotation:0}):t.push({x:r,y:i-10,text:e,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`center`,fontSize:12,rotation:0}))}t.length>0&&n.push({groupTexts:[`plot`,`line-plot-${this.plotIndex}`,`labels`],type:`text`,data:t})}return n}},se=class{constructor(e,t,n,r,i,a){this.barData=e,this.boundingRect=t,this.xAxis=n,this.yAxis=r,this.orientation=i,this.plotIndex=a}static{e(this,`BarPlot`)}getDrawableElement(){let e=this.barData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*.95,n=t/2;return this.orientation===`horizontal`?[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:this.boundingRect.x,y:e[0]-n,height:t,width:e[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:e[0]-n,y:e[1],width:t,height:this.boundingRect.y+this.boundingRect.height-e[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},ce=class{constructor(e,t,n){this.chartConfig=e,this.chartData=t,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}static{e(this,`BasePlot`)}setAxes(e,t){this.xAxis=e,this.yAxis=t}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error(`Axes must be passed to render Plots`);let e=[];for(let[t,n]of this.chartData.plots.entries())switch(n.type){case`line`:{let r=new oe(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break;case`bar`:{let r=new se(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}}return e}};function le(e,t,n){return new ce(e,t,n)}e(le,`getPlotComponent`);var ue=class{constructor(e,t,n,r){this.chartConfig=e,this.chartData=t,this.componentStore={title:P(e,t,n,r),plot:le(e,t,n),legend:I(e,t,n,r),xAxis:N(t.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},r),yAxis:N(t.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},r)}}static{e(this,`Orchestrator`)}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i={width:0,height:0},a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:a,height:o});e-=s.width,t-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),r=s.height,t-=s.height,this.componentStore.xAxis.setAxisPosition(`bottom`),s=this.componentStore.xAxis.calculateSpace({width:e,height:t}),t-=s.height,this.componentStore.yAxis.setAxisPosition(`left`),s=this.componentStore.yAxis.calculateSpace({width:e,height:t}),n=s.width,e-=s.width,i=this.componentStore.legend.calculateSpace({width:e,height:o}),e-=i.width,e>0&&(a+=e,e=0),t>0&&(o+=t,t=0),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:n,y:r}),this.componentStore.legend.setBoundingBoxXY({x:n+a,y:r+Math.max((o-i.height)/2,0)}),this.componentStore.xAxis.setRange([n,n+a]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:r+o}),this.componentStore.yAxis.setRange([r,r+o]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:r}),this.chartData.plots.some(e=>T(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=0,a={width:0,height:0},o=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),c=this.componentStore.plot.calculateSpace({width:o,height:s});e-=c.width,t-=c.height,c=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),n=c.height,t-=c.height,this.componentStore.xAxis.setAxisPosition(`left`),c=this.componentStore.xAxis.calculateSpace({width:e,height:t}),e-=c.width,r=c.width,this.componentStore.yAxis.setAxisPosition(`top`),c=this.componentStore.yAxis.calculateSpace({width:e,height:t}),t-=c.height,i=n+c.height,a=this.componentStore.legend.calculateSpace({width:e,height:s}),e-=a.width,e>0&&(o+=e,e=0),t>0&&(s+=t,t=0),this.componentStore.plot.calculateSpace({width:o,height:s}),this.componentStore.plot.setBoundingBoxXY({x:r,y:i}),this.componentStore.legend.setBoundingBoxXY({x:r+o,y:i+Math.max((s-a.height)/2,0)}),this.componentStore.yAxis.setRange([r,r+o]),this.componentStore.yAxis.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([i,i+s]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(e=>T(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation===`horizontal`?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}},de=class{static{e(this,`XYChartBuilder`)}static build(e,t,n,r){return new ue(e,t,n,r).getDrawableElement()}},L=0,R,z=K(),B=G(),V=q(),H=B.plotColorPalette.split(`,`).map(e=>e.trim()),U=!1,W=!1;function G(){let e=n(),t=s();return _(e.xyChart,t.themeVariables.xyChart)}e(G,`getChartDefaultThemeConfig`);function K(){let e=s();return _(l.xyChart,e.xyChart)}e(K,`getChartDefaultConfig`);function q(){return{yAxis:{type:`linear`,title:``,min:1/0,max:-1/0},xAxis:{type:`band`,title:``,categories:[]},title:``,plots:[]}}e(q,`getChartDefaultData`);function J(e){let t=s();return p(e.trim(),t)}e(J,`textSanitizer`);function Y(e){R=e}e(Y,`setTmpSVGG`);function fe(e){e===`horizontal`?z.chartOrientation=`horizontal`:z.chartOrientation=`vertical`}e(fe,`setOrientation`);function pe(e){V.xAxis.title=J(e.text)}e(pe,`setXAxisTitle`);function X(e,t){V.xAxis={type:`linear`,title:V.xAxis.title,min:e,max:t},U=!0}e(X,`setXAxisRangeData`);function me(e){V.xAxis={type:`band`,title:V.xAxis.title,categories:e.map(e=>J(e.text))},U=!0}e(me,`setXAxisBand`);function he(e){V.yAxis.title=J(e.text)}e(he,`setYAxisTitle`);function Z(e,t){V.yAxis={type:`linear`,title:V.yAxis.title,min:e,max:t},W=!0}e(Z,`setYAxisRangeData`);function ge(e){let t=Math.min(...e),n=Math.max(...e),r=D(V.yAxis)?V.yAxis.min:1/0,i=D(V.yAxis)?V.yAxis.max:-1/0;V.yAxis={type:`linear`,title:V.yAxis.title,min:Math.min(r,t),max:Math.max(i,n)}}e(ge,`setYAxisRangeFromPlotData`);function Q(e){let t=[];if(e.length===0)return t;if(!U){let t=D(V.xAxis)?V.xAxis.min:1/0,n=D(V.xAxis)?V.xAxis.max:-1/0;X(Math.min(t,1),Math.max(n,e.length))}if(E(V.xAxis)&&e.length>V.xAxis.categories.length&&(e=e.slice(0,V.xAxis.categories.length)),W||ge(e),E(V.xAxis)&&(t=V.xAxis.categories.map((t,n)=>[t,e[n]])),D(V.xAxis)){let n=V.xAxis.min,r=V.xAxis.max;if(e.length===1)t=[[`${n}`,e[0]]];else{let i=(r-n)/(e.length-1);t=e.map((e,t)=>[`${n+t*i}`,e])}}return t}e(Q,`transformDataWithoutCategory`);function $(e){return H[e===0?0:e%H.length]}e($,`getPlotColorFromPalette`);function _e(e,t){let n=t.map(e=>e.value),r=t.map(e=>e.label?J(e.label):``),i=Q(n),a=r.some(e=>e!==``);V.plots.push({type:`line`,title:J(e.text),strokeFill:$(L),strokeWidth:2,data:i,...a?{pointLabels:r}:{}}),L++}e(_e,`setLineData`);function ve(e,t){let n=Q(t.map(e=>e.value));V.plots.push({type:`bar`,title:J(e.text),fill:$(L),data:n}),L++}e(ve,`setBarData`);function ye(){if(V.plots.length===0)throw Error(`No Plot to render, please provide a plot with some data`);return V.title=d(),de.build(z,V,B,R)}e(ye,`getDrawableElem`);function be(){return B}e(be,`getChartThemeConfig`);function xe(){return z}e(xe,`getChartConfig`);function Se(){return V}e(Se,`getXYChartData`);var Ce={parser:w,db:{getDrawableElem:ye,clear:e(function(){o(),L=0,z=K(),V=q(),B=G(),H=B.plotColorPalette.split(`,`).map(e=>e.trim()),U=!1,W=!1},`clear`),setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:d,getAccDescription:u,setAccDescription:r,setOrientation:fe,setXAxisTitle:pe,setXAxisRangeData:X,setXAxisBand:me,setYAxisTitle:he,setYAxisRangeData:Z,setLineData:_e,setBarData:ve,setTmpSVGG:Y,getChartThemeConfig:be,getChartConfig:xe,getXYChartData:Se},renderer:{draw:e((n,r,i,a)=>{let o=a.db,s=o.getChartThemeConfig(),l=o.getChartConfig(),u=o.getXYChartData().plots[0].data.map(e=>e[1]);function d(e){return e===`top`?`text-before-edge`:`middle`}e(d,`getDominantBaseLine`);function f(e){return e===`left`?`start`:e===`right`?`end`:`middle`}e(f,`getTextAnchor`);function p(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}e(p,`getTextTransformation`),t.debug(`Rendering xychart chart
|
|
7
7
|
`+n);let m=b(r),h=m.append(`g`).attr(`class`,`main`),g=h.append(`rect`).attr(`width`,l.width).attr(`height`,l.height).attr(`class`,`background`);c(m,l.height,l.width,!0),m.attr(`viewBox`,`0 0 ${l.width} ${l.height}`),g.attr(`fill`,s.backgroundColor),o.setTmpSVGG(m.append(`g`).attr(`class`,`mermaid-tmp-group`));let _=o.getDrawableElem(),v={};function y(e){let t=h,n=``;for(let[r]of e.entries()){let i=h;r>0&&v[n]&&(i=v[n]),n+=e[r],t=v[n],t||=v[n]=i.append(`g`).attr(`class`,e[r])}return t}e(y,`getGroup`);for(let t of _){if(t.data.length===0)continue;let n=y(t.groupTexts);switch(t.type){case`rect`:if(n.selectAll(`rect`).data(t.data).enter().append(`rect`).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>e.width).attr(`height`,e=>e.height).attr(`fill`,e=>e.fill).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth),l.showDataLabel){let r=l.showDataLabelOutsideBar;if(l.chartOrientation===`horizontal`){let i=function(e,t){let{data:n,label:r}=e;return t*r.length*a<=n.width-o};e(i,`fitsHorizontally`);let a=.7,o=10,c=t.data.map((e,t)=>({data:e,label:u[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),l=c.map(e=>{let{data:t}=e,n=t.height*.7;for(;!i(e,n)&&n>0;)--n;return n}),d=Math.floor(Math.min(...l)),f=e(e=>r?e.data.x+e.data.width+10:e.data.x+e.data.width-10,`determineLabelXPosition`);n.selectAll(`text`).data(c).enter().append(`text`).attr(`x`,f).attr(`y`,e=>e.data.y+e.data.height/2).attr(`text-anchor`,r?`start`:`end`).attr(`dominant-baseline`,`middle`).attr(`fill`,s.dataLabelColor).attr(`font-size`,`${d}px`).text(e=>e.label)}else{let i=function(e,t,n){let{data:r,label:i}=e,a=t*i.length*.7,o=r.x+r.width/2,s=o-a/2,c=o+a/2,l=s>=r.x&&c<=r.x+r.width,u=r.y+n+t<=r.y+r.height;return l&&u};e(i,`fitsInBar`);let a=t.data.map((e,t)=>({data:e,label:u[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),o=a.map(e=>{let{data:t,label:n}=e,r=t.width/(n.length*.7);for(;!i(e,r,10)&&r>0;)--r;return r}),c=Math.floor(Math.min(...o)),l=e(e=>r?e.data.y-10:e.data.y+10,`determineLabelYPosition`);n.selectAll(`text`).data(a).enter().append(`text`).attr(`x`,e=>e.data.x+e.data.width/2).attr(`y`,l).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,r?`auto`:`hanging`).attr(`fill`,s.dataLabelColor).attr(`font-size`,`${c}px`).text(e=>e.label)}}break;case`text`:n.selectAll(`text`).data(t.data).enter().append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>d(e.verticalPos)).attr(`text-anchor`,e=>f(e.horizontalPos)).attr(`transform`,e=>p(e)).text(e=>e.text);break;case`path`:n.selectAll(`path`).data(t.data).enter().append(`path`).attr(`d`,e=>e.path).attr(`fill`,e=>e.fill?e.fill:`none`).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth)}}},`draw`)}};export{Ce as diagram};
|
|
8
|
-
//# sourceMappingURL=xychartDiagram-S5SC5T6Z-
|
|
8
|
+
//# sourceMappingURL=xychartDiagram-S5SC5T6Z-CNBL0I4g.js.map
|
package/dist/client/index.html
CHANGED
|
@@ -384,7 +384,7 @@
|
|
|
384
384
|
</script>
|
|
385
385
|
<style>html,body,#root{width:100%;height:100%;margin:0}body{color:#262626;background:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif}html.dark body{color:#f5f5f5;background:#0a0a0a}#boot-shell{background:inherit;min-height:100%;color:inherit;justify-content:center;align-items:center;display:flex;position:relative;overflow:hidden}html[data-theme-selected=true] #boot-shell{background:var(--boot-background);color:var(--boot-foreground)}#boot-shell-card{z-index:1;justify-content:center;align-items:center;width:96px;height:96px;display:flex;position:relative}#boot-shell-logo{object-fit:contain;width:64px;height:64px}#boot-error{text-align:center;justify-items:center;gap:16px;max-width:600px;padding:24px;display:grid}#boot-error p{overflow-wrap:anywhere;margin:0}#boot-error button{color:inherit;font:inherit;cursor:pointer;background:0 0;border:1px solid;border-radius:4px;padding:8px 16px}</style>
|
|
386
386
|
<title>P4 Code</title>
|
|
387
|
-
<script type="module" crossorigin src="/assets/index-
|
|
387
|
+
<script type="module" crossorigin src="/assets/index-DT3GBOff.js"></script>
|
|
388
388
|
</head>
|
|
389
389
|
<body>
|
|
390
390
|
<div id="root">
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-DzxwRta7.js";import{M as e}from"./mermaid-parser.core-Dbb1WTb8.js";export{e as createArchitectureServices};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-oBChb5qS.js";import"./chunk-DU6HZSFF-DMXcgXT_.js";import"./chunk-75Z2AOVW-B4sXgwEx.js";import"./chunk-PWAF6VOD-DflyqEaS.js";import"./chunk-GMAD6QVW-mPVRZq9Z.js";import"./chunk-P2QGCYS3-CeefF5cA.js";import"./chunk-4HAMMTFA-CD4tA6cX.js";import"./chunk-GVQU2GXP-ChBHtvjy.js";import"./chunk-OSK3NFVY-m-QXUYaT.js";import"./chunk-F27PBJKO-CGf21cwH.js";import"./chunk-XXDRQBXY-BvKO0v-W.js";import"./chunk-POPQ4Y6H-C-_RXsmg.js";import"./chunk-L3NEJ4N5-REmklvQl.js";import{i as t,n,r,t as i}from"./chunk-TICWLB2K-C7WGvYp1.js";import"./mermaid.core-Dtz8UzUI.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
2
|
-
//# sourceMappingURL=classDiagram-ZZMXUADV-B0NhU5d_.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-oBChb5qS.js";import"./chunk-DU6HZSFF-DMXcgXT_.js";import"./chunk-75Z2AOVW-B4sXgwEx.js";import"./chunk-PWAF6VOD-DflyqEaS.js";import"./chunk-GMAD6QVW-mPVRZq9Z.js";import"./chunk-P2QGCYS3-CeefF5cA.js";import"./chunk-4HAMMTFA-CD4tA6cX.js";import"./chunk-GVQU2GXP-ChBHtvjy.js";import"./chunk-OSK3NFVY-m-QXUYaT.js";import"./chunk-F27PBJKO-CGf21cwH.js";import"./chunk-XXDRQBXY-BvKO0v-W.js";import"./chunk-POPQ4Y6H-C-_RXsmg.js";import"./chunk-L3NEJ4N5-REmklvQl.js";import{i as t,n,r,t as i}from"./chunk-TICWLB2K-C7WGvYp1.js";import"./mermaid.core-Dtz8UzUI.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
2
|
-
//# sourceMappingURL=classDiagram-v2-VYDZK3BY-B0NhU5d_.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-DzxwRta7.js";import{O as e}from"./mermaid-parser.core-Dbb1WTb8.js";export{e as createEventModelingServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./src-oBChb5qS.js";import"./chunk-DU6HZSFF-DMXcgXT_.js";import"./chunk-75Z2AOVW-B4sXgwEx.js";import"./chunk-PWAF6VOD-DflyqEaS.js";import"./chunk-GMAD6QVW-mPVRZq9Z.js";import"./chunk-P2QGCYS3-CeefF5cA.js";import"./chunk-4HAMMTFA-CD4tA6cX.js";import"./chunk-GVQU2GXP-ChBHtvjy.js";import"./chunk-OSK3NFVY-m-QXUYaT.js";import"./chunk-F27PBJKO-CGf21cwH.js";import"./chunk-XXDRQBXY-BvKO0v-W.js";import"./chunk-POPQ4Y6H-C-_RXsmg.js";import"./chunk-L3NEJ4N5-REmklvQl.js";import{n as e}from"./chunk-SHT3W25Y-R_Fg17nt.js";import"./mermaid.core-Dtz8UzUI.js";export{e as diagram};
|