@p4code/cli 0.9.22 → 0.9.23
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/{AcpMcpStdioBridge-DxIZyDJz.mjs → AcpMcpStdioBridge-BNuxv1nx.mjs} +15 -7
- package/dist/AcpMcpStdioBridge-C9Ry_oCI.mjs +3 -0
- package/dist/{Effect-BqRgldaH.mjs → Effect-BrI3bavz.mjs} +1242 -448
- package/dist/{Schema-CkGB1Dgx.mjs → Schema-06GeVid5.mjs} +1626 -1148
- package/dist/{Stream-DZTo5F3N.mjs → Stream-DKSvHopl.mjs} +470 -190
- package/dist/{TraceDiagnostics-DE0N1Yf6.mjs → TraceDiagnostics-DY_cYrzB.mjs} +1961 -531
- package/dist/bin.mjs +2 -2
- package/dist/{binCli-DC5fHnhS.mjs → binCli-Bou3rWgW.mjs} +2302 -1946
- package/dist/claude-history-worker.mjs +1 -1
- package/dist/{claudeHistoryWorker-Cst8OnLH.mjs → claudeHistoryWorker-BZBBGtSw.mjs} +1 -1
- package/dist/{claudeHistoryWorker-r4mV4Dxy.mjs → claudeHistoryWorker-DlhW7K2f.mjs} +2 -2
- package/dist/client/.vite/manifest.json +2155 -2127
- package/dist/client/assets/{2NI2N5EU-CgpeJ5KT.js → 2NI2N5EU-B3GKfpTJ.js} +2 -2
- package/dist/client/assets/{4UO7MD6I-BZfVOqtM.js → 4UO7MD6I-D1jV-2l8.js} +2 -2
- package/dist/client/assets/{5B3SVYGG-B5V3_tzl.js → 5B3SVYGG-CiUCamIk.js} +2 -2
- package/dist/client/assets/{5GK6JWQ2-DRzSVTZ0.js → 5GK6JWQ2-t3RHg90Y.js} +2 -2
- package/dist/client/assets/{5N7A7DKN-BX-IFKkJ.js → 5N7A7DKN-QVdNnUVu.js} +2 -2
- package/dist/client/assets/{5OC2THR4-CGiKcStE.js → 5OC2THR4-CxE7bwzV.js} +2 -2
- package/dist/client/assets/{5S6HY5KT-B5Smgpiz.js → 5S6HY5KT-msIIAX0G.js} +2 -2
- package/dist/client/assets/{6IMQ5BUJ-BSWEueVD.js → 6IMQ5BUJ-BzYnQ5qg.js} +2 -2
- package/dist/client/assets/{6OLKWJ4F-0nUReGo5.js → 6OLKWJ4F-AQyY5TLk.js} +2 -2
- package/dist/client/assets/{74OO7NKP-BZ5SCLUX.js → 74OO7NKP-CCpQBxNH.js} +2 -2
- package/dist/client/assets/{75O6YZUN-NifBwMlS.js → 75O6YZUN-D3WwLu8s.js} +2 -2
- package/dist/client/assets/{77XECAW3-_XJOQitm.js → 77XECAW3-C6PMMrkh.js} +2 -2
- package/dist/client/assets/{ABYRPUBD-B5mFmY4q.js → ABYRPUBD-BmXVPnuD.js} +2 -2
- package/dist/client/assets/AlertDialogRoot-CNpt8h9w.js +2 -0
- package/dist/client/assets/{AnimatedHeight-BoS1RBdk.js → AnimatedHeight-B2j_NXft.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell-DesOxtee.js → AuthSurfaceShell-DDT8iJWE.js} +2 -2
- package/dist/client/assets/{BB2UYUI2-CxFyfwSJ.js → BB2UYUI2-C_DXRsEF.js} +2 -2
- package/dist/client/assets/{BUM34MOA-Kk83QSsb.js → BUM34MOA-sLk4tJuF.js} +2 -2
- package/dist/client/assets/{CEQABKGZ-DLcBenqs.js → CEQABKGZ-DsLeCUfk.js} +2 -2
- package/dist/client/assets/{CXAC5362-BcvLk6NG.js → CXAC5362-6czpP5mH.js} +2 -2
- package/dist/client/assets/ChatGptUsageButton-BElkMe1K.js +2 -0
- package/dist/client/assets/ChatMarkdown-pRUIhpGi.js +49 -0
- package/dist/client/assets/{CheckboxIndicator-Dj91Im5z.js → CheckboxIndicator-DFCs5GRD.js} +2 -2
- package/dist/client/assets/{ClippedText-CmBRrYNb.js → ClippedText-BIwvWMlV.js} +2 -2
- package/dist/client/assets/CodexSetupSection.logic-3MrEmFzD.js +2 -0
- package/dist/client/assets/{CollapsiblePanel-BwDr-EKA.js → CollapsiblePanel-CsWNZ7jo.js} +2 -2
- package/dist/client/assets/{ComboboxClear-DeqR6c-6.js → ComboboxClear-Cv9NZFNr.js} +2 -2
- package/dist/client/assets/{ComboboxGroupLabel-Dk-MF4sD.js → ComboboxGroupLabel-BPe0M6wJ.js} +2 -2
- package/dist/client/assets/{CommandBlock-C15Q987N.js → CommandBlock-DUs3JB3r.js} +2 -2
- package/dist/client/assets/{CompositeRoot-Cx12XSsh.js → CompositeRoot-RcqGhRAf.js} +2 -2
- package/dist/client/assets/ConnectAgentSurface-BG30oBmC.js +2 -0
- package/dist/client/assets/{ConnectionStatusDot-BnhNFCMA.js → ConnectionStatusDot-DIUevPBM.js} +2 -2
- package/dist/client/assets/{DRLTVNUE-CkNId4Pz.js → DRLTVNUE-CAWKPVio.js} +2 -2
- package/dist/client/assets/{DYY6UVD2-B4516qT_.js → DYY6UVD2-HB9mYAbb.js} +2 -2
- package/dist/client/assets/DevicePanel-BAT6BS-V.js +2 -0
- package/dist/client/assets/DeviceSetup-ClD1wdY1.js +2 -0
- package/dist/client/assets/DialogRoot-Dg58-QOq.js +2 -0
- package/dist/client/assets/DialogTitle-CSaaIBpP.js +2 -0
- package/dist/client/assets/{DiffCommentAnnotation-CSzNea6G.js → DiffCommentAnnotation-BjI2rZNS.js} +3 -3
- package/dist/client/assets/{DiffFileTree-CDnFut1y.js → DiffFileTree-C6VB4VCo.js} +2 -2
- package/dist/client/assets/DiffPanel-pkAdnqL7.js +2 -0
- package/dist/client/assets/{DiffWorkerPoolProvider-zgaFe3TY.js → DiffWorkerPoolProvider-CPwS1D4h.js} +3 -3
- package/dist/client/assets/{EmbeddedDesign-BI3VZqZl.js → EmbeddedDesign-DOevokgh.js} +7 -7
- package/dist/client/assets/{EnvironmentMachineIcon-Lz2YGk0G.js → EnvironmentMachineIcon-DM48TG2x.js} +2 -2
- package/dist/client/assets/{ExpandableText-B034p2kF.js → ExpandableText-CYFNBBpY.js} +2 -2
- package/dist/client/assets/{FNOVOB4O-Uc8FDPv8.js → FNOVOB4O-BkKBPKb-.js} +2 -2
- package/dist/client/assets/{FieldControl-H6iQvC-Q.js → FieldControl-DHSVFpKc.js} +2 -2
- package/dist/client/assets/{FileDiff-B4Yf4fFg.js → FileDiff-CdxU7jjH.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-u1jxtxzb.js → FilePreviewPanel-Bz8HETIa.js} +4 -4
- package/dist/client/assets/{FoldedSettingsSection-DvzfFn5A.js → FoldedSettingsSection-IyrJlpO8.js} +2 -2
- package/dist/client/assets/{HDGCDEEZ-DVkQN-82.js → HDGCDEEZ-BW-K6GhK.js} +2 -2
- package/dist/client/assets/{HSJLKHB7-txH19TCj.js → HSJLKHB7-B8h6fviS.js} +2 -2
- package/dist/client/assets/{Icons-DmQwwfAN.js → Icons-DpgbzNj8.js} +2 -2
- package/dist/client/assets/Input-BT2VVALp.js +2 -0
- package/dist/client/assets/{IntervalSecondsField-xqmFxAii.js → IntervalSecondsField-BaJ1qNX-.js} +2 -2
- package/dist/client/assets/JZOYTAAL-DbSUKTwO.js +1 -0
- package/dist/client/assets/{K3MD6TGW-4d2yDOzZ.js → K3MD6TGW-BTpBxr8x.js} +2 -2
- package/dist/client/assets/{K7RP3OMA-B8vKr81f.js → K7RP3OMA-DcsmGbRM.js} +2 -2
- package/dist/client/assets/{KeybindingsSettings.logic-C6XG7NtX.js → KeybindingsSettings.logic-oAUXQqts.js} +2 -2
- package/dist/client/assets/{LHDIQX7Q-DAyTfuTY.js → LHDIQX7Q-NOcjEUQY.js} +2 -2
- package/dist/client/assets/{LUXOKEGN-C67XJj3F.js → LUXOKEGN-BWJqFZst.js} +2 -2
- package/dist/client/assets/LinkMachineSelect-Dp6FC1LE.js +2 -0
- package/dist/client/assets/{MathTypeset-CMO1aCZc.js → MathTypeset-DHPwWtff.js} +2 -2
- package/dist/client/assets/{ModelLiveLayer-DqW0VhFG.js → ModelLiveLayer-D3x6mJFP.js} +3 -3
- package/dist/client/assets/{N3JZAHOW-Bp1sdK_N.js → N3JZAHOW-oDX5VWgR.js} +2 -2
- package/dist/client/assets/{NUIALGQ3-D427dlgt.js → NUIALGQ3-DbqxE7KO.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-BL0Jsc_V.js → NoProjectsHero-Dk-rv5RI.js} +2 -2
- package/dist/client/assets/{O65XPQGZ-BxqHRP3n.js → O65XPQGZ-Cys4qXjc.js} +2 -2
- package/dist/client/assets/{O7XIQ6OM-CKRD1aP5.js → O7XIQ6OM-aLdTRbRJ.js} +2 -2
- package/dist/client/assets/{OFQON5FD-CzS9a25C.js → OFQON5FD-DpC8rm9Y.js} +2 -2
- package/dist/client/assets/P4ConnectAccountPages-C-GbG9lk.js +2 -0
- package/dist/client/assets/{P4ConnectSidebarSignIn-29st82gY.js → P4ConnectSidebarSignIn-DepXmk4f.js} +2 -2
- package/dist/client/assets/{PJQHF43J-Ww7-2BqY.js → PJQHF43J-CUbFewuD.js} +2 -2
- package/dist/client/assets/PanelLayoutControls-CKWjLO_e.js +218 -0
- package/dist/client/assets/{PierreEntryIcon-UO6zY_i-.js → PierreEntryIcon-CVKV5qfT.js} +2 -2
- package/dist/client/assets/{PopoverHandle-DEcvmS0k.js → PopoverHandle-s36xVlsK.js} +2 -2
- package/dist/client/assets/PreviewPanel-B-ty1_ZL.js +2 -0
- package/dist/client/assets/{ProjectDefaultsSettings-DN1mhFNf.js → ProjectDefaultsSettings-vF_5kxVM.js} +2 -2
- package/dist/client/assets/{ProjectFavicon-CyXd4lSF.js → ProjectFavicon-BEsCcLjN.js} +3 -3
- package/dist/client/assets/{ProjectIconPickerDialog-B_D_9SAb.js → ProjectIconPickerDialog-D1_gSlWW.js} +2 -2
- package/dist/client/assets/{ProjectMonogram-C8btbogu.js → ProjectMonogram-Aw_ZBtDB.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-B0GzUrya.js → ProviderAuthTerminal-cNp7I_XV.js} +2 -2
- package/dist/client/assets/ProviderModelPicker-CCCH-TiQ.js +2 -0
- package/dist/client/assets/{ProviderSettingsForm-DefAmKv_.js → ProviderSettingsForm-CV7sAQy3.js} +2 -2
- package/dist/client/assets/PullRequestCodeTab-DjChxC-1.js +6 -0
- package/dist/client/assets/{RHNBAITX-BsGO-vJB.js → RHNBAITX-CEZ1jYAC.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-COho36OD.js → ReadOnlySourcePreview-Dw9TzXZ2.js} +2 -2
- package/dist/client/assets/{RedactedSensitiveText-BMXImj30.js → RedactedSensitiveText-bQSbv34p.js} +2 -2
- package/dist/client/assets/RenderErrorBoundary-Dbb6Gs8P.js +23 -0
- package/dist/client/assets/{RightPanelResizeHandle-Cog3JVw0.js → RightPanelResizeHandle-B6vIzqA0.js} +2 -2
- package/dist/client/assets/{SLD4V6NK-BZEKTqDY.js → SLD4V6NK-BXmFkBHB.js} +2 -2
- package/dist/client/assets/ScheduledTasksSettings-TjoGUXvC.js +6 -0
- package/dist/client/assets/{ScopedSwitch-Cq7B0T7B.js → ScopedSwitch-C8qSHRkU.js} +2 -2
- package/dist/client/assets/{ScrollAreaCorner-DFCZuJ0r.js → ScrollAreaCorner-Cn2VDisz.js} +2 -2
- package/dist/client/assets/{SecretInput-CRgvNUgU.js → SecretInput-C6zW-8wI.js} +2 -2
- package/dist/client/assets/{SelectScrollUpArrow-C-MWJdyw.js → SelectScrollUpArrow-C40FP3vq.js} +2 -2
- package/dist/client/assets/{SelfImproveSettingsSection-DZUf-jb0.js → SelfImproveSettingsSection-BhUO-XvV.js} +2 -2
- package/dist/client/assets/{SettingsPanels-Bk_YhHLm.js → SettingsPanels-DFPZUI9O.js} +7 -7
- package/dist/client/assets/{SettingsPanels.logic-UhRGlGN1.js → SettingsPanels.logic-5bLleFhd.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-Cja-hHOp.js → SettingsScopeNotice-VgBZL2zg.js} +2 -2
- package/dist/client/assets/{SidebarStageBackdrop-DL1ZzaTz.js → SidebarStageBackdrop-DvPzZM_j.js} +2 -2
- package/dist/client/assets/{T3PCR2KE-D049x5K8.js → T3PCR2KE-bp9TnTiq.js} +2 -2
- package/dist/client/assets/{TKWO2OVW-Du9gxVgn.js → TKWO2OVW-Cyskzdq0.js} +2 -2
- package/dist/client/assets/{TSHNXIZL-pUPHV4Qd.js → TSHNXIZL-Dp3os6bG.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-CcFVvJlQ.js → ThemeEditorPanel-B1RklhEA.js} +3 -3
- package/dist/client/assets/{ThreadDetailsItemsMenu-C4wfbepv.js → ThreadDetailsItemsMenu-BOMU-3M3.js} +60 -60
- package/dist/client/assets/ThreadTerminalDrawer-BmwBVDGv.js +5 -0
- package/dist/client/assets/TooltipProvider-DQ0TF9NB.js +2 -0
- package/dist/client/assets/{UQJE5E4I-BN56DsgT.js → UQJE5E4I-DDRoojS_.js} +2 -2
- package/dist/client/assets/{USNYFO5S-DVfAs9Gy.js → USNYFO5S-BvyU-aXY.js} +2 -2
- package/dist/client/assets/{Virtualizer-Cn_zq3uH.js → Virtualizer-DFzJCTxQ.js} +2 -2
- package/dist/client/assets/{WEVWDWVA-Cz36fo-k.js → WEVWDWVA-DTuHUaDF.js} +2 -2
- package/dist/client/assets/{WorkspaceBreadcrumb-Cok6l_SJ.js → WorkspaceBreadcrumb-Dno2N8Xd.js} +2 -2
- package/dist/client/assets/{WorkspacePageContainer-_--jFIZ8.js → WorkspacePageContainer-OLpcgD_f.js} +2 -2
- package/dist/client/assets/{WorkspacePageHeader-CJB6rvZc.js → WorkspacePageHeader-Bn0m4gpR.js} +2 -2
- package/dist/client/assets/{X5RFHQXM-CUB_vKAl.js → X5RFHQXM-D9IKIoIk.js} +2 -2
- package/dist/client/assets/{X62E3GBT-C0wKfqHq.js → X62E3GBT-BBXkOa6O.js} +2 -2
- package/dist/client/assets/{XBNEOJTC-CkYPODhO.js → XBNEOJTC-D743Jp_H.js} +2 -2
- package/dist/client/assets/{YHV2MVVZ-Cf82W2em.js → YHV2MVVZ-DZBsjjLM.js} +2 -2
- package/dist/client/assets/{YURCZMG2-C9tzKn90.js → YURCZMG2-ByezMSr0.js} +2 -2
- package/dist/client/assets/{YVG2LODB-DEZWhxa8.js → YVG2LODB-DrsC56GM.js} +2 -2
- package/dist/client/assets/_chat-BrgTPEvH.js +47 -0
- package/dist/client/assets/_chat.design-CgGDbdSU.js +2 -0
- package/dist/client/assets/{_chat.index-YmI2iiCN.js → _chat.index-BjAR62fj.js} +2 -2
- package/dist/client/assets/{_chat.new-BQY5ktA8.js → _chat.new-SjhrzHWl.js} +3 -3
- package/dist/client/assets/_chat.pull-requests-BixugchU.js +2 -0
- package/dist/client/assets/{alert-D6WJ0q4-.js → alert-CfhQnxcL.js} +2 -2
- package/dist/client/assets/alert-dialog-Dn_PRSFU.js +2 -0
- package/dist/client/assets/{assetUrls-C78a94Xu.js → assetUrls-Bn1N9LX7.js} +2 -2
- package/dist/client/assets/assets-Lf7mgwY7.js +2 -0
- package/dist/client/assets/{browserHistoryStore-DHI-0j5y.js → browserHistoryStore-Ciy-Cygo.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-D8HUAQg-.js → browserLinkTarget-DKVi8qup.js} +2 -2
- package/dist/client/assets/{checkbox-Cw33xyU7.js → checkbox-iFzfBLKr.js} +2 -2
- package/dist/client/assets/{color-picker-Bmtarpj9.js → color-picker-W1NtR7ha.js} +2 -2
- package/dist/client/assets/combobox-B0IMIA-1.js +2 -0
- package/dist/client/assets/command-BdVxwZ8D.js +2 -0
- package/dist/client/assets/{connect-Dl6MuR2C.js → connect-C605Zs89.js} +2 -2
- package/dist/client/assets/connect-agent-Cy1G_UzI.js +2 -0
- package/dist/client/assets/{design-BoZx445P.js → design-BNHLz8I2.js} +2 -2
- package/dist/client/assets/{device-Ku4cbgo-.js → device-CwiofvsD.js} +2 -2
- package/dist/client/assets/dialog-DFlZvvht.js +2 -0
- package/dist/client/assets/dialog-styles-Df-wlHU1.js +2 -0
- package/dist/client/assets/{diffPanelStore-D3ARjaef.js → diffPanelStore-CGdPbp5I.js} +2 -2
- package/dist/client/assets/{diffRendering-yxIsTMie.js → diffRendering-DJnBG6ZN.js} +2 -2
- package/dist/client/assets/{dist-CkH9xVVz.js → dist-D1XCsn7e.js} +3 -3
- package/dist/client/assets/{draft-input-DM7mC5ty.js → draft-input-1HTN8QVo.js} +2 -2
- package/dist/client/assets/{duoViewer-_3Xk2sTq.js → duoViewer-CQpxZewd.js} +2 -2
- package/dist/client/assets/{dynamic-CwQ-caG2.js → dynamic-DHrzmb9Z.js} +2 -2
- package/dist/client/assets/{embeddedScripts-Cn7aGTAj.js → embeddedScripts-D7WC0N_7.js} +2 -2
- package/dist/client/assets/{empty-VkAC9qIO.js → empty-Dn5VI2Xk.js} +2 -2
- package/dist/client/assets/entities-CjoTQlW3.js +2 -0
- package/dist/client/assets/{fileLinks-CJ9SYNL6.js → fileLinks-BZkPwsEY.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-CdWOFpa-.js → fileTreeExpansion-DHPBKDpm.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-hLtjvhYr.js → getDiffFileInput-D-dpZLfC.js} +2 -2
- package/dist/client/assets/{htmlRender-DYI6n9Xo.js → htmlRender-BdsR_7vV.js} +2 -2
- package/dist/client/assets/{index-etcfxnIt.js → index-Cq59P2HC.js} +3 -3
- package/dist/client/assets/{input-group-DOUsG7P-.js → input-group-B1TOCtDG.js} +2 -2
- package/dist/client/assets/{input-CiPGmOLv.js → input-yaZxaTds.js} +2 -2
- package/dist/client/assets/{kbd-C8opCm5n.js → kbd-R7rkirqT.js} +2 -2
- package/dist/client/assets/{keybindings-CbaDrm2P.js → keybindings-CrlWqd5q.js} +2 -2
- package/dist/client/assets/{lazy--Qcevr63.js → lazy-BH4rgIwO.js} +4 -4
- package/dist/client/assets/{lazyRouteComponent-BZe6tHvz.js → lazyRouteComponent-BxpFJiXB.js} +2 -2
- package/dist/client/assets/{link-BHR6GsRr.js → link-2ZiGGBbw.js} +2 -2
- package/dist/client/assets/{linkedPrompt-D4M9Fbja.js → linkedPrompt-BTa8Gs9-.js} +2 -2
- package/dist/client/assets/main-Rpw_0nEx.css +2 -0
- package/dist/client/assets/main-xhw8F2iL.js +38 -0
- package/dist/client/assets/mediaReference-B7ym_1-U.js +2 -0
- package/dist/client/assets/{mediaSource-B03Ykm6c.js → mediaSource-GtWYcfeZ.js} +2 -2
- package/dist/client/assets/{modelScene-CX8s0IGN.js → modelScene-uWeIf_CC.js} +2 -2
- package/dist/client/assets/number-field-DNna9ps3.js +2 -0
- package/dist/client/assets/{observeResize-BESwMMOy.js → observeResize-Cz6dJUG2.js} +2 -2
- package/dist/client/assets/{onboarding-BZ01kUjR.js → onboarding-CxDppAGc.js} +2 -2
- package/dist/client/assets/openFileInPreview-MLuDI8fu.js +2 -0
- package/dist/client/assets/{p4ProjectFile-y2CDxOaL.js → p4ProjectFile-DlnfrOnm.js} +2 -2
- package/dist/client/assets/{pair-PXvf9qqC.js → pair-BJWvIdrD.js} +2 -2
- package/dist/client/assets/{pendingSendStore-CX8QB7C5.js → pendingSendStore-Cc6n4Xji.js} +2 -2
- package/dist/client/assets/{phoneViewer-F9Wt5VkW.js → phoneViewer-OFK_ThS_.js} +2 -2
- package/dist/client/assets/{pierre-icons-BTVgApcG.js → pierre-icons-BYPQj09G.js} +2 -2
- package/dist/client/assets/popover-DnYfrQly.js +2 -0
- package/dist/client/assets/{preview-DnCP9Q0k.js → preview-Bi-hPWTp.js} +2 -2
- package/dist/client/assets/{preview-5pSBET3P.js → preview-CxFR-vue.js} +2 -2
- package/dist/client/assets/{previewMiniPlayerStore-DByen2Nk.js → previewMiniPlayerStore-W10VSM09.js} +2 -2
- package/dist/client/assets/primary-CCmKskNP.js +2 -0
- package/dist/client/assets/primaryCloudLinkState-DDs0gJOh.js +2 -0
- package/dist/client/assets/{projectFilesQueryState-B6AeAhgL.js → projectFilesQueryState-DzjMtjuq.js} +2 -2
- package/dist/client/assets/projectScriptEditor-C2NTRQLs.js +2 -0
- package/dist/client/assets/{providerSkills-D-ytsJU9.js → providerSkills-gNPMp_MW.js} +2 -2
- package/dist/client/assets/pullRequestDetail.logic-BZNLZTdt.js +10 -0
- package/dist/client/assets/{pullRequestIcons-1lUVOGQJ.js → pullRequestIcons-DwblWS4R.js} +2 -2
- package/dist/client/assets/{pullRequestReviewStore-CUZ0N4F2.js → pullRequestReviewStore-Cc4bHb4o.js} +2 -2
- package/dist/client/assets/{pullRequests-DrQJ8zM2.js → pullRequests-DAMVEVGR.js} +2 -2
- package/dist/client/assets/queries-ckipBW-f.js +2 -0
- package/dist/client/assets/{query-CeIgbVxh.js → query-DFSffMGJ.js} +2 -2
- package/dist/client/assets/{radio-group-C14CASyG.js → radio-group-EK7EPCn2.js} +2 -2
- package/dist/client/assets/relay-BLgoNhyd.js +2 -0
- package/dist/client/assets/relayFailureReason-COnjzJFI.js +2 -0
- package/dist/client/assets/{renderScheduler-eNIG8tB_.js → renderScheduler-BCOEl9SF.js} +2 -2
- package/dist/client/assets/{rightPanelStore-Bt0unAo8.js → rightPanelStore-AjYoRisO.js} +2 -2
- package/dist/client/assets/runtime-CbYvES7U.js +9 -0
- package/dist/client/assets/{runtimeModeConfig-DymGoV55.js → runtimeModeConfig-Oh86kRYJ.js} +2 -2
- package/dist/client/assets/{scheduledTasksSettings.logic-CKzZuci7.js → scheduledTasksSettings.logic-DBMDVdjk.js} +3 -3
- package/dist/client/assets/{scroll-area-D2D-AlvC.js → scroll-area-DhDCLqyU.js} +2 -2
- package/dist/client/assets/{select-CE2f-g-3.js → select-CNcZzYBl.js} +2 -2
- package/dist/client/assets/{selfImproveFindings-Bhi6QF1b.js → selfImproveFindings-CvQXlaMJ.js} +2 -2
- package/dist/client/assets/{server-DthHkqkT.js → server-CEMcTnD1.js} +2 -2
- package/dist/client/assets/{session-CxeYe0sJ.js → session-Ces3Ebxl.js} +2 -2
- package/dist/client/assets/session-logic-DoE1Q_f_.js +27 -0
- package/dist/client/assets/{settings-DAe5Z4UG.js → settings-DfyN3nPg.js} +2 -2
- package/dist/client/assets/{settings.appearance-wfb5oCmC.js → settings.appearance-DKdqiS33.js} +2 -2
- package/dist/client/assets/settings.archived-DDSjJTCo.js +2 -0
- package/dist/client/assets/{settings.computer-use-DJQcngZ4.js → settings.computer-use-B9Lvx9ml.js} +2 -2
- package/dist/client/assets/settings.connections-CeVMC9_Q.js +2 -0
- package/dist/client/assets/{settings.data-controls-DUI06j8l.js → settings.data-controls-C50d8Y1p.js} +2 -2
- package/dist/client/assets/{settings.decisions-BY4z-aRM.js → settings.decisions-IKWdsPJP.js} +2 -2
- package/dist/client/assets/{settings.designs-O0d1vzoU.js → settings.designs-DYK1fORq.js} +2 -2
- package/dist/client/assets/settings.diagnostics-DDQ_8Jca.js +2 -0
- package/dist/client/assets/{settings.general-CAOwfHEb.js → settings.general-c8Ls4Mz6.js} +2 -2
- package/dist/client/assets/settings.integrations-Bx78DSgB.js +2 -0
- package/dist/client/assets/{settings.keybindings-CwvrmKin.js → settings.keybindings-CBhgDtMa.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-DCBCu3U3.js → settings.open-source-licenses-CgHCMsAt.js} +2 -2
- package/dist/client/assets/{settings.plugins-8R8eV7IR.js → settings.plugins-1AVunwAZ.js} +4 -4
- package/dist/client/assets/{settings.projects-Cy_93LuA.js → settings.projects-voo-H787.js} +4 -4
- package/dist/client/assets/settings.providers-BWjGRXNt.js +3 -0
- package/dist/client/assets/{settings.scheduled-tasks-CHnjcJx8.js → settings.scheduled-tasks-czvZRhu8.js} +2 -2
- package/dist/client/assets/{settings.secrets-BgQSmFWY.js → settings.secrets-B4BGlz80.js} +2 -2
- package/dist/client/assets/{settings.snap-shot-C0J6pItQ.js → settings.snap-shot-d8VTC1Lv.js} +2 -2
- package/dist/client/assets/{settings.source-control-B3kcm55_.js → settings.source-control-Df0azAck.js} +2 -2
- package/dist/client/assets/settings.storage-CAwfhCbA.js +2 -0
- package/dist/client/assets/settingsLayout-D5Mded9h.js +3 -0
- package/dist/client/assets/sidebar-BUDllWET.js +2 -0
- package/dist/client/assets/{sidebarProjectGrouping-BaiZoO-A.js → sidebarProjectGrouping-Dt_irkWm.js} +2 -2
- package/dist/client/assets/{skeleton-D6RVfMa8.js → skeleton-C6O21cqb.js} +2 -2
- package/dist/client/assets/{sourceControl-j8xaTHat.js → sourceControl-CgxDQG5w.js} +2 -2
- package/dist/client/assets/{sourceControlClients-BxzlzQxJ.js → sourceControlClients-Bg3Of7DX.js} +2 -2
- package/dist/client/assets/{spinner-C-qDE4WQ.js → spinner-m1uNq_wW.js} +2 -2
- package/dist/client/assets/src-DHn7yNZx.js +15 -0
- package/dist/client/assets/terminal-links-C2FjxVhS.js +2 -0
- package/dist/client/assets/terminalSessions-DBYKcIE6.js +2 -0
- package/dist/client/assets/{textarea-CWbMGhL9.js → textarea-xZYMC9X5.js} +2 -2
- package/dist/client/assets/{themePalette-B_fGWNEh.js → themePalette-BcMO2M90.js} +3 -3
- package/dist/client/assets/{threadCheckpoints-B88N2CXf.js → threadCheckpoints-DUorxvL1.js} +2 -2
- package/dist/client/assets/{toggle-CKr6iZUR.js → toggle-DumCe7R7.js} +2 -2
- package/dist/client/assets/{toggle-group-B1WN0Pgy.js → toggle-group-CzE2mG-B.js} +2 -2
- package/dist/client/assets/{tooltip-CCYU8XGM.js → tooltip-BhCWnsdW.js} +2 -2
- package/dist/client/assets/{uiStateStore-CX-sbFiq.js → uiStateStore-B25zCY_s.js} +2 -2
- package/dist/client/assets/usage-DdBC08dx.js +2 -0
- package/dist/client/assets/{usageAccess-B0nqd8U-.js → usageAccess-COKmar79.js} +2 -2
- package/dist/client/assets/{usageFormat-CUSzTPTq.js → usageFormat-2913AogD.js} +2 -2
- package/dist/client/assets/{usageShortcuts-jGu1QJHr.js → usageShortcuts-U_aRtpf7.js} +2 -2
- package/dist/client/assets/{use-atom-command-Bsfu4mja.js → use-atom-command-DWabKYXN.js} +2 -2
- package/dist/client/assets/{useAriaLabelledBy-CJvtvui4.js → useAriaLabelledBy-BiZIzNf7.js} +2 -2
- package/dist/client/assets/useHandleNewThread-DTgcUVdd.js +2 -0
- package/dist/client/assets/{useLocation-KvBZAN7v.js → useLocation-BXwb7I1F.js} +2 -2
- package/dist/client/assets/{useNavigate-DXSBYc-k.js → useNavigate-P1p3Es15.js} +2 -2
- package/dist/client/assets/{useNavigateBack-DzR35iiJ.js → useNavigateBack-D02Al7yk.js} +2 -2
- package/dist/client/assets/{useP4ConnectAuthPrompt-CW-hut92.js → useP4ConnectAuthPrompt-DKYJHISj.js} +2 -2
- package/dist/client/assets/{useParams-D9reDvT8.js → useParams-DsmZTF__.js} +2 -2
- package/dist/client/assets/{usePermissionStatus-C5YvHVz-.js → usePermissionStatus-DeJYBk6u.js} +2 -2
- package/dist/client/assets/{usePopupViewport-D7yp2NvZ.js → usePopupViewport-BBKn7x_4.js} +2 -2
- package/dist/client/assets/usePullRequestActions-BGugTe1S.js +3 -0
- package/dist/client/assets/{useRegisterFieldControl-D-hYtXkm.js → useRegisterFieldControl-DkFmgEzw.js} +2 -2
- package/dist/client/assets/{useScopedModelAvailability-J0i-Sj4p.js → useScopedModelAvailability-LgMepA3M.js} +2 -2
- package/dist/client/assets/useSettings-hYzrsDTp.js +3 -0
- package/dist/client/assets/utils-BVnIIHXP.js +26 -0
- package/dist/client/assets/vcsRefInvalidation-C5gDWck3.js +2 -0
- package/dist/client/assets/welcome-CQrdWD2c.js +2 -0
- package/dist/client/icon-192x192.png +0 -0
- package/dist/client/icon-512x512.png +0 -0
- package/dist/client/index.html +1 -1
- package/dist/client/manifest.webmanifest +12 -0
- package/dist/client/third-party-licenses.json +1 -1
- package/dist/{mcpResponsePayloads-tqyeJD3c.mjs → mcpResponsePayloads-C8W7Qyxk.mjs} +3 -3
- package/dist/{preview-CmCyL-Tc.mjs → preview-C_kKbIjf.mjs} +6741 -3322
- package/dist/{renderer-CswgrCon.mjs → renderer-DKOOIEoX.mjs} +2 -2
- package/dist/resource-monitor/darwin-arm64/p4-resource-monitor +0 -0
- package/dist/{runtime-Bec3_bh8.mjs → runtime-Bm_EVnst.mjs} +3 -3
- package/dist/{runtimeLayer-BnJcJFjY.mjs → runtimeLayer-DQ7pD9BT.mjs} +22626 -21082
- package/dist/{runtimeLayer-DnNbGwAf.mjs → runtimeLayer-Go0xTEaW.mjs} +1 -1
- package/dist/{server-DXfSgbuj.mjs → server-DQ0wuuLG.mjs} +4388 -3021
- package/dist/{sha2-BfCJmkJJ.mjs → sha2-Daa2Fiv1.mjs} +7411 -5229
- package/package.json +1 -1
- package/dist/AcpMcpStdioBridge-DbCGhPmy.mjs +0 -3
- package/dist/client/assets/AlertDialogRoot-COfNlajP.js +0 -2
- package/dist/client/assets/ChatGptUsageButton-C9D5JFWr.js +0 -2
- package/dist/client/assets/ChatMarkdown-Ck4FJs_Q.js +0 -49
- package/dist/client/assets/CodexSetupSection.logic-DzEO1qoo.js +0 -2
- package/dist/client/assets/ConnectAgentSurface-6FVydN17.js +0 -2
- package/dist/client/assets/DevicePanel-B3CR7kGX.js +0 -2
- package/dist/client/assets/DeviceSetup-Lxy9dmqi.js +0 -2
- package/dist/client/assets/DialogTitle-5cBExuFs.js +0 -2
- package/dist/client/assets/DiffPanel-KfudIZct.js +0 -2
- package/dist/client/assets/Input-DWc7cRWt.js +0 -2
- package/dist/client/assets/JZOYTAAL-BqUoPKcz.js +0 -1
- package/dist/client/assets/LinkMachineSelect-DoqwB0AR.js +0 -2
- package/dist/client/assets/P4ConnectAccountPages-Ca1o0JuS.js +0 -2
- package/dist/client/assets/PanelLayoutControls-CoWjUmx7.js +0 -216
- package/dist/client/assets/PreviewPanel-BHj7Mvmn.js +0 -2
- package/dist/client/assets/ProviderModelPicker-DQ3N8RWz.js +0 -2
- package/dist/client/assets/PullRequestCodeTab-BTwbK3zR.js +0 -6
- package/dist/client/assets/RenderErrorBoundary-CYsCxleQ.js +0 -23
- package/dist/client/assets/ScheduledTasksSettings-CpfGXMow.js +0 -6
- package/dist/client/assets/ThreadTerminalDrawer-PkBB7D3Z.js +0 -5
- package/dist/client/assets/TooltipProvider-DiV5KdTq.js +0 -2
- package/dist/client/assets/_chat-PsMoIPUC.js +0 -47
- package/dist/client/assets/_chat.design-CWE-keji.js +0 -2
- package/dist/client/assets/_chat.pull-requests-C90JBKAN.js +0 -2
- package/dist/client/assets/alert-dialog-DsMTn0ZK.js +0 -2
- package/dist/client/assets/assets-5kUNv3CS.js +0 -2
- package/dist/client/assets/combobox-D6RfzdE7.js +0 -2
- package/dist/client/assets/command-1dJ-vX2N.js +0 -2
- package/dist/client/assets/connect-agent-B22xdP4o.js +0 -2
- package/dist/client/assets/dialog-5OaxRXCC.js +0 -2
- package/dist/client/assets/entities-DOpLfnwX.js +0 -2
- package/dist/client/assets/main-C04YJQbN.js +0 -38
- package/dist/client/assets/main-i3nSjwXu.css +0 -2
- package/dist/client/assets/mediaReference-D4rhlY-i.js +0 -2
- package/dist/client/assets/number-field-BkDsfSCt.js +0 -2
- package/dist/client/assets/openFileInPreview-XKgvCQ1z.js +0 -2
- package/dist/client/assets/popover-hyDlWUPU.js +0 -2
- package/dist/client/assets/primary-BXI66byW.js +0 -2
- package/dist/client/assets/primaryCloudLinkState-DswWb__m.js +0 -2
- package/dist/client/assets/projectScriptEditor-DvKvgTs-.js +0 -2
- package/dist/client/assets/pullRequestDetail.logic-DQj9l9DL.js +0 -10
- package/dist/client/assets/queries-BA_altUI.js +0 -2
- package/dist/client/assets/relay-CTdDIWLg.js +0 -2
- package/dist/client/assets/runtime-BvdQMwVb.js +0 -7
- package/dist/client/assets/session-logic-2ZMapwqV.js +0 -27
- package/dist/client/assets/settings.archived-BF0zdtbV.js +0 -2
- package/dist/client/assets/settings.connections-CoxujVuf.js +0 -2
- package/dist/client/assets/settings.diagnostics-CwCeo1mG.js +0 -2
- package/dist/client/assets/settings.integrations-2RsLmeUi.js +0 -2
- package/dist/client/assets/settings.providers-4HI8om0T.js +0 -3
- package/dist/client/assets/settings.storage-Cy6oX7X3.js +0 -2
- package/dist/client/assets/settingsLayout-YTaL8Lym.js +0 -3
- package/dist/client/assets/sidebar-4oe_dr6q.js +0 -2
- package/dist/client/assets/src-R7EkrVcv.js +0 -15
- package/dist/client/assets/terminal-links-BdsGDJ3O.js +0 -2
- package/dist/client/assets/terminalSessions-yZRa64tn.js +0 -2
- package/dist/client/assets/usage-CdxC8YNe.js +0 -2
- package/dist/client/assets/useHandleNewThread-Cv_08eER.js +0 -2
- package/dist/client/assets/usePullRequestActions-BHv9tRFF.js +0 -3
- package/dist/client/assets/useSettings-BhGGZc98.js +0 -3
- package/dist/client/assets/utils-DkKLB01I.js +0 -24
- package/dist/client/assets/vcsRefInvalidation-71d-99uY.js +0 -2
- package/dist/client/assets/welcome-Ytf7jmR7.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{$d as i,Bd as a,D as o,Eu as s,Jo as c,Js as l,Ku as u,Ou as d,Sf as f,Ys as p,b as m,bf as h,dl as g,es as _,mr as v,nl as y,ws as b,wu as x}from"./utils-BVnIIHXP.js";import{vg as S}from"./src-DHn7yNZx.js";import{C,k as w}from"./entities-CjoTQlW3.js";import{a as T,c as E,o as D,s as O,t as k}from"./select-CNcZzYBl.js";import{t as A}from"./useNavigate-P1p3Es15.js";import{s as j}from"./relay-BLgoNhyd.js";import{n as M}from"./query-DFSffMGJ.js";import{u as N}from"./rightPanelStore-AjYoRisO.js";import{t as P}from"./ClippedText-BIwvWMlV.js";import{t as F}from"./env-BfPir1X4.js";import{t as I}from"./textarea-xZYMC9X5.js";import{t as ee}from"./toggle-DumCe7R7.js";import{o as L}from"./sidebar-BUDllWET.js";import{a as R,c as z,n as B,o as V}from"./design-BNHLz8I2.js";import{k as H,n as U}from"./useHandleNewThread-DTgcUVdd.js";import{hi as W}from"./main-xhw8F2iL.js";import{t as G}from"./pendingSendStore-Cc6n4Xji.js";import{t as K}from"./WorkspacePageHeader-Bn0m4gpR.js";var q=n(),J=e(t(),1),Y=e(r(),1),X=[{label:`Landing page`,icon:a,ask:`a landing page`},{label:`Mobile app`,icon:h,ask:`a mobile app screen`},{label:`Web app`,icon:y,ask:`a web app screen`},{label:`Slides`,icon:i,ask:`a slide deck`},{label:`Dashboard`,icon:d,ask:`a dashboard`},{label:`Something else`,icon:f,ask:``}],Z=12;function Q(e,t){return[e?`Design ${e}.`:null,t.trim(),`Create it as a P4 Design document: read design_guide, then design_apply, validate, and render it for review.`].filter(Boolean).join(` `)}function te(e){let t=(0,q.c)(2),n;return t[0]===e?n=t[1]:(n=_(t=>e.map(e=>{let n=t(B({environmentId:e.environmentId,projectId:e.id})),r=S(b(n));return{project:e,entries:(r?.entries??[]).filter(ne),loading:n.waiting&&!r}})),t[0]=e,t[1]=n),c(n)}function ne(e){return!e.secondary}function re(){let e=(0,q.c)(4),t=A(),n=U(),r=w(),i;return e[0]!==n||e[1]!==t||e[2]!==r?(i=async(e,i)=>{let a=i===null?void 0:r.filter(t=>t.environmentId===e.environmentId&&t.projectId===e.id&&t.archivedAt===null&&t.deletedAt===null&&!t.worktreePath&&t.designs.some(e=>e.path===i)).toSorted(ie)[0],o=e=>{let t=N.getState();i===null?t.open(e,`design`):t.openFile(e,i),t.setMaximized(e,!0)};if(a){let e=p(a.environmentId,a.id);o(e),await t({to:`/$environmentId/$threadId`,params:j(e)});return}let s=await n(l(e.environmentId,e.id),{envMode:`local`,worktreePath:null});s&&o(p(e.environmentId,s.threadId))},e[0]=n,e[1]=t,e[2]=r,e[3]=i):i=e[3],i}function ie(e,t){return t.updatedAt.localeCompare(e.updatedAt)}function ae({projects:e}){let t=U(),[n,r]=(0,J.useState)(null),[i,a]=(0,J.useState)(``),[s,c]=(0,J.useState)(null),[u,d]=(0,J.useState)(!1),f=e=>`${e.environmentId}:${e.id}`,h=e.find(e=>f(e)===s)??e[0]??null,_=X.find(e=>e.label===n)?.ask??``,y=h!==null&&i.trim().length>0&&!u,b=async()=>{if(y&&h!==null){d(!0);try{let e=await t(l(h.environmentId,h.id),{envMode:`local`,worktreePath:null});if(!e)return;o.getState().setPrompt(e.draftId,Q(_,i));let n=p(h.environmentId,e.threadId);N.getState().open(n,`design`),N.getState().setMaximized(n,!0),G.getState().request(m(e.draftId))}finally{d(!1)}}};return(0,Y.jsxs)(`section`,{"aria-label":`Start a design`,className:`flex flex-col items-center gap-4`,children:[(0,Y.jsx)(`div`,{role:`group`,"aria-label":`What are you designing?`,className:`flex flex-wrap justify-center gap-2`,children:X.map(e=>(0,Y.jsxs)(ee,{variant:`outline`,pressed:n===e.label,onPressedChange:t=>r(t?e.label:null),children:[(0,Y.jsx)(e.icon,{"aria-hidden":!0}),e.label]},e.label))}),(0,Y.jsxs)(`form`,{className:`w-full max-w-3xl rounded-2xl border border-border bg-card p-3 shadow-sm focus-within:border-ring`,onSubmit:e=>{e.preventDefault(),b()},children:[(0,Y.jsx)(I,{unstyled:!0,"aria-label":`Describe a design`,placeholder:`Design anything…`,value:i,onChange:e=>a(e.currentTarget.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),b())},className:`w-full`}),(0,Y.jsxs)(`div`,{className:`mt-2 flex items-center gap-2`,children:[e.length?(0,Y.jsxs)(k,{value:h?f(h):null,onValueChange:e=>e&&c(e),children:[(0,Y.jsxs)(O,{"aria-label":`Save in`,size:`sm`,className:`w-auto max-w-56`,children:[(0,Y.jsx)(x,{"aria-hidden":!0}),(0,Y.jsx)(E,{children:()=>(0,Y.jsx)(`span`,{className:`truncate`,children:h?.title??`Choose project`})})]}),(0,Y.jsx)(D,{children:e.map(e=>(0,Y.jsx)(T,{value:f(e),children:e.title},f(e)))})]}):null,(0,Y.jsx)(`span`,{className:`flex-1`}),(0,Y.jsx)(v,{type:`submit`,size:`icon-sm`,"aria-label":`Start design`,disabled:!y,children:(0,Y.jsx)(g,{"aria-hidden":!0})})]})]}),e.length===0?(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Add a project to start designing.`}):null]})}function oe(e){let t=(0,q.c)(23),{recent:n,now:r,onOpen:i}=e,a;t[0]!==n.modifiedAt||t[1]!==n.path||t[2]!==n.project.environmentId||t[3]!==n.project.id?(a=R({environmentId:n.project.environmentId,projectId:n.project.id},n.path,n.modifiedAt),t[0]=n.modifiedAt,t[1]=n.path,t[2]=n.project.environmentId,t[3]=n.project.id,t[4]=a):a=t[4];let o=M(a),s=o.error?null:o.data?.dataUrl??null,c;t[5]!==r||t[6]!==n.modifiedAt?(c=V(n.modifiedAt,r),t[5]=r,t[6]=n.modifiedAt,t[7]=c):c=t[7];let l=c,d;t[8]===s?d=t[9]:(d=(0,Y.jsx)(`span`,{className:`flex aspect-[16/10] w-full items-center justify-center overflow-hidden bg-muted`,children:s?(0,Y.jsx)(`img`,{src:s,alt:``,loading:`lazy`,decoding:`async`,className:`size-full object-contain`}):(0,Y.jsx)(u,{"aria-hidden":!0,className:`size-6 text-muted-foreground`})}),t[8]=s,t[9]=d);let f;t[10]===n.path?f=t[11]:(f=z(n.path),t[10]=n.path,t[11]=f);let p;t[12]===f?p=t[13]:(p=(0,Y.jsx)(`span`,{className:`truncate text-sm font-medium`,children:(0,Y.jsx)(P,{children:f})}),t[12]=f,t[13]=p);let m=l?`${n.project.title} · edited ${l}`:n.project.title,h;t[14]===m?h=t[15]:(h=(0,Y.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:(0,Y.jsx)(P,{children:m})}),t[14]=m,t[15]=h);let g;t[16]!==p||t[17]!==h?(g=(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5 border-t border-border px-3 py-2`,children:[p,h]}),t[16]=p,t[17]=h,t[18]=g):g=t[18];let _;return t[19]!==i||t[20]!==d||t[21]!==g?(_=(0,Y.jsx)(`li`,{children:(0,Y.jsxs)(`button`,{type:`button`,onClick:i,className:`group flex w-full cursor-pointer flex-col overflow-hidden rounded-xl border border-border bg-card text-left transition-colors hover:border-ring focus-visible:outline-2 focus-visible:outline-ring`,children:[d,g]})}),t[19]=i,t[20]=d,t[21]=g,t[22]=_):_=t[22],_}function $(){let e=(0,q.c)(44),t=C(),n=w(),r;e[0]!==t||e[1]!==n?(r=H(t,n,`updated_at`),e[0]=t,e[1]=n,e[2]=r):r=e[2];let i=r,a=te(i),o=re(),c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=Date.now(),e[3]=c):c=e[3];let l=c,u,d,f,p,m,h,g,_,y;if(e[4]!==a||e[5]!==o||e[6]!==i){let t=a.flatMap(ue).toSorted(le).slice(0,Z),n;e[16]===a?n=e[17]:(n=new Map(a.map(ce)),e[16]=a,e[17]=n),d=n,u=L,y=`h-dvh min-h-0 overflow-hidden overscroll-y-none`,g=`flex min-h-0 min-w-0 flex-1 flex-col bg-background`,e[18]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Y.jsx)(K,{electron:F,className:`border-b border-border`,children:(0,Y.jsx)(`span`,{className:`text-sm font-medium`,children:`P4 Design`})}),e[18]=_):_=e[18],h=`scrollbar-gutter-both min-h-0 flex-1 overflow-y-auto`,f=`mx-auto flex w-full max-w-5xl flex-col gap-12 px-6 py-12`,e[19]===i?p=e[20]:(p=(0,Y.jsx)(ae,{projects:i}),e[19]=i,e[20]=p),m=t.length?(0,Y.jsxs)(`section`,{"aria-labelledby":`design-recents`,className:`flex flex-col gap-3`,children:[(0,Y.jsx)(`h2`,{id:`design-recents`,className:`text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:`Recents`}),(0,Y.jsx)(`ul`,{className:`grid grid-cols-[repeat(auto-fill,minmax(13rem,1fr))] gap-4`,children:t.map(e=>(0,Y.jsx)(oe,{recent:e,now:l,onOpen:()=>void o(e.project,e.path)},`${e.project.environmentId}:${e.project.id}:${e.path}`))})]}):null,e[4]=a,e[5]=o,e[6]=i,e[7]=u,e[8]=d,e[9]=f,e[10]=p,e[11]=m,e[12]=h,e[13]=g,e[14]=_,e[15]=y}else u=e[7],d=e[8],f=e[9],p=e[10],m=e[11],h=e[12],g=e[13],_=e[14],y=e[15];let b,S;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Y.jsx)(`h2`,{id:`design-projects`,className:`text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:`Projects`}),b=(0,Y.jsx)(`span`,{className:`flex-1`}),e[21]=b,e[22]=S):(b=e[21],S=e[22]);let T;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[S,b,(0,Y.jsxs)(v,{size:`sm`,variant:`outline`,onClick:se,children:[(0,Y.jsx)(s,{"aria-hidden":!0}),`Add project`]})]}),e[23]=T):T=e[23];let E;e[24]!==d||e[25]!==o||e[26]!==i?(E=(0,Y.jsxs)(`section`,{"aria-labelledby":`design-projects`,className:`flex flex-col gap-3`,children:[T,i.length?(0,Y.jsx)(`ul`,{className:`overflow-hidden rounded-xl border border-border bg-card`,children:i.map(e=>{let t=d.get(`${e.environmentId}:${e.id}`)??0;return(0,Y.jsx)(`li`,{className:`border-t border-border first:border-t-0`,children:(0,Y.jsxs)(`button`,{type:`button`,onClick:()=>void o(e,null),className:`flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left transition-colors hover:bg-accent/50 focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,Y.jsx)(x,{"aria-hidden":!0,className:`size-4 shrink-0 text-muted-foreground`}),(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,Y.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.title}),(0,Y.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:e.workspaceRoot})]}),(0,Y.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:[t,` `,t===1?`design`:`designs`]})]})},`${e.environmentId}:${e.id}`)})}):(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Add a project, usually a repo, so agents can design with its code.`})]}),e[24]=d,e[25]=o,e[26]=i,e[27]=E):E=e[27];let D;e[28]!==E||e[29]!==f||e[30]!==p||e[31]!==m?(D=(0,Y.jsxs)(`div`,{className:f,children:[p,m,E]}),e[28]=E,e[29]=f,e[30]=p,e[31]=m,e[32]=D):D=e[32];let O;e[33]!==D||e[34]!==h?(O=(0,Y.jsx)(`main`,{className:h,children:D}),e[33]=D,e[34]=h,e[35]=O):O=e[35];let k;e[36]!==O||e[37]!==g||e[38]!==_?(k=(0,Y.jsxs)(`div`,{className:g,children:[_,O]}),e[36]=O,e[37]=g,e[38]=_,e[39]=k):k=e[39];let A;return e[40]!==u||e[41]!==k||e[42]!==y?(A=(0,Y.jsx)(u,{className:y,children:k}),e[40]=u,e[41]=k,e[42]=y,e[43]=A):A=e[43],A}function se(){return W({open:`add-project`})}function ce(e){let{project:t,entries:n}=e;return[`${t.environmentId}:${t.id}`,n.length]}function le(e,t){return t.modifiedAt.localeCompare(e.modifiedAt)}function ue(e){let{project:t,entries:n}=e;return n.flatMap(e=>e.modifiedAt?[{project:t,path:e.path,modifiedAt:e.modifiedAt,pageCount:e.pageCount??null}]:[])}var de=$;export{de as component};
|
|
2
|
+
//# sourceMappingURL=_chat.design-CgGDbdSU.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{
|
|
2
|
-
//# sourceMappingURL=_chat.index-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Js as i,Zd as a,mr as o,td as s}from"./utils-BVnIIHXP.js";import{N as c,W as l,at as u}from"./runtime-CbYvES7U.js";import{C as d,g as f,k as p,l as m}from"./entities-CjoTQlW3.js";import{t as h}from"./link-2ZiGGBbw.js";import{a as g}from"./useParams-DsmZTF__.js";import{D as _}from"./useSettings-hYzrsDTp.js";import{t as v}from"./env-BfPir1X4.js";import{o as y}from"./sidebar-BUDllWET.js";import{i as b,o as x,r as S,t as C}from"./empty-Dn5VI2Xk.js";import{k as w,n as T}from"./useHandleNewThread-DTgcUVdd.js";import{Uo as E,a as D}from"./main-xhw8F2iL.js";import{t as O}from"./WorkspacePageHeader-Bn0m4gpR.js";import{t as k}from"./NoProjectsHero-Dk-rv5RI.js";var A=n(),j=e(t()),M=e(r());function N(){let e=(0,A.c)(2),{authGateState:t}=D.useRouteContext(),{environments:n,isReady:r}=_();if(t.status===`hosted-static`){if(!r)return null;if(n.length===0){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,M.jsx)(z,{}),e[0]=t):t=e[0],t}}let i;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,M.jsx)(P,{}),e[1]=i):i=e[1],i}function P(){let e=(0,A.c)(18),t=d(),n=p(),r=f(),a=T(),o=g(),s;e[0]===o.state.location.pathname?s=e[1]:(s=()=>o.state.location.pathname===`/`,e[0]=o.state.location.pathname,e[1]=s);let c=(0,j.useEffectEvent)(s),l=(0,j.useRef)(!1),u;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(u={failed:!1,retryRequest:0},e[2]=u):u=e[2];let[h,_]=(0,j.useState)(u),v;e[3]!==r||e[4]!==t||e[5]!==n?(v=r?w(t,n,`updated_at`)[0]??null:null,e[3]=r,e[4]=t,e[5]=n,e[6]=v):v=e[6];let y=v,b;e[7]!==a||e[8]!==c||e[9]!==y?(b=()=>{if(y===null||l.current||!c())return;let e=i(y.environmentId,y.id);m(e)!==null&&(l.current=!0,a(e,{replace:!0}).then(e=>{e===null&&(l.current=!1,_(L))}).catch(()=>{l.current=!1,_(I)}))},e[7]=a,e[8]=c,e[9]=y,e[10]=b):b=e[10];let x;if(e[11]!==a||e[12]!==y||e[13]!==h.retryRequest?(x=[a,y,h.retryRequest],e[11]=a,e[12]=y,e[13]=h.retryRequest,e[14]=x):x=e[14],(0,j.useEffect)(b,x),!r)return null;if(y!==null){let t;return e[15]===h.failed?t=e[16]:(t=h.failed?(0,M.jsx)(R,{onRetry:()=>{_(F)}}):null,e[15]=h.failed,e[16]=t),t}let S;return e[17]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,M.jsx)(k,{}),e[17]=S):S=e[17],S}function F(e){return{failed:!1,retryRequest:e.retryRequest+1}}function I(e){return{...e,failed:!0}}function L(e){return{...e,retryRequest:e.retryRequest+1}}function R(e){let t=(0,A.c)(6),{onRetry:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=v?(0,M.jsx)(O,{electron:!0}):null,t[0]=r):r=t[0];let i,a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,M.jsx)(x,{children:`Couldn’t start a new thread`}),a=(0,M.jsx)(S,{children:`The project is still available. Try opening the draft again.`}),t[1]=i,t[2]=a):(i=t[1],a=t[2]);let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,M.jsx)(E,{size:`md`}),t[3]=s):s=t[3];let c;return t[4]===n?c=t[5]:(c=(0,M.jsxs)(y,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none`,children:[r,(0,M.jsx)(C,{className:`flex-1`,children:(0,M.jsxs)(b,{className:`max-w-md`,children:[i,a,(0,M.jsx)(`div`,{className:`mt-5 flex justify-center`,children:(0,M.jsxs)(o,{size:`sm`,onClick:n,children:[s,`Try again`]})})]})})]}),t[4]=n,t[5]=c),c}function z(){let e=(0,A.c)(7),t=l(),n=u()?`The local environment is turned off. Connect a remote environment, or turn the local environment back on in Connections.`:t?`Enable P4 Connect on that machine, then open Connections here to sign in with the same account. You can also add the machine using a pairing link.`:`Open Connections and add that machine using its pairing link. This app must be able to reach it.`,r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,M.jsx)(O,{electron:v,className:`border-b border-border`,children:(0,M.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,M.jsx)(`span`,{className:`text-sm font-medium text-foreground md:text-muted-foreground/60`,children:c})})}),e[0]=r):r=e[0];let i,d,f,p;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,M.jsx)(`div`,{className:`mx-auto mb-5 flex size-11 items-center justify-center rounded-xl border border-border/70 bg-background/70 text-muted-foreground`,children:(0,M.jsx)(s,{className:`size-5`})}),d=(0,M.jsx)(x,{children:`Connect to a computer running P4 Code`}),f=(0,M.jsx)(S,{children:`This app connects to P4 Code running on your computer or a server. Start the P4 Code desktop app or command-line server on that machine and keep it running.`}),p=(0,M.jsx)(S,{children:n}),e[1]=i,e[2]=d,e[3]=f,e[4]=p):(i=e[1],d=e[2],f=e[3],p=e[4]);let m;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,M.jsx)(h,{to:`/settings/connections`}),e[5]=m):m=e[5];let g;return e[6]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,M.jsx)(y,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none`,children:(0,M.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden bg-background`,children:[r,(0,M.jsx)(C,{className:`flex-1`,children:(0,M.jsx)(`div`,{className:`w-full max-w-xl rounded-3xl border border-border/55 bg-card/20 px-8 py-12 shadow-sm/5`,children:(0,M.jsxs)(b,{className:`max-w-none`,children:[i,d,f,p,(0,M.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,M.jsxs)(o,{render:m,size:`sm`,children:[(0,M.jsx)(a,{className:`size-4`}),`Open Connections`]})})]})})})]})}),e[6]=g):g=e[6],g}export{N as component};
|
|
2
|
+
//# sourceMappingURL=_chat.index-BjAR62fj.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{D as i,Jo as a,Js as o,Us as s,
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{D as i,Jo as a,Js as o,Us as s,Ys as c,mr as l,o as u}from"./utils-BVnIIHXP.js";import{Mi as d}from"./src-DHn7yNZx.js";import{Dr as f,Hn as p,Sr as m,Un as h,zn as g}from"./runtime-CbYvES7U.js";import{C as ee,K as te,N as _,k as v}from"./entities-CjoTQlW3.js";import{t as y}from"./useNavigate-P1p3Es15.js";import{t as b}from"./useLocation-BXwb7I1F.js";import{a as x}from"./relay-BLgoNhyd.js";import{D as S,k as ne}from"./useSettings-hYzrsDTp.js";import{t as re}from"./use-atom-command-DWabKYXN.js";import{t as ie}from"./toastHelpers-DxXYm50b.js";import{t as C}from"./env-BfPir1X4.js";import{o as w}from"./sidebar-BUDllWET.js";import{i as T,o as E,r as D,t as O}from"./empty-Dn5VI2Xk.js";import{t as ae}from"./sourceControl-CgxDQG5w.js";import{k as oe,n as se}from"./useHandleNewThread-DTgcUVdd.js";import{Qn as k,Un as ce,er as A,ir as le}from"./main-xhw8F2iL.js";import{t as j}from"./WorkspacePageHeader-Bn0m4gpR.js";import{i as M}from"./usePullRequestActions-BGugTe1S.js";import{n as N,t as ue}from"./linkedPrompt-BTa8Gs9-.js";var P=n(),F=[`github.com`,`git.cafe`,`staging.git.cafe`];function de(e,t){let n=`${t.owner}/${t.name}`.toLowerCase(),r=new Set(F.map(e=>`${e}/${n}`));return e.find(e=>e.repositoryIdentity!=null&&r.has(d(e.repositoryIdentity).toLowerCase()))}function fe(e,t){let n=g({host:`github.com`,repository:`${t.owner}/${t.name}`,number:t.number}),r;for(let t of e)r!==void 0&&t.updatedAt<=r.updatedAt||h(p(t)).some(e=>g(e)===n)&&(r=t);return r}var I={claude:`claudeagent`};function pe(e,t){let n=I[t.provider]??t.provider,r=e.filter(e=>e.driver.toLowerCase()===n&&e.enabled&&e.availability!==`unavailable`),i=r.find(e=>e.status===`ready`)??r.find(e=>e.status===`warning`);if(i===void 0)return null;let a=t.model===null?null:s(i.driver,t.model,i.models),o=a??(i.models.find(e=>e.isDefault)??i.models[0])?.slug;return o===void 0?null:{selection:{instanceId:i.instanceId,model:o},exact:t.model===null||a!==null}}var L=e(t(),1),R=e(r(),1),z=new Set;function B(e){let t=(0,P.c)(62),{link:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={select:_e},t[0]=r):r=t[0];let s=b(r),d=y(),p=a(te),h=ee(),g=v(),{environments:C}=S(),w=ne(),T=se(),{scratchEnvironmentId:E,openScratchProject:D}=ce(),O;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(O={reportFailure:!1},t[1]=O):O=t[1];let k=re(ae.startProjectClone,O),j;t[2]===s?j=t[3]:(j=()=>z.has(s)?{status:`opened`}:{status:`opening`},t[2]=s,t[3]=j);let[M,N]=(0,L.useState)(j),F=(0,L.useRef)(!1),I;t[4]!==h||t[5]!==g?(I=()=>oe(h.filter(ge),g,`updated_at`),t[4]=h,t[5]=g,t[6]=I):I=t[6];let B=I,H;t[7]!==w||t[8]!==g?(H=()=>{let e;for(let t of g)(e===void 0||t.updatedAt>e.updatedAt)&&(e=t);return e?.environmentId??w},t[7]=w,t[8]=g,t[9]=H):H=t[9];let U=H,W;t[10]!==C||t[11]!==T||t[12]!==n?(W=async(e,t)=>{let r=await T(o(e.environmentId,e.id),{replace:!0}).catch(he);if(r===null){N({status:`failed`,message:`P4 Code could not open a new thread.`});return}N({status:`opened`});let a=[];if(n.kind===`new`&&n.provider!==null){let t=pe(C.find(t=>t.environmentId===e.environmentId)?.serverConfig?.providers??[],{provider:n.provider,model:n.model});t!==null&&i.getState().setModelSelection(r.draftId,t.selection,{explicit:!0,replaceOptions:!0}),t!==null&&t.exact||a.push(t===null?`The link asked for ${n.provider}, which is not set up here, so your default model is used.`:`The link asked for ${n.model}, which ${n.provider} does not offer here, so its default model is used.`)}let s=[n.prompt?.text,t].filter(Boolean).join(`
|
|
2
2
|
|
|
3
|
-
`);
|
|
4
|
-
//# sourceMappingURL=_chat.new-
|
|
3
|
+
`);s.length!==0&&ue(r.draftId,{text:s,hiddenCharacters:n.prompt?.hiddenCharacters??0},a)},t[10]=C,t[11]=T,t[12]=n,t[13]=W):W=t[13];let G=W,K;t[14]!==U||t[15]!==n||t[16]!==G||t[17]!==D||t[18]!==E?(K=async()=>{N({status:`opening`});let e=E(U())??E(null),t=e===null?null:await D(e);t===null?N({status:`failed`,message:`None of your machines can start a thread without a project right now.`}):await G(t,n.kind===`pull-request`?A(n.pullRequest):void 0)},t[14]=U,t[15]=n,t[16]=G,t[17]=D,t[18]=E,t[19]=K):K=t[19];let q=K,J;t[20]!==C||t[21]!==U||t[22]!==n||t[23]!==G||t[24]!==k?(J=async e=>{let t=U(),r=C.find(e=>e.environmentId===t),i=r?.serverConfig?.newProjectsRoot??null;if(t===null||i===null||r?.serverConfig?.environment.capabilities.projectCloneTracking!==!0){N({status:`failed`,message:`This machine cannot clone from a link. Update P4 Code on it, or clone the repository from the command palette.`});return}N({status:`opening`});let a=u(),s=await k({environmentId:t,input:{projectId:a,title:e.name,createdAt:new Date().toISOString(),remoteUrl:`https://github.com/${e.owner}/${e.name}.git`,destinationPath:le(i,e.name)}});if(s._tag===`Failure`){if(!m(s)){let e=f(s);x.add(ie({type:`error`,title:`Clone failed`,description:e instanceof Error?e.message:`An error occurred.`}))}N({status:`missing-repository`,repository:e});return}let c=await _(o(t,a),5e3).catch(me);c===null?N({status:`failed`,message:`The clone started, but its project did not appear.`}):n.kind===`pull-request`?N({status:`failed`,title:`Cloning ${e.owner}/${e.name}`,message:`Open this link again when the clone finishes.`}):await G(c)},t[20]=C,t[21]=U,t[22]=n,t[23]=G,t[24]=k,t[25]=J):J=t[25];let Y=J,X;t[26]!==n||t[27]!==s||t[28]!==d||t[29]!==G||t[30]!==q||t[31]!==B||t[32]!==g?(X=()=>{if(F.current)return;if(F.current=!0,z.add(s),n.kind===`pull-request`){let e=fe(g,n.pullRequest);if(e!==void 0){N({status:`opened`});let t=c(e.environmentId,e.id);n.prompt!==null&&ue(t,n.prompt),d({to:`/$environmentId/$threadId`,params:{environmentId:e.environmentId,threadId:e.id},replace:!0});return}}let e=n.kind===`new`?n.repository:n.pullRequest;if(e===null){q();return}let t=de(B(),e);t===void 0?N({status:`missing-repository`,repository:e}):n.kind===`pull-request`?N({status:`pull-request-checkout`,project:t}):G(t)},t[26]=n,t[27]=s,t[28]=d,t[29]=G,t[30]=q,t[31]=B,t[32]=g,t[33]=X):X=t[33];let Z=(0,L.useEffectEvent)(X),Q;t[34]!==p||t[35]!==Z||t[36]!==M.status?(Q=()=>{p&&M.status===`opening`&&Z()},t[34]=p,t[35]=Z,t[36]=M.status,t[37]=Q):Q=t[37];let $;switch(t[38]!==p||t[39]!==M.status?($=[p,M.status],t[38]=p,t[39]=M.status,t[40]=$):$=t[40],(0,L.useEffect)(Q,$),M.status){case`opening`:{let e;return t[41]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,R.jsx)(V,{title:`Opening the link...`}),t[41]=e):e=t[41],e}case`opened`:{let e;return t[42]===s?e=t[43]:(e=(0,R.jsx)(V,{title:`This link is open`,children:(0,R.jsx)(l,{size:`sm`,variant:`outline`,onClick:()=>{z.delete(s),F.current=!1,N({status:`opening`})},children:`Open it again`})}),t[42]=s,t[43]=e),e}case`failed`:{let e=M.title??`Could not open the link`,n;return t[44]!==M.message||t[45]!==e?(n=(0,R.jsx)(V,{title:e,description:M.message}),t[44]=M.message,t[45]=e,t[46]=n):n=t[46],n}case`missing-repository`:{let e=`${M.repository.owner}/${M.repository.name}`,n=`You don't have ${e}`,r;t[47]!==Y||t[48]!==M.repository?(r=()=>void Y(M.repository),t[47]=Y,t[48]=M.repository,t[49]=r):r=t[49];let i;t[50]!==e||t[51]!==r?(i=(0,R.jsxs)(l,{size:`sm`,onClick:r,children:[`Clone `,e]}),t[50]=e,t[51]=r,t[52]=i):i=t[52];let a;t[53]===q?a=t[54]:(a=(0,R.jsx)(l,{size:`sm`,variant:`outline`,onClick:()=>void q(),children:`Use without project`}),t[53]=q,t[54]=a);let o;return t[55]!==n||t[56]!==i||t[57]!==a?(o=(0,R.jsxs)(V,{title:n,description:`Clone it to work on it here, or start without a project.`,children:[i,a]}),t[55]=n,t[56]=i,t[57]=a,t[58]=o):o=t[58],o}case`pull-request-checkout`:{let e;return t[59]!==n||t[60]!==M.project?(e=n.kind===`pull-request`?(0,R.jsx)(ve,{link:n,project:M.project}):null,t[59]=n,t[60]=M.project,t[61]=e):e=t[61],e}}}function me(){return null}function he(){return null}function ge(e){return e.isScratch!==!0}function _e(e){return e.state.__TSR_key??``}function ve(e){let t=(0,P.c)(22),{link:n,project:r}=e,i=r.environmentId,a=r.id,o=r.workspaceRoot,s;t[0]===n.pullRequest?s=t[1]:(s=A(n.pullRequest),t[0]=n.pullRequest,t[1]=s);let c;t[2]!==r.id||t[3]!==r.workspaceRoot||t[4]!==s?(c={projectId:a,workspaceRoot:o,url:s},t[2]=r.id,t[3]=r.workspaceRoot,t[4]=s,t[5]=c):c=t[5];let u;t[6]!==r.environmentId||t[7]!==c?(u={environmentId:i,detail:c},t[6]=r.environmentId,t[7]=c,t[8]=u):u=t[8];let{handoff:d,startHandoff:f}=M(u),p=(0,L.useRef)(!1),m,h;t[9]===n.prompt?(m=t[10],h=t[11]):(m=()=>{p.current||n.prompt===null||(p.current=!0,N(n.prompt))},h=[n.prompt],t[9]=n.prompt,t[10]=m,t[11]=h),(0,L.useEffect)(m,h);let{owner:g,name:ee,number:te}=n.pullRequest,_=`Check out ${g}/${ee}#${te}?`,v=d!==null,y;t[12]!==n.prompt||t[13]!==f?(y=()=>void f(`prompt-link`,n.prompt===null?null:{prompt:n.prompt.text}),t[12]=n.prompt,t[13]=f,t[14]=y):y=t[14];let b=d===null?`Check out`:`Checking out...`,x;t[15]!==v||t[16]!==y||t[17]!==b?(x=(0,R.jsx)(l,{size:`sm`,disabled:v,onClick:y,children:b}),t[15]=v,t[16]=y,t[17]=b,t[18]=x):x=t[18];let S;return t[19]!==x||t[20]!==_?(S=(0,R.jsx)(V,{title:_,description:`This puts the pull request's code in a new worktree and runs your project's setup script on it.`,children:x}),t[19]=x,t[20]=_,t[21]=S):S=t[21],S}function V(e){let t=(0,P.c)(11),{title:n,description:r,children:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=C?(0,R.jsx)(j,{electron:!0}):null,t[0]=a):a=t[0];let o;t[1]===n?o=t[2]:(o=(0,R.jsx)(E,{children:n}),t[1]=n,t[2]=o);let s;t[3]===r?s=t[4]:(s=r?(0,R.jsx)(D,{children:r}):null,t[3]=r,t[4]=s);let c;t[5]===i?c=t[6]:(c=i?(0,R.jsx)(`div`,{className:`mt-5 flex justify-center gap-2`,children:i}):null,t[5]=i,t[6]=c);let l;return t[7]!==o||t[8]!==s||t[9]!==c?(l=(0,R.jsxs)(w,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none`,children:[a,(0,R.jsx)(O,{className:`flex-1`,children:(0,R.jsxs)(T,{className:`max-w-md`,children:[o,s,c]})})]}),t[7]=o,t[8]=s,t[9]=c,t[10]=l):l=t[10],l}function H(){let e=(0,P.c)(9),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={select:U},e[0]=t):t=e[0];let n=b(t),r;e[1]===n?r=e[2]:(r=k(n),e[1]=n,e[2]=r);let i=r;if(!i.ok){let t;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,R.jsx)(E,{children:`Could not open the link`}),e[3]=t):t=e[3];let n;return e[4]===i.error?n=e[5]:(n=(0,R.jsx)(w,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none`,children:(0,R.jsx)(O,{className:`flex-1`,children:(0,R.jsxs)(T,{className:`max-w-md`,children:[t,(0,R.jsx)(D,{children:i.error})]})})}),e[4]=i.error,e[5]=n),n}let a;return e[6]!==i.value||e[7]!==n?(a=(0,R.jsx)(B,{link:i.value},n),e[6]=i.value,e[7]=n,e[8]=a):a=e[8],a}function U(e){return e.searchStr}export{H as component};
|
|
4
|
+
//# sourceMappingURL=_chat.new-SjhrzHWl.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{$n as i,Hd as a,Hl as o,Jo as s,Qf as c,Qn as l,Qu as u,Rl as d,Sn as f,Su as p,Wl as m,Yd as h,Zd as g,Zn as _,al as v,ar as y,cu as b,df as x,dr as S,ep as C,er as w,fr as T,ir as E,jf as D,kl as ee,lr as O,mr as k,or as A,rd as j,rr as M,sr as N,su as P,t as te,tr as F,ur as I,zl as L}from"./utils-BVnIIHXP.js";import{Nr as R,U as ne}from"./src-DHn7yNZx.js";import{C as z,g as re,k as B,v as V}from"./entities-CjoTQlW3.js";import{t as H}from"./spinner-m1uNq_wW.js";import{t as ie}from"./useNavigate-P1p3Es15.js";import{t as ae}from"./useNavigateBack-D02Al7yk.js";import{a as oe,h as se}from"./relay-BLgoNhyd.js";import{D as ce,k as le,s as U,w as W}from"./useSettings-hYzrsDTp.js";import{s as ue}from"./server-CEMcTnD1.js";import{t as de}from"./use-atom-command-DWabKYXN.js";import{l as fe,o as pe,r as me,s as he,t as ge,u as G}from"./rightPanelStore-AjYoRisO.js";import{r as _e}from"./queries-ckipBW-f.js";import{C as ve,S as ye,T as be,a as xe,b as Se,d as Ce,f as we,g as Te,h as K,l as Ee,m as De,n as Oe,o as ke,p as Ae,r as je,s as Me,t as Ne,u as Pe,v as Fe,w as Ie,x as Le}from"./PanelLayoutControls-CKWjLO_e.js";import{t as Re}from"./env-BfPir1X4.js";import{a as ze,n as Be,t as Ve}from"./tooltip-BhCWnsdW.js";import{o as He}from"./sidebar-BUDllWET.js";import{i as Ue,n as We,o as Ge,r as Ke,t as qe}from"./empty-Dn5VI2Xk.js";import{_ as Je,y as Ye}from"./keybindings-CrlWqd5q.js";import{a as Xe,f as q,u as Ze}from"./RenderErrorBoundary-Dbb6Gs8P.js";import{n as Qe}from"./sourceControlClients-Bg3Of7DX.js";import{n as $e}from"./pullRequestIcons-DwblWS4R.js";import{B as et,C as tt,D as nt,E as rt,F as it,H as at,I as ot,L as st,M as ct,N as lt,O as ut,P as dt,R as ft,S as pt,T as mt,U as ht,V as gt,W as _t,_ as vt,b as yt,d as bt,f as xt,g as St,h as Ct,j as wt,k as Tt,l as Et,m as Dt,o as Ot,p as kt,r as At,s as jt,v as Mt,w as Nt,x as Pt,y as Ft,z as It}from"./pullRequests-DAMVEVGR.js";import{t as Lt}from"./ProjectFavicon-BEsCcLjN.js";import{n as Rt,r as zt,t as J}from"./input-group-B1TOCtDG.js";import{A as Bt,S as Vt,v as Y}from"./useHandleNewThread-DTgcUVdd.js";import{d as Ht,f as Ut,p as Wt}from"./p4ProjectFile-DlnfrOnm.js";import{i as Gt,n as Kt}from"./uiStateStore-B25zCY_s.js";import{r as qt}from"./EnvironmentMachineIcon-DM48TG2x.js";import{r as Jt}from"./sidebarProjectGrouping-Dt_irkWm.js";import{t as Yt}from"./WorkspacePageContainer-OLpcgD_f.js";import{Fa as Xt,Ki as Zt,Oa as Qt,On as $t,Ti as en,Uo as tn,di as nn,fi as rn,hi as an,ka as on,mi as sn,n as cn,nr as ln,qi as un,t as dn}from"./main-xhw8F2iL.js";import{t as fn}from"./WorkspacePageHeader-Bn0m4gpR.js";import{n as pn}from"./usePullRequestActions-BGugTe1S.js";import{n as mn,r as hn,t as X}from"./WorkspaceBreadcrumb-Dno2N8Xd.js";var Z=n(),gn=class{props;static activators=[{eventName:`onPointerDown`,handler:({nativeEvent:e})=>e.isPrimary&&e.button===0}];autoScrollEnabled=!0;phase=`pending`;pointer;document;window;constructor(e){this.props=e,this.pointer=e.event,this.document=Zt(this.pointer.target),this.window=un(this.pointer.target),this.document.addEventListener(`pointermove`,this.move,{passive:!1,capture:!0}),this.document.addEventListener(`pointerup`,this.end,{capture:!0}),this.document.addEventListener(`pointercancel`,this.pointerCancel,{capture:!0}),this.document.addEventListener(`keydown`,this.keydown,{capture:!0}),this.document.addEventListener(`visibilitychange`,this.visibilityChange),this.window.addEventListener(`blur`,this.cancel),this.window.addEventListener(`pagehide`,this.cancel),this.window.addEventListener(`resize`,this.cancel),this.document.addEventListener(`dragstart`,this.preventDefault),this.document.addEventListener(`contextmenu`,this.preventDefault),e.options.onAttach(this),e.onPending(e.active,{distance:e.options.distance},this.coordinates())}coordinates=()=>({x:this.pointer.clientX,y:this.pointer.clientY});preventDefault=e=>e.preventDefault();clearClickSuppression=()=>{this.document.removeEventListener(`click`,this.suppressClick,{capture:!0}),this.document.removeEventListener(`pointerdown`,this.clearClickSuppression,{capture:!0})};suppressClick=e=>{e.stopPropagation(),this.clearClickSuppression()};clearSelection=()=>this.document.getSelection()?.removeAllRanges();move=e=>{if(this.phase===`finished`||e.pointerId!==this.pointer.pointerId)return;let t={x:e.clientX,y:e.clientY};if(!(e.buttons&1))return this.phase===`dragging`&&this.props.options.onDrop?.(t),this.cancel();if(this.phase===`pending`){let t={x:e.clientX-this.pointer.clientX,y:e.clientY-this.pointer.clientY};if(Math.hypot(t.x,t.y)<=this.props.options.distance){this.props.onPending(this.props.active,{distance:this.props.options.distance},this.coordinates(),t);return}this.phase=`dragging`,this.document.addEventListener(`click`,this.suppressClick,{capture:!0}),this.document.addEventListener(`selectionchange`,this.clearSelection),this.clearSelection(),this.props.onStart(this.coordinates())}if(this.phase===`dragging`){if(e.cancelable&&e.preventDefault(),this.props.options.onMove?.(t)===!0)return;this.props.onMove(t)}};end=e=>{if(e.pointerId!==this.pointer.pointerId)return;let t=this.phase===`dragging`&&this.props.options.onDrop?.({x:e.clientX,y:e.clientY})===!0;this.finish(t)};pointerCancel=e=>{e.pointerId===this.pointer.pointerId&&this.cancel()};keydown=e=>{e.code===`Escape`&&this.cancel()};visibilityChange=()=>{this.document.hidden&&this.cancel()};cancel=()=>this.finish(!0);finish(e){if(this.phase===`finished`)return;let t=this.phase===`pending`;this.phase=`finished`,this.document.removeEventListener(`pointermove`,this.move,{capture:!0}),this.document.removeEventListener(`pointerup`,this.end,{capture:!0}),this.document.removeEventListener(`pointercancel`,this.pointerCancel,{capture:!0}),this.document.removeEventListener(`keydown`,this.keydown,{capture:!0}),this.document.removeEventListener(`visibilitychange`,this.visibilityChange),this.window.removeEventListener(`blur`,this.cancel),this.window.removeEventListener(`pagehide`,this.cancel),this.window.removeEventListener(`resize`,this.cancel),this.document.removeEventListener(`dragstart`,this.preventDefault),this.document.removeEventListener(`contextmenu`,this.preventDefault),this.document.removeEventListener(`selectionchange`,this.clearSelection),(!t||e)&&(this.document.addEventListener(`click`,this.suppressClick,{capture:!0}),this.document.addEventListener(`pointerdown`,this.clearClickSuppression,{capture:!0}));try{this.props.options.onFinish(!t)}finally{t&&this.props.onAbort(this.props.active),e?this.props.onCancel():this.props.onEnd()}}},Q=e(t(),1);function _n(e,t){let n=new Map;for(let t of e)n.set(t.title,(n.get(t.title)??0)+1);return e.map(e=>(n.get(e.title)??0)>1?{...e,title:`${e.title} · ${t(e)}`}:e)}function vn(e,t,n){let r=new Map;for(let t of e){let e=t.repositoryIdentity?.canonicalKey?.toLowerCase(),i=JSON.stringify([t.environmentId,e?[`repository`,e]:[`project`,t.id]]),a=t.id===n?.id&&t.environmentId===n.environmentId;(!r.has(i)||a)&&r.set(i,t)}return _n(_n(_n(_n([...r.values()],e=>t.get(e.environmentId)??e.environmentId),e=>e.workspaceRoot),e=>e.environmentId),e=>e.id).sort((e,t)=>e.title.localeCompare(t.title))}var $=e(r(),1);function yn(e){let t=(0,Z.c)(3),{option:n}=e,r;return t[0]!==n.Icon||t[1]!==n.project?(r=n.project?(0,$.jsx)(Lt,{project:n.project,className:`size-3.5`}):(0,$.jsx)(n.Icon,{"aria-hidden":!0,className:`size-3.5`}),t[0]=n.Icon,t[1]=n.project,t[2]=r):r=t[2],r}function bn(e,t){return e.filter(e=>e.kind===t.kind).length>1?t.host:$t(t.kind).providerName}function xn(e){let t=(0,Z.c)(14),{value:n,busy:r,onChange:i}=e,[a,o]=(0,Q.useState)(null),s;t[0]===r?s=t[1]:(s=(0,$.jsx)(Rt,{children:r?(0,$.jsx)(H,{"aria-hidden":!0}):(0,$.jsx)(x,{"aria-hidden":!0})}),t[0]=r,t[1]=s);let c=a??n,l;t[2]===n?l=t[3]:(l=()=>o(n),t[2]=n,t[3]=l);let u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>o(null),t[4]=u):u=t[4];let d;t[5]===i?d=t[6]:(d=e=>{o(e.currentTarget.value),i(e.currentTarget.value)},t[5]=i,t[6]=d);let f;t[7]!==c||t[8]!==l||t[9]!==d?(f=(0,$.jsx)(zt,{type:`search`,value:c,onFocus:l,onBlur:u,onChange:d,placeholder:`Search pull requests, or label:bug`,"aria-label":`Search pull requests`}),t[7]=c,t[8]=l,t[9]=d,t[10]=f):f=t[10];let p;return t[11]!==s||t[12]!==f?(p=(0,$.jsxs)(J,{className:`min-w-0 flex-1 **:[input]:h-9 sm:**:[input]:h-8`,children:[s,f]}),t[11]=s,t[12]=f,t[13]=p):p=t[13],p}var Sn=`all`,Cn=``,wn=``,Tn=`all`,En=e=>JSON.stringify([e.environmentId,e.id]),Dn=[{value:Tn,label:`All`,Icon:u},{value:`only`,label:`Drafts only`,Icon:$e.draft},{value:`hide`,label:`Hide drafts`,Icon:b}],On=[{value:Tn,label:`All`,Icon:u},{value:`approved`,label:`Approved`,Icon:d},{value:`changes-requested`,label:`Changes requested`,Icon:m},{value:`review-required`,label:`Review required`,Icon:L},{value:`none`,label:`No reviews`,Icon:o}],kn=[{value:Tn,label:`All`,Icon:u},{value:`passing`,label:`Passing`,Icon:d},{value:`failing`,label:`Failing`,Icon:m}];function An(e){let t=(0,Z.c)(12),{label:n,value:r,options:i,onChange:a}=e,o;t[0]!==a||t[1]!==r?(o=e=>{e!==r&&a(e)},t[0]=a,t[1]=r,t[2]=o):o=t[2];let s;t[3]===n?s=t[4]:(s=(0,$.jsx)(w,{children:n}),t[3]=n,t[4]=s);let c;t[5]===i?c=t[6]:(c=i.map(jn),t[5]=i,t[6]=c);let l;return t[7]!==o||t[8]!==s||t[9]!==c||t[10]!==r?(l=(0,$.jsxs)(E,{value:r,onValueChange:o,children:[s,c]}),t[7]=o,t[8]=s,t[9]=c,t[10]=r,t[11]=l):l=t[11],l}function jn(e){let t=(0,$.jsx)(y,{value:e.value,className:e.unavailable?`data-disabled:pointer-events-auto`:void 0,disabled:e.unavailable!==void 0,children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(yn,{option:e}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),e.unavailable?(0,$.jsx)(`span`,{className:`shrink-0`,children:`· Unavailable`}):null,(0,$.jsx)(A,{})]})},e.value);return e.unavailable?(0,$.jsxs)(Ve,{children:[(0,$.jsx)(ze,{render:t}),(0,$.jsx)(Be,{side:`top`,children:e.unavailable})]},e.value):t}function Mn(e){let t=(0,Z.c)(21),{label:n,value:r,options:i,onChange:a}=e,o;t[0]!==i||t[1]!==r?(o=i.find(e=>e.value===r)??i[0],t[0]=i,t[1]=r,t[2]=o):o=t[2];let s=o;if(!s)return null;let c;t[3]===s?c=t[4]:(c=(0,$.jsx)(yn,{option:s}),t[3]=s,t[4]=c);let l;t[5]===n?l=t[6]:(l=(0,$.jsx)(`span`,{className:`flex-1`,children:n}),t[5]=n,t[6]=l);let u;t[7]===s.label?u=t[8]:(u=(0,$.jsx)(`span`,{className:`min-w-0 max-w-32 truncate text-xs text-muted-foreground`,children:s.label}),t[7]=s.label,t[8]=u);let d;t[9]!==c||t[10]!==l||t[11]!==u?(d=(0,$.jsxs)(S,{children:[c,l,u]}),t[9]=c,t[10]=l,t[11]=u,t[12]=d):d=t[12];let f;t[13]!==n||t[14]!==a||t[15]!==i||t[16]!==r?(f=(0,$.jsx)(I,{children:(0,$.jsx)(An,{label:n,value:r,options:i,onChange:a})}),t[13]=n,t[14]=a,t[15]=i,t[16]=r,t[17]=f):f=t[17];let p;return t[18]!==d||t[19]!==f?(p=(0,$.jsxs)(O,{children:[d,f]}),t[18]=d,t[19]=f,t[20]=p):p=t[20],p}function Nn(e){let t=(0,Z.c)(47),{value:n,options:r,onChange:i}=e,[a,o]=(0,Q.useState)(``),s,l,d,f,p,m,h,g,_,v;if(t[0]!==i||t[1]!==r||t[2]!==a||t[3]!==n){let e=a.trim().toLowerCase(),b;t[14]===n?b=t[15]:(b=n?.toLowerCase()??``,t[14]=n,t[15]=b);let C=b,w;t[16]===C?w=t[17]:(w=e=>e.actor.login.toLowerCase()===C,t[16]=C,t[17]=w);let T=r.find(w);v=[...T?[T]:[],...r.filter(t=>t!==T&&(e.length===0||t.actor.login.toLowerCase().includes(e)||t.actor.name?.toLowerCase().includes(e)))].slice(0,10);let D;t[18]!==C||t[19]!==i?(D=e=>e.toLowerCase()!==C&&i(e||void 0),t[18]=C,t[19]=i,t[20]=D):D=t[20];let ee=D;d=O;let k,A;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsx)(c,{"aria-hidden":!0,className:`size-3.5`}),A=(0,$.jsx)(`span`,{className:`flex-1`,children:`Author`}),t[21]=k,t[22]=A):(k=t[21],A=t[22]);let j=n??`Anyone`;t[23]===j?_=t[24]:(_=(0,$.jsxs)(S,{children:[k,A,(0,$.jsx)(`span`,{className:`min-w-0 max-w-32 truncate text-xs text-muted-foreground`,children:j})]}),t[23]=j,t[24]=_),l=I;let M;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsx)(Rt,{children:(0,$.jsx)(x,{"aria-hidden":!0})}),t[25]=M):M=t[25];let N;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(N=e=>o(e.currentTarget.value),t[26]=N):N=t[26],t[27]===a?g=t[28]:(g=(0,$.jsx)(`div`,{className:`p-1 pb-2`,children:(0,$.jsxs)(J,{children:[M,(0,$.jsx)(zt,{autoFocus:!0,size:`compact`,value:a,onChange:N,onKeyDown:Fn,placeholder:`Search authors`,"aria-label":`Search authors`})]})}),t[27]=a,t[28]=g),s=E,f=T?.actor.login??n??``,p=ee,t[29]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(y,{value:``,children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(u,{"aria-hidden":!0,className:`size-3.5`}),`Anyone`]})}),t[29]=m):m=t[29],h=v.map(Pn),t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s,t[5]=l,t[6]=d,t[7]=f,t[8]=p,t[9]=m,t[10]=h,t[11]=g,t[12]=_,t[13]=v}else s=t[4],l=t[5],d=t[6],f=t[7],p=t[8],m=t[9],h=t[10],g=t[11],_=t[12],v=t[13];let b;t[30]===v.length?b=t[31]:(b=v.length===0?(0,$.jsx)(F,{disabled:!0,children:`No authors found`}):null,t[30]=v.length,t[31]=b);let C;t[32]!==s||t[33]!==f||t[34]!==p||t[35]!==m||t[36]!==h||t[37]!==b?(C=(0,$.jsxs)(s,{value:f,onValueChange:p,children:[m,h,b]}),t[32]=s,t[33]=f,t[34]=p,t[35]=m,t[36]=h,t[37]=b,t[38]=C):C=t[38];let w;t[39]!==l||t[40]!==g||t[41]!==C?(w=(0,$.jsxs)(l,{children:[g,C]}),t[39]=l,t[40]=g,t[41]=C,t[42]=w):w=t[42];let T;return t[43]!==d||t[44]!==_||t[45]!==w?(T=(0,$.jsxs)(d,{children:[_,w]}),t[43]=d,t[44]=_,t[45]=w,t[46]=T):T=t[46],T}function Pn(e){return(0,$.jsx)(y,{value:e.actor.login,children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(Xe,{actor:e.actor}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.actor.login}),(0,$.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:[e.mergedCount,` merges loaded`]})]})},e.actor.login.toLowerCase())}function Fn(e){e.key!==`ArrowDown`&&e.key!==`Escape`&&e.stopPropagation()}function In(e){let t=(0,Z.c)(21),{value:n,options:r,onChange:i}=e,a;t[0]===n?a=t[1]:(a=new Set(n.map(Rn)),t[0]=n,t[1]=a);let o=a,s,c,u,d;if(t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==n){let e=[...n.filter(e=>!r.some(t=>t.name.toLowerCase()===e.toLowerCase())).map(Ln),...r];c=O;let a,f;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(D,{"aria-hidden":!0,className:`size-3.5`}),f=(0,$.jsx)(`span`,{className:`flex-1`,children:`Labels`}),t[10]=a,t[11]=f):(a=t[10],f=t[11]);let p=n.length===0?`Any`:`${n.length} selected`;t[12]===p?d=t[13]:(d=(0,$.jsxs)(S,{children:[a,f,(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:p})]}),t[12]=p,t[13]=d),s=I,u=e.length===0?(0,$.jsx)(F,{disabled:!0,children:`No labels in this view`}):e.map(e=>{let t=e.name.toLowerCase(),r=o.has(t),a=ut(e.color);return(0,$.jsx)(l,{checked:r,onCheckedChange:t=>i(t?[...n,e.name]:n.filter(t=>t.toLowerCase()!==e.name.toLowerCase())),children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:`size-2.5 shrink-0 rounded-full bg-muted-foreground`,...a?{style:{backgroundColor:a}}:{}}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.name}),(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:e.count})]})},t)}),t[2]=i,t[3]=r,t[4]=o,t[5]=n,t[6]=s,t[7]=c,t[8]=u,t[9]=d}else s=t[6],c=t[7],u=t[8],d=t[9];let f;t[14]!==s||t[15]!==u?(f=(0,$.jsx)(s,{children:u}),t[14]=s,t[15]=u,t[16]=f):f=t[16];let p;return t[17]!==c||t[18]!==d||t[19]!==f?(p=(0,$.jsxs)(c,{children:[d,f]}),t[17]=c,t[18]=d,t[19]=f,t[20]=p):p=t[20],p}function Ln(e){return{name:e,color:null,count:0}}function Rn(e){return e.toLowerCase()}function zn(e){let t=(0,Z.c)(107),{onOpenChange:n,state:r,stateOptions:i,onState:a,involvement:o,involvementOptions:s,onInvolvement:c,filters:l,onFilters:d,authorOptions:f,labelOptions:m,host:h,hostOptions:g,onHost:v,server:y,serverOptions:b,onServer:x,projects:S,projectId:C,projectEnvironmentId:w,unavailable:E,onProject:D}=e,ee;t[0]===f?ee=t[1]:(ee=f===void 0?[]:f,t[0]=f,t[1]=ee);let O=ee,A;t[2]===m?A=t[3]:(A=m===void 0?[]:m,t[2]=m,t[3]=A);let P=A,te,F;t[4]!==l.author||t[5]!==l.checks||t[6]!==l.draft||t[7]!==l.labels||t[8]!==l.review||t[9]!==h||t[10]!==o||t[11]!==C||t[12]!==y||t[13]!==r?(te=(l.labels??[]).flatMap(Hn),F=[r!==`open`,o!==`all`,h,y,C,l.draft,l.review,l.checks,l.author,...te].filter(Boolean),t[4]=l.author,t[5]=l.checks,t[6]=l.draft,t[7]=l.labels,t[8]=l.review,t[9]=h,t[10]=o,t[11]=C,t[12]=y,t[13]=r,t[14]=te,t[15]=F):(te=t[14],F=t[15]);let I=F.length,L;t[16]!==l||t[17]!==d?(L=e=>d(Object.fromEntries(Object.entries({...l,...e}).filter(Vn))),t[16]=l,t[17]=d,t[18]=L):L=t[18];let R=L,ne;t[19]===R?ne=t[20]:(ne=(e,t)=>R({[e]:t===Tn?void 0:t}),t[19]=R,t[20]=ne);let z=ne,re;t[21]!==w||t[22]!==C?(re=C===void 0||w===void 0?Sn:En({id:C,environmentId:w}),t[21]=w,t[22]=C,t[23]=re):re=t[23];let B=re,V;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(V={value:Sn,label:`All projects`,Icon:u},t[24]=V):V=t[24];let H;if(t[25]!==S||t[26]!==E){let e;t[28]===E?e=t[29]:(e=(e,t)=>Number(E.has(En(e)))-Number(E.has(En(t))),t[28]=E,t[29]=e);let n;t[30]===E?n=t[31]:(n=e=>({value:En(e),label:e.title,Icon:p,project:e,...E.has(En(e))?{unavailable:E.get(En(e))}:{}}),t[30]=E,t[31]=n),H=[V,...S.toSorted(e).map(n)],t[25]=S,t[26]=E,t[27]=H}else H=t[27];let ie=H,ae,oe,se;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,$.jsx)(k,{variant:`outline`}),oe=(0,$.jsx)(j,{className:`size-4`}),se=(0,$.jsx)(`span`,{children:`Filters`}),t[32]=ae,t[33]=oe,t[34]=se):(ae=t[32],oe=t[33],se=t[34]);let ce;t[35]===I?ce=t[36]:(ce=I>0?(0,$.jsx)(`span`,{className:`rounded-full bg-muted px-1.5 text-xs text-muted-foreground tabular-nums`,children:I}):null,t[35]=I,t[36]=ce);let le;t[37]===ce?le=t[38]:(le=(0,$.jsxs)(T,{render:ae,children:[oe,se,ce]}),t[37]=ce,t[38]=le);let U;t[39]!==a||t[40]!==r||t[41]!==i?(U=(0,$.jsx)(Mn,{label:`State`,value:r,options:i,onChange:a}),t[39]=a,t[40]=r,t[41]=i,t[42]=U):U=t[42];let W;t[43]!==o||t[44]!==s||t[45]!==c?(W=(0,$.jsx)(Mn,{label:`Involvement`,value:o,options:s,onChange:c}),t[43]=o,t[44]=s,t[45]=c,t[46]=W):W=t[46];let ue;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,$.jsx)(N,{}),t[47]=ue):ue=t[47];let de;t[48]===R?de=t[49]:(de=e=>R({author:e}),t[48]=R,t[49]=de);let fe;t[50]!==O||t[51]!==l.author||t[52]!==de?(fe=(0,$.jsx)(Nn,{value:l.author,options:O,onChange:de}),t[50]=O,t[51]=l.author,t[52]=de,t[53]=fe):fe=t[53];let pe;t[54]===R?pe=t[55]:(pe=e=>R({labels:e.length===0?void 0:e.slice(0,10).map(Bn)}),t[54]=R,t[55]=pe);let me;t[56]!==P||t[57]!==te||t[58]!==pe?(me=(0,$.jsx)(In,{value:te,options:P,onChange:pe}),t[56]=P,t[57]=te,t[58]=pe,t[59]=me):me=t[59];let he=l.draft??Tn,ge;t[60]===z?ge=t[61]:(ge=e=>z(`draft`,e),t[60]=z,t[61]=ge);let G;t[62]!==he||t[63]!==ge?(G=(0,$.jsx)(Mn,{label:`Draft`,value:he,options:Dn,onChange:ge}),t[62]=he,t[63]=ge,t[64]=G):G=t[64];let _e=l.review??Tn,ve;t[65]===z?ve=t[66]:(ve=e=>z(`review`,e),t[65]=z,t[66]=ve);let ye;t[67]!==_e||t[68]!==ve?(ye=(0,$.jsx)(Mn,{label:`Review`,value:_e,options:On,onChange:ve}),t[67]=_e,t[68]=ve,t[69]=ye):ye=t[69];let be=l.checks??Tn,xe;t[70]===z?xe=t[71]:(xe=e=>z(`checks`,e),t[70]=z,t[71]=xe);let Se;t[72]!==be||t[73]!==xe?(Se=(0,$.jsx)(Mn,{label:`Checks`,value:be,options:kn,onChange:xe}),t[72]=be,t[73]=xe,t[74]=Se):Se=t[74];let Ce;t[75]!==h||t[76]!==g||t[77]!==v?(Ce=g.length>2?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(N,{}),(0,$.jsx)(Mn,{label:`Host`,value:h??Cn,options:g,onChange:e=>v(e===Cn?void 0:e)})]}):null,t[75]=h,t[76]=g,t[77]=v,t[78]=Ce):Ce=t[78];let we;t[79]!==x||t[80]!==y||t[81]!==b?(we=b.length>2?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(N,{}),(0,$.jsx)(Mn,{label:`Server`,value:y??wn,options:b,onChange:e=>x(e===wn?void 0:e)})]}):null,t[79]=x,t[80]=y,t[81]=b,t[82]=we):we=t[82];let Te;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,$.jsx)(N,{}),t[83]=Te):Te=t[83];let K;t[84]!==D||t[85]!==C||t[86]!==S?(K=e=>{let t=S.find(t=>En(t)===e);t?D(t.id,t.environmentId):C!==void 0&&D(void 0,void 0)},t[84]=D,t[85]=C,t[86]=S,t[87]=K):K=t[87];let Ee;t[88]!==ie||t[89]!==B||t[90]!==K?(Ee=(0,$.jsx)(Mn,{label:`Project`,value:B,options:ie,onChange:K}),t[88]=ie,t[89]=B,t[90]=K,t[91]=Ee):Ee=t[91];let De;t[92]!==U||t[93]!==W||t[94]!==fe||t[95]!==me||t[96]!==G||t[97]!==ye||t[98]!==Se||t[99]!==Ce||t[100]!==we||t[101]!==Ee?(De=(0,$.jsxs)(M,{align:`end`,side:`bottom`,children:[U,W,ue,fe,me,G,ye,Se,Ce,we,Te,Ee]}),t[92]=U,t[93]=W,t[94]=fe,t[95]=me,t[96]=G,t[97]=ye,t[98]=Se,t[99]=Ce,t[100]=we,t[101]=Ee,t[102]=De):De=t[102];let Oe;return t[103]!==n||t[104]!==le||t[105]!==De?(Oe=(0,$.jsxs)(_,{onOpenChange:n,children:[le,De]}),t[103]=n,t[104]=le,t[105]=De,t[106]=Oe):Oe=t[106],Oe}function Bn(e){return[e]}function Vn(e){let[,t]=e;return t!==void 0}function Hn(e){return e}function Un(e){let t=(0,Z.c)(12),{joined:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(`path`,{d:`M10 58h100`,className:`text-muted-foreground/30`,stroke:`currentColor`}),i=(0,$.jsx)(`circle`,{cx:`10`,cy:`58`,r:`5`,fill:`currentColor`,fillOpacity:.25}),a=(0,$.jsx)(`circle`,{cx:`110`,cy:`58`,r:`5`,fill:`currentColor`,fillOpacity:.25}),t[0]=r,t[1]=i,t[2]=a):(r=t[0],i=t[1],a=t[2]);let o;t[3]===n?o=t[4]:(o=n?(0,$.jsx)(`path`,{d:`M30 58c0-18 8-26 24-26h12c16 0 24 8 24 26`}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`path`,{d:`M30 58c0-18 8-26 24-26h4`}),(0,$.jsx)(`path`,{d:`M90 58c0-18-8-26-24-26h-4`,strokeDasharray:`2 7`,className:`text-muted-foreground/50`})]}),t[3]=n,t[4]=o);let s=n?5:4,c=n?`currentColor`:`none`,l=n?void 0:`text-muted-foreground/45`,u;t[5]!==s||t[6]!==c||t[7]!==l?(u=(0,$.jsx)(`circle`,{cx:`60`,cy:`32`,r:s,fill:c,fillOpacity:.25,className:l}),t[5]=s,t[6]=c,t[7]=l,t[8]=u):u=t[8];let d;return t[9]!==o||t[10]!==u?(d=(0,$.jsxs)(`svg`,{"aria-hidden":!0,viewBox:`0 0 120 72`,className:`h-20 w-32 text-muted-foreground/60`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,children:[r,i,a,o,u]}),t[9]=o,t[10]=u,t[11]=d):d=t[11],d}function Wn(e){let t=(0,Z.c)(56),{query:n,filtered:r,searching:i,hasProjects:a,canLoadMore:o,loadingMore:s,refreshing:c,onClearQuery:l,onLoadMore:u,onRefresh:d}=e;if(!a){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Un,{joined:!1}),t[0]=e):e=t[0];let n;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsxs)(Ue,{children:[(0,$.jsx)(Ge,{children:`No projects in this workspace`}),(0,$.jsx)(Ke,{children:`Add a project, and the pull requests from its repository appear here.`})]}),t[1]=n):n=t[1];let r;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsxs)(qe,{children:[e,n,(0,$.jsx)(We,{children:(0,$.jsxs)(k,{size:`sm`,onClick:Gn,children:[(0,$.jsx)(g,{className:`size-3.5`}),`Add project`]})})]}),t[2]=r):r=t[2],r}if(i){let e;t[3]===n?e=t[4]:(e=n.length>48?`${n.slice(0,48)}…`:n,t[3]=n,t[4]=e);let r=`Searching every host for “${e}”`,i;return t[5]===r?i=t[6]:(i=(0,$.jsx)(Fe,{rows:5,caption:r}),t[5]=r,t[6]=i),i}if(n.length>0){let e;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Un,{joined:!1}),t[7]=e):e=t[7];let r;t[8]===n?r=t[9]:(r=n.length>48?`${n.slice(0,48)}…`:n,t[8]=n,t[9]=r);let i;t[10]===r?i=t[11]:(i=(0,$.jsxs)(Ge,{children:[`Nothing matches “`,r,`”`]}),t[10]=r,t[11]=i);let a;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(Ke,{children:`The hosts were searched for it. Try fewer words, or search by number, author or branch.`}),t[12]=a):a=t[12];let o;t[13]===i?o=t[14]:(o=(0,$.jsxs)(Ue,{children:[i,a]}),t[13]=i,t[14]=o);let s;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(x,{className:`size-3.5`}),t[15]=s):s=t[15];let u;t[16]===l?u=t[17]:(u=(0,$.jsxs)(k,{size:`sm`,variant:`outline`,onClick:l,children:[s,`Clear search`]}),t[16]=l,t[17]=u);let f;t[18]===c?f=t[19]:(f=(0,$.jsx)(tn,{size:`sm`,refreshing:c}),t[18]=c,t[19]=f);let p=c?`Checking...`:`Check again`,m;t[20]!==d||t[21]!==c||t[22]!==f||t[23]!==p?(m=(0,$.jsxs)(k,{size:`sm`,variant:`outline`,disabled:c,onClick:d,children:[f,p]}),t[20]=d,t[21]=c,t[22]=f,t[23]=p,t[24]=m):m=t[24];let h;t[25]!==m||t[26]!==u?(h=(0,$.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2`,children:[u,m]}),t[25]=m,t[26]=u,t[27]=h):h=t[27];let g;return t[28]!==h||t[29]!==o?(g=(0,$.jsxs)(qe,{children:[e,o,h]}),t[28]=h,t[29]=o,t[30]=g):g=t[30],g}let f;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(Un,{joined:!1}),t[31]=f):f=t[31];let p=r?`Nothing under these filters`:`No pull requests`,m;t[32]===p?m=t[33]:(m=(0,$.jsx)(Ge,{children:p}),t[32]=p,t[33]=m);let h=r?`Widen the state, involvement or project filter to see more.`:`Pull requests from every project in this workspace appear here.`,_;t[34]===h?_=t[35]:(_=(0,$.jsx)(Ke,{children:h}),t[34]=h,t[35]=_);let v;t[36]!==m||t[37]!==_?(v=(0,$.jsxs)(Ue,{children:[m,_]}),t[36]=m,t[37]=_,t[38]=v):v=t[38];let y;t[39]!==o||t[40]!==s||t[41]!==u?(y=o?(0,$.jsx)(k,{size:`sm`,variant:`outline`,disabled:s,onClick:u,children:s?`Loading...`:`Load more pull requests`}):null,t[39]=o,t[40]=s,t[41]=u,t[42]=y):y=t[42];let b;t[43]===c?b=t[44]:(b=(0,$.jsx)(tn,{size:`sm`,refreshing:c}),t[43]=c,t[44]=b);let S=c?`Checking...`:`Check again`,C;t[45]!==d||t[46]!==c||t[47]!==b||t[48]!==S?(C=(0,$.jsxs)(k,{size:`sm`,variant:`outline`,disabled:c,onClick:d,children:[b,S]}),t[45]=d,t[46]=c,t[47]=b,t[48]=S,t[49]=C):C=t[49];let w;t[50]!==C||t[51]!==y?(w=(0,$.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2`,children:[y,C]}),t[50]=C,t[51]=y,t[52]=w):w=t[52];let T;return t[53]!==w||t[54]!==v?(T=(0,$.jsxs)(qe,{children:[f,v,w]}),t[53]=w,t[54]=v,t[55]=T):T=t[55],T}function Gn(){return an({open:`add-project`})}function Kn(e){let t=(0,Z.c)(22),{environmentId:n,reference:r,onSelect:i,stackNumber:a}=e,o=Ie(n,r);if(o.data!==null){let e=!!o.error,n;t[0]!==o.data.number||t[1]!==o.notice||t[2]!==e?(n=(0,$.jsx)(Le,{number:o.data.number,notice:o.notice,stale:e}),t[0]=o.data.number,t[1]=o.notice,t[2]=e,t[3]=n):n=t[3];let a;t[4]!==o.error||t[5]!==o.refresh?(a=o.error?(0,$.jsx)(F,{onClick:o.refresh,children:`Retry stack refresh`}):null,t[4]=o.error,t[5]=o.refresh,t[6]=a):a=t[6];let s;t[7]!==i||t[8]!==o.data||t[9]!==r?(s=(0,$.jsx)(ye,{stack:o.data,reference:r,onSelect:i}),t[7]=i,t[8]=o.data,t[9]=r,t[10]=s):s=t[10];let c;return t[11]!==n||t[12]!==a||t[13]!==s?(c=(0,$.jsxs)($.Fragment,{children:[n,a,s]}),t[11]=n,t[12]=a,t[13]=s,t[14]=c):c=t[14],c}let s;t[15]===a?s=t[16]:(s=(0,$.jsx)(Le,{number:a}),t[15]=a,t[16]=s);let c=o.error??(o.isPending?`Loading stack…`:`This pull request is no longer in a stack.`),l;t[17]===c?l=t[18]:(l=(0,$.jsx)(w,{children:c}),t[17]=c,t[18]=l);let u;return t[19]!==s||t[20]!==l?(u=(0,$.jsxs)($.Fragment,{children:[s,l]}),t[19]=s,t[20]=l,t[21]=u):u=t[21],u}function qn(e){let t=(0,Z.c)(25),{environmentId:n,reference:r,membership:a,onSelect:o}=e,[s,c]=(0,Q.useState)(!1),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(`span`,{role:`button`,tabIndex:0,className:`inline-flex shrink-0 cursor-pointer items-center gap-1 text-xs font-normal text-muted-foreground`}),t[0]=l):l=t[0];let u=`Stack ${a.number}, layer ${a.position} of ${a.size}`,d;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)($e.stack,{"aria-hidden":!0,className:`size-3`}),t[1]=d):d=t[1];let f;t[2]!==a.position||t[3]!==a.size||t[4]!==u?(f=(0,$.jsx)(ze,{render:(0,$.jsxs)(T,{nativeButton:!1,render:l,"aria-label":u,onClick:Zn,onKeyDown:Xn,children:[d,a.position,`/`,a.size]})}),t[2]=a.position,t[3]=a.size,t[4]=u,t[5]=f):f=t[5];let p;t[6]!==a.number||t[7]!==a.position||t[8]!==a.size?(p=(0,$.jsxs)(Be,{children:[`View stack #`,a.number,`, layer `,a.position,` of `,a.size]}),t[6]=a.number,t[7]=a.position,t[8]=a.size,t[9]=p):p=t[9];let m;t[10]!==f||t[11]!==p?(m=(0,$.jsxs)(Ve,{children:[f,p]}),t[10]=f,t[11]=p,t[12]=m):m=t[12];let h;t[13]!==n||t[14]!==a.number||t[15]!==o||t[16]!==s||t[17]!==r?(h=s?(0,$.jsx)(Kn,{environmentId:n,reference:r,stackNumber:a.number,onSelect:e=>{c(!1),o(e)}}):null,t[13]=n,t[14]=a.number,t[15]=o,t[16]=s,t[17]=r,t[18]=h):h=t[18];let g;t[19]===h?g=t[20]:(g=(0,$.jsx)(M,{align:`start`,onClick:Yn,onKeyDown:Jn,children:(0,$.jsx)(i,{children:h})}),t[19]=h,t[20]=g);let v;return t[21]!==s||t[22]!==m||t[23]!==g?(v=(0,$.jsxs)(_,{open:s,onOpenChange:c,children:[m,g]}),t[21]=s,t[22]=m,t[23]=g,t[24]=v):v=t[24],v}function Jn(e){return e.stopPropagation()}function Yn(e){return e.stopPropagation()}function Xn(e){return e.stopPropagation()}function Zn(e){return e.stopPropagation()}var Qn=[{overflow:`@xl/pr-row-meta:hidden`},{overflow:`@3xl/pr-row-meta:hidden`},{overflow:``}];function $n(e){let t=(0,Z.c)(4),{labels:n}=e;if(n.length===0)return null;let r;t[0]===n?r=t[1]:(r=Qn.map((e,t)=>{let r=n[t];if(!r)return null;let i=n.length-t-1;return(0,$.jsx)(Ze,{label:r,className:t===0?``:t===1?`hidden @xl/pr-row-meta:inline-flex`:`hidden @3xl/pr-row-meta:inline-flex`,children:i>0?(0,$.jsxs)(`span`,{className:te(`shrink-0`,e.overflow),children:[`+`,i]}):null},r.name)}),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,$.jsx)(`span`,{className:`flex min-w-0 items-center gap-1`,children:r}),t[2]=r,t[3]=i),i}var er=`px-3 py-2.5`;function tr(e){let t=(0,Z.c)(99),{entry:n,selected:r,showProjectTitle:i,showProvider:a,environmentLabel:o,matchedElsewhere:s,statsKey:c,statsRef:l,onSelect:u,speedMode:d,hostActions:f,onActed:p,closing:m,sweeping:h,onCloseSweepStart:g}=e,_=m!==void 0&&m,v=h!==void 0&&h,y;t[0]===n.provider?y=t[1]:(y=$t(n.provider),t[0]=n.provider,t[1]=y);let{Icon:b,providerName:S}=y,C=r?`bg-accent`:`hover:bg-accent/60`,w;t[2]===C?w=t[3]:(w=te(`flex items-center rounded-md [content-visibility:auto] [contain-intrinsic-block-size:56.5px]`,C),t[2]=C,t[3]=w);let T=r?`true`:void 0,E;t[4]!==n||t[5]!==u?(E=()=>u(n),t[4]=n,t[5]=u,t[6]=E):E=t[6];let D;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(D=te(xe,er,`min-w-0 flex-1 cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring`),t[7]=D):D=t[7];let ee;t[8]!==n.baseBranch||t[9]!==n.isDraft||t[10]!==n.mergeability||t[11]!==n.state?(ee=(0,$.jsx)(Ee,{state:n.state,isDraft:n.isDraft,mergeability:n.mergeability,baseBranch:n.baseBranch,className:`mt-0.75 self-start`}),t[8]=n.baseBranch,t[9]=n.isDraft,t[10]=n.mergeability,t[11]=n.state,t[12]=ee):ee=t[12];let O;t[13]!==n.provider||t[14]!==n.url?(O=e=>{e.preventDefault(),e.stopPropagation(),K({url:n.url,openLabel:De(Qe.get(n.provider)),position:{x:e.clientX,y:e.clientY}})},t[13]=n.provider,t[14]=n.url,t[15]=O):O=t[15];let k;t[16]!==n.number||t[17]!==O?(k=(0,$.jsxs)(`span`,{className:ke,onContextMenu:O,children:[`#`,n.number]}),t[16]=n.number,t[17]=O,t[18]=k):k=t[18];let A;t[19]!==n.checksState||t[20]!==n.environmentId||t[21]!==n.number||t[22]!==n.projectId||t[23]!==n.repository?(A=n.checksState===void 0?null:(0,$.jsx)(Ae,{checksState:n.checksState,environmentId:n.environmentId,reference:{projectId:n.projectId,repository:n.repository,number:n.number}}),t[19]=n.checksState,t[20]=n.environmentId,t[21]=n.number,t[22]=n.projectId,t[23]=n.repository,t[24]=A):A=t[24];let j;t[25]===n.reviewDecision?j=t[26]:(j=n.reviewDecision===void 0?null:(0,$.jsx)(q,{decision:n.reviewDecision}),t[25]=n.reviewDecision,t[26]=j);let M;t[27]!==A||t[28]!==j?(M=(0,$.jsxs)($.Fragment,{children:[A,j]}),t[27]=A,t[28]=j,t[29]=M):M=t[29];let N;t[30]!==n.environmentId||t[31]!==n.host||t[32]!==n.number||t[33]!==n.projectId||t[34]!==n.repository||t[35]!==n.stack||t[36]!==u?(N=n.stack?(0,$.jsx)(qn,{environmentId:n.environmentId,reference:{projectId:n.projectId,host:n.host,repository:n.repository,number:n.number},membership:n.stack,onSelect:e=>u({...e,host:n.host,environmentId:n.environmentId})}):null,t[30]=n.environmentId,t[31]=n.host,t[32]=n.number,t[33]=n.projectId,t[34]=n.repository,t[35]=n.stack,t[36]=u,t[37]=N):N=t[37];let P;t[38]!==n.host||t[39]!==n.number||t[40]!==n.projectId||t[41]!==n.repository?(P={projectId:n.projectId,host:n.host,repository:n.repository,number:n.number},t[38]=n.host,t[39]=n.number,t[40]=n.projectId,t[41]=n.repository,t[42]=P):P=t[42];let F;t[43]!==n.additions||t[44]!==n.deletions||t[45]!==n.environmentId||t[46]!==P?(F=(0,$.jsx)(Se,{environmentId:n.environmentId,reference:P,additions:n.additions,deletions:n.deletions,className:`font-mono`}),t[43]=n.additions,t[44]=n.deletions,t[45]=n.environmentId,t[46]=P,t[47]=F):F=t[47];let I;t[48]!==N||t[49]!==F?(I=(0,$.jsxs)($.Fragment,{children:[N,F]}),t[48]=N,t[49]=F,t[50]=I):I=t[50];let L;t[51]===s?L=t[52]:(L=s?(0,$.jsxs)(Ve,{children:[(0,$.jsxs)(ze,{render:(0,$.jsx)(`span`,{className:`flex min-w-6 items-center gap-1 overflow-hidden rounded-full border border-border/60 px-1 text-3xs`}),children:[(0,$.jsx)(`span`,{className:`sr-only`,children:`matched in the description`}),(0,$.jsx)(x,{"aria-hidden":!0,className:`size-3 shrink-0`}),(0,$.jsx)(`span`,{"aria-hidden":!0,className:`hidden truncate @xs/pr-row-meta:block`,children:`matched in the description`})]}),(0,$.jsx)(Be,{side:`top`,children:`Matched in the description`})]}):null,t[51]=s,t[52]=L);let R;t[53]!==b||t[54]!==S||t[55]!==a?(R=a?(0,$.jsxs)(Ve,{children:[(0,$.jsx)(ze,{render:(0,$.jsx)(`span`,{className:`inline-flex shrink-0`}),children:(0,$.jsx)(b,{"aria-label":S,className:`size-3`})}),(0,$.jsx)(Be,{children:S})]}):null,t[53]=b,t[54]=S,t[55]=a,t[56]=R):R=t[56];let ne;t[57]===n.author?ne=t[58]:(ne=(0,$.jsx)(Me,{actor:n.author,className:`min-w-3.5 max-w-40`,labelClassName:`sr-only @xs/pr-row-meta:not-sr-only @xs/pr-row-meta:truncate`}),t[57]=n.author,t[58]=ne);let z;t[59]!==n.repository||t[60]!==i?(z=i?(0,$.jsx)(`span`,{className:`truncate`,children:n.repository}):null,t[59]=n.repository,t[60]=i,t[61]=z):z=t[61];let re;t[62]===o?re=t[63]:(re=o?(0,$.jsx)(`span`,{className:`min-w-0 max-w-32 truncate`,children:o}):null,t[62]=o,t[63]=re);let B;t[64]===n.labels?B=t[65]:(B=n.labels.length>0?(0,$.jsx)($n,{labels:n.labels}):null,t[64]=n.labels,t[65]=B);let V;t[66]!==L||t[67]!==R||t[68]!==ne||t[69]!==z||t[70]!==re||t[71]!==B?(V=(0,$.jsxs)($.Fragment,{children:[L,R,ne,z,re,B]}),t[66]=L,t[67]=R,t[68]=ne,t[69]=z,t[70]=re,t[71]=B,t[72]=V):V=t[72];let H;t[73]!==n.title||t[74]!==n.updatedAt||t[75]!==k||t[76]!==M||t[77]!==I||t[78]!==V?(H=(0,$.jsx)(Pe,{number:k,title:n.title,signals:M,status:I,metaClassName:`@container/pr-row-meta`,meta:V,updatedAt:n.updatedAt}),t[73]=n.title,t[74]=n.updatedAt,t[75]=k,t[76]=M,t[77]=I,t[78]=V,t[79]=H):H=t[79];let ie;t[80]!==H||t[81]!==T||t[82]!==E||t[83]!==ee?(ie=(0,$.jsxs)(`button`,{type:`button`,"aria-current":T,onClick:E,className:D,children:[ee,H]}),t[80]=H,t[81]=T,t[82]=E,t[83]=ee,t[84]=ie):ie=t[84];let ae;t[85]!==_||t[86]!==n||t[87]!==f||t[88]!==p||t[89]!==g||t[90]!==d||t[91]!==v?(ae=f.size>0?(0,$.jsx)(Ce,{entry:n,hostActions:f,visible:d,onActed:p,closing:_,sweeping:v,...g?{onCloseSweepStart:g}:{}}):null,t[85]=_,t[86]=n,t[87]=f,t[88]=p,t[89]=g,t[90]=d,t[91]=v,t[92]=ae):ae=t[92];let oe;return t[93]!==c||t[94]!==l||t[95]!==ie||t[96]!==ae||t[97]!==w?(oe=(0,$.jsxs)(`div`,{ref:l,"data-pull-request-stats-key":c,"data-pull-request-key":c,className:w,children:[ie,ae]}),t[93]=c,t[94]=l,t[95]=ie,t[96]=ae,t[97]=w,t[98]=oe):oe=t[98],oe}var nr=(0,Q.memo)(tr);function rr(){let e=(0,Z.c)(15),t=z(),n=B(),r=V(),i=Gt(sr),a=U(or),o=U(Ut),s=W(),c=le(),l;e[0]!==i||e[1]!==t?(l=Y({items:t,preferredIds:i,getId:Ht,getPreferenceIds:ar}),e[0]=i,e[1]=t,e[2]=l):l=e[2];let u=l,d;if(e[3]!==s||e[4]!==o||e[5]!==u||e[6]!==c||e[7]!==t||e[8]!==a){let n=new Map(s.map(ir));d=Jt({projects:a===`manual`?u:t,groupScratchProjects:!0,settings:o,primaryEnvironmentId:c,resolveEnvironmentLabel:e=>n.get(e)??null}),e[3]=s,e[4]=o,e[5]=u,e[6]=c,e[7]=t,e[8]=a,e[9]=d}else d=e[9];let f=d,p;return e[10]!==r||e[11]!==a||e[12]!==n||e[13]!==f?(p=Bt(f,n,a,r),e[10]=r,e[11]=a,e[12]=n,e[13]=f,e[14]=p):p=e[14],p}function ir(e){return[e.environmentId,e.label]}function ar(e){return[Ht(e),Kt(e.workspaceRoot)]}function or(e){return e.sidebarProjectSortOrder}function sr(e){return e.projectOrder}function cr(){return{terminalFocus:Xt(),terminalOpen:!1,previewFocus:!1,previewOpen:!1,modelPickerOpen:!1,isWeb:!Re,isDesktop:Re}}var lr={authored:a,reviewRequested:P,others:C};function ur(e){let t=(0,Z.c)(11),{group:n}=e,r=lr[n.key]??u,i;t[0]===r?i=t[1]:(i=(0,$.jsx)(r,{"aria-hidden":!0,className:`size-3.5 shrink-0`}),t[0]=r,t[1]=i);let a;t[2]===n.label?a=t[3]:(a=(0,$.jsx)(`h2`,{className:`shrink-0`,children:n.label}),t[2]=n.label,t[3]=a);let o;t[4]===n.entries.length?o=t[5]:(o=(0,$.jsx)(`span`,{className:`shrink-0 tabular-nums text-muted-foreground/50`,children:n.entries.length}),t[4]=n.entries.length,t[5]=o);let s;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(f,{className:`min-w-2 flex-1`}),t[6]=s):s=t[6];let c;return t[7]!==i||t[8]!==a||t[9]!==o?(c=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 px-3 pb-1 text-xs font-medium text-muted-foreground/70`,children:[i,a,o,s]}),t[7]=i,t[8]=a,t[9]=o,t[10]=c):c=t[10],c}var dr=[{value:`all`,label:`All`,Icon:u},{value:`reviewing`,label:`Reviewing`,Icon:P},{value:`authored`,label:`Authored`,Icon:a}],fr=[{value:`all`,label:`All`,Icon:u},{value:`open`,label:`Open`,Icon:$e.pullRequest},{value:`closed`,label:`Closed`,Icon:$e.closed},{value:`merged`,label:`Merged`,Icon:$e.merged}],pr=250,mr=10,hr=99,gr=500,_r={},vr=[],yr={},br={},xr=new Map,Sr=new Set,Cr=e=>me({...e,repository:e.repository.toLowerCase()});function wr(){ae();let e=en(!0),t=e.shiftKey&&!e.metaKey&&!e.ctrlKey&&!e.altKey,n=dn.useSearch(),r=n.sort??`ready`,i=r===`ready`||r===`largest`||r===`smallest`?`eager`:`visible`,a=ie({from:dn.fullPath}),o=s(ue),{environments:c}=ce(),l=(0,Q.useMemo)(()=>c.filter(e=>e.serverConfig?.environment.capabilities.pullRequests===!0).toSorted((e,t)=>e.environmentId.localeCompare(t.environmentId)),[c]),d=l.find(e=>e.environmentId===n.environmentId)?.environmentId??null,f=(0,Q.useMemo)(()=>new Set(c.map(e=>e.environmentId)),[c]),p=(0,Q.useMemo)(()=>l.filter(e=>d===null||e.environmentId===d).map(e=>e.environmentId),[l,d]),m=(0,Q.useMemo)(()=>rt(p),[p]),g=c.some(e=>e.serverConfig!==null),_=p.length>0,y=z(),b=re(),x=(0,Q.useMemo)(()=>y.filter(e=>!e.isScratch&&p.includes(e.environmentId)),[y,p]),S=(0,Q.useMemo)(()=>new Map(c.map(e=>[e.environmentId,e.label])),[c]),C=(0,Q.useMemo)(()=>it(n.projectId,x,b),[x,b,n.projectId]),w=(0,Q.useMemo)(()=>Ct(x,d,C),[x,d,C]),T=(0,Q.useMemo)(()=>vn(x,S,w),[S,x,w]),E=n.selectedHost??n.host,D=(0,Q.useMemo)(()=>{let e=n.repository?.toLowerCase();if(e!==void 0)return x.find(t=>t.repositoryIdentity?.owner&&t.repositoryIdentity.name&&`${t.repositoryIdentity.owner}/${t.repositoryIdentity.name}`.toLowerCase()===e&&(E===void 0||R(t.repositoryIdentity,t.repositoryIdentity.provider)===E.toLowerCase()))?.id},[x,E,n.repository]),ee=(0,Q.useMemo)(()=>it(n.selectedProjectId,x,b),[x,b,n.selectedProjectId])??D??C,O=st(n.selectedEnvironmentId,f,d),A=(0,Q.useMemo)(()=>Ct(x,O,ee),[x,O,ee]),j=l.length===0?null:ge,M=ln(j),N=G(e=>fe(e.byThreadKey,j)),P=G(e=>he(e.byThreadKey,j)),F=P?.kind===`pull-request`?P:null,I=N.isOpen?F:null,{active:L,durationMs:B}=Qt(),V=(0,Q.useMemo)(()=>({activeSurface:F,surfaces:N.surfaces}),[N.surfaces,F]),le=on(N.isOpen&&F!==null,V,L,j?.threadId??null,B),U=le.present,W=le.value?.activeSurface??null,ye=le.value?.surfaces??[],xe=W?.environmentId??A?.environmentId??null,Se=(0,Q.useCallback)(e=>void a({search:t=>{let n={...t,...e};return{involvement:n.involvement??t.involvement,state:n.state??t.state,...n.sort&&n.sort!==`ready`?{sort:n.sort}:{},...n.repository?{repository:n.repository}:{},...n.number?{number:n.number}:{},...n.projectId?{projectId:n.projectId}:{},...n.environmentId?{environmentId:n.environmentId}:{},...n.host?{host:n.host}:{},...n.selectedHost?{selectedHost:n.selectedHost}:{},...n.selectedProjectId?{selectedProjectId:n.selectedProjectId}:{},...n.selectedEnvironmentId?{selectedEnvironmentId:n.selectedEnvironmentId}:{},...n.q?{q:n.q}:{},...n.draft?{draft:n.draft}:{},...n.review?{review:n.review}:{},...n.checks?{checks:n.checks}:{},...n.author?{author:n.author}:{},...n.labels&&n.labels.length>0?{labels:n.labels}:{}}},replace:!0}),[a]),Ce={repository:void 0,number:void 0,selectedProjectId:void 0,selectedEnvironmentId:void 0,selectedHost:void 0},K=e=>{let t=nn({...n,...e,involvement:e.involvement??n.involvement,state:e.state??n.state});rn(t),Se(e)},Ee=(n.q??``).trim(),[De,ke]=(0,Q.useState)(!1),Ae=_e(Ee,pr),Me=Ee===Ae,Pe=(0,Q.useMemo)(()=>Pt(Ee),[Ee]),Ie=(0,Q.useMemo)(()=>Pt(Ae),[Ae]),Le=(0,Q.useMemo)(()=>({...n.draft?{draft:n.draft}:{},...n.review?{review:n.review}:{},...n.checks?{checks:n.checks}:{},...n.author?{author:n.author}:{},...n.labels?{labels:n.labels.map(e=>[e])}:{}}),[n.author,n.checks,n.draft,n.labels,n.review]),Re=Object.keys(Le).length>0,ze=(0,Q.useMemo)(()=>({...Le,...Ie.filters}),[Le,Ie.filters]),Be=Object.keys(ze).length>0,Ve=(0,Q.useMemo)(()=>({...Le,...Pe.filters}),[Le,Pe.filters]),Ue=Object.keys(Ve).length>0,We=(0,Q.useMemo)(()=>ot(p,x,w,C,b),[p,x,b,w,C]),Ge=(0,Q.useMemo)(()=>{let e=We.map(e=>({environmentId:e}));if(!b||C!==void 0)return e;let t=be(x,We,We[0]),n=new Map;for(let e of x)n.set(e.environmentId,(n.get(e.environmentId)??0)+1);return We.flatMap(e=>{let r=t.get(e);return r===void 0?[]:r.length===(n.get(e)??0)?[{environmentId:e}]:[{environmentId:e,projectIds:r}]})},[x,b,We,C]),Ke=(0,Q.useMemo)(()=>Ge.map(({environmentId:e,projectIds:t})=>`${e}#${t?.join(`+`)??`*`}`).join(`|`),[Ge]),qe=Et(Ge.map(({environmentId:e})=>e)).map(([e,t])=>`${e}:${t}`).join(`|`),Xe=`${m}:${Ke}:${n.state}:${n.involvement}:${C??``}:${n.host??``}:${n.draft??``}:${n.review??``}:${n.checks??``}:${n.author??``}:${n.labels?.join(`\0`)??``}`,q=`${Xe}:${Ae}`,Ze=(0,Q.useRef)({key:q,policy:i});Ze.current={key:q,policy:i};let[Qe,$e]=(0,Q.useState)({key:q,size:hr,cursors:null,regrown:[]}),ut=Qe.key===q?Qe.size:hr,Lt=Qe.key===q?Qe.cursors:null,Rt=Qe.key===q?Qe.regrown:[];(0,Q.useEffect)(()=>{$e({key:q,size:hr,cursors:null,regrown:[]})},[q]);let zt=(0,Q.useMemo)(()=>Ge.flatMap(({environmentId:e,projectIds:t})=>{let r=Lt?.[e];return Lt!==null&&r===void 0&&!Rt.includes(e)?[]:[{environmentId:e,input:{state:n.state,involvement:n.involvement,limit:ut,...C?{projectId:C}:{},...t?{projectIds:t}:{},...n.host?{host:n.host}:{},...Be?{filters:ze}:{},...Ie.text?{query:Ie.text}:{},...r===void 0?{}:{cursors:r}}}]}),[ze,Be,ut,Ge,C,n.host,n.involvement,n.state,Lt,Rt,Ie.text]),J=Ot(zt),Bt=(0,Q.useMemo)(()=>Ge.map(({environmentId:e,projectIds:t})=>({environmentId:e,input:{state:n.state,involvement:n.involvement,limit:hr,...C?{projectId:C}:{},...t?{projectIds:t}:{},...n.host?{host:n.host}:{},...Re?{filters:Le}:{}}})),[Re,Le,Ge,C,n.host,n.involvement,n.state]),Y=Ot(Bt),Ht=Y.data?.entries.length===0&&Y.data.errors.length===0&&!Y.isPending&&Y.error===null,Ut=(0,Q.useMemo)(()=>De?Ge.map(({environmentId:e,projectIds:t})=>({environmentId:e,input:{state:`all`,involvement:n.involvement,limit:hr,...C?{projectId:C}:{},...t?{projectIds:t}:{},...n.host?{host:n.host}:{}}})):vr,[Ge,De,C,n.host,n.involvement]),Wt=Ot(Ut),Gt=n.involvement===`all`&&Ee.length===0,Kt=(0,Q.useMemo)(()=>{if(!Gt||Y.data===null||Y.data.entries.length===0)return{authored:vr,reviewing:vr};let e=e=>Ge.map(({environmentId:t,projectIds:r})=>({environmentId:t,input:{state:n.state,involvement:e,limit:hr,...C?{projectId:C}:{},...r?{projectIds:r}:{},...n.host?{host:n.host}:{},...Re?{filters:Le}:{}}}));return{authored:e(`authored`),reviewing:e(`reviewing`)}},[Re,Le,Gt,Y.data,Ge,C,n.host,n.state]),Jt=Ot(Kt.authored),Yt=Ot(Kt.reviewing),Xt=de(At.invalidate,{reportFailure:!1}),[Zt,tn]=(0,Q.useState)(0),[an,un]=(0,Q.useState)(!1),fn=(e=Ze.current,t)=>{Kn(!0,t);let n=ar.current,r=wt({requestedScope:e,currentScope:Ze.current,entriesByKey:ir.current,candidateKeys:n.key===e.key?n.values:new Set,statsByRow:lr.current});r!==null&&(Dr({key:e.key,batches:r}),Ir.refresh(r.filter(({environmentId:e})=>t===void 0||e===t).map(({environmentId:e,input:t})=>({environmentId:e,input:t}))))},mn=async()=>{let e=Ze.current;un(!0);try{await Promise.all(We.map(e=>Xt({environmentId:e,input:{}})))}finally{un(!1)}fn(e),tn(e=>e+1)},hn=an||J.isPending,[X,Z]=(0,Q.useState)(null),[_n,yn]=(0,Q.useState)(null),[Sn,Cn]=(0,Q.useState)(()=>new Map),wn=(0,Q.useRef)(0),Tn=(e,t)=>{let n=++wn.current,r=Tt(e,t,new Date,n);return r===null?null:(Cn(t=>new Map(t).set(Nt(e),r)),n)},Dn=(e,t)=>{t!==null&&Cn(n=>{if(n.get(e)?.token!==t)return n;let r=new Map(n);return r.delete(e),r})},On=(0,Q.useRef)(new Map),kn=(0,Q.useRef)(()=>{});kn.current=({entry:e,action:t})=>{t!==`merge`&&Tn(e,t)};let An=(0,Q.useCallback)(e=>{kn.current(e)},[]),jn=(0,Q.useCallback)(e=>{kn.current({entry:e,action:`close`})},[]),{close:Mn,closingKeys:Nn}=pn(jn);(0,Q.useEffect)(()=>{m.length!==0&&Z(e=>{if(e!==null&&e.environmentKey===m)return e;let t=dt(typeof window>`u`?void 0:window.localStorage,m);return t===null?null:{environmentKey:m,scope:t.scope,query:``,data:t.data,...t.partitions===void 0?{}:{partitions:t.partitions}}})},[m]),(0,Q.useEffect)(()=>{if(!J.data||J.isPending)return;let e=J.data;Z(t=>{let n=Gt&&Ht?{authored:[],reviewing:[]}:Gt&&Jt.data!==null&&Yt.data!==null?{authored:Jt.data.entries,reviewing:Yt.data.entries}:t!==null&&t.environmentKey===m&&t.scope===Xe?t.partitions:void 0;if(m.length>0&&Ae.length===0){let t=_n?.key===q?_n.entries:e.entries;_t(typeof window>`u`?void 0:window.localStorage,m,{scope:Xe,data:{...e,entries:t,viewers:Y.data?.viewers??e.viewers,providers:Y.data?.providers??e.providers},...n===void 0?{}:{partitions:n}})}return{environmentKey:m,scope:Xe,query:Ae,data:{...e,entries:_n?.key===q?_n.entries:e.entries},...n===void 0?{}:{partitions:n}}})},[m,Xe,Ae,J.data,J.isPending,Ht,Gt,Jt.data,Yt.data,_n,q,Y.data]);let Pn=(0,Q.useMemo)(()=>{if(X===null||X.environmentKey!==m||X.scope===Xe)return null;let e=yt(X.data.entries,{state:n.state,projectId:C,host:n.host});return e.length===0?null:{...X.data,entries:e}},[m,X,Xe,C,n.host,n.state]),Fn=(Ae.length===0&&Lt===null&&ut===hr?Y.data:J.data)??(X?.scope===Xe&&X.query===Ae?X.data:null),In=(Ae.length===0?Y.data:void 0)??(X?.scope===Xe?X.data:null)??Pn,Ln=Fn??In,Rn=Fn===null&&In!==null,zn=J.isPending&&Ln!==null,Bn=J.isPending&&Ln===null;(0,Q.useEffect)(()=>{!Fn||J.isPending||J.error&&J.data===null||(yn(e=>{if(e===null||e.key!==q)return{key:q,entries:lt(Fn.entries,Ie.text)};if(Lt!==null){let t=new Set(e.entries.map(Nt)),n=Fn.entries.filter(e=>!t.has(Nt(e))),r=lt(n.toSorted(kt),Ie.text);return{key:q,entries:[...e.entries,...r]}}return{key:q,entries:It(e.entries,lt(Fn.entries,Ie.text),Nt)}}),Cn(e=>gt(e,Fn.entries,Nt,Date.now())))},[Fn,q,Lt,Ie.text,J.isPending,J.error,J.data]);let Vn=Fn?.nextCursors??{},Hn=(Fn?.truncatedEnvironments??[]).filter(e=>Vn[e]===void 0),Un=!Rn&&Object.keys(Vn).length>0,Gn=()=>{$e(Un?{key:q,size:Hn.length===0?ut:Math.min(ut+hr,gr),cursors:Vn,regrown:Hn}:{key:q,size:Math.min(ut+hr,gr),cursors:null,regrown:[]})},Kn=(e=!1,t)=>{let n=(e?[...Bt,...Ut,...Kt.authored,...Kt.reviewing]:[]).filter(({environmentId:e})=>t===void 0||e===t);if(Lt===null){J.refresh([...zt.filter(({environmentId:e})=>t===void 0||e===t),...n]);return}n.length>0&&J.refresh(n);let r=_n?.key===q?_n.entries.length:ut;$e({key:q,regrown:[],size:Math.min(Math.max(ut,Math.ceil(r/hr)*hr),gr),cursors:null})},qn=(0,Q.useRef)(``),Jn=(0,Q.useEffectEvent)(()=>{Lt!==null&&Kn()});(0,Q.useEffect)(()=>{qe.length!==0&&qn.current!==qe&&(qn.current=qe,Jn())},[qe]),ve(()=>{Kn(!0)},{enabled:_});let Yn=Y.data?.viewers??Ln?.viewers??_r,Xn=Y.data?.errors??Ln?.errors??[],Zn=(0,Q.useMemo)(()=>xt([...Wt.data?.entries??[],...Y.data?.entries??Ln?.entries??[]],n.state),[Y.data?.entries,Wt.data?.entries,Ln?.entries,n.state]),Qn=(0,Q.useMemo)(()=>new Set((Y.data?.providers??Ln?.providers??[]).flatMap(e=>e.searchesOnHost?[e.host]:[])),[Y.data?.providers,Ln?.providers]),$n=(0,Q.useMemo)(()=>{let e=_n?.key===q?_n.entries:Ln?.entries??[],t=Dt(e,Yn,n.involvement),r=Ue?t.filter(e=>vt(e,Ve,mt(e,Yn))):t;if(Pe.text.length===0)return r.toSorted(kt);let i=Me&&!Rn;return r.filter(e=>i&&Qn.has(e.host)||Mt(e,Pe.text))},[q,Ue,Ve,Ln,_n,Me,n.involvement,Qn,Rn,Pe.text,Yn]),er=(0,Q.useMemo)(()=>Object.fromEntries($n.map(e=>[me(e),{state:e.state,isDraft:e.isDraft}])),[$n]),tr=(0,Q.useRef)(null),rr=(0,Q.useMemo)(()=>{if(n.involvement!==`all`)return[{key:`others`,label:``,entries:$n}];if(Ht)return St($n,Yn);let e=X!==null&&X.environmentKey===m&&X.scope===Xe?X.partitions:void 0,t=e=>e===void 0||!Ue?e:e.filter(e=>vt(e,Ve,mt(e,Yn))),r=t(Gt?Jt.data?.entries??e?.authored:void 0),i=t(Gt?Yt.data?.entries??e?.reviewing:void 0);return r===void 0||i===void 0?St($n,Yn):pt($n,r,i)},[Ue,Ht,Ve,Jt.data?.entries,$n,m,X,Gt,Yt.data?.entries,Xe,n.involvement,Yn]),ir=(0,Q.useRef)(new Map);ir.current=new Map(rr.flatMap(e=>e.entries.map(e=>[Nt(e),e])));let ar=(0,Q.useRef)({key:q,values:new Set}),[or,sr]=(0,Q.useState)(()=>new Map),lr=(0,Q.useRef)(or);lr.current=or;let[wr,Dr]=(0,Q.useState)({key:q,batches:[]}),Or=wr.key===q?wr.batches:[],Ar=(0,Q.useMemo)(()=>Or.map(({environmentId:e,input:t})=>({environmentId:e,input:t})),[Or]),jr=(0,Q.useRef)(null),Mr=(0,Q.useRef)(new Set),Nr=(0,Q.useRef)(!0),Pr=(0,Q.useRef)(i);Pr.current=i;let Fr=(0,Q.useCallback)(e=>{if(e!==null&&typeof IntersectionObserver<`u`)return Mr.current.add(e),jr.current?.observe(e),()=>{Mr.current.delete(e),jr.current?.unobserve(e);let t=e.dataset.pullRequestStatsKey,n=ar.current;Pr.current===`visible`&&t!==void 0&&n.values.delete(t)&&!Nr.current&&Dr(e=>{if(e.key!==n.key)return e;let t=ft(e.batches,n.values);return t.length===e.batches.length?e:{key:e.key,batches:t}})}},[]);(0,Q.useEffect)(()=>{i===`eager`&&Dr(e=>{let t=e.key===q?e.batches:[],n=ct({entriesByKey:ir.current,candidateKeys:ar.current.values,policy:i,activeBatches:t,statsByRow:lr.current});return n.length===0&&e.key===q?e:{key:q,batches:[...t,...n]}})},[q,rr,i]),(0,Q.useEffect)(()=>{if(i!==`visible`||typeof IntersectionObserver>`u`)return;ar.current={key:q,values:new Set};let e=new IntersectionObserver(e=>{let t=ar.current;if(t.key!==q)return;let n=!1,r=new Set;for(let i of e){let e=i.target.dataset.pullRequestStatsKey;if(e===void 0)continue;let a=t.values.has(e);i.isIntersecting&&ir.current.has(e)?(t.values.add(e),a||r.add(e)):t.values.delete(e),n||=a!==t.values.has(e)}n&&Dr(e=>{let n=e.key===q?e.batches:[],a=Nr.current?n:ft(n,t.values),o=ct({entriesByKey:ir.current,candidateKeys:r,policy:i,activeBatches:n,statsByRow:lr.current});return o.length===0&&a.length===n.length?e:{key:q,batches:[...a,...o]}})},{root:tr.current,rootMargin:`480px`});jr.current=e;for(let t of Mr.current)e.observe(t);return()=>{e.disconnect(),jr.current===e&&(jr.current=null)}},[q,i]);let Ir=jt(Ar);Nr.current=Ir.isPending,(0,Q.useEffect)(()=>{if(i!==`visible`||Ir.isPending)return;let e=ar.current;Dr(t=>{if(t.key!==q||e.key!==q)return t;let n=ft(t.batches,e.values);return n.length===t.batches.length?t:{key:t.key,batches:n}})},[q,i,Ir.isPending]),(0,Q.useEffect)(()=>{let e=Ir.stats;e!==null&&sr(t=>Ft(t,e))},[Ir.stats]);let Lr=(0,Q.useMemo)(()=>{let e=rr.map(e=>{let t=bt(e.entries.map(e=>ht(e,or)),Sn,Nt,n.state);return{...e,entries:Ue&&Sn.size>0?t.filter(e=>!Sn.has(Nt(e))||vt(e,Ve,mt(e,Yn))):t}});return at(e,r,Pe.text,e=>e.additions+e.deletions>0||or.has(tt(e)),n.involvement)},[rr,Ue,Ve,Sn,n.involvement,n.state,r,or,Pe.text,Yn]),Rr=Lr.reduce((e,t)=>e+t.entries.length,0),[zr,Br]=(0,Q.useState)([]);(0,Q.useEffect)(()=>{Fn!==null&&Br(e=>n.host===void 0||e.length===0?Fn.providers:e)},[Fn,n.host]);let Vr=zr.length>1,Hr=(0,Q.useMemo)(()=>nt(zr),[zr]),[Ur,Wr]=(0,Q.useState)(()=>new Set),Gr=(0,Q.useRef)(null),Kr=(0,Q.useMemo)(()=>new Map(Lr.flatMap(e=>e.entries.map(t=>[Nt(t),{entry:t,groupKey:e.key}]))),[Lr]),qr=(0,Q.useRef)({displayGroups:Lr,closeSweepRows:Kr,closingKeys:Nn,closeBatch:Mn,hostActionsOf:Hr});qr.current={displayGroups:Lr,closeSweepRows:Kr,closingKeys:Nn,closeBatch:Mn,hostActionsOf:Hr},(0,Q.useEffect)(()=>()=>Gr.current?.cancel(),[q,n.q,r]),(0,Q.useEffect)(()=>{let e=e=>{e.key===`Escape`&&Gr.current!==null&&(e.preventDefault(),Gr.current.cancel())};return document.addEventListener(`keydown`,e,!0),()=>document.removeEventListener(`keydown`,e,!0)},[]);let Jr=(0,Q.useCallback)((e,t)=>{Gr.current?.cancel();let n=Nt(e),r=qr.current.displayGroups.find(e=>e.entries.some(e=>Nt(e)===n));if(!r||qr.current.closingKeys.has(n))return;let i=qr.current.displayGroups.flatMap(e=>e.entries.map(Nt)),a=e=>{let t=qr.current.closeSweepRows.get(e);return t?.groupKey===r.key&&t.entry.state===`open`&&qr.current.hostActionsOf(t.entry).has(`close`)&&!qr.current.closingKeys.has(e)&&!tr.current?.querySelector(`[data-pull-request-key="${CSS.escape(e)}"] [data-pull-request-action-pending="true"]`)},o=[],s=null,c=e=>{e!==s&&(s=e,o=Vt(i,n,e,a),Wr(new Set(o)))};Gr.current=new gn({active:n,event:t,options:{distance:6,onAttach:()=>{},onFinish:()=>{Gr.current=null,Wr(new Set)}},onPending:()=>{},onStart:()=>c(n),onMove:({y:e})=>{let t=tr.current;if(!t)return;let n=t.getBoundingClientRect(),r=Math.min(Math.max(e,n.top),n.bottom-1),i=null;for(let e of t.querySelectorAll(`[data-pull-request-key]`)){if(i!==null&&e.getBoundingClientRect().top>r)break;i=e.dataset.pullRequestKey??null}i!==null&&c(i)},onEnd:()=>{let e=o.filter(a).flatMap(e=>{let t=qr.current.closeSweepRows.get(e);return t?[t.entry]:[]});qr.current.closeBatch(e)},onCancel:()=>{},onAbort:()=>{}})},[]),Yr=(0,Q.useMemo)(()=>new Map(rr.flatMap(e=>e.entries.map(e=>[Cr(e),e]))),[rr]),Xr=(0,Q.useMemo)(()=>new Map(Lr.flatMap(e=>e.entries.map(e=>[Cr(e),e]))),[Lr]),Zr=(0,Q.useMemo)(()=>n.repository&&n.number&&A?{environmentId:A.environmentId,repository:n.repository,number:n.number,projectId:A.id,...E?{host:E}:{}}:null,[n.number,n.repository,A,E]),Qr=F!==null,[$r,ei]=(0,Q.useState)(!1),ti=N.isOpen&&$r;!N.isOpen&&$r&&ei(!1);let ni=()=>{N.isOpen&&ei(e=>!e)},ri=(0,Q.useCallback)(()=>ei(!0),[]);(0,Q.useEffect)(()=>{_&&j!==null&&Zr!==null&&G.getState().openPullRequest(j,Zr)},[Zr,_,j]);let ii=N.isOpen&&I!==null?{environmentId:I.environmentId,repository:I.repository,number:I.number,projectId:I.projectId,host:I.host??(A?.repositoryIdentity?R(A.repositoryIdentity,A.repositoryIdentity.provider):void 0)}:null,ai=e=>Se(e===null?Ce:{repository:e.repository,number:e.number,selectedProjectId:e.projectId,selectedHost:e.host,...e.environmentId===void 0?{}:{selectedEnvironmentId:e.environmentId}}),oi=()=>{j!==null&&(N.isOpen?(G.getState().close(j),Se(Ce)):F!==null&&(G.getState().show(j),ai(F)))},si=(0,Q.useMemo)(()=>{let e=new Map;for(let t of x){let n=t.repositoryIdentity?.provider;if(n===void 0)continue;let r=R(t.repositoryIdentity,n);e.has(r)||e.set(r,{host:r,kind:n})}return[...e.values()]},[x]),ci=(0,Q.useMemo)(()=>new Map(Xn.map(e=>[En({id:e.projectId,environmentId:e.environmentId}),e.message])),[Xn]),li=(0,Q.useCallback)(e=>{j!==null&&(G.getState().openPullRequest(j,e),Se({repository:e.repository,number:e.number,selectedProjectId:e.projectId,selectedEnvironmentId:e.environmentId,selectedHost:e.host}))},[j,Se]),ui=(0,$.jsx)(xn,{value:n.q??``,busy:Ee.length>0&&(!Me||Rn),onChange:e=>K({q:e||void 0})}),di=(0,$.jsx)(Ne,{showTerminalControl:!1,showThreadPanelControl:!1,terminalAvailable:!1,terminalOpen:!1,terminalShortcutLabel:null,threadPanelOpen:!1,threadPanelPresentation:`inline`,threadPanelShortcutLabel:null,onToggleThreadPanel:()=>void 0,rightPanelAvailable:Qr,rightPanelOpen:N.isOpen,rightPanelShortcutLabel:Ye(o,`rightPanel.toggle`),rightPanelUnavailableLabel:`Select a pull request first`,rightPanelTabCount:N.surfaces.length,onToggleTerminal:()=>void 0,onToggleRightPanel:oi}),fi=(0,$.jsxs)(`div`,{className:`absolute top-[var(--workspace-controls-top)] right-[var(--workspace-controls-right)] z-50 mr-px flex h-[var(--workspace-topbar-height)] items-center gap-1 [-webkit-app-region:no-drag]`,"data-workspace-titlebar-controls":!0,children:[N.isOpen?(0,$.jsx)(Oe,{maximized:ti,onToggle:ni}):null,di]}),pi=Rn&&J.isPending&&Rr===0&&Ee.length===0,mi=(0,$.jsxs)($.Fragment,{children:[g?_?Bn?(0,$.jsx)(Fe,{rows:7}):J.error&&Rr===0?(0,$.jsx)(Te,{error:J.error,refreshing:J.isPending,onRetry:()=>J.refresh()}):pi?(0,$.jsx)(Fe,{rows:7}):Rr===0?(0,$.jsx)(Wn,{hasProjects:!b||x.length>0,refreshing:hn,onRefresh:()=>void mn(),query:Ee,filtered:Re||n.state!==`open`||n.involvement!==`all`||C!==void 0||n.host!==void 0,searching:Ee.length>0&&(!Me||Rn),canLoadMore:Ln?.truncated===!0&&(Un||ut<gr),loadingMore:zn,onClearQuery:()=>K({q:void 0}),onLoadMore:Gn}):(0,$.jsx)(`div`,{className:te(`space-y-3`,Ur.size>0&&`**:pointer-events-none`),children:Lr.map(e=>(0,$.jsxs)(`div`,{className:`space-y-0.5`,children:[e.label?(0,$.jsx)(ur,{group:e}):null,e.entries.map(e=>{let n=Nt(e);return(0,$.jsx)(nr,{statsKey:n,statsRef:Fr,entry:e,showProjectTitle:!0,showProvider:Vr,...l.length>1&&S.get(e.environmentId)!==void 0?{environmentLabel:S.get(e.environmentId)}:{},matchedElsewhere:Pe.text.length>0&&et(e,Pe.text)<=mr,selected:ii?.environmentId===e.environmentId&&ii.repository===e.repository&&ii.host?.toLowerCase()===e.host.toLowerCase()&&ii.number===e.number,onSelect:li,speedMode:t,hostActions:Hr(e),onActed:An,closing:Nn.has(n),sweeping:Ur.has(n),onCloseSweepStart:Jr},n)})]},e.key))}):(0,$.jsx)(Te,{title:`Pull requests unavailable`,error:`Update your P4 Code servers to browse pull requests.`}):(0,$.jsx)(Fe,{rows:7}),J.error&&Rr>0?(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-lg border border-warning/30 bg-warning-surface px-3 py-2 text-xs`,children:[(0,$.jsxs)(`span`,{children:[J.error,` Showing the last pull requests loaded.`]}),(0,$.jsx)(k,{size:`xs`,variant:`outline`,onClick:()=>J.refresh(),children:`Retry`})]}):null,Ln?.truncated&&$n.length>0?(0,$.jsx)(`div`,{className:`flex justify-center py-3 text-xs text-muted-foreground`,children:zn?(0,$.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(H,{"aria-hidden":!0,size:`sm`}),Lt===null?`Updating pull requests`:`Loading more`]}):Un||ut<gr?(0,$.jsx)(k,{size:`sm`,variant:`outline`,onClick:Gn,disabled:J.isPending||Rn,children:`Load more pull requests`}):(0,$.jsx)(`span`,{children:`Narrow your search to find more pull requests.`})}):null]}),hi=zr.length>0?zr:si,gi=[{value:``,label:`All`,Icon:h},...hi.map(e=>{let t=zr.find(t=>t.host===e.host);return{value:e.host,label:bn(hi,e),Icon:$t(e.kind).Icon,...t===void 0||t.configured?{}:{unavailable:t.detail??`This host could not be read.`}}})],_i=[{value:``,label:`All servers`,Icon:u},...l.map(e=>({value:e.environmentId,label:e.label,Icon:qt(ne(e.serverConfig))}))],vi=(0,$.jsx)(Er,{label:`Sort pull requests`,triggerIcon:(0,$.jsx)(v,{"aria-hidden":!0,className:`size-4`}),triggerLabel:`Sort`,outlined:!0,value:r,options:cn,onChange:e=>K({sort:e})}),yi=(0,$.jsx)(Tr,{onOpenChange:ke,state:n.state,stateOptions:fr,onState:e=>K({state:e}),involvement:n.involvement,involvementOptions:dr,onInvolvement:e=>K({involvement:e}),filters:Le,onFilters:e=>K({draft:e.draft,review:e.review,checks:e.checks,author:e.author,labels:e.labels?.flatMap(e=>e)}),authorOptions:Zn.authors,labelOptions:Zn.labels,host:n.host,hostOptions:gi,onHost:e=>K({host:e}),server:d??void 0,serverOptions:_i,onServer:e=>K({environmentId:e,projectId:void 0}),projects:T,projectId:C,projectEnvironmentId:w?.environmentId,unavailable:ci,onProject:(e,t)=>K(t===void 0?{projectId:e}:{projectId:e,environmentId:t})}),bi={refreshing:hn,onRefresh:()=>void mn(),searchValue:n.q??``,involvement:n.involvement,state:n.state,host:n.host,hostMenuOptions:gi,onInvolvement:e=>K({involvement:e}),onState:e=>K({state:e}),onHost:e=>K({host:e}),searchInput:ui,sortMenu:vi,filtersMenu:yi,rightPanelControl:_?(0,$.jsx)(`span`,{"aria-hidden":!0,className:te(`shrink-0`,N.isOpen?`-ml-3 w-0`:`w-7 sm:w-5`,L&&`transition-[width,margin] ease-out`),style:L?{transitionDuration:`${B}ms`}:void 0}):null,titlebarControls:_?U?(0,$.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-y-0 left-full w-7 [-webkit-app-region:no-drag]`}):fi:null,rightPanelOpen:N.isOpen,maximizedAway:ti,listBody:mi,scrollRef:tr},xi=e=>{j!==null&&(G.getState().activateSurface(j,e.id),ai(e))},Si=e=>{if(j===null)return;G.getState().closeSurface(j,e.id);let t=pe(G.getState().byThreadKey,j);ai(t?.kind===`pull-request`?t:null)},Ci=e=>{j!==null&&(G.getState().closeOtherSurfaces(j,e.id),ai(e))},wi=e=>{if(j===null)return;G.getState().closeSurfacesToRight(j,e.id);let t=pe(G.getState().byThreadKey,j);ai(t?.kind===`pull-request`?t:null)},Ti=()=>{j!==null&&(G.getState().closeAllSurfaces(j),ai(null))},Ei=(0,Q.useEffectEvent)(e=>{if(!M||(e.preventDefault(),e.stopPropagation(),e.repeat))return;let t=M;se(t,`pull request link`).then(e=>{e&&oe.add({type:`success`,title:`PR link copied`,description:t})},e=>{oe.add({type:`error`,title:`Failed to copy PR link`,description:e instanceof Error?e.message:`An error occurred.`})})}),Di=(0,Q.useEffectEvent)(e=>{I!==null&&(e.preventDefault(),e.stopPropagation(),e.repeat||Si(I))}),Oi=(0,Q.useEffectEvent)(e=>{Qr&&(e.preventDefault(),e.stopPropagation(),e.repeat||oi())}),ki=(0,Q.useEffectEvent)(e=>{N.isOpen&&(e.preventDefault(),e.stopPropagation(),e.repeat||ni())});return(0,Q.useEffect)(()=>{let e=e=>{if(e.defaultPrevented||sn())return;let t=Je(e,o,{context:cr()});t===`rightPanel.close`&&Di(e),t===`rightPanel.toggle`&&Oi(e),t===`rightPanel.toggleMaximized`&&ki(e),t===`thread.copyReference`&&Ei(e)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[o]),(0,$.jsx)(He,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none`,children:(0,$.jsxs)(`div`,{className:`relative flex min-h-0 flex-1`,children:[_&&U?fi:null,(0,$.jsx)(kr,{...bi}),U&&W&&xe!==null?(0,$.jsx)(je,{mode:`inline`,open:N.isOpen,maximized:ti,keybindings:o,getShortcutContext:cr,widthStorageKey:`p4code:pull-request-panel-width`,defaultWidth:typeof window>`u`?640:Math.floor(window.innerWidth/2),surfaces:ye,environmentId:xe,activeSurfaceId:W.id,pendingSurfaceIds:Sr,previewSessions:yr,desktopByTabId:br,terminalLabelsById:xr,onActivate:e=>{e.kind===`pull-request`&&xi(e)},onCloseSurface:e=>{e.kind===`pull-request`&&Si(e)},onCloseOtherSurfaces:e=>{e.kind===`pull-request`&&Ci(e)},onCloseSurfacesToRight:e=>{e.kind===`pull-request`&&wi(e)},onCloseAllSurfaces:Ti,onMoveSurface:(e,t)=>{j!==null&&G.getState().moveSurface(j,e,t)},onCopyFilePath:()=>void 0,onAddBrowser:()=>void 0,onAddBrowserInProfile:()=>void 0,onAddTerminal:()=>void 0,onAddDiff:()=>void 0,onAddFiles:()=>void 0,onAddPullRequest:()=>void 0,onAddPullRequests:()=>void 0,onAddDevice:()=>void 0,browserAvailable:!1,terminalAvailable:!1,diffAvailable:!1,filesAvailable:!1,pullRequestAvailable:!1,pullRequestsAvailable:!1,deviceAvailable:!1,pullRequestStatusSeeds:er,children:(0,$.jsx)(we,{getShortcutContext:cr,shortcutsEnabled:I?.id===W.id,environmentId:xe,onGuideShown:ri,onSelectPullRequest:e=>{j!==null&&(G.getState().openPullRequest(j,{projectId:e.projectId,repository:e.repository,number:e.number,...e.host?{host:e.host}:{},environmentId:xe}),Se({repository:e.repository,number:e.number,selectedHost:e.host,selectedProjectId:e.projectId,selectedEnvironmentId:xe}))},reference:{projectId:W.projectId,repository:W.repository,number:W.number,...W.host?{host:W.host}:{}},listEntry:Xr.get(Cr(W))??null,refreshToken:Zt,onActed:(e,t=`done`)=>{let n=Yr.get(Cr(W));if(e!==void 0&&n!==void 0&&Tt(n,e,new Date,0)!==null){let r=Nt(n);t===`sent`&&e!==`merge`&&On.current.set(r,Tn(n,e)),t===`failed`&&e!==`merge`&&Dn(r,On.current.get(r)??null),t!==`sent`&&On.current.delete(r),t===`done`&&e===`merge`&&(Tn(n,e),fn(void 0,xe))}else t===`done`&&fn(void 0,xe)}},W.id)}):null]})})}function Tr(e){let t=(0,Z.c)(6),n=rr(),r;t[0]!==e.projects||t[1]!==n?(r=Wt(e.projects,n),t[0]=e.projects,t[1]=n,t[2]=r):r=t[2];let i=r,a;return t[3]!==i||t[4]!==e?(a=(0,$.jsx)(zn,{...e,projects:i}),t[3]=i,t[4]=e,t[5]=a):a=t[5],a}function Er(e){let t=(0,Z.c)(30),{label:n,triggerIcon:r,triggerLabel:i,outlined:a,iconOnly:o,value:s,options:c,onChange:l,className:u}=e,d=a!==void 0&&a,f=o!==void 0&&o,p;t[0]!==c||t[1]!==s?(p=c.find(e=>e.value===s)??c[0],t[0]=c,t[1]=s,t[2]=p):p=t[2];let m=p;if(!m)return null;let h=i||f?`${n}: ${m.label}`:n,g=f?`${n}: ${m.label}`:void 0,v;t[3]!==f||t[4]!==d?(v=d?(0,$.jsx)(k,{variant:`outline`,size:f?`icon`:`default`}):(0,$.jsx)(k,{variant:`ghost-muted`,size:`sm`}),t[3]=f,t[4]=d,t[5]=v):v=t[5];let y;t[6]===u?y=t[7]:(y=te(`min-w-0`,u),t[6]=u,t[7]=y);let b;t[8]!==m||t[9]!==f||t[10]!==r||t[11]!==i?(b=f?(0,$.jsx)(m.Icon,{"aria-hidden":!0,className:`size-4`}):i?(0,$.jsxs)($.Fragment,{children:[r,(0,$.jsx)(`span`,{children:i})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{className:`truncate`,children:m.label}),(0,$.jsx)(ee,{"aria-hidden":!0,className:`size-3 shrink-0 text-muted-foreground/70`})]}),t[8]=m,t[9]=f,t[10]=r,t[11]=i,t[12]=b):b=t[12];let x;t[13]!==h||t[14]!==g||t[15]!==v||t[16]!==y||t[17]!==b?(x=(0,$.jsx)(T,{"aria-label":h,title:g,render:v,className:y,children:b}),t[13]=h,t[14]=g,t[15]=v,t[16]=y,t[17]=b,t[18]=x):x=t[18];let S;t[19]===l?S=t[20]:(S=e=>l(e),t[19]=l,t[20]=S);let C;t[21]===c?C=t[22]:(C=c.map(Dr),t[21]=c,t[22]=C);let w;t[23]!==S||t[24]!==C||t[25]!==s?(w=(0,$.jsx)(M,{align:`start`,side:`bottom`,children:(0,$.jsx)(E,{value:s,onValueChange:S,children:C})}),t[23]=S,t[24]=C,t[25]=s,t[26]=w):w=t[26];let D;return t[27]!==w||t[28]!==x?(D=(0,$.jsxs)(_,{children:[x,w]}),t[27]=w,t[28]=x,t[29]=D):D=t[29],D}function Dr(e){let t=(0,$.jsx)(y,{value:e.value,disabled:e.unavailable!==void 0,className:`data-disabled:pointer-events-auto`,children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(yn,{option:e}),e.label]})},e.value);return e.unavailable===void 0?t:(0,$.jsxs)(Ve,{children:[(0,$.jsx)(ze,{render:t}),(0,$.jsx)(Be,{side:`right`,children:e.unavailable})]},e.value)}function Or(e){let t=(0,Z.c)(21),{searchInput:n,searchValue:r,open:i,onOpenChange:a,focusToken:o,onFocusWithin:s}=e,c=(0,Q.useRef)(null),l,u;t[0]===i?(l=t[1],u=t[2]):(l=()=>{i&&c.current?.querySelector(`input`)?.focus()},u=[i],t[0]=i,t[1]=l,t[2]=u),(0,Q.useEffect)(l,u);let d=(0,Q.useRef)(o),f,p;if(t[3]===o?(f=t[4],p=t[5]):(f=()=>{if(d.current===o)return;d.current=o;let e=c.current?.querySelector(`input`);e?.focus(),e?.select()},p=[o],t[3]=o,t[4]=f,t[5]=p),(0,Q.useEffect)(f,p),i||r.length>0){let e;t[6]===s?e=t[7]:(e=()=>s?.(!0),t[6]=s,t[7]=e);let i;t[8]!==s||t[9]!==a||t[10]!==r.length?(i=()=>{s?.(!1),r.length===0&&a(!1)},t[8]=s,t[9]=a,t[10]=r.length,t[11]=i):i=t[11];let o;return t[12]!==n||t[13]!==e||t[14]!==i?(o=(0,$.jsx)(`div`,{ref:c,className:`w-56 min-w-24 shrink`,onFocus:e,onBlur:i,children:n}),t[12]=n,t[13]=e,t[14]=i,t[15]=o):o=t[15],o}let m;t[16]===a?m=t[17]:(m=()=>a(!0),t[16]=a,t[17]=m);let h;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(x,{className:`size-4`}),t[18]=h):h=t[18];let g;return t[19]===m?g=t[20]:(g=(0,$.jsx)(k,{size:`icon-sm`,variant:`ghost`,"aria-label":`Search pull requests`,onClick:m,children:h}),t[19]=m,t[20]=g),g}function kr(e){let t=(0,Z.c)(69),{refreshing:n,onRefresh:r,searchValue:i,involvement:a,state:o,host:s,hostMenuOptions:c,onInvolvement:l,onState:u,onHost:d,searchInput:f,sortMenu:p,filtersMenu:m,rightPanelControl:g,titlebarControls:_,rightPanelOpen:v,maximizedAway:y,listBody:b,scrollRef:x}=e,S=(0,Q.useRef)(null),[C,w]=(0,Q.useState)(!1),T;t[0]===x?T=t[1]:(T=()=>{let e=S.current;if(!e)return;let t=new IntersectionObserver(e=>{let[t]=e;return w(t?!t.isIntersecting:!1)},{root:x.current});return t.observe(e),()=>t.disconnect()},t[0]=x,t[1]=T);let E;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(E=[],t[2]=E):E=t[2],(0,Q.useEffect)(T,E);let D=(0,Q.useRef)(!1),ee=(0,Q.useRef)(null),[O,k]=(0,Q.useState)(!1),[A,j]=(0,Q.useState)(0),M=O||i.length>0,N,P;t[3]===C?(N=t[4],P=t[5]):(N=()=>{let e=e=>{if(e.defaultPrevented||e.key.toLowerCase()!==`f`||!(e.metaKey||e.ctrlKey)||e.altKey||e.shiftKey)return;if(e.preventDefault(),C){k(!0),j(Ar);return}let t=ee.current?.querySelector(`input`);t?.focus(),t?.select()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},P=[C],t[3]=C,t[4]=N,t[5]=P),(0,Q.useEffect)(N,P);let F,I;t[6]===C?(F=t[7],I=t[8]):(F=()=>{if(C||(k(!1),!D.current))return;D.current=!1;let e=ee.current?.querySelector(`input`);e&&(e.focus(),e.setSelectionRange(e.value.length,e.value.length))},I=[C],t[6]=C,t[7]=F,t[8]=I),(0,Q.useEffect)(F,I);let L=y?`w-0 flex-none`:`flex-1`,R;t[9]===L?R=t[10]:(R=te(`@container/pr-list flex min-h-0 min-w-0 flex-col overflow-x-hidden bg-background`,L),t[9]=L,t[10]=R);let ne=!v,z;t[11]!==C||t[12]!==s||t[13]!==c||t[14]!==a||t[15]!==d||t[16]!==l||t[17]!==u||t[18]!==M||t[19]!==o?(z=C?(0,$.jsxs)(X,{ariaLabel:`Pull request scope`,className:`overflow-hidden`,children:[(0,$.jsx)(mn,{current:!0,className:te(M&&`sr-only`),children:(0,$.jsx)(`h1`,{className:`truncate`,children:`Pull Requests`})}),M?null:(0,$.jsx)(hn,{}),(0,$.jsxs)(mn,{className:`shrink gap-1.5`,children:[(0,$.jsx)(Er,{label:`Filter by state`,value:o,options:fr,onChange:u,className:`shrink-0`}),(0,$.jsx)(Er,{label:`Filter by involvement`,value:a,options:dr,onChange:l}),c.length>2?(0,$.jsx)(Er,{label:`Filter by host`,value:s??``,options:c,onChange:e=>d(e===``?void 0:e)}):null]})]}):(0,$.jsx)(X,{ariaLabel:`Pull requests breadcrumb`,children:(0,$.jsx)(mn,{current:!0,children:(0,$.jsx)(`h1`,{className:`truncate`,children:`Pull Requests`})})}),t[11]=C,t[12]=s,t[13]=c,t[14]=a,t[15]=d,t[16]=l,t[17]=u,t[18]=M,t[19]=o,t[20]=z):z=t[20];let re;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,$.jsx)(`div`,{className:`min-w-0 flex-1`}),t[21]=re):re=t[21];let B;t[22]!==C||t[23]!==r||t[24]!==n||t[25]!==A||t[26]!==f||t[27]!==O||t[28]!==i?(B=C?(0,$.jsxs)(`div`,{className:`flex shrink items-center gap-1.5`,children:[(0,$.jsx)(Or,{searchInput:f,searchValue:i,open:O,onOpenChange:k,focusToken:A,onFocusWithin:e=>{D.current=e}}),(0,$.jsx)(jr,{compact:!0,refreshing:n,onRefresh:r})]}):null,t[22]=C,t[23]=r,t[24]=n,t[25]=A,t[26]=f,t[27]=O,t[28]=i,t[29]=B):B=t[29];let V;t[30]!==g||t[31]!==z||t[32]!==B||t[33]!==ne||t[34]!==_?(V=(0,$.jsxs)(fn,{electron:Re,reserveNativeControls:ne,className:`relative bg-background`,children:[_,z,re,B,g]}),t[30]=g,t[31]=z,t[32]=B,t[33]=ne,t[34]=_,t[35]=V):V=t[35];let H;t[36]===f?H=t[37]:(H=(0,$.jsx)(`div`,{className:`min-w-0 basis-full @lg/pr-list:basis-0 @lg/pr-list:flex-1`,children:f}),t[36]=f,t[37]=H);let ie=s!==void 0,ae;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,$.jsx)(h,{"aria-hidden":!0,className:`size-4`}),t[38]=ae):ae=t[38];let oe=s??``,se;t[39]===d?se=t[40]:(se=e=>d(e===``?void 0:e),t[39]=d,t[40]=se);let ce;t[41]!==c||t[42]!==ie||t[43]!==oe||t[44]!==se?(ce=(0,$.jsx)(Er,{label:`Filter by provider`,outlined:!0,iconOnly:ie,triggerIcon:ae,triggerLabel:`All`,value:oe,options:c,onChange:se}),t[41]=c,t[42]=ie,t[43]=oe,t[44]=se,t[45]=ce):ce=t[45];let le;t[46]!==C||t[47]!==r||t[48]!==n?(le=C?null:(0,$.jsx)(jr,{refreshing:n,onRefresh:r}),t[46]=C,t[47]=r,t[48]=n,t[49]=le):le=t[49];let U;t[50]!==m||t[51]!==p||t[52]!==H||t[53]!==ce||t[54]!==le?(U=(0,$.jsxs)(`div`,{ref:ee,className:`flex flex-wrap items-center gap-2`,children:[H,p,m,ce,le]}),t[50]=m,t[51]=p,t[52]=H,t[53]=ce,t[54]=le,t[55]=U):U=t[55];let W;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,$.jsx)(`div`,{ref:S,"aria-hidden":!0,className:`-mt-3 h-px w-full`}),t[56]=W):W=t[56];let ue;t[57]===U?ue=t[58]:(ue=(0,$.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[U,W]}),t[57]=U,t[58]=ue);let de;t[59]!==b||t[60]!==ue?(de=(0,$.jsxs)(Yt,{width:`expanded`,className:`min-h-full gap-4`,children:[ue,b]}),t[59]=b,t[60]=ue,t[61]=de):de=t[61];let fe;t[62]!==x||t[63]!==de?(fe=(0,$.jsx)(`div`,{ref:x,className:`topbar-scroll-fade scrollbar-gutter-both min-h-0 flex-1 overflow-y-auto`,children:de}),t[62]=x,t[63]=de,t[64]=fe):fe=t[64];let pe;return t[65]!==V||t[66]!==fe||t[67]!==R?(pe=(0,$.jsxs)(`div`,{className:R,children:[V,fe]}),t[65]=V,t[66]=fe,t[67]=R,t[68]=pe):pe=t[68],pe}function Ar(e){return e+1}function jr(e){let t=(0,Z.c)(8),{compact:n,refreshing:r,onRefresh:i}=e,a=n!==void 0&&n,o=a?`icon-sm`:`icon`,s=a?`ghost`:`outline`,c;t[0]===r?c=t[1]:(c=(0,$.jsx)(tn,{size:`md`,refreshing:r}),t[0]=r,t[1]=c);let l;return t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==s||t[6]!==c?(l=(0,$.jsx)(k,{size:o,variant:s,"aria-label":`Refresh pull requests`,onClick:i,disabled:r,children:c}),t[2]=i,t[3]=r,t[4]=o,t[5]=s,t[6]=c,t[7]=l):l=t[7],l}export{wr as component};
|
|
2
|
+
//# sourceMappingURL=_chat.pull-requests-BixugchU.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{t as i}from"./utils-
|
|
2
|
-
//# sourceMappingURL=alert-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{t as i}from"./utils-BVnIIHXP.js";import{h as a}from"./useRender-BP5vR6yH.js";var o=n(),s=e(t(),1),c=e(r(),1),l=a(`relative rounded-xl border px-3.5 py-3 text-card-foreground text-sm`,{defaultVariants:{surface:`default`,variant:`default`},variants:{surface:{default:``,glass:`alert-glass`},variant:{default:`bg-transparent dark:bg-input/32 [&_svg]:text-muted-foreground`,sidebar:`rounded-lg border-sidebar-border bg-sidebar-control-surface px-2 py-1.5 text-[11px] leading-4 [&_[data-slot=alert-description]]:block [&_[data-slot=alert-description]]:text-sidebar-muted-foreground`,error:`border-error/32 bg-error-surface text-error-foreground [&_[data-slot=alert-description]]:text-error-foreground/80 [&_svg]:text-error`,info:`border-info/32 bg-info/4 [&_svg]:text-info`,success:`border-success/32 bg-success/4 [&_svg]:text-success`,warning:`border-warning/32 bg-warning-surface text-warning-foreground [&_[data-slot=alert-description]]:text-warning-foreground/80 [&_svg]:text-warning`}}});function u(e){let t=e.props[`data-slot`];if(t)return t;let n=e.type;switch(n.displayName??n.name){case`AlertAction`:return`alert-action`;case`AlertTitle`:return`alert-title`;case`AlertDescription`:return`alert-description`;default:return}}function d(e){let t=(0,o.c)(36),n,r,a,d,f,p;t[0]===e?(n=t[1],r=t[2],a=t[3],d=t[4],f=t[5],p=t[6]):({className:r,variant:p,surface:d,controlAlignment:f,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=d,t[5]=f,t[6]=p);let m=f===void 0?`center`:f,h,g,_;t[7]===n?(h=t[8],g=t[9],_=t[10]):(_=[],g=[],h=[],s.Children.forEach(n,e=>{if(!(0,s.isValidElement)(e)){g.push(e);return}let t=u(e);t===`alert-action`?h.push(e):t===`alert-title`||t===`alert-description`?g.push(e):_.push(e)}),t[7]=n,t[8]=h,t[9]=g,t[10]=_);let v;t[11]!==r||t[12]!==d||t[13]!==p?(v=i(l({surface:d,variant:p}),r),t[11]=r,t[12]=d,t[13]=p,t[14]=v):v=t[14];let y=p??`default`,b=m===`first-line`?`items-start`:`items-center`,x=m===`first-line`&&h.length>0&&`min-h-7 pt-1 sm:min-h-6 sm:pt-0.5`,S;t[15]!==b||t[16]!==x?(S=i(`flex gap-2`,b,x),t[15]=b,t[16]=x,t[17]=S):S=t[17];let C;t[18]!==m||t[19]!==_?(C=_.length>0&&(0,c.jsx)(`div`,{className:i(`flex shrink-0 items-center justify-center`,m===`first-line`?`h-lh w-4 [&>svg]:size-4`:`size-4 [&>svg]:size-full`),children:_}),t[18]=m,t[19]=_,t[20]=C):C=t[20];let w;t[21]===g?w=t[22]:(w=g.length>0&&(0,c.jsx)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:g}),t[21]=g,t[22]=w);let T;t[23]!==h||t[24]!==m?(T=h.length>0&&(0,c.jsx)(`div`,{className:i(`flex shrink-0 items-center`,m===`first-line`?`h-lh self-start`:`self-center`),children:h}),t[23]=h,t[24]=m,t[25]=T):T=t[25];let E;t[26]!==S||t[27]!==C||t[28]!==w||t[29]!==T?(E=(0,c.jsxs)(`div`,{className:S,children:[C,w,T]}),t[26]=S,t[27]=C,t[28]=w,t[29]=T,t[30]=E):E=t[30];let D;return t[31]!==a||t[32]!==E||t[33]!==v||t[34]!==y?(D=(0,c.jsx)(`div`,{className:v,"data-slot":`alert`,"data-variant":y,role:`alert`,...a,children:E}),t[31]=a,t[32]=E,t[33]=v,t[34]=y,t[35]=D):D=t[35],D}function f(e){let t=(0,o.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`font-medium`,n),t[3]=n,t[4]=a);let s;return t[5]!==r||t[6]!==a?(s=(0,c.jsx)(`div`,{className:a,"data-slot":`alert-title`,...r}),t[5]=r,t[6]=a,t[7]=s):s=t[7],s}function p(e){let t=(0,o.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`flex flex-col gap-2.5 text-muted-foreground`,n),t[3]=n,t[4]=a);let s;return t[5]!==r||t[6]!==a?(s=(0,c.jsx)(`div`,{className:a,"data-slot":`alert-description`,...r}),t[5]=r,t[6]=a,t[7]=s):s=t[7],s}function m(e){let t=(0,o.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`flex gap-1`,n),t[3]=n,t[4]=a);let s;return t[5]!==r||t[6]!==a?(s=(0,c.jsx)(`div`,{className:a,"data-slot":`alert-action`,...r}),t[5]=r,t[6]=a,t[7]=s):s=t[7],s}f.displayName=`AlertTitle`,p.displayName=`AlertDescription`,m.displayName=`AlertAction`;export{f as i,m as n,p as r,d as t};
|
|
2
|
+
//# sourceMappingURL=alert-CfhQnxcL.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{t as r}from"./utils-BVnIIHXP.js";import{a as i,c as a,l as o,n as s,o as c,s as l,t as u}from"./DialogTitle-CSaaIBpP.js";import{a as d,t as f}from"./dialog-styles-Df-wlHU1.js";import{t as p}from"./AlertDialogRoot-CNpt8h9w.js";var m=t(),h=e(n(),1),g=p,_=i;function v(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(f,n),t[3]=n,t[4]=a);let s;return t[5]!==i||t[6]!==a?(s=(0,h.jsx)(o,{forceRender:!0,className:a,"data-slot":`alert-dialog-backdrop`,...i}),t[5]=i,t[6]=a,t[7]=s):s=t[7],s}function y(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(`fixed inset-0 z-50 grid grid-rows-[1fr_auto_1fr] justify-items-center p-4`,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(s,{className:a,"data-slot":`alert-dialog-viewport`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function b(e){let t=(0,m.c)(20),n,i,a,o;t[0]===e?(n=t[1],i=t[2],a=t[3],o=t[4]):({className:n,bottomStickOnMobile:o,portalContainer:i,...a}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=o);let s=o===void 0||o,l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,h.jsx)(v,{}),t[5]=l):l=t[5];let u=s&&`max-sm:grid-rows-[1fr_auto] max-sm:p-0 max-sm:pt-12`,f;t[6]===u?f=t[7]:(f=r(u),t[6]=u,t[7]=f);let p=s&&`max-sm:max-w-none max-sm:rounded-none max-sm:border-x-0 max-sm:border-t max-sm:border-b-0 max-sm:opacity-[calc(1-min(var(--nested-dialogs),1))] max-sm:data-ending-style:translate-y-4 max-sm:data-starting-style:translate-y-4`,g;t[8]!==n||t[9]!==p?(g=r(d,`row-start-2 max-h-full max-w-lg text-popover-foreground`,p,n),t[8]=n,t[9]=p,t[10]=g):g=t[10];let b;t[11]!==a||t[12]!==g?(b=(0,h.jsx)(c,{className:g,"data-slot":`alert-dialog-popup`,...a}),t[11]=a,t[12]=g,t[13]=b):b=t[13];let x;t[14]!==f||t[15]!==b?(x=(0,h.jsx)(y,{className:f,children:b}),t[14]=f,t[15]=b,t[16]=x):x=t[16];let S;return t[17]!==i||t[18]!==x?(S=(0,h.jsxs)(_,{container:i,children:[l,x]}),t[17]=i,t[18]=x,t[19]=S):S=t[19],S}function x(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(`flex min-h-0 flex-col gap-2 p-6 text-center max-sm:pb-4 sm:text-left`,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(`div`,{className:a,"data-slot":`alert-dialog-header`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function S(e){let t=(0,m.c)(11),n,i,a;t[0]===e?(n=t[1],i=t[2],a=t[3]):({className:n,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a);let o=a===void 0?`default`:a,s=o==="default"&&`border-t bg-muted/72 py-4`,c=o===`bare`&&`pb-6`,l;t[4]!==n||t[5]!==s||t[6]!==c?(l=r(`flex flex-col-reverse gap-2 px-6 sm:flex-row sm:justify-end sm:rounded-b-[calc(var(--radius-2xl)-1px)]`,s,c,n),t[4]=n,t[5]=s,t[6]=c,t[7]=l):l=t[7];let u;return t[8]!==i||t[9]!==l?(u=(0,h.jsx)(`div`,{className:l,"data-slot":`alert-dialog-footer`,...i}),t[8]=i,t[9]=l,t[10]=u):u=t[10],u}function C(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(`wrap-anywhere shrink-0 font-semibold text-xl leading-snug`,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(u,{className:a,"data-slot":`alert-dialog-title`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function w(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(`wrap-anywhere max-h-[min(24rem,60dvh)] min-h-0 overflow-y-auto overscroll-contain text-muted-foreground text-sm select-text`,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(l,{className:a,"data-slot":`alert-dialog-description`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function T(e){let t=(0,m.c)(2),n;return t[0]===e?n=t[1]:(n=(0,h.jsx)(a,{"data-slot":`alert-dialog-close`,...e}),t[0]=e,t[1]=n),n}export{x as a,S as i,T as n,b as o,w as r,C as s,g as t};
|
|
2
|
+
//# sourceMappingURL=alert-dialog-Dn_PRSFU.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n}from"./jsx-runtime-DJeoFXNw.js";import{Jo as r,Yo as i,xs as a}from"./utils-
|
|
2
|
-
//# sourceMappingURL=assetUrls-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n}from"./jsx-runtime-DJeoFXNw.js";import{Jo as r,Yo as i,xs as a}from"./utils-BVnIIHXP.js";import{Dr as o,xr as s}from"./runtime-CbYvES7U.js";import{s as c}from"./vcsRefInvalidation-C5gDWck3.js";import{s as l}from"./session-Ces3Ebxl.js";import{c as u,l as d,o as f,t as p,u as m}from"./assets-Lf7mgwY7.js";var h=n(),g=e(t(),1);function _(e,t){let n=(0,h.c)(7),r=(0,g.useContext)(i),a=typeof t==`string`?t:t?.label,o=typeof t==`string`?!0:t?.reportFailure??!0,c=typeof t==`string`?!0:t?.reportDefect??!0,l=typeof t==`string`?!1:t?.refresh??!1,u;return n[0]!==a||n[1]!==e||n[2]!==l||n[3]!==r||n[4]!==c||n[5]!==o?(u=t=>{let n=e(t);return s(r,n,{label:a??n.label?.[0]??`atom query`,reportFailure:o,reportDefect:c,refresh:l})},n[0]=a,n[1]=e,n[2]=l,n[3]=r,n[4]=c,n[5]=o,n[6]=u):u=n[6],u}function v(e,t){let n=(0,h.c)(10),i=c(e),a;n[0]!==t||n[1]!==i?(a=d(t,i),n[0]=t,n[1]=i,n[2]=a):a=n[2];let o=a,s=l(e),m;n[3]!==o||n[4]!==e||n[5]!==t?(m=o!==null||e===null||t===null?f:p.createUrl({environmentId:e,input:{resource:t}}),n[3]=o,n[4]=e,n[5]=t,n[6]=m):m=n[6];let g=r(m);if(o!==null)return o;let _=s._tag===`Some`?s.value.httpBaseUrl:null,v;return n[7]!==g||n[8]!==_?(v=u(g,_),n[7]=g,n[8]=_,n[9]=v):v=n[9],v}function y(e,t){let n=(0,h.c)(6),r=l(e),i=r._tag===`Some`?r.value.httpBaseUrl:null,a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1,refresh:!0},n[0]=a):a=n[0];let s=_(p.createUrl,a),c;return n[1]!==e||n[2]!==i||n[3]!==s||n[4]!==t?(c=async()=>{if(e===null||t===null||i===null)return null;let n=await s({environmentId:e,input:{resource:t}});if(n._tag===`Failure`)throw o(n);return m(i,n.value.relativeUrl)},n[1]=e,n[2]=i,n[3]=s,n[4]=t,n[5]=c):c=n[5],c}function b(e,t){let n=l(e),{canReadFiles:i}=c(e),o=(0,g.useMemo)(()=>i?t:t.filter(e=>e._tag!==`workspace-file`&&e._tag!==`media-file`&&e._tag!==`draft-workspace-file`),[i,t]),s=r(p.createUrls({environmentId:e,resources:o}));return(0,g.useMemo)(()=>{if(n._tag===`None`)return t.map(()=>null);let e=0;return t.map(t=>{if(!i&&(t._tag===`workspace-file`||t._tag===`media-file`||t._tag===`draft-workspace-file`))return null;let r=s[e++];return r&&a(r)?m(n.value.httpBaseUrl,r.value.relativeUrl):null})},[i,n,t,s])}export{_ as i,v as n,b as r,y as t};
|
|
2
|
+
//# sourceMappingURL=assetUrls-Bn1N9LX7.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{Jo as t,Ks as n,Xs as r,Zo as i,as as a,bs as o,es as s,fs as c,ls as l,ts as u,ws as d}from"./utils-BVnIIHXP.js";import{As as f,Bc as p,Cg as m,Gc as h,Sd as g,Tc as _,Xc as v,Zc as y,_g as b,b as ee,gl as x,hc as S,if as C,kc as te,n as ne,og as re,pf as ie,vg as ae}from"./src-DHn7yNZx.js";import{Ar as oe,Hr as w,Vr as T,a as E,h as D,hr as O,i as k,n as A,rr as j,t as M}from"./runtime-CbYvES7U.js";import{m as N,n as P}from"./server-CEMcTnD1.js";import{t as F}from"./session-Ces3Ebxl.js";import{t as I}from"./env-BfPir1X4.js";import{t as L}from"./sourceControl-CgxDQG5w.js";var R=18e5,z=3e5,B=36e5,V=class extends v()(`InvalidAssetCollectionKeyError`,{key:h,cause:te()}){get message(){return`Invalid asset collection atom key: ${JSON.stringify(this.key)}.`}},H=x(y([S,_(ee)]));function U(e){try{return H(JSON.parse(e))}catch(t){throw new V({key:e,cause:t})}}function W(e,t){try{return new URL(t,e).toString()}catch{return null}}var G=s(o(!1)).pipe(l(`asset-url:empty`)),K=`This connection cannot read host files. Pair again with a new link to view it.`;function q(e,t){return e===null||t.canReadFiles||e._tag!==`workspace-file`&&e._tag!==`media-file`&&e._tag!==`draft-workspace-file`?null:t.isPending?{_tag:`Loading`}:t.error===null?{_tag:`Failure`,reason:`missing-file-access`}:{_tag:`Failure`}}function J(e,t){if(e._tag===`Failure`)return{_tag:`Failure`};if(t===null||e._tag!==`Success`)return{_tag:`Loading`};let n=W(t,e.value.relativeUrl);return n===null?{_tag:`Failure`}:{_tag:`Success`,url:n,expiresAt:e.value.expiresAt,...e.value.sourcePath===void 0?{}:{sourcePath:e.value.sourcePath},...e.value.imageDimensions===void 0?{}:{imageDimensions:e.value.imageDimensions}}}function se(e,t){let n=new Map,r=(e,t)=>{let r=n.get(e);return r===void 0&&(r=f(6),n.set(e,r)),oe(ne.assetsCreateUrl,t).pipe(r.withPermit)},o=g(`assets.createUrl`)(function*(e){let n=yield*w,i=yield*r(n.target.environmentId,e).pipe(ie);if(re(i))return i.success;let a=i.failure,o=e.resource,s=t?(yield*c).get(t):null;if(!s||s.environmentId===n.target.environmentId||a._tag!==`AssetWorkspaceAssetNotFoundError`&&a._tag!==`AssetWorkspaceAssetInspectionError`&&a._tag!==`AssetWorkspaceContextNotFoundError`||o._tag!==`media-file`||!(o.path.startsWith(`/`)||j(o.path))||D(o.path.slice(o.path.lastIndexOf(`.`)))===null)return yield*a;let l=yield*(yield*T).run(s.environmentId,r(s.environmentId,e));return{...l,relativeUrl:new URL(l.relativeUrl,s.httpBaseUrl).href}}),u=O(e,{label:`environment-data:assets:create-url`,execute:o,staleTimeMs:z,idleTtlMs:B,refreshIntervalMs:R,refreshTrigger:({input:e})=>e.resource._tag===`media-file`?t:void 0}),d=i(e=>{let[t,n]=U(e);return s(e=>n.map(n=>e(u({environmentId:t,input:{resource:n}})))).pipe(a(B),l(`environment-data:assets:create-urls:${e}`))});return{createUrl:u,createUrls:e=>d(JSON.stringify([e.environmentId,e.resources]))}}function ce(e){let t=x(y([S,h,p(h)])),n=e.projectClones,r=i(r=>{let[i,o,c]=t(JSON.parse(r)),l={_tag:`project-favicon`,cwd:o,...c?{path:c}:{}},f=e.createUrl({environmentId:i,input:{resource:l}}),p=n?f.pipe(u(s(e=>e(n(i)).find(e=>e.destinationPath===o)?.phase??null))):f,h=s(t=>{let n=t(p),r=t(e.preparedConnection(i)),a=J(n,m(r)?r.value.httpBaseUrl:null);return a._tag===`Success`?a.url:ae(t.self())}).pipe(a(B)),g=e.imageCache;if(!g)return h;let _={environmentId:i,cwd:o,faviconPath:c},v=s(e=>{e(p);let t=e(h);return C(e=>g.resolve(_,t,e))}).pipe(a(B));return s(e=>{let t=e(v);return E(e(h))?null:b(d(t),()=>g.peek(_))}).pipe(a(B))});return e=>r(k(e.environmentId,e.cwd,e.faviconPath))}var Y=e(),X=[],Z=s(null).pipe(l(`web-project-clone:empty`)),Q=i(e=>s(t=>{if(t(P).get(e)?.environment.capabilities.projectCloneTracking!==!0)return X;let n=t(L.projectClones({environmentId:e,input:{}}));return b(d(n),()=>X)}).pipe(l(`web-project-clones:${e}`))),le=i(e=>{let t=n(e);return s(e=>t===null?null:e(Q(t.environmentId)).find(e=>e.projectId===t.projectId)??null).pipe(l(`web-project-clone:${e}`))});function ue(e){let n=(0,Y.c)(2),i;return n[0]===e?i=n[1]:(i=e===null?Z:le(r(e)),n[0]=e,n[1]=i),t(i)}function de(e){let n=(0,Y.c)(2),r;return n[0]===e?r=n[1]:(r=Q(e),n[0]=e,n[1]=r),t(r)}var fe=s(e=>{if(!I)return null;let t=e(N);if(t===null)return null;let n=e(F.preparedConnectionValueAtom(t)),r=e(F.initialConfigValueAtom(t));return n._tag===`None`||r===null?null:{environmentId:t,httpBaseUrl:n.value.httpBaseUrl}}),$=se(M,fe),pe=ce({imageCache:A,createUrl:$.createUrl,preparedConnection:F.preparedConnectionValueAtom,projectClones:Q});export{ue as a,J as c,de as i,q as l,pe as n,G as o,Q as r,K as s,$ as t,W as u};
|
|
2
|
+
//# sourceMappingURL=assets-Lf7mgwY7.js.map
|
package/dist/client/assets/{browserHistoryStore-DHI-0j5y.js → browserHistoryStore-Ciy-Cygo.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{B as t,H as n,Jo as r,Po as i,R as a,U as o,W as s,Wo as c,Xs as l}from"./utils-DkKLB01I.js";import{di as u,ui as d,yi as f}from"./src-R7EkrVcv.js";import{$r as p,Qr as m,_ as ee,ti as h}from"./runtime-BvdQMwVb.js";import{i as g,y as te}from"./entities-DOpLfnwX.js";import{n as _,r as v,s as ne}from"./useSettings-BhGGZc98.js";import{m as y}from"./server-DthHkqkT.js";import{r as b}from"./session-CxeYe0sJ.js";import{t as x}from"./env-BfPir1X4.js";import{i as S,t as re}from"./preview-DnCP9Q0k.js";var C=e();function ie(e){if(g(e)&&!(i()&&e!==c.get(y)))return`server`}function ae(e,t,n,r){return!r||!n||!i()||e===t?null:r.runtime===`server`?`desktop`:`server`}function oe(e){return i()||g(e)}function w(e){let t=(0,C.c)(2),n=te(e),r;return t[0]===n?r=t[1]:(r=i()||n,t[0]=n,t[1]=r),r}function T(e,t,n){return x&&n?.runtime===`server`&&!n.headless&&t!==null&&e===t}function E(e,t){let n=(0,C.c)(4),i=r(y),a;return n[0]!==e||n[1]!==t||n[2]!==i?(a=T(e,i,t),n[0]=e,n[1]=t,n[2]=i,n[3]=a):a=n[3],a}var se=e=>e._tag===`fill`?`fill`:`${e._tag}:${e.width}:${e.height}:${e._tag===`preset`?e.presetId:``}`,D=e=>Number.isFinite(e)&&e>0?e:1;function ce(e,t,n=1){if(e._tag!==`fill`)return e;let r=D(n);return t?{_tag:`freeform`,width:Math.max(1,Math.round(t.width/t.scale/r)),height:Math.max(1,Math.round(t.height/t.scale/r))}:{_tag:`freeform`,width:1280,height:800}}function O(e){return{width:Math.max(1,e.width-20),height:Math.max(1,e.height-38-10)}}function k(e,t,n=1){let r=Math.max(1,Math.round(e.width)),i=Math.max(1,Math.round(e.height));if(t._tag===`fill`)return{canvasWidth:r,canvasHeight:i,viewportX:0,viewportY:0,viewportWidth:r,viewportHeight:i,viewportScale:1,fillsPanel:!0};let a=D(n),o=t.width*a,s=t.height*a,c=Math.min(1,r/o,i/s),l=o*c,u=s*c;return{canvasWidth:r,canvasHeight:i,viewportX:Math.max(0,Math.round((r-l)/2)),viewportY:Math.max(0,Math.round((i-u)/2)),viewportWidth:l,viewportHeight:u,viewportScale:c,fillsPanel:!1}}function le(e,t,n=1){let r=k(O(e),t,n);return{...r,canvasWidth:Math.max(1,Math.round(e.width)),canvasHeight:Math.max(1,Math.round(e.height)),viewportX:r.viewportX+10,viewportY:r.viewportY+38}}var A=e=>Math.min(u,Math.max(240,e)),ue=e=>e!==void 0&&Number.isFinite(e)&&e>0;function j(e,t,n){if(n===`width`){let n=Math.ceil(Math.max(240,240*t)),r=Math.floor(Math.min(u,u*t,Math.sqrt(d*t))),i=Math.min(r,Math.max(n,Math.round(e))),a=Math.round(i/t);for(;i*a>8294400&&i>n;)--i,a=Math.round(i/t);return{width:i,height:a}}let r=Math.ceil(Math.max(240,240/t)),i=Math.floor(Math.min(u,u/t,Math.sqrt(d/t))),a=Math.min(i,Math.max(r,Math.round(e))),o=Math.round(a*t);for(;o*a>8294400&&a>r;)--a,o=Math.round(a*t);return{width:o,height:a}}function M(e,t,n=1,r=`southeast`,i){let a=D(n),o=r.includes(`east`)?t.x:r.includes(`west`)?-t.x:0,s=r.includes(`south`)?t.y:r.includes(`north`)?-t.y:0,c=e.width+o/a,l=e.height+s/a;if(ue(i)){let t=o!==0||r===`east`||r===`west`,n=s!==0||r===`north`||r===`south`,a=t&&!n?`width`:n&&!t?`height`:Math.abs(c-e.width)/e.width>=Math.abs(l-e.height)/e.height?`width`:`height`;return j(a===`width`?c:l,i,a)}let u=A(Math.round(c)),f=A(Math.round(l));return u*f<=8294400||(Math.abs(o)>=Math.abs(s)?u=Math.max(240,Math.floor(d/f)):f=Math.max(240,Math.floor(d/u))),{width:u,height:f}}var N=(e,t,n)=>{let r=(e<n?(n+e)/2:e)+t;return r<=n?r*2-n:r},P=(e,t,n)=>{if(e>n){let r=e-n;return t<=r?e-t:n-(t-r)*2}let r=(n-e)/2+t;return r>=0?n-r*2:n-r};function F(e,t,n,r=1,i=`southeast`,a){let o=D(r),s=e.width*o,c=e.height*o,l=i.includes(`east`)?N(s,t.x,n.width):i.includes(`west`)?P(s,t.x,n.width):s,u=i.includes(`south`)?N(c,t.y,n.height):i.includes(`north`)?P(c,t.y,n.height):c,d=l-s,f=u-c;return M(e,{x:i.includes(`west`)?-d:d,y:i.includes(`north`)?-f:f},o,i,a)}function I(e,t=1){let n=O(e),r=D(t);return M({width:n.width/r,height:n.height/r},{x:0,y:0})}var L=e=>{let t=f(e.browserProfiles);return{viewport:e.browserDefaultViewport,zoomFactor:e.browserDefaultZoomFactor,appearance:e.browserDefaultAppearance,autoShowFloatingPreview:e.browserAutoShowFloatingPreview,profiles:t,profileId:t.find(t=>t.id===e.browserDefaultProfileId&&t.kind!==`incognito`)?.id??`default`}};function R(){return L(v())}async function z(){return await _(),R()}function B(){return ne(L)}function V(e=R()){return{zoomFactor:e.zoomFactor,colorScheme:e.appearance}}function H(e=R()){return e.viewport}function U(e=R()){return e.profileId}var de={width:1024,height:768};function fe(e){let t=e.defaults??R();return t.viewport._tag===`fill`?{_tag:`freeform`,...e.panelRect?I(e.panelRect,e.zoomFactor):de}:t.viewport}var pe=e=>{let t=b(e);if(!t)throw Error(`Environment ${e} is not connected.`);return new URL(t.httpBaseUrl)},me=(e,t,n,r,i)=>{if(!p(n.hostname))throw Error(`This environment port needs the planned authenticated preview gateway; its server address is not directly private-network reachable.`);let a=t.protocol??`http`,o=t.path?.startsWith(`/`)?t.path:`/${t.path??``}`,s=n.hostname.replace(/^\[|\]$/g,``),c=m(s)?`localhost`:s.includes(`:`)?`[${s}]`:s,l=i?new URL(i):new URL(o,`${a}://${c}:${t.port}`);return i&&(l.hostname=c,l.port=String(t.port)),{requestedUrl:r??`${a}://localhost:${t.port}${o}`,resolvedUrl:l.toString(),resolutionKind:m(s)?`direct`:`direct-private-network`,environmentId:e}},he=e=>x&&(e._tag===`PrimaryConnectionTarget`||ee(e));function W(e,t){try{let n=S(t),r=new URL(n);if(!re(r.hostname))return n;let i=b(e)?.target;return i&&he(i)?n:me(e,{kind:`environment-port`,port:Number(r.port||(r.protocol===`https:`?443:80)),protocol:r.protocol===`https:`?`https`:`http`,path:`${r.pathname}${r.search}${r.hash}`},pe(e),t,r).resolvedUrl}catch{return t}}var ge=2048,_e=864e13;function G(e){return typeof e==`number`&&Number.isFinite(e)&&Math.abs(e)<=_e}function K(e){let t;try{t=new URL(S(e))}catch{return null}return t.username=t.password=``,t.href.length>ge?null:t.href}function q(e,t){let n=new URL(J(e,t));return n.pathname!==`/`&&n.pathname.endsWith(`/`)&&(n.pathname=n.pathname.slice(0,-1)),n.href}function J(e,t){let n=new URL(e),r=h(n.hostname),i=t&&h(t);return(m(r)||r===`0.0.0.0`||r===i)&&(n.hostname=`local`),n.href}function Y(e){let t=h(new URL(e).hostname);return m(t)||t===`0.0.0.0`}function ve(e,t,n,r){let i=J(t,r?.environmentHostname),a=e.find(e=>J(e.url,r?.environmentHostname)===i),o=e.filter(e=>J(e.url,r?.environmentHostname)!==i),s=r?.insertOrdered&&a&&a.lastVisitedAt>n?a.lastVisitedAt:n,c=a&&(Y(a.url)||!Y(t))?a.url:t,l=a?{...a,url:c,lastVisitedAt:s}:{url:t,lastVisitedAt:s};if(!r?.insertOrdered)return[l,...o].slice(0,50);let u=o.findIndex(e=>e.lastVisitedAt<l.lastVisitedAt);return(u===-1?[...o,l]:o.toSpliced(u,0,l)).slice(0,50)}function X(e){let t=Object.keys(e);if(t.length<=20)return e;let n=t.toSorted((t,n)=>(e[n]?.[0]?.lastVisitedAt??0)-(e[t]?.[0]?.lastVisitedAt??0)).slice(0,20);return Object.fromEntries(n.map(t=>[t,e[t]??[]]))}function Z(e){if(!e||typeof e!=`object`)return{byProjectKey:{}};let t=e.byProjectKey;if(!t||typeof t!=`object`||Array.isArray(t))return{byProjectKey:{}};let n={};for(let[e,r]of Object.entries(t)){if(!Array.isArray(r))continue;let t=new Set,i=r.flatMap(e=>{if(!e||typeof e!=`object`)return[];let{url:t,lastVisitedAt:n,title:r}=e;if(typeof t!=`string`)return[];let i=K(t);return!i||!G(n)?[]:[{url:i,lastVisitedAt:n,...typeof r==`string`&&r.length>0?{title:r.slice(0,512)}:{}}]}).toSorted((e,t)=>t.lastVisitedAt-e.lastVisitedAt).filter(e=>{let n=J(e.url);return!t.has(n)&&(t.add(n),!0)}).slice(0,50);i.length>0&&(n[e]=i)}return{byProjectKey:X(n)}}var ye=`p4code:browser-history:v1`,be=20;function Q(e,t,n){let r=e[t]??[],i={...e};i[t]=[...r,n].slice(-10);let a=Object.keys(i);if(a.length>be){let e=a[0];e!==void 0&&e!==t&&delete i[e]}return i}var $=s()(o((e,t)=>({byProjectKey:{},projectKeyByThreadKey:{},pendingVisitsByThreadKey:{},pendingTitlesByThreadKey:{},recordVisit:(t,n,r,i)=>{let a=K(n);a&&e(e=>({byProjectKey:X({...e.byProjectKey,[t]:ve(e.byProjectKey[t]??[],a,r,i)})}))},setTitleForUrl:(n,r,i,a)=>{let o=K(r),s=t(),c=s.byProjectKey[n],l=i.trim().slice(0,512);if(!o||!c||l.length===0)return;let u=q(o,a),d=c.findIndex(e=>q(e.url,a)===u);d!==-1&&c[d]?.title!==l&&e({byProjectKey:{...s.byProjectKey,[n]:c.map((e,t)=>t===d?{...e,title:l}:e)}})},removeUrl:(n,r)=>{let i=K(r),a=t(),o=a.byProjectKey[n];if(!i||!o)return;let s=o.filter(e=>e.url!==i);if(s.length!==o.length){if(s.length===0){let{[n]:t,...r}=a.byProjectKey;e({byProjectKey:r})}else e({byProjectKey:{...a.byProjectKey,[n]:s}})}},registerThreadProject:(n,r)=>{let i=l(n),a=t(),o=a.pendingVisitsByThreadKey[i],s=a.pendingTitlesByThreadKey[i];if(a.projectKeyByThreadKey[i]===r&&!o&&!s)return;let c={...a.pendingVisitsByThreadKey},u={...a.pendingTitlesByThreadKey};delete c[i],delete u[i],e({projectKeyByThreadKey:{...a.projectKeyByThreadKey,[i]:r},pendingVisitsByThreadKey:c,pendingTitlesByThreadKey:u});for(let e of o??[])t().recordVisit(r,e.url,e.at,{insertOrdered:!0,environmentHostname:e.environmentHostname});for(let e of s??[])t().setTitleForUrl(r,e.url,e.title,e.environmentHostname)}}),{name:ye,version:1,storage:n(()=>a(typeof window<`u`?window.localStorage:void 0)),partialize:e=>({byProjectKey:e.byProjectKey,projectKeyByThreadKey:e.projectKeyByThreadKey}),migrate:Z,merge:xe}));function xe(e,t){let n=Z(e);return{...t,...n,projectKeyByThreadKey:Se(e,n.byProjectKey),pendingVisitsByThreadKey:{},pendingTitlesByThreadKey:{}}}function Se(e,t){if(!e||typeof e!=`object`)return{};let n=e.projectKeyByThreadKey;return!n||typeof n!=`object`||Array.isArray(n)?{}:Object.fromEntries(Object.entries(n).filter(e=>typeof e[1]==`string`&&e[1]in t).slice(-100))}function Ce(e,t,n){let r=l(e),i=$.getState(),a=i.projectKeyByThreadKey[r],o=n??Date.now(),s=b(e.environmentId),c=s?new URL(s.httpBaseUrl).hostname:null;a?i.recordVisit(a,t,o,{environmentHostname:c}):$.setState({pendingVisitsByThreadKey:Q(i.pendingVisitsByThreadKey,r,{url:t,at:o,environmentHostname:c})})}function we(e,t,n,r){let i=l(e),a=$.getState(),o=a.projectKeyByThreadKey[i];o?a.setTitleForUrl(o,t,n,r):$.setState({pendingTitlesByThreadKey:Q(a.pendingTitlesByThreadKey,i,{url:t,title:n,environmentHostname:r})})}function Te(e,t){let n=$.getState(),r=n.projectKeyByThreadKey[l(e)];r&&n.removeUrl(r,t)}var Ee=[];function De(e,n){let r=(0,C.c)(3),i;return r[0]!==n||r[1]!==e?(i=t=>{let r=t.projectKeyByThreadKey[l(e)],i=r?t.byProjectKey[r]:void 0;return i&&i.length>0?i.slice(0,n):Ee},r[0]=n,r[1]=e,r[2]=i):i=r[2],$(t(i))}export{T as C,ie as S,E as T,le as _,De as a,ae as b,H as c,z as d,B as f,O as g,M as h,we as i,V as l,F as m,Ce as n,W as o,se as p,Te as r,U as s,G as t,fe as u,k as v,w,oe as x,ce as y};
|
|
2
|
-
//# sourceMappingURL=browserHistoryStore-
|
|
1
|
+
import{n as e}from"./jsx-runtime-DJeoFXNw.js";import{B as t,H as n,Jo as r,Po as i,R as a,U as o,W as s,Wo as c,Zs as l}from"./utils-BVnIIHXP.js";import{Hr as u,Vr as d,Xr as f}from"./src-DHn7yNZx.js";import{$r as p,Qr as m,_ as ee,ti as h}from"./runtime-CbYvES7U.js";import{i as g,y as te}from"./entities-CjoTQlW3.js";import{n as _,r as v,s as ne}from"./useSettings-hYzrsDTp.js";import{m as y}from"./server-CEMcTnD1.js";import{r as b}from"./session-Ces3Ebxl.js";import{t as x}from"./env-BfPir1X4.js";import{i as S,t as re}from"./preview-Bi-hPWTp.js";var C=e();function ie(e){if(g(e)&&!(i()&&e!==c.get(y)))return`server`}function ae(e,t,n,r){return!r||!n||!i()||e===t?null:r.runtime===`server`?`desktop`:`server`}function oe(e){return i()||g(e)}function w(e){let t=(0,C.c)(2),n=te(e),r;return t[0]===n?r=t[1]:(r=i()||n,t[0]=n,t[1]=r),r}function T(e,t,n){return x&&n?.runtime===`server`&&!n.headless&&t!==null&&e===t}function E(e,t){let n=(0,C.c)(4),i=r(y),a;return n[0]!==e||n[1]!==t||n[2]!==i?(a=T(e,i,t),n[0]=e,n[1]=t,n[2]=i,n[3]=a):a=n[3],a}var se=e=>e._tag===`fill`?`fill`:`${e._tag}:${e.width}:${e.height}:${e._tag===`preset`?e.presetId:``}`,D=e=>Number.isFinite(e)&&e>0?e:1;function ce(e,t,n=1){if(e._tag!==`fill`)return e;let r=D(n);return t?{_tag:`freeform`,width:Math.max(1,Math.round(t.width/t.scale/r)),height:Math.max(1,Math.round(t.height/t.scale/r))}:{_tag:`freeform`,width:1280,height:800}}function O(e){return{width:Math.max(1,e.width-20),height:Math.max(1,e.height-38-10)}}function k(e,t,n=1){let r=Math.max(1,Math.round(e.width)),i=Math.max(1,Math.round(e.height));if(t._tag===`fill`)return{canvasWidth:r,canvasHeight:i,viewportX:0,viewportY:0,viewportWidth:r,viewportHeight:i,viewportScale:1,fillsPanel:!0};let a=D(n),o=t.width*a,s=t.height*a,c=Math.min(1,r/o,i/s),l=o*c,u=s*c;return{canvasWidth:r,canvasHeight:i,viewportX:Math.max(0,Math.round((r-l)/2)),viewportY:Math.max(0,Math.round((i-u)/2)),viewportWidth:l,viewportHeight:u,viewportScale:c,fillsPanel:!1}}function le(e,t,n=1){let r=k(O(e),t,n);return{...r,canvasWidth:Math.max(1,Math.round(e.width)),canvasHeight:Math.max(1,Math.round(e.height)),viewportX:r.viewportX+10,viewportY:r.viewportY+38}}var A=e=>Math.min(u,Math.max(240,e)),ue=e=>e!==void 0&&Number.isFinite(e)&&e>0;function j(e,t,n){if(n===`width`){let n=Math.ceil(Math.max(240,240*t)),r=Math.floor(Math.min(u,u*t,Math.sqrt(d*t))),i=Math.min(r,Math.max(n,Math.round(e))),a=Math.round(i/t);for(;i*a>8294400&&i>n;)--i,a=Math.round(i/t);return{width:i,height:a}}let r=Math.ceil(Math.max(240,240/t)),i=Math.floor(Math.min(u,u/t,Math.sqrt(d/t))),a=Math.min(i,Math.max(r,Math.round(e))),o=Math.round(a*t);for(;o*a>8294400&&a>r;)--a,o=Math.round(a*t);return{width:o,height:a}}function M(e,t,n=1,r=`southeast`,i){let a=D(n),o=r.includes(`east`)?t.x:r.includes(`west`)?-t.x:0,s=r.includes(`south`)?t.y:r.includes(`north`)?-t.y:0,c=e.width+o/a,l=e.height+s/a;if(ue(i)){let t=o!==0||r===`east`||r===`west`,n=s!==0||r===`north`||r===`south`,a=t&&!n?`width`:n&&!t?`height`:Math.abs(c-e.width)/e.width>=Math.abs(l-e.height)/e.height?`width`:`height`;return j(a===`width`?c:l,i,a)}let u=A(Math.round(c)),f=A(Math.round(l));return u*f<=8294400||(Math.abs(o)>=Math.abs(s)?u=Math.max(240,Math.floor(d/f)):f=Math.max(240,Math.floor(d/u))),{width:u,height:f}}var N=(e,t,n)=>{let r=(e<n?(n+e)/2:e)+t;return r<=n?r*2-n:r},P=(e,t,n)=>{if(e>n){let r=e-n;return t<=r?e-t:n-(t-r)*2}let r=(n-e)/2+t;return r>=0?n-r*2:n-r};function F(e,t,n,r=1,i=`southeast`,a){let o=D(r),s=e.width*o,c=e.height*o,l=i.includes(`east`)?N(s,t.x,n.width):i.includes(`west`)?P(s,t.x,n.width):s,u=i.includes(`south`)?N(c,t.y,n.height):i.includes(`north`)?P(c,t.y,n.height):c,d=l-s,f=u-c;return M(e,{x:i.includes(`west`)?-d:d,y:i.includes(`north`)?-f:f},o,i,a)}function I(e,t=1){let n=O(e),r=D(t);return M({width:n.width/r,height:n.height/r},{x:0,y:0})}var L=e=>{let t=f(e.browserProfiles);return{viewport:e.browserDefaultViewport,zoomFactor:e.browserDefaultZoomFactor,appearance:e.browserDefaultAppearance,autoShowFloatingPreview:e.browserAutoShowFloatingPreview,profiles:t,profileId:t.find(t=>t.id===e.browserDefaultProfileId&&t.kind!==`incognito`)?.id??`default`}};function R(){return L(v())}async function z(){return await _(),R()}function B(){return ne(L)}function V(e=R()){return{zoomFactor:e.zoomFactor,colorScheme:e.appearance}}function H(e=R()){return e.viewport}function U(e=R()){return e.profileId}var de={width:1024,height:768};function fe(e){let t=e.defaults??R();return t.viewport._tag===`fill`?{_tag:`freeform`,...e.panelRect?I(e.panelRect,e.zoomFactor):de}:t.viewport}var pe=e=>{let t=b(e);if(!t)throw Error(`Environment ${e} is not connected.`);return new URL(t.httpBaseUrl)},me=(e,t,n,r,i)=>{if(!p(n.hostname))throw Error(`This environment port needs the planned authenticated preview gateway; its server address is not directly private-network reachable.`);let a=t.protocol??`http`,o=t.path?.startsWith(`/`)?t.path:`/${t.path??``}`,s=n.hostname.replace(/^\[|\]$/g,``),c=m(s)?`localhost`:s.includes(`:`)?`[${s}]`:s,l=i?new URL(i):new URL(o,`${a}://${c}:${t.port}`);return i&&(l.hostname=c,l.port=String(t.port)),{requestedUrl:r??`${a}://localhost:${t.port}${o}`,resolvedUrl:l.toString(),resolutionKind:m(s)?`direct`:`direct-private-network`,environmentId:e}},he=e=>x&&(e._tag===`PrimaryConnectionTarget`||ee(e));function W(e,t){try{let n=S(t),r=new URL(n);if(!re(r.hostname))return n;let i=b(e)?.target;return i&&he(i)?n:me(e,{kind:`environment-port`,port:Number(r.port||(r.protocol===`https:`?443:80)),protocol:r.protocol===`https:`?`https`:`http`,path:`${r.pathname}${r.search}${r.hash}`},pe(e),t,r).resolvedUrl}catch{return t}}var ge=2048,_e=864e13;function G(e){return typeof e==`number`&&Number.isFinite(e)&&Math.abs(e)<=_e}function K(e){let t;try{t=new URL(S(e))}catch{return null}return t.username=t.password=``,t.href.length>ge?null:t.href}function q(e,t){let n=new URL(J(e,t));return n.pathname!==`/`&&n.pathname.endsWith(`/`)&&(n.pathname=n.pathname.slice(0,-1)),n.href}function J(e,t){let n=new URL(e),r=h(n.hostname),i=t&&h(t);return(m(r)||r===`0.0.0.0`||r===i)&&(n.hostname=`local`),n.href}function Y(e){let t=h(new URL(e).hostname);return m(t)||t===`0.0.0.0`}function ve(e,t,n,r){let i=J(t,r?.environmentHostname),a=e.find(e=>J(e.url,r?.environmentHostname)===i),o=e.filter(e=>J(e.url,r?.environmentHostname)!==i),s=r?.insertOrdered&&a&&a.lastVisitedAt>n?a.lastVisitedAt:n,c=a&&(Y(a.url)||!Y(t))?a.url:t,l=a?{...a,url:c,lastVisitedAt:s}:{url:t,lastVisitedAt:s};if(!r?.insertOrdered)return[l,...o].slice(0,50);let u=o.findIndex(e=>e.lastVisitedAt<l.lastVisitedAt);return(u===-1?[...o,l]:o.toSpliced(u,0,l)).slice(0,50)}function X(e){let t=Object.keys(e);if(t.length<=20)return e;let n=t.toSorted((t,n)=>(e[n]?.[0]?.lastVisitedAt??0)-(e[t]?.[0]?.lastVisitedAt??0)).slice(0,20);return Object.fromEntries(n.map(t=>[t,e[t]??[]]))}function Z(e){if(!e||typeof e!=`object`)return{byProjectKey:{}};let t=e.byProjectKey;if(!t||typeof t!=`object`||Array.isArray(t))return{byProjectKey:{}};let n={};for(let[e,r]of Object.entries(t)){if(!Array.isArray(r))continue;let t=new Set,i=r.flatMap(e=>{if(!e||typeof e!=`object`)return[];let{url:t,lastVisitedAt:n,title:r}=e;if(typeof t!=`string`)return[];let i=K(t);return!i||!G(n)?[]:[{url:i,lastVisitedAt:n,...typeof r==`string`&&r.length>0?{title:r.slice(0,512)}:{}}]}).toSorted((e,t)=>t.lastVisitedAt-e.lastVisitedAt).filter(e=>{let n=J(e.url);return!t.has(n)&&(t.add(n),!0)}).slice(0,50);i.length>0&&(n[e]=i)}return{byProjectKey:X(n)}}var ye=`p4code:browser-history:v1`,be=20;function Q(e,t,n){let r=e[t]??[],i={...e};i[t]=[...r,n].slice(-10);let a=Object.keys(i);if(a.length>be){let e=a[0];e!==void 0&&e!==t&&delete i[e]}return i}var $=s()(o((e,t)=>({byProjectKey:{},projectKeyByThreadKey:{},pendingVisitsByThreadKey:{},pendingTitlesByThreadKey:{},recordVisit:(t,n,r,i)=>{let a=K(n);a&&e(e=>({byProjectKey:X({...e.byProjectKey,[t]:ve(e.byProjectKey[t]??[],a,r,i)})}))},setTitleForUrl:(n,r,i,a)=>{let o=K(r),s=t(),c=s.byProjectKey[n],l=i.trim().slice(0,512);if(!o||!c||l.length===0)return;let u=q(o,a),d=c.findIndex(e=>q(e.url,a)===u);d!==-1&&c[d]?.title!==l&&e({byProjectKey:{...s.byProjectKey,[n]:c.map((e,t)=>t===d?{...e,title:l}:e)}})},removeUrl:(n,r)=>{let i=K(r),a=t(),o=a.byProjectKey[n];if(!i||!o)return;let s=o.filter(e=>e.url!==i);if(s.length!==o.length){if(s.length===0){let{[n]:t,...r}=a.byProjectKey;e({byProjectKey:r})}else e({byProjectKey:{...a.byProjectKey,[n]:s}})}},registerThreadProject:(n,r)=>{let i=l(n),a=t(),o=a.pendingVisitsByThreadKey[i],s=a.pendingTitlesByThreadKey[i];if(a.projectKeyByThreadKey[i]===r&&!o&&!s)return;let c={...a.pendingVisitsByThreadKey},u={...a.pendingTitlesByThreadKey};delete c[i],delete u[i],e({projectKeyByThreadKey:{...a.projectKeyByThreadKey,[i]:r},pendingVisitsByThreadKey:c,pendingTitlesByThreadKey:u});for(let e of o??[])t().recordVisit(r,e.url,e.at,{insertOrdered:!0,environmentHostname:e.environmentHostname});for(let e of s??[])t().setTitleForUrl(r,e.url,e.title,e.environmentHostname)}}),{name:ye,version:1,storage:n(()=>a(typeof window<`u`?window.localStorage:void 0)),partialize:e=>({byProjectKey:e.byProjectKey,projectKeyByThreadKey:e.projectKeyByThreadKey}),migrate:Z,merge:xe}));function xe(e,t){let n=Z(e);return{...t,...n,projectKeyByThreadKey:Se(e,n.byProjectKey),pendingVisitsByThreadKey:{},pendingTitlesByThreadKey:{}}}function Se(e,t){if(!e||typeof e!=`object`)return{};let n=e.projectKeyByThreadKey;return!n||typeof n!=`object`||Array.isArray(n)?{}:Object.fromEntries(Object.entries(n).filter(e=>typeof e[1]==`string`&&e[1]in t).slice(-100))}function Ce(e,t,n){let r=l(e),i=$.getState(),a=i.projectKeyByThreadKey[r],o=n??Date.now(),s=b(e.environmentId),c=s?new URL(s.httpBaseUrl).hostname:null;a?i.recordVisit(a,t,o,{environmentHostname:c}):$.setState({pendingVisitsByThreadKey:Q(i.pendingVisitsByThreadKey,r,{url:t,at:o,environmentHostname:c})})}function we(e,t,n,r){let i=l(e),a=$.getState(),o=a.projectKeyByThreadKey[i];o?a.setTitleForUrl(o,t,n,r):$.setState({pendingTitlesByThreadKey:Q(a.pendingTitlesByThreadKey,i,{url:t,title:n,environmentHostname:r})})}function Te(e,t){let n=$.getState(),r=n.projectKeyByThreadKey[l(e)];r&&n.removeUrl(r,t)}var Ee=[];function De(e,n){let r=(0,C.c)(3),i;return r[0]!==n||r[1]!==e?(i=t=>{let r=t.projectKeyByThreadKey[l(e)],i=r?t.byProjectKey[r]:void 0;return i&&i.length>0?i.slice(0,n):Ee},r[0]=n,r[1]=e,r[2]=i):i=r[2],$(t(i))}export{T as C,ie as S,E as T,le as _,De as a,ae as b,H as c,z as d,B as f,O as g,M as h,we as i,V as l,F as m,Ce as n,W as o,se as p,Te as r,U as s,G as t,fe as u,k as v,w,oe as x,ce as y};
|
|
2
|
+
//# sourceMappingURL=browserHistoryStore-Ciy-Cygo.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,r as t}from"./useSettings-
|
|
2
|
-
//# sourceMappingURL=browserLinkTarget-
|
|
1
|
+
import{n as e,r as t}from"./useSettings-hYzrsDTp.js";import{x as n}from"./browserHistoryStore-Ciy-Cygo.js";function r(e){return e.event.metaKey||e.event.ctrlKey||e.preference!==`app`||!e.canOpenInApp||!i(e.url)?`system`:`app`}function i(e){try{let{protocol:t}=new URL(e);return t===`http:`||t===`https:`}catch{return!1}}async function a(){return await e(),t().browserLinkTarget}function o(e){return e!=null&&n(e.environmentId)}export{r as i,i as n,a as r,o as t};
|
|
2
|
+
//# sourceMappingURL=browserLinkTarget-DKVi8qup.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{t as r}from"./utils-
|
|
2
|
-
//# sourceMappingURL=checkbox-
|
|
1
|
+
import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{t as r}from"./utils-BVnIIHXP.js";import{n as i,t as a}from"./CheckboxIndicator-DFCs5GRD.js";var o=t(),s=e(n(),1);function c(e){let t=(0,o.c)(9),n,c;t[0]===e?(n=t[1],c=t[2]):({className:n,...c}=e,t[0]=e,t[1]=n,t[2]=c);let u;t[3]===n?u=t[4]:(u=r(`relative inline-flex size-4.5 shrink-0 items-center justify-center rounded-[.25rem] border border-input bg-background not-dark:bg-clip-padding shadow-xs/5 outline-none transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[3px] not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-ring aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:outline-destructive/48 data-disabled:opacity-64 sm:size-4 dark:not-data-checked:bg-input/32 dark:focus-visible:aria-invalid:outline-destructive/24 dark:not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)] [[data-disabled],[data-checked],[aria-invalid]]:shadow-none`,n),t[3]=n,t[4]=u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,s.jsx)(a,{className:`-inset-px absolute flex items-center justify-center rounded-[.25rem] text-primary-foreground data-unchecked:hidden data-checked:bg-primary data-indeterminate:text-foreground in-[[data-slot=checkbox]:focus-visible]:inset-shadow-[0_0_0_3px_var(--background)] in-[[data-slot=checkbox]:focus-visible]:outline-2 in-[[data-slot=checkbox]:focus-visible]:outline-solid in-[[data-slot=checkbox]:focus-visible]:-outline-offset-2 in-[[data-slot=checkbox]:focus-visible]:outline-inherit`,"data-slot":`checkbox-indicator`,render:l}),t[5]=d):d=t[5];let f;return t[6]!==c||t[7]!==u?(f=(0,s.jsx)(i,{className:u,"data-slot":`checkbox`,...c,children:d}),t[6]=c,t[7]=u,t[8]=f):f=t[8],f}function l(e,t){return(0,s.jsx)(`span`,{...e,children:t.indeterminate?(0,s.jsx)(`svg`,{className:`size-3.5 text-current sm:size-3`,fill:`none`,height:`24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`3`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,s.jsx)(`path`,{d:`M5.252 12h13.496`})}):(0,s.jsx)(`svg`,{className:`size-3.5 text-current sm:size-3`,fill:`none`,height:`24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`3`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,s.jsx)(`path`,{d:`M5.252 12.7 10.2 18.63 18.748 5.37`})})})}export{c as t};
|
|
2
|
+
//# sourceMappingURL=checkbox-iFzfBLKr.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{t as i}from"./utils-
|
|
2
|
-
//# sourceMappingURL=color-picker-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{t as i}from"./utils-BVnIIHXP.js";function a(e){let t=Number.parseInt(e.slice(1),16),n=(t>>16&255)/255,r=(t>>8&255)/255,i=(t&255)/255,a=Math.max(n,r,i),o=a-Math.min(n,r,i),s=0;return o!==0&&(s=a===n?(r-i)/o%6:a===r?(i-n)/o+2:(n-r)/o+4,s*=60,s<0&&(s+=360)),{h:s,s:a===0?0:o/a,v:a}}function o(e,t,n){let r=(e%360+360)%360,i=n*t,a=i*(1-Math.abs(r/60%2-1)),o=n-i,[s,c,l]=r<60?[i,a,0]:r<120?[a,i,0]:r<180?[0,i,a]:r<240?[0,a,i]:r<300?[a,0,i]:[i,0,a];return`#${[s,c,l].map(e=>Math.round((e+o)*255).toString(16).padStart(2,`0`)).join(``)}`}var s=n(),c=e(t(),1),l=e(r(),1);function u(e){return Math.min(1,Math.max(0,e))}function d(e,t,n){let r=(0,s.c)(9),[i,a]=(0,c.useState)(!1),o=(0,c.useRef)(null),l;r[0]===t?l=r[1]:(l=e=>{o.current===e.pointerId&&(o.current=null,a(!1),t?.())},r[0]=t,r[1]=l);let u=l,d=i?void 0:`left 80ms linear, top 80ms linear, background-color 80ms linear`,f;r[2]!==n?.current||r[3]!==u||r[4]!==e?(f={onPointerDown(t){o.current===null&&t.button===0&&(o.current=t.pointerId,(n?.current??t.currentTarget).focus({preventScroll:!0}),t.currentTarget.setPointerCapture(t.pointerId),a(!0),e(t))},onPointerMove(t){o.current===t.pointerId&&e(t)},onPointerUp:u,onPointerCancel:u,onLostPointerCapture:u},r[2]=n?.current,r[3]=u,r[4]=e,r[5]=f):f=r[5];let p;return r[6]!==d||r[7]!==f?(p={thumbTransition:d,handlers:f},r[6]=d,r[7]=f,r[8]=p):p=r[8],p}function f(e){let t=(0,s.c)(31),{label:n,value:r,onChange:a,onInteractionEnd:o,className:f,variant:p}=e,m=p===void 0?`inset`:p,h=(0,c.useId)(),g=(0,c.useRef)(null),_;t[0]!==a||t[1]!==r?(_=e=>{let t=e.currentTarget.getBoundingClientRect();t.width&&t.height&&a({...r,s:u((e.clientX-t.left)/t.width),v:1-u((e.clientY-t.top)/t.height)})},t[0]=a,t[1]=r,t[2]=_):_=t[2];let{handlers:v,thumbTransition:y}=d(_,o,g),b;t[3]!==a||t[4]!==r?(b=(e,t)=>{let n=e.shiftKey?.1:.02,i;bb18:switch(e.key){case`ArrowRight`:case`ArrowUp`:i=u(r[t]+n);break bb18;case`ArrowLeft`:case`ArrowDown`:i=u(r[t]-n);break bb18;case`Home`:i=0;break bb18;case`End`:i=1;break bb18;default:return}e.preventDefault(),a({...r,[t]:i})},t[3]=a,t[4]=r,t[5]=b):b=t[5];let x=b,S=`${n} saturation and brightness`,C=m===`edge`?`h-36 rounded-none`:`h-32 rounded-lg`,w;t[6]!==f||t[7]!==C?(w=i(`relative cursor-crosshair touch-none overflow-hidden bg-[linear-gradient(to_top,#000,transparent),linear-gradient(to_right,#fff,transparent)] has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-inset has-[:focus-visible]:ring-ring has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-popover`,C,f),t[6]=f,t[7]=C,t[8]=w):w=t[8];let T=`hsl(${r.h} 100% 50%)`,E;t[9]===T?E=t[10]:(E={backgroundColor:T},t[9]=T,t[10]=E);let D;t[11]===h?D=t[12]:(D=(0,l.jsx)(`span`,{id:h,className:`sr-only`,children:`Use arrow keys to adjust the focused value. Hold Shift for larger steps. Use Home and End for the minimum and maximum. Press Tab to move between saturation and brightness.`}),t[11]=h,t[12]=D);let O;t[13]!==x||t[14]!==h||t[15]!==n||t[16]!==a||t[17]!==r?(O=[[`s`,`Saturation`],[`v`,`Brightness`]].map(e=>{let[t,i]=e;return(0,l.jsxs)(`label`,{className:`contents`,children:[(0,l.jsx)(`input`,{ref:t===`s`?g:void 0,type:`range`,min:0,max:100,step:`any`,value:r[t]*100,"aria-label":`${n} ${i.toLowerCase()}`,"aria-describedby":h,"aria-valuetext":`${Math.round(r[t]*100)}%`,className:`peer sr-only`,onKeyDown:e=>x(e,t),onChange:e=>a({...r,[t]:e.currentTarget.valueAsNumber/100})}),(0,l.jsxs)(`span`,{"aria-hidden":!0,className:`pointer-events-none invisible absolute bottom-2 left-2 z-10 rounded bg-popover px-1.5 py-0.5 text-xs text-popover-foreground peer-focus-visible:visible`,children:[i,` `,Math.round(r[t]*100),`%`]})]},t)}),t[13]=x,t[14]=h,t[15]=n,t[16]=a,t[17]=r,t[18]=O):O=t[18];let k=`calc(${r.s} * (100% - 0.75rem) + 0.375rem)`,A=`calc(${1-r.v} * (100% - 0.75rem) + 0.375rem)`,j;t[19]!==k||t[20]!==A||t[21]!==y?(j=(0,l.jsx)(`span`,{className:`pointer-events-none absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgb(0_0_0/0.4)]`,style:{left:k,top:A,transition:y}}),t[19]=k,t[20]=A,t[21]=y,t[22]=j):j=t[22];let M;return t[23]!==v||t[24]!==O||t[25]!==j||t[26]!==S||t[27]!==w||t[28]!==E||t[29]!==D?(M=(0,l.jsxs)(`div`,{"aria-label":S,role:`group`,className:w,style:E,...v,children:[D,O,j]}),t[23]=v,t[24]=O,t[25]=j,t[26]=S,t[27]=w,t[28]=E,t[29]=D,t[30]=M):M=t[30],M}function p(e){let t=(0,s.c)(21),{label:n,value:r,onChange:a,onInteractionEnd:o,className:c}=e,f;t[0]===a?f=t[1]:(f=e=>{let t=e.currentTarget.getBoundingClientRect();t.width&&a(u((e.clientX-t.left)/t.width)*360)},t[0]=a,t[1]=f);let{handlers:p,thumbTransition:m}=d(f,o),h;t[2]!==a||t[3]!==r?(h=e=>{if(e.key===`Home`||e.key===`End`){e.preventDefault(),a(e.key===`Home`?0:360);return}if(![`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`].includes(e.key))return;e.preventDefault();let t=e.shiftKey?10:1,n=e.key===`ArrowRight`||e.key===`ArrowUp`?1:-1;a((r+n*t+360)%360)},t[2]=a,t[3]=r,t[4]=h):h=t[4];let g=h,_;t[5]===r?_=t[6]:(_=Math.round(r),t[5]=r,t[6]=_);let v;t[7]===c?v=t[8]:(v=i(`relative flex h-6 cursor-pointer touch-none items-center rounded-full outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-popover`,c),t[7]=c,t[8]=v);let y;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,l.jsx)(`span`,{"aria-hidden":!0,className:`h-2.5 w-full rounded-full bg-[linear-gradient(to_right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)] shadow-[inset_0_0_0_1px_rgb(0_0_0_/_12%)]`}),t[9]=y):y=t[9];let b=`calc(${r/360} * (100% - 1rem) + 0.5rem)`,x=`hsl(${r} 100% 50%)`,S;t[10]!==b||t[11]!==x||t[12]!==m?(S=(0,l.jsx)(`span`,{className:`pointer-events-none absolute top-1/2 size-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgb(0_0_0/0.4)]`,style:{left:b,backgroundColor:x,transition:m}}),t[10]=b,t[11]=x,t[12]=m,t[13]=S):S=t[13];let C;return t[14]!==g||t[15]!==p||t[16]!==n||t[17]!==_||t[18]!==v||t[19]!==S?(C=(0,l.jsxs)(`div`,{"aria-label":n,"aria-valuemax":360,"aria-valuemin":0,"aria-valuenow":_,className:v,role:`slider`,tabIndex:0,onKeyDown:g,...p,children:[y,S]}),t[14]=g,t[15]=p,t[16]=n,t[17]=_,t[18]=v,t[19]=S,t[20]=C):C=t[20],C}export{o as i,f as n,a as r,p as t};
|
|
2
|
+
//# sourceMappingURL=color-picker-W1NtR7ha.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Pl as i,df as a,op as o,t as s}from"./utils-BVnIIHXP.js";import{n as c}from"./useRender-BP5vR6yH.js";import{a as l,c as u,f as d,h as f,i as p,l as m,m as h,n as g,o as _,p as v,r as y,s as b,t as x}from"./ComboboxClear-Cv9NZFNr.js";import{t as S}from"./input-yaZxaTds.js";import{t as C}from"./scroll-area-DhDCLqyU.js";var w=e(t()),T=e(r());function E(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,T.jsx)(h,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}var D=w.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=u();return c(`div`,e,{ref:[t,s],props:[{children:a,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})}),O=n(),k=w.createContext({chipsRef:null,multiple:!1});function A(e){let t=(0,O.c)(7),n=w.useRef(null),r=!!e.multiple,i;t[0]===r?i=t[1]:(i={chipsRef:n,multiple:r},t[0]=r,t[1]=i);let a=i,o;t[2]===e?o=t[3]:(o=(0,T.jsx)(E,{...e}),t[2]=e,t[3]=o);let s;return t[4]!==o||t[5]!==a?(s=(0,T.jsx)(k,{value:a,children:o}),t[4]=o,t[5]=a,t[6]=s):s=t[6],s}function j(e){let t=(0,O.c)(35),n,r,a,c,l,u,d;t[0]===e?(n=t[1],r=t[2],a=t[3],c=t[4],l=t[5],u=t[6],d=t[7]):({className:n,showTrigger:l,showClear:u,startAddon:c,size:a,unstyled:d,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=c,t[5]=l,t[6]=u,t[7]=d);let f=l===void 0||l,m=u!==void 0&&u,h=d!==void 0&&d,g=a??`default`,_;t[8]===c?_=t[9]:(_=c&&(0,T.jsx)(`div`,{"aria-hidden":`true`,className:`[&_svg]:-mx-0.5 pointer-events-none absolute inset-y-0 start-px z-10 flex items-center ps-[calc(--spacing(3)-1px)] opacity-80 has-[+[data-size=sm]]:ps-[calc(--spacing(2.5)-1px)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4`,"data-slot":`combobox-start-addon`,children:c}),t[8]=c,t[9]=_);let y=c&&`data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7.5)-1px)] *:data-[slot=combobox-input]:ps-[calc(--spacing(8.5)-1px)] sm:data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7)-1px)] sm:*:data-[slot=combobox-input]:ps-[calc(--spacing(8)-1px)]`,b=g===`sm`?`has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-6.5`:`has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-7`,x;t[10]!==n||t[11]!==y||t[12]!==b?(x=s(y,b,n),t[10]=n,t[11]=y,t[12]=b,t[13]=x):x=t[13];let C=h&&`rounded-none bg-transparent text-sm`,w;t[14]===C?w=t[15]:(w=s(`has-disabled:opacity-100`,C),t[14]=C,t[15]=w);let E;t[16]!==g||t[17]!==w||t[18]!==h?(E=(0,T.jsx)(S,{className:w,nativeInput:!0,size:g,unstyled:h}),t[16]=g,t[17]=w,t[18]=h,t[19]=E):E=t[19];let D;t[20]!==r||t[21]!==E||t[22]!==x?(D=(0,T.jsx)(v,{className:x,"data-slot":`combobox-input`,render:E,...r}),t[20]=r,t[21]=E,t[22]=x,t[23]=D):D=t[23];let k;t[24]!==f||t[25]!==g?(k=f&&(0,T.jsx)(N,{className:s(`-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,g===`sm`?`end-0`:`end-0.5`),children:(0,T.jsx)(p,{"data-slot":`combobox-icon`,children:(0,T.jsx)(i,{})})}),t[24]=f,t[25]=g,t[26]=k):k=t[26];let A;t[27]!==m||t[28]!==g?(A=m&&(0,T.jsx)(z,{className:s(`-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,g===`sm`?`end-0`:`end-0.5`),children:(0,T.jsx)(o,{})}),t[27]=m,t[28]=g,t[29]=A):A=t[29];let j;return t[30]!==D||t[31]!==k||t[32]!==A||t[33]!==_?(j=(0,T.jsxs)(`div`,{className:`relative not-has-[>*.w-full]:w-fit w-full text-foreground has-disabled:opacity-64`,children:[_,D,k,A]}),t[30]=D,t[31]=k,t[32]=A,t[33]=_,t[34]=j):j=t[34],j}function M(e){let t=(0,O.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,T.jsx)(a,{"aria-hidden":`true`,className:`pointer-events-none absolute top-1.5 left-0 size-4 shrink-0 text-muted-foreground/55`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,T.jsx)(`div`,{className:`min-w-0 shrink-0 px-3 pt-2.5`,children:(0,T.jsxs)(`div`,{className:`relative -translate-y-px border-b border-border/70 pb-1.5 transition-colors focus-within:border-ring`,children:[n,(0,T.jsx)(j,{...e,className:`flex w-full [&_input]:h-6.5 [&_input]:ps-5 [&_input]:font-sans [&_input]:leading-6.5`,showTrigger:!1,size:`sm`,unstyled:!0})]})}),t[1]=e,t[2]=r),r}function N(e){let t=(0,O.c)(8),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;return t[4]!==n||t[5]!==r||t[6]!==i?(a=(0,T.jsx)(d,{className:r,"data-slot":`combobox-trigger`,...i,children:n}),t[4]=n,t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function P(e){let t=(0,O.c)(24),n,r,i,a,o,c,u,d;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],c=t[6],u=t[7],d=t[8]):({className:a,children:i,side:c,sideOffset:u,alignOffset:n,align:d,anchor:r,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=c,t[7]=u,t[8]=d);let f=c===void 0?`bottom`:c,p=u===void 0?4:u,m=d===void 0?`start`:d,{chipsRef:h,multiple:g}=w.use(k),v=r??(g?h:void 0),y;t[9]===a?y=t[10]:(y=s(`dropdown-glass relative flex max-h-full min-w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) rounded-2xl shadow-[0_16px_40px_-18px_rgb(0_0_0/55%)] transition-[scale,opacity] dark:shadow-[0_18px_44px_-18px_rgb(0_0_0/80%)]`,a),t[9]=a,t[10]=y);let x;t[11]!==i||t[12]!==o?(x=(0,T.jsx)(l,{className:`flex min-w-0 max-h-[min(var(--available-height),23rem)] flex-1 flex-col overflow-hidden text-foreground`,"data-slot":`combobox-popup`,...o,children:i}),t[11]=i,t[12]=o,t[13]=x):x=t[13];let S;t[14]!==y||t[15]!==x?(S=(0,T.jsx)(`span`,{className:y,children:x}),t[14]=y,t[15]=x,t[16]=S):S=t[16];let C;return t[17]!==m||t[18]!==n||t[19]!==v||t[20]!==f||t[21]!==p||t[22]!==S?(C=(0,T.jsx)(b,{children:(0,T.jsx)(_,{align:m,alignOffset:n,anchor:v,className:`z-[130] select-none`,"data-slot":`combobox-positioner`,side:f,sideOffset:p,children:S})}),t[17]=m,t[18]=n,t[19]=v,t[20]=f,t[21]=p,t[22]=S,t[23]=C):C=t[23],C}function F(e){let t=(0,O.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,hideIndicator:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===r?o=t[6]:(o=s(`flex min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-pointer items-center rounded-xl px-2 py-1 text-base outline-none not-data-disabled:hover:bg-accent data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-selected:bg-accent data-selected:text-foreground data-highlighted:bg-accent data-highlighted:text-accent-foreground [&[data-highlighted][data-selected]]:bg-accent [&[data-highlighted][data-selected]]:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,r),t[5]=r,t[6]=o);let c;t[7]===n?c=t[8]:(c=(0,T.jsx)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2 [&_svg:not([class*='text-'])]:text-muted-foreground`,"data-slot":`combobox-item-content`,children:n}),t[7]=n,t[8]=c);let l;return t[9]!==i||t[10]!==o||t[11]!==c?(l=(0,T.jsx)(y,{className:o,"data-slot":`combobox-item`,...i,children:c}),t[9]=i,t[10]=o,t[11]=c,t[12]=l):l=t[12],l}function I(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`not-empty:p-2 text-center text-base text-muted-foreground sm:text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(g,{className:i,"data-slot":`combobox-empty`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function L(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`not-empty:scroll-py-1 not-empty:px-1 not-empty:py-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(C,{scrollbarGutter:!0,scrollFade:!0,children:(0,T.jsx)(m,{className:i,"data-slot":`combobox-list`,...r})}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function R(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`size-full min-w-0 not-empty:px-1 not-empty:py-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(m,{className:i,"data-slot":`combobox-list`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function z(e){let t=(0,O.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,T.jsx)(x,{className:n,"data-slot":`combobox-clear`,...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function B(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`px-3 py-2 font-medium text-muted-foreground text-xs empty:m-0 empty:p-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,T.jsx)(D,{className:i,"data-slot":`combobox-status`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var V=f;export{R as a,B as c,E as d,L as i,N as l,I as n,P as o,F as r,M as s,A as t,V as u};
|
|
2
|
+
//# sourceMappingURL=combobox-B0IMIA-1.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Pl as i,df as a,jn as o,mr as s,op as c,t as l}from"./utils-BVnIIHXP.js";import{a as u,f as d,g as f,i as p,l as m,m as h,n as g,o as _,p as v,r as y,s as b,t as x,u as S}from"./ComboboxClear-Cv9NZFNr.js";import{n as C,t as w}from"./ComboboxGroupLabel-BPe0M6wJ.js";import{t as ee}from"./input-yaZxaTds.js";import{t as T}from"./scroll-area-DhDCLqyU.js";import{a as E,l as D,n as O,o as k}from"./DialogTitle-CSaaIBpP.js";import{t as A}from"./DialogRoot-Dg58-QOq.js";import{a as j,t as M}from"./dialog-styles-Df-wlHU1.js";var N=e(t()),P=e(r());function F(e){let{openOnInputClick:t=!1,value:n,defaultValue:r,onValueChange:i,mode:a=`list`,itemToStringValue:s,...c}=e,l=a===`inline`||a===`both`,u=a===`inline`||a===`none`,d=n!==void 0,[p,m]=N.useState(r??``),[g,_]=N.useState(``);N.useEffect(()=>{d&&_(``)},[n,d]);let v;v=l&&g!==``?g:d?n??``:p;let y=f(),b=N.useMemo(()=>c.filter===void 0?y.contains:c.filter,[c.filter,y]),x=String(d?n:p).trim(),S=N.useMemo(()=>a===`both`?b===null?null:(e,t,n)=>b(e,x,n):u?null:b,[b,a,x,u]);function C(e,t){_(``),d||m(e),i?.(e,t)}function w(t,n){e.onItemHighlighted?.(t,n),n.reason!==`pointer`&&_(l?t==null?``:o(t,s):``)}return(0,P.jsx)(h,{...c,itemToStringLabel:s,openOnInputClick:t,selectionMode:`none`,fillInputOnItemPress:!0,filter:S,autoComplete:a,inputValue:v,defaultInputValue:r,onInputValueChange:C,onItemHighlighted:w})}var I=d,L=y,R=n(),z=F;function B(e){let t=(0,R.c)(30),n,r,a,o,s,u;t[0]===e?(n=t[1],r=t[2],a=t[3],o=t[4],s=t[5],u=t[6]):({className:n,showTrigger:s,showClear:u,startAddon:o,size:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o,t[5]=s,t[6]=u);let d=s!==void 0&&s,f=u!==void 0&&u,m=a??`default`,h;t[7]===o?h=t[8]:(h=o&&(0,P.jsx)(`div`,{"aria-hidden":`true`,className:`[&_svg]:-mx-0.5 pointer-events-none has-[button]:pointer-events-auto absolute inset-y-0 start-px z-10 flex items-center ps-[calc(--spacing(3)-1px)] opacity-80 has-[+[data-size=sm]]:ps-[calc(--spacing(2.5)-1px)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4`,"data-slot":`autocomplete-start-addon`,children:o}),t[7]=o,t[8]=h);let g=o&&`data-[size=sm]:*:data-[slot=autocomplete-input]:ps-[calc(--spacing(7.5)-1px)] *:data-[slot=autocomplete-input]:ps-[calc(--spacing(8.5)-1px)] sm:data-[size=sm]:*:data-[slot=autocomplete-input]:ps-[calc(--spacing(7)-1px)] sm:*:data-[slot=autocomplete-input]:ps-[calc(--spacing(8)-1px)]`,_=m===`sm`?`has-[+[data-slot=autocomplete-trigger],+[data-slot=autocomplete-clear]]:*:data-[slot=autocomplete-input]:pe-6.5`:`has-[+[data-slot=autocomplete-trigger],+[data-slot=autocomplete-clear]]:*:data-[slot=autocomplete-input]:pe-7`,y;t[9]!==n||t[10]!==g||t[11]!==_?(y=l(g,_,n),t[9]=n,t[10]=g,t[11]=_,t[12]=y):y=t[12];let b;t[13]===m?b=t[14]:(b=(0,P.jsx)(ee,{nativeInput:!0,size:m}),t[13]=m,t[14]=b);let x;t[15]!==r||t[16]!==y||t[17]!==b?(x=(0,P.jsx)(v,{className:y,"data-slot":`autocomplete-input`,render:b,...r}),t[15]=r,t[16]=y,t[17]=b,t[18]=x):x=t[18];let S;t[19]!==d||t[20]!==m?(S=d&&(0,P.jsx)(Q,{className:l(`-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-colors pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=autocomplete-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,m===`sm`?`end-0`:`end-0.5`),children:(0,P.jsx)(p,{"data-slot":`autocomplete-icon`,children:(0,P.jsx)(i,{})})}),t[19]=d,t[20]=m,t[21]=S):S=t[21];let C;t[22]!==f||t[23]!==m?(C=f&&(0,P.jsx)(X,{className:l(`-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-colors pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=autocomplete-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,m===`sm`?`end-0`:`end-0.5`),children:(0,P.jsx)(c,{})}),t[22]=f,t[23]=m,t[24]=C):C=t[24];let w;return t[25]!==C||t[26]!==h||t[27]!==x||t[28]!==S?(w=(0,P.jsxs)(`div`,{className:`relative not-has-[>*.w-full]:w-fit w-full text-foreground has-disabled:opacity-64`,children:[h,x,S,C]}),t[25]=C,t[26]=h,t[27]=x,t[28]=S,t[29]=w):w=t[29],w}function V(e){let t=(0,R.c)(24),n,r,i,a,o,s,c,d;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],d=t[8]):({className:a,children:i,side:s,sideOffset:c,alignOffset:n,align:d,anchor:r,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=d);let f=s===void 0?`bottom`:s,p=c===void 0?4:c,m=d===void 0?`start`:d,h;t[9]===a?h=t[10]:(h=l(`relative flex max-h-full min-w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) rounded-lg border bg-popover not-dark:bg-clip-padding shadow-lg/5 transition-[scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]`,a),t[9]=a,t[10]=h);let g;t[11]!==i||t[12]!==o?(g=(0,P.jsx)(u,{className:`flex max-h-[min(var(--available-height),23rem)] flex-1 flex-col text-foreground`,"data-slot":`autocomplete-popup`,...o,children:i}),t[11]=i,t[12]=o,t[13]=g):g=t[13];let v;t[14]!==h||t[15]!==g?(v=(0,P.jsx)(`span`,{className:h,children:g}),t[14]=h,t[15]=g,t[16]=v):v=t[16];let y;return t[17]!==m||t[18]!==n||t[19]!==r||t[20]!==f||t[21]!==p||t[22]!==v?(y=(0,P.jsx)(b,{children:(0,P.jsx)(_,{align:m,alignOffset:n,anchor:r,className:`z-[130] select-none`,"data-slot":`autocomplete-positioner`,side:f,sideOffset:p,children:v})}),t[17]=m,t[18]=n,t[19]=r,t[20]=f,t[21]=p,t[22]=v,t[23]=y):y=t[23],y}function H(e){let t=(0,R.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=l(`flex min-h-8 cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base outline-none hover:bg-accent data-disabled:pointer-events-none data-selected:bg-accent/50 data-selected:text-foreground data-highlighted:bg-accent data-highlighted:text-accent-foreground [&[data-highlighted][data-selected]]:bg-accent [&[data-highlighted][data-selected]]:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='text-'])]:text-muted-foreground`,r),t[4]=r,t[5]=a);let o;return t[6]!==n||t[7]!==i||t[8]!==a?(o=(0,P.jsx)(L,{className:a,"data-slot":`autocomplete-item`,...i,children:n}),t[6]=n,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function U(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`[[role=group]+&]:mt-1.5`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(C,{className:i,"data-slot":`autocomplete-group`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var W=`px-2 py-1.5 font-medium text-muted-foreground text-xs`;function G(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(W,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(w,{className:i,"data-slot":`autocomplete-group-label`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function K(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(W,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(`div`,{className:i,"data-slot":`autocomplete-group-label`,role:`presentation`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function q(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`size-full min-w-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(m,{className:i,"data-slot":`autocomplete-list`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function J(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`not-empty:p-2 text-center text-base text-muted-foreground sm:text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(g,{className:i,"data-slot":`autocomplete-empty`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Y(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`not-empty:scroll-py-1 not-empty:p-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(T,{scrollbarGutter:!0,scrollFade:!0,children:(0,P.jsx)(m,{className:i,"data-slot":`autocomplete-list`,...r})}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function X(e){let t=(0,R.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`-translate-y-1/2 absolute end-0.5 top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-[color,background-color,box-shadow,opacity] pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,P.jsx)(c,{}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,P.jsx)(x,{className:i,"data-slot":`autocomplete-clear`,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}function Z(e){let t=(0,R.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,P.jsx)(S,{"data-slot":`autocomplete-collection`,...n}),t[2]=n,t[3]=r),r}function Q(e){let t=(0,R.c)(8),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;return t[4]!==n||t[5]!==r||t[6]!==i?(a=(0,P.jsx)(I,{className:r,"data-slot":`autocomplete-trigger`,...i,children:n}),t[4]=n,t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var $=A,te=E;function ne(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(M,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(D,{className:i,"data-slot":`command-dialog-backdrop`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function re(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`pointer-events-none fixed inset-0 z-50 flex flex-col items-center px-4 py-[max(--spacing(4),4vh)] sm:py-[10vh]`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(O,{className:i,"data-slot":`command-dialog-viewport`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ie(e){let t=(0,R.c)(16),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,onBackdropPointerDown:i,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===i?o=t[6]:(o=(0,P.jsx)(ne,{onPointerDown:i}),t[5]=i,t[6]=o);let s;t[7]===r?s=t[8]:(s=l(j,`pointer-events-auto max-h-105 max-w-xl text-foreground`,r),t[7]=r,t[8]=s);let c;t[9]!==n||t[10]!==a||t[11]!==s?(c=(0,P.jsx)(re,{children:(0,P.jsx)(k,{className:s,"data-slot":`command-dialog-popup`,...a,children:n})}),t[9]=n,t[10]=a,t[11]=s,t[12]=c):c=t[12];let u;return t[13]!==o||t[14]!==c?(u=(0,P.jsxs)(te,{children:[o,c]}),t[13]=o,t[14]=c,t[15]=u):u=t[15],u}function ae(e){let t=(0,R.c)(8),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({autoHighlight:r,keepHighlight:i,...n}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=r===void 0?`always`:r,o=i===void 0||i,s;return t[4]!==a||t[5]!==o||t[6]!==n?(s=(0,P.jsx)(z,{autoHighlight:a,inline:!0,keepHighlight:o,open:!0,...n}),t[4]=a,t[5]=o,t[6]=n,t[7]=s):s=t[7],s}function oe(e){let t=(0,R.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,placeholder:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let o;t[4]===n?o=t[5]:(o=l(`border-transparent! bg-transparent! shadow-none before:hidden has-focus-visible:ring-0 placeholder:text-placeholder *:data-[slot=autocomplete-input]:ps-9! sm:*:data-[slot=autocomplete-input]:ps-[calc(var(--command-shell-inset)+1.5rem)]!`,n),t[4]=n,t[5]=o);let s;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,P.jsx)(a,{className:`translate-x-0.5 text-icon-muted`}),t[6]=s):s=t[6];let c;return t[7]!==r||t[8]!==i||t[9]!==o?(c=(0,P.jsx)(`div`,{className:`px-[var(--command-shell-inset)] py-1.5 [&_[data-slot=autocomplete-start-addon]]:ps-[calc(var(--command-shell-inset)+0.0625rem)]`,children:(0,P.jsx)(B,{autoFocus:!0,className:o,placeholder:r,size:`lg`,startAddon:s,...i})}),t[7]=r,t[8]=i,t[9]=o,t[10]=c):c=t[10],c}function se(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`not-empty:scroll-py-2 not-empty:p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(Y,{className:i,"data-slot":`command-list`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ce(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`flex max-h-[inherit] flex-col`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(q,{className:i,"data-slot":`command-list`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function le(e){let t=(0,R.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,P.jsx)(K,{className:n,"data-slot":`command-group-label`,...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function ue(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`relative min-h-0 overflow-hidden rounded-t-xl not-has-[+[data-slot=command-footer]]:rounded-b-2xl bg-transparent **:data-[slot=scroll-area-scrollbar]:mt-2 [touch-action:pan-y]`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(`div`,{className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function de(e){let t=(0,R.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,P.jsx)(U,{className:n,"data-slot":`command-group`,...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function fe(e){let t=(0,R.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,P.jsx)(G,{className:n,"data-slot":`command-group-label`,...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function pe(e){let t=(0,R.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,P.jsx)(Z,{"data-slot":`command-collection`,...n}),t[2]=n,t[3]=r),r}function me(e){let t=(0,R.c)(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,active:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=n!==void 0&&`cursor-pointer hover:bg-transparent hover:text-inherit data-highlighted:bg-transparent data-highlighted:text-inherit data-selected:bg-transparent data-selected:text-inherit [&[data-highlighted][data-selected]]:bg-transparent [&[data-highlighted][data-selected]]:text-inherit`,o=n&&`bg-accent! text-accent-foreground!`,s;t[4]!==r||t[5]!==a||t[6]!==o?(s=l(`py-1.5 data-selected:bg-foreground/[0.06] data-highlighted:bg-foreground/[0.09] data-highlighted:text-foreground [&[data-highlighted][data-selected]]:bg-foreground/[0.09] [&[data-highlighted][data-selected]]:text-foreground`,a,o,r),t[4]=r,t[5]=a,t[6]=o,t[7]=s):s=t[7];let c=n||void 0,u;return t[8]!==i||t[9]!==s||t[10]!==c?(u=(0,P.jsx)(H,{className:s,"data-active":c,"data-slot":`command-item`,...i}),t[8]=i,t[9]=s,t[10]=c,t[11]=u):u=t[11],u}function he(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`ms-auto font-medium font-sans text-secondary-label text-xs tracking-widest`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(`kbd`,{className:i,"data-slot":`command-shortcut`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ge(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`relative flex items-center justify-between gap-2 rounded-b-[calc(var(--radius-2xl)-1px)] bg-foreground/[0.025] px-[var(--command-content-inset)] py-2.5 font-medium text-sm text-muted-foreground [&_[data-slot=kbd-group]]:font-sans [&_[data-slot=kbd]]:bg-foreground/[0.08] [&_[data-slot=kbd]]:text-foreground [&_[data-slot=kbd]]:ring-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(`div`,{className:i,"data-slot":`command-footer`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function _e(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`h-auto px-2 text-xs hover:bg-transparent`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,P.jsx)(s,{...r,variant:`ghost-muted`,size:`xs`,className:i}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{J as _,ge as a,Y as b,fe as c,se as d,le as f,z as g,he as h,ie as i,oe as l,ue as m,pe as n,_e as o,ce as p,$ as r,de as s,ae as t,me as u,B as v,V as x,H as y};
|
|
2
|
+
//# sourceMappingURL=command-BdVxwZ8D.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{mr as i}from"./utils-
|
|
2
|
-
//# sourceMappingURL=connect-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{mr as i}from"./utils-BVnIIHXP.js";import{j as a}from"./runtime-CbYvES7U.js";import{t as o}from"./env-BfPir1X4.js";import{i as s,r as c}from"./dist-D1XCsn7e.js";import{t as l}from"./authRedirect-DWE5a_T9.js";import{o as u,s as d}from"./main-xhw8F2iL.js";import{t as f}from"./AuthSurfaceShell-DDT8iJWE.js";var p=n(),m=e(t(),1),h=e(r(),1);function g(e){let t=(0,p.c)(10),{eyebrow:n,title:r,description:i}=e,a;t[0]===n?a=t[1]:(a=n?(0,h.jsx)(`p`,{className:`text-3xs font-semibold tracking-widest text-primary uppercase`,children:n}):null,t[0]=n,t[1]=a);let o;t[2]===r?o=t[3]:(o=(0,h.jsx)(`h1`,{className:`mt-2 text-2xl font-semibold tracking-tight sm:text-3xl`,children:r}),t[2]=r,t[3]=o);let s;t[4]===i?s=t[5]:(s=(0,h.jsx)(`p`,{className:`mt-2 text-sm leading-relaxed text-muted-foreground`,children:i}),t[4]=i,t[5]=s);let c;return t[6]!==a||t[7]!==o||t[8]!==s?(c=(0,h.jsxs)(h.Fragment,{children:[a,o,s]}),t[6]=a,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}var _={eyebrow:`Authorization request`,title:`This connect link is incomplete`,description:"The link is missing its authorization request. Re-run `p4c connect` in your terminal and open the freshly printed URL."};function v(){let e=(0,p.c)(19),[t]=(0,m.useState)(y),n=s(),{isLoaded:r,isSignedIn:a}=c(),v=(0,m.useRef)(!1),b=(0,m.useRef)(!1),x;e[0]!==n||e[1]!==t?(x=()=>{t&&n.openSignIn(l(d(t,window.location.href),o))},e[0]=n,e[1]=t,e[2]=x):x=e[2];let S=x,C,w;if(e[3]!==r||e[4]!==a||e[5]!==S||e[6]!==t?(C=()=>{if(!t||!r||b.current)return;if(!a){v.current||(v.current=!0,S());return}let e=u(t);e&&(b.current=!0,window.location.assign(e))},w=[r,a,S,t],e[3]=r,e[4]=a,e[5]=S,e[6]=t,e[7]=C,e[8]=w):(C=e[7],w=e[8]),(0,m.useEffect)(C,w),!t){let t;return e[9]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,h.jsx)(f,{children:(0,h.jsx)(g,{..._})}),e[9]=t):t=e[9],t}let T=a?`Redirecting to authorize P4 Connect for your CLI…`:`Sign in to continue authorizing P4 Connect for your CLI.`,E;e[10]===T?E=e[11]:(E=(0,h.jsx)(g,{eyebrow:`Browser authorization`,title:`Connecting your terminal`,description:T}),e[10]=T,e[11]=E);let D;e[12]!==r||e[13]!==a||e[14]!==S?(D=r&&!a?(0,h.jsx)(`div`,{className:`mt-6`,children:(0,h.jsx)(i,{type:`button`,onClick:S,children:`Sign in`})}):null,e[12]=r,e[13]=a,e[14]=S,e[15]=D):D=e[15];let O;return e[16]!==E||e[17]!==D?(O=(0,h.jsxs)(f,{children:[E,D]}),e[16]=E,e[17]=D,e[18]=O):O=e[18],O}function y(){return a(new URL(window.location.href))}var b=v;export{b as component};
|
|
2
|
+
//# sourceMappingURL=connect-C605Zs89.js.map
|