@p4code/cli 0.8.10 → 0.8.11
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-CqXltjbH.mjs → binCli-DY9l0jFs.mjs} +2 -2
- package/dist/client/.vite/manifest.json +1302 -1302
- package/dist/client/assets/{AuthSurfaceShell-kd42gI_H.js → AuthSurfaceShell-B_P0_qZ6.js} +2 -2
- package/dist/client/assets/{ChatGptUsageButton-CVZHYvIk.js → ChatGptUsageButton-fMcoYEDa.js} +2 -2
- package/dist/client/assets/{ChatMarkdown-CyAwyBCe.js → ChatMarkdown-B7b91JUl.js} +4 -4
- package/dist/client/assets/{CodexSetupSection.logic-Bg24iMBv.js → CodexSetupSection.logic-CeUTTu-x.js} +2 -2
- package/dist/client/assets/{CommandBlock-DfFKmmpW.js → CommandBlock-BI3ZCXsB.js} +2 -2
- package/dist/client/assets/{ComposerPromptEditor-BUr_9EhS.js → ComposerPromptEditor-BkRvKIiZ.js} +4 -4
- package/dist/client/assets/{DevicePanel-CEAHHS0L.js → DevicePanel-B_jOvmeL.js} +2 -2
- package/dist/client/assets/{DeviceSetup-BlB01a4k.js → DeviceSetup-BXjqCO_9.js} +2 -2
- package/dist/client/assets/{DiffCommentAnnotation-DJ5wq6nm.js → DiffCommentAnnotation-D_1Iw0oL.js} +2 -2
- package/dist/client/assets/{DiffFileTree-C5ZwieTz.js → DiffFileTree-D6386u9x.js} +2 -2
- package/dist/client/assets/{DiffPanel-deSBv-2a.js → DiffPanel-D6VVj6BF.js} +2 -2
- package/dist/client/assets/{DiffWorkerPoolProvider-B5VjaCIu.js → DiffWorkerPoolProvider-Cw5WeG1t.js} +2 -2
- package/dist/client/assets/{EmbeddedDesign-CPW-9E2n.js → EmbeddedDesign-Drkomo9K.js} +2 -2
- package/dist/client/assets/{FileDiff-DHQS5O_i.js → FileDiff-FK4mtyx3.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-3ustJhi8.js → FilePreviewPanel-ncsuf7iX.js} +2 -2
- package/dist/client/assets/{FoldedSettingsSection-DaTUDHXw.js → FoldedSettingsSection-CRlh3-BO.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-BP4MUjf4.js → NoProjectsHero-8d3l2unf.js} +2 -2
- package/dist/client/assets/{PanelLayoutControls-BNd5egB9.js → PanelLayoutControls-3fTyX_SN.js} +4 -4
- package/dist/client/assets/{PierreEntryIcon-CBahrBiu.js → PierreEntryIcon-DtlkLdir.js} +2 -2
- package/dist/client/assets/{PreviewPanel-rlVHqhKP.js → PreviewPanel-Ca3_DPh_.js} +2 -2
- package/dist/client/assets/{ProjectDefaultsSettings-Da05OPtO.js → ProjectDefaultsSettings-B--7QlKN.js} +2 -2
- package/dist/client/assets/{ProjectFavicon-Bkz2srRd.js → ProjectFavicon-YdOZ4g5-.js} +3 -3
- package/dist/client/assets/{ProjectIconPickerDialog-BpLImfmo.js → ProjectIconPickerDialog-C23nnU1a.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-ClXCW2ZL.js → ProviderAuthTerminal-YztsMr2F.js} +2 -2
- package/dist/client/assets/{ProviderModelPicker-BsAWSSR8.js → ProviderModelPicker-S_tiGeLH.js} +2 -2
- package/dist/client/assets/{ProviderSettingsForm-BaWOGIat.js → ProviderSettingsForm-C3nbCFfS.js} +2 -2
- package/dist/client/assets/{PullRequestCodeTab-CgecnYur.js → PullRequestCodeTab-BdP3_tNe.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-CQr-JCID.js → ReadOnlySourcePreview-BNe8pyVf.js} +2 -2
- package/dist/client/assets/{RenderErrorBoundary-C3EBbed9.js → RenderErrorBoundary-DEgVmtJL.js} +2 -2
- package/dist/client/assets/{ScheduledTasksSettings-CTKk7p1m.js → ScheduledTasksSettings-CISo4C7r.js} +2 -2
- package/dist/client/assets/{ScopedSwitch-BhNULF6o.js → ScopedSwitch-eWB5GlaA.js} +2 -2
- package/dist/client/assets/{SettingsPanels-Dp_sFsPo.js → SettingsPanels-DA7lXl0N.js} +2 -2
- package/dist/client/assets/{SettingsPanels.logic-C9V5Hz91.js → SettingsPanels.logic-lCZaJhKM.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-DSSyI0jy.js → SettingsScopeNotice-BAtVWG0d.js} +2 -2
- package/dist/client/assets/{T3ConnectAccountPages-B3e2wzII.js → T3ConnectAccountPages-nabxuL18.js} +2 -2
- package/dist/client/assets/{T3ConnectSidebarSignIn-BjQbm8G_.js → T3ConnectSidebarSignIn-CSVR5Zot.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-AmBMRSJo.js → ThemeEditorPanel-BMtL4rIt.js} +2 -2
- package/dist/client/assets/{ThreadTerminalDrawer-BtTayxlc.js → ThreadTerminalDrawer-CLfVfvoq.js} +2 -2
- package/dist/client/assets/{Virtualizer-D4YaDR_b.js → Virtualizer-Bi8p4Z6E.js} +2 -2
- package/dist/client/assets/{_chat-DV6w-2C3.js → _chat-D-Gcj0-9.js} +5 -5
- package/dist/client/assets/{_chat.index--w9wFkxu.js → _chat.index-k4jctzPr.js} +2 -2
- package/dist/client/assets/{_chat.new--MAUGvmU.js → _chat.new-BlFtqZqt.js} +2 -2
- package/dist/client/assets/{_chat.pull-requests-0A2xwMPy.js → _chat.pull-requests-DrLHGpqx.js} +2 -2
- package/dist/client/assets/{abnfDiagram-VCTEODGH-zLaAF-3J.js → abnfDiagram-VCTEODGH-BVKlsgtX.js} +2 -2
- package/dist/client/assets/architecture-7GRP2DOG-BNBr3Sao.js +1 -0
- package/dist/client/assets/{architectureDiagram-5GKGNRK7-DGrGnnOa.js → architectureDiagram-5GKGNRK7-zBJWGViu.js} +2 -2
- package/dist/client/assets/{assets-BwCKLAtY.js → assets-BhchpDuq.js} +2 -2
- package/dist/client/assets/{blockDiagram-I7D4REHJ-B5kjOwUJ.js → blockDiagram-I7D4REHJ-BdiAAtHi.js} +2 -2
- package/dist/client/assets/{browserHistoryStore-C4q3a0XH.js → browserHistoryStore-CqGVWa5a.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-BrW2R2w9.js → browserLinkTarget-CINrbcxi.js} +2 -2
- package/dist/client/assets/{c4Diagram-7LVT6UL2-N-lKEret.js → c4Diagram-7LVT6UL2-CqnmSo8f.js} +2 -2
- package/dist/client/assets/channel-CfHDq-fp.js +2 -0
- package/dist/client/assets/{chunk-4HAMMTFA-DIgHroFa.js → chunk-4HAMMTFA-BpyojyCk.js} +2 -2
- package/dist/client/assets/{chunk-75Z2AOVW-BA8jPDfc.js → chunk-75Z2AOVW-LBmwoUvq.js} +2 -2
- package/dist/client/assets/{chunk-DU6HZSFF-Dj0ZwIfN.js → chunk-DU6HZSFF-zhv2Vnfx.js} +2 -2
- package/dist/client/assets/{chunk-F27PBJKO-CIY-Y3U7.js → chunk-F27PBJKO-K5uPeDhv.js} +2 -2
- package/dist/client/assets/{chunk-GMAD6QVW-CpRREKUL.js → chunk-GMAD6QVW-CAAu3Cn5.js} +2 -2
- package/dist/client/assets/{chunk-GVQU2GXP-BNRFhCn1.js → chunk-GVQU2GXP-Br_UAx49.js} +2 -2
- package/dist/client/assets/{chunk-IMKFNOWR-CwVumyvU.js → chunk-IMKFNOWR-Kqfxrrdn.js} +2 -2
- package/dist/client/assets/{chunk-L3NEJ4N5-DmnnKxVD.js → chunk-L3NEJ4N5-D1cWO7rm.js} +2 -2
- package/dist/client/assets/{chunk-OSK3NFVY-CVpY8qRB.js → chunk-OSK3NFVY-BiMJbcHf.js} +2 -2
- package/dist/client/assets/{chunk-P2QGCYS3-BXtrm_uK.js → chunk-P2QGCYS3-BuGzzo3g.js} +2 -2
- package/dist/client/assets/{chunk-POPQ4Y6H-BMv4TRlv.js → chunk-POPQ4Y6H-C_w0mNLk.js} +2 -2
- package/dist/client/assets/{chunk-PWAF6VOD-ChjYfHBz.js → chunk-PWAF6VOD-CJFd7LKC.js} +2 -2
- package/dist/client/assets/{chunk-SHT3W25Y-B8_bIgln.js → chunk-SHT3W25Y-Beev3ZeU.js} +2 -2
- package/dist/client/assets/{chunk-SVP7TREG-B_6y-HJg.js → chunk-SVP7TREG-BqpBEmtK.js} +2 -2
- package/dist/client/assets/{chunk-TICWLB2K-UT10I24y.js → chunk-TICWLB2K-B0vIU1Au.js} +2 -2
- package/dist/client/assets/classDiagram-ZZMXUADV-Cm99q1tS.js +2 -0
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-Cm99q1tS.js +2 -0
- package/dist/client/assets/{connect-DhHj4PkS.js → connect-DGwXUKTk.js} +2 -2
- package/dist/client/assets/{connect-agent-BncssQEd.js → connect-agent-DFwOzcLG.js} +2 -2
- package/dist/client/assets/{cynefin-OW5HDTMX-CZNEfbCg.js → cynefin-OW5HDTMX-BjcFswd0.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-BKEovqGL.js → cynefinDiagram-5FMLGOSQ-BDWLg5Tt.js} +2 -2
- package/dist/client/assets/{dagre-GXQ25YYZ-D4NJOZw7.js → dagre-GXQ25YYZ-DZpVjkDw.js} +2 -2
- package/dist/client/assets/{device-CPrc6WRl.js → device-BEgZIK7u.js} +2 -2
- package/dist/client/assets/{diagram-S7CK7UJ4-DAVijJym.js → diagram-S7CK7UJ4-BpVs-kYJ.js} +2 -2
- package/dist/client/assets/{diagram-UQ7AKVKN-Cj6mxCST.js → diagram-UQ7AKVKN-EN7yKI08.js} +2 -2
- package/dist/client/assets/{diagram-VSXAHHWV-B8WJLooX.js → diagram-VSXAHHWV-B2oljv94.js} +2 -2
- package/dist/client/assets/{diagram-VX7I27RA-BC6KWAr-.js → diagram-VX7I27RA-BIl0lJ6d.js} +2 -2
- package/dist/client/assets/{diagram-Z3DM3KII-JUka6Rlo.js → diagram-Z3DM3KII-B8uoK-O5.js} +2 -2
- package/dist/client/assets/{diffRendering-DPsheMQA.js → diffRendering-DeZLcalP.js} +2 -2
- package/dist/client/assets/{dist-Byy10brL.js → dist-Bd1WIVAz.js} +2 -2
- package/dist/client/assets/{duoViewer-BguMFnDx.js → duoViewer-BZ7rNqkx.js} +2 -2
- package/dist/client/assets/{dynamic-DZ1i7e73.js → dynamic-BMz3CcWG.js} +2 -2
- package/dist/client/assets/{ebnfDiagram-PWID7BFC--X0uMdp8.js → ebnfDiagram-PWID7BFC-BQcQotuk.js} +2 -2
- package/dist/client/assets/{embeddedScripts-DtvNyJpi.js → embeddedScripts-Cek5ppgQ.js} +2 -2
- package/dist/client/assets/{entities-DSlJSLqU.js → entities-DPIZFvN7.js} +2 -2
- package/dist/client/assets/{environments-DcJA_6Bd.js → environments-Dm2_6Uan.js} +2 -2
- package/dist/client/assets/{erDiagram-RLTQ6QDP-D40nNb49.js → erDiagram-RLTQ6QDP-Y5XhNz9b.js} +2 -2
- package/dist/client/assets/eventmodeling-NTZA5JFV-B7plRWX7.js +1 -0
- package/dist/client/assets/{fileLinks-D1jJMhdN.js → fileLinks-1xYacDKI.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-g3uA37tp.js → fileTreeExpansion-B24BhRqA.js} +2 -2
- package/dist/client/assets/flowDiagram-HODETNUW-BEpQPBfI.js +1 -0
- package/dist/client/assets/{ganttDiagram-EL5Y4UJY-CUTw8cyG.js → ganttDiagram-EL5Y4UJY-DqWb0OUJ.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-BEkxNzZ-.js → getDiffFileInput-CCYVAWRm.js} +2 -2
- package/dist/client/assets/{gitGraph-4MIJSDKK-CNrKR9iC.js → gitGraph-4MIJSDKK-5lcY1dZk.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-BDOHc4qo.js → gitGraphDiagram-WWUBYQGX-BJKz_rGI.js} +2 -2
- package/dist/client/assets/{guideRunStore-DjlqVSzn.js → guideRunStore-BhlldU3q.js} +2 -2
- package/dist/client/assets/{index-1TY23MT4.js → index-Dc7GC03y.js} +3 -3
- package/dist/client/assets/{info-A6RAGUB7-CcpUa_F0.js → info-A6RAGUB7-BWnMlmF7.js} +1 -1
- package/dist/client/assets/{infoDiagram-27XIBGKW-DSI34MwN.js → infoDiagram-27XIBGKW-DKW68xDy.js} +2 -2
- package/dist/client/assets/{ishikawaDiagram-5VMMS53U-CP954DlA.js → ishikawaDiagram-5VMMS53U-dRMCvDN0.js} +2 -2
- package/dist/client/assets/{journeyDiagram-3NMN7TZE-eT4l5GzW.js → journeyDiagram-3NMN7TZE-CAxCpgF5.js} +2 -2
- package/dist/client/assets/{kanban-definition-UXKFOSKX-C77A2Ei7.js → kanban-definition-UXKFOSKX-BaSkJW47.js} +2 -2
- package/dist/client/assets/{line-CLiRrUp0.js → line-B59oA22i.js} +2 -2
- package/dist/client/assets/{linkedPrompt-B-9VpB-9.js → linkedPrompt-Cqfqh2Aq.js} +2 -2
- package/dist/client/assets/main-Ch-SjebX.css +2 -0
- package/dist/client/assets/{main-BxSUUHl7.js → main-CxOeqlhD.js} +7 -7
- package/dist/client/assets/{mediaReference-Co0MbQU1.js → mediaReference-DRC-8GdL.js} +2 -2
- package/dist/client/assets/{mediaSource-CakREDG9.js → mediaSource-DWSwwPfV.js} +2 -2
- package/dist/client/assets/{mermaid-parser.core-Dm-CGUQK.js → mermaid-parser.core-DcamukpZ.js} +4 -4
- package/dist/client/assets/{mermaid.core-BUABPjrf.js → mermaid.core-C6GXL70P.js} +5 -5
- package/dist/client/assets/{mindmap-definition-YA3MSWOX-DdthJce-.js → mindmap-definition-YA3MSWOX-CEVz3xGI.js} +2 -2
- package/dist/client/assets/{onboarding-qFB0UvmL.js → onboarding-CLIRA2Sa.js} +2 -2
- package/dist/client/assets/{openFileInPreview-DH1_MQQg.js → openFileInPreview-uS9Qgrru.js} +2 -2
- package/dist/client/assets/{p4ProjectFile-Czc_hMvK.js → p4ProjectFile-CIYnqKbl.js} +2 -2
- package/dist/client/assets/{packet-AYTQ26CC-C3W7XCMm.js → packet-AYTQ26CC-B9XAEihD.js} +1 -1
- package/dist/client/assets/{pair-CcIVxc7L.js → pair-DTfs9_4K.js} +2 -2
- package/dist/client/assets/{pegDiagram-XKGWAZYB-DMWX9FLy.js → pegDiagram-XKGWAZYB-tcLsMhrs.js} +2 -2
- package/dist/client/assets/{phoneViewer-EcEiirVA.js → phoneViewer-wYjPQP4U.js} +2 -2
- package/dist/client/assets/{pie-WAS4IAKB-Bdmc_LNt.js → pie-WAS4IAKB-B3ig0TFp.js} +1 -1
- package/dist/client/assets/{pieDiagram-E7YTZNPT-D7g18I6h.js → pieDiagram-E7YTZNPT-uaJgfQOp.js} +2 -2
- package/dist/client/assets/{pierre-icons-BF6Bv7EQ.js → pierre-icons-Dav7jMBk.js} +2 -2
- package/dist/client/assets/popover-Bc0WvoPP.js +2 -0
- package/dist/client/assets/{preview-CzRHMudX.js → preview-C4lGbDhm.js} +2 -2
- package/dist/client/assets/{primary-BeYRWn1V.js → primary-CRkgnOCY.js} +2 -2
- package/dist/client/assets/{primaryCloudLinkState-BLsual21.js → primaryCloudLinkState-B_VNTJYL.js} +2 -2
- package/dist/client/assets/{projectFilesQueryState-DA41YjI0.js → projectFilesQueryState-U08pztRu.js} +2 -2
- package/dist/client/assets/{projectScriptEditor-BQz7SQAB.js → projectScriptEditor-D8mxKLOb.js} +2 -2
- package/dist/client/assets/{providerSkills-BqTkgag1.js → providerSkills-C7CtJefh.js} +2 -2
- package/dist/client/assets/{pullRequestDetail.logic-DZT0G8Eq.js → pullRequestDetail.logic-DGX-Sd8d.js} +2 -2
- package/dist/client/assets/{pullRequests-D40-ZAXm.js → pullRequests-BbD7hNlR.js} +2 -2
- package/dist/client/assets/{quadrantDiagram-AXDQQJYC-B7fD9ov3.js → quadrantDiagram-AXDQQJYC-BOFUpnyi.js} +2 -2
- package/dist/client/assets/{queries-G1w-VoW0.js → queries-BVPZtaQA.js} +2 -2
- package/dist/client/assets/{radar-RG4KPBEZ-XnqFD0Vk.js → radar-RG4KPBEZ--djmIj49.js} +1 -1
- package/dist/client/assets/{railroad-74A4TZTK-DTwlNXl5.js → railroad-74A4TZTK-DMMw049f.js} +1 -1
- package/dist/client/assets/railroad-abnf-HS5TGJTU-BJdCwb3O.js +1 -0
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-a9vhoAEG.js +1 -0
- package/dist/client/assets/railroad-peg-WCYAUIDC-Cyo-vXW_.js +1 -0
- package/dist/client/assets/{railroadDiagram-O6MQD6OU-CvCkOq5l.js → railroadDiagram-O6MQD6OU-Df9rhhFk.js} +2 -2
- package/dist/client/assets/{renderScheduler-pSLV-XuI.js → renderScheduler-b0pOdWwc.js} +2 -2
- package/dist/client/assets/{requirementDiagram-BXWQKSXE-taBU_pva.js → requirementDiagram-BXWQKSXE-BtGYMd7U.js} +2 -2
- package/dist/client/assets/{runtime-BtqGaFGQ.js → runtime-Bc4kgQim.js} +2 -2
- package/dist/client/assets/{runtime-B3_ce0WW.js → runtime-DZfpb67Q.js} +3 -3
- package/dist/client/assets/{sankeyDiagram-P5KCCOFB-DZUz0diJ.js → sankeyDiagram-P5KCCOFB-D7_y-s_u.js} +2 -2
- package/dist/client/assets/{scheduledTasksSettings.logic-C0Ez1DaI.js → scheduledTasksSettings.logic-CvvQA-b7.js} +2 -2
- package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-CljKM3sv.js → sequenceDiagram-WJ2MYXX4-AuXrX-b5.js} +2 -2
- package/dist/client/assets/{server-BP2BG-G5.js → server-LJ0-FVGH.js} +2 -2
- package/dist/client/assets/{session-B20XW_sH.js → session-Bc1P10r_.js} +2 -2
- package/dist/client/assets/{session-logic-BtEgohgO.js → session-logic-BNtU33qU.js} +2 -2
- package/dist/client/assets/{settings-DBl7ZVnV.js → settings-CZSrxmjf.js} +2 -2
- package/dist/client/assets/{settings.appearance-D8k8SMD3.js → settings.appearance-B_LipS5_.js} +2 -2
- package/dist/client/assets/settings.archived-B_h3CK_T.js +2 -0
- package/dist/client/assets/{settings.computer-use-pik9jKva.js → settings.computer-use-BAzpb53_.js} +2 -2
- package/dist/client/assets/{settings.connections-DCVjT1D4.js → settings.connections-Bv37N8Tm.js} +2 -2
- package/dist/client/assets/{settings.data-controls-immNwXN9.js → settings.data-controls-DIkcwUy1.js} +2 -2
- package/dist/client/assets/{settings.decisions-DWMEFgyI.js → settings.decisions-BN9ozN_A.js} +2 -2
- package/dist/client/assets/{settings.diagnostics-BU0rF2oy.js → settings.diagnostics-DuoGRNGf.js} +2 -2
- package/dist/client/assets/{settings.general-Dlcf9Hk5.js → settings.general-B-Bt2-nG.js} +2 -2
- package/dist/client/assets/{settings.integrations-CYXx2aGC.js → settings.integrations-CT3opViE.js} +2 -2
- package/dist/client/assets/{settings.keybindings-CZlUIeZC.js → settings.keybindings-BBTkicWk.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-Df90UmKw.js → settings.open-source-licenses-C_hoYTwe.js} +2 -2
- package/dist/client/assets/{settings.plugins-DGKWDNbJ.js → settings.plugins-DafKnC5Q.js} +2 -2
- package/dist/client/assets/{settings.projects-BaH4TdtU.js → settings.projects-r2ZcxKud.js} +3 -3
- package/dist/client/assets/{settings.providers-jRQxDtSb.js → settings.providers-jbZijXPV.js} +3 -3
- package/dist/client/assets/{settings.scheduled-tasks-DedR0Odt.js → settings.scheduled-tasks-C0d4wkYE.js} +2 -2
- package/dist/client/assets/{settings.snap-shot-BphQmu0k.js → settings.snap-shot-D-zJVnjT.js} +2 -2
- package/dist/client/assets/{settings.source-control-raEHGAxv.js → settings.source-control-DIU1xRUy.js} +2 -2
- package/dist/client/assets/{settings.storage-CGgPDbYR.js → settings.storage-DRxTKEjG.js} +2 -2
- package/dist/client/assets/{settingsLayout-C0HMxLxU.js → settingsLayout-Cbpy7Mfz.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-DJA_Uu9w.js → sidebarProjectGrouping-DXnDcqLY.js} +2 -2
- package/dist/client/assets/{sortable.esm-cggA232Z.js → sortable.esm-Boen_E7K.js} +2 -2
- package/dist/client/assets/{sourceControl-oqWEMILZ.js → sourceControl-DE9QO1yg.js} +2 -2
- package/dist/client/assets/{stateDiagram-D77RDMKH-8ubzI9Qu.js → stateDiagram-D77RDMKH-EwB2WAAm.js} +2 -2
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-CcnJHQ4a.js +2 -0
- package/dist/client/assets/{swimlanes-42K2YHIH-BbvNjSwa.js → swimlanes-42K2YHIH-RngRFsjR.js} +2 -2
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-CrkPrysy.js +9 -0
- package/dist/client/assets/{terminalSessions-B774652v.js → terminalSessions-Cj-MqjH8.js} +2 -2
- package/dist/client/assets/{threadSort-Broxuoqw.js → threadSort-DD61dseb.js} +2 -2
- package/dist/client/assets/{timeline-definition-24CTP7MA-BxF3SHfH.js → timeline-definition-24CTP7MA-BfIggpP3.js} +2 -2
- package/dist/client/assets/{toast-Dm5S3V1c.js → toast-DYfY2t_z.js} +2 -2
- package/dist/client/assets/{treeView-Q6P3EWNA-CGSjigr_.js → treeView-Q6P3EWNA-BjKaOr9u.js} +1 -1
- package/dist/client/assets/{treemap-WGGIJYW6-BS1Y39WM.js → treemap-WGGIJYW6-ffFPsmk1.js} +1 -1
- package/dist/client/assets/{usage-ByG67Q9r.js → usage-CRK5JZJm.js} +2 -2
- package/dist/client/assets/{use-atom-command-COr3-BfL.js → use-atom-command-Dz_yqN35.js} +2 -2
- package/dist/client/assets/{useHandleNewThread-BWKsU_Gt.js → useHandleNewThread-DjevdE0U.js} +2 -2
- package/dist/client/assets/{usePullRequestActions-C65BTMJa.js → usePullRequestActions-BKpChcp1.js} +2 -2
- package/dist/client/assets/{useScopedModelAvailability-D2Bb81KH.js → useScopedModelAvailability-mUid6EfJ.js} +2 -2
- package/dist/client/assets/{useSettings-WGf2H_E7.js → useSettings-DCI8Hv09.js} +2 -2
- package/dist/client/assets/{useT3ConnectAuthPrompt-DkfGkujP.js → useT3ConnectAuthPrompt-C7Dm8xCm.js} +2 -2
- package/dist/client/assets/{vcsRefInvalidation-CUgwItfg.js → vcsRefInvalidation-3pHpDJC2.js} +2 -2
- package/dist/client/assets/{vennDiagram-4TSXK5OY-D82sXWUt.js → vennDiagram-4TSXK5OY-Bw5_1h9Y.js} +2 -2
- package/dist/client/assets/{wardley-WFR3VGLG-wxkoFCaM.js → wardley-WFR3VGLG-BzzHb86M.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-VM6X3IG4-DZkAGgtY.js → wardleyDiagram-VM6X3IG4-RCSx0hV5.js} +2 -2
- package/dist/client/assets/{welcome-CbLsZSs9.js → welcome-RXSMyzlx.js} +2 -2
- package/dist/client/assets/{xychartDiagram-S5SC5T6Z-BqDefNNt.js → xychartDiagram-S5SC5T6Z-CcISZM46.js} +2 -2
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
- package/dist/client/assets/architecture-7GRP2DOG-BnVYv_Tj.js +0 -1
- package/dist/client/assets/channel-ke6KlN2m.js +0 -2
- package/dist/client/assets/classDiagram-ZZMXUADV-_dDKzg70.js +0 -2
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-_dDKzg70.js +0 -2
- package/dist/client/assets/eventmodeling-NTZA5JFV-BxLxqsIB.js +0 -1
- package/dist/client/assets/flowDiagram-HODETNUW-CEdMSh3v.js +0 -1
- package/dist/client/assets/main-r-P9O3jD.css +0 -2
- package/dist/client/assets/popover-BDFZje9T.js +0 -2
- package/dist/client/assets/railroad-abnf-HS5TGJTU-DZY_wWOl.js +0 -1
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-DuwTAynV.js +0 -1
- package/dist/client/assets/railroad-peg-WCYAUIDC-wPuXkdeA.js +0 -1
- package/dist/client/assets/settings.archived-DQ04FuiA.js +0 -2
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-hQOpsZ3n.js +0 -2
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-BA9BVweg.js +0 -9
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{E_ as e,Lc as t,ME as n,Sv as r,T_ as i,bv as a,gy as o}from"./utils-CRwA5SKO.js";import{F as s,M as c,P as l,k as u,tt as d}from"./runtime-
|
|
2
|
-
//# sourceMappingURL=terminalSessions-
|
|
1
|
+
import{E_ as e,Lc as t,ME as n,Sv as r,T_ as i,bv as a,gy as o}from"./utils-CRwA5SKO.js";import{F as s,M as c,P as l,k as u,tt as d}from"./runtime-DZfpb67Q.js";import{t as f}from"./runtime-Bc4kgQim.js";import{i as p}from"./session-Bc1P10r_.js";import{n as m}from"./query-CpOQgkic.js";var h=n(),g=Object.freeze({generation:-1,resetVersion:-1,offset:0}),_=524288,v=16384,y=1024,b=new TextEncoder,x=new TextDecoder(`utf-8`,{ignoreBOM:!0}),S=Object.freeze({generation:0,chunks:Object.freeze([]),retainedBytes:0,resetVersion:0,nextOffset:0});function C(e,t){if(e.length===0)return[];let n=b.encode(e);if(n.byteLength<=t)return[{data:e,byteLength:n.byteLength}];let r=[],i=0;for(;i<n.byteLength;){let e=Math.min(i+t,n.byteLength);for(;e<n.byteLength&&((n[e]??0)&192)==128;)--e;if(e===i)for(e=Math.min(i+t,n.byteLength);e<n.byteLength&&((n[e]??0)&192)==128;)e+=1;let a=n.subarray(i,e);r.push({data:x.decode(a),byteLength:a.byteLength}),i=e}return r}function w(e,t){if(t<=0)return``;let n=b.encode(e);if(n.byteLength<=t)return e;let r=n.byteLength-t;for(;r<n.length;){let e=n[r];if(e===void 0||(e&192)!=128)break;r+=1}return x.decode(n.subarray(r))}function T(e,t,n=v){let r=C(e,n),i=0,a=t;return{chunks:r.map(e=>{i+=e.byteLength;let t=a;return a+=e.data.length,{startOffset:t,data:e.data,byteLength:e.byteLength}}),nextOffset:a,byteLength:i}}function E(e){let t=[];for(let n of e){let e=t.at(-1);e!==void 0&&e.startOffset+e.data.length===n.startOffset&&e.byteLength+n.byteLength<=v?t[t.length-1]={startOffset:e.startOffset,data:`${e.data}${n.data}`,byteLength:e.byteLength+n.byteLength}:t.push(n)}return t}function D(e,t){let n=0,r=0;for(;r<t&&n<e.data.length;){let t=e.data.codePointAt(n);r+=t<=127?1:t<=2047?2:t<=65535?3:4,n+=t<=65535?1:2}return{...e,startOffset:e.startOffset+n,data:e.data.slice(n),byteLength:e.byteLength-r}}function O(e,t,n){if(t.length===0)return e;if(n<=0)return{generation:e.generation,chunks:[],retainedBytes:0,resetVersion:e.resetVersion+1,nextOffset:e.nextOffset+t.length};let r=T(t,e.nextOffset,Math.min(v,Math.max(1,n))),i=[...e.chunks,...r.chunks],a=e.retainedBytes+r.byteLength,o=0;for(;a>n&&o<i.length;){let e=i[o],t=a-n;if(t<e.byteLength){let n=D(e,t);a-=e.byteLength-n.byteLength,n.byteLength>0?i[o]=n:o+=1;break}a-=e.byteLength,o+=1}let s=o===0?i:i.slice(o);if(s.length>y){s=E(s);let e=s.length-y;if(e>0){for(let t of s.slice(0,e))a-=t.byteLength;s=s.slice(e)}}return{generation:e.generation,chunks:s,retainedBytes:a,resetVersion:e.resetVersion,nextOffset:r.nextOffset}}function k(e,t,n){let r=T(w(t,n),0,Math.min(v,Math.max(1,n)));return{generation:e.generation,chunks:r.chunks,retainedBytes:r.byteLength,resetVersion:e.resetVersion+1,nextOffset:r.nextOffset}}function A(e){return e.chunks.map(e=>e.data).join(``)}function j(e,t){let n={generation:e.generation,resetVersion:e.resetVersion,offset:e.nextOffset},r=e.chunks[0];if(t.generation!==e.generation||t.resetVersion!==e.resetVersion||t.offset<(r?.startOffset??e.nextOffset))return{type:`reset`,data:A(e),cursor:n};let i=e.chunks.filter(e=>e.startOffset+e.data.length>t.offset);return i.length===0?{type:`none`,cursor:n}:{type:`append`,data:i.map(e=>e.data.slice(Math.max(0,t.offset-e.startOffset))).join(``),cursor:n}}function M(e){return e.filter(e=>e.state.hasRunningSubprocess).map(e=>e.target.terminalId)}var N=Object.freeze({output:S,status:`closed`,error:null,updatedAt:null,version:0,lifecycleVersion:0}),P=Object.freeze({summary:null,output:S,status:`closed`,error:null,hasRunningSubprocess:!1,updatedAt:null,version:0,lifecycleVersion:0}),F=0;function I(){return{...N,output:{...S,generation:++F}}}function L(e,t,n=N){return{output:k(n.output,e.history,t),status:e.status,error:null,updatedAt:e.updatedAt,version:n.version+1,lifecycleVersion:n.lifecycleVersion}}function R(e,t){return e===null?t:t===null||Date.parse(e)>=Date.parse(t)?e:t}function z(e,t){return{summary:e,output:t.output,status:t.version>0?t.status:e?.status??t.status,error:t.error,hasRunningSubprocess:e?.hasRunningSubprocess??!1,updatedAt:R(e?.updatedAt??null,t.updatedAt),version:t.version,lifecycleVersion:t.lifecycleVersion}}function B(e,t,n=_){switch(t.type){case`snapshot`:return{...L(t.snapshot,n,e),lifecycleVersion:e.version===0?e.lifecycleVersion:e.lifecycleVersion+1};case`restarted`:return{...L(t.snapshot,n,e),lifecycleVersion:e.lifecycleVersion+1};case`output`:return{...e,output:O(e.output,t.data,n),status:e.status===`closed`?`running`:e.status,error:null,version:e.version+1};case`cleared`:return{...e,output:k(e.output,``,n),error:null,version:e.version+1};case`exited`:return{...e,status:`exited`,error:null,version:e.version+1};case`closed`:return{...e,status:`closed`,error:null,version:e.version+1};case`error`:return{...e,status:`error`,error:t.message,version:e.version+1};case`activity`:return e}}function V(e,t){return t.type===`snapshot`?t.terminals:t.type===`remove`?e.filter(e=>e.threadId!==t.threadId||e.terminalId!==t.terminalId):[...e.filter(e=>e.threadId!==t.terminal.threadId||e.terminalId!==t.terminal.terminalId),t.terminal]}function H(e){let n=u(),i=u(),o=({environmentId:e,input:t})=>JSON.stringify([e,t.threadId]),f=({environmentId:e,input:t})=>JSON.stringify([e,t.threadId,t.terminalId??null]),p={mode:`serial`,key:o};return{observe:s(e,{label:`environment-data:terminal:observe`,subscribe:e=>r(()=>d(t.terminalObserve,e).pipe(a(I,B)))}),attach:s(e,{label:`environment-data:terminal:attach`,subscribe:e=>r(()=>d(t.terminalAttach,e).pipe(a(I,B)))}),events:l(e,{label:`environment-data:terminal:events`,tag:t.subscribeTerminalEvents}),metadata:s(e,{label:`environment-data:terminal:metadata`,subscribe:e=>d(t.subscribeTerminalMetadata,{}).pipe(a(()=>[],V))}),open:c(e,{label:`environment-data:terminal:open`,tag:t.terminalOpen,scheduler:n,concurrency:p}),write:c(e,{label:`environment-data:terminal:write`,tag:t.terminalWrite}),resize:c(e,{label:`environment-data:terminal:resize`,tag:t.terminalResize,scheduler:i,concurrency:{mode:`latest`,key:f}}),clear:c(e,{label:`environment-data:terminal:clear`,tag:t.terminalClear,scheduler:n,concurrency:p}),restart:c(e,{label:`environment-data:terminal:restart`,tag:t.terminalRestart,scheduler:n,concurrency:p}),close:c(e,{label:`environment-data:terminal:close`,tag:t.terminalClose,scheduler:n,concurrency:p})}}var U=H(f),W=Object.freeze([]),G=new WeakMap,K=new WeakMap,q=new WeakMap;function J(e,t){let n=K.get(e),r=n?.get(t);if(r)return r;let i={target:{environmentId:t,threadId:o.make(e.threadId),terminalId:e.terminalId},state:z(e,N)};return n||(n=new Map,K.set(e,n)),n.set(t,i),i}function Y(e){let t=G.get(e);if(!t){let n=new Intl.Collator(void 0,{numeric:!0}).compare,r=e.toSorted((e,t)=>n(e.terminalId,t.terminalId)),i=new Map;for(let e of r){let t=i.get(e.threadId);t?t.push(e):i.set(e.threadId,[e])}t={all:r,byThreadId:i,views:new Map},G.set(e,t)}return t}function X(e,t,n){if(t===null||e===null||e.length===0)return W;let r=Y(e),i=r.views.get(t),a=i?.get(n);if(a)return a;let o=n===null?r.all:r.byThreadId.get(n);if(!o||o.length===0)return W;let s=o[0],c=n===null?`all`:`thread`,l=q.get(s),u=l?.get(t),d=u?.[c]?.deref(),f=d?.length===o.length&&d.every((e,t)=>e.state.summary===o[t])?d:o.map(e=>J(e,t));return l||(l=new Map,q.set(s,l)),f!==d&&l.set(t,{...u,[c]:new WeakRef(f)}),i||(i=new Map,r.views.set(t,i)),i.set(n,f),f}function Z(t){let n=(0,h.c)(15),r=p(t.environmentId,e),a=p(t.environmentId,i),o;n[0]!==a||n[1]!==r||n[2]!==t.environmentId||n[3]!==t.terminal?(o=t.environmentId!==null&&t.terminal!==null?a?U.attach({environmentId:t.environmentId,input:t.terminal}):r?U.observe({environmentId:t.environmentId,input:{threadId:t.terminal.threadId,terminalId:t.terminal.terminalId}}):null:null,n[0]=a,n[1]=r,n[2]=t.environmentId,n[3]=t.terminal,n[4]=o):o=n[4];let s=m(o),c;n[5]!==r||n[6]!==t.environmentId?(c=t.environmentId===null||!r?null:U.metadata({environmentId:t.environmentId,input:null}),n[5]=r,n[6]=t.environmentId,n[7]=c):c=n[7];let l=m(c),u;bb0:{if(t.environmentId===null||t.terminal===null){u=P;break bb0}let e;n[8]!==s.data||n[9]!==t.terminal||n[10]!==l.data?(e=z((l.data===null?null:Y(l.data).byThreadId.get(t.terminal.threadId)?.find(e=>e.terminalId===t.terminal?.terminalId))??null,s.data??N),n[8]=s.data,n[9]=t.terminal,n[10]=l.data,n[11]=e):e=n[11];let r=e,i;n[12]!==s.error||n[13]!==r?(i=s.error===null?r:{...r,error:s.error,status:`error`},n[12]=s.error,n[13]=r,n[14]=i):i=n[14],u=i}return u}function Q(t){let n=(0,h.c)(8),r=p(t.environmentId,e),i;n[0]!==r||n[1]!==t.environmentId?(i=t.environmentId===null||!r?null:U.metadata({environmentId:t.environmentId,input:null}),n[0]=r,n[1]=t.environmentId,n[2]=i):i=n[2];let a=m(i),o;return n[3]!==t.environmentId||n[4]!==t.threadId||n[5]!==a.data||n[6]!==a.error?(o=a.data===null||a.error!==null?null:X(a.data,t.environmentId,t.threadId),n[3]=t.environmentId,n[4]=t.threadId,n[5]=a.data,n[6]=a.error,n[7]=o):o=n[7],o}function $(e){let t=(0,h.c)(4),n=Q(e),r;t[0]===n?r=t[1]:(r=n??[],t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=M(r),t[2]=r,t[3]=i),i}export{g as a,U as i,Q as n,j as o,$ as r,Z as t};
|
|
2
|
+
//# sourceMappingURL=terminalSessions-Cj-MqjH8.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Eh as e,Gy as t,Jh as n,Ly as r,Ny as i,Qy as a,RS as o,Sh as s,Xh as c,_y as l,by as u,db as d,ph as f,vb as p,vy as m}from"./utils-CRwA5SKO.js";import{pn as h}from"./runtime-BtqGaFGQ.js";function g(e,t){try{let n=new URL(e).pathname,r=n.indexOf(t);return r>0&&/^\d+(?:\/|$)/u.test(n.slice(r+t.length))}catch{return!1}}function _(e){return e}function v(e,t){if(t.authority===void 0)return!0;try{let n=new URL(e.locator.remoteUrl);if(n.protocol===`http:`||n.protocol===`https:`)return n.host.toLowerCase()===t.authority}catch{}return!0}function y(e,t,r){if(!v(t,r))return!1;let i=n(t,e);return i===r.host.toLowerCase()||i===r.authority}function b(e){return e.displayName??(e.owner&&e.name?`${e.owner}/${e.name}`:null)}function x(e,t,n){let r=b(t);return r!==null&&r.toLowerCase()===n.repository.toLowerCase()&&y(e,t,n)}var S={kind:c.make(`unknown`),label:`source control`,pickerLabel:`source control`,icon:`change-request`,changeRequest:{shortLabel:`change request`,singular:`change request`},repositoryPathHint:`URL`,publicHost:null,publishDescription:`Your signed-in server`,publishHost:e=>e??`your server`,newRepositoryOwner:()=>null,defaultCloneTransport:`ssh`,changeRequestUrl:()=>null,changeRequestActions:new Set,checkoutCommand:()=>null,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:()=>null,isChangeRequestReference:()=>!1,changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>x(c.make(`unknown`),e,t),canReadChangeRequestOnHost:(e,t)=>y(c.make(`unknown`),e,t),isChangeRequestUrl:()=>!1};function ee(e){let t=new Map;for(let n of e){if(t.has(n.kind))throw Error(`Source control host '${n.kind}' is defined more than once.`);t.set(n.kind,n)}return{definitions:e,get:n=>(n==null?e[0]:t.get(n))??S,find:e=>t.get(e),findByPublicHost:t=>{let n=t.toLowerCase();return e.find(e=>e.publicHost===n)},findByChangeRequestUrl:t=>e.find(e=>e.isChangeRequestUrl(t)),hostLabelForChangeRequestUrl:t=>e.find(e=>e.isChangeRequestUrl(t))?.label??`the host`}}function te(e,t){let n=a(e),r=n(t??{});if(r._tag===`Some`)return r.value;let i=n({});if(i._tag===`Some`)return i.value;throw Error(`A source control host settings schema must decode an empty object.`)}var ne=/^az\s+repos\s+pr\s+checkout\s+(.+)$/i,re=/^https:\/\/(?:dev\.azure\.com\/[^/\s]+\/[^/\s]+|[^/\s]+\.visualstudio\.com\/[^/\s]+)\/_git\/[^/\s]+\/pullrequest\/(\d+)(?:[/?#].*)?$/i;function ie(e){let t=e.trim().split(/\s+/).filter(Boolean);for(let[e,n]of t.entries()){if(n===`--id`||n===`-i`)return t[e+1]??null;if(n.startsWith(`--id=`))return n.slice(5)||null}return t.find(e=>!e.startsWith(`-`))??null}var C=_({kind:c.make(`azure-devops`),label:`Azure DevOps`,pickerLabel:`Azure DevOps`,icon:`azure-devops`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`project/repository`,publicHost:null,publishDescription:`dev.azure.com`,publishHost:()=>`dev.azure.com`,newRepositoryOwner:()=>null,defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${h(`${e}/${t}`.toLowerCase())}/pullrequest/${n}`,changeRequestActions:new Set([`merge`,`ready`,`draft`,`close`,`reopen`,`enable-auto-merge`,`disable-auto-merge`]),checkoutCommand:({number:e})=>`az repos pr checkout --id ${e}`,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:e=>{let t=ne.exec(e)?.[1];return t?ie(t):null},isChangeRequestReference:e=>re.test(e),changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>v(e,t)&&h(e.canonicalKey.toLowerCase())===h(`${t.host}/${t.repository}`.toLowerCase()),canReadChangeRequestOnHost:()=>!1,isChangeRequestUrl:e=>g(e,`/pullrequest/`)}),w=/^[A-Za-z0-9._/@+=,-]+$/,T=/^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+$/,E=c.make(`bitbucket`),D=e=>m.pipe(p(o(``)),t(e)),O=s({accessToken:D({title:`Access token`,description:`Scoped to one repository, project, or workspace. Create it in that item's Bitbucket settings.`,settingsSecret:!0,providerSettingsForm:{control:`password`}}),email:D({title:`Atlassian account email`,description:`With an API token instead of an access token.`,providerSettingsForm:{placeholder:`you@example.com`}}),apiToken:D({title:`API token`,description:`Reaches every repository your Atlassian account can. Give it read and write access to repositories and pull requests, and read:user:bitbucket.`,settingsSecret:!0,providerSettingsForm:{control:`password`}})},{order:[`accessToken`,`email`,`apiToken`]}),ae=_({kind:E,label:`Bitbucket`,pickerLabel:`Bitbucket`,icon:`bitbucket`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`workspace/repository`,publicHost:`bitbucket.org`,publishDescription:`bitbucket.org`,publishHost:()=>`bitbucket.org`,newRepositoryOwner:()=>null,defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/pull-requests/${n}`,changeRequestActions:new Set([`merge`,`close`]),checkoutCommand:({number:e,headBranch:t,headRepositoryNameWithOwner:n})=>n&&T.test(n)&&w.test(t)?`git clone --single-branch --branch ${t} https://bitbucket.org/${n}.git t3code-pr-${e}`:null,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:()=>null,isChangeRequestReference:()=>!1,changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>x(E,e,t),canReadChangeRequestOnHost:(e,t)=>y(E,e,t),isChangeRequestUrl:e=>g(e,`/pull-requests/`),settings:O}),k=/^tea\s+(?:pr|pulls)\s+checkout\s+(.+)$/i,A=/^https?:\/\/[^/\s]+\/(?:[^/\s]+\/)+[^/\s]+\/pulls\/(\d+)(?:[/?#].*)?$/i,j=c.make(`forgejo`);function M(e){if(!e.webUrl)return null;try{let t=new URL(e.webUrl);return t.protocol===`http:`||t.protocol===`https:`?t:null}catch{return null}}var N=_({kind:j,label:`Forgejo`,pickerLabel:`Forgejo / Gitea`,icon:`forgejo`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`owner/repo`,publicHost:null,publishDescription:`Your signed-in server`,publishHost:e=>e??`your server`,newRepositoryOwner:e=>e?{owner:e}:null,defaultCloneTransport:`https`,changeRequestUrl:({host:e,repository:t,number:n,remoteUrl:r,webUrl:i})=>{if(i)return`${i.replace(/\/+$/,``)}/pulls/${n}`;try{let i=new URL(r??``);if((i.protocol===`http:`||i.protocol===`https:`)&&(i.hostname.toLowerCase()===e.toLowerCase()||i.host.toLowerCase()===e.toLowerCase()))return`${i.origin}/${t}/pulls/${n}`}catch{}return`https://${e}/${t}/pulls/${n}`},changeRequestActions:new Set([`merge`,`close`,`reopen`,`update-branch`]),checkoutCommand:({number:e,repositoryUrl:t})=>t?`git fetch '${t.replaceAll(`'`,`'\\''`)}' refs/pull/${e}/head && git checkout -B pulls/${e} FETCH_HEAD`:null,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:e=>e===`request-changes`,checkoutCommandArgument:e=>k.exec(e)?.[1]?.trim()??null,isChangeRequestReference:e=>A.test(e),changeRequestUrlHost:e=>e.host,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>{if(!v(e,t))return!1;let n=M(e);return n?n.host.toLowerCase()===(t.authority??t.host).toLowerCase()&&n.pathname.replace(/^\/+|\/+$/g,``).toLowerCase()===t.repository.toLowerCase():x(j,e,t)},canReadChangeRequestOnHost:(e,t)=>{let n=M(e);if(!n)return y(j,e,t);let r=n.pathname.replace(/^\/+|\/+$/g,``).split(`/`).slice(0,-2).join(`/`);return n.host.toLowerCase()===(t.authority??t.host).toLowerCase()&&(!r||t.repository.toLowerCase().startsWith(`${r.toLowerCase()}/`))},isChangeRequestUrl:e=>g(e,`/pulls/`)}),P=new Set([`git.cafe`,`staging.git.cafe`]),F=c.make(`gitcafe`),I=s({token:m.pipe(e,p(o(``)),t({title:`Token`,description:`A git.cafe token, used before CAFE_TOKEN and the cafe login, so GitCafe works without the CLI signed in.`,providerSettingsForm:{control:`password`}}))}),L=_({kind:F,label:`GitCafe`,pickerLabel:`GitCafe`,icon:`gitcafe`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`owner/repo`,publicHost:null,publishDescription:`git.cafe`,publishHost:()=>`git.cafe`,newRepositoryOwner:e=>e?{owner:e}:null,defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/pulls/${n}`,changeRequestActions:new Set([`ready`,`draft`,`close`,`reopen`,`merge`,`update-branch`]),checkoutCommand:({number:e})=>`cafe pr checkout ${e}`,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:()=>null,isChangeRequestReference:()=>!1,changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>x(F,e,t),canReadChangeRequestOnHost:(e,t)=>y(F,e,t),isChangeRequestUrl:e=>{try{return P.has(new URL(e).hostname.toLowerCase())&&g(e,`/pulls/`)}catch{return!1}},settings:I}),R=/^gh\s+pr\s+checkout\s+(.+)$/i,z=/^https:\/\/github\.com\/[^/\s]+\/[^/\s]+\/pull\/(\d+)(?:[/?#].*)?$/i,B=c.make(`github`),V=r({account:d(l),enabled:u.pipe(p(o(!0)))}),H=s({hosts:i(f,V).pipe(p(o({})),t({providerSettingsForm:{hidden:!0}})),tokens:i(f,m).pipe(p(o({})),e,t({providerSettingsForm:{hidden:!0}}))}),U=_({kind:B,label:`GitHub`,pickerLabel:`GitHub`,icon:`github`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`owner/repo`,publicHost:`github.com`,publishDescription:`github.com`,publishHost:()=>`github.com`,newRepositoryOwner:e=>({owner:e}),defaultCloneTransport:`https`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/pull/${n}`,changeRequestActions:new Set([`merge`,`ready`,`draft`,`close`,`reopen`,`delete-branch`,`update-branch`,`enable-auto-merge`,`disable-auto-merge`,`revert`,`approve-workflows`]),checkoutCommand:({number:e})=>`gh pr checkout ${e}`,authorProfileUrl:(e,t)=>e.endsWith(`[bot]`)?null:new URL(`/${encodeURIComponent(e)}`,t).toString(),referenceAutolinkRepositoryUrl:e=>e,reviewSummaryRequired:()=>!1,checkoutCommandArgument:e=>R.exec(e)?.[1]?.trim()??null,isChangeRequestReference:e=>z.test(e),changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:e=>n(e,B),isChangeRequestInRepository:(e,t)=>x(B,e,t),canReadChangeRequestOnHost:(e,t)=>y(B,e,t),isChangeRequestUrl:e=>g(e,`/pull/`),settings:H}),W=/^glab\s+mr\s+checkout\s+(.+)$/i,G=/^https:\/\/[^/\s]*gitlab[^/\s]*\/.+\/-\/merge_requests\/(\d+)(?:[/?#].*)?$/i,K=c.make(`gitlab`),q=ee([U,_({kind:K,label:`GitLab`,pickerLabel:`GitLab`,icon:`gitlab`,changeRequest:{shortLabel:`MR`,singular:`merge request`},repositoryPathHint:`group/project`,publicHost:`gitlab.com`,publishDescription:`gitlab.com`,publishHost:()=>`gitlab.com`,newRepositoryOwner:e=>({owner:e}),defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/-/merge_requests/${n}`,changeRequestActions:new Set([`merge`,`ready`,`draft`,`close`,`reopen`,`update-branch`,`enable-auto-merge`,`disable-auto-merge`]),checkoutCommand:({number:e})=>`glab mr checkout ${e}`,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:e=>W.exec(e)?.[1]?.trim()??null,isChangeRequestReference:e=>G.test(e),changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>x(K,e,t),canReadChangeRequestOnHost:(e,t)=>y(K,e,t),isChangeRequestUrl:e=>g(e,`/-/merge_requests/`)}),L,N,ae,C]);function oe(e){return te(H,e.sourceControlHosts.github)}function J(e){if(!e)return null;let t=Date.parse(e);return Number.isFinite(t)?t:null}function Y(...e){for(let t of e){let e=J(t??void 0);if(e!==null)return e}return null}function se(e){if(e.latestUserMessageAt){let t=J(e.latestUserMessageAt);if(t!==null)return t}let t=null;for(let n of e.messages??[]){if(n.role!==`user`)continue;let e=J(n.createdAt);e!==null&&(t=t===null?e:Math.max(t,e))}return t===null?Y(e.updatedAt,e.createdAt)??-1/0:t}function X(e,t){return t===`created_at`?Y(e.createdAt,e.updatedAt)??-1/0:se(e)}function ce(e,t){return e.length<2?[...e]:e.map(e=>({thread:e,timestamp:X(e,t)})).sort((e,t)=>t.timestamp-e.timestamp||(e.thread.id<t.thread.id?1:e.thread.id>t.thread.id?-1:0)).map(({thread:e})=>e)}function le(e,t,n){let r=null,i=-1/0;for(let a of e){if(a.projectId!==t||a.archivedAt!==null)continue;let e=X(a,n);(r===null||e>i||e===i&&a.id>r.id)&&(r=a,i=e)}return r}var Z=`abcdefghijklmnopqrstuvwxyz`;function Q(e){if(e.length===0)return!1;for(let t of e)if(!Z.includes(t))return!1;return e.at(-1)!==Z[0]}function $(e,t){if(t!==``&&e>=t)throw Error(`pinOrderMidpoint: bounds out of order`);if(t!==``){let n=0;for(;(e.charAt(n)||Z[0])===t.charAt(n);)n+=1;if(n>0)return t.slice(0,n)+$(e.slice(n),t.slice(n))}let n=e===``?0:Z.indexOf(e.charAt(0)),r=t===``?26:Z.indexOf(t.charAt(0));return r-n>1?Z.charAt(Math.round((n+r)/2)):t.length>1?t.charAt(0):Z.charAt(n)+$(e.slice(1),``)}function ue(e,t){let n=e??``,r=t??``;return n!==``&&!Q(n)||r!==``&&!Q(r)||r!==``&&n>=r?null:$(n,r)}function de(e){if(e.length<2)return[...e];let t=[],n=[];for(let r of e)(r.pinOrderKey==null?n:t).push(r);let r=(e,t)=>e.id.localeCompare(t.id)||(e.environmentId??``).localeCompare(t.environmentId??``);t.sort((e,t)=>{let n=e.pinOrderKey,i=t.pinOrderKey;return n<i?-1:n>i?1:r(e,t)});let i=new Map(n.map(e=>[e,J(e.createdAt)??0]));return n.sort((e,t)=>i.get(t)-i.get(e)||r(e,t)),[...t,...n]}export{ce as a,q as c,de as i,S as l,X as n,J as o,ue as r,oe as s,le as t};
|
|
2
|
-
//# sourceMappingURL=threadSort-
|
|
1
|
+
import{Eh as e,Gy as t,Jh as n,Ly as r,Ny as i,Qy as a,RS as o,Sh as s,Xh as c,_y as l,by as u,db as d,ph as f,vb as p,vy as m}from"./utils-CRwA5SKO.js";import{pn as h}from"./runtime-Bc4kgQim.js";function g(e,t){try{let n=new URL(e).pathname,r=n.indexOf(t);return r>0&&/^\d+(?:\/|$)/u.test(n.slice(r+t.length))}catch{return!1}}function _(e){return e}function v(e,t){if(t.authority===void 0)return!0;try{let n=new URL(e.locator.remoteUrl);if(n.protocol===`http:`||n.protocol===`https:`)return n.host.toLowerCase()===t.authority}catch{}return!0}function y(e,t,r){if(!v(t,r))return!1;let i=n(t,e);return i===r.host.toLowerCase()||i===r.authority}function b(e){return e.displayName??(e.owner&&e.name?`${e.owner}/${e.name}`:null)}function x(e,t,n){let r=b(t);return r!==null&&r.toLowerCase()===n.repository.toLowerCase()&&y(e,t,n)}var S={kind:c.make(`unknown`),label:`source control`,pickerLabel:`source control`,icon:`change-request`,changeRequest:{shortLabel:`change request`,singular:`change request`},repositoryPathHint:`URL`,publicHost:null,publishDescription:`Your signed-in server`,publishHost:e=>e??`your server`,newRepositoryOwner:()=>null,defaultCloneTransport:`ssh`,changeRequestUrl:()=>null,changeRequestActions:new Set,checkoutCommand:()=>null,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:()=>null,isChangeRequestReference:()=>!1,changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>x(c.make(`unknown`),e,t),canReadChangeRequestOnHost:(e,t)=>y(c.make(`unknown`),e,t),isChangeRequestUrl:()=>!1};function ee(e){let t=new Map;for(let n of e){if(t.has(n.kind))throw Error(`Source control host '${n.kind}' is defined more than once.`);t.set(n.kind,n)}return{definitions:e,get:n=>(n==null?e[0]:t.get(n))??S,find:e=>t.get(e),findByPublicHost:t=>{let n=t.toLowerCase();return e.find(e=>e.publicHost===n)},findByChangeRequestUrl:t=>e.find(e=>e.isChangeRequestUrl(t)),hostLabelForChangeRequestUrl:t=>e.find(e=>e.isChangeRequestUrl(t))?.label??`the host`}}function te(e,t){let n=a(e),r=n(t??{});if(r._tag===`Some`)return r.value;let i=n({});if(i._tag===`Some`)return i.value;throw Error(`A source control host settings schema must decode an empty object.`)}var ne=/^az\s+repos\s+pr\s+checkout\s+(.+)$/i,re=/^https:\/\/(?:dev\.azure\.com\/[^/\s]+\/[^/\s]+|[^/\s]+\.visualstudio\.com\/[^/\s]+)\/_git\/[^/\s]+\/pullrequest\/(\d+)(?:[/?#].*)?$/i;function ie(e){let t=e.trim().split(/\s+/).filter(Boolean);for(let[e,n]of t.entries()){if(n===`--id`||n===`-i`)return t[e+1]??null;if(n.startsWith(`--id=`))return n.slice(5)||null}return t.find(e=>!e.startsWith(`-`))??null}var C=_({kind:c.make(`azure-devops`),label:`Azure DevOps`,pickerLabel:`Azure DevOps`,icon:`azure-devops`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`project/repository`,publicHost:null,publishDescription:`dev.azure.com`,publishHost:()=>`dev.azure.com`,newRepositoryOwner:()=>null,defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${h(`${e}/${t}`.toLowerCase())}/pullrequest/${n}`,changeRequestActions:new Set([`merge`,`ready`,`draft`,`close`,`reopen`,`enable-auto-merge`,`disable-auto-merge`]),checkoutCommand:({number:e})=>`az repos pr checkout --id ${e}`,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:e=>{let t=ne.exec(e)?.[1];return t?ie(t):null},isChangeRequestReference:e=>re.test(e),changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>v(e,t)&&h(e.canonicalKey.toLowerCase())===h(`${t.host}/${t.repository}`.toLowerCase()),canReadChangeRequestOnHost:()=>!1,isChangeRequestUrl:e=>g(e,`/pullrequest/`)}),w=/^[A-Za-z0-9._/@+=,-]+$/,T=/^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+$/,E=c.make(`bitbucket`),D=e=>m.pipe(p(o(``)),t(e)),O=s({accessToken:D({title:`Access token`,description:`Scoped to one repository, project, or workspace. Create it in that item's Bitbucket settings.`,settingsSecret:!0,providerSettingsForm:{control:`password`}}),email:D({title:`Atlassian account email`,description:`With an API token instead of an access token.`,providerSettingsForm:{placeholder:`you@example.com`}}),apiToken:D({title:`API token`,description:`Reaches every repository your Atlassian account can. Give it read and write access to repositories and pull requests, and read:user:bitbucket.`,settingsSecret:!0,providerSettingsForm:{control:`password`}})},{order:[`accessToken`,`email`,`apiToken`]}),ae=_({kind:E,label:`Bitbucket`,pickerLabel:`Bitbucket`,icon:`bitbucket`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`workspace/repository`,publicHost:`bitbucket.org`,publishDescription:`bitbucket.org`,publishHost:()=>`bitbucket.org`,newRepositoryOwner:()=>null,defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/pull-requests/${n}`,changeRequestActions:new Set([`merge`,`close`]),checkoutCommand:({number:e,headBranch:t,headRepositoryNameWithOwner:n})=>n&&T.test(n)&&w.test(t)?`git clone --single-branch --branch ${t} https://bitbucket.org/${n}.git t3code-pr-${e}`:null,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:()=>null,isChangeRequestReference:()=>!1,changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>x(E,e,t),canReadChangeRequestOnHost:(e,t)=>y(E,e,t),isChangeRequestUrl:e=>g(e,`/pull-requests/`),settings:O}),k=/^tea\s+(?:pr|pulls)\s+checkout\s+(.+)$/i,A=/^https?:\/\/[^/\s]+\/(?:[^/\s]+\/)+[^/\s]+\/pulls\/(\d+)(?:[/?#].*)?$/i,j=c.make(`forgejo`);function M(e){if(!e.webUrl)return null;try{let t=new URL(e.webUrl);return t.protocol===`http:`||t.protocol===`https:`?t:null}catch{return null}}var N=_({kind:j,label:`Forgejo`,pickerLabel:`Forgejo / Gitea`,icon:`forgejo`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`owner/repo`,publicHost:null,publishDescription:`Your signed-in server`,publishHost:e=>e??`your server`,newRepositoryOwner:e=>e?{owner:e}:null,defaultCloneTransport:`https`,changeRequestUrl:({host:e,repository:t,number:n,remoteUrl:r,webUrl:i})=>{if(i)return`${i.replace(/\/+$/,``)}/pulls/${n}`;try{let i=new URL(r??``);if((i.protocol===`http:`||i.protocol===`https:`)&&(i.hostname.toLowerCase()===e.toLowerCase()||i.host.toLowerCase()===e.toLowerCase()))return`${i.origin}/${t}/pulls/${n}`}catch{}return`https://${e}/${t}/pulls/${n}`},changeRequestActions:new Set([`merge`,`close`,`reopen`,`update-branch`]),checkoutCommand:({number:e,repositoryUrl:t})=>t?`git fetch '${t.replaceAll(`'`,`'\\''`)}' refs/pull/${e}/head && git checkout -B pulls/${e} FETCH_HEAD`:null,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:e=>e===`request-changes`,checkoutCommandArgument:e=>k.exec(e)?.[1]?.trim()??null,isChangeRequestReference:e=>A.test(e),changeRequestUrlHost:e=>e.host,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>{if(!v(e,t))return!1;let n=M(e);return n?n.host.toLowerCase()===(t.authority??t.host).toLowerCase()&&n.pathname.replace(/^\/+|\/+$/g,``).toLowerCase()===t.repository.toLowerCase():x(j,e,t)},canReadChangeRequestOnHost:(e,t)=>{let n=M(e);if(!n)return y(j,e,t);let r=n.pathname.replace(/^\/+|\/+$/g,``).split(`/`).slice(0,-2).join(`/`);return n.host.toLowerCase()===(t.authority??t.host).toLowerCase()&&(!r||t.repository.toLowerCase().startsWith(`${r.toLowerCase()}/`))},isChangeRequestUrl:e=>g(e,`/pulls/`)}),P=new Set([`git.cafe`,`staging.git.cafe`]),F=c.make(`gitcafe`),I=s({token:m.pipe(e,p(o(``)),t({title:`Token`,description:`A git.cafe token, used before CAFE_TOKEN and the cafe login, so GitCafe works without the CLI signed in.`,providerSettingsForm:{control:`password`}}))}),L=_({kind:F,label:`GitCafe`,pickerLabel:`GitCafe`,icon:`gitcafe`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`owner/repo`,publicHost:null,publishDescription:`git.cafe`,publishHost:()=>`git.cafe`,newRepositoryOwner:e=>e?{owner:e}:null,defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/pulls/${n}`,changeRequestActions:new Set([`ready`,`draft`,`close`,`reopen`,`merge`,`update-branch`]),checkoutCommand:({number:e})=>`cafe pr checkout ${e}`,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:()=>null,isChangeRequestReference:()=>!1,changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>x(F,e,t),canReadChangeRequestOnHost:(e,t)=>y(F,e,t),isChangeRequestUrl:e=>{try{return P.has(new URL(e).hostname.toLowerCase())&&g(e,`/pulls/`)}catch{return!1}},settings:I}),R=/^gh\s+pr\s+checkout\s+(.+)$/i,z=/^https:\/\/github\.com\/[^/\s]+\/[^/\s]+\/pull\/(\d+)(?:[/?#].*)?$/i,B=c.make(`github`),V=r({account:d(l),enabled:u.pipe(p(o(!0)))}),H=s({hosts:i(f,V).pipe(p(o({})),t({providerSettingsForm:{hidden:!0}})),tokens:i(f,m).pipe(p(o({})),e,t({providerSettingsForm:{hidden:!0}}))}),U=_({kind:B,label:`GitHub`,pickerLabel:`GitHub`,icon:`github`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`owner/repo`,publicHost:`github.com`,publishDescription:`github.com`,publishHost:()=>`github.com`,newRepositoryOwner:e=>({owner:e}),defaultCloneTransport:`https`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/pull/${n}`,changeRequestActions:new Set([`merge`,`ready`,`draft`,`close`,`reopen`,`delete-branch`,`update-branch`,`enable-auto-merge`,`disable-auto-merge`,`revert`,`approve-workflows`]),checkoutCommand:({number:e})=>`gh pr checkout ${e}`,authorProfileUrl:(e,t)=>e.endsWith(`[bot]`)?null:new URL(`/${encodeURIComponent(e)}`,t).toString(),referenceAutolinkRepositoryUrl:e=>e,reviewSummaryRequired:()=>!1,checkoutCommandArgument:e=>R.exec(e)?.[1]?.trim()??null,isChangeRequestReference:e=>z.test(e),changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:e=>n(e,B),isChangeRequestInRepository:(e,t)=>x(B,e,t),canReadChangeRequestOnHost:(e,t)=>y(B,e,t),isChangeRequestUrl:e=>g(e,`/pull/`),settings:H}),W=/^glab\s+mr\s+checkout\s+(.+)$/i,G=/^https:\/\/[^/\s]*gitlab[^/\s]*\/.+\/-\/merge_requests\/(\d+)(?:[/?#].*)?$/i,K=c.make(`gitlab`),q=ee([U,_({kind:K,label:`GitLab`,pickerLabel:`GitLab`,icon:`gitlab`,changeRequest:{shortLabel:`MR`,singular:`merge request`},repositoryPathHint:`group/project`,publicHost:`gitlab.com`,publishDescription:`gitlab.com`,publishHost:()=>`gitlab.com`,newRepositoryOwner:e=>({owner:e}),defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/-/merge_requests/${n}`,changeRequestActions:new Set([`merge`,`ready`,`draft`,`close`,`reopen`,`update-branch`,`enable-auto-merge`,`disable-auto-merge`]),checkoutCommand:({number:e})=>`glab mr checkout ${e}`,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:e=>W.exec(e)?.[1]?.trim()??null,isChangeRequestReference:e=>G.test(e),changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>x(K,e,t),canReadChangeRequestOnHost:(e,t)=>y(K,e,t),isChangeRequestUrl:e=>g(e,`/-/merge_requests/`)}),L,N,ae,C]);function oe(e){return te(H,e.sourceControlHosts.github)}function J(e){if(!e)return null;let t=Date.parse(e);return Number.isFinite(t)?t:null}function Y(...e){for(let t of e){let e=J(t??void 0);if(e!==null)return e}return null}function se(e){if(e.latestUserMessageAt){let t=J(e.latestUserMessageAt);if(t!==null)return t}let t=null;for(let n of e.messages??[]){if(n.role!==`user`)continue;let e=J(n.createdAt);e!==null&&(t=t===null?e:Math.max(t,e))}return t===null?Y(e.updatedAt,e.createdAt)??-1/0:t}function X(e,t){return t===`created_at`?Y(e.createdAt,e.updatedAt)??-1/0:se(e)}function ce(e,t){return e.length<2?[...e]:e.map(e=>({thread:e,timestamp:X(e,t)})).sort((e,t)=>t.timestamp-e.timestamp||(e.thread.id<t.thread.id?1:e.thread.id>t.thread.id?-1:0)).map(({thread:e})=>e)}function le(e,t,n){let r=null,i=-1/0;for(let a of e){if(a.projectId!==t||a.archivedAt!==null)continue;let e=X(a,n);(r===null||e>i||e===i&&a.id>r.id)&&(r=a,i=e)}return r}var Z=`abcdefghijklmnopqrstuvwxyz`;function Q(e){if(e.length===0)return!1;for(let t of e)if(!Z.includes(t))return!1;return e.at(-1)!==Z[0]}function $(e,t){if(t!==``&&e>=t)throw Error(`pinOrderMidpoint: bounds out of order`);if(t!==``){let n=0;for(;(e.charAt(n)||Z[0])===t.charAt(n);)n+=1;if(n>0)return t.slice(0,n)+$(e.slice(n),t.slice(n))}let n=e===``?0:Z.indexOf(e.charAt(0)),r=t===``?26:Z.indexOf(t.charAt(0));return r-n>1?Z.charAt(Math.round((n+r)/2)):t.length>1?t.charAt(0):Z.charAt(n)+$(e.slice(1),``)}function ue(e,t){let n=e??``,r=t??``;return n!==``&&!Q(n)||r!==``&&!Q(r)||r!==``&&n>=r?null:$(n,r)}function de(e){if(e.length<2)return[...e];let t=[],n=[];for(let r of e)(r.pinOrderKey==null?n:t).push(r);let r=(e,t)=>e.id.localeCompare(t.id)||(e.environmentId??``).localeCompare(t.environmentId??``);t.sort((e,t)=>{let n=e.pinOrderKey,i=t.pinOrderKey;return n<i?-1:n>i?1:r(e,t)});let i=new Map(n.map(e=>[e,J(e.createdAt)??0]));return n.sort((e,t)=>i.get(t)-i.get(e)||r(e,t)),[...t,...n]}export{ce as a,q as c,de as i,S as l,X as n,J as o,ue as r,oe as s,le as t};
|
|
2
|
+
//# sourceMappingURL=threadSort-DD61dseb.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-oBChb5qS.js";import{$ as i,J as a,a as o,b as s,et as c,nt as l,o as u,x as d}from"./chunk-DU6HZSFF-
|
|
1
|
+
import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-oBChb5qS.js";import{$ as i,J as a,a as o,b as s,et as c,nt as l,o as u,x as d}from"./chunk-DU6HZSFF-zhv2Vnfx.js";import{t as f}from"./arc-DgcGdgmL.js";import{p}from"./chunk-75Z2AOVW-LBmwoUvq.js";import{f as m}from"./mermaid.core-C6GXL70P.js";var h=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,11,13,14,15,17,19,20,23,24],r=[1,12],i=[1,13],a=[1,14],o=[1,15],s=[1,16],c=[1,19],l=[1,20],u={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:`error`,6:`EOF`,7:`timeline`,8:`timeline_lr`,9:`timeline_td`,11:`SPACE`,13:`NEWLINE`,14:`title`,15:`acc_title`,16:`acc_title_value`,17:`acc_descr`,18:`acc_descr_value`,19:`acc_descr_multiline_value`,20:`section`,23:`period`,24:`event`},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:r.setDirection(`LR`);break;case 4:r.setDirection(`TD`);break;case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:case 10:this.$=[];break;case 11:r.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.getCommonDb().setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s],0,``),this.$=a[s];break;case 19:r.addEvent(a[s].substr(2)),this.$=a[s]}},`anonymous`),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(n,[2,5],{5:6}),t(n,[2,2]),t(n,[2,3]),t(n,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,10],{1:[2,1]}),t(n,[2,6]),{12:21,14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,8]),t(n,[2,9]),t(n,[2,11]),{16:[1,22]},{18:[1,23]},t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),t(n,[2,17]),t(n,[2,18]),t(n,[2,19]),t(n,[2,7]),t(n,[2,12]),t(n,[2,13])],defaultActions:{},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`)};u.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()+`
|
|
@@ -118,4 +118,4 @@ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on l
|
|
|
118
118
|
filter: brightness(120%);
|
|
119
119
|
}
|
|
120
120
|
`},`getStyles`)};export{Se as diagram};
|
|
121
|
-
//# sourceMappingURL=timeline-definition-24CTP7MA-
|
|
121
|
+
//# sourceMappingURL=timeline-definition-24CTP7MA-BfIggpP3.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e,n as t}from"./rolldown-runtime-Dd_uD5pT.js";import{r as n}from"./Icon-l19w4AjM.js";import{$i as r,Ap as i,Bi as a,Cd as o,Cm as s,Co as c,D as l,Ea as u,Em as d,Eo as f,Fa as p,Fy as m,Ia as h,Ii as g,Ks as _,ME as v,Md as y,Mf as b,Na as x,Or as S,Qi as C,Ra as w,Sa as T,So as E,Sy as D,Td as O,Ti as k,To as A,Tr as ee,Um as j,Uu as M,_o as N,ai as te,bt as ne,cE as re,ca as P,ga as ie,ia as F,jr as ae,ku as I,la as L,lr as oe,ma as se,oa as R,pa as z,ra as ce,rb as le,sa as ue,sl as de,sr as fe,t as B,ta as V,va as H,vi as pe,vo as U,za as me,zi as he,zy as ge}from"./utils-CRwA5SKO.js";import{jn as _e}from"./runtime-B3_ce0WW.js";import{l as ve}from"./TooltipViewport-Wc_QpRGI.js";import{t as ye}from"./spinner-Bnjv_L8F.js";import{t as be}from"./useParams-DdYFF9g9.js";import{c as xe,f as W,l as Se,u as Ce,y as we}from"./tooltip-924Ikq0L.js";var Te=le(de);function Ee(e){return Te(e)&&e.bootstrapThreadDisposition===`deleted`}function De(e){return Te(e)&&e.bootstrapThreadDisposition===`not-created`}var Oe=[/\bSocketCloseError\b/i,/\bSocketOpenError\b/i,/\bSocket is not connected\b/i,/Unable to connect to the T3 server WebSocket\./i,RegExp(`\\b(?:is not connected|disconnected|stopped responding|could not establish a WebSocket connection)\\.(?: ${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`))(_e)})?$`,`i`),/\bClientProtocolError\b/i,/\bRpcClientError\b/i,/\bping timeout\b/i];function ke(e){if(typeof e!=`string`)return!1;let t=e.trim();return t.length!==0&&Oe.some(e=>e.test(t))}function Ae(e){return ke(e)?null:e??null}var G=e(n()),je=G.createContext(void 0);function Me(){let e=G.useContext(je);if(!e)throw Error(f(73));return e}var Ne=0;function Pe(e){return Ne+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${Ne}`}function Fe(e,t){if(typeof e==`string`)return{description:e};if(typeof e==`function`){let n=e(t);return typeof n==`string`?{description:n}:n}return e}function Ie(e){let t=new Map,n=0,r=0;return e.forEach((e,i)=>{let a=e.transitionStatus===`ending`;t.set(e.id,{value:e,domIndex:i,visibleIndex:a?-1:n,offsetY:r}),r+=e.height||0,a||(n+=1)}),t}var Le=e=>e.toastMetadata,K={toasts:k(e=>e.toasts),isEmpty:k(e=>e.toasts.length===0),toast:k(Le,(e,t)=>e.get(t)?.value),toastIndex:k(Le,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:k(Le,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:k(Le,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:k(e=>e.hovering),focused:k(e=>e.focused),expanded:k(e=>e.hovering||e.focused),expandedOrOutOfFocus:k(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:k(e=>e.prevFocusElement)},Re=class extends pe{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:Ie(e.toasts)},{},K)}setFocused(e){this.set(`focused`,e)}setHovering(e){this.set(`hovering`,e)}setIsWindowFocused(e){this.set(`isWindowFocused`,e)}setPrevFocusElement(e){this.set(`prevFocusElement`,e)}setViewport=e=>{this.set(`viewport`,e)};disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,t={}){let n=K.toastIndex(this.state,e);if(n===-1)return;let r=this.state.toasts[n];t.skipOnRemove||r?.onRemove?.();let i=[...this.state.toasts];i.splice(n,1),this.setToasts(i)}addToast=e=>{let{timeout:t,limit:n}=this.state,r=e.id||Pe(`toast`);if(e.id){let t=K.toast(this.state,e.id);if(t){if(t.transitionStatus===`ending`)this.removeToast(e.id,{skipOnRemove:!0});else{let{id:t,transitionStatus:n,...r}=e;return this.updateToastInternal(e.id,r,{resetTimer:!0,markUpdated:!0}),e.id}}}let i={...e,id:r,updateKey:0,transitionStatus:`starting`},a=[i,...this.state.toasts],o=a.filter(e=>e.transitionStatus!==`ending`);if(o.length>n){let e=o.length-n,t=o.slice(-e),r=new Set(t.map(e=>e.id));this.setToasts(a.map(e=>{let t=r.has(e.id);return e.limited===t?e:{...e,limited:t}}))}else this.setToasts(a.map(e=>e.limited?{...e,limited:!1}:e));let s=i.timeout??t;return i.type!==`loading`&&s>0&&this.scheduleTimer(r,s,()=>this.closeToast(r)),K.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(e,t)=>{this.updateToastInternal(e,t,{markUpdated:!0})};updateToastInternal=(e,t,n={})=>{let{timeout:r,toasts:i}=this.state,a=K.toast(this.state,e)??null;if(!a||a.transitionStatus===`ending`)return;let o={...a,...t,...n.markUpdated&&{updateKey:(a.updateKey??0)+1}};this.setToasts(i.map(t=>t.id===e?o:t));let s=o.timeout??r,c=a?.timeout??r,l=Object.hasOwn(t,`timeout`),u=o.transitionStatus!==`ending`&&o.type!==`loading`&&s>0,d=this.timers.has(e),f=c!==s,p=a?.type===`loading`;if(!u&&d){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e);return}if(u&&(!d||f||l||p||n.resetTimer)){let t=this.timers.get(e);t&&(t.timeout?.clear(),this.timers.delete(e)),this.scheduleTimer(e,s,()=>this.closeToast(e)),K.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=e=>{let t=e===void 0,{limit:n,toasts:r}=this.state,i;if(t)i=r,this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear();else{let t=K.toast(this.state,e);if(!t)return;i=[t];let n=this.timers.get(e);n?.timeout&&(n.timeout.clear(),this.timers.delete(e))}let a=0,o=r.map(r=>{if(t||r.id===e)return{...r,transitionStatus:`ending`,height:0};if(r.transitionStatus===`ending`)return r;let i=a>=n;return a+=1,r.limited===i?r:{...r,limited:i}}),s={toasts:o,toastMetadata:Ie(o)};(t||r.length===1)&&(s.hovering=!1,s.focused=!1),this.update(s),i.forEach(e=>{e.transitionStatus!==`ending`&&e.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,t)=>{let n=Fe(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=Fe(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=Fe(t.error,e);return this.updateToast(r,{...n,type:`error`,timeout:n.timeout}),Promise.reject(e)});return{}.hasOwnProperty.call(t,`setPromise`)&&t.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{if(e.timeout){e.timeout.clear();let t=Date.now()-e.start,n=e.delay-t;e.remaining=n>0?n:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,t)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=z.create(),e.timeout.start(e.remaining,()=>{this.timers.delete(t),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!==`touch`)return;let t=L(e);P(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let r=Date.now(),i=!K.expandedOrOutOfFocus(this.state),a=i?z.create():void 0;a?.start(t,()=>{this.timers.delete(e),n()}),this.timers.set(e,{timeout:a,start:i?r:0,delay:t,remaining:t,callback:n})}setToasts(e){let t={toasts:e,toastMetadata:Ie(e)};e.length===0&&(t.hovering=!1,t.focused=!1),this.update(t)}handleFocusManagement(e){let t=ue(V(this.state.viewport));if(!this.state.viewport||!P(this.state.viewport,t)||!R(t))return;if(e===void 0){this.restoreFocusToPrevElement();return}let n=K.toasts(this.state),r=K.toastIndex(this.state,e),i=null,a=r+1;for(;a<n.length;){if(n[a].transitionStatus!==`ending`){i=n[a];break}a+=1}if(!i)for(a=r-1;a>=0;){if(n[a].transitionStatus!==`ending`){i=n[a];break}--a}i?i.ref?.current?.focus():this.restoreFocusToPrevElement()}},q=e(re()),ze=function(e){let{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,a=A(()=>new Re({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return T(a.disposeEffect),G.useEffect(function(){if(i)return i[` subscribe`](({action:e,options:t})=>{let n=t.id;e===`promise`&&t.promise?a.promiseToast(t.promise,t):e===`update`&&n?a.updateToast(n,t):e===`close`?a.closeToast(n):a.addToast(t)})},[a,i]),a.useSyncedValues({timeout:n,limit:r}),(0,q.jsx)(je.Provider,{value:a,children:t})},Be=function(e){return e.frontmostHeight=`--toast-frontmost-height`,e}({}),Ve=G.forwardRef(function(e,t){let{render:n,className:i,style:a,children:o,...s}=e,c=Me(),l=se(),u=G.useRef(!1),d=G.useRef(!1),f=G.useRef(!1),p=c.useState(`isEmpty`),m=c.useState(`toasts`),h=c.useState(`focused`),g=c.useState(`expanded`),_=c.useState(`prevFocusElement`),v=m[0]?.height??0,y=G.useMemo(()=>m.some(e=>e.transitionStatus===`ending`),[m]),b=G.useMemo(()=>m.filter(e=>e.priority===`high`),[m]);G.useEffect(()=>{let e=c.state.viewport;if(!e)return;function t(t){p||t.key===`F6`&&L(t)!==e&&(t.preventDefault(),c.setPrevFocusElement(ue(V(e))),e?.focus({preventScroll:!0}),c.pauseTimers(),c.setFocused(!0))}let n=w(e);return F(n,`keydown`,t)},[c,p]),G.useEffect(()=>{let e=c.state.viewport;if(!e||p)return;let t=w(e);function n(e){L(e)===t&&(c.setIsWindowFocused(!1),c.pauseTimers())}function r(n){if(n.relatedTarget)return;let r=L(n),i=ue(V(e));(r===t||!P(e,r)||!R(i))&&c.resumeTimers(),l.start(0,()=>c.setIsWindowFocused(!0))}return ce(F(t,`blur`,n,!0),F(t,`focus`,r,!0))},[c,l,p]),G.useEffect(()=>{let e=c.state.viewport;if(!e||p)return;let t=V(e);return F(t,`pointerdown`,c.handleDocumentPointerDown,!0)},[p,c]);function x(e){let t=c.state.viewport;t&&(u.current=!0,e.relatedTarget===t?m[0]?.ref?.current?.focus():c.restoreFocusToPrevElement())}function S(e){e.key===`Tab`&&e.shiftKey&&L(e.nativeEvent)===c.state.viewport&&(e.preventDefault(),c.restoreFocusToPrevElement(),c.resumeTimers())}function T(){let e=c.state.toasts.some(e=>e.transitionStatus===`ending`);c.state.isWindowFocused&&!e&&!f.current&&d.current&&(c.resumeTimers(),c.setHovering(!1),d.current=!1)}G.useEffect(T,[y,c]);function E(){c.pauseTimers(),c.setHovering(!0),d.current=!1}function D(){y||f.current?d.current=!0:(c.resumeTimers(),c.setHovering(!1))}function O(e){e.pointerType===`touch`&&(f.current=!0)}function k(e){e.pointerType===`touch`&&(f.current=!1,T())}function A(){if(u.current){u.current=!1;return}h||R(ue(V(c.state.viewport)))&&(c.setFocused(!0),c.pauseTimers())}function ee(e){h&&!P(c.state.viewport,e.relatedTarget)&&(c.setFocused(!1),c.resumeTimers())}let j={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:E,onMouseMove:E,onMouseLeave:D,onFocus:A,onBlur:ee,onKeyDown:S,onClick:A,onPointerDown:O,onPointerUp:k,onPointerCancel:k},M={expanded:g},N=U(`div`,e,{ref:[t,c.setViewport],state:M,props:[j,{style:{[Be.frontmostHeight]:v?`${v}px`:void 0}},s,{children:(0,q.jsxs)(G.Fragment,{children:[!p&&_&&(0,q.jsx)(C,{onFocus:x}),o,!p&&_&&(0,q.jsx)(C,{onFocus:x})]})}]});return(0,q.jsxs)(G.Fragment,{children:[!p&&_&&(0,q.jsx)(C,{onFocus:x}),N,!h&&b.length>0&&(0,q.jsx)(`div`,{style:r,children:b.map(e=>(0,q.jsxs)(`div`,{role:`alert`,"aria-atomic":!0,children:[(0,q.jsx)(`div`,{children:e.title}),(0,q.jsx)(`div`,{children:e.description})]},e.id))})]})}),He=e(H()),Ue=G.createContext(void 0);function J(){let e=G.useContext(Ue);if(!e)throw Error(f(66));return e}var Y=function(e){return e.index=`--toast-index`,e.offsetY=`--toast-offset-y`,e.height=`--toast-height`,e.swipeMovementX=`--toast-swipe-movement-x`,e.swipeMovementY=`--toast-swipe-movement-y`,e}({});function We(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}function Ge(e){let t=w(e).getComputedStyle(e).transform,n=0,r=0,i=1;if(t&&t!==`none`){let e=t.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(n=t[4],r=t[5],i=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(n=t[12],r=t[13],i=t[0])}}return{x:n,y:r,scale:i}}var Ke={...N,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},qe=40,Je=10,X=.5,Ye=1,Xe=`${g},${he}`,Ze=G.forwardRef(function(e,t){let{toast:n,render:r,className:i,swipeDirection:a=[`down`,`right`],style:o,...s}=e,c=n.positionerProps?.anchor!==void 0,l=[];c||(l=Array.isArray(a)?a:[a]);let u=l.length>0,d=Me(),[f,m]=G.useState(void 0),[g,_]=G.useState(!1),[v,y]=G.useState(!1),[b,x]=G.useState(!1),[S,C]=G.useState({x:0,y:0}),[w,T]=G.useState({x:0,y:0,scale:1}),[E,D]=G.useState(),[O,k]=G.useState(),[A,ee]=G.useState(null),j=G.useRef(null),M=G.useRef({x:0,y:0}),N=G.useRef({x:0,y:0,scale:1}),te=G.useRef(void 0),ne=G.useRef(0),re=G.useRef(!1),I=G.useRef({x:0,y:0}),oe=G.useRef(!1),se=G.useRef({x:0,y:0}),R=G.useRef(null),z=G.useRef(null),ce=d.useState(`toastIndex`,n.id),le=d.useState(`toastVisibleIndex`,n.id),de=d.useState(`toastOffsetY`,n.id),fe=d.useState(`focused`),B=d.useState(`expanded`);ie({open:n.transitionStatus!==`ending`,ref:j,onComplete(){n.transitionStatus===`ending`&&d.removeToast(n.id)}});let H=h((e=!1)=>{let t=j.current;if(!t)return;let r=t.style.height;t.style.height=`auto`;let i=t.offsetHeight;t.style.height=r;function a(){d.updateToastInternal(n.id,{ref:j,height:i,...n.transitionStatus===`starting`?{transitionStatus:void 0}:{}})}e?He.flushSync(a):a()});p(H,[H]);function pe(e){se.current=e,C(e)}p(()=>()=>{z.current?.abort()},[]);function me(e,t){let n=e,r=t;return!l.includes(`left`)&&!l.includes(`right`)?n=e>0?e**X:-(Math.abs(e)**X):(!l.includes(`right`)&&e>0&&(n=e**X),!l.includes(`left`)&&e<0&&(n=-(Math.abs(e)**X))),!l.includes(`up`)&&!l.includes(`down`)?r=t>0?t**X:-(Math.abs(t)**X):(!l.includes(`down`)&&t>0&&(r=t**X),!l.includes(`up`)&&t<0&&(r=-(Math.abs(t)**X))),{x:n,y:r}}let he=h(e=>{if(e.pointerId!==R.current)return;R.current=null,z.current?.abort(),z.current=null,_(!1),y(!1),ee(null);let t=N.current;if(e.type===`pointercancel`||re.current){pe({x:t.x,y:t.y}),m(void 0);return}let r=!1,i=se.current,a=i.x-t.x,o=i.y-t.y,s;for(let e of l){switch(e){case`right`:a>qe&&(r=!0,s=`right`);break;case`left`:a<-40&&(r=!0,s=`left`);break;case`down`:o>qe&&(r=!0,s=`down`);break;case`up`:o<-40&&(r=!0,s=`up`)}if(r)break}r?(m(s),x(!0),d.closeToast(n.id)):(pe({x:t.x,y:t.y}),m(void 0))});function ge(e){if(e.button!==0)return;e.pointerType===`touch`&&d.pauseTimers();let t=L(e.nativeEvent);if(t&&t.closest(`button,a,input,textarea,[role="button"],${Xe}`))return;if(re.current=!1,te.current=void 0,ne.current=0,R.current=e.pointerId,M.current={x:e.clientX,y:e.clientY},I.current=M.current,j.current){let e=Ge(j.current);N.current=e,T(e),pe({x:e.x,y:e.y})}d.setHovering(!0),_(!0),y(!1),ee(null),oe.current=!0;let n=j.current;if(n){z.current?.abort();let t=new AbortController;z.current=t;let r=V(n);r.addEventListener(`pointerup`,he,{signal:t.signal}),r.addEventListener(`pointercancel`,he,{signal:t.signal}),n.setPointerCapture?.(e.pointerId)}}function _e(e){if(e.pointerId!==R.current)return;e.preventDefault(),oe.current&&=(M.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>I.current.y||i>0&&t<I.current.y)&&(I.current={x:I.current.x,y:t}),(r<0&&n>I.current.x||r>0&&n<I.current.x)&&(I.current={x:n,y:I.current.y});let a=n-M.current.x,o=t-M.current.y,s=t-I.current.y,c=n-I.current.x;if(!v&&Math.sqrt(a*a+o*o)>=Ye&&(y(!0),A===null)){let e=l.includes(`left`)||l.includes(`right`),t=l.includes(`up`)||l.includes(`down`);e&&t&&ee(Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`)}let u;if(!te.current)A===`vertical`?o>0?u=`down`:o<0&&(u=`up`):A===`horizontal`?a>0?u=`right`:a<0&&(u=`left`):u=Math.abs(a)>=Math.abs(o)?a>0?`right`:`left`:o>0?`down`:`up`,u&&l.includes(u)&&(te.current=u,ne.current=We(u,a,o),m(u));else{let e=te.current,t=We(e,c,s);t>qe?(re.current=!1,m(e)):!(l.includes(`left`)&&l.includes(`right`))&&!(l.includes(`up`)&&l.includes(`down`))&&ne.current-t>=Je&&(re.current=!0)}let d=me(a,o),f=N.current.x,p=N.current.y;A===`horizontal`?(l.includes(`left`)||l.includes(`right`))&&(f+=d.x):(A===`vertical`||(l.includes(`left`)||l.includes(`right`))&&(f+=d.x),(l.includes(`up`)||l.includes(`down`))&&(p+=d.y)),pe({x:f,y:p})}function ve(e){if(e.key===`Escape`){if(!j.current||!P(j.current,ue(V(j.current))))return;d.closeToast(n.id)}}G.useEffect(()=>{if(!u)return;let e=j.current;if(!e)return;function t(t){P(e,L(t))&&t.preventDefault()}return F(e,`touchmove`,t,{passive:!1})},[u]);function ye(){if(!g&&S.x===w.x&&S.y===w.y&&!b)return{[Y.swipeMovementX]:`0px`,[Y.swipeMovementY]:`0px`};let e=S.x-w.x,t=S.y-w.y;return{transition:g?`none`:void 0,transform:g?`translateX(${S.x}px) translateY(${S.y}px) scale(${w.scale})`:void 0,[Y.swipeMovementX]:`${e}px`,[Y.swipeMovementY]:`${t}px`}}let be=n.priority===`high`,xe={role:be?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":E,"aria-describedby":O,"aria-hidden":be&&!fe?!0:void 0,onPointerDown:u?ge:void 0,onPointerMove:u?_e:void 0,onPointerUp:u?he:void 0,onPointerCancel:u?he:void 0,onKeyDown:ve,inert:ae(n.limited),style:{...ye(),[Y.index]:n.transitionStatus===`ending`?ce:le,[Y.offsetY]:`${de}px`,[Y.height]:n.height?`${n.height}px`:void 0}},W=G.useMemo(()=>({rootRef:j,toast:n,titleId:E,setTitleId:D,descriptionId:O,setDescriptionId:k,swiping:g,swipeDirection:f,recalculateHeight:H,index:ce,visibleIndex:le,expanded:B}),[n,E,O,g,f,H,ce,le,B]),Se={transitionStatus:n.transitionStatus,expanded:B,limited:n.limited||!1,type:n.type,swiping:W.swiping,swipeDirection:W.swipeDirection},Ce=U(`div`,e,{ref:[t,W.rootRef],state:Se,stateAttributesMapping:Ke,props:[xe,s]});return(0,q.jsx)(Ue.Provider,{value:W,children:Ce})}),Qe=G.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{visibleIndex:o,expanded:s,recalculateHeight:c}=J(),l=G.useRef(null);return p(()=>{let e=l.current;if(!e||(c(),typeof ResizeObserver!=`function`||typeof MutationObserver!=`function`))return;let t=new ResizeObserver(()=>c(!0)),n=new MutationObserver(()=>c(!0));return t.observe(e),n.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t.disconnect(),n.disconnect()}},[c]),U(`div`,e,{ref:[t,l],state:{expanded:s,behind:o>0},props:a})}),$e=G.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setDescriptionId:l}=J(),d=o??c.description,f=!!d,m=u(a);p(()=>{if(f)return l(m),()=>{l(void 0)}},[f,m,l]);let h={type:c.type},g=U(`p`,e,{ref:t,state:h,props:{...s,id:m,children:d}});return f?g:null}),et=G.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setTitleId:l}=J(),d=o??c.title,f=!!d,m=u(a);p(()=>{if(f)return l(m),()=>{l(void 0)}},[f,m,l]);let h={type:c.type},g=U(`h2`,e,{ref:t,state:h,props:{...s,id:m,children:d}});return f?g:null}),tt=G.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,c=Me(),{toast:l}=J(),u=c.useState(`expanded`),[d,f]=G.useState(!1),{getButtonProps:p,buttonRef:m}=x({disabled:a,native:o}),h={type:l.type};return U(`button`,e,{ref:[t,m],state:h,props:[{"aria-hidden":!u&&!d,onClick(){c.closeToast(l.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})}),nt=G.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,{toast:c}=J(),l=c.actionProps?.children??s.children,u=!!l,{getButtonProps:d,buttonRef:f}=x({disabled:a,native:o}),p={type:c.type},m=U(`button`,e,{ref:[t,f],state:p,props:[s,c.actionProps,d,{children:l}]});return u?m:null}),rt=ve,it=G.createContext(void 0);function at(){let e=G.useContext(it);if(e===void 0)throw Error(f(84));return e}var ot=G.forwardRef(function(e,t){let{toast:n,...r}=e,i=Me(),o=n.positionerProps??E,{render:s,className:l,anchor:u=o.anchor,positionMethod:d=o.positionMethod??`absolute`,side:f=o.side??`top`,align:p=o.align??`center`,sideOffset:m=o.sideOffset??0,alignOffset:h=o.alignOffset??0,collisionBoundary:g=o.collisionBoundary??`clipping-ancestors`,collisionPadding:_=o.collisionPadding??5,arrowPadding:v=o.arrowPadding??5,sticky:y=o.sticky??!1,disableAnchorTracking:b=o.disableAnchorTracking??!1,collisionAvoidance:x=o.collisionAvoidance??a,style:C,...w}=r,[T,D]=G.useState(null),O=i.useState(`toastIndex`,n.id),k=i.useState(`toastVisibleIndex`,n.id),A=me(u)?u:null,j=te({open:!0,onOpenChange:c,elements:{floating:T,reference:A}}),M=S({anchor:A,positionMethod:d,floatingRootContext:j,mounted:!0,side:f,sideOffset:m,align:p,alignOffset:h,collisionBoundary:g,collisionPadding:_,sticky:y,arrowPadding:v,disableAnchorTracking:b,keepMounted:!0,collisionAvoidance:x}),N=G.useMemo(()=>({side:M.side,align:M.align,anchorHidden:M.anchorHidden}),[M.side,M.align,M.anchorHidden]),ne=ee(e,N,{styles:{...M.positionerStyles,[Y.index]:n.transitionStatus===`ending`?O:k},transitionStatus:n.transitionStatus,props:w,refs:[t,D]});return(0,q.jsx)(it.Provider,{value:M,children:ne})}),st=G.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{arrowRef:o,side:s,align:c,arrowUncentered:l,arrowStyles:u}=at();return U(`div`,e,{state:{side:s,align:c,uncentered:l},ref:[t,o],props:[{style:u,"aria-hidden":!0},a]})});function ct(){let e=G.useContext(je);if(!e)throw Error(f(73));let t=e.useState(`toasts`);return G.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function lt(){let e=new Set;function t(t){e.forEach(e=>e(t))}return{" subscribe":function(t){return e.add(t),()=>{e.delete(t)}},add(e){let n=e.id||Pe(`toast`);return t({action:`add`,options:{...e,id:n,transitionStatus:`starting`}}),n},close(e){t({action:`close`,options:{id:e}})},update(e,n){t({action:`update`,options:{...n,id:e}})},promise(e,n){let r=e;return t({action:`promise`,options:{...n,promise:e,setPromise(e){r=e}}}),r}}}var ut=t({Action:()=>nt,Arrow:()=>st,Close:()=>tt,Content:()=>Qe,Description:()=>$e,Portal:()=>rt,Positioner:()=>ot,Provider:()=>ze,Root:()=>Ze,Title:()=>et,Viewport:()=>Ve,createToastManager:()=>lt,useToastManager:()=>ct});function dt(){let e=[],t=0,n=new Set,r=new Map,i=new Map,a=new Map,o=new Map,s=new Set,c=()=>n.forEach(e=>e()),l=e=>{clearTimeout(r.get(e)),r.delete(e);let t=a.get(e);t!==void 0&&(i.set(e,Math.max(0,(i.get(e)??0)-(Date.now()-t))),a.delete(e))},u=t=>{let n=e.find(e=>e.id===t);n&&(l(t),i.delete(t),o.delete(t),e=e.filter(e=>e.id!==t),c(),n.onDismiss?.())},d=e=>{s.size||o.get(e)?.size||r.has(e)||!i.has(e)||(a.set(e,Date.now()),r.set(e,setTimeout(()=>u(e),i.get(e))))},f=n=>{let r=n.id??`notification-${++t}`;l(r);let a={...n,id:r};e=[...e.filter(e=>e.id!==r),a];let o=n.durationMs??8e3;return o>0?i.set(r,o):i.delete(r),d(r),c(),r},p=(e,t)=>{let n=o.get(e)??new Set;n.add(t),o.set(e,n),l(e)},m=(e,t)=>{o.get(e)?.delete(t),d(e)};return{show:f,dismiss:u,pause:p,resume:m,getSnapshot:()=>e,subscribe:e=>(n.add(e),()=>{n.delete(e)}),setPaused:(t,n)=>{n?s.add(t):s.delete(t);for(let t of e)s.size?l(t.id):d(t.id)},performAction:async(t,n)=>{let r=e.find(e=>e.id===t),i=r?.actions?.find(e=>e.id===n);if(!r||!i||r.pendingActionId)return;let a={...r,pendingActionId:n};p(t,`action`),e=e.map(e=>e===r?a:e),c();try{await i.run(),e.includes(a)&&u(t)}catch(t){e.includes(a)&&f({...r,title:i.failureTitle??`Could not complete action`,description:t instanceof Error?t.message:`Please try again.`,tone:`error`})}finally{m(t,`action`)}}}}var Z=dt(),Q=v(),ft={archive:M,clock:y,pin:i,trash:s};function pt(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,G.useEffect)(mt,t),null}function mt(){let e=!0,t=new Set,n=()=>{let n=Z.getSnapshot();for(let e of t)n.some(t=>t.id===e)||(t.delete(e),$.close(`shared:${e}`));for(let r of n){let n=r.icon&&r.tone!==`error`?ft[r.icon]:null,i=r.actions??[],a=i.find(gt),o=e=>({children:e.label,disabled:!!r.pendingActionId,onClick:()=>{Z.performAction(r.id,e.id)}}),s={title:r.title,description:r.description??null,type:r.tone??`info`,timeout:0,onClose:()=>{e&&Z.getSnapshot().includes(r)&&Z.dismiss(r.id)},actionProps:{children:null},data:{sharedToastId:r.id,leadingIcon:n?(0,q.jsx)(n,{className:`size-4`}):void 0,additionalActions:i.filter(e=>e!==a).map(e=>({id:e.id,props:o(e)})),...a?{secondaryActionProps:o(a)}:{},secondaryActionVariant:`soft`,hideCopyButton:!0}};t.has(r.id)?$.update(`shared:${r.id}`,s):(t.add(r.id),$.add({...s,id:`shared:${r.id}`}))}},r=Z.subscribe(n),i=ht;return document.addEventListener(`visibilitychange`,i),i(),n(),()=>{e=!1,r(),document.removeEventListener(`visibilitychange`,i),Z.setPaused(`web-hidden`,!1);for(let e of t)$.close(`shared:${e}`)}}function ht(){return Z.setPaused(`web-hidden`,document.hidden)}function gt(e){return e.primary}var _t=class extends ge()(`ClipboardApiUnavailableError`,{target:m}){get message(){return`Clipboard API is unavailable while copying ${this.target}.`}},vt=class extends ge()(`ClipboardWriteError`,{target:m,cause:D()}){get message(){return`Failed to copy ${this.target} to the clipboard.`}},yt=class extends ge()(`ClipboardReadUnavailableError`,{target:m}){get message(){return`Clipboard API is unavailable while reading ${this.target}.`}},bt=class extends ge()(`ClipboardReadError`,{target:m,cause:D()}){get message(){return`Failed to read ${this.target} from the clipboard.`}};function xt(e,t){if(typeof document>`u`||typeof document.execCommand!=`function`)return!1;let n=document.createElement(`textarea`);n.value=e,n.setAttribute(`readonly`,``),n.setAttribute(`aria-hidden`,`true`),n.style.position=`fixed`,n.style.top=`0`,n.style.left=`0`,n.style.opacity=`0`,n.style.fontSize=`16px`;let r=document.activeElement,i=n=>{if(t&&n.clipboardData){n.clipboardData.setData(`text/plain`,e);for(let[e,r]of Object.entries(t))n.clipboardData.setData(e,r);n.preventDefault()}};document.body.appendChild(n),n.addEventListener(`copy`,i);try{return n.focus({preventScroll:!0}),n.select(),n.setSelectionRange(0,e.length),document.execCommand(`copy`)}catch{return!1}finally{n.removeEventListener(`copy`,i),n.remove();let e=r?.focus;typeof e==`function`&&e.call(r)}}async function St(e,t=`text`,n){if(typeof window>`u`)throw new _t({target:t});if(!e)return!1;n&&=Object.fromEntries(Object.entries(n).filter(([e])=>e!==`text/plain`));let r=n?.[I];if(r&&(n={...n,"text/html":ne(e,r,n?.[`text/html`])}),typeof navigator>`u`||!navigator.clipboard?.writeText){if(xt(e,n))return!0;throw new _t({target:t})}try{if(n&&typeof ClipboardItem<`u`&&navigator.clipboard.write)try{return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`}),...Object.fromEntries(Object.entries(n).map(([e,t])=>[e,new Blob([t],{type:e})]))})]),!0}catch{let t=n[`text/html`];if(t)try{return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`}),"text/html":new Blob([t],{type:`text/html`})})]),!0}catch{}}return await navigator.clipboard.writeText(e),!0}catch(e){throw new vt({target:t,cause:e})}}async function Ct(e=`text`){if(typeof window>`u`||typeof navigator>`u`||!navigator.clipboard?.readText)throw new yt({target:e});try{return await navigator.clipboard.readText()}catch(t){throw new bt({target:e,cause:t})}}function wt({timeout:e=2e3,target:t=`text`,onCopy:n,onError:r,extraFlavors:i}={}){let[a,o]=G.useState(!1),s=G.useRef(null),c=G.useRef(n),l=G.useRef(r),u=G.useRef(t),d=G.useRef(e);c.current=n,l.current=r;let f=G.useRef(i);u.current=t,d.current=e,f.current=i;let p=G.useCallback((e,t)=>{St(e,u.current,f.current).then(e=>{e&&(s.current&&clearTimeout(s.current),o(!0),c.current?.(t),d.current!==0&&(s.current=setTimeout(()=>{o(!1),s.current=null},d.current)))},e=>{console.error(e),l.current?.(e,t)})},[]);return G.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),{copyToClipboard:p,isCopied:a}}function Tt(e){return e===`live`}function Et(e){return e.draftThreadExists||e.serverThreadExists&&!e.serverThreadDeleted?`ready`:e.bootstrapComplete?`missing`:`loading`}function Dt(e){return{environmentId:e.environmentId,threadId:e.threadId}}function Ot(e){return{draftId:e}}function kt(e){return!e.environmentId||!e.threadId?null:_(e.environmentId,e.threadId)}function At(e){return e.environmentId&&e.threadId?{kind:`server`,threadRef:_(e.environmentId,e.threadId)}:e.draftId?{kind:`draft`,draftId:e.draftId}:null}function jt(e,t){return e?.kind===`server`?e.threadRef:e?.kind!==`draft`||!t?.promotedTo?null:t.promotedTo}function Mt(e){if(typeof e!=`object`||!e||!(`children`in e))return!1;let t=e.children;return t!=null&&t!==!1&&t!==``}function Nt(e,t){return t<=1?!1:e>0}function Pt(e){let t=0,n=0,r=0,i=0,a=e.map(e=>{let a=Ft(e.height);if(e.transitionStatus===`ending`){let r={toast:e,visibleIndex:t,offsetY:n};return n+=a,t+=1,r}let o={toast:e,visibleIndex:r,offsetY:i};return n+=a,t+=1,i+=a,r+=1,o});return{frontmostHeight:Ft(e.find(e=>e.transitionStatus!==`ending`)?.height),items:a}}function Ft(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:0}function It(e,t){if(e?.threadRef)return t!==null&&e.threadRef.environmentId===t.environmentId&&e.threadRef.threadId===t.threadId;let n=e?.threadId;return!n||t?.threadId===n}var $=lt(),Lt=lt(),Rt=new Map,zt={error:o,info:b,loading:ye,success:O,warning:d},Bt=180;function Vt(e,t){if(e===`error`&&typeof t==`string`&&!(t.length<Bt))return`line-clamp-4`}var Ht=`absolute z-20 -top-1.5 -right-1.5`,Ut=B(`inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-full border border-border/60 bg-popover/92 text-muted-foreground shadow-sm outline-none backdrop-blur-sm`,`transition-[color,background-color,box-shadow] hover:bg-popover hover:text-foreground`,`focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`);function Wt(e,t,n){n?.(),e.close(t)}function Gt(e){let t=(0,Q.c)(13),{text:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={target:`error-message`},t[0]=r):r=t[0];let{copyToClipboard:i,isCopied:a}=wt(r),o=a?`Copied error`:`Copy error`,s;t[1]!==i||t[2]!==n?(s=()=>i(n),t[1]=i,t[2]=n,t[3]=s):s=t[3];let c=a&&`text-success`,l;t[4]===c?l=t[5]:(l=B(`size-3`,c),t[4]=c,t[5]=l);let u=a?Se:we,d;t[6]!==l||t[7]!==u?(d=(0,q.jsx)(xe,{className:l,icon:u}),t[6]=l,t[7]=u,t[8]=d):d=t[8];let f;return t[9]!==o||t[10]!==s||t[11]!==d?(f=(0,q.jsx)(fe,{size:`icon-micro`,variant:`ghost-muted`,"aria-label":o,className:`[--control-icon-color:currentColor] rounded-md text-muted-foreground/80 hover:bg-transparent hover:text-muted-foreground`,onClick:s,children:d}),t[9]=o,t[10]=s,t[11]=d,t[12]=f):f=t[12],f}var Kt=`mt-2 max-h-40 min-h-0 overflow-y-auto overscroll-contain pr-0.5 select-text`;function qt(e){let t=(0,Q.c)(13),{children:n,labels:r}=e,[i,a]=(0,G.useState)(!1),o=r.expand??`Show details`,s=r.collapse??`Hide details`,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>a(Jt),t[0]=c):c=t[0];let l=i?W:Ce,u;t[1]===l?u=t[2]:(u=(0,q.jsx)(xe,{className:`size-3.5 shrink-0 opacity-80`,icon:l,strokeWidth:2.25}),t[1]=l,t[2]=u);let d=i?s:o,f;t[3]!==i||t[4]!==u||t[5]!==d?(f=(0,q.jsxs)(`button`,{"aria-expanded":i,className:`inline-flex cursor-pointer items-center gap-1 rounded-md py-0.5 text-left text-xs font-medium text-muted-foreground transition-colors hover:text-foreground`,onClick:c,type:`button`,children:[u,d]}),t[3]=i,t[4]=u,t[5]=d,t[6]=f):f=t[6];let p;t[7]!==n||t[8]!==i?(p=i?(0,q.jsx)(`div`,{className:Kt,children:n}):null,t[7]=n,t[8]=i,t[9]=p):p=t[9];let m;return t[10]!==f||t[11]!==p?(m=(0,q.jsxs)(`div`,{className:`min-w-0`,children:[f,p]}),t[10]=f,t[11]=p,t[12]=m):m=t[12],m}function Jt(e){return!e}function Yt(e){let t=(0,Q.c)(36),{toastData:n,toastDescription:r,toastType:i}=e,a=n?.expandableContent,o;t[0]===n?.expandableLabels?o=t[1]:(o=n?.expandableLabels??{},t[0]=n?.expandableLabels,t[1]=o);let s=o,c=n?.expandableDescriptionTrigger??!1,l;t[2]!==r||t[3]!==i?(l=B(`min-w-0 select-text wrap-break-word text-muted-foreground`,Vt(i,r)),t[2]=r,t[3]=i,t[4]=l):l=t[4];let u=l,[d,f]=(0,G.useState)(!1);if(!a){let e;return t[5]===u?e=t[6]:(e=(0,q.jsx)($e,{className:u,"data-slot":`toast-description`}),t[5]=u,t[6]=e),e}if(!c){let e;t[7]===u?e=t[8]:(e=(0,q.jsx)($e,{className:u,"data-slot":`toast-description`}),t[7]=u,t[8]=e);let n;t[9]!==a||t[10]!==s?(n=(0,q.jsx)(qt,{labels:s,children:a}),t[9]=a,t[10]=s,t[11]=n):n=t[11];let r;return t[12]!==e||t[13]!==n?(r=(0,q.jsxs)(q.Fragment,{children:[e,n]}),t[12]=e,t[13]=n,t[14]=r):r=t[14],r}let p=s.expand??`Show details`,m=s.collapse??`Hide details`,h;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>f(Xt),t[15]=h):h=t[15];let g=h,_;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),g())},t[16]=_):_=t[16];let v=_,y=d?m:p,b;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(b=B(`group flex min-w-0 w-full cursor-pointer select-none items-start gap-1.5 rounded-sm text-left outline-none ring-offset-background`,`transition-colors hover:bg-muted/40`,`focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`),t[17]=b):b=t[17];let x;t[18]!==r||t[19]!==i?(x=B(`min-w-0 select-none wrap-break-word text-muted-foreground`,Vt(i,r),`underline-offset-2 decoration-muted-foreground/60 group-hover:underline`),t[18]=r,t[19]=i,t[20]=x):x=t[20];let S;t[21]===x?S=t[22]:(S=(0,q.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,q.jsx)($e,{className:x,"data-slot":`toast-description`})}),t[21]=x,t[22]=S);let C=d?W:Ce,w;t[23]===C?w=t[24]:(w=(0,q.jsx)(xe,{"aria-hidden":!0,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground opacity-80`,icon:C,strokeWidth:2.25}),t[23]=C,t[24]=w);let T;t[25]!==d||t[26]!==w||t[27]!==y||t[28]!==S?(T=(0,q.jsxs)(`div`,{"aria-label":y,"aria-expanded":d,className:b,onClick:g,onKeyDown:v,role:`button`,tabIndex:0,children:[S,w]}),t[25]=d,t[26]=w,t[27]=y,t[28]=S,t[29]=T):T=t[29];let E;t[30]!==a||t[31]!==d?(E=d?(0,q.jsx)(`div`,{className:Kt,children:a}):null,t[30]=a,t[31]=d,t[32]=E):E=t[32];let D;return t[33]!==T||t[34]!==E?(D=(0,q.jsxs)(q.Fragment,{children:[T,E]}),t[33]=T,t[34]=E,t[35]=D):D=t[35],D}function Xt(e){return!e}function Zt(e){let t=e.type?zt[e.type]:null,n=Mt(e.actionProps)&&e.data?.actionLayout===`stacked-end`,r=e.data?.actionVariant??`default`,i=e.data?.secondaryActionVariant??`outline`,a=e.type===`error`&&typeof e.description==`string`&&!e.data?.hideCopyButton?e.description:null,o=(e.data?.additionalActions?.length??0)>0,s=e.data?.secondaryActionProps!==void 0,c=a!==null||Mt(e.actionProps)||o||s;return{Icon:t,stackedActionLayout:n,actionVariant:r,secondaryActionVariant:i,copyErrorText:a,hasTrailingControls:c,inlineContentEndPad:c?`pr-6`:`pr-10`}}function Qt(e){let t=(0,Q.c)(38),{stackedActionLayout:n,Icon:r,copyErrorText:i,actionProps:a,actionVariant:o,secondaryActionVariant:s,hasTrailingControls:c,toastData:l,toastDescription:u,toastType:d}=e,f;t[0]===l?.additionalActions?f=t[1]:(f=l?.additionalActions??[],t[0]=l?.additionalActions,t[1]=f);let p=f,m=l?.secondaryActionProps,h=l?.leadingIcon,g;t[2]===m?g=t[3]:(g=m??{},t[2]=m,t[3]=g);let _,v;t[4]===g?(_=t[5],v=t[6]):({className:_,...v}=g,t[4]=g,t[5]=_,t[6]=v);let y=n?`pr-5`:`flex-1`,b;t[7]===y?b=t[8]:(b=B(`flex min-h-0 min-w-0 flex-col gap-0.5`,y),t[7]=y,t[8]=b);let x;t[9]!==r||t[10]!==h?(x=h?(0,q.jsx)(`div`,{className:`flex h-lh w-4 shrink-0 items-center justify-center`,"data-slot":`toast-icon`,children:h}):r?(0,q.jsx)(`div`,{className:`[&>svg]:h-lh [&>svg]:w-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,"data-slot":`toast-icon`,children:(0,q.jsx)(r,{className:`in-data-[type=error]:text-destructive in-data-[type=info]:text-info in-data-[type=success]:text-success in-data-[type=warning]:text-warning in-data-[type=loading]:opacity-80`})}):null,t[9]=r,t[10]=h,t[11]=x):x=t[11];let S;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,q.jsx)(et,{className:`min-w-0 wrap-break-word font-medium`,"data-slot":`toast-title`}),t[12]=S):S=t[12];let C;t[13]===x?C=t[14]:(C=(0,q.jsxs)(`div`,{className:`flex min-w-0 gap-2`,children:[x,S]}),t[13]=x,t[14]=C);let w;t[15]!==l||t[16]!==u||t[17]!==d?(w=(0,q.jsx)(Yt,{toastData:l,toastDescription:u,toastType:d}),t[15]=l,t[16]=u,t[17]=d,t[18]=w):w=t[18];let T;t[19]!==b||t[20]!==C||t[21]!==w?(T=(0,q.jsxs)(`div`,{className:b,children:[C,w]}),t[19]=b,t[20]=C,t[21]=w,t[22]=T):T=t[22];let E;t[23]!==a||t[24]!==o||t[25]!==p||t[26]!==i||t[27]!==c||t[28]!==_||t[29]!==m||t[30]!==v||t[31]!==s||t[32]!==n||t[33]!==l?.sharedToastId?(E=c?(0,q.jsxs)(`div`,{className:B(`flex items-center gap-1.5`,n?`w-full justify-end`:`shrink-0`),children:[i===null?null:(0,q.jsx)(Gt,{text:i}),p.map(e=>{let{id:t,props:n}=e,{className:r,...i}=n;return(0,G.createElement)(fe,{...i,className:r,key:t,size:`xs`,type:`button`,variant:s})}),m?(0,q.jsx)(fe,{...v,className:_,size:`xs`,type:`button`,variant:l?.sharedToastId?`solid-neutral`:s}):null,Mt(a)?(0,q.jsx)(nt,{className:B(oe({size:`xs`,variant:o}),`shrink-0`),"data-slot":`toast-action`,children:a?.children}):null]}):null,t[23]=a,t[24]=o,t[25]=p,t[26]=i,t[27]=c,t[28]=_,t[29]=m,t[30]=v,t[31]=s,t[32]=n,t[33]=l?.sharedToastId,t[34]=E):E=t[34];let D;return t[35]!==E||t[36]!==T?(D=(0,q.jsxs)(q.Fragment,{children:[T,E]}),t[35]=E,t[36]=T,t[37]=D):D=t[37],D}function $t(){let e=(0,Q.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={strict:!1,select:en},e[0]=t):t=e[0];let n=be(t),r;e[1]===n?r=e[2]:(r=e=>n?.kind===`draft`?e.getDraftSession(n.draftId):null,e[1]=n,e[2]=r);let i=l(r),a;bb0:{if(n?.kind===`server`){a=n.threadRef;break bb0}if(n?.kind===`draft`&&i){let t;e[3]!==i.environmentId||e[4]!==i.threadId?(t={environmentId:i.environmentId,threadId:i.threadId},e[3]=i.environmentId,e[4]=i.threadId,e[5]=t):t=e[5],a=t;break bb0}a=null}return a}function en(e){return At(e)}function tn(e){let t=(0,Q.c)(4),{toastId:n,dismissAfterVisibleMs:r}=e,i,a;return t[0]!==r||t[1]!==n?(i=()=>{if(!r||r<=0||typeof window>`u`||typeof document>`u`)return;let e=Rt.get(n)??r,t=null,i=null,a=!1,o=()=>{i!==null&&(window.clearTimeout(i),i=null)},s=()=>{a||(a=!0,Rt.delete(n),$.close(n))},c=()=>{t!==null&&(e=Math.max(0,e-(Date.now()-t)),t=null,o(),Rt.set(n,e))},l=()=>{if(!(a||t!==null)){if(e<=0){s();return}t=Date.now(),o(),i=window.setTimeout(()=>{e=0,t=null,s()},e)}},u=()=>{if(document.visibilityState===`visible`&&document.hasFocus()){l();return}c()};return u(),document.addEventListener(`visibilitychange`,u),window.addEventListener(`focus`,u),window.addEventListener(`blur`,u),()=>{document.removeEventListener(`visibilitychange`,u),window.removeEventListener(`focus`,u),window.removeEventListener(`blur`,u),c(),o()}},a=[r,n],t[0]=r,t[1]=n,t[2]=i,t[3]=a):(i=t[2],a=t[3]),(0,G.useEffect)(i,a),null}function nn(e){let t=(0,Q.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({children:n,position:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`top-center`:i,o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,q.jsx)(pt,{}),t[4]=o):o=t[4];let s;t[5]===a?s=t[6]:(s=(0,q.jsx)(rn,{position:a}),t[5]=a,t[6]=s);let c;return t[7]!==n||t[8]!==r||t[9]!==s?(c=(0,q.jsxs)(ze,{toastManager:$,...r,children:[o,n,s]}),t[7]=n,t[8]=r,t[9]=s,t[10]=c):c=t[10],c}function rn(e){let t=(0,Q.c)(19),{position:n}=e,{toasts:r}=ct(),i=$t(),a;t[0]===n?a=t[1]:(a=n.startsWith(`top`),t[0]=n,t[1]=a);let o=a,s;t[2]===i?s=t[3]:(s=e=>It(e.data,i),t[2]=i,t[3]=s);let c=Pt(r.filter(s)),l,u;t[4]===r?(l=t[5],u=t[6]):(l=()=>{let e=new Set(r.map(an));for(let t of Rt.keys())e.has(t)||Rt.delete(t)},u=[r],t[4]=r,t[5]=l,t[6]=u),(0,G.useEffect)(l,u);let d=ut,f=ut,p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=B(`fixed z-100 mx-auto flex w-[calc(100%-var(--toast-inset)*2)] max-w-90 [--toast-header-offset:var(--workspace-topbar-height)] [--toast-inset:--spacing(4)] sm:[--toast-inset:--spacing(8)]`,`data-[position*=top]:top-[calc(var(--toast-inset)+var(--toast-header-offset))]`,`data-[position*=bottom]:bottom-(--toast-inset)`,`data-[position*=left]:left-(--toast-inset)`,`data-[position*=right]:right-(--toast-inset)`,`data-[position*=center]:-translate-x-1/2 data-[position*=center]:left-1/2`),t[7]=p):p=t[7];let m=`${c.frontmostHeight}px`,h;t[8]===m?h=t[9]:(h={"--toast-frontmost-height":m},t[8]=m,t[9]=h);let g=h,_=c.items.map(e=>{let{toast:t,visibleIndex:r,offsetY:i}=e,a=Nt(r,c.items.length),s=Zt(t),{stackedActionLayout:l,inlineContentEndPad:u}=s;return(0,q.jsxs)(Ze,{className:B(`dropdown-glass absolute z-[calc(9999-var(--toast-index))] w-full overflow-visible select-none rounded-xl text-popover-foreground shadow-lg shadow-black/10 [transition:transform_.5s_cubic-bezier(.22,1,.36,1),opacity_.5s,height_.15s] motion-reduce:transition-none`,`data-[position*=right]:right-0 data-[position*=right]:left-auto`,`data-[position*=left]:right-auto data-[position*=left]:left-0`,`data-[position*=center]:right-0 data-[position*=center]:left-0`,`data-[position*=top]:top-0 data-[position*=top]:bottom-auto data-[position*=top]:origin-top`,`data-[position*=bottom]:top-auto data-[position*=bottom]:bottom-0 data-[position*=bottom]:origin-bottom`,`after:absolute after:left-0 after:h-[calc(var(--toast-gap)+1px)] after:w-full`,`data-[position*=top]:after:top-full`,`data-[position*=bottom]:after:bottom-full`,r>0?`not-data-expanded:[--toast-calc-height:var(--toast-frontmost-height)] data-expanded:[--toast-calc-height:max(var(--toast-frontmost-height,var(--toast-height)),var(--toast-height))]`:`[--toast-calc-height:max(var(--toast-frontmost-height,var(--toast-height)),var(--toast-height))]`,`[--toast-gap:--spacing(3)] [--toast-peek:--spacing(3)] [--toast-scale:calc(max(0,1-(var(--toast-index)*.1)))] [--toast-shrink:calc(1-var(--toast-scale))]`,r>0?`not-data-expanded:h-(--toast-calc-height) data-expanded:h-auto`:`h-auto`,`data-[position*=top]:[--toast-calc-offset-y:calc(var(--toast-offset-y)+var(--toast-index)*var(--toast-gap)+var(--toast-swipe-movement-y))]`,`data-[position*=bottom]:[--toast-calc-offset-y:calc(var(--toast-offset-y)*-1+var(--toast-index)*var(--toast-gap)*-1+var(--toast-swipe-movement-y))]`,`data-[position*=top]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)+(var(--toast-index)*var(--toast-peek))+(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]`,`data-[position*=bottom]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--toast-peek))-(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]`,`data-limited:opacity-0`,`data-position:data-expanded:transform-[translateX(var(--toast-swipe-movement-x))_translateY(var(--toast-calc-offset-y))]`,`data-[position*=top]:data-starting-style:transform-[translateY(calc(-100%-var(--toast-inset)))]`,`data-[position*=bottom]:data-starting-style:transform-[translateY(calc(100%+var(--toast-inset)))]`,`data-[position*=top]:data-[position*=right]:data-starting-style:transform-[translateX(calc(100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:opacity-0`,`data-ending-style:not-data-limited:not-data-swipe-direction:transform-[translateY(calc(var(--toast-calc-offset-y)-100%-var(--toast-inset)))]`,`data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]`,`data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]`,`data-expanded:data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-expanded:data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-expanded:data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]`,`data-expanded:data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]`),"data-position":n,onPointerEnter:()=>{t.data?.sharedToastId&&Z.pause(t.data.sharedToastId,`pointer`)},onPointerLeave:()=>{t.data?.sharedToastId&&Z.resume(t.data.sharedToastId,`pointer`)},onFocusCapture:()=>{t.data?.sharedToastId&&Z.pause(t.data.sharedToastId,`focus`)},onBlurCapture:e=>{t.data?.sharedToastId&&!e.currentTarget.contains(e.relatedTarget)&&Z.resume(t.data.sharedToastId,`focus`)},style:{"--toast-index":r,"--toast-offset-y":`${i}px`},swipeDirection:n.includes(`center`)?[o?`up`:`down`]:n.includes(`left`)?[`left`,o?`up`:`down`]:[`right`,o?`up`:`down`],toast:t,children:[(0,q.jsx)(tn,{dismissAfterVisibleMs:t.data?.dismissAfterVisibleMs,toastId:t.id}),!t.data?.sharedToastId&&(0,q.jsx)(`div`,{className:Ht,children:(0,q.jsx)(`button`,{"aria-label":`Dismiss notification`,className:Ut,"data-slot":`toast-close`,onClick:()=>Wt($,t.id,t.data?.onClose),type:`button`,children:(0,q.jsx)(j,{className:`size-3`,strokeWidth:2.25})})}),(0,q.jsxs)(Qe,{className:B(`pointer-events-auto min-h-0 overflow-y-visible pl-3.5 text-sm transition-opacity duration-250 [overflow-x:clip] data-expanded:opacity-100`,l?`flex flex-col gap-2 py-2.5 pr-3.5`:B(`py-3`,`flex items-center justify-between gap-2`,t.data?.sharedToastId?`pr-2`:u),a&&`not-data-expanded:pointer-events-none not-data-expanded:opacity-0`),children:[(0,q.jsx)(Qt,{...s,actionProps:t.actionProps,toastData:t.data,toastDescription:t.description,toastType:t.type}),t.data?.sharedToastId&&(0,q.jsx)(fe,{size:`icon-xs`,variant:`ghost`,"aria-label":`Dismiss notification`,onClick:()=>Z.dismiss(t.data.sharedToastId),children:(0,q.jsx)(j,{})})]})]},t.id)}),v;t[10]!==n||t[11]!==g||t[12]!==_||t[13]!==f.Viewport||t[14]!==p?(v=(0,q.jsx)(f.Viewport,{className:p,"data-position":n,"data-slot":`toast-viewport`,style:g,children:_}),t[10]=n,t[11]=g,t[12]=_,t[13]=f.Viewport,t[14]=p,t[15]=v):v=t[15];let y;return t[16]!==v||t[17]!==d.Portal?(y=(0,q.jsx)(d.Portal,{"data-slot":`toast-portal`,children:v}),t[16]=v,t[17]=d.Portal,t[18]=y):y=t[18],y}function an(e){return e.id}function on(e){let t=(0,Q.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):({children:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,q.jsx)(sn,{}),t[3]=i):i=t[3];let a;return t[4]!==n||t[5]!==r?(a=(0,q.jsxs)(ze,{toastManager:Lt,...r,children:[n,i]}),t[4]=n,t[5]=r,t[6]=a):a=t[6],a}function sn(){let e=(0,Q.c)(7),{toasts:t}=ct(),n=$t(),r;if(e[0]!==n||e[1]!==t){let i;e[3]===n?i=e[4]:(i=e=>It(e.data,n),e[3]=n,e[4]=i),r=t.filter(i).map(cn),e[0]=n,e[1]=t,e[2]=r}else r=e[2];let i;return e[5]===r?i=e[6]:(i=(0,q.jsx)(rt,{"data-slot":`toast-portal-anchored`,children:(0,q.jsx)(Ve,{className:`outline-none`,"data-slot":`toast-viewport-anchored`,children:r})}),e[5]=r,e[6]=i),i}function cn(e){let t=e.data?.tooltipStyle??!1,n=e.positionerProps,r=Zt(e),{stackedActionLayout:i,inlineContentEndPad:a}=r;return n?.anchor?(0,q.jsx)(ot,{className:`z-100 max-w-[min(--spacing(64),var(--available-width))]`,"data-slot":`toast-positioner`,sideOffset:n.sideOffset??4,toast:e,children:(0,q.jsx)(Ze,{className:B(`dropdown-glass relative overflow-visible text-balance text-popover-foreground text-xs shadow-xl shadow-black/25 transition-[scale,opacity] data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0`,t?`rounded-md`:`rounded-lg`),"data-slot":`toast-popup`,toast:e,children:t?(0,q.jsx)(Qe,{className:`pointer-events-auto px-2 py-1`,children:(0,q.jsx)(et,{"data-slot":`toast-title`})}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:Ht,children:(0,q.jsx)(`button`,{"aria-label":`Dismiss notification`,className:Ut,"data-slot":`toast-close`,onClick:()=>Wt(Lt,e.id,e.data?.onClose),type:`button`,children:(0,q.jsx)(j,{className:`size-3`,strokeWidth:2.25})})}),(0,q.jsx)(Qe,{className:B(`pointer-events-auto min-h-0 overflow-y-visible pl-3.5 text-sm [overflow-x:clip]`,i?`flex flex-col gap-2 py-2.5 pr-3.5`:B(`py-3`,`flex items-center justify-between gap-1.5`,a)),children:(0,q.jsx)(Qt,{...r,actionProps:e.actionProps,toastData:e.data,toastDescription:e.description,toastType:e.type})})]})})},e.id):null}export{Ee as _,Ot as a,jt as c,At as d,Ct as f,Ae as g,Z as h,$ as i,kt as l,St as m,nn as n,Dt as o,wt as p,Lt as r,Tt as s,on as t,Et as u,De as v};
|
|
2
|
-
//# sourceMappingURL=toast-
|
|
1
|
+
import{i as e,n as t}from"./rolldown-runtime-Dd_uD5pT.js";import{r as n}from"./Icon-l19w4AjM.js";import{$i as r,Ap as i,Bi as a,Cd as o,Cm as s,Co as c,D as l,Ea as u,Em as d,Eo as f,Fa as p,Fy as m,Ia as h,Ii as g,Ks as _,ME as v,Md as y,Mf as b,Na as x,Or as S,Qi as C,Ra as w,Sa as T,So as E,Sy as D,Td as O,Ti as k,To as A,Tr as ee,Um as j,Uu as M,_o as N,ai as te,bt as ne,cE as re,ca as P,ga as ie,ia as F,jr as ae,ku as I,la as L,lr as oe,ma as se,oa as R,pa as z,ra as ce,rb as le,sa as ue,sl as de,sr as fe,t as B,ta as V,va as H,vi as pe,vo as U,za as me,zi as he,zy as ge}from"./utils-CRwA5SKO.js";import{jn as _e}from"./runtime-DZfpb67Q.js";import{l as ve}from"./TooltipViewport-Wc_QpRGI.js";import{t as ye}from"./spinner-Bnjv_L8F.js";import{t as be}from"./useParams-DdYFF9g9.js";import{c as xe,f as W,l as Se,u as Ce,y as we}from"./tooltip-924Ikq0L.js";var Te=le(de);function Ee(e){return Te(e)&&e.bootstrapThreadDisposition===`deleted`}function De(e){return Te(e)&&e.bootstrapThreadDisposition===`not-created`}var Oe=[/\bSocketCloseError\b/i,/\bSocketOpenError\b/i,/\bSocket is not connected\b/i,/Unable to connect to the T3 server WebSocket\./i,RegExp(`\\b(?:is not connected|disconnected|stopped responding|could not establish a WebSocket connection)\\.(?: ${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`))(_e)})?$`,`i`),/\bClientProtocolError\b/i,/\bRpcClientError\b/i,/\bping timeout\b/i];function ke(e){if(typeof e!=`string`)return!1;let t=e.trim();return t.length!==0&&Oe.some(e=>e.test(t))}function Ae(e){return ke(e)?null:e??null}var G=e(n()),je=G.createContext(void 0);function Me(){let e=G.useContext(je);if(!e)throw Error(f(73));return e}var Ne=0;function Pe(e){return Ne+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${Ne}`}function Fe(e,t){if(typeof e==`string`)return{description:e};if(typeof e==`function`){let n=e(t);return typeof n==`string`?{description:n}:n}return e}function Ie(e){let t=new Map,n=0,r=0;return e.forEach((e,i)=>{let a=e.transitionStatus===`ending`;t.set(e.id,{value:e,domIndex:i,visibleIndex:a?-1:n,offsetY:r}),r+=e.height||0,a||(n+=1)}),t}var Le=e=>e.toastMetadata,K={toasts:k(e=>e.toasts),isEmpty:k(e=>e.toasts.length===0),toast:k(Le,(e,t)=>e.get(t)?.value),toastIndex:k(Le,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:k(Le,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:k(Le,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:k(e=>e.hovering),focused:k(e=>e.focused),expanded:k(e=>e.hovering||e.focused),expandedOrOutOfFocus:k(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:k(e=>e.prevFocusElement)},Re=class extends pe{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:Ie(e.toasts)},{},K)}setFocused(e){this.set(`focused`,e)}setHovering(e){this.set(`hovering`,e)}setIsWindowFocused(e){this.set(`isWindowFocused`,e)}setPrevFocusElement(e){this.set(`prevFocusElement`,e)}setViewport=e=>{this.set(`viewport`,e)};disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,t={}){let n=K.toastIndex(this.state,e);if(n===-1)return;let r=this.state.toasts[n];t.skipOnRemove||r?.onRemove?.();let i=[...this.state.toasts];i.splice(n,1),this.setToasts(i)}addToast=e=>{let{timeout:t,limit:n}=this.state,r=e.id||Pe(`toast`);if(e.id){let t=K.toast(this.state,e.id);if(t){if(t.transitionStatus===`ending`)this.removeToast(e.id,{skipOnRemove:!0});else{let{id:t,transitionStatus:n,...r}=e;return this.updateToastInternal(e.id,r,{resetTimer:!0,markUpdated:!0}),e.id}}}let i={...e,id:r,updateKey:0,transitionStatus:`starting`},a=[i,...this.state.toasts],o=a.filter(e=>e.transitionStatus!==`ending`);if(o.length>n){let e=o.length-n,t=o.slice(-e),r=new Set(t.map(e=>e.id));this.setToasts(a.map(e=>{let t=r.has(e.id);return e.limited===t?e:{...e,limited:t}}))}else this.setToasts(a.map(e=>e.limited?{...e,limited:!1}:e));let s=i.timeout??t;return i.type!==`loading`&&s>0&&this.scheduleTimer(r,s,()=>this.closeToast(r)),K.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(e,t)=>{this.updateToastInternal(e,t,{markUpdated:!0})};updateToastInternal=(e,t,n={})=>{let{timeout:r,toasts:i}=this.state,a=K.toast(this.state,e)??null;if(!a||a.transitionStatus===`ending`)return;let o={...a,...t,...n.markUpdated&&{updateKey:(a.updateKey??0)+1}};this.setToasts(i.map(t=>t.id===e?o:t));let s=o.timeout??r,c=a?.timeout??r,l=Object.hasOwn(t,`timeout`),u=o.transitionStatus!==`ending`&&o.type!==`loading`&&s>0,d=this.timers.has(e),f=c!==s,p=a?.type===`loading`;if(!u&&d){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e);return}if(u&&(!d||f||l||p||n.resetTimer)){let t=this.timers.get(e);t&&(t.timeout?.clear(),this.timers.delete(e)),this.scheduleTimer(e,s,()=>this.closeToast(e)),K.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=e=>{let t=e===void 0,{limit:n,toasts:r}=this.state,i;if(t)i=r,this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear();else{let t=K.toast(this.state,e);if(!t)return;i=[t];let n=this.timers.get(e);n?.timeout&&(n.timeout.clear(),this.timers.delete(e))}let a=0,o=r.map(r=>{if(t||r.id===e)return{...r,transitionStatus:`ending`,height:0};if(r.transitionStatus===`ending`)return r;let i=a>=n;return a+=1,r.limited===i?r:{...r,limited:i}}),s={toasts:o,toastMetadata:Ie(o)};(t||r.length===1)&&(s.hovering=!1,s.focused=!1),this.update(s),i.forEach(e=>{e.transitionStatus!==`ending`&&e.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,t)=>{let n=Fe(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=Fe(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=Fe(t.error,e);return this.updateToast(r,{...n,type:`error`,timeout:n.timeout}),Promise.reject(e)});return{}.hasOwnProperty.call(t,`setPromise`)&&t.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{if(e.timeout){e.timeout.clear();let t=Date.now()-e.start,n=e.delay-t;e.remaining=n>0?n:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,t)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=z.create(),e.timeout.start(e.remaining,()=>{this.timers.delete(t),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!==`touch`)return;let t=L(e);P(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let r=Date.now(),i=!K.expandedOrOutOfFocus(this.state),a=i?z.create():void 0;a?.start(t,()=>{this.timers.delete(e),n()}),this.timers.set(e,{timeout:a,start:i?r:0,delay:t,remaining:t,callback:n})}setToasts(e){let t={toasts:e,toastMetadata:Ie(e)};e.length===0&&(t.hovering=!1,t.focused=!1),this.update(t)}handleFocusManagement(e){let t=ue(V(this.state.viewport));if(!this.state.viewport||!P(this.state.viewport,t)||!R(t))return;if(e===void 0){this.restoreFocusToPrevElement();return}let n=K.toasts(this.state),r=K.toastIndex(this.state,e),i=null,a=r+1;for(;a<n.length;){if(n[a].transitionStatus!==`ending`){i=n[a];break}a+=1}if(!i)for(a=r-1;a>=0;){if(n[a].transitionStatus!==`ending`){i=n[a];break}--a}i?i.ref?.current?.focus():this.restoreFocusToPrevElement()}},q=e(re()),ze=function(e){let{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,a=A(()=>new Re({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return T(a.disposeEffect),G.useEffect(function(){if(i)return i[` subscribe`](({action:e,options:t})=>{let n=t.id;e===`promise`&&t.promise?a.promiseToast(t.promise,t):e===`update`&&n?a.updateToast(n,t):e===`close`?a.closeToast(n):a.addToast(t)})},[a,i]),a.useSyncedValues({timeout:n,limit:r}),(0,q.jsx)(je.Provider,{value:a,children:t})},Be=function(e){return e.frontmostHeight=`--toast-frontmost-height`,e}({}),Ve=G.forwardRef(function(e,t){let{render:n,className:i,style:a,children:o,...s}=e,c=Me(),l=se(),u=G.useRef(!1),d=G.useRef(!1),f=G.useRef(!1),p=c.useState(`isEmpty`),m=c.useState(`toasts`),h=c.useState(`focused`),g=c.useState(`expanded`),_=c.useState(`prevFocusElement`),v=m[0]?.height??0,y=G.useMemo(()=>m.some(e=>e.transitionStatus===`ending`),[m]),b=G.useMemo(()=>m.filter(e=>e.priority===`high`),[m]);G.useEffect(()=>{let e=c.state.viewport;if(!e)return;function t(t){p||t.key===`F6`&&L(t)!==e&&(t.preventDefault(),c.setPrevFocusElement(ue(V(e))),e?.focus({preventScroll:!0}),c.pauseTimers(),c.setFocused(!0))}let n=w(e);return F(n,`keydown`,t)},[c,p]),G.useEffect(()=>{let e=c.state.viewport;if(!e||p)return;let t=w(e);function n(e){L(e)===t&&(c.setIsWindowFocused(!1),c.pauseTimers())}function r(n){if(n.relatedTarget)return;let r=L(n),i=ue(V(e));(r===t||!P(e,r)||!R(i))&&c.resumeTimers(),l.start(0,()=>c.setIsWindowFocused(!0))}return ce(F(t,`blur`,n,!0),F(t,`focus`,r,!0))},[c,l,p]),G.useEffect(()=>{let e=c.state.viewport;if(!e||p)return;let t=V(e);return F(t,`pointerdown`,c.handleDocumentPointerDown,!0)},[p,c]);function x(e){let t=c.state.viewport;t&&(u.current=!0,e.relatedTarget===t?m[0]?.ref?.current?.focus():c.restoreFocusToPrevElement())}function S(e){e.key===`Tab`&&e.shiftKey&&L(e.nativeEvent)===c.state.viewport&&(e.preventDefault(),c.restoreFocusToPrevElement(),c.resumeTimers())}function T(){let e=c.state.toasts.some(e=>e.transitionStatus===`ending`);c.state.isWindowFocused&&!e&&!f.current&&d.current&&(c.resumeTimers(),c.setHovering(!1),d.current=!1)}G.useEffect(T,[y,c]);function E(){c.pauseTimers(),c.setHovering(!0),d.current=!1}function D(){y||f.current?d.current=!0:(c.resumeTimers(),c.setHovering(!1))}function O(e){e.pointerType===`touch`&&(f.current=!0)}function k(e){e.pointerType===`touch`&&(f.current=!1,T())}function A(){if(u.current){u.current=!1;return}h||R(ue(V(c.state.viewport)))&&(c.setFocused(!0),c.pauseTimers())}function ee(e){h&&!P(c.state.viewport,e.relatedTarget)&&(c.setFocused(!1),c.resumeTimers())}let j={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:E,onMouseMove:E,onMouseLeave:D,onFocus:A,onBlur:ee,onKeyDown:S,onClick:A,onPointerDown:O,onPointerUp:k,onPointerCancel:k},M={expanded:g},N=U(`div`,e,{ref:[t,c.setViewport],state:M,props:[j,{style:{[Be.frontmostHeight]:v?`${v}px`:void 0}},s,{children:(0,q.jsxs)(G.Fragment,{children:[!p&&_&&(0,q.jsx)(C,{onFocus:x}),o,!p&&_&&(0,q.jsx)(C,{onFocus:x})]})}]});return(0,q.jsxs)(G.Fragment,{children:[!p&&_&&(0,q.jsx)(C,{onFocus:x}),N,!h&&b.length>0&&(0,q.jsx)(`div`,{style:r,children:b.map(e=>(0,q.jsxs)(`div`,{role:`alert`,"aria-atomic":!0,children:[(0,q.jsx)(`div`,{children:e.title}),(0,q.jsx)(`div`,{children:e.description})]},e.id))})]})}),He=e(H()),Ue=G.createContext(void 0);function J(){let e=G.useContext(Ue);if(!e)throw Error(f(66));return e}var Y=function(e){return e.index=`--toast-index`,e.offsetY=`--toast-offset-y`,e.height=`--toast-height`,e.swipeMovementX=`--toast-swipe-movement-x`,e.swipeMovementY=`--toast-swipe-movement-y`,e}({});function We(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}function Ge(e){let t=w(e).getComputedStyle(e).transform,n=0,r=0,i=1;if(t&&t!==`none`){let e=t.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(n=t[4],r=t[5],i=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(n=t[12],r=t[13],i=t[0])}}return{x:n,y:r,scale:i}}var Ke={...N,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},qe=40,Je=10,X=.5,Ye=1,Xe=`${g},${he}`,Ze=G.forwardRef(function(e,t){let{toast:n,render:r,className:i,swipeDirection:a=[`down`,`right`],style:o,...s}=e,c=n.positionerProps?.anchor!==void 0,l=[];c||(l=Array.isArray(a)?a:[a]);let u=l.length>0,d=Me(),[f,m]=G.useState(void 0),[g,_]=G.useState(!1),[v,y]=G.useState(!1),[b,x]=G.useState(!1),[S,C]=G.useState({x:0,y:0}),[w,T]=G.useState({x:0,y:0,scale:1}),[E,D]=G.useState(),[O,k]=G.useState(),[A,ee]=G.useState(null),j=G.useRef(null),M=G.useRef({x:0,y:0}),N=G.useRef({x:0,y:0,scale:1}),te=G.useRef(void 0),ne=G.useRef(0),re=G.useRef(!1),I=G.useRef({x:0,y:0}),oe=G.useRef(!1),se=G.useRef({x:0,y:0}),R=G.useRef(null),z=G.useRef(null),ce=d.useState(`toastIndex`,n.id),le=d.useState(`toastVisibleIndex`,n.id),de=d.useState(`toastOffsetY`,n.id),fe=d.useState(`focused`),B=d.useState(`expanded`);ie({open:n.transitionStatus!==`ending`,ref:j,onComplete(){n.transitionStatus===`ending`&&d.removeToast(n.id)}});let H=h((e=!1)=>{let t=j.current;if(!t)return;let r=t.style.height;t.style.height=`auto`;let i=t.offsetHeight;t.style.height=r;function a(){d.updateToastInternal(n.id,{ref:j,height:i,...n.transitionStatus===`starting`?{transitionStatus:void 0}:{}})}e?He.flushSync(a):a()});p(H,[H]);function pe(e){se.current=e,C(e)}p(()=>()=>{z.current?.abort()},[]);function me(e,t){let n=e,r=t;return!l.includes(`left`)&&!l.includes(`right`)?n=e>0?e**X:-(Math.abs(e)**X):(!l.includes(`right`)&&e>0&&(n=e**X),!l.includes(`left`)&&e<0&&(n=-(Math.abs(e)**X))),!l.includes(`up`)&&!l.includes(`down`)?r=t>0?t**X:-(Math.abs(t)**X):(!l.includes(`down`)&&t>0&&(r=t**X),!l.includes(`up`)&&t<0&&(r=-(Math.abs(t)**X))),{x:n,y:r}}let he=h(e=>{if(e.pointerId!==R.current)return;R.current=null,z.current?.abort(),z.current=null,_(!1),y(!1),ee(null);let t=N.current;if(e.type===`pointercancel`||re.current){pe({x:t.x,y:t.y}),m(void 0);return}let r=!1,i=se.current,a=i.x-t.x,o=i.y-t.y,s;for(let e of l){switch(e){case`right`:a>qe&&(r=!0,s=`right`);break;case`left`:a<-40&&(r=!0,s=`left`);break;case`down`:o>qe&&(r=!0,s=`down`);break;case`up`:o<-40&&(r=!0,s=`up`)}if(r)break}r?(m(s),x(!0),d.closeToast(n.id)):(pe({x:t.x,y:t.y}),m(void 0))});function ge(e){if(e.button!==0)return;e.pointerType===`touch`&&d.pauseTimers();let t=L(e.nativeEvent);if(t&&t.closest(`button,a,input,textarea,[role="button"],${Xe}`))return;if(re.current=!1,te.current=void 0,ne.current=0,R.current=e.pointerId,M.current={x:e.clientX,y:e.clientY},I.current=M.current,j.current){let e=Ge(j.current);N.current=e,T(e),pe({x:e.x,y:e.y})}d.setHovering(!0),_(!0),y(!1),ee(null),oe.current=!0;let n=j.current;if(n){z.current?.abort();let t=new AbortController;z.current=t;let r=V(n);r.addEventListener(`pointerup`,he,{signal:t.signal}),r.addEventListener(`pointercancel`,he,{signal:t.signal}),n.setPointerCapture?.(e.pointerId)}}function _e(e){if(e.pointerId!==R.current)return;e.preventDefault(),oe.current&&=(M.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>I.current.y||i>0&&t<I.current.y)&&(I.current={x:I.current.x,y:t}),(r<0&&n>I.current.x||r>0&&n<I.current.x)&&(I.current={x:n,y:I.current.y});let a=n-M.current.x,o=t-M.current.y,s=t-I.current.y,c=n-I.current.x;if(!v&&Math.sqrt(a*a+o*o)>=Ye&&(y(!0),A===null)){let e=l.includes(`left`)||l.includes(`right`),t=l.includes(`up`)||l.includes(`down`);e&&t&&ee(Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`)}let u;if(!te.current)A===`vertical`?o>0?u=`down`:o<0&&(u=`up`):A===`horizontal`?a>0?u=`right`:a<0&&(u=`left`):u=Math.abs(a)>=Math.abs(o)?a>0?`right`:`left`:o>0?`down`:`up`,u&&l.includes(u)&&(te.current=u,ne.current=We(u,a,o),m(u));else{let e=te.current,t=We(e,c,s);t>qe?(re.current=!1,m(e)):!(l.includes(`left`)&&l.includes(`right`))&&!(l.includes(`up`)&&l.includes(`down`))&&ne.current-t>=Je&&(re.current=!0)}let d=me(a,o),f=N.current.x,p=N.current.y;A===`horizontal`?(l.includes(`left`)||l.includes(`right`))&&(f+=d.x):(A===`vertical`||(l.includes(`left`)||l.includes(`right`))&&(f+=d.x),(l.includes(`up`)||l.includes(`down`))&&(p+=d.y)),pe({x:f,y:p})}function ve(e){if(e.key===`Escape`){if(!j.current||!P(j.current,ue(V(j.current))))return;d.closeToast(n.id)}}G.useEffect(()=>{if(!u)return;let e=j.current;if(!e)return;function t(t){P(e,L(t))&&t.preventDefault()}return F(e,`touchmove`,t,{passive:!1})},[u]);function ye(){if(!g&&S.x===w.x&&S.y===w.y&&!b)return{[Y.swipeMovementX]:`0px`,[Y.swipeMovementY]:`0px`};let e=S.x-w.x,t=S.y-w.y;return{transition:g?`none`:void 0,transform:g?`translateX(${S.x}px) translateY(${S.y}px) scale(${w.scale})`:void 0,[Y.swipeMovementX]:`${e}px`,[Y.swipeMovementY]:`${t}px`}}let be=n.priority===`high`,xe={role:be?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":E,"aria-describedby":O,"aria-hidden":be&&!fe?!0:void 0,onPointerDown:u?ge:void 0,onPointerMove:u?_e:void 0,onPointerUp:u?he:void 0,onPointerCancel:u?he:void 0,onKeyDown:ve,inert:ae(n.limited),style:{...ye(),[Y.index]:n.transitionStatus===`ending`?ce:le,[Y.offsetY]:`${de}px`,[Y.height]:n.height?`${n.height}px`:void 0}},W=G.useMemo(()=>({rootRef:j,toast:n,titleId:E,setTitleId:D,descriptionId:O,setDescriptionId:k,swiping:g,swipeDirection:f,recalculateHeight:H,index:ce,visibleIndex:le,expanded:B}),[n,E,O,g,f,H,ce,le,B]),Se={transitionStatus:n.transitionStatus,expanded:B,limited:n.limited||!1,type:n.type,swiping:W.swiping,swipeDirection:W.swipeDirection},Ce=U(`div`,e,{ref:[t,W.rootRef],state:Se,stateAttributesMapping:Ke,props:[xe,s]});return(0,q.jsx)(Ue.Provider,{value:W,children:Ce})}),Qe=G.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{visibleIndex:o,expanded:s,recalculateHeight:c}=J(),l=G.useRef(null);return p(()=>{let e=l.current;if(!e||(c(),typeof ResizeObserver!=`function`||typeof MutationObserver!=`function`))return;let t=new ResizeObserver(()=>c(!0)),n=new MutationObserver(()=>c(!0));return t.observe(e),n.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t.disconnect(),n.disconnect()}},[c]),U(`div`,e,{ref:[t,l],state:{expanded:s,behind:o>0},props:a})}),$e=G.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setDescriptionId:l}=J(),d=o??c.description,f=!!d,m=u(a);p(()=>{if(f)return l(m),()=>{l(void 0)}},[f,m,l]);let h={type:c.type},g=U(`p`,e,{ref:t,state:h,props:{...s,id:m,children:d}});return f?g:null}),et=G.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setTitleId:l}=J(),d=o??c.title,f=!!d,m=u(a);p(()=>{if(f)return l(m),()=>{l(void 0)}},[f,m,l]);let h={type:c.type},g=U(`h2`,e,{ref:t,state:h,props:{...s,id:m,children:d}});return f?g:null}),tt=G.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,c=Me(),{toast:l}=J(),u=c.useState(`expanded`),[d,f]=G.useState(!1),{getButtonProps:p,buttonRef:m}=x({disabled:a,native:o}),h={type:l.type};return U(`button`,e,{ref:[t,m],state:h,props:[{"aria-hidden":!u&&!d,onClick(){c.closeToast(l.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})}),nt=G.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,{toast:c}=J(),l=c.actionProps?.children??s.children,u=!!l,{getButtonProps:d,buttonRef:f}=x({disabled:a,native:o}),p={type:c.type},m=U(`button`,e,{ref:[t,f],state:p,props:[s,c.actionProps,d,{children:l}]});return u?m:null}),rt=ve,it=G.createContext(void 0);function at(){let e=G.useContext(it);if(e===void 0)throw Error(f(84));return e}var ot=G.forwardRef(function(e,t){let{toast:n,...r}=e,i=Me(),o=n.positionerProps??E,{render:s,className:l,anchor:u=o.anchor,positionMethod:d=o.positionMethod??`absolute`,side:f=o.side??`top`,align:p=o.align??`center`,sideOffset:m=o.sideOffset??0,alignOffset:h=o.alignOffset??0,collisionBoundary:g=o.collisionBoundary??`clipping-ancestors`,collisionPadding:_=o.collisionPadding??5,arrowPadding:v=o.arrowPadding??5,sticky:y=o.sticky??!1,disableAnchorTracking:b=o.disableAnchorTracking??!1,collisionAvoidance:x=o.collisionAvoidance??a,style:C,...w}=r,[T,D]=G.useState(null),O=i.useState(`toastIndex`,n.id),k=i.useState(`toastVisibleIndex`,n.id),A=me(u)?u:null,j=te({open:!0,onOpenChange:c,elements:{floating:T,reference:A}}),M=S({anchor:A,positionMethod:d,floatingRootContext:j,mounted:!0,side:f,sideOffset:m,align:p,alignOffset:h,collisionBoundary:g,collisionPadding:_,sticky:y,arrowPadding:v,disableAnchorTracking:b,keepMounted:!0,collisionAvoidance:x}),N=G.useMemo(()=>({side:M.side,align:M.align,anchorHidden:M.anchorHidden}),[M.side,M.align,M.anchorHidden]),ne=ee(e,N,{styles:{...M.positionerStyles,[Y.index]:n.transitionStatus===`ending`?O:k},transitionStatus:n.transitionStatus,props:w,refs:[t,D]});return(0,q.jsx)(it.Provider,{value:M,children:ne})}),st=G.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{arrowRef:o,side:s,align:c,arrowUncentered:l,arrowStyles:u}=at();return U(`div`,e,{state:{side:s,align:c,uncentered:l},ref:[t,o],props:[{style:u,"aria-hidden":!0},a]})});function ct(){let e=G.useContext(je);if(!e)throw Error(f(73));let t=e.useState(`toasts`);return G.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function lt(){let e=new Set;function t(t){e.forEach(e=>e(t))}return{" subscribe":function(t){return e.add(t),()=>{e.delete(t)}},add(e){let n=e.id||Pe(`toast`);return t({action:`add`,options:{...e,id:n,transitionStatus:`starting`}}),n},close(e){t({action:`close`,options:{id:e}})},update(e,n){t({action:`update`,options:{...n,id:e}})},promise(e,n){let r=e;return t({action:`promise`,options:{...n,promise:e,setPromise(e){r=e}}}),r}}}var ut=t({Action:()=>nt,Arrow:()=>st,Close:()=>tt,Content:()=>Qe,Description:()=>$e,Portal:()=>rt,Positioner:()=>ot,Provider:()=>ze,Root:()=>Ze,Title:()=>et,Viewport:()=>Ve,createToastManager:()=>lt,useToastManager:()=>ct});function dt(){let e=[],t=0,n=new Set,r=new Map,i=new Map,a=new Map,o=new Map,s=new Set,c=()=>n.forEach(e=>e()),l=e=>{clearTimeout(r.get(e)),r.delete(e);let t=a.get(e);t!==void 0&&(i.set(e,Math.max(0,(i.get(e)??0)-(Date.now()-t))),a.delete(e))},u=t=>{let n=e.find(e=>e.id===t);n&&(l(t),i.delete(t),o.delete(t),e=e.filter(e=>e.id!==t),c(),n.onDismiss?.())},d=e=>{s.size||o.get(e)?.size||r.has(e)||!i.has(e)||(a.set(e,Date.now()),r.set(e,setTimeout(()=>u(e),i.get(e))))},f=n=>{let r=n.id??`notification-${++t}`;l(r);let a={...n,id:r};e=[...e.filter(e=>e.id!==r),a];let o=n.durationMs??8e3;return o>0?i.set(r,o):i.delete(r),d(r),c(),r},p=(e,t)=>{let n=o.get(e)??new Set;n.add(t),o.set(e,n),l(e)},m=(e,t)=>{o.get(e)?.delete(t),d(e)};return{show:f,dismiss:u,pause:p,resume:m,getSnapshot:()=>e,subscribe:e=>(n.add(e),()=>{n.delete(e)}),setPaused:(t,n)=>{n?s.add(t):s.delete(t);for(let t of e)s.size?l(t.id):d(t.id)},performAction:async(t,n)=>{let r=e.find(e=>e.id===t),i=r?.actions?.find(e=>e.id===n);if(!r||!i||r.pendingActionId)return;let a={...r,pendingActionId:n};p(t,`action`),e=e.map(e=>e===r?a:e),c();try{await i.run(),e.includes(a)&&u(t)}catch(t){e.includes(a)&&f({...r,title:i.failureTitle??`Could not complete action`,description:t instanceof Error?t.message:`Please try again.`,tone:`error`})}finally{m(t,`action`)}}}}var Z=dt(),Q=v(),ft={archive:M,clock:y,pin:i,trash:s};function pt(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,G.useEffect)(mt,t),null}function mt(){let e=!0,t=new Set,n=()=>{let n=Z.getSnapshot();for(let e of t)n.some(t=>t.id===e)||(t.delete(e),$.close(`shared:${e}`));for(let r of n){let n=r.icon&&r.tone!==`error`?ft[r.icon]:null,i=r.actions??[],a=i.find(gt),o=e=>({children:e.label,disabled:!!r.pendingActionId,onClick:()=>{Z.performAction(r.id,e.id)}}),s={title:r.title,description:r.description??null,type:r.tone??`info`,timeout:0,onClose:()=>{e&&Z.getSnapshot().includes(r)&&Z.dismiss(r.id)},actionProps:{children:null},data:{sharedToastId:r.id,leadingIcon:n?(0,q.jsx)(n,{className:`size-4`}):void 0,additionalActions:i.filter(e=>e!==a).map(e=>({id:e.id,props:o(e)})),...a?{secondaryActionProps:o(a)}:{},secondaryActionVariant:`soft`,hideCopyButton:!0}};t.has(r.id)?$.update(`shared:${r.id}`,s):(t.add(r.id),$.add({...s,id:`shared:${r.id}`}))}},r=Z.subscribe(n),i=ht;return document.addEventListener(`visibilitychange`,i),i(),n(),()=>{e=!1,r(),document.removeEventListener(`visibilitychange`,i),Z.setPaused(`web-hidden`,!1);for(let e of t)$.close(`shared:${e}`)}}function ht(){return Z.setPaused(`web-hidden`,document.hidden)}function gt(e){return e.primary}var _t=class extends ge()(`ClipboardApiUnavailableError`,{target:m}){get message(){return`Clipboard API is unavailable while copying ${this.target}.`}},vt=class extends ge()(`ClipboardWriteError`,{target:m,cause:D()}){get message(){return`Failed to copy ${this.target} to the clipboard.`}},yt=class extends ge()(`ClipboardReadUnavailableError`,{target:m}){get message(){return`Clipboard API is unavailable while reading ${this.target}.`}},bt=class extends ge()(`ClipboardReadError`,{target:m,cause:D()}){get message(){return`Failed to read ${this.target} from the clipboard.`}};function xt(e,t){if(typeof document>`u`||typeof document.execCommand!=`function`)return!1;let n=document.createElement(`textarea`);n.value=e,n.setAttribute(`readonly`,``),n.setAttribute(`aria-hidden`,`true`),n.style.position=`fixed`,n.style.top=`0`,n.style.left=`0`,n.style.opacity=`0`,n.style.fontSize=`16px`;let r=document.activeElement,i=n=>{if(t&&n.clipboardData){n.clipboardData.setData(`text/plain`,e);for(let[e,r]of Object.entries(t))n.clipboardData.setData(e,r);n.preventDefault()}};document.body.appendChild(n),n.addEventListener(`copy`,i);try{return n.focus({preventScroll:!0}),n.select(),n.setSelectionRange(0,e.length),document.execCommand(`copy`)}catch{return!1}finally{n.removeEventListener(`copy`,i),n.remove();let e=r?.focus;typeof e==`function`&&e.call(r)}}async function St(e,t=`text`,n){if(typeof window>`u`)throw new _t({target:t});if(!e)return!1;n&&=Object.fromEntries(Object.entries(n).filter(([e])=>e!==`text/plain`));let r=n?.[I];if(r&&(n={...n,"text/html":ne(e,r,n?.[`text/html`])}),typeof navigator>`u`||!navigator.clipboard?.writeText){if(xt(e,n))return!0;throw new _t({target:t})}try{if(n&&typeof ClipboardItem<`u`&&navigator.clipboard.write)try{return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`}),...Object.fromEntries(Object.entries(n).map(([e,t])=>[e,new Blob([t],{type:e})]))})]),!0}catch{let t=n[`text/html`];if(t)try{return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`}),"text/html":new Blob([t],{type:`text/html`})})]),!0}catch{}}return await navigator.clipboard.writeText(e),!0}catch(e){throw new vt({target:t,cause:e})}}async function Ct(e=`text`){if(typeof window>`u`||typeof navigator>`u`||!navigator.clipboard?.readText)throw new yt({target:e});try{return await navigator.clipboard.readText()}catch(t){throw new bt({target:e,cause:t})}}function wt({timeout:e=2e3,target:t=`text`,onCopy:n,onError:r,extraFlavors:i}={}){let[a,o]=G.useState(!1),s=G.useRef(null),c=G.useRef(n),l=G.useRef(r),u=G.useRef(t),d=G.useRef(e);c.current=n,l.current=r;let f=G.useRef(i);u.current=t,d.current=e,f.current=i;let p=G.useCallback((e,t)=>{St(e,u.current,f.current).then(e=>{e&&(s.current&&clearTimeout(s.current),o(!0),c.current?.(t),d.current!==0&&(s.current=setTimeout(()=>{o(!1),s.current=null},d.current)))},e=>{console.error(e),l.current?.(e,t)})},[]);return G.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),{copyToClipboard:p,isCopied:a}}function Tt(e){return e===`live`}function Et(e){return e.draftThreadExists||e.serverThreadExists&&!e.serverThreadDeleted?`ready`:e.bootstrapComplete?`missing`:`loading`}function Dt(e){return{environmentId:e.environmentId,threadId:e.threadId}}function Ot(e){return{draftId:e}}function kt(e){return!e.environmentId||!e.threadId?null:_(e.environmentId,e.threadId)}function At(e){return e.environmentId&&e.threadId?{kind:`server`,threadRef:_(e.environmentId,e.threadId)}:e.draftId?{kind:`draft`,draftId:e.draftId}:null}function jt(e,t){return e?.kind===`server`?e.threadRef:e?.kind!==`draft`||!t?.promotedTo?null:t.promotedTo}function Mt(e){if(typeof e!=`object`||!e||!(`children`in e))return!1;let t=e.children;return t!=null&&t!==!1&&t!==``}function Nt(e,t){return t<=1?!1:e>0}function Pt(e){let t=0,n=0,r=0,i=0,a=e.map(e=>{let a=Ft(e.height);if(e.transitionStatus===`ending`){let r={toast:e,visibleIndex:t,offsetY:n};return n+=a,t+=1,r}let o={toast:e,visibleIndex:r,offsetY:i};return n+=a,t+=1,i+=a,r+=1,o});return{frontmostHeight:Ft(e.find(e=>e.transitionStatus!==`ending`)?.height),items:a}}function Ft(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:0}function It(e,t){if(e?.threadRef)return t!==null&&e.threadRef.environmentId===t.environmentId&&e.threadRef.threadId===t.threadId;let n=e?.threadId;return!n||t?.threadId===n}var $=lt(),Lt=lt(),Rt=new Map,zt={error:o,info:b,loading:ye,success:O,warning:d},Bt=180;function Vt(e,t){if(e===`error`&&typeof t==`string`&&!(t.length<Bt))return`line-clamp-4`}var Ht=`absolute z-20 -top-1.5 -right-1.5`,Ut=B(`inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-full border border-border/60 bg-popover/92 text-muted-foreground shadow-sm outline-none backdrop-blur-sm`,`transition-[color,background-color,box-shadow] hover:bg-popover hover:text-foreground`,`focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`);function Wt(e,t,n){n?.(),e.close(t)}function Gt(e){let t=(0,Q.c)(13),{text:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={target:`error-message`},t[0]=r):r=t[0];let{copyToClipboard:i,isCopied:a}=wt(r),o=a?`Copied error`:`Copy error`,s;t[1]!==i||t[2]!==n?(s=()=>i(n),t[1]=i,t[2]=n,t[3]=s):s=t[3];let c=a&&`text-success`,l;t[4]===c?l=t[5]:(l=B(`size-3`,c),t[4]=c,t[5]=l);let u=a?Se:we,d;t[6]!==l||t[7]!==u?(d=(0,q.jsx)(xe,{className:l,icon:u}),t[6]=l,t[7]=u,t[8]=d):d=t[8];let f;return t[9]!==o||t[10]!==s||t[11]!==d?(f=(0,q.jsx)(fe,{size:`icon-micro`,variant:`ghost-muted`,"aria-label":o,className:`[--control-icon-color:currentColor] rounded-md text-muted-foreground/80 hover:bg-transparent hover:text-muted-foreground`,onClick:s,children:d}),t[9]=o,t[10]=s,t[11]=d,t[12]=f):f=t[12],f}var Kt=`mt-2 max-h-40 min-h-0 overflow-y-auto overscroll-contain pr-0.5 select-text`;function qt(e){let t=(0,Q.c)(13),{children:n,labels:r}=e,[i,a]=(0,G.useState)(!1),o=r.expand??`Show details`,s=r.collapse??`Hide details`,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>a(Jt),t[0]=c):c=t[0];let l=i?W:Ce,u;t[1]===l?u=t[2]:(u=(0,q.jsx)(xe,{className:`size-3.5 shrink-0 opacity-80`,icon:l,strokeWidth:2.25}),t[1]=l,t[2]=u);let d=i?s:o,f;t[3]!==i||t[4]!==u||t[5]!==d?(f=(0,q.jsxs)(`button`,{"aria-expanded":i,className:`inline-flex cursor-pointer items-center gap-1 rounded-md py-0.5 text-left text-xs font-medium text-muted-foreground transition-colors hover:text-foreground`,onClick:c,type:`button`,children:[u,d]}),t[3]=i,t[4]=u,t[5]=d,t[6]=f):f=t[6];let p;t[7]!==n||t[8]!==i?(p=i?(0,q.jsx)(`div`,{className:Kt,children:n}):null,t[7]=n,t[8]=i,t[9]=p):p=t[9];let m;return t[10]!==f||t[11]!==p?(m=(0,q.jsxs)(`div`,{className:`min-w-0`,children:[f,p]}),t[10]=f,t[11]=p,t[12]=m):m=t[12],m}function Jt(e){return!e}function Yt(e){let t=(0,Q.c)(36),{toastData:n,toastDescription:r,toastType:i}=e,a=n?.expandableContent,o;t[0]===n?.expandableLabels?o=t[1]:(o=n?.expandableLabels??{},t[0]=n?.expandableLabels,t[1]=o);let s=o,c=n?.expandableDescriptionTrigger??!1,l;t[2]!==r||t[3]!==i?(l=B(`min-w-0 select-text wrap-break-word text-muted-foreground`,Vt(i,r)),t[2]=r,t[3]=i,t[4]=l):l=t[4];let u=l,[d,f]=(0,G.useState)(!1);if(!a){let e;return t[5]===u?e=t[6]:(e=(0,q.jsx)($e,{className:u,"data-slot":`toast-description`}),t[5]=u,t[6]=e),e}if(!c){let e;t[7]===u?e=t[8]:(e=(0,q.jsx)($e,{className:u,"data-slot":`toast-description`}),t[7]=u,t[8]=e);let n;t[9]!==a||t[10]!==s?(n=(0,q.jsx)(qt,{labels:s,children:a}),t[9]=a,t[10]=s,t[11]=n):n=t[11];let r;return t[12]!==e||t[13]!==n?(r=(0,q.jsxs)(q.Fragment,{children:[e,n]}),t[12]=e,t[13]=n,t[14]=r):r=t[14],r}let p=s.expand??`Show details`,m=s.collapse??`Hide details`,h;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>f(Xt),t[15]=h):h=t[15];let g=h,_;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),g())},t[16]=_):_=t[16];let v=_,y=d?m:p,b;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(b=B(`group flex min-w-0 w-full cursor-pointer select-none items-start gap-1.5 rounded-sm text-left outline-none ring-offset-background`,`transition-colors hover:bg-muted/40`,`focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`),t[17]=b):b=t[17];let x;t[18]!==r||t[19]!==i?(x=B(`min-w-0 select-none wrap-break-word text-muted-foreground`,Vt(i,r),`underline-offset-2 decoration-muted-foreground/60 group-hover:underline`),t[18]=r,t[19]=i,t[20]=x):x=t[20];let S;t[21]===x?S=t[22]:(S=(0,q.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,q.jsx)($e,{className:x,"data-slot":`toast-description`})}),t[21]=x,t[22]=S);let C=d?W:Ce,w;t[23]===C?w=t[24]:(w=(0,q.jsx)(xe,{"aria-hidden":!0,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground opacity-80`,icon:C,strokeWidth:2.25}),t[23]=C,t[24]=w);let T;t[25]!==d||t[26]!==w||t[27]!==y||t[28]!==S?(T=(0,q.jsxs)(`div`,{"aria-label":y,"aria-expanded":d,className:b,onClick:g,onKeyDown:v,role:`button`,tabIndex:0,children:[S,w]}),t[25]=d,t[26]=w,t[27]=y,t[28]=S,t[29]=T):T=t[29];let E;t[30]!==a||t[31]!==d?(E=d?(0,q.jsx)(`div`,{className:Kt,children:a}):null,t[30]=a,t[31]=d,t[32]=E):E=t[32];let D;return t[33]!==T||t[34]!==E?(D=(0,q.jsxs)(q.Fragment,{children:[T,E]}),t[33]=T,t[34]=E,t[35]=D):D=t[35],D}function Xt(e){return!e}function Zt(e){let t=e.type?zt[e.type]:null,n=Mt(e.actionProps)&&e.data?.actionLayout===`stacked-end`,r=e.data?.actionVariant??`default`,i=e.data?.secondaryActionVariant??`outline`,a=e.type===`error`&&typeof e.description==`string`&&!e.data?.hideCopyButton?e.description:null,o=(e.data?.additionalActions?.length??0)>0,s=e.data?.secondaryActionProps!==void 0,c=a!==null||Mt(e.actionProps)||o||s;return{Icon:t,stackedActionLayout:n,actionVariant:r,secondaryActionVariant:i,copyErrorText:a,hasTrailingControls:c,inlineContentEndPad:c?`pr-6`:`pr-10`}}function Qt(e){let t=(0,Q.c)(38),{stackedActionLayout:n,Icon:r,copyErrorText:i,actionProps:a,actionVariant:o,secondaryActionVariant:s,hasTrailingControls:c,toastData:l,toastDescription:u,toastType:d}=e,f;t[0]===l?.additionalActions?f=t[1]:(f=l?.additionalActions??[],t[0]=l?.additionalActions,t[1]=f);let p=f,m=l?.secondaryActionProps,h=l?.leadingIcon,g;t[2]===m?g=t[3]:(g=m??{},t[2]=m,t[3]=g);let _,v;t[4]===g?(_=t[5],v=t[6]):({className:_,...v}=g,t[4]=g,t[5]=_,t[6]=v);let y=n?`pr-5`:`flex-1`,b;t[7]===y?b=t[8]:(b=B(`flex min-h-0 min-w-0 flex-col gap-0.5`,y),t[7]=y,t[8]=b);let x;t[9]!==r||t[10]!==h?(x=h?(0,q.jsx)(`div`,{className:`flex h-lh w-4 shrink-0 items-center justify-center`,"data-slot":`toast-icon`,children:h}):r?(0,q.jsx)(`div`,{className:`[&>svg]:h-lh [&>svg]:w-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,"data-slot":`toast-icon`,children:(0,q.jsx)(r,{className:`in-data-[type=error]:text-destructive in-data-[type=info]:text-info in-data-[type=success]:text-success in-data-[type=warning]:text-warning in-data-[type=loading]:opacity-80`})}):null,t[9]=r,t[10]=h,t[11]=x):x=t[11];let S;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,q.jsx)(et,{className:`min-w-0 wrap-break-word font-medium`,"data-slot":`toast-title`}),t[12]=S):S=t[12];let C;t[13]===x?C=t[14]:(C=(0,q.jsxs)(`div`,{className:`flex min-w-0 gap-2`,children:[x,S]}),t[13]=x,t[14]=C);let w;t[15]!==l||t[16]!==u||t[17]!==d?(w=(0,q.jsx)(Yt,{toastData:l,toastDescription:u,toastType:d}),t[15]=l,t[16]=u,t[17]=d,t[18]=w):w=t[18];let T;t[19]!==b||t[20]!==C||t[21]!==w?(T=(0,q.jsxs)(`div`,{className:b,children:[C,w]}),t[19]=b,t[20]=C,t[21]=w,t[22]=T):T=t[22];let E;t[23]!==a||t[24]!==o||t[25]!==p||t[26]!==i||t[27]!==c||t[28]!==_||t[29]!==m||t[30]!==v||t[31]!==s||t[32]!==n||t[33]!==l?.sharedToastId?(E=c?(0,q.jsxs)(`div`,{className:B(`flex items-center gap-1.5`,n?`w-full justify-end`:`shrink-0`),children:[i===null?null:(0,q.jsx)(Gt,{text:i}),p.map(e=>{let{id:t,props:n}=e,{className:r,...i}=n;return(0,G.createElement)(fe,{...i,className:r,key:t,size:`xs`,type:`button`,variant:s})}),m?(0,q.jsx)(fe,{...v,className:_,size:`xs`,type:`button`,variant:l?.sharedToastId?`solid-neutral`:s}):null,Mt(a)?(0,q.jsx)(nt,{className:B(oe({size:`xs`,variant:o}),`shrink-0`),"data-slot":`toast-action`,children:a?.children}):null]}):null,t[23]=a,t[24]=o,t[25]=p,t[26]=i,t[27]=c,t[28]=_,t[29]=m,t[30]=v,t[31]=s,t[32]=n,t[33]=l?.sharedToastId,t[34]=E):E=t[34];let D;return t[35]!==E||t[36]!==T?(D=(0,q.jsxs)(q.Fragment,{children:[T,E]}),t[35]=E,t[36]=T,t[37]=D):D=t[37],D}function $t(){let e=(0,Q.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={strict:!1,select:en},e[0]=t):t=e[0];let n=be(t),r;e[1]===n?r=e[2]:(r=e=>n?.kind===`draft`?e.getDraftSession(n.draftId):null,e[1]=n,e[2]=r);let i=l(r),a;bb0:{if(n?.kind===`server`){a=n.threadRef;break bb0}if(n?.kind===`draft`&&i){let t;e[3]!==i.environmentId||e[4]!==i.threadId?(t={environmentId:i.environmentId,threadId:i.threadId},e[3]=i.environmentId,e[4]=i.threadId,e[5]=t):t=e[5],a=t;break bb0}a=null}return a}function en(e){return At(e)}function tn(e){let t=(0,Q.c)(4),{toastId:n,dismissAfterVisibleMs:r}=e,i,a;return t[0]!==r||t[1]!==n?(i=()=>{if(!r||r<=0||typeof window>`u`||typeof document>`u`)return;let e=Rt.get(n)??r,t=null,i=null,a=!1,o=()=>{i!==null&&(window.clearTimeout(i),i=null)},s=()=>{a||(a=!0,Rt.delete(n),$.close(n))},c=()=>{t!==null&&(e=Math.max(0,e-(Date.now()-t)),t=null,o(),Rt.set(n,e))},l=()=>{if(!(a||t!==null)){if(e<=0){s();return}t=Date.now(),o(),i=window.setTimeout(()=>{e=0,t=null,s()},e)}},u=()=>{if(document.visibilityState===`visible`&&document.hasFocus()){l();return}c()};return u(),document.addEventListener(`visibilitychange`,u),window.addEventListener(`focus`,u),window.addEventListener(`blur`,u),()=>{document.removeEventListener(`visibilitychange`,u),window.removeEventListener(`focus`,u),window.removeEventListener(`blur`,u),c(),o()}},a=[r,n],t[0]=r,t[1]=n,t[2]=i,t[3]=a):(i=t[2],a=t[3]),(0,G.useEffect)(i,a),null}function nn(e){let t=(0,Q.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({children:n,position:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`top-center`:i,o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,q.jsx)(pt,{}),t[4]=o):o=t[4];let s;t[5]===a?s=t[6]:(s=(0,q.jsx)(rn,{position:a}),t[5]=a,t[6]=s);let c;return t[7]!==n||t[8]!==r||t[9]!==s?(c=(0,q.jsxs)(ze,{toastManager:$,...r,children:[o,n,s]}),t[7]=n,t[8]=r,t[9]=s,t[10]=c):c=t[10],c}function rn(e){let t=(0,Q.c)(19),{position:n}=e,{toasts:r}=ct(),i=$t(),a;t[0]===n?a=t[1]:(a=n.startsWith(`top`),t[0]=n,t[1]=a);let o=a,s;t[2]===i?s=t[3]:(s=e=>It(e.data,i),t[2]=i,t[3]=s);let c=Pt(r.filter(s)),l,u;t[4]===r?(l=t[5],u=t[6]):(l=()=>{let e=new Set(r.map(an));for(let t of Rt.keys())e.has(t)||Rt.delete(t)},u=[r],t[4]=r,t[5]=l,t[6]=u),(0,G.useEffect)(l,u);let d=ut,f=ut,p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=B(`fixed z-100 mx-auto flex w-[calc(100%-var(--toast-inset)*2)] max-w-90 [--toast-header-offset:var(--workspace-topbar-height)] [--toast-inset:--spacing(4)] sm:[--toast-inset:--spacing(8)]`,`data-[position*=top]:top-[calc(var(--toast-inset)+var(--toast-header-offset))]`,`data-[position*=bottom]:bottom-(--toast-inset)`,`data-[position*=left]:left-(--toast-inset)`,`data-[position*=right]:right-(--toast-inset)`,`data-[position*=center]:-translate-x-1/2 data-[position*=center]:left-1/2`),t[7]=p):p=t[7];let m=`${c.frontmostHeight}px`,h;t[8]===m?h=t[9]:(h={"--toast-frontmost-height":m},t[8]=m,t[9]=h);let g=h,_=c.items.map(e=>{let{toast:t,visibleIndex:r,offsetY:i}=e,a=Nt(r,c.items.length),s=Zt(t),{stackedActionLayout:l,inlineContentEndPad:u}=s;return(0,q.jsxs)(Ze,{className:B(`dropdown-glass absolute z-[calc(9999-var(--toast-index))] w-full overflow-visible select-none rounded-xl text-popover-foreground shadow-lg shadow-black/10 [transition:transform_.5s_cubic-bezier(.22,1,.36,1),opacity_.5s,height_.15s] motion-reduce:transition-none`,`data-[position*=right]:right-0 data-[position*=right]:left-auto`,`data-[position*=left]:right-auto data-[position*=left]:left-0`,`data-[position*=center]:right-0 data-[position*=center]:left-0`,`data-[position*=top]:top-0 data-[position*=top]:bottom-auto data-[position*=top]:origin-top`,`data-[position*=bottom]:top-auto data-[position*=bottom]:bottom-0 data-[position*=bottom]:origin-bottom`,`after:absolute after:left-0 after:h-[calc(var(--toast-gap)+1px)] after:w-full`,`data-[position*=top]:after:top-full`,`data-[position*=bottom]:after:bottom-full`,r>0?`not-data-expanded:[--toast-calc-height:var(--toast-frontmost-height)] data-expanded:[--toast-calc-height:max(var(--toast-frontmost-height,var(--toast-height)),var(--toast-height))]`:`[--toast-calc-height:max(var(--toast-frontmost-height,var(--toast-height)),var(--toast-height))]`,`[--toast-gap:--spacing(3)] [--toast-peek:--spacing(3)] [--toast-scale:calc(max(0,1-(var(--toast-index)*.1)))] [--toast-shrink:calc(1-var(--toast-scale))]`,r>0?`not-data-expanded:h-(--toast-calc-height) data-expanded:h-auto`:`h-auto`,`data-[position*=top]:[--toast-calc-offset-y:calc(var(--toast-offset-y)+var(--toast-index)*var(--toast-gap)+var(--toast-swipe-movement-y))]`,`data-[position*=bottom]:[--toast-calc-offset-y:calc(var(--toast-offset-y)*-1+var(--toast-index)*var(--toast-gap)*-1+var(--toast-swipe-movement-y))]`,`data-[position*=top]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)+(var(--toast-index)*var(--toast-peek))+(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]`,`data-[position*=bottom]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--toast-peek))-(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]`,`data-limited:opacity-0`,`data-position:data-expanded:transform-[translateX(var(--toast-swipe-movement-x))_translateY(var(--toast-calc-offset-y))]`,`data-[position*=top]:data-starting-style:transform-[translateY(calc(-100%-var(--toast-inset)))]`,`data-[position*=bottom]:data-starting-style:transform-[translateY(calc(100%+var(--toast-inset)))]`,`data-[position*=top]:data-[position*=right]:data-starting-style:transform-[translateX(calc(100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:opacity-0`,`data-ending-style:not-data-limited:not-data-swipe-direction:transform-[translateY(calc(var(--toast-calc-offset-y)-100%-var(--toast-inset)))]`,`data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]`,`data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]`,`data-expanded:data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-expanded:data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-expanded:data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]`,`data-expanded:data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]`),"data-position":n,onPointerEnter:()=>{t.data?.sharedToastId&&Z.pause(t.data.sharedToastId,`pointer`)},onPointerLeave:()=>{t.data?.sharedToastId&&Z.resume(t.data.sharedToastId,`pointer`)},onFocusCapture:()=>{t.data?.sharedToastId&&Z.pause(t.data.sharedToastId,`focus`)},onBlurCapture:e=>{t.data?.sharedToastId&&!e.currentTarget.contains(e.relatedTarget)&&Z.resume(t.data.sharedToastId,`focus`)},style:{"--toast-index":r,"--toast-offset-y":`${i}px`},swipeDirection:n.includes(`center`)?[o?`up`:`down`]:n.includes(`left`)?[`left`,o?`up`:`down`]:[`right`,o?`up`:`down`],toast:t,children:[(0,q.jsx)(tn,{dismissAfterVisibleMs:t.data?.dismissAfterVisibleMs,toastId:t.id}),!t.data?.sharedToastId&&(0,q.jsx)(`div`,{className:Ht,children:(0,q.jsx)(`button`,{"aria-label":`Dismiss notification`,className:Ut,"data-slot":`toast-close`,onClick:()=>Wt($,t.id,t.data?.onClose),type:`button`,children:(0,q.jsx)(j,{className:`size-3`,strokeWidth:2.25})})}),(0,q.jsxs)(Qe,{className:B(`pointer-events-auto min-h-0 overflow-y-visible pl-3.5 text-sm transition-opacity duration-250 [overflow-x:clip] data-expanded:opacity-100`,l?`flex flex-col gap-2 py-2.5 pr-3.5`:B(`py-3`,`flex items-center justify-between gap-2`,t.data?.sharedToastId?`pr-2`:u),a&&`not-data-expanded:pointer-events-none not-data-expanded:opacity-0`),children:[(0,q.jsx)(Qt,{...s,actionProps:t.actionProps,toastData:t.data,toastDescription:t.description,toastType:t.type}),t.data?.sharedToastId&&(0,q.jsx)(fe,{size:`icon-xs`,variant:`ghost`,"aria-label":`Dismiss notification`,onClick:()=>Z.dismiss(t.data.sharedToastId),children:(0,q.jsx)(j,{})})]})]},t.id)}),v;t[10]!==n||t[11]!==g||t[12]!==_||t[13]!==f.Viewport||t[14]!==p?(v=(0,q.jsx)(f.Viewport,{className:p,"data-position":n,"data-slot":`toast-viewport`,style:g,children:_}),t[10]=n,t[11]=g,t[12]=_,t[13]=f.Viewport,t[14]=p,t[15]=v):v=t[15];let y;return t[16]!==v||t[17]!==d.Portal?(y=(0,q.jsx)(d.Portal,{"data-slot":`toast-portal`,children:v}),t[16]=v,t[17]=d.Portal,t[18]=y):y=t[18],y}function an(e){return e.id}function on(e){let t=(0,Q.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):({children:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,q.jsx)(sn,{}),t[3]=i):i=t[3];let a;return t[4]!==n||t[5]!==r?(a=(0,q.jsxs)(ze,{toastManager:Lt,...r,children:[n,i]}),t[4]=n,t[5]=r,t[6]=a):a=t[6],a}function sn(){let e=(0,Q.c)(7),{toasts:t}=ct(),n=$t(),r;if(e[0]!==n||e[1]!==t){let i;e[3]===n?i=e[4]:(i=e=>It(e.data,n),e[3]=n,e[4]=i),r=t.filter(i).map(cn),e[0]=n,e[1]=t,e[2]=r}else r=e[2];let i;return e[5]===r?i=e[6]:(i=(0,q.jsx)(rt,{"data-slot":`toast-portal-anchored`,children:(0,q.jsx)(Ve,{className:`outline-none`,"data-slot":`toast-viewport-anchored`,children:r})}),e[5]=r,e[6]=i),i}function cn(e){let t=e.data?.tooltipStyle??!1,n=e.positionerProps,r=Zt(e),{stackedActionLayout:i,inlineContentEndPad:a}=r;return n?.anchor?(0,q.jsx)(ot,{className:`z-100 max-w-[min(--spacing(64),var(--available-width))]`,"data-slot":`toast-positioner`,sideOffset:n.sideOffset??4,toast:e,children:(0,q.jsx)(Ze,{className:B(`dropdown-glass relative overflow-visible text-balance text-popover-foreground text-xs shadow-xl shadow-black/25 transition-[scale,opacity] data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0`,t?`rounded-md`:`rounded-lg`),"data-slot":`toast-popup`,toast:e,children:t?(0,q.jsx)(Qe,{className:`pointer-events-auto px-2 py-1`,children:(0,q.jsx)(et,{"data-slot":`toast-title`})}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:Ht,children:(0,q.jsx)(`button`,{"aria-label":`Dismiss notification`,className:Ut,"data-slot":`toast-close`,onClick:()=>Wt(Lt,e.id,e.data?.onClose),type:`button`,children:(0,q.jsx)(j,{className:`size-3`,strokeWidth:2.25})})}),(0,q.jsx)(Qe,{className:B(`pointer-events-auto min-h-0 overflow-y-visible pl-3.5 text-sm [overflow-x:clip]`,i?`flex flex-col gap-2 py-2.5 pr-3.5`:B(`py-3`,`flex items-center justify-between gap-1.5`,a)),children:(0,q.jsx)(Qt,{...r,actionProps:e.actionProps,toastData:e.data,toastDescription:e.description,toastType:e.type})})]})})},e.id):null}export{Ee as _,Ot as a,jt as c,At as d,Ct as f,Ae as g,Z as h,$ as i,kt as l,St as m,nn as n,Dt as o,wt as p,Lt as r,Tt as s,on as t,Et as u,De as v};
|
|
2
|
+
//# sourceMappingURL=toast-DYfY2t_z.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-DzxwRta7.js";import{c as e}from"./mermaid-parser.core-
|
|
1
|
+
import"./chunk-FOHPRMQF-DzxwRta7.js";import{c as e}from"./mermaid-parser.core-DcamukpZ.js";export{e as createTreeViewServices};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-FOHPRMQF-DzxwRta7.js";import{o as e}from"./mermaid-parser.core-
|
|
1
|
+
import"./chunk-FOHPRMQF-DzxwRta7.js";import{o as e}from"./mermaid-parser.core-DcamukpZ.js";export{e as createTreemapServices};
|