@p4code/cli 0.9.12 → 0.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.mjs +1 -1
- package/dist/{binCli-D9zhTalS.mjs → binCli-D22yxtxv.mjs} +273 -36
- package/dist/client/.vite/manifest.json +2046 -2046
- package/dist/client/assets/{2NI2N5EU-DOvURDwM.js → 2NI2N5EU-DBKJSvEQ.js} +2 -2
- package/dist/client/assets/{4UO7MD6I-CArKQR6u.js → 4UO7MD6I-1JuY3zN7.js} +2 -2
- package/dist/client/assets/{5B3SVYGG-D3yJKYTq.js → 5B3SVYGG-CwgmePuE.js} +2 -2
- package/dist/client/assets/{5GK6JWQ2-C7D6qJvm.js → 5GK6JWQ2-D9VJsozU.js} +2 -2
- package/dist/client/assets/{5N7A7DKN-DDTV444t.js → 5N7A7DKN-CFgZoUw5.js} +2 -2
- package/dist/client/assets/{5OC2THR4-CYaAiBA5.js → 5OC2THR4-Cx6keXWX.js} +2 -2
- package/dist/client/assets/{5S6HY5KT-jYzQX9YI.js → 5S6HY5KT-Ce1reKKv.js} +2 -2
- package/dist/client/assets/{6IMQ5BUJ-CZSZgyOb.js → 6IMQ5BUJ-D7X0q9kf.js} +2 -2
- package/dist/client/assets/{6OLKWJ4F-D_TpeHsd.js → 6OLKWJ4F-YLfMA9aH.js} +2 -2
- package/dist/client/assets/{74OO7NKP-VJq-BY7c.js → 74OO7NKP-Wm5pZPTC.js} +2 -2
- package/dist/client/assets/{75O6YZUN-BCik3Y9V.js → 75O6YZUN-D2He6_fp.js} +2 -2
- package/dist/client/assets/{77XECAW3-Ce_-nZaY.js → 77XECAW3-CV_JLSeU.js} +2 -2
- package/dist/client/assets/{ABYRPUBD-C1hL61qL.js → ABYRPUBD-D0xOVN1A.js} +2 -2
- package/dist/client/assets/AlertDialogRoot-DaczVYX9.js +2 -0
- package/dist/client/assets/{AnimatedHeight-DEeywxgS.js → AnimatedHeight-yuTG4G03.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell-835o12nS.js → AuthSurfaceShell-CCBOJP5G.js} +2 -2
- package/dist/client/assets/{BB2UYUI2-DlIE2g50.js → BB2UYUI2-BdXGRPif.js} +2 -2
- package/dist/client/assets/{BUM34MOA-D9NQPxww.js → BUM34MOA-isqGnSvm.js} +2 -2
- package/dist/client/assets/{CEQABKGZ-BsiY6pPC.js → CEQABKGZ-DE0PWXRq.js} +2 -2
- package/dist/client/assets/{CXAC5362-t7YfF0UQ.js → CXAC5362-0Zr5tv4C.js} +2 -2
- package/dist/client/assets/{ChatGptUsageButton-C3xHekTe.js → ChatGptUsageButton-w6RkBCUH.js} +2 -2
- package/dist/client/assets/{ChatMarkdown-Cw9bEYxG.js → ChatMarkdown-CFUfXlYp.js} +5 -5
- package/dist/client/assets/{CheckboxIndicator-XdXpYxXy.js → CheckboxIndicator-lkbFKbE7.js} +2 -2
- package/dist/client/assets/{ClippedText-C-unQqBz.js → ClippedText-Bf8FSQkX.js} +2 -2
- package/dist/client/assets/{CodexSetupSection.logic-Bl5OcEqH.js → CodexSetupSection.logic-SHExnMKR.js} +2 -2
- package/dist/client/assets/{ComboboxClear-CBRGIQSm.js → ComboboxClear-B0HJXjbz.js} +2 -2
- package/dist/client/assets/{ComboboxGroupLabel-DVAwRoGV.js → ComboboxGroupLabel-CMc5xUrd.js} +2 -2
- package/dist/client/assets/{CommandBlock-D6NTupaO.js → CommandBlock-CluJmhVo.js} +2 -2
- package/dist/client/assets/{ComposerPromptEditor-BqLNVkse.js → ComposerPromptEditor-DR1WsmjD.js} +4 -4
- package/dist/client/assets/{CompositeRoot-DBS-Yo_S.js → CompositeRoot-BMHKb-nN.js} +2 -2
- package/dist/client/assets/{ConnectAgentSurface-TBgGDnVI.js → ConnectAgentSurface-CNWdh9ck.js} +2 -2
- package/dist/client/assets/{ConnectionStatusDot-CR_qWdCU.js → ConnectionStatusDot-CpmZ8NE5.js} +2 -2
- package/dist/client/assets/{DRLTVNUE-DkTzG_pM.js → DRLTVNUE-Dttc5MrD.js} +2 -2
- package/dist/client/assets/{DYY6UVD2-BBRUtn6A.js → DYY6UVD2-DTrZAR1D.js} +2 -2
- package/dist/client/assets/{DevicePanel-BS7y97f_.js → DevicePanel-CRFuAv_j.js} +2 -2
- package/dist/client/assets/{DeviceSetup-TIKLCkls.js → DeviceSetup-DRzepax4.js} +2 -2
- package/dist/client/assets/{DialogTitle-DzoEjZ6h.js → DialogTitle-pLX9Mw1n.js} +2 -2
- package/dist/client/assets/{DiffCommentAnnotation-y1CrEDvy.js → DiffCommentAnnotation-6V9nI3Cm.js} +2 -2
- package/dist/client/assets/{DiffFileTree-BM7RDTEn.js → DiffFileTree-CBEjDul5.js} +2 -2
- package/dist/client/assets/{DiffPanel-CAK_DAYa.js → DiffPanel-CM5Rvb_z.js} +2 -2
- package/dist/client/assets/{DiffWorkerPoolProvider-D2t5zRbN.js → DiffWorkerPoolProvider-f4-YQsHo.js} +2 -2
- package/dist/client/assets/{EmbeddedDesign-_id3IQO6.js → EmbeddedDesign-DSEjf0KK.js} +2 -2
- package/dist/client/assets/{EnvironmentMachineIcon-oObSi9GI.js → EnvironmentMachineIcon-B6wAZat7.js} +2 -2
- package/dist/client/assets/{ExpandableText-BLwIQ2BJ.js → ExpandableText-Cjat32hh.js} +2 -2
- package/dist/client/assets/{FNOVOB4O-B469NSHv.js → FNOVOB4O-LisHSqAM.js} +2 -2
- package/dist/client/assets/{FieldControl-Btl-j-6W.js → FieldControl-DwBVFJAI.js} +2 -2
- package/dist/client/assets/{FileDiff-CGLKzg3V.js → FileDiff-Bj9kBLN2.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-DJ-LkCJ7.js → FilePreviewPanel-z6NirC2y.js} +2 -2
- package/dist/client/assets/{FoldedSettingsSection-DPTJODig.js → FoldedSettingsSection-DIlgxayr.js} +2 -2
- package/dist/client/assets/{FormContext-Be16jmaZ.js → FormContext-DcnLkh-4.js} +2 -2
- package/dist/client/assets/{HDGCDEEZ-BUMQl9WF.js → HDGCDEEZ-Bn1jLSys.js} +2 -2
- package/dist/client/assets/{HSJLKHB7-C08sJAK2.js → HSJLKHB7-CHpiqxlA.js} +2 -2
- package/dist/client/assets/{Icons-2l7Ym4KO.js → Icons-Be1TL1sN.js} +2 -2
- package/dist/client/assets/Input-BZ1XdBC0.js +2 -0
- package/dist/client/assets/JZOYTAAL-BZEjBuKj.js +1 -0
- package/dist/client/assets/{K3MD6TGW-D4RWgVJJ.js → K3MD6TGW-D5oCFPkP.js} +2 -2
- package/dist/client/assets/{K7RP3OMA-B8UDebPA.js → K7RP3OMA-ZIPW--CU.js} +2 -2
- package/dist/client/assets/{KeybindingsSettings.logic-CCfOv-KZ.js → KeybindingsSettings.logic-Ctmq4InP.js} +2 -2
- package/dist/client/assets/{LHDIQX7Q-DwRY1EjH.js → LHDIQX7Q-BkDTNH4X.js} +2 -2
- package/dist/client/assets/{LUXOKEGN-BTGUp3oJ.js → LUXOKEGN-BMFFLlMk.js} +2 -2
- package/dist/client/assets/{LinkMachineSelect-DoHeQGoj.js → LinkMachineSelect-DGm4EDKi.js} +2 -2
- package/dist/client/assets/{MathTypeset-DZCUnfpK.js → MathTypeset-DpXMOBGY.js} +2 -2
- package/dist/client/assets/{N3JZAHOW-C-bkdj1S.js → N3JZAHOW-CV9TIlCo.js} +2 -2
- package/dist/client/assets/{NUIALGQ3-COfmKsf1.js → NUIALGQ3-WBqakHka.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-CbIPjHEJ.js → NoProjectsHero-BfU7AxbB.js} +2 -2
- package/dist/client/assets/{O65XPQGZ-BPK2EL3_.js → O65XPQGZ-CYhr2tYZ.js} +2 -2
- package/dist/client/assets/{O7XIQ6OM-qzVUZXbW.js → O7XIQ6OM-D2JMbFqc.js} +2 -2
- package/dist/client/assets/{OFQON5FD-DJVnaZou.js → OFQON5FD-B1aTfx9o.js} +2 -2
- package/dist/client/assets/{P4ConnectAccountPages-DwBbHN5Q.js → P4ConnectAccountPages-J205rNHS.js} +2 -2
- package/dist/client/assets/{P4ConnectSidebarSignIn-D7VczA30.js → P4ConnectSidebarSignIn-Bc4xlsJh.js} +2 -2
- package/dist/client/assets/{PJQHF43J-CTXALHLE.js → PJQHF43J-Dm3RMjWi.js} +2 -2
- package/dist/client/assets/{PanelLayoutControls-D8g6TJ8z.js → PanelLayoutControls-BQZYES2T.js} +4 -4
- package/dist/client/assets/{PierreEntryIcon-CUoKY0yE.js → PierreEntryIcon-CHy821MU.js} +2 -2
- package/dist/client/assets/{PopoverHandle-tRSwNzqr.js → PopoverHandle-BkzqaTB6.js} +2 -2
- package/dist/client/assets/{PreviewPanel-cYx50TF6.js → PreviewPanel-D8V2zDl4.js} +2 -2
- package/dist/client/assets/{ProjectDefaultsSettings-G0FTRG0c.js → ProjectDefaultsSettings-6UkudkKP.js} +2 -2
- package/dist/client/assets/{ProjectFavicon-in-OyDkg.js → ProjectFavicon-LcyFYpHB.js} +3 -3
- package/dist/client/assets/{ProjectIconPickerDialog-JCPOaZup.js → ProjectIconPickerDialog-D03-Jrsi.js} +2 -2
- package/dist/client/assets/{ProjectMonogram-DdbScW3Y.js → ProjectMonogram-C8FlNLaU.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-CCw2XmNz.js → ProviderAuthTerminal-DMTbKboR.js} +2 -2
- package/dist/client/assets/{ProviderModelPicker-DWqfDVY9.js → ProviderModelPicker-CpWE-Lfx.js} +2 -2
- package/dist/client/assets/{ProviderSettingsForm-_viBEB9w.js → ProviderSettingsForm-DrCFln8c.js} +2 -2
- package/dist/client/assets/{PullRequestCodeTab-D3ntjIAg.js → PullRequestCodeTab-CjBrGNWY.js} +2 -2
- package/dist/client/assets/{RHNBAITX-BR5h8H8U.js → RHNBAITX-C7mnxleL.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-Bx9Jebzp.js → ReadOnlySourcePreview-BasbTHVd.js} +2 -2
- package/dist/client/assets/{RedactedSensitiveText-DM7Kme26.js → RedactedSensitiveText-DACYfm7e.js} +2 -2
- package/dist/client/assets/{RenderErrorBoundary-BeYcnW7D.js → RenderErrorBoundary-CIVNp8r9.js} +2 -2
- package/dist/client/assets/{SLD4V6NK-DfUtjUb_.js → SLD4V6NK-BkeVs7gb.js} +2 -2
- package/dist/client/assets/{ScheduledTasksSettings-BcF7IiOl.js → ScheduledTasksSettings-DpYigye5.js} +2 -2
- package/dist/client/assets/{ScopedSwitch-CD9C3Bhs.js → ScopedSwitch-D1uscoF8.js} +2 -2
- package/dist/client/assets/{ScrollAreaCorner-D5JbJL5g.js → ScrollAreaCorner-DBtks1xb.js} +2 -2
- package/dist/client/assets/{SecretInput-ttyiYbVY.js → SecretInput-ZW3hnCoN.js} +2 -2
- package/dist/client/assets/{SelectScrollUpArrow-BV1xykNQ.js → SelectScrollUpArrow-Bq-GYRhT.js} +2 -2
- package/dist/client/assets/{SelfImproveSettingsSection-Dm8NhqV7.js → SelfImproveSettingsSection-CDIhJO4P.js} +2 -2
- package/dist/client/assets/{SettingsPanels-BsyJETg8.js → SettingsPanels-Co5mks6X.js} +2 -2
- package/dist/client/assets/{SettingsPanels.logic-DS-Semyc.js → SettingsPanels.logic-H5v8FTnu.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice--a-aNSRR.js → SettingsScopeNotice-gFtgpybO.js} +2 -2
- package/dist/client/assets/{SidebarStageBackdrop-ntSLLOvm.js → SidebarStageBackdrop-DSuAw8Ob.js} +2 -2
- package/dist/client/assets/{T3PCR2KE-C5JeZecU.js → T3PCR2KE-D6MHoseG.js} +2 -2
- package/dist/client/assets/{TKWO2OVW-B11aaxW8.js → TKWO2OVW-gZK7dLQZ.js} +2 -2
- package/dist/client/assets/{TSHNXIZL-2800Jt5F.js → TSHNXIZL-BKUmF3Cu.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-CTXEQSgi.js → ThemeEditorPanel-lI_9CbBH.js} +2 -2
- package/dist/client/assets/{ThreadTerminalDrawer-DIUp50A3.js → ThreadTerminalDrawer-CD3plt2C.js} +2 -2
- package/dist/client/assets/{TooltipViewport-rDmof6w5.js → TooltipViewport-Be_gbUW1.js} +2 -2
- package/dist/client/assets/{UQJE5E4I-BG1U9EIM.js → UQJE5E4I-D6av033t.js} +2 -2
- package/dist/client/assets/{USNYFO5S-d4iGw5HU.js → USNYFO5S-Cy6sDMEU.js} +2 -2
- package/dist/client/assets/{Virtualizer-CzClYBap.js → Virtualizer-B_IsUzcr.js} +2 -2
- package/dist/client/assets/{WEVWDWVA-V2MwjUCO.js → WEVWDWVA-Cq1fZcng.js} +2 -2
- package/dist/client/assets/{WorkspaceBreadcrumb-Dpau2BKr.js → WorkspaceBreadcrumb-DbQW7iNE.js} +2 -2
- package/dist/client/assets/{WorkspacePageContainer-C3u06BW-.js → WorkspacePageContainer-BxI-x0oV.js} +2 -2
- package/dist/client/assets/{WorkspacePageHeader-MBEFb20_.js → WorkspacePageHeader-Bc_F6Uog.js} +2 -2
- package/dist/client/assets/{X5RFHQXM-D_mIa6o9.js → X5RFHQXM-DdtKPA-W.js} +2 -2
- package/dist/client/assets/{X62E3GBT-Cwvyi_iR.js → X62E3GBT-C7OjB5pB.js} +2 -2
- package/dist/client/assets/{XBNEOJTC-sfA1U_fe.js → XBNEOJTC-_Tbl2Kwh.js} +2 -2
- package/dist/client/assets/{YHV2MVVZ-CZoP6AAo.js → YHV2MVVZ-CA4YS5f4.js} +2 -2
- package/dist/client/assets/{YURCZMG2-DYo6rqon.js → YURCZMG2-DSnhUUsH.js} +2 -2
- package/dist/client/assets/{YVG2LODB-D8sTsTwc.js → YVG2LODB-D-qFsH5t.js} +2 -2
- package/dist/client/assets/_chat-Cnc6rxt6.js +47 -0
- package/dist/client/assets/{_chat.design-Nh4vxHDS.js → _chat.design-SX7SShjI.js} +2 -2
- package/dist/client/assets/{_chat.index-YNITFXX3.js → _chat.index-Bz1lJLpv.js} +2 -2
- package/dist/client/assets/{_chat.new-B16PAbQN.js → _chat.new-BEqc5oJc.js} +2 -2
- package/dist/client/assets/{_chat.pull-requests-DEHC0db5.js → _chat.pull-requests-A3IwVYWs.js} +2 -2
- package/dist/client/assets/{alert-UH7IbYie.js → alert-BOVMKHDy.js} +2 -2
- package/dist/client/assets/{alert-dialog-D3mCT6Vy.js → alert-dialog-Du3fYY3I.js} +2 -2
- package/dist/client/assets/{assetUrls-BNjjSBLP.js → assetUrls-CYjvy6P4.js} +2 -2
- package/dist/client/assets/{assets-CrCgj2yM.js → assets-JgE2I_Ix.js} +2 -2
- package/dist/client/assets/{browserHistoryStore-CW_ylkPy.js → browserHistoryStore-CdncPjG8.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-Dlnk6CC2.js → browserLinkTarget-Bf9H9UVe.js} +2 -2
- package/dist/client/assets/{checkbox-Bqcsvpsf.js → checkbox-d50pgAVe.js} +2 -2
- package/dist/client/assets/{color-picker-DAcpRn0k.js → color-picker-zcQshxaE.js} +2 -2
- package/dist/client/assets/{combobox-CoLp0McG.js → combobox-BrCd1kH5.js} +2 -2
- package/dist/client/assets/{command-cKnhWwdw.js → command-DFkhX6wm.js} +2 -2
- package/dist/client/assets/{connect-rbXRyqde.js → connect-DkH09d_M.js} +2 -2
- package/dist/client/assets/connect-agent-DJHm1Ubj.js +2 -0
- package/dist/client/assets/{design-BJbd-4a9.js → design-DrpehYJf.js} +2 -2
- package/dist/client/assets/{device-BqGYZxfg.js → device-Nh7DArH7.js} +2 -2
- package/dist/client/assets/{dialog-CjB1WWbE.js → dialog-BpR3dRVS.js} +2 -2
- package/dist/client/assets/{diffRendering-JsGpyVJ1.js → diffRendering-BuOJdnZ8.js} +2 -2
- package/dist/client/assets/{dist-D4GndTOF.js → dist-CMJL98Oz.js} +3 -3
- package/dist/client/assets/{draft-input-1ySc55QI.js → draft-input-CzfhM72Z.js} +2 -2
- package/dist/client/assets/{duoViewer-DvlUJy5A.js → duoViewer-ChrCWcjO.js} +2 -2
- package/dist/client/assets/{dynamic-B8PD-aHj.js → dynamic-CVt07u2H.js} +2 -2
- package/dist/client/assets/{embeddedScripts-ByokzHX1.js → embeddedScripts-BWqMWwOU.js} +2 -2
- package/dist/client/assets/{empty-CMnFXg8W.js → empty-Cy-8us9l.js} +2 -2
- package/dist/client/assets/{entities-CTJ1ube2.js → entities-aKdRyfsJ.js} +2 -2
- package/dist/client/assets/{fileLinks-lUzqPrjb.js → fileLinks-BgHa8yE4.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-B6sjoSXU.js → fileTreeExpansion-CBn1SzSX.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-Bt5vSiss.js → getDiffFileInput-IQ1TDM4E.js} +2 -2
- package/dist/client/assets/{guideRunStore-DFawhaj_.js → guideRunStore-DfNfJUIu.js} +2 -2
- package/dist/client/assets/{htmlRender-DJLbbd4O.js → htmlRender-lwQ3HyqS.js} +2 -2
- package/dist/client/assets/{index-CxLeDuff.js → index-BXvrSYK3.js} +3 -3
- package/dist/client/assets/{input-CSgYZgdv.js → input-FUjAUGXY.js} +2 -2
- package/dist/client/assets/{input-group-a-sGQMiV.js → input-group-BdZ_CKvG.js} +2 -2
- package/dist/client/assets/{kbd-D3uRVBMx.js → kbd-CGgmav-Q.js} +2 -2
- package/dist/client/assets/{keybindings-B9X0TLvu.js → keybindings-DuCyi9aT.js} +2 -2
- package/dist/client/assets/{lazy-C_hQh3dP.js → lazy-Bs2SFpYS.js} +4 -4
- package/dist/client/assets/{lazyRouteComponent-GMfIUG8o.js → lazyRouteComponent-CYNRqeNP.js} +2 -2
- package/dist/client/assets/{link-BmkuqfGQ.js → link-DW1IQk5s.js} +2 -2
- package/dist/client/assets/{linkedPrompt-BNxBPorU.js → linkedPrompt-yo2xi4Z8.js} +2 -2
- package/dist/client/assets/{main-DIEsHSIy.js → main-C0z861OK.js} +7 -7
- package/dist/client/assets/{mediaReference-CVS-Yvam.js → mediaReference-BQ9J-tjl.js} +2 -2
- package/dist/client/assets/{mediaSource-DQsJoeCH.js → mediaSource-BLpxwEw3.js} +2 -2
- package/dist/client/assets/{number-field-Bw2BDGyn.js → number-field-Pve745k3.js} +2 -2
- package/dist/client/assets/{observeResize-Br7VOcTc.js → observeResize-CZuDzlcZ.js} +2 -2
- package/dist/client/assets/{onboarding-D6kvYnD1.js → onboarding-CE8pzS12.js} +2 -2
- package/dist/client/assets/{openFileInPreview-52PEk4wb.js → openFileInPreview-Dns9tPaB.js} +2 -2
- package/dist/client/assets/{p4ProjectFile-B1qTw64E.js → p4ProjectFile-jwYvYDE-.js} +2 -2
- package/dist/client/assets/{pair-Das8G2kV.js → pair-OPslYcM9.js} +2 -2
- package/dist/client/assets/{pendingSendStore-B1MXHU-Y.js → pendingSendStore-CLwMM17y.js} +2 -2
- package/dist/client/assets/{phoneViewer-iWL9Ocv_.js → phoneViewer-CkTxyA9N.js} +2 -2
- package/dist/client/assets/{pierre-icons-CyZxWykW.js → pierre-icons-DY8ZeGCr.js} +2 -2
- package/dist/client/assets/{popover-Cpc0L75h.js → popover-hYAmvSJj.js} +2 -2
- package/dist/client/assets/{preview-DRZGCh-w.js → preview-CI9HEdfV.js} +2 -2
- package/dist/client/assets/{preview-CDQ5ceMi.js → preview-YhZE3kRt.js} +2 -2
- package/dist/client/assets/{previewMiniPlayerStore-Dd2KfilQ.js → previewMiniPlayerStore-DUPe1gGI.js} +2 -2
- package/dist/client/assets/{primary-YDhFfOF8.js → primary-BlS2rEKe.js} +2 -2
- package/dist/client/assets/{primaryCloudLinkState-kvnCGEBC.js → primaryCloudLinkState-CyPf4N0F.js} +2 -2
- package/dist/client/assets/{projectFilesQueryState-DvEcN38K.js → projectFilesQueryState-BdWJ4WwI.js} +2 -2
- package/dist/client/assets/{projectScriptEditor-lOSI5meb.js → projectScriptEditor-C0FBhCbn.js} +2 -2
- package/dist/client/assets/{providerSkills-CRmME5qO.js → providerSkills-Ca_7EbAx.js} +2 -2
- package/dist/client/assets/{pullRequestDetail.logic-CXEtJJcn.js → pullRequestDetail.logic-DYx7bEwE.js} +2 -2
- package/dist/client/assets/{pullRequestIcons-D8Koo716.js → pullRequestIcons-csprKuju.js} +2 -2
- package/dist/client/assets/{pullRequestReviewStore-CpLjLBJR.js → pullRequestReviewStore-_uEYgfaW.js} +2 -2
- package/dist/client/assets/{pullRequests-DKqH-UAm.js → pullRequests-B85p5Xnw.js} +2 -2
- package/dist/client/assets/{queries-eqpX-CHf.js → queries-B0FvRKmk.js} +2 -2
- package/dist/client/assets/{query-D5Kb9u_z.js → query-B2_Td0ad.js} +2 -2
- package/dist/client/assets/{radio-group-DpxVKrML.js → radio-group-IyWHDcIP.js} +2 -2
- package/dist/client/assets/{renderScheduler-B1rJHKDM.js → renderScheduler-DR2WAtIH.js} +2 -2
- package/dist/client/assets/{rightPanelStore-DQ1c3-Lt.js → rightPanelStore-rZSIb-5z.js} +2 -2
- package/dist/client/assets/{runtime-DCbEdU32.js → runtime-BK2Lh1vB.js} +3 -3
- package/dist/client/assets/{runtime-DeVKKxNz.js → runtime-BVmDVuJ-.js} +3 -3
- package/dist/client/assets/{runtimeModeConfig-CZCsG9b4.js → runtimeModeConfig-DFxXOIlV.js} +2 -2
- package/dist/client/assets/{scheduledTasksSettings.logic-gN3n5v-e.js → scheduledTasksSettings.logic-W9AQpJk4.js} +2 -2
- package/dist/client/assets/{scroll-area-C9Jh_pl0.js → scroll-area-Cf7uLi_s.js} +2 -2
- package/dist/client/assets/{select-oshTwPZM.js → select-vBkqTMKL.js} +2 -2
- package/dist/client/assets/selfImproveFindings-4GGN9cRm.js +2 -0
- package/dist/client/assets/{server-Ct4-BCZx.js → server-DwkxciXh.js} +2 -2
- package/dist/client/assets/{session-Bb7JWdWO.js → session-BIwsf8Q4.js} +2 -2
- package/dist/client/assets/{session-logic-D0Wb0fc2.js → session-logic-D8FbVFDm.js} +2 -2
- package/dist/client/assets/{settings-CQtFOh_t.js → settings-C58Y7hMl.js} +2 -2
- package/dist/client/assets/{settings.appearance-CqHPJVJ2.js → settings.appearance-C9ZmuG-n.js} +2 -2
- package/dist/client/assets/settings.archived-BxqS4kuW.js +2 -0
- package/dist/client/assets/{settings.computer-use-CDrWkvkD.js → settings.computer-use-CeIs-8zf.js} +2 -2
- package/dist/client/assets/{settings.connections-CHXX5kH0.js → settings.connections-CEr4PdrJ.js} +2 -2
- package/dist/client/assets/{settings.data-controls-Bd79f82M.js → settings.data-controls-BbzJxjBi.js} +2 -2
- package/dist/client/assets/{settings.decisions-B-i781li.js → settings.decisions-DagsCV4K.js} +2 -2
- package/dist/client/assets/{settings.designs-DpX9xXFH.js → settings.designs-DEThhuEj.js} +2 -2
- package/dist/client/assets/{settings.diagnostics-Du6_cMwQ.js → settings.diagnostics-DdsecwWn.js} +2 -2
- package/dist/client/assets/{settings.general-6bgZAoM7.js → settings.general-RgU1jNmB.js} +2 -2
- package/dist/client/assets/{settings.integrations-Ct8ruO3E.js → settings.integrations-CO-aLXSC.js} +2 -2
- package/dist/client/assets/{settings.keybindings-DzB2I9OY.js → settings.keybindings-CU8fBQaI.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-C-RX63iR.js → settings.open-source-licenses-rG8Neftl.js} +2 -2
- package/dist/client/assets/{settings.plugins-CqpVlMrk.js → settings.plugins-Dr0VpcPy.js} +2 -2
- package/dist/client/assets/{settings.projects-DosfFxrs.js → settings.projects-hxwk8_7r.js} +3 -3
- package/dist/client/assets/{settings.providers-DKgzTRpw.js → settings.providers-D5-Kj1jY.js} +3 -3
- package/dist/client/assets/{settings.scheduled-tasks-Ca4XxyAg.js → settings.scheduled-tasks-DwUd14Xj.js} +2 -2
- package/dist/client/assets/{settings.snap-shot-BkSOnsJ3.js → settings.snap-shot-CTMJRtJe.js} +2 -2
- package/dist/client/assets/{settings.source-control-uZ0ges0j.js → settings.source-control-BHD5KE8W.js} +2 -2
- package/dist/client/assets/{settings.storage-BkURtSS0.js → settings.storage-Bhd9ragP.js} +2 -2
- package/dist/client/assets/{settingsLayout-krWuVpsF.js → settingsLayout-WhjsCfB6.js} +2 -2
- package/dist/client/assets/{sidebar-PSpwc3Zu.js → sidebar-O52WtiJv.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-D02jVAL6.js → sidebarProjectGrouping-BYVdJp_w.js} +2 -2
- package/dist/client/assets/{skeleton-DIPW_H7N.js → skeleton-PlPtYr_f.js} +2 -2
- package/dist/client/assets/{sourceControl-B9aMMjp2.js → sourceControl-BkJeQRrv.js} +2 -2
- package/dist/client/assets/{sourceControlClients-XtdH6kjx.js → sourceControlClients-CtMx7u86.js} +2 -2
- package/dist/client/assets/{spinner-BeAnBYcY.js → spinner-BZ5ohCyO.js} +2 -2
- package/dist/client/assets/{terminal-links-CYEBYRi6.js → terminal-links-UI2UJn0y.js} +2 -2
- package/dist/client/assets/{terminalSessions-C2k3TT8f.js → terminalSessions-C1xOLG3i.js} +2 -2
- package/dist/client/assets/{textarea-DBTtAB2q.js → textarea-DIg__-Gi.js} +2 -2
- package/dist/client/assets/{themePalette-Uk7bx8zb.js → themePalette-BMlBfFUx.js} +2 -2
- package/dist/client/assets/{toast-Dkj3G-UM.js → toast-BZ96uuab.js} +2 -2
- package/dist/client/assets/{toggle-DYYe3Gb8.js → toggle-DJ8KOwn5.js} +2 -2
- package/dist/client/assets/{toggle-group-hQw0fxkT.js → toggle-group-2e3XGJdx.js} +2 -2
- package/dist/client/assets/{tooltip-BeHmtauD.js → tooltip-BPiLl1TV.js} +2 -2
- package/dist/client/assets/{uiStateStore-Cd96D_GT.js → uiStateStore-4i21PZUL.js} +2 -2
- package/dist/client/assets/{usage-ChIGOn5O.js → usage-uuNPbJve.js} +2 -2
- package/dist/client/assets/{usageAccess-DTKEwCKL.js → usageAccess-CsMv6eC9.js} +2 -2
- package/dist/client/assets/{usageFormat-D1mf8I5d.js → usageFormat-DhefL58S.js} +2 -2
- package/dist/client/assets/{usageShortcuts-C0jTsdR4.js → usageShortcuts-CREc0FBr.js} +2 -2
- package/dist/client/assets/{use-atom-command-D4TeQyNE.js → use-atom-command-CdV5BZYB.js} +2 -2
- package/dist/client/assets/{useAriaLabelledBy-Cod6bMX5.js → useAriaLabelledBy-CYRfRdAq.js} +2 -2
- package/dist/client/assets/{useHandleNewThread-CJ3yJ6tD.js → useHandleNewThread-BsnMrEPr.js} +2 -2
- package/dist/client/assets/{useLocation-DNv7cb59.js → useLocation-DHd-KBb-.js} +2 -2
- package/dist/client/assets/{useNavigate-PfhtEZbl.js → useNavigate-AZUCIeU4.js} +2 -2
- package/dist/client/assets/{useNavigateBack-DUje4FcE.js → useNavigateBack-C7DkQuEE.js} +2 -2
- package/dist/client/assets/{useP4ConnectAuthPrompt-evKe5nuS.js → useP4ConnectAuthPrompt-u1GHgwlc.js} +2 -2
- package/dist/client/assets/{useParams-CzC0HF0R.js → useParams-rbhXoEw9.js} +2 -2
- package/dist/client/assets/{usePermissionStatus-BUDWSxLm.js → usePermissionStatus-DHzE_VGG.js} +2 -2
- package/dist/client/assets/{usePullRequestActions-Cxt5UQ0d.js → usePullRequestActions-Cv12eqOn.js} +2 -2
- package/dist/client/assets/{useRegisterFieldControl-B4MJ2axN.js → useRegisterFieldControl-D4FG4i3_.js} +2 -2
- package/dist/client/assets/{useScopedModelAvailability-ujoqpGuE.js → useScopedModelAvailability-D6cbxQLl.js} +2 -2
- package/dist/client/assets/{useSettings-Cg0O7Ek7.js → useSettings-B09a3zie.js} +2 -2
- package/dist/client/assets/utils-C5GGWTfe.js +37 -0
- package/dist/client/assets/{vcsRefInvalidation-B5V_HlR9.js → vcsRefInvalidation-B66hRx4g.js} +2 -2
- package/dist/client/assets/{welcome-DqtsIjdN.js → welcome-D2-tjFV3.js} +2 -2
- package/dist/client/index.html +1 -1
- package/dist/{renderer-CmxAcIV2.mjs → renderer-CuqsXHrO.mjs} +2 -2
- package/dist/{runtime-CAtWuL14.mjs → runtime-CWPUW_8Y.mjs} +24 -7
- package/package.json +1 -1
- package/dist/client/assets/AlertDialogRoot-C6RQ4Ag-.js +0 -2
- package/dist/client/assets/Input--rtZ2Jji.js +0 -2
- package/dist/client/assets/JZOYTAAL-PmkwTnld.js +0 -1
- package/dist/client/assets/_chat-DNoJniWX.js +0 -47
- package/dist/client/assets/connect-agent-CsvW078q.js +0 -2
- package/dist/client/assets/selfImproveFindings-DUmfxmCO.js +0 -2
- package/dist/client/assets/settings.archived-DDtPGPcJ.js +0 -2
- package/dist/client/assets/utils-CcBaVOX5.js +0 -37
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{t as n}from"./jsx-runtime-DJeoFXNw.js";import{Aa as r,Ar as i,Ba as a,Bi as o,Ca as s,Ci as c,Eo as l,Er as u,Fi as d,Fr as f,Ha as p,Ii as m,Ir as h,Li as g,Ma as _,Mi as v,Mr as y,No as b,Nr as x,Or as S,Pi as C,Ri as w,Rr as T,Si as E,So as D,Ta as O,Ti as k,To as A,Ua as j,Vi as M,Vr as N,Wi as P,_i as F,aa as I,ai as L,ba as R,bi as z,bo as B,ci as V,gi as H,hi as U,ho as W,ii as G,ko as K,li as q,mi as J,pi as Y,qa as ee,qi as te,qr as ne,to as X,vi as re,wa as ie,wi as ae,wo as oe,xi as se,xo as ce,yi as le,yr as ue,zi as de}from"./utils-CcBaVOX5.js";import{J as fe}from"./TooltipViewport-rDmof6w5.js";var Z=e(t()),pe=Z.createContext(void 0);function Q(e){let t=Z.useContext(pe);if(t===void 0&&!e)throw Error(b(47));return t}var me=e(O());function he(){return{...Y(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}var ge={...U,disabled:v(e=>e.disabled),instantType:v(e=>e.instantType),openMethod:v(e=>e.openMethod),openChangeReason:v(e=>e.openChangeReason),modal:v(e=>e.modal),focusManagerModal:v(e=>e.focusManagerModal),stickIfOpen:v(e=>e.stickIfOpen),titleElementId:v(e=>e.titleElementId),descriptionElementId:v(e=>e.descriptionElementId),openOnHover:v(e=>e.openOnHover),closeDelay:v(e=>e.closeDelay),hasViewport:v(e=>e.hasViewport)},_e=class e extends k{constructor(e,t,n=!1){let r={...he(),...e},i=new H;r.open&&e?.mounted===void 0&&(r.mounted=!0),r.floatingRootContext=J(i,t,n),super(r,{popupRef:Z.createRef(),backdropRef:Z.createRef(),internalBackdropRef:Z.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:Z.createRef(),beforeContentFocusGuardRef:Z.createRef(),stickIfOpenTimeout:new R,triggerElements:i},ge)}setOpen=(e,t)=>{let n=t.reason===W,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null);t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)};let a=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&a!=null&&(t.trigger=this.context.triggerElements.getById(a)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let o=()=>{let n={open:e,openChangeReason:t.reason};re(n,e,t.trigger),this.update(n)};n?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),me.flushSync(o)):o(),r||i?this.set(`instantType`,r?`click`:`dismiss`):t.reason===`focus-out`?this.set(`instantType`,`focus`):this.set(`instantType`,void 0)};static useStore(t,n){let{store:r,internalStore:i}=c(t,(t,r)=>new e(n,t,r));return Z.useEffect(()=>i?.disposeEffect(),[i]),r}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()},$=e(n());function ve({props:e}){let{children:t,open:n,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:s,modal:c=!1,handle:l,triggerId:u,defaultTriggerId:d=null}=e,f=_e.useStore(l?.store,{modal:c,open:i,openProp:n,activeTriggerId:d,triggerIdProp:u});S(()=>{n===void 0&&f.state.open===!1&&i===!0&&f.update({open:!0,activeTriggerId:d})}),f.useControlledProp(`openProp`,n),f.useControlledProp(`triggerIdProp`,u);let p=f.useState(`open`),m=f.useState(`mounted`),h=f.useState(`payload`),g=o()!=null;f.useContextCallback(`onOpenChange`,a),f.useContextCallback(`onOpenChangeComplete`,s),E(f,p),le(f);let{forceUnmount:_}=z(p,f,()=>{f.update({stickIfOpen:!0,openChangeReason:null})});f.useSyncedValues({modal:c,nested:g}),Z.useEffect(()=>{p||f.context.stickIfOpenTimeout.clear()},[f,p]);let v=Z.useCallback(()=>{f.setOpen(!1,r(X))},[f]);Z.useImperativeHandle(e.actionsRef,()=>({unmount:_,close:v}),[_,v]);let y=p||m,b=Z.useMemo(()=>({store:f}),[f]);return(0,$.jsxs)(pe.Provider,{value:b,children:[y&&(0,$.jsx)(be,{store:f,modal:c}),typeof t==`function`?t({payload:h}):t]})}function ye(e){return Q(!0)?(0,$.jsx)(ve,{props:e}):(0,$.jsx)(w,{children:(0,$.jsx)(ve,{props:e})})}function be({store:e,modal:t}){let n=e.useState(`floatingRootContext`),r=C(n,{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),i=r.reference??K,a=r.trigger??K,o=Z.useMemo(()=>l(F,r.floating),[r.floating]);return se(e,{activeTriggerProps:i,inactiveTriggerProps:a,popupProps:o}),null}var xe=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:o=!1,nativeButton:s=!0,handle:c,payload:l,openOnHover:f=!1,delay:p=300,closeDelay:m=0,id:h,...g}=e,v=Q(!0),y=c?.store??v?.store;if(!y)throw Error(b(74));let x=_(h),S=y.useState(`isTriggerActive`,x),C=y.useState(`floatingRootContext`),w=y.useState(`isOpenedByTrigger`,x),T=y.useState(`triggerPopupId`,x),E=Z.useRef(null),{registerTrigger:O,isMountedByThisTrigger:k}=ae(x,E,y,{payload:l,disabled:o,openOnHover:f,closeDelay:m}),j=y.useState(`openChangeReason`),M=y.useState(`stickIfOpen`),N=y.useState(`openMethod`),F=y.useState(`focusManagerModal`),R=V(C,{enabled:C!=null&&f&&(N!==`touch`||j!==`trigger-press`),mouseOnly:!0,move:!1,handleClose:L(),restMs:p,delay:{close:m},triggerElementRef:E,isActiveTrigger:S,isClosing:()=>y.select(`transitionStatus`)===`ending`}),z=d(C,{enabled:C!=null,stickIfOpen:M}),B=u(()=>y.select(`open`),e=>{y.set(`openMethod`,e)}),H=y.useState(`triggerProps`,k),{getButtonProps:U,buttonRef:W}=a({disabled:o,native:s}),G={open(e){return e&&j===`trigger-press`?ce.open(e):D.open(e)}},{preFocusGuardRef:K,handlePreFocusGuardFocus:q,handleFocusTargetFocus:J}=ue(y,E),Y=A(`button`,e,{state:{disabled:o,open:w},ref:[W,t,O,E],props:[z.reference,R,H,B,{[P]:``,id:x,"aria-haspopup":`dialog`,"aria-expanded":w,"aria-controls":T},g,U],stateAttributesMapping:G});return k&&!F?(0,$.jsxs)(Z.Fragment,{children:[(0,$.jsx)(I,{ref:K,onFocus:q}),(0,$.jsx)(Z.Fragment,{children:Y},x),(0,$.jsx)(I,{ref:y.context.triggerFocusTargetRef,onFocus:J})]}):(0,$.jsx)(Z.Fragment,{children:Y},x)}),Se=Z.createContext(void 0);function Ce(){let e=Z.useContext(Se);if(e===void 0)throw Error(b(45));return e}var we=Z.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=Q();return i.useState(`mounted`)||n?(0,$.jsx)(Se.Provider,{value:n,children:(0,$.jsx)(M,{ref:t,...r})}):null}),Te=Z.createContext(void 0);function Ee(){let e=Z.useContext(Te);if(!e)throw Error(b(46));return e}var De=Z.forwardRef(function(e,t){let{render:n,className:r,style:a,anchor:o,positionMethod:s=`absolute`,side:c=`bottom`,align:l=`center`,sideOffset:u=0,alignOffset:d=0,collisionBoundary:m=`clipping-ancestors`,collisionPadding:_=5,arrowPadding:v=5,sticky:b=!1,disableAnchorTracking:S=!1,collisionAvoidance:C=te,...w}=e,{store:E}=Q(),D=Ce(),O=de(),k=E.useState(`floatingRootContext`),A=E.useState(`mounted`),j=E.useState(`open`),M=E.useState(`openChangeReason`),N=E.useState(`activeTriggerElement`),P=E.useState(`modal`),F=E.useState(`openMethod`),I=E.useState(`positionerElement`),L=E.useState(`instantType`),R=E.useState(`transitionStatus`),z=E.useState(`hasViewport`),B=Z.useRef(null),V=ie(I,!1,!1),H=f({anchor:o,floatingRootContext:k,positionMethod:s,mounted:A,side:c,sideOffset:u,align:l,alignOffset:d,arrowPadding:v,collisionBoundary:m,collisionPadding:_,sticky:b,disableAnchorTracking:S,keepMounted:D,nodeId:O,collisionAvoidance:C,adaptiveOrigin:z?h:void 0}),U=k.useState(`domReferenceElement`);p(()=>{let e=U,t=B.current;if(e&&(B.current=e),t&&e&&e!==t){E.set(`instantType`,void 0);let e=new AbortController;return V(()=>{E.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[U,V,E]),i(j&&P===!0&&M!==`trigger-hover`,F===`touch`,I,N);let W=Z.useCallback(e=>{E.set(`positionerElement`,e)},[E]),G={open:j,side:H.side,align:H.align,anchorHidden:H.anchorHidden,instant:L},K=y(e,G,{styles:H.positionerStyles,transitionStatus:R,props:w,refs:[t,W],hidden:!A,inert:!j});return(0,$.jsxs)(Te.Provider,{value:H,children:[A&&P===!0&&M!==`trigger-hover`&&(0,$.jsx)(x,{ref:E.context.internalBackdropRef,inert:T(!j),cutout:N}),(0,$.jsx)(g,{id:O,children:K})]})}),Oe=Z.createContext(void 0);function ke(){let[e,t]=Z.useState(0),n=j(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:Z.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}function Ae(e){let{value:t,children:n}=e;return(0,$.jsx)(Oe.Provider,{value:t,children:n})}function je(){let e=Z.useContext(Oe);p(()=>e?.register(),[e])}var Me={...B,...oe},Ne=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...c}=e,{store:l}=Q(),u=Ee(),d=G(!0)!=null,{context:f,hasClosePart:p}=ke(),h=l.useState(`open`),g=l.useState(`openMethod`),_=l.useState(`instantType`),v=l.useState(`transitionStatus`),y=l.useState(`popupProps`),b=l.useState(`titleElementId`),x=l.useState(`descriptionElementId`),S=l.useState(`modal`),C=l.useState(`mounted`),w=l.useState(`openChangeReason`),T=l.useState(`activeTriggerElement`),E=l.useState(`floatingRootContext`),D=E.useState(`floatingId`),O=l.useState(`disabled`),k=l.useState(`openOnHover`),j=l.useState(`closeDelay`),M=c.id??D;s({open:h,ref:l.context.popupRef,onComplete(){h&&l.context.onOpenChangeComplete?.(!0)}}),q(E,{enabled:k&&!O,closeDelay:j});function P(e){return e!==`touch`||l.context.popupRef.current}let I=a===void 0?P:a,L=S!==!1&&p;l.useSyncedValue(`focusManagerModal`,L);let R=Z.useCallback(e=>{l.set(`popupElement`,e)},[l]),z={open:h,side:u.side,align:u.align,instant:_,transitionStatus:v},B=A(`div`,e,{state:z,ref:[t,l.context.popupRef,R],props:[y,{id:M,role:`dialog`,...F,"aria-labelledby":b,"aria-describedby":x,onKeyDown(e){d&&ne.has(e.key)&&e.stopPropagation()}},N(v),c],stateAttributesMapping:Me});return(0,$.jsx)(m,{context:E,openInteractionType:g,modal:L,disabled:!C||w===`trigger-hover`,initialFocus:I,returnFocus:o,restoreFocus:`popup`,previousFocusableElement:ee(T)?T:void 0,nextFocusableElement:l.context.triggerFocusTargetRef,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:(0,$.jsx)(Ae,{value:f,children:B})})}),Pe=function(e){return e.popupWidth=`--popup-width`,e.popupHeight=`--popup-height`,e}({}),Fe={activationDirection:e=>e?{"data-activation-direction":e}:null},Ie=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{store:s}=Q(),{side:c}=Ee(),l=s.useState(`instantType`),{children:u,state:d}=fe({store:s,side:c,cssVars:Pe,children:a}),f={activationDirection:d.activationDirection,transitioning:d.transitioning,instant:l};return A(`div`,e,{state:f,ref:t,props:[o,{children:u}],stateAttributesMapping:Fe})}),Le=class{constructor(){this.store=new _e}open(e){let t=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!t)throw Error(b(80,e));this.store.setOpen(!0,r(X,void 0,t))}close(){this.store.setOpen(!1,r(X,void 0,void 0))}get isOpen(){return this.store.select(`open`)}};function Re(){return new Le}export{De as a,ye as c,je as i,Q as l,Ie as n,we as o,Ne as r,xe as s,Re as t};
|
|
2
|
-
//# sourceMappingURL=PopoverHandle-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{t as n}from"./jsx-runtime-DJeoFXNw.js";import{Aa as r,Ar as i,Ba as a,Bi as o,Ca as s,Ci as c,Eo as l,Er as u,Fi as d,Fr as f,Ha as p,Ii as m,Ir as h,Li as g,Ma as _,Mi as v,Mr as y,No as b,Nr as x,Or as S,Pi as C,Ri as w,Rr as T,Si as E,So as D,Ta as O,Ti as k,To as A,Ua as j,Vi as M,Vr as N,Wi as P,_i as F,aa as I,ai as L,ba as R,bi as z,bo as B,ci as V,gi as H,hi as U,ho as W,ii as G,ko as K,li as q,mi as J,pi as Y,qa as ee,qi as te,qr as ne,to as X,vi as re,wa as ie,wi as ae,wo as oe,xi as se,xo as ce,yi as le,yr as ue,zi as de}from"./utils-C5GGWTfe.js";import{J as fe}from"./TooltipViewport-Be_gbUW1.js";var Z=e(t()),pe=Z.createContext(void 0);function Q(e){let t=Z.useContext(pe);if(t===void 0&&!e)throw Error(b(47));return t}var me=e(O());function he(){return{...Y(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}var ge={...U,disabled:v(e=>e.disabled),instantType:v(e=>e.instantType),openMethod:v(e=>e.openMethod),openChangeReason:v(e=>e.openChangeReason),modal:v(e=>e.modal),focusManagerModal:v(e=>e.focusManagerModal),stickIfOpen:v(e=>e.stickIfOpen),titleElementId:v(e=>e.titleElementId),descriptionElementId:v(e=>e.descriptionElementId),openOnHover:v(e=>e.openOnHover),closeDelay:v(e=>e.closeDelay),hasViewport:v(e=>e.hasViewport)},_e=class e extends k{constructor(e,t,n=!1){let r={...he(),...e},i=new H;r.open&&e?.mounted===void 0&&(r.mounted=!0),r.floatingRootContext=J(i,t,n),super(r,{popupRef:Z.createRef(),backdropRef:Z.createRef(),internalBackdropRef:Z.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:Z.createRef(),beforeContentFocusGuardRef:Z.createRef(),stickIfOpenTimeout:new R,triggerElements:i},ge)}setOpen=(e,t)=>{let n=t.reason===W,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null);t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)};let a=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&a!=null&&(t.trigger=this.context.triggerElements.getById(a)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let o=()=>{let n={open:e,openChangeReason:t.reason};re(n,e,t.trigger),this.update(n)};n?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),me.flushSync(o)):o(),r||i?this.set(`instantType`,r?`click`:`dismiss`):t.reason===`focus-out`?this.set(`instantType`,`focus`):this.set(`instantType`,void 0)};static useStore(t,n){let{store:r,internalStore:i}=c(t,(t,r)=>new e(n,t,r));return Z.useEffect(()=>i?.disposeEffect(),[i]),r}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()},$=e(n());function ve({props:e}){let{children:t,open:n,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:s,modal:c=!1,handle:l,triggerId:u,defaultTriggerId:d=null}=e,f=_e.useStore(l?.store,{modal:c,open:i,openProp:n,activeTriggerId:d,triggerIdProp:u});S(()=>{n===void 0&&f.state.open===!1&&i===!0&&f.update({open:!0,activeTriggerId:d})}),f.useControlledProp(`openProp`,n),f.useControlledProp(`triggerIdProp`,u);let p=f.useState(`open`),m=f.useState(`mounted`),h=f.useState(`payload`),g=o()!=null;f.useContextCallback(`onOpenChange`,a),f.useContextCallback(`onOpenChangeComplete`,s),E(f,p),le(f);let{forceUnmount:_}=z(p,f,()=>{f.update({stickIfOpen:!0,openChangeReason:null})});f.useSyncedValues({modal:c,nested:g}),Z.useEffect(()=>{p||f.context.stickIfOpenTimeout.clear()},[f,p]);let v=Z.useCallback(()=>{f.setOpen(!1,r(X))},[f]);Z.useImperativeHandle(e.actionsRef,()=>({unmount:_,close:v}),[_,v]);let y=p||m,b=Z.useMemo(()=>({store:f}),[f]);return(0,$.jsxs)(pe.Provider,{value:b,children:[y&&(0,$.jsx)(be,{store:f,modal:c}),typeof t==`function`?t({payload:h}):t]})}function ye(e){return Q(!0)?(0,$.jsx)(ve,{props:e}):(0,$.jsx)(w,{children:(0,$.jsx)(ve,{props:e})})}function be({store:e,modal:t}){let n=e.useState(`floatingRootContext`),r=C(n,{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),i=r.reference??K,a=r.trigger??K,o=Z.useMemo(()=>l(F,r.floating),[r.floating]);return se(e,{activeTriggerProps:i,inactiveTriggerProps:a,popupProps:o}),null}var xe=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:o=!1,nativeButton:s=!0,handle:c,payload:l,openOnHover:f=!1,delay:p=300,closeDelay:m=0,id:h,...g}=e,v=Q(!0),y=c?.store??v?.store;if(!y)throw Error(b(74));let x=_(h),S=y.useState(`isTriggerActive`,x),C=y.useState(`floatingRootContext`),w=y.useState(`isOpenedByTrigger`,x),T=y.useState(`triggerPopupId`,x),E=Z.useRef(null),{registerTrigger:O,isMountedByThisTrigger:k}=ae(x,E,y,{payload:l,disabled:o,openOnHover:f,closeDelay:m}),j=y.useState(`openChangeReason`),M=y.useState(`stickIfOpen`),N=y.useState(`openMethod`),F=y.useState(`focusManagerModal`),R=V(C,{enabled:C!=null&&f&&(N!==`touch`||j!==`trigger-press`),mouseOnly:!0,move:!1,handleClose:L(),restMs:p,delay:{close:m},triggerElementRef:E,isActiveTrigger:S,isClosing:()=>y.select(`transitionStatus`)===`ending`}),z=d(C,{enabled:C!=null,stickIfOpen:M}),B=u(()=>y.select(`open`),e=>{y.set(`openMethod`,e)}),H=y.useState(`triggerProps`,k),{getButtonProps:U,buttonRef:W}=a({disabled:o,native:s}),G={open(e){return e&&j===`trigger-press`?ce.open(e):D.open(e)}},{preFocusGuardRef:K,handlePreFocusGuardFocus:q,handleFocusTargetFocus:J}=ue(y,E),Y=A(`button`,e,{state:{disabled:o,open:w},ref:[W,t,O,E],props:[z.reference,R,H,B,{[P]:``,id:x,"aria-haspopup":`dialog`,"aria-expanded":w,"aria-controls":T},g,U],stateAttributesMapping:G});return k&&!F?(0,$.jsxs)(Z.Fragment,{children:[(0,$.jsx)(I,{ref:K,onFocus:q}),(0,$.jsx)(Z.Fragment,{children:Y},x),(0,$.jsx)(I,{ref:y.context.triggerFocusTargetRef,onFocus:J})]}):(0,$.jsx)(Z.Fragment,{children:Y},x)}),Se=Z.createContext(void 0);function Ce(){let e=Z.useContext(Se);if(e===void 0)throw Error(b(45));return e}var we=Z.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=Q();return i.useState(`mounted`)||n?(0,$.jsx)(Se.Provider,{value:n,children:(0,$.jsx)(M,{ref:t,...r})}):null}),Te=Z.createContext(void 0);function Ee(){let e=Z.useContext(Te);if(!e)throw Error(b(46));return e}var De=Z.forwardRef(function(e,t){let{render:n,className:r,style:a,anchor:o,positionMethod:s=`absolute`,side:c=`bottom`,align:l=`center`,sideOffset:u=0,alignOffset:d=0,collisionBoundary:m=`clipping-ancestors`,collisionPadding:_=5,arrowPadding:v=5,sticky:b=!1,disableAnchorTracking:S=!1,collisionAvoidance:C=te,...w}=e,{store:E}=Q(),D=Ce(),O=de(),k=E.useState(`floatingRootContext`),A=E.useState(`mounted`),j=E.useState(`open`),M=E.useState(`openChangeReason`),N=E.useState(`activeTriggerElement`),P=E.useState(`modal`),F=E.useState(`openMethod`),I=E.useState(`positionerElement`),L=E.useState(`instantType`),R=E.useState(`transitionStatus`),z=E.useState(`hasViewport`),B=Z.useRef(null),V=ie(I,!1,!1),H=f({anchor:o,floatingRootContext:k,positionMethod:s,mounted:A,side:c,sideOffset:u,align:l,alignOffset:d,arrowPadding:v,collisionBoundary:m,collisionPadding:_,sticky:b,disableAnchorTracking:S,keepMounted:D,nodeId:O,collisionAvoidance:C,adaptiveOrigin:z?h:void 0}),U=k.useState(`domReferenceElement`);p(()=>{let e=U,t=B.current;if(e&&(B.current=e),t&&e&&e!==t){E.set(`instantType`,void 0);let e=new AbortController;return V(()=>{E.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[U,V,E]),i(j&&P===!0&&M!==`trigger-hover`,F===`touch`,I,N);let W=Z.useCallback(e=>{E.set(`positionerElement`,e)},[E]),G={open:j,side:H.side,align:H.align,anchorHidden:H.anchorHidden,instant:L},K=y(e,G,{styles:H.positionerStyles,transitionStatus:R,props:w,refs:[t,W],hidden:!A,inert:!j});return(0,$.jsxs)(Te.Provider,{value:H,children:[A&&P===!0&&M!==`trigger-hover`&&(0,$.jsx)(x,{ref:E.context.internalBackdropRef,inert:T(!j),cutout:N}),(0,$.jsx)(g,{id:O,children:K})]})}),Oe=Z.createContext(void 0);function ke(){let[e,t]=Z.useState(0),n=j(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:Z.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}function Ae(e){let{value:t,children:n}=e;return(0,$.jsx)(Oe.Provider,{value:t,children:n})}function je(){let e=Z.useContext(Oe);p(()=>e?.register(),[e])}var Me={...B,...oe},Ne=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...c}=e,{store:l}=Q(),u=Ee(),d=G(!0)!=null,{context:f,hasClosePart:p}=ke(),h=l.useState(`open`),g=l.useState(`openMethod`),_=l.useState(`instantType`),v=l.useState(`transitionStatus`),y=l.useState(`popupProps`),b=l.useState(`titleElementId`),x=l.useState(`descriptionElementId`),S=l.useState(`modal`),C=l.useState(`mounted`),w=l.useState(`openChangeReason`),T=l.useState(`activeTriggerElement`),E=l.useState(`floatingRootContext`),D=E.useState(`floatingId`),O=l.useState(`disabled`),k=l.useState(`openOnHover`),j=l.useState(`closeDelay`),M=c.id??D;s({open:h,ref:l.context.popupRef,onComplete(){h&&l.context.onOpenChangeComplete?.(!0)}}),q(E,{enabled:k&&!O,closeDelay:j});function P(e){return e!==`touch`||l.context.popupRef.current}let I=a===void 0?P:a,L=S!==!1&&p;l.useSyncedValue(`focusManagerModal`,L);let R=Z.useCallback(e=>{l.set(`popupElement`,e)},[l]),z={open:h,side:u.side,align:u.align,instant:_,transitionStatus:v},B=A(`div`,e,{state:z,ref:[t,l.context.popupRef,R],props:[y,{id:M,role:`dialog`,...F,"aria-labelledby":b,"aria-describedby":x,onKeyDown(e){d&&ne.has(e.key)&&e.stopPropagation()}},N(v),c],stateAttributesMapping:Me});return(0,$.jsx)(m,{context:E,openInteractionType:g,modal:L,disabled:!C||w===`trigger-hover`,initialFocus:I,returnFocus:o,restoreFocus:`popup`,previousFocusableElement:ee(T)?T:void 0,nextFocusableElement:l.context.triggerFocusTargetRef,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:(0,$.jsx)(Ae,{value:f,children:B})})}),Pe=function(e){return e.popupWidth=`--popup-width`,e.popupHeight=`--popup-height`,e}({}),Fe={activationDirection:e=>e?{"data-activation-direction":e}:null},Ie=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{store:s}=Q(),{side:c}=Ee(),l=s.useState(`instantType`),{children:u,state:d}=fe({store:s,side:c,cssVars:Pe,children:a}),f={activationDirection:d.activationDirection,transitioning:d.transitioning,instant:l};return A(`div`,e,{state:f,ref:t,props:[o,{children:u}],stateAttributesMapping:Fe})}),Le=class{constructor(){this.store=new _e}open(e){let t=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!t)throw Error(b(80,e));this.store.setOpen(!0,r(X,void 0,t))}close(){this.store.setOpen(!1,r(X,void 0,void 0))}get isOpen(){return this.store.select(`open`)}};function Re(){return new Le}export{De as a,ye as c,je as i,Q as l,Ie as n,we as o,Ne as r,xe as s,Re as t};
|
|
2
|
+
//# sourceMappingURL=PopoverHandle-BkzqaTB6.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{$n as i,$o as a,D as o,Fp as s,Gf as c,Gg as l,Go as u,Mp as d,Nd as f,Qn as p,Xf as m,Xn as h,Yf as g,Yn as _,Yo as v,av as y,cm as b,cr as x,dm as S,dr as C,er as w,fr as T,ic as E,ir as D,kp as O,ld as k,lr as A,md as j,nm as M,nr as N,or as P,pd as F,pf as I,qo as ee,rr as te,t as ne,uh as L,ur as re,zg as R}from"./utils-CcBaVOX5.js";import{R as ie,W as z}from"./runtime-DeVKKxNz.js";import{y as ae}from"./entities-CTJ1ube2.js";import{it as B}from"./ChatMarkdown-Cw9bEYxG.js";import{i as V}from"./toast-Dkj3G-UM.js";import{O as oe,S as se,q as H,r as U,x as ce}from"./useSettings-Cg0O7Ek7.js";import{i as W,n as G}from"./session-Bb7JWdWO.js";import{t as le}from"./use-atom-command-D4TeQyNE.js";import{u as ue}from"./rightPanelStore-DQ1c3-Lt.js";import{t as de}from"./toastHelpers-DxXYm50b.js";import{M as K,j as q}from"./PanelLayoutControls-D8g6TJ8z.js";import{o as fe}from"./timestampFormat-wac2e_Jz.js";import{a as pe,n as me,t as he}from"./tooltip-BeHmtauD.js";import{a as ge,o as _e,r as ve,t as ye}from"./empty-CMnFXg8W.js";import{n as be,t as xe}from"./discovery-list-VELXPQtS.js";import{t as Se}from"./observeResize-Br7VOcTc.js";import{T as Ce,a as we,b as Te,f as Ee,i as De,n as Oe,o as ke,r as Ae,t as je,u as Me,w as Ne}from"./browserHistoryStore-CW_ylkPy.js";import{n as Pe}from"./openFileInPreview-52PEk4wb.js";import{t as Fe}from"./preview-DRZGCh-w.js";import{a as Ie,i as Le,r as Re,t as ze}from"./preview-CDQ5ceMi.js";import{u as Be}from"./LinkMachineSelect-DoHeQGoj.js";import{Aa as Ve,Ba as He,Da as Ue,Eo as J,Fa as We,Ga as Y,Ia as Ge,Ja as X,Oa as Ke,Pa as qe,Va as Je,Wa as Ye,ja as Xe,ka as Ze,mo as Qe,po as $e,za as et}from"./main-DIEsHSIy.js";import{a as tt,c as nt,d as rt,i as it,l as at,n as ot,o as st,r as ct,s as lt,u as ut}from"./_chat-DNoJniWX.js";var Z=e(t(),1),Q=n(),dt=`data:image/png;base64,`;function ft(e){if(!e.screenshot)return{status:`none`};try{let{dataUrl:t}=e.screenshot;if(!t.startsWith(dt))return{status:`failed`};let n=X(t,`preview-annotation-${e.id}.png`,`image/png`);return n.size>0?{status:`captured`,file:n}:{status:`failed`}}catch{return{status:`failed`}}}var $=e(r(),1),pt=()=>{};function mt(e){let t=(0,Q.c)(79),{url:n,loading:r,canGoBack:i,canGoForward:a,refreshDisabled:o,inputDisabled:c,focusUrlNonce:l,onBack:u,onForward:d,onRefresh:p,onSubmit:m,onOpenInBrowser:h,onCapture:g,captureDisabled:_,recording:v,onSeparateWindow:y,separateWindow:b,separateWindowDisabled:x,onPickElement:S,pickActive:C,pickDisabled:w,pickDisabledReason:E,trailingActions:D,leadingActions:O}=e,A=(0,Z.useRef)(null),[M,N]=(0,Z.useState)(n),[P,ee]=(0,Z.useState)(!1),te,L;t[0]===l?(te=t[1],L=t[2]):(te=()=>{if(l==null)return;let e=A.current;e&&e.focus()},L=[l],t[0]=l,t[1]=te,t[2]=L),(0,Z.useEffect)(te,L);let re;t[3]!==M||t[4]!==m?(re=e=>{e?.preventDefault();let t=M.trim();t.length!==0&&(m(t),A.current?.blur())},t[3]=M,t[4]=m,t[5]=re):re=t[5];let R=re,ie=i?u:pt,z=!i,ae;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,$.jsx)(F,{}),t[6]=ae):ae=t[6];let B;t[7]!==ie||t[8]!==z?(B=(0,$.jsx)(T,{variant:`ghost`,size:`icon-xs`,onClick:ie,disabled:z,"aria-label":`Back`,type:`button`,children:ae}),t[7]=ie,t[8]=z,t[9]=B):B=t[9];let V=a?d:pt,oe=!a,se;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,$.jsx)(j,{}),t[10]=se):se=t[10];let H;t[11]!==V||t[12]!==oe?(H=(0,$.jsx)(T,{variant:`ghost`,size:`icon-xs`,onClick:V,disabled:oe,"aria-label":`Forward`,type:`button`,children:se}),t[11]=V,t[12]=oe,t[13]=H):H=t[13];let U;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,$.jsx)(`span`,{"aria-hidden":!0,className:`mx-0.5 h-4 w-px bg-border`}),t[14]=U):U=t[14];let ce=o?pt:p,W=r?`Stop`:`Refresh`,G;t[15]!==o||t[16]!==ce||t[17]!==W?(G=(0,$.jsx)(T,{variant:`ghost`,size:`icon-xs`,onClick:ce,disabled:o,"aria-label":W,type:`button`}),t[15]=o,t[16]=ce,t[17]=W,t[18]=G):G=t[18];let le;t[19]===r?le=t[20]:(le=(0,$.jsx)(J,{refreshing:r}),t[19]=r,t[20]=le);let ue;t[21]!==G||t[22]!==le?(ue=(0,$.jsx)(pe,{render:G,children:le}),t[21]=G,t[22]=le,t[23]=ue):ue=t[23];let de=r?`Loading…`:`Refresh`,K;t[24]===de?K=t[25]:(K=(0,$.jsx)(me,{children:de}),t[24]=de,t[25]=K);let q;t[26]!==ue||t[27]!==K?(q=(0,$.jsxs)(he,{children:[ue,K]}),t[26]=ue,t[27]=K,t[28]=q):q=t[28];let fe;t[29]!==H||t[30]!==q||t[31]!==B?(fe=(0,$.jsxs)(`div`,{className:`surface-glass flex h-8 shrink-0 items-center gap-0.5 rounded-full border border-border/60 px-1 shadow-sm [&_button]:rounded-full`,role:`group`,"aria-label":`Navigation`,children:[B,H,U,q]}),t[29]=H,t[30]=q,t[31]=B,t[32]=fe):fe=t[32];let ge=P?M:n,_e;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(_e=e=>N(e.target.value),t[33]=_e):_e=t[33];let ve;t[34]===n?ve=t[35]:(ve=()=>{N(n),ee(!0),queueMicrotask(()=>A.current?.select())},t[34]=n,t[35]=ve);let ye;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(ye=()=>{ee(!1)},t[36]=ye):ye=t[36];let be;t[37]!==R||t[38]!==n?(be=e=>{e.key===`Enter`&&R(e),e.key===`Escape`&&(e.preventDefault(),N(n),A.current?.blur())},t[37]=R,t[38]=n,t[39]=be):be=t[39];let xe;t[40]!==c||t[41]!==ge||t[42]!==ve||t[43]!==be?(xe=(0,$.jsx)(`input`,{ref:A,value:ge,onChange:_e,onFocus:ve,onBlur:ye,onKeyDown:be,"aria-label":`Address`,placeholder:`Search or enter URL`,spellCheck:!1,disabled:c,"data-preview-url-input":!0,className:`w-full min-w-0 truncate bg-transparent text-center text-sm text-foreground outline-none placeholder:text-muted-foreground focus:text-left`}),t[40]=c,t[41]=ge,t[42]=ve,t[43]=be,t[44]=xe):xe=t[44];let Se;t[45]!==P||t[46]!==h?(Se=h&&!P?(0,$.jsx)(`span`,{className:`pointer-events-none absolute right-1 flex opacity-0 transition-opacity focus-within:pointer-events-auto focus-within:opacity-100 group-hover/address:pointer-events-auto group-hover/address:opacity-100 [&_button]:rounded-full`,children:(0,$.jsxs)(he,{children:[(0,$.jsx)(pe,{render:(0,$.jsx)(T,{variant:`ghost`,size:`icon-xs`,onClick:h,"aria-label":`Open in system browser`,type:`button`}),children:(0,$.jsx)(I,{})}),(0,$.jsx)(me,{children:`Open in system browser`})]})}):null,t[45]=P,t[46]=h,t[47]=Se):Se=t[47];let Ce;t[48]!==xe||t[49]!==Se?(Ce=(0,$.jsxs)(`div`,{className:`surface-glass group/address relative flex h-8 min-w-0 flex-1 items-center rounded-full border border-border/60 px-8 shadow-sm transition-colors focus-within:border-ring has-disabled:opacity-64`,children:[xe,Se]}),t[48]=xe,t[49]=Se,t[50]=Ce):Ce=t[50];let we;t[51]!==S||t[52]!==C||t[53]!==w||t[54]!==E?(we=S?(0,$.jsxs)(he,{children:[(0,$.jsx)(pe,{render:(0,$.jsx)(T,{variant:`glass`,size:`icon`,onClick:S,disabled:w,"aria-label":C?`Cancel annotation`:`Annotate preview`,"aria-pressed":C?`true`:`false`,type:`button`}),children:(0,$.jsx)(s,{className:ne(C&&`text-primary`)})}),(0,$.jsx)(me,{children:w&&E?E:C?`Cancel annotation (Esc)`:`Annotate elements, regions, and drawings`})]}):null,t[51]=S,t[52]=C,t[53]=w,t[54]=E,t[55]=we):we=t[55];let Te;t[56]!==_||t[57]!==g||t[58]!==v?(Te=g?(0,$.jsxs)(he,{children:[(0,$.jsxs)(pe,{render:(0,$.jsx)(T,{variant:`glass`,size:`icon`,onClick:e=>g(e.shiftKey),"aria-label":v?`Stop recording`:`Capture screenshot`,type:`button`,className:`relative`,disabled:_}),children:[(0,$.jsx)(f,{className:ne(v&&`text-destructive`)}),v?(0,$.jsx)(`span`,{className:`absolute right-0.5 top-0.5 size-1.5 animate-status-pulse rounded-full bg-destructive`}):null]}),(0,$.jsx)(me,{children:v?`Stop recording`:`Screenshot · Shift-click to record`})]}):null,t[56]=_,t[57]=g,t[58]=v,t[59]=Te):Te=t[59];let Ee;t[60]!==y||t[61]!==b||t[62]!==x?(Ee=y?(0,$.jsxs)(he,{children:[(0,$.jsx)(pe,{render:(0,$.jsx)(T,{variant:`glass`,size:`icon`,onClick:y,"aria-label":b?`Bring preview back from its window`:`Open preview in a window`,"aria-pressed":b?`true`:`false`,type:`button`,disabled:x}),children:(0,$.jsx)(k,{className:ne(b&&`text-primary`)})}),(0,$.jsx)(me,{children:b?`Bring back`:`Open in separate window`})]}):null,t[60]=y,t[61]=b,t[62]=x,t[63]=Ee):Ee=t[63];let De;t[64]!==O||t[65]!==R||t[66]!==fe||t[67]!==Ce||t[68]!==we||t[69]!==Te||t[70]!==Ee||t[71]!==D?(De=(0,$.jsxs)(`form`,{onSubmit:R,className:`flex h-12 min-h-12 shrink-0 items-center gap-2 border-b border-border/60 bg-background px-2.5 in-data-[preview-panel-mode=inline]:border-b-transparent`,"data-surface-subheader":!0,children:[fe,O,Ce,we,Te,Ee,D]}),t[64]=O,t[65]=R,t[66]=fe,t[67]=Ce,t[68]=we,t[69]=Te,t[70]=Ee,t[71]=D,t[72]=De):De=t[72];let Oe;t[73]===Symbol.for(`react.memo_cache_sentinel`)?(Oe={boxShadow:`0 0 6px 1px var(--color-ring)`},t[73]=Oe):Oe=t[73];let ke;t[74]===r?ke=t[75]:(ke=(0,$.jsx)(`div`,{"aria-hidden":!0,"data-loading":r,className:`preview-loading-progress pointer-events-none absolute bottom-0 left-0 z-10 h-0.5 w-full origin-left rounded-r-full bg-primary`,style:Oe}),t[74]=r,t[75]=ke);let Ae;return t[76]!==De||t[77]!==ke?(Ae=(0,$.jsxs)(`div`,{className:`relative`,children:[De,ke]}),t[76]=De,t[77]=ke,t[78]=Ae):Ae=t[78],Ae}function ht(e){let t=(0,Q.c)(10),{threadRef:n,server:r,onOpen:i}=e,a;t[0]===r?a=t[1]:(a=gt(r),t[0]=r,t[1]=a);let o=a,s;t[2]!==r.requestedUrl||t[3]!==n?(s=(0,$.jsx)(q,{threadRef:n,url:r.requestedUrl}),t[2]=r.requestedUrl,t[3]=n,t[4]=s):s=t[4];let c=`${r.host}:${r.port}`,l;return t[5]!==i||t[6]!==o||t[7]!==s||t[8]!==c?(l=(0,$.jsx)(be,{onClick:i,icon:s,title:o,description:c}),t[5]=i,t[6]=o,t[7]=s,t[8]=c,t[9]=l):l=t[9],l}function gt(e){return e.processName?e.processName:`Listening`}function _t(e){let t=(0,Q.c)(26),{threadRef:n,entry:r,onOpen:i,onRemove:a}=e,o;t[0]===r.url?o=t[1]:(o=new URL(r.url),t[0]=r.url,t[1]=o);let s=o,c=s.pathname===`/`?``:s.pathname,l=`${s.host}${c}${s.search}${s.hash}`,u;t[2]===r.lastVisitedAt?u=t[3]:(u=je(r.lastVisitedAt)?fe(new Date(r.lastVisitedAt).toISOString()):``,t[2]=r.lastVisitedAt,t[3]=u);let d=u;Be();let f;t[4]!==r.url||t[5]!==n?(f=(0,$.jsx)(q,{threadRef:n,url:r.url}),t[4]=r.url,t[5]=n,t[6]=f):f=t[6];let p=r.title??l,m;t[7]===p?m=t[8]:(m=(0,$.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:p}),t[7]=p,t[8]=m);let h=r.title?`${l} · `:``,g;t[9]!==h||t[10]!==d?(g=(0,$.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[h,d]}),t[9]=h,t[10]=d,t[11]=g):g=t[11];let _;t[12]!==m||t[13]!==g?(_=(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[m,g]}),t[12]=m,t[13]=g,t[14]=_):_=t[14];let v;t[15]!==i||t[16]!==f||t[17]!==_?(v=(0,$.jsxs)(`button`,{type:`button`,onClick:i,className:`flex w-full items-center gap-3 px-3 py-3 pr-10 text-left hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,children:[f,_]}),t[15]=i,t[16]=f,t[17]=_,t[18]=v):v=t[18];let y=`Remove ${l} from history`,b;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(L,{className:`size-3.5`}),t[19]=b):b=t[19];let x;t[20]!==a||t[21]!==y?(x=(0,$.jsx)(`button`,{type:`button`,"aria-label":y,onClick:a,className:`absolute right-3 rounded p-1 text-muted-foreground opacity-0 hover:bg-accent hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring group-hover:opacity-100`,children:b}),t[20]=a,t[21]=y,t[22]=x):x=t[22];let S;return t[23]!==x||t[24]!==v?(S=(0,$.jsxs)(`div`,{className:`group relative flex w-full items-center`,children:[v,x]}),t[23]=x,t[24]=v,t[25]=S):S=t[25],S}function vt(e){let t=(0,Q.c)(7),n=Je(e.environmentId,e.configuredUrls),r;if(t[0]!==e.configuredUrls||t[1]!==e.environmentId||t[2]!==n.configuredUrlProbing||t[3]!==n.servers){let i;t[5]===e.environmentId?i=t[6]:(i=t=>({...t,url:ke(e.environmentId,t.url),requestedUrl:t.url}),t[5]=e.environmentId,t[6]=i),r=yt({scanner:n.servers.map(i),configuredUrls:e.configuredUrls??[],configuredUrlProbing:n.configuredUrlProbing}),t[0]=e.configuredUrls,t[1]=e.environmentId,t[2]=n.configuredUrlProbing,t[3]=n.servers,t[4]=r}else r=t[4];return r}function yt(e){let t=new Map;for(let n of e.configuredUrls){let e=xt(n);if(!e)continue;let r=bt(e.host,e.port);t.has(r)||t.set(r,e)}let n=[];for(let r of e.scanner){let i=bt(r.host,r.port),a=t.get(i);n.push({...r,requestedUrl:a&&e.configuredUrlProbing===!1?a.url:r.requestedUrl,source:a?`configured`:`scanner`})}return n.toSorted((e,t)=>{let n={configured:0,scanner:1};return n[e.source]===n[t.source]?e.port-t.port:n[e.source]-n[t.source]})}function bt(e,t){let n=e.toLowerCase();return`${ze(n)?`loopback`:n}:${t}`}function xt(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`||!ze(t.hostname))return null;let n=t.port?Number.parseInt(t.port,10):t.protocol===`http:`?80:443;return!Number.isFinite(n)||n<=0?null:{host:t.hostname,port:n,url:t.href}}catch{return null}}function St(e){let t=(0,Q.c)(24),{threadRef:n,environmentId:r,configuredUrls:i,recentEntries:a,onRemoveRecent:o,onOpenUrl:s}=e,l;t[0]!==i||t[1]!==r?(l={environmentId:r,configuredUrls:i},t[0]=i,t[1]=r,t[2]=l):l=t[2];let u=vt(l),d,f,p,h;if(t[3]!==s||t[4]!==o||t[5]!==a||t[6]!==u.length||t[7]!==n){h=Symbol.for(`react.early_return_sentinel`);bb0:{let e=a.filter(Ct).slice(0,8);if(u.length===0&&e.length===0){let e;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsxs)(ye,{children:[(0,$.jsx)(ge,{variant:`icon`,children:(0,$.jsx)(c,{className:`size-4.5 text-muted-foreground`})}),(0,$.jsx)(_e,{children:`No preview yet`}),(0,$.jsx)(ve,{children:`Type a URL above, or run a dev script. Browser-ready localhost servers will show up here automatically.`})]}),t[12]=e):e=t[12],h=e;break bb0}p=`scrollbar-gutter-both flex h-full min-h-0 overflow-y-auto px-5 py-8`,d=`mx-auto flex w-full max-w-xl flex-col gap-6`,f=e.length>0?(0,$.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,$.jsx)(m,{className:`size-4 shrink-0`}),(0,$.jsx)(`h2`,{className:`font-medium`,children:`Recently used`})]}),(0,$.jsx)(xe,{children:e.map(e=>(0,$.jsx)(_t,{threadRef:n,entry:e,onOpen:()=>s(e.url),onRemove:()=>o(e.url)},e.url))})]}):null}t[3]=s,t[4]=o,t[5]=a,t[6]=u.length,t[7]=n,t[8]=d,t[9]=f,t[10]=p,t[11]=h}else d=t[8],f=t[9],p=t[10],h=t[11];if(h!==Symbol.for(`react.early_return_sentinel`))return h;let g;t[13]!==s||t[14]!==u||t[15]!==n?(g=u.length>0?(0,$.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,$.jsx)(b,{className:`size-4 shrink-0`}),(0,$.jsx)(`h2`,{className:`font-medium`,children:`Local servers`})]}),(0,$.jsx)(xe,{children:u.map(e=>(0,$.jsx)(ht,{threadRef:n,server:e,onOpen:()=>s(e.requestedUrl)},`${e.host}:${e.port}`))}),(0,$.jsx)(`p`,{className:`px-1 text-xs text-muted-foreground`,children:`Select a live local server to open it in this browser tab.`})]}):null,t[13]=s,t[14]=u,t[15]=n,t[16]=g):g=t[16];let _;t[17]!==d||t[18]!==f||t[19]!==g?(_=(0,$.jsxs)(`div`,{className:d,children:[f,g]}),t[17]=d,t[18]=f,t[19]=g,t[20]=_):_=t[20];let v;return t[21]!==p||t[22]!==_?(v=(0,$.jsx)(`div`,{className:p,children:_}),t[21]=p,t[22]=_,t[23]=v):v=t[23],v}function Ct(e){return URL.canParse(e.url)}var wt=[{value:`system`,label:`System`},{value:`light`,label:`Light`},{value:`dark`,label:`Dark`}],Tt=()=>{let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(he,{children:[(0,$.jsx)(pe,{render:(0,$.jsx)(C,{render:(0,$.jsx)(T,{variant:`glass`,size:`icon`,type:`button`,"aria-label":`Preview menu`})}),children:(0,$.jsx)(d,{})}),(0,$.jsx)(me,{children:`More`})]}),e[0]=t):t=e[0],t};function Et(e){let t=(0,Q.c)(69),{enabled:n,actions:r,zoomFactor:a,colorScheme:o,deviceToolbarVisible:s,onToggleDeviceToolbar:c,profileName:l,move:u}=e,d;t[0]===a?d=t[1]:(d=Math.round(a*100),t[0]=a,t[1]=d);let f=`${d}%`,m=!n,g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(Tt,{}),t[2]=g):g=t[2];let _;t[3]!==r.hardReload||t[4]!==m?(_=(0,$.jsx)(w,{onClick:r.hardReload,disabled:m,children:`Hard reload`}),t[3]=r.hardReload,t[4]=m,t[5]=_):_=t[5];let v;t[6]!==r.openDevTools||t[7]!==m?(v=r.openDevTools?(0,$.jsx)(w,{onClick:r.openDevTools,disabled:m,children:`Open DevTools`}):null,t[6]=r.openDevTools,t[7]=m,t[8]=v):v=t[8];let y;t[9]===u?y=t[10]:(y=u?(0,$.jsx)(w,{onClick:u.onMove,children:u.label}):null,t[9]=u,t[10]=y);let b=s?`Hide device toolbar`:`Show device toolbar`,C;t[11]!==m||t[12]!==c||t[13]!==b?(C=(0,$.jsx)(w,{onClick:c,disabled:m,children:b}),t[11]=m,t[12]=c,t[13]=b,t[14]=C):C=t[14];let E;t[15]===m?E=t[16]:(E=(0,$.jsx)(re,{disabled:m,children:`Appearance`}),t[15]=m,t[16]=E);let D;t[17]===r?D=t[18]:(D=e=>r.setColorScheme(e),t[17]=r,t[18]=D);let k;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(k=wt.map(Ot),t[19]=k):k=t[19];let j;t[20]!==o||t[21]!==D?(j=(0,$.jsx)(A,{children:(0,$.jsx)(te,{value:o,onValueChange:D,children:k})}),t[20]=o,t[21]=D,t[22]=j):j=t[22];let F;t[23]!==j||t[24]!==E?(F=(0,$.jsxs)(x,{children:[E,j]}),t[23]=j,t[24]=E,t[25]=F):F=t[25];let I;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,$.jsx)(P,{}),t[26]=I):I=t[26];let ee;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,$.jsx)(`span`,{children:`Zoom`}),t[27]=ee):ee=t[27];let ne;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,$.jsx)(O,{}),t[28]=ne):ne=t[28];let L;t[29]!==r.zoomOut||t[30]!==m?(L=(0,$.jsx)(T,{variant:`outline`,size:`icon-xs`,type:`button`,onClick:r.zoomOut,"aria-label":`Zoom out`,disabled:m,children:ne}),t[29]=r.zoomOut,t[30]=m,t[31]=L):L=t[31];let R;t[32]===f?R=t[33]:(R=(0,$.jsx)(`span`,{className:`min-w-12 text-center text-xs tabular-nums text-muted-foreground`,children:f}),t[32]=f,t[33]=R);let ie;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,$.jsx)(M,{}),t[34]=ie):ie=t[34];let z;t[35]!==r.zoomIn||t[36]!==m?(z=(0,$.jsx)(T,{variant:`outline`,size:`icon-xs`,type:`button`,onClick:r.zoomIn,"aria-label":`Zoom in`,disabled:m,children:ie}),t[35]=r.zoomIn,t[36]=m,t[37]=z):z=t[37];let ae;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,$.jsx)(S,{}),t[38]=ae):ae=t[38];let B;t[39]!==r.resetZoom||t[40]!==m?(B=(0,$.jsx)(T,{variant:`ghost`,size:`icon-xs`,type:`button`,onClick:r.resetZoom,"aria-label":`Reset zoom`,disabled:m,children:ae}),t[39]=r.resetZoom,t[40]=m,t[41]=B):B=t[41];let V;t[42]!==L||t[43]!==R||t[44]!==z||t[45]!==B?(V=(0,$.jsxs)(`span`,{className:`flex items-center gap-1`,children:[L,R,z,B]}),t[42]=L,t[43]=R,t[44]=z,t[45]=B,t[46]=V):V=t[46];let oe;t[47]!==m||t[48]!==V?(oe=(0,$.jsxs)(w,{closeOnClick:!1,onClick:Dt,className:`justify-between`,disabled:m,children:[ee,V]}),t[47]=m,t[48]=V,t[49]=oe):oe=t[49];let se;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,$.jsx)(P,{}),t[50]=se):se=t[50];let H;t[51]===l?H=t[52]:(H=l?(0,$.jsx)(i,{className:`max-w-64`,children:(0,$.jsxs)(`span`,{className:`block truncate`,children:[`Profile: `,l]})}):null,t[51]=l,t[52]=H);let U;t[53]===r.clearCookies?U=t[54]:(U=(0,$.jsx)(w,{onClick:r.clearCookies,children:`Clear cookies`}),t[53]=r.clearCookies,t[54]=U);let ce;t[55]===r.clearCache?ce=t[56]:(ce=(0,$.jsx)(w,{onClick:r.clearCache,children:`Clear cache`}),t[55]=r.clearCache,t[56]=ce);let W;t[57]!==H||t[58]!==U||t[59]!==ce?(W=(0,$.jsxs)(p,{children:[H,U,ce]}),t[57]=H,t[58]=U,t[59]=ce,t[60]=W):W=t[60];let G;return t[61]!==F||t[62]!==oe||t[63]!==W||t[64]!==_||t[65]!==v||t[66]!==y||t[67]!==C?(G=(0,$.jsxs)(h,{children:[g,(0,$.jsxs)(N,{align:`end`,sideOffset:6,children:[_,v,y,C,F,I,oe,se,W]})]}),t[61]=F,t[62]=oe,t[63]=W,t[64]=_,t[65]=v,t[66]=y,t[67]=C,t[68]=G):G=t[68],G}function Dt(e){return e.preventDefault()}function Ot(e){return(0,$.jsx)(D,{value:e.value,children:e.label},e.value)}function kt(e){return a[e]||(e.length>0?e:`Network error`)}function At(e){let t=(0,Q.c)(21),{url:n,fileName:r,downloadUrl:i,onOpen:a}=e,o;t[0]===n?o=t[1]:(o=Pt(n)??n,t[0]=n,t[1]=o);let s=o,c,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(Nt,{className:`mb-6 size-12 text-muted-foreground/70`}),l=(0,$.jsx)(`h1`,{className:`mb-3 text-2xl font-semibold leading-tight text-foreground`,children:`This file can’t be shown here`}),t[2]=c,t[3]=l):(c=t[2],l=t[3]);let u;t[4]===r?u=t[5]:(u=(0,$.jsx)(`span`,{className:`font-semibold text-foreground`,children:r}),t[4]=r,t[5]=u);let d;t[6]!==s||t[7]!==u?(d=(0,$.jsxs)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:[u,` from `,s,` was downloaded instead.`]}),t[6]=s,t[7]=u,t[8]=d):d=t[8];let f;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(`div`,{className:`flex-1`}),t[9]=f):f=t[9];let p;t[10]===a?p=t[11]:(p=(0,$.jsx)(T,{type:`button`,variant:`outline`,size:`sm`,onClick:a,children:`Open in browser`}),t[10]=a,t[11]=p);let m;t[12]!==i||t[13]!==r?(m=i?(0,$.jsx)(T,{type:`button`,size:`sm`,render:(0,$.jsx)(`a`,{href:i,download:r}),children:`Download`}):null,t[12]=i,t[13]=r,t[14]=m):m=t[14];let h;t[15]!==p||t[16]!==m?(h=(0,$.jsxs)(`div`,{className:`mt-auto flex items-center gap-2 pt-8`,children:[f,p,m]}),t[15]=p,t[16]=m,t[17]=h):h=t[17];let g;return t[18]!==d||t[19]!==h?(g=(0,$.jsx)(`div`,{className:`scrollbar-gutter-both relative flex h-full min-h-0 w-full overflow-y-auto bg-background`,children:(0,$.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-1 flex-col px-8 py-12 sm:py-16`,children:[c,l,d,h]})}),t[18]=d,t[19]=h,t[20]=g):g=t[20],g}function jt(e){let t=(0,Q.c)(44),{url:n,code:r,description:i,onReload:a,move:o}=e,[s,c]=(0,Z.useState)(!1),l;t[0]===n?l=t[1]:(l=Pt(n)??n,t[0]=n,t[1]=l);let u=l,d;t[2]===i?d=t[3]:(d=kt(i),t[2]=i,t[3]=d);let f=d,p;t[4]!==r||t[5]!==i?(p=i.length>0?i:`ERR_${Math.abs(r)||`FAILED`}`,t[4]=r,t[5]=i,t[6]=p):p=t[6];let m=p,h,g;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(Nt,{className:`mb-6 size-12 text-muted-foreground/70`}),g=(0,$.jsx)(`h1`,{className:`mb-3 text-2xl font-semibold leading-tight text-foreground`,children:`This site can’t be reached`}),t[7]=h,t[8]=g):(h=t[7],g=t[8]);let _;t[9]===u?_=t[10]:(_=(0,$.jsx)(`span`,{className:`font-semibold text-foreground`,children:u}),t[9]=u,t[10]=_);let v;t[11]!==f||t[12]!==_?(v=(0,$.jsxs)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:[_,`: `,f,`.`]}),t[11]=f,t[12]=_,t[13]=v):v=t[13];let y;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsx)(`p`,{className:`mb-2 font-medium text-foreground`,children:`Try:`}),t[14]=y):y=t[14];let b,x;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(`li`,{children:`Checking your connection`}),b=(0,$.jsx)(`li`,{children:`Confirming the dev server is running`}),t[15]=b,t[16]=x):(b=t[15],x=t[16]);let S;t[17]===o?S=t[18]:(S=o?(0,$.jsx)(`li`,{children:`Opening it in the environment’s browser, which reaches its network`}):null,t[17]=o,t[18]=S);let C;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(`li`,{children:`Checking the proxy and the firewall`}),t[19]=C):C=t[19];let w;t[20]===S?w=t[21]:(w=(0,$.jsx)(Qe,{children:(0,$.jsxs)(`div`,{className:`mt-6 rounded-lg border border-border bg-muted/40 p-4 text-sm`,children:[y,(0,$.jsxs)(`ul`,{className:`list-disc space-y-1 pl-5 text-muted-foreground`,children:[x,b,S,C]})]})}),t[20]=S,t[21]=w);let E;t[22]!==s||t[23]!==w?(E=(0,$.jsx)($e,{open:s,children:w}),t[22]=s,t[23]=w,t[24]=E):E=t[24];let D;t[25]===m?D=t[26]:(D=(0,$.jsx)(`div`,{className:`mt-8 text-xs uppercase tracking-wide text-muted-foreground/70`,children:m}),t[25]=m,t[26]=D);let O;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>c(Mt),t[27]=O):O=t[27];let k=s?`Hide details`:`Details`,A;t[28]===k?A=t[29]:(A=(0,$.jsx)(T,{type:`button`,variant:`outline`,size:`sm`,onClick:O,children:k}),t[28]=k,t[29]=A);let j;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(`div`,{className:`flex-1`}),t[30]=j):j=t[30];let M;t[31]===o?M=t[32]:(M=o?(0,$.jsx)(T,{type:`button`,variant:`outline`,size:`sm`,onClick:o.onMove,children:o.label}):null,t[31]=o,t[32]=M);let N;t[33]===a?N=t[34]:(N=(0,$.jsx)(T,{type:`button`,size:`sm`,onClick:a,children:`Reload`}),t[33]=a,t[34]=N);let P;t[35]!==A||t[36]!==M||t[37]!==N?(P=(0,$.jsxs)(`div`,{className:`mt-auto flex items-center gap-2 pt-8`,children:[A,j,M,N]}),t[35]=A,t[36]=M,t[37]=N,t[38]=P):P=t[38];let F;return t[39]!==E||t[40]!==D||t[41]!==P||t[42]!==v?(F=(0,$.jsx)(`div`,{className:`scrollbar-gutter-both relative flex h-full min-h-0 w-full overflow-y-auto bg-background`,children:(0,$.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-1 flex-col px-8 py-12 sm:py-16`,children:[h,g,v,E,D,P]})}),t[39]=E,t[40]=D,t[41]=P,t[42]=v,t[43]=F):F=t[43],F}function Mt(e){return!e}function Nt(e){let t=(0,Q.c)(5),{className:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(`path`,{d:`M16 12 L48 12 L48 52 L16 52 Z`}),i=(0,$.jsx)(`path`,{d:`M22 22 L42 22 M22 30 L36 30 M22 38 L40 38`,strokeLinecap:`round`}),a=(0,$.jsx)(`path`,{d:`M52 8 L12 56`,strokeLinecap:`round`}),t[0]=r,t[1]=i,t[2]=a):(r=t[0],i=t[1],a=t[2]);let o;return t[3]===n?o=t[4]:(o=(0,$.jsxs)(`svg`,{viewBox:`0 0 64 64`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,className:n,children:[r,i,a]}),t[3]=n,t[4]=o),o}function Pt(e){try{return new URL(e).host}catch{return null}}var Ft=1500,It=.001;function Lt(e){let t=(0,Q.c)(11),{zoomFactor:n}=e,[r,i]=(0,Z.useState)(!1),a=(0,Z.useRef)(n),o=(0,Z.useRef)(null),s,c;t[0]===n?(s=t[1],c=t[2]):(s=()=>{if(!(Math.abs(a.current-n)<It))return a.current=n,i(!0),o.current!==null&&window.clearTimeout(o.current),o.current=window.setTimeout(()=>{i(!1),o.current=null},Ft),()=>{o.current!==null&&(window.clearTimeout(o.current),o.current=null)}},c=[n],t[0]=n,t[1]=s,t[2]=c),(0,Z.useEffect)(s,c);let l;t[3]===n?l=t[4]:(l=Math.round(n*100),t[3]=n,t[4]=l);let u=`${l}%`,d=!r,f=r?`opacity-100 translate-y-0`:`opacity-0 -translate-y-1`,p;t[5]===f?p=t[6]:(p=ne(`pointer-events-none absolute top-3 right-3 z-20 select-none rounded-full border border-border/70 bg-popover/95 px-2.5 py-1 text-xs font-medium text-foreground shadow-md/10 backdrop-blur transition-all duration-200 ease-out`,f),t[5]=f,t[6]=p);let m;return t[7]!==u||t[8]!==d||t[9]!==p?(m=(0,$.jsx)(`div`,{"aria-hidden":d,className:p,children:u}),t[7]=u,t[8]=d,t[9]=p,t[10]=m):m=t[10],m}function Rt(e,t){return e.find(e=>e.id===t)?.name??`Removed profile`}var zt=typeof window>`u`?null:H();function Bt(e){let t=(0,Q.c)(12),n=ut(e.threadRef.environmentId),r;t[0]!==n||t[1]!==e.download.id||t[2]!==e.tabId||t[3]!==e.threadRef.threadId?(r=n?rt({access:n,threadId:e.threadRef.threadId,tabId:e.tabId},e.download.id):null,t[0]=n,t[1]=e.download.id,t[2]=e.tabId,t[3]=e.threadRef.threadId,t[4]=r):r=t[4];let i;t[5]===e.url?i=t[6]:(i=()=>void zt?.shell.openExternal(e.url).catch(Vt),t[5]=e.url,t[6]=i);let a;return t[7]!==e.download.fileName||t[8]!==e.url||t[9]!==r||t[10]!==i?(a=(0,$.jsx)(At,{url:e.url,fileName:e.download.fileName,downloadUrl:r,onOpen:i}),t[7]=e.download.fileName,t[8]=e.url,t[9]=r,t[10]=i,t[11]=a):a=t[11],a}function Vt(){}function Ht({threadRef:e,tabId:t,configuredUrls:n,visible:r,onSendAnnotation:i}){let[a,s]=(0,Z.useState)(void 0),[c,d]=(0,Z.useState)(!1),f=W(e.environmentId,`orchestration:operate`)&&!!i,p=Xe(),m=(0,Z.useRef)(null),h=(0,Z.useRef)(!0),y=(0,Z.useRef)(e);y.current=e;let b=v(e),x=we(e,50),S=o(e=>e.addPreviewAnnotation),C=o(e=>e.addImage),w=se(e.environmentId),D=w?new URL(w).hostname:null,O=le(Fe.open),k=le(Fe.close,`preview close`),A=ce(e.environmentId)?.label??`the environment`,j=oe(),M=ae(e.environmentId),N=le(Fe.resize,`preview viewport resize`),P=le(Fe.adjust,`preview appearance or zoom`);ot(e),(0,Z.useEffect)(()=>(h.current=!0,()=>{h.current=!1}),[]);let F=t??b.activeTabId,I=F?We(e,b.serverEpoch,F):null,te=F&&I?p.has(I)?I:Ue(e,F):null,L=F?b.sessions[F]??null:null,re=Ce(e.environmentId,L),H=L?.runtime===`server`&&!re,K=L?.runtime===`server`,q=(0,Z.useRef)(null),[fe,ge]=(0,Z.useState)(!1),_e=(0,Z.useRef)(null),[ve,ye]=(0,Z.useState)(0),be=L?.runtime===`server`&&(L.viewport??R)._tag!==`fill`;(0,Z.useEffect)(()=>{let e=_e.current;if(e&&be)return Se(e,([e])=>ye(Math.max(1,Math.round(e?.contentRect.width??0))))},[be]);let[xe,je]=(0,Z.useState)(null),Ne=H&&xe!==I,[ze,Be]=(0,Z.useState)(null),J=F&&!H?b.desktopByTabId[F]??null:null,X=L?.navStatus??{_tag:`Idle`},Je=X._tag===`Idle`?``:X.url,Qe=J?.loading??X._tag===`Loading`,$e=J?.canGoBack??L?.canGoBack??!1,rt=J?.canGoForward??L?.canGoForward??!1,ut=X._tag===`Idle`,Q=X._tag===`LoadFailed`,dt=st(L),pt=H&&!dt&&!Q&&ze!==I,ht=J?.controller??`none`,gt=L?.viewport??R,_t=Ee(),vt=L?.profileId??`default`,yt=Rt(_t.profiles,vt),bt=qe(e=>I?e.byTabId[I]?.rect??null:null),xt=X._tag===`Success`?X.url:null,Ct=X._tag===`Success`?X.title:null,wt=x[0]?.url,Tt=E(e);(0,Z.useEffect)(()=>{xt&&Ct&&wt&&De(y.current,xt,Ct,D)},[D,wt,Ct,xt,Tt]);let Dt=(0,Z.useCallback)(async t=>{if(H&&q.current)return!Ne&&(q.current.navigate(t),u(e,t),!0);if(I&&Y)return await Y.navigate(I,t),u(e,t),!0;let n=await Ye({openPreview:O,threadRef:e,url:t});if(n._tag===`Failure`&&!ie(n)){let e=z(n);e instanceof Pe&&V.add({type:`error`,title:`Unable to open browser`,description:e.message})}return n._tag===`Success`},[H,O,I,Ne,e]),Ot=(0,Z.useCallback)(async t=>{try{let n=Le(t,Ie(U()));await Dt(n)&&Oe(e,n)}catch{}},[Dt,e]),kt=(0,Z.useCallback)(async t=>{try{let n=H||!Y?Re(t):ke(e.environmentId,t);await Dt(n)&&Oe(e,t)}catch{}},[H,Dt,e]),At=(0,Z.useCallback)(()=>{H?q.current?.reload():Y&&I&&Y.refresh(I)},[H,I]),Mt=(0,Z.useCallback)(async t=>{if(!F)return;let n=await P({environmentId:e.environmentId,input:{threadId:e.threadId,tabId:F,...t}});if(n._tag===`Failure`){let e=z(n);V.add({type:`error`,title:`Unable to change the browser tab`,description:e instanceof Error?e.message:`An error occurred.`})}else ee(e,n.value)},[P,F,e]),Nt=L?.zoomFactor??1,Pt=(0,Z.useCallback)(e=>{let t=l.indexOf(Nt),n=e===0?1:l[Math.min(Math.max((t<0?7:t)+e,0),l.length-1)];n!==Nt&&Mt({zoomFactor:n})},[Mt,Nt]),Ft=(0,Z.useCallback)(()=>{K?Pt(1):Y&&I&&Y.zoomIn(I)},[I,K,Pt]),It=(0,Z.useCallback)(()=>{K?Pt(-1):Y&&I&&Y.zoomOut(I)},[I,K,Pt]),Vt=(0,Z.useCallback)(()=>{K?Pt(0):Y&&I&&Y.resetZoom(I)},[I,K,Pt]),Ht=(0,Z.useCallback)(async t=>{if(!F)return;let n=await N({environmentId:e.environmentId,input:{threadId:e.threadId,tabId:F,viewport:t}});if(n._tag===`Failure`){let e=z(n);throw V.add({type:`error`,title:`Unable to resize browser viewport`,description:e instanceof Error?e.message:`An error occurred.`}),e}ee(e,n.value)},[N,F,e]),Ut=()=>{I&&(gt._tag===`fill`?et(I,Me({defaults:_t,panelRect:bt,zoomFactor:K?Nt:J?.zoomFactor})).catch(()=>void 0):et(I,R).catch(()=>void 0))};(0,Z.useEffect)(()=>{if(I)return He(I,Ht)},[Ht,I]);let Wt=(0,Z.useCallback)(()=>{H?q.current?.history(-1):Y&&I&&Y.goBack(I)},[H,I]),Gt=(0,Z.useCallback)(()=>{H?q.current?.history(1):Y&&I&&Y.goForward(I)},[H,I]),Kt=(0,Z.useCallback)(()=>{zt&&Je&&zt.shell.openExternal(Je).catch(()=>void 0)},[Je]),qt=Te(e.environmentId,j,M,L),Jt=qt===`server`?`Open in ${A}'s browser`:`Open on this computer`,Yt=(0,Z.useCallback)(async()=>{if(!qt||!F||!L)return;let t=await Ye({openPreview:O,threadRef:e,...Je?{url:qt===`desktop`?ke(e.environmentId,Je):Je}:{},viewport:gt,...L.profileId===void 0?{}:{profileId:L.profileId},runtime:qt});if(t._tag===`Failure`){if(ie(t))return;let e=z(t);V.add({type:`error`,title:`Unable to move the browser tab`,description:e instanceof Error?e.message:`An error occurred.`})}else ue.getState().openBrowser(e,t.value.tabId),await nt({closePreview:k,snapshot:L,tabId:F,threadRef:e})},[k,qt,O,L,F,e,Je,gt]),Xt=e=>()=>{e&&I&&e(I).catch(()=>void 0)},Zt=K?{hardReload:()=>void Mt({hardReload:!0}),setColorScheme:e=>void Mt({colorScheme:e}),zoomIn:Ft,zoomOut:It,resetZoom:Vt,clearCookies:()=>void Mt({clear:`cookies`}),clearCache:()=>void Mt({clear:`cache`}),...re&&Y?{openDevTools:Xt(Y.openDevTools)}:{}}:Y?{hardReload:Xt(Y.hardReload),setColorScheme:e=>{I&&Y?.setColorScheme(I,e).catch(()=>void 0)},zoomIn:Ft,zoomOut:It,resetZoom:Vt,clearCookies:()=>void Y?.clearCookies(e.environmentId,vt).catch(()=>void 0),clearCache:()=>void Y?.clearCache(e.environmentId,vt).catch(()=>void 0),openDevTools:Xt(Y.openDevTools)}:null,Qt=(0,Z.useCallback)(()=>{Y&&I&&(J?.pictureInPicture?Y.pictureInPicture.close:Y.pictureInPicture.open)(I).catch(e=>{V.add({type:`error`,title:`Unable to update popped-out preview`,description:e instanceof Error?e.message:`An error occurred.`})})},[J?.pictureInPicture,I]),$t=(0,Z.useCallback)(t=>{if(!Y||!I||!F)return;let n=Y;te?Ve(te).then(e=>{if(!e)return;let t=!1,r,i=()=>{navigator.clipboard?.writeText?navigator.clipboard.writeText(e.path).then(()=>{t=!0,o(),window.setTimeout(()=>{t=!1,o()},2e3)},e=>{V.update(r,de({type:`error`,title:`Unable to copy recording path`,description:e instanceof Error?e.message:`An error occurred.`,actionProps:a}))}):V.update(r,de({type:`error`,title:`Unable to copy recording path`,description:`Clipboard API unavailable.`,actionProps:a}))},a={children:B(navigator.platform),onClick:()=>void n.revealArtifact(e.path)},o=()=>{V.update(r,de({type:`success`,title:`Recording saved`,actionProps:a,data:{secondaryActionProps:{children:t?`Copied!`:`Copy path`,disabled:t,onClick:i}}}))};r=V.add(de({type:`success`,title:`Recording saved`,actionProps:a,data:{secondaryActionProps:{children:`Copy path`,onClick:i}}}))},e=>{V.add({type:`error`,title:`Unable to stop recording`,description:e instanceof Error?e.message:`An error occurred.`})}):t?Ze(I,e,F).catch(e=>{let t=e instanceof Error?e.message:`An error occurred.`;Ke(e)||V.add({type:`error`,title:`Unable to start recording`,description:t})}):n.captureScreenshot(I).then(e=>{let t={children:B(navigator.platform),onClick:()=>void n.revealArtifact(e.path)},r=!1,i=!1,a,o=(e=`success`,n=`Screenshot saved`,o)=>{V.update(a,de({type:e,title:n,description:o,actionProps:{children:i?`Copied!`:`Copy image`,disabled:i,onClick:c},data:{additionalActions:[{id:`copy-path`,props:{children:r?`Copied!`:`Copy path`,disabled:r,onClick:s}}],secondaryActionProps:{...t}}}))},s=()=>{navigator.clipboard?.writeText?navigator.clipboard.writeText(e.path).then(()=>{r=!0,o(),window.setTimeout(()=>{r=!1,o()},2e3)},e=>{o(`error`,`Unable to copy screenshot path`,e instanceof Error?e.message:`An error occurred.`)}):o(`error`,`Unable to copy screenshot path`,`Clipboard API unavailable.`)},c=()=>{n.copyArtifactToClipboard(e.path).then(()=>{i=!0,o(),window.setTimeout(()=>{i=!1,o()},2e3)},e=>{o(`error`,`Unable to copy screenshot`,e instanceof Error?e.message:`An error occurred.`)})};a=V.add(de({type:`success`,title:`Screenshot saved`,actionProps:{children:`Copy image`,onClick:c},data:{additionalActions:[{id:`copy-path`,props:{children:`Copy path`,onClick:s}}],secondaryActionProps:{...t}}}))},e=>{V.add({type:`error`,title:`Unable to capture screenshot`,description:e instanceof Error?e.message:`An error occurred.`})})},[te,I,F,e]),en=(0,Z.useCallback)(()=>{if(!Y||!I)return;if(m.current){m.current.cancelled=!0,Y.cancelPickElement(I).catch(()=>void 0);return}let t=typeof document<`u`?document.activeElement:null,n={cancelled:!1},r=!1;m.current=n,d(!0),(async()=>{try{if(await Y.setAnnotationSendEnabled?.(I,!!i&&G(e.environmentId,`orchestration:operate`)),n.cancelled)return;let t=await Y.pickElement(I);if(!t||n.cancelled)return;m.current===n&&(m.current=null,h.current&&d(!1),r=!0);let{annotation:a,submission:o,screenshotFailed:s=!1}=t,c=ft(a),l=s||c.status===`failed`,u=c.status===`failed`?{...a,screenshot:null}:a;S(e,u),l&&V.add(de({type:`error`,title:`Could not capture the picked element`,description:`The annotation was kept without the screenshot.`}));let f=c.status===`captured`?c.file:null,p=f&&u.screenshot?{type:`image`,id:u.id,name:f.name,mimeType:f.type,sizeBytes:f.size,previewUrl:u.screenshot.dataUrl,file:f}:null;p&&C(e,p),o===`send`&&G(e.environmentId,`orchestration:operate`)&&i?.(u,p)}catch{}finally{let e=m.current===n;if(e&&(m.current=null,h.current&&d(!1)),(e||r)&&t&&t.isConnected&&typeof t.focus==`function`)try{t.focus({preventScroll:!0})}catch{}}})()},[C,S,i,I,e]);return(0,Z.useEffect)(()=>{c&&Y&&I&&Y.setAnnotationSendEnabled?.(I,f).catch(()=>void 0)},[f,c,I]),(0,Z.useEffect)(()=>()=>{m.current&&(m.current.cancelled=!0,m.current=null,Y&&I&&Y.cancelPickElement(I).catch(()=>void 0),h.current&&d(!1))},[I]),(0,Z.useEffect)(()=>{if(r)return at(e=>{switch(e){case`refresh`:At();return;case`focus-url`:s(e=>(e??0)+1);return;case`zoom-in`:Ft();return;case`zoom-out`:It();return;case`reset-zoom`:Vt();return;case`toggle-panel`:return}})},[At,Vt,Ft,It,r]),(0,$.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col bg-background`,"data-thread-key":E(e),children:[(0,$.jsx)(mt,{url:Je,loading:Qe||pt,canGoBack:$e&&!Ne,canGoForward:rt&&!Ne,refreshDisabled:ut||Ne,inputDisabled:Ne,focusUrlNonce:a,onBack:Wt,onForward:Gt,onRefresh:At,onSubmit:e=>void Ot(e),onOpenInBrowser:F?Kt:void 0,onCapture:Y&&F&&!H?$t:void 0,captureDisabled:!J||Q||J.pictureInPicture,recording:te!==null,onSeparateWindow:Y&&F&&(!K||re)?Qt:void 0,separateWindow:J?.pictureInPicture??!1,separateWindowDisabled:I===null||!K&&!(J?.hasWebContents??!1),onPickElement:Y&&F&&!H?en:void 0,pickActive:c,pickDisabled:!F||Q,pickDisabledReason:Q?`Page didn't load — pick unavailable until the page renders`:void 0,leadingActions:vt===_t.profileId?null:(0,$.jsxs)(he,{children:[vt===`incognito`?(0,$.jsx)(pe,{render:(0,$.jsx)(`span`,{role:`img`,"aria-label":yt,className:`flex shrink-0 text-muted-foreground`}),children:(0,$.jsx)(g,{className:`size-4`})}):(0,$.jsx)(pe,{render:(0,$.jsx)(_,{variant:`outline`,className:`max-w-28 shrink-0`}),children:(0,$.jsx)(`span`,{className:`truncate`,children:yt})}),(0,$.jsx)(me,{side:`top`,children:yt})]}),trailingActions:Zt?(0,$.jsx)(Et,{enabled:I!==null&&(K||(J?.hasWebContents??!1)),actions:Zt,...qt?{move:{label:Jt,onMove:()=>void Yt()}}:{},profileName:yt,zoomFactor:K?Nt:J?.zoomFactor??1,colorScheme:K?L?.colorScheme??`system`:J?.colorScheme??`system`,deviceToolbarVisible:gt._tag!==`fill`,onToggleDeviceToolbar:Ut}):null}),(0,$.jsxs)(`div`,{ref:_e,className:`relative min-h-0 flex-1 overflow-hidden`,children:[I&&L&&H?(0,$.jsxs)($.Fragment,{children:[gt._tag!==`fill`&&!dt&&!Q?(0,$.jsx)(`div`,{className:`absolute inset-x-0 top-0 z-10`,children:(0,$.jsx)(Ge,{setting:gt,width:ve,aspectRatio:fe?gt.width/gt.height:null,onAspectRatioChange:e=>ge(e!==null),onChange:e=>et(I,e)})}):null,(0,$.jsx)(`div`,{className:`absolute inset-x-0 bottom-0`,style:{top:gt._tag===`fill`?0:38},children:(0,$.jsx)(ct,{ref:q,environmentId:e.environmentId,threadId:e.threadId,tabId:L.tabId,visible:r,onFirstFrame:()=>Be(I),onControl:e=>je(e?.controller===`you`?I:null),onPopup:t=>lt(e,t,`panel`),className:ne(`absolute inset-0 h-full w-full`,(dt||Q)&&`invisible`)},I)})]}):I&&L&&!dt?Y&&J?.pictureInPicture?(0,$.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3 p-8 text-center`,children:[(0,$.jsx)(`p`,{className:`max-w-sm text-sm text-muted-foreground`,children:`Showing in a separate window.`}),(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[(0,$.jsx)(T,{size:`sm`,variant:`outline`,onClick:Qt,children:`Bring back`}),(0,$.jsx)(T,{size:`sm`,variant:`ghost`,onClick:()=>void Y?.pictureInPicture.open(I),children:`Show window`})]})]}):Y?(0,$.jsx)(tt,{tabId:I,visible:r&&!Q,className:`absolute inset-0 h-full w-full`},I):(0,$.jsx)(`div`,{className:`flex h-full items-center justify-center p-8 text-center`,children:(0,$.jsx)(`p`,{className:`max-w-sm text-sm text-muted-foreground`,children:`This tab is open in the P4 Code desktop app.`})}):null,dt?(0,$.jsx)(St,{threadRef:e,environmentId:e.environmentId,configuredUrls:n,recentEntries:x,onRemoveRecent:t=>Ae(e,t),onOpenUrl:e=>void kt(e)}):null,L&&J?(0,$.jsx)(Lt,{zoomFactor:J.zoomFactor}):null,I&&J&&!dt&&!Q&&!p.has(I)?(0,$.jsx)(it,{tabId:I,zoomFactor:J.zoomFactor,controller:ht}):null,X._tag===`LoadFailed`&&X.download?(0,$.jsx)(`div`,{className:`absolute inset-0 z-10 bg-background`,children:(0,$.jsx)(Bt,{threadRef:e,tabId:L?.tabId??``,url:X.url,download:X.download})}):X._tag===`LoadFailed`?(0,$.jsx)(`div`,{className:`absolute inset-0 z-10 bg-background`,children:(0,$.jsx)(jt,{url:X.url,code:X.code,description:X.description,onReload:At,...qt===`server`?{move:{label:Jt,onMove:()=>void Yt()}}:{}})}):null]})]})}function Ut(e){let t=(0,Q.c)(18),{mode:n,threadRef:r,tabId:i,configuredUrls:a,visible:o,onSendAnnotation:s}=e,c=Ne(r.environmentId),l=W(r.environmentId,y);if(!l||!c){let e=l?`Preview is only available in the P4 Code desktop app.`:`Pair this client again with preview access to control browser previews.`,r;t[0]===e?r=t[1]:(r=(0,$.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center gap-3 p-8 text-center`,children:(0,$.jsx)(`p`,{className:`max-w-sm text-sm text-muted-foreground`,children:e})}),t[0]=e,t[1]=r);let i;return t[2]!==n||t[3]!==r?(i=(0,$.jsx)(K,{mode:n,children:r}),t[2]=n,t[3]=r,t[4]=i):i=t[4],i}let u;t[5]===i?u=t[6]:(u=i===void 0?{}:{tabId:i},t[5]=i,t[6]=u);let d;t[7]===s?d=t[8]:(d=s?{onSendAnnotation:s}:{},t[7]=s,t[8]=d);let f;t[9]!==a||t[10]!==u||t[11]!==d||t[12]!==r||t[13]!==o?(f=(0,$.jsx)(Ht,{threadRef:r,...u,configuredUrls:a,visible:o,...d}),t[9]=a,t[10]=u,t[11]=d,t[12]=r,t[13]=o,t[14]=f):f=t[14];let p;return t[15]!==n||t[16]!==f?(p=(0,$.jsx)(K,{mode:n,children:f}),t[15]=n,t[16]=f,t[17]=p):p=t[17],p}export{Ut as PreviewPanel};
|
|
2
|
-
//# sourceMappingURL=PreviewPanel-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{$n as i,$o as a,D as o,Fp as s,Gf as c,Gg as l,Go as u,Mp as d,Nd as f,Qn as p,Xf as m,Xn as h,Yf as g,Yn as _,Yo as v,av as y,cm as b,cr as x,dm as S,dr as C,er as w,fr as T,ic as E,ir as D,kp as O,ld as k,lr as A,md as j,nm as M,nr as N,or as P,pd as F,pf as I,qo as ee,rr as te,t as ne,uh as L,ur as re,zg as R}from"./utils-C5GGWTfe.js";import{R as ie,W as z}from"./runtime-BVmDVuJ-.js";import{y as ae}from"./entities-aKdRyfsJ.js";import{it as B}from"./ChatMarkdown-CFUfXlYp.js";import{i as V}from"./toast-BZ96uuab.js";import{O as oe,S as se,q as H,r as U,x as ce}from"./useSettings-B09a3zie.js";import{i as W,n as G}from"./session-BIwsf8Q4.js";import{t as le}from"./use-atom-command-CdV5BZYB.js";import{u as ue}from"./rightPanelStore-rZSIb-5z.js";import{t as de}from"./toastHelpers-DxXYm50b.js";import{M as K,j as q}from"./PanelLayoutControls-BQZYES2T.js";import{o as fe}from"./timestampFormat-wac2e_Jz.js";import{a as pe,n as me,t as he}from"./tooltip-BPiLl1TV.js";import{a as ge,o as _e,r as ve,t as ye}from"./empty-Cy-8us9l.js";import{n as be,t as xe}from"./discovery-list-VELXPQtS.js";import{t as Se}from"./observeResize-CZuDzlcZ.js";import{T as Ce,a as we,b as Te,f as Ee,i as De,n as Oe,o as ke,r as Ae,t as je,u as Me,w as Ne}from"./browserHistoryStore-CdncPjG8.js";import{n as Pe}from"./openFileInPreview-Dns9tPaB.js";import{t as Fe}from"./preview-CI9HEdfV.js";import{a as Ie,i as Le,r as Re,t as ze}from"./preview-YhZE3kRt.js";import{u as Be}from"./LinkMachineSelect-DGm4EDKi.js";import{Aa as Ve,Ba as He,Da as Ue,Eo as J,Fa as We,Ga as Y,Ia as Ge,Ja as X,Oa as Ke,Pa as qe,Va as Je,Wa as Ye,ja as Xe,ka as Ze,mo as Qe,po as $e,za as et}from"./main-C0z861OK.js";import{a as tt,c as nt,d as rt,i as it,l as at,n as ot,o as st,r as ct,s as lt,u as ut}from"./_chat-Cnc6rxt6.js";var Z=e(t(),1),Q=n(),dt=`data:image/png;base64,`;function ft(e){if(!e.screenshot)return{status:`none`};try{let{dataUrl:t}=e.screenshot;if(!t.startsWith(dt))return{status:`failed`};let n=X(t,`preview-annotation-${e.id}.png`,`image/png`);return n.size>0?{status:`captured`,file:n}:{status:`failed`}}catch{return{status:`failed`}}}var $=e(r(),1),pt=()=>{};function mt(e){let t=(0,Q.c)(79),{url:n,loading:r,canGoBack:i,canGoForward:a,refreshDisabled:o,inputDisabled:c,focusUrlNonce:l,onBack:u,onForward:d,onRefresh:p,onSubmit:m,onOpenInBrowser:h,onCapture:g,captureDisabled:_,recording:v,onSeparateWindow:y,separateWindow:b,separateWindowDisabled:x,onPickElement:S,pickActive:C,pickDisabled:w,pickDisabledReason:E,trailingActions:D,leadingActions:O}=e,A=(0,Z.useRef)(null),[M,N]=(0,Z.useState)(n),[P,ee]=(0,Z.useState)(!1),te,L;t[0]===l?(te=t[1],L=t[2]):(te=()=>{if(l==null)return;let e=A.current;e&&e.focus()},L=[l],t[0]=l,t[1]=te,t[2]=L),(0,Z.useEffect)(te,L);let re;t[3]!==M||t[4]!==m?(re=e=>{e?.preventDefault();let t=M.trim();t.length!==0&&(m(t),A.current?.blur())},t[3]=M,t[4]=m,t[5]=re):re=t[5];let R=re,ie=i?u:pt,z=!i,ae;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,$.jsx)(F,{}),t[6]=ae):ae=t[6];let B;t[7]!==ie||t[8]!==z?(B=(0,$.jsx)(T,{variant:`ghost`,size:`icon-xs`,onClick:ie,disabled:z,"aria-label":`Back`,type:`button`,children:ae}),t[7]=ie,t[8]=z,t[9]=B):B=t[9];let V=a?d:pt,oe=!a,se;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,$.jsx)(j,{}),t[10]=se):se=t[10];let H;t[11]!==V||t[12]!==oe?(H=(0,$.jsx)(T,{variant:`ghost`,size:`icon-xs`,onClick:V,disabled:oe,"aria-label":`Forward`,type:`button`,children:se}),t[11]=V,t[12]=oe,t[13]=H):H=t[13];let U;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,$.jsx)(`span`,{"aria-hidden":!0,className:`mx-0.5 h-4 w-px bg-border`}),t[14]=U):U=t[14];let ce=o?pt:p,W=r?`Stop`:`Refresh`,G;t[15]!==o||t[16]!==ce||t[17]!==W?(G=(0,$.jsx)(T,{variant:`ghost`,size:`icon-xs`,onClick:ce,disabled:o,"aria-label":W,type:`button`}),t[15]=o,t[16]=ce,t[17]=W,t[18]=G):G=t[18];let le;t[19]===r?le=t[20]:(le=(0,$.jsx)(J,{refreshing:r}),t[19]=r,t[20]=le);let ue;t[21]!==G||t[22]!==le?(ue=(0,$.jsx)(pe,{render:G,children:le}),t[21]=G,t[22]=le,t[23]=ue):ue=t[23];let de=r?`Loading…`:`Refresh`,K;t[24]===de?K=t[25]:(K=(0,$.jsx)(me,{children:de}),t[24]=de,t[25]=K);let q;t[26]!==ue||t[27]!==K?(q=(0,$.jsxs)(he,{children:[ue,K]}),t[26]=ue,t[27]=K,t[28]=q):q=t[28];let fe;t[29]!==H||t[30]!==q||t[31]!==B?(fe=(0,$.jsxs)(`div`,{className:`surface-glass flex h-8 shrink-0 items-center gap-0.5 rounded-full border border-border/60 px-1 shadow-sm [&_button]:rounded-full`,role:`group`,"aria-label":`Navigation`,children:[B,H,U,q]}),t[29]=H,t[30]=q,t[31]=B,t[32]=fe):fe=t[32];let ge=P?M:n,_e;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(_e=e=>N(e.target.value),t[33]=_e):_e=t[33];let ve;t[34]===n?ve=t[35]:(ve=()=>{N(n),ee(!0),queueMicrotask(()=>A.current?.select())},t[34]=n,t[35]=ve);let ye;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(ye=()=>{ee(!1)},t[36]=ye):ye=t[36];let be;t[37]!==R||t[38]!==n?(be=e=>{e.key===`Enter`&&R(e),e.key===`Escape`&&(e.preventDefault(),N(n),A.current?.blur())},t[37]=R,t[38]=n,t[39]=be):be=t[39];let xe;t[40]!==c||t[41]!==ge||t[42]!==ve||t[43]!==be?(xe=(0,$.jsx)(`input`,{ref:A,value:ge,onChange:_e,onFocus:ve,onBlur:ye,onKeyDown:be,"aria-label":`Address`,placeholder:`Search or enter URL`,spellCheck:!1,disabled:c,"data-preview-url-input":!0,className:`w-full min-w-0 truncate bg-transparent text-center text-sm text-foreground outline-none placeholder:text-muted-foreground focus:text-left`}),t[40]=c,t[41]=ge,t[42]=ve,t[43]=be,t[44]=xe):xe=t[44];let Se;t[45]!==P||t[46]!==h?(Se=h&&!P?(0,$.jsx)(`span`,{className:`pointer-events-none absolute right-1 flex opacity-0 transition-opacity focus-within:pointer-events-auto focus-within:opacity-100 group-hover/address:pointer-events-auto group-hover/address:opacity-100 [&_button]:rounded-full`,children:(0,$.jsxs)(he,{children:[(0,$.jsx)(pe,{render:(0,$.jsx)(T,{variant:`ghost`,size:`icon-xs`,onClick:h,"aria-label":`Open in system browser`,type:`button`}),children:(0,$.jsx)(I,{})}),(0,$.jsx)(me,{children:`Open in system browser`})]})}):null,t[45]=P,t[46]=h,t[47]=Se):Se=t[47];let Ce;t[48]!==xe||t[49]!==Se?(Ce=(0,$.jsxs)(`div`,{className:`surface-glass group/address relative flex h-8 min-w-0 flex-1 items-center rounded-full border border-border/60 px-8 shadow-sm transition-colors focus-within:border-ring has-disabled:opacity-64`,children:[xe,Se]}),t[48]=xe,t[49]=Se,t[50]=Ce):Ce=t[50];let we;t[51]!==S||t[52]!==C||t[53]!==w||t[54]!==E?(we=S?(0,$.jsxs)(he,{children:[(0,$.jsx)(pe,{render:(0,$.jsx)(T,{variant:`glass`,size:`icon`,onClick:S,disabled:w,"aria-label":C?`Cancel annotation`:`Annotate preview`,"aria-pressed":C?`true`:`false`,type:`button`}),children:(0,$.jsx)(s,{className:ne(C&&`text-primary`)})}),(0,$.jsx)(me,{children:w&&E?E:C?`Cancel annotation (Esc)`:`Annotate elements, regions, and drawings`})]}):null,t[51]=S,t[52]=C,t[53]=w,t[54]=E,t[55]=we):we=t[55];let Te;t[56]!==_||t[57]!==g||t[58]!==v?(Te=g?(0,$.jsxs)(he,{children:[(0,$.jsxs)(pe,{render:(0,$.jsx)(T,{variant:`glass`,size:`icon`,onClick:e=>g(e.shiftKey),"aria-label":v?`Stop recording`:`Capture screenshot`,type:`button`,className:`relative`,disabled:_}),children:[(0,$.jsx)(f,{className:ne(v&&`text-destructive`)}),v?(0,$.jsx)(`span`,{className:`absolute right-0.5 top-0.5 size-1.5 animate-status-pulse rounded-full bg-destructive`}):null]}),(0,$.jsx)(me,{children:v?`Stop recording`:`Screenshot · Shift-click to record`})]}):null,t[56]=_,t[57]=g,t[58]=v,t[59]=Te):Te=t[59];let Ee;t[60]!==y||t[61]!==b||t[62]!==x?(Ee=y?(0,$.jsxs)(he,{children:[(0,$.jsx)(pe,{render:(0,$.jsx)(T,{variant:`glass`,size:`icon`,onClick:y,"aria-label":b?`Bring preview back from its window`:`Open preview in a window`,"aria-pressed":b?`true`:`false`,type:`button`,disabled:x}),children:(0,$.jsx)(k,{className:ne(b&&`text-primary`)})}),(0,$.jsx)(me,{children:b?`Bring back`:`Open in separate window`})]}):null,t[60]=y,t[61]=b,t[62]=x,t[63]=Ee):Ee=t[63];let De;t[64]!==O||t[65]!==R||t[66]!==fe||t[67]!==Ce||t[68]!==we||t[69]!==Te||t[70]!==Ee||t[71]!==D?(De=(0,$.jsxs)(`form`,{onSubmit:R,className:`flex h-12 min-h-12 shrink-0 items-center gap-2 border-b border-border/60 bg-background px-2.5 in-data-[preview-panel-mode=inline]:border-b-transparent`,"data-surface-subheader":!0,children:[fe,O,Ce,we,Te,Ee,D]}),t[64]=O,t[65]=R,t[66]=fe,t[67]=Ce,t[68]=we,t[69]=Te,t[70]=Ee,t[71]=D,t[72]=De):De=t[72];let Oe;t[73]===Symbol.for(`react.memo_cache_sentinel`)?(Oe={boxShadow:`0 0 6px 1px var(--color-ring)`},t[73]=Oe):Oe=t[73];let ke;t[74]===r?ke=t[75]:(ke=(0,$.jsx)(`div`,{"aria-hidden":!0,"data-loading":r,className:`preview-loading-progress pointer-events-none absolute bottom-0 left-0 z-10 h-0.5 w-full origin-left rounded-r-full bg-primary`,style:Oe}),t[74]=r,t[75]=ke);let Ae;return t[76]!==De||t[77]!==ke?(Ae=(0,$.jsxs)(`div`,{className:`relative`,children:[De,ke]}),t[76]=De,t[77]=ke,t[78]=Ae):Ae=t[78],Ae}function ht(e){let t=(0,Q.c)(10),{threadRef:n,server:r,onOpen:i}=e,a;t[0]===r?a=t[1]:(a=gt(r),t[0]=r,t[1]=a);let o=a,s;t[2]!==r.requestedUrl||t[3]!==n?(s=(0,$.jsx)(q,{threadRef:n,url:r.requestedUrl}),t[2]=r.requestedUrl,t[3]=n,t[4]=s):s=t[4];let c=`${r.host}:${r.port}`,l;return t[5]!==i||t[6]!==o||t[7]!==s||t[8]!==c?(l=(0,$.jsx)(be,{onClick:i,icon:s,title:o,description:c}),t[5]=i,t[6]=o,t[7]=s,t[8]=c,t[9]=l):l=t[9],l}function gt(e){return e.processName?e.processName:`Listening`}function _t(e){let t=(0,Q.c)(26),{threadRef:n,entry:r,onOpen:i,onRemove:a}=e,o;t[0]===r.url?o=t[1]:(o=new URL(r.url),t[0]=r.url,t[1]=o);let s=o,c=s.pathname===`/`?``:s.pathname,l=`${s.host}${c}${s.search}${s.hash}`,u;t[2]===r.lastVisitedAt?u=t[3]:(u=je(r.lastVisitedAt)?fe(new Date(r.lastVisitedAt).toISOString()):``,t[2]=r.lastVisitedAt,t[3]=u);let d=u;Be();let f;t[4]!==r.url||t[5]!==n?(f=(0,$.jsx)(q,{threadRef:n,url:r.url}),t[4]=r.url,t[5]=n,t[6]=f):f=t[6];let p=r.title??l,m;t[7]===p?m=t[8]:(m=(0,$.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:p}),t[7]=p,t[8]=m);let h=r.title?`${l} · `:``,g;t[9]!==h||t[10]!==d?(g=(0,$.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[h,d]}),t[9]=h,t[10]=d,t[11]=g):g=t[11];let _;t[12]!==m||t[13]!==g?(_=(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[m,g]}),t[12]=m,t[13]=g,t[14]=_):_=t[14];let v;t[15]!==i||t[16]!==f||t[17]!==_?(v=(0,$.jsxs)(`button`,{type:`button`,onClick:i,className:`flex w-full items-center gap-3 px-3 py-3 pr-10 text-left hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,children:[f,_]}),t[15]=i,t[16]=f,t[17]=_,t[18]=v):v=t[18];let y=`Remove ${l} from history`,b;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(L,{className:`size-3.5`}),t[19]=b):b=t[19];let x;t[20]!==a||t[21]!==y?(x=(0,$.jsx)(`button`,{type:`button`,"aria-label":y,onClick:a,className:`absolute right-3 rounded p-1 text-muted-foreground opacity-0 hover:bg-accent hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring group-hover:opacity-100`,children:b}),t[20]=a,t[21]=y,t[22]=x):x=t[22];let S;return t[23]!==x||t[24]!==v?(S=(0,$.jsxs)(`div`,{className:`group relative flex w-full items-center`,children:[v,x]}),t[23]=x,t[24]=v,t[25]=S):S=t[25],S}function vt(e){let t=(0,Q.c)(7),n=Je(e.environmentId,e.configuredUrls),r;if(t[0]!==e.configuredUrls||t[1]!==e.environmentId||t[2]!==n.configuredUrlProbing||t[3]!==n.servers){let i;t[5]===e.environmentId?i=t[6]:(i=t=>({...t,url:ke(e.environmentId,t.url),requestedUrl:t.url}),t[5]=e.environmentId,t[6]=i),r=yt({scanner:n.servers.map(i),configuredUrls:e.configuredUrls??[],configuredUrlProbing:n.configuredUrlProbing}),t[0]=e.configuredUrls,t[1]=e.environmentId,t[2]=n.configuredUrlProbing,t[3]=n.servers,t[4]=r}else r=t[4];return r}function yt(e){let t=new Map;for(let n of e.configuredUrls){let e=xt(n);if(!e)continue;let r=bt(e.host,e.port);t.has(r)||t.set(r,e)}let n=[];for(let r of e.scanner){let i=bt(r.host,r.port),a=t.get(i);n.push({...r,requestedUrl:a&&e.configuredUrlProbing===!1?a.url:r.requestedUrl,source:a?`configured`:`scanner`})}return n.toSorted((e,t)=>{let n={configured:0,scanner:1};return n[e.source]===n[t.source]?e.port-t.port:n[e.source]-n[t.source]})}function bt(e,t){let n=e.toLowerCase();return`${ze(n)?`loopback`:n}:${t}`}function xt(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`||!ze(t.hostname))return null;let n=t.port?Number.parseInt(t.port,10):t.protocol===`http:`?80:443;return!Number.isFinite(n)||n<=0?null:{host:t.hostname,port:n,url:t.href}}catch{return null}}function St(e){let t=(0,Q.c)(24),{threadRef:n,environmentId:r,configuredUrls:i,recentEntries:a,onRemoveRecent:o,onOpenUrl:s}=e,l;t[0]!==i||t[1]!==r?(l={environmentId:r,configuredUrls:i},t[0]=i,t[1]=r,t[2]=l):l=t[2];let u=vt(l),d,f,p,h;if(t[3]!==s||t[4]!==o||t[5]!==a||t[6]!==u.length||t[7]!==n){h=Symbol.for(`react.early_return_sentinel`);bb0:{let e=a.filter(Ct).slice(0,8);if(u.length===0&&e.length===0){let e;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsxs)(ye,{children:[(0,$.jsx)(ge,{variant:`icon`,children:(0,$.jsx)(c,{className:`size-4.5 text-muted-foreground`})}),(0,$.jsx)(_e,{children:`No preview yet`}),(0,$.jsx)(ve,{children:`Type a URL above, or run a dev script. Browser-ready localhost servers will show up here automatically.`})]}),t[12]=e):e=t[12],h=e;break bb0}p=`scrollbar-gutter-both flex h-full min-h-0 overflow-y-auto px-5 py-8`,d=`mx-auto flex w-full max-w-xl flex-col gap-6`,f=e.length>0?(0,$.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,$.jsx)(m,{className:`size-4 shrink-0`}),(0,$.jsx)(`h2`,{className:`font-medium`,children:`Recently used`})]}),(0,$.jsx)(xe,{children:e.map(e=>(0,$.jsx)(_t,{threadRef:n,entry:e,onOpen:()=>s(e.url),onRemove:()=>o(e.url)},e.url))})]}):null}t[3]=s,t[4]=o,t[5]=a,t[6]=u.length,t[7]=n,t[8]=d,t[9]=f,t[10]=p,t[11]=h}else d=t[8],f=t[9],p=t[10],h=t[11];if(h!==Symbol.for(`react.early_return_sentinel`))return h;let g;t[13]!==s||t[14]!==u||t[15]!==n?(g=u.length>0?(0,$.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,$.jsx)(b,{className:`size-4 shrink-0`}),(0,$.jsx)(`h2`,{className:`font-medium`,children:`Local servers`})]}),(0,$.jsx)(xe,{children:u.map(e=>(0,$.jsx)(ht,{threadRef:n,server:e,onOpen:()=>s(e.requestedUrl)},`${e.host}:${e.port}`))}),(0,$.jsx)(`p`,{className:`px-1 text-xs text-muted-foreground`,children:`Select a live local server to open it in this browser tab.`})]}):null,t[13]=s,t[14]=u,t[15]=n,t[16]=g):g=t[16];let _;t[17]!==d||t[18]!==f||t[19]!==g?(_=(0,$.jsxs)(`div`,{className:d,children:[f,g]}),t[17]=d,t[18]=f,t[19]=g,t[20]=_):_=t[20];let v;return t[21]!==p||t[22]!==_?(v=(0,$.jsx)(`div`,{className:p,children:_}),t[21]=p,t[22]=_,t[23]=v):v=t[23],v}function Ct(e){return URL.canParse(e.url)}var wt=[{value:`system`,label:`System`},{value:`light`,label:`Light`},{value:`dark`,label:`Dark`}],Tt=()=>{let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(he,{children:[(0,$.jsx)(pe,{render:(0,$.jsx)(C,{render:(0,$.jsx)(T,{variant:`glass`,size:`icon`,type:`button`,"aria-label":`Preview menu`})}),children:(0,$.jsx)(d,{})}),(0,$.jsx)(me,{children:`More`})]}),e[0]=t):t=e[0],t};function Et(e){let t=(0,Q.c)(69),{enabled:n,actions:r,zoomFactor:a,colorScheme:o,deviceToolbarVisible:s,onToggleDeviceToolbar:c,profileName:l,move:u}=e,d;t[0]===a?d=t[1]:(d=Math.round(a*100),t[0]=a,t[1]=d);let f=`${d}%`,m=!n,g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(Tt,{}),t[2]=g):g=t[2];let _;t[3]!==r.hardReload||t[4]!==m?(_=(0,$.jsx)(w,{onClick:r.hardReload,disabled:m,children:`Hard reload`}),t[3]=r.hardReload,t[4]=m,t[5]=_):_=t[5];let v;t[6]!==r.openDevTools||t[7]!==m?(v=r.openDevTools?(0,$.jsx)(w,{onClick:r.openDevTools,disabled:m,children:`Open DevTools`}):null,t[6]=r.openDevTools,t[7]=m,t[8]=v):v=t[8];let y;t[9]===u?y=t[10]:(y=u?(0,$.jsx)(w,{onClick:u.onMove,children:u.label}):null,t[9]=u,t[10]=y);let b=s?`Hide device toolbar`:`Show device toolbar`,C;t[11]!==m||t[12]!==c||t[13]!==b?(C=(0,$.jsx)(w,{onClick:c,disabled:m,children:b}),t[11]=m,t[12]=c,t[13]=b,t[14]=C):C=t[14];let E;t[15]===m?E=t[16]:(E=(0,$.jsx)(re,{disabled:m,children:`Appearance`}),t[15]=m,t[16]=E);let D;t[17]===r?D=t[18]:(D=e=>r.setColorScheme(e),t[17]=r,t[18]=D);let k;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(k=wt.map(Ot),t[19]=k):k=t[19];let j;t[20]!==o||t[21]!==D?(j=(0,$.jsx)(A,{children:(0,$.jsx)(te,{value:o,onValueChange:D,children:k})}),t[20]=o,t[21]=D,t[22]=j):j=t[22];let F;t[23]!==j||t[24]!==E?(F=(0,$.jsxs)(x,{children:[E,j]}),t[23]=j,t[24]=E,t[25]=F):F=t[25];let I;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,$.jsx)(P,{}),t[26]=I):I=t[26];let ee;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,$.jsx)(`span`,{children:`Zoom`}),t[27]=ee):ee=t[27];let ne;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,$.jsx)(O,{}),t[28]=ne):ne=t[28];let L;t[29]!==r.zoomOut||t[30]!==m?(L=(0,$.jsx)(T,{variant:`outline`,size:`icon-xs`,type:`button`,onClick:r.zoomOut,"aria-label":`Zoom out`,disabled:m,children:ne}),t[29]=r.zoomOut,t[30]=m,t[31]=L):L=t[31];let R;t[32]===f?R=t[33]:(R=(0,$.jsx)(`span`,{className:`min-w-12 text-center text-xs tabular-nums text-muted-foreground`,children:f}),t[32]=f,t[33]=R);let ie;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,$.jsx)(M,{}),t[34]=ie):ie=t[34];let z;t[35]!==r.zoomIn||t[36]!==m?(z=(0,$.jsx)(T,{variant:`outline`,size:`icon-xs`,type:`button`,onClick:r.zoomIn,"aria-label":`Zoom in`,disabled:m,children:ie}),t[35]=r.zoomIn,t[36]=m,t[37]=z):z=t[37];let ae;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,$.jsx)(S,{}),t[38]=ae):ae=t[38];let B;t[39]!==r.resetZoom||t[40]!==m?(B=(0,$.jsx)(T,{variant:`ghost`,size:`icon-xs`,type:`button`,onClick:r.resetZoom,"aria-label":`Reset zoom`,disabled:m,children:ae}),t[39]=r.resetZoom,t[40]=m,t[41]=B):B=t[41];let V;t[42]!==L||t[43]!==R||t[44]!==z||t[45]!==B?(V=(0,$.jsxs)(`span`,{className:`flex items-center gap-1`,children:[L,R,z,B]}),t[42]=L,t[43]=R,t[44]=z,t[45]=B,t[46]=V):V=t[46];let oe;t[47]!==m||t[48]!==V?(oe=(0,$.jsxs)(w,{closeOnClick:!1,onClick:Dt,className:`justify-between`,disabled:m,children:[ee,V]}),t[47]=m,t[48]=V,t[49]=oe):oe=t[49];let se;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,$.jsx)(P,{}),t[50]=se):se=t[50];let H;t[51]===l?H=t[52]:(H=l?(0,$.jsx)(i,{className:`max-w-64`,children:(0,$.jsxs)(`span`,{className:`block truncate`,children:[`Profile: `,l]})}):null,t[51]=l,t[52]=H);let U;t[53]===r.clearCookies?U=t[54]:(U=(0,$.jsx)(w,{onClick:r.clearCookies,children:`Clear cookies`}),t[53]=r.clearCookies,t[54]=U);let ce;t[55]===r.clearCache?ce=t[56]:(ce=(0,$.jsx)(w,{onClick:r.clearCache,children:`Clear cache`}),t[55]=r.clearCache,t[56]=ce);let W;t[57]!==H||t[58]!==U||t[59]!==ce?(W=(0,$.jsxs)(p,{children:[H,U,ce]}),t[57]=H,t[58]=U,t[59]=ce,t[60]=W):W=t[60];let G;return t[61]!==F||t[62]!==oe||t[63]!==W||t[64]!==_||t[65]!==v||t[66]!==y||t[67]!==C?(G=(0,$.jsxs)(h,{children:[g,(0,$.jsxs)(N,{align:`end`,sideOffset:6,children:[_,v,y,C,F,I,oe,se,W]})]}),t[61]=F,t[62]=oe,t[63]=W,t[64]=_,t[65]=v,t[66]=y,t[67]=C,t[68]=G):G=t[68],G}function Dt(e){return e.preventDefault()}function Ot(e){return(0,$.jsx)(D,{value:e.value,children:e.label},e.value)}function kt(e){return a[e]||(e.length>0?e:`Network error`)}function At(e){let t=(0,Q.c)(21),{url:n,fileName:r,downloadUrl:i,onOpen:a}=e,o;t[0]===n?o=t[1]:(o=Pt(n)??n,t[0]=n,t[1]=o);let s=o,c,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(Nt,{className:`mb-6 size-12 text-muted-foreground/70`}),l=(0,$.jsx)(`h1`,{className:`mb-3 text-2xl font-semibold leading-tight text-foreground`,children:`This file can’t be shown here`}),t[2]=c,t[3]=l):(c=t[2],l=t[3]);let u;t[4]===r?u=t[5]:(u=(0,$.jsx)(`span`,{className:`font-semibold text-foreground`,children:r}),t[4]=r,t[5]=u);let d;t[6]!==s||t[7]!==u?(d=(0,$.jsxs)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:[u,` from `,s,` was downloaded instead.`]}),t[6]=s,t[7]=u,t[8]=d):d=t[8];let f;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(`div`,{className:`flex-1`}),t[9]=f):f=t[9];let p;t[10]===a?p=t[11]:(p=(0,$.jsx)(T,{type:`button`,variant:`outline`,size:`sm`,onClick:a,children:`Open in browser`}),t[10]=a,t[11]=p);let m;t[12]!==i||t[13]!==r?(m=i?(0,$.jsx)(T,{type:`button`,size:`sm`,render:(0,$.jsx)(`a`,{href:i,download:r}),children:`Download`}):null,t[12]=i,t[13]=r,t[14]=m):m=t[14];let h;t[15]!==p||t[16]!==m?(h=(0,$.jsxs)(`div`,{className:`mt-auto flex items-center gap-2 pt-8`,children:[f,p,m]}),t[15]=p,t[16]=m,t[17]=h):h=t[17];let g;return t[18]!==d||t[19]!==h?(g=(0,$.jsx)(`div`,{className:`scrollbar-gutter-both relative flex h-full min-h-0 w-full overflow-y-auto bg-background`,children:(0,$.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-1 flex-col px-8 py-12 sm:py-16`,children:[c,l,d,h]})}),t[18]=d,t[19]=h,t[20]=g):g=t[20],g}function jt(e){let t=(0,Q.c)(44),{url:n,code:r,description:i,onReload:a,move:o}=e,[s,c]=(0,Z.useState)(!1),l;t[0]===n?l=t[1]:(l=Pt(n)??n,t[0]=n,t[1]=l);let u=l,d;t[2]===i?d=t[3]:(d=kt(i),t[2]=i,t[3]=d);let f=d,p;t[4]!==r||t[5]!==i?(p=i.length>0?i:`ERR_${Math.abs(r)||`FAILED`}`,t[4]=r,t[5]=i,t[6]=p):p=t[6];let m=p,h,g;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(Nt,{className:`mb-6 size-12 text-muted-foreground/70`}),g=(0,$.jsx)(`h1`,{className:`mb-3 text-2xl font-semibold leading-tight text-foreground`,children:`This site can’t be reached`}),t[7]=h,t[8]=g):(h=t[7],g=t[8]);let _;t[9]===u?_=t[10]:(_=(0,$.jsx)(`span`,{className:`font-semibold text-foreground`,children:u}),t[9]=u,t[10]=_);let v;t[11]!==f||t[12]!==_?(v=(0,$.jsxs)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:[_,`: `,f,`.`]}),t[11]=f,t[12]=_,t[13]=v):v=t[13];let y;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsx)(`p`,{className:`mb-2 font-medium text-foreground`,children:`Try:`}),t[14]=y):y=t[14];let b,x;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(`li`,{children:`Checking your connection`}),b=(0,$.jsx)(`li`,{children:`Confirming the dev server is running`}),t[15]=b,t[16]=x):(b=t[15],x=t[16]);let S;t[17]===o?S=t[18]:(S=o?(0,$.jsx)(`li`,{children:`Opening it in the environment’s browser, which reaches its network`}):null,t[17]=o,t[18]=S);let C;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(`li`,{children:`Checking the proxy and the firewall`}),t[19]=C):C=t[19];let w;t[20]===S?w=t[21]:(w=(0,$.jsx)(Qe,{children:(0,$.jsxs)(`div`,{className:`mt-6 rounded-lg border border-border bg-muted/40 p-4 text-sm`,children:[y,(0,$.jsxs)(`ul`,{className:`list-disc space-y-1 pl-5 text-muted-foreground`,children:[x,b,S,C]})]})}),t[20]=S,t[21]=w);let E;t[22]!==s||t[23]!==w?(E=(0,$.jsx)($e,{open:s,children:w}),t[22]=s,t[23]=w,t[24]=E):E=t[24];let D;t[25]===m?D=t[26]:(D=(0,$.jsx)(`div`,{className:`mt-8 text-xs uppercase tracking-wide text-muted-foreground/70`,children:m}),t[25]=m,t[26]=D);let O;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>c(Mt),t[27]=O):O=t[27];let k=s?`Hide details`:`Details`,A;t[28]===k?A=t[29]:(A=(0,$.jsx)(T,{type:`button`,variant:`outline`,size:`sm`,onClick:O,children:k}),t[28]=k,t[29]=A);let j;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(`div`,{className:`flex-1`}),t[30]=j):j=t[30];let M;t[31]===o?M=t[32]:(M=o?(0,$.jsx)(T,{type:`button`,variant:`outline`,size:`sm`,onClick:o.onMove,children:o.label}):null,t[31]=o,t[32]=M);let N;t[33]===a?N=t[34]:(N=(0,$.jsx)(T,{type:`button`,size:`sm`,onClick:a,children:`Reload`}),t[33]=a,t[34]=N);let P;t[35]!==A||t[36]!==M||t[37]!==N?(P=(0,$.jsxs)(`div`,{className:`mt-auto flex items-center gap-2 pt-8`,children:[A,j,M,N]}),t[35]=A,t[36]=M,t[37]=N,t[38]=P):P=t[38];let F;return t[39]!==E||t[40]!==D||t[41]!==P||t[42]!==v?(F=(0,$.jsx)(`div`,{className:`scrollbar-gutter-both relative flex h-full min-h-0 w-full overflow-y-auto bg-background`,children:(0,$.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-1 flex-col px-8 py-12 sm:py-16`,children:[h,g,v,E,D,P]})}),t[39]=E,t[40]=D,t[41]=P,t[42]=v,t[43]=F):F=t[43],F}function Mt(e){return!e}function Nt(e){let t=(0,Q.c)(5),{className:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(`path`,{d:`M16 12 L48 12 L48 52 L16 52 Z`}),i=(0,$.jsx)(`path`,{d:`M22 22 L42 22 M22 30 L36 30 M22 38 L40 38`,strokeLinecap:`round`}),a=(0,$.jsx)(`path`,{d:`M52 8 L12 56`,strokeLinecap:`round`}),t[0]=r,t[1]=i,t[2]=a):(r=t[0],i=t[1],a=t[2]);let o;return t[3]===n?o=t[4]:(o=(0,$.jsxs)(`svg`,{viewBox:`0 0 64 64`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,className:n,children:[r,i,a]}),t[3]=n,t[4]=o),o}function Pt(e){try{return new URL(e).host}catch{return null}}var Ft=1500,It=.001;function Lt(e){let t=(0,Q.c)(11),{zoomFactor:n}=e,[r,i]=(0,Z.useState)(!1),a=(0,Z.useRef)(n),o=(0,Z.useRef)(null),s,c;t[0]===n?(s=t[1],c=t[2]):(s=()=>{if(!(Math.abs(a.current-n)<It))return a.current=n,i(!0),o.current!==null&&window.clearTimeout(o.current),o.current=window.setTimeout(()=>{i(!1),o.current=null},Ft),()=>{o.current!==null&&(window.clearTimeout(o.current),o.current=null)}},c=[n],t[0]=n,t[1]=s,t[2]=c),(0,Z.useEffect)(s,c);let l;t[3]===n?l=t[4]:(l=Math.round(n*100),t[3]=n,t[4]=l);let u=`${l}%`,d=!r,f=r?`opacity-100 translate-y-0`:`opacity-0 -translate-y-1`,p;t[5]===f?p=t[6]:(p=ne(`pointer-events-none absolute top-3 right-3 z-20 select-none rounded-full border border-border/70 bg-popover/95 px-2.5 py-1 text-xs font-medium text-foreground shadow-md/10 backdrop-blur transition-all duration-200 ease-out`,f),t[5]=f,t[6]=p);let m;return t[7]!==u||t[8]!==d||t[9]!==p?(m=(0,$.jsx)(`div`,{"aria-hidden":d,className:p,children:u}),t[7]=u,t[8]=d,t[9]=p,t[10]=m):m=t[10],m}function Rt(e,t){return e.find(e=>e.id===t)?.name??`Removed profile`}var zt=typeof window>`u`?null:H();function Bt(e){let t=(0,Q.c)(12),n=ut(e.threadRef.environmentId),r;t[0]!==n||t[1]!==e.download.id||t[2]!==e.tabId||t[3]!==e.threadRef.threadId?(r=n?rt({access:n,threadId:e.threadRef.threadId,tabId:e.tabId},e.download.id):null,t[0]=n,t[1]=e.download.id,t[2]=e.tabId,t[3]=e.threadRef.threadId,t[4]=r):r=t[4];let i;t[5]===e.url?i=t[6]:(i=()=>void zt?.shell.openExternal(e.url).catch(Vt),t[5]=e.url,t[6]=i);let a;return t[7]!==e.download.fileName||t[8]!==e.url||t[9]!==r||t[10]!==i?(a=(0,$.jsx)(At,{url:e.url,fileName:e.download.fileName,downloadUrl:r,onOpen:i}),t[7]=e.download.fileName,t[8]=e.url,t[9]=r,t[10]=i,t[11]=a):a=t[11],a}function Vt(){}function Ht({threadRef:e,tabId:t,configuredUrls:n,visible:r,onSendAnnotation:i}){let[a,s]=(0,Z.useState)(void 0),[c,d]=(0,Z.useState)(!1),f=W(e.environmentId,`orchestration:operate`)&&!!i,p=Xe(),m=(0,Z.useRef)(null),h=(0,Z.useRef)(!0),y=(0,Z.useRef)(e);y.current=e;let b=v(e),x=we(e,50),S=o(e=>e.addPreviewAnnotation),C=o(e=>e.addImage),w=se(e.environmentId),D=w?new URL(w).hostname:null,O=le(Fe.open),k=le(Fe.close,`preview close`),A=ce(e.environmentId)?.label??`the environment`,j=oe(),M=ae(e.environmentId),N=le(Fe.resize,`preview viewport resize`),P=le(Fe.adjust,`preview appearance or zoom`);ot(e),(0,Z.useEffect)(()=>(h.current=!0,()=>{h.current=!1}),[]);let F=t??b.activeTabId,I=F?We(e,b.serverEpoch,F):null,te=F&&I?p.has(I)?I:Ue(e,F):null,L=F?b.sessions[F]??null:null,re=Ce(e.environmentId,L),H=L?.runtime===`server`&&!re,K=L?.runtime===`server`,q=(0,Z.useRef)(null),[fe,ge]=(0,Z.useState)(!1),_e=(0,Z.useRef)(null),[ve,ye]=(0,Z.useState)(0),be=L?.runtime===`server`&&(L.viewport??R)._tag!==`fill`;(0,Z.useEffect)(()=>{let e=_e.current;if(e&&be)return Se(e,([e])=>ye(Math.max(1,Math.round(e?.contentRect.width??0))))},[be]);let[xe,je]=(0,Z.useState)(null),Ne=H&&xe!==I,[ze,Be]=(0,Z.useState)(null),J=F&&!H?b.desktopByTabId[F]??null:null,X=L?.navStatus??{_tag:`Idle`},Je=X._tag===`Idle`?``:X.url,Qe=J?.loading??X._tag===`Loading`,$e=J?.canGoBack??L?.canGoBack??!1,rt=J?.canGoForward??L?.canGoForward??!1,ut=X._tag===`Idle`,Q=X._tag===`LoadFailed`,dt=st(L),pt=H&&!dt&&!Q&&ze!==I,ht=J?.controller??`none`,gt=L?.viewport??R,_t=Ee(),vt=L?.profileId??`default`,yt=Rt(_t.profiles,vt),bt=qe(e=>I?e.byTabId[I]?.rect??null:null),xt=X._tag===`Success`?X.url:null,Ct=X._tag===`Success`?X.title:null,wt=x[0]?.url,Tt=E(e);(0,Z.useEffect)(()=>{xt&&Ct&&wt&&De(y.current,xt,Ct,D)},[D,wt,Ct,xt,Tt]);let Dt=(0,Z.useCallback)(async t=>{if(H&&q.current)return!Ne&&(q.current.navigate(t),u(e,t),!0);if(I&&Y)return await Y.navigate(I,t),u(e,t),!0;let n=await Ye({openPreview:O,threadRef:e,url:t});if(n._tag===`Failure`&&!ie(n)){let e=z(n);e instanceof Pe&&V.add({type:`error`,title:`Unable to open browser`,description:e.message})}return n._tag===`Success`},[H,O,I,Ne,e]),Ot=(0,Z.useCallback)(async t=>{try{let n=Le(t,Ie(U()));await Dt(n)&&Oe(e,n)}catch{}},[Dt,e]),kt=(0,Z.useCallback)(async t=>{try{let n=H||!Y?Re(t):ke(e.environmentId,t);await Dt(n)&&Oe(e,t)}catch{}},[H,Dt,e]),At=(0,Z.useCallback)(()=>{H?q.current?.reload():Y&&I&&Y.refresh(I)},[H,I]),Mt=(0,Z.useCallback)(async t=>{if(!F)return;let n=await P({environmentId:e.environmentId,input:{threadId:e.threadId,tabId:F,...t}});if(n._tag===`Failure`){let e=z(n);V.add({type:`error`,title:`Unable to change the browser tab`,description:e instanceof Error?e.message:`An error occurred.`})}else ee(e,n.value)},[P,F,e]),Nt=L?.zoomFactor??1,Pt=(0,Z.useCallback)(e=>{let t=l.indexOf(Nt),n=e===0?1:l[Math.min(Math.max((t<0?7:t)+e,0),l.length-1)];n!==Nt&&Mt({zoomFactor:n})},[Mt,Nt]),Ft=(0,Z.useCallback)(()=>{K?Pt(1):Y&&I&&Y.zoomIn(I)},[I,K,Pt]),It=(0,Z.useCallback)(()=>{K?Pt(-1):Y&&I&&Y.zoomOut(I)},[I,K,Pt]),Vt=(0,Z.useCallback)(()=>{K?Pt(0):Y&&I&&Y.resetZoom(I)},[I,K,Pt]),Ht=(0,Z.useCallback)(async t=>{if(!F)return;let n=await N({environmentId:e.environmentId,input:{threadId:e.threadId,tabId:F,viewport:t}});if(n._tag===`Failure`){let e=z(n);throw V.add({type:`error`,title:`Unable to resize browser viewport`,description:e instanceof Error?e.message:`An error occurred.`}),e}ee(e,n.value)},[N,F,e]),Ut=()=>{I&&(gt._tag===`fill`?et(I,Me({defaults:_t,panelRect:bt,zoomFactor:K?Nt:J?.zoomFactor})).catch(()=>void 0):et(I,R).catch(()=>void 0))};(0,Z.useEffect)(()=>{if(I)return He(I,Ht)},[Ht,I]);let Wt=(0,Z.useCallback)(()=>{H?q.current?.history(-1):Y&&I&&Y.goBack(I)},[H,I]),Gt=(0,Z.useCallback)(()=>{H?q.current?.history(1):Y&&I&&Y.goForward(I)},[H,I]),Kt=(0,Z.useCallback)(()=>{zt&&Je&&zt.shell.openExternal(Je).catch(()=>void 0)},[Je]),qt=Te(e.environmentId,j,M,L),Jt=qt===`server`?`Open in ${A}'s browser`:`Open on this computer`,Yt=(0,Z.useCallback)(async()=>{if(!qt||!F||!L)return;let t=await Ye({openPreview:O,threadRef:e,...Je?{url:qt===`desktop`?ke(e.environmentId,Je):Je}:{},viewport:gt,...L.profileId===void 0?{}:{profileId:L.profileId},runtime:qt});if(t._tag===`Failure`){if(ie(t))return;let e=z(t);V.add({type:`error`,title:`Unable to move the browser tab`,description:e instanceof Error?e.message:`An error occurred.`})}else ue.getState().openBrowser(e,t.value.tabId),await nt({closePreview:k,snapshot:L,tabId:F,threadRef:e})},[k,qt,O,L,F,e,Je,gt]),Xt=e=>()=>{e&&I&&e(I).catch(()=>void 0)},Zt=K?{hardReload:()=>void Mt({hardReload:!0}),setColorScheme:e=>void Mt({colorScheme:e}),zoomIn:Ft,zoomOut:It,resetZoom:Vt,clearCookies:()=>void Mt({clear:`cookies`}),clearCache:()=>void Mt({clear:`cache`}),...re&&Y?{openDevTools:Xt(Y.openDevTools)}:{}}:Y?{hardReload:Xt(Y.hardReload),setColorScheme:e=>{I&&Y?.setColorScheme(I,e).catch(()=>void 0)},zoomIn:Ft,zoomOut:It,resetZoom:Vt,clearCookies:()=>void Y?.clearCookies(e.environmentId,vt).catch(()=>void 0),clearCache:()=>void Y?.clearCache(e.environmentId,vt).catch(()=>void 0),openDevTools:Xt(Y.openDevTools)}:null,Qt=(0,Z.useCallback)(()=>{Y&&I&&(J?.pictureInPicture?Y.pictureInPicture.close:Y.pictureInPicture.open)(I).catch(e=>{V.add({type:`error`,title:`Unable to update popped-out preview`,description:e instanceof Error?e.message:`An error occurred.`})})},[J?.pictureInPicture,I]),$t=(0,Z.useCallback)(t=>{if(!Y||!I||!F)return;let n=Y;te?Ve(te).then(e=>{if(!e)return;let t=!1,r,i=()=>{navigator.clipboard?.writeText?navigator.clipboard.writeText(e.path).then(()=>{t=!0,o(),window.setTimeout(()=>{t=!1,o()},2e3)},e=>{V.update(r,de({type:`error`,title:`Unable to copy recording path`,description:e instanceof Error?e.message:`An error occurred.`,actionProps:a}))}):V.update(r,de({type:`error`,title:`Unable to copy recording path`,description:`Clipboard API unavailable.`,actionProps:a}))},a={children:B(navigator.platform),onClick:()=>void n.revealArtifact(e.path)},o=()=>{V.update(r,de({type:`success`,title:`Recording saved`,actionProps:a,data:{secondaryActionProps:{children:t?`Copied!`:`Copy path`,disabled:t,onClick:i}}}))};r=V.add(de({type:`success`,title:`Recording saved`,actionProps:a,data:{secondaryActionProps:{children:`Copy path`,onClick:i}}}))},e=>{V.add({type:`error`,title:`Unable to stop recording`,description:e instanceof Error?e.message:`An error occurred.`})}):t?Ze(I,e,F).catch(e=>{let t=e instanceof Error?e.message:`An error occurred.`;Ke(e)||V.add({type:`error`,title:`Unable to start recording`,description:t})}):n.captureScreenshot(I).then(e=>{let t={children:B(navigator.platform),onClick:()=>void n.revealArtifact(e.path)},r=!1,i=!1,a,o=(e=`success`,n=`Screenshot saved`,o)=>{V.update(a,de({type:e,title:n,description:o,actionProps:{children:i?`Copied!`:`Copy image`,disabled:i,onClick:c},data:{additionalActions:[{id:`copy-path`,props:{children:r?`Copied!`:`Copy path`,disabled:r,onClick:s}}],secondaryActionProps:{...t}}}))},s=()=>{navigator.clipboard?.writeText?navigator.clipboard.writeText(e.path).then(()=>{r=!0,o(),window.setTimeout(()=>{r=!1,o()},2e3)},e=>{o(`error`,`Unable to copy screenshot path`,e instanceof Error?e.message:`An error occurred.`)}):o(`error`,`Unable to copy screenshot path`,`Clipboard API unavailable.`)},c=()=>{n.copyArtifactToClipboard(e.path).then(()=>{i=!0,o(),window.setTimeout(()=>{i=!1,o()},2e3)},e=>{o(`error`,`Unable to copy screenshot`,e instanceof Error?e.message:`An error occurred.`)})};a=V.add(de({type:`success`,title:`Screenshot saved`,actionProps:{children:`Copy image`,onClick:c},data:{additionalActions:[{id:`copy-path`,props:{children:`Copy path`,onClick:s}}],secondaryActionProps:{...t}}}))},e=>{V.add({type:`error`,title:`Unable to capture screenshot`,description:e instanceof Error?e.message:`An error occurred.`})})},[te,I,F,e]),en=(0,Z.useCallback)(()=>{if(!Y||!I)return;if(m.current){m.current.cancelled=!0,Y.cancelPickElement(I).catch(()=>void 0);return}let t=typeof document<`u`?document.activeElement:null,n={cancelled:!1},r=!1;m.current=n,d(!0),(async()=>{try{if(await Y.setAnnotationSendEnabled?.(I,!!i&&G(e.environmentId,`orchestration:operate`)),n.cancelled)return;let t=await Y.pickElement(I);if(!t||n.cancelled)return;m.current===n&&(m.current=null,h.current&&d(!1),r=!0);let{annotation:a,submission:o,screenshotFailed:s=!1}=t,c=ft(a),l=s||c.status===`failed`,u=c.status===`failed`?{...a,screenshot:null}:a;S(e,u),l&&V.add(de({type:`error`,title:`Could not capture the picked element`,description:`The annotation was kept without the screenshot.`}));let f=c.status===`captured`?c.file:null,p=f&&u.screenshot?{type:`image`,id:u.id,name:f.name,mimeType:f.type,sizeBytes:f.size,previewUrl:u.screenshot.dataUrl,file:f}:null;p&&C(e,p),o===`send`&&G(e.environmentId,`orchestration:operate`)&&i?.(u,p)}catch{}finally{let e=m.current===n;if(e&&(m.current=null,h.current&&d(!1)),(e||r)&&t&&t.isConnected&&typeof t.focus==`function`)try{t.focus({preventScroll:!0})}catch{}}})()},[C,S,i,I,e]);return(0,Z.useEffect)(()=>{c&&Y&&I&&Y.setAnnotationSendEnabled?.(I,f).catch(()=>void 0)},[f,c,I]),(0,Z.useEffect)(()=>()=>{m.current&&(m.current.cancelled=!0,m.current=null,Y&&I&&Y.cancelPickElement(I).catch(()=>void 0),h.current&&d(!1))},[I]),(0,Z.useEffect)(()=>{if(r)return at(e=>{switch(e){case`refresh`:At();return;case`focus-url`:s(e=>(e??0)+1);return;case`zoom-in`:Ft();return;case`zoom-out`:It();return;case`reset-zoom`:Vt();return;case`toggle-panel`:return}})},[At,Vt,Ft,It,r]),(0,$.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col bg-background`,"data-thread-key":E(e),children:[(0,$.jsx)(mt,{url:Je,loading:Qe||pt,canGoBack:$e&&!Ne,canGoForward:rt&&!Ne,refreshDisabled:ut||Ne,inputDisabled:Ne,focusUrlNonce:a,onBack:Wt,onForward:Gt,onRefresh:At,onSubmit:e=>void Ot(e),onOpenInBrowser:F?Kt:void 0,onCapture:Y&&F&&!H?$t:void 0,captureDisabled:!J||Q||J.pictureInPicture,recording:te!==null,onSeparateWindow:Y&&F&&(!K||re)?Qt:void 0,separateWindow:J?.pictureInPicture??!1,separateWindowDisabled:I===null||!K&&!(J?.hasWebContents??!1),onPickElement:Y&&F&&!H?en:void 0,pickActive:c,pickDisabled:!F||Q,pickDisabledReason:Q?`Page didn't load — pick unavailable until the page renders`:void 0,leadingActions:vt===_t.profileId?null:(0,$.jsxs)(he,{children:[vt===`incognito`?(0,$.jsx)(pe,{render:(0,$.jsx)(`span`,{role:`img`,"aria-label":yt,className:`flex shrink-0 text-muted-foreground`}),children:(0,$.jsx)(g,{className:`size-4`})}):(0,$.jsx)(pe,{render:(0,$.jsx)(_,{variant:`outline`,className:`max-w-28 shrink-0`}),children:(0,$.jsx)(`span`,{className:`truncate`,children:yt})}),(0,$.jsx)(me,{side:`top`,children:yt})]}),trailingActions:Zt?(0,$.jsx)(Et,{enabled:I!==null&&(K||(J?.hasWebContents??!1)),actions:Zt,...qt?{move:{label:Jt,onMove:()=>void Yt()}}:{},profileName:yt,zoomFactor:K?Nt:J?.zoomFactor??1,colorScheme:K?L?.colorScheme??`system`:J?.colorScheme??`system`,deviceToolbarVisible:gt._tag!==`fill`,onToggleDeviceToolbar:Ut}):null}),(0,$.jsxs)(`div`,{ref:_e,className:`relative min-h-0 flex-1 overflow-hidden`,children:[I&&L&&H?(0,$.jsxs)($.Fragment,{children:[gt._tag!==`fill`&&!dt&&!Q?(0,$.jsx)(`div`,{className:`absolute inset-x-0 top-0 z-10`,children:(0,$.jsx)(Ge,{setting:gt,width:ve,aspectRatio:fe?gt.width/gt.height:null,onAspectRatioChange:e=>ge(e!==null),onChange:e=>et(I,e)})}):null,(0,$.jsx)(`div`,{className:`absolute inset-x-0 bottom-0`,style:{top:gt._tag===`fill`?0:38},children:(0,$.jsx)(ct,{ref:q,environmentId:e.environmentId,threadId:e.threadId,tabId:L.tabId,visible:r,onFirstFrame:()=>Be(I),onControl:e=>je(e?.controller===`you`?I:null),onPopup:t=>lt(e,t,`panel`),className:ne(`absolute inset-0 h-full w-full`,(dt||Q)&&`invisible`)},I)})]}):I&&L&&!dt?Y&&J?.pictureInPicture?(0,$.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3 p-8 text-center`,children:[(0,$.jsx)(`p`,{className:`max-w-sm text-sm text-muted-foreground`,children:`Showing in a separate window.`}),(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[(0,$.jsx)(T,{size:`sm`,variant:`outline`,onClick:Qt,children:`Bring back`}),(0,$.jsx)(T,{size:`sm`,variant:`ghost`,onClick:()=>void Y?.pictureInPicture.open(I),children:`Show window`})]})]}):Y?(0,$.jsx)(tt,{tabId:I,visible:r&&!Q,className:`absolute inset-0 h-full w-full`},I):(0,$.jsx)(`div`,{className:`flex h-full items-center justify-center p-8 text-center`,children:(0,$.jsx)(`p`,{className:`max-w-sm text-sm text-muted-foreground`,children:`This tab is open in the P4 Code desktop app.`})}):null,dt?(0,$.jsx)(St,{threadRef:e,environmentId:e.environmentId,configuredUrls:n,recentEntries:x,onRemoveRecent:t=>Ae(e,t),onOpenUrl:e=>void kt(e)}):null,L&&J?(0,$.jsx)(Lt,{zoomFactor:J.zoomFactor}):null,I&&J&&!dt&&!Q&&!p.has(I)?(0,$.jsx)(it,{tabId:I,zoomFactor:J.zoomFactor,controller:ht}):null,X._tag===`LoadFailed`&&X.download?(0,$.jsx)(`div`,{className:`absolute inset-0 z-10 bg-background`,children:(0,$.jsx)(Bt,{threadRef:e,tabId:L?.tabId??``,url:X.url,download:X.download})}):X._tag===`LoadFailed`?(0,$.jsx)(`div`,{className:`absolute inset-0 z-10 bg-background`,children:(0,$.jsx)(jt,{url:X.url,code:X.code,description:X.description,onReload:At,...qt===`server`?{move:{label:Jt,onMove:()=>void Yt()}}:{}})}):null]})]})}function Ut(e){let t=(0,Q.c)(18),{mode:n,threadRef:r,tabId:i,configuredUrls:a,visible:o,onSendAnnotation:s}=e,c=Ne(r.environmentId),l=W(r.environmentId,y);if(!l||!c){let e=l?`Preview is only available in the P4 Code desktop app.`:`Pair this client again with preview access to control browser previews.`,r;t[0]===e?r=t[1]:(r=(0,$.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center gap-3 p-8 text-center`,children:(0,$.jsx)(`p`,{className:`max-w-sm text-sm text-muted-foreground`,children:e})}),t[0]=e,t[1]=r);let i;return t[2]!==n||t[3]!==r?(i=(0,$.jsx)(K,{mode:n,children:r}),t[2]=n,t[3]=r,t[4]=i):i=t[4],i}let u;t[5]===i?u=t[6]:(u=i===void 0?{}:{tabId:i},t[5]=i,t[6]=u);let d;t[7]===s?d=t[8]:(d=s?{onSendAnnotation:s}:{},t[7]=s,t[8]=d);let f;t[9]!==a||t[10]!==u||t[11]!==d||t[12]!==r||t[13]!==o?(f=(0,$.jsx)(Ht,{threadRef:r,...u,configuredUrls:a,visible:o,...d}),t[9]=a,t[10]=u,t[11]=d,t[12]=r,t[13]=o,t[14]=f):f=t[14];let p;return t[15]!==n||t[16]!==f?(p=(0,$.jsx)(K,{mode:n,children:f}),t[15]=n,t[16]=f,t[17]=p):p=t[17],p}export{Ut as PreviewPanel};
|
|
2
|
+
//# sourceMappingURL=PreviewPanel-D8V2zDl4.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{Fh as r,Ht as ee,Pt as te,Ut as ne,Yt as re,in as ie,qt as i,zs as ae}from"./utils-CcBaVOX5.js";import{a,c as o,o as s,s as c,t as l}from"./select-oshTwPZM.js";import{t as oe}from"./useNavigate-PfhtEZbl.js";import{i as se}from"./toast-Dkj3G-UM.js";import{E as ce,i as le}from"./useSettings-Cg0O7Ek7.js";import{t as ue}from"./server-Ct4-BCZx.js";import{t as u}from"./pullRequestDetail.logic-CXEtJJcn.js";import{i as de}from"./p4ProjectFile-B1qTw64E.js";import{C as d,F as fe,I as f,P as pe,R as me,V as he,a as p,m as ge,n as _e,r as m,s as ve}from"./settingsLayout-krWuVpsF.js";import{Ar as h,go as ye}from"./main-DIEsHSIy.js";import{t as be}from"./ProviderModelPicker-DWqfDVY9.js";import{n as xe,t as Se}from"./runtimeModeConfig-CZCsG9b4.js";var Ce=t(),g=e(n(),1),we=[`recursive`,`top-level`,`none`];function Te(e){return e!==null&&we.includes(e)}function Ee(e){let t=(0,Ce.c)(95),{category:n}=e,{scope:Ee,target:_,targets:Ae,connectedEnvironments:je}=he(),v=fe(),y=me(),Me=oe(),{environments:b}=ce(),x,S,C,w,T;if(t[0]!==b||t[1]!==v||t[2]!==_){C=_?b.find(e=>e.environmentId===_.environmentId):void 0;let e=C?.serverConfig?.providers??ue;w=i(e,v.defaultModelSelection),x=re(ee(ne(e),v,_?.projectId??null)),S=te(v,e,w?.instanceId,w?.model),T=x.find(e=>e.instanceId===w?.instanceId),t[0]=b,t[1]=v,t[2]=_,t[3]=x,t[4]=S,t[5]=C,t[6]=w,t[7]=T}else x=t[3],S=t[4],C=t[5],w=t[6],T=t[7];let E=T,D;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(D=[`defaultModelSelection`],t[8]=D):D=t[8];let O=f(D),k;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(k=[`defaultRuntimeMode`],t[9]=k):k=t[9];let A=f(k),Ne=Se[v.defaultRuntimeMode].icon,j;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(j=[`defaultThreadEnvMode`],t[10]=j):j=t[10];let M=f(j),N;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(N=[`worktreeSubmodules`],t[11]=N):N=t[11];let P=f(N),F;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(F=[`enableAgentBrowserAccess`],t[12]=F):F=t[12];let I=f(F),L;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(L=[`defaultAutoPull`],t[13]=L):L=t[13];let R=f(L),Pe;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(Pe=[`removeAgentCreditsOnMerge`],t[14]=Pe):Pe=t[14];let z=f(Pe),B;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(B=[`pullRequestMergeMethod`],t[15]=B):B=t[15];let Fe=f(B),Ie;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(Ie=[`defaultModelSelection`],t[16]=Ie):Ie=t[16];let Le=pe(Ie),V=Ee.kind===`project`||Ee.kind===`checkout`,H=je.length===0,Re;t[17]===_?Re=t[18]:(Re=_?de(_.settings,null,null,null).settings:null,t[17]=_,t[18]=Re);let ze=Re,Be;t[19]!==x||t[20]!==b||t[21]!==v||t[22]!==Ae?(Be=function(e,t){let n=x.find(t=>t.instanceId===e);for(let r of Ae){let re=b.find(e=>e.environmentId===r.environmentId),ie=re?.serverConfig;if(!ie)continue;let i=ee(ne(ie.providers),r.settings,r.projectId).find(t=>t.instanceId===e),ae=te(le(r.settings,v),ie.providers).get(e);if(!i?.enabled||!i.isAvailable||i.driverKind!==n?.driverKind||!ae?.some(e=>e.slug===t&&!e.isUnavailable))return`This model is unavailable on ${re?.label??`a selected environment`}. Select that environment to choose its model separately.`}return null},t[19]=x,t[20]=b,t[21]=v,t[22]=Ae,t[23]=Be):Be=t[23];let U=Be,Ve;t[24]!==U||t[25]!==y?(Ve=e=>{let t=e?U(e.instanceId,e.model):null;t?se.add({type:`error`,title:`Default model not saved`,description:t}):y({defaultModelSelection:e})},t[24]=U,t[25]=y,t[26]=Ve):Ve=t[26];let W=Ve,He;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(He=[`defaultModelSelection`],t[27]=He):He=t[27];let Ue=V?`Model for new threads in this project.`:`Default model for new threads. Projects can override it.`,We=H||O||Le===`project`?void 0:v.defaultModelSelection===null?`Automatic`:void 0,G;t[28]!==W||t[29]!==v.defaultModelSelection?(G=v.defaultModelSelection===null?null:(0,g.jsx)(m,{label:`default model`,onClick:()=>W(null)}),t[28]=W,t[29]=v.defaultModelSelection,t[30]=G):G=t[30];let K;t[31]!==E||t[32]!==x||t[33]!==O||t[34]!==U||t[35]!==S||t[36]!==Me||t[37]!==C||t[38]!==w||t[39]!==W||t[40]!==v.planModeEnabled?(K=w&&E?(0,g.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center justify-end gap-1.5`,children:[(0,g.jsx)(be,{environmentId:C?.environmentId??null,activeInstanceId:w.instanceId,model:w.model,lockedProvider:null,instanceEntries:x,modelOptionsByInstance:S,triggerClassName:_e,...O?{triggerLabel:`Mixed`}:{},getModelDisabledReason:U,onOpenProviderSetup:e=>{C&&Me({to:`/settings/providers`,search:{environmentId:C.environmentId,instanceId:e}})},onInstanceModelChange:(e,t)=>W(ae(e,t))}),O?null:(0,g.jsx)(ie,{provider:E.driverKind,models:E.models,model:w.model,modelOptions:w.options??[],allowPromptInjectedEffort:!1,planModeEnabled:v.planModeEnabled,triggerClassName:_e,onModelOptionsChange:e=>W(ae(w.instanceId,w.model,e))})]}):(0,g.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`No providers available`}),t[31]=E,t[32]=x,t[33]=O,t[34]=U,t[35]=S,t[36]=Me,t[37]=C,t[38]=w,t[39]=W,t[40]=v.planModeEnabled,t[41]=K):K=t[41];let Ge;t[42]!==O||t[43]!==Ue||t[44]!==We||t[45]!==G||t[46]!==K?(Ge=(0,g.jsx)(p,{serverScoped:!0,settingKeys:He,mixed:O,id:`default-model`,title:`Model`,description:Ue,status:We,resetAction:G,control:K}),t[42]=O,t[43]=Ue,t[44]=We,t[45]=G,t[46]=K,t[47]=Ge):Ge=t[47];let Ke=Ge,qe;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(qe=[`defaultThreadEnvMode`],t[48]=qe):qe=t[48];let q;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(q=h(`new-threads`),t[49]=q):q=t[49];let Je=V?`Where new threads in this project start.`:`Where new threads start. Projects and their p4.json can override it.`,J;t[50]!==V||t[51]!==v.defaultThreadEnvMode||t[52]!==y?(J=!V&&v.defaultThreadEnvMode!==null?(0,g.jsx)(m,{label:`default workspace`,onClick:()=>y({defaultThreadEnvMode:null})}):null,t[50]=V,t[51]=v.defaultThreadEnvMode,t[52]=y,t[53]=J):J=t[53];let Ye=M?null:ze?.defaultThreadEnvMode??null,Y;t[54]===y?Y=t[55]:(Y=e=>{(e===`auto`||e===`local`||e===`worktree`)&&y({defaultThreadEnvMode:e})},t[54]=y,t[55]=Y);let X;t[56]===H?X=t[57]:(X=(0,g.jsx)(c,{size:`sm`,"aria-label":`Default workspace`,children:(0,g.jsx)(o,{children:e=>e===`auto`||e===`local`||e===`worktree`?d(e):H?`Unavailable`:`Mixed`})}),t[56]=H,t[57]=X);let Xe;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=(0,g.jsx)(a,{value:`auto`,children:d(`auto`)}),t[58]=Xe):Xe=t[58];let Ze;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(Ze=(0,g.jsx)(a,{value:`local`,children:d(`local`)}),t[59]=Ze):Ze=t[59];let Qe;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(Qe=(0,g.jsxs)(s,{align:`end`,alignItemWithTrigger:!1,children:[Xe,Ze,(0,g.jsx)(a,{value:`worktree`,children:d(`worktree`)})]}),t[60]=Qe):Qe=t[60];let Z;t[61]!==Ye||t[62]!==Y||t[63]!==X?(Z=(0,g.jsxs)(l,{value:Ye,onValueChange:Y,children:[X,Qe]}),t[61]=Ye,t[62]=Y,t[63]=X,t[64]=Z):Z=t[64];let $e;t[65]!==M||t[66]!==Je||t[67]!==J||t[68]!==Z?($e=(0,g.jsx)(p,{serverScoped:!0,settingKeys:qe,mixed:M,id:q.id,title:`Workspace`,description:Je,resetAction:J,control:Z}),t[65]=M,t[66]=Je,t[67]=J,t[68]=Z,t[69]=$e):$e=t[69];let et=$e,tt=n===`general`||n===`project`?`project-defaults`:n===`integrations`?`browser-access`:`source-control-defaults`,nt=n===`general`||n===`project`?`New threads`:n===`integrations`?`Browser`:`Repositories`,Q;t[70]!==Ne||t[71]!==n||t[72]!==ze?.worktreeSubmodules||t[73]!==V||t[74]!==z||t[75]!==R||t[76]!==I||t[77]!==Fe||t[78]!==A||t[79]!==P||t[80]!==Ke||t[81]!==v.defaultAutoPull||t[82]!==v.defaultRuntimeMode||t[83]!==v.enableAgentBrowserAccess||t[84]!==v.pullRequestMergeMethod||t[85]!==v.removeAgentCreditsOnMerge||t[86]!==v.worktreeSubmodules||t[87]!==H||t[88]!==y||t[89]!==et?(Q=n===`project`?(0,g.jsxs)(g.Fragment,{children:[Ke,et]}):n===`general`?(0,g.jsxs)(g.Fragment,{children:[Ke,(0,g.jsx)(p,{serverScoped:!0,settingKeys:[`defaultRuntimeMode`],mixed:A,...h(`default-permissions`),description:V?`Permissions for new threads in this project.`:`Default permissions for new threads. Projects can override them.`,resetAction:v.defaultRuntimeMode===r.defaultRuntimeMode?null:(0,g.jsx)(m,{label:`default permissions`,onClick:()=>y({defaultRuntimeMode:r.defaultRuntimeMode})}),control:(0,g.jsxs)(l,{value:A?null:v.defaultRuntimeMode,onValueChange:e=>{e&&y({defaultRuntimeMode:e})},children:[(0,g.jsxs)(c,{size:`sm`,"aria-label":`Default permissions`,children:[!A&&(0,g.jsx)(Ne,{className:`size-3.5 shrink-0 text-muted-foreground`}),(0,g.jsx)(o,{children:A?`Mixed`:Se[v.defaultRuntimeMode].label})]}),(0,g.jsx)(s,{align:`end`,alignItemWithTrigger:!1,children:xe.map(ke)})]})}),et,(0,g.jsx)(p,{serverScoped:!0,settingKeys:[`worktreeSubmodules`],mixed:P,...h(`worktree-submodules`),description:V?`How new worktrees in this project populate git submodules.`:`How new worktrees populate git submodules. Projects and their p4.json can override it.`,resetAction:!V&&v.worktreeSubmodules!==null?(0,g.jsx)(m,{label:`worktree submodules`,onClick:()=>y({worktreeSubmodules:null})}):null,control:(0,g.jsxs)(l,{value:P?null:ze?.worktreeSubmodules??null,onValueChange:e=>{Te(e)&&y({worktreeSubmodules:e})},children:[(0,g.jsx)(c,{size:`sm`,"aria-label":`Worktree submodules`,children:(0,g.jsx)(o,{children:e=>Te(e)?ge[e]:H?`Unavailable`:`Mixed`})}),(0,g.jsx)(s,{align:`end`,alignItemWithTrigger:!1,children:we.map(Oe)})]})})]}):n===`source-control`?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(p,{serverScoped:!0,settingKeys:[`defaultAutoPull`],mixed:R,id:`automatic-pull`,title:`Automatically pull`,description:V?`Keeps this project's default branch current when the checkout has no local changes or commits.`:`Keeps the default branch current when the checkout has no local changes or commits. Projects can override it.`,resetAction:v.defaultAutoPull?(0,g.jsx)(m,{label:`default automatic pull`,tooltip:`Reset automatic pull to off`,onClick:()=>y({defaultAutoPull:!1})}):null,control:(0,g.jsx)(ye,{"aria-label":`Default automatic pull`,mixed:R,checked:!R&&v.defaultAutoPull,onCheckedChange:e=>y({defaultAutoPull:e})})}),(0,g.jsx)(p,{serverScoped:!0,settingKeys:[`removeAgentCreditsOnMerge`],mixed:z,...h(`remove-agent-credits-on-merge`),description:`Remove recognized agent credit lines from GitHub merge and squash messages, keeping human co-authors. Includes auto-merge. Excludes merge queues, stack merges, and existing commits.`,resetAction:v.removeAgentCreditsOnMerge?(0,g.jsx)(m,{label:`agent credit removal`,tooltip:`Keep agent credits`,onClick:()=>y({removeAgentCreditsOnMerge:!1})}):null,control:(0,g.jsx)(ye,{"aria-label":`Remove agent credits when merging`,mixed:z,checked:!z&&v.removeAgentCreditsOnMerge,onCheckedChange:e=>y({removeAgentCreditsOnMerge:e})})}),(0,g.jsx)(p,{serverScoped:!0,settingKeys:[`pullRequestMergeMethod`],mixed:Fe,...h(`pull-request-merge-method`),description:V?`Pull requests in this project start with this method.`:`Pull requests start with this method. Last selected reuses whatever you chose most recently on this device.`,resetAction:v.pullRequestMergeMethod===null?null:(0,g.jsx)(m,{label:`default merge method`,tooltip:`Reset to last selected`,onClick:()=>y({pullRequestMergeMethod:null})}),control:(0,g.jsxs)(l,{value:Fe?null:v.pullRequestMergeMethod??`last`,onValueChange:e=>{e===`last`?y({pullRequestMergeMethod:null}):(e===`merge`||e===`squash`||e===`rebase`)&&y({pullRequestMergeMethod:e})},children:[(0,g.jsx)(c,{size:`sm`,"aria-label":`Default pull request merge method`,children:(0,g.jsx)(o,{children:De})}),(0,g.jsxs)(s,{align:`end`,alignItemWithTrigger:!1,children:[(0,g.jsx)(a,{value:`last`,children:`Last selected`}),(0,g.jsx)(a,{value:`merge`,children:u.merge}),(0,g.jsx)(a,{value:`squash`,children:u.squash}),(0,g.jsx)(a,{value:`rebase`,children:u.rebase})]})]})})]}):(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(p,{serverScoped:!0,settingKeys:[`enableAgentBrowserAccess`],mixed:I,id:h(`agent-browser-access`).id,title:`Agent browser access`,description:V?`Allow agents in this project to use the shared browser. Applies when the agent session next starts.`:`Allow agents to use the shared browser. Projects can override it.`,resetAction:v.enableAgentBrowserAccess===r.enableAgentBrowserAccess?null:(0,g.jsx)(m,{label:`default browser access`,onClick:()=>y({enableAgentBrowserAccess:r.enableAgentBrowserAccess})}),control:(0,g.jsx)(ye,{"aria-label":`Agent browser access`,mixed:I,checked:!I&&v.enableAgentBrowserAccess,onCheckedChange:e=>y({enableAgentBrowserAccess:e})})})}),t[70]=Ne,t[71]=n,t[72]=ze?.worktreeSubmodules,t[73]=V,t[74]=z,t[75]=R,t[76]=I,t[77]=Fe,t[78]=A,t[79]=P,t[80]=Ke,t[81]=v.defaultAutoPull,t[82]=v.defaultRuntimeMode,t[83]=v.enableAgentBrowserAccess,t[84]=v.pullRequestMergeMethod,t[85]=v.removeAgentCreditsOnMerge,t[86]=v.worktreeSubmodules,t[87]=H,t[88]=y,t[89]=et,t[90]=Q):Q=t[90];let $;return t[91]!==tt||t[92]!==nt||t[93]!==Q?($=(0,g.jsx)(ve,{id:tt,title:nt,children:Q}),t[91]=tt,t[92]=nt,t[93]=Q,t[94]=$):$=t[94],$}function De(e){return e===`merge`||e===`squash`||e===`rebase`?u[e]:e===`last`?`Last selected`:`Mixed`}function Oe(e){return(0,g.jsx)(a,{value:e,children:ge[e]},e)}function ke(e){let t=Se[e],n=t.icon;return(0,g.jsx)(a,{value:e,className:`min-w-64`,children:(0,g.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 font-medium`,children:[(0,g.jsx)(n,{className:`size-3.5 shrink-0 text-muted-foreground`}),t.label]}),(0,g.jsx)(`span`,{className:`text-xs leading-4 text-muted-foreground`,children:t.description})]})},e)}export{Ee as t};
|
|
2
|
-
//# sourceMappingURL=ProjectDefaultsSettings-
|
|
1
|
+
import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{Fh as r,Ht as ee,Pt as te,Ut as ne,Yt as re,in as ie,qt as i,zs as ae}from"./utils-C5GGWTfe.js";import{a,c as o,o as s,s as c,t as l}from"./select-vBkqTMKL.js";import{t as oe}from"./useNavigate-AZUCIeU4.js";import{i as se}from"./toast-BZ96uuab.js";import{E as ce,i as le}from"./useSettings-B09a3zie.js";import{t as ue}from"./server-DwkxciXh.js";import{t as u}from"./pullRequestDetail.logic-DYx7bEwE.js";import{i as de}from"./p4ProjectFile-jwYvYDE-.js";import{C as d,F as fe,I as f,P as pe,R as me,V as he,a as p,m as ge,n as _e,r as m,s as ve}from"./settingsLayout-WhjsCfB6.js";import{Ar as h,go as ye}from"./main-C0z861OK.js";import{t as be}from"./ProviderModelPicker-CpWE-Lfx.js";import{n as xe,t as Se}from"./runtimeModeConfig-DFxXOIlV.js";var Ce=t(),g=e(n(),1),we=[`recursive`,`top-level`,`none`];function Te(e){return e!==null&&we.includes(e)}function Ee(e){let t=(0,Ce.c)(95),{category:n}=e,{scope:Ee,target:_,targets:Ae,connectedEnvironments:je}=he(),v=fe(),y=me(),Me=oe(),{environments:b}=ce(),x,S,C,w,T;if(t[0]!==b||t[1]!==v||t[2]!==_){C=_?b.find(e=>e.environmentId===_.environmentId):void 0;let e=C?.serverConfig?.providers??ue;w=i(e,v.defaultModelSelection),x=re(ee(ne(e),v,_?.projectId??null)),S=te(v,e,w?.instanceId,w?.model),T=x.find(e=>e.instanceId===w?.instanceId),t[0]=b,t[1]=v,t[2]=_,t[3]=x,t[4]=S,t[5]=C,t[6]=w,t[7]=T}else x=t[3],S=t[4],C=t[5],w=t[6],T=t[7];let E=T,D;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(D=[`defaultModelSelection`],t[8]=D):D=t[8];let O=f(D),k;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(k=[`defaultRuntimeMode`],t[9]=k):k=t[9];let A=f(k),Ne=Se[v.defaultRuntimeMode].icon,j;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(j=[`defaultThreadEnvMode`],t[10]=j):j=t[10];let M=f(j),N;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(N=[`worktreeSubmodules`],t[11]=N):N=t[11];let P=f(N),F;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(F=[`enableAgentBrowserAccess`],t[12]=F):F=t[12];let I=f(F),L;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(L=[`defaultAutoPull`],t[13]=L):L=t[13];let R=f(L),Pe;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(Pe=[`removeAgentCreditsOnMerge`],t[14]=Pe):Pe=t[14];let z=f(Pe),B;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(B=[`pullRequestMergeMethod`],t[15]=B):B=t[15];let Fe=f(B),Ie;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(Ie=[`defaultModelSelection`],t[16]=Ie):Ie=t[16];let Le=pe(Ie),V=Ee.kind===`project`||Ee.kind===`checkout`,H=je.length===0,Re;t[17]===_?Re=t[18]:(Re=_?de(_.settings,null,null,null).settings:null,t[17]=_,t[18]=Re);let ze=Re,Be;t[19]!==x||t[20]!==b||t[21]!==v||t[22]!==Ae?(Be=function(e,t){let n=x.find(t=>t.instanceId===e);for(let r of Ae){let re=b.find(e=>e.environmentId===r.environmentId),ie=re?.serverConfig;if(!ie)continue;let i=ee(ne(ie.providers),r.settings,r.projectId).find(t=>t.instanceId===e),ae=te(le(r.settings,v),ie.providers).get(e);if(!i?.enabled||!i.isAvailable||i.driverKind!==n?.driverKind||!ae?.some(e=>e.slug===t&&!e.isUnavailable))return`This model is unavailable on ${re?.label??`a selected environment`}. Select that environment to choose its model separately.`}return null},t[19]=x,t[20]=b,t[21]=v,t[22]=Ae,t[23]=Be):Be=t[23];let U=Be,Ve;t[24]!==U||t[25]!==y?(Ve=e=>{let t=e?U(e.instanceId,e.model):null;t?se.add({type:`error`,title:`Default model not saved`,description:t}):y({defaultModelSelection:e})},t[24]=U,t[25]=y,t[26]=Ve):Ve=t[26];let W=Ve,He;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(He=[`defaultModelSelection`],t[27]=He):He=t[27];let Ue=V?`Model for new threads in this project.`:`Default model for new threads. Projects can override it.`,We=H||O||Le===`project`?void 0:v.defaultModelSelection===null?`Automatic`:void 0,G;t[28]!==W||t[29]!==v.defaultModelSelection?(G=v.defaultModelSelection===null?null:(0,g.jsx)(m,{label:`default model`,onClick:()=>W(null)}),t[28]=W,t[29]=v.defaultModelSelection,t[30]=G):G=t[30];let K;t[31]!==E||t[32]!==x||t[33]!==O||t[34]!==U||t[35]!==S||t[36]!==Me||t[37]!==C||t[38]!==w||t[39]!==W||t[40]!==v.planModeEnabled?(K=w&&E?(0,g.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center justify-end gap-1.5`,children:[(0,g.jsx)(be,{environmentId:C?.environmentId??null,activeInstanceId:w.instanceId,model:w.model,lockedProvider:null,instanceEntries:x,modelOptionsByInstance:S,triggerClassName:_e,...O?{triggerLabel:`Mixed`}:{},getModelDisabledReason:U,onOpenProviderSetup:e=>{C&&Me({to:`/settings/providers`,search:{environmentId:C.environmentId,instanceId:e}})},onInstanceModelChange:(e,t)=>W(ae(e,t))}),O?null:(0,g.jsx)(ie,{provider:E.driverKind,models:E.models,model:w.model,modelOptions:w.options??[],allowPromptInjectedEffort:!1,planModeEnabled:v.planModeEnabled,triggerClassName:_e,onModelOptionsChange:e=>W(ae(w.instanceId,w.model,e))})]}):(0,g.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`No providers available`}),t[31]=E,t[32]=x,t[33]=O,t[34]=U,t[35]=S,t[36]=Me,t[37]=C,t[38]=w,t[39]=W,t[40]=v.planModeEnabled,t[41]=K):K=t[41];let Ge;t[42]!==O||t[43]!==Ue||t[44]!==We||t[45]!==G||t[46]!==K?(Ge=(0,g.jsx)(p,{serverScoped:!0,settingKeys:He,mixed:O,id:`default-model`,title:`Model`,description:Ue,status:We,resetAction:G,control:K}),t[42]=O,t[43]=Ue,t[44]=We,t[45]=G,t[46]=K,t[47]=Ge):Ge=t[47];let Ke=Ge,qe;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(qe=[`defaultThreadEnvMode`],t[48]=qe):qe=t[48];let q;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(q=h(`new-threads`),t[49]=q):q=t[49];let Je=V?`Where new threads in this project start.`:`Where new threads start. Projects and their p4.json can override it.`,J;t[50]!==V||t[51]!==v.defaultThreadEnvMode||t[52]!==y?(J=!V&&v.defaultThreadEnvMode!==null?(0,g.jsx)(m,{label:`default workspace`,onClick:()=>y({defaultThreadEnvMode:null})}):null,t[50]=V,t[51]=v.defaultThreadEnvMode,t[52]=y,t[53]=J):J=t[53];let Ye=M?null:ze?.defaultThreadEnvMode??null,Y;t[54]===y?Y=t[55]:(Y=e=>{(e===`auto`||e===`local`||e===`worktree`)&&y({defaultThreadEnvMode:e})},t[54]=y,t[55]=Y);let X;t[56]===H?X=t[57]:(X=(0,g.jsx)(c,{size:`sm`,"aria-label":`Default workspace`,children:(0,g.jsx)(o,{children:e=>e===`auto`||e===`local`||e===`worktree`?d(e):H?`Unavailable`:`Mixed`})}),t[56]=H,t[57]=X);let Xe;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=(0,g.jsx)(a,{value:`auto`,children:d(`auto`)}),t[58]=Xe):Xe=t[58];let Ze;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(Ze=(0,g.jsx)(a,{value:`local`,children:d(`local`)}),t[59]=Ze):Ze=t[59];let Qe;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(Qe=(0,g.jsxs)(s,{align:`end`,alignItemWithTrigger:!1,children:[Xe,Ze,(0,g.jsx)(a,{value:`worktree`,children:d(`worktree`)})]}),t[60]=Qe):Qe=t[60];let Z;t[61]!==Ye||t[62]!==Y||t[63]!==X?(Z=(0,g.jsxs)(l,{value:Ye,onValueChange:Y,children:[X,Qe]}),t[61]=Ye,t[62]=Y,t[63]=X,t[64]=Z):Z=t[64];let $e;t[65]!==M||t[66]!==Je||t[67]!==J||t[68]!==Z?($e=(0,g.jsx)(p,{serverScoped:!0,settingKeys:qe,mixed:M,id:q.id,title:`Workspace`,description:Je,resetAction:J,control:Z}),t[65]=M,t[66]=Je,t[67]=J,t[68]=Z,t[69]=$e):$e=t[69];let et=$e,tt=n===`general`||n===`project`?`project-defaults`:n===`integrations`?`browser-access`:`source-control-defaults`,nt=n===`general`||n===`project`?`New threads`:n===`integrations`?`Browser`:`Repositories`,Q;t[70]!==Ne||t[71]!==n||t[72]!==ze?.worktreeSubmodules||t[73]!==V||t[74]!==z||t[75]!==R||t[76]!==I||t[77]!==Fe||t[78]!==A||t[79]!==P||t[80]!==Ke||t[81]!==v.defaultAutoPull||t[82]!==v.defaultRuntimeMode||t[83]!==v.enableAgentBrowserAccess||t[84]!==v.pullRequestMergeMethod||t[85]!==v.removeAgentCreditsOnMerge||t[86]!==v.worktreeSubmodules||t[87]!==H||t[88]!==y||t[89]!==et?(Q=n===`project`?(0,g.jsxs)(g.Fragment,{children:[Ke,et]}):n===`general`?(0,g.jsxs)(g.Fragment,{children:[Ke,(0,g.jsx)(p,{serverScoped:!0,settingKeys:[`defaultRuntimeMode`],mixed:A,...h(`default-permissions`),description:V?`Permissions for new threads in this project.`:`Default permissions for new threads. Projects can override them.`,resetAction:v.defaultRuntimeMode===r.defaultRuntimeMode?null:(0,g.jsx)(m,{label:`default permissions`,onClick:()=>y({defaultRuntimeMode:r.defaultRuntimeMode})}),control:(0,g.jsxs)(l,{value:A?null:v.defaultRuntimeMode,onValueChange:e=>{e&&y({defaultRuntimeMode:e})},children:[(0,g.jsxs)(c,{size:`sm`,"aria-label":`Default permissions`,children:[!A&&(0,g.jsx)(Ne,{className:`size-3.5 shrink-0 text-muted-foreground`}),(0,g.jsx)(o,{children:A?`Mixed`:Se[v.defaultRuntimeMode].label})]}),(0,g.jsx)(s,{align:`end`,alignItemWithTrigger:!1,children:xe.map(ke)})]})}),et,(0,g.jsx)(p,{serverScoped:!0,settingKeys:[`worktreeSubmodules`],mixed:P,...h(`worktree-submodules`),description:V?`How new worktrees in this project populate git submodules.`:`How new worktrees populate git submodules. Projects and their p4.json can override it.`,resetAction:!V&&v.worktreeSubmodules!==null?(0,g.jsx)(m,{label:`worktree submodules`,onClick:()=>y({worktreeSubmodules:null})}):null,control:(0,g.jsxs)(l,{value:P?null:ze?.worktreeSubmodules??null,onValueChange:e=>{Te(e)&&y({worktreeSubmodules:e})},children:[(0,g.jsx)(c,{size:`sm`,"aria-label":`Worktree submodules`,children:(0,g.jsx)(o,{children:e=>Te(e)?ge[e]:H?`Unavailable`:`Mixed`})}),(0,g.jsx)(s,{align:`end`,alignItemWithTrigger:!1,children:we.map(Oe)})]})})]}):n===`source-control`?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(p,{serverScoped:!0,settingKeys:[`defaultAutoPull`],mixed:R,id:`automatic-pull`,title:`Automatically pull`,description:V?`Keeps this project's default branch current when the checkout has no local changes or commits.`:`Keeps the default branch current when the checkout has no local changes or commits. Projects can override it.`,resetAction:v.defaultAutoPull?(0,g.jsx)(m,{label:`default automatic pull`,tooltip:`Reset automatic pull to off`,onClick:()=>y({defaultAutoPull:!1})}):null,control:(0,g.jsx)(ye,{"aria-label":`Default automatic pull`,mixed:R,checked:!R&&v.defaultAutoPull,onCheckedChange:e=>y({defaultAutoPull:e})})}),(0,g.jsx)(p,{serverScoped:!0,settingKeys:[`removeAgentCreditsOnMerge`],mixed:z,...h(`remove-agent-credits-on-merge`),description:`Remove recognized agent credit lines from GitHub merge and squash messages, keeping human co-authors. Includes auto-merge. Excludes merge queues, stack merges, and existing commits.`,resetAction:v.removeAgentCreditsOnMerge?(0,g.jsx)(m,{label:`agent credit removal`,tooltip:`Keep agent credits`,onClick:()=>y({removeAgentCreditsOnMerge:!1})}):null,control:(0,g.jsx)(ye,{"aria-label":`Remove agent credits when merging`,mixed:z,checked:!z&&v.removeAgentCreditsOnMerge,onCheckedChange:e=>y({removeAgentCreditsOnMerge:e})})}),(0,g.jsx)(p,{serverScoped:!0,settingKeys:[`pullRequestMergeMethod`],mixed:Fe,...h(`pull-request-merge-method`),description:V?`Pull requests in this project start with this method.`:`Pull requests start with this method. Last selected reuses whatever you chose most recently on this device.`,resetAction:v.pullRequestMergeMethod===null?null:(0,g.jsx)(m,{label:`default merge method`,tooltip:`Reset to last selected`,onClick:()=>y({pullRequestMergeMethod:null})}),control:(0,g.jsxs)(l,{value:Fe?null:v.pullRequestMergeMethod??`last`,onValueChange:e=>{e===`last`?y({pullRequestMergeMethod:null}):(e===`merge`||e===`squash`||e===`rebase`)&&y({pullRequestMergeMethod:e})},children:[(0,g.jsx)(c,{size:`sm`,"aria-label":`Default pull request merge method`,children:(0,g.jsx)(o,{children:De})}),(0,g.jsxs)(s,{align:`end`,alignItemWithTrigger:!1,children:[(0,g.jsx)(a,{value:`last`,children:`Last selected`}),(0,g.jsx)(a,{value:`merge`,children:u.merge}),(0,g.jsx)(a,{value:`squash`,children:u.squash}),(0,g.jsx)(a,{value:`rebase`,children:u.rebase})]})]})})]}):(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(p,{serverScoped:!0,settingKeys:[`enableAgentBrowserAccess`],mixed:I,id:h(`agent-browser-access`).id,title:`Agent browser access`,description:V?`Allow agents in this project to use the shared browser. Applies when the agent session next starts.`:`Allow agents to use the shared browser. Projects can override it.`,resetAction:v.enableAgentBrowserAccess===r.enableAgentBrowserAccess?null:(0,g.jsx)(m,{label:`default browser access`,onClick:()=>y({enableAgentBrowserAccess:r.enableAgentBrowserAccess})}),control:(0,g.jsx)(ye,{"aria-label":`Agent browser access`,mixed:I,checked:!I&&v.enableAgentBrowserAccess,onCheckedChange:e=>y({enableAgentBrowserAccess:e})})})}),t[70]=Ne,t[71]=n,t[72]=ze?.worktreeSubmodules,t[73]=V,t[74]=z,t[75]=R,t[76]=I,t[77]=Fe,t[78]=A,t[79]=P,t[80]=Ke,t[81]=v.defaultAutoPull,t[82]=v.defaultRuntimeMode,t[83]=v.enableAgentBrowserAccess,t[84]=v.pullRequestMergeMethod,t[85]=v.removeAgentCreditsOnMerge,t[86]=v.worktreeSubmodules,t[87]=H,t[88]=y,t[89]=et,t[90]=Q):Q=t[90];let $;return t[91]!==tt||t[92]!==nt||t[93]!==Q?($=(0,g.jsx)(ve,{id:tt,title:nt,children:Q}),t[91]=tt,t[92]=nt,t[93]=Q,t[94]=$):$=t[94],$}function De(e){return e===`merge`||e===`squash`||e===`rebase`?u[e]:e===`last`?`Last selected`:`Mixed`}function Oe(e){return(0,g.jsx)(a,{value:e,children:ge[e]},e)}function ke(e){let t=Se[e],n=t.icon;return(0,g.jsx)(a,{value:e,className:`min-w-64`,children:(0,g.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,g.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 font-medium`,children:[(0,g.jsx)(n,{className:`size-3.5 shrink-0 text-muted-foreground`}),t.label]}),(0,g.jsx)(`span`,{className:`text-xs leading-4 text-muted-foreground`,children:t.description})]})},e)}export{Ee as t};
|
|
2
|
+
//# sourceMappingURL=ProjectDefaultsSettings-6UkudkKP.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dynamic-
|
|
2
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{t as n}from"./index-
|
|
3
|
-
//# sourceMappingURL=ProjectFavicon-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dynamic-CVt07u2H.js","assets/react-BUfh6y28.js","assets/index-BXvrSYK3.js","assets/Icon-DYn8279B.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{t as n}from"./index-BXvrSYK3.js";import{n as r,t as i}from"./jsx-runtime-DJeoFXNw.js";import{Af as a,gh as o,ns as s,t as c}from"./utils-C5GGWTfe.js";import{a as l,i as u}from"./runtime-BK2Lh1vB.js";import{E as d,O as f,l as p}from"./TooltipViewport-Be_gbUW1.js";import{n as m}from"./assets-JgE2I_Ix.js";import{i as h,r as g,t as _}from"./ProjectMonogram-C8FlNLaU.js";var v=r(),y=e(t(),1),b=e(i(),1),x=(0,y.lazy)(()=>n(()=>import(`./dynamic-CVt07u2H.js`).then(e=>({default:e.DynamicIcon})),__vite__mapDeps([0,1,2,3])));function S(){let e=(0,v.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,b.jsx)(a,{className:`size-full text-inherit`}),e[0]=t):t=e[0],t}function C(e){let t=(0,v.c)(11),{name:n,className:r}=e,i=o(),a;t[0]!==n||t[1]!==i?(a=h(i,n),t[0]=n,t[1]=i,t[2]=a):a=t[2];let{p4:s,strokeWidth:c}=a;if(s){let e;return t[3]!==s||t[4]!==r?(e=(0,b.jsx)(s,{className:r}),t[3]=s,t[4]=r,t[5]=e):e=t[5],e}let l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,b.jsx)(S,{}),t[6]=l):l=t[6];let u;return t[7]!==r||t[8]!==n||t[9]!==c?(u=(0,b.jsx)(y.Suspense,{fallback:l,children:(0,b.jsx)(x,{name:n,className:r,strokeWidth:c,fallback:S})}),t[7]=r,t[8]=n,t[9]=c,t[10]=u):u=t[10],u}function w(e){let t=(0,v.c)(41),{project:n}=e,r;t[0]!==n.environmentId||t[1]!==n.faviconPath||t[2]!==n.workspaceRoot?(r=m({environmentId:n.environmentId,cwd:n.workspaceRoot,faviconPath:n.faviconPath}),t[0]=n.environmentId,t[1]=n.faviconPath,t[2]=n.workspaceRoot,t[3]=r):r=t[3];let i=s(r);if(n.projectIcon?.kind===`monogram`){let r;return t[4]!==e.className||t[5]!==n.projectIcon.color||t[6]!==n.projectIcon.text?(r=(0,b.jsx)(_,{text:n.projectIcon.text,color:n.projectIcon.color,className:e.className}),t[4]=e.className,t[5]=n.projectIcon.color,t[6]=n.projectIcon.text,t[7]=r):r=t[7],r}if(n.projectIcon?.kind===`emoji`){let r;return t[8]!==e.className||t[9]!==n.projectIcon.emoji?(r=(0,b.jsx)(T,{className:e.className,icon:a,emoji:n.projectIcon.emoji}),t[8]=e.className,t[9]=n.projectIcon.emoji,t[10]=r):r=t[10],r}if(n.projectIcon?.kind===`lucide`){let r,i,a,o,s;if(t[11]!==e.className||t[12]!==n.projectIcon.color||t[13]!==n.projectIcon.name){let l=g(n.projectIcon.color),u=c(`inline-flex size-3.5 shrink-0 items-center justify-center`,l,e.className);o=`true`,s=u,r=C,i=n.projectIcon.name,a=c(`size-full`,l),t[11]=e.className,t[12]=n.projectIcon.color,t[13]=n.projectIcon.name,t[14]=r,t[15]=i,t[16]=a,t[17]=o,t[18]=s}else r=t[14],i=t[15],a=t[16],o=t[17],s=t[18];let l;t[19]!==r||t[20]!==i||t[21]!==a?(l=(0,b.jsx)(r,{name:i,className:a}),t[19]=r,t[20]=i,t[21]=a,t[22]=l):l=t[22];let u;return t[23]!==o||t[24]!==s||t[25]!==l?(u=(0,b.jsx)(`span`,{"aria-hidden":o,className:s,children:l}),t[23]=o,t[24]=s,t[25]=l,t[26]=u):u=t[26],u}let o=e.fallbackIcon??a;if(!i||l(i)){let n;return t[27]!==o||t[28]!==e.className||t[29]!==e.folderExpanded?(n=(0,b.jsx)(T,{className:e.className,icon:o,folderExpanded:e.folderExpanded}),t[27]=o,t[28]=e.className,t[29]=e.folderExpanded,t[30]=n):n=t[30],n}let d;t[31]!==n.environmentId||t[32]!==n.faviconPath||t[33]!==n.workspaceRoot?(d=u(n.environmentId,n.workspaceRoot,n.faviconPath),t[31]=n.environmentId,t[32]=n.faviconPath,t[33]=n.workspaceRoot,t[34]=d):d=t[34];let f=d,p;return t[35]!==o||t[36]!==f||t[37]!==e.className||t[38]!==e.folderExpanded||t[39]!==i?(p=(0,b.jsx)(E,{src:i,className:e.className,fallbackIcon:o,folderExpanded:e.folderExpanded},f),t[35]=o,t[36]=f,t[37]=e.className,t[38]=e.folderExpanded,t[39]=i,t[40]=p):p=t[40],p}function T(e){let t=(0,v.c)(13),{className:n,icon:r,emoji:i,folderExpanded:a}=e;if(i){let e;t[0]===n?e=t[1]:(e=c(`inline-flex size-3.5 shrink-0 items-center justify-center leading-none [container-type:size]`,n),t[0]=n,t[1]=e);let r;t[2]===i?r=t[3]:(r=(0,b.jsx)(`span`,{className:`text-[length:80cqh] leading-none`,children:i}),t[2]=i,t[3]=r);let a;return t[4]!==e||t[5]!==r?(a=(0,b.jsx)(`span`,{"aria-hidden":`true`,className:e,children:r}),t[4]=e,t[5]=r,t[6]=a):a=t[6],a}let o;t[7]===n?o=t[8]:(o=c(`size-3.5 shrink-0 text-icon-muted`,n),t[7]=n,t[8]=o);let s=o,l;return t[9]!==r||t[10]!==a||t[11]!==s?(l=a===void 0?(0,b.jsx)(r,{className:s}):(0,b.jsx)(p,{"aria-hidden":!0,className:s,icon:a?f:d}),t[9]=r,t[10]=a,t[11]=s,t[12]=l):l=t[12],l}function E(e){let t=(0,v.c)(18),{src:n,className:r,fallbackIcon:i,folderExpanded:a}=e,o;t[0]===n?o=t[1]:(o=()=>n.startsWith(`data:image/`)?n:null,t[0]=n,t[1]=o);let[s,l]=(0,y.useState)(o),u=s!==n,d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=e=>{l(t=>t===e?null:t)},t[2]=d):d=t[2];let f=d,p;t[3]!==i||t[4]!==r||t[5]!==s||t[6]!==a?(p=s===null?(0,b.jsx)(T,{className:r,icon:i,folderExpanded:a}):null,t[3]=i,t[4]=r,t[5]=s,t[6]=a,t[7]=p):p=t[7];let m;t[8]!==r||t[9]!==s?(m=s?(0,b.jsx)(`img`,{src:s,alt:``,className:c(`size-3.5 shrink-0 rounded-[25%] object-contain`,r),onError:()=>f(s)}):null,t[8]=r,t[9]=s,t[10]=m):m=t[10];let h;t[11]!==u||t[12]!==n?(h=u?(0,b.jsx)(`img`,{src:n,alt:``,className:`hidden`,onLoad:()=>{l(n)},onError:()=>f(n)}):null,t[11]=u,t[12]=n,t[13]=h):h=t[13];let g;return t[14]!==p||t[15]!==m||t[16]!==h?(g=(0,b.jsxs)(b.Fragment,{children:[p,m,h]}),t[14]=p,t[15]=m,t[16]=h,t[17]=g):g=t[17],g}export{w as t};
|
|
3
|
+
//# sourceMappingURL=ProjectFavicon-LcyFYpHB.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{Lb as i,fr as a,gh as o,m_ as s,t as c}from"./utils-
|
|
2
|
-
//# sourceMappingURL=ProjectIconPickerDialog-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Lb as i,fr as a,gh as o,m_ as s,t as c}from"./utils-C5GGWTfe.js";import{n as ee,t as l}from"./toggle-group-2e3XGJdx.js";import{t as u}from"./input-FUjAUGXY.js";import{t as te}from"./scroll-area-Cf7uLi_s.js";import{a as ne,c as re,i as d,o as ie,r as ae,s as oe,t as se}from"./dialog-BpR3dRVS.js";import{i as f,n as p,r as ce,t as le}from"./ProjectMonogram-C8FlNLaU.js";import{DynamicIcon as m,t as h}from"./dynamic-CVt07u2H.js";var g=n();function _(e){return e.normalize(`NFKC`).trim()}function v(e){let t=_(e).match(/[\p{L}\p{N}]+/gu)??[],n=t[0];if(!n)return`PR`;let r=Array.from(n),i=r[0]??`P`,a=r.slice(1).find(e=>/\p{N}/u.test(e))??(t.length>1?Array.from(t.at(-1)??``)[0]:r.at(-1))??i;return Array.from(`${i}${a}`.toUpperCase()).slice(0,2).join(``)}function y(e){let t=_(e).toLocaleLowerCase(`en-US`)||`project`,n=0;for(let e of t)n=(n*31+(e.codePointAt(0)??0))%p.length;return p[n]?.value??`blue`}function b(e){return{monogram:v(e),color:y(e)}}var x=e(t(),1),S=[`folder-code`,`code-2`,`terminal`,`globe-2`,`server`,`database`,`bot`,`sparkles`,`smartphone`,`monitor`,`cloud-cog`,`package`,`book-open`,`flask-conical`,`shield-check`,`rocket`,`gamepad-2`,`music`,`image`,`shopping-bag`,`git-branch`,`workflow`,`wrench`,`layers-3`],ue=[{emoji:`💻`,label:`Computer`},{emoji:`🛠️`,label:`Tools`},{emoji:`🚀`,label:`Rocket`},{emoji:`🤖`,label:`Robot`},{emoji:`✨`,label:`Sparkles`},{emoji:`⚡`,label:`Lightning`},{emoji:`🌐`,label:`Web`},{emoji:`📱`,label:`Mobile`},{emoji:`🖥️`,label:`Desktop`},{emoji:`⌨️`,label:`Keyboard`},{emoji:`⚙️`,label:`Gear`},{emoji:`🗄️`,label:`Database`},{emoji:`☁️`,label:`Cloud`},{emoji:`📦`,label:`Package`},{emoji:`📚`,label:`Books`},{emoji:`🧪`,label:`Test tube`},{emoji:`🔒`,label:`Lock`},{emoji:`🎮`,label:`Game`},{emoji:`🎵`,label:`Music`},{emoji:`🎬`,label:`Movie`},{emoji:`🖼️`,label:`Picture`},{emoji:`🛍️`,label:`Shopping`},{emoji:`🔥`,label:`Fire`},{emoji:`💡`,label:`Idea`},{emoji:`🧩`,label:`Puzzle`},{emoji:`📊`,label:`Chart`},{emoji:`🧠`,label:`Brain`},{emoji:`🦄`,label:`Unicorn`},{emoji:`🐙`,label:`Octopus`},{emoji:`🌱`,label:`Seedling`}];function de(e){let t=e.trim().toLowerCase().replaceAll(/\s+/g,`-`);return t?h.filter(e=>e.includes(t)).slice(0,60):S}function fe(e){let t=e.trim();if(!t)return null;let n=new Intl.Segmenter(void 0,{granularity:`grapheme`}).segment(t)[Symbol.iterator]().next().value?.segment,r=/^\p{Regional_Indicator}{2}$/u.test(n??``),i=/^[#*0-9]\uFE0F?\u20E3$/u.test(n??``);return!n||!/\p{Extended_Pictographic}/u.test(n)&&!r&&!i?null:n}var C=e(r(),1),pe=`folder-code`,me=i(s);function he(e){let t=(0,g.c)(8),{name:n}=e,r=o(),i;t[0]!==n||t[1]!==r?(i=f(r,n),t[0]=n,t[1]=r,t[2]=i):i=t[2];let{p4:a,strokeWidth:s}=i;if(a){let e;return t[3]===a?e=t[4]:(e=(0,C.jsx)(a,{className:`size-5`}),t[3]=a,t[4]=e),e}let c;return t[5]!==n||t[6]!==s?(c=(0,C.jsx)(m,{name:n,className:`size-5`,strokeWidth:s}),t[5]=n,t[6]=s,t[7]=c):c=t[7],c}function ge(e){return e.split(`-`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function w(e){let t=(0,g.c)(84),{current:n,projectName:r,open:i,onOpenChange:o,onSelect:s}=e,f;t[0]===r?f=t[1]:(f=b(r),t[0]=r,t[1]=f);let m=f,[h,_]=(0,x.useState)(n?.kind??`lucide`),[v,y]=(0,x.useState)(n?.kind===`lucide`?n.name:pe),[S,w]=(0,x.useState)(n&&n.kind!==`emoji`?n.color:m.color),[T,_e]=(0,x.useState)(n?.kind===`monogram`?n.text:m.monogram),[E,D]=(0,x.useState)(n?.kind===`emoji`?n.emoji:`💻`),[O,ve]=(0,x.useState)(``),[k,ye]=(0,x.useState)(``),be=(0,x.useRef)(!1),A,j;t[2]!==m.color||t[3]!==m.monogram||t[4]!==n||t[5]!==i?(A=()=>{i&&!be.current&&(_(n?.kind??`lucide`),y(n?.kind===`lucide`?n.name:pe),w(n&&n.kind!==`emoji`?n.color:m.color),_e(n?.kind===`monogram`?n.text:m.monogram),D(n?.kind===`emoji`?n.emoji:`💻`),ve(``),ye(``)),be.current=i},j=[n,i,m.color,m.monogram],t[2]=m.color,t[3]=m.monogram,t[4]=n,t[5]=i,t[6]=A,t[7]=j):(A=t[6],j=t[7]),(0,x.useEffect)(A,j);let M;t[8]===O?M=t[9]:(M=de(O),t[8]=O,t[9]=M);let N=M,P,F,I,L,R,z,B,V,H,U,W,G,K;if(t[10]!==m.monogram||t[11]!==S||t[12]!==k||t[13]!==E||t[14]!==v||t[15]!==N||t[16]!==T||t[17]!==h||t[18]!==o||t[19]!==s||t[20]!==i||t[21]!==O){let e=ce(S),n,r;t[35]===T?(n=t[36],r=t[37]):(n=T.normalize(`NFKC`).trim().toUpperCase(),r=me(n),t[35]=T,t[36]=n,t[37]=r),K=r;let a;t[38]!==S||t[39]!==E||t[40]!==v||t[41]!==h||t[42]!==n||t[43]!==o||t[44]!==s||t[45]!==K?(a=()=>{(h!==`monogram`||K)&&(s(h===`monogram`?{kind:`monogram`,text:n,color:S}:h===`lucide`?{kind:`lucide`,name:v,color:S}:{kind:`emoji`,emoji:E}),o(!1))},t[38]=S,t[39]=E,t[40]=v,t[41]=h,t[42]=n,t[43]=o,t[44]=s,t[45]=K,t[46]=a):a=t[46],L=a,I=se,z=i,B=o,F=oe,G=`w-full sm:w-[32rem]`,t[47]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,C.jsxs)(ne,{children:[(0,C.jsx)(re,{children:`Choose project icon`}),(0,C.jsx)(ae,{children:`Choose an icon, emoji, or monogram.`})]}),t[47]=R):R=t[47],P=ie,V=`flex min-h-0 flex-col`;let d;t[48]===h?d=t[49]:(d=[h],t[48]=h,t[49]=d);let f,g,b,x;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>{let t=e[0];(t===`lucide`||t===`emoji`||t===`monogram`)&&_(t)},g=(0,C.jsx)(l,{value:`lucide`,children:`Icons`}),b=(0,C.jsx)(l,{value:`emoji`,children:`Emoji`}),x=(0,C.jsx)(l,{value:`monogram`,children:`Monogram`}),t[50]=f,t[51]=g,t[52]=b,t[53]=x):(f=t[50],g=t[51],b=t[52],x=t[53]),t[54]===d?H=t[55]:(H=(0,C.jsxs)(ee,{"aria-label":`Icon type`,variant:`segmented`,value:d,onValueChange:f,children:[g,b,x]}),t[54]=d,t[55]=H),t[56]!==S||t[57]!==h?(U=h===`emoji`?null:(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`div`,{className:`mb-2 text-xs font-medium text-muted-foreground`,children:`Color`}),(0,C.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,role:`group`,"aria-label":`Icon color`,children:p.map(e=>(0,C.jsx)(`button`,{type:`button`,"aria-label":e.label,"aria-pressed":S===e.value,className:c(`flex size-6 items-center justify-center rounded-full border border-transparent outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,S===e.value&&`border-foreground/64`),onClick:()=>w(e.value),children:(0,C.jsx)(`span`,{className:c(`size-4 rounded-full`,e.swatchClassName)})},e.value))})]}),t[56]=S,t[57]=h,t[58]=U):U=t[58],W=h===`lucide`?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(u,{type:`search`,value:O,"aria-label":`Search Lucide icons`,placeholder:`Search all Lucide icons`,onChange:e=>ve(e.currentTarget.value)}),(0,C.jsx)(te,{scrollFade:!0,className:`max-h-64`,children:(0,C.jsx)(`div`,{className:`grid grid-cols-8 gap-1 p-0.5 sm:grid-cols-10`,children:N.map(t=>(0,C.jsx)(`button`,{type:`button`,"aria-label":ge(t),"aria-pressed":v===t,className:c(`flex aspect-square items-center justify-center rounded-md border border-transparent outline-none hover:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,v===t&&`border-border bg-accent`,e),onClick:()=>y(t),children:(0,C.jsx)(he,{name:t})},t))})}),N.length===0?(0,C.jsx)(`p`,{className:`py-8 text-center text-sm text-muted-foreground`,children:`No icons found.`}):null]}):h===`monogram`?(0,C.jsxs)(`div`,{className:`flex items-center gap-4 py-2`,children:[(0,C.jsx)(le,{text:K?n:m.monogram,color:S,className:`size-12`}),(0,C.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,C.jsx)(`label`,{htmlFor:`project-monogram`,className:`text-sm font-medium`,children:`Letters`}),(0,C.jsx)(u,{id:`project-monogram`,value:T,onChange:e=>_e(e.currentTarget.value),"aria-describedby":`project-monogram-hint`,"aria-invalid":!K,autoComplete:`off`}),(0,C.jsx)(`p`,{id:`project-monogram-hint`,className:`text-xs text-muted-foreground`,children:`One or two letters or numbers.`})]})]}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(te,{scrollFade:!0,className:`max-h-64`,children:(0,C.jsx)(`div`,{className:`grid grid-cols-8 gap-1 p-0.5 sm:grid-cols-10`,children:ue.map(e=>(0,C.jsx)(`button`,{type:`button`,"aria-label":e.label,"aria-pressed":E===e.emoji,className:c(`flex aspect-square items-center justify-center rounded-md border border-transparent text-xl outline-none hover:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,E===e.emoji&&`border-border bg-accent`),onClick:()=>D(e.emoji),children:e.emoji},e.emoji))})}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`div`,{className:`mb-2 text-xs font-medium text-muted-foreground`,children:`Or paste any emoji`}),(0,C.jsx)(u,{value:k,"aria-label":`Custom emoji`,placeholder:`Paste an emoji`,onChange:e=>{let t=e.currentTarget.value;ye(t);let n=fe(t);n&&D(n)}})]})]}),t[10]=m.monogram,t[11]=S,t[12]=k,t[13]=E,t[14]=v,t[15]=N,t[16]=T,t[17]=h,t[18]=o,t[19]=s,t[20]=i,t[21]=O,t[22]=P,t[23]=F,t[24]=I,t[25]=L,t[26]=R,t[27]=z,t[28]=B,t[29]=V,t[30]=H,t[31]=U,t[32]=W,t[33]=G,t[34]=K}else P=t[22],F=t[23],I=t[24],L=t[25],R=t[26],z=t[27],B=t[28],V=t[29],H=t[30],U=t[31],W=t[32],G=t[33],K=t[34];let q;t[59]!==P||t[60]!==V||t[61]!==H||t[62]!==U||t[63]!==W?(q=(0,C.jsxs)(P,{className:V,children:[H,U,W]}),t[59]=P,t[60]=V,t[61]=H,t[62]=U,t[63]=W,t[64]=q):q=t[64];let J;t[65]===o?J=t[66]:(J=(0,C.jsx)(a,{variant:`outline`,onClick:()=>o(!1),children:`Cancel`}),t[65]=o,t[66]=J);let Y=h===`monogram`&&!K,X;t[67]!==L||t[68]!==Y?(X=(0,C.jsx)(a,{onClick:L,disabled:Y,children:`Save icon`}),t[67]=L,t[68]=Y,t[69]=X):X=t[69];let Z;t[70]!==J||t[71]!==X?(Z=(0,C.jsxs)(d,{children:[J,X]}),t[70]=J,t[71]=X,t[72]=Z):Z=t[72];let Q;t[73]!==F||t[74]!==R||t[75]!==q||t[76]!==Z||t[77]!==G?(Q=(0,C.jsxs)(F,{className:G,children:[R,q,Z]}),t[73]=F,t[74]=R,t[75]=q,t[76]=Z,t[77]=G,t[78]=Q):Q=t[78];let $;return t[79]!==I||t[80]!==z||t[81]!==B||t[82]!==Q?($=(0,C.jsx)(I,{open:z,onOpenChange:B,children:Q}),t[79]=I,t[80]=z,t[81]=B,t[82]=Q,t[83]=$):$=t[83],$}export{w as ProjectIconPickerDialog};
|
|
2
|
+
//# sourceMappingURL=ProjectIconPickerDialog-D03-Jrsi.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{Lp as r,mh as i,t as a}from"./utils-
|
|
2
|
-
//# sourceMappingURL=ProjectMonogram-
|
|
1
|
+
import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{Lp as r,mh as i,t as a}from"./utils-C5GGWTfe.js";function o(e,t){return e===`lucide`?{p4:null,strokeWidth:2}:{p4:r[t]??null,strokeWidth:i(void 0)}}var s=t(),c=[{value:`gray`,label:`Gray`,className:`text-gray-600 dark:text-gray-400`,swatchClassName:`bg-gray-500`},{value:`red`,label:`Red`,className:`text-red-600 dark:text-red-400`,swatchClassName:`bg-red-500`},{value:`orange`,label:`Orange`,className:`text-orange-600 dark:text-orange-400`,swatchClassName:`bg-orange-500`},{value:`amber`,label:`Amber`,className:`text-amber-600 dark:text-amber-400`,swatchClassName:`bg-amber-500`},{value:`yellow`,label:`Yellow`,className:`text-yellow-600 dark:text-yellow-400`,swatchClassName:`bg-yellow-500`},{value:`lime`,label:`Lime`,className:`text-lime-600 dark:text-lime-400`,swatchClassName:`bg-lime-500`},{value:`green`,label:`Green`,className:`text-green-600 dark:text-green-400`,swatchClassName:`bg-green-500`},{value:`emerald`,label:`Emerald`,className:`text-emerald-600 dark:text-emerald-400`,swatchClassName:`bg-emerald-500`},{value:`teal`,label:`Teal`,className:`text-teal-600 dark:text-teal-400`,swatchClassName:`bg-teal-500`},{value:`cyan`,label:`Cyan`,className:`text-cyan-600 dark:text-cyan-400`,swatchClassName:`bg-cyan-500`},{value:`sky`,label:`Sky`,className:`text-sky-600 dark:text-sky-400`,swatchClassName:`bg-sky-500`},{value:`blue`,label:`Blue`,className:`text-blue-600 dark:text-blue-400`,swatchClassName:`bg-blue-500`},{value:`indigo`,label:`Indigo`,className:`text-indigo-600 dark:text-indigo-400`,swatchClassName:`bg-indigo-500`},{value:`violet`,label:`Violet`,className:`text-violet-600 dark:text-violet-400`,swatchClassName:`bg-violet-500`},{value:`purple`,label:`Purple`,className:`text-purple-600 dark:text-purple-400`,swatchClassName:`bg-purple-500`},{value:`fuchsia`,label:`Fuchsia`,className:`text-fuchsia-600 dark:text-fuchsia-400`,swatchClassName:`bg-fuchsia-500`},{value:`pink`,label:`Pink`,className:`text-pink-600 dark:text-pink-400`,swatchClassName:`bg-pink-500`},{value:`rose`,label:`Rose`,className:`text-rose-600 dark:text-rose-400`,swatchClassName:`bg-rose-500`}],l=Object.fromEntries(c.map(({value:e,className:t})=>[e,t]));function u(e){return l[e]}var d=e(n(),1),f=new Intl.Segmenter(void 0,{granularity:`grapheme`});function p(e){let t=(0,s.c)(14),{text:n,color:r,className:i}=e,o;t[0]===i?o=t[1]:(o=a(`inline-flex size-4 shrink-0 items-center justify-center`,i),t[0]=i,t[1]=o);let c;t[2]===r?c=t[3]:(c=a(`size-full overflow-hidden rounded-[25%] font-mono select-none`,u(r)),t[2]=r,t[3]=c);let l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l={backgroundColor:`color-mix(in srgb, currentColor 14%, transparent)`},t[4]=l):l=t[4];let p=Array.from(f.segment(n)).length===1?6:12,m;t[5]!==p||t[6]!==n?(m=(0,d.jsx)(`text`,{x:`8`,y:`10.8`,textAnchor:`middle`,fill:`currentColor`,className:`font-mono`,fontSize:`8.25`,fontWeight:`700`,textLength:p,lengthAdjust:`spacingAndGlyphs`,textRendering:`geometricPrecision`,children:n}),t[5]=p,t[6]=n,t[7]=m):m=t[7];let h;t[8]!==c||t[9]!==m?(h=(0,d.jsx)(`svg`,{viewBox:`0 0 16 16`,className:c,style:l,children:m}),t[8]=c,t[9]=m,t[10]=h):h=t[10];let g;return t[11]!==o||t[12]!==h?(g=(0,d.jsx)(`span`,{"aria-hidden":`true`,className:o,children:h}),t[11]=o,t[12]=h,t[13]=g):g=t[13],g}export{o as i,c as n,u as r,p as t};
|
|
2
|
+
//# sourceMappingURL=ProjectMonogram-C8FlNLaU.js.map
|
package/dist/client/assets/{ProviderAuthTerminal-CCw2XmNz.js → ProviderAuthTerminal-DMTbKboR.js}
RENAMED
|
@@ -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{q as i}from"./useSettings-
|
|
2
|
-
//# sourceMappingURL=ProviderAuthTerminal-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{q as i}from"./useSettings-B09a3zie.js";import{c as a,r as o}from"./ThreadTerminalDrawer-CD3plt2C.js";var s=n(),c=e(t(),1),l=e(r(),1);function u(e){let t=(0,s.c)(16),{output:n,outputOffset:r,onResponse:u}=e,p=(0,c.useRef)(null),m=(0,c.useRef)(null),h=r??n.length,g;t[0]!==u||t[1]!==n||t[2]!==h?(g={output:n,offset:h,onResponse:u},t[0]=u,t[1]=n,t[2]=h,t[3]=g):g=t[3];let _=(0,c.useRef)(g),v=(0,c.useRef)(0),[y,b]=(0,c.useState)(null),x,S;t[4]!==u||t[5]!==n||t[6]!==r?(x=()=>{_.current={output:n,offset:r??n.length,onResponse:u};let e=m.current;if(!e)return;let t=_.current.offset-v.current;t>0&&t<=n.length?e.write(n.slice(-t)):t!==0&&e.resetAndWrite(n),v.current=_.current.offset},S=[n,r,u],t[4]=u,t[5]=n,t[6]=r,t[7]=x,t[8]=S):(x=t[7],S=t[8]),(0,c.useEffect)(x,S);let C,w;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>{let e=p.current;if(!e)return;let t=!1;return a.create(e,{theme:o(e),font:{size:13},onData:e=>_.current.onResponse({type:`terminal`,data:e}),onResize:(e,t)=>_.current.onResponse({type:`terminal`,data:``,size:{cols:e,rows:t}}),onSelectionChange:f,beforeKey:d,onLinkActivate:e=>{/^https?:\/\//i.test(e)&&i().shell.openExternal(e).catch(()=>b(`Could not open the provider link.`))}}).then(e=>{t?e.dispose():(m.current=e,e.write(_.current.output),v.current=_.current.offset)}).catch(()=>b(`Could not load the sign-in terminal. Cancel and retry sign-in.`)),()=>{t=!0,m.current?.dispose(),m.current=null}},w=[],t[9]=C,t[10]=w):(C=t[9],w=t[10]),(0,c.useEffect)(C,w);let T;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,l.jsx)(`div`,{ref:p,"aria-label":`Provider sign-in terminal`,className:`relative h-64 overflow-hidden rounded-md border border-border`}),t[11]=T):T=t[11];let E;t[12]===y?E=t[13]:(E=y?(0,l.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:y}):null,t[12]=y,t[13]=E);let D;return t[14]===E?D=t[15]:(D=(0,l.jsxs)(l.Fragment,{children:[T,E]}),t[14]=E,t[15]=D),D}function d(e){return e.key!==`Tab`}function f(){}export{u as default};
|
|
2
|
+
//# sourceMappingURL=ProviderAuthTerminal-DMTbKboR.js.map
|