decocms 4.355.0 → 4.355.2
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/client/assets/{AlertCircle-Bpv9M3Mo.js → AlertCircle-C2I0CPt8.js} +1 -1
- package/dist/client/assets/{AreaChart-CI6aJo6b.js → AreaChart-DvG2Chn9.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DdhFLsvX.js → ArrowLeft-DiFtyxtp.js} +1 -1
- package/dist/client/assets/{ArrowRight-BuNp61o4.js → ArrowRight-Cr3akrFT.js} +1 -1
- package/dist/client/assets/{ArrowUp-3idF8h-F.js → ArrowUp-DF6vzMhN.js} +1 -1
- package/dist/client/assets/{Check-BeSUa4SA.js → Check-sicxXYN7.js} +1 -1
- package/dist/client/assets/{CheckCircle-B9b2Ze8a.js → CheckCircle-Cbkf0Hrm.js} +1 -1
- package/dist/client/assets/{ChevronRight-B4xjdR-V.js → ChevronRight-r0gLJbn2.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-Bookbgd_.js → ChevronSelectorVertical-CejccrOe.js} +1 -1
- package/dist/client/assets/{ChevronUp-92pPtFia.js → ChevronUp-CBLrm_OT.js} +1 -1
- package/dist/client/assets/{Copy01-DZjNdwnY.js → Copy01-BzbXBjHv.js} +1 -1
- package/dist/client/assets/{CreditCard01-ja32JXES.js → CreditCard01-C8AQ6_dn.js} +1 -1
- package/dist/client/assets/{DotsVertical-Cyoi6mM-.js → DotsVertical-Cyt1EoXA.js} +1 -1
- package/dist/client/assets/{Download01-BJ0Aw71K.js → Download01-Db1D2BD0.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-DmjAhEdT.js → ErrorBarContext-BdZSwiSN.js} +1 -1
- package/dist/client/assets/{Eye-BokJBg-8.js → Eye-QPQVcqGb.js} +1 -1
- package/dist/client/assets/{GitBranch01-DjBM23NV.js → GitBranch01-D3Ep4J5o.js} +1 -1
- package/dist/client/assets/{Globe01-BpBePEO9.js → Globe01-dlVOEKaQ.js} +1 -1
- package/dist/client/assets/{HardDrive-nnly2qPC.js → HardDrive-W8kLhAmw.js} +1 -1
- package/dist/client/assets/{Image01-C7w_5NYE.js → Image01-B1m-gUl3.js} +1 -1
- package/dist/client/assets/{Key01-DpcwZmv-.js → Key01-DquPZpqN.js} +1 -1
- package/dist/client/assets/{Link01-CAQid5t0.js → Link01-ClTL5UTN.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DFTJ8Aoq.js → LinkExternal01-BepJT7Oz.js} +1 -1
- package/dist/client/assets/{Monitor01-BslR886c.js → Monitor01-Bndg-M3Y.js} +1 -1
- package/dist/client/assets/{Package-DXK0LLmt.js → Package-B2Up-gTH.js} +1 -1
- package/dist/client/assets/{Palette-CuHE99fD.js → Palette-BsEqDIgy.js} +1 -1
- package/dist/client/assets/{Play-BvFpl0fO.js → Play-DZtU_bVy.js} +1 -1
- package/dist/client/assets/{Plus-BQUCrYF9.js → Plus-5jblmb5M.js} +1 -1
- package/dist/client/assets/{SearchLg-Bt9MbMuw.js → SearchLg-DFeP1_X8.js} +1 -1
- package/dist/client/assets/{SearchMd-DaEAX-Rt.js → SearchMd-CnBFXj_Z.js} +1 -1
- package/dist/client/assets/{Sector-ZbPmglZy.js → Sector-DnHG75nj.js} +1 -1
- package/dist/client/assets/{Settings02-BCUOna1P.js → Settings02-5WiTDc8b.js} +1 -1
- package/dist/client/assets/{Share07-5UuFsPQD.js → Share07-DzTdSg05.js} +1 -1
- package/dist/client/assets/{Shield01-DujarpiA.js → Shield01-qqcKLTxE.js} +1 -1
- package/dist/client/assets/{Stars01-CEuw7OKB.js → Stars01-CFR1c-1g.js} +1 -1
- package/dist/client/assets/{Sun-DyvDnRb-.js → Sun-Bxqb4eKN.js} +1 -1
- package/dist/client/assets/{Tool01-C9HWfAnp.js → Tool01-DCz0PgHD.js} +1 -1
- package/dist/client/assets/{Tool02-AemZ--z3.js → Tool02-Dx9QVS5U.js} +1 -1
- package/dist/client/assets/{Trash01-Djv1nLoz.js → Trash01-D5ciFh4O.js} +1 -1
- package/dist/client/assets/{TrendUp01-Dqmx1wpU.js → TrendUp01-DjG8w8m_.js} +1 -1
- package/dist/client/assets/{Upload01-Z5iM-Tiz.js → Upload01-Dbydv0Li.js} +1 -1
- package/dist/client/assets/{User01-wEgf8NoL.js → User01-Dq0QszR-.js} +1 -1
- package/dist/client/assets/{UserSquare-DtPXmwBX.js → UserSquare-Bi0Jy-6E.js} +1 -1
- package/dist/client/assets/{Users01-l-9DDbBW.js → Users01-C_RVSWfd.js} +1 -1
- package/dist/client/assets/{Users03-DhT0plpt.js → Users03-DPq3XXBm.js} +1 -1
- package/dist/client/assets/{XCircle-C-xpPFXd.js → XCircle-CiIZAkGm.js} +1 -1
- package/dist/client/assets/{XClose-D4Bvg4QW.js → XClose-hM3AAAai.js} +1 -1
- package/dist/client/assets/{Zap-Z_UfUTMz.js → Zap-Bb7Qo7M3.js} +1 -1
- package/dist/client/assets/{ZoomOut-DoJ8bcep.js → ZoomOut-B_xPvOLH.js} +1 -1
- package/dist/client/assets/{access-gate-6EYcqWG4.js → access-gate-B2eHW19E.js} +1 -1
- package/dist/client/assets/{agent-icon-1FhRoNmT.js → agent-icon-BMTcgZga.js} +1 -1
- package/dist/client/assets/{agents-list-aTiLEV6u.js → agents-list-C54ZadWw.js} +1 -1
- package/dist/client/assets/{ai-providers-BPHj7NHz.js → ai-providers-BzDqK8qy.js} +1 -1
- package/dist/client/assets/{alert-Cz-ifxc3.js → alert-BrLgpHg1.js} +1 -1
- package/dist/client/assets/{alert-dialog-D4B8xwmj.js → alert-dialog-BikX6FFY.js} +1 -1
- package/dist/client/assets/analytics-tab-CsPoqNEM.js +2 -0
- package/dist/client/assets/api-keys-Cdmmw61O.js +1 -0
- package/dist/client/assets/{api-keys-G_Due0S2.js → api-keys-Cq2DDoKg.js} +1 -1
- package/dist/client/assets/app-editor-BNKwsB0C.js +1 -0
- package/dist/client/assets/{auth-BwGmO91c.js → auth-CNVXmSkG.js} +1 -1
- package/dist/client/assets/{auth-catchall-DDJQYz5_.js → auth-catchall-5CZsMp3G.js} +1 -1
- package/dist/client/assets/{auth-entry-B2ZJMuFl.js → auth-entry-CamvS-yK.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CN1G0CMa.js → auth-split-layout-BOtLd_pv.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CXHQCghQ.js → authenticate-and-persist-oauth-DZYDyEg2.js} +1 -1
- package/dist/client/assets/{automation-list-row-C5k98k29.js → automation-list-row-Dj0Hlwog.js} +1 -1
- package/dist/client/assets/{automation-runs-T6pywo7x.js → automation-runs-2af22T9w.js} +8 -8
- package/dist/client/assets/{automations-DM5wnYr-.js → automations-B2SV0OTy.js} +1 -1
- package/dist/client/assets/{autosend-BSYpWfil.js → autosend-D9JhT_oZ.js} +1 -1
- package/dist/client/assets/{avatar-D1uraqXx.js → avatar-CPkw3h7t.js} +1 -1
- package/dist/client/assets/{badge-DJqPRhkR.js → badge-C_ARXG3i.js} +1 -1
- package/dist/client/assets/{block-document-DTd65w3u.js → block-document-B8RakH2B.js} +1 -1
- package/dist/client/assets/{breadcrumb-BlpOkR-x.js → breadcrumb-CsyYyKv7.js} +1 -1
- package/dist/client/assets/{buckets-iaZdXcps.js → buckets-C3rsO-J0.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CVW02rsB.js → bulk-category-panel-8YfIcV58.js} +1 -1
- package/dist/client/assets/{capability-load-error-CZZauU11.js → capability-load-error-_DjYgnoI.js} +1 -1
- package/dist/client/assets/{cards-CSiCIOz0.js → cards-C17dmtwv.js} +1 -1
- package/dist/client/assets/{category-editor-9CubYkk1.js → category-editor-DRxFVwt9.js} +1 -1
- package/dist/client/assets/{cdn-tab-BKqDZ-uC.js → cdn-tab-xbZtzilg.js} +1 -1
- package/dist/client/assets/{chart-BnDfVchh.js → chart-HqfMLVT_.js} +1 -1
- package/dist/client/assets/{chat-context-BIl0a_-x.js → chat-context-CvoU8WQ4.js} +1 -1
- package/dist/client/assets/{checkbox-BImR-liK.js → checkbox-Cgrb5XJJ.js} +1 -1
- package/dist/client/assets/{choose-editor-0NO9eWVe.js → choose-editor-DWeJjqnG.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DY7HYokl.js → cli-auth-success-BdI--VSg.js} +1 -1
- package/dist/client/assets/{client-icons-vSG7gy4v.js → client-icons-B-EXG49U.js} +1 -1
- package/dist/client/assets/{collection-detail-sBWmRaHM.js → collection-detail-swCyhtIz.js} +1 -1
- package/dist/client/assets/{collection-display-button-ClvPIcxe.js → collection-display-button-BbFCPrTl.js} +1 -1
- package/dist/client/assets/{collection-search-DkFPt7IO.js → collection-search-CJb7f2bn.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-McYG2YRD.js → collection-table-wrapper-DC-4y8I-.js} +1 -1
- package/dist/client/assets/{collection-tabs-BuLa0mCq.js → collection-tabs-BxnrIEJp.js} +1 -1
- package/dist/client/assets/{command-vpSyzNuL.js → command-CqNTTNRi.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-4St63hl8.js → commerce-onboarding-DFX26jT9.js} +1 -1
- package/dist/client/assets/{connect-DBMogdEa.js → connect-DtII47Uj.js} +1 -1
- package/dist/client/assets/{connect-layout-Col0jLYd.js → connect-layout-TQ2j2S05.js} +1 -1
- package/dist/client/assets/{connection-yNLgkrwi.js → connection-DtCer1Uy.js} +1 -1
- package/dist/client/assets/{connection-card-DyBNdLax.js → connection-card-BzEzwA5b.js} +1 -1
- package/dist/client/assets/{connection-detail-B3UtQpZv.js → connection-detail-BqVCcP--.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CthU9O7u.js → connection-form-helpers-swpd49hK.js} +1 -1
- package/dist/client/assets/{connections-B5JhkcgY.js → connections-BtJpCjSi.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-B7gkkCpX.js → create-organization-dialog-_A_tQwgl.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DLf4riY9.js → decopilot-sse-pool-pjl5bOdE.js} +1 -1
- package/dist/client/assets/{dialog-Cu56JIH4.js → dialog-B0OdXcqs.js} +1 -1
- package/dist/client/assets/{domain-settings-BDQWQ3G5.js → domain-settings-D9jM3qAJ.js} +1 -1
- package/dist/client/assets/{drawer-xpx6fUMk.js → drawer-C2s6Up5H.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DhGKgZoF.js → dropdown-menu-CoV3z2Yq.js} +1 -1
- package/dist/client/assets/{e2e-tab-Uok9Zbg0.js → e2e-tab-H0hc-BZ9.js} +1 -1
- package/dist/client/assets/{editor-CHXbZUF2.js → editor-DDZRpuBY.js} +1 -1
- package/dist/client/assets/{empty-state-E9qel69s.js → empty-state-CZg3u6TE.js} +1 -1
- package/dist/client/assets/{empty-state-BJi4GyzM.js → empty-state-UGFooPJ_.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C8qw7buo.js → extract-connection-data-BPXLZ9J6.js} +1 -1
- package/dist/client/assets/{file-explorer-D2MaNOOd.js → file-explorer-CDJlhfne.js} +1 -1
- package/dist/client/assets/{file-type-icon-CelUV-GT.js → file-type-icon-DnRMRlEa.js} +1 -1
- package/dist/client/assets/{folder-icon-CjwmyQMd.js → folder-icon-D1UH1rlz.js} +1 -1
- package/dist/client/assets/{form-DHeCY5Wn.js → form-TWkufiDd.js} +1 -1
- package/dist/client/assets/{general-BNBamkvz.js → general-Dm-xRItO.js} +1 -1
- package/dist/client/assets/{github-icon-BKLlhfRv.js → github-icon-DMu-fvNj.js} +1 -1
- package/dist/client/assets/{hooks-DFJk8jbs.js → hooks-BJUiYjpq.js} +1 -1
- package/dist/client/assets/{index-DELErGs0.js → index-B5IAGVkM.js} +6 -6
- package/dist/client/assets/{index-C-J8uMw0.js → index-BI90bdn8.js} +1 -1
- package/dist/client/assets/{index-CFeGxYqE.js → index-BPwgxBBZ.js} +1 -1
- package/dist/client/assets/index-Bf3UYpNv.js +1 -0
- package/dist/client/assets/{index-va4b2aOg.js → index-CNT4COX0.js} +1 -1
- package/dist/client/assets/{index-dxjbAgdh.js → index-D6kz3ebr.js} +4 -4
- package/dist/client/assets/index-DBDSE4L5.css +1 -0
- package/dist/client/assets/{index-Cc7KoEkT.js → index-DIovfAvf.js} +1 -1
- package/dist/client/assets/{index-DoxGoN7B.js → index-DeOJD6d8.js} +1 -1
- package/dist/client/assets/{index-DmJkJ48u.js → index-Dfke77qN.js} +1 -1
- package/dist/client/assets/{index-Dyeksy7m.js → index-DucBuZzH.js} +1 -1
- package/dist/client/assets/{index-7UtRrrfH.js → index-KPDf_vWx.js} +1 -1
- package/dist/client/assets/{index-og4Spetx.js → index-ObR7HuX3.js} +1 -1
- package/dist/client/assets/{index-redirect-DfPYmTWZ.js → index-redirect-n5VV5WB_.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-Ckg2pf_5.js → infiniteQueryObserver-Dld3rVqh.js} +1 -1
- package/dist/client/assets/{infra-billing-D3bxP1xR.js → infra-billing-D04CQzUh.js} +1 -1
- package/dist/client/assets/{input-D3JPMdmV.js → input-SHpohkkd.js} +1 -1
- package/dist/client/assets/{integration-icon-CEDJP9F9.js → integration-icon-BQARLIol.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-7yVBiVZs.js → invite-member-dialog-DGV9h8p7.js} +1 -1
- package/dist/client/assets/{label-Dh3WRFmE.js → label-rD90jMRy.js} +1 -1
- package/dist/client/assets/{layout-DqyOlEbl.js → layout-DneON2K-.js} +1 -1
- package/dist/client/assets/{login-D278JoQz.js → login-KMTs7jKS.js} +1 -1
- package/dist/client/assets/{markdown-1rFQRUR9.js → markdown-DOFXhXXc.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DFHspdqa.js → mcp-app-renderer-DzI0XDOX.js} +1 -1
- package/dist/client/assets/{mcp-oauth-ByU5B1wW.js → mcp-oauth-DHIeN6FN.js} +1 -1
- package/dist/client/assets/{members-gPb1VBrz.js → members-AHwwCvg3.js} +1 -1
- package/dist/client/assets/{monaco-editor-xNBPUyci.js → monaco-editor-BncUqSbn.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CTcn8kET.js → monitoring-stats-row-CEzHQPkU.js} +1 -1
- package/dist/client/assets/{multi-select-CSTRbAjP.js → multi-select-BuWqwtfL.js} +1 -1
- package/dist/client/assets/{oauth-callback-D9RrrWns.js → oauth-callback-BC7x9Uxy.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-UfQuJ5IE.js → oauth-callback-ai-provider-Difk9x6B.js} +1 -1
- package/dist/client/assets/{onboarding-hxoYisO5.js → onboarding-EhIUSeAF.js} +1 -1
- package/dist/client/assets/{org-layout-DALqGD_O.js → org-layout-CSFqN6iA.js} +1 -1
- package/dist/client/assets/{organization-choice-WksAAcxm.js → organization-choice-NrSjC7-6.js} +1 -1
- package/dist/client/assets/{orgs-wJxsPbri.js → orgs-02MvW8eo.js} +1 -1
- package/dist/client/assets/{page-seo-form-B3aDHmKL.js → page-seo-form-F8gftHfe.js} +1 -1
- package/dist/client/assets/{popover-CyZEnWsJ.js → popover-DClv4J5a.js} +1 -1
- package/dist/client/assets/{post-calendar-C8q4m1oe.js → post-calendar-BqjLapsw.js} +1 -1
- package/dist/client/assets/{post-editor-uE69x_3z.js → post-editor-CKi-qWNG.js} +1 -1
- package/dist/client/assets/{primitives-XEg2tBES.js → primitives-DpTtwzO3.js} +1 -1
- package/dist/client/assets/{profile-C_-FxiCf.js → profile-DDFJC2Vv.js} +1 -1
- package/dist/client/assets/{project-app-view-CeV_fYE3.js → project-app-view-BxEzaMDJ.js} +1 -1
- package/dist/client/assets/{project-icon-vuMrDOh-.js → project-icon-DB0uWZzs.js} +1 -1
- package/dist/client/assets/{prompts-2WRJdZ-p.js → prompts-Dwzm6Z4Z.js} +1 -1
- package/dist/client/assets/record-editor-DLoE_u56.js +1 -0
- package/dist/client/assets/redirect-editor-B9a7bR4b.js +1 -0
- package/dist/client/assets/registry-DJi9P9E9.js +2 -0
- package/dist/client/assets/{registry-layout-D8zhDJsw.js → registry-layout-DY-ilKoy.js} +1 -1
- package/dist/client/assets/{reports-DNGBgxvJ.js → reports-dy7OW4nR.js} +1 -1
- package/dist/client/assets/{repositories-BO2Ye-lN.js → repositories-B3EUtLfQ.js} +1 -1
- package/dist/client/assets/{repository-import-picker-B8nAlUYR.js → repository-import-picker-Ds-7ia8x.js} +1 -1
- package/dist/client/assets/{repository-picker-IES4m5H2.js → repository-picker-zcqpFECf.js} +1 -1
- package/dist/client/assets/{require-capability-CqfrOrds.js → require-capability-BkcUyh1H.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BXfNtcI6.js → required-auth-layout-BkCbiYhR.js} +1 -1
- package/dist/client/assets/{reset-password-BQhxf0JD.js → reset-password-B5BEqtw9.js} +1 -1
- package/dist/client/assets/{review-settings-CG3U9yzv.js → review-settings-V3J_suZO.js} +1 -1
- package/dist/client/assets/{roles-CeFlz1UN.js → roles-CFXICquL.js} +1 -1
- package/dist/client/assets/{schema-DQy-MMoa.js → schema-DQTSPDPc.js} +1 -1
- package/dist/client/assets/{scroll-area-BkNjOKC8.js → scroll-area-Bk3bop_C.js} +1 -1
- package/dist/client/assets/{search-input-eoYbj2iI.js → search-input-Cr1xDzOR.js} +1 -1
- package/dist/client/assets/{secrets-CtcK8Vn7.js → secrets-D4THHRB2.js} +1 -1
- package/dist/client/assets/{sections-editor-_BhutJJ6.js → sections-editor-of2aPbXF.js} +1 -1
- package/dist/client/assets/{select-Ct-Vazyk.js → select-VruWLBER.js} +1 -1
- package/dist/client/assets/{select-model-BBoxa44t.js → select-model-R6GRqP4o.js} +1 -1
- package/dist/client/assets/{self-tool-result-DD5pnXiw.js → self-tool-result-B6OwqL4s.js} +1 -1
- package/dist/client/assets/{seo-editor-BYkeE4su.js → seo-editor-BdFo1CDL.js} +1 -1
- package/dist/client/assets/settings-layout-BoOxkANz.js +1 -0
- package/dist/client/assets/{settings-sidebar-C-qdLxMs.js → settings-sidebar-fJ4N2ofG.js} +1 -1
- package/dist/client/assets/{shell-controls-DLKaFX61.js → shell-controls-Di6eVhxs.js} +1 -1
- package/dist/client/assets/shell-layout-DtX3xYLo.js +1 -0
- package/dist/client/assets/{skill-preview-Bl-BIFnv.js → skill-preview-Cn_VmuJU.js} +1 -1
- package/dist/client/assets/{skills-DPvJrrRO.js → skills-BYyTg_dQ.js} +1 -1
- package/dist/client/assets/{sso-7PkZ1tuC.js → sso-B4-17OvU.js} +1 -1
- package/dist/client/assets/{store-DfLmQEre.js → store-duvEEQay.js} +1 -1
- package/dist/client/assets/store-registry-BQF4DMVv.js +2 -0
- package/dist/client/assets/{switch-C1Yuo9_H.js → switch-D5mDYZzD.js} +1 -1
- package/dist/client/assets/{synced-repos-soGE7AGi.js → synced-repos-BcFubVX4.js} +1 -1
- package/dist/client/assets/{table-CbOz2xhC.js → table-Co1Yo9Ou.js} +1 -1
- package/dist/client/assets/{tabs-Dq7ksO9-.js → tabs-CzhgwOMh.js} +1 -1
- package/dist/client/assets/{task-board-DWbv4I55.js → task-board-F9nWsjW0.js} +1 -1
- package/dist/client/assets/{task-route-C9livXIE.js → task-route-C50QtiSH.js} +1 -1
- package/dist/client/assets/{tasks-DOwOmld3.js → tasks-PqS_Dc-u.js} +1 -1
- package/dist/client/assets/{textarea-BWBed-O-.js → textarea-D5yUmTuo.js} +1 -1
- package/dist/client/assets/{thread-intent-DWuPeyAN.js → thread-intent-CqM5vUU9.js} +1 -1
- package/dist/client/assets/{thread-route-L2CtS7ly.js → thread-route-B_3hJRNO.js} +1 -1
- package/dist/client/assets/{toggle-group-BlJcjaFK.js → toggle-group-C6RmEYNw.js} +1 -1
- package/dist/client/assets/{toolbar-BO2mXtlL.js → toolbar-DalvtXvG.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-2CMFgKa_.js → toolbar-icon-button-aV5MA64L.js} +1 -1
- package/dist/client/assets/{track-DXTftUee.js → track-IbgYjppW.js} +1 -1
- package/dist/client/assets/{types-BTxDgr7_.js → types-CaQxQn--.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BTBvY4Hc.js → use-ai-providers-CBAbpFCs.js} +1 -1
- package/dist/client/assets/{use-automations-Dxsq9WaT.js → use-automations-HZOOTOR3.js} +1 -1
- package/dist/client/assets/{use-autosave-B38Bs9jC.js → use-autosave-Cd2yn2WA.js} +1 -1
- package/dist/client/assets/{use-connection-CrxTr3Cd.js → use-connection-Cxk618DD.js} +1 -1
- package/dist/client/assets/{use-copy-CUHkYQd1.js → use-copy-JToNQsYl.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-wOn_ER-R.js → use-create-virtual-mcp-BDVK9Nnk.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-D5Kfx3IJ.js → use-date-fns-locale-BC9XewCs.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BsXfln5P.js → use-debounced-autosave-ChhxmJyP.js} +1 -1
- package/dist/client/assets/{use-debounced-value-NNOICPj0.js → use-debounced-value-B2sataBb.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-kkwWTwqq.js → use-decopilot-events-w-PNw0gQ.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DzOGsxSh.js → use-delete-connection-C0Ue1RpB.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Dq6Kse1K.js → use-deployment-admin-FdJOF92N.js} +1 -1
- package/dist/client/assets/{use-destination-route-90XzfzKs.js → use-destination-route-DaFWrAHj.js} +1 -1
- package/dist/client/assets/{use-file-configs-DsqznNn1.js → use-file-configs-BszfQ6Ii.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-D3GKVSmf.js → use-infinite-scroll-UlP3mdDG.js} +1 -1
- package/dist/client/assets/{use-join-requests-CoN1MGnf.js → use-join-requests-DbLnXh7p.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BOrIszZ6.js → use-mcp-auth-status-Dm4k96-0.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CXOd5tZp.js → use-mcp-client-BS1HAuw9.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-Zu5xtpsP.js → use-mcp-prompts-Bqus7nV6.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Bltq7NmB.js → use-mcp-tools-CcPY1kUa.js} +1 -1
- package/dist/client/assets/{use-members-DzijC0_l.js → use-members-BPrB4_B6.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CB-8_p6y.js → use-navigate-to-agent-yGdOMWOW.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CSFkNScF.js → use-org-auth-client-BfcHu9OA.js} +1 -1
- package/dist/client/assets/{use-org-notice-BzBLqmJL.js → use-org-notice-CGWZZ-Tj.js} +1 -1
- package/dist/client/assets/{use-org-sso-C5M-ulSH.js → use-org-sso-BD6r6b1F.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CY5TW73V.js → use-organization-roles-CSUyN-QR.js} +1 -1
- package/dist/client/assets/{use-organization-settings-JhsPi-Rf.js → use-organization-settings-zsIQ5yKP.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-B2TRoIaG.js → use-panel-navigate-Bnu_Y_WK.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BysFk2t2.js → use-registry-connections-D6NYr_lo.js} +1 -1
- package/dist/client/assets/{use-secrets-7JT6TbB-.js → use-secrets-CEAwJE8l.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DtY_dTeP.js → use-section-preview-base-CPX3fQrj.js} +1 -1
- package/dist/client/assets/{use-status-sounds-CIRXPjsN.js → use-status-sounds-BSHc34AF.js} +1 -1
- package/dist/client/assets/{use-tags-dN-p9yRr.js → use-tags-u-doSjgu.js} +1 -1
- package/dist/client/assets/{use-view-mode-Bh9qtqUQ.js → use-view-mode-DIiapwc1.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BLkoZxZw.js → use-virtual-mcp-Ck5PGc0k.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-ctaGuyQM.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-IjFUp4RN.js +1 -0
- package/dist/client/assets/{users-cD0KEoyU.js → users-BitUrleX.js} +1 -1
- package/dist/client/assets/{variant-calendar-unJAtvEl.js → variant-calendar-52K0113C.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DZtQZapo.js → view-mode-toggle-tmEIJIQR.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +646 -646
- package/dist/server/server.js +485 -485
- package/package.json +1 -1
- package/dist/client/assets/analytics-tab-CL4wOZ2T.js +0 -2
- package/dist/client/assets/api-keys-bqGnawOP.js +0 -1
- package/dist/client/assets/app-editor-DYemrJon.js +0 -1
- package/dist/client/assets/hosting-tab-CVGB2-Es.js +0 -1
- package/dist/client/assets/index-7CIwuxYk.css +0 -1
- package/dist/client/assets/record-editor-DOL_Mr7i.js +0 -1
- package/dist/client/assets/redirect-editor-D1d24axR.js +0 -1
- package/dist/client/assets/registry-0lYMx3SZ.js +0 -2
- package/dist/client/assets/settings-layout-74s2xPsO.js +0 -1
- package/dist/client/assets/shell-layout-DKfp4SNR.js +0 -1
- package/dist/client/assets/store-registry-BTZSImF_.js +0 -2
- package/dist/client/assets/useInfiniteQuery-tHUa8vcP.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-axnqWbbC.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as se,j as s,ds as ye,b as ue,r as ae,B as te,l as je,t as ce,b8 as be}from"./index-dxjbAgdh.js";import{i as ge}from"./GitBranch01-DjBM23NV.js";import{s as xe}from"./Plus-BQUCrYF9.js";import{c as Re,d as ve,b as Se,f as De,g as Ne,e as _e,a as Ce,A as Pe}from"./alert-dialog-D4B8xwmj.js";import{d as Ae,h as ke,c as we,e as ze,b as Ee,D as Oe}from"./dialog-Cu56JIH4.js";import{I as Ie}from"./input-D3JPMdmV.js";import{u as $e,G as Fe,R as Te}from"./repository-picker-IES4m5H2.js";import{a as Ge,d as Be,h as He,t as qe}from"./cards-CSiCIOz0.js";import{R as Le}from"./require-capability-CqfrOrds.js";import"./ChevronRight-B4xjdR-V.js";import"./label-Dh3WRFmE.js";import"./github-icon-BKLlhfRv.js";import"./useInfiniteQuery-tHUa8vcP.js";import"./infiniteQueryObserver-Ckg2pf_5.js";import"./ArrowLeft-DdhFLsvX.js";import"./avatar-D1uraqXx.js";import"./User01-wEgf8NoL.js";import"./collection-search-DkFPt7IO.js";import"./SearchMd-DaEAX-Rt.js";import"./use-debounced-value-NNOICPj0.js";import"./folder-icon-CjwmyQMd.js";import"./Eye-BokJBg-8.js";import"./DotsVertical-Cyoi6mM-.js";import"./Download01-BJ0Aw71K.js";import"./Share07-5UuFsPQD.js";import"./Globe01-BpBePEO9.js";import"./Key01-DpcwZmv-.js";import"./Palette-CuHE99fD.js";import"./Trash01-Djv1nLoz.js";import"./Zap-Z_UfUTMz.js";import"./dropdown-menu-DhGKgZoF.js";import"./Check-BeSUa4SA.js";import"./file-type-icon-CelUV-GT.js";import"./access-gate-6EYcqWG4.js";import"./capability-load-error-CZZauU11.js";function Ve(e){return e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^[.-]+|[.-]+$/g,"").slice(0,128)}function Je(e,t){return e.lastSyncError?{label:e.lastSyncError,error:!0}:e.lastSyncedAt?{label:t("library.syncedRepos.syncedAgo",{ago:qe(e.lastSyncedAt)}),error:!1}:{label:t("library.syncedRepos.waitingFirstSync"),error:!1}}function Ke(e){const t=se.c(38),{config:l,onRemove:i}=e,o=ue();let u;t[0]!==l||t[1]!==o?(u=Je(l,o),t[0]=l,t[1]=o,t[2]=u):u=t[2];const m=u,r=$e();let f;t[3]!==l.repositoryId||t[4]!==r.data?(f=r.data?.find(C=>C.id===l.repositoryId),t[3]=l.repositoryId,t[4]=r.data,t[5]=f):f=t[5];const n=f;let g;t[6]!==n?(g=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:n?s.jsx(Fe,{provider:n.provider,size:16,className:"text-muted-foreground"}):s.jsx(ge,{size:16,className:"text-muted-foreground"})}),t[6]=n,t[7]=g):g=t[7];const c=n?.path??`${l.repoOwner}/${l.repoName}`;let d;t[8]!==c?(d=s.jsx("span",{className:"font-medium text-sm truncate",children:c}),t[8]=c,t[9]=d):d=t[9];let p;t[10]!==l.ref?(p=s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["@",l.ref]}),t[10]=l.ref,t[11]=p):p=t[11];let S;t[12]!==d||t[13]!==p?(S=s.jsxs("div",{className:"flex items-center gap-2",children:[d,p]}),t[12]=d,t[13]=p,t[14]=S):S=t[14];const _=m.error?"text-destructive":"text-muted-foreground";let D;t[15]!==_?(D=je("text-xs mt-0.5 truncate",_),t[15]=_,t[16]=D):D=t[16];let b;t[17]!==l.volume||t[18]!==o?(b=o("settings.syncedRepos.rowSubtitle",{volume:l.volume}),t[17]=l.volume,t[18]=o,t[19]=b):b=t[19];let R;t[20]!==m.label||t[21]!==b||t[22]!==D?(R=s.jsxs("p",{className:D,children:[b," ·"," ",m.label]}),t[20]=m.label,t[21]=b,t[22]=D,t[23]=R):R=t[23];let x;t[24]!==R||t[25]!==S?(x=s.jsxs("div",{className:"min-w-0",children:[S,R]}),t[24]=R,t[25]=S,t[26]=x):x=t[26];let h;t[27]!==x||t[28]!==g?(h=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[g,x]}),t[27]=x,t[28]=g,t[29]=h):h=t[29];let y;t[30]!==o?(y=o("settings.syncedRepos.remove"),t[30]=o,t[31]=y):y=t[31];let j;t[32]!==i||t[33]!==y?(j=s.jsx(te,{variant:"outline",size:"sm",onClick:i,children:y}),t[32]=i,t[33]=y,t[34]=j):j=t[34];let N;return t[35]!==h||t[36]!==j?(N=s.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[h,j]}),t[35]=h,t[36]=j,t[37]=N):N=t[37],N}function Me(e){const t=se.c(21),{onAdd:l}=e,i=ue();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(ge,{size:20,className:"text-muted-foreground"})}),t[0]=o):o=t[0];let u;t[1]!==i?(u=i("settings.syncedRepos.emptyTitle"),t[1]=i,t[2]=u):u=t[2];let m;t[3]!==u?(m=s.jsx("p",{className:"font-medium text-sm",children:u}),t[3]=u,t[4]=m):m=t[4];let r;t[5]!==i?(r=i("settings.syncedRepos.emptyDescription"),t[5]=i,t[6]=r):r=t[6];let f;t[7]!==r?(f=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:r}),t[7]=r,t[8]=f):f=t[8];let n;t[9]!==m||t[10]!==f?(n=s.jsxs("div",{children:[m,f]}),t[9]=m,t[10]=f,t[11]=n):n=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(xe,{size:14}),t[12]=g):g=t[12];let c;t[13]!==i?(c=i("settings.syncedRepos.addRepo"),t[13]=i,t[14]=c):c=t[14];let d;t[15]!==l||t[16]!==c?(d=s.jsxs(te,{onClick:l,size:"sm",className:"mt-2",children:[g,c]}),t[15]=l,t[16]=c,t[17]=d):d=t[17];let p;return t[18]!==n||t[19]!==d?(p=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[o,n,d]}),t[18]=n,t[19]=d,t[20]=p):p=t[20],p}function Qe(){const e=se.c(107),t=ue(),l=Ge(),i=Be(),o=He(),[u,m]=ae.useState(!1),[r,f]=ae.useState(null),[n,g]=ae.useState(""),[c,d]=ae.useState(null);let p;e[0]!==i||e[1]!==r||e[2]!==t||e[3]!==n?(p=function(){!r||!n.trim()||i.mutate({repositoryId:r.id,volume:n.trim()},{onSuccess:v=>{f(null),ce.success(t("settings.syncedRepos.created",{volume:v.volume}))},onError:v=>{ce.error(v instanceof Error?v.message:t("settings.syncedRepos.failed"))}})},e[0]=i,e[1]=r,e[2]=t,e[3]=n,e[4]=p):p=e[4];const S=p;let _;e[5]!==c||e[6]!==o||e[7]!==t?(_=function(){c&&o.mutate(c.id,{onSuccess:()=>ce.success(t("settings.syncedRepos.removed")),onError:v=>ce.error(v instanceof Error?v.message:t("settings.syncedRepos.failed")),onSettled:()=>d(null)})},e[5]=c,e[6]=o,e[7]=t,e[8]=_):_=e[8];const D=_;if(l.isPending){let a;return e[9]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(be,{className:"h-32 w-full"}),e[9]=a):a=e[9],a}let b;e[10]!==l.data?(b=l.data??[],e[10]=l.data,e[11]=b):b=e[11];const R=b;let x;e[12]!==t?(x=t("settings.syncedRepos.pageDescription"),e[12]=t,e[13]=x):x=e[13];let h;e[14]!==x?(h=s.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[14]=x,e[15]=h):h=e[15];let y;e[16]!==R||e[17]!==t?(y=R.length===0?s.jsx(Me,{onAdd:()=>m(!0)}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center justify-end",children:s.jsxs(te,{onClick:()=>m(!0),size:"sm",children:[s.jsx(xe,{size:14}),t("settings.syncedRepos.addRepo")]})}),s.jsx("section",{className:"rounded-2xl border border-border/60 bg-background px-5 py-2",children:R.map(a=>s.jsx(Ke,{config:a,onRemove:()=>d(a)},a.id))})]}),e[16]=R,e[17]=t,e[18]=y):y=e[18];let j;e[19]!==t?(j=t("settings.syncedRepos.pickerTitle"),e[19]=t,e[20]=j):j=e[20];let N;e[21]===Symbol.for("react.memo_cache_sentinel")?(N=a=>{const{repository:v}=a;m(!1),f(v),g(Ve(v.path.split("/").at(-1)??v.path))},e[21]=N):N=e[21];let C;e[22]!==u||e[23]!==j?(C=s.jsx(Te,{open:u,onOpenChange:m,title:j,onPicked:N}),e[22]=u,e[23]=j,e[24]=C):C=e[24];const de=r!==null;let ie;e[25]===Symbol.for("react.memo_cache_sentinel")?(ie=a=>{a||f(null)},e[25]=ie):ie=e[25];let P;e[26]!==t?(P=t("settings.syncedRepos.nameDialogTitle"),e[26]=t,e[27]=P):P=e[27];let A;e[28]!==P?(A=s.jsx(Ae,{children:P}),e[28]=P,e[29]=A):A=e[29];const me=r?r.path:"";let k;e[30]!==t||e[31]!==me?(k=t("settings.syncedRepos.nameDialogDescription",{repo:me}),e[30]=t,e[31]=me,e[32]=k):k=e[32];let w;e[33]!==k?(w=s.jsx(ke,{children:k}),e[33]=k,e[34]=w):w=e[34];let z;e[35]!==A||e[36]!==w?(z=s.jsxs(we,{children:[A,w]}),e[35]=A,e[36]=w,e[37]=z):z=e[37];let le;e[38]===Symbol.for("react.memo_cache_sentinel")?(le=a=>g(a.target.value),e[38]=le):le=e[38];let E;e[39]!==t?(E=t("settings.syncedRepos.namePlaceholder"),e[39]=t,e[40]=E):E=e[40];let O;e[41]!==E||e[42]!==n?(O=s.jsx(Ie,{value:n,onChange:le,placeholder:E,autoFocus:!0}),e[41]=E,e[42]=n,e[43]=O):O=e[43];let ne;e[44]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>f(null),e[44]=ne):ne=e[44];const he=i.isPending;let I;e[45]!==t?(I=t("settings.syncedRepos.cancel"),e[45]=t,e[46]=I):I=e[46];let $;e[47]!==i.isPending||e[48]!==I?($=s.jsx(te,{variant:"outline",onClick:ne,disabled:he,children:I}),e[47]=i.isPending,e[48]=I,e[49]=$):$=e[49];let F;e[50]!==i.isPending||e[51]!==n?(F=!n.trim()||i.isPending,e[50]=i.isPending,e[51]=n,e[52]=F):F=e[52];let T;e[53]!==i.isPending||e[54]!==t?(T=i.isPending?t("settings.syncedRepos.creating"):t("settings.syncedRepos.create"),e[53]=i.isPending,e[54]=t,e[55]=T):T=e[55];let G;e[56]!==S||e[57]!==F||e[58]!==T?(G=s.jsx(te,{disabled:F,onClick:S,children:T}),e[56]=S,e[57]=F,e[58]=T,e[59]=G):G=e[59];let B;e[60]!==$||e[61]!==G?(B=s.jsxs(ze,{children:[$,G]}),e[60]=$,e[61]=G,e[62]=B):B=e[62];let H;e[63]!==z||e[64]!==O||e[65]!==B?(H=s.jsxs(Ee,{className:"sm:max-w-sm",children:[z,O,B]}),e[63]=z,e[64]=O,e[65]=B,e[66]=H):H=e[66];let q;e[67]!==H||e[68]!==de?(q=s.jsx(Oe,{open:de,onOpenChange:ie,children:H}),e[67]=H,e[68]=de,e[69]=q):q=e[69];const fe=c!==null;let oe;e[70]===Symbol.for("react.memo_cache_sentinel")?(oe=a=>{a||d(null)},e[70]=oe):oe=e[70];const pe=c?.volume??"";let L;e[71]!==t||e[72]!==pe?(L=t("settings.syncedRepos.removeTitle",{volume:pe}),e[71]=t,e[72]=pe,e[73]=L):L=e[73];let V;e[74]!==L?(V=s.jsx(Re,{children:L}),e[74]=L,e[75]=V):V=e[75];let J;e[76]!==t?(J=t("settings.syncedRepos.removeDescription"),e[76]=t,e[77]=J):J=e[77];let K;e[78]!==J?(K=s.jsx(ve,{children:J}),e[78]=J,e[79]=K):K=e[79];let M;e[80]!==V||e[81]!==K?(M=s.jsxs(Se,{children:[V,K]}),e[80]=V,e[81]=K,e[82]=M):M=e[82];let Q;e[83]!==t?(Q=t("settings.syncedRepos.cancel"),e[83]=t,e[84]=Q):Q=e[84];let U;e[85]!==Q?(U=s.jsx(De,{children:Q}),e[85]=Q,e[86]=U):U=e[86];let W;e[87]!==t?(W=t("settings.syncedRepos.remove"),e[87]=t,e[88]=W):W=e[88];let X;e[89]!==D||e[90]!==W?(X=s.jsx(Ne,{onClick:D,children:W}),e[89]=D,e[90]=W,e[91]=X):X=e[91];let Y;e[92]!==U||e[93]!==X?(Y=s.jsxs(_e,{children:[U,X]}),e[92]=U,e[93]=X,e[94]=Y):Y=e[94];let Z;e[95]!==M||e[96]!==Y?(Z=s.jsxs(Ce,{children:[M,Y]}),e[95]=M,e[96]=Y,e[97]=Z):Z=e[97];let ee;e[98]!==fe||e[99]!==Z?(ee=s.jsx(Pe,{open:fe,onOpenChange:oe,children:Z}),e[98]=fe,e[99]=Z,e[100]=ee):ee=e[100];let re;return e[101]!==q||e[102]!==h||e[103]!==ee||e[104]!==y||e[105]!==C?(re=s.jsxs(s.Fragment,{children:[h,y,C,q,ee]}),e[101]=q,e[102]=h,e[103]=ee,e[104]=y,e[105]=C,e[106]=re):re=e[106],re}function Ue(){const e=se.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ye,{group:"storage",children:s.jsx(Qe,{})}),e[0]=t):t=e[0],t}function wt(){const e=se.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Le,{capability:"file-configs:manage",area:"files",children:s.jsx(Ue,{})}),e[0]=t):t=e[0],t}export{wt as default};
|
|
1
|
+
import{c as se,j as s,ds as ye,b as ue,r as ae,B as te,l as je,t as ce,b8 as be}from"./index-D6kz3ebr.js";import{i as ge}from"./GitBranch01-D3Ep4J5o.js";import{s as xe}from"./Plus-5jblmb5M.js";import{c as Re,d as ve,b as Se,f as De,g as Ne,e as _e,a as Ce,A as Pe}from"./alert-dialog-BikX6FFY.js";import{d as Ae,h as ke,c as we,e as ze,b as Ee,D as Oe}from"./dialog-B0OdXcqs.js";import{I as Ie}from"./input-SHpohkkd.js";import{u as $e,G as Fe,R as Te}from"./repository-picker-zcqpFECf.js";import{a as Ge,d as Be,h as He,t as qe}from"./cards-C17dmtwv.js";import{R as Le}from"./require-capability-BkcUyh1H.js";import"./ChevronRight-r0gLJbn2.js";import"./label-rD90jMRy.js";import"./github-icon-DMu-fvNj.js";import"./useInfiniteQuery-ctaGuyQM.js";import"./infiniteQueryObserver-Dld3rVqh.js";import"./ArrowLeft-DiFtyxtp.js";import"./avatar-CPkw3h7t.js";import"./User01-Dq0QszR-.js";import"./collection-search-CJb7f2bn.js";import"./SearchMd-CnBFXj_Z.js";import"./use-debounced-value-B2sataBb.js";import"./folder-icon-D1UH1rlz.js";import"./Eye-QPQVcqGb.js";import"./DotsVertical-Cyt1EoXA.js";import"./Download01-Db1D2BD0.js";import"./Share07-DzTdSg05.js";import"./Globe01-dlVOEKaQ.js";import"./Key01-DquPZpqN.js";import"./Palette-BsEqDIgy.js";import"./Trash01-D5ciFh4O.js";import"./Zap-Bb7Qo7M3.js";import"./dropdown-menu-CoV3z2Yq.js";import"./Check-sicxXYN7.js";import"./file-type-icon-DnRMRlEa.js";import"./access-gate-B2eHW19E.js";import"./capability-load-error-_DjYgnoI.js";function Ve(e){return e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^[.-]+|[.-]+$/g,"").slice(0,128)}function Je(e,t){return e.lastSyncError?{label:e.lastSyncError,error:!0}:e.lastSyncedAt?{label:t("library.syncedRepos.syncedAgo",{ago:qe(e.lastSyncedAt)}),error:!1}:{label:t("library.syncedRepos.waitingFirstSync"),error:!1}}function Ke(e){const t=se.c(38),{config:l,onRemove:i}=e,o=ue();let u;t[0]!==l||t[1]!==o?(u=Je(l,o),t[0]=l,t[1]=o,t[2]=u):u=t[2];const m=u,r=$e();let f;t[3]!==l.repositoryId||t[4]!==r.data?(f=r.data?.find(C=>C.id===l.repositoryId),t[3]=l.repositoryId,t[4]=r.data,t[5]=f):f=t[5];const n=f;let g;t[6]!==n?(g=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:n?s.jsx(Fe,{provider:n.provider,size:16,className:"text-muted-foreground"}):s.jsx(ge,{size:16,className:"text-muted-foreground"})}),t[6]=n,t[7]=g):g=t[7];const c=n?.path??`${l.repoOwner}/${l.repoName}`;let d;t[8]!==c?(d=s.jsx("span",{className:"font-medium text-sm truncate",children:c}),t[8]=c,t[9]=d):d=t[9];let p;t[10]!==l.ref?(p=s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["@",l.ref]}),t[10]=l.ref,t[11]=p):p=t[11];let S;t[12]!==d||t[13]!==p?(S=s.jsxs("div",{className:"flex items-center gap-2",children:[d,p]}),t[12]=d,t[13]=p,t[14]=S):S=t[14];const _=m.error?"text-destructive":"text-muted-foreground";let D;t[15]!==_?(D=je("text-xs mt-0.5 truncate",_),t[15]=_,t[16]=D):D=t[16];let b;t[17]!==l.volume||t[18]!==o?(b=o("settings.syncedRepos.rowSubtitle",{volume:l.volume}),t[17]=l.volume,t[18]=o,t[19]=b):b=t[19];let R;t[20]!==m.label||t[21]!==b||t[22]!==D?(R=s.jsxs("p",{className:D,children:[b," ·"," ",m.label]}),t[20]=m.label,t[21]=b,t[22]=D,t[23]=R):R=t[23];let x;t[24]!==R||t[25]!==S?(x=s.jsxs("div",{className:"min-w-0",children:[S,R]}),t[24]=R,t[25]=S,t[26]=x):x=t[26];let h;t[27]!==x||t[28]!==g?(h=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[g,x]}),t[27]=x,t[28]=g,t[29]=h):h=t[29];let y;t[30]!==o?(y=o("settings.syncedRepos.remove"),t[30]=o,t[31]=y):y=t[31];let j;t[32]!==i||t[33]!==y?(j=s.jsx(te,{variant:"outline",size:"sm",onClick:i,children:y}),t[32]=i,t[33]=y,t[34]=j):j=t[34];let N;return t[35]!==h||t[36]!==j?(N=s.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[h,j]}),t[35]=h,t[36]=j,t[37]=N):N=t[37],N}function Me(e){const t=se.c(21),{onAdd:l}=e,i=ue();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(ge,{size:20,className:"text-muted-foreground"})}),t[0]=o):o=t[0];let u;t[1]!==i?(u=i("settings.syncedRepos.emptyTitle"),t[1]=i,t[2]=u):u=t[2];let m;t[3]!==u?(m=s.jsx("p",{className:"font-medium text-sm",children:u}),t[3]=u,t[4]=m):m=t[4];let r;t[5]!==i?(r=i("settings.syncedRepos.emptyDescription"),t[5]=i,t[6]=r):r=t[6];let f;t[7]!==r?(f=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:r}),t[7]=r,t[8]=f):f=t[8];let n;t[9]!==m||t[10]!==f?(n=s.jsxs("div",{children:[m,f]}),t[9]=m,t[10]=f,t[11]=n):n=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(xe,{size:14}),t[12]=g):g=t[12];let c;t[13]!==i?(c=i("settings.syncedRepos.addRepo"),t[13]=i,t[14]=c):c=t[14];let d;t[15]!==l||t[16]!==c?(d=s.jsxs(te,{onClick:l,size:"sm",className:"mt-2",children:[g,c]}),t[15]=l,t[16]=c,t[17]=d):d=t[17];let p;return t[18]!==n||t[19]!==d?(p=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[o,n,d]}),t[18]=n,t[19]=d,t[20]=p):p=t[20],p}function Qe(){const e=se.c(107),t=ue(),l=Ge(),i=Be(),o=He(),[u,m]=ae.useState(!1),[r,f]=ae.useState(null),[n,g]=ae.useState(""),[c,d]=ae.useState(null);let p;e[0]!==i||e[1]!==r||e[2]!==t||e[3]!==n?(p=function(){!r||!n.trim()||i.mutate({repositoryId:r.id,volume:n.trim()},{onSuccess:v=>{f(null),ce.success(t("settings.syncedRepos.created",{volume:v.volume}))},onError:v=>{ce.error(v instanceof Error?v.message:t("settings.syncedRepos.failed"))}})},e[0]=i,e[1]=r,e[2]=t,e[3]=n,e[4]=p):p=e[4];const S=p;let _;e[5]!==c||e[6]!==o||e[7]!==t?(_=function(){c&&o.mutate(c.id,{onSuccess:()=>ce.success(t("settings.syncedRepos.removed")),onError:v=>ce.error(v instanceof Error?v.message:t("settings.syncedRepos.failed")),onSettled:()=>d(null)})},e[5]=c,e[6]=o,e[7]=t,e[8]=_):_=e[8];const D=_;if(l.isPending){let a;return e[9]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(be,{className:"h-32 w-full"}),e[9]=a):a=e[9],a}let b;e[10]!==l.data?(b=l.data??[],e[10]=l.data,e[11]=b):b=e[11];const R=b;let x;e[12]!==t?(x=t("settings.syncedRepos.pageDescription"),e[12]=t,e[13]=x):x=e[13];let h;e[14]!==x?(h=s.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[14]=x,e[15]=h):h=e[15];let y;e[16]!==R||e[17]!==t?(y=R.length===0?s.jsx(Me,{onAdd:()=>m(!0)}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center justify-end",children:s.jsxs(te,{onClick:()=>m(!0),size:"sm",children:[s.jsx(xe,{size:14}),t("settings.syncedRepos.addRepo")]})}),s.jsx("section",{className:"rounded-2xl border border-border/60 bg-background px-5 py-2",children:R.map(a=>s.jsx(Ke,{config:a,onRemove:()=>d(a)},a.id))})]}),e[16]=R,e[17]=t,e[18]=y):y=e[18];let j;e[19]!==t?(j=t("settings.syncedRepos.pickerTitle"),e[19]=t,e[20]=j):j=e[20];let N;e[21]===Symbol.for("react.memo_cache_sentinel")?(N=a=>{const{repository:v}=a;m(!1),f(v),g(Ve(v.path.split("/").at(-1)??v.path))},e[21]=N):N=e[21];let C;e[22]!==u||e[23]!==j?(C=s.jsx(Te,{open:u,onOpenChange:m,title:j,onPicked:N}),e[22]=u,e[23]=j,e[24]=C):C=e[24];const de=r!==null;let ie;e[25]===Symbol.for("react.memo_cache_sentinel")?(ie=a=>{a||f(null)},e[25]=ie):ie=e[25];let P;e[26]!==t?(P=t("settings.syncedRepos.nameDialogTitle"),e[26]=t,e[27]=P):P=e[27];let A;e[28]!==P?(A=s.jsx(Ae,{children:P}),e[28]=P,e[29]=A):A=e[29];const me=r?r.path:"";let k;e[30]!==t||e[31]!==me?(k=t("settings.syncedRepos.nameDialogDescription",{repo:me}),e[30]=t,e[31]=me,e[32]=k):k=e[32];let w;e[33]!==k?(w=s.jsx(ke,{children:k}),e[33]=k,e[34]=w):w=e[34];let z;e[35]!==A||e[36]!==w?(z=s.jsxs(we,{children:[A,w]}),e[35]=A,e[36]=w,e[37]=z):z=e[37];let le;e[38]===Symbol.for("react.memo_cache_sentinel")?(le=a=>g(a.target.value),e[38]=le):le=e[38];let E;e[39]!==t?(E=t("settings.syncedRepos.namePlaceholder"),e[39]=t,e[40]=E):E=e[40];let O;e[41]!==E||e[42]!==n?(O=s.jsx(Ie,{value:n,onChange:le,placeholder:E,autoFocus:!0}),e[41]=E,e[42]=n,e[43]=O):O=e[43];let ne;e[44]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>f(null),e[44]=ne):ne=e[44];const he=i.isPending;let I;e[45]!==t?(I=t("settings.syncedRepos.cancel"),e[45]=t,e[46]=I):I=e[46];let $;e[47]!==i.isPending||e[48]!==I?($=s.jsx(te,{variant:"outline",onClick:ne,disabled:he,children:I}),e[47]=i.isPending,e[48]=I,e[49]=$):$=e[49];let F;e[50]!==i.isPending||e[51]!==n?(F=!n.trim()||i.isPending,e[50]=i.isPending,e[51]=n,e[52]=F):F=e[52];let T;e[53]!==i.isPending||e[54]!==t?(T=i.isPending?t("settings.syncedRepos.creating"):t("settings.syncedRepos.create"),e[53]=i.isPending,e[54]=t,e[55]=T):T=e[55];let G;e[56]!==S||e[57]!==F||e[58]!==T?(G=s.jsx(te,{disabled:F,onClick:S,children:T}),e[56]=S,e[57]=F,e[58]=T,e[59]=G):G=e[59];let B;e[60]!==$||e[61]!==G?(B=s.jsxs(ze,{children:[$,G]}),e[60]=$,e[61]=G,e[62]=B):B=e[62];let H;e[63]!==z||e[64]!==O||e[65]!==B?(H=s.jsxs(Ee,{className:"sm:max-w-sm",children:[z,O,B]}),e[63]=z,e[64]=O,e[65]=B,e[66]=H):H=e[66];let q;e[67]!==H||e[68]!==de?(q=s.jsx(Oe,{open:de,onOpenChange:ie,children:H}),e[67]=H,e[68]=de,e[69]=q):q=e[69];const fe=c!==null;let oe;e[70]===Symbol.for("react.memo_cache_sentinel")?(oe=a=>{a||d(null)},e[70]=oe):oe=e[70];const pe=c?.volume??"";let L;e[71]!==t||e[72]!==pe?(L=t("settings.syncedRepos.removeTitle",{volume:pe}),e[71]=t,e[72]=pe,e[73]=L):L=e[73];let V;e[74]!==L?(V=s.jsx(Re,{children:L}),e[74]=L,e[75]=V):V=e[75];let J;e[76]!==t?(J=t("settings.syncedRepos.removeDescription"),e[76]=t,e[77]=J):J=e[77];let K;e[78]!==J?(K=s.jsx(ve,{children:J}),e[78]=J,e[79]=K):K=e[79];let M;e[80]!==V||e[81]!==K?(M=s.jsxs(Se,{children:[V,K]}),e[80]=V,e[81]=K,e[82]=M):M=e[82];let Q;e[83]!==t?(Q=t("settings.syncedRepos.cancel"),e[83]=t,e[84]=Q):Q=e[84];let U;e[85]!==Q?(U=s.jsx(De,{children:Q}),e[85]=Q,e[86]=U):U=e[86];let W;e[87]!==t?(W=t("settings.syncedRepos.remove"),e[87]=t,e[88]=W):W=e[88];let X;e[89]!==D||e[90]!==W?(X=s.jsx(Ne,{onClick:D,children:W}),e[89]=D,e[90]=W,e[91]=X):X=e[91];let Y;e[92]!==U||e[93]!==X?(Y=s.jsxs(_e,{children:[U,X]}),e[92]=U,e[93]=X,e[94]=Y):Y=e[94];let Z;e[95]!==M||e[96]!==Y?(Z=s.jsxs(Ce,{children:[M,Y]}),e[95]=M,e[96]=Y,e[97]=Z):Z=e[97];let ee;e[98]!==fe||e[99]!==Z?(ee=s.jsx(Pe,{open:fe,onOpenChange:oe,children:Z}),e[98]=fe,e[99]=Z,e[100]=ee):ee=e[100];let re;return e[101]!==q||e[102]!==h||e[103]!==ee||e[104]!==y||e[105]!==C?(re=s.jsxs(s.Fragment,{children:[h,y,C,q,ee]}),e[101]=q,e[102]=h,e[103]=ee,e[104]=y,e[105]=C,e[106]=re):re=e[106],re}function Ue(){const e=se.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ye,{group:"storage",children:s.jsx(Qe,{})}),e[0]=t):t=e[0],t}function wt(){const e=se.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Le,{capability:"file-configs:manage",area:"files",children:s.jsx(Ue,{})}),e[0]=t):t=e[0],t}export{wt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,l as i,j as r}from"./index-
|
|
1
|
+
import{c,l as i,j as r}from"./index-D6kz3ebr.js";function d(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-card rounded-xl card-shadow overflow-hidden",children:r.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-card",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{x as T,p as a,b,d as c,m as d,f as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as v,j as d,dt as k,br as p,bx as T,du as y,bt as M,bw as P,bu as S,by as F,dv as V,cJ as D,c as x,l as g}from"./index-
|
|
1
|
+
import{r as v,j as d,dt as k,br as p,bx as T,du as y,bt as M,bw as P,bu as S,by as F,dv as V,cJ as D,c as x,l as g}from"./index-D6kz3ebr.js";var m="Tabs",[G]=M(m,[y]),w=y(),[L,h]=G(m),C=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...f}=n,u=P(i),[c,b]=S({prop:t,onChange:r,defaultProp:s??"",caller:m});return d.jsx(L,{scope:a,baseId:F(),value:c,onValueChange:b,orientation:o,dir:u,activationMode:l,children:d.jsx(p.div,{dir:u,"data-orientation":o,...f,ref:e})})});C.displayName=m;var N="TabsList",j=v.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=h(N,a),o=w(a);return d.jsx(V,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:t,children:d.jsx(p.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:e})})});j.displayName=N;var I="TabsTrigger",_=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,disabled:r=!1,...s}=n,o=h(I,a),i=w(a),l=E(o.baseId,t),f=$(o.baseId,t),u=t===o.value;return d.jsx(k,{asChild:!0,...i,focusable:!r,active:u,children:d.jsx(p.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":f,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:e,onMouseDown:T(n.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?o.onValueChange(t):c.preventDefault()}),onKeyDown:T(n.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(t)}),onFocus:T(n.onFocus,()=>{const c=o.activationMode!=="manual";!u&&!r&&c&&o.onValueChange(t)})})})});_.displayName=I;var R="TabsContent",A=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=h(R,a),l=E(i.baseId,t),f=$(i.baseId,t),u=t===i.value,c=v.useRef(u);return v.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(D,{present:r||u,children:({present:b})=>d.jsx(p.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!b,id:f,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:c.current?"0s":void 0},children:b&&s})})});A.displayName=R;function E(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var z=C,K=j,B=_,q=A;function J(n){const e=x.c(10);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r===void 0?"pill":r;let o;e[4]!==a?(o=g("flex flex-col gap-2",a),e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==o||e[8]!==s?(i=d.jsx(z,{"data-slot":"tabs","data-variant":s,className:o,...t}),e[6]=t,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function O(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(K,{"data-slot":"tabs-list","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function Q(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary disabled:pointer-events-none disabled:opacity-50":s==="canvas"?"flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(B,{"data-slot":"tabs-trigger","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function U(n){const e=x.c(8);let a,t;e[0]!==n?({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let r;e[3]!==a?(r=g("flex-1 outline-none h-full",a),e[3]=a,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=d.jsx(q,{"data-slot":"tabs-content",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{U as T,J as a,Q as b,O as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as s}from"./schema-
|
|
1
|
+
import{o as s}from"./schema-DQTSPDPc.js";const u="super-agent",o=["#9ca3af","#ef4444","#f97316","#f59e0b","#22c55e","#3b82f6","#a855f7","#ec4899"],c=o[0];function T(e){return o[e%o.length]??c}function A(e){return e.createdBy==="system"}const p="chore",l=["reviewer"],_={reviewer:"Reviewer"},d=["QA Agent","Code Reviewer"];function w(e){return e?.reviewer_enabled===void 0&&e?.qa_agent_enabled===!1&&e?.code_reviewer_enabled===!1?!1:s(e,"reviewer_enabled")}const R=["triage","todo","in_progress","in_review","approved","merged","post_deploy_validation","done","archived"],D=["approved","merged","post_deploy_validation"];function S(e,t){return e?[_[t],...d].some(r=>e.startsWith(`${r}:`)):!1}function E(e,t){if(t)return new Date(t).getTime();let r=0;for(const n of e)n.action==="status_changed"&&n.data?.to==="in_review"&&(r=Math.max(r,new Date(n.occurredAt).getTime()));return r}function v(e,t){const r=E(e,t.cycleStartedAt),n=new Map;for(const a of e){if(a.action!=="review_approved"&&a.action!=="review_changes_requested"||new Date(a.occurredAt).getTime()<r)continue;const i=a.data??{};if(i.reviewer==="reviewer")if(a.action==="review_approved"){if(t?.verifiedOnly&&i.verified!==!0)continue;n.set("reviewer","approved")}else n.set("reviewer","changes_requested")}return n}function g(e,t,r){if(t.length===0)return!1;const n=v(e,r);return t.every(a=>n.get(a)==="approved")}const L="task-board.item.updated",m="task-board.item.deleted",b="task-board.item.prs.updated",C=4e3;export{R as C,p as D,l as R,u as S,m as T,g as a,S as b,c,D as d,L as e,b as f,C as g,A as i,T as n,w as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b_ as wn,b as ae,G as je,a as Yt,F as Dn,J as Tn,aq as Fn,ar as An,j as s,B as be,t as ce,c as Y,r as H,I as Bn,M as In,K as ue,l as re,h as Xe,o as ie,a4 as Je,a1 as Ze,a2 as et,n as it,d as Pn,a7 as kt,m as rt,bz as En,e as Oe,bp as Vn,ap as Mn}from"./index-dxjbAgdh.js";import{C as On}from"./collection-search-DkFPt7IO.js";import{g as Ln,b as Rn,a as $n,e as Kn}from"./extract-connection-data-C8qw7buo.js";import{u as Wt,a as Xt,g as zn,C as pt}from"./connection-card-DyBNdLax.js";import{D as Jt,b as Zt,c as en,d as tn,h as Un,e as Qn}from"./dialog-Cu56JIH4.js";import{D as nn,a as sn,c as qn,b as on,e as Gn,f as rn,g as an,d as Hn}from"./drawer-xpx6fUMk.js";import{d as me,a as pe,e as ge,b as he,c as xe,F as Et}from"./form-DHeCY5Wn.js";import{I as _e}from"./input-D3JPMdmV.js";import{S as Yn,b as Wn,a as Xn,d as Jn,c as $e}from"./select-Ct-Vazyk.js";import{T as Zn}from"./textarea-BWBed-O-.js";import{b as ln}from"./use-connection-CrxTr3Cd.js";import{n as tt,a as gt,i as cn}from"./Tool02-AemZ--z3.js";import{j as ht,aN as es,aO as ts,aP as Vt,aQ as ns,t as ss,aR as os,aa as is,aS as rs,p as as,aT as ls,a8 as xt,a7 as cs,ae as ds}from"./agent-icon-1FhRoNmT.js";import{b as us,d as fs}from"./UserSquare-DtPXmwBX.js";import{s as ms}from"./XClose-D4Bvg4QW.js";import{c as ps,i as Ge,a as Mt,E as gs,p as hs,b as xs,d as js}from"./connection-form-helpers-CthU9O7u.js";import{a as jt}from"./authenticate-and-persist-oauth-CXHQCghQ.js";import{g as ys}from"./connection-slug-CITJ0kGN.js";import{C as bs}from"./collection-tabs-BuLa0mCq.js";import{u as Ot}from"./use-infinite-scroll-D3GKVSmf.js";import{B as He}from"./badge-DJqPRhkR.js";import{u as vs}from"./useSuspenseInfiniteQuery-axnqWbbC.js";import{S as Cs,u as ks,f as Ns}from"./use-mcp-client-CXOd5tZp.js";import{i as nt}from"./Check-BeSUa4SA.js";import{s as _s}from"./Plus-BQUCrYF9.js";import{g as st}from"./metadata-dUsYcpuu.js";import{u as Ss}from"./use-ai-providers-BTBvY4Hc.js";import{a as ws}from"./use-file-configs-DsqznNn1.js";import{d as Ds}from"./use-organization-settings-JhsPi-Rf.js";import{r as Ts}from"./site-slug-uya6Wp4-.js";import{T as Fs,C as Nt,c as As,d as Bs,S as yt}from"./task-board-DWbv4I55.js";import{a as Is}from"./decopilot-sse-pool-DLf4riY9.js";import{u as Ps}from"./use-decopilot-events-kkwWTwqq.js";import{A as Lt}from"./avatar-D1uraqXx.js";import{h as ot,D as dn,b as un,g as fn,c as mn}from"./dropdown-menu-DhGKgZoF.js";import{a as _t,b as St,P as wt}from"./popover-CyZEnWsJ.js";import{e as Le,a as Dt,c as Tt,d as Ce,b as Ft,C as At}from"./command-vpSyzNuL.js";import{t as ze}from"./ChevronUp-92pPtFia.js";import{s as Es}from"./TrendUp01-Dqmx1wpU.js";import{a as Vs}from"./Settings02-BCUOna1P.js";import{s as Rt}from"./User01-wEgf8NoL.js";import{G as Ms}from"./github-icon-BKLlhfRv.js";import{P as Os}from"./project-icon-vuMrDOh-.js";import{g as $t}from"./get-initials-D-f_fDFw.js";import{p as Ls,a as Rs}from"./github-repo-CTPv5ZM2.js";import{i as $s}from"./AlertCircle-Bpv9M3Mo.js";import{i as Ks}from"./CheckCircle-B9b2Ze8a.js";import{a as pn}from"./DotsVertical-Cyoi6mM-.js";import{s as zs}from"./Eye-BokJBg-8.js";import{i as Us}from"./Shield01-DujarpiA.js";const Qs=wn("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);function qs({open:t,onOpenChange:e,onCreated:n}){const o=ae(),{org:r}=je(),{data:a}=Yt.useSession(),{stdioEnabled:i}=Dn(),m=Tn(),c=ln(),d=Wt(),p=Xt(d,"").items,l=Fn({resolver:An(ps),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),f=l.watch("ui_type"),j=l.watch("connection_url"),g=l.watch("npx_package"),x=Ge({uiType:f,connectionUrl:j??"",npxPackage:g??""})??Mt({uiType:f,connectionUrl:j??"",registryItems:p}),y=h=>{const _=h.trim();if(!_)return;const w=!!l.formState.dirtyFields.title,P=!!l.formState.dirtyFields.description,V=!!l.formState.dirtyFields.env_vars,N=F=>{if(F&&(!w&&!l.getValues("title").trim()&&F.title&&l.setValue("title",F.title,{shouldDirty:!1}),!P&&!(l.getValues("description")??"").trim()&&F.description&&l.setValue("description",F.description,{shouldDirty:!1}),!V&&F.envVarKeys?.length)){const $=l.getValues("env_vars")??[],I=new Set($.map(R=>R.key)),B=F.envVarKeys.filter(R=>!I.has(R));B.length>0&&l.setValue("env_vars",[...$,...B.map(R=>({key:R,value:""}))],{shouldDirty:!0})}},T=hs(_);if(T&&i){l.setValue("ui_type","NPX",{shouldDirty:!0}),l.setValue("npx_package",T.packageName,{shouldDirty:!0}),l.setValue("connection_url","",{shouldDirty:!0}),l.setValue("connection_token",null,{shouldDirty:!0}),N(Ge({uiType:"NPX",npxPackage:T.packageName}));return}if(_.startsWith("http://")||_.startsWith("https://")){const F=f==="HTTP"||f==="SSE"||f==="Websocket"?f:"HTTP";l.setValue("ui_type",F,{shouldDirty:!0}),l.setValue("connection_url",_,{shouldDirty:!0}),N(Ge({uiType:F,connectionUrl:_})??Mt({uiType:F,connectionUrl:_,registryItems:p}));return}f==="NPX"&&N(Ge({uiType:"NPX",npxPackage:_}))},S=h=>{h||l.reset(),e(h)},b=async h=>{let _,w=null,P=null,V=null;h.ui_type==="NPX"?(_="STDIO",w="",V=xs(h.npx_package||"",h.env_vars||[])):h.ui_type==="STDIO"?(_="STDIO",w="",V=js(h.stdio_command||"",h.stdio_args||"",h.stdio_cwd,h.env_vars||[])):(_=h.ui_type,w=h.connection_url||"",P=h.connection_token||null);const N=Ln("conn");try{await c.create.mutateAsync({id:N,title:h.title,description:h.description||null,connection_type:_,connection_url:w,connection_token:P,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:a?.user?.id||"system",organization_id:r.id,icon:h.icon??null,app_name:null,app_id:null,connection_headers:V,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),l.reset(),e(!1),n?.(N)}catch{ce.error(o("connections.createConnectionDialog.failedToCreateConnection"))}},k=o("connections.createConnectionDialog.title"),v=o("connections.createConnectionDialog.description"),C=l.formState.isSubmitting?o("connections.createConnectionDialog.saving"):o("connections.createConnectionDialog.createButton"),D=s.jsxs("div",{className:"grid gap-4",children:[s.jsx(me,{control:l.control,name:"ui_type",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:o("connections.createConnectionDialog.typeLabel")}),s.jsxs(Yn,{value:h.value,onValueChange:h.onChange,children:[s.jsx(he,{children:s.jsx(Wn,{children:s.jsx(Xn,{})})}),s.jsxs(Jn,{children:[s.jsx($e,{value:"HTTP",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(ht,{className:"w-4 h-4"}),o("connections.createConnectionDialog.httpType")]})}),s.jsx($e,{value:"SSE",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(ht,{className:"w-4 h-4"}),o("connections.createConnectionDialog.sseType")]})}),s.jsx($e,{value:"Websocket",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(ht,{className:"w-4 h-4"}),o("connections.createConnectionDialog.websocketType")]})}),i&&s.jsxs(s.Fragment,{children:[s.jsx($e,{value:"NPX",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(tt,{className:"w-4 h-4"}),o("connections.createConnectionDialog.npxPackageType")]})}),s.jsx($e,{value:"STDIO",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(us,{className:"w-4 h-4"}),o("connections.createConnectionDialog.customCommandType")]})})]})]})]}),s.jsx(xe,{})]})}),f==="NPX"&&s.jsx(me,{control:l.control,name:"npx_package",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:o("connections.createConnectionDialog.npmPackageLabel")}),s.jsx(he,{children:s.jsx(_e,{placeholder:o("connections.createConnectionDialog.npmPackagePlaceholder"),...h,value:h.value??"",onPaste:_=>{const w=_.clipboardData.getData("text");w&&(_.preventDefault(),l.setValue("npx_package",w.trim(),{shouldDirty:!0}),y(w))},onBlur:_=>{y(_.target.value),h.onBlur()}})}),s.jsx(xe,{})]})}),f==="STDIO"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[s.jsx(me,{control:l.control,name:"stdio_command",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:o("connections.createConnectionDialog.commandLabel")}),s.jsx(he,{children:s.jsx(_e,{placeholder:o("connections.createConnectionDialog.commandPlaceholder"),...h,value:h.value??""})}),s.jsx(xe,{})]})}),s.jsx(me,{control:l.control,name:"stdio_args",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:o("connections.createConnectionDialog.argumentsLabel")}),s.jsx(he,{children:s.jsx(_e,{placeholder:o("connections.createConnectionDialog.argumentsPlaceholder"),...h,value:h.value??""})}),s.jsx(xe,{})]})})]}),s.jsx(me,{control:l.control,name:"stdio_cwd",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:o("connections.createConnectionDialog.workingDirectoryLabel")}),s.jsx(he,{children:s.jsx(_e,{placeholder:o("connections.createConnectionDialog.workingDirectoryPlaceholder"),...h,value:h.value??""})}),s.jsx("p",{className:"text-xs text-muted-foreground",children:o("connections.createConnectionDialog.workingDirectoryDescription")}),s.jsx(xe,{})]})})]}),(f==="NPX"||f==="STDIO")&&s.jsx(me,{control:l.control,name:"env_vars",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:o("connections.createConnectionDialog.environmentVariablesLabel")}),s.jsx(he,{children:s.jsx(gs,{value:h.value??[],onChange:h.onChange})}),s.jsx(xe,{})]})}),f!=="NPX"&&f!=="STDIO"&&s.jsxs(s.Fragment,{children:[s.jsx(me,{control:l.control,name:"connection_url",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:o("connections.createConnectionDialog.urlLabel")}),s.jsx(he,{children:s.jsx(_e,{placeholder:o("connections.createConnectionDialog.urlPlaceholder"),...h,value:h.value??"",onPaste:_=>{const w=_.clipboardData.getData("text");w&&(_.preventDefault(),l.setValue("connection_url",w.trim(),{shouldDirty:!0}),y(w))},onBlur:_=>{y(_.target.value),h.onBlur()}})}),s.jsx(xe,{})]})}),s.jsx(me,{control:l.control,name:"connection_token",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:x?.token?.label??o("connections.createConnectionDialog.tokenLabelDefault")}),s.jsx(he,{children:s.jsx(_e,{type:"password",placeholder:x?.token?.placeholder??o("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...h,value:h.value??""})}),x?.token?.helperText&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&s.jsxs(s.Fragment,{children:[" ","·"," ",s.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:o("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),s.jsx(xe,{})]})})]}),s.jsx(me,{control:l.control,name:"title",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:o("connections.createConnectionDialog.nameLabel")}),s.jsx(he,{children:s.jsx(_e,{placeholder:o("connections.createConnectionDialog.namePlaceholder"),...h})}),s.jsx(xe,{})]})}),s.jsx(me,{control:l.control,name:"description",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:o("connections.createConnectionDialog.descriptionLabel")}),s.jsx(he,{children:s.jsx(Zn,{placeholder:o("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...h,value:h.value??""})}),s.jsx(xe,{})]})})]});return m?s.jsx(nn,{open:t,onOpenChange:S,children:s.jsxs(sn,{className:"max-h-[90vh]",children:[s.jsx(qn,{className:"pb-2",children:s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{className:"flex-1 text-left",children:[s.jsx(on,{children:k}),s.jsx(Gn,{className:"mt-1",children:v})]}),s.jsx(rn,{asChild:!0,children:s.jsx(be,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:s.jsx(ms,{size:16})})})]})}),s.jsx(Et,{...l,children:s.jsxs("form",{onSubmit:l.handleSubmit(b),children:[s.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:D}),s.jsx(an,{children:s.jsx(be,{type:"submit",disabled:l.formState.isSubmitting,className:"w-full",children:C})})]})})]})}):s.jsx(Jt,{open:t,onOpenChange:S,children:s.jsxs(Zt,{className:"sm:max-w-[525px]",children:[s.jsxs(en,{children:[s.jsx(tn,{children:k}),s.jsx(Un,{children:v})]}),s.jsx(Et,{...l,children:s.jsxs("form",{onSubmit:l.handleSubmit(b),children:[s.jsx("div",{className:"py-4",children:D}),s.jsxs(Qn,{children:[s.jsx(be,{type:"button",variant:"outline",onClick:()=>S(!1),children:o("connections.createConnectionDialog.cancelButton")}),s.jsx(be,{type:"submit",disabled:l.formState.isSubmitting,className:"min-w-40",children:C})]})]})})]})})}function Gs(t){const e=Y.c(72),{mode:n,agentId:o,addedConnectionIds:r,onAdd:a,onCloneAndAdd:i,onConnectAndAdd:m,connectingItemId:c,search:d,onCreateConnection:u,onBrowseNavigate:p,defaultTab:l}=t,f=n===void 0?"add":n,j=l===void 0?"connected":l,g=ae(),{org:x}=je(),y=H.useDeferredValue(d),S=d!==y;let b;e[0]!==y?(b=y.trim().toLowerCase(),e[0]=y,e[1]=b):b=e[1];const k=b;let v;e[2]!==j?(v=A=>A??j,e[2]=j,e[3]=v):v=e[3];const[C,D]=Bn(In.connectionsTab(x.slug)+(j==="all"?":home-modal":":agent-modal"),v);let h;e[4]!==C||e[5]!==D?(h=A=>{A!==C&&ie("connections_dialog_tab_changed",{to_tab:A}),D(A)},e[4]=C,e[5]=D,e[6]=h):h=e[6];const _=h;let w;e[7]!==x.id||e[8]!==x.slug?(w={connectionId:Cs,orgId:x.id,orgSlug:x.slug},e[7]=x.id,e[8]=x.slug,e[9]=w):w=e[9];const P=ks(w),V=y?.trim().split(/\s+/).filter(Boolean)??[],N=V.length>0?{operator:"or",conditions:V.flatMap(to)}:void 0,T={...N&&{where:N},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},F=JSON.stringify(T),{data:$,fetchNextPage:I,hasNextPage:B,isFetchingNextPage:R}=vs({queryKey:ue.collectionListInfinite(P,x.id,"","CONNECTIONS",F),queryFn:async A=>{const{pageParam:q}=A,ye=q===void 0?0:q;return(await P.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...N&&{where:N},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:ye}})).structuredContent},initialPageParam:0,getNextPageParam:Zs,staleTime:3e4}),G=$?.pages.flatMap(Js)??[],E=zn(G),U=new Set(G.filter(Xs).map(Ws)),M=Wt(),Q=Xt(M,y),Z=Ot(Q.loadMore,Q.hasMore,Q.isLoadingMore),ee=Ot(I,B??!1,R),K=C==="all"||!!k,ne=K?Q.items.filter(A=>{const q=Rn(A);if(q&&U.has(q))return!1;if(!k)return!0;const ye=st(A._meta),ke=[A.title,A.description,A.name,A.server?.title,A.server?.description,A.server?.name,ye?.friendly_name,ye?.friendlyName].filter(Boolean).join(" ").toLowerCase();return V.some(fe=>ke.includes(fe.toLowerCase()))}):[],W=ne.filter(Ys),X=ne.filter(Hs);let J;e[10]!==r?(J=A=>A.some(q=>r.has(q.id)),e[10]=r,e[11]=J):J=e[11];const te=J;let se;e[12]!==r||e[13]!==o||e[14]!==c||e[15]!==te||e[16]!==f||e[17]!==a||e[18]!==p||e[19]!==i||e[20]!==g?(se=(A,q,ye,ke,fe)=>{const qe=te(fe),Me=fe.find(Ne=>!r.has(Ne.id)),le=fe[0];if(f==="browse"){const Ne=ys(le);return s.jsx(pt,{connection:{title:q,icon:ye,description:fe.length>1?`${fe.length} instances`:ke??void 0},fallbackIcon:s.jsx(tt,{}),headerActionsAlwaysVisible:!0,headerActions:s.jsxs(He,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[s.jsx(nt,{size:11})," ",g("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{ie("connection_browse_clicked",{app_name:le.app_name??null,connection_id:le.id,instances_count:fe.length}),p?.(Ne)}},A)}return s.jsx(pt,{connection:{title:q,icon:ye,description:ke},fallbackIcon:s.jsx(tt,{}),headerActionsAlwaysVisible:!0,headerActions:s.jsxs("div",{className:"flex items-center gap-1.5",children:[qe&&s.jsxs(He,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[s.jsx(nt,{size:11})," ",g("virtualMcp.connectionDialogContent.added")]}),s.jsx(be,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:c!==null,onClick:Ne=>{Ne.stopPropagation(),Me?(ie("connection_add_clicked",{action:"use_existing",app_name:le.app_name??null,connection_id:Me.id}),o&&ie("agent_connection_attached",{agent_id:o,connection_id:Me.id,app_name:le.app_name??null,mode:"existing"}),a(Me.id)):(ie("connection_add_clicked",{action:"clone",app_name:le.app_name??null,base_connection_id:le.id}),i(le))},children:g("virtualMcp.connectionDialogContent.add")})]})},A)},e[12]=r,e[13]=o,e[14]=c,e[15]=te,e[16]=f,e[17]=a,e[18]=p,e[19]=i,e[20]=g,e[21]=se):se=e[21];const O=se;let L;e[22]!==c||e[23]!==f||e[24]!==m||e[25]!==g?(L=A=>{const q=st(A._meta),ye=q?.friendlyName||q?.friendly_name||A.server?.title||A.title||A.server?.name||A.name||A.id||"",ke=A.server?.description||A.description||null,fe=A.server?.icons?.[0]?.src||$n(A.server?.repository)||null,qe=q?.official===!0,Me=q?.verified===!0,le=q?.owner==="deco";return s.jsx(pt,{connection:{title:ye,description:ke,icon:fe},fallbackIcon:s.jsx(tt,{}),headerActionsAlwaysVisible:!0,headerActions:s.jsxs("div",{className:"flex items-center gap-1.5",children:[le&&s.jsxs(Je,{children:[s.jsx(Ze,{asChild:!0,children:s.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:g("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),s.jsx(et,{children:g("virtualMcp.connectionDialogContent.builtByDeco")})]}),!le&&qe&&s.jsxs(Je,{children:[s.jsx(Ze,{asChild:!0,children:s.jsx(He,{variant:"outline",size:"icon",children:s.jsx(gt,{})})}),s.jsx(et,{children:g("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!le&&!qe&&Me&&s.jsxs(Je,{children:[s.jsx(Ze,{asChild:!0,children:s.jsx(He,{variant:"outline",size:"icon",children:s.jsx(gt,{})})}),s.jsx(et,{children:g("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),s.jsx(be,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:c!==null,onClick:Ne=>{Ne.stopPropagation(),ie("connection_add_clicked",{action:"connect_new",registry_item_id:A.id,app_name:q?.friendlyName||A.server?.name||A.name||null}),m(A)},children:c===A.id?s.jsx(Xe,{className:"size-3.5"}):g(f==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${A.id}`)},e[22]=c,e[23]=f,e[24]=m,e[25]=g,e[26]=L):L=e[26];const oe=L;let z;e[27]!==C||e[28]!==_||e[29]!==u||e[30]!==k||e[31]!==g?(z=!k&&s.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[s.jsx(bs,{tabs:[{id:"all",label:g("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:g("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:C,onTabChange:A=>_(A)}),s.jsxs(be,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{ie("connections_dialog_custom_clicked"),u()},children:[s.jsx(_s,{size:12}),g("virtualMcp.connectionDialogContent.customConnection")]})]}),e[27]=C,e[28]=_,e[29]=u,e[30]=k,e[31]=g,e[32]=z):z=e[32];const ve=S&&"opacity-50 pointer-events-none";let de;e[33]!==ve?(de=re("flex-1 overflow-auto p-5 transition-opacity duration-150",ve),e[33]=ve,e[34]=de):de=e[34];const De="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let Te;e[35]!==O?(Te=A=>{if(A.type==="group")return O(A.key,A.title,A.icon,null,A.connections);const q=A.connection;return O(q.id,q.title,q.icon,q.description??null,[q])},e[35]=O,e[36]=Te):Te=e[36];const ct=E.map(Te);let Fe;e[37]!==ee?(Fe=s.jsx("div",{ref:ee,className:"col-span-full h-1"}),e[37]=ee,e[38]=Fe):Fe=e[38];let Ae;e[39]!==R?(Ae=R&&s.jsx("div",{className:"col-span-full flex justify-center py-6",children:s.jsx(Xe,{className:"size-6 text-muted-foreground"})}),e[39]=R,e[40]=Ae):Ae=e[40];const dt=K&&W.length>0&&s.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[s.jsx(gt,{size:13,className:"text-muted-foreground shrink-0"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:g("virtualMcp.connectionDialogContent.sectionVerified")}),s.jsx("div",{className:"flex-1 h-px bg-border"})]}),ut=K&&W.map(oe),ft=K&&X.length>0&&s.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[s.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:g("virtualMcp.connectionDialogContent.sectionAllConnections")}),s.jsx("div",{className:"flex-1 h-px bg-border"})]}),mt=K&&X.map(oe);let Be;e[41]!==Z||e[42]!==M||e[43]!==K?(Be=K&&M.length>0&&s.jsx("div",{ref:Z,className:"col-span-full h-1"}),e[41]=Z,e[42]=M,e[43]=K,e[44]=Be):Be=e[44];let Ie;e[45]!==Q.isLoadingMore||e[46]!==K?(Ie=K&&Q.isLoadingMore&&s.jsx("div",{className:"col-span-full flex justify-center py-6",children:s.jsx(Xe,{className:"size-6 text-muted-foreground"})}),e[45]=Q.isLoadingMore,e[46]=K,e[47]=Ie):Ie=e[47];let Pe;e[48]!==ct||e[49]!==Fe||e[50]!==Ae||e[51]!==dt||e[52]!==ut||e[53]!==ft||e[54]!==mt||e[55]!==Be||e[56]!==Ie?(Pe=s.jsxs("div",{className:De,children:[ct,Fe,Ae,dt,ut,ft,mt,Be,Ie]}),e[48]=ct,e[49]=Fe,e[50]=Ae,e[51]=dt,e[52]=ut,e[53]=ft,e[54]=mt,e[55]=Be,e[56]=Ie,e[57]=Pe):Pe=e[57];let Ee;e[58]!==C||e[59]!==E.length||e[60]!==X||e[61]!==d||e[62]!==g||e[63]!==W?(Ee=E.length===0&&W.length===0&&X.length===0&&s.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:d?g("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:d}):g(C==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),e[58]=C,e[59]=E.length,e[60]=X,e[61]=d,e[62]=g,e[63]=W,e[64]=Ee):Ee=e[64];let Ve;e[65]!==de||e[66]!==Pe||e[67]!==Ee?(Ve=s.jsxs("div",{className:de,children:[Pe,Ee]}),e[65]=de,e[66]=Pe,e[67]=Ee,e[68]=Ve):Ve=e[68];let Qe;return e[69]!==z||e[70]!==Ve?(Qe=s.jsxs(s.Fragment,{children:[z,Ve]}),e[69]=z,e[70]=Ve,e[71]=Qe):Qe=e[71],Qe}function Hs(t){return!t.verified&&!st(t._meta)?.verified&&!t.meta?.verified}function Ys(t){return t.verified||st(t._meta)?.verified||t.meta?.verified}function Ws(t){return t.app_name}function Xs(t){return t.app_name}function Js(t){return t?.items??[]}function Zs(t,e){if(t?.hasMore)return e.reduce(eo,0)}function eo(t,e){return t+(e?.items?.length??0)}function to(t){return[{field:["title"],operator:"contains",value:t},{field:["description"],operator:"contains",value:t}]}function Ji({open:t,onOpenChange:e,defaultTab:n,initialSearch:o="",...r}){const a=ae(),i=r.mode??"add",m="agentId"in r?r.agentId:void 0,c="addedConnectionIds"in r?r.addedConnectionIds??new Set:new Set,d="onAdd"in r&&r.onAdd?r.onAdd:N=>{},u=(N,T,F)=>{m&&ie("agent_connection_attached",{agent_id:m,connection_id:N,app_name:T,mode:F})},[p,l]=H.useState(null),[f,j]=H.useState(o),[g,x]=H.useState(!1),[y,S]=H.useState(t);t!==y&&(S(t),t&&j(o));const{org:b}=je(),{data:k}=Yt.useSession(),v=ln(),C=it(),D=Pn(),h=N=>{e(!1),D({to:"/$org/settings/connections/$appSlug",params:{org:b.slug,appSlug:N}})},_=()=>{C.invalidateQueries({predicate:N=>{const T=N.queryKey;return T[1]===b.id&&T[3]==="collection"&&T[4]==="CONNECTIONS"}})},w=async(N,T)=>{ie("connection_oauth_succeeded",{connection_id:N,flow:T});const F=new URL(`/api/${b.slug}/mcp/${N}`,window.location.origin);await C.invalidateQueries({queryKey:ue.isMCPAuthenticated(F.href,null)}),_()},P=async N=>{l(N.app_name??N.id);try{const F=`${N.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,I=(await v.create.mutateAsync({title:F,description:N.description??null,connection_type:N.connection_type,connection_url:N.connection_url??null,connection_token:null,icon:N.icon??null,app_name:N.app_name??null,app_id:N.app_id??null,connection_headers:N.connection_headers??null})).id,B=await jt({connectionId:I,orgId:b.id,orgSlug:b.slug,persistFallback:R=>v.update.mutateAsync({id:I,data:{connection_token:R}}).then(()=>{})});if(B.ran&&!B.ok){ie("connection_oauth_failed",{connection_id:I,flow:"clone",error:B.error??"no_token"}),ce.error(a("virtualMcp.addConnectionDialog.authenticationFailedError",{error:B.error??"no token received"})),await v.delete.mutateAsync(I);return}B.ran&&await w(I,"clone"),u(I,N.app_name??null,"clone"),d(I)}catch(T){console.error("Failed to add connection:",T),ce.error(a("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{l(null)}},V=async N=>{if(!(!b||!k?.user?.id)){l(N.id);try{const T=Kn(N,b.id,k.user.id,{remoteIndex:0}),F=T.connection_type==="STDIO",$=!!T.connection_url,I=F&&T.connection_headers&&typeof T.connection_headers=="object"&&"command"in T.connection_headers;if(!$&&!I){ce.error(a("virtualMcp.addConnectionDialog.mcpServerConnectionError")),l(null);return}const{id:B}=await v.create.mutateAsync(T),R=await jt({connectionId:B,orgId:b.id,orgSlug:b.slug,persistFallback:G=>v.update.mutateAsync({id:B,data:{connection_token:G}}).then(()=>{})});if(R.ran&&!R.ok){ie("connection_oauth_failed",{connection_id:B,flow:"connect_new",error:R.error??"no_token"}),ce.warning(a("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:a("virtualMcp.addConnectionDialog.signInFailedDescription",{error:R.error??"no token received"})}),u(B,T.app_name??null,"new"),d(B);return}R.ran?(await w(B,"connect_new"),ce.success(a("virtualMcp.addConnectionDialog.connectedAuthenticated"))):ce.success(a("virtualMcp.addConnectionDialog.connected")),u(B,T.app_name??null,"new"),d(B)}catch(T){console.error("Failed to connect:",T),ce.error(a("virtualMcp.addConnectionDialog.failedToConnect"))}finally{l(null)}}};return s.jsxs(Jt,{open:t,onOpenChange:e,children:[s.jsxs(Zt,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[s.jsx(en,{className:"px-6 pt-5 pb-0 shrink-0",children:s.jsx(tn,{className:"text-base font-semibold",children:a(i==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),s.jsx("div",{className:"pt-3 shrink-0",children:s.jsx(On,{value:f,onChange:j,placeholder:a("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),s.jsx(H.Suspense,{fallback:s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(Xe,{className:"size-6 text-muted-foreground"})}),children:s.jsx(Gs,{mode:i,agentId:m,addedConnectionIds:c,onAdd:d,onCloneAndAdd:P,onConnectAndAdd:V,connectingItemId:p,search:f,onCreateConnection:()=>x(!0),onBrowseNavigate:h,defaultTab:n})})]}),s.jsx(qs,{open:g,onOpenChange:x,onCreated:async N=>{x(!1);const T=await jt({connectionId:N,orgId:b.id,orgSlug:b.slug,persistFallback:F=>v.update.mutateAsync({id:N,data:{connection_token:F}}).then(()=>{})});if(T.ran&&!T.ok){ie("connection_oauth_failed",{connection_id:N,flow:"custom_create",error:T.error??"no_token"}),ce.warning(a("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:a("virtualMcp.addConnectionDialog.signInFailedDescription",{error:T.error??"no token received"})}),u(N,null,"custom"),d(N),e(!1);return}T.ran&&await w(N,"custom_create"),u(N,null,"custom"),d(N),e(!1)}})]})}const Kt=new Map;function Zi(){const{org:t}=je(),e=kt(),n=Ss(),o=n.find(x=>x.providerId==="deco"),{data:r,isLoading:a,refetch:i,isFetching:m}=rt({queryKey:ue.aiProviderCredits(t.id,"deco"),enabled:!!o,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),c=r?.balanceCents??null,d=c!=null?c/100:null,u=H.useRef(new Map);if(c!=null){const x=Kt.get(t.id);u.current.get(t.id)&&x!=null&&c>x&&ie("credits_topped_up_detected",{organization_id:t.id,delta_cents:c-x,previous_balance_cents:x,new_balance_cents:c}),Kt.set(t.id,c),u.current.set(t.id,!0)}const p=!!o,l=c!=null&&c>0,f=c!=null&&c===0,j=c!=null&&c===200,g=n.length>0&&n.every(x=>x.providerId==="deco");return{hasDecoKey:p,decoKeyId:o?.id??null,balanceCents:c,balanceDollars:d,hasCredits:l,isZeroBalance:f,isInitialFreeCredit:j,hasOnlyDecoProvider:g,isLoading:a,isFetching:m,refetch:i}}const no=4,so="TASK";function oo(t){return t.replace(/[^a-zA-Z]/g,"").toUpperCase().slice(0,no)||so}function io(t,e){return e==null?null:`${oo(t)}-${String(e).padStart(2,"0")}`}const ro=/^(?:[a-z]{1,8}-)?0*(\d+)$/i;function ao(t){const e=ro.exec(t.trim())?.[1];return e===void 0?null:Number(e)}function zt(t){const e=Y.c(8),{size:n,className:o}=t,r=n===void 0?16:n;let a;e[0]!==r?(a={width:r,height:r},e[0]=r,e[1]=a):a=e[1];let i;e[2]!==o?(i=re("shrink-0 rounded-full object-cover",o),e[2]=o,e[3]=i):i=e[3];let m;return e[4]!==r||e[5]!==a||e[6]!==i?(m=s.jsx("img",{src:Ns,alt:"Super Agent",width:r,height:r,style:a,className:i}),e[4]=r,e[5]=a,e[6]=i,e[7]=m):m=e[7],m}const Ue=["overview","reports","board","site-editor","assets","hosting","e2e","analytics","cdn","automations"],lo=["overview","reports","board","site-editor"],Bt=1,co=["assets","hosting","e2e","analytics","cdn"];function er(t,e,n){if(!t)return{project:n??null,resolvedScopeId:null};const o=e?.id===t?e:n?.id===t?n:null;return{project:o,resolvedScopeId:o?t:null}}function tr(t){return t?.sidebarViews!==void 0?t.sidebarViews:t?.ui?.layout?.sidebarViews}function gn(t,e){const n=new Set(t??[]);if(e!==Bt)for(const o of lo)n.add(o);return Ue.filter(o=>n.has(o))}function uo(t){return Ue.some(e=>e===t)}function fo(t){return co.some(e=>e===t)}function mo(t,e){return{overview:t,reports:t,board:t,"site-editor":t,assets:e.assets,hosting:e.hosting,e2e:e.e2e,analytics:e.analytics,cdn:e.cdn,automations:!0}}function nr(t,e,n){const o=mo(e,n);return t?o:{...o,overview:!0,reports:!0,board:!0}}function sr(t,e,n){const o=new Set(gn(t,n));return Ue.filter(r=>e[r]&&o.has(r))}function or(t,e,n){return n||!t?t:(t.type==="preview"||t.type==="content"||t.type==="code"?"site-editor":t.type)===e?{type:"settings"}:t}function ir(t){return Ue.filter(e=>t[e])}function po(t,e,n){return!uo(t)||e[t]?!1:fo(t)?!(t==="assets"?n.assets:n.siteAccess):!0}function rr(t,e,n,o,r){return po(t==="preview"||t==="content"||t==="code"?"site-editor":t,e,n)||t==="content"&&!o.includes("content")||t==="code"&&r&&!o.includes("code")}function ar(t,e,n,o){const r=new Set(gn(t,o));return n?r.add(e):r.delete(e),Ue.filter(a=>r.has(a))}function Ke(t,e){return ue.optimisticProjectSidebarViews(t,e)}function Ye(t){return typeof t=="object"&&t!==null}function hn(t,e){return t[1]===e&&t[3]==="collection"&&t[4]==="VIRTUAL_MCP"}function go(t,e){if(!Ye(t))return t;if("item"in t&&Ye(t.item)&&t.item.id===e.id)return{...t,item:e};if(!("structuredContent"in t)||!Ye(t.structuredContent))return t;const n=t.structuredContent.items;if(!Array.isArray(n))return t;let o=!1;const r=n.map(a=>!Ye(a)||a.id!==e.id?a:(o=!0,e));return o?{...t,structuredContent:{...t.structuredContent,items:r}}:t}function lr(t,e,n){t.setQueriesData({predicate:o=>hn(o.queryKey,e)},o=>go(o,n))}function cr(t,e,n){const o=t.getQueriesData({predicate:r=>hn(r.queryKey,e)&&r.queryKey[5]===n});for(const[,r]of o)if(r?.item?.id===n)return r.item;return null}function It(t,e,n){return t.getQueryData(Ke(e,n))??null}function ho(t,e){if(e)return{sidebarViews:[...e.views],sidebarViewsVersion:Bt};const n=t?.sidebarViews;return{sidebarViews:n===null?null:n?[...n]:void 0,sidebarViewsVersion:t?.sidebarViewsVersion}}function dr(t,e,n){return e?{sidebarViews:[...e.views],sidebarViewsVersion:Bt}:n===void 0?{sidebarViews:t.sidebarViews===null?null:t.sidebarViews?[...t.sidebarViews]:void 0,sidebarViewsVersion:t.sidebarViewsVersion}:ho(n,null)}function xo(t,e,n,o,r){const a=It(t,e,n),i={revision:(a?.revision??0)+1,views:[...o],rollbackViews:a?[...a.rollbackViews]:[...r]};return t.setQueryData(Ke(e,n),i),{revision:i.revision,views:[...i.views],persistedViews:[...i.rollbackViews]}}function jo(t,e,n){const o=It(t,e,n);return o?{revision:o.revision,views:[...o.views],persistedViews:[...o.rollbackViews]}:null}function xn(t,e){const n=new Set(t),o=new Set(e);return n.size===o.size&&[...n].every(r=>o.has(r))}function ur(t){return t?!xn(t.views,t.persistedViews):!1}function yo(t,e,n,{snapshot:o,saved:r,authoritativeViews:a}){if(!o)return{settledLatest:!1,reconciledViews:null};const i=It(t,e,n);if(!i||o.revision>i.revision)return{settledLatest:!1,reconciledViews:null};const m=a!==void 0?[...a]:r?[...o.views]:null,c={...i,rollbackViews:m??i.rollbackViews};return c.rollbackViews!==i.rollbackViews&&t.setQueryData(Ke(e,n),c),o.revision!==i.revision?{settledLatest:!1,reconciledViews:null}:(t.setQueryData(Ke(e,n),null),{settledLatest:!0,reconciledViews:r?m&&!xn(m,o.views)?m:null:[...c.rollbackViews]})}function fr(t){const e=Y.c(5),{org:n}=je(),o=t??"";let r;e[0]!==n.id||e[1]!==o?(r=Ke(n.id,o),e[0]=n.id,e[1]=o,e[2]=r):r=e[2];let a;e[3]!==r?(a={queryKey:r,queryFn:bo,enabled:!1,staleTime:Number.POSITIVE_INFINITY},e[3]=r,e[4]=a):a=e[4];const{data:i}=rt(a);return i?.views}async function bo(){return null}function mr(t){const e=Y.c(4),{org:n}=je(),o=it();let r;return e[0]!==n||e[1]!==o||e[2]!==t?(r={stage:(a,i)=>xo(o,n.id,t,a,i),snapshot:()=>jo(o,n.id,t),settle:a=>yo(o,n.id,t,a)},e[0]=n,e[1]=o,e[2]=t,e[3]=r):r=e[3],r}function vo(t,e){if(!e)return null;const n=e.toLowerCase();return t.find(o=>{const r=o.bucket.toLowerCase();return o.siteSlug?.toLowerCase()===n||r===n||r===`deco-assets-${n}`})??null}function pr(t){const e=Y.c(10),{org:n}=je(),o=En(),r=Ds(),a=ws(),i=Ts(t),m=o.hostingEnabled===!0,c=o.monitorEnabled===!0||o.auth.localMode===!0,d=(m||c)&&!!i,u=rt({queryKey:ue.hostingAccess(n.slug,i??""),queryFn:async()=>{const v=await fetch(`/api/${n.slug}/hosting/${encodeURIComponent(i??"")}/access`);return v.ok?await v.json():{owned:!1,canWrite:!1}},enabled:d,staleTime:6e4}),p=u.data?.owned===!0,l=!!vo(a.data?.configs??[],i),f=m&&p&&r.hosting,j=m&&p&&r.e2e,g=m&&p&&r.analytics,x=c&&p&&r.monitor;let y;e[0]!==l||e[1]!==f||e[2]!==j||e[3]!==g||e[4]!==x?(y={assets:l,hosting:f,e2e:j,analytics:g,cdn:x},e[0]=l,e[1]=f,e[2]=j,e[3]=g,e[4]=x,e[5]=y):y=e[5];const S=!!i&&a.isPending,b=d&&u.isPending;let k;return e[6]!==y||e[7]!==S||e[8]!==b?(k={presence:y,assetsPending:S,siteAccessPending:b},e[6]=y,e[7]=S,e[8]=b,e[9]=k):k=e[9],k}const Ut=()=>0;function Co(t){const{orgSlug:e,enabled:n=!0,onUpdate:o,onDelete:r,onResync:a}=t,i=H.useRef(o);i.current=o;const m=H.useRef(r);m.current=r;const c=H.useRef(a);c.current=a;const d=H.useRef(null),u=H.useRef(n),p=H.useRef(e);(!d.current||u.current!==n||p.current!==e)&&(u.current=n,p.current=e,d.current=f=>{if(!n||!e)return()=>{};const j=g=>{let x;try{x=JSON.parse(g.data)}catch{return}x.data&&(g.type===Fs?m.current?.(x.data.id):i.current(x.data)),f()};return Is.subscribe(e,j,()=>c.current?.())}),H.useSyncExternalStore(d.current,Ut,Ut)}function ko(t,e){return{queryKey:ue.taskBoardItems(t),refetchInterval:6e4,queryFn:async()=>{const{items:n}=await e.call("TASK_BOARD_ITEM_LIST",{});return{items:n}}}}function No(){const t=Y.c(21),{org:e,locator:n}=je(),o=it();let r;t[0]!==n?(r=ue.taskBoardItems(n),t[0]=n,t[1]=r):r=t[1];const a=r;let i;t[2]!==n||t[3]!==o||t[4]!==a?(i=l=>{o.cancelQueries({queryKey:a}),o.setQueryData(a,f=>f&&{...f,items:f.items.some(j=>j.id===l.id)?f.items.map(j=>j.id===l.id?l:j):[l,...f.items]}),o.invalidateQueries({queryKey:ue.taskBoardActivity(n,l.id)})},t[2]=n,t[3]=o,t[4]=a,t[5]=i):i=t[5];let m,c;t[6]!==o||t[7]!==a?(m=()=>{o.invalidateQueries({queryKey:a})},c=l=>{o.cancelQueries({queryKey:a}),o.setQueryData(a,f=>f&&{...f,items:f.items.filter(j=>j.id!==l)})},t[6]=o,t[7]=a,t[8]=m,t[9]=c):(m=t[8],c=t[9]);let d;t[10]!==e.slug||t[11]!==i||t[12]!==m||t[13]!==c?(d={orgSlug:e.slug,onUpdate:i,onResync:m,onDelete:c},t[10]=e.slug,t[11]=i,t[12]=m,t[13]=c,t[14]=d):d=t[14],Co(d);let u;t[15]!==o||t[16]!==a?(u=l=>{const f=l.subject,j=l.data.status;o.cancelQueries({queryKey:a}),o.setQueryData(a,g=>g&&{...g,items:g.items.map(x=>x.threads.some(y=>y.threadId===f)?{...x,threads:x.threads.map(y=>y.threadId===f?{...y,status:j}:y)}:x)})},t[15]=o,t[16]=a,t[17]=u):u=t[17];let p;t[18]!==e.slug||t[19]!==u?(p={orgSlug:e.slug,onTaskStatus:u},t[18]=e.slug,t[19]=u,t[20]=p):p=t[20],Ps(p)}function gr(){const t=Y.c(9),{locator:e}=je(),n=kt();let o;t[0]!==e||t[1]!==n?(o=ko(e,n),t[0]=e,t[1]=n,t[2]=o):o=t[2];const r=rt(o);No();let a;t[3]!==r.data?.items?(a=r.data?.items??[],t[3]=r.data?.items,t[4]=a):a=t[4];let i;return t[5]!==r.error||t[6]!==r.isLoading||t[7]!==a?(i={items:a,isLoading:r.isLoading,error:r.error},t[5]=r.error,t[6]=r.isLoading,t[7]=a,t[8]=i):i=t[8],i}function hr(){const t=Y.c(70),{org:e,locator:n}=je(),o=kt(),r=it(),a=ae();let i;t[0]!==n?(i=ue.taskBoardItems(n),t[0]=n,t[1]=i):i=t[1];const m=i;let c;t[2]!==r||t[3]!==m?(c=()=>r.invalidateQueries({queryKey:m}),t[2]=r,t[3]=m,t[4]=c):c=t[4];const d=c;let u;t[5]!==o?(u=E=>o.call("TASK_BOARD_ITEM_CREATE",E),t[5]=o,t[6]=u):u=t[6];let p;t[7]!==d||t[8]!==u?(p={mutationFn:u,onSuccess:d},t[7]=d,t[8]=u,t[9]=p):p=t[9];const l=Oe(p);let f;t[10]!==o?(f=E=>o.call("TASK_BOARD_ITEM_UPDATE",E),t[10]=o,t[11]=f):f=t[11];let j;t[12]!==r||t[13]!==m?(j=async E=>{await r.cancelQueries({queryKey:m});const U=r.getQueryData(m);return r.setQueryData(m,M=>M&&{...M,items:M.items.map(Q=>Q.id===E.id?{...Q,...E}:Q)}),{previous:U}},t[12]=r,t[13]=m,t[14]=j):j=t[14];let g;t[15]!==e?(g=(E,U)=>{U.status==="done"&&ie("task_marked_done",{organization_id:e.id,task_board_item_id:U.id})},t[15]=e,t[16]=g):g=t[16];let x;t[17]!==r||t[18]!==m?(x=(E,U,M)=>{M?.previous&&r.setQueryData(m,M.previous)},t[17]=r,t[18]=m,t[19]=x):x=t[19];let y;t[20]!==d||t[21]!==n||t[22]!==r?(y=(E,U,M)=>{d(),r.invalidateQueries({queryKey:ue.taskBoardActivity(n,M.id)})},t[20]=d,t[21]=n,t[22]=r,t[23]=y):y=t[23];let S;t[24]!==f||t[25]!==j||t[26]!==g||t[27]!==x||t[28]!==y?(S={mutationFn:f,onMutate:j,onSuccess:g,onError:x,onSettled:y},t[24]=f,t[25]=j,t[26]=g,t[27]=x,t[28]=y,t[29]=S):S=t[29];const b=Oe(S);let k;t[30]!==o?(k=E=>o.call("TASK_BOARD_ITEM_DELETE",{id:E}),t[30]=o,t[31]=k):k=t[31];let v;t[32]!==d||t[33]!==a?(v=E=>{ce.error(E instanceof Error&&E.message?E.message:a("taskBoard.taskBoard.deleteError")),d()},t[32]=d,t[33]=a,t[34]=v):v=t[34];let C;t[35]!==d||t[36]!==k||t[37]!==v?(C={mutationFn:k,onSuccess:d,onError:v},t[35]=d,t[36]=k,t[37]=v,t[38]=C):C=t[38];const D=Oe(C);let h;t[39]!==o?(h=async E=>{const U=await Promise.allSettled(E.map(M=>o.call("TASK_BOARD_ITEM_DELETE",{id:M})));return{total:E.length,failed:U.filter(_o).length}},t[39]=o,t[40]=h):h=t[40];let _,w;t[41]!==a?(_=E=>{const{total:U,failed:M}=E;M!==0&&ce.error(a("taskBoard.taskBoard.deleteBulkError",{failed:String(M),total:String(U)}))},w=()=>ce.error(a("taskBoard.taskBoard.deleteError")),t[41]=a,t[42]=_,t[43]=w):(_=t[42],w=t[43]);let P;t[44]!==d||t[45]!==h||t[46]!==_||t[47]!==w?(P={mutationFn:h,onSuccess:_,onError:w,onSettled:d},t[44]=d,t[45]=h,t[46]=_,t[47]=w,t[48]=P):P=t[48];const V=Oe(P);let N;t[49]!==o?(N=E=>o.call("TASK_BOARD_ITEM_UPDATE",E),t[49]=o,t[50]=N):N=t[50];let T;t[51]!==d||t[52]!==N?(T={mutationFn:N,onSuccess:d},t[51]=d,t[52]=N,t[53]=T):T=t[53];const F=Oe(T);let $;t[54]!==o?($=E=>o.call("TASK_BOARD_ITEM_RERUN",E),t[54]=o,t[55]=$):$=t[55];let I;t[56]!==d||t[57]!==n||t[58]!==r?(I=(E,U,M)=>{d(),r.invalidateQueries({queryKey:ue.taskBoardActivity(n,M.id)})},t[56]=d,t[57]=n,t[58]=r,t[59]=I):I=t[59];let B;t[60]!==$||t[61]!==I?(B={mutationFn:$,onSettled:I},t[60]=$,t[61]=I,t[62]=B):B=t[62];const R=Oe(B);let G;return t[63]!==l||t[64]!==F||t[65]!==D||t[66]!==V||t[67]!==R||t[68]!==b?(G={create:l,update:b,remove:D,removeMany:V,link:F,rerun:R},t[63]=l,t[64]=F,t[65]=D,t[66]=V,t[67]=R,t[68]=b,t[69]=G):G=t[69],G}function _o(t){return t.status==="rejected"}const So=["ended_after_delivery","superseded"];function wo(t){return!!t&&So.includes(t)}function xr(t){return!(t.action==="status_changed"&&typeof t.data?.retry=="number")}function jr(t){return t.failureKind!=="superseded"}function jn(t){return t.threads.some(e=>e.status==="requires_action")}function yr(t){return t.status==="in_review"&&!t.assigneeId}function br(t){return jn(t)}function vr(t){return t.status==="in_progress"&&jn(t)?"text-warning animate-pulse":bn(t.status).iconClassName}function Cr(t){return t.threads.some(n=>n.status==="in_progress")?"running":t.threads.some(n=>n.status==="failed"&&!wo(n.failureKind))?"failed":null}function kr(t,e,n){const o=t.findIndex(u=>u.id===n),r=e===n?t[o+1]?.id??null:e,a=t.filter(u=>u.id!==n),i=r?a.findIndex(u=>u.id===r):-1,m=i===-1?a.length:i,c=a[m-1],d=a[m];return c&&d?(c.sortOrder+d.sortOrder)/2:c?c.sortOrder+1:d?d.sortOrder-1:0}function Nr(t,e){return Array.from({length:e},(n,o)=>t-(e-1-o)*1e-4)}const Do=["archived"],yn={triage:{labelKey:"taskBoard.config.statusBacklog",icon:$s,iconClassName:"text-muted-foreground"},todo:{labelKey:"taskBoard.config.statusTodo",icon:pn,iconClassName:"text-muted-foreground"},in_progress:{labelKey:"taskBoard.config.statusInProgress",icon:is,iconClassName:"text-primary"},in_review:{labelKey:"taskBoard.config.statusInReview",icon:zs,iconClassName:"text-warning"},approved:{labelKey:"taskBoard.config.statusApproved",icon:os,iconClassName:"text-success"},merged:{labelKey:"taskBoard.config.statusMerged",icon:fs,iconClassName:"text-primary"},post_deploy_validation:{labelKey:"taskBoard.config.statusPostDeployValidation",icon:ss,iconClassName:"text-warning"},done:{labelKey:"taskBoard.config.statusDone",icon:Ks,iconClassName:"text-success"},archived:{labelKey:"taskBoard.config.statusArchived",icon:Vn,iconClassName:"text-muted-foreground"}},To={icon:pn,iconClassName:"text-muted-foreground"},Fo=yn;function bn(t){return Fo[t]??To}function _r(t,e){const n=yn[t];return{label:n?e(n.labelKey):t,visual:bn(t)}}const Sr=["bug","feature","chore","spike","security"],wr={bug:{labelKey:"taskBoard.config.typeBug",icon:Qs,iconClassName:"text-destructive"},feature:{labelKey:"taskBoard.config.typeFeature",icon:ls,iconClassName:"text-success"},chore:{labelKey:"taskBoard.config.typeChore",icon:as,iconClassName:"text-muted-foreground"},spike:{labelKey:"taskBoard.config.typeSpike",icon:rs,iconClassName:"text-yellow-500"},security:{labelKey:"taskBoard.config.typeSecurity",icon:Us,iconClassName:"text-purple-500"}};function bt(t){return Bs.includes(t)}function Dr(t){return Nt.filter(e=>t||!bt(e))}function Tr({deliveryEnabled:t,shownLanes:e,occupied:n}){const o=Nt.filter(i=>t||!bt(i)||n.includes(i)),r=o.filter(i=>Do.includes(i)||!t&&bt(i)),a=r.filter(i=>!e.includes(i));return{lanes:o.filter(i=>!a.includes(i)),hidden:a,hideable:r}}const Qt="lane:";function Ao(t){return Nt.includes(t)}function Fr({overId:t,statusOf:e}){if(t===void 0)return null;const n=String(t),o=n.startsWith(Qt)?n.slice(Qt.length):e(n);return o!==void 0&&Ao(o)?o:null}const Bo=["none","low","medium","high","urgent"],We={none:{labelKey:"taskBoard.config.priorityNone",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50",icon:Vt,iconClassName:"text-muted-foreground/40"},low:{labelKey:"taskBoard.config.priorityLow",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40",icon:ns,iconClassName:"text-muted-foreground"},medium:{labelKey:"taskBoard.config.priorityMedium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500",icon:Vt,iconClassName:"text-blue-500"},high:{labelKey:"taskBoard.config.priorityHigh",flagClassName:"text-warning",dotClassName:"bg-warning",icon:ts,iconClassName:"text-warning"},urgent:{labelKey:"taskBoard.config.priorityUrgent",flagClassName:"text-destructive",dotClassName:"bg-destructive",icon:es,iconClassName:"text-destructive"}};function Ar(t,e=Date.now()){const n=new Date(t).getTime();return Number.isNaN(n)?null:n<e?"overdue":n-e<=Io*864e5?"soon":null}const Io=3;function qt(t){return`color-mix(in oklab, ${t??As} var(--user-color-strength), transparent)`}function vn(t){return t?.projects.length===1?t.projects[0]:void 0}function Po(t){return vn(t)?t.repo:t.projects.length>1?t.projects.map(e=>e.title).join(", "):null}function Cn(t){const e=Y.c(6),{entry:n}=t;let o;e[0]!==n?(o=vn(n),e[0]=n,e[1]=o):o=e[1];const r=o;if(r){let i;return e[2]!==r.icon||e[3]!==r.title?(i=s.jsx(Os,{icon:r.icon,name:r.title}),e[2]=r.icon,e[3]=r.title,e[4]=i):i=e[4],i}let a;return e[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:s.jsx(Ms,{className:"size-3"})}),e[5]=a):a=e[5],a}function Eo(t){const e=Y.c(14),{entry:n}=t;let o;e[0]!==n?(o=Po(n),e[0]=n,e[1]=o):o=e[1];const r=o;let a;e[2]!==n?(a=s.jsx(Cn,{entry:n}),e[2]=n,e[3]=a):a=e[3];let i;e[4]!==n.title?(i=s.jsx("span",{className:"truncate",children:n.title}),e[4]=n.title,e[5]=i):i=e[5];let m;e[6]!==r?(m=r&&s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:r}),e[6]=r,e[7]=m):m=e[7];let c;e[8]!==i||e[9]!==m?(c=s.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[i,m]}),e[8]=i,e[9]=m,e[10]=c):c=e[10];let d;return e[11]!==a||e[12]!==c?(d=s.jsxs(s.Fragment,{children:[a,c]}),e[11]=a,e[12]=c,e[13]=d):d=e[13],d}const at="__no_repo__";function Se(t){return(t??"").trim().toLowerCase()}function Vo(t,e){const n=(t.created_at??"").localeCompare(e.created_at??"");return n!==0?n:t.id.localeCompare(e.id)}function Mo(t){return t.projects.length===1?t.projects[0]?.title??t.repo??t.id:t.repo??t.id}function Br(t,e=[]){const n=new Map,o=new Map,r=[],a=u=>{const p=Se(u),l=n.get(p);if(l)return l;const f={id:p,kind:"repo",repo:u.trim(),title:u.trim(),projects:[]};return n.set(p,f),f};for(const u of t){const p=Ls(u);if(p){const f=a(p);f.projects.push(u),o.set(u.id,f);continue}const l={id:u.id,kind:"project",repo:null,title:u.title,projects:[u]};r.push(l),o.set(u.id,l)}for(const u of e){const p=(u??"").trim();p&&a(p)}for(const u of n.values())u.projects.sort(Vo),u.title=Mo(u);const i=[...n.values()].filter(u=>u.projects.length>0),m=[...n.values()].filter(u=>u.projects.length===0),c=(u,p)=>u.title.localeCompare(p.title),d=[...[...i,...r].sort(c),...m.sort(c)];return{entries:d,byId:new Map(d.map(u=>[u.id,u])),byRepo:n,byProject:o}}function vt(t,e){for(const o of t.threads??[]){const r=o.virtualMcpId?e.byProject.get(o.virtualMcpId):void 0;if(r)return r}const n=Se(t.repo);return(n?e.byRepo.get(n):void 0)??null}function Oo(t,e){const n=vt(t,e);if(!n)return[];if(n.projects.length<=1)return n.projects;for(const o of t.threads??[]){const r=o.virtualMcpId?n.projects.find(a=>a.id===o.virtualMcpId):void 0;if(r)return[r]}return n.projects}function Ir(t,e){const n=Oo(t,e);return n.length===1?n[0]??null:null}function Pt(t,e){return e.byId.get(t)??e.byRepo.get(Se(t))??e.byProject.get(t)}function kn(t,e,n){if(e===null)return!0;if(e===at)return vt(t,n)===null;const o=Pt(e,n);return o?o.repo&&Se(t.repo)===Se(o.repo)?!0:vt(t,n)===o:e.includes("/")?Se(t.repo)===Se(e):!0}function lt(t,e){return t===null?!1:t===at?!0:!!Pt(t,e)||t.includes("/")}function Pr(t,e,n){return e===null?null:kn(t,e,n)?e:null}function Er(t){return t.entries.filter(e=>e.repo!==null&&(e.projects.length===0||e.projects.some(n=>Rs(n).status!=="detached")))}const Ct="__unassigned__",Re="__any__",Nn={assignee:null,priority:null,due:null,tags:[],project:null,search:""};function Lo(t,e){return t.assignee!==null||t.priority!==null||t.due!==null||t.tags.length>0||lt(t.project,e)||t.search.trim()!==""}function Ro(t,e){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)+(t.tags.length>0?1:0)+(lt(t.project,e)?1:0)+(t.search.trim()!==""?1:0)}const $o=864e5;function Ko(t,e){const n=new Date(t),o=new Date(e);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()&&n.getDate()===o.getDate()}function _n(t,e){const n=t.trim();return n===""?!1:e!=null&&ao(n)===e}function zo(t,e){return t.assigneeId===e?!0:t.assigneeId===yt&&t.assignedBy===e}function Vr(t,e,n){const o=e.search.trim().toLowerCase();if(o!==""&&!`${t.title} ${t.description??""}`.toLowerCase().includes(o)&&!_n(o,t.keySeq))return!1;if(e.assignee!==null){if(e.assignee===Ct){if(t.assigneeId!==null)return!1}else if(!zo(t,e.assignee))return!1}if(e.priority!==null&&t.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(t.dueDate)return!1}else{if(!t.dueDate)return!1;const r=new Date(t.dueDate).getTime(),a=Date.now();if(e.due==="overdue"&&r>=a||e.due==="today"&&!Ko(r,a)||e.due==="week"&&(r<a||r>a+7*$o))return!1}if(e.tags.length>0){const r=t.tags.map(a=>a.id);if(!e.tags.some(a=>r.includes(a)))return!1}return!!kn(t,e.project,n)}const Gt={overdue:"taskBoard.taskFilters.dueDateFilterOverdue",today:"taskBoard.taskFilters.dueDateFilterDueToday",week:"taskBoard.taskFilters.dueDateFilterDueThisWeek",none:"taskBoard.taskFilters.dueDateFilterNoDueDate"};function we(t,e=!1){return re("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors focus-visible:border-ring focus-visible:ring-[2px] focus-visible:ring-ring/20",e&&"h-10 w-full justify-start px-3 text-sm",t?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function Uo(t){const e=Y.c(107),{value:n,members:o,onChange:r,block:a}=t,i=ae(),[m,c]=H.useState(!1);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Rt,{size:14,className:"shrink-0"}),e[0]=d):d=e[0];let u=d,p;e[1]!==i?(p=i("taskBoard.taskFilters.assigneeLabel"),e[1]=i,e[2]=p):p=e[2];let l=p;if(n===Ct){let O;e[3]!==i?(O=i("taskBoard.taskFilters.assigneeUnassigned"),e[3]=i,e[4]=O):O=e[4],l=O}else if(n===yt){let O;e[5]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(zt,{size:14}),e[5]=O):O=e[5],u=O;let L;e[6]!==i?(L=i("taskBoard.taskFilters.assigneeSuperAgent"),e[6]=i,e[7]=L):L=e[7],l=L}else if(n){let O,L,oe,z;if(e[8]!==o||e[9]!==n){let De;e[14]!==n?(De=Te=>Te.userId===n,e[14]=n,e[15]=De):De=e[15],L=o.find(De),O=Lt,oe=L?.user?.image??void 0,z=$t(L?.user?.name),e[8]=o,e[9]=n,e[10]=O,e[11]=L,e[12]=oe,e[13]=z}else O=e[10],L=e[11],oe=e[12],z=e[13];let ve;e[16]!==O||e[17]!==oe||e[18]!==z?(ve=s.jsx(O,{url:oe,fallback:z,shape:"circle",size:"2xs"}),e[16]=O,e[17]=oe,e[18]=z,e[19]=ve):ve=e[19],u=ve;let de;e[20]!==L?.user?.name||e[21]!==i?(de=L?.user?.name??i("taskBoard.taskFilters.assigneeMember"),e[20]=L?.user?.name,e[21]=i,e[22]=de):de=e[22],l=de}let f;e[23]!==r?(f=O=>{r(O),c(!1)},e[23]=r,e[24]=f):f=e[24];const j=f,g=n!==null;let x;e[25]!==a||e[26]!==g?(x=we(g,a),e[25]=a,e[26]=g,e[27]=x):x=e[27];const y=x,S=a&&"ml-auto";let b;e[28]!==S?(b=re("shrink-0 opacity-60",S),e[28]=S,e[29]=b):b=e[29];const k=b;let v;e[30]!==l?(v=s.jsx("span",{className:"max-w-[10rem] truncate",children:l}),e[30]=l,e[31]=v):v=e[31];let C;e[32]!==k?(C=s.jsx(ze,{size:12,className:k}),e[32]=k,e[33]=C):C=e[33];let D;e[34]!==u||e[35]!==v||e[36]!==C||e[37]!==y?(D=s.jsx(_t,{asChild:!0,children:s.jsxs("button",{type:"button",className:y,children:[u,v,C]})}),e[34]=u,e[35]=v,e[36]=C,e[37]=y,e[38]=D):D=e[38];let h;e[39]!==i?(h=i("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[39]=i,e[40]=h):h=e[40];let _;e[41]!==i?(_=i("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[41]=i,e[42]=_):_=e[42];let w;e[43]!==h||e[44]!==_?(w=s.jsx(Dt,{placeholder:h,"aria-label":_,className:"h-9"}),e[43]=h,e[44]=_,e[45]=w):w=e[45];let P;e[46]!==i?(P=i("taskBoard.taskFilters.assigneeNoMembersFound"),e[46]=i,e[47]=P):P=e[47];let V;e[48]!==P?(V=s.jsx(Tt,{children:P}),e[48]=P,e[49]=V):V=e[49];let N;e[50]!==i?(N=i("taskBoard.taskFilters.assigneeAnyone"),e[50]=i,e[51]=N):N=e[51];let T;e[52]!==j?(T=()=>j(null),e[52]=j,e[53]=T):T=e[53];let F;e[54]!==i?(F=i("taskBoard.taskFilters.assigneeAnyone"),e[54]=i,e[55]=F):F=e[55];let $;e[56]!==N||e[57]!==T||e[58]!==F?($=s.jsx(Ce,{value:N,onSelect:T,children:F}),e[56]=N,e[57]=T,e[58]=F,e[59]=$):$=e[59];let I;e[60]!==i?(I=i("taskBoard.taskFilters.assigneeUnassigned"),e[60]=i,e[61]=I):I=e[61];let B;e[62]!==j?(B=()=>j(Ct),e[62]=j,e[63]=B):B=e[63];let R;e[64]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(Rt,{size:16,className:"text-muted-foreground"}),e[64]=R):R=e[64];let G;e[65]!==i?(G=i("taskBoard.taskFilters.assigneeUnassigned"),e[65]=i,e[66]=G):G=e[66];let E;e[67]!==I||e[68]!==B||e[69]!==G?(E=s.jsxs(Ce,{value:I,onSelect:B,className:"gap-2",children:[R,G]}),e[67]=I,e[68]=B,e[69]=G,e[70]=E):E=e[70];let U;e[71]!==i?(U=i("taskBoard.taskFilters.assigneeSuperAgent"),e[71]=i,e[72]=U):U=e[72];let M;e[73]!==j?(M=()=>j(yt),e[73]=j,e[74]=M):M=e[74];let Q;e[75]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(zt,{size:16}),e[75]=Q):Q=e[75];let Z;e[76]!==i?(Z=i("taskBoard.taskFilters.assigneeSuperAgent"),e[76]=i,e[77]=Z):Z=e[77];let ee;e[78]!==U||e[79]!==M||e[80]!==Z?(ee=s.jsxs(Ce,{value:U,onSelect:M,className:"gap-2",children:[Q,Z]}),e[78]=U,e[79]=M,e[80]=Z,e[81]=ee):ee=e[81];let K;e[82]!==$||e[83]!==E||e[84]!==ee?(K=s.jsxs(Le,{children:[$,E,ee]}),e[82]=$,e[83]=E,e[84]=ee,e[85]=K):K=e[85];let ne;e[86]!==i?(ne=i("taskBoard.taskFilters.assigneeGroupMembers"),e[86]=i,e[87]=ne):ne=e[87];let W;if(e[88]!==o||e[89]!==j){let O;e[91]!==j?(O=L=>s.jsxs(Ce,{value:L.user?.name??L.userId,onSelect:()=>j(L.userId),className:"gap-2",children:[s.jsx(Lt,{url:L.user?.image??void 0,fallback:$t(L.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:L.user?.name??L.userId})]},L.userId),e[91]=j,e[92]=O):O=e[92],W=o.map(O),e[88]=o,e[89]=j,e[90]=W}else W=e[90];let X;e[93]!==ne||e[94]!==W?(X=s.jsx(Le,{heading:ne,children:W}),e[93]=ne,e[94]=W,e[95]=X):X=e[95];let J;e[96]!==V||e[97]!==K||e[98]!==X?(J=s.jsxs(Ft,{children:[V,K,X]}),e[96]=V,e[97]=K,e[98]=X,e[99]=J):J=e[99];let te;e[100]!==w||e[101]!==J?(te=s.jsx(St,{align:"start",className:"w-56 p-0",children:s.jsxs(At,{children:[w,J]})}),e[100]=w,e[101]=J,e[102]=te):te=e[102];let se;return e[103]!==m||e[104]!==D||e[105]!==te?(se=s.jsxs(wt,{open:m,onOpenChange:c,children:[D,te]}),e[103]=m,e[104]=D,e[105]=te,e[106]=se):se=e[106],se}function Qo(t){const e=Y.c(33),{value:n,onChange:o,block:r}=t,a=ae(),i=n!==null;let m;e[0]!==r||e[1]!==i?(m=we(i,r),e[0]=r,e[1]=i,e[2]=m):m=e[2];const c=m,d=r&&"ml-auto";let u;e[3]!==d?(u=re("shrink-0 opacity-60",d),e[3]=d,e[4]=u):u=e[4];const p=u;let l;e[5]!==n?(l=n?s.jsx("span",{className:re("size-2 shrink-0 rounded-full",We[n].dotClassName)}):s.jsx(Es,{size:14,className:"shrink-0"}),e[5]=n,e[6]=l):l=e[6];let f;e[7]!==a||e[8]!==n?(f=a(n?We[n].labelKey:"taskBoard.taskFilters.priorityLabel"),e[7]=a,e[8]=n,e[9]=f):f=e[9];let j;e[10]!==p?(j=s.jsx(ze,{size:12,className:p}),e[10]=p,e[11]=j):j=e[11];let g;e[12]!==l||e[13]!==f||e[14]!==j||e[15]!==c?(g=s.jsx(dn,{asChild:!0,children:s.jsxs("button",{type:"button",className:c,children:[l,f,j]})}),e[12]=l,e[13]=f,e[14]=j,e[15]=c,e[16]=g):g=e[16];const x=n??Re;let y;e[17]!==o?(y=D=>o(D===Re?null:D),e[17]=o,e[18]=y):y=e[18];let S;e[19]!==a?(S=a("taskBoard.taskFilters.priorityAnyPriority"),e[19]=a,e[20]=S):S=e[20];let b;e[21]!==S?(b=s.jsx(ot,{value:Re,children:S}),e[21]=S,e[22]=b):b=e[22];let k;e[23]!==a?(k=Bo.map(D=>s.jsxs(ot,{value:D,className:"gap-2",children:[s.jsx("span",{className:re("size-2 rounded-full",We[D].dotClassName)}),a(We[D].labelKey)]},D)),e[23]=a,e[24]=k):k=e[24];let v;e[25]!==y||e[26]!==b||e[27]!==k||e[28]!==x?(v=s.jsx(un,{align:"start",className:"w-40",children:s.jsxs(fn,{value:x,onValueChange:y,children:[b,k]})}),e[25]=y,e[26]=b,e[27]=k,e[28]=x,e[29]=v):v=e[29];let C;return e[30]!==v||e[31]!==g?(C=s.jsxs(mn,{children:[g,v]}),e[30]=v,e[31]=g,e[32]=C):C=e[32],C}function qo(t){const e=Y.c(35),{value:n,onChange:o,block:r}=t,a=ae();let i;e[0]!==a||e[1]!==n?(i=n?a(Gt[n]):void 0,e[0]=a,e[1]=n,e[2]=i):i=e[2];const m=i,c=n!==null;let d;e[3]!==r||e[4]!==c?(d=we(c,r),e[3]=r,e[4]=c,e[5]=d):d=e[5];const u=d,p=r&&"ml-auto";let l;e[6]!==p?(l=re("shrink-0 opacity-60",p),e[6]=p,e[7]=l):l=e[7];const f=l;let j;e[8]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(xt,{size:14,className:"shrink-0"}),e[8]=j):j=e[8];let g;e[9]!==m||e[10]!==a?(g=m??a("taskBoard.taskFilters.dueDateLabel"),e[9]=m,e[10]=a,e[11]=g):g=e[11];let x;e[12]!==f?(x=s.jsx(ze,{size:12,className:f}),e[12]=f,e[13]=x):x=e[13];let y;e[14]!==g||e[15]!==x||e[16]!==u?(y=s.jsx(dn,{asChild:!0,children:s.jsxs("button",{type:"button",className:u,children:[j,g,x]})}),e[14]=g,e[15]=x,e[16]=u,e[17]=y):y=e[17];const S=n??Re;let b;e[18]!==o?(b=w=>o(w===Re?null:w),e[18]=o,e[19]=b):b=e[19];let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(xt,{size:16,className:"text-muted-foreground"}),e[20]=k):k=e[20];let v;e[21]!==a?(v=a("taskBoard.taskFilters.dueDateAnyTime"),e[21]=a,e[22]=v):v=e[22];let C;e[23]!==v?(C=s.jsxs(ot,{value:Re,className:"gap-2",children:[k,v]}),e[23]=v,e[24]=C):C=e[24];let D;e[25]!==a?(D=Object.entries(Gt).map(w=>{const[P,V]=w,N=P==="overdue";return s.jsxs(ot,{value:P,className:re("gap-2",N&&"text-destructive"),children:[s.jsx(xt,{size:16,className:re("shrink-0",N?"text-destructive":"text-muted-foreground")}),a(V)]},P)}),e[25]=a,e[26]=D):D=e[26];let h;e[27]!==S||e[28]!==b||e[29]!==C||e[30]!==D?(h=s.jsx(un,{align:"start",className:"w-44",children:s.jsxs(fn,{value:S,onValueChange:b,children:[C,D]})}),e[27]=S,e[28]=b,e[29]=C,e[30]=D,e[31]=h):h=e[31];let _;return e[32]!==h||e[33]!==y?(_=s.jsxs(mn,{children:[y,h]}),e[32]=h,e[33]=y,e[34]=_):_=e[34],_}function Go(t){const e=Y.c(56),{value:n,tags:o,onChange:r,block:a}=t,i=ae(),[m,c]=H.useState(!1);let d;e[0]!==r||e[1]!==n?(d=I=>r(n.includes(I)?n.filter(B=>B!==I):[...n,I]),e[0]=r,e[1]=n,e[2]=d):d=e[2];const u=d;let p;e[3]!==i||e[4]!==o||e[5]!==n[0]||e[6]!==n.length?(p=n.length===0?i("taskBoard.taskFilters.tagsLabel"):n.length===1?o.find(I=>I.id===n[0])?.name??i("taskBoard.taskFilters.tagsLabel"):i("taskBoard.taskFilters.tagsSelectedCount",{count:n.length}),e[3]=i,e[4]=o,e[5]=n[0],e[6]=n.length,e[7]=p):p=e[7];const l=p,f=n.length>0;let j;e[8]!==a||e[9]!==f?(j=we(f,a),e[8]=a,e[9]=f,e[10]=j):j=e[10];const g=j,x=a&&"ml-auto";let y;e[11]!==x?(y=re("shrink-0 opacity-60",x),e[11]=x,e[12]=y):y=e[12];const S=y;let b;e[13]!==o||e[14]!==n[0]||e[15]!==n.length?(b=n.length===1?s.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:qt(o.find(I=>I.id===n[0])?.color)}}):s.jsx(cs,{size:14,className:"shrink-0"}),e[13]=o,e[14]=n[0],e[15]=n.length,e[16]=b):b=e[16];let k;e[17]!==l?(k=s.jsx("span",{className:"max-w-[10rem] truncate",children:l}),e[17]=l,e[18]=k):k=e[18];let v;e[19]!==S?(v=s.jsx(ze,{size:12,className:S}),e[19]=S,e[20]=v):v=e[20];let C;e[21]!==b||e[22]!==k||e[23]!==v||e[24]!==g?(C=s.jsx(_t,{asChild:!0,children:s.jsxs("button",{type:"button",className:g,children:[b,k,v]})}),e[21]=b,e[22]=k,e[23]=v,e[24]=g,e[25]=C):C=e[25];let D;e[26]!==i?(D=i("taskBoard.taskFilters.tagsFilterPlaceholder"),e[26]=i,e[27]=D):D=e[27];let h;e[28]!==i?(h=i("taskBoard.taskFilters.tagsFilterPlaceholder"),e[28]=i,e[29]=h):h=e[29];let _;e[30]!==D||e[31]!==h?(_=s.jsx(Dt,{placeholder:D,"aria-label":h,className:"h-9"}),e[30]=D,e[31]=h,e[32]=_):_=e[32];let w;e[33]!==i?(w=i("taskBoard.taskFilters.tagsNoTagsFound"),e[33]=i,e[34]=w):w=e[34];let P;e[35]!==w?(P=s.jsx(Tt,{children:w}),e[35]=w,e[36]=P):P=e[36];let V;if(e[37]!==o||e[38]!==u||e[39]!==n){let I;e[41]!==u||e[42]!==n?(I=B=>s.jsxs(Ce,{value:B.name,onSelect:()=>u(B.id),className:"gap-2",children:[s.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:qt(B.color)}}),s.jsx("span",{className:"flex-1 truncate",children:B.name}),n.includes(B.id)&&s.jsx(nt,{size:14,className:"shrink-0 text-foreground"})]},B.id),e[41]=u,e[42]=n,e[43]=I):I=e[43],V=o.map(I),e[37]=o,e[38]=u,e[39]=n,e[40]=V}else V=e[40];let N;e[44]!==V?(N=s.jsx(Le,{children:V}),e[44]=V,e[45]=N):N=e[45];let T;e[46]!==P||e[47]!==N?(T=s.jsxs(Ft,{children:[P,N]}),e[46]=P,e[47]=N,e[48]=T):T=e[48];let F;e[49]!==_||e[50]!==T?(F=s.jsx(St,{align:"start",className:"w-56 p-0",children:s.jsxs(At,{children:[_,T]})}),e[49]=_,e[50]=T,e[51]=F):F=e[51];let $;return e[52]!==m||e[53]!==C||e[54]!==F?($=s.jsxs(wt,{open:m,onOpenChange:c,children:[C,F]}),e[52]=m,e[53]=C,e[54]=F,e[55]=$):$=e[55],$}function Ht(t){const e=Y.c(11),{entry:n,selected:o,onSelect:r}=t,a=n.id,i=n.title;let m;e[0]!==n.projects?(m=n.projects.map(Ho).join(" "),e[0]=n.projects,e[1]=m):m=e[1];const c=`${a} ${i} ${n.repo??""} ${m}`;let d;e[2]!==n?(d=s.jsx(Eo,{entry:n}),e[2]=n,e[3]=d):d=e[3];let u;e[4]!==o?(u=o&&s.jsx(nt,{size:14,className:"shrink-0 text-foreground"}),e[4]=o,e[5]=u):u=e[5];let p;return e[6]!==r||e[7]!==c||e[8]!==d||e[9]!==u?(p=s.jsxs(Ce,{value:c,onSelect:r,className:"gap-2",children:[d,u]}),e[6]=r,e[7]=c,e[8]=d,e[9]=u,e[10]=p):p=e[10],p}function Ho(t){return t.title}function Yo(t,e,n,o){return t===null||!n?o("taskBoard.taskFilters.projectLabel"):t===at?o("taskBoard.taskFilters.projectNone"):e?.title??t}function Wo(t){const e=Y.c(90),{value:n,index:o,onChange:r,block:a}=t,i=ae(),[m,c]=H.useState(!1);let d,u,p,l,f,j,g,x,y,S,b,k,v,C;if(e[0]!==a||e[1]!==o||e[2]!==r||e[3]!==m||e[4]!==i||e[5]!==n){const P=n===null?void 0:Pt(n,o),V=lt(n,o),N=Yo(n,P,V,i);let T;e[20]!==r?(T=z=>{r(z),c(!1)},e[20]=r,e[21]=T):T=e[21];const F=T,$=o.entries.filter(Jo),I=o.entries.filter(Xo),B=we(V,a),R=a&&"ml-auto";let G;e[22]!==R?(G=re("shrink-0 opacity-60",R),e[22]=R,e[23]=G):G=e[23];const E=G;l=wt,v=m,C=c;const U=V?P:void 0;let M;e[24]!==U?(M=s.jsx(Cn,{entry:U}),e[24]=U,e[25]=M):M=e[25];let Q;e[26]!==N?(Q=s.jsx("span",{className:"max-w-[12rem] truncate",children:N}),e[26]=N,e[27]=Q):Q=e[27];let Z;e[28]!==E?(Z=s.jsx(ze,{size:12,className:E}),e[28]=E,e[29]=Z):Z=e[29],e[30]!==M||e[31]!==Q||e[32]!==Z||e[33]!==B?(j=s.jsx(_t,{asChild:!0,children:s.jsxs("button",{type:"button",className:B,children:[M,Q,Z]})}),e[30]=M,e[31]=Q,e[32]=Z,e[33]=B,e[34]=j):j=e[34],p=St,b="start",k="w-72 p-0",u=At;let ee;e[35]!==i?(ee=i("taskBoard.taskFilters.projectFilterPlaceholder"),e[35]=i,e[36]=ee):ee=e[36];let K;e[37]!==i?(K=i("taskBoard.taskFilters.projectFilterPlaceholder"),e[37]=i,e[38]=K):K=e[38],e[39]!==ee||e[40]!==K?(S=s.jsx(Dt,{placeholder:ee,"aria-label":K,className:"h-9"}),e[39]=ee,e[40]=K,e[41]=S):S=e[41],d=Ft;let ne;e[42]!==i?(ne=i("taskBoard.taskFilters.projectNoneFound"),e[42]=i,e[43]=ne):ne=e[43],e[44]!==ne?(f=s.jsx(Tt,{children:ne}),e[44]=ne,e[45]=f):f=e[45];let W;e[46]!==i?(W=i("taskBoard.taskFilters.projectAny"),e[46]=i,e[47]=W):W=e[47];let X;e[48]!==F?(X=()=>F(null),e[48]=F,e[49]=X):X=e[49];let J;e[50]!==i?(J=i("taskBoard.taskFilters.projectAny"),e[50]=i,e[51]=J):J=e[51];let te;e[52]!==W||e[53]!==X||e[54]!==J?(te=s.jsx(Ce,{value:W,onSelect:X,children:J}),e[52]=W,e[53]=X,e[54]=J,e[55]=te):te=e[55];let se;e[56]!==i?(se=i("taskBoard.taskFilters.projectNone"),e[56]=i,e[57]=se):se=e[57];let O;e[58]!==F?(O=()=>F(at),e[58]=F,e[59]=O):O=e[59];let L;e[60]!==i?(L=i("taskBoard.taskFilters.projectNone"),e[60]=i,e[61]=L):L=e[61];let oe;e[62]!==se||e[63]!==O||e[64]!==L?(oe=s.jsx(Ce,{value:se,onSelect:O,children:L}),e[62]=se,e[63]=O,e[64]=L,e[65]=oe):oe=e[65],e[66]!==te||e[67]!==oe?(g=s.jsxs(Le,{children:[te,oe]}),e[66]=te,e[67]=oe,e[68]=g):g=e[68],x=$.length>0&&s.jsx(Le,{heading:i("taskBoard.taskFilters.projectGroupProjects"),children:$.map(z=>s.jsx(Ht,{entry:z,selected:P===z,onSelect:()=>F(z.id)},z.id))}),y=I.length>0&&s.jsx(Le,{heading:i("taskBoard.taskFilters.projectGroupRepos"),children:I.map(z=>s.jsx(Ht,{entry:z,selected:P===z,onSelect:()=>F(z.id)},z.id))}),e[0]=a,e[1]=o,e[2]=r,e[3]=m,e[4]=i,e[5]=n,e[6]=d,e[7]=u,e[8]=p,e[9]=l,e[10]=f,e[11]=j,e[12]=g,e[13]=x,e[14]=y,e[15]=S,e[16]=b,e[17]=k,e[18]=v,e[19]=C}else d=e[6],u=e[7],p=e[8],l=e[9],f=e[10],j=e[11],g=e[12],x=e[13],y=e[14],S=e[15],b=e[16],k=e[17],v=e[18],C=e[19];let D;e[69]!==d||e[70]!==f||e[71]!==g||e[72]!==x||e[73]!==y?(D=s.jsxs(d,{children:[f,g,x,y]}),e[69]=d,e[70]=f,e[71]=g,e[72]=x,e[73]=y,e[74]=D):D=e[74];let h;e[75]!==u||e[76]!==D||e[77]!==S?(h=s.jsxs(u,{children:[S,D]}),e[75]=u,e[76]=D,e[77]=S,e[78]=h):h=e[78];let _;e[79]!==p||e[80]!==h||e[81]!==b||e[82]!==k?(_=s.jsx(p,{align:b,className:k,children:h}),e[79]=p,e[80]=h,e[81]=b,e[82]=k,e[83]=_):_=e[83];let w;return e[84]!==l||e[85]!==j||e[86]!==_||e[87]!==v||e[88]!==C?(w=s.jsxs(l,{open:v,onOpenChange:C,children:[j,_]}),e[84]=l,e[85]=j,e[86]=_,e[87]=v,e[88]=C,e[89]=w):w=e[89],w}function Xo(t){return t.projects.length===0}function Jo(t){return t.projects.length>0}function Zo(t){const e=Y.c(25),{value:n,onChange:o,block:r}=t,a=ae(),[i,m]=H.useState(n!==""),[c,d]=H.useState(!1),[u,p]=H.useState(n);n!==u&&(p(n),n===""&&!c&&m(!1));const l=i||r,f=l?"w-32 sm:w-44":"w-8 px-0 justify-center",j=r&&"h-10 w-full px-3 text-sm sm:w-full";let g;e[0]!==f||e[1]!==j?(g=re("inline-flex h-8 shrink-0 items-center gap-1.5 overflow-hidden rounded-lg border border-border px-2.5 text-xs text-foreground transition-all duration-200 ease-out",f,j),e[0]=f,e[1]=j,e[2]=g):g=e[2];let x;e[3]!==a?(x=a("taskBoard.taskFilters.searchLabel"),e[3]=a,e[4]=x):x=e[4];let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=()=>m(!0),e[5]=y):y=e[5];let S;e[6]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ds,{size:14}),e[6]=S):S=e[6];let b;e[7]!==x?(b=s.jsx("button",{type:"button","aria-label":x,onClick:y,className:"shrink-0 text-muted-foreground transition-colors hover:text-foreground",children:S}),e[7]=x,e[8]=b):b=e[8];let k;e[9]!==r||e[10]!==l||e[11]!==o||e[12]!==a||e[13]!==n?(k=l&&s.jsx("input",{autoFocus:!r,value:n,onChange:D=>o(D.target.value),onFocus:()=>d(!0),onBlur:()=>{d(!1),n===""&&m(!1)},placeholder:a("taskBoard.taskFilters.searchPlaceholder"),"aria-label":a("taskBoard.taskFilters.searchPlaceholder"),className:"w-full min-w-0 bg-transparent text-xs outline-none placeholder:text-muted-foreground"}),e[9]=r,e[10]=l,e[11]=o,e[12]=a,e[13]=n,e[14]=k):k=e[14];let v;e[15]!==r||e[16]!==o||e[17]!==a||e[18]!==n?(v=n!==""&&s.jsx("button",{type:"button","aria-label":a("taskBoard.taskFilters.searchClearLabel"),onMouseDown:ei,onClick:()=>{o(""),r||m(!1)},className:"shrink-0 text-muted-foreground hover:text-foreground",children:s.jsx(Mn,{size:14})}),e[15]=r,e[16]=o,e[17]=a,e[18]=n,e[19]=v):v=e[19];let C;return e[20]!==g||e[21]!==b||e[22]!==k||e[23]!==v?(C=s.jsxs("div",{className:g,children:[b,k,v]}),e[20]=g,e[21]=b,e[22]=k,e[23]=v,e[24]=C):C=e[24],C}function ei(t){return t.preventDefault()}function ti(t){const e=Y.c(20),{block:n,onClick:o}=t,r=ae();let a;e[0]!==r?(a=r("taskBoard.taskFilters.boardSettingsLabel"),e[0]=r,e[1]=a):a=e[1];const i=a;let m;e[2]!==n?(m=re(we(!1,n),n?"h-10 w-full":"w-8 justify-center px-0"),e[2]=n,e[3]=m):m=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Vs,{size:14,className:"shrink-0"}),e[4]=c):c=e[4];let d;e[5]!==n||e[6]!==i?(d=n&&s.jsx("span",{children:i}),e[5]=n,e[6]=i,e[7]=d):d=e[7];let u;e[8]!==i||e[9]!==o||e[10]!==m||e[11]!==d?(u=s.jsxs("button",{type:"button",onClick:o,"aria-label":i,className:m,children:[c,d]}),e[8]=i,e[9]=o,e[10]=m,e[11]=d,e[12]=u):u=e[12];const p=u;if(n)return p;let l;e[13]!==p?(l=s.jsx(Ze,{asChild:!0,children:p}),e[13]=p,e[14]=l):l=e[14];let f;e[15]!==i?(f=s.jsx(et,{side:"top",children:i}),e[15]=i,e[16]=f):f=e[16];let j;return e[17]!==l||e[18]!==f?(j=s.jsxs(Je,{children:[l,f]}),e[17]=l,e[18]=f,e[19]=j):j=e[19],j}function Sn(t){const e=Y.c(53),{filters:n,members:o,tags:r,index:a,onChange:i,onOpenBoardSettings:m,block:c}=t;let d;e[0]!==n||e[1]!==i?(d=C=>i({...n,search:C}),e[0]=n,e[1]=i,e[2]=d):d=e[2];let u;e[3]!==c||e[4]!==n.search||e[5]!==d?(u=s.jsx(Zo,{block:c,value:n.search,onChange:d}),e[3]=c,e[4]=n.search,e[5]=d,e[6]=u):u=e[6];let p;e[7]!==n||e[8]!==i?(p=C=>i({...n,assignee:C}),e[7]=n,e[8]=i,e[9]=p):p=e[9];let l;e[10]!==c||e[11]!==n.assignee||e[12]!==o||e[13]!==p?(l=s.jsx(Uo,{block:c,value:n.assignee,members:o,onChange:p}),e[10]=c,e[11]=n.assignee,e[12]=o,e[13]=p,e[14]=l):l=e[14];let f;e[15]!==n||e[16]!==i?(f=C=>i({...n,priority:C}),e[15]=n,e[16]=i,e[17]=f):f=e[17];let j;e[18]!==c||e[19]!==n.priority||e[20]!==f?(j=s.jsx(Qo,{block:c,value:n.priority,onChange:f}),e[18]=c,e[19]=n.priority,e[20]=f,e[21]=j):j=e[21];let g;e[22]!==n||e[23]!==i?(g=C=>i({...n,due:C}),e[22]=n,e[23]=i,e[24]=g):g=e[24];let x;e[25]!==c||e[26]!==n.due||e[27]!==g?(x=s.jsx(qo,{block:c,value:n.due,onChange:g}),e[25]=c,e[26]=n.due,e[27]=g,e[28]=x):x=e[28];let y;e[29]!==n||e[30]!==i?(y=C=>i({...n,tags:C}),e[29]=n,e[30]=i,e[31]=y):y=e[31];let S;e[32]!==c||e[33]!==n.tags||e[34]!==y||e[35]!==r?(S=s.jsx(Go,{block:c,value:n.tags,tags:r,onChange:y}),e[32]=c,e[33]=n.tags,e[34]=y,e[35]=r,e[36]=S):S=e[36];let b;e[37]!==c||e[38]!==n||e[39]!==a||e[40]!==i?(b=(a.entries.length>0||lt(n.project,a))&&s.jsx(Wo,{block:c,value:n.project,index:a,onChange:C=>i({...n,project:C})}),e[37]=c,e[38]=n,e[39]=a,e[40]=i,e[41]=b):b=e[41];let k;e[42]!==c||e[43]!==m?(k=s.jsx(ti,{block:c,onClick:m}),e[42]=c,e[43]=m,e[44]=k):k=e[44];let v;return e[45]!==S||e[46]!==b||e[47]!==k||e[48]!==u||e[49]!==l||e[50]!==j||e[51]!==x?(v=s.jsxs(s.Fragment,{children:[u,l,j,x,S,b,k]}),e[45]=S,e[46]=b,e[47]=k,e[48]=u,e[49]=l,e[50]=j,e[51]=x,e[52]=v):v=e[52],v}function Mr(t){const e=Y.c(16),{filters:n,members:o,tags:r,index:a,onChange:i,onOpenBoardSettings:m}=t,c=ae();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(cn,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=d):d=e[0];let u;e[1]!==n||e[2]!==a||e[3]!==o||e[4]!==i||e[5]!==m||e[6]!==r?(u=s.jsx(Sn,{filters:n,members:o,tags:r,index:a,onChange:i,onOpenBoardSettings:m}),e[1]=n,e[2]=a,e[3]=o,e[4]=i,e[5]=m,e[6]=r,e[7]=u):u=e[7];let p;e[8]!==n||e[9]!==a||e[10]!==i||e[11]!==c?(p=Lo(n,a)&&s.jsx("button",{type:"button",onClick:()=>i(Nn),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:c("taskBoard.taskFilters.clearButton")}),e[8]=n,e[9]=a,e[10]=i,e[11]=c,e[12]=p):p=e[12];let l;return e[13]!==u||e[14]!==p?(l=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d,u,p]}),e[13]=u,e[14]=p,e[15]=l):l=e[15],l}function Or(t){const e=Y.c(41),{filters:n,members:o,tags:r,index:a,onChange:i,onOpenBoardSettings:m}=t,c=ae(),[d,u]=H.useState(!1),p=Ro(n,a),l=p>0;let f;e[0]!==l?(f=we(l),e[0]=l,e[1]=f):f=e[1];const j=f;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(cn,{size:14,className:"shrink-0"}),e[2]=g):g=e[2];let x;e[3]!==c?(x=c("taskBoard.taskFilters.filterDrawerButtonLabel"),e[3]=c,e[4]=x):x=e[4];let y;e[5]!==p?(y=p>0&&s.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:p}),e[5]=p,e[6]=y):y=e[6];let S;e[7]!==x||e[8]!==y||e[9]!==j?(S=s.jsx(Hn,{asChild:!0,children:s.jsxs("button",{type:"button",className:j,children:[g,x,y]})}),e[7]=x,e[8]=y,e[9]=j,e[10]=S):S=e[10];let b;e[11]!==c?(b=c("taskBoard.taskFilters.filterDrawerTitle"),e[11]=c,e[12]=b):b=e[12];let k;e[13]!==b?(k=s.jsx(on,{className:"px-4 pt-4 text-base font-medium text-foreground",children:b}),e[13]=b,e[14]=k):k=e[14];let v;e[15]!==n||e[16]!==a||e[17]!==o||e[18]!==i||e[19]!==m||e[20]!==r?(v=s.jsx("div",{className:"flex flex-col gap-2 p-4",children:s.jsx(Sn,{block:!0,filters:n,members:o,tags:r,index:a,onChange:i,onOpenBoardSettings:m})}),e[15]=n,e[16]=a,e[17]=o,e[18]=i,e[19]=m,e[20]=r,e[21]=v):v=e[21];let C;e[22]!==p||e[23]!==i||e[24]!==c?(C=p>0&&s.jsx(be,{variant:"outline",className:"flex-1",onClick:()=>i(Nn),children:c("taskBoard.taskFilters.clearAllButton")}),e[22]=p,e[23]=i,e[24]=c,e[25]=C):C=e[25];let D;e[26]!==c?(D=c("taskBoard.taskFilters.doneButton"),e[26]=c,e[27]=D):D=e[27];let h;e[28]!==D?(h=s.jsx(rn,{asChild:!0,children:s.jsx(be,{className:"flex-1",children:D})}),e[28]=D,e[29]=h):h=e[29];let _;e[30]!==C||e[31]!==h?(_=s.jsxs(an,{className:"flex-row gap-2",children:[C,h]}),e[30]=C,e[31]=h,e[32]=_):_=e[32];let w;e[33]!==_||e[34]!==k||e[35]!==v?(w=s.jsxs(sn,{className:"p-0",children:[k,v,_]}),e[33]=_,e[34]=k,e[35]=v,e[36]=w):w=e[36];let P;return e[37]!==d||e[38]!==w||e[39]!==S?(P=s.jsxs(nn,{open:d,onOpenChange:u,direction:"bottom",children:[S,w]}),e[37]=d,e[38]=w,e[39]=S,e[40]=P):P=e[40],P}function Lr(t,e){return io(t,e.keySeq)??e.id}function Rr(t,e){const n=e?.trim();if(n)return t.find(o=>_n(n,o.keySeq))??t.find(o=>o.id===n)}export{gr as $,Ji as A,lr as B,hn as C,Bt as D,No as E,vt as F,Ir as G,_r as H,We as I,Pt as J,hr as K,Bo as L,Sr as M,qt as N,Er as O,co as P,vr as Q,bn as R,zt as S,wr as T,Dr as U,Cn as V,Eo as W,xr as X,jr as Y,wo as Z,yn as _,fr as a,Rr as a0,Or as a1,Mr as a2,Nr as a3,Tr as a4,Nn as a5,Cr as a6,br as a7,Qt as a8,kr as a9,Fr as aa,Vr as ab,Do as ac,Pr as ad,Ar as ae,vo as af,pr as b,Br as c,Oo as d,gn as e,Lr as f,yr as g,ko as h,jn as i,er as j,nr as k,rr as l,po as m,mr as n,ir as o,mo as p,ar as q,tr as r,sr as s,io as t,Zi as u,or as v,ho as w,ur as x,cr as y,dr as z};
|
|
1
|
+
import{b_ as wn,b as ae,G as je,a as Yt,F as Dn,J as Tn,aq as Fn,ar as An,j as s,B as be,t as ce,c as Y,r as H,I as Bn,M as In,K as ue,l as re,h as Xe,o as ie,a4 as Je,a1 as Ze,a2 as et,n as it,d as Pn,a7 as kt,m as rt,bz as En,e as Oe,bp as Vn,ap as Mn}from"./index-D6kz3ebr.js";import{C as On}from"./collection-search-CJb7f2bn.js";import{g as Ln,b as Rn,a as $n,e as Kn}from"./extract-connection-data-BPXLZ9J6.js";import{u as Wt,a as Xt,g as zn,C as pt}from"./connection-card-BzEzwA5b.js";import{D as Jt,b as Zt,c as en,d as tn,h as Un,e as Qn}from"./dialog-B0OdXcqs.js";import{D as nn,a as sn,c as qn,b as on,e as Gn,f as rn,g as an,d as Hn}from"./drawer-C2s6Up5H.js";import{d as me,a as pe,e as ge,b as he,c as xe,F as Et}from"./form-TWkufiDd.js";import{I as _e}from"./input-SHpohkkd.js";import{S as Yn,b as Wn,a as Xn,d as Jn,c as $e}from"./select-VruWLBER.js";import{T as Zn}from"./textarea-D5yUmTuo.js";import{b as ln}from"./use-connection-Cxk618DD.js";import{n as tt,a as gt,i as cn}from"./Tool02-Dx9QVS5U.js";import{j as ht,aN as es,aO as ts,aP as Vt,aQ as ns,t as ss,aR as os,aa as is,aS as rs,p as as,aT as ls,a8 as xt,a7 as cs,ae as ds}from"./agent-icon-BMTcgZga.js";import{b as us,d as fs}from"./UserSquare-Bi0Jy-6E.js";import{s as ms}from"./XClose-hM3AAAai.js";import{c as ps,i as Ge,a as Mt,E as gs,p as hs,b as xs,d as js}from"./connection-form-helpers-swpd49hK.js";import{a as jt}from"./authenticate-and-persist-oauth-DZYDyEg2.js";import{g as ys}from"./connection-slug-CITJ0kGN.js";import{C as bs}from"./collection-tabs-BxnrIEJp.js";import{u as Ot}from"./use-infinite-scroll-UlP3mdDG.js";import{B as He}from"./badge-C_ARXG3i.js";import{u as vs}from"./useSuspenseInfiniteQuery-IjFUp4RN.js";import{S as Cs,u as ks,f as Ns}from"./use-mcp-client-BS1HAuw9.js";import{i as nt}from"./Check-sicxXYN7.js";import{s as _s}from"./Plus-5jblmb5M.js";import{g as st}from"./metadata-dUsYcpuu.js";import{u as Ss}from"./use-ai-providers-CBAbpFCs.js";import{a as ws}from"./use-file-configs-BszfQ6Ii.js";import{d as Ds}from"./use-organization-settings-zsIQ5yKP.js";import{r as Ts}from"./site-slug-uya6Wp4-.js";import{T as Fs,C as Nt,c as As,d as Bs,S as yt}from"./task-board-F9nWsjW0.js";import{a as Is}from"./decopilot-sse-pool-pjl5bOdE.js";import{u as Ps}from"./use-decopilot-events-w-PNw0gQ.js";import{A as Lt}from"./avatar-CPkw3h7t.js";import{h as ot,D as dn,b as un,g as fn,c as mn}from"./dropdown-menu-CoV3z2Yq.js";import{a as _t,b as St,P as wt}from"./popover-DClv4J5a.js";import{e as Le,a as Dt,c as Tt,d as Ce,b as Ft,C as At}from"./command-CqNTTNRi.js";import{t as ze}from"./ChevronUp-CBLrm_OT.js";import{s as Es}from"./TrendUp01-DjG8w8m_.js";import{a as Vs}from"./Settings02-5WiTDc8b.js";import{s as Rt}from"./User01-Dq0QszR-.js";import{G as Ms}from"./github-icon-DMu-fvNj.js";import{P as Os}from"./project-icon-DB0uWZzs.js";import{g as $t}from"./get-initials-D-f_fDFw.js";import{p as Ls,a as Rs}from"./github-repo-CTPv5ZM2.js";import{i as $s}from"./AlertCircle-C2I0CPt8.js";import{i as Ks}from"./CheckCircle-Cbkf0Hrm.js";import{a as pn}from"./DotsVertical-Cyt1EoXA.js";import{s as zs}from"./Eye-QPQVcqGb.js";import{i as Us}from"./Shield01-qqcKLTxE.js";const Qs=wn("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);function qs({open:t,onOpenChange:e,onCreated:n}){const o=ae(),{org:r}=je(),{data:a}=Yt.useSession(),{stdioEnabled:i}=Dn(),m=Tn(),c=ln(),d=Wt(),p=Xt(d,"").items,l=Fn({resolver:An(ps),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),f=l.watch("ui_type"),j=l.watch("connection_url"),g=l.watch("npx_package"),x=Ge({uiType:f,connectionUrl:j??"",npxPackage:g??""})??Mt({uiType:f,connectionUrl:j??"",registryItems:p}),y=h=>{const _=h.trim();if(!_)return;const w=!!l.formState.dirtyFields.title,P=!!l.formState.dirtyFields.description,V=!!l.formState.dirtyFields.env_vars,N=F=>{if(F&&(!w&&!l.getValues("title").trim()&&F.title&&l.setValue("title",F.title,{shouldDirty:!1}),!P&&!(l.getValues("description")??"").trim()&&F.description&&l.setValue("description",F.description,{shouldDirty:!1}),!V&&F.envVarKeys?.length)){const $=l.getValues("env_vars")??[],I=new Set($.map(R=>R.key)),B=F.envVarKeys.filter(R=>!I.has(R));B.length>0&&l.setValue("env_vars",[...$,...B.map(R=>({key:R,value:""}))],{shouldDirty:!0})}},T=hs(_);if(T&&i){l.setValue("ui_type","NPX",{shouldDirty:!0}),l.setValue("npx_package",T.packageName,{shouldDirty:!0}),l.setValue("connection_url","",{shouldDirty:!0}),l.setValue("connection_token",null,{shouldDirty:!0}),N(Ge({uiType:"NPX",npxPackage:T.packageName}));return}if(_.startsWith("http://")||_.startsWith("https://")){const F=f==="HTTP"||f==="SSE"||f==="Websocket"?f:"HTTP";l.setValue("ui_type",F,{shouldDirty:!0}),l.setValue("connection_url",_,{shouldDirty:!0}),N(Ge({uiType:F,connectionUrl:_})??Mt({uiType:F,connectionUrl:_,registryItems:p}));return}f==="NPX"&&N(Ge({uiType:"NPX",npxPackage:_}))},S=h=>{h||l.reset(),e(h)},b=async h=>{let _,w=null,P=null,V=null;h.ui_type==="NPX"?(_="STDIO",w="",V=xs(h.npx_package||"",h.env_vars||[])):h.ui_type==="STDIO"?(_="STDIO",w="",V=js(h.stdio_command||"",h.stdio_args||"",h.stdio_cwd,h.env_vars||[])):(_=h.ui_type,w=h.connection_url||"",P=h.connection_token||null);const N=Ln("conn");try{await c.create.mutateAsync({id:N,title:h.title,description:h.description||null,connection_type:_,connection_url:w,connection_token:P,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:a?.user?.id||"system",organization_id:r.id,icon:h.icon??null,app_name:null,app_id:null,connection_headers:V,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),l.reset(),e(!1),n?.(N)}catch{ce.error(o("connections.createConnectionDialog.failedToCreateConnection"))}},k=o("connections.createConnectionDialog.title"),v=o("connections.createConnectionDialog.description"),C=l.formState.isSubmitting?o("connections.createConnectionDialog.saving"):o("connections.createConnectionDialog.createButton"),D=s.jsxs("div",{className:"grid gap-4",children:[s.jsx(me,{control:l.control,name:"ui_type",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:o("connections.createConnectionDialog.typeLabel")}),s.jsxs(Yn,{value:h.value,onValueChange:h.onChange,children:[s.jsx(he,{children:s.jsx(Wn,{children:s.jsx(Xn,{})})}),s.jsxs(Jn,{children:[s.jsx($e,{value:"HTTP",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(ht,{className:"w-4 h-4"}),o("connections.createConnectionDialog.httpType")]})}),s.jsx($e,{value:"SSE",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(ht,{className:"w-4 h-4"}),o("connections.createConnectionDialog.sseType")]})}),s.jsx($e,{value:"Websocket",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(ht,{className:"w-4 h-4"}),o("connections.createConnectionDialog.websocketType")]})}),i&&s.jsxs(s.Fragment,{children:[s.jsx($e,{value:"NPX",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(tt,{className:"w-4 h-4"}),o("connections.createConnectionDialog.npxPackageType")]})}),s.jsx($e,{value:"STDIO",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(us,{className:"w-4 h-4"}),o("connections.createConnectionDialog.customCommandType")]})})]})]})]}),s.jsx(xe,{})]})}),f==="NPX"&&s.jsx(me,{control:l.control,name:"npx_package",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:o("connections.createConnectionDialog.npmPackageLabel")}),s.jsx(he,{children:s.jsx(_e,{placeholder:o("connections.createConnectionDialog.npmPackagePlaceholder"),...h,value:h.value??"",onPaste:_=>{const w=_.clipboardData.getData("text");w&&(_.preventDefault(),l.setValue("npx_package",w.trim(),{shouldDirty:!0}),y(w))},onBlur:_=>{y(_.target.value),h.onBlur()}})}),s.jsx(xe,{})]})}),f==="STDIO"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[s.jsx(me,{control:l.control,name:"stdio_command",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:o("connections.createConnectionDialog.commandLabel")}),s.jsx(he,{children:s.jsx(_e,{placeholder:o("connections.createConnectionDialog.commandPlaceholder"),...h,value:h.value??""})}),s.jsx(xe,{})]})}),s.jsx(me,{control:l.control,name:"stdio_args",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:o("connections.createConnectionDialog.argumentsLabel")}),s.jsx(he,{children:s.jsx(_e,{placeholder:o("connections.createConnectionDialog.argumentsPlaceholder"),...h,value:h.value??""})}),s.jsx(xe,{})]})})]}),s.jsx(me,{control:l.control,name:"stdio_cwd",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:o("connections.createConnectionDialog.workingDirectoryLabel")}),s.jsx(he,{children:s.jsx(_e,{placeholder:o("connections.createConnectionDialog.workingDirectoryPlaceholder"),...h,value:h.value??""})}),s.jsx("p",{className:"text-xs text-muted-foreground",children:o("connections.createConnectionDialog.workingDirectoryDescription")}),s.jsx(xe,{})]})})]}),(f==="NPX"||f==="STDIO")&&s.jsx(me,{control:l.control,name:"env_vars",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:o("connections.createConnectionDialog.environmentVariablesLabel")}),s.jsx(he,{children:s.jsx(gs,{value:h.value??[],onChange:h.onChange})}),s.jsx(xe,{})]})}),f!=="NPX"&&f!=="STDIO"&&s.jsxs(s.Fragment,{children:[s.jsx(me,{control:l.control,name:"connection_url",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:o("connections.createConnectionDialog.urlLabel")}),s.jsx(he,{children:s.jsx(_e,{placeholder:o("connections.createConnectionDialog.urlPlaceholder"),...h,value:h.value??"",onPaste:_=>{const w=_.clipboardData.getData("text");w&&(_.preventDefault(),l.setValue("connection_url",w.trim(),{shouldDirty:!0}),y(w))},onBlur:_=>{y(_.target.value),h.onBlur()}})}),s.jsx(xe,{})]})}),s.jsx(me,{control:l.control,name:"connection_token",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:x?.token?.label??o("connections.createConnectionDialog.tokenLabelDefault")}),s.jsx(he,{children:s.jsx(_e,{type:"password",placeholder:x?.token?.placeholder??o("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...h,value:h.value??""})}),x?.token?.helperText&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&s.jsxs(s.Fragment,{children:[" ","·"," ",s.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:o("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),s.jsx(xe,{})]})})]}),s.jsx(me,{control:l.control,name:"title",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:o("connections.createConnectionDialog.nameLabel")}),s.jsx(he,{children:s.jsx(_e,{placeholder:o("connections.createConnectionDialog.namePlaceholder"),...h})}),s.jsx(xe,{})]})}),s.jsx(me,{control:l.control,name:"description",render:({field:h})=>s.jsxs(pe,{children:[s.jsx(ge,{children:o("connections.createConnectionDialog.descriptionLabel")}),s.jsx(he,{children:s.jsx(Zn,{placeholder:o("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...h,value:h.value??""})}),s.jsx(xe,{})]})})]});return m?s.jsx(nn,{open:t,onOpenChange:S,children:s.jsxs(sn,{className:"max-h-[90vh]",children:[s.jsx(qn,{className:"pb-2",children:s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{className:"flex-1 text-left",children:[s.jsx(on,{children:k}),s.jsx(Gn,{className:"mt-1",children:v})]}),s.jsx(rn,{asChild:!0,children:s.jsx(be,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:s.jsx(ms,{size:16})})})]})}),s.jsx(Et,{...l,children:s.jsxs("form",{onSubmit:l.handleSubmit(b),children:[s.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:D}),s.jsx(an,{children:s.jsx(be,{type:"submit",disabled:l.formState.isSubmitting,className:"w-full",children:C})})]})})]})}):s.jsx(Jt,{open:t,onOpenChange:S,children:s.jsxs(Zt,{className:"sm:max-w-[525px]",children:[s.jsxs(en,{children:[s.jsx(tn,{children:k}),s.jsx(Un,{children:v})]}),s.jsx(Et,{...l,children:s.jsxs("form",{onSubmit:l.handleSubmit(b),children:[s.jsx("div",{className:"py-4",children:D}),s.jsxs(Qn,{children:[s.jsx(be,{type:"button",variant:"outline",onClick:()=>S(!1),children:o("connections.createConnectionDialog.cancelButton")}),s.jsx(be,{type:"submit",disabled:l.formState.isSubmitting,className:"min-w-40",children:C})]})]})})]})})}function Gs(t){const e=Y.c(72),{mode:n,agentId:o,addedConnectionIds:r,onAdd:a,onCloneAndAdd:i,onConnectAndAdd:m,connectingItemId:c,search:d,onCreateConnection:u,onBrowseNavigate:p,defaultTab:l}=t,f=n===void 0?"add":n,j=l===void 0?"connected":l,g=ae(),{org:x}=je(),y=H.useDeferredValue(d),S=d!==y;let b;e[0]!==y?(b=y.trim().toLowerCase(),e[0]=y,e[1]=b):b=e[1];const k=b;let v;e[2]!==j?(v=A=>A??j,e[2]=j,e[3]=v):v=e[3];const[C,D]=Bn(In.connectionsTab(x.slug)+(j==="all"?":home-modal":":agent-modal"),v);let h;e[4]!==C||e[5]!==D?(h=A=>{A!==C&&ie("connections_dialog_tab_changed",{to_tab:A}),D(A)},e[4]=C,e[5]=D,e[6]=h):h=e[6];const _=h;let w;e[7]!==x.id||e[8]!==x.slug?(w={connectionId:Cs,orgId:x.id,orgSlug:x.slug},e[7]=x.id,e[8]=x.slug,e[9]=w):w=e[9];const P=ks(w),V=y?.trim().split(/\s+/).filter(Boolean)??[],N=V.length>0?{operator:"or",conditions:V.flatMap(to)}:void 0,T={...N&&{where:N},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},F=JSON.stringify(T),{data:$,fetchNextPage:I,hasNextPage:B,isFetchingNextPage:R}=vs({queryKey:ue.collectionListInfinite(P,x.id,"","CONNECTIONS",F),queryFn:async A=>{const{pageParam:q}=A,ye=q===void 0?0:q;return(await P.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...N&&{where:N},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:ye}})).structuredContent},initialPageParam:0,getNextPageParam:Zs,staleTime:3e4}),G=$?.pages.flatMap(Js)??[],E=zn(G),U=new Set(G.filter(Xs).map(Ws)),M=Wt(),Q=Xt(M,y),Z=Ot(Q.loadMore,Q.hasMore,Q.isLoadingMore),ee=Ot(I,B??!1,R),K=C==="all"||!!k,ne=K?Q.items.filter(A=>{const q=Rn(A);if(q&&U.has(q))return!1;if(!k)return!0;const ye=st(A._meta),ke=[A.title,A.description,A.name,A.server?.title,A.server?.description,A.server?.name,ye?.friendly_name,ye?.friendlyName].filter(Boolean).join(" ").toLowerCase();return V.some(fe=>ke.includes(fe.toLowerCase()))}):[],W=ne.filter(Ys),X=ne.filter(Hs);let J;e[10]!==r?(J=A=>A.some(q=>r.has(q.id)),e[10]=r,e[11]=J):J=e[11];const te=J;let se;e[12]!==r||e[13]!==o||e[14]!==c||e[15]!==te||e[16]!==f||e[17]!==a||e[18]!==p||e[19]!==i||e[20]!==g?(se=(A,q,ye,ke,fe)=>{const qe=te(fe),Me=fe.find(Ne=>!r.has(Ne.id)),le=fe[0];if(f==="browse"){const Ne=ys(le);return s.jsx(pt,{connection:{title:q,icon:ye,description:fe.length>1?`${fe.length} instances`:ke??void 0},fallbackIcon:s.jsx(tt,{}),headerActionsAlwaysVisible:!0,headerActions:s.jsxs(He,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[s.jsx(nt,{size:11})," ",g("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{ie("connection_browse_clicked",{app_name:le.app_name??null,connection_id:le.id,instances_count:fe.length}),p?.(Ne)}},A)}return s.jsx(pt,{connection:{title:q,icon:ye,description:ke},fallbackIcon:s.jsx(tt,{}),headerActionsAlwaysVisible:!0,headerActions:s.jsxs("div",{className:"flex items-center gap-1.5",children:[qe&&s.jsxs(He,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[s.jsx(nt,{size:11})," ",g("virtualMcp.connectionDialogContent.added")]}),s.jsx(be,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:c!==null,onClick:Ne=>{Ne.stopPropagation(),Me?(ie("connection_add_clicked",{action:"use_existing",app_name:le.app_name??null,connection_id:Me.id}),o&&ie("agent_connection_attached",{agent_id:o,connection_id:Me.id,app_name:le.app_name??null,mode:"existing"}),a(Me.id)):(ie("connection_add_clicked",{action:"clone",app_name:le.app_name??null,base_connection_id:le.id}),i(le))},children:g("virtualMcp.connectionDialogContent.add")})]})},A)},e[12]=r,e[13]=o,e[14]=c,e[15]=te,e[16]=f,e[17]=a,e[18]=p,e[19]=i,e[20]=g,e[21]=se):se=e[21];const O=se;let L;e[22]!==c||e[23]!==f||e[24]!==m||e[25]!==g?(L=A=>{const q=st(A._meta),ye=q?.friendlyName||q?.friendly_name||A.server?.title||A.title||A.server?.name||A.name||A.id||"",ke=A.server?.description||A.description||null,fe=A.server?.icons?.[0]?.src||$n(A.server?.repository)||null,qe=q?.official===!0,Me=q?.verified===!0,le=q?.owner==="deco";return s.jsx(pt,{connection:{title:ye,description:ke,icon:fe},fallbackIcon:s.jsx(tt,{}),headerActionsAlwaysVisible:!0,headerActions:s.jsxs("div",{className:"flex items-center gap-1.5",children:[le&&s.jsxs(Je,{children:[s.jsx(Ze,{asChild:!0,children:s.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:g("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),s.jsx(et,{children:g("virtualMcp.connectionDialogContent.builtByDeco")})]}),!le&&qe&&s.jsxs(Je,{children:[s.jsx(Ze,{asChild:!0,children:s.jsx(He,{variant:"outline",size:"icon",children:s.jsx(gt,{})})}),s.jsx(et,{children:g("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!le&&!qe&&Me&&s.jsxs(Je,{children:[s.jsx(Ze,{asChild:!0,children:s.jsx(He,{variant:"outline",size:"icon",children:s.jsx(gt,{})})}),s.jsx(et,{children:g("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),s.jsx(be,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:c!==null,onClick:Ne=>{Ne.stopPropagation(),ie("connection_add_clicked",{action:"connect_new",registry_item_id:A.id,app_name:q?.friendlyName||A.server?.name||A.name||null}),m(A)},children:c===A.id?s.jsx(Xe,{className:"size-3.5"}):g(f==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${A.id}`)},e[22]=c,e[23]=f,e[24]=m,e[25]=g,e[26]=L):L=e[26];const oe=L;let z;e[27]!==C||e[28]!==_||e[29]!==u||e[30]!==k||e[31]!==g?(z=!k&&s.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[s.jsx(bs,{tabs:[{id:"all",label:g("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:g("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:C,onTabChange:A=>_(A)}),s.jsxs(be,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{ie("connections_dialog_custom_clicked"),u()},children:[s.jsx(_s,{size:12}),g("virtualMcp.connectionDialogContent.customConnection")]})]}),e[27]=C,e[28]=_,e[29]=u,e[30]=k,e[31]=g,e[32]=z):z=e[32];const ve=S&&"opacity-50 pointer-events-none";let de;e[33]!==ve?(de=re("flex-1 overflow-auto p-5 transition-opacity duration-150",ve),e[33]=ve,e[34]=de):de=e[34];const De="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let Te;e[35]!==O?(Te=A=>{if(A.type==="group")return O(A.key,A.title,A.icon,null,A.connections);const q=A.connection;return O(q.id,q.title,q.icon,q.description??null,[q])},e[35]=O,e[36]=Te):Te=e[36];const ct=E.map(Te);let Fe;e[37]!==ee?(Fe=s.jsx("div",{ref:ee,className:"col-span-full h-1"}),e[37]=ee,e[38]=Fe):Fe=e[38];let Ae;e[39]!==R?(Ae=R&&s.jsx("div",{className:"col-span-full flex justify-center py-6",children:s.jsx(Xe,{className:"size-6 text-muted-foreground"})}),e[39]=R,e[40]=Ae):Ae=e[40];const dt=K&&W.length>0&&s.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[s.jsx(gt,{size:13,className:"text-muted-foreground shrink-0"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:g("virtualMcp.connectionDialogContent.sectionVerified")}),s.jsx("div",{className:"flex-1 h-px bg-border"})]}),ut=K&&W.map(oe),ft=K&&X.length>0&&s.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[s.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:g("virtualMcp.connectionDialogContent.sectionAllConnections")}),s.jsx("div",{className:"flex-1 h-px bg-border"})]}),mt=K&&X.map(oe);let Be;e[41]!==Z||e[42]!==M||e[43]!==K?(Be=K&&M.length>0&&s.jsx("div",{ref:Z,className:"col-span-full h-1"}),e[41]=Z,e[42]=M,e[43]=K,e[44]=Be):Be=e[44];let Ie;e[45]!==Q.isLoadingMore||e[46]!==K?(Ie=K&&Q.isLoadingMore&&s.jsx("div",{className:"col-span-full flex justify-center py-6",children:s.jsx(Xe,{className:"size-6 text-muted-foreground"})}),e[45]=Q.isLoadingMore,e[46]=K,e[47]=Ie):Ie=e[47];let Pe;e[48]!==ct||e[49]!==Fe||e[50]!==Ae||e[51]!==dt||e[52]!==ut||e[53]!==ft||e[54]!==mt||e[55]!==Be||e[56]!==Ie?(Pe=s.jsxs("div",{className:De,children:[ct,Fe,Ae,dt,ut,ft,mt,Be,Ie]}),e[48]=ct,e[49]=Fe,e[50]=Ae,e[51]=dt,e[52]=ut,e[53]=ft,e[54]=mt,e[55]=Be,e[56]=Ie,e[57]=Pe):Pe=e[57];let Ee;e[58]!==C||e[59]!==E.length||e[60]!==X||e[61]!==d||e[62]!==g||e[63]!==W?(Ee=E.length===0&&W.length===0&&X.length===0&&s.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:d?g("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:d}):g(C==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),e[58]=C,e[59]=E.length,e[60]=X,e[61]=d,e[62]=g,e[63]=W,e[64]=Ee):Ee=e[64];let Ve;e[65]!==de||e[66]!==Pe||e[67]!==Ee?(Ve=s.jsxs("div",{className:de,children:[Pe,Ee]}),e[65]=de,e[66]=Pe,e[67]=Ee,e[68]=Ve):Ve=e[68];let Qe;return e[69]!==z||e[70]!==Ve?(Qe=s.jsxs(s.Fragment,{children:[z,Ve]}),e[69]=z,e[70]=Ve,e[71]=Qe):Qe=e[71],Qe}function Hs(t){return!t.verified&&!st(t._meta)?.verified&&!t.meta?.verified}function Ys(t){return t.verified||st(t._meta)?.verified||t.meta?.verified}function Ws(t){return t.app_name}function Xs(t){return t.app_name}function Js(t){return t?.items??[]}function Zs(t,e){if(t?.hasMore)return e.reduce(eo,0)}function eo(t,e){return t+(e?.items?.length??0)}function to(t){return[{field:["title"],operator:"contains",value:t},{field:["description"],operator:"contains",value:t}]}function Ji({open:t,onOpenChange:e,defaultTab:n,initialSearch:o="",...r}){const a=ae(),i=r.mode??"add",m="agentId"in r?r.agentId:void 0,c="addedConnectionIds"in r?r.addedConnectionIds??new Set:new Set,d="onAdd"in r&&r.onAdd?r.onAdd:N=>{},u=(N,T,F)=>{m&&ie("agent_connection_attached",{agent_id:m,connection_id:N,app_name:T,mode:F})},[p,l]=H.useState(null),[f,j]=H.useState(o),[g,x]=H.useState(!1),[y,S]=H.useState(t);t!==y&&(S(t),t&&j(o));const{org:b}=je(),{data:k}=Yt.useSession(),v=ln(),C=it(),D=Pn(),h=N=>{e(!1),D({to:"/$org/settings/connections/$appSlug",params:{org:b.slug,appSlug:N}})},_=()=>{C.invalidateQueries({predicate:N=>{const T=N.queryKey;return T[1]===b.id&&T[3]==="collection"&&T[4]==="CONNECTIONS"}})},w=async(N,T)=>{ie("connection_oauth_succeeded",{connection_id:N,flow:T});const F=new URL(`/api/${b.slug}/mcp/${N}`,window.location.origin);await C.invalidateQueries({queryKey:ue.isMCPAuthenticated(F.href,null)}),_()},P=async N=>{l(N.app_name??N.id);try{const F=`${N.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,I=(await v.create.mutateAsync({title:F,description:N.description??null,connection_type:N.connection_type,connection_url:N.connection_url??null,connection_token:null,icon:N.icon??null,app_name:N.app_name??null,app_id:N.app_id??null,connection_headers:N.connection_headers??null})).id,B=await jt({connectionId:I,orgId:b.id,orgSlug:b.slug,persistFallback:R=>v.update.mutateAsync({id:I,data:{connection_token:R}}).then(()=>{})});if(B.ran&&!B.ok){ie("connection_oauth_failed",{connection_id:I,flow:"clone",error:B.error??"no_token"}),ce.error(a("virtualMcp.addConnectionDialog.authenticationFailedError",{error:B.error??"no token received"})),await v.delete.mutateAsync(I);return}B.ran&&await w(I,"clone"),u(I,N.app_name??null,"clone"),d(I)}catch(T){console.error("Failed to add connection:",T),ce.error(a("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{l(null)}},V=async N=>{if(!(!b||!k?.user?.id)){l(N.id);try{const T=Kn(N,b.id,k.user.id,{remoteIndex:0}),F=T.connection_type==="STDIO",$=!!T.connection_url,I=F&&T.connection_headers&&typeof T.connection_headers=="object"&&"command"in T.connection_headers;if(!$&&!I){ce.error(a("virtualMcp.addConnectionDialog.mcpServerConnectionError")),l(null);return}const{id:B}=await v.create.mutateAsync(T),R=await jt({connectionId:B,orgId:b.id,orgSlug:b.slug,persistFallback:G=>v.update.mutateAsync({id:B,data:{connection_token:G}}).then(()=>{})});if(R.ran&&!R.ok){ie("connection_oauth_failed",{connection_id:B,flow:"connect_new",error:R.error??"no_token"}),ce.warning(a("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:a("virtualMcp.addConnectionDialog.signInFailedDescription",{error:R.error??"no token received"})}),u(B,T.app_name??null,"new"),d(B);return}R.ran?(await w(B,"connect_new"),ce.success(a("virtualMcp.addConnectionDialog.connectedAuthenticated"))):ce.success(a("virtualMcp.addConnectionDialog.connected")),u(B,T.app_name??null,"new"),d(B)}catch(T){console.error("Failed to connect:",T),ce.error(a("virtualMcp.addConnectionDialog.failedToConnect"))}finally{l(null)}}};return s.jsxs(Jt,{open:t,onOpenChange:e,children:[s.jsxs(Zt,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[s.jsx(en,{className:"px-6 pt-5 pb-0 shrink-0",children:s.jsx(tn,{className:"text-base font-semibold",children:a(i==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),s.jsx("div",{className:"pt-3 shrink-0",children:s.jsx(On,{value:f,onChange:j,placeholder:a("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),s.jsx(H.Suspense,{fallback:s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(Xe,{className:"size-6 text-muted-foreground"})}),children:s.jsx(Gs,{mode:i,agentId:m,addedConnectionIds:c,onAdd:d,onCloneAndAdd:P,onConnectAndAdd:V,connectingItemId:p,search:f,onCreateConnection:()=>x(!0),onBrowseNavigate:h,defaultTab:n})})]}),s.jsx(qs,{open:g,onOpenChange:x,onCreated:async N=>{x(!1);const T=await jt({connectionId:N,orgId:b.id,orgSlug:b.slug,persistFallback:F=>v.update.mutateAsync({id:N,data:{connection_token:F}}).then(()=>{})});if(T.ran&&!T.ok){ie("connection_oauth_failed",{connection_id:N,flow:"custom_create",error:T.error??"no_token"}),ce.warning(a("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:a("virtualMcp.addConnectionDialog.signInFailedDescription",{error:T.error??"no token received"})}),u(N,null,"custom"),d(N),e(!1);return}T.ran&&await w(N,"custom_create"),u(N,null,"custom"),d(N),e(!1)}})]})}const Kt=new Map;function Zi(){const{org:t}=je(),e=kt(),n=Ss(),o=n.find(x=>x.providerId==="deco"),{data:r,isLoading:a,refetch:i,isFetching:m}=rt({queryKey:ue.aiProviderCredits(t.id,"deco"),enabled:!!o,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),c=r?.balanceCents??null,d=c!=null?c/100:null,u=H.useRef(new Map);if(c!=null){const x=Kt.get(t.id);u.current.get(t.id)&&x!=null&&c>x&&ie("credits_topped_up_detected",{organization_id:t.id,delta_cents:c-x,previous_balance_cents:x,new_balance_cents:c}),Kt.set(t.id,c),u.current.set(t.id,!0)}const p=!!o,l=c!=null&&c>0,f=c!=null&&c===0,j=c!=null&&c===200,g=n.length>0&&n.every(x=>x.providerId==="deco");return{hasDecoKey:p,decoKeyId:o?.id??null,balanceCents:c,balanceDollars:d,hasCredits:l,isZeroBalance:f,isInitialFreeCredit:j,hasOnlyDecoProvider:g,isLoading:a,isFetching:m,refetch:i}}const no=4,so="TASK";function oo(t){return t.replace(/[^a-zA-Z]/g,"").toUpperCase().slice(0,no)||so}function io(t,e){return e==null?null:`${oo(t)}-${String(e).padStart(2,"0")}`}const ro=/^(?:[a-z]{1,8}-)?0*(\d+)$/i;function ao(t){const e=ro.exec(t.trim())?.[1];return e===void 0?null:Number(e)}function zt(t){const e=Y.c(8),{size:n,className:o}=t,r=n===void 0?16:n;let a;e[0]!==r?(a={width:r,height:r},e[0]=r,e[1]=a):a=e[1];let i;e[2]!==o?(i=re("shrink-0 rounded-full object-cover",o),e[2]=o,e[3]=i):i=e[3];let m;return e[4]!==r||e[5]!==a||e[6]!==i?(m=s.jsx("img",{src:Ns,alt:"Super Agent",width:r,height:r,style:a,className:i}),e[4]=r,e[5]=a,e[6]=i,e[7]=m):m=e[7],m}const Ue=["overview","reports","board","site-editor","assets","hosting","e2e","analytics","cdn","automations"],lo=["overview","reports","board","site-editor"],Bt=1,co=["assets","hosting","e2e","analytics","cdn"];function er(t,e,n){if(!t)return{project:n??null,resolvedScopeId:null};const o=e?.id===t?e:n?.id===t?n:null;return{project:o,resolvedScopeId:o?t:null}}function tr(t){return t?.sidebarViews!==void 0?t.sidebarViews:t?.ui?.layout?.sidebarViews}function gn(t,e){const n=new Set(t??[]);if(e!==Bt)for(const o of lo)n.add(o);return Ue.filter(o=>n.has(o))}function uo(t){return Ue.some(e=>e===t)}function fo(t){return co.some(e=>e===t)}function mo(t,e){return{overview:t,reports:t,board:t,"site-editor":t,assets:e.assets,hosting:e.hosting,e2e:e.e2e,analytics:e.analytics,cdn:e.cdn,automations:!0}}function nr(t,e,n){const o=mo(e,n);return t?o:{...o,overview:!0,reports:!0,board:!0}}function sr(t,e,n){const o=new Set(gn(t,n));return Ue.filter(r=>e[r]&&o.has(r))}function or(t,e,n){return n||!t?t:(t.type==="preview"||t.type==="content"||t.type==="code"?"site-editor":t.type)===e?{type:"settings"}:t}function ir(t){return Ue.filter(e=>t[e])}function po(t,e,n){return!uo(t)||e[t]?!1:fo(t)?!(t==="assets"?n.assets:n.siteAccess):!0}function rr(t,e,n,o,r){return po(t==="preview"||t==="content"||t==="code"?"site-editor":t,e,n)||t==="content"&&!o.includes("content")||t==="code"&&r&&!o.includes("code")}function ar(t,e,n,o){const r=new Set(gn(t,o));return n?r.add(e):r.delete(e),Ue.filter(a=>r.has(a))}function Ke(t,e){return ue.optimisticProjectSidebarViews(t,e)}function Ye(t){return typeof t=="object"&&t!==null}function hn(t,e){return t[1]===e&&t[3]==="collection"&&t[4]==="VIRTUAL_MCP"}function go(t,e){if(!Ye(t))return t;if("item"in t&&Ye(t.item)&&t.item.id===e.id)return{...t,item:e};if(!("structuredContent"in t)||!Ye(t.structuredContent))return t;const n=t.structuredContent.items;if(!Array.isArray(n))return t;let o=!1;const r=n.map(a=>!Ye(a)||a.id!==e.id?a:(o=!0,e));return o?{...t,structuredContent:{...t.structuredContent,items:r}}:t}function lr(t,e,n){t.setQueriesData({predicate:o=>hn(o.queryKey,e)},o=>go(o,n))}function cr(t,e,n){const o=t.getQueriesData({predicate:r=>hn(r.queryKey,e)&&r.queryKey[5]===n});for(const[,r]of o)if(r?.item?.id===n)return r.item;return null}function It(t,e,n){return t.getQueryData(Ke(e,n))??null}function ho(t,e){if(e)return{sidebarViews:[...e.views],sidebarViewsVersion:Bt};const n=t?.sidebarViews;return{sidebarViews:n===null?null:n?[...n]:void 0,sidebarViewsVersion:t?.sidebarViewsVersion}}function dr(t,e,n){return e?{sidebarViews:[...e.views],sidebarViewsVersion:Bt}:n===void 0?{sidebarViews:t.sidebarViews===null?null:t.sidebarViews?[...t.sidebarViews]:void 0,sidebarViewsVersion:t.sidebarViewsVersion}:ho(n,null)}function xo(t,e,n,o,r){const a=It(t,e,n),i={revision:(a?.revision??0)+1,views:[...o],rollbackViews:a?[...a.rollbackViews]:[...r]};return t.setQueryData(Ke(e,n),i),{revision:i.revision,views:[...i.views],persistedViews:[...i.rollbackViews]}}function jo(t,e,n){const o=It(t,e,n);return o?{revision:o.revision,views:[...o.views],persistedViews:[...o.rollbackViews]}:null}function xn(t,e){const n=new Set(t),o=new Set(e);return n.size===o.size&&[...n].every(r=>o.has(r))}function ur(t){return t?!xn(t.views,t.persistedViews):!1}function yo(t,e,n,{snapshot:o,saved:r,authoritativeViews:a}){if(!o)return{settledLatest:!1,reconciledViews:null};const i=It(t,e,n);if(!i||o.revision>i.revision)return{settledLatest:!1,reconciledViews:null};const m=a!==void 0?[...a]:r?[...o.views]:null,c={...i,rollbackViews:m??i.rollbackViews};return c.rollbackViews!==i.rollbackViews&&t.setQueryData(Ke(e,n),c),o.revision!==i.revision?{settledLatest:!1,reconciledViews:null}:(t.setQueryData(Ke(e,n),null),{settledLatest:!0,reconciledViews:r?m&&!xn(m,o.views)?m:null:[...c.rollbackViews]})}function fr(t){const e=Y.c(5),{org:n}=je(),o=t??"";let r;e[0]!==n.id||e[1]!==o?(r=Ke(n.id,o),e[0]=n.id,e[1]=o,e[2]=r):r=e[2];let a;e[3]!==r?(a={queryKey:r,queryFn:bo,enabled:!1,staleTime:Number.POSITIVE_INFINITY},e[3]=r,e[4]=a):a=e[4];const{data:i}=rt(a);return i?.views}async function bo(){return null}function mr(t){const e=Y.c(4),{org:n}=je(),o=it();let r;return e[0]!==n||e[1]!==o||e[2]!==t?(r={stage:(a,i)=>xo(o,n.id,t,a,i),snapshot:()=>jo(o,n.id,t),settle:a=>yo(o,n.id,t,a)},e[0]=n,e[1]=o,e[2]=t,e[3]=r):r=e[3],r}function vo(t,e){if(!e)return null;const n=e.toLowerCase();return t.find(o=>{const r=o.bucket.toLowerCase();return o.siteSlug?.toLowerCase()===n||r===n||r===`deco-assets-${n}`})??null}function pr(t){const e=Y.c(10),{org:n}=je(),o=En(),r=Ds(),a=ws(),i=Ts(t),m=o.hostingEnabled===!0,c=o.monitorEnabled===!0||o.auth.localMode===!0,d=(m||c)&&!!i,u=rt({queryKey:ue.hostingAccess(n.slug,i??""),queryFn:async()=>{const v=await fetch(`/api/${n.slug}/hosting/${encodeURIComponent(i??"")}/access`);return v.ok?await v.json():{owned:!1,canWrite:!1}},enabled:d,staleTime:6e4}),p=u.data?.owned===!0,l=!!vo(a.data?.configs??[],i),f=m&&p&&r.hosting,j=m&&p&&r.e2e,g=m&&p&&r.analytics,x=c&&p&&r.monitor;let y;e[0]!==l||e[1]!==f||e[2]!==j||e[3]!==g||e[4]!==x?(y={assets:l,hosting:f,e2e:j,analytics:g,cdn:x},e[0]=l,e[1]=f,e[2]=j,e[3]=g,e[4]=x,e[5]=y):y=e[5];const S=!!i&&a.isPending,b=d&&u.isPending;let k;return e[6]!==y||e[7]!==S||e[8]!==b?(k={presence:y,assetsPending:S,siteAccessPending:b},e[6]=y,e[7]=S,e[8]=b,e[9]=k):k=e[9],k}const Ut=()=>0;function Co(t){const{orgSlug:e,enabled:n=!0,onUpdate:o,onDelete:r,onResync:a}=t,i=H.useRef(o);i.current=o;const m=H.useRef(r);m.current=r;const c=H.useRef(a);c.current=a;const d=H.useRef(null),u=H.useRef(n),p=H.useRef(e);(!d.current||u.current!==n||p.current!==e)&&(u.current=n,p.current=e,d.current=f=>{if(!n||!e)return()=>{};const j=g=>{let x;try{x=JSON.parse(g.data)}catch{return}x.data&&(g.type===Fs?m.current?.(x.data.id):i.current(x.data)),f()};return Is.subscribe(e,j,()=>c.current?.())}),H.useSyncExternalStore(d.current,Ut,Ut)}function ko(t,e){return{queryKey:ue.taskBoardItems(t),refetchInterval:6e4,queryFn:async()=>{const{items:n}=await e.call("TASK_BOARD_ITEM_LIST",{});return{items:n}}}}function No(){const t=Y.c(21),{org:e,locator:n}=je(),o=it();let r;t[0]!==n?(r=ue.taskBoardItems(n),t[0]=n,t[1]=r):r=t[1];const a=r;let i;t[2]!==n||t[3]!==o||t[4]!==a?(i=l=>{o.cancelQueries({queryKey:a}),o.setQueryData(a,f=>f&&{...f,items:f.items.some(j=>j.id===l.id)?f.items.map(j=>j.id===l.id?l:j):[l,...f.items]}),o.invalidateQueries({queryKey:ue.taskBoardActivity(n,l.id)})},t[2]=n,t[3]=o,t[4]=a,t[5]=i):i=t[5];let m,c;t[6]!==o||t[7]!==a?(m=()=>{o.invalidateQueries({queryKey:a})},c=l=>{o.cancelQueries({queryKey:a}),o.setQueryData(a,f=>f&&{...f,items:f.items.filter(j=>j.id!==l)})},t[6]=o,t[7]=a,t[8]=m,t[9]=c):(m=t[8],c=t[9]);let d;t[10]!==e.slug||t[11]!==i||t[12]!==m||t[13]!==c?(d={orgSlug:e.slug,onUpdate:i,onResync:m,onDelete:c},t[10]=e.slug,t[11]=i,t[12]=m,t[13]=c,t[14]=d):d=t[14],Co(d);let u;t[15]!==o||t[16]!==a?(u=l=>{const f=l.subject,j=l.data.status;o.cancelQueries({queryKey:a}),o.setQueryData(a,g=>g&&{...g,items:g.items.map(x=>x.threads.some(y=>y.threadId===f)?{...x,threads:x.threads.map(y=>y.threadId===f?{...y,status:j}:y)}:x)})},t[15]=o,t[16]=a,t[17]=u):u=t[17];let p;t[18]!==e.slug||t[19]!==u?(p={orgSlug:e.slug,onTaskStatus:u},t[18]=e.slug,t[19]=u,t[20]=p):p=t[20],Ps(p)}function gr(){const t=Y.c(9),{locator:e}=je(),n=kt();let o;t[0]!==e||t[1]!==n?(o=ko(e,n),t[0]=e,t[1]=n,t[2]=o):o=t[2];const r=rt(o);No();let a;t[3]!==r.data?.items?(a=r.data?.items??[],t[3]=r.data?.items,t[4]=a):a=t[4];let i;return t[5]!==r.error||t[6]!==r.isLoading||t[7]!==a?(i={items:a,isLoading:r.isLoading,error:r.error},t[5]=r.error,t[6]=r.isLoading,t[7]=a,t[8]=i):i=t[8],i}function hr(){const t=Y.c(70),{org:e,locator:n}=je(),o=kt(),r=it(),a=ae();let i;t[0]!==n?(i=ue.taskBoardItems(n),t[0]=n,t[1]=i):i=t[1];const m=i;let c;t[2]!==r||t[3]!==m?(c=()=>r.invalidateQueries({queryKey:m}),t[2]=r,t[3]=m,t[4]=c):c=t[4];const d=c;let u;t[5]!==o?(u=E=>o.call("TASK_BOARD_ITEM_CREATE",E),t[5]=o,t[6]=u):u=t[6];let p;t[7]!==d||t[8]!==u?(p={mutationFn:u,onSuccess:d},t[7]=d,t[8]=u,t[9]=p):p=t[9];const l=Oe(p);let f;t[10]!==o?(f=E=>o.call("TASK_BOARD_ITEM_UPDATE",E),t[10]=o,t[11]=f):f=t[11];let j;t[12]!==r||t[13]!==m?(j=async E=>{await r.cancelQueries({queryKey:m});const U=r.getQueryData(m);return r.setQueryData(m,M=>M&&{...M,items:M.items.map(Q=>Q.id===E.id?{...Q,...E}:Q)}),{previous:U}},t[12]=r,t[13]=m,t[14]=j):j=t[14];let g;t[15]!==e?(g=(E,U)=>{U.status==="done"&&ie("task_marked_done",{organization_id:e.id,task_board_item_id:U.id})},t[15]=e,t[16]=g):g=t[16];let x;t[17]!==r||t[18]!==m?(x=(E,U,M)=>{M?.previous&&r.setQueryData(m,M.previous)},t[17]=r,t[18]=m,t[19]=x):x=t[19];let y;t[20]!==d||t[21]!==n||t[22]!==r?(y=(E,U,M)=>{d(),r.invalidateQueries({queryKey:ue.taskBoardActivity(n,M.id)})},t[20]=d,t[21]=n,t[22]=r,t[23]=y):y=t[23];let S;t[24]!==f||t[25]!==j||t[26]!==g||t[27]!==x||t[28]!==y?(S={mutationFn:f,onMutate:j,onSuccess:g,onError:x,onSettled:y},t[24]=f,t[25]=j,t[26]=g,t[27]=x,t[28]=y,t[29]=S):S=t[29];const b=Oe(S);let k;t[30]!==o?(k=E=>o.call("TASK_BOARD_ITEM_DELETE",{id:E}),t[30]=o,t[31]=k):k=t[31];let v;t[32]!==d||t[33]!==a?(v=E=>{ce.error(E instanceof Error&&E.message?E.message:a("taskBoard.taskBoard.deleteError")),d()},t[32]=d,t[33]=a,t[34]=v):v=t[34];let C;t[35]!==d||t[36]!==k||t[37]!==v?(C={mutationFn:k,onSuccess:d,onError:v},t[35]=d,t[36]=k,t[37]=v,t[38]=C):C=t[38];const D=Oe(C);let h;t[39]!==o?(h=async E=>{const U=await Promise.allSettled(E.map(M=>o.call("TASK_BOARD_ITEM_DELETE",{id:M})));return{total:E.length,failed:U.filter(_o).length}},t[39]=o,t[40]=h):h=t[40];let _,w;t[41]!==a?(_=E=>{const{total:U,failed:M}=E;M!==0&&ce.error(a("taskBoard.taskBoard.deleteBulkError",{failed:String(M),total:String(U)}))},w=()=>ce.error(a("taskBoard.taskBoard.deleteError")),t[41]=a,t[42]=_,t[43]=w):(_=t[42],w=t[43]);let P;t[44]!==d||t[45]!==h||t[46]!==_||t[47]!==w?(P={mutationFn:h,onSuccess:_,onError:w,onSettled:d},t[44]=d,t[45]=h,t[46]=_,t[47]=w,t[48]=P):P=t[48];const V=Oe(P);let N;t[49]!==o?(N=E=>o.call("TASK_BOARD_ITEM_UPDATE",E),t[49]=o,t[50]=N):N=t[50];let T;t[51]!==d||t[52]!==N?(T={mutationFn:N,onSuccess:d},t[51]=d,t[52]=N,t[53]=T):T=t[53];const F=Oe(T);let $;t[54]!==o?($=E=>o.call("TASK_BOARD_ITEM_RERUN",E),t[54]=o,t[55]=$):$=t[55];let I;t[56]!==d||t[57]!==n||t[58]!==r?(I=(E,U,M)=>{d(),r.invalidateQueries({queryKey:ue.taskBoardActivity(n,M.id)})},t[56]=d,t[57]=n,t[58]=r,t[59]=I):I=t[59];let B;t[60]!==$||t[61]!==I?(B={mutationFn:$,onSettled:I},t[60]=$,t[61]=I,t[62]=B):B=t[62];const R=Oe(B);let G;return t[63]!==l||t[64]!==F||t[65]!==D||t[66]!==V||t[67]!==R||t[68]!==b?(G={create:l,update:b,remove:D,removeMany:V,link:F,rerun:R},t[63]=l,t[64]=F,t[65]=D,t[66]=V,t[67]=R,t[68]=b,t[69]=G):G=t[69],G}function _o(t){return t.status==="rejected"}const So=["ended_after_delivery","superseded"];function wo(t){return!!t&&So.includes(t)}function xr(t){return!(t.action==="status_changed"&&typeof t.data?.retry=="number")}function jr(t){return t.failureKind!=="superseded"}function jn(t){return t.threads.some(e=>e.status==="requires_action")}function yr(t){return t.status==="in_review"&&!t.assigneeId}function br(t){return jn(t)}function vr(t){return t.status==="in_progress"&&jn(t)?"text-warning animate-pulse":bn(t.status).iconClassName}function Cr(t){return t.threads.some(n=>n.status==="in_progress")?"running":t.threads.some(n=>n.status==="failed"&&!wo(n.failureKind))?"failed":null}function kr(t,e,n){const o=t.findIndex(u=>u.id===n),r=e===n?t[o+1]?.id??null:e,a=t.filter(u=>u.id!==n),i=r?a.findIndex(u=>u.id===r):-1,m=i===-1?a.length:i,c=a[m-1],d=a[m];return c&&d?(c.sortOrder+d.sortOrder)/2:c?c.sortOrder+1:d?d.sortOrder-1:0}function Nr(t,e){return Array.from({length:e},(n,o)=>t-(e-1-o)*1e-4)}const Do=["archived"],yn={triage:{labelKey:"taskBoard.config.statusBacklog",icon:$s,iconClassName:"text-muted-foreground"},todo:{labelKey:"taskBoard.config.statusTodo",icon:pn,iconClassName:"text-muted-foreground"},in_progress:{labelKey:"taskBoard.config.statusInProgress",icon:is,iconClassName:"text-primary"},in_review:{labelKey:"taskBoard.config.statusInReview",icon:zs,iconClassName:"text-warning"},approved:{labelKey:"taskBoard.config.statusApproved",icon:os,iconClassName:"text-success"},merged:{labelKey:"taskBoard.config.statusMerged",icon:fs,iconClassName:"text-primary"},post_deploy_validation:{labelKey:"taskBoard.config.statusPostDeployValidation",icon:ss,iconClassName:"text-warning"},done:{labelKey:"taskBoard.config.statusDone",icon:Ks,iconClassName:"text-success"},archived:{labelKey:"taskBoard.config.statusArchived",icon:Vn,iconClassName:"text-muted-foreground"}},To={icon:pn,iconClassName:"text-muted-foreground"},Fo=yn;function bn(t){return Fo[t]??To}function _r(t,e){const n=yn[t];return{label:n?e(n.labelKey):t,visual:bn(t)}}const Sr=["bug","feature","chore","spike","security"],wr={bug:{labelKey:"taskBoard.config.typeBug",icon:Qs,iconClassName:"text-destructive"},feature:{labelKey:"taskBoard.config.typeFeature",icon:ls,iconClassName:"text-success"},chore:{labelKey:"taskBoard.config.typeChore",icon:as,iconClassName:"text-muted-foreground"},spike:{labelKey:"taskBoard.config.typeSpike",icon:rs,iconClassName:"text-yellow-500"},security:{labelKey:"taskBoard.config.typeSecurity",icon:Us,iconClassName:"text-purple-500"}};function bt(t){return Bs.includes(t)}function Dr(t){return Nt.filter(e=>t||!bt(e))}function Tr({deliveryEnabled:t,shownLanes:e,occupied:n}){const o=Nt.filter(i=>t||!bt(i)||n.includes(i)),r=o.filter(i=>Do.includes(i)||!t&&bt(i)),a=r.filter(i=>!e.includes(i));return{lanes:o.filter(i=>!a.includes(i)),hidden:a,hideable:r}}const Qt="lane:";function Ao(t){return Nt.includes(t)}function Fr({overId:t,statusOf:e}){if(t===void 0)return null;const n=String(t),o=n.startsWith(Qt)?n.slice(Qt.length):e(n);return o!==void 0&&Ao(o)?o:null}const Bo=["none","low","medium","high","urgent"],We={none:{labelKey:"taskBoard.config.priorityNone",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50",icon:Vt,iconClassName:"text-muted-foreground/40"},low:{labelKey:"taskBoard.config.priorityLow",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40",icon:ns,iconClassName:"text-muted-foreground"},medium:{labelKey:"taskBoard.config.priorityMedium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500",icon:Vt,iconClassName:"text-blue-500"},high:{labelKey:"taskBoard.config.priorityHigh",flagClassName:"text-warning",dotClassName:"bg-warning",icon:ts,iconClassName:"text-warning"},urgent:{labelKey:"taskBoard.config.priorityUrgent",flagClassName:"text-destructive",dotClassName:"bg-destructive",icon:es,iconClassName:"text-destructive"}};function Ar(t,e=Date.now()){const n=new Date(t).getTime();return Number.isNaN(n)?null:n<e?"overdue":n-e<=Io*864e5?"soon":null}const Io=3;function qt(t){return`color-mix(in oklab, ${t??As} var(--user-color-strength), transparent)`}function vn(t){return t?.projects.length===1?t.projects[0]:void 0}function Po(t){return vn(t)?t.repo:t.projects.length>1?t.projects.map(e=>e.title).join(", "):null}function Cn(t){const e=Y.c(6),{entry:n}=t;let o;e[0]!==n?(o=vn(n),e[0]=n,e[1]=o):o=e[1];const r=o;if(r){let i;return e[2]!==r.icon||e[3]!==r.title?(i=s.jsx(Os,{icon:r.icon,name:r.title}),e[2]=r.icon,e[3]=r.title,e[4]=i):i=e[4],i}let a;return e[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:s.jsx(Ms,{className:"size-3"})}),e[5]=a):a=e[5],a}function Eo(t){const e=Y.c(14),{entry:n}=t;let o;e[0]!==n?(o=Po(n),e[0]=n,e[1]=o):o=e[1];const r=o;let a;e[2]!==n?(a=s.jsx(Cn,{entry:n}),e[2]=n,e[3]=a):a=e[3];let i;e[4]!==n.title?(i=s.jsx("span",{className:"truncate",children:n.title}),e[4]=n.title,e[5]=i):i=e[5];let m;e[6]!==r?(m=r&&s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:r}),e[6]=r,e[7]=m):m=e[7];let c;e[8]!==i||e[9]!==m?(c=s.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[i,m]}),e[8]=i,e[9]=m,e[10]=c):c=e[10];let d;return e[11]!==a||e[12]!==c?(d=s.jsxs(s.Fragment,{children:[a,c]}),e[11]=a,e[12]=c,e[13]=d):d=e[13],d}const at="__no_repo__";function Se(t){return(t??"").trim().toLowerCase()}function Vo(t,e){const n=(t.created_at??"").localeCompare(e.created_at??"");return n!==0?n:t.id.localeCompare(e.id)}function Mo(t){return t.projects.length===1?t.projects[0]?.title??t.repo??t.id:t.repo??t.id}function Br(t,e=[]){const n=new Map,o=new Map,r=[],a=u=>{const p=Se(u),l=n.get(p);if(l)return l;const f={id:p,kind:"repo",repo:u.trim(),title:u.trim(),projects:[]};return n.set(p,f),f};for(const u of t){const p=Ls(u);if(p){const f=a(p);f.projects.push(u),o.set(u.id,f);continue}const l={id:u.id,kind:"project",repo:null,title:u.title,projects:[u]};r.push(l),o.set(u.id,l)}for(const u of e){const p=(u??"").trim();p&&a(p)}for(const u of n.values())u.projects.sort(Vo),u.title=Mo(u);const i=[...n.values()].filter(u=>u.projects.length>0),m=[...n.values()].filter(u=>u.projects.length===0),c=(u,p)=>u.title.localeCompare(p.title),d=[...[...i,...r].sort(c),...m.sort(c)];return{entries:d,byId:new Map(d.map(u=>[u.id,u])),byRepo:n,byProject:o}}function vt(t,e){for(const o of t.threads??[]){const r=o.virtualMcpId?e.byProject.get(o.virtualMcpId):void 0;if(r)return r}const n=Se(t.repo);return(n?e.byRepo.get(n):void 0)??null}function Oo(t,e){const n=vt(t,e);if(!n)return[];if(n.projects.length<=1)return n.projects;for(const o of t.threads??[]){const r=o.virtualMcpId?n.projects.find(a=>a.id===o.virtualMcpId):void 0;if(r)return[r]}return n.projects}function Ir(t,e){const n=Oo(t,e);return n.length===1?n[0]??null:null}function Pt(t,e){return e.byId.get(t)??e.byRepo.get(Se(t))??e.byProject.get(t)}function kn(t,e,n){if(e===null)return!0;if(e===at)return vt(t,n)===null;const o=Pt(e,n);return o?o.repo&&Se(t.repo)===Se(o.repo)?!0:vt(t,n)===o:e.includes("/")?Se(t.repo)===Se(e):!0}function lt(t,e){return t===null?!1:t===at?!0:!!Pt(t,e)||t.includes("/")}function Pr(t,e,n){return e===null?null:kn(t,e,n)?e:null}function Er(t){return t.entries.filter(e=>e.repo!==null&&(e.projects.length===0||e.projects.some(n=>Rs(n).status!=="detached")))}const Ct="__unassigned__",Re="__any__",Nn={assignee:null,priority:null,due:null,tags:[],project:null,search:""};function Lo(t,e){return t.assignee!==null||t.priority!==null||t.due!==null||t.tags.length>0||lt(t.project,e)||t.search.trim()!==""}function Ro(t,e){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)+(t.tags.length>0?1:0)+(lt(t.project,e)?1:0)+(t.search.trim()!==""?1:0)}const $o=864e5;function Ko(t,e){const n=new Date(t),o=new Date(e);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()&&n.getDate()===o.getDate()}function _n(t,e){const n=t.trim();return n===""?!1:e!=null&&ao(n)===e}function zo(t,e){return t.assigneeId===e?!0:t.assigneeId===yt&&t.assignedBy===e}function Vr(t,e,n){const o=e.search.trim().toLowerCase();if(o!==""&&!`${t.title} ${t.description??""}`.toLowerCase().includes(o)&&!_n(o,t.keySeq))return!1;if(e.assignee!==null){if(e.assignee===Ct){if(t.assigneeId!==null)return!1}else if(!zo(t,e.assignee))return!1}if(e.priority!==null&&t.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(t.dueDate)return!1}else{if(!t.dueDate)return!1;const r=new Date(t.dueDate).getTime(),a=Date.now();if(e.due==="overdue"&&r>=a||e.due==="today"&&!Ko(r,a)||e.due==="week"&&(r<a||r>a+7*$o))return!1}if(e.tags.length>0){const r=t.tags.map(a=>a.id);if(!e.tags.some(a=>r.includes(a)))return!1}return!!kn(t,e.project,n)}const Gt={overdue:"taskBoard.taskFilters.dueDateFilterOverdue",today:"taskBoard.taskFilters.dueDateFilterDueToday",week:"taskBoard.taskFilters.dueDateFilterDueThisWeek",none:"taskBoard.taskFilters.dueDateFilterNoDueDate"};function we(t,e=!1){return re("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors focus-visible:border-ring focus-visible:ring-[2px] focus-visible:ring-ring/20",e&&"h-10 w-full justify-start px-3 text-sm",t?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function Uo(t){const e=Y.c(107),{value:n,members:o,onChange:r,block:a}=t,i=ae(),[m,c]=H.useState(!1);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Rt,{size:14,className:"shrink-0"}),e[0]=d):d=e[0];let u=d,p;e[1]!==i?(p=i("taskBoard.taskFilters.assigneeLabel"),e[1]=i,e[2]=p):p=e[2];let l=p;if(n===Ct){let O;e[3]!==i?(O=i("taskBoard.taskFilters.assigneeUnassigned"),e[3]=i,e[4]=O):O=e[4],l=O}else if(n===yt){let O;e[5]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(zt,{size:14}),e[5]=O):O=e[5],u=O;let L;e[6]!==i?(L=i("taskBoard.taskFilters.assigneeSuperAgent"),e[6]=i,e[7]=L):L=e[7],l=L}else if(n){let O,L,oe,z;if(e[8]!==o||e[9]!==n){let De;e[14]!==n?(De=Te=>Te.userId===n,e[14]=n,e[15]=De):De=e[15],L=o.find(De),O=Lt,oe=L?.user?.image??void 0,z=$t(L?.user?.name),e[8]=o,e[9]=n,e[10]=O,e[11]=L,e[12]=oe,e[13]=z}else O=e[10],L=e[11],oe=e[12],z=e[13];let ve;e[16]!==O||e[17]!==oe||e[18]!==z?(ve=s.jsx(O,{url:oe,fallback:z,shape:"circle",size:"2xs"}),e[16]=O,e[17]=oe,e[18]=z,e[19]=ve):ve=e[19],u=ve;let de;e[20]!==L?.user?.name||e[21]!==i?(de=L?.user?.name??i("taskBoard.taskFilters.assigneeMember"),e[20]=L?.user?.name,e[21]=i,e[22]=de):de=e[22],l=de}let f;e[23]!==r?(f=O=>{r(O),c(!1)},e[23]=r,e[24]=f):f=e[24];const j=f,g=n!==null;let x;e[25]!==a||e[26]!==g?(x=we(g,a),e[25]=a,e[26]=g,e[27]=x):x=e[27];const y=x,S=a&&"ml-auto";let b;e[28]!==S?(b=re("shrink-0 opacity-60",S),e[28]=S,e[29]=b):b=e[29];const k=b;let v;e[30]!==l?(v=s.jsx("span",{className:"max-w-[10rem] truncate",children:l}),e[30]=l,e[31]=v):v=e[31];let C;e[32]!==k?(C=s.jsx(ze,{size:12,className:k}),e[32]=k,e[33]=C):C=e[33];let D;e[34]!==u||e[35]!==v||e[36]!==C||e[37]!==y?(D=s.jsx(_t,{asChild:!0,children:s.jsxs("button",{type:"button",className:y,children:[u,v,C]})}),e[34]=u,e[35]=v,e[36]=C,e[37]=y,e[38]=D):D=e[38];let h;e[39]!==i?(h=i("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[39]=i,e[40]=h):h=e[40];let _;e[41]!==i?(_=i("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[41]=i,e[42]=_):_=e[42];let w;e[43]!==h||e[44]!==_?(w=s.jsx(Dt,{placeholder:h,"aria-label":_,className:"h-9"}),e[43]=h,e[44]=_,e[45]=w):w=e[45];let P;e[46]!==i?(P=i("taskBoard.taskFilters.assigneeNoMembersFound"),e[46]=i,e[47]=P):P=e[47];let V;e[48]!==P?(V=s.jsx(Tt,{children:P}),e[48]=P,e[49]=V):V=e[49];let N;e[50]!==i?(N=i("taskBoard.taskFilters.assigneeAnyone"),e[50]=i,e[51]=N):N=e[51];let T;e[52]!==j?(T=()=>j(null),e[52]=j,e[53]=T):T=e[53];let F;e[54]!==i?(F=i("taskBoard.taskFilters.assigneeAnyone"),e[54]=i,e[55]=F):F=e[55];let $;e[56]!==N||e[57]!==T||e[58]!==F?($=s.jsx(Ce,{value:N,onSelect:T,children:F}),e[56]=N,e[57]=T,e[58]=F,e[59]=$):$=e[59];let I;e[60]!==i?(I=i("taskBoard.taskFilters.assigneeUnassigned"),e[60]=i,e[61]=I):I=e[61];let B;e[62]!==j?(B=()=>j(Ct),e[62]=j,e[63]=B):B=e[63];let R;e[64]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(Rt,{size:16,className:"text-muted-foreground"}),e[64]=R):R=e[64];let G;e[65]!==i?(G=i("taskBoard.taskFilters.assigneeUnassigned"),e[65]=i,e[66]=G):G=e[66];let E;e[67]!==I||e[68]!==B||e[69]!==G?(E=s.jsxs(Ce,{value:I,onSelect:B,className:"gap-2",children:[R,G]}),e[67]=I,e[68]=B,e[69]=G,e[70]=E):E=e[70];let U;e[71]!==i?(U=i("taskBoard.taskFilters.assigneeSuperAgent"),e[71]=i,e[72]=U):U=e[72];let M;e[73]!==j?(M=()=>j(yt),e[73]=j,e[74]=M):M=e[74];let Q;e[75]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(zt,{size:16}),e[75]=Q):Q=e[75];let Z;e[76]!==i?(Z=i("taskBoard.taskFilters.assigneeSuperAgent"),e[76]=i,e[77]=Z):Z=e[77];let ee;e[78]!==U||e[79]!==M||e[80]!==Z?(ee=s.jsxs(Ce,{value:U,onSelect:M,className:"gap-2",children:[Q,Z]}),e[78]=U,e[79]=M,e[80]=Z,e[81]=ee):ee=e[81];let K;e[82]!==$||e[83]!==E||e[84]!==ee?(K=s.jsxs(Le,{children:[$,E,ee]}),e[82]=$,e[83]=E,e[84]=ee,e[85]=K):K=e[85];let ne;e[86]!==i?(ne=i("taskBoard.taskFilters.assigneeGroupMembers"),e[86]=i,e[87]=ne):ne=e[87];let W;if(e[88]!==o||e[89]!==j){let O;e[91]!==j?(O=L=>s.jsxs(Ce,{value:L.user?.name??L.userId,onSelect:()=>j(L.userId),className:"gap-2",children:[s.jsx(Lt,{url:L.user?.image??void 0,fallback:$t(L.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:L.user?.name??L.userId})]},L.userId),e[91]=j,e[92]=O):O=e[92],W=o.map(O),e[88]=o,e[89]=j,e[90]=W}else W=e[90];let X;e[93]!==ne||e[94]!==W?(X=s.jsx(Le,{heading:ne,children:W}),e[93]=ne,e[94]=W,e[95]=X):X=e[95];let J;e[96]!==V||e[97]!==K||e[98]!==X?(J=s.jsxs(Ft,{children:[V,K,X]}),e[96]=V,e[97]=K,e[98]=X,e[99]=J):J=e[99];let te;e[100]!==w||e[101]!==J?(te=s.jsx(St,{align:"start",className:"w-56 p-0",children:s.jsxs(At,{children:[w,J]})}),e[100]=w,e[101]=J,e[102]=te):te=e[102];let se;return e[103]!==m||e[104]!==D||e[105]!==te?(se=s.jsxs(wt,{open:m,onOpenChange:c,children:[D,te]}),e[103]=m,e[104]=D,e[105]=te,e[106]=se):se=e[106],se}function Qo(t){const e=Y.c(33),{value:n,onChange:o,block:r}=t,a=ae(),i=n!==null;let m;e[0]!==r||e[1]!==i?(m=we(i,r),e[0]=r,e[1]=i,e[2]=m):m=e[2];const c=m,d=r&&"ml-auto";let u;e[3]!==d?(u=re("shrink-0 opacity-60",d),e[3]=d,e[4]=u):u=e[4];const p=u;let l;e[5]!==n?(l=n?s.jsx("span",{className:re("size-2 shrink-0 rounded-full",We[n].dotClassName)}):s.jsx(Es,{size:14,className:"shrink-0"}),e[5]=n,e[6]=l):l=e[6];let f;e[7]!==a||e[8]!==n?(f=a(n?We[n].labelKey:"taskBoard.taskFilters.priorityLabel"),e[7]=a,e[8]=n,e[9]=f):f=e[9];let j;e[10]!==p?(j=s.jsx(ze,{size:12,className:p}),e[10]=p,e[11]=j):j=e[11];let g;e[12]!==l||e[13]!==f||e[14]!==j||e[15]!==c?(g=s.jsx(dn,{asChild:!0,children:s.jsxs("button",{type:"button",className:c,children:[l,f,j]})}),e[12]=l,e[13]=f,e[14]=j,e[15]=c,e[16]=g):g=e[16];const x=n??Re;let y;e[17]!==o?(y=D=>o(D===Re?null:D),e[17]=o,e[18]=y):y=e[18];let S;e[19]!==a?(S=a("taskBoard.taskFilters.priorityAnyPriority"),e[19]=a,e[20]=S):S=e[20];let b;e[21]!==S?(b=s.jsx(ot,{value:Re,children:S}),e[21]=S,e[22]=b):b=e[22];let k;e[23]!==a?(k=Bo.map(D=>s.jsxs(ot,{value:D,className:"gap-2",children:[s.jsx("span",{className:re("size-2 rounded-full",We[D].dotClassName)}),a(We[D].labelKey)]},D)),e[23]=a,e[24]=k):k=e[24];let v;e[25]!==y||e[26]!==b||e[27]!==k||e[28]!==x?(v=s.jsx(un,{align:"start",className:"w-40",children:s.jsxs(fn,{value:x,onValueChange:y,children:[b,k]})}),e[25]=y,e[26]=b,e[27]=k,e[28]=x,e[29]=v):v=e[29];let C;return e[30]!==v||e[31]!==g?(C=s.jsxs(mn,{children:[g,v]}),e[30]=v,e[31]=g,e[32]=C):C=e[32],C}function qo(t){const e=Y.c(35),{value:n,onChange:o,block:r}=t,a=ae();let i;e[0]!==a||e[1]!==n?(i=n?a(Gt[n]):void 0,e[0]=a,e[1]=n,e[2]=i):i=e[2];const m=i,c=n!==null;let d;e[3]!==r||e[4]!==c?(d=we(c,r),e[3]=r,e[4]=c,e[5]=d):d=e[5];const u=d,p=r&&"ml-auto";let l;e[6]!==p?(l=re("shrink-0 opacity-60",p),e[6]=p,e[7]=l):l=e[7];const f=l;let j;e[8]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(xt,{size:14,className:"shrink-0"}),e[8]=j):j=e[8];let g;e[9]!==m||e[10]!==a?(g=m??a("taskBoard.taskFilters.dueDateLabel"),e[9]=m,e[10]=a,e[11]=g):g=e[11];let x;e[12]!==f?(x=s.jsx(ze,{size:12,className:f}),e[12]=f,e[13]=x):x=e[13];let y;e[14]!==g||e[15]!==x||e[16]!==u?(y=s.jsx(dn,{asChild:!0,children:s.jsxs("button",{type:"button",className:u,children:[j,g,x]})}),e[14]=g,e[15]=x,e[16]=u,e[17]=y):y=e[17];const S=n??Re;let b;e[18]!==o?(b=w=>o(w===Re?null:w),e[18]=o,e[19]=b):b=e[19];let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(xt,{size:16,className:"text-muted-foreground"}),e[20]=k):k=e[20];let v;e[21]!==a?(v=a("taskBoard.taskFilters.dueDateAnyTime"),e[21]=a,e[22]=v):v=e[22];let C;e[23]!==v?(C=s.jsxs(ot,{value:Re,className:"gap-2",children:[k,v]}),e[23]=v,e[24]=C):C=e[24];let D;e[25]!==a?(D=Object.entries(Gt).map(w=>{const[P,V]=w,N=P==="overdue";return s.jsxs(ot,{value:P,className:re("gap-2",N&&"text-destructive"),children:[s.jsx(xt,{size:16,className:re("shrink-0",N?"text-destructive":"text-muted-foreground")}),a(V)]},P)}),e[25]=a,e[26]=D):D=e[26];let h;e[27]!==S||e[28]!==b||e[29]!==C||e[30]!==D?(h=s.jsx(un,{align:"start",className:"w-44",children:s.jsxs(fn,{value:S,onValueChange:b,children:[C,D]})}),e[27]=S,e[28]=b,e[29]=C,e[30]=D,e[31]=h):h=e[31];let _;return e[32]!==h||e[33]!==y?(_=s.jsxs(mn,{children:[y,h]}),e[32]=h,e[33]=y,e[34]=_):_=e[34],_}function Go(t){const e=Y.c(56),{value:n,tags:o,onChange:r,block:a}=t,i=ae(),[m,c]=H.useState(!1);let d;e[0]!==r||e[1]!==n?(d=I=>r(n.includes(I)?n.filter(B=>B!==I):[...n,I]),e[0]=r,e[1]=n,e[2]=d):d=e[2];const u=d;let p;e[3]!==i||e[4]!==o||e[5]!==n[0]||e[6]!==n.length?(p=n.length===0?i("taskBoard.taskFilters.tagsLabel"):n.length===1?o.find(I=>I.id===n[0])?.name??i("taskBoard.taskFilters.tagsLabel"):i("taskBoard.taskFilters.tagsSelectedCount",{count:n.length}),e[3]=i,e[4]=o,e[5]=n[0],e[6]=n.length,e[7]=p):p=e[7];const l=p,f=n.length>0;let j;e[8]!==a||e[9]!==f?(j=we(f,a),e[8]=a,e[9]=f,e[10]=j):j=e[10];const g=j,x=a&&"ml-auto";let y;e[11]!==x?(y=re("shrink-0 opacity-60",x),e[11]=x,e[12]=y):y=e[12];const S=y;let b;e[13]!==o||e[14]!==n[0]||e[15]!==n.length?(b=n.length===1?s.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:qt(o.find(I=>I.id===n[0])?.color)}}):s.jsx(cs,{size:14,className:"shrink-0"}),e[13]=o,e[14]=n[0],e[15]=n.length,e[16]=b):b=e[16];let k;e[17]!==l?(k=s.jsx("span",{className:"max-w-[10rem] truncate",children:l}),e[17]=l,e[18]=k):k=e[18];let v;e[19]!==S?(v=s.jsx(ze,{size:12,className:S}),e[19]=S,e[20]=v):v=e[20];let C;e[21]!==b||e[22]!==k||e[23]!==v||e[24]!==g?(C=s.jsx(_t,{asChild:!0,children:s.jsxs("button",{type:"button",className:g,children:[b,k,v]})}),e[21]=b,e[22]=k,e[23]=v,e[24]=g,e[25]=C):C=e[25];let D;e[26]!==i?(D=i("taskBoard.taskFilters.tagsFilterPlaceholder"),e[26]=i,e[27]=D):D=e[27];let h;e[28]!==i?(h=i("taskBoard.taskFilters.tagsFilterPlaceholder"),e[28]=i,e[29]=h):h=e[29];let _;e[30]!==D||e[31]!==h?(_=s.jsx(Dt,{placeholder:D,"aria-label":h,className:"h-9"}),e[30]=D,e[31]=h,e[32]=_):_=e[32];let w;e[33]!==i?(w=i("taskBoard.taskFilters.tagsNoTagsFound"),e[33]=i,e[34]=w):w=e[34];let P;e[35]!==w?(P=s.jsx(Tt,{children:w}),e[35]=w,e[36]=P):P=e[36];let V;if(e[37]!==o||e[38]!==u||e[39]!==n){let I;e[41]!==u||e[42]!==n?(I=B=>s.jsxs(Ce,{value:B.name,onSelect:()=>u(B.id),className:"gap-2",children:[s.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:qt(B.color)}}),s.jsx("span",{className:"flex-1 truncate",children:B.name}),n.includes(B.id)&&s.jsx(nt,{size:14,className:"shrink-0 text-foreground"})]},B.id),e[41]=u,e[42]=n,e[43]=I):I=e[43],V=o.map(I),e[37]=o,e[38]=u,e[39]=n,e[40]=V}else V=e[40];let N;e[44]!==V?(N=s.jsx(Le,{children:V}),e[44]=V,e[45]=N):N=e[45];let T;e[46]!==P||e[47]!==N?(T=s.jsxs(Ft,{children:[P,N]}),e[46]=P,e[47]=N,e[48]=T):T=e[48];let F;e[49]!==_||e[50]!==T?(F=s.jsx(St,{align:"start",className:"w-56 p-0",children:s.jsxs(At,{children:[_,T]})}),e[49]=_,e[50]=T,e[51]=F):F=e[51];let $;return e[52]!==m||e[53]!==C||e[54]!==F?($=s.jsxs(wt,{open:m,onOpenChange:c,children:[C,F]}),e[52]=m,e[53]=C,e[54]=F,e[55]=$):$=e[55],$}function Ht(t){const e=Y.c(11),{entry:n,selected:o,onSelect:r}=t,a=n.id,i=n.title;let m;e[0]!==n.projects?(m=n.projects.map(Ho).join(" "),e[0]=n.projects,e[1]=m):m=e[1];const c=`${a} ${i} ${n.repo??""} ${m}`;let d;e[2]!==n?(d=s.jsx(Eo,{entry:n}),e[2]=n,e[3]=d):d=e[3];let u;e[4]!==o?(u=o&&s.jsx(nt,{size:14,className:"shrink-0 text-foreground"}),e[4]=o,e[5]=u):u=e[5];let p;return e[6]!==r||e[7]!==c||e[8]!==d||e[9]!==u?(p=s.jsxs(Ce,{value:c,onSelect:r,className:"gap-2",children:[d,u]}),e[6]=r,e[7]=c,e[8]=d,e[9]=u,e[10]=p):p=e[10],p}function Ho(t){return t.title}function Yo(t,e,n,o){return t===null||!n?o("taskBoard.taskFilters.projectLabel"):t===at?o("taskBoard.taskFilters.projectNone"):e?.title??t}function Wo(t){const e=Y.c(90),{value:n,index:o,onChange:r,block:a}=t,i=ae(),[m,c]=H.useState(!1);let d,u,p,l,f,j,g,x,y,S,b,k,v,C;if(e[0]!==a||e[1]!==o||e[2]!==r||e[3]!==m||e[4]!==i||e[5]!==n){const P=n===null?void 0:Pt(n,o),V=lt(n,o),N=Yo(n,P,V,i);let T;e[20]!==r?(T=z=>{r(z),c(!1)},e[20]=r,e[21]=T):T=e[21];const F=T,$=o.entries.filter(Jo),I=o.entries.filter(Xo),B=we(V,a),R=a&&"ml-auto";let G;e[22]!==R?(G=re("shrink-0 opacity-60",R),e[22]=R,e[23]=G):G=e[23];const E=G;l=wt,v=m,C=c;const U=V?P:void 0;let M;e[24]!==U?(M=s.jsx(Cn,{entry:U}),e[24]=U,e[25]=M):M=e[25];let Q;e[26]!==N?(Q=s.jsx("span",{className:"max-w-[12rem] truncate",children:N}),e[26]=N,e[27]=Q):Q=e[27];let Z;e[28]!==E?(Z=s.jsx(ze,{size:12,className:E}),e[28]=E,e[29]=Z):Z=e[29],e[30]!==M||e[31]!==Q||e[32]!==Z||e[33]!==B?(j=s.jsx(_t,{asChild:!0,children:s.jsxs("button",{type:"button",className:B,children:[M,Q,Z]})}),e[30]=M,e[31]=Q,e[32]=Z,e[33]=B,e[34]=j):j=e[34],p=St,b="start",k="w-72 p-0",u=At;let ee;e[35]!==i?(ee=i("taskBoard.taskFilters.projectFilterPlaceholder"),e[35]=i,e[36]=ee):ee=e[36];let K;e[37]!==i?(K=i("taskBoard.taskFilters.projectFilterPlaceholder"),e[37]=i,e[38]=K):K=e[38],e[39]!==ee||e[40]!==K?(S=s.jsx(Dt,{placeholder:ee,"aria-label":K,className:"h-9"}),e[39]=ee,e[40]=K,e[41]=S):S=e[41],d=Ft;let ne;e[42]!==i?(ne=i("taskBoard.taskFilters.projectNoneFound"),e[42]=i,e[43]=ne):ne=e[43],e[44]!==ne?(f=s.jsx(Tt,{children:ne}),e[44]=ne,e[45]=f):f=e[45];let W;e[46]!==i?(W=i("taskBoard.taskFilters.projectAny"),e[46]=i,e[47]=W):W=e[47];let X;e[48]!==F?(X=()=>F(null),e[48]=F,e[49]=X):X=e[49];let J;e[50]!==i?(J=i("taskBoard.taskFilters.projectAny"),e[50]=i,e[51]=J):J=e[51];let te;e[52]!==W||e[53]!==X||e[54]!==J?(te=s.jsx(Ce,{value:W,onSelect:X,children:J}),e[52]=W,e[53]=X,e[54]=J,e[55]=te):te=e[55];let se;e[56]!==i?(se=i("taskBoard.taskFilters.projectNone"),e[56]=i,e[57]=se):se=e[57];let O;e[58]!==F?(O=()=>F(at),e[58]=F,e[59]=O):O=e[59];let L;e[60]!==i?(L=i("taskBoard.taskFilters.projectNone"),e[60]=i,e[61]=L):L=e[61];let oe;e[62]!==se||e[63]!==O||e[64]!==L?(oe=s.jsx(Ce,{value:se,onSelect:O,children:L}),e[62]=se,e[63]=O,e[64]=L,e[65]=oe):oe=e[65],e[66]!==te||e[67]!==oe?(g=s.jsxs(Le,{children:[te,oe]}),e[66]=te,e[67]=oe,e[68]=g):g=e[68],x=$.length>0&&s.jsx(Le,{heading:i("taskBoard.taskFilters.projectGroupProjects"),children:$.map(z=>s.jsx(Ht,{entry:z,selected:P===z,onSelect:()=>F(z.id)},z.id))}),y=I.length>0&&s.jsx(Le,{heading:i("taskBoard.taskFilters.projectGroupRepos"),children:I.map(z=>s.jsx(Ht,{entry:z,selected:P===z,onSelect:()=>F(z.id)},z.id))}),e[0]=a,e[1]=o,e[2]=r,e[3]=m,e[4]=i,e[5]=n,e[6]=d,e[7]=u,e[8]=p,e[9]=l,e[10]=f,e[11]=j,e[12]=g,e[13]=x,e[14]=y,e[15]=S,e[16]=b,e[17]=k,e[18]=v,e[19]=C}else d=e[6],u=e[7],p=e[8],l=e[9],f=e[10],j=e[11],g=e[12],x=e[13],y=e[14],S=e[15],b=e[16],k=e[17],v=e[18],C=e[19];let D;e[69]!==d||e[70]!==f||e[71]!==g||e[72]!==x||e[73]!==y?(D=s.jsxs(d,{children:[f,g,x,y]}),e[69]=d,e[70]=f,e[71]=g,e[72]=x,e[73]=y,e[74]=D):D=e[74];let h;e[75]!==u||e[76]!==D||e[77]!==S?(h=s.jsxs(u,{children:[S,D]}),e[75]=u,e[76]=D,e[77]=S,e[78]=h):h=e[78];let _;e[79]!==p||e[80]!==h||e[81]!==b||e[82]!==k?(_=s.jsx(p,{align:b,className:k,children:h}),e[79]=p,e[80]=h,e[81]=b,e[82]=k,e[83]=_):_=e[83];let w;return e[84]!==l||e[85]!==j||e[86]!==_||e[87]!==v||e[88]!==C?(w=s.jsxs(l,{open:v,onOpenChange:C,children:[j,_]}),e[84]=l,e[85]=j,e[86]=_,e[87]=v,e[88]=C,e[89]=w):w=e[89],w}function Xo(t){return t.projects.length===0}function Jo(t){return t.projects.length>0}function Zo(t){const e=Y.c(25),{value:n,onChange:o,block:r}=t,a=ae(),[i,m]=H.useState(n!==""),[c,d]=H.useState(!1),[u,p]=H.useState(n);n!==u&&(p(n),n===""&&!c&&m(!1));const l=i||r,f=l?"w-32 sm:w-44":"w-8 px-0 justify-center",j=r&&"h-10 w-full px-3 text-sm sm:w-full";let g;e[0]!==f||e[1]!==j?(g=re("inline-flex h-8 shrink-0 items-center gap-1.5 overflow-hidden rounded-lg border border-border px-2.5 text-xs text-foreground transition-all duration-200 ease-out",f,j),e[0]=f,e[1]=j,e[2]=g):g=e[2];let x;e[3]!==a?(x=a("taskBoard.taskFilters.searchLabel"),e[3]=a,e[4]=x):x=e[4];let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=()=>m(!0),e[5]=y):y=e[5];let S;e[6]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ds,{size:14}),e[6]=S):S=e[6];let b;e[7]!==x?(b=s.jsx("button",{type:"button","aria-label":x,onClick:y,className:"shrink-0 text-muted-foreground transition-colors hover:text-foreground",children:S}),e[7]=x,e[8]=b):b=e[8];let k;e[9]!==r||e[10]!==l||e[11]!==o||e[12]!==a||e[13]!==n?(k=l&&s.jsx("input",{autoFocus:!r,value:n,onChange:D=>o(D.target.value),onFocus:()=>d(!0),onBlur:()=>{d(!1),n===""&&m(!1)},placeholder:a("taskBoard.taskFilters.searchPlaceholder"),"aria-label":a("taskBoard.taskFilters.searchPlaceholder"),className:"w-full min-w-0 bg-transparent text-xs outline-none placeholder:text-muted-foreground"}),e[9]=r,e[10]=l,e[11]=o,e[12]=a,e[13]=n,e[14]=k):k=e[14];let v;e[15]!==r||e[16]!==o||e[17]!==a||e[18]!==n?(v=n!==""&&s.jsx("button",{type:"button","aria-label":a("taskBoard.taskFilters.searchClearLabel"),onMouseDown:ei,onClick:()=>{o(""),r||m(!1)},className:"shrink-0 text-muted-foreground hover:text-foreground",children:s.jsx(Mn,{size:14})}),e[15]=r,e[16]=o,e[17]=a,e[18]=n,e[19]=v):v=e[19];let C;return e[20]!==g||e[21]!==b||e[22]!==k||e[23]!==v?(C=s.jsxs("div",{className:g,children:[b,k,v]}),e[20]=g,e[21]=b,e[22]=k,e[23]=v,e[24]=C):C=e[24],C}function ei(t){return t.preventDefault()}function ti(t){const e=Y.c(20),{block:n,onClick:o}=t,r=ae();let a;e[0]!==r?(a=r("taskBoard.taskFilters.boardSettingsLabel"),e[0]=r,e[1]=a):a=e[1];const i=a;let m;e[2]!==n?(m=re(we(!1,n),n?"h-10 w-full":"w-8 justify-center px-0"),e[2]=n,e[3]=m):m=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Vs,{size:14,className:"shrink-0"}),e[4]=c):c=e[4];let d;e[5]!==n||e[6]!==i?(d=n&&s.jsx("span",{children:i}),e[5]=n,e[6]=i,e[7]=d):d=e[7];let u;e[8]!==i||e[9]!==o||e[10]!==m||e[11]!==d?(u=s.jsxs("button",{type:"button",onClick:o,"aria-label":i,className:m,children:[c,d]}),e[8]=i,e[9]=o,e[10]=m,e[11]=d,e[12]=u):u=e[12];const p=u;if(n)return p;let l;e[13]!==p?(l=s.jsx(Ze,{asChild:!0,children:p}),e[13]=p,e[14]=l):l=e[14];let f;e[15]!==i?(f=s.jsx(et,{side:"top",children:i}),e[15]=i,e[16]=f):f=e[16];let j;return e[17]!==l||e[18]!==f?(j=s.jsxs(Je,{children:[l,f]}),e[17]=l,e[18]=f,e[19]=j):j=e[19],j}function Sn(t){const e=Y.c(53),{filters:n,members:o,tags:r,index:a,onChange:i,onOpenBoardSettings:m,block:c}=t;let d;e[0]!==n||e[1]!==i?(d=C=>i({...n,search:C}),e[0]=n,e[1]=i,e[2]=d):d=e[2];let u;e[3]!==c||e[4]!==n.search||e[5]!==d?(u=s.jsx(Zo,{block:c,value:n.search,onChange:d}),e[3]=c,e[4]=n.search,e[5]=d,e[6]=u):u=e[6];let p;e[7]!==n||e[8]!==i?(p=C=>i({...n,assignee:C}),e[7]=n,e[8]=i,e[9]=p):p=e[9];let l;e[10]!==c||e[11]!==n.assignee||e[12]!==o||e[13]!==p?(l=s.jsx(Uo,{block:c,value:n.assignee,members:o,onChange:p}),e[10]=c,e[11]=n.assignee,e[12]=o,e[13]=p,e[14]=l):l=e[14];let f;e[15]!==n||e[16]!==i?(f=C=>i({...n,priority:C}),e[15]=n,e[16]=i,e[17]=f):f=e[17];let j;e[18]!==c||e[19]!==n.priority||e[20]!==f?(j=s.jsx(Qo,{block:c,value:n.priority,onChange:f}),e[18]=c,e[19]=n.priority,e[20]=f,e[21]=j):j=e[21];let g;e[22]!==n||e[23]!==i?(g=C=>i({...n,due:C}),e[22]=n,e[23]=i,e[24]=g):g=e[24];let x;e[25]!==c||e[26]!==n.due||e[27]!==g?(x=s.jsx(qo,{block:c,value:n.due,onChange:g}),e[25]=c,e[26]=n.due,e[27]=g,e[28]=x):x=e[28];let y;e[29]!==n||e[30]!==i?(y=C=>i({...n,tags:C}),e[29]=n,e[30]=i,e[31]=y):y=e[31];let S;e[32]!==c||e[33]!==n.tags||e[34]!==y||e[35]!==r?(S=s.jsx(Go,{block:c,value:n.tags,tags:r,onChange:y}),e[32]=c,e[33]=n.tags,e[34]=y,e[35]=r,e[36]=S):S=e[36];let b;e[37]!==c||e[38]!==n||e[39]!==a||e[40]!==i?(b=(a.entries.length>0||lt(n.project,a))&&s.jsx(Wo,{block:c,value:n.project,index:a,onChange:C=>i({...n,project:C})}),e[37]=c,e[38]=n,e[39]=a,e[40]=i,e[41]=b):b=e[41];let k;e[42]!==c||e[43]!==m?(k=s.jsx(ti,{block:c,onClick:m}),e[42]=c,e[43]=m,e[44]=k):k=e[44];let v;return e[45]!==S||e[46]!==b||e[47]!==k||e[48]!==u||e[49]!==l||e[50]!==j||e[51]!==x?(v=s.jsxs(s.Fragment,{children:[u,l,j,x,S,b,k]}),e[45]=S,e[46]=b,e[47]=k,e[48]=u,e[49]=l,e[50]=j,e[51]=x,e[52]=v):v=e[52],v}function Mr(t){const e=Y.c(16),{filters:n,members:o,tags:r,index:a,onChange:i,onOpenBoardSettings:m}=t,c=ae();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(cn,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=d):d=e[0];let u;e[1]!==n||e[2]!==a||e[3]!==o||e[4]!==i||e[5]!==m||e[6]!==r?(u=s.jsx(Sn,{filters:n,members:o,tags:r,index:a,onChange:i,onOpenBoardSettings:m}),e[1]=n,e[2]=a,e[3]=o,e[4]=i,e[5]=m,e[6]=r,e[7]=u):u=e[7];let p;e[8]!==n||e[9]!==a||e[10]!==i||e[11]!==c?(p=Lo(n,a)&&s.jsx("button",{type:"button",onClick:()=>i(Nn),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:c("taskBoard.taskFilters.clearButton")}),e[8]=n,e[9]=a,e[10]=i,e[11]=c,e[12]=p):p=e[12];let l;return e[13]!==u||e[14]!==p?(l=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d,u,p]}),e[13]=u,e[14]=p,e[15]=l):l=e[15],l}function Or(t){const e=Y.c(41),{filters:n,members:o,tags:r,index:a,onChange:i,onOpenBoardSettings:m}=t,c=ae(),[d,u]=H.useState(!1),p=Ro(n,a),l=p>0;let f;e[0]!==l?(f=we(l),e[0]=l,e[1]=f):f=e[1];const j=f;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(cn,{size:14,className:"shrink-0"}),e[2]=g):g=e[2];let x;e[3]!==c?(x=c("taskBoard.taskFilters.filterDrawerButtonLabel"),e[3]=c,e[4]=x):x=e[4];let y;e[5]!==p?(y=p>0&&s.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:p}),e[5]=p,e[6]=y):y=e[6];let S;e[7]!==x||e[8]!==y||e[9]!==j?(S=s.jsx(Hn,{asChild:!0,children:s.jsxs("button",{type:"button",className:j,children:[g,x,y]})}),e[7]=x,e[8]=y,e[9]=j,e[10]=S):S=e[10];let b;e[11]!==c?(b=c("taskBoard.taskFilters.filterDrawerTitle"),e[11]=c,e[12]=b):b=e[12];let k;e[13]!==b?(k=s.jsx(on,{className:"px-4 pt-4 text-base font-medium text-foreground",children:b}),e[13]=b,e[14]=k):k=e[14];let v;e[15]!==n||e[16]!==a||e[17]!==o||e[18]!==i||e[19]!==m||e[20]!==r?(v=s.jsx("div",{className:"flex flex-col gap-2 p-4",children:s.jsx(Sn,{block:!0,filters:n,members:o,tags:r,index:a,onChange:i,onOpenBoardSettings:m})}),e[15]=n,e[16]=a,e[17]=o,e[18]=i,e[19]=m,e[20]=r,e[21]=v):v=e[21];let C;e[22]!==p||e[23]!==i||e[24]!==c?(C=p>0&&s.jsx(be,{variant:"outline",className:"flex-1",onClick:()=>i(Nn),children:c("taskBoard.taskFilters.clearAllButton")}),e[22]=p,e[23]=i,e[24]=c,e[25]=C):C=e[25];let D;e[26]!==c?(D=c("taskBoard.taskFilters.doneButton"),e[26]=c,e[27]=D):D=e[27];let h;e[28]!==D?(h=s.jsx(rn,{asChild:!0,children:s.jsx(be,{className:"flex-1",children:D})}),e[28]=D,e[29]=h):h=e[29];let _;e[30]!==C||e[31]!==h?(_=s.jsxs(an,{className:"flex-row gap-2",children:[C,h]}),e[30]=C,e[31]=h,e[32]=_):_=e[32];let w;e[33]!==_||e[34]!==k||e[35]!==v?(w=s.jsxs(sn,{className:"p-0",children:[k,v,_]}),e[33]=_,e[34]=k,e[35]=v,e[36]=w):w=e[36];let P;return e[37]!==d||e[38]!==w||e[39]!==S?(P=s.jsxs(nn,{open:d,onOpenChange:u,direction:"bottom",children:[S,w]}),e[37]=d,e[38]=w,e[39]=S,e[40]=P):P=e[40],P}function Lr(t,e){return io(t,e.keySeq)??e.id}function Rr(t,e){const n=e?.trim();if(n)return t.find(o=>_n(n,o.keySeq))??t.find(o=>o.id===n)}export{gr as $,Ji as A,lr as B,hn as C,Bt as D,No as E,vt as F,Ir as G,_r as H,We as I,Pt as J,hr as K,Bo as L,Sr as M,qt as N,Er as O,co as P,vr as Q,bn as R,zt as S,wr as T,Dr as U,Cn as V,Eo as W,xr as X,jr as Y,wo as Z,yn as _,fr as a,Rr as a0,Or as a1,Mr as a2,Nr as a3,Tr as a4,Nn as a5,Cr as a6,br as a7,Qt as a8,kr as a9,Fr as aa,Vr as ab,Do as ac,Pr as ad,Ar as ae,vo as af,pr as b,Br as c,Oo as d,gn as e,Lr as f,yr as g,ko as h,jn as i,er as j,nr as k,rr as l,po as m,mr as n,ir as o,mo as p,ar as q,tr as r,sr as s,io as t,Zi as u,or as v,ho as w,ur as x,cr as y,dr as z};
|