decocms 4.76.16 → 4.76.17
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-Bp2LwI99.js → AlertCircle-BbCAmPWx.js} +1 -1
- package/dist/client/assets/{AreaChart-CuAAf_-8.js → AreaChart-CzSE0qU2.js} +1 -1
- package/dist/client/assets/{ArrowUp-CLsZNJbY.js → ArrowUp-BSi8m_NI.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-Cbp73kCi.js → ArrowUpRight-CTTNoYe_.js} +1 -1
- package/dist/client/assets/{Check-YatM3ypN.js → Check-6KpG9Poi.js} +1 -1
- package/dist/client/assets/{CheckCircle-CbenBLe1.js → CheckCircle-XsQMSB0T.js} +1 -1
- package/dist/client/assets/{ChevronDown-CrkJkNxr.js → ChevronDown-Bh19zKPC.js} +1 -1
- package/dist/client/assets/{ChevronRight-C38LFGMe.js → ChevronRight-C7wVU6xm.js} +1 -1
- package/dist/client/assets/{ChevronUp-WwDl06Df.js → ChevronUp-D01P3dTH.js} +1 -1
- package/dist/client/assets/{Circle-D2HVDzs8.js → Circle-ymdYpR9F.js} +1 -1
- package/dist/client/assets/{Copy01-gCYa3mdW.js → Copy01-d1nLCuGq.js} +1 -1
- package/dist/client/assets/{DotsVertical-QiKHYyqO.js → DotsVertical-DMfZlsta.js} +1 -1
- package/dist/client/assets/{Eye-DCpIMsPs.js → Eye-CiT8XwGY.js} +1 -1
- package/dist/client/assets/{FilterLines-DPOJJMN1.js → FilterLines-CqSAYPc5.js} +1 -1
- package/dist/client/assets/{Flag01-Bg2bng4r.js → Flag01-Cq61q-5f.js} +1 -1
- package/dist/client/assets/{Globe01-DOFbu2Qo.js → Globe01-m_iWwP7h.js} +1 -1
- package/dist/client/assets/{Globe04-cLVzU0YN.js → Globe04-vmdTamXy.js} +1 -1
- package/dist/client/assets/{HardDrive-RhcdL5bl.js → HardDrive-BrmDvJkR.js} +1 -1
- package/dist/client/assets/{Key01-H9edXzTn.js → Key01-tPAaQviB.js} +1 -1
- package/dist/client/assets/{LayoutLeft-bHEF4l1E.js → LayoutLeft-Bnwt_58u.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BAop_7Oj.js → LinkExternal01-CG3Pw9Hz.js} +1 -1
- package/dist/client/assets/{List-Df7qea0m.js → List-Cpbq3xEO.js} +1 -1
- package/dist/client/assets/{Monitor01-DcIJiFSR.js → Monitor01-CTaiufH5.js} +1 -1
- package/dist/client/assets/{Package-DBU8VrJY.js → Package-BXwBjJnV.js} +1 -1
- package/dist/client/assets/{Palette-C3fbsuyi.js → Palette-CK7RPv71.js} +1 -1
- package/dist/client/assets/{Play-CYPc6jsx.js → Play-DkYVecuj.js} +1 -1
- package/dist/client/assets/{Plus-Oa-KgIil.js → Plus-CJaBsq2g.js} +1 -1
- package/dist/client/assets/{SearchLg-DXPYdIWk.js → SearchLg-BAORD1IJ.js} +1 -1
- package/dist/client/assets/{SearchMd-CKOCYIFv.js → SearchMd-DtA-slqb.js} +1 -1
- package/dist/client/assets/{Settings02-DJMZcdrX.js → Settings02-Da9OPDRU.js} +1 -1
- package/dist/client/assets/{Shield01-D3HBRpJv.js → Shield01-Bf4huk7h.js} +1 -1
- package/dist/client/assets/{Star01-DAWLHdBl.js → Star01-BrJPLmN9.js} +1 -1
- package/dist/client/assets/{Stars01-CfVSNbuD.js → Stars01-Ce8lvBwj.js} +1 -1
- package/dist/client/assets/{Stars02-Co9cDjGV.js → Stars02-DmdPW83P.js} +1 -1
- package/dist/client/assets/{Sun-BZYgSH7z.js → Sun-CNNIP8Ck.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-bQkLQ5_s.js → SwitchHorizontal01-DZyU5soe.js} +1 -1
- package/dist/client/assets/{Tool01--gHZArYV.js → Tool01-Ctjyodd_.js} +1 -1
- package/dist/client/assets/{Tool02-y9_sdFSA.js → Tool02-S9p0DD-w.js} +1 -1
- package/dist/client/assets/{Trash01-DdG6Jy2W.js → Trash01-D2i1ZJ_v.js} +1 -1
- package/dist/client/assets/{TrendUp01-CShwiTcv.js → TrendUp01-D5HSY9n4.js} +1 -1
- package/dist/client/assets/{Upload01-3O4bf6oQ.js → Upload01-DP24F4zF.js} +1 -1
- package/dist/client/assets/{User01-CtorIjKF.js → User01-qgh-4MOH.js} +1 -1
- package/dist/client/assets/{UserPlus01-BSVT8dcy.js → UserPlus01-DdwJL0S-.js} +1 -1
- package/dist/client/assets/{Users01-C605UE0e.js → Users01-DrPyz4sb.js} +1 -1
- package/dist/client/assets/{Users03-NFCULp3s.js → Users03-BRSRR5RV.js} +1 -1
- package/dist/client/assets/{X-wQ3Xq4m8.js → X--9wQR3oP.js} +1 -1
- package/dist/client/assets/{XCircle-B0OthGSP.js → XCircle-BYNmvRjh.js} +1 -1
- package/dist/client/assets/{XClose-CIpRkjvl.js → XClose-DMUE33fT.js} +1 -1
- package/dist/client/assets/{Zap-_sd7wprP.js → Zap-BJ87dj__.js} +1 -1
- package/dist/client/assets/{ZapSquare-BoYdurOR.js → ZapSquare-YVBjeS4K.js} +1 -1
- package/dist/client/assets/{ZoomOut-C5NMQEKL.js → ZoomOut-n1xODnHK.js} +1 -1
- package/dist/client/assets/{access-gate-B9QaxFJX.js → access-gate-DO-ximHT.js} +1 -1
- package/dist/client/assets/{add-section-modal-BVG5Pdtq.js → add-section-modal-Bdu5gDD_.js} +1 -1
- package/dist/client/assets/{agent-icon-DfqxMdDh.js → agent-icon-C2H0mZ4S.js} +1 -1
- package/dist/client/assets/{agents-list-DJ9dOf1h.js → agents-list-BQrxD8l5.js} +1 -1
- package/dist/client/assets/{ai-providers-DFCY5jq_.js → ai-providers-Bcmf3OhD.js} +1 -1
- package/dist/client/assets/{alert-CEnbFren.js → alert-DzipP2AB.js} +1 -1
- package/dist/client/assets/{alert-dialog-BEEL4jBx.js → alert-dialog-8PO_NEz4.js} +1 -1
- package/dist/client/assets/app-editor-D4c6lQov.js +1 -0
- package/dist/client/assets/{auth-C7AlH97a.js → auth-G8XwFsYg.js} +1 -1
- package/dist/client/assets/{auth-catchall-DWabl7WU.js → auth-catchall-BteDjWOH.js} +1 -1
- package/dist/client/assets/{auth-entry-o8B32MV7.js → auth-entry-CcCPTl2G.js} +1 -1
- package/dist/client/assets/{auth-split-layout-OqdWuYJ1.js → auth-split-layout-DnSqckTW.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DpND0UDr.js → authenticate-and-persist-oauth-BY3qxXD3.js} +1 -1
- package/dist/client/assets/{automation-list-row-CuwpGId9.js → automation-list-row-DrTncGCf.js} +1 -1
- package/dist/client/assets/{automation-runs-DaL5365o.js → automation-runs-D2EjYowd.js} +1 -1
- package/dist/client/assets/automations-DlUU78bZ.js +1 -0
- package/dist/client/assets/{autosend-BGWhH2s1.js → autosend-CVKBSoqX.js} +1 -1
- package/dist/client/assets/{avatar-DmLZHgpD.js → avatar-DvbNHJLZ.js} +1 -1
- package/dist/client/assets/{badge-BaMApt76.js → badge-BktjijWS.js} +1 -1
- package/dist/client/assets/{block-document-CtUs3EV2.js → block-document-dlhwYfe1.js} +1 -1
- package/dist/client/assets/{brand-context-C1VfiC0Z.js → brand-context-DwT76y2t.js} +1 -1
- package/dist/client/assets/{buckets-Bp8IO_ud.js → buckets-C21aZUrp.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CMG--lbo.js → bulk-category-panel-tvKdy-HV.js} +1 -1
- package/dist/client/assets/{calendar-CW6PPOhn.js → calendar-BahKmdS1.js} +1 -1
- package/dist/client/assets/{capability-load-error-AGcja-Pq.js → capability-load-error-CPc5bsEc.js} +1 -1
- package/dist/client/assets/{card-BGRlG0Lj.js → card-CFYGd4G4.js} +1 -1
- package/dist/client/assets/{category-editor-BFyEA-iX.js → category-editor-CBO9CxNM.js} +1 -1
- package/dist/client/assets/{chat-context-46ZYb04j.js → chat-context-C25dXoU2.js} +1 -1
- package/dist/client/assets/{checkbox-C6I0Sg03.js → checkbox-yMmj9xt5.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BEFs6yBX.js → cli-auth-success-CNG0Eubf.js} +1 -1
- package/dist/client/assets/{collection-detail-Dw6m_Wyg.js → collection-detail-COgxn-A5.js} +1 -1
- package/dist/client/assets/{collection-display-button-C4fSnsKU.js → collection-display-button-BTqjvsHv.js} +1 -1
- package/dist/client/assets/{collection-search-DhXwLIcY.js → collection-search-C0N7fg5i.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CoXkNQci.js → collection-table-wrapper-CBlemYq3.js} +1 -1
- package/dist/client/assets/{collection-tabs-B0ECqOEn.js → collection-tabs-C471jWFI.js} +1 -1
- package/dist/client/assets/{command-D9obe51N.js → command-SNY7B_ku.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-DH9Di6Mj.js → commerce-onboarding-BsmCA3gl.js} +1 -1
- package/dist/client/assets/{companions-core-DIsiKNpl.js → companions-core-CuHRslnY.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-btuiYDc5.js → connect-desktop-dialog-D4T-WjeC.js} +1 -1
- package/dist/client/assets/{connection-card-B5-_LASM.js → connection-card-C5-Ny9zC.js} +1 -1
- package/dist/client/assets/{connection-detail-D7BZYZ9l.js → connection-detail-C3C5JG5P.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DCtSE40g.js → connection-form-helpers-Ztgo65-p.js} +1 -1
- package/dist/client/assets/{connections-C61NSa2_.js → connections-Bf8kltc_.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-D_Baz4IA.js → decopilot-sse-pool-CYX6Tudl.js} +1 -1
- package/dist/client/assets/{dialog-BnPtoqqS.js → dialog-PqLpQyqq.js} +1 -1
- package/dist/client/assets/{domain-settings-Dtjo4GHL.js → domain-settings-D54p4rOU.js} +1 -1
- package/dist/client/assets/{drawer-23o_F9Hp.js → drawer-DWHOBqh8.js} +1 -1
- package/dist/client/assets/{dropdown-menu-hXfKwvRp.js → dropdown-menu-jTbTQ73Y.js} +1 -1
- package/dist/client/assets/{empty-state-B7Svny_h.js → empty-state-BgPu4m3t.js} +1 -1
- package/dist/client/assets/{extract-connection-data-dUeOiWL6.js → extract-connection-data-zsdsmr9p.js} +1 -1
- package/dist/client/assets/{file-explorer-BmHuJgZI.js → file-explorer-CA3QiCg_.js} +1 -1
- package/dist/client/assets/{file-type-icon-CfattDVJ.js → file-type-icon-C9tb4Pv9.js} +1 -1
- package/dist/client/assets/{files-DMhwuGsS.js → files-aoEGLFbn.js} +1 -1
- package/dist/client/assets/{form-BRQOo4KK.js → form-DcUMHB3L.js} +1 -1
- package/dist/client/assets/{general-B6C0LbhJ.js → general-Bs5HuuUB.js} +1 -1
- package/dist/client/assets/{github-repo-picker-KyMfWSlH.js → github-repo-picker-DEFFtBtV.js} +1 -1
- package/dist/client/assets/{hooks-Z9Nv0xNS.js → hooks-BzEVckbF.js} +1 -1
- package/dist/client/assets/{index-CYWjlYag.js → index-4uMh3Tum.js} +1 -1
- package/dist/client/assets/{index-Bvs3p9tF.js → index-B0UoPLRD.js} +1 -1
- package/dist/client/assets/{index-Cc5R0ILf.js → index-B5qISHxl.js} +1 -1
- package/dist/client/assets/{index-CJKHBqHe.js → index-ByMOeDCM.js} +1 -1
- package/dist/client/assets/{index-D8oFHDmN.js → index-C0ETTKkX.js} +1 -1
- package/dist/client/assets/{index-DQTJBd3r.js → index-C0L0gsTW.js} +3 -3
- package/dist/client/assets/index-CFgygjls.css +1 -0
- package/dist/client/assets/{index-Dkv7R2MX.js → index-CNNzBHqn.js} +1 -1
- package/dist/client/assets/{index-sIEeElya.js → index-D6yx1ZEJ.js} +1 -1
- package/dist/client/assets/{index-CbBF-emG.js → index-DP6NLSOF.js} +1 -1
- package/dist/client/assets/{index-2cKWZWme.js → index-Db4IORNs.js} +1 -1
- package/dist/client/assets/{index-Cz6_lBe1.js → index-DygzNtEl.js} +5 -5
- package/dist/client/assets/{index-GQFCs3ZQ.js → index-Wo5oCU96.js} +2 -2
- package/dist/client/assets/{index-CA4yxynQ.js → index-dOlZRqV2.js} +1 -1
- package/dist/client/assets/{index-DCQ9tnfj.js → index-f4rlfBnn.js} +1 -1
- package/dist/client/assets/{index-redirect-M9vtgKxD.js → index-redirect-Dvv2fTnB.js} +1 -1
- package/dist/client/assets/{input-BeVh4K_0.js → input-CIDLFJ95.js} +1 -1
- package/dist/client/assets/{integration-icon-BaaX37t6.js → integration-icon-BMihitEU.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BYEqbsLa.js → invite-member-dialog-CumZz4WQ.js} +1 -1
- package/dist/client/assets/{label-BiAoe76S.js → label-COOh4ZDd.js} +1 -1
- package/dist/client/assets/{layout-8xoRkNVn.js → layout-C4xDo18L.js} +1 -1
- package/dist/client/assets/{login-ze7qNOnb.js → login-537ygyuK.js} +1 -1
- package/dist/client/assets/{mcp-oauth-65JikJtg.js → mcp-oauth-C0j_cI8V.js} +1 -1
- package/dist/client/assets/{members-Bvw-fMvq.js → members-DqVBHbxw.js} +1 -1
- package/dist/client/assets/{monaco-editor-CfjszYCC.js → monaco-editor-B60WMBSP.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CBO6SOHi.js → monitoring-stats-row-DIuz_V8d.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BitDM-Ps.js → oauth-callback-ai-provider-CRS0EtDN.js} +1 -1
- package/dist/client/assets/{oauth-callback-Blzy_ZbQ.js → oauth-callback-j4tCYCbn.js} +1 -1
- package/dist/client/assets/{onboarding-lz3ep6lK.js → onboarding-CxeugD5I.js} +1 -1
- package/dist/client/assets/{org-install-zcRQGMhX.js → org-install-CJUiw71X.js} +1 -1
- package/dist/client/assets/{org-layout-QsrJAVbI.js → org-layout-BKQS3hZZ.js} +1 -1
- package/dist/client/assets/{organization-choice-DAQVs948.js → organization-choice-BDC0Wx4U.js} +1 -1
- package/dist/client/assets/{orgs-CRGjb-Qr.js → orgs-BqQv77Rc.js} +1 -1
- package/dist/client/assets/{page-seo-form-Vmm-IdyA.js → page-seo-form-DsoLcoue.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CQ71m9oy.js +1 -0
- package/dist/client/assets/{popover-DsnmTiCL.js → popover-BnI3Hmon.js} +1 -1
- package/dist/client/assets/{post-editor-C9dGu_w3.js → post-editor-Df1Qp3Hr.js} +1 -1
- package/dist/client/assets/{primitives-xwypdmn7.js → primitives-Chrs_P0E.js} +1 -1
- package/dist/client/assets/{profile-BNfruU_G.js → profile-CkliDKz0.js} +1 -1
- package/dist/client/assets/project-app-view-CgmUsjFh.js +1 -0
- package/dist/client/assets/record-editor-BZiJ-mh4.js +1 -0
- package/dist/client/assets/redirect-editor-B6l5xji5.js +1 -0
- package/dist/client/assets/registry-3ajlfIZT.js +2 -0
- package/dist/client/assets/{registry-layout-BRQIkrUN.js → registry-layout-Bqua10VU.js} +2 -2
- package/dist/client/assets/{reports-De9OXoJI.js → reports-xIRsNSLa.js} +1 -1
- package/dist/client/assets/{require-capability-BFfsa78k.js → require-capability-B4u8rwXs.js} +1 -1
- package/dist/client/assets/{required-auth-layout-a-RB2f2B.js → required-auth-layout-5ad5Yeca.js} +1 -1
- package/dist/client/assets/{reset-password-Cg0GJ_1W.js → reset-password-yVgzGiD9.js} +1 -1
- package/dist/client/assets/{roles-BUe12F08.js → roles-EDqYvD2t.js} +1 -1
- package/dist/client/assets/{search-input-DdNtzhLH.js → search-input-B9RPoBYs.js} +1 -1
- package/dist/client/assets/{secrets-QPf0YYbJ.js → secrets-UkBvQ9ci.js} +1 -1
- package/dist/client/assets/{sections-editor-DYrSiIjt.js → sections-editor-B7YChucb.js} +1 -1
- package/dist/client/assets/{select-CERbUhnr.js → select-DaW-txhM.js} +1 -1
- package/dist/client/assets/{select-model-DIU-etEV.js → select-model-DNQ_Bc53.js} +1 -1
- package/dist/client/assets/{self-tool-result-SPqOgMIQ.js → self-tool-result-ihJDae0S.js} +1 -1
- package/dist/client/assets/{seo-editor-Dolw3pLH.js → seo-editor-BjJ-aXUV.js} +1 -1
- package/dist/client/assets/{settings-layout-CT40T6Dd.js → settings-layout-CPT-yMGD.js} +1 -1
- package/dist/client/assets/{settings-section-BXgEVBbe.js → settings-section-CuMlyr8Q.js} +1 -1
- package/dist/client/assets/{shell-controls-Dy5fSAXO.js → shell-controls-Cg-gAUD2.js} +1 -1
- package/dist/client/assets/{shell-layout-Crp3Ezok.js → shell-layout-ChcRldXd.js} +1 -1
- package/dist/client/assets/{sidebar-Bh_b9nl6.js → sidebar-DXI3EM6t.js} +1 -1
- package/dist/client/assets/{skeleton-B2xPMPZV.js → skeleton-BWpAqYVQ.js} +1 -1
- package/dist/client/assets/{sso-DXheW2Va.js → sso-DT1gtYBN.js} +1 -1
- package/dist/client/assets/{store-Cdssrkis.js → store-ChXZA7aJ.js} +1 -1
- package/dist/client/assets/store-registry-CLffiIqb.js +2 -0
- package/dist/client/assets/{studio-tools-B3dPqrIl.js → studio-tools-ewgo_KSD.js} +1 -1
- package/dist/client/assets/{switch-DcUDE_bv.js → switch-BRIW9pJ4.js} +1 -1
- package/dist/client/assets/{table-TiUIjO1n.js → table-EefD0NNs.js} +1 -1
- package/dist/client/assets/{tabs-C0xyW26g.js → tabs-BnKonm_B.js} +1 -1
- package/dist/client/assets/{textarea-CTRf0B1A.js → textarea-DhI1-5gM.js} +1 -1
- package/dist/client/assets/{toggle-group-BrzoSsXk.js → toggle-group-Dhny4HAu.js} +1 -1
- package/dist/client/assets/{toolbar-Cmd2JXfQ.js → toolbar-B4surw5Y.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-D0KmzbGK.js → toolbar-icon-button-CKvBfMgq.js} +1 -1
- package/dist/client/assets/{tools-list-tCPlqelb.js → tools-list-BAvn4YFU.js} +1 -1
- package/dist/client/assets/{tooltip-YeOl4hv-.js → tooltip-isqb_L33.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DzVzXb7M.js → use-ai-providers-pKViKz8M.js} +1 -1
- package/dist/client/assets/{use-automations-DiH8Kd6O.js → use-automations-CFU-FMsN.js} +1 -1
- package/dist/client/assets/{use-autosave-Bn-Fq4QB.js → use-autosave-C2dse1a8.js} +1 -1
- package/dist/client/assets/{use-capability-Dkbsjvv4.js → use-capability-C9oUxALq.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BdSIIWU4.js → use-clock-tick-u_Vtf1Lj.js} +1 -1
- package/dist/client/assets/{use-collections-CRY2bHGt.js → use-collections-DPvr_YgZ.js} +1 -1
- package/dist/client/assets/{use-connection-CEowTS3X.js → use-connection-BLRAY60o.js} +1 -1
- package/dist/client/assets/{use-copy-D8Wz29u2.js → use-copy-Cq1jTaYP.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DrmF8gtj.js → use-create-virtual-mcp-DckywygG.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-FS0ALf4t.js → use-debounced-autosave-D8Hwqd5i.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BMeVdnuv.js → use-debounced-value-B3l11Ldt.js} +1 -1
- package/dist/client/assets/{use-deco-credits-HS1ZQmUT.js → use-deco-credits-C2LFVd8k.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DUI2Au7U.js → use-decopilot-events-BxMRiiL8.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Dsn6F_l5.js → use-delete-connection-4FTZRNLE.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CQl5LJ5v.js → use-deployment-admin-DBZsNywk.js} +1 -1
- package/dist/client/assets/{use-file-configs-B_vRT3Qr.js → use-file-configs-BQ_BFCxD.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BS3trBmy.js → use-infinite-scroll-DP0DDq39.js} +1 -1
- package/dist/client/assets/{use-join-requests-CQaNW13l.js → use-join-requests-D6gBBm_K.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Bs3RX2hu.js → use-mcp-client-BdKdbY1c.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Cgdp9UAp.js → use-mcp-tools-CmX-eRYJ.js} +1 -1
- package/dist/client/assets/{use-members-CsnPbJru.js → use-members-Ckezqa8p.js} +1 -1
- package/dist/client/assets/{use-mobile-C13QKbE7.js → use-mobile-DysDD1oQ.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-J2eU0ecs.js → use-navigate-to-agent-6KXnwjTB.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CWEupiUB.js → use-org-auth-client-B6RwFzAq.js} +1 -1
- package/dist/client/assets/{use-org-sso-M1X7vhR1.js → use-org-sso-kQuOX4vh.js} +1 -1
- package/dist/client/assets/{use-organization-roles-B1qOW5Sq.js → use-organization-roles-C_QTGi26.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CT-rnc6U.js → use-organization-settings-lXzppKlV.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Bw1HSuNS.js → use-registry-connections-Bcd6mFtX.js} +1 -1
- package/dist/client/assets/{use-secrets-B_AgnwCd.js → use-secrets-DHYxqD--.js} +1 -1
- package/dist/client/assets/{use-status-sounds-D4tV0gMp.js → use-status-sounds-IdEwlcXf.js} +1 -1
- package/dist/client/assets/{use-view-mode-BeyKjxt5.js → use-view-mode-1JC23KFO.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-i8hYjF1_.js → use-virtual-mcp-FOgOZ5UR.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DnWvnHb4.js +1 -0
- package/dist/client/assets/{useRouterState-DEDMijqY.js → useRouterState-BO2jvEbl.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B4xKZYke.js +1 -0
- package/dist/client/assets/{users-DW-6DLAq.js → users-y7sheRsK.js} +1 -1
- package/dist/client/assets/{variant-calendar-C4Ih7-xX.js → variant-calendar-WxSeASAC.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-9kPx-jZJ.js → view-mode-toggle-C4Rk-dy0.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/app-editor-g7GXVcSD.js +0 -1
- package/dist/client/assets/automations-Qn7F0_ck.js +0 -1
- package/dist/client/assets/index-jFTcOaVF.css +0 -1
- package/dist/client/assets/page-seo-sheet-DbkkqgNx.js +0 -1
- package/dist/client/assets/project-app-view-COGiN0kA.js +0 -1
- package/dist/client/assets/record-editor-DWdyShcO.js +0 -1
- package/dist/client/assets/redirect-editor-b6LNbh50.js +0 -1
- package/dist/client/assets/registry-Brr-TEX2.js +0 -2
- package/dist/client/assets/store-registry-CrwSvuS6.js +0 -2
- package/dist/client/assets/useInfiniteQuery-MFPoHk9j.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CKrjoJ2S.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{c as z,l as k,j as s,r as I,C as At,n as Qt,m as Yt,d as wt,K as $t,B as xe,aX as ms,i as fs}from"./index-DQTJBd3r.js";import{g as re}from"./get-initials-D-f_fDFw.js";import{A as ie}from"./avatar-DmLZHgpD.js";import{e as Et,a as xs,t as ps,f as gs,g as ut,b as Je,s as hs,c as Ht,h as bs,d as js,i as Ns}from"./UserPlus01-BSVT8dcy.js";import{i as ys}from"./List-Df7qea0m.js";import{s as Ot}from"./Plus-Oa-KgIil.js";import{e as vs}from"./constants-D_FQAPnt.js";import{u as Vt}from"./use-members-CsnPbJru.js";import{u as Ft}from"./studio-tools-B3dPqrIl.js";import{t as Ss,T as Cs,S as pe}from"./decopilot-sse-pool-D_Baz4IA.js";import{u as ws}from"./use-decopilot-events-DUI2Au7U.js";import{a as _s}from"./format-time-BnbuEtat.js";import{i as Xt}from"./AlertCircle-Bp2LwI99.js";import{i as Jt}from"./CheckCircle-CbenBLe1.js";import{i as Ds}from"./Circle-D2HVDzs8.js";import{s as ks}from"./Eye-DCpIMsPs.js";import{a as Is,d as Ts,e as zs}from"./dialog-BnPtoqqS.js";import{a as mt,c as ft,d as Ve,D as xt}from"./dropdown-menu-hXfKwvRp.js";import{P as _t,a as Dt,b as kt}from"./popover-DsnmTiCL.js";import{b as Wt,C as Zt,a as fe,e as pt,d as es,c as ts}from"./command-D9obe51N.js";import{C as As}from"./calendar-CW6PPOhn.js";import{u as $s}from"./use-copy-D8Wz29u2.js";import{i as Es}from"./Check-YatM3ypN.js";import{i as Os}from"./ChevronRight-C38LFGMe.js";import{a as Fs}from"./Copy01-gCYa3mdW.js";import{n as Bs}from"./LinkExternal01-BAop_7Oj.js";import{s as It}from"./User01-CtorIjKF.js";import{i as Pt}from"./X-wQ3Xq4m8.js";import{g as Rs,b as Ps,e as Ms,f as Ls,a as Us,D as qs}from"./drawer-23o_F9Hp.js";import{t as Bt}from"./ChevronDown-CrkJkNxr.js";import{i as ss}from"./FilterLines-DPOJJMN1.js";import{s as Ks}from"./Flag01-Bg2bng4r.js";import{u as Gs}from"./shell-layout-Crp3Ezok.js";import{u as Qs}from"./use-organization-settings-CT-rnc6U.js";function ue(t){const e=z.c(8),{size:l,className:a}=t,n=l===void 0?16:l;let i;e[0]!==n?(i={width:n,height:n},e[0]=n,e[1]=i):i=e[1];let r;e[2]!==a?(r=k("shrink-0 rounded-full object-cover",a),e[2]=a,e[3]=r):r=e[3];let o;return e[4]!==n||e[5]!==i||e[6]!==r?(o=s.jsx("img",{src:vs,alt:"Super Agent",width:n,height:n,style:i,className:r}),e[4]=n,e[5]=i,e[6]=r,e[7]=o):o=e[7],o}const Mt=()=>0;function Ys(t){const{orgSlug:e,enabled:l=!0,onUpdate:a,onDelete:n}=t,i=I.useRef(a);i.current=a;const r=I.useRef(n);r.current=n;const o=I.useRef(null),d=I.useRef(l),u=I.useRef(e);(!o.current||d.current!==l||u.current!==e)&&(d.current=l,u.current=e,o.current=m=>{if(!l||!e)return()=>{};const c=x=>{let b;try{b=JSON.parse(x.data)}catch{return}b.data&&(x.type===Cs?r.current?.(b.data.id):i.current(b.data)),m()};return Ss.subscribe(e,c)}),I.useSyncExternalStore(o.current,Mt,Mt)}function Hs(){const t=z.c(27),{org:e,locator:l}=At(),a=Ft(),n=Qt();let i;t[0]!==l?(i=$t.taskBoardItems(l),t[0]=l,t[1]=i):i=t[1];const r=i;let o;t[2]!==a?(o=async()=>(await a.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=a,t[3]=o):o=t[3];let d;t[4]!==r||t[5]!==o?(d={queryKey:r,queryFn:o},t[4]=r,t[5]=o,t[6]=d):d=t[6];const u=Yt(d);let g,m;t[7]!==n||t[8]!==r?(g=h=>{n.setQueryData(r,v=>{const p=v??[],N=h;return p.some(y=>y.id===N.id)?p.map(y=>y.id===N.id?N:y):[N,...p]})},m=h=>{n.setQueryData(r,v=>v?.filter(p=>p.id!==h))},t[7]=n,t[8]=r,t[9]=g,t[10]=m):(g=t[9],m=t[10]);let c;t[11]!==e.slug||t[12]!==g||t[13]!==m?(c={orgSlug:e.slug,onUpdate:g,onDelete:m},t[11]=e.slug,t[12]=g,t[13]=m,t[14]=c):c=t[14],Ys(c);let x;t[15]!==n||t[16]!==r?(x=h=>{const v=h.subject,p=h.data.status;n.setQueryData(r,N=>N?.map(y=>y.threads.some(w=>w.threadId===v)?{...y,threads:y.threads.map(w=>w.threadId===v?{...w,status:p}:w)}:y))},t[15]=n,t[16]=r,t[17]=x):x=t[17];let b;t[18]!==e.slug||t[19]!==x?(b={orgSlug:e.slug,onTaskStatus:x},t[18]=e.slug,t[19]=x,t[20]=b):b=t[20],ws(b);let f;t[21]!==u.data?(f=u.data??[],t[21]=u.data,t[22]=f):f=t[22];let j;return t[23]!==u.error||t[24]!==u.isLoading||t[25]!==f?(j={items:f,isLoading:u.isLoading,error:u.error},t[23]=u.error,t[24]=u.isLoading,t[25]=f,t[26]=j):j=t[26],j}function Vs(){const t=z.c(30),{locator:e}=At(),l=Ft(),a=Qt();let n;t[0]!==e?(n=$t.taskBoardItems(e),t[0]=e,t[1]=n):n=t[1];const i=n;let r;t[2]!==a||t[3]!==i?(r=()=>a.invalidateQueries({queryKey:i}),t[2]=a,t[3]=i,t[4]=r):r=t[4];const o=r;let d;t[5]!==l?(d=N=>l.call("TASK_BOARD_ITEM_CREATE",N),t[5]=l,t[6]=d):d=t[6];let u;t[7]!==o||t[8]!==d?(u={mutationFn:d,onSuccess:o},t[7]=o,t[8]=d,t[9]=u):u=t[9];const g=wt(u);let m;t[10]!==l?(m=N=>l.call("TASK_BOARD_ITEM_UPDATE",N),t[10]=l,t[11]=m):m=t[11];let c,x;t[12]!==a||t[13]!==i?(c=async N=>{await a.cancelQueries({queryKey:i});const y=a.getQueryData(i);return a.setQueryData(i,w=>w?.map(C=>C.id===N.id?{...C,...N}:C)),{previous:y}},x=(N,y,w)=>{w?.previous&&a.setQueryData(i,w.previous)},t[12]=a,t[13]=i,t[14]=c,t[15]=x):(c=t[14],x=t[15]);let b;t[16]!==o||t[17]!==m||t[18]!==c||t[19]!==x?(b={mutationFn:m,onMutate:c,onError:x,onSettled:o},t[16]=o,t[17]=m,t[18]=c,t[19]=x,t[20]=b):b=t[20];const f=wt(b);let j;t[21]!==l?(j=N=>l.call("TASK_BOARD_ITEM_DELETE",{id:N}),t[21]=l,t[22]=j):j=t[22];let h;t[23]!==o||t[24]!==j?(h={mutationFn:j,onSuccess:o},t[23]=o,t[24]=j,t[25]=h):h=t[25];const v=wt(h);let p;return t[26]!==g||t[27]!==v||t[28]!==f?(p={create:g,update:f,remove:v},t[26]=g,t[27]=v,t[28]=f,t[29]=p):p=t[29],p}function Tt(t){return t.threads.some(e=>e.status==="requires_action")}function ls(t){return t.threads[0]}const ns=["triage","todo","in_progress","in_review","done"],ae={triage:{label:"Backlog",icon:Xt,iconClassName:"text-muted-foreground"},todo:{label:"To Do",icon:Ds,iconClassName:"text-muted-foreground"},in_progress:{label:"In Progress",icon:Et,iconClassName:"text-primary"},in_review:{label:"In Review",icon:ks,iconClassName:"text-warning"},done:{label:"Done",icon:Jt,iconClassName:"text-success"}},as=["none","low","medium","high","urgent"],oe={none:{label:"No priority",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50"},low:{label:"Low",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40"},medium:{label:"Medium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500"},high:{label:"High",flagClassName:"text-warning",dotClassName:"bg-warning"},urgent:{label:"Urgent",flagClassName:"text-destructive",dotClassName:"bg-destructive"}};function Xs(t){const e=z.c(10),{locator:l}=At(),a=Ft();let n;e[0]!==t||e[1]!==l?(n=$t.taskBoardItemPrs(l,t??""),e[0]=t,e[1]=l,e[2]=n):n=e[2];const i=!!t;let r;e[3]!==t||e[4]!==a?(r=async()=>(await a.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:t})).prs,e[3]=t,e[4]=a,e[5]=r):r=e[5];let o;return e[6]!==n||e[7]!==i||e[8]!==r?(o={queryKey:n,enabled:i,queryFn:r},e[6]=n,e[7]=i,e[8]=r,e[9]=o):o=e[9],Yt(o)}function Js(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function Lt(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Ws=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),Xe="inline-flex h-9 items-center gap-2 rounded-lg border border-border px-3 text-sm font-medium text-foreground transition-colors hover:bg-muted sm:border-transparent",Zs={failed:{label:"Error",className:"text-destructive",icon:bs},requires_action:{label:"Needs input",className:"text-warning",icon:Ht},in_progress:{label:"Running",className:"text-primary",icon:Et,spin:!0},completed:{label:"Completed",className:"text-success",icon:Jt},expired:{label:"Expired",className:"text-muted-foreground",icon:Xt}};function el(t){const e=z.c(164),{open:l,onClose:a,item:n,defaultStatus:i,onSubmit:r,onDelete:o,onOpenThread:d,isSaving:u}=t,{data:g}=Vt();let m;e[0]!==g?.data?.members?(m=g?.data?.members??[],e[0]=g?.data?.members,e[1]=m):m=e[1];const c=m,{handleCopy:x,copied:b}=$s(),[f,j]=I.useState(n?.title??""),[h,v]=I.useState(n?.description??""),[p,N]=I.useState(n?.status??i??"triage"),[y,w]=I.useState(n?.priority??"medium"),[C,O]=I.useState(n?.assigneeId??null),L=n?.dueDate;let Y;e[2]!==L?(Y=Lt(L),e[2]=L,e[3]=Y):Y=e[3];const[T,U]=I.useState(Y),[q,R]=I.useState(!1),[B,F]=I.useState(!1);let P;e[4]!==i||e[5]!==n?.assigneeId||e[6]!==n?.description||e[7]!==n?.dueDate||e[8]!==n?.priority||e[9]!==n?.status||e[10]!==n?.title?(P=()=>{j(n?.title??""),v(n?.description??""),N(n?.status??i??"triage"),w(n?.priority??"medium"),O(n?.assigneeId??null),U(Lt(n?.dueDate))},e[4]=i,e[5]=n?.assigneeId,e[6]=n?.description,e[7]=n?.dueDate,e[8]=n?.priority,e[9]=n?.status,e[10]=n?.title,e[11]=P):P=e[11];const A=P;let H;e[12]!==a||e[13]!==A?(H=()=>{a(),A()},e[12]=a,e[13]=A,e[14]=H):H=e[14];const _=H;let $;e[15]!==C||e[16]!==h||e[17]!==T||e[18]!==r||e[19]!==y||e[20]!==p||e[21]!==f?($=()=>{const S=f.trim();S&&r({title:S,description:h.trim()||null,status:p,priority:y,assigneeId:C,dueDate:T?Js(T):null})},e[15]=C,e[16]=h,e[17]=T,e[18]=r,e[19]=y,e[20]=p,e[21]=f,e[22]=$):$=e[22];const K=$,M=C===pe;let Q;if(e[23]!==C||e[24]!==c){let S;e[26]!==C?(S=W=>W.userId===C,e[26]=C,e[27]=S):S=e[27],Q=c.find(S),e[23]=C,e[24]=c,e[25]=Q}else Q=e[25];const G=Q;let se;e[28]!==n||e[29]!==c?(se=n?.assignedBy?c.find(S=>S.userId===n.assignedBy):void 0,e[28]=n,e[29]=c,e[30]=se):se=e[30];const E=se,te=ae[p].icon;let ce;e[31]!==n?(ce=n?ls(n):void 0,e[31]=n,e[32]=ce):ce=e[32];const le=ce;let V;e[33]!==_?(V=S=>!S&&_(),e[33]=_,e[34]=V):V=e[34];const me=n?"Edit task":"New task";let Z;e[35]!==me?(Z=s.jsx(Is,{className:"sr-only",children:me}),e[35]=me,e[36]=Z):Z=e[36];let ee;e[37]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(Pt,{size:16}),e[37]=ee):ee=e[37];let X;e[38]!==_?(X=s.jsx("button",{type:"button","aria-label":"Close",onClick:_,className:"absolute right-2.5 top-2.5 z-10 flex size-10 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:ee}),e[38]=_,e[39]=X):X=e[39];let ne;e[40]===Symbol.for("react.memo_cache_sentinel")?(ne=S=>{j(S.target.value),S.target.style.height="auto",S.target.style.height=`${S.target.scrollHeight}px`},e[40]=ne):ne=e[40];let J;e[41]!==f?(J=s.jsx("textarea",{ref:sl,value:f,onChange:ne,onKeyDown:tl,placeholder:"Task title...",autoFocus:!0,rows:1,className:"w-full resize-none overflow-hidden border-0 bg-transparent text-xl font-medium leading-snug text-foreground outline-none placeholder:text-foreground/30"}),e[41]=f,e[42]=J):J=e[42];let D;e[43]===Symbol.for("react.memo_cache_sentinel")?(D=S=>v(S.target.value),e[43]=D):D=e[43];let de;e[44]!==h?(de=s.jsx("textarea",{value:h,onChange:D,placeholder:"Describe a task for an agent...",className:"min-h-[96px] w-full flex-1 resize-none border-0 bg-transparent text-[15px] leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/50 sm:min-h-[120px]"}),e[44]=h,e[45]=de):de=e[45];let ge;e[46]!==b||e[47]!==h||e[48]!==x?(ge=h&&s.jsx(xe,{type:"button",variant:"ghost",size:"icon","aria-label":"Copy description",className:"absolute right-0 top-0 size-7 text-muted-foreground opacity-0 transition-opacity hover:text-foreground group-hover:opacity-100",onClick:()=>x(h),children:b?s.jsx(Es,{size:14}):s.jsx(Fs,{size:14})}),e[46]=b,e[47]=h,e[48]=x,e[49]=ge):ge=e[49];let he;e[50]!==de||e[51]!==ge?(he=s.jsxs("div",{className:"group relative flex flex-1 flex-col",children:[de,ge]}),e[50]=de,e[51]=ge,e[52]=he):he=e[52];let be;e[53]!==E||e[54]!==G||e[55]!==d||e[56]!==le?(be=le&&s.jsx(ll,{thread:le,startedBy:E??G,onOpen:d}),e[53]=E,e[54]=G,e[55]=d,e[56]=le,e[57]=be):be=e[57];let je;e[58]!==n?(je=n?.id&&s.jsx(rl,{itemId:n.id}),e[58]=n,e[59]=je):je=e[59];let Ne;e[60]!==J||e[61]!==he||e[62]!==be||e[63]!==je?(Ne=s.jsxs("div",{className:"flex min-w-0 flex-col gap-6 p-6 sm:flex-1 sm:overflow-y-auto sm:p-8",children:[J,he,be,je]}),e[60]=J,e[61]=he,e[62]=be,e[63]=je,e[64]=Ne):Ne=e[64];let We;e[65]===Symbol.for("react.memo_cache_sentinel")?(We=s.jsx("span",{className:"hidden px-3 text-sm text-muted-foreground sm:block",children:"Properties"}),e[65]=We):We=e[65];const bt=ae[p];let ye;e[66]!==te||e[67]!==bt.iconClassName?(ye=s.jsx(te,{size:16,className:bt.iconClassName}),e[66]=te,e[67]=bt.iconClassName,e[68]=ye):ye=e[68];const jt=ae[p];let ve;e[69]!==ye||e[70]!==jt.label?(ve=s.jsx(mt,{asChild:!0,children:s.jsxs("button",{type:"button",className:Xe,children:[ye,jt.label]})}),e[69]=ye,e[70]=jt.label,e[71]=ve):ve=e[71];let Ze;e[72]===Symbol.for("react.memo_cache_sentinel")?(Ze=s.jsx(ft,{align:"start",className:"w-44",children:ns.map(S=>{const W=ae[S].icon;return s.jsxs(Ve,{onSelect:()=>N(S),className:"gap-2",children:[s.jsx(W,{size:16,className:ae[S].iconClassName}),ae[S].label]},S)})}),e[72]=Ze):Ze=e[72];let Se;e[73]!==ve?(Se=s.jsxs(xt,{children:[ve,Ze]}),e[73]=ve,e[74]=Se):Se=e[74];const Nt=y==="none"&&"text-muted-foreground";let Ce;e[75]!==Nt?(Ce=k(Xe,Nt),e[75]=Nt,e[76]=Ce):Ce=e[76];let we;e[77]!==y?(we=y==="none"?s.jsxs(s.Fragment,{children:[s.jsx(xs,{size:16}),"Set priority"]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:k("size-2 rounded-full",oe[y].dotClassName)}),oe[y].label]}),e[77]=y,e[78]=we):we=e[78];let _e;e[79]!==Ce||e[80]!==we?(_e=s.jsx(mt,{asChild:!0,children:s.jsx("button",{type:"button",className:Ce,children:we})}),e[79]=Ce,e[80]=we,e[81]=_e):_e=e[81];let et;e[82]===Symbol.for("react.memo_cache_sentinel")?(et=s.jsx(ft,{align:"start",className:"w-40",children:as.map(S=>s.jsxs(Ve,{onSelect:()=>w(S),children:[s.jsx("span",{className:k("size-2 rounded-full",oe[S].dotClassName)}),oe[S].label]},S))}),e[82]=et):et=e[82];let De;e[83]!==_e?(De=s.jsxs(xt,{children:[_e,et]}),e[83]=_e,e[84]=De):De=e[84];const yt=!C&&"text-muted-foreground";let ke;e[85]!==yt?(ke=k(Xe,yt),e[85]=yt,e[86]=ke):ke=e[86];let Ie;e[87]!==E||e[88]!==G||e[89]!==M?(Ie=M&&E?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[s.jsx(ie,{url:E.user?.image??void 0,fallback:re(E.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:E.user?.name??"Super Agent"})]}),s.jsxs("span",{className:"flex items-center gap-2 sm:hidden",children:[s.jsxs("span",{className:"inline-flex items-center",children:[s.jsx(ie,{url:E.user?.image??void 0,fallback:re(E.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),s.jsx(ue,{size:16,className:"ring-2 ring-background"})]}),"Super Agent"]})]}):M?s.jsxs(s.Fragment,{children:[s.jsx(ue,{size:16}),"Super Agent"]}):G?s.jsxs(s.Fragment,{children:[s.jsx(ie,{url:G.user?.image??void 0,fallback:re(G.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:G.user?.name??"Unassigned"})]}):s.jsxs(s.Fragment,{children:[s.jsx(ps,{size:16,className:"text-muted-foreground"}),"Assign"]}),e[87]=E,e[88]=G,e[89]=M,e[90]=Ie):Ie=e[90];let Te;e[91]!==ke||e[92]!==Ie?(Te=s.jsx(_t,{asChild:!0,children:s.jsx("button",{type:"button",className:ke,children:Ie})}),e[91]=ke,e[92]=Ie,e[93]=Te):Te=e[93];let tt;e[94]===Symbol.for("react.memo_cache_sentinel")?(tt=s.jsx(Wt,{placeholder:"Assign to…",className:"h-9"}),e[94]=tt):tt=e[94];let st;e[95]===Symbol.for("react.memo_cache_sentinel")?(st=s.jsx(Zt,{children:"No members found."}),e[95]=st):st=e[95];let lt;e[96]===Symbol.for("react.memo_cache_sentinel")?(lt=()=>{O(pe),F(!1)},e[96]=lt):lt=e[96];let nt;e[97]===Symbol.for("react.memo_cache_sentinel")?(nt=s.jsxs(fe,{value:"Super Agent",onSelect:lt,className:"gap-2",children:[s.jsx(ue,{size:16}),s.jsx("span",{className:"truncate",children:"Super Agent"})]}),e[97]=nt):nt=e[97];let at;e[98]===Symbol.for("react.memo_cache_sentinel")?(at=()=>{O(null),F(!1)},e[98]=at):at=e[98];let rt;e[99]===Symbol.for("react.memo_cache_sentinel")?(rt=s.jsxs(pt,{children:[nt,s.jsxs(fe,{value:"Unassigned",onSelect:at,className:"gap-2",children:[s.jsx(It,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"truncate",children:"Unassigned"})]})]}),e[99]=rt):rt=e[99];let ze;if(e[100]!==c){let S;e[102]===Symbol.for("react.memo_cache_sentinel")?(S=W=>s.jsxs(fe,{value:W.user?.name??W.userId,onSelect:()=>{O(W.userId),F(!1)},className:"gap-2",children:[s.jsx(ie,{url:W.user?.image??void 0,fallback:re(W.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:W.user?.name??W.userId})]},W.userId),e[102]=S):S=e[102],ze=c.map(S),e[100]=c,e[101]=ze}else ze=e[101];let Ae;e[103]!==ze?(Ae=s.jsx(Dt,{align:"start",className:"w-56 p-0",children:s.jsxs(es,{children:[tt,s.jsxs(ts,{children:[st,rt,s.jsx(pt,{heading:"Members",children:ze})]})]})}),e[103]=ze,e[104]=Ae):Ae=e[104];let $e;e[105]!==B||e[106]!==Te||e[107]!==Ae?($e=s.jsxs(kt,{open:B,onOpenChange:F,children:[Te,Ae]}),e[105]=B,e[106]=Te,e[107]=Ae,e[108]=$e):$e=e[108];let Ee;e[109]!==E||e[110]!==M?(Ee=M&&E&&s.jsxs("div",{className:"relative mt-1.5 hidden items-center pl-5 sm:flex",children:[s.jsx("span",{className:"absolute -top-1.5 left-5 h-[calc(50%+0.375rem)] w-2.5 rounded-bl-md border-b border-l border-border"}),s.jsxs("span",{className:k(Xe,"pointer-events-none"),children:[s.jsx(ue,{size:16}),"Super Agent"]})]}),e[109]=E,e[110]=M,e[111]=Ee):Ee=e[111];let Oe;e[112]!==$e||e[113]!==Ee?(Oe=s.jsxs("div",{className:"flex flex-col",children:[$e,Ee]}),e[112]=$e,e[113]=Ee,e[114]=Oe):Oe=e[114];const vt=!T&&"text-muted-foreground";let Fe;e[115]!==vt?(Fe=k(Xe,vt),e[115]=vt,e[116]=Fe):Fe=e[116];let it;e[117]===Symbol.for("react.memo_cache_sentinel")?(it=s.jsx(Je,{size:16,className:"text-muted-foreground"}),e[117]=it):it=e[117];let Be;e[118]!==T?(Be=T?Ws.format(T):"Due date",e[118]=T,e[119]=Be):Be=e[119];let Re;e[120]!==T?(Re=T&&s.jsx("span",{role:"button",tabIndex:0,"aria-label":"Clear due date",className:"-mr-1 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:S=>{S.stopPropagation(),U(null)},onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),S.stopPropagation(),U(null))},children:s.jsx(Pt,{size:12})}),e[120]=T,e[121]=Re):Re=e[121];let Pe;e[122]!==Fe||e[123]!==Be||e[124]!==Re?(Pe=s.jsx(_t,{asChild:!0,children:s.jsxs("button",{type:"button",className:Fe,children:[it,Be,Re]})}),e[122]=Fe,e[123]=Be,e[124]=Re,e[125]=Pe):Pe=e[125];const St=T??void 0;let ot;e[126]===Symbol.for("react.memo_cache_sentinel")?(ot=S=>{U(S??null),S&&R(!1)},e[126]=ot):ot=e[126];let Me;e[127]!==St?(Me=s.jsx(Dt,{className:"w-auto p-0",align:"start",children:s.jsx(As,{mode:"single",selected:St,onSelect:ot,initialFocus:!0})}),e[127]=St,e[128]=Me):Me=e[128];let Le;e[129]!==q||e[130]!==Pe||e[131]!==Me?(Le=s.jsxs(kt,{open:q,onOpenChange:R,children:[Pe,Me]}),e[129]=q,e[130]=Pe,e[131]=Me,e[132]=Le):Le=e[132];let Ue;e[133]!==Se||e[134]!==De||e[135]!==Oe||e[136]!==Le?(Ue=s.jsxs("div",{className:"flex w-full shrink-0 flex-col gap-4 border-t border-border p-6 sm:w-[220px] sm:border-t-0 sm:border-l sm:px-6 sm:py-10",children:[We,s.jsxs("div",{className:"flex flex-wrap gap-2 sm:flex-col",children:[Se,De,Oe,Le]})]}),e[133]=Se,e[134]=De,e[135]=Oe,e[136]=Le,e[137]=Ue):Ue=e[137];let qe;e[138]!==Ne||e[139]!==Ue?(qe=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto sm:flex-row sm:overflow-hidden",children:[Ne,Ue]}),e[138]=Ne,e[139]=Ue,e[140]=qe):qe=e[140];let Ke;e[141]!==n||e[142]!==o?(Ke=n&&o?s.jsx(xe,{variant:"ghost",size:"icon","aria-label":"Delete task",className:"size-10 text-muted-foreground hover:text-destructive",onClick:o,children:s.jsx(hs,{size:16})}):s.jsx("span",{}),e[141]=n,e[142]=o,e[143]=Ke):Ke=e[143];let Ge;e[144]!==u||e[145]!==f?(Ge=!f.trim()||u,e[144]=u,e[145]=f,e[146]=Ge):Ge=e[146];let ct;e[147]===Symbol.for("react.memo_cache_sentinel")?(ct=s.jsx(Ot,{size:16}),e[147]=ct):ct=e[147];const Ct=n?"Save":"Create task";let Qe;e[148]!==K||e[149]!==Ge||e[150]!==Ct?(Qe=s.jsxs(xe,{size:"sm",disabled:Ge,onClick:K,children:[ct,Ct]}),e[148]=K,e[149]=Ge,e[150]=Ct,e[151]=Qe):Qe=e[151];let Ye;e[152]!==Ke||e[153]!==Qe?(Ye=s.jsxs("div",{className:"flex h-16 items-center justify-between border-t border-border px-4",children:[Ke,Qe]}),e[152]=Ke,e[153]=Qe,e[154]=Ye):Ye=e[154];let He;e[155]!==Z||e[156]!==X||e[157]!==qe||e[158]!==Ye?(He=s.jsxs(Ts,{className:"flex max-h-[90vh] flex-col gap-0 overflow-hidden rounded-2xl p-0 sm:h-[85vh] sm:max-h-[640px] sm:max-w-[850px]",closeButtonClassName:"hidden",children:[Z,X,qe,Ye]}),e[155]=Z,e[156]=X,e[157]=qe,e[158]=Ye,e[159]=He):He=e[159];let dt;return e[160]!==l||e[161]!==V||e[162]!==He?(dt=s.jsx(zs,{open:l,onOpenChange:V,children:He}),e[160]=l,e[161]=V,e[162]=He,e[163]=dt):dt=e[163],dt}function tl(t){t.key==="Enter"&&t.preventDefault()}function sl(t){t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function ll(t){const e=z.c(14),{thread:l,startedBy:a,onOpen:n}=t,i=l.status?Zs[l.status]:null,r=l.lastMessage??l.title;let o,d;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ue,{size:16}),d=s.jsx("span",{className:"text-sm text-foreground",children:"Super Agent"}),e[0]=o,e[1]=d):(o=e[0],d=e[1]);let u;e[2]!==a?(u=a&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-sm text-muted-foreground/50",children:"started by"}),s.jsx(ie,{url:a.user?.image??void 0,fallback:re(a.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate text-sm text-foreground",children:a.user?.name??"someone"})]}),e[2]=a,e[3]=u):u=e[3];let g;e[4]!==u?(g=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[o,d,u]}),e[4]=u,e[5]=g):g=e[5];let m;e[6]!==r||e[7]!==n||e[8]!==i||e[9]!==l?(m=i&&s.jsxs("button",{type:"button",disabled:!n,onClick:()=>n?.(l),className:"flex items-center gap-2 border-t border-border px-4 py-2 text-left transition-colors enabled:hover:bg-muted disabled:cursor-default",children:[s.jsxs("span",{className:k("flex items-center gap-1.5",i.className),children:[s.jsx(i.icon,{size:16,className:k(i.spin&&"animate-spin")}),s.jsx("span",{className:"text-sm",children:i.label})]}),r&&s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:r}),n&&s.jsx(Os,{size:16,className:"ml-auto shrink-0 text-muted-foreground"})]}),e[6]=r,e[7]=n,e[8]=i,e[9]=l,e[10]=m):m=e[10];let c;return e[11]!==g||e[12]!==m?(c=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[g,m]}),e[11]=g,e[12]=m,e[13]=c):c=e[13],c}function nl(t){return t.merged?{label:"Merged",className:"text-special",icon:gs}:t.state==="closed"?{label:"Closed",className:"text-destructive",icon:ut}:t.draft?{label:"Draft",className:"text-muted-foreground",icon:ut}:{label:"Open",className:"text-success",icon:ut}}function al(t){const e=z.c(38),{pr:l}=t;let a,n,i,r,o,d,u,g;if(e[0]!==l){n=nl(l);let y;e[9]!==l.body?(y=l.body?.trim(),e[9]=l.body,e[10]=y):y=e[10],a=y,o=l.url,d="_blank",u="noreferrer",g="flex flex-col gap-1 border-t border-border px-4 py-2 transition-colors hover:bg-muted",r="flex items-center gap-2",i=k("flex items-center gap-1.5",n.className),e[0]=l,e[1]=a,e[2]=n,e[3]=i,e[4]=r,e[5]=o,e[6]=d,e[7]=u,e[8]=g}else a=e[1],n=e[2],i=e[3],r=e[4],o=e[5],d=e[6],u=e[7],g=e[8];let m;e[11]!==n.icon?(m=s.jsx(n.icon,{size:16}),e[11]=n.icon,e[12]=m):m=e[12];let c;e[13]!==n.label?(c=s.jsx("span",{className:"text-sm",children:n.label}),e[13]=n.label,e[14]=c):c=e[14];let x;e[15]!==i||e[16]!==m||e[17]!==c?(x=s.jsxs("span",{className:i,children:[m,c]}),e[15]=i,e[16]=m,e[17]=c,e[18]=x):x=e[18];const b=l.title??`${l.repoOwner}/${l.repoName}`;let f;e[19]!==b?(f=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:b}),e[19]=b,e[20]=f):f=e[20];let j;e[21]!==l.number?(j=s.jsxs("span",{className:"shrink-0 text-sm text-muted-foreground",children:["#",l.number]}),e[21]=l.number,e[22]=j):j=e[22];let h;e[23]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Bs,{size:16,className:"shrink-0 text-muted-foreground"}),e[23]=h):h=e[23];let v;e[24]!==f||e[25]!==j||e[26]!==r||e[27]!==x?(v=s.jsxs("span",{className:r,children:[x,f,j,h]}),e[24]=f,e[25]=j,e[26]=r,e[27]=x,e[28]=v):v=e[28];let p;e[29]!==a?(p=a?s.jsx("span",{className:"line-clamp-3 whitespace-pre-line text-xs text-muted-foreground",children:a}):null,e[29]=a,e[30]=p):p=e[30];let N;return e[31]!==v||e[32]!==p||e[33]!==o||e[34]!==d||e[35]!==u||e[36]!==g?(N=s.jsxs("a",{href:o,target:d,rel:u,className:g,children:[v,p]}),e[31]=v,e[32]=p,e[33]=o,e[34]=d,e[35]=u,e[36]=g,e[37]=N):N=e[37],N}function rl(t){const e=z.c(5),{itemId:l}=t,{data:a,isLoading:n}=Xs(l);if(!n&&(!a||a.length===0))return null;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[s.jsx(ut,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm text-foreground",children:"Pull requests"})]}),e[0]=i):i=e[0];let r;e[1]!==a?(r=a?a.map(il):s.jsxs("div",{className:"flex items-center gap-2 border-t border-border px-4 py-2 text-sm text-muted-foreground",children:[s.jsx(Et,{size:16,className:"animate-spin"}),s.jsx("span",{children:"Loading…"})]}),e[1]=a,e[2]=r):r=e[2];let o;return e[3]!==r?(o=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[i,r]}),e[3]=r,e[4]=o):o=e[4],o}function il(t){return s.jsx(al,{pr:t},t.url)}const zt="__unassigned__",gt={assignee:null,priority:null,due:null};function ol(t){return t.assignee!==null||t.priority!==null||t.due!==null}function cl(t){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)}const dl=864e5;function ul(t,e){const l=new Date(t),a=new Date(e);return l.getFullYear()===a.getFullYear()&&l.getMonth()===a.getMonth()&&l.getDate()===a.getDate()}function ml(t,e){if(e.assignee!==null){if(e.assignee===zt){if(t.assigneeId!==null)return!1}else if(t.assigneeId!==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 l=new Date(t.dueDate).getTime(),a=Date.now();if(e.due==="overdue"&&l>=a||e.due==="today"&&!ul(l,a)||e.due==="week"&&(l<a||l>a+7*dl))return!1}return!0}const Ut=[{value:"overdue",label:"Overdue"},{value:"today",label:"Due today"},{value:"week",label:"Due this week"},{value:"none",label:"No due date"}];function ht(t,e=!1){return k("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors",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 fl(t){const e=z.c(62),{value:l,members:a,onChange:n,block:i}=t,[r,o]=I.useState(!1);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(It,{size:14,className:"shrink-0"}),e[0]=d):d=e[0];let u=d,g="Assignee";if(l===zt)g="Unassigned";else if(l===pe){let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(ue,{size:14}),e[1]=_):_=e[1],u=_,g="Super Agent"}else if(l){let _,$,K,M;if(e[2]!==a||e[3]!==l){let G;e[8]!==l?(G=se=>se.userId===l,e[8]=l,e[9]=G):G=e[9],$=a.find(G),_=ie,K=$?.user?.image??void 0,M=re($?.user?.name),e[2]=a,e[3]=l,e[4]=_,e[5]=$,e[6]=K,e[7]=M}else _=e[4],$=e[5],K=e[6],M=e[7];let Q;e[10]!==_||e[11]!==K||e[12]!==M?(Q=s.jsx(_,{url:K,fallback:M,shape:"circle",size:"2xs"}),e[10]=_,e[11]=K,e[12]=M,e[13]=Q):Q=e[13],u=Q,g=$?.user?.name??"Member"}let m;e[14]!==n?(m=_=>{n(_),o(!1)},e[14]=n,e[15]=m):m=e[15];const c=m,x=l!==null;let b;e[16]!==i||e[17]!==x?(b=ht(x,i),e[16]=i,e[17]=x,e[18]=b):b=e[18];const f=b,j=i&&"ml-auto";let h;e[19]!==j?(h=k("shrink-0 opacity-60",j),e[19]=j,e[20]=h):h=e[20];const v=h;let p;e[21]!==g?(p=s.jsx("span",{className:"max-w-[10rem] truncate",children:g}),e[21]=g,e[22]=p):p=e[22];let N;e[23]!==v?(N=s.jsx(Bt,{size:12,className:v}),e[23]=v,e[24]=N):N=e[24];let y;e[25]!==u||e[26]!==p||e[27]!==N||e[28]!==f?(y=s.jsx(_t,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,children:[u,p,N]})}),e[25]=u,e[26]=p,e[27]=N,e[28]=f,e[29]=y):y=e[29];let w;e[30]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(Wt,{placeholder:"Filter by assignee…",className:"h-9"}),e[30]=w):w=e[30];let C;e[31]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Zt,{children:"No members found."}),e[31]=C):C=e[31];let O;e[32]!==c?(O=s.jsx(fe,{value:"Anyone",onSelect:()=>c(null),children:"Anyone"}),e[32]=c,e[33]=O):O=e[33];let L;e[34]!==c?(L=()=>c(zt),e[34]=c,e[35]=L):L=e[35];let Y;e[36]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(It,{size:16,className:"text-muted-foreground"}),e[36]=Y):Y=e[36];let T;e[37]!==L?(T=s.jsxs(fe,{value:"Unassigned",onSelect:L,className:"gap-2",children:[Y,"Unassigned"]}),e[37]=L,e[38]=T):T=e[38];let U;e[39]!==c?(U=()=>c(pe),e[39]=c,e[40]=U):U=e[40];let q;e[41]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(ue,{size:16}),e[41]=q):q=e[41];let R;e[42]!==U?(R=s.jsxs(fe,{value:"Super Agent",onSelect:U,className:"gap-2",children:[q,"Super Agent"]}),e[42]=U,e[43]=R):R=e[43];let B;e[44]!==O||e[45]!==T||e[46]!==R?(B=s.jsxs(pt,{children:[O,T,R]}),e[44]=O,e[45]=T,e[46]=R,e[47]=B):B=e[47];let F;if(e[48]!==a||e[49]!==c){let _;e[51]!==c?(_=$=>s.jsxs(fe,{value:$.user?.name??$.userId,onSelect:()=>c($.userId),className:"gap-2",children:[s.jsx(ie,{url:$.user?.image??void 0,fallback:re($.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:$.user?.name??$.userId})]},$.userId),e[51]=c,e[52]=_):_=e[52],F=a.map(_),e[48]=a,e[49]=c,e[50]=F}else F=e[50];let P;e[53]!==F?(P=s.jsx(pt,{heading:"Members",children:F}),e[53]=F,e[54]=P):P=e[54];let A;e[55]!==B||e[56]!==P?(A=s.jsx(Dt,{align:"start",className:"w-56 p-0",children:s.jsxs(es,{children:[w,s.jsxs(ts,{children:[C,B,P]})]})}),e[55]=B,e[56]=P,e[57]=A):A=e[57];let H;return e[58]!==r||e[59]!==A||e[60]!==y?(H=s.jsxs(kt,{open:r,onOpenChange:o,children:[y,A]}),e[58]=r,e[59]=A,e[60]=y,e[61]=H):H=e[61],H}function xl(t){const e=z.c(23),{value:l,onChange:a,block:n}=t,i=l!==null;let r;e[0]!==n||e[1]!==i?(r=ht(i,n),e[0]=n,e[1]=i,e[2]=r):r=e[2];const o=r,d=n&&"ml-auto";let u;e[3]!==d?(u=k("shrink-0 opacity-60",d),e[3]=d,e[4]=u):u=e[4];const g=u;let m;e[5]!==l?(m=l?s.jsx("span",{className:k("size-2 shrink-0 rounded-full",oe[l].dotClassName)}):s.jsx(Ks,{size:14,className:"shrink-0"}),e[5]=l,e[6]=m):m=e[6];const c=l?oe[l].label:"Priority";let x;e[7]!==g?(x=s.jsx(Bt,{size:12,className:g}),e[7]=g,e[8]=x):x=e[8];let b;e[9]!==m||e[10]!==c||e[11]!==x||e[12]!==o?(b=s.jsx(mt,{asChild:!0,children:s.jsxs("button",{type:"button",className:o,children:[m,c,x]})}),e[9]=m,e[10]=c,e[11]=x,e[12]=o,e[13]=b):b=e[13];let f,j;e[14]!==a?(j=s.jsx(Ve,{onSelect:()=>a(null),children:"Any priority"}),f=as.map(p=>s.jsxs(Ve,{onSelect:()=>a(p),className:"gap-2",children:[s.jsx("span",{className:k("size-2 rounded-full",oe[p].dotClassName)}),oe[p].label]},p)),e[14]=a,e[15]=f,e[16]=j):(f=e[15],j=e[16]);let h;e[17]!==f||e[18]!==j?(h=s.jsxs(ft,{align:"start",className:"w-40",children:[j,f]}),e[17]=f,e[18]=j,e[19]=h):h=e[19];let v;return e[20]!==h||e[21]!==b?(v=s.jsxs(xt,{children:[b,h]}),e[20]=h,e[21]=b,e[22]=v):v=e[22],v}function pl(t){const e=z.c(27),{value:l,onChange:a,block:n}=t;let i;e[0]!==l?(i=Ut.find(C=>C.value===l)?.label,e[0]=l,e[1]=i):i=e[1];const r=i,o=l!==null;let d;e[2]!==n||e[3]!==o?(d=ht(o,n),e[2]=n,e[3]=o,e[4]=d):d=e[4];const u=d,g=n&&"ml-auto";let m;e[5]!==g?(m=k("shrink-0 opacity-60",g),e[5]=g,e[6]=m):m=e[6];const c=m;let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Je,{size:14,className:"shrink-0"}),e[7]=x):x=e[7];const b=r??"Due date";let f;e[8]!==c?(f=s.jsx(Bt,{size:12,className:c}),e[8]=c,e[9]=f):f=e[9];let j;e[10]!==b||e[11]!==f||e[12]!==u?(j=s.jsx(mt,{asChild:!0,children:s.jsxs("button",{type:"button",className:u,children:[x,b,f]})}),e[10]=b,e[11]=f,e[12]=u,e[13]=j):j=e[13];let h;e[14]!==a?(h=()=>a(null),e[14]=a,e[15]=h):h=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Je,{size:16,className:"text-muted-foreground"}),e[16]=v):v=e[16];let p;e[17]!==h?(p=s.jsxs(Ve,{onSelect:h,className:"gap-2",children:[v,"Any time"]}),e[17]=h,e[18]=p):p=e[18];let N;e[19]!==a?(N=Ut.map(C=>{const O=C.value==="overdue";return s.jsxs(Ve,{onSelect:()=>a(C.value),className:k("gap-2",O&&"text-destructive"),children:[s.jsx(Je,{size:16,className:k("shrink-0",O?"text-destructive":"text-muted-foreground")}),C.label]},C.value)}),e[19]=a,e[20]=N):N=e[20];let y;e[21]!==p||e[22]!==N?(y=s.jsxs(ft,{align:"start",className:"w-44",children:[p,N]}),e[21]=p,e[22]=N,e[23]=y):y=e[23];let w;return e[24]!==y||e[25]!==j?(w=s.jsxs(xt,{children:[j,y]}),e[24]=y,e[25]=j,e[26]=w):w=e[26],w}function rs(t){const e=z.c(26),{filters:l,members:a,onChange:n,block:i}=t;let r;e[0]!==l||e[1]!==n?(r=x=>n({...l,assignee:x}),e[0]=l,e[1]=n,e[2]=r):r=e[2];let o;e[3]!==i||e[4]!==l.assignee||e[5]!==a||e[6]!==r?(o=s.jsx(fl,{block:i,value:l.assignee,members:a,onChange:r}),e[3]=i,e[4]=l.assignee,e[5]=a,e[6]=r,e[7]=o):o=e[7];let d;e[8]!==l||e[9]!==n?(d=x=>n({...l,priority:x}),e[8]=l,e[9]=n,e[10]=d):d=e[10];let u;e[11]!==i||e[12]!==l.priority||e[13]!==d?(u=s.jsx(xl,{block:i,value:l.priority,onChange:d}),e[11]=i,e[12]=l.priority,e[13]=d,e[14]=u):u=e[14];let g;e[15]!==l||e[16]!==n?(g=x=>n({...l,due:x}),e[15]=l,e[16]=n,e[17]=g):g=e[17];let m;e[18]!==i||e[19]!==l.due||e[20]!==g?(m=s.jsx(pl,{block:i,value:l.due,onChange:g}),e[18]=i,e[19]=l.due,e[20]=g,e[21]=m):m=e[21];let c;return e[22]!==o||e[23]!==u||e[24]!==m?(c=s.jsxs(s.Fragment,{children:[o,u,m]}),e[22]=o,e[23]=u,e[24]=m,e[25]=c):c=e[25],c}function gl(t){const e=z.c(11),{filters:l,members:a,onChange:n}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ss,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=i):i=e[0];let r;e[1]!==l||e[2]!==a||e[3]!==n?(r=s.jsx(rs,{filters:l,members:a,onChange:n}),e[1]=l,e[2]=a,e[3]=n,e[4]=r):r=e[4];let o;e[5]!==l||e[6]!==n?(o=ol(l)&&s.jsx("button",{type:"button",onClick:()=>n(gt),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Clear"}),e[5]=l,e[6]=n,e[7]=o):o=e[7];let d;return e[8]!==r||e[9]!==o?(d=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i,r,o]}),e[8]=r,e[9]=o,e[10]=d):d=e[10],d}function hl(t){const e=z.c(26),{filters:l,members:a,onChange:n}=t,[i,r]=I.useState(!1),o=cl(l),d=o>0;let u;e[0]!==d?(u=ht(d),e[0]=d,e[1]=u):u=e[1];const g=u;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ss,{size:14,className:"shrink-0"}),e[2]=m):m=e[2];let c;e[3]!==o?(c=o>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:o}),e[3]=o,e[4]=c):c=e[4];let x;e[5]!==c||e[6]!==g?(x=s.jsx(Rs,{asChild:!0,children:s.jsxs("button",{type:"button",className:g,children:[m,"Filters",c]})}),e[5]=c,e[6]=g,e[7]=x):x=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Ps,{className:"px-4 pt-4 text-base font-medium text-foreground",children:"Filters"}),e[8]=b):b=e[8];let f;e[9]!==l||e[10]!==a||e[11]!==n?(f=s.jsx("div",{className:"flex flex-col gap-2 p-4",children:s.jsx(rs,{block:!0,filters:l,members:a,onChange:n})}),e[9]=l,e[10]=a,e[11]=n,e[12]=f):f=e[12];let j;e[13]!==o||e[14]!==n?(j=o>0&&s.jsx(xe,{variant:"outline",className:"flex-1",onClick:()=>n(gt),children:"Clear all"}),e[13]=o,e[14]=n,e[15]=j):j=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Ms,{asChild:!0,children:s.jsx(xe,{className:"flex-1",children:"Done"})}),e[16]=h):h=e[16];let v;e[17]!==j?(v=s.jsxs(Ls,{className:"flex-row gap-2",children:[j,h]}),e[17]=j,e[18]=v):v=e[18];let p;e[19]!==v||e[20]!==f?(p=s.jsxs(Us,{className:"p-0",children:[b,f,v]}),e[19]=v,e[20]=f,e[21]=p):p=e[21];let N;return e[22]!==i||e[23]!==p||e[24]!==x?(N=s.jsxs(qs,{open:i,onOpenChange:r,direction:"bottom",children:[x,p]}),e[22]=i,e[23]=p,e[24]=x,e[25]=N):N=e[25],N}const qt=380,bl=90,Kt=5,jl="cubic-bezier(0.22, 0.61, 0.36, 1)",Nl=8;function yl(t,e){const l=I.useRef(new Map);I.useLayoutEffect(()=>{const a=t.current;if(!a)return;const n=a.querySelectorAll("[data-flip-id]"),i=l.current,r=new Map,o=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,d=[];for(const c of n){const x=c.dataset.flipId;if(!x)continue;const b=c.getBoundingClientRect();r.set(x,b);const f=i.get(x);if(!f)continue;const j=f.left-b.left,h=f.top-b.top;(j||h)&&d.push({el:c,dx:j,dy:h,lane:Math.abs(j)>Nl})}if(l.current=r,o||d.length===0)return;for(const c of d){const x=c.lane?` rotate(${c.dx>0?Kt:-Kt}deg)`:"";c.el.style.transition="none",c.el.style.transform=`translate(${c.dx}px, ${c.dy}px)${x}`,c.lane&&(c.el.style.zIndex="10")}let u=0;const g=[],m=requestAnimationFrame(()=>{for(const c of d){const x=c.lane?u++*bl:0;c.el.style.transition=`transform ${qt}ms ${jl} ${x}ms`,c.el.style.transform="",g.push(window.setTimeout(()=>{c.el.style.transition="",c.el.style.transform="",c.el.style.zIndex=""},qt+x+30))}});return()=>{cancelAnimationFrame(m);for(const c of g)clearTimeout(c)}},[e,t])}ms(()=>import("./index-Cz6_lBe1.js").then(t=>t.aY),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152])).catch(()=>{});function vl(){const t=z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:s.jsx("div",{className:"h-full p-0.5 pt-0.25",children:s.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:s.jsx(us,{})})})}),t[0]=e):e=t[0],e}const Sl=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function Cl(t){const e=new Date(t),l=e.getTime()<Date.now();return{label:Sl.format(e),overdue:l}}const Rt="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2 py-1 text-xs font-medium text-muted-foreground";function is(){const t=z.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=k(Rt,"border-warning/30 text-warning"),t[0]=e):e=t[0];let l;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("span",{className:e,title:"The agent is waiting for your input",children:[s.jsx(Ht,{size:14}),"Needs input"]}),t[1]=l):l=t[1],l}function os(t){const e=z.c(7),{priority:l}=t,a=oe[l];let n;e[0]!==a.dotClassName?(n=k("size-2 rounded-full",a.dotClassName),e[0]=a.dotClassName,e[1]=n):n=e[1];let i;e[2]!==n?(i=s.jsx("span",{className:n}),e[2]=n,e[3]=i):i=e[3];let r;return e[4]!==a.label||e[5]!==i?(r=s.jsxs("span",{className:Rt,children:[i,a.label]}),e[4]=a.label,e[5]=i,e[6]=r):r=e[6],r}function cs(t){const e=z.c(7),{iso:l}=t;let a,n;if(e[0]!==l){const{label:o,overdue:d}=Cl(l);a=o,n=k(Rt,d&&"border-destructive/30 text-destructive"),e[0]=l,e[1]=a,e[2]=n}else a=e[1],n=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Je,{size:14}),e[3]=i):i=e[3];let r;return e[4]!==a||e[5]!==n?(r=s.jsxs("span",{className:n,children:[i,a]}),e[4]=a,e[5]=n,e[6]=r):r=e[6],r}function ds(t){const e=z.c(11),{item:l,assignee:a,assignedBy:n}=t;if(l.assigneeId===pe){const i=n?.user?.name?`Assigned to Super Agent by ${n.user.name}`:"Assigned to Super Agent";let r;e[0]!==n?(r=n&&s.jsx(ie,{url:n.user?.image??void 0,fallback:re(n.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),e[0]=n,e[1]=r):r=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ue,{size:16,className:"ring-2 ring-background"}),e[2]=o):o=e[2];let d;return e[3]!==i||e[4]!==r?(d=s.jsxs("span",{className:"inline-flex items-center",title:i,children:[r,o]}),e[3]=i,e[4]=r,e[5]=d):d=e[5],d}if(a){const i=a.user?.image??void 0,r=a.user?.name;let o;e[6]!==r?(o=re(r),e[6]=r,e[7]=o):o=e[7];let d;return e[8]!==i||e[9]!==o?(d=s.jsx(ie,{url:i,fallback:o,shape:"circle",size:"2xs"}),e[8]=i,e[9]=o,e[10]=d):d=e[10],d}return null}function us(){const t=z.c(65),{items:e,isLoading:l}=Hs(),a=Vs(),n=Qs(),{data:i}=Vt();let r,o;t[0]!==i?.data?.members?(r=i?.data?.members??[],o=new Map(r.map(wl)),t[0]=i?.data?.members,t[1]=r,t[2]=o):(r=t[1],o=t[2]);const d=o,[u,g]=I.useState("board"),[m,c]=I.useState(gt),[x,b]=I.useState(!1),[f,j]=I.useState(null),[h,v]=I.useState(null),{setTaskId:p}=Gs();let N,y,w,C;if(t[3]!==a||t[4]!==m||t[5]!==l||t[6]!==e||t[7]!==u||t[8]!==d||t[9]!==r||t[10]!==n){C=Symbol.for("react.early_return_sentinel");e:{let A;t[15]!==m?(A=D=>ml(D,m),t[15]=m,t[16]=A):A=t[16];const H=e.filter(A);let _;t[17]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{j(null),v(null),b(!0)},t[17]=_):_=t[17];const $=_;let K;t[18]===Symbol.for("react.memo_cache_sentinel")?(K=D=>{j(null),v(D),b(!0)},t[18]=K):K=t[18];const M=K;let Q;t[19]===Symbol.for("react.memo_cache_sentinel")?(Q=D=>{j(D),b(!0)},t[19]=Q):Q=t[19];const se=Q;if(l&&e.length===0){let D;t[20]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(fs,{size:20,className:"animate-spin text-muted-foreground"})}),t[20]=D):D=t[20],C=D;break e}N="flex min-h-0 flex-1 flex-col";let E;t[21]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:"Tasks"}),t[21]=E):E=t[21];let te;t[22]!==m||t[23]!==e.length||t[24]!==r?(te=e.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"sm:hidden",children:s.jsx(hl,{filters:m,members:r,onChange:c})}),s.jsx("div",{className:"hidden sm:block",children:s.jsx(gl,{filters:m,members:r,onChange:c})})]}),t[22]=m,t[23]=e.length,t[24]=r,t[25]=te):te=t[25];const ce=u==="list";let le;t[26]===Symbol.for("react.memo_cache_sentinel")?(le=()=>g("list"),t[26]=le):le=t[26];let V;t[27]!==ce?(V=s.jsx(Gt,{active:ce,onClick:le,icon:ys,label:"List"}),t[27]=ce,t[28]=V):V=t[28];const me=u==="board";let Z;t[29]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>g("board"),t[29]=Z):Z=t[29];let ee;t[30]!==me?(ee=s.jsx(Gt,{active:me,onClick:Z,icon:js,label:"Board"}),t[30]=me,t[31]=ee):ee=t[31];let X;t[32]!==V||t[33]!==ee?(X=s.jsxs("div",{className:"inline-flex rounded-lg bg-muted p-0.5",children:[V,ee]}),t[32]=V,t[33]=ee,t[34]=X):X=t[34];let ne;t[35]===Symbol.for("react.memo_cache_sentinel")?(ne=s.jsxs(xe,{size:"sm",onClick:$,children:[s.jsx(Ot,{size:16}),"New task"]}),t[35]=ne):ne=t[35];let J;t[36]!==X?(J=s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[X,ne]}),t[36]=X,t[37]=J):J=t[37],t[38]!==te||t[39]!==J?(y=s.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 pt-6 sm:px-8 sm:pt-8",children:[E,s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[te,J]})]}),t[38]=te,t[39]=J,t[40]=y):y=t[40],w=e.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsx("div",{className:"rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:"No tasks yet. Start one with New task."})}):H.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:["No tasks match these filters.",s.jsx(xe,{variant:"outline",size:"sm",onClick:()=>c(gt),children:"Clear filters"})]})}):u==="board"?s.jsx(_l,{items:H,memberByUserId:d,onOpen:se,onCreate:M,onMove:(D,de)=>a.update.mutate({id:D,status:de}),onAutoFix:n?D=>a.update.mutate({id:D.id,assigneeId:pe}):void 0}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 pt-6 pb-16 sm:px-8",children:s.jsx("div",{className:"mx-auto flex max-w-[820px] flex-col gap-2",children:H.map(D=>s.jsx(Il,{item:D,assignee:D.assigneeId?d.get(D.assigneeId):void 0,assignedBy:D.assignedBy?d.get(D.assignedBy):void 0,onOpen:()=>se(D)},D.id))})})}t[3]=a,t[4]=m,t[5]=l,t[6]=e,t[7]=u,t[8]=d,t[9]=r,t[10]=n,t[11]=N,t[12]=y,t[13]=w,t[14]=C}else N=t[11],y=t[12],w=t[13],C=t[14];if(C!==Symbol.for("react.early_return_sentinel"))return C;const O=x?f?.id??`new-${h??"default"}`:"closed";let L;t[41]===Symbol.for("react.memo_cache_sentinel")?(L=()=>b(!1),t[41]=L):L=t[41];const Y=f??void 0,T=h??void 0,U=a.create.isPending||a.update.isPending;let q;t[42]!==a.create||t[43]!==a.update||t[44]!==f?(q=A=>{f?a.update.mutate({id:f.id,...A}):a.create.mutate(A),b(!1)},t[42]=a.create,t[43]=a.update,t[44]=f,t[45]=q):q=t[45];let R;t[46]!==a.remove||t[47]!==f?(R=f?()=>{a.remove.mutate(f.id),b(!1)}:void 0,t[46]=a.remove,t[47]=f,t[48]=R):R=t[48];let B;t[49]!==p?(B=A=>{A.virtualMcpId&&(b(!1),p(A.threadId,A.virtualMcpId,{main:A.hasPreview?"preview":"board"}))},t[49]=p,t[50]=B):B=t[50];let F;t[51]!==x||t[52]!==q||t[53]!==R||t[54]!==B||t[55]!==O||t[56]!==Y||t[57]!==T||t[58]!==U?(F=s.jsx(el,{open:x,onClose:L,item:Y,defaultStatus:T,isSaving:U,onSubmit:q,onDelete:R,onOpenThread:B},O),t[51]=x,t[52]=q,t[53]=R,t[54]=B,t[55]=O,t[56]=Y,t[57]=T,t[58]=U,t[59]=F):F=t[59];let P;return t[60]!==N||t[61]!==F||t[62]!==y||t[63]!==w?(P=s.jsxs("div",{className:N,children:[y,w,F]}),t[60]=N,t[61]=F,t[62]=y,t[63]=w,t[64]=P):P=t[64],P}function wl(t){return[t.userId,t]}function Gt(t){const e=z.c(11),{active:l,onClick:a,icon:n,label:i}=t,r=`${i} view`,o=l?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let d;e[0]!==o?(d=k("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",o),e[0]=o,e[1]=d):d=e[1];let u;e[2]!==n?(u=s.jsx(n,{size:14}),e[2]=n,e[3]=u):u=e[3];let g;return e[4]!==l||e[5]!==i||e[6]!==a||e[7]!==r||e[8]!==d||e[9]!==u?(g=s.jsxs("button",{type:"button",onClick:a,"aria-label":r,"aria-pressed":l,className:d,children:[u,i]}),e[4]=l,e[5]=i,e[6]=a,e[7]=r,e[8]=d,e[9]=u,e[10]=g):g=e[10],g}function _l(t){const e=z.c(12),{items:l,memberByUserId:a,onOpen:n,onCreate:i,onMove:r,onAutoFix:o}=t,[d,u]=I.useState(null),g=I.useRef(null);let m;e[0]!==l?(m=l.map(Dl).join(","),e[0]=l,e[1]=m):m=e[1],yl(g,m);let x;e[2]!==l||e[3]!==a||e[4]!==o||e[5]!==i||e[6]!==r||e[7]!==n||e[8]!==d?(x=ns.map(f=>{const j=l.filter(p=>p.status===f),h=ae[f],v=h.icon;return s.jsxs("div",{onDragOver:p=>{p.preventDefault(),u(f)},onDragLeave:p=>{p.currentTarget.contains(p.relatedTarget)||u(null)},onDrop:p=>{p.preventDefault();const N=p.dataTransfer.getData("text/plain");N&&r(N,f),u(null)},className:k("flex w-[300px] shrink-0 flex-col rounded-xl p-1 transition-colors",d===f&&"bg-muted/50"),children:[s.jsxs("div",{className:"sticky top-0 z-10 flex items-center gap-2 bg-background px-2 py-1.5",children:[s.jsx(v,{size:15,className:k("shrink-0",h.iconClassName)}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:h.label}),s.jsx("span",{className:"rounded-md bg-muted px-1.5 text-[11px] font-medium text-muted-foreground",children:j.length}),s.jsx("button",{type:"button","aria-label":`New task in ${h.label}`,title:`New task in ${h.label}`,onClick:()=>i(f),className:"ml-auto flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:s.jsx(Ot,{size:15})})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2 pt-1",children:j.map(p=>s.jsx(kl,{item:p,assignee:p.assigneeId?a.get(p.assigneeId):void 0,assignedBy:p.assignedBy?a.get(p.assignedBy):void 0,onOpen:()=>n(p),onAutoFix:o?()=>o(p):void 0},p.id))})]},f)}),e[2]=l,e[3]=a,e[4]=o,e[5]=i,e[6]=r,e[7]=n,e[8]=d,e[9]=x):x=e[9];let b;return e[10]!==x?(b=s.jsx("div",{ref:g,className:"min-h-0 flex-1 overflow-x-auto overflow-y-auto",children:s.jsx("div",{className:"mx-auto flex w-full max-w-[1680px] gap-3 px-4 pt-6 pb-16 sm:px-8",children:x})}),e[10]=x,e[11]=b):b=e[11],b}function Dl(t){return`${t.id}:${t.status}`}function kl(t){const e=z.c(33),{item:l,assignee:a,assignedBy:n,onOpen:i,onAutoFix:r}=t,o=ae[l.status],d=o.icon,u=ls(l)?.lastMessage,g=r&&(l.status==="triage"||l.status==="todo")&&l.assigneeId!==pe,m=l.id;let c;e[0]!==l.id?(c=C=>{C.dataTransfer.setData("text/plain",l.id),C.dataTransfer.effectAllowed="move"},e[0]=l.id,e[1]=c):c=e[1];const x=l.title;let b;e[2]!==o.iconClassName?(b=k("mt-px shrink-0",o.iconClassName),e[2]=o.iconClassName,e[3]=b):b=e[3];let f;e[4]!==d||e[5]!==b?(f=s.jsx(d,{size:16,className:b}),e[4]=d,e[5]=b,e[6]=f):f=e[6];let j;e[7]!==l.title?(j=s.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium leading-snug text-foreground line-clamp-2",children:l.title}),e[7]=l.title,e[8]=j):j=e[8];let h;e[9]!==n||e[10]!==a||e[11]!==l?(h=s.jsx(ds,{item:l,assignee:a,assignedBy:n}),e[9]=n,e[10]=a,e[11]=l,e[12]=h):h=e[12];let v;e[13]!==f||e[14]!==j||e[15]!==h?(v=s.jsxs("div",{className:"flex items-start gap-2",children:[f,j,h]}),e[13]=f,e[14]=j,e[15]=h,e[16]=v):v=e[16];let p;e[17]!==u?(p=u&&s.jsx("p",{className:"line-clamp-2 pl-6 text-xs leading-snug text-muted-foreground",children:u}),e[17]=u,e[18]=p):p=e[18];let N;e[19]!==l?(N=(Tt(l)||l.priority!=="none"||!!l.dueDate)&&s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pl-6",children:[Tt(l)&&s.jsx(is,{}),l.priority!=="none"&&s.jsx(os,{priority:l.priority}),l.dueDate&&s.jsx(cs,{iso:l.dueDate})]}),e[19]=l,e[20]=N):N=e[20];let y;e[21]!==r||e[22]!==g?(y=g&&s.jsxs("button",{type:"button",onClick:C=>{C.stopPropagation(),r()},className:"flex items-center gap-1.5 self-end rounded-md border border-border bg-background px-2 py-1 text-xs font-medium text-foreground transition-colors hover:bg-accent",children:[s.jsx(Ns,{size:12}),"Auto-fix"]}),e[21]=r,e[22]=g,e[23]=y):y=e[23];let w;return e[24]!==l.id||e[25]!==l.title||e[26]!==i||e[27]!==N||e[28]!==y||e[29]!==c||e[30]!==v||e[31]!==p?(w=s.jsxs("button",{type:"button",draggable:!0,"data-flip-id":m,onDragStart:c,onClick:i,className:"group flex cursor-grab flex-col gap-2 rounded-xl bg-card px-3 py-2.5 text-left card-shadow transition-colors will-change-transform hover:bg-accent/60 active:cursor-grabbing",title:x,children:[v,p,N,y]}),e[24]=l.id,e[25]=l.title,e[26]=i,e[27]=N,e[28]=y,e[29]=c,e[30]=v,e[31]=p,e[32]=w):w=e[32],w}function Il(t){const e=z.c(30),{item:l,assignee:a,assignedBy:n,onOpen:i}=t,r=ae[l.status],o=r.icon;let d;e[0]!==r.iconClassName?(d=k("shrink-0",r.iconClassName),e[0]=r.iconClassName,e[1]=d):d=e[1];let u;e[2]!==o||e[3]!==d?(u=s.jsx(o,{size:16,className:d}),e[2]=o,e[3]=d,e[4]=u):u=e[4];let g;e[5]!==l.title?(g=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l.title}),e[5]=l.title,e[6]=g):g=e[6];let m;e[7]!==l?(m=Tt(l)&&s.jsx(is,{}),e[7]=l,e[8]=m):m=e[8];let c;e[9]!==l.priority?(c=l.priority!=="none"&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(os,{priority:l.priority})}),e[9]=l.priority,e[10]=c):c=e[10];let x;e[11]!==l.dueDate?(x=l.dueDate&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(cs,{iso:l.dueDate})}),e[11]=l.dueDate,e[12]=x):x=e[12];let b;e[13]!==n||e[14]!==a||e[15]!==l?(b=s.jsx(ds,{item:l,assignee:a,assignedBy:n}),e[13]=n,e[14]=a,e[15]=l,e[16]=b):b=e[16];let f;e[17]!==l.createdAt?(f=_s(new Date(l.createdAt)),e[17]=l.createdAt,e[18]=f):f=e[18];let j;e[19]!==f?(j=s.jsx("span",{className:"hidden shrink-0 text-[11px] text-muted-foreground/70 sm:inline",children:f}),e[19]=f,e[20]=j):j=e[20];let h;return e[21]!==i||e[22]!==u||e[23]!==g||e[24]!==m||e[25]!==c||e[26]!==x||e[27]!==b||e[28]!==j?(h=s.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-xl bg-card px-4 py-3 text-left card-shadow transition-colors hover:bg-accent/60",children:[u,g,m,c,x,b,j]}),e[21]=i,e[22]=u,e[23]=g,e[24]=m,e[25]=c,e[26]=x,e[27]=b,e[28]=j,e[29]=h):h=e[29],h}const un=Object.freeze(Object.defineProperty({__proto__:null,TaskBoardPage:us,default:vl},Symbol.toStringTag,{value:"Module"}));export{oe as P,ae as S,el as T,Vs as a,ue as b,us as c,un as i,Hs as u};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DygzNtEl.js","assets/index-C0L0gsTW.js","assets/index-CFgygjls.css","assets/ArrowUp-BSi8m_NI.js","assets/chat-context-C25dXoU2.js","assets/autosend-CVKBSoqX.js","assets/hooks-BzEVckbF.js","assets/use-mcp-client-BdKdbY1c.js","assets/constants-D_FQAPnt.js","assets/auth-G8XwFsYg.js","assets/decopilot-sse-pool-CYX6Tudl.js","assets/backoff-CrEUbyZT.js","assets/delay-CnY5UFtP.js","assets/studio-tools-ewgo_KSD.js","assets/use-virtual-mcp-FOgOZ5UR.js","assets/use-collections-DPvr_YgZ.js","assets/use-ai-providers-pKViKz8M.js","assets/use-decopilot-events-BxMRiiL8.js","assets/tab-id-BijBBRwE.js","assets/use-organization-settings-lXzppKlV.js","assets/automation-runs-D2EjYowd.js","assets/select-DaW-txhM.js","assets/tooltip-isqb_L33.js","assets/Check-6KpG9Poi.js","assets/ChevronDown-Bh19zKPC.js","assets/ChevronUp-D01P3dTH.js","assets/useInfiniteQuery-DnWvnHb4.js","assets/use-infinite-scroll-DP0DDq39.js","assets/use-connection-BLRAY60o.js","assets/card-CFYGd4G4.js","assets/sidebar-DXI3EM6t.js","assets/LayoutLeft-Bnwt_58u.js","assets/use-mobile-DysDD1oQ.js","assets/X--9wQR3oP.js","assets/table-EefD0NNs.js","assets/empty-state-BgPu4m3t.js","assets/use-members-Ckezqa8p.js","assets/use-org-auth-client-B6RwFzAq.js","assets/use-clock-tick-u_Vtf1Lj.js","assets/AlertCircle-BbCAmPWx.js","assets/CheckCircle-XsQMSB0T.js","assets/Circle-ymdYpR9F.js","assets/agent-icon-C2H0mZ4S.js","assets/UserPlus01-DdwJL0S-.js","assets/Tool01-Ctjyodd_.js","assets/Settings02-Da9OPDRU.js","assets/Tool02-S9p0DD-w.js","assets/XCircle-BYNmvRjh.js","assets/ArrowUpRight-CTTNoYe_.js","assets/TrendUp01-D5HSY9n4.js","assets/ZapSquare-YVBjeS4K.js","assets/Users03-BRSRR5RV.js","assets/ChevronRight-C7wVU6xm.js","assets/Stars02-DmdPW83P.js","assets/Copy01-d1nLCuGq.js","assets/ZoomOut-n1xODnHK.js","assets/DotsVertical-DMfZlsta.js","assets/Globe01-m_iWwP7h.js","assets/Eye-CiT8XwGY.js","assets/FilterLines-CqSAYPc5.js","assets/Flag01-Cq61q-5f.js","assets/Star01-BrJPLmN9.js","assets/Globe04-vmdTamXy.js","assets/SwitchHorizontal01-DZyU5soe.js","assets/HardDrive-BrmDvJkR.js","assets/Key01-tPAaQviB.js","assets/LinkExternal01-CG3Pw9Hz.js","assets/List-Cpbq3xEO.js","assets/Monitor01-CTaiufH5.js","assets/Sun-CNNIP8Ck.js","assets/Package-BXwBjJnV.js","assets/Palette-CK7RPv71.js","assets/Play-DkYVecuj.js","assets/Plus-CJaBsq2g.js","assets/SearchLg-BAORD1IJ.js","assets/SearchMd-DtA-slqb.js","assets/Shield01-Bf4huk7h.js","assets/Stars01-Ce8lvBwj.js","assets/Trash01-D2i1ZJ_v.js","assets/Upload01-DP24F4zF.js","assets/User01-qgh-4MOH.js","assets/Users01-DrPyz4sb.js","assets/XClose-DMUE33fT.js","assets/Zap-BJ87dj__.js","assets/use-automations-CFU-FMsN.js","assets/useSuspenseInfiniteQuery-B4xKZYke.js","assets/badge-BktjijWS.js","assets/checkbox-yMmj9xt5.js","assets/command-SNY7B_ku.js","assets/index-DP6NLSOF.js","assets/dialog-PqLpQyqq.js","assets/popover-BnI3Hmon.js","assets/avatar-DvbNHJLZ.js","assets/format-time-BnbuEtat.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/use-copy-Cq1jTaYP.js","assets/file-type-icon-C9tb4Pv9.js","assets/monaco-editor-B60WMBSP.js","assets/index-CNNzBHqn.js","assets/index-C0ETTKkX.js","assets/shell-layout-ChcRldXd.js","assets/alert-dialog-8PO_NEz4.js","assets/required-auth-layout-5ad5Yeca.js","assets/use-org-sso-kQuOX4vh.js","assets/integration-icon-BMihitEU.js","assets/use-navigate-to-agent-6KXnwjTB.js","assets/reusable-new-chat-CouMjkYR.js","assets/AreaChart-CzSE0qU2.js","assets/form-DcUMHB3L.js","assets/label-COOh4ZDd.js","assets/input-CIDLFJ95.js","assets/drawer-DWHOBqh8.js","assets/collection-search-C0N7fg5i.js","assets/tabs-BnKonm_B.js","assets/toggle-group-Dhny4HAu.js","assets/use-deco-credits-C2LFVd8k.js","assets/connection-slug-eyAPH6o3.js","assets/connection-card-C5-Ny9zC.js","assets/use-registry-connections-Bcd6mFtX.js","assets/extract-connection-data-zsdsmr9p.js","assets/collection-tabs-C471jWFI.js","assets/textarea-DhI1-5gM.js","assets/connection-form-helpers-Ztgo65-p.js","assets/authenticate-and-persist-oauth-BY3qxXD3.js","assets/mcp-oauth-C0j_cI8V.js","assets/connect-desktop-dialog-D4T-WjeC.js","assets/select-model-DNQ_Bc53.js","assets/skeleton-BWpAqYVQ.js","assets/ai-providers-logos-DD3qZ33J.js","assets/settings-section-CuMlyr8Q.js","assets/dropdown-menu-jTbTQ73Y.js","assets/index-f4rlfBnn.js","assets/toolbar-B4surw5Y.js","assets/use-debounced-value-B3l11Ldt.js","assets/question-004-sINsf4GQ.js","assets/use-status-sounds-IdEwlcXf.js","assets/use-mcp-tools-CmX-eRYJ.js","assets/use-capability-C9oUxALq.js","assets/tools-list-BAvn4YFU.js","assets/switch-BRIW9pJ4.js","assets/use-debounced-autosave-D8Hwqd5i.js","assets/index-4uMh3Tum.js","assets/search-input-B9RPoBYs.js","assets/github-repo-picker-DEFFtBtV.js","assets/provision-repo-scoped-github-connection-CB4ICKHq.js","assets/use-secrets-DHYxqD--.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/companions-core-CuHRslnY.js","assets/toolbar-icon-button-CKvBfMgq.js","assets/calendar-BahKmdS1.js","assets/use-file-configs-BQ_BFCxD.js","assets/automation-list-row-DrTncGCf.js","assets/index-DDGTF8rc.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as z,l as k,j as s,r as I,C as At,n as Qt,m as Yt,d as wt,K as $t,B as xe,aX as ms,i as fs}from"./index-C0L0gsTW.js";import{g as re}from"./get-initials-D-f_fDFw.js";import{A as ie}from"./avatar-DvbNHJLZ.js";import{e as Et,a as xs,t as ps,f as gs,g as ut,b as Je,s as hs,c as Ht,h as bs,d as js,i as Ns}from"./UserPlus01-DdwJL0S-.js";import{i as ys}from"./List-Cpbq3xEO.js";import{s as Ot}from"./Plus-CJaBsq2g.js";import{e as vs}from"./constants-D_FQAPnt.js";import{u as Vt}from"./use-members-Ckezqa8p.js";import{u as Ft}from"./studio-tools-ewgo_KSD.js";import{t as Ss,T as Cs,S as pe}from"./decopilot-sse-pool-CYX6Tudl.js";import{u as ws}from"./use-decopilot-events-BxMRiiL8.js";import{a as _s}from"./format-time-BnbuEtat.js";import{i as Xt}from"./AlertCircle-BbCAmPWx.js";import{i as Jt}from"./CheckCircle-XsQMSB0T.js";import{i as Ds}from"./Circle-ymdYpR9F.js";import{s as ks}from"./Eye-CiT8XwGY.js";import{a as Is,d as Ts,e as zs}from"./dialog-PqLpQyqq.js";import{a as mt,c as ft,d as Ve,D as xt}from"./dropdown-menu-jTbTQ73Y.js";import{P as _t,a as Dt,b as kt}from"./popover-BnI3Hmon.js";import{b as Wt,C as Zt,a as fe,e as pt,d as es,c as ts}from"./command-SNY7B_ku.js";import{C as As}from"./calendar-BahKmdS1.js";import{u as $s}from"./use-copy-Cq1jTaYP.js";import{i as Es}from"./Check-6KpG9Poi.js";import{i as Os}from"./ChevronRight-C7wVU6xm.js";import{a as Fs}from"./Copy01-d1nLCuGq.js";import{n as Bs}from"./LinkExternal01-CG3Pw9Hz.js";import{s as It}from"./User01-qgh-4MOH.js";import{i as Pt}from"./X--9wQR3oP.js";import{g as Rs,b as Ps,e as Ms,f as Ls,a as Us,D as qs}from"./drawer-DWHOBqh8.js";import{t as Bt}from"./ChevronDown-Bh19zKPC.js";import{i as ss}from"./FilterLines-CqSAYPc5.js";import{s as Ks}from"./Flag01-Cq61q-5f.js";import{u as Gs}from"./shell-layout-ChcRldXd.js";import{u as Qs}from"./use-organization-settings-lXzppKlV.js";function ue(t){const e=z.c(8),{size:l,className:a}=t,n=l===void 0?16:l;let i;e[0]!==n?(i={width:n,height:n},e[0]=n,e[1]=i):i=e[1];let r;e[2]!==a?(r=k("shrink-0 rounded-full object-cover",a),e[2]=a,e[3]=r):r=e[3];let o;return e[4]!==n||e[5]!==i||e[6]!==r?(o=s.jsx("img",{src:vs,alt:"Super Agent",width:n,height:n,style:i,className:r}),e[4]=n,e[5]=i,e[6]=r,e[7]=o):o=e[7],o}const Mt=()=>0;function Ys(t){const{orgSlug:e,enabled:l=!0,onUpdate:a,onDelete:n}=t,i=I.useRef(a);i.current=a;const r=I.useRef(n);r.current=n;const o=I.useRef(null),d=I.useRef(l),u=I.useRef(e);(!o.current||d.current!==l||u.current!==e)&&(d.current=l,u.current=e,o.current=m=>{if(!l||!e)return()=>{};const c=x=>{let b;try{b=JSON.parse(x.data)}catch{return}b.data&&(x.type===Cs?r.current?.(b.data.id):i.current(b.data)),m()};return Ss.subscribe(e,c)}),I.useSyncExternalStore(o.current,Mt,Mt)}function Hs(){const t=z.c(27),{org:e,locator:l}=At(),a=Ft(),n=Qt();let i;t[0]!==l?(i=$t.taskBoardItems(l),t[0]=l,t[1]=i):i=t[1];const r=i;let o;t[2]!==a?(o=async()=>(await a.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=a,t[3]=o):o=t[3];let d;t[4]!==r||t[5]!==o?(d={queryKey:r,queryFn:o},t[4]=r,t[5]=o,t[6]=d):d=t[6];const u=Yt(d);let g,m;t[7]!==n||t[8]!==r?(g=h=>{n.setQueryData(r,v=>{const p=v??[],N=h;return p.some(y=>y.id===N.id)?p.map(y=>y.id===N.id?N:y):[N,...p]})},m=h=>{n.setQueryData(r,v=>v?.filter(p=>p.id!==h))},t[7]=n,t[8]=r,t[9]=g,t[10]=m):(g=t[9],m=t[10]);let c;t[11]!==e.slug||t[12]!==g||t[13]!==m?(c={orgSlug:e.slug,onUpdate:g,onDelete:m},t[11]=e.slug,t[12]=g,t[13]=m,t[14]=c):c=t[14],Ys(c);let x;t[15]!==n||t[16]!==r?(x=h=>{const v=h.subject,p=h.data.status;n.setQueryData(r,N=>N?.map(y=>y.threads.some(w=>w.threadId===v)?{...y,threads:y.threads.map(w=>w.threadId===v?{...w,status:p}:w)}:y))},t[15]=n,t[16]=r,t[17]=x):x=t[17];let b;t[18]!==e.slug||t[19]!==x?(b={orgSlug:e.slug,onTaskStatus:x},t[18]=e.slug,t[19]=x,t[20]=b):b=t[20],ws(b);let f;t[21]!==u.data?(f=u.data??[],t[21]=u.data,t[22]=f):f=t[22];let j;return t[23]!==u.error||t[24]!==u.isLoading||t[25]!==f?(j={items:f,isLoading:u.isLoading,error:u.error},t[23]=u.error,t[24]=u.isLoading,t[25]=f,t[26]=j):j=t[26],j}function Vs(){const t=z.c(30),{locator:e}=At(),l=Ft(),a=Qt();let n;t[0]!==e?(n=$t.taskBoardItems(e),t[0]=e,t[1]=n):n=t[1];const i=n;let r;t[2]!==a||t[3]!==i?(r=()=>a.invalidateQueries({queryKey:i}),t[2]=a,t[3]=i,t[4]=r):r=t[4];const o=r;let d;t[5]!==l?(d=N=>l.call("TASK_BOARD_ITEM_CREATE",N),t[5]=l,t[6]=d):d=t[6];let u;t[7]!==o||t[8]!==d?(u={mutationFn:d,onSuccess:o},t[7]=o,t[8]=d,t[9]=u):u=t[9];const g=wt(u);let m;t[10]!==l?(m=N=>l.call("TASK_BOARD_ITEM_UPDATE",N),t[10]=l,t[11]=m):m=t[11];let c,x;t[12]!==a||t[13]!==i?(c=async N=>{await a.cancelQueries({queryKey:i});const y=a.getQueryData(i);return a.setQueryData(i,w=>w?.map(C=>C.id===N.id?{...C,...N}:C)),{previous:y}},x=(N,y,w)=>{w?.previous&&a.setQueryData(i,w.previous)},t[12]=a,t[13]=i,t[14]=c,t[15]=x):(c=t[14],x=t[15]);let b;t[16]!==o||t[17]!==m||t[18]!==c||t[19]!==x?(b={mutationFn:m,onMutate:c,onError:x,onSettled:o},t[16]=o,t[17]=m,t[18]=c,t[19]=x,t[20]=b):b=t[20];const f=wt(b);let j;t[21]!==l?(j=N=>l.call("TASK_BOARD_ITEM_DELETE",{id:N}),t[21]=l,t[22]=j):j=t[22];let h;t[23]!==o||t[24]!==j?(h={mutationFn:j,onSuccess:o},t[23]=o,t[24]=j,t[25]=h):h=t[25];const v=wt(h);let p;return t[26]!==g||t[27]!==v||t[28]!==f?(p={create:g,update:f,remove:v},t[26]=g,t[27]=v,t[28]=f,t[29]=p):p=t[29],p}function Tt(t){return t.threads.some(e=>e.status==="requires_action")}function ls(t){return t.threads[0]}const ns=["triage","todo","in_progress","in_review","done"],ae={triage:{label:"Backlog",icon:Xt,iconClassName:"text-muted-foreground"},todo:{label:"To Do",icon:Ds,iconClassName:"text-muted-foreground"},in_progress:{label:"In Progress",icon:Et,iconClassName:"text-primary"},in_review:{label:"In Review",icon:ks,iconClassName:"text-warning"},done:{label:"Done",icon:Jt,iconClassName:"text-success"}},as=["none","low","medium","high","urgent"],oe={none:{label:"No priority",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50"},low:{label:"Low",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40"},medium:{label:"Medium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500"},high:{label:"High",flagClassName:"text-warning",dotClassName:"bg-warning"},urgent:{label:"Urgent",flagClassName:"text-destructive",dotClassName:"bg-destructive"}};function Xs(t){const e=z.c(10),{locator:l}=At(),a=Ft();let n;e[0]!==t||e[1]!==l?(n=$t.taskBoardItemPrs(l,t??""),e[0]=t,e[1]=l,e[2]=n):n=e[2];const i=!!t;let r;e[3]!==t||e[4]!==a?(r=async()=>(await a.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:t})).prs,e[3]=t,e[4]=a,e[5]=r):r=e[5];let o;return e[6]!==n||e[7]!==i||e[8]!==r?(o={queryKey:n,enabled:i,queryFn:r},e[6]=n,e[7]=i,e[8]=r,e[9]=o):o=e[9],Yt(o)}function Js(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function Lt(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Ws=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),Xe="inline-flex h-9 items-center gap-2 rounded-lg border border-border px-3 text-sm font-medium text-foreground transition-colors hover:bg-muted sm:border-transparent",Zs={failed:{label:"Error",className:"text-destructive",icon:bs},requires_action:{label:"Needs input",className:"text-warning",icon:Ht},in_progress:{label:"Running",className:"text-primary",icon:Et,spin:!0},completed:{label:"Completed",className:"text-success",icon:Jt},expired:{label:"Expired",className:"text-muted-foreground",icon:Xt}};function el(t){const e=z.c(164),{open:l,onClose:a,item:n,defaultStatus:i,onSubmit:r,onDelete:o,onOpenThread:d,isSaving:u}=t,{data:g}=Vt();let m;e[0]!==g?.data?.members?(m=g?.data?.members??[],e[0]=g?.data?.members,e[1]=m):m=e[1];const c=m,{handleCopy:x,copied:b}=$s(),[f,j]=I.useState(n?.title??""),[h,v]=I.useState(n?.description??""),[p,N]=I.useState(n?.status??i??"triage"),[y,w]=I.useState(n?.priority??"medium"),[C,O]=I.useState(n?.assigneeId??null),L=n?.dueDate;let Y;e[2]!==L?(Y=Lt(L),e[2]=L,e[3]=Y):Y=e[3];const[T,U]=I.useState(Y),[q,R]=I.useState(!1),[B,F]=I.useState(!1);let P;e[4]!==i||e[5]!==n?.assigneeId||e[6]!==n?.description||e[7]!==n?.dueDate||e[8]!==n?.priority||e[9]!==n?.status||e[10]!==n?.title?(P=()=>{j(n?.title??""),v(n?.description??""),N(n?.status??i??"triage"),w(n?.priority??"medium"),O(n?.assigneeId??null),U(Lt(n?.dueDate))},e[4]=i,e[5]=n?.assigneeId,e[6]=n?.description,e[7]=n?.dueDate,e[8]=n?.priority,e[9]=n?.status,e[10]=n?.title,e[11]=P):P=e[11];const A=P;let H;e[12]!==a||e[13]!==A?(H=()=>{a(),A()},e[12]=a,e[13]=A,e[14]=H):H=e[14];const _=H;let $;e[15]!==C||e[16]!==h||e[17]!==T||e[18]!==r||e[19]!==y||e[20]!==p||e[21]!==f?($=()=>{const S=f.trim();S&&r({title:S,description:h.trim()||null,status:p,priority:y,assigneeId:C,dueDate:T?Js(T):null})},e[15]=C,e[16]=h,e[17]=T,e[18]=r,e[19]=y,e[20]=p,e[21]=f,e[22]=$):$=e[22];const K=$,M=C===pe;let Q;if(e[23]!==C||e[24]!==c){let S;e[26]!==C?(S=W=>W.userId===C,e[26]=C,e[27]=S):S=e[27],Q=c.find(S),e[23]=C,e[24]=c,e[25]=Q}else Q=e[25];const G=Q;let se;e[28]!==n||e[29]!==c?(se=n?.assignedBy?c.find(S=>S.userId===n.assignedBy):void 0,e[28]=n,e[29]=c,e[30]=se):se=e[30];const E=se,te=ae[p].icon;let ce;e[31]!==n?(ce=n?ls(n):void 0,e[31]=n,e[32]=ce):ce=e[32];const le=ce;let V;e[33]!==_?(V=S=>!S&&_(),e[33]=_,e[34]=V):V=e[34];const me=n?"Edit task":"New task";let Z;e[35]!==me?(Z=s.jsx(Is,{className:"sr-only",children:me}),e[35]=me,e[36]=Z):Z=e[36];let ee;e[37]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(Pt,{size:16}),e[37]=ee):ee=e[37];let X;e[38]!==_?(X=s.jsx("button",{type:"button","aria-label":"Close",onClick:_,className:"absolute right-2.5 top-2.5 z-10 flex size-10 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:ee}),e[38]=_,e[39]=X):X=e[39];let ne;e[40]===Symbol.for("react.memo_cache_sentinel")?(ne=S=>{j(S.target.value),S.target.style.height="auto",S.target.style.height=`${S.target.scrollHeight}px`},e[40]=ne):ne=e[40];let J;e[41]!==f?(J=s.jsx("textarea",{ref:sl,value:f,onChange:ne,onKeyDown:tl,placeholder:"Task title...",autoFocus:!0,rows:1,className:"w-full resize-none overflow-hidden border-0 bg-transparent text-xl font-medium leading-snug text-foreground outline-none placeholder:text-foreground/30"}),e[41]=f,e[42]=J):J=e[42];let D;e[43]===Symbol.for("react.memo_cache_sentinel")?(D=S=>v(S.target.value),e[43]=D):D=e[43];let de;e[44]!==h?(de=s.jsx("textarea",{value:h,onChange:D,placeholder:"Describe a task for an agent...",className:"min-h-[96px] w-full flex-1 resize-none border-0 bg-transparent text-[15px] leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/50 sm:min-h-[120px]"}),e[44]=h,e[45]=de):de=e[45];let ge;e[46]!==b||e[47]!==h||e[48]!==x?(ge=h&&s.jsx(xe,{type:"button",variant:"ghost",size:"icon","aria-label":"Copy description",className:"absolute right-0 top-0 size-7 text-muted-foreground opacity-0 transition-opacity hover:text-foreground group-hover:opacity-100",onClick:()=>x(h),children:b?s.jsx(Es,{size:14}):s.jsx(Fs,{size:14})}),e[46]=b,e[47]=h,e[48]=x,e[49]=ge):ge=e[49];let he;e[50]!==de||e[51]!==ge?(he=s.jsxs("div",{className:"group relative flex flex-1 flex-col",children:[de,ge]}),e[50]=de,e[51]=ge,e[52]=he):he=e[52];let be;e[53]!==E||e[54]!==G||e[55]!==d||e[56]!==le?(be=le&&s.jsx(ll,{thread:le,startedBy:E??G,onOpen:d}),e[53]=E,e[54]=G,e[55]=d,e[56]=le,e[57]=be):be=e[57];let je;e[58]!==n?(je=n?.id&&s.jsx(rl,{itemId:n.id}),e[58]=n,e[59]=je):je=e[59];let Ne;e[60]!==J||e[61]!==he||e[62]!==be||e[63]!==je?(Ne=s.jsxs("div",{className:"flex min-w-0 flex-col gap-6 p-6 sm:flex-1 sm:overflow-y-auto sm:p-8",children:[J,he,be,je]}),e[60]=J,e[61]=he,e[62]=be,e[63]=je,e[64]=Ne):Ne=e[64];let We;e[65]===Symbol.for("react.memo_cache_sentinel")?(We=s.jsx("span",{className:"hidden px-3 text-sm text-muted-foreground sm:block",children:"Properties"}),e[65]=We):We=e[65];const bt=ae[p];let ye;e[66]!==te||e[67]!==bt.iconClassName?(ye=s.jsx(te,{size:16,className:bt.iconClassName}),e[66]=te,e[67]=bt.iconClassName,e[68]=ye):ye=e[68];const jt=ae[p];let ve;e[69]!==ye||e[70]!==jt.label?(ve=s.jsx(mt,{asChild:!0,children:s.jsxs("button",{type:"button",className:Xe,children:[ye,jt.label]})}),e[69]=ye,e[70]=jt.label,e[71]=ve):ve=e[71];let Ze;e[72]===Symbol.for("react.memo_cache_sentinel")?(Ze=s.jsx(ft,{align:"start",className:"w-44",children:ns.map(S=>{const W=ae[S].icon;return s.jsxs(Ve,{onSelect:()=>N(S),className:"gap-2",children:[s.jsx(W,{size:16,className:ae[S].iconClassName}),ae[S].label]},S)})}),e[72]=Ze):Ze=e[72];let Se;e[73]!==ve?(Se=s.jsxs(xt,{children:[ve,Ze]}),e[73]=ve,e[74]=Se):Se=e[74];const Nt=y==="none"&&"text-muted-foreground";let Ce;e[75]!==Nt?(Ce=k(Xe,Nt),e[75]=Nt,e[76]=Ce):Ce=e[76];let we;e[77]!==y?(we=y==="none"?s.jsxs(s.Fragment,{children:[s.jsx(xs,{size:16}),"Set priority"]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:k("size-2 rounded-full",oe[y].dotClassName)}),oe[y].label]}),e[77]=y,e[78]=we):we=e[78];let _e;e[79]!==Ce||e[80]!==we?(_e=s.jsx(mt,{asChild:!0,children:s.jsx("button",{type:"button",className:Ce,children:we})}),e[79]=Ce,e[80]=we,e[81]=_e):_e=e[81];let et;e[82]===Symbol.for("react.memo_cache_sentinel")?(et=s.jsx(ft,{align:"start",className:"w-40",children:as.map(S=>s.jsxs(Ve,{onSelect:()=>w(S),children:[s.jsx("span",{className:k("size-2 rounded-full",oe[S].dotClassName)}),oe[S].label]},S))}),e[82]=et):et=e[82];let De;e[83]!==_e?(De=s.jsxs(xt,{children:[_e,et]}),e[83]=_e,e[84]=De):De=e[84];const yt=!C&&"text-muted-foreground";let ke;e[85]!==yt?(ke=k(Xe,yt),e[85]=yt,e[86]=ke):ke=e[86];let Ie;e[87]!==E||e[88]!==G||e[89]!==M?(Ie=M&&E?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[s.jsx(ie,{url:E.user?.image??void 0,fallback:re(E.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:E.user?.name??"Super Agent"})]}),s.jsxs("span",{className:"flex items-center gap-2 sm:hidden",children:[s.jsxs("span",{className:"inline-flex items-center",children:[s.jsx(ie,{url:E.user?.image??void 0,fallback:re(E.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),s.jsx(ue,{size:16,className:"ring-2 ring-background"})]}),"Super Agent"]})]}):M?s.jsxs(s.Fragment,{children:[s.jsx(ue,{size:16}),"Super Agent"]}):G?s.jsxs(s.Fragment,{children:[s.jsx(ie,{url:G.user?.image??void 0,fallback:re(G.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:G.user?.name??"Unassigned"})]}):s.jsxs(s.Fragment,{children:[s.jsx(ps,{size:16,className:"text-muted-foreground"}),"Assign"]}),e[87]=E,e[88]=G,e[89]=M,e[90]=Ie):Ie=e[90];let Te;e[91]!==ke||e[92]!==Ie?(Te=s.jsx(_t,{asChild:!0,children:s.jsx("button",{type:"button",className:ke,children:Ie})}),e[91]=ke,e[92]=Ie,e[93]=Te):Te=e[93];let tt;e[94]===Symbol.for("react.memo_cache_sentinel")?(tt=s.jsx(Wt,{placeholder:"Assign to…",className:"h-9"}),e[94]=tt):tt=e[94];let st;e[95]===Symbol.for("react.memo_cache_sentinel")?(st=s.jsx(Zt,{children:"No members found."}),e[95]=st):st=e[95];let lt;e[96]===Symbol.for("react.memo_cache_sentinel")?(lt=()=>{O(pe),F(!1)},e[96]=lt):lt=e[96];let nt;e[97]===Symbol.for("react.memo_cache_sentinel")?(nt=s.jsxs(fe,{value:"Super Agent",onSelect:lt,className:"gap-2",children:[s.jsx(ue,{size:16}),s.jsx("span",{className:"truncate",children:"Super Agent"})]}),e[97]=nt):nt=e[97];let at;e[98]===Symbol.for("react.memo_cache_sentinel")?(at=()=>{O(null),F(!1)},e[98]=at):at=e[98];let rt;e[99]===Symbol.for("react.memo_cache_sentinel")?(rt=s.jsxs(pt,{children:[nt,s.jsxs(fe,{value:"Unassigned",onSelect:at,className:"gap-2",children:[s.jsx(It,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"truncate",children:"Unassigned"})]})]}),e[99]=rt):rt=e[99];let ze;if(e[100]!==c){let S;e[102]===Symbol.for("react.memo_cache_sentinel")?(S=W=>s.jsxs(fe,{value:W.user?.name??W.userId,onSelect:()=>{O(W.userId),F(!1)},className:"gap-2",children:[s.jsx(ie,{url:W.user?.image??void 0,fallback:re(W.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:W.user?.name??W.userId})]},W.userId),e[102]=S):S=e[102],ze=c.map(S),e[100]=c,e[101]=ze}else ze=e[101];let Ae;e[103]!==ze?(Ae=s.jsx(Dt,{align:"start",className:"w-56 p-0",children:s.jsxs(es,{children:[tt,s.jsxs(ts,{children:[st,rt,s.jsx(pt,{heading:"Members",children:ze})]})]})}),e[103]=ze,e[104]=Ae):Ae=e[104];let $e;e[105]!==B||e[106]!==Te||e[107]!==Ae?($e=s.jsxs(kt,{open:B,onOpenChange:F,children:[Te,Ae]}),e[105]=B,e[106]=Te,e[107]=Ae,e[108]=$e):$e=e[108];let Ee;e[109]!==E||e[110]!==M?(Ee=M&&E&&s.jsxs("div",{className:"relative mt-1.5 hidden items-center pl-5 sm:flex",children:[s.jsx("span",{className:"absolute -top-1.5 left-5 h-[calc(50%+0.375rem)] w-2.5 rounded-bl-md border-b border-l border-border"}),s.jsxs("span",{className:k(Xe,"pointer-events-none"),children:[s.jsx(ue,{size:16}),"Super Agent"]})]}),e[109]=E,e[110]=M,e[111]=Ee):Ee=e[111];let Oe;e[112]!==$e||e[113]!==Ee?(Oe=s.jsxs("div",{className:"flex flex-col",children:[$e,Ee]}),e[112]=$e,e[113]=Ee,e[114]=Oe):Oe=e[114];const vt=!T&&"text-muted-foreground";let Fe;e[115]!==vt?(Fe=k(Xe,vt),e[115]=vt,e[116]=Fe):Fe=e[116];let it;e[117]===Symbol.for("react.memo_cache_sentinel")?(it=s.jsx(Je,{size:16,className:"text-muted-foreground"}),e[117]=it):it=e[117];let Be;e[118]!==T?(Be=T?Ws.format(T):"Due date",e[118]=T,e[119]=Be):Be=e[119];let Re;e[120]!==T?(Re=T&&s.jsx("span",{role:"button",tabIndex:0,"aria-label":"Clear due date",className:"-mr-1 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:S=>{S.stopPropagation(),U(null)},onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),S.stopPropagation(),U(null))},children:s.jsx(Pt,{size:12})}),e[120]=T,e[121]=Re):Re=e[121];let Pe;e[122]!==Fe||e[123]!==Be||e[124]!==Re?(Pe=s.jsx(_t,{asChild:!0,children:s.jsxs("button",{type:"button",className:Fe,children:[it,Be,Re]})}),e[122]=Fe,e[123]=Be,e[124]=Re,e[125]=Pe):Pe=e[125];const St=T??void 0;let ot;e[126]===Symbol.for("react.memo_cache_sentinel")?(ot=S=>{U(S??null),S&&R(!1)},e[126]=ot):ot=e[126];let Me;e[127]!==St?(Me=s.jsx(Dt,{className:"w-auto p-0",align:"start",children:s.jsx(As,{mode:"single",selected:St,onSelect:ot,initialFocus:!0})}),e[127]=St,e[128]=Me):Me=e[128];let Le;e[129]!==q||e[130]!==Pe||e[131]!==Me?(Le=s.jsxs(kt,{open:q,onOpenChange:R,children:[Pe,Me]}),e[129]=q,e[130]=Pe,e[131]=Me,e[132]=Le):Le=e[132];let Ue;e[133]!==Se||e[134]!==De||e[135]!==Oe||e[136]!==Le?(Ue=s.jsxs("div",{className:"flex w-full shrink-0 flex-col gap-4 border-t border-border p-6 sm:w-[220px] sm:border-t-0 sm:border-l sm:px-6 sm:py-10",children:[We,s.jsxs("div",{className:"flex flex-wrap gap-2 sm:flex-col",children:[Se,De,Oe,Le]})]}),e[133]=Se,e[134]=De,e[135]=Oe,e[136]=Le,e[137]=Ue):Ue=e[137];let qe;e[138]!==Ne||e[139]!==Ue?(qe=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto sm:flex-row sm:overflow-hidden",children:[Ne,Ue]}),e[138]=Ne,e[139]=Ue,e[140]=qe):qe=e[140];let Ke;e[141]!==n||e[142]!==o?(Ke=n&&o?s.jsx(xe,{variant:"ghost",size:"icon","aria-label":"Delete task",className:"size-10 text-muted-foreground hover:text-destructive",onClick:o,children:s.jsx(hs,{size:16})}):s.jsx("span",{}),e[141]=n,e[142]=o,e[143]=Ke):Ke=e[143];let Ge;e[144]!==u||e[145]!==f?(Ge=!f.trim()||u,e[144]=u,e[145]=f,e[146]=Ge):Ge=e[146];let ct;e[147]===Symbol.for("react.memo_cache_sentinel")?(ct=s.jsx(Ot,{size:16}),e[147]=ct):ct=e[147];const Ct=n?"Save":"Create task";let Qe;e[148]!==K||e[149]!==Ge||e[150]!==Ct?(Qe=s.jsxs(xe,{size:"sm",disabled:Ge,onClick:K,children:[ct,Ct]}),e[148]=K,e[149]=Ge,e[150]=Ct,e[151]=Qe):Qe=e[151];let Ye;e[152]!==Ke||e[153]!==Qe?(Ye=s.jsxs("div",{className:"flex h-16 items-center justify-between border-t border-border px-4",children:[Ke,Qe]}),e[152]=Ke,e[153]=Qe,e[154]=Ye):Ye=e[154];let He;e[155]!==Z||e[156]!==X||e[157]!==qe||e[158]!==Ye?(He=s.jsxs(Ts,{className:"flex max-h-[90vh] flex-col gap-0 overflow-hidden rounded-2xl p-0 sm:h-[85vh] sm:max-h-[640px] sm:max-w-[850px]",closeButtonClassName:"hidden",children:[Z,X,qe,Ye]}),e[155]=Z,e[156]=X,e[157]=qe,e[158]=Ye,e[159]=He):He=e[159];let dt;return e[160]!==l||e[161]!==V||e[162]!==He?(dt=s.jsx(zs,{open:l,onOpenChange:V,children:He}),e[160]=l,e[161]=V,e[162]=He,e[163]=dt):dt=e[163],dt}function tl(t){t.key==="Enter"&&t.preventDefault()}function sl(t){t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function ll(t){const e=z.c(14),{thread:l,startedBy:a,onOpen:n}=t,i=l.status?Zs[l.status]:null,r=l.lastMessage??l.title;let o,d;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ue,{size:16}),d=s.jsx("span",{className:"text-sm text-foreground",children:"Super Agent"}),e[0]=o,e[1]=d):(o=e[0],d=e[1]);let u;e[2]!==a?(u=a&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-sm text-muted-foreground/50",children:"started by"}),s.jsx(ie,{url:a.user?.image??void 0,fallback:re(a.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate text-sm text-foreground",children:a.user?.name??"someone"})]}),e[2]=a,e[3]=u):u=e[3];let g;e[4]!==u?(g=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[o,d,u]}),e[4]=u,e[5]=g):g=e[5];let m;e[6]!==r||e[7]!==n||e[8]!==i||e[9]!==l?(m=i&&s.jsxs("button",{type:"button",disabled:!n,onClick:()=>n?.(l),className:"flex items-center gap-2 border-t border-border px-4 py-2 text-left transition-colors enabled:hover:bg-muted disabled:cursor-default",children:[s.jsxs("span",{className:k("flex items-center gap-1.5",i.className),children:[s.jsx(i.icon,{size:16,className:k(i.spin&&"animate-spin")}),s.jsx("span",{className:"text-sm",children:i.label})]}),r&&s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:r}),n&&s.jsx(Os,{size:16,className:"ml-auto shrink-0 text-muted-foreground"})]}),e[6]=r,e[7]=n,e[8]=i,e[9]=l,e[10]=m):m=e[10];let c;return e[11]!==g||e[12]!==m?(c=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[g,m]}),e[11]=g,e[12]=m,e[13]=c):c=e[13],c}function nl(t){return t.merged?{label:"Merged",className:"text-special",icon:gs}:t.state==="closed"?{label:"Closed",className:"text-destructive",icon:ut}:t.draft?{label:"Draft",className:"text-muted-foreground",icon:ut}:{label:"Open",className:"text-success",icon:ut}}function al(t){const e=z.c(38),{pr:l}=t;let a,n,i,r,o,d,u,g;if(e[0]!==l){n=nl(l);let y;e[9]!==l.body?(y=l.body?.trim(),e[9]=l.body,e[10]=y):y=e[10],a=y,o=l.url,d="_blank",u="noreferrer",g="flex flex-col gap-1 border-t border-border px-4 py-2 transition-colors hover:bg-muted",r="flex items-center gap-2",i=k("flex items-center gap-1.5",n.className),e[0]=l,e[1]=a,e[2]=n,e[3]=i,e[4]=r,e[5]=o,e[6]=d,e[7]=u,e[8]=g}else a=e[1],n=e[2],i=e[3],r=e[4],o=e[5],d=e[6],u=e[7],g=e[8];let m;e[11]!==n.icon?(m=s.jsx(n.icon,{size:16}),e[11]=n.icon,e[12]=m):m=e[12];let c;e[13]!==n.label?(c=s.jsx("span",{className:"text-sm",children:n.label}),e[13]=n.label,e[14]=c):c=e[14];let x;e[15]!==i||e[16]!==m||e[17]!==c?(x=s.jsxs("span",{className:i,children:[m,c]}),e[15]=i,e[16]=m,e[17]=c,e[18]=x):x=e[18];const b=l.title??`${l.repoOwner}/${l.repoName}`;let f;e[19]!==b?(f=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:b}),e[19]=b,e[20]=f):f=e[20];let j;e[21]!==l.number?(j=s.jsxs("span",{className:"shrink-0 text-sm text-muted-foreground",children:["#",l.number]}),e[21]=l.number,e[22]=j):j=e[22];let h;e[23]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Bs,{size:16,className:"shrink-0 text-muted-foreground"}),e[23]=h):h=e[23];let v;e[24]!==f||e[25]!==j||e[26]!==r||e[27]!==x?(v=s.jsxs("span",{className:r,children:[x,f,j,h]}),e[24]=f,e[25]=j,e[26]=r,e[27]=x,e[28]=v):v=e[28];let p;e[29]!==a?(p=a?s.jsx("span",{className:"line-clamp-3 whitespace-pre-line text-xs text-muted-foreground",children:a}):null,e[29]=a,e[30]=p):p=e[30];let N;return e[31]!==v||e[32]!==p||e[33]!==o||e[34]!==d||e[35]!==u||e[36]!==g?(N=s.jsxs("a",{href:o,target:d,rel:u,className:g,children:[v,p]}),e[31]=v,e[32]=p,e[33]=o,e[34]=d,e[35]=u,e[36]=g,e[37]=N):N=e[37],N}function rl(t){const e=z.c(5),{itemId:l}=t,{data:a,isLoading:n}=Xs(l);if(!n&&(!a||a.length===0))return null;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[s.jsx(ut,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm text-foreground",children:"Pull requests"})]}),e[0]=i):i=e[0];let r;e[1]!==a?(r=a?a.map(il):s.jsxs("div",{className:"flex items-center gap-2 border-t border-border px-4 py-2 text-sm text-muted-foreground",children:[s.jsx(Et,{size:16,className:"animate-spin"}),s.jsx("span",{children:"Loading…"})]}),e[1]=a,e[2]=r):r=e[2];let o;return e[3]!==r?(o=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[i,r]}),e[3]=r,e[4]=o):o=e[4],o}function il(t){return s.jsx(al,{pr:t},t.url)}const zt="__unassigned__",gt={assignee:null,priority:null,due:null};function ol(t){return t.assignee!==null||t.priority!==null||t.due!==null}function cl(t){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)}const dl=864e5;function ul(t,e){const l=new Date(t),a=new Date(e);return l.getFullYear()===a.getFullYear()&&l.getMonth()===a.getMonth()&&l.getDate()===a.getDate()}function ml(t,e){if(e.assignee!==null){if(e.assignee===zt){if(t.assigneeId!==null)return!1}else if(t.assigneeId!==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 l=new Date(t.dueDate).getTime(),a=Date.now();if(e.due==="overdue"&&l>=a||e.due==="today"&&!ul(l,a)||e.due==="week"&&(l<a||l>a+7*dl))return!1}return!0}const Ut=[{value:"overdue",label:"Overdue"},{value:"today",label:"Due today"},{value:"week",label:"Due this week"},{value:"none",label:"No due date"}];function ht(t,e=!1){return k("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors",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 fl(t){const e=z.c(62),{value:l,members:a,onChange:n,block:i}=t,[r,o]=I.useState(!1);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(It,{size:14,className:"shrink-0"}),e[0]=d):d=e[0];let u=d,g="Assignee";if(l===zt)g="Unassigned";else if(l===pe){let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(ue,{size:14}),e[1]=_):_=e[1],u=_,g="Super Agent"}else if(l){let _,$,K,M;if(e[2]!==a||e[3]!==l){let G;e[8]!==l?(G=se=>se.userId===l,e[8]=l,e[9]=G):G=e[9],$=a.find(G),_=ie,K=$?.user?.image??void 0,M=re($?.user?.name),e[2]=a,e[3]=l,e[4]=_,e[5]=$,e[6]=K,e[7]=M}else _=e[4],$=e[5],K=e[6],M=e[7];let Q;e[10]!==_||e[11]!==K||e[12]!==M?(Q=s.jsx(_,{url:K,fallback:M,shape:"circle",size:"2xs"}),e[10]=_,e[11]=K,e[12]=M,e[13]=Q):Q=e[13],u=Q,g=$?.user?.name??"Member"}let m;e[14]!==n?(m=_=>{n(_),o(!1)},e[14]=n,e[15]=m):m=e[15];const c=m,x=l!==null;let b;e[16]!==i||e[17]!==x?(b=ht(x,i),e[16]=i,e[17]=x,e[18]=b):b=e[18];const f=b,j=i&&"ml-auto";let h;e[19]!==j?(h=k("shrink-0 opacity-60",j),e[19]=j,e[20]=h):h=e[20];const v=h;let p;e[21]!==g?(p=s.jsx("span",{className:"max-w-[10rem] truncate",children:g}),e[21]=g,e[22]=p):p=e[22];let N;e[23]!==v?(N=s.jsx(Bt,{size:12,className:v}),e[23]=v,e[24]=N):N=e[24];let y;e[25]!==u||e[26]!==p||e[27]!==N||e[28]!==f?(y=s.jsx(_t,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,children:[u,p,N]})}),e[25]=u,e[26]=p,e[27]=N,e[28]=f,e[29]=y):y=e[29];let w;e[30]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(Wt,{placeholder:"Filter by assignee…",className:"h-9"}),e[30]=w):w=e[30];let C;e[31]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Zt,{children:"No members found."}),e[31]=C):C=e[31];let O;e[32]!==c?(O=s.jsx(fe,{value:"Anyone",onSelect:()=>c(null),children:"Anyone"}),e[32]=c,e[33]=O):O=e[33];let L;e[34]!==c?(L=()=>c(zt),e[34]=c,e[35]=L):L=e[35];let Y;e[36]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(It,{size:16,className:"text-muted-foreground"}),e[36]=Y):Y=e[36];let T;e[37]!==L?(T=s.jsxs(fe,{value:"Unassigned",onSelect:L,className:"gap-2",children:[Y,"Unassigned"]}),e[37]=L,e[38]=T):T=e[38];let U;e[39]!==c?(U=()=>c(pe),e[39]=c,e[40]=U):U=e[40];let q;e[41]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(ue,{size:16}),e[41]=q):q=e[41];let R;e[42]!==U?(R=s.jsxs(fe,{value:"Super Agent",onSelect:U,className:"gap-2",children:[q,"Super Agent"]}),e[42]=U,e[43]=R):R=e[43];let B;e[44]!==O||e[45]!==T||e[46]!==R?(B=s.jsxs(pt,{children:[O,T,R]}),e[44]=O,e[45]=T,e[46]=R,e[47]=B):B=e[47];let F;if(e[48]!==a||e[49]!==c){let _;e[51]!==c?(_=$=>s.jsxs(fe,{value:$.user?.name??$.userId,onSelect:()=>c($.userId),className:"gap-2",children:[s.jsx(ie,{url:$.user?.image??void 0,fallback:re($.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:$.user?.name??$.userId})]},$.userId),e[51]=c,e[52]=_):_=e[52],F=a.map(_),e[48]=a,e[49]=c,e[50]=F}else F=e[50];let P;e[53]!==F?(P=s.jsx(pt,{heading:"Members",children:F}),e[53]=F,e[54]=P):P=e[54];let A;e[55]!==B||e[56]!==P?(A=s.jsx(Dt,{align:"start",className:"w-56 p-0",children:s.jsxs(es,{children:[w,s.jsxs(ts,{children:[C,B,P]})]})}),e[55]=B,e[56]=P,e[57]=A):A=e[57];let H;return e[58]!==r||e[59]!==A||e[60]!==y?(H=s.jsxs(kt,{open:r,onOpenChange:o,children:[y,A]}),e[58]=r,e[59]=A,e[60]=y,e[61]=H):H=e[61],H}function xl(t){const e=z.c(23),{value:l,onChange:a,block:n}=t,i=l!==null;let r;e[0]!==n||e[1]!==i?(r=ht(i,n),e[0]=n,e[1]=i,e[2]=r):r=e[2];const o=r,d=n&&"ml-auto";let u;e[3]!==d?(u=k("shrink-0 opacity-60",d),e[3]=d,e[4]=u):u=e[4];const g=u;let m;e[5]!==l?(m=l?s.jsx("span",{className:k("size-2 shrink-0 rounded-full",oe[l].dotClassName)}):s.jsx(Ks,{size:14,className:"shrink-0"}),e[5]=l,e[6]=m):m=e[6];const c=l?oe[l].label:"Priority";let x;e[7]!==g?(x=s.jsx(Bt,{size:12,className:g}),e[7]=g,e[8]=x):x=e[8];let b;e[9]!==m||e[10]!==c||e[11]!==x||e[12]!==o?(b=s.jsx(mt,{asChild:!0,children:s.jsxs("button",{type:"button",className:o,children:[m,c,x]})}),e[9]=m,e[10]=c,e[11]=x,e[12]=o,e[13]=b):b=e[13];let f,j;e[14]!==a?(j=s.jsx(Ve,{onSelect:()=>a(null),children:"Any priority"}),f=as.map(p=>s.jsxs(Ve,{onSelect:()=>a(p),className:"gap-2",children:[s.jsx("span",{className:k("size-2 rounded-full",oe[p].dotClassName)}),oe[p].label]},p)),e[14]=a,e[15]=f,e[16]=j):(f=e[15],j=e[16]);let h;e[17]!==f||e[18]!==j?(h=s.jsxs(ft,{align:"start",className:"w-40",children:[j,f]}),e[17]=f,e[18]=j,e[19]=h):h=e[19];let v;return e[20]!==h||e[21]!==b?(v=s.jsxs(xt,{children:[b,h]}),e[20]=h,e[21]=b,e[22]=v):v=e[22],v}function pl(t){const e=z.c(27),{value:l,onChange:a,block:n}=t;let i;e[0]!==l?(i=Ut.find(C=>C.value===l)?.label,e[0]=l,e[1]=i):i=e[1];const r=i,o=l!==null;let d;e[2]!==n||e[3]!==o?(d=ht(o,n),e[2]=n,e[3]=o,e[4]=d):d=e[4];const u=d,g=n&&"ml-auto";let m;e[5]!==g?(m=k("shrink-0 opacity-60",g),e[5]=g,e[6]=m):m=e[6];const c=m;let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Je,{size:14,className:"shrink-0"}),e[7]=x):x=e[7];const b=r??"Due date";let f;e[8]!==c?(f=s.jsx(Bt,{size:12,className:c}),e[8]=c,e[9]=f):f=e[9];let j;e[10]!==b||e[11]!==f||e[12]!==u?(j=s.jsx(mt,{asChild:!0,children:s.jsxs("button",{type:"button",className:u,children:[x,b,f]})}),e[10]=b,e[11]=f,e[12]=u,e[13]=j):j=e[13];let h;e[14]!==a?(h=()=>a(null),e[14]=a,e[15]=h):h=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Je,{size:16,className:"text-muted-foreground"}),e[16]=v):v=e[16];let p;e[17]!==h?(p=s.jsxs(Ve,{onSelect:h,className:"gap-2",children:[v,"Any time"]}),e[17]=h,e[18]=p):p=e[18];let N;e[19]!==a?(N=Ut.map(C=>{const O=C.value==="overdue";return s.jsxs(Ve,{onSelect:()=>a(C.value),className:k("gap-2",O&&"text-destructive"),children:[s.jsx(Je,{size:16,className:k("shrink-0",O?"text-destructive":"text-muted-foreground")}),C.label]},C.value)}),e[19]=a,e[20]=N):N=e[20];let y;e[21]!==p||e[22]!==N?(y=s.jsxs(ft,{align:"start",className:"w-44",children:[p,N]}),e[21]=p,e[22]=N,e[23]=y):y=e[23];let w;return e[24]!==y||e[25]!==j?(w=s.jsxs(xt,{children:[j,y]}),e[24]=y,e[25]=j,e[26]=w):w=e[26],w}function rs(t){const e=z.c(26),{filters:l,members:a,onChange:n,block:i}=t;let r;e[0]!==l||e[1]!==n?(r=x=>n({...l,assignee:x}),e[0]=l,e[1]=n,e[2]=r):r=e[2];let o;e[3]!==i||e[4]!==l.assignee||e[5]!==a||e[6]!==r?(o=s.jsx(fl,{block:i,value:l.assignee,members:a,onChange:r}),e[3]=i,e[4]=l.assignee,e[5]=a,e[6]=r,e[7]=o):o=e[7];let d;e[8]!==l||e[9]!==n?(d=x=>n({...l,priority:x}),e[8]=l,e[9]=n,e[10]=d):d=e[10];let u;e[11]!==i||e[12]!==l.priority||e[13]!==d?(u=s.jsx(xl,{block:i,value:l.priority,onChange:d}),e[11]=i,e[12]=l.priority,e[13]=d,e[14]=u):u=e[14];let g;e[15]!==l||e[16]!==n?(g=x=>n({...l,due:x}),e[15]=l,e[16]=n,e[17]=g):g=e[17];let m;e[18]!==i||e[19]!==l.due||e[20]!==g?(m=s.jsx(pl,{block:i,value:l.due,onChange:g}),e[18]=i,e[19]=l.due,e[20]=g,e[21]=m):m=e[21];let c;return e[22]!==o||e[23]!==u||e[24]!==m?(c=s.jsxs(s.Fragment,{children:[o,u,m]}),e[22]=o,e[23]=u,e[24]=m,e[25]=c):c=e[25],c}function gl(t){const e=z.c(11),{filters:l,members:a,onChange:n}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ss,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=i):i=e[0];let r;e[1]!==l||e[2]!==a||e[3]!==n?(r=s.jsx(rs,{filters:l,members:a,onChange:n}),e[1]=l,e[2]=a,e[3]=n,e[4]=r):r=e[4];let o;e[5]!==l||e[6]!==n?(o=ol(l)&&s.jsx("button",{type:"button",onClick:()=>n(gt),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Clear"}),e[5]=l,e[6]=n,e[7]=o):o=e[7];let d;return e[8]!==r||e[9]!==o?(d=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i,r,o]}),e[8]=r,e[9]=o,e[10]=d):d=e[10],d}function hl(t){const e=z.c(26),{filters:l,members:a,onChange:n}=t,[i,r]=I.useState(!1),o=cl(l),d=o>0;let u;e[0]!==d?(u=ht(d),e[0]=d,e[1]=u):u=e[1];const g=u;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ss,{size:14,className:"shrink-0"}),e[2]=m):m=e[2];let c;e[3]!==o?(c=o>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:o}),e[3]=o,e[4]=c):c=e[4];let x;e[5]!==c||e[6]!==g?(x=s.jsx(Rs,{asChild:!0,children:s.jsxs("button",{type:"button",className:g,children:[m,"Filters",c]})}),e[5]=c,e[6]=g,e[7]=x):x=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Ps,{className:"px-4 pt-4 text-base font-medium text-foreground",children:"Filters"}),e[8]=b):b=e[8];let f;e[9]!==l||e[10]!==a||e[11]!==n?(f=s.jsx("div",{className:"flex flex-col gap-2 p-4",children:s.jsx(rs,{block:!0,filters:l,members:a,onChange:n})}),e[9]=l,e[10]=a,e[11]=n,e[12]=f):f=e[12];let j;e[13]!==o||e[14]!==n?(j=o>0&&s.jsx(xe,{variant:"outline",className:"flex-1",onClick:()=>n(gt),children:"Clear all"}),e[13]=o,e[14]=n,e[15]=j):j=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Ms,{asChild:!0,children:s.jsx(xe,{className:"flex-1",children:"Done"})}),e[16]=h):h=e[16];let v;e[17]!==j?(v=s.jsxs(Ls,{className:"flex-row gap-2",children:[j,h]}),e[17]=j,e[18]=v):v=e[18];let p;e[19]!==v||e[20]!==f?(p=s.jsxs(Us,{className:"p-0",children:[b,f,v]}),e[19]=v,e[20]=f,e[21]=p):p=e[21];let N;return e[22]!==i||e[23]!==p||e[24]!==x?(N=s.jsxs(qs,{open:i,onOpenChange:r,direction:"bottom",children:[x,p]}),e[22]=i,e[23]=p,e[24]=x,e[25]=N):N=e[25],N}const qt=380,bl=90,Kt=5,jl="cubic-bezier(0.22, 0.61, 0.36, 1)",Nl=8;function yl(t,e){const l=I.useRef(new Map);I.useLayoutEffect(()=>{const a=t.current;if(!a)return;const n=a.querySelectorAll("[data-flip-id]"),i=l.current,r=new Map,o=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,d=[];for(const c of n){const x=c.dataset.flipId;if(!x)continue;const b=c.getBoundingClientRect();r.set(x,b);const f=i.get(x);if(!f)continue;const j=f.left-b.left,h=f.top-b.top;(j||h)&&d.push({el:c,dx:j,dy:h,lane:Math.abs(j)>Nl})}if(l.current=r,o||d.length===0)return;for(const c of d){const x=c.lane?` rotate(${c.dx>0?Kt:-Kt}deg)`:"";c.el.style.transition="none",c.el.style.transform=`translate(${c.dx}px, ${c.dy}px)${x}`,c.lane&&(c.el.style.zIndex="10")}let u=0;const g=[],m=requestAnimationFrame(()=>{for(const c of d){const x=c.lane?u++*bl:0;c.el.style.transition=`transform ${qt}ms ${jl} ${x}ms`,c.el.style.transform="",g.push(window.setTimeout(()=>{c.el.style.transition="",c.el.style.transform="",c.el.style.zIndex=""},qt+x+30))}});return()=>{cancelAnimationFrame(m);for(const c of g)clearTimeout(c)}},[e,t])}ms(()=>import("./index-DygzNtEl.js").then(t=>t.aY),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152])).catch(()=>{});function vl(){const t=z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:s.jsx("div",{className:"h-full p-0.5 pt-0.25",children:s.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:s.jsx(us,{})})})}),t[0]=e):e=t[0],e}const Sl=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function Cl(t){const e=new Date(t),l=e.getTime()<Date.now();return{label:Sl.format(e),overdue:l}}const Rt="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2 py-1 text-xs font-medium text-muted-foreground";function is(){const t=z.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=k(Rt,"border-warning/30 text-warning"),t[0]=e):e=t[0];let l;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("span",{className:e,title:"The agent is waiting for your input",children:[s.jsx(Ht,{size:14}),"Needs input"]}),t[1]=l):l=t[1],l}function os(t){const e=z.c(7),{priority:l}=t,a=oe[l];let n;e[0]!==a.dotClassName?(n=k("size-2 rounded-full",a.dotClassName),e[0]=a.dotClassName,e[1]=n):n=e[1];let i;e[2]!==n?(i=s.jsx("span",{className:n}),e[2]=n,e[3]=i):i=e[3];let r;return e[4]!==a.label||e[5]!==i?(r=s.jsxs("span",{className:Rt,children:[i,a.label]}),e[4]=a.label,e[5]=i,e[6]=r):r=e[6],r}function cs(t){const e=z.c(7),{iso:l}=t;let a,n;if(e[0]!==l){const{label:o,overdue:d}=Cl(l);a=o,n=k(Rt,d&&"border-destructive/30 text-destructive"),e[0]=l,e[1]=a,e[2]=n}else a=e[1],n=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Je,{size:14}),e[3]=i):i=e[3];let r;return e[4]!==a||e[5]!==n?(r=s.jsxs("span",{className:n,children:[i,a]}),e[4]=a,e[5]=n,e[6]=r):r=e[6],r}function ds(t){const e=z.c(11),{item:l,assignee:a,assignedBy:n}=t;if(l.assigneeId===pe){const i=n?.user?.name?`Assigned to Super Agent by ${n.user.name}`:"Assigned to Super Agent";let r;e[0]!==n?(r=n&&s.jsx(ie,{url:n.user?.image??void 0,fallback:re(n.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),e[0]=n,e[1]=r):r=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ue,{size:16,className:"ring-2 ring-background"}),e[2]=o):o=e[2];let d;return e[3]!==i||e[4]!==r?(d=s.jsxs("span",{className:"inline-flex items-center",title:i,children:[r,o]}),e[3]=i,e[4]=r,e[5]=d):d=e[5],d}if(a){const i=a.user?.image??void 0,r=a.user?.name;let o;e[6]!==r?(o=re(r),e[6]=r,e[7]=o):o=e[7];let d;return e[8]!==i||e[9]!==o?(d=s.jsx(ie,{url:i,fallback:o,shape:"circle",size:"2xs"}),e[8]=i,e[9]=o,e[10]=d):d=e[10],d}return null}function us(){const t=z.c(65),{items:e,isLoading:l}=Hs(),a=Vs(),n=Qs(),{data:i}=Vt();let r,o;t[0]!==i?.data?.members?(r=i?.data?.members??[],o=new Map(r.map(wl)),t[0]=i?.data?.members,t[1]=r,t[2]=o):(r=t[1],o=t[2]);const d=o,[u,g]=I.useState("board"),[m,c]=I.useState(gt),[x,b]=I.useState(!1),[f,j]=I.useState(null),[h,v]=I.useState(null),{setTaskId:p}=Gs();let N,y,w,C;if(t[3]!==a||t[4]!==m||t[5]!==l||t[6]!==e||t[7]!==u||t[8]!==d||t[9]!==r||t[10]!==n){C=Symbol.for("react.early_return_sentinel");e:{let A;t[15]!==m?(A=D=>ml(D,m),t[15]=m,t[16]=A):A=t[16];const H=e.filter(A);let _;t[17]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{j(null),v(null),b(!0)},t[17]=_):_=t[17];const $=_;let K;t[18]===Symbol.for("react.memo_cache_sentinel")?(K=D=>{j(null),v(D),b(!0)},t[18]=K):K=t[18];const M=K;let Q;t[19]===Symbol.for("react.memo_cache_sentinel")?(Q=D=>{j(D),b(!0)},t[19]=Q):Q=t[19];const se=Q;if(l&&e.length===0){let D;t[20]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(fs,{size:20,className:"animate-spin text-muted-foreground"})}),t[20]=D):D=t[20],C=D;break e}N="flex min-h-0 flex-1 flex-col";let E;t[21]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:"Tasks"}),t[21]=E):E=t[21];let te;t[22]!==m||t[23]!==e.length||t[24]!==r?(te=e.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"sm:hidden",children:s.jsx(hl,{filters:m,members:r,onChange:c})}),s.jsx("div",{className:"hidden sm:block",children:s.jsx(gl,{filters:m,members:r,onChange:c})})]}),t[22]=m,t[23]=e.length,t[24]=r,t[25]=te):te=t[25];const ce=u==="list";let le;t[26]===Symbol.for("react.memo_cache_sentinel")?(le=()=>g("list"),t[26]=le):le=t[26];let V;t[27]!==ce?(V=s.jsx(Gt,{active:ce,onClick:le,icon:ys,label:"List"}),t[27]=ce,t[28]=V):V=t[28];const me=u==="board";let Z;t[29]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>g("board"),t[29]=Z):Z=t[29];let ee;t[30]!==me?(ee=s.jsx(Gt,{active:me,onClick:Z,icon:js,label:"Board"}),t[30]=me,t[31]=ee):ee=t[31];let X;t[32]!==V||t[33]!==ee?(X=s.jsxs("div",{className:"inline-flex rounded-lg bg-muted p-0.5",children:[V,ee]}),t[32]=V,t[33]=ee,t[34]=X):X=t[34];let ne;t[35]===Symbol.for("react.memo_cache_sentinel")?(ne=s.jsxs(xe,{size:"sm",onClick:$,children:[s.jsx(Ot,{size:16}),"New task"]}),t[35]=ne):ne=t[35];let J;t[36]!==X?(J=s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[X,ne]}),t[36]=X,t[37]=J):J=t[37],t[38]!==te||t[39]!==J?(y=s.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 pt-6 sm:px-8 sm:pt-8",children:[E,s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[te,J]})]}),t[38]=te,t[39]=J,t[40]=y):y=t[40],w=e.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsx("div",{className:"rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:"No tasks yet. Start one with New task."})}):H.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:["No tasks match these filters.",s.jsx(xe,{variant:"outline",size:"sm",onClick:()=>c(gt),children:"Clear filters"})]})}):u==="board"?s.jsx(_l,{items:H,memberByUserId:d,onOpen:se,onCreate:M,onMove:(D,de)=>a.update.mutate({id:D,status:de}),onAutoFix:n?D=>a.update.mutate({id:D.id,assigneeId:pe}):void 0}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 pt-6 pb-16 sm:px-8",children:s.jsx("div",{className:"mx-auto flex max-w-[820px] flex-col gap-2",children:H.map(D=>s.jsx(Il,{item:D,assignee:D.assigneeId?d.get(D.assigneeId):void 0,assignedBy:D.assignedBy?d.get(D.assignedBy):void 0,onOpen:()=>se(D)},D.id))})})}t[3]=a,t[4]=m,t[5]=l,t[6]=e,t[7]=u,t[8]=d,t[9]=r,t[10]=n,t[11]=N,t[12]=y,t[13]=w,t[14]=C}else N=t[11],y=t[12],w=t[13],C=t[14];if(C!==Symbol.for("react.early_return_sentinel"))return C;const O=x?f?.id??`new-${h??"default"}`:"closed";let L;t[41]===Symbol.for("react.memo_cache_sentinel")?(L=()=>b(!1),t[41]=L):L=t[41];const Y=f??void 0,T=h??void 0,U=a.create.isPending||a.update.isPending;let q;t[42]!==a.create||t[43]!==a.update||t[44]!==f?(q=A=>{f?a.update.mutate({id:f.id,...A}):a.create.mutate(A),b(!1)},t[42]=a.create,t[43]=a.update,t[44]=f,t[45]=q):q=t[45];let R;t[46]!==a.remove||t[47]!==f?(R=f?()=>{a.remove.mutate(f.id),b(!1)}:void 0,t[46]=a.remove,t[47]=f,t[48]=R):R=t[48];let B;t[49]!==p?(B=A=>{A.virtualMcpId&&(b(!1),p(A.threadId,A.virtualMcpId,{main:A.hasPreview?"preview":"board"}))},t[49]=p,t[50]=B):B=t[50];let F;t[51]!==x||t[52]!==q||t[53]!==R||t[54]!==B||t[55]!==O||t[56]!==Y||t[57]!==T||t[58]!==U?(F=s.jsx(el,{open:x,onClose:L,item:Y,defaultStatus:T,isSaving:U,onSubmit:q,onDelete:R,onOpenThread:B},O),t[51]=x,t[52]=q,t[53]=R,t[54]=B,t[55]=O,t[56]=Y,t[57]=T,t[58]=U,t[59]=F):F=t[59];let P;return t[60]!==N||t[61]!==F||t[62]!==y||t[63]!==w?(P=s.jsxs("div",{className:N,children:[y,w,F]}),t[60]=N,t[61]=F,t[62]=y,t[63]=w,t[64]=P):P=t[64],P}function wl(t){return[t.userId,t]}function Gt(t){const e=z.c(11),{active:l,onClick:a,icon:n,label:i}=t,r=`${i} view`,o=l?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let d;e[0]!==o?(d=k("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",o),e[0]=o,e[1]=d):d=e[1];let u;e[2]!==n?(u=s.jsx(n,{size:14}),e[2]=n,e[3]=u):u=e[3];let g;return e[4]!==l||e[5]!==i||e[6]!==a||e[7]!==r||e[8]!==d||e[9]!==u?(g=s.jsxs("button",{type:"button",onClick:a,"aria-label":r,"aria-pressed":l,className:d,children:[u,i]}),e[4]=l,e[5]=i,e[6]=a,e[7]=r,e[8]=d,e[9]=u,e[10]=g):g=e[10],g}function _l(t){const e=z.c(12),{items:l,memberByUserId:a,onOpen:n,onCreate:i,onMove:r,onAutoFix:o}=t,[d,u]=I.useState(null),g=I.useRef(null);let m;e[0]!==l?(m=l.map(Dl).join(","),e[0]=l,e[1]=m):m=e[1],yl(g,m);let x;e[2]!==l||e[3]!==a||e[4]!==o||e[5]!==i||e[6]!==r||e[7]!==n||e[8]!==d?(x=ns.map(f=>{const j=l.filter(p=>p.status===f),h=ae[f],v=h.icon;return s.jsxs("div",{onDragOver:p=>{p.preventDefault(),u(f)},onDragLeave:p=>{p.currentTarget.contains(p.relatedTarget)||u(null)},onDrop:p=>{p.preventDefault();const N=p.dataTransfer.getData("text/plain");N&&r(N,f),u(null)},className:k("flex w-[300px] shrink-0 flex-col rounded-xl p-1 transition-colors",d===f&&"bg-muted/50"),children:[s.jsxs("div",{className:"sticky top-0 z-10 flex items-center gap-2 bg-background px-2 py-1.5",children:[s.jsx(v,{size:15,className:k("shrink-0",h.iconClassName)}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:h.label}),s.jsx("span",{className:"rounded-md bg-muted px-1.5 text-[11px] font-medium text-muted-foreground",children:j.length}),s.jsx("button",{type:"button","aria-label":`New task in ${h.label}`,title:`New task in ${h.label}`,onClick:()=>i(f),className:"ml-auto flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:s.jsx(Ot,{size:15})})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2 pt-1",children:j.map(p=>s.jsx(kl,{item:p,assignee:p.assigneeId?a.get(p.assigneeId):void 0,assignedBy:p.assignedBy?a.get(p.assignedBy):void 0,onOpen:()=>n(p),onAutoFix:o?()=>o(p):void 0},p.id))})]},f)}),e[2]=l,e[3]=a,e[4]=o,e[5]=i,e[6]=r,e[7]=n,e[8]=d,e[9]=x):x=e[9];let b;return e[10]!==x?(b=s.jsx("div",{ref:g,className:"min-h-0 flex-1 overflow-x-auto overflow-y-auto",children:s.jsx("div",{className:"mx-auto flex w-full max-w-[1680px] gap-3 px-4 pt-6 pb-16 sm:px-8",children:x})}),e[10]=x,e[11]=b):b=e[11],b}function Dl(t){return`${t.id}:${t.status}`}function kl(t){const e=z.c(33),{item:l,assignee:a,assignedBy:n,onOpen:i,onAutoFix:r}=t,o=ae[l.status],d=o.icon,u=ls(l)?.lastMessage,g=r&&(l.status==="triage"||l.status==="todo")&&l.assigneeId!==pe,m=l.id;let c;e[0]!==l.id?(c=C=>{C.dataTransfer.setData("text/plain",l.id),C.dataTransfer.effectAllowed="move"},e[0]=l.id,e[1]=c):c=e[1];const x=l.title;let b;e[2]!==o.iconClassName?(b=k("mt-px shrink-0",o.iconClassName),e[2]=o.iconClassName,e[3]=b):b=e[3];let f;e[4]!==d||e[5]!==b?(f=s.jsx(d,{size:16,className:b}),e[4]=d,e[5]=b,e[6]=f):f=e[6];let j;e[7]!==l.title?(j=s.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium leading-snug text-foreground line-clamp-2",children:l.title}),e[7]=l.title,e[8]=j):j=e[8];let h;e[9]!==n||e[10]!==a||e[11]!==l?(h=s.jsx(ds,{item:l,assignee:a,assignedBy:n}),e[9]=n,e[10]=a,e[11]=l,e[12]=h):h=e[12];let v;e[13]!==f||e[14]!==j||e[15]!==h?(v=s.jsxs("div",{className:"flex items-start gap-2",children:[f,j,h]}),e[13]=f,e[14]=j,e[15]=h,e[16]=v):v=e[16];let p;e[17]!==u?(p=u&&s.jsx("p",{className:"line-clamp-2 pl-6 text-xs leading-snug text-muted-foreground",children:u}),e[17]=u,e[18]=p):p=e[18];let N;e[19]!==l?(N=(Tt(l)||l.priority!=="none"||!!l.dueDate)&&s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pl-6",children:[Tt(l)&&s.jsx(is,{}),l.priority!=="none"&&s.jsx(os,{priority:l.priority}),l.dueDate&&s.jsx(cs,{iso:l.dueDate})]}),e[19]=l,e[20]=N):N=e[20];let y;e[21]!==r||e[22]!==g?(y=g&&s.jsxs("button",{type:"button",onClick:C=>{C.stopPropagation(),r()},className:"flex items-center gap-1.5 self-end rounded-md border border-border bg-background px-2 py-1 text-xs font-medium text-foreground transition-colors hover:bg-accent",children:[s.jsx(Ns,{size:12}),"Auto-fix"]}),e[21]=r,e[22]=g,e[23]=y):y=e[23];let w;return e[24]!==l.id||e[25]!==l.title||e[26]!==i||e[27]!==N||e[28]!==y||e[29]!==c||e[30]!==v||e[31]!==p?(w=s.jsxs("button",{type:"button",draggable:!0,"data-flip-id":m,onDragStart:c,onClick:i,className:"group flex cursor-grab flex-col gap-2 rounded-xl bg-card px-3 py-2.5 text-left card-shadow transition-colors will-change-transform hover:bg-accent/60 active:cursor-grabbing",title:x,children:[v,p,N,y]}),e[24]=l.id,e[25]=l.title,e[26]=i,e[27]=N,e[28]=y,e[29]=c,e[30]=v,e[31]=p,e[32]=w):w=e[32],w}function Il(t){const e=z.c(30),{item:l,assignee:a,assignedBy:n,onOpen:i}=t,r=ae[l.status],o=r.icon;let d;e[0]!==r.iconClassName?(d=k("shrink-0",r.iconClassName),e[0]=r.iconClassName,e[1]=d):d=e[1];let u;e[2]!==o||e[3]!==d?(u=s.jsx(o,{size:16,className:d}),e[2]=o,e[3]=d,e[4]=u):u=e[4];let g;e[5]!==l.title?(g=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l.title}),e[5]=l.title,e[6]=g):g=e[6];let m;e[7]!==l?(m=Tt(l)&&s.jsx(is,{}),e[7]=l,e[8]=m):m=e[8];let c;e[9]!==l.priority?(c=l.priority!=="none"&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(os,{priority:l.priority})}),e[9]=l.priority,e[10]=c):c=e[10];let x;e[11]!==l.dueDate?(x=l.dueDate&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(cs,{iso:l.dueDate})}),e[11]=l.dueDate,e[12]=x):x=e[12];let b;e[13]!==n||e[14]!==a||e[15]!==l?(b=s.jsx(ds,{item:l,assignee:a,assignedBy:n}),e[13]=n,e[14]=a,e[15]=l,e[16]=b):b=e[16];let f;e[17]!==l.createdAt?(f=_s(new Date(l.createdAt)),e[17]=l.createdAt,e[18]=f):f=e[18];let j;e[19]!==f?(j=s.jsx("span",{className:"hidden shrink-0 text-[11px] text-muted-foreground/70 sm:inline",children:f}),e[19]=f,e[20]=j):j=e[20];let h;return e[21]!==i||e[22]!==u||e[23]!==g||e[24]!==m||e[25]!==c||e[26]!==x||e[27]!==b||e[28]!==j?(h=s.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-xl bg-card px-4 py-3 text-left card-shadow transition-colors hover:bg-accent/60",children:[u,g,m,c,x,b,j]}),e[21]=i,e[22]=u,e[23]=g,e[24]=m,e[25]=c,e[26]=x,e[27]=b,e[28]=j,e[29]=h):h=e[29],h}const un=Object.freeze(Object.defineProperty({__proto__:null,TaskBoardPage:us,default:vl},Symbol.toStringTag,{value:"Module"}));export{oe as P,ae as S,el as T,Vs as a,ue as b,us as c,un as i,Hs as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as h,C as x,a as S,u as j,r as C,j as u,Y as I,N as _}from"./index-
|
|
1
|
+
import{c as h,C as x,a as S,u as j,r as C,j as u,Y as I,N as _}from"./index-C0L0gsTW.js";import{a as R}from"./constants-D_FQAPnt.js";import{a as b}from"./hooks-BzEVckbF.js";import{f as k}from"./reusable-new-chat-CouMjkYR.js";import"./use-mcp-client-BdKdbY1c.js";import"./auth-G8XwFsYg.js";import"./decopilot-sse-pool-CYX6Tudl.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";function L(){const t=h.c(12),{org:o}=x(),r=R(o.id).id,{data:p}=S.useSession(),{threads:d,status:f}=b();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[0]=a):a=t[0];const{connect:l,siteUrl:c}=j(a),[g]=C.useState(y);if(f.kind==="loading"){let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=u.jsx(I,{}),t[1]=n):n=t[1],n}const m=k(d,r,p?.user?.id)?.id??g;let e;t[2]!==o.slug||t[3]!==m?(e={org:o.slug,taskId:m},t[2]=o.slug,t[3]=m,t[4]=e):e=t[4];let s;t[5]!==l||t[6]!==r||t[7]!==c?(s={virtualmcpid:r,connect:l,siteUrl:c},t[5]=l,t[6]=r,t[7]=c,t[8]=s):s=t[8];let i;return t[9]!==e||t[10]!==s?(i=u.jsx(_,{to:"/$org/$taskId",params:e,search:s,replace:!0}),t[9]=e,t[10]=s,t[11]=i):i=t[11],i}function y(){return crypto.randomUUID()}export{L as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as $,C as de,n as Ze,d as We,K as Q,m as ie,aY as kn,r as k,ap as Ss,l as ce,j as l,U as Ns,i as zs,B as Z,aL as Sn,t as ue,w as Cs,L as $s,e as Ps,b as Nn,u as zn,E as Tt}from"./index-DQTJBd3r.js";import{i as Es}from"./ChevronRight-C38LFGMe.js";import{s as Cn}from"./Eye-DCpIMsPs.js";import{n as Ve,i as yt}from"./Globe01-DOFbu2Qo.js";import{b as Ds,c as Ts,e as Fs,i as Ms,f as $n,a as Ht,g as Is,d as Ls}from"./ZoomOut-C5NMQEKL.js";import{a as ht}from"./Palette-C3fbsuyi.js";import{s as Os}from"./Plus-Oa-KgIil.js";import{i as Rs}from"./SearchLg-DXPYdIWk.js";import{t as As}from"./Stars01-CfVSNbuD.js";import{i as mt}from"./Upload01-3O4bf6oQ.js";import{s as Pn}from"./XClose-CIpRkjvl.js";import{i as qt}from"./Zap-_sd7wprP.js";import{u as En}from"./use-mobile-C13QKbE7.js";import{f as _s,a as Us,b as Bs,c as Hs,d as qs,e as Ks,A as Ws,g as Gs}from"./alert-dialog-BEEL4jBx.js";import{D as Dn,a as Ue,d as Je,e as et,i as Tn,h as Vs,c as Xs}from"./dialog-BnPtoqqS.js";import{I as Xe}from"./input-BeVh4K_0.js";import{S as ae}from"./skeleton-B2xPMPZV.js";import{F as Se,M as Kt,d as Fn}from"./file-type-icon-CfattDVJ.js";import{T as Qs}from"./toolbar-Cmd2JXfQ.js";import{a as Ys}from"./Package-DBU8VrJY.js";import{u as Zs}from"./use-debounced-value-BMeVdnuv.js";import{i as vt}from"./DotsVertical-QiKHYyqO.js";import{i as Mn}from"./Key01-H9edXzTn.js";import{s as wt}from"./Trash01-DdG6Jy2W.js";import{D as tt,a as nt,c as st,d as be}from"./dropdown-menu-hXfKwvRp.js";import{T as Js}from"./textarea-CTRf0B1A.js";import{t as el}from"./ChevronDown-CrkJkNxr.js";import{n as tl}from"./ChevronUp-WwDl06Df.js";import{i as pt}from"./X-wQ3Xq4m8.js";import{P as nl,b as sl,a as ll}from"./popover-DsnmTiCL.js";import{b as ye,T as ve,a as we}from"./tooltip-YeOl4hv-.js";import{i as rl}from"./Check-YatM3ypN.js";import{a as il}from"./Copy01-gCYa3mdW.js";import{n as In}from"./LinkExternal01-BAop_7Oj.js";import{l as ol,F as al}from"./index-Dkv7R2MX.js";import{i as cl}from"./LayoutLeft-bHEF4l1E.js";function Ln(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const r=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${r?`?${r}`:""}`}async function he(n,e){const t=await fetch(n,e);if(!t.ok){let s="";try{s=(await t.json()).error??""}catch{}throw new Error(s||`HTTP ${t.status}`)}return t}function Wt(n,e){const t=$.c(11),{org:s}=de();let r;t[0]!==s.id||t[1]!==e||t[2]!==n?(r=Q.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=r):r=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await he(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(dl),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let o;return t[8]!==r||t[9]!==i?(o={queryKey:r,placeholderData:kn,queryFn:i},t[8]=r,t[9]=i,t[10]=o):o=t[10],ie(o)}function dl(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function On(n,e,t){const s=$.c(15),{org:r}=de();let i;s[0]!==r.id||s[1]!==e||s[2]!==n?(i=Q.orgFsStat(r.id,n??"",e),s[0]=r.id,s[1]=e,s[2]=n,s[3]=i):i=s[3];const o=n!==null;let a;s[4]!==t?(a=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=a):a=s[5];let c;s[6]!==r.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fetch(pe(r.slug,n??"","stat",{path:e}));if(f.status===404)return null;if(!f.ok)throw new Error(`HTTP ${f.status}`);return(await f.json()).entry},s[6]=r.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let d;return s[10]!==i||s[11]!==o||s[12]!==a||s[13]!==c?(d={queryKey:i,enabled:o,refetchInterval:a,queryFn:c},s[10]=i,s[11]=o,s[12]=a,s[13]=c,s[14]=d):d=s[14],ie(d)}function ul(n){const e=$.c(9),{org:t}=de();let s;e[0]!==t.id||e[1]!==n?(s=Q.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let r;e[3]!==t.slug||e[4]!==n?(r=async()=>await(await he(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==r?(i={queryKey:s,queryFn:r},e[6]=s,e[7]=r,e[8]=i):i=e[8],ie(i)}function fl(n,e){const t=$.c(9),s=n===void 0?60:n,{org:r}=de();let i;t[0]!==r.id?(i=Q.orgFsRecent(r.id),t[0]=r.id,t[1]=i):i=t[1];const o=e?.enabled;let a;t[2]!==s||t[3]!==r.slug?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=r.slug,t[4]=a):a=t[4];let c;return t[5]!==i||t[6]!==o||t[7]!==a?(c={queryKey:i,enabled:o,queryFn:a},t[5]=i,t[6]=o,t[7]=a,t[8]=c):c=t[8],ie(c)}function hl(n,e){const t=$.c(11),s=50,{org:r}=de();let i;t[0]!==r.id||t[1]!==n?(i=Q.orgFsSearch(r.id,n),t[0]=r.id,t[1]=n,t[2]=i):i=t[2];const o=n.length>0;let a;t[3]!==s||t[4]!==r.slug||t[5]!==n?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=r.slug,t[5]=n,t[6]=a):a=t[6];let c;return t[7]!==i||t[8]!==o||t[9]!==a?(c={queryKey:i,enabled:o,placeholderData:kn,queryFn:a},t[7]=i,t[8]=o,t[9]=a,t[10]=c):c=t[10],ie(c)}function Fo(n){const e=$.c(8),{org:t}=de();let s;e[0]!==t.id?(s=Q.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const r=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const a=await he(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await a.json();return c.map(ml)},e[2]=t.slug,e[3]=i):i=e[3];let o;return e[4]!==s||e[5]!==r||e[6]!==i?(o={queryKey:s,enabled:r,queryFn:i},e[4]=s,e[5]=r,e[6]=i,e[7]=o):o=e[7],ie(o)}function ml(n){return{volume:n.volume,path:n.path}}async function Mo(n){const e=await he(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function pl(n,e,t){return(await he(pe(n,e,"read",{path:t}))).text()}const xl=new Set(["md","mdx","markdown","txt","text"]),gl=25,bl=64*1024,yl=256*1024,vl=4;function wl(n){const e=n.lastIndexOf(".");return e===-1?!1:xl.has(n.slice(e+1).toLowerCase())}async function Io(n,e,t){const s=t?`${t}/`:"",r=u=>u.startsWith(s)?u.slice(s.length):u,i=[],o=[],a=[{path:t,depth:0}];for(;a.length>0;){const u=a.shift();if(!u)break;let h;try{h=(await(await he(pe(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const m of[...h].sort((p,g)=>p.path.localeCompare(g.path))){if(m.kind==="dir"){u.depth<vl&&a.push({path:m.path,depth:u.depth+1});continue}wl(m.path)&&m.size<=bl&&i.length<gl?i.push(m.path):o.push(r(m.path))}}const c=await Promise.all(i.map(u=>pl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>yl){o.push(r(u));return}f+=m.length,d.push({relPath:r(u),content:m})}),d.sort((u,h)=>u.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:u.relPath.localeCompare(h.relPath)),o.sort(),{files:d,omittedPaths:o}}function Rn(){const n=$.c(7),{org:e}=de();let t;n[0]!==e.id?(t=Q.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await he(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let r;return n[4]!==t||n[5]!==s?(r={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=r):r=n[6],ie(r)}function jl(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t.slug||e[1]!==n?(s=r=>pe(t.slug,n,"read",{path:r}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function lt(){const n=$.c(2),{org:e}=de();let t;return n[0]!==e.slug?(t=(s,r)=>pe(e.slug,s,"read",{path:r}),n[0]=e.slug,n[1]=t):t=n[1],t}function An(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async r=>(await(await he(pe(t.slug,n,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function kl(n){const e=$.c(18),{org:t}=de(),s=Ze();let r;e[0]!==t||e[1]!==n?(r=async d=>(await(await he(pe(t.slug,n,"public",{path:d.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:d.mode,password:d.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=r):r=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=Q.orgFsStat(t.id,n,d.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),h=d.mode!=="private";return s.setQueryData(f,m=>m&&{...m,readPublic:h,effectivePublic:h,shareMode:d.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=i):i=e[6];let o;e[7]!==s?(o=(d,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=o):o=e[8];let a;e[9]!==t||e[10]!==s||e[11]!==n?(a=(d,f,u)=>{s.invalidateQueries({queryKey:Q.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=a):a=e[12];let c;return e[13]!==r||e[14]!==i||e[15]!==o||e[16]!==a?(c={mutationFn:r,onMutate:i,onError:o,onSettled:a},e[13]=r,e[14]=i,e[15]=o,e[16]=a,e[17]=c):c=e[17],We(c)}function At(n){const e=$.c(26),{org:t}=de(),s=Ze();let r;e[0]!==t||e[1]!==s||e[2]!==n?(r=()=>{s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=r):r=e[3];const i=r;let o;e[4]!==t||e[5]!==n?(o=async b=>{for(const x of b.files){const y=b.dir?`${b.dir}/${x.name}`:x.name;await he(pe(t.slug,n,"file",{path:y}),{method:"PUT",headers:{"content-type":x.type||"application/octet-stream"},body:x})}},e[4]=t,e[5]=n,e[6]=o):o=e[6];let a;e[7]!==i||e[8]!==o?(a={mutationFn:o,onSettled:i},e[7]=i,e[8]=o,e[9]=a):a=e[9];const c=We(a);let d;e[10]!==t||e[11]!==n?(d=async b=>{await he(pe(t.slug,n,"dir",{path:b}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=d):d=e[12];let f;e[13]!==i||e[14]!==d?(f={mutationFn:d,onSuccess:i},e[13]=i,e[14]=d,e[15]=f):f=e[15];const u=We(f);let h;e[16]!==t||e[17]!==n?(h=async b=>{await he(pe(t.slug,n,"file",{path:b}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=h):h=e[18];let m;e[19]!==i||e[20]!==h?(m={mutationFn:h,onSuccess:i},e[19]=i,e[20]=h,e[21]=m):m=e[21];const p=We(m);let g;return e[22]!==u||e[23]!==p||e[24]!==c?(g={upload:c,mkdir:u,remove:p},e[22]=u,e[23]=p,e[24]=c,e[25]=g):g=e[25],g}const jt=k.createContext(null);jt.displayName="PanelGroupContext";const se={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Gt=10,Fe=k.useLayoutEffect,sn=Ss.useId,Sl=typeof sn=="function"?sn:()=>null;let Nl=0;function Vt(n=null){const e=Sl(),t=k.useRef(n||e||null);return t.current===null&&(t.current=""+Nl++),n??t.current}function _n({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:r,forwardedRef:i,id:o,maxSize:a,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=k.useContext(jt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:z,isPanelCollapsed:C,reevaluatePanelConstraints:w,registerPanel:M,resizePanel:I,unregisterPanel:F}=b,v=Vt(o),P=k.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:r,maxSize:a,minSize:c},id:v,idIsFromProps:o!==void 0,order:h});k.useRef({didLogMissingDefaultSizeWarning:!1}),Fe(()=>{const{callbacks:A,constraints:_}=P.current,B={..._};P.current.id=v,P.current.idIsFromProps=o!==void 0,P.current.order=h,A.onCollapse=d,A.onExpand=f,A.onResize=u,_.collapsedSize=t,_.collapsible=s,_.defaultSize=r,_.maxSize=a,_.minSize=c,(B.collapsedSize!==_.collapsedSize||B.collapsible!==_.collapsible||B.maxSize!==_.maxSize||B.minSize!==_.minSize)&&w(P.current,B)}),Fe(()=>{const A=P.current;return M(A),()=>{F(A)}},[h,v,M,F]),k.useImperativeHandle(i,()=>({collapse:()=>{x(P.current)},expand:A=>{y(P.current,A)},getId(){return v},getSize(){return j(P.current)},isCollapsed(){return C(P.current)},isExpanded(){return!C(P.current)},resize:A=>{I(P.current,A)}}),[x,y,j,C,v,I]);const W=N(P.current,r);return k.createElement(p,{...g,children:n,className:e,id:v,style:{...W,...m},[se.groupId]:z,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+W.flexGrow).toFixed(1)})}const Un=k.forwardRef((n,e)=>k.createElement(_n,{...n,forwardedRef:e}));_n.displayName="Panel";Un.displayName="forwardRef(Panel)";let _t=null,ft=-1,Ce=null;function zl(n,e){if(e){const t=(e&Wn)!==0,s=(e&Gn)!==0,r=(e&Vn)!==0,i=(e&Xn)!==0;if(t)return r?"se-resize":i?"ne-resize":"e-resize";if(s)return r?"sw-resize":i?"nw-resize":"w-resize";if(r)return"s-resize";if(i)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Cl(){Ce!==null&&(document.head.removeChild(Ce),_t=null,Ce=null,ft=-1)}function Ft(n,e){var t,s;const r=zl(n,e);if(_t!==r){if(_t=r,Ce===null&&(Ce=document.createElement("style"),document.head.appendChild(Ce)),ft>=0){var i;(i=Ce.sheet)===null||i===void 0||i.removeRule(ft)}ft=(t=(s=Ce.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${r} !important;}`))!==null&&t!==void 0?t:-1}}function Bn(n){return n.type==="keydown"}function Hn(n){return n.type.startsWith("pointer")}function qn(n){return n.type.startsWith("mouse")}function kt(n){if(Hn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(qn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function $l(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Pl(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function El(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:on(n),b:on(e)};let s;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),s=n;V(s,"Stacking order can only be calculated for elements with a common ancestor");const r={a:rn(ln(t.a)),b:rn(ln(t.b))};if(r.a===r.b){const i=s.childNodes,o={a:t.a.at(-1),b:t.b.at(-1)};let a=i.length;for(;a--;){const c=i[a];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(r.a-r.b)}const Dl=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Tl(n){var e;const t=getComputedStyle((e=Kn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Fl(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Tl(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Dl.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function ln(n){let e=n.length;for(;e--;){const t=n[e];if(V(t,"Missing node"),Fl(t))return t}return null}function rn(n){return n&&Number(getComputedStyle(n).zIndex)||0}function on(n){const e=[];for(;n;)e.push(n),n=Kn(n);return e}function Kn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Wn=1,Gn=2,Vn=4,Xn=8,Ml=$l()==="coarse";let xe=[],_e=!1,Te=new Map,St=new Map;const Qe=new Set;function Il(n,e,t,s,r){var i;const{ownerDocument:o}=e,a={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:r},c=(i=Te.get(o))!==null&&i!==void 0?i:0;return Te.set(o,c+1),Qe.add(a),xt(),function(){var f;St.delete(n),Qe.delete(a);const u=(f=Te.get(o))!==null&&f!==void 0?f:1;if(Te.set(o,u-1),xt(),u===1&&Te.delete(o),xe.includes(a)){const h=xe.indexOf(a);h>=0&&xe.splice(h,1),Qt(),r("up",!0,null)}}}function Ll(n){const{target:e}=n,{x:t,y:s}=kt(n);_e=!0,Xt({target:e,x:t,y:s}),xt(),xe.length>0&&(gt("down",n),n.preventDefault(),Qn(e)||n.stopImmediatePropagation())}function Mt(n){const{x:e,y:t}=kt(n);if(_e&&n.buttons===0&&(_e=!1,gt("up",n)),!_e){const{target:s}=n;Xt({target:s,x:e,y:t})}gt("move",n),Qt(),xe.length>0&&n.preventDefault()}function It(n){const{target:e}=n,{x:t,y:s}=kt(n);St.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Qn(e)||n.stopImmediatePropagation()),gt("up",n),Xt({target:e,x:t,y:s}),Qt(),xt()}function Qn(n){let e=n;for(;e;){if(e.hasAttribute(se.resizeHandle))return!0;e=e.parentElement}return!1}function Xt({target:n,x:e,y:t}){xe.splice(0);let s=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(s=n),Qe.forEach(r=>{const{element:i,hitAreaMargins:o}=r,a=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=a,h=Ml?o.coarse:o.fine;if(e>=d-h&&e<=f+h&&t>=u-h&&t<=c+h){if(s!==null&&document.contains(s)&&i!==s&&!i.contains(s)&&!s.contains(i)&&El(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(Pl(p.getBoundingClientRect(),a)){g=!0;break}p=p.parentElement}if(g)return}xe.push(r)}})}function Lt(n,e){St.set(n,e)}function Qt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:r}=s;r==="horizontal"?n=!0:e=!0});let t=0;St.forEach(s=>{t|=s}),n&&e?Ft("intersection",t):n?Ft("horizontal",t):e?Ft("vertical",t):Cl()}let Ot=new AbortController;function xt(){Ot.abort(),Ot=new AbortController;const n={capture:!0,signal:Ot.signal};Qe.size&&(_e?(xe.length>0&&Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",It,n),s.addEventListener("pointerleave",Mt,n),s.addEventListener("pointermove",Mt,n))}),window.addEventListener("pointerup",It,n),window.addEventListener("pointercancel",It,n)):Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Ll,n),s.addEventListener("pointermove",Mt,n))}))}function gt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,r=xe.includes(t);s(n,r,e)})}function Ol(){const[n,e]=k.useState(0);return k.useCallback(()=>e(t=>t+1),[])}function V(n,e){if(!n)throw console.error(e),Error(e)}function Me(n,e,t=Gt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function je(n,e,t=Gt){return Me(n,e,t)===0}function me(n,e,t){return Me(n,e,t)===0}function Rl(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const r=n[s],i=e[s];if(!me(r,i,t))return!1}return!0}function Ae({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];V(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:r=0,collapsible:i,maxSize:o=100,minSize:a=0}=s;if(Me(t,a)<0)if(i){const c=(r+a)/2;Me(t,c)<0?t=r:t=a}else t=a;return t=Math.min(o,t),t=parseFloat(t.toFixed(Gt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:r,trigger:i}){if(me(n,0))return e;const o=[...e],[a,c]=s;V(a!=null,"Invalid first pivot index"),V(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:a,h=t[u];V(h,`Panel constraints not found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,m)){const x=g-b;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}{const u=n<0?a:c,h=t[u];V(h,`No panel constraints found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,g)){const x=b-m;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}}{const u=n<0?1:-1;let h=n<0?c:a,m=0;for(;;){const g=e[h];V(g!=null,`Previous layout not found for panel index ${h}`);const x=Ae({panelConstraints:t,panelIndex:h,size:100})-g;if(m+=x,h+=u,h<0||h>=t.length)break}const p=Math.min(Math.abs(n),Math.abs(m));n=n<0?0-p:p}{let h=n<0?a:c;for(;h>=0&&h<t.length;){const m=Math.abs(n)-Math.abs(d),p=e[h];V(p!=null,`Previous layout not found for panel index ${h}`);const g=p-m,b=Ae({panelConstraints:t,panelIndex:h,size:g});if(!me(p,b)&&(d+=p-b,o[h]=b,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?h--:h++}}if(Rl(r,o))return r;{const u=n<0?c:a,h=e[u];V(h!=null,`Previous layout not found for panel index ${u}`);const m=h+d,p=Ae({panelConstraints:t,panelIndex:u,size:m});if(o[u]=p,!me(p,m)){let g=m-p,x=n<0?c:a;for(;x>=0&&x<t.length;){const y=o[x];V(y!=null,`Previous layout not found for panel index ${x}`);const j=y+g,N=Ae({panelConstraints:t,panelIndex:x,size:j});if(me(y,N)||(g-=N-y,o[x]=N),me(g,0))break;n>0?x--:x++}}}const f=o.reduce((u,h)=>h+u,0);return me(f,100)?o:r}function Al({layout:n,panelsArray:e,pivotIndices:t}){let s=0,r=100,i=0,o=0;const a=t[0];V(a!=null,"No pivot index found"),e.forEach((u,h)=>{const{constraints:m}=u,{maxSize:p=100,minSize:g=0}=m;h===a?(s=g,r=p):(i+=g,o+=p)});const c=Math.min(r,100-i),d=Math.max(s,100-o),f=n[a];return{valueMax:c,valueMin:d,valueNow:f}}function Ye(n,e=document){return Array.from(e.querySelectorAll(`[${se.resizeHandleId}][data-panel-group-id="${n}"]`))}function Yn(n,e,t=document){const r=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return r??null}function Zn(n,e,t){const s=Yn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function Jn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const s=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return s||null}function Nt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function _l(n,e,t,s=document){var r,i,o,a;const c=Nt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(r=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&r!==void 0?r:null,h=(o=(a=t[f+1])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null;return[u,h]}function Ul({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:r,panelGroupElement:i,setLayout:o}){k.useRef({didWarnAboutMissingResizeHandle:!1}),Fe(()=>{if(!i)return;const a=Ye(t,i);for(let c=0;c<r.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=Al({layout:s,panelsArray:r,pivotIndices:[c,c+1]}),h=a[c];if(h!=null){const m=r[c];V(m,`No panel data found for index "${c}"`),h.setAttribute("aria-controls",m.id),h.setAttribute("aria-valuemax",""+Math.round(d)),h.setAttribute("aria-valuemin",""+Math.round(f)),h.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{a.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[t,s,r,i]),k.useEffect(()=>{if(!i)return;const a=e.current;V(a,"Eager values not found");const{panelDataArray:c}=a,d=Jn(t,i);V(d!=null,`No group found for id "${t}"`);const f=Ye(t,i);V(f,`No resize handles found for group id "${t}"`);const u=f.map(h=>{const m=h.getAttribute(se.resizeHandleId);V(m,"Resize handle element has no handle id attribute");const[p,g]=_l(t,m,c,i);if(p==null||g==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const y=c.findIndex(j=>j.id===p);if(y>=0){const j=c[y];V(j,`No panel data found for index ${y}`);const N=s[y],{collapsedSize:z=0,collapsible:C,minSize:w=0}=j.constraints;if(N!=null&&C){const M=He({delta:me(N,z)?w-z:z-N,initialLayout:s,panelConstraints:c.map(I=>I.constraints),pivotIndices:Zn(t,m,i),prevLayout:s,trigger:"keyboard"});s!==M&&o(M)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,r,o])}function an(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function es(n,e){const t=n==="horizontal",{x:s,y:r}=kt(e);return t?s:r}function Bl(n,e,t,s,r){const i=t==="horizontal",o=Nt(e,r);V(o,`No resize handle element found for id "${e}"`);const a=o.getAttribute(se.groupId);V(a,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=es(t,n),f=Jn(a,r);V(f,`No group element found for id "${a}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function Hl(n,e,t,s,r,i){if(Bn(n)){const o=t==="horizontal";let a=0;n.shiftKey?a=100:r!=null?a=r:a=10;let c=0;switch(n.key){case"ArrowDown":c=o?0:a;break;case"ArrowLeft":c=o?-a:0;break;case"ArrowRight":c=o?a:0;break;case"ArrowUp":c=o?0:-a;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:Bl(n,e,t,s,i)}function ql({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,r=100;for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;a!=null&&(s++,e[i]=a,r-=a)}for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;if(a!=null)continue;const c=n.length-s,d=r/c;s++,e[i]=d,r-=d}return e}function Ie(n,e,t){e.forEach((s,r)=>{const i=n[r];V(i,`Panel data not found for index ${r}`);const{callbacks:o,constraints:a,id:c}=i,{collapsedSize:d=0,collapsible:f}=a,u=t[c];if(u==null||s!==u){t[c]=s;const{onCollapse:h,onExpand:m,onResize:p}=o;p&&p(s,u),f&&(h||m)&&(m&&(u==null||je(u,d))&&!je(s,d)&&m(),h&&(u==null||!je(u,d))&&je(s,d)&&h())}})}function ut(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Kl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:r,precision:i=3}){const o=t[r];let a;return o==null?a=n!=null?n.toPrecision(i):"1":s.length===1?a="1":a=o.toPrecision(i),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Wl(n,e=10){let t=null;return(...r)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...r)},e)}}function cn(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function ts(n){return`react-resizable-panels:${n}`}function ns(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:r,order:i}=e;return r?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function ss(n,e){try{const t=ts(n),s=e.getItem(t);if(s){const r=JSON.parse(s);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function Gl(n,e,t){var s,r;const i=(s=ss(n,t))!==null&&s!==void 0?s:{},o=ns(e);return(r=i[o])!==null&&r!==void 0?r:null}function Vl(n,e,t,s,r){var i;const o=ts(n),a=ns(e),c=(i=ss(n,r))!==null&&i!==void 0?i:{};c[a]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{r.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function dn({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((i,o)=>i+o,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(i=>`${i}%`).join(", ")}`);if(!me(s,100)&&t.length>0)for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=100/s*o;t[i]=a}let r=0;for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=Ae({panelConstraints:e,panelIndex:i,size:o});o!=a&&(r+=o-a,t[i]=a)}if(!me(r,0))for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=o+r,c=Ae({panelConstraints:e,panelIndex:i,size:a});if(o!==c&&(r-=c-o,t[i]=c,me(r,0)))break}return t}const Xl=100,qe={getItem:n=>(cn(qe),qe.getItem(n)),setItem:(n,e)=>{cn(qe),qe.setItem(n,e)}},un={};function ls({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:r,id:i=null,onLayout:o=null,keyboardResizeBy:a=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Vt(i),m=k.useRef(null),[p,g]=k.useState(null),[b,x]=k.useState([]),y=Ol(),j=k.useRef({}),N=k.useRef(new Map),z=k.useRef(0),C=k.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:a,onLayout:o,storage:c}),w=k.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});k.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),k.useImperativeHandle(r,()=>({getId:()=>C.current.id,getLayout:()=>{const{layout:S}=w.current;return S},setLayout:S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current,T=dn({layout:S,panelConstraints:U.map(H=>H.constraints)});an(R,T)||(x(T),w.current.layout=T,O&&O(T),Ie(U,T,j.current))}}),[]),Fe(()=>{C.current.autoSaveId=n,C.current.direction=s,C.current.dragState=p,C.current.id=h,C.current.onLayout=o,C.current.storage=c}),Ul({committedValuesRef:C,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),k.useEffect(()=>{const{panelDataArray:S}=w.current;if(n){if(b.length===0||b.length!==S.length)return;let O=un[n];O==null&&(O=Wl(Vl,Xl),un[n]=O);const R=[...S],U=new Map(N.current);O(n,R,U,b,c)}},[n,b,c]),k.useEffect(()=>{});const M=k.useCallback(S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current;if(S.constraints.collapsible){const T=U.map(fe=>fe.constraints),{collapsedSize:H=0,panelSize:Y,pivotIndices:te}=De(U,S,R);if(V(Y!=null,`Panel size not found for panel "${S.id}"`),!je(Y,H)){N.current.set(S.id,Y);const E=Oe(U,S)===U.length-1?Y-H:H-Y,X=He({delta:E,initialLayout:R,panelConstraints:T,pivotIndices:te,prevLayout:R,trigger:"imperative-api"});ut(R,X)||(x(X),w.current.layout=X,O&&O(X),Ie(U,X,j.current))}}},[]),I=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current;if(S.constraints.collapsible){const H=T.map(ne=>ne.constraints),{collapsedSize:Y=0,panelSize:te=0,minSize:fe=0,pivotIndices:E}=De(T,S,U),X=O??fe;if(je(te,Y)){const ne=N.current.get(S.id),ge=ne!=null&&ne>=X?ne:X,Pe=Oe(T,S)===T.length-1?te-ge:ge-te,oe=He({delta:Pe,initialLayout:U,panelConstraints:H,pivotIndices:E,prevLayout:U,trigger:"imperative-api"});ut(U,oe)||(x(oe),w.current.layout=oe,R&&R(oe),Ie(T,oe,j.current))}}},[]),F=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{panelSize:U}=De(R,S,O);return V(U!=null,`Panel size not found for panel "${S.id}"`),U},[]),v=k.useCallback((S,O)=>{const{panelDataArray:R}=w.current,U=Oe(R,S);return Kl({defaultSize:O,dragState:p,layout:b,panelData:R,panelIndex:U})},[p,b]),P=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return V(H!=null,`Panel size not found for panel "${S.id}"`),T===!0&&je(H,U)},[]),W=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return V(H!=null,`Panel size not found for panel "${S.id}"`),!T||Me(H,U)>0},[]),A=k.useCallback(S=>{const{panelDataArray:O}=w.current;O.push(S),O.sort((R,U)=>{const T=R.order,H=U.order;return T==null&&H==null?0:T==null?-1:H==null?1:T-H}),w.current.panelDataArrayChanged=!0,y()},[y]);Fe(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:S,onLayout:O,storage:R}=C.current,{layout:U,panelDataArray:T}=w.current;let H=null;if(S){const te=Gl(S,T,R);te&&(N.current=new Map(Object.entries(te.expandToSizes)),H=te.layout)}H==null&&(H=ql({panelDataArray:T}));const Y=dn({layout:H,panelConstraints:T.map(te=>te.constraints)});an(U,Y)||(x(Y),w.current.layout=Y,O&&O(Y),Ie(T,Y,j.current))}}),Fe(()=>{const S=w.current;return()=>{S.layout=[]}},[]);const _=k.useCallback(S=>{let O=!1;const R=m.current;return R&&window.getComputedStyle(R,null).getPropertyValue("direction")==="rtl"&&(O=!0),function(T){T.preventDefault();const H=m.current;if(!H)return()=>null;const{direction:Y,dragState:te,id:fe,keyboardResizeBy:E,onLayout:X}=C.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Ne}=te??{},Pe=Zn(fe,S,H);let oe=Hl(T,S,Y,te,E,H);const at=Y==="horizontal";at&&O&&(oe=-oe);const Et=ge.map(Dt=>Dt.constraints),Ee=He({delta:oe,initialLayout:Ne??ne,panelConstraints:Et,pivotIndices:Pe,prevLayout:ne,trigger:Bn(T)?"keyboard":"mouse-or-touch"}),ct=!ut(ne,Ee);(Hn(T)||qn(T))&&z.current!=oe&&(z.current=oe,!ct&&oe!==0?at?Lt(S,oe<0?Wn:Gn):Lt(S,oe<0?Vn:Xn):Lt(S,0)),ct&&(x(Ee),w.current.layout=Ee,X&&X(Ee),Ie(ge,Ee,j.current))}},[]),B=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current,H=T.map(ne=>ne.constraints),{panelSize:Y,pivotIndices:te}=De(T,S,U);V(Y!=null,`Panel size not found for panel "${S.id}"`);const E=Oe(T,S)===T.length-1?Y-O:O-Y,X=He({delta:E,initialLayout:U,panelConstraints:H,pivotIndices:te,prevLayout:U,trigger:"imperative-api"});ut(U,X)||(x(X),w.current.layout=X,R&&R(X),Ie(T,X,j.current))},[]),G=k.useCallback((S,O)=>{const{layout:R,panelDataArray:U}=w.current,{collapsedSize:T=0,collapsible:H}=O,{collapsedSize:Y=0,collapsible:te,maxSize:fe=100,minSize:E=0}=S.constraints,{panelSize:X}=De(U,S,R);X!=null&&(H&&te&&je(X,T)?je(T,Y)||B(S,Y):X<E?B(S,E):X>fe&&B(S,fe))},[B]),q=k.useCallback((S,O)=>{const{direction:R}=C.current,{layout:U}=w.current;if(!m.current)return;const T=Nt(S,m.current);V(T,`Drag handle element not found for id "${S}"`);const H=es(R,O);g({dragHandleId:S,dragHandleRect:T.getBoundingClientRect(),initialCursorPosition:H,initialLayout:U})},[]),ee=k.useCallback(()=>{g(null)},[]),J=k.useCallback(S=>{const{panelDataArray:O}=w.current,R=Oe(O,S);R>=0&&(O.splice(R,1),delete j.current[S.id],w.current.panelDataArrayChanged=!0,y())},[y]),L=k.useMemo(()=>({collapsePanel:M,direction:s,dragState:p,expandPanel:I,getPanelSize:F,getPanelStyle:v,groupId:h,isPanelCollapsed:P,isPanelExpanded:W,reevaluatePanelConstraints:G,registerPanel:A,registerResizeHandle:_,resizePanel:B,startDragging:q,stopDragging:ee,unregisterPanel:J,panelGroupElement:m.current}),[M,p,s,I,F,v,h,P,W,G,A,_,B,q,ee,J]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return k.createElement(jt.Provider,{value:L},k.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const rs=k.forwardRef((n,e)=>k.createElement(ls,{...n,forwardedRef:e}));ls.displayName="PanelGroup";rs.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function De(n,e,t){const s=Oe(n,e),i=s===n.length-1?[s-1,s]:[s,s+1],o=t[s];return{...e.constraints,panelSize:o,pivotIndices:i}}function Ql({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){k.useEffect(()=>{if(n||t==null||s==null)return;const r=Nt(e,s);if(r==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),t(o);break}case"F6":{o.preventDefault();const a=r.getAttribute(se.groupId);V(a,`No group element found for id "${a}"`);const c=Ye(a,s),d=Yn(a,e,s);V(d!==null,`No resize element found for id "${e}"`);const f=o.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[f].focus();break}}};return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}},[s,n,e,t])}function is({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:r,onBlur:i,onClick:o,onDragging:a,onFocus:c,onPointerDown:d,onPointerUp:f,style:u={},tabIndex:h=0,tagName:m="div",...p}){var g,b;const x=k.useRef(null),y=k.useRef({onClick:o,onDragging:a,onPointerDown:d,onPointerUp:f});k.useEffect(()=>{y.current.onClick=o,y.current.onDragging=a,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=k.useContext(jt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:z,registerResizeHandle:C,startDragging:w,stopDragging:M,panelGroupElement:I}=j,F=Vt(r),[v,P]=k.useState("inactive"),[W,A]=k.useState(!1),[_,B]=k.useState(null),G=k.useRef({state:v});Fe(()=>{G.current.state=v}),k.useEffect(()=>{if(t)B(null);else{const L=C(F);B(()=>L)}},[t,F,C]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;k.useEffect(()=>{if(t||_==null)return;const L=x.current;V(L,"Element ref not attached");let K=!1;return Il(F,L,N,{coarse:q,fine:ee},(O,R,U)=>{if(!R){P("inactive");return}switch(O){case"down":{P("drag"),K=!1,V(U,'Expected event to be defined for "down" action'),w(F,U);const{onDragging:T,onPointerDown:H}=y.current;T?.(!0),H?.();break}case"move":{const{state:T}=G.current;K=!0,T!=="drag"&&P("hover"),V(U,'Expected event to be defined for "move" action'),_(U);break}case"up":{P("hover"),M();const{onClick:T,onDragging:H,onPointerUp:Y}=y.current;H?.(!1),Y?.(),K||T?.();break}}})},[q,N,t,ee,C,F,_,w,M]),Ql({disabled:t,handleId:F,resizeHandler:_,panelGroupElement:I});const J={touchAction:"none",userSelect:"none"};return k.createElement(m,{...p,children:n,className:e,id:r,onBlur:()=>{A(!1),i?.()},onFocus:()=>{A(!0),c?.()},ref:x,role:"separator",style:{...J,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:z,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":W?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:F,[se.resizeHandleState]:v})}is.displayName="PanelResizeHandle";function Yl(n){const e=$.c(10);let t,s,r;e[0]!==n?({className:t,ref:r,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=ce("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==s||e[7]!==r||e[8]!==i?(o=l.jsx(rs,{ref:r,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=r,e[8]=i,e[9]=o):o=e[9],o}function fn(n){const e=$.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(Un,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function Zl(n){const e=$.c(12);let t,s,r;e[0]!==n?({withHandle:r,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=ce("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=i):i=e[5];let o;e[6]!==r?(o=r&&l.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:l.jsx(Ds,{className:"size-2.5"})}),e[6]=r,e[7]=o):o=e[7];let a;return e[8]!==s||e[9]!==i||e[10]!==o?(a=l.jsx(is,{"data-slot":"resizable-handle",className:i,...s,children:o}),e[8]=s,e[9]=i,e[10]=o,e[11]=a):a=e[11],a}function Jl(n){if(!n||n.includes("\\")||n.includes("..")||n.includes("\0"))return!0;try{const e=decodeURIComponent(n);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==n&&e.includes("/")){const t=(n.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>t)return!0}return!1}catch{return!0}}function er(n){if(Jl(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function tr(n){try{return decodeURIComponent(n)}catch{return n}}function nr(n){return er(n),encodeURIComponent(n)}function sr(n){return`.deco/blocks/${nr(n)}.json`}function Lo(n){return`/${sr(n)}`}const Oo=1e4,lr=3;function Ut(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function Yt(n){return n.startsWith("/")?n.slice(1):n}function bt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function rr(n){const e=bt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function Ro(n,e){const t=e.replace(/^\/+|\/+$/g,"");return bt(t?`${n==="/"?"":n}/${t}`:n)}function Ao(n,e){return e==="directory"?n:rr(n)}function _o(n){const e=n.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function ir(n){const e=Yt(n);return e?e.split("/").filter(Boolean).length:0}function Uo(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function Bo(n,e){return ir(n)>=lr&&!e.has(n)}function Ho(n,e,t=[]){const s=Yt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const r=`${s}/`;return e.some(i=>i.startsWith(r))||t.some(i=>i.startsWith(r))}function qo(n){const e=Yt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return tr(s)}function or(n){if(!n)return"plaintext";const e=n.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function Ko(n){const e=Ut(n).split("/").filter(Boolean),t=["/"];let s="";for(const r of e.slice(0,-1))s+=`/${r}`,t.push(s);return t}function Wo(n,e=[]){const t={children:[]},s=i=>{const a=Ut(i).split("/").filter(Boolean);let c=t,d="";for(const f of a){d+=`/${f}`;let u=c.children.find(h=>h.name===f);u?u.kind==="file"&&(u.kind="directory"):(u={name:f,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of n){const a=Ut(i).split("/").filter(Boolean);let c=t,d="";a.forEach((f,u)=>{d+=`/${f}`;const h=u===a.length-1;let m=c.children.find(p=>p.name===f);m||(m={name:f,path:d,kind:h?"file":"directory",children:[]},c.children.push(m)),c=m})}for(const i of e)s(bt(i));const r=i=>{i.sort((o,a)=>o.kind!==a.kind?o.kind==="directory"?-1:1:o.name.localeCompare(a.name));for(const o of i)o.children.length>0&&r(o.children)};return r(t.children),t.children}function ar(n,e,t=0){const s=[];for(const r of n)r.name!==".gitkeep"&&(s.push({node:r,depth:t}),r.kind==="directory"&&r.children.length>0&&e.has(r.path)&&s.push(...ar(r.children,e,t+1)));return s}function Go(n){return n.split(`
|
|
1
|
+
import{c as $,C as de,n as Ze,d as We,K as Q,m as ie,aY as kn,r as k,ap as Ss,l as ce,j as l,U as Ns,i as zs,B as Z,aL as Sn,t as ue,w as Cs,L as $s,e as Ps,b as Nn,u as zn,E as Tt}from"./index-C0L0gsTW.js";import{i as Es}from"./ChevronRight-C7wVU6xm.js";import{s as Cn}from"./Eye-CiT8XwGY.js";import{n as Ve,i as yt}from"./Globe01-m_iWwP7h.js";import{b as Ds,c as Ts,e as Fs,i as Ms,f as $n,a as Ht,g as Is,d as Ls}from"./ZoomOut-n1xODnHK.js";import{a as ht}from"./Palette-CK7RPv71.js";import{s as Os}from"./Plus-CJaBsq2g.js";import{i as Rs}from"./SearchLg-BAORD1IJ.js";import{t as As}from"./Stars01-Ce8lvBwj.js";import{i as mt}from"./Upload01-DP24F4zF.js";import{s as Pn}from"./XClose-DMUE33fT.js";import{i as qt}from"./Zap-BJ87dj__.js";import{u as En}from"./use-mobile-DysDD1oQ.js";import{f as _s,a as Us,b as Bs,c as Hs,d as qs,e as Ks,A as Ws,g as Gs}from"./alert-dialog-8PO_NEz4.js";import{D as Dn,a as Ue,d as Je,e as et,i as Tn,h as Vs,c as Xs}from"./dialog-PqLpQyqq.js";import{I as Xe}from"./input-CIDLFJ95.js";import{S as ae}from"./skeleton-BWpAqYVQ.js";import{F as Se,M as Kt,d as Fn}from"./file-type-icon-C9tb4Pv9.js";import{T as Qs}from"./toolbar-B4surw5Y.js";import{a as Ys}from"./Package-BXwBjJnV.js";import{u as Zs}from"./use-debounced-value-B3l11Ldt.js";import{i as vt}from"./DotsVertical-DMfZlsta.js";import{i as Mn}from"./Key01-tPAaQviB.js";import{s as wt}from"./Trash01-D2i1ZJ_v.js";import{D as tt,a as nt,c as st,d as be}from"./dropdown-menu-jTbTQ73Y.js";import{T as Js}from"./textarea-DhI1-5gM.js";import{t as el}from"./ChevronDown-Bh19zKPC.js";import{n as tl}from"./ChevronUp-D01P3dTH.js";import{i as pt}from"./X--9wQR3oP.js";import{P as nl,b as sl,a as ll}from"./popover-BnI3Hmon.js";import{b as ye,T as ve,a as we}from"./tooltip-isqb_L33.js";import{i as rl}from"./Check-6KpG9Poi.js";import{a as il}from"./Copy01-d1nLCuGq.js";import{n as In}from"./LinkExternal01-CG3Pw9Hz.js";import{l as ol,F as al}from"./index-CNNzBHqn.js";import{i as cl}from"./LayoutLeft-Bnwt_58u.js";function Ln(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const r=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${r?`?${r}`:""}`}async function he(n,e){const t=await fetch(n,e);if(!t.ok){let s="";try{s=(await t.json()).error??""}catch{}throw new Error(s||`HTTP ${t.status}`)}return t}function Wt(n,e){const t=$.c(11),{org:s}=de();let r;t[0]!==s.id||t[1]!==e||t[2]!==n?(r=Q.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=r):r=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await he(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(dl),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let o;return t[8]!==r||t[9]!==i?(o={queryKey:r,placeholderData:kn,queryFn:i},t[8]=r,t[9]=i,t[10]=o):o=t[10],ie(o)}function dl(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function On(n,e,t){const s=$.c(15),{org:r}=de();let i;s[0]!==r.id||s[1]!==e||s[2]!==n?(i=Q.orgFsStat(r.id,n??"",e),s[0]=r.id,s[1]=e,s[2]=n,s[3]=i):i=s[3];const o=n!==null;let a;s[4]!==t?(a=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=a):a=s[5];let c;s[6]!==r.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fetch(pe(r.slug,n??"","stat",{path:e}));if(f.status===404)return null;if(!f.ok)throw new Error(`HTTP ${f.status}`);return(await f.json()).entry},s[6]=r.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let d;return s[10]!==i||s[11]!==o||s[12]!==a||s[13]!==c?(d={queryKey:i,enabled:o,refetchInterval:a,queryFn:c},s[10]=i,s[11]=o,s[12]=a,s[13]=c,s[14]=d):d=s[14],ie(d)}function ul(n){const e=$.c(9),{org:t}=de();let s;e[0]!==t.id||e[1]!==n?(s=Q.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let r;e[3]!==t.slug||e[4]!==n?(r=async()=>await(await he(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==r?(i={queryKey:s,queryFn:r},e[6]=s,e[7]=r,e[8]=i):i=e[8],ie(i)}function fl(n,e){const t=$.c(9),s=n===void 0?60:n,{org:r}=de();let i;t[0]!==r.id?(i=Q.orgFsRecent(r.id),t[0]=r.id,t[1]=i):i=t[1];const o=e?.enabled;let a;t[2]!==s||t[3]!==r.slug?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=r.slug,t[4]=a):a=t[4];let c;return t[5]!==i||t[6]!==o||t[7]!==a?(c={queryKey:i,enabled:o,queryFn:a},t[5]=i,t[6]=o,t[7]=a,t[8]=c):c=t[8],ie(c)}function hl(n,e){const t=$.c(11),s=50,{org:r}=de();let i;t[0]!==r.id||t[1]!==n?(i=Q.orgFsSearch(r.id,n),t[0]=r.id,t[1]=n,t[2]=i):i=t[2];const o=n.length>0;let a;t[3]!==s||t[4]!==r.slug||t[5]!==n?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=r.slug,t[5]=n,t[6]=a):a=t[6];let c;return t[7]!==i||t[8]!==o||t[9]!==a?(c={queryKey:i,enabled:o,placeholderData:kn,queryFn:a},t[7]=i,t[8]=o,t[9]=a,t[10]=c):c=t[10],ie(c)}function Fo(n){const e=$.c(8),{org:t}=de();let s;e[0]!==t.id?(s=Q.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const r=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const a=await he(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await a.json();return c.map(ml)},e[2]=t.slug,e[3]=i):i=e[3];let o;return e[4]!==s||e[5]!==r||e[6]!==i?(o={queryKey:s,enabled:r,queryFn:i},e[4]=s,e[5]=r,e[6]=i,e[7]=o):o=e[7],ie(o)}function ml(n){return{volume:n.volume,path:n.path}}async function Mo(n){const e=await he(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function pl(n,e,t){return(await he(pe(n,e,"read",{path:t}))).text()}const xl=new Set(["md","mdx","markdown","txt","text"]),gl=25,bl=64*1024,yl=256*1024,vl=4;function wl(n){const e=n.lastIndexOf(".");return e===-1?!1:xl.has(n.slice(e+1).toLowerCase())}async function Io(n,e,t){const s=t?`${t}/`:"",r=u=>u.startsWith(s)?u.slice(s.length):u,i=[],o=[],a=[{path:t,depth:0}];for(;a.length>0;){const u=a.shift();if(!u)break;let h;try{h=(await(await he(pe(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const m of[...h].sort((p,g)=>p.path.localeCompare(g.path))){if(m.kind==="dir"){u.depth<vl&&a.push({path:m.path,depth:u.depth+1});continue}wl(m.path)&&m.size<=bl&&i.length<gl?i.push(m.path):o.push(r(m.path))}}const c=await Promise.all(i.map(u=>pl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>yl){o.push(r(u));return}f+=m.length,d.push({relPath:r(u),content:m})}),d.sort((u,h)=>u.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:u.relPath.localeCompare(h.relPath)),o.sort(),{files:d,omittedPaths:o}}function Rn(){const n=$.c(7),{org:e}=de();let t;n[0]!==e.id?(t=Q.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await he(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let r;return n[4]!==t||n[5]!==s?(r={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=r):r=n[6],ie(r)}function jl(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t.slug||e[1]!==n?(s=r=>pe(t.slug,n,"read",{path:r}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function lt(){const n=$.c(2),{org:e}=de();let t;return n[0]!==e.slug?(t=(s,r)=>pe(e.slug,s,"read",{path:r}),n[0]=e.slug,n[1]=t):t=n[1],t}function An(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async r=>(await(await he(pe(t.slug,n,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function kl(n){const e=$.c(18),{org:t}=de(),s=Ze();let r;e[0]!==t||e[1]!==n?(r=async d=>(await(await he(pe(t.slug,n,"public",{path:d.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:d.mode,password:d.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=r):r=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=Q.orgFsStat(t.id,n,d.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),h=d.mode!=="private";return s.setQueryData(f,m=>m&&{...m,readPublic:h,effectivePublic:h,shareMode:d.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=i):i=e[6];let o;e[7]!==s?(o=(d,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=o):o=e[8];let a;e[9]!==t||e[10]!==s||e[11]!==n?(a=(d,f,u)=>{s.invalidateQueries({queryKey:Q.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=a):a=e[12];let c;return e[13]!==r||e[14]!==i||e[15]!==o||e[16]!==a?(c={mutationFn:r,onMutate:i,onError:o,onSettled:a},e[13]=r,e[14]=i,e[15]=o,e[16]=a,e[17]=c):c=e[17],We(c)}function At(n){const e=$.c(26),{org:t}=de(),s=Ze();let r;e[0]!==t||e[1]!==s||e[2]!==n?(r=()=>{s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=r):r=e[3];const i=r;let o;e[4]!==t||e[5]!==n?(o=async b=>{for(const x of b.files){const y=b.dir?`${b.dir}/${x.name}`:x.name;await he(pe(t.slug,n,"file",{path:y}),{method:"PUT",headers:{"content-type":x.type||"application/octet-stream"},body:x})}},e[4]=t,e[5]=n,e[6]=o):o=e[6];let a;e[7]!==i||e[8]!==o?(a={mutationFn:o,onSettled:i},e[7]=i,e[8]=o,e[9]=a):a=e[9];const c=We(a);let d;e[10]!==t||e[11]!==n?(d=async b=>{await he(pe(t.slug,n,"dir",{path:b}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=d):d=e[12];let f;e[13]!==i||e[14]!==d?(f={mutationFn:d,onSuccess:i},e[13]=i,e[14]=d,e[15]=f):f=e[15];const u=We(f);let h;e[16]!==t||e[17]!==n?(h=async b=>{await he(pe(t.slug,n,"file",{path:b}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=h):h=e[18];let m;e[19]!==i||e[20]!==h?(m={mutationFn:h,onSuccess:i},e[19]=i,e[20]=h,e[21]=m):m=e[21];const p=We(m);let g;return e[22]!==u||e[23]!==p||e[24]!==c?(g={upload:c,mkdir:u,remove:p},e[22]=u,e[23]=p,e[24]=c,e[25]=g):g=e[25],g}const jt=k.createContext(null);jt.displayName="PanelGroupContext";const se={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Gt=10,Fe=k.useLayoutEffect,sn=Ss.useId,Sl=typeof sn=="function"?sn:()=>null;let Nl=0;function Vt(n=null){const e=Sl(),t=k.useRef(n||e||null);return t.current===null&&(t.current=""+Nl++),n??t.current}function _n({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:r,forwardedRef:i,id:o,maxSize:a,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=k.useContext(jt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:z,isPanelCollapsed:C,reevaluatePanelConstraints:w,registerPanel:M,resizePanel:I,unregisterPanel:F}=b,v=Vt(o),P=k.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:r,maxSize:a,minSize:c},id:v,idIsFromProps:o!==void 0,order:h});k.useRef({didLogMissingDefaultSizeWarning:!1}),Fe(()=>{const{callbacks:A,constraints:_}=P.current,B={..._};P.current.id=v,P.current.idIsFromProps=o!==void 0,P.current.order=h,A.onCollapse=d,A.onExpand=f,A.onResize=u,_.collapsedSize=t,_.collapsible=s,_.defaultSize=r,_.maxSize=a,_.minSize=c,(B.collapsedSize!==_.collapsedSize||B.collapsible!==_.collapsible||B.maxSize!==_.maxSize||B.minSize!==_.minSize)&&w(P.current,B)}),Fe(()=>{const A=P.current;return M(A),()=>{F(A)}},[h,v,M,F]),k.useImperativeHandle(i,()=>({collapse:()=>{x(P.current)},expand:A=>{y(P.current,A)},getId(){return v},getSize(){return j(P.current)},isCollapsed(){return C(P.current)},isExpanded(){return!C(P.current)},resize:A=>{I(P.current,A)}}),[x,y,j,C,v,I]);const W=N(P.current,r);return k.createElement(p,{...g,children:n,className:e,id:v,style:{...W,...m},[se.groupId]:z,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+W.flexGrow).toFixed(1)})}const Un=k.forwardRef((n,e)=>k.createElement(_n,{...n,forwardedRef:e}));_n.displayName="Panel";Un.displayName="forwardRef(Panel)";let _t=null,ft=-1,Ce=null;function zl(n,e){if(e){const t=(e&Wn)!==0,s=(e&Gn)!==0,r=(e&Vn)!==0,i=(e&Xn)!==0;if(t)return r?"se-resize":i?"ne-resize":"e-resize";if(s)return r?"sw-resize":i?"nw-resize":"w-resize";if(r)return"s-resize";if(i)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Cl(){Ce!==null&&(document.head.removeChild(Ce),_t=null,Ce=null,ft=-1)}function Ft(n,e){var t,s;const r=zl(n,e);if(_t!==r){if(_t=r,Ce===null&&(Ce=document.createElement("style"),document.head.appendChild(Ce)),ft>=0){var i;(i=Ce.sheet)===null||i===void 0||i.removeRule(ft)}ft=(t=(s=Ce.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${r} !important;}`))!==null&&t!==void 0?t:-1}}function Bn(n){return n.type==="keydown"}function Hn(n){return n.type.startsWith("pointer")}function qn(n){return n.type.startsWith("mouse")}function kt(n){if(Hn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(qn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function $l(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Pl(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function El(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:on(n),b:on(e)};let s;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),s=n;V(s,"Stacking order can only be calculated for elements with a common ancestor");const r={a:rn(ln(t.a)),b:rn(ln(t.b))};if(r.a===r.b){const i=s.childNodes,o={a:t.a.at(-1),b:t.b.at(-1)};let a=i.length;for(;a--;){const c=i[a];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(r.a-r.b)}const Dl=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Tl(n){var e;const t=getComputedStyle((e=Kn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Fl(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Tl(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Dl.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function ln(n){let e=n.length;for(;e--;){const t=n[e];if(V(t,"Missing node"),Fl(t))return t}return null}function rn(n){return n&&Number(getComputedStyle(n).zIndex)||0}function on(n){const e=[];for(;n;)e.push(n),n=Kn(n);return e}function Kn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Wn=1,Gn=2,Vn=4,Xn=8,Ml=$l()==="coarse";let xe=[],_e=!1,Te=new Map,St=new Map;const Qe=new Set;function Il(n,e,t,s,r){var i;const{ownerDocument:o}=e,a={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:r},c=(i=Te.get(o))!==null&&i!==void 0?i:0;return Te.set(o,c+1),Qe.add(a),xt(),function(){var f;St.delete(n),Qe.delete(a);const u=(f=Te.get(o))!==null&&f!==void 0?f:1;if(Te.set(o,u-1),xt(),u===1&&Te.delete(o),xe.includes(a)){const h=xe.indexOf(a);h>=0&&xe.splice(h,1),Qt(),r("up",!0,null)}}}function Ll(n){const{target:e}=n,{x:t,y:s}=kt(n);_e=!0,Xt({target:e,x:t,y:s}),xt(),xe.length>0&&(gt("down",n),n.preventDefault(),Qn(e)||n.stopImmediatePropagation())}function Mt(n){const{x:e,y:t}=kt(n);if(_e&&n.buttons===0&&(_e=!1,gt("up",n)),!_e){const{target:s}=n;Xt({target:s,x:e,y:t})}gt("move",n),Qt(),xe.length>0&&n.preventDefault()}function It(n){const{target:e}=n,{x:t,y:s}=kt(n);St.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Qn(e)||n.stopImmediatePropagation()),gt("up",n),Xt({target:e,x:t,y:s}),Qt(),xt()}function Qn(n){let e=n;for(;e;){if(e.hasAttribute(se.resizeHandle))return!0;e=e.parentElement}return!1}function Xt({target:n,x:e,y:t}){xe.splice(0);let s=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(s=n),Qe.forEach(r=>{const{element:i,hitAreaMargins:o}=r,a=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=a,h=Ml?o.coarse:o.fine;if(e>=d-h&&e<=f+h&&t>=u-h&&t<=c+h){if(s!==null&&document.contains(s)&&i!==s&&!i.contains(s)&&!s.contains(i)&&El(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(Pl(p.getBoundingClientRect(),a)){g=!0;break}p=p.parentElement}if(g)return}xe.push(r)}})}function Lt(n,e){St.set(n,e)}function Qt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:r}=s;r==="horizontal"?n=!0:e=!0});let t=0;St.forEach(s=>{t|=s}),n&&e?Ft("intersection",t):n?Ft("horizontal",t):e?Ft("vertical",t):Cl()}let Ot=new AbortController;function xt(){Ot.abort(),Ot=new AbortController;const n={capture:!0,signal:Ot.signal};Qe.size&&(_e?(xe.length>0&&Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",It,n),s.addEventListener("pointerleave",Mt,n),s.addEventListener("pointermove",Mt,n))}),window.addEventListener("pointerup",It,n),window.addEventListener("pointercancel",It,n)):Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Ll,n),s.addEventListener("pointermove",Mt,n))}))}function gt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,r=xe.includes(t);s(n,r,e)})}function Ol(){const[n,e]=k.useState(0);return k.useCallback(()=>e(t=>t+1),[])}function V(n,e){if(!n)throw console.error(e),Error(e)}function Me(n,e,t=Gt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function je(n,e,t=Gt){return Me(n,e,t)===0}function me(n,e,t){return Me(n,e,t)===0}function Rl(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const r=n[s],i=e[s];if(!me(r,i,t))return!1}return!0}function Ae({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];V(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:r=0,collapsible:i,maxSize:o=100,minSize:a=0}=s;if(Me(t,a)<0)if(i){const c=(r+a)/2;Me(t,c)<0?t=r:t=a}else t=a;return t=Math.min(o,t),t=parseFloat(t.toFixed(Gt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:r,trigger:i}){if(me(n,0))return e;const o=[...e],[a,c]=s;V(a!=null,"Invalid first pivot index"),V(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:a,h=t[u];V(h,`Panel constraints not found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,m)){const x=g-b;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}{const u=n<0?a:c,h=t[u];V(h,`No panel constraints found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,g)){const x=b-m;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}}{const u=n<0?1:-1;let h=n<0?c:a,m=0;for(;;){const g=e[h];V(g!=null,`Previous layout not found for panel index ${h}`);const x=Ae({panelConstraints:t,panelIndex:h,size:100})-g;if(m+=x,h+=u,h<0||h>=t.length)break}const p=Math.min(Math.abs(n),Math.abs(m));n=n<0?0-p:p}{let h=n<0?a:c;for(;h>=0&&h<t.length;){const m=Math.abs(n)-Math.abs(d),p=e[h];V(p!=null,`Previous layout not found for panel index ${h}`);const g=p-m,b=Ae({panelConstraints:t,panelIndex:h,size:g});if(!me(p,b)&&(d+=p-b,o[h]=b,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?h--:h++}}if(Rl(r,o))return r;{const u=n<0?c:a,h=e[u];V(h!=null,`Previous layout not found for panel index ${u}`);const m=h+d,p=Ae({panelConstraints:t,panelIndex:u,size:m});if(o[u]=p,!me(p,m)){let g=m-p,x=n<0?c:a;for(;x>=0&&x<t.length;){const y=o[x];V(y!=null,`Previous layout not found for panel index ${x}`);const j=y+g,N=Ae({panelConstraints:t,panelIndex:x,size:j});if(me(y,N)||(g-=N-y,o[x]=N),me(g,0))break;n>0?x--:x++}}}const f=o.reduce((u,h)=>h+u,0);return me(f,100)?o:r}function Al({layout:n,panelsArray:e,pivotIndices:t}){let s=0,r=100,i=0,o=0;const a=t[0];V(a!=null,"No pivot index found"),e.forEach((u,h)=>{const{constraints:m}=u,{maxSize:p=100,minSize:g=0}=m;h===a?(s=g,r=p):(i+=g,o+=p)});const c=Math.min(r,100-i),d=Math.max(s,100-o),f=n[a];return{valueMax:c,valueMin:d,valueNow:f}}function Ye(n,e=document){return Array.from(e.querySelectorAll(`[${se.resizeHandleId}][data-panel-group-id="${n}"]`))}function Yn(n,e,t=document){const r=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return r??null}function Zn(n,e,t){const s=Yn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function Jn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const s=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return s||null}function Nt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function _l(n,e,t,s=document){var r,i,o,a;const c=Nt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(r=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&r!==void 0?r:null,h=(o=(a=t[f+1])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null;return[u,h]}function Ul({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:r,panelGroupElement:i,setLayout:o}){k.useRef({didWarnAboutMissingResizeHandle:!1}),Fe(()=>{if(!i)return;const a=Ye(t,i);for(let c=0;c<r.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=Al({layout:s,panelsArray:r,pivotIndices:[c,c+1]}),h=a[c];if(h!=null){const m=r[c];V(m,`No panel data found for index "${c}"`),h.setAttribute("aria-controls",m.id),h.setAttribute("aria-valuemax",""+Math.round(d)),h.setAttribute("aria-valuemin",""+Math.round(f)),h.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{a.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[t,s,r,i]),k.useEffect(()=>{if(!i)return;const a=e.current;V(a,"Eager values not found");const{panelDataArray:c}=a,d=Jn(t,i);V(d!=null,`No group found for id "${t}"`);const f=Ye(t,i);V(f,`No resize handles found for group id "${t}"`);const u=f.map(h=>{const m=h.getAttribute(se.resizeHandleId);V(m,"Resize handle element has no handle id attribute");const[p,g]=_l(t,m,c,i);if(p==null||g==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const y=c.findIndex(j=>j.id===p);if(y>=0){const j=c[y];V(j,`No panel data found for index ${y}`);const N=s[y],{collapsedSize:z=0,collapsible:C,minSize:w=0}=j.constraints;if(N!=null&&C){const M=He({delta:me(N,z)?w-z:z-N,initialLayout:s,panelConstraints:c.map(I=>I.constraints),pivotIndices:Zn(t,m,i),prevLayout:s,trigger:"keyboard"});s!==M&&o(M)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,r,o])}function an(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function es(n,e){const t=n==="horizontal",{x:s,y:r}=kt(e);return t?s:r}function Bl(n,e,t,s,r){const i=t==="horizontal",o=Nt(e,r);V(o,`No resize handle element found for id "${e}"`);const a=o.getAttribute(se.groupId);V(a,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=es(t,n),f=Jn(a,r);V(f,`No group element found for id "${a}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function Hl(n,e,t,s,r,i){if(Bn(n)){const o=t==="horizontal";let a=0;n.shiftKey?a=100:r!=null?a=r:a=10;let c=0;switch(n.key){case"ArrowDown":c=o?0:a;break;case"ArrowLeft":c=o?-a:0;break;case"ArrowRight":c=o?a:0;break;case"ArrowUp":c=o?0:-a;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:Bl(n,e,t,s,i)}function ql({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,r=100;for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;a!=null&&(s++,e[i]=a,r-=a)}for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;if(a!=null)continue;const c=n.length-s,d=r/c;s++,e[i]=d,r-=d}return e}function Ie(n,e,t){e.forEach((s,r)=>{const i=n[r];V(i,`Panel data not found for index ${r}`);const{callbacks:o,constraints:a,id:c}=i,{collapsedSize:d=0,collapsible:f}=a,u=t[c];if(u==null||s!==u){t[c]=s;const{onCollapse:h,onExpand:m,onResize:p}=o;p&&p(s,u),f&&(h||m)&&(m&&(u==null||je(u,d))&&!je(s,d)&&m(),h&&(u==null||!je(u,d))&&je(s,d)&&h())}})}function ut(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Kl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:r,precision:i=3}){const o=t[r];let a;return o==null?a=n!=null?n.toPrecision(i):"1":s.length===1?a="1":a=o.toPrecision(i),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Wl(n,e=10){let t=null;return(...r)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...r)},e)}}function cn(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function ts(n){return`react-resizable-panels:${n}`}function ns(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:r,order:i}=e;return r?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function ss(n,e){try{const t=ts(n),s=e.getItem(t);if(s){const r=JSON.parse(s);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function Gl(n,e,t){var s,r;const i=(s=ss(n,t))!==null&&s!==void 0?s:{},o=ns(e);return(r=i[o])!==null&&r!==void 0?r:null}function Vl(n,e,t,s,r){var i;const o=ts(n),a=ns(e),c=(i=ss(n,r))!==null&&i!==void 0?i:{};c[a]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{r.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function dn({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((i,o)=>i+o,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(i=>`${i}%`).join(", ")}`);if(!me(s,100)&&t.length>0)for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=100/s*o;t[i]=a}let r=0;for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=Ae({panelConstraints:e,panelIndex:i,size:o});o!=a&&(r+=o-a,t[i]=a)}if(!me(r,0))for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=o+r,c=Ae({panelConstraints:e,panelIndex:i,size:a});if(o!==c&&(r-=c-o,t[i]=c,me(r,0)))break}return t}const Xl=100,qe={getItem:n=>(cn(qe),qe.getItem(n)),setItem:(n,e)=>{cn(qe),qe.setItem(n,e)}},un={};function ls({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:r,id:i=null,onLayout:o=null,keyboardResizeBy:a=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Vt(i),m=k.useRef(null),[p,g]=k.useState(null),[b,x]=k.useState([]),y=Ol(),j=k.useRef({}),N=k.useRef(new Map),z=k.useRef(0),C=k.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:a,onLayout:o,storage:c}),w=k.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});k.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),k.useImperativeHandle(r,()=>({getId:()=>C.current.id,getLayout:()=>{const{layout:S}=w.current;return S},setLayout:S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current,T=dn({layout:S,panelConstraints:U.map(H=>H.constraints)});an(R,T)||(x(T),w.current.layout=T,O&&O(T),Ie(U,T,j.current))}}),[]),Fe(()=>{C.current.autoSaveId=n,C.current.direction=s,C.current.dragState=p,C.current.id=h,C.current.onLayout=o,C.current.storage=c}),Ul({committedValuesRef:C,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),k.useEffect(()=>{const{panelDataArray:S}=w.current;if(n){if(b.length===0||b.length!==S.length)return;let O=un[n];O==null&&(O=Wl(Vl,Xl),un[n]=O);const R=[...S],U=new Map(N.current);O(n,R,U,b,c)}},[n,b,c]),k.useEffect(()=>{});const M=k.useCallback(S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current;if(S.constraints.collapsible){const T=U.map(fe=>fe.constraints),{collapsedSize:H=0,panelSize:Y,pivotIndices:te}=De(U,S,R);if(V(Y!=null,`Panel size not found for panel "${S.id}"`),!je(Y,H)){N.current.set(S.id,Y);const E=Oe(U,S)===U.length-1?Y-H:H-Y,X=He({delta:E,initialLayout:R,panelConstraints:T,pivotIndices:te,prevLayout:R,trigger:"imperative-api"});ut(R,X)||(x(X),w.current.layout=X,O&&O(X),Ie(U,X,j.current))}}},[]),I=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current;if(S.constraints.collapsible){const H=T.map(ne=>ne.constraints),{collapsedSize:Y=0,panelSize:te=0,minSize:fe=0,pivotIndices:E}=De(T,S,U),X=O??fe;if(je(te,Y)){const ne=N.current.get(S.id),ge=ne!=null&&ne>=X?ne:X,Pe=Oe(T,S)===T.length-1?te-ge:ge-te,oe=He({delta:Pe,initialLayout:U,panelConstraints:H,pivotIndices:E,prevLayout:U,trigger:"imperative-api"});ut(U,oe)||(x(oe),w.current.layout=oe,R&&R(oe),Ie(T,oe,j.current))}}},[]),F=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{panelSize:U}=De(R,S,O);return V(U!=null,`Panel size not found for panel "${S.id}"`),U},[]),v=k.useCallback((S,O)=>{const{panelDataArray:R}=w.current,U=Oe(R,S);return Kl({defaultSize:O,dragState:p,layout:b,panelData:R,panelIndex:U})},[p,b]),P=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return V(H!=null,`Panel size not found for panel "${S.id}"`),T===!0&&je(H,U)},[]),W=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return V(H!=null,`Panel size not found for panel "${S.id}"`),!T||Me(H,U)>0},[]),A=k.useCallback(S=>{const{panelDataArray:O}=w.current;O.push(S),O.sort((R,U)=>{const T=R.order,H=U.order;return T==null&&H==null?0:T==null?-1:H==null?1:T-H}),w.current.panelDataArrayChanged=!0,y()},[y]);Fe(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:S,onLayout:O,storage:R}=C.current,{layout:U,panelDataArray:T}=w.current;let H=null;if(S){const te=Gl(S,T,R);te&&(N.current=new Map(Object.entries(te.expandToSizes)),H=te.layout)}H==null&&(H=ql({panelDataArray:T}));const Y=dn({layout:H,panelConstraints:T.map(te=>te.constraints)});an(U,Y)||(x(Y),w.current.layout=Y,O&&O(Y),Ie(T,Y,j.current))}}),Fe(()=>{const S=w.current;return()=>{S.layout=[]}},[]);const _=k.useCallback(S=>{let O=!1;const R=m.current;return R&&window.getComputedStyle(R,null).getPropertyValue("direction")==="rtl"&&(O=!0),function(T){T.preventDefault();const H=m.current;if(!H)return()=>null;const{direction:Y,dragState:te,id:fe,keyboardResizeBy:E,onLayout:X}=C.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Ne}=te??{},Pe=Zn(fe,S,H);let oe=Hl(T,S,Y,te,E,H);const at=Y==="horizontal";at&&O&&(oe=-oe);const Et=ge.map(Dt=>Dt.constraints),Ee=He({delta:oe,initialLayout:Ne??ne,panelConstraints:Et,pivotIndices:Pe,prevLayout:ne,trigger:Bn(T)?"keyboard":"mouse-or-touch"}),ct=!ut(ne,Ee);(Hn(T)||qn(T))&&z.current!=oe&&(z.current=oe,!ct&&oe!==0?at?Lt(S,oe<0?Wn:Gn):Lt(S,oe<0?Vn:Xn):Lt(S,0)),ct&&(x(Ee),w.current.layout=Ee,X&&X(Ee),Ie(ge,Ee,j.current))}},[]),B=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current,H=T.map(ne=>ne.constraints),{panelSize:Y,pivotIndices:te}=De(T,S,U);V(Y!=null,`Panel size not found for panel "${S.id}"`);const E=Oe(T,S)===T.length-1?Y-O:O-Y,X=He({delta:E,initialLayout:U,panelConstraints:H,pivotIndices:te,prevLayout:U,trigger:"imperative-api"});ut(U,X)||(x(X),w.current.layout=X,R&&R(X),Ie(T,X,j.current))},[]),G=k.useCallback((S,O)=>{const{layout:R,panelDataArray:U}=w.current,{collapsedSize:T=0,collapsible:H}=O,{collapsedSize:Y=0,collapsible:te,maxSize:fe=100,minSize:E=0}=S.constraints,{panelSize:X}=De(U,S,R);X!=null&&(H&&te&&je(X,T)?je(T,Y)||B(S,Y):X<E?B(S,E):X>fe&&B(S,fe))},[B]),q=k.useCallback((S,O)=>{const{direction:R}=C.current,{layout:U}=w.current;if(!m.current)return;const T=Nt(S,m.current);V(T,`Drag handle element not found for id "${S}"`);const H=es(R,O);g({dragHandleId:S,dragHandleRect:T.getBoundingClientRect(),initialCursorPosition:H,initialLayout:U})},[]),ee=k.useCallback(()=>{g(null)},[]),J=k.useCallback(S=>{const{panelDataArray:O}=w.current,R=Oe(O,S);R>=0&&(O.splice(R,1),delete j.current[S.id],w.current.panelDataArrayChanged=!0,y())},[y]),L=k.useMemo(()=>({collapsePanel:M,direction:s,dragState:p,expandPanel:I,getPanelSize:F,getPanelStyle:v,groupId:h,isPanelCollapsed:P,isPanelExpanded:W,reevaluatePanelConstraints:G,registerPanel:A,registerResizeHandle:_,resizePanel:B,startDragging:q,stopDragging:ee,unregisterPanel:J,panelGroupElement:m.current}),[M,p,s,I,F,v,h,P,W,G,A,_,B,q,ee,J]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return k.createElement(jt.Provider,{value:L},k.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const rs=k.forwardRef((n,e)=>k.createElement(ls,{...n,forwardedRef:e}));ls.displayName="PanelGroup";rs.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function De(n,e,t){const s=Oe(n,e),i=s===n.length-1?[s-1,s]:[s,s+1],o=t[s];return{...e.constraints,panelSize:o,pivotIndices:i}}function Ql({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){k.useEffect(()=>{if(n||t==null||s==null)return;const r=Nt(e,s);if(r==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),t(o);break}case"F6":{o.preventDefault();const a=r.getAttribute(se.groupId);V(a,`No group element found for id "${a}"`);const c=Ye(a,s),d=Yn(a,e,s);V(d!==null,`No resize element found for id "${e}"`);const f=o.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[f].focus();break}}};return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}},[s,n,e,t])}function is({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:r,onBlur:i,onClick:o,onDragging:a,onFocus:c,onPointerDown:d,onPointerUp:f,style:u={},tabIndex:h=0,tagName:m="div",...p}){var g,b;const x=k.useRef(null),y=k.useRef({onClick:o,onDragging:a,onPointerDown:d,onPointerUp:f});k.useEffect(()=>{y.current.onClick=o,y.current.onDragging=a,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=k.useContext(jt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:z,registerResizeHandle:C,startDragging:w,stopDragging:M,panelGroupElement:I}=j,F=Vt(r),[v,P]=k.useState("inactive"),[W,A]=k.useState(!1),[_,B]=k.useState(null),G=k.useRef({state:v});Fe(()=>{G.current.state=v}),k.useEffect(()=>{if(t)B(null);else{const L=C(F);B(()=>L)}},[t,F,C]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;k.useEffect(()=>{if(t||_==null)return;const L=x.current;V(L,"Element ref not attached");let K=!1;return Il(F,L,N,{coarse:q,fine:ee},(O,R,U)=>{if(!R){P("inactive");return}switch(O){case"down":{P("drag"),K=!1,V(U,'Expected event to be defined for "down" action'),w(F,U);const{onDragging:T,onPointerDown:H}=y.current;T?.(!0),H?.();break}case"move":{const{state:T}=G.current;K=!0,T!=="drag"&&P("hover"),V(U,'Expected event to be defined for "move" action'),_(U);break}case"up":{P("hover"),M();const{onClick:T,onDragging:H,onPointerUp:Y}=y.current;H?.(!1),Y?.(),K||T?.();break}}})},[q,N,t,ee,C,F,_,w,M]),Ql({disabled:t,handleId:F,resizeHandler:_,panelGroupElement:I});const J={touchAction:"none",userSelect:"none"};return k.createElement(m,{...p,children:n,className:e,id:r,onBlur:()=>{A(!1),i?.()},onFocus:()=>{A(!0),c?.()},ref:x,role:"separator",style:{...J,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:z,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":W?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:F,[se.resizeHandleState]:v})}is.displayName="PanelResizeHandle";function Yl(n){const e=$.c(10);let t,s,r;e[0]!==n?({className:t,ref:r,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=ce("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==s||e[7]!==r||e[8]!==i?(o=l.jsx(rs,{ref:r,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=r,e[8]=i,e[9]=o):o=e[9],o}function fn(n){const e=$.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(Un,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function Zl(n){const e=$.c(12);let t,s,r;e[0]!==n?({withHandle:r,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=ce("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=i):i=e[5];let o;e[6]!==r?(o=r&&l.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:l.jsx(Ds,{className:"size-2.5"})}),e[6]=r,e[7]=o):o=e[7];let a;return e[8]!==s||e[9]!==i||e[10]!==o?(a=l.jsx(is,{"data-slot":"resizable-handle",className:i,...s,children:o}),e[8]=s,e[9]=i,e[10]=o,e[11]=a):a=e[11],a}function Jl(n){if(!n||n.includes("\\")||n.includes("..")||n.includes("\0"))return!0;try{const e=decodeURIComponent(n);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==n&&e.includes("/")){const t=(n.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>t)return!0}return!1}catch{return!0}}function er(n){if(Jl(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function tr(n){try{return decodeURIComponent(n)}catch{return n}}function nr(n){return er(n),encodeURIComponent(n)}function sr(n){return`.deco/blocks/${nr(n)}.json`}function Lo(n){return`/${sr(n)}`}const Oo=1e4,lr=3;function Ut(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function Yt(n){return n.startsWith("/")?n.slice(1):n}function bt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function rr(n){const e=bt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function Ro(n,e){const t=e.replace(/^\/+|\/+$/g,"");return bt(t?`${n==="/"?"":n}/${t}`:n)}function Ao(n,e){return e==="directory"?n:rr(n)}function _o(n){const e=n.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function ir(n){const e=Yt(n);return e?e.split("/").filter(Boolean).length:0}function Uo(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function Bo(n,e){return ir(n)>=lr&&!e.has(n)}function Ho(n,e,t=[]){const s=Yt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const r=`${s}/`;return e.some(i=>i.startsWith(r))||t.some(i=>i.startsWith(r))}function qo(n){const e=Yt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return tr(s)}function or(n){if(!n)return"plaintext";const e=n.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function Ko(n){const e=Ut(n).split("/").filter(Boolean),t=["/"];let s="";for(const r of e.slice(0,-1))s+=`/${r}`,t.push(s);return t}function Wo(n,e=[]){const t={children:[]},s=i=>{const a=Ut(i).split("/").filter(Boolean);let c=t,d="";for(const f of a){d+=`/${f}`;let u=c.children.find(h=>h.name===f);u?u.kind==="file"&&(u.kind="directory"):(u={name:f,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of n){const a=Ut(i).split("/").filter(Boolean);let c=t,d="";a.forEach((f,u)=>{d+=`/${f}`;const h=u===a.length-1;let m=c.children.find(p=>p.name===f);m||(m={name:f,path:d,kind:h?"file":"directory",children:[]},c.children.push(m)),c=m})}for(const i of e)s(bt(i));const r=i=>{i.sort((o,a)=>o.kind!==a.kind?o.kind==="directory"?-1:1:o.name.localeCompare(a.name));for(const o of i)o.children.length>0&&r(o.children)};return r(t.children),t.children}function ar(n,e,t=0){const s=[];for(const r of n)r.name!==".gitkeep"&&(s.push({node:r,depth:t}),r.kind==="directory"&&r.children.length>0&&e.has(r.path)&&s.push(...ar(r.children,e,t+1)));return s}function Go(n){return n.split(`
|
|
2
2
|
`).map(e=>{const t=e.match(/^\d+\t(.*)/);return t?t[1]:e}).join(`
|
|
3
3
|
`)}ol.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function cr(n){const e=$.c(11),{value:t,filename:s}=n,[r]=Ns(),i=r.theme==="dark"||r.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let o;e[0]!==s?(o=or(s),e[0]=s,e[1]=o):o=e[1];const a=i?"vs-dark":"light";let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsx(zs,{size:20,className:"animate-spin text-muted-foreground"})}),e[2]=c):c=e[2];let d,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={enabled:!1},f={top:12,bottom:12},e[3]=d,e[4]=f):(d=e[3],f=e[4]);let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:d,padding:f,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=u):u=e[5];let h;return e[6]!==s||e[7]!==o||e[8]!==a||e[9]!==t?(h=l.jsx(al,{path:s,language:o,value:t,theme:a,loading:c,options:u},s),e[6]=s,e[7]=o,e[8]=a,e[9]=t,e[10]=h):h=e[10],h}function os(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const dr=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),ur=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),hn=2*1024*1024;function fr(n,e){const t=n.split(".").pop()?.toLowerCase()??"";return dr.has(t)?"image":t==="pdf"?"pdf":t==="html"||t==="htm"?"html":t==="md"||t==="markdown"?e<=hn?"markdown":"download":ur.has(t)&&e<=hn?"text":"download"}function as(){const n=$.c(2);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=l.jsx(ae,{className:"h-6 w-2/3"}),n[0]=e):e=n[0];let t;return n[1]===Symbol.for("react.memo_cache_sentinel")?(t=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsx(ae,{className:"h-3 w-full"}),l.jsx(ae,{className:"h-3 w-5/6"}),l.jsx(ae,{className:"h-3 w-2/3"})]})]})}),n[1]=t):t=n[1],t}function cs(n){const e=$.c(20),{file:t,note:s}=n;let r;e[0]!==t.filename?(r=l.jsx(Se,{filename:t.filename,className:"h-12 w-10"}),e[0]=t.filename,e[1]=r):r=e[1];let i;e[2]!==t.filename?(i=l.jsx("span",{className:"text-sm font-medium text-foreground",children:t.filename}),e[2]=t.filename,e[3]=i):i=e[3];let o;e[4]!==t.size?(o=os(t.size),e[4]=t.size,e[5]=o):o=e[5];const a=s?` · ${s}`:"";let c;e[6]!==o||e[7]!==a?(c=l.jsxs("span",{className:"text-xs text-muted-foreground",children:[o,a]}),e[6]=o,e[7]=a,e[8]=c):c=e[8];let d;e[9]!==i||e[10]!==c?(d=l.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[i,c]}),e[9]=i,e[10]=c,e[11]=d):d=e[11];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(Ve,{size:14}),e[12]=f):f=e[12];let u;e[13]!==t.downloadUrl||e[14]!==t.filename?(u=l.jsx(Z,{asChild:!0,variant:"outline",size:"sm",children:l.jsxs("a",{href:t.downloadUrl,download:t.filename,children:[f,"Download"]})}),e[13]=t.downloadUrl,e[14]=t.filename,e[15]=u):u=e[15];let h;return e[16]!==r||e[17]!==d||e[18]!==u?(h=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[r,d,u]})}),e[16]=r,e[17]=d,e[18]=u,e[19]=h):h=e[19],h}function mn(n){const e=$.c(16),{file:t,markdown:s}=n;let r;e[0]!==t.downloadUrl?(r=Q.fileText(t.downloadUrl),e[0]=t.downloadUrl,e[1]=r):r=e[1];let i;e[2]!==t.downloadUrl?(i=async()=>{const u=await fetch(t.downloadUrl,{credentials:"include"});if(!u.ok)throw new Error(`fetch failed: ${u.status}`);return u.text()},e[2]=t.downloadUrl,e[3]=i):i=e[3];let o;e[4]!==r||e[5]!==i?(o={queryKey:r,queryFn:i,staleTime:6e4,retry:!1},e[4]=r,e[5]=i,e[6]=o):o=e[6];const{data:a,isPending:c,isError:d}=ie(o);if(c){let u;return e[7]===Symbol.for("react.memo_cache_sentinel")?(u=l.jsx(as,{}),e[7]=u):u=e[7],u}if(d||a===void 0){let u;return e[8]!==t?(u=l.jsx(cs,{file:t,note:"preview unavailable"}),e[8]=t,e[9]=u):u=e[9],u}if(s){const u=`file-preview-${t.key}`;let h;return e[10]!==a||e[11]!==u?(h=l.jsx("div",{className:"h-full overflow-y-auto",children:l.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:l.jsx(Kt,{id:u,text:a})})}),e[10]=a,e[11]=u,e[12]=h):h=e[12],h}let f;return e[13]!==a||e[14]!==t.filename?(f=l.jsx(cr,{value:a,filename:t.filename}),e[13]=a,e[14]=t.filename,e[15]=f):f=e[15],f}function ds(n){const e=$.c(15),{file:t}=n;switch(fr(t.filename,t.size)){case"image":{let r;return e[0]!==t.downloadUrl||e[1]!==t.filename?(r=l.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:l.jsx("img",{src:t.downloadUrl,alt:t.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=t.downloadUrl,e[1]=t.filename,e[2]=r):r=e[2],r}case"pdf":{let r;return e[3]!==t.downloadUrl||e[4]!==t.filename?(r=l.jsx("iframe",{src:t.downloadUrl,title:t.filename,className:"block h-full w-full bg-white"}),e[3]=t.downloadUrl,e[4]=t.filename,e[5]=r):r=e[5],r}case"html":{let r;return e[6]!==t.downloadUrl||e[7]!==t.filename?(r=l.jsx("iframe",{src:t.downloadUrl,title:t.filename,sandbox:"allow-scripts",className:"block h-full w-full bg-white"}),e[6]=t.downloadUrl,e[7]=t.filename,e[8]=r):r=e[8],r}case"markdown":{let r;return e[9]!==t?(r=l.jsx(mn,{file:t,markdown:!0}),e[9]=t,e[10]=r):r=e[10],r}case"text":{let r;return e[11]!==t?(r=l.jsx(mn,{file:t,markdown:!1}),e[11]=t,e[12]=r):r=e[12],r}default:{let r;return e[13]!==t?(r=l.jsx(cs,{file:t}),e[13]=t,e[14]=r):r=e[14],r}}}function hr(n){const e=$.c(40),{readUrl:t,editor:s,downloadName:r,trailing:i}=n;let o;e[0]!==t?(o=new URL(t,window.location.origin).toString(),e[0]=t,e[1]=o):o=e[1];const a=o;let c;e[2]!==s?(c=s.deckDetected&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:s.railOpen?"secondary":"ghost",size:"icon","aria-label":s.railOpen?"Hide slide list":"Show slide list",onClick:()=>s.setRailOpen(!s.railOpen),children:l.jsx(cl,{size:14})})}),l.jsx(we,{side:"bottom",children:s.railOpen?"Hide slide list":"Show slide list"})]}),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==a?(d=()=>window.open(a,"_blank","noopener"),e[4]=a,e[5]=d):d=e[5];let f;e[6]!==a?(f=l.jsx("span",{className:"truncate",children:a}),e[6]=a,e[7]=f):f=e[7];let u;e[8]!==a||e[9]!==d||e[10]!==f?(u=l.jsx("button",{type:"button",onClick:d,className:"flex min-w-0 flex-1 items-center rounded-md px-2 py-1 text-left text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:a,children:f}),e[8]=a,e[9]=d,e[10]=f,e[11]=u):u=e[11];let h;e[12]!==s.agentUpdated||e[13]!==s.reload?(h=s.agentUpdated&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsxs(Z,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:s.reload,children:[l.jsx(Sn,{size:12}),"Agent updated — reload"]})}),l.jsx(we,{side:"bottom",children:"The agent rewrote this deck while you were editing. Reloading discards unsaved differences."})]}),e[12]=s.agentUpdated,e[13]=s.reload,e[14]=h):h=e[14];let m;e[15]!==s.saving?(m=s.saving&&l.jsx("span",{className:"px-1 text-xs text-muted-foreground",children:"Saving…"}),e[15]=s.saving,e[16]=m):m=e[16];let p;e[17]!==s?(p=s.deckDetected&&s.writable&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:s.editMode?"secondary":"ghost",size:"icon","aria-label":s.editMode?"Done editing":"Edit inline",className:ce(s.editMode&&"text-primary"),onClick:()=>s.setEditMode(!s.editMode),children:l.jsx(Ts,{size:14})})}),l.jsx(we,{side:"bottom",children:s.editMode?"Done editing":"Edit inline (text, reorder, delete)"})]}),e[17]=s,e[18]=p):p=e[18];let g;e[19]!==a||e[20]!==r||e[21]!==s.deckDetected?(g=s.deckDetected?l.jsxs(tt,{children:[l.jsx(nt,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Download",children:l.jsx(Ve,{size:14})})}),l.jsxs(st,{align:"end",children:[l.jsxs(be,{onClick:()=>window.open(`${a}#print`,"_blank","noopener"),children:[l.jsx(Fs,{size:14}),"Export as PDF"]}),l.jsx(be,{asChild:!0,children:l.jsxs("a",{href:a,download:r,children:[l.jsx(Ms,{size:14}),"Download HTML"]})})]})]}):l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Download",asChild:!0,children:l.jsx("a",{href:a,download:r,children:l.jsx(Ve,{size:14})})})}),l.jsx(we,{side:"bottom",children:"Download"})]}),e[19]=a,e[20]=r,e[21]=s.deckDetected,e[22]=g):g=e[22];let b;e[23]!==a?(b=()=>window.open(a,"_blank","noopener"),e[23]=a,e[24]=b):b=e[24];let x;e[25]===Symbol.for("react.memo_cache_sentinel")?(x=l.jsx(In,{size:14}),e[25]=x):x=e[25];let y;e[26]!==b?(y=l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Open in new tab",onClick:b,children:x})}),e[26]=b,e[27]=y):y=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=l.jsx(we,{side:"bottom",children:"Open in new tab"}),e[28]=j):j=e[28];let N;e[29]!==y?(N=l.jsxs(ye,{children:[y,j]}),e[29]=y,e[30]=N):N=e[30];let z;return e[31]!==N||e[32]!==c||e[33]!==u||e[34]!==h||e[35]!==m||e[36]!==p||e[37]!==g||e[38]!==i?(z=l.jsxs("div",{className:"flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",children:[c,u,h,m,p,g,N,i]}),e[31]=N,e[32]=c,e[33]=u,e[34]=h,e[35]=m,e[36]=p,e[37]=g,e[38]=i,e[39]=z):z=e[39],z}const Re=1;function mr(n){if(typeof n!="object"||n===null||n.v!==Re||n.source!=="deck-viewer")return null;const e=n;return e.type==="ready"||e.type==="state"||e.type==="op"&&typeof e.opId=="string"&&e.op?e:null}class ze extends Error{constructor(e,t){super(e),this.code=t,this.name="DeckOpError"}code}function us(n){return[...n.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function pr(n){const t=new DOMParser().parseFromString(n,"text/html").querySelector("deck-viewer");return t?us(t).length:null}function xr(n,e){const t=new DOMParser().parseFromString(n,"text/html"),s=t.querySelector("deck-viewer");if(!s)throw new ze("no <deck-viewer> element in source","no-viewer");const r=us(s),i=e.kind==="move"?e.from:e.at,o=r[i];if(!o)throw new ze(`slide index ${i} out of range (${r.length})`,"stale-index");switch(e.kind){case"remove":{if(r.length<=1)throw new ze("cannot remove the last slide","bad-op");o.remove();break}case"duplicate":{const c=o.cloneNode(!0);c.removeAttribute("id");for(const d of c.querySelectorAll("[id]"))d.removeAttribute("id");o.after(c);break}case"move":{if(e.to<0||e.to>=r.length)throw new ze(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const c=e.to<e.from?r[e.to]:r[e.to].nextSibling;s.insertBefore(o,c)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new ze(`invalid attribute name: ${e.name}`,"bad-op");o.setAttribute(e.name,e.value);break}case"remove-attr":{o.removeAttribute(e.name);break}case"replace":{const d=new DOMParser().parseFromString(e.html,"text/html").body.firstElementChild;if(!d)throw new ze("replace html has no root element","bad-op");o.replaceWith(t.importNode(d,!0));break}default:throw new ze(`unknown op kind: ${e.kind}`,"bad-op")}return`${n.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
|
|
4
4
|
`:""}${t.documentElement.outerHTML}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,e as p,j as s,i as u,N as a}from"./index-
|
|
1
|
+
import{c as g,e as p,j as s,i as u,N as a}from"./index-C0L0gsTW.js";import{a as x}from"./use-capability-C9oUxALq.js";import{C as j}from"./capability-load-error-CPc5bsEc.js";function v(){const t=g.c(21);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:c,error:f}=x();if(c){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:s.jsx(u,{size:20,className:"animate-spin text-muted-foreground"})}),t[1]=e):e=t[1],e}if(f){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("registry:manage")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/store",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("monitoring:view")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}if(i("members:manage")){let e;return t[17]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[17]=r,t[18]=e):e=t[18],e}let n;return t[19]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[19]=r,t[20]=n):n=t[20],n}export{v as default};
|