decocms 4.76.69 → 4.76.71
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-CTP1i-dI.js → AlertCircle-Cvu85Sr0.js} +1 -1
- package/dist/client/assets/{AreaChart-VzpQ3v7x.js → AreaChart-BSihuL6I.js} +1 -1
- package/dist/client/assets/{ArrowUp-D2I0pY6j.js → ArrowUp-fbYe80_F.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-O75St6GP.js → ArrowUpRight-Bl5xGmHO.js} +1 -1
- package/dist/client/assets/{Check-BFCsxvBT.js → Check-wimNrbhN.js} +1 -1
- package/dist/client/assets/{CheckCircle-DoCywYIH.js → CheckCircle-Bl4aW-nn.js} +1 -1
- package/dist/client/assets/{ChevronDown-M4WxgN2Q.js → ChevronDown-C5CvsmcD.js} +1 -1
- package/dist/client/assets/{ChevronRight-Cp3ikYh5.js → ChevronRight-Bno5_0xg.js} +1 -1
- package/dist/client/assets/{ChevronUp-BYM-dHMZ.js → ChevronUp-DrDSr-mi.js} +1 -1
- package/dist/client/assets/{Circle-zIdusWsh.js → Circle-g57xQlUQ.js} +1 -1
- package/dist/client/assets/{Copy01-bE97xj7z.js → Copy01-1_zUjHG9.js} +1 -1
- package/dist/client/assets/{DotsVertical-kBN0UT7i.js → DotsVertical-SPVqsXfZ.js} +1 -1
- package/dist/client/assets/{Eye-6fbfbZf4.js → Eye-BMAxGnGK.js} +1 -1
- package/dist/client/assets/{FilterLines-CnE2ZgEm.js → FilterLines-BnL8BlYf.js} +1 -1
- package/dist/client/assets/{Flag01-DvzVVJGs.js → Flag01-BFVNOegT.js} +1 -1
- package/dist/client/assets/{Globe01-D7jRCf_8.js → Globe01-DJ_zs5G_.js} +1 -1
- package/dist/client/assets/{Globe04-BQdAPRqV.js → Globe04-DkaJlCI4.js} +1 -1
- package/dist/client/assets/{HardDrive-B74d4ZPe.js → HardDrive-yPFtg6_w.js} +1 -1
- package/dist/client/assets/{Key01-B7D2-dQk.js → Key01-BdmJ-1sf.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BqgWNXjH.js → LayoutLeft-DXtD65nH.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BzM8lApQ.js → LinkExternal01-26v779uD.js} +1 -1
- package/dist/client/assets/{List-CCQbvujs.js → List-Degct3aY.js} +1 -1
- package/dist/client/assets/{Monitor01-DE5WTQtO.js → Monitor01-B52VT9DG.js} +1 -1
- package/dist/client/assets/{Package-GowKJ4nT.js → Package-CKW2xi_w.js} +1 -1
- package/dist/client/assets/{Palette-Dw8aT_W4.js → Palette-Bv_JYMYM.js} +1 -1
- package/dist/client/assets/{Play-BP84WJ7_.js → Play-Dw4gmx5C.js} +1 -1
- package/dist/client/assets/{Plus-MGVbyAan.js → Plus-CeRRdRrw.js} +1 -1
- package/dist/client/assets/{SearchLg-D-Dwz2ld.js → SearchLg-EpoU8TwV.js} +1 -1
- package/dist/client/assets/{SearchMd-CgZ-d--t.js → SearchMd-DAd-Bkgu.js} +1 -1
- package/dist/client/assets/{Settings02-OSFGAN3n.js → Settings02-BYgyRjAD.js} +1 -1
- package/dist/client/assets/{Shield01-DHA33TWt.js → Shield01-CMDd26KY.js} +1 -1
- package/dist/client/assets/{Star01-wGlSeSaa.js → Star01-B4wdnyjY.js} +1 -1
- package/dist/client/assets/{Stars01-DTimaKiw.js → Stars01-aA8DbwLH.js} +1 -1
- package/dist/client/assets/{Stars02-C4w-8Q6C.js → Stars02-CmYTwRcx.js} +1 -1
- package/dist/client/assets/{Sun-BOw9T66T.js → Sun-MykPXdqN.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CDMuZ1UC.js → SwitchHorizontal01-DJnrgsIK.js} +1 -1
- package/dist/client/assets/{Tool01-t5THwb5O.js → Tool01-BcPlknT9.js} +1 -1
- package/dist/client/assets/{Tool02--mzcPXAr.js → Tool02-Bt1NLhl1.js} +1 -1
- package/dist/client/assets/{Trash01-BfpHbwsg.js → Trash01-kZy-N3Xo.js} +1 -1
- package/dist/client/assets/{TrendUp01-D-O9e56q.js → TrendUp01-CwpvhxrP.js} +1 -1
- package/dist/client/assets/{Upload01-P8NpMatB.js → Upload01-Bpbyu6sv.js} +1 -1
- package/dist/client/assets/{User01-CcrTao8_.js → User01-DQn1mAZF.js} +1 -1
- package/dist/client/assets/{UserPlus01-uRKnM87U.js → UserPlus01-DjC11OT1.js} +1 -1
- package/dist/client/assets/{Users01-DOJD86qE.js → Users01-CY0-Vc-O.js} +1 -1
- package/dist/client/assets/{Users03-Da-1iWjP.js → Users03-CLvfcW6v.js} +1 -1
- package/dist/client/assets/{X-BaxpQcw_.js → X-BZ_UKD_O.js} +1 -1
- package/dist/client/assets/{XCircle-D-QezPu5.js → XCircle-BgTed_Co.js} +1 -1
- package/dist/client/assets/{XClose-CwM71i7w.js → XClose-CcOoHUUk.js} +1 -1
- package/dist/client/assets/{Zap-CJJOCD2g.js → Zap-D3VZuva8.js} +1 -1
- package/dist/client/assets/{ZapSquare-C68b0yEp.js → ZapSquare-95HyzbKN.js} +1 -1
- package/dist/client/assets/{ZoomOut-CoQcIp1s.js → ZoomOut-Mbjnh50O.js} +1 -1
- package/dist/client/assets/{access-gate-WLT1BJKH.js → access-gate-DKOiEABa.js} +1 -1
- package/dist/client/assets/{add-section-modal-BJ87LPpI.js → add-section-modal-DS-jmwsV.js} +1 -1
- package/dist/client/assets/{agent-icon-CNMNZ3HA.js → agent-icon-wm2eb0Nq.js} +1 -1
- package/dist/client/assets/{agents-list-CAoHoVXR.js → agents-list-Dz15AE-1.js} +1 -1
- package/dist/client/assets/{ai-providers-BT4p05MP.js → ai-providers-BKooAHnA.js} +1 -1
- package/dist/client/assets/{alert-C-5dk7iF.js → alert-CpO8hjmN.js} +1 -1
- package/dist/client/assets/{alert-dialog-TjFsm0C4.js → alert-dialog-nxq3-B6t.js} +1 -1
- package/dist/client/assets/{app-editor-Yooi0bGk.js → app-editor-Baj_Q_pt.js} +1 -1
- package/dist/client/assets/{auth-DB9yNotS.js → auth-4uk65Jwa.js} +1 -1
- package/dist/client/assets/{auth-catchall-CCt1uS5m.js → auth-catchall-StGshhx2.js} +1 -1
- package/dist/client/assets/{auth-entry-AuTZ86ED.js → auth-entry-BBVTjEcb.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DLf_zWja.js → auth-split-layout-5rHPK2FX.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CIXsyw7J.js → authenticate-and-persist-oauth-DSvl_dtV.js} +1 -1
- package/dist/client/assets/{automation-list-row-B2dXqEX6.js → automation-list-row-BbQKDFDI.js} +1 -1
- package/dist/client/assets/{automation-runs-V1bqmHsO.js → automation-runs-J5VVC0pP.js} +1 -1
- package/dist/client/assets/automations-c5wcHSrJ.js +1 -0
- package/dist/client/assets/{autosend-DanTAwkA.js → autosend-C3_RSy-l.js} +1 -1
- package/dist/client/assets/{avatar-Bobpu4LY.js → avatar-DJ2MPOjW.js} +1 -1
- package/dist/client/assets/{badge-CAcsUOEA.js → badge-tPEV-RxK.js} +1 -1
- package/dist/client/assets/{block-document-85vOaXfv.js → block-document-BGBDt9He.js} +1 -1
- package/dist/client/assets/{brand-context-CwM80vay.js → brand-context-XU5oj6VV.js} +1 -1
- package/dist/client/assets/{buckets-BbXpiniD.js → buckets-BpEMloCg.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-C6-T-7F2.js → bulk-category-panel-kbn3uWhA.js} +1 -1
- package/dist/client/assets/{calendar-DSll9irA.js → calendar-Csl0UCmv.js} +1 -1
- package/dist/client/assets/{capability-load-error-B45NVP3Q.js → capability-load-error-BVM1o44K.js} +1 -1
- package/dist/client/assets/{card-DPlLIp94.js → card-BiR2GL-H.js} +1 -1
- package/dist/client/assets/{category-editor-DGpy3tgO.js → category-editor-CIv3YUMC.js} +1 -1
- package/dist/client/assets/{chat-context-D-Ot0FWh.js → chat-context-CXmj1wzI.js} +1 -1
- package/dist/client/assets/{checkbox-Bn_LHaP_.js → checkbox-BnAeGRmY.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Bz9mKhgK.js → cli-auth-success-DpSY8KYL.js} +1 -1
- package/dist/client/assets/{collection-detail-C_GwQL9_.js → collection-detail-xpBis_7_.js} +1 -1
- package/dist/client/assets/{collection-display-button-B-v7F6a0.js → collection-display-button-ClhtIWW8.js} +1 -1
- package/dist/client/assets/{collection-search-Bc-F8Kiq.js → collection-search-CIVfwIbs.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DNu1_p5x.js → collection-table-wrapper-BLGcEcmX.js} +1 -1
- package/dist/client/assets/{collection-tabs-C48-iFG0.js → collection-tabs-C-nwiHu-.js} +1 -1
- package/dist/client/assets/{command-BQ1l40IH.js → command-CZ7egaGh.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-BgX6MQ_k.js → commerce-onboarding-BaXxbYVf.js} +1 -1
- package/dist/client/assets/{companions-core-9RzrWTwZ.js → companions-core-DVErIwai.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-COxWWExe.js → connect-desktop-dialog-B4yVc_7M.js} +1 -1
- package/dist/client/assets/{connection-card-D42pFRp9.js → connection-card-DAmJM9w3.js} +1 -1
- package/dist/client/assets/{connection-detail-BVfxjBFB.js → connection-detail-Dve5jUgE.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Cqd4eVKC.js → connection-form-helpers-CmZoSIwh.js} +1 -1
- package/dist/client/assets/connections-JiFN616P.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-BuAxU3jP.js → decopilot-sse-pool-COulQsQu.js} +1 -1
- package/dist/client/assets/{dialog-DJWqrgT6.js → dialog-gLpw4bfG.js} +1 -1
- package/dist/client/assets/{domain-settings-V8EfjG7S.js → domain-settings-BdAEu5gj.js} +1 -1
- package/dist/client/assets/{drawer-BRNtG8zH.js → drawer-ZJqvF-A5.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CIICt9LY.js → dropdown-menu-Bbpx10wk.js} +1 -1
- package/dist/client/assets/{empty-state-izBNozB9.js → empty-state-n5t0v7uI.js} +1 -1
- package/dist/client/assets/{extract-connection-data-scP3ohBN.js → extract-connection-data-DQ2KFguj.js} +1 -1
- package/dist/client/assets/{file-explorer-s4V9pLmf.js → file-explorer-DVcP3tZ1.js} +1 -1
- package/dist/client/assets/{file-type-icon-R56Du5Jy.js → file-type-icon-BZvnDuN0.js} +1 -1
- package/dist/client/assets/{files-PupQXoXt.js → files-Y9_h0NXa.js} +1 -1
- package/dist/client/assets/{form-fwfR7cGI.js → form-CEJ7NLQz.js} +1 -1
- package/dist/client/assets/{general-CmaMJn85.js → general-Dz0_FpL5.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CxWtJWkY.js → github-repo-picker-BXgmr-ZU.js} +1 -1
- package/dist/client/assets/{hooks-7HhEcygY.js → hooks-qsHMC7Ia.js} +1 -1
- package/dist/client/assets/{index-faTCdeis.js → index-B6gIYSAi.js} +1 -1
- package/dist/client/assets/{index-Cuc20eOK.js → index-BDELOfSs.js} +20 -20
- package/dist/client/assets/{index-Cuzp1Yxh.js → index-BGNS1OgZ.js} +1 -1
- package/dist/client/assets/{index-5_eNsCZ_.js → index-BU2GOVdy.js} +1 -1
- package/dist/client/assets/{index-D96zxGfP.js → index-Bq8gS4_7.js} +1 -1
- package/dist/client/assets/{index-Y_P5zAMD.js → index-CczqpYmb.js} +1 -1
- package/dist/client/assets/{index-p86QJkti.js → index-DKZ2zjKb.js} +1 -1
- package/dist/client/assets/{index-CRkzWKl6.js → index-DejlCbgi.js} +1 -1
- package/dist/client/assets/{index-B9-OztC2.js → index-Dh4GqdsZ.js} +1 -1
- package/dist/client/assets/{index-BzwGBFdf.js → index-DvtTPSSz.js} +2 -2
- package/dist/client/assets/{index-DhooQ8NO.js → index-DyfzQj5m.js} +1 -1
- package/dist/client/assets/{index-eDKkNMRe.js → index-G899Mwwz.js} +1 -1
- package/dist/client/assets/{index-BLaWrg-L.js → index-LRYSqCUf.js} +1 -1
- package/dist/client/assets/{index-BCwMqg4j.js → index-kW87eoYl.js} +3 -3
- package/dist/client/assets/{index-redirect-BYkyBhcS.js → index-redirect-QoYcGrYH.js} +1 -1
- package/dist/client/assets/{input-DZJJfrqQ.js → input-BUVWi6ji.js} +1 -1
- package/dist/client/assets/{integration-icon-CK6gpr7Y.js → integration-icon-RxSgmsqJ.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-C5qrlxzm.js → invite-member-dialog-Cg5P2m_Y.js} +1 -1
- package/dist/client/assets/{label-DGv11MpM.js → label-DoX8QwZg.js} +1 -1
- package/dist/client/assets/{layout-CjQ3Amnf.js → layout-C46sf1QP.js} +1 -1
- package/dist/client/assets/{login-CyDC64VK.js → login-C5rPpeku.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Dm0u2UPY.js → mcp-oauth-DayJEOBQ.js} +1 -1
- package/dist/client/assets/{members-DHbODKj-.js → members-BGQwgaxl.js} +1 -1
- package/dist/client/assets/{monaco-editor-DHHCwACO.js → monaco-editor-BQzusA3f.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-EVy8GmBS.js → monitoring-stats-row-cCie6bHV.js} +1 -1
- package/dist/client/assets/{multi-select-DePJl68O.js → multi-select-C7UKUlA7.js} +1 -1
- package/dist/client/assets/{oauth-callback-ChohKFqc.js → oauth-callback-BfQDJq5F.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-wsZ4ssMs.js → oauth-callback-ai-provider-CCEPN7ut.js} +1 -1
- package/dist/client/assets/{onboarding-gPJl7Wcr.js → onboarding-fd5CG08c.js} +1 -1
- package/dist/client/assets/{org-install-Htac3qdq.js → org-install-Dl_4sb8U.js} +1 -1
- package/dist/client/assets/{org-layout-TAPTD2Op.js → org-layout-Cn6g2hBG.js} +1 -1
- package/dist/client/assets/{organization-choice-02D2qjOL.js → organization-choice-D7thp0nF.js} +1 -1
- package/dist/client/assets/{orgs-Ba6TwP6u.js → orgs-BWXnjR-G.js} +1 -1
- package/dist/client/assets/{page-seo-form-DW0iLQYK.js → page-seo-form-low418oG.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CSYYJs4Y.js +1 -0
- package/dist/client/assets/{popover-lJ5ZQEBx.js → popover-1iWni6pj.js} +1 -1
- package/dist/client/assets/{post-editor-swRu2ozO.js → post-editor-mwSGk_ht.js} +1 -1
- package/dist/client/assets/{primitives-BxayDrKo.js → primitives-BV45qvF6.js} +1 -1
- package/dist/client/assets/{profile-0fAJqeB4.js → profile-C09oJ7nj.js} +1 -1
- package/dist/client/assets/project-app-view-HOewAoV4.js +1 -0
- package/dist/client/assets/record-editor-CGSKkbo3.js +1 -0
- package/dist/client/assets/redirect-editor-C6ONqY6R.js +1 -0
- package/dist/client/assets/registry-XVj5joIQ.js +2 -0
- package/dist/client/assets/{registry-layout-DdprjeuN.js → registry-layout-C4z50gL3.js} +1 -1
- package/dist/client/assets/{reports-BqOCicRE.js → reports-BHGC1TMn.js} +1 -1
- package/dist/client/assets/{require-capability-HPu_dWF-.js → require-capability-NMkQ7p2n.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BBd3aMbM.js → required-auth-layout-BdTGAOVV.js} +1 -1
- package/dist/client/assets/{reset-password-BiTJKUxK.js → reset-password-WfkYhHBu.js} +1 -1
- package/dist/client/assets/{roles-WEjWRsP3.js → roles-BYjp-Ajk.js} +1 -1
- package/dist/client/assets/{search-input-D1RPsO7h.js → search-input-DvuYITM0.js} +1 -1
- package/dist/client/assets/{secrets-DIof6BPS.js → secrets-C2UBhfFr.js} +1 -1
- package/dist/client/assets/{sections-editor-DyItATR4.js → sections-editor-Blzdp0oy.js} +1 -1
- package/dist/client/assets/{select-w64FwVzO.js → select-gkpsAlUm.js} +1 -1
- package/dist/client/assets/{select-model-CfxgHr1H.js → select-model-DE9e2e1e.js} +1 -1
- package/dist/client/assets/{self-tool-result-C5jk0aRA.js → self-tool-result-2G6-rtik.js} +1 -1
- package/dist/client/assets/{seo-editor-DqFGXA41.js → seo-editor-Do4mbKfF.js} +1 -1
- package/dist/client/assets/{settings-layout-Gyfpv1Ub.js → settings-layout-CwsTbQU0.js} +1 -1
- package/dist/client/assets/{settings-section-Blm0xqFu.js → settings-section-BhliH2-8.js} +1 -1
- package/dist/client/assets/{shell-controls-YyPIBJy4.js → shell-controls-HysOBF2a.js} +1 -1
- package/dist/client/assets/{shell-layout-DB0LzzCv.js → shell-layout-F-ok_nx8.js} +1 -1
- package/dist/client/assets/{sidebar-Df7gpnAT.js → sidebar-DjP0hlIN.js} +1 -1
- package/dist/client/assets/{skeleton-Ce84w9Pu.js → skeleton-1fz4b835.js} +1 -1
- package/dist/client/assets/{sso-oD2d5eXs.js → sso-BA16hQgw.js} +1 -1
- package/dist/client/assets/{store-BvDz-uLD.js → store-DvmwXBiB.js} +1 -1
- package/dist/client/assets/store-registry-DYJLdhuX.js +2 -0
- package/dist/client/assets/{studio-tools-CUrwKEWB.js → studio-tools-hO5SJ9L1.js} +1 -1
- package/dist/client/assets/{switch-B5gG72le.js → switch-BSb1YfEU.js} +1 -1
- package/dist/client/assets/{table-C-roEjQv.js → table-BO-Pqce3.js} +1 -1
- package/dist/client/assets/{tabs-DE9gY_N0.js → tabs-BaUdekDU.js} +1 -1
- package/dist/client/assets/{textarea-C3h0m9WI.js → textarea-CJ9nnedq.js} +1 -1
- package/dist/client/assets/{toggle-group-DblDAwIh.js → toggle-group-BLEtqopd.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BhW-0m9s.js → toolbar-icon-button-tX4cl55G.js} +1 -1
- package/dist/client/assets/{toolbar-Dp1EU7YT.js → toolbar-mHxlKpgC.js} +1 -1
- package/dist/client/assets/{tooltip-B-NZX6CV.js → tooltip-MpF93QwW.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DK-y0d2_.js → use-ai-providers-DOWHTDqA.js} +1 -1
- package/dist/client/assets/{use-automations-CuW9mnBS.js → use-automations-D9Z5baDr.js} +1 -1
- package/dist/client/assets/{use-autosave-DqoHclfs.js → use-autosave-DWH_u4bp.js} +1 -1
- package/dist/client/assets/{use-capability-tWXfNOPU.js → use-capability-D9_H5dnX.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BMBpw_Du.js → use-clock-tick-BL0-k7e9.js} +1 -1
- package/dist/client/assets/{use-collections-BmEqd5c5.js → use-collections-BwkNh9s8.js} +1 -1
- package/dist/client/assets/{use-connection-ff_TBdBZ.js → use-connection-Dyi0y--H.js} +1 -1
- package/dist/client/assets/{use-copy-Bhga51kG.js → use-copy-DD-AY19W.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BqSLevry.js → use-create-virtual-mcp-NhUMTYbb.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CE_FFppQ.js → use-debounced-autosave-CWt391ns.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Dp1aIpTc.js → use-debounced-value-Bb7tMvOa.js} +1 -1
- package/dist/client/assets/{use-deco-credits-B5GrkcJf.js → use-deco-credits-DRClHKlt.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DqvRiTWy.js → use-decopilot-events-BXDhFIv7.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CqUnKvUm.js → use-delete-connection-6W9qWG0y.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-v4gWjgeK.js → use-deployment-admin-BYh8bdhB.js} +1 -1
- package/dist/client/assets/{use-file-configs-Bdhl6NbD.js → use-file-configs-DjyD5Omy.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-k2_cYpyc.js → use-infinite-scroll-AWTzpLPw.js} +1 -1
- package/dist/client/assets/{use-join-requests-DuE_PGNP.js → use-join-requests-CGldJY9N.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-Do4FtgB-.js → use-mcp-auth-status-CSloTF4V.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Dbywo6bH.js → use-mcp-client-t1Lq9dtN.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-1K4RVhZ7.js → use-mcp-tools-CCr3WLAZ.js} +1 -1
- package/dist/client/assets/{use-members-Bgh9Bzyj.js → use-members-B0yMwrOg.js} +1 -1
- package/dist/client/assets/{use-mobile-Duim7H7-.js → use-mobile-DKQP_Jss.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BJf0llYm.js → use-navigate-to-agent-Cwegpci4.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-B_5lZ96M.js → use-org-auth-client-Cj6dUtY9.js} +1 -1
- package/dist/client/assets/{use-org-sso-a4HBRhsB.js → use-org-sso-z04b3p1a.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BSwsGCmS.js → use-organization-roles-CGng68qz.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DbfeFhAg.js → use-organization-settings-Bs5bz6s7.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DxtTQDxo.js → use-registry-connections-izs-KLy2.js} +1 -1
- package/dist/client/assets/{use-secrets-hTkYYwcw.js → use-secrets-BRyksvJu.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DjgsxTQS.js → use-status-sounds-CCDNWlCZ.js} +1 -1
- package/dist/client/assets/{use-view-mode-SzV0w_3N.js → use-view-mode-CUhUbUhu.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CGi0VJMI.js → use-virtual-mcp-CFX-alhS.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-C3eTHgjV.js +1 -0
- package/dist/client/assets/{useRouterState-Cw-xR2qZ.js → useRouterState-seAdVQEm.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BcApL0b0.js +1 -0
- package/dist/client/assets/{users-DTVX5WKB.js → users-DuOSsUUl.js} +1 -1
- package/dist/client/assets/{variant-calendar-acB6r3x8.js → variant-calendar-YBO9nK_z.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-B5bhx5zW.js → view-mode-toggle-xB0T4AsL.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/automations-CC16yIKa.js +0 -1
- package/dist/client/assets/connections-Dc6tbsBO.js +0 -1
- package/dist/client/assets/page-seo-sheet-DSMEbZ7D.js +0 -1
- package/dist/client/assets/project-app-view-wLfdVznw.js +0 -1
- package/dist/client/assets/record-editor-D0RJBOG7.js +0 -1
- package/dist/client/assets/redirect-editor-xRwCQ-uN.js +0 -1
- package/dist/client/assets/registry-DAuW7IIq.js +0 -2
- package/dist/client/assets/store-registry-C75C7xCT.js +0 -2
- package/dist/client/assets/useInfiniteQuery-D5dSfHuO.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BL-1tjzE.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,l as d,r as p,j as r}from"./index-
|
|
1
|
+
import{c as f,l as d,r as p,j as r}from"./index-kW87eoYl.js";import{r as w}from"./sidebar-DjP0hlIN.js";const v=p.createContext(void 0),H=v.Provider;function N(c,e){const l=p.Children.toArray(c);for(const i of l)if(p.isValidElement(i)&&i.type===e)return i;return null}function P(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex flex-col h-full w-full bg-background overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function C(c){const e=f.c(17),{children:l,className:i,hideSidebarTrigger:s}=c;let t;e[0]!==l?(t=N(l,j),e[0]=l,e[1]=t):t=e[1];const n=t;let a;e[2]!==l?(a=N(l,b),e[2]=l,e[3]=a):a=e[3];const o=a;let m;e[4]!==i?(m=d("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",i),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==s?(x=!s&&r.jsx(w,{className:"md:hidden shrink-0"}),e[6]=s,e[7]=x):x=e[7];let u;e[8]!==n||e[9]!==x?(u=r.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[x,n]}),e[8]=n,e[9]=x,e[10]=u):u=e[10];let h;e[11]!==o?(h=r.jsx("div",{className:"flex items-center",children:o}),e[11]=o,e[12]=h):h=e[12];let g;return e[13]!==m||e[14]!==u||e[15]!==h?(g=r.jsxs("div",{className:m,children:[u,h]}),e[13]=m,e[14]=u,e[15]=h,e[16]=g):g=e[16],g}function j(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 min-w-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function b(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 shrink-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function $(c){const e=f.c(6),{children:l,className:i}=c,s=p.useContext(v);let t;e[0]!==i||e[1]!==s?(t=d("flex-1 overflow-auto",s,i),e[0]=i,e[1]=s,e[2]=t):t=e[2];let n;return e[3]!==l||e[4]!==t?(n=r.jsx("div",{className:t,children:l}),e[3]=l,e[4]=t,e[5]=n):n=e[5],n}function y(c){const e=f.c(10),{children:l,actions:i,className:s}=c;let t;e[0]!==s?(t=d("flex flex-wrap items-center justify-between gap-3",s),e[0]=s,e[1]=t):t=e[1];let n;e[2]!==l?(n=r.jsx("div",{className:"text-xl font-medium min-w-0",children:l}),e[2]=l,e[3]=n):n=e[3];let a;e[4]!==i?(a=i&&r.jsx("div",{className:"flex items-center gap-2",children:i}),e[4]=i,e[5]=a):a=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==a?(o=r.jsxs("div",{className:t,children:[n,a]}),e[6]=t,e[7]=n,e[8]=a,e[9]=o):o=e[9],o}function R(c){const e=f.c(6),{children:l,className:i,maxWidth:s}=c,t=s===void 0?"max-w-[1200px]":s;let n;e[0]!==i||e[1]!==t?(n=d("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",t,i),e[0]=i,e[1]=t,e[2]=n):n=e[2];let a;return e[3]!==l||e[4]!==n?(a=r.jsx("div",{className:n,children:l}),e[3]=l,e[4]=n,e[5]=a):a=e[5],a}const T=Object.assign(P,{Header:Object.assign(C,{Left:j,Right:b}),Content:$,Title:y,Body:R});export{T as P,H as a};
|
|
@@ -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-BCwMqg4j.js";import{g as re}from"./get-initials-D-f_fDFw.js";import{A as ie}from"./avatar-Bobpu4LY.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-uRKnM87U.js";import{i as ys}from"./List-CCQbvujs.js";import{s as Ot}from"./Plus-MGVbyAan.js";import{e as vs}from"./constants-D_FQAPnt.js";import{u as Vt}from"./use-members-Bgh9Bzyj.js";import{u as Ft}from"./studio-tools-CUrwKEWB.js";import{t as Ss,T as Cs,S as pe}from"./decopilot-sse-pool-BuAxU3jP.js";import{u as ws}from"./use-decopilot-events-DqvRiTWy.js";import{a as _s}from"./format-time-BnbuEtat.js";import{i as Xt}from"./AlertCircle-CTP1i-dI.js";import{i as Jt}from"./CheckCircle-DoCywYIH.js";import{i as Ds}from"./Circle-zIdusWsh.js";import{s as ks}from"./Eye-6fbfbZf4.js";import{a as Is,d as Ts,e as zs}from"./dialog-DJWqrgT6.js";import{a as mt,c as ft,d as Ve,D as xt}from"./dropdown-menu-CIICt9LY.js";import{P as _t,a as Dt,b as kt}from"./popover-lJ5ZQEBx.js";import{b as Wt,C as Zt,a as fe,e as pt,d as es,c as ts}from"./command-BQ1l40IH.js";import{C as As}from"./calendar-DSll9irA.js";import{u as $s}from"./use-copy-Bhga51kG.js";import{i as Es}from"./Check-BFCsxvBT.js";import{i as Os}from"./ChevronRight-Cp3ikYh5.js";import{a as Fs}from"./Copy01-bE97xj7z.js";import{n as Bs}from"./LinkExternal01-BzM8lApQ.js";import{s as It}from"./User01-CcrTao8_.js";import{i as Pt}from"./X-BaxpQcw_.js";import{g as Rs,b as Ps,e as Ms,f as Ls,a as Us,D as qs}from"./drawer-BRNtG8zH.js";import{t as Bt}from"./ChevronDown-M4WxgN2Q.js";import{i as ss}from"./FilterLines-CnE2ZgEm.js";import{s as Ks}from"./Flag01-DvzVVJGs.js";import{u as Gs}from"./shell-layout-DB0LzzCv.js";import{u as Qs}from"./use-organization-settings-DbfeFhAg.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-Cuc20eOK.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,153])).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-BDELOfSs.js","assets/index-kW87eoYl.js","assets/index-C_g6ujo2.css","assets/ArrowUp-fbYe80_F.js","assets/chat-context-CXmj1wzI.js","assets/autosend-C3_RSy-l.js","assets/hooks-qsHMC7Ia.js","assets/use-mcp-client-t1Lq9dtN.js","assets/constants-D_FQAPnt.js","assets/auth-4uk65Jwa.js","assets/decopilot-sse-pool-COulQsQu.js","assets/backoff-CrEUbyZT.js","assets/delay-CnY5UFtP.js","assets/studio-tools-hO5SJ9L1.js","assets/use-virtual-mcp-CFX-alhS.js","assets/use-collections-BwkNh9s8.js","assets/use-ai-providers-DOWHTDqA.js","assets/use-decopilot-events-BXDhFIv7.js","assets/tab-id-BijBBRwE.js","assets/use-organization-settings-Bs5bz6s7.js","assets/automation-runs-J5VVC0pP.js","assets/select-gkpsAlUm.js","assets/tooltip-MpF93QwW.js","assets/Check-wimNrbhN.js","assets/ChevronDown-C5CvsmcD.js","assets/ChevronUp-DrDSr-mi.js","assets/useInfiniteQuery-C3eTHgjV.js","assets/use-infinite-scroll-AWTzpLPw.js","assets/use-connection-Dyi0y--H.js","assets/card-BiR2GL-H.js","assets/sidebar-DjP0hlIN.js","assets/LayoutLeft-DXtD65nH.js","assets/use-mobile-DKQP_Jss.js","assets/X-BZ_UKD_O.js","assets/table-BO-Pqce3.js","assets/empty-state-n5t0v7uI.js","assets/use-members-B0yMwrOg.js","assets/use-org-auth-client-Cj6dUtY9.js","assets/use-clock-tick-BL0-k7e9.js","assets/AlertCircle-Cvu85Sr0.js","assets/CheckCircle-Bl4aW-nn.js","assets/Circle-g57xQlUQ.js","assets/agent-icon-wm2eb0Nq.js","assets/UserPlus01-DjC11OT1.js","assets/Tool01-BcPlknT9.js","assets/Settings02-BYgyRjAD.js","assets/Tool02-Bt1NLhl1.js","assets/XCircle-BgTed_Co.js","assets/ArrowUpRight-Bl5xGmHO.js","assets/TrendUp01-CwpvhxrP.js","assets/ZapSquare-95HyzbKN.js","assets/Users03-CLvfcW6v.js","assets/ChevronRight-Bno5_0xg.js","assets/Stars02-CmYTwRcx.js","assets/Copy01-1_zUjHG9.js","assets/ZoomOut-Mbjnh50O.js","assets/DotsVertical-SPVqsXfZ.js","assets/Globe01-DJ_zs5G_.js","assets/Eye-BMAxGnGK.js","assets/FilterLines-BnL8BlYf.js","assets/Flag01-BFVNOegT.js","assets/Star01-B4wdnyjY.js","assets/Globe04-DkaJlCI4.js","assets/SwitchHorizontal01-DJnrgsIK.js","assets/HardDrive-yPFtg6_w.js","assets/Key01-BdmJ-1sf.js","assets/LinkExternal01-26v779uD.js","assets/List-Degct3aY.js","assets/Monitor01-B52VT9DG.js","assets/Sun-MykPXdqN.js","assets/Package-CKW2xi_w.js","assets/Palette-Bv_JYMYM.js","assets/Play-Dw4gmx5C.js","assets/Plus-CeRRdRrw.js","assets/SearchLg-EpoU8TwV.js","assets/SearchMd-DAd-Bkgu.js","assets/Shield01-CMDd26KY.js","assets/Stars01-aA8DbwLH.js","assets/Trash01-kZy-N3Xo.js","assets/Upload01-Bpbyu6sv.js","assets/User01-DQn1mAZF.js","assets/Users01-CY0-Vc-O.js","assets/XClose-CcOoHUUk.js","assets/Zap-D3VZuva8.js","assets/use-automations-D9Z5baDr.js","assets/useSuspenseInfiniteQuery-BcApL0b0.js","assets/avatar-DJ2MPOjW.js","assets/format-time-BnbuEtat.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/use-copy-DD-AY19W.js","assets/file-type-icon-BZvnDuN0.js","assets/dialog-gLpw4bfG.js","assets/monaco-editor-BQzusA3f.js","assets/index-DKZ2zjKb.js","assets/index-CczqpYmb.js","assets/shell-layout-F-ok_nx8.js","assets/alert-dialog-nxq3-B6t.js","assets/required-auth-layout-BdTGAOVV.js","assets/use-org-sso-z04b3p1a.js","assets/integration-icon-RxSgmsqJ.js","assets/use-navigate-to-agent-Cwegpci4.js","assets/reusable-new-chat-CouMjkYR.js","assets/AreaChart-BSihuL6I.js","assets/form-CEJ7NLQz.js","assets/label-DoX8QwZg.js","assets/input-BUVWi6ji.js","assets/drawer-ZJqvF-A5.js","assets/collection-search-CIVfwIbs.js","assets/tabs-BaUdekDU.js","assets/toggle-group-BLEtqopd.js","assets/use-deco-credits-DRClHKlt.js","assets/extract-connection-data-DQ2KFguj.js","assets/connection-card-DAmJM9w3.js","assets/use-registry-connections-izs-KLy2.js","assets/retry-CErkP7V6.js","assets/connection-slug-eyAPH6o3.js","assets/textarea-CJ9nnedq.js","assets/connection-form-helpers-CmZoSIwh.js","assets/authenticate-and-persist-oauth-DSvl_dtV.js","assets/mcp-oauth-DayJEOBQ.js","assets/collection-tabs-C-nwiHu-.js","assets/badge-tPEV-RxK.js","assets/connect-desktop-dialog-B4yVc_7M.js","assets/select-model-DE9e2e1e.js","assets/checkbox-BnAeGRmY.js","assets/skeleton-1fz4b835.js","assets/ai-providers-logos-DD3qZ33J.js","assets/settings-section-BhliH2-8.js","assets/command-CZ7egaGh.js","assets/index-LRYSqCUf.js","assets/popover-1iWni6pj.js","assets/dropdown-menu-Bbpx10wk.js","assets/index-DyfzQj5m.js","assets/toolbar-mHxlKpgC.js","assets/use-debounced-value-Bb7tMvOa.js","assets/question-004-sINsf4GQ.js","assets/use-status-sounds-CCDNWlCZ.js","assets/use-mcp-tools-CCr3WLAZ.js","assets/use-capability-D9_H5dnX.js","assets/use-debounced-autosave-CWt391ns.js","assets/index-Dh4GqdsZ.js","assets/search-input-DvuYITM0.js","assets/use-mcp-auth-status-CSloTF4V.js","assets/switch-BSb1YfEU.js","assets/github-repo-picker-BXgmr-ZU.js","assets/provision-repo-scoped-github-connection-CB4ICKHq.js","assets/use-secrets-BRyksvJu.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/companions-core-DVErIwai.js","assets/toolbar-icon-button-tX4cl55G.js","assets/calendar-Csl0UCmv.js","assets/use-file-configs-DjyD5Omy.js","assets/automation-list-row-BbQKDFDI.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-kW87eoYl.js";import{g as re}from"./get-initials-D-f_fDFw.js";import{A as ie}from"./avatar-DJ2MPOjW.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-DjC11OT1.js";import{i as ys}from"./List-Degct3aY.js";import{s as Ot}from"./Plus-CeRRdRrw.js";import{e as vs}from"./constants-D_FQAPnt.js";import{u as Vt}from"./use-members-B0yMwrOg.js";import{u as Ft}from"./studio-tools-hO5SJ9L1.js";import{t as Ss,T as Cs,S as pe}from"./decopilot-sse-pool-COulQsQu.js";import{u as ws}from"./use-decopilot-events-BXDhFIv7.js";import{a as _s}from"./format-time-BnbuEtat.js";import{i as Xt}from"./AlertCircle-Cvu85Sr0.js";import{i as Jt}from"./CheckCircle-Bl4aW-nn.js";import{i as Ds}from"./Circle-g57xQlUQ.js";import{s as ks}from"./Eye-BMAxGnGK.js";import{a as Is,d as Ts,e as zs}from"./dialog-gLpw4bfG.js";import{a as mt,c as ft,d as Ve,D as xt}from"./dropdown-menu-Bbpx10wk.js";import{P as _t,a as Dt,b as kt}from"./popover-1iWni6pj.js";import{b as Wt,C as Zt,a as fe,e as pt,d as es,c as ts}from"./command-CZ7egaGh.js";import{C as As}from"./calendar-Csl0UCmv.js";import{u as $s}from"./use-copy-DD-AY19W.js";import{i as Es}from"./Check-wimNrbhN.js";import{i as Os}from"./ChevronRight-Bno5_0xg.js";import{a as Fs}from"./Copy01-1_zUjHG9.js";import{n as Bs}from"./LinkExternal01-26v779uD.js";import{s as It}from"./User01-DQn1mAZF.js";import{i as Pt}from"./X-BZ_UKD_O.js";import{g as Rs,b as Ps,e as Ms,f as Ls,a as Us,D as qs}from"./drawer-ZJqvF-A5.js";import{t as Bt}from"./ChevronDown-C5CvsmcD.js";import{i as ss}from"./FilterLines-BnL8BlYf.js";import{s as Ks}from"./Flag01-BFVNOegT.js";import{u as Gs}from"./shell-layout-F-ok_nx8.js";import{u as Qs}from"./use-organization-settings-Bs5bz6s7.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-BDELOfSs.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,153])).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,4 +1,4 @@
|
|
|
1
|
-
import{c as $,C as de,n as Ze,d as We,K as X,m as ie,aY as wn,r as S,ap as zs,l as ce,j as r,U as Cs,i as $s,B as J,aL as jn,t as ue,w as Ps,L as Es,e as Ds,b as kn,u as Sn,E as Pt}from"./index-BCwMqg4j.js";import{s as Nn}from"./Eye-6fbfbZf4.js";import{a as dt}from"./Palette-Dw8aT_W4.js";import{s as Ts}from"./Plus-MGVbyAan.js";import{i as Fs}from"./SearchLg-D-Dwz2ld.js";import{i as ut}from"./Upload01-P8NpMatB.js";import{s as zn}from"./XClose-CwM71i7w.js";import{i as _t}from"./Zap-CJJOCD2g.js";import{u as Cn}from"./use-mobile-Duim7H7-.js";import{f as Ms,a as Is,b as Ls,c as Os,d as Rs,e as As,A as _s,g as Us}from"./alert-dialog-TjFsm0C4.js";import{D as $n,a as Ue,d as Je,e as et,i as Pn,h as Bs,c as Hs}from"./dialog-DJWqrgT6.js";import{I as Ve}from"./input-DZJJfrqQ.js";import{F as ke,M as Ut,d as En}from"./file-type-icon-R56Du5Jy.js";import{T as qs}from"./toolbar-Dp1EU7YT.js";import{a as Ks}from"./Package-GowKJ4nT.js";import{u as Ws}from"./use-debounced-value-Dp1aIpTc.js";import{b as Gs,c as Vs,e as Xs,i as Qs,f as Dn,a as Tn,g as Ys,d as Zs}from"./ZoomOut-CoQcIp1s.js";import{S as ae}from"./skeleton-Ce84w9Pu.js";import{T as Js}from"./textarea-C3h0m9WI.js";import{t as el}from"./ChevronDown-M4WxgN2Q.js";import{n as tl}from"./ChevronUp-BYM-dHMZ.js";import{i as ft}from"./X-BaxpQcw_.js";import{P as nl,b as sl,a as ll}from"./popover-lJ5ZQEBx.js";import{b as be,T as ye,a as ve}from"./tooltip-B-NZX6CV.js";import{i as rl}from"./Check-BFCsxvBT.js";import{a as il}from"./Copy01-bE97xj7z.js";import{n as Xe,i as xt}from"./Globe01-D7jRCf_8.js";import{i as Fn}from"./Key01-B7D2-dQk.js";import{n as Mn}from"./LinkExternal01-BzM8lApQ.js";import{l as ol,F as al}from"./index-p86QJkti.js";import{D as Bt,a as Ht,c as qt,d as Fe}from"./dropdown-menu-CIICt9LY.js";import{i as cl}from"./LayoutLeft-BqgWNXjH.js";import{i as dl}from"./ChevronRight-Cp3ikYh5.js";import{t as ul}from"./Stars01-DTimaKiw.js";import{i as In}from"./DotsVertical-kBN0UT7i.js";import{s as Ln}from"./Trash01-BfpHbwsg.js";function On(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const l=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${l?`?${l}`:""}`}async function fe(n,e,t){const s=await fetch(n,e);if(s.ok||t?.allow404&&s.status===404)return s;let l="";try{l=(await s.json()).error??""}catch{}throw new Error(l||`HTTP ${s.status}`)}function Kt(n,e){const t=$.c(11),{org:s}=de();let l;t[0]!==s.id||t[1]!==e||t[2]!==n?(l=X.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=l):l=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await fe(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(fl),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let o;return t[8]!==l||t[9]!==i?(o={queryKey:l,placeholderData:wn,queryFn:i},t[8]=l,t[9]=i,t[10]=o):o=t[10],ie(o)}function fl(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function Rn(n,e,t){const s=$.c(15),{org:l}=de();let i;s[0]!==l.id||s[1]!==e||s[2]!==n?(i=X.orgFsStat(l.id,n??"",e),s[0]=l.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]!==l.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fe(pe(l.slug,n??"","stat",{path:e}),void 0,{allow404:!0});return f.status===404?null:(await f.json()).entry},s[6]=l.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 hl(n){const e=$.c(9),{org:t}=de();let s;e[0]!==t.id||e[1]!==n?(s=X.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let l;e[3]!==t.slug||e[4]!==n?(l=async()=>await(await fe(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=l):l=e[5];let i;return e[6]!==s||e[7]!==l?(i={queryKey:s,queryFn:l},e[6]=s,e[7]=l,e[8]=i):i=e[8],ie(i)}function ml(n,e){const t=$.c(9),s=n===void 0?60:n,{org:l}=de();let i;t[0]!==l.id?(i=X.orgFsRecent(l.id),t[0]=l.id,t[1]=i):i=t[1];const o=e?.enabled;let a;t[2]!==s||t[3]!==l.slug?(a=async()=>(await(await fe(`/api/${encodeURIComponent(l.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=l.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 pl(n,e){const t=$.c(11),s=50,{org:l}=de();let i;t[0]!==l.id||t[1]!==n?(i=X.orgFsSearch(l.id,n),t[0]=l.id,t[1]=n,t[2]=i):i=t[2];const o=n.length>0;let a;t[3]!==s||t[4]!==l.slug||t[5]!==n?(a=async()=>(await(await fe(`/api/${encodeURIComponent(l.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=l.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:wn,queryFn:a},t[7]=i,t[8]=o,t[9]=a,t[10]=c):c=t[10],ie(c)}function Do(n){const e=$.c(8),{org:t}=de();let s;e[0]!==t.id?(s=X.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const l=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const a=await fe(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await a.json();return c.map(xl)},e[2]=t.slug,e[3]=i):i=e[3];let o;return e[4]!==s||e[5]!==l||e[6]!==i?(o={queryKey:s,enabled:l,queryFn:i},e[4]=s,e[5]=l,e[6]=i,e[7]=o):o=e[7],ie(o)}function xl(n){return{volume:n.volume,path:n.path}}async function To(n){const e=await fe(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function gl(n,e,t){return(await fe(pe(n,e,"read",{path:t}))).text()}const bl=new Set(["md","mdx","markdown","txt","text"]),yl=25,vl=64*1024,wl=256*1024,jl=4;function kl(n){const e=n.lastIndexOf(".");return e===-1?!1:bl.has(n.slice(e+1).toLowerCase())}async function Fo(n,e,t){const s=t?`${t}/`:"",l=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 fe(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<jl&&a.push({path:m.path,depth:u.depth+1});continue}kl(m.path)&&m.size<=vl&&i.length<yl?i.push(m.path):o.push(l(m.path))}}const c=await Promise.all(i.map(u=>gl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>wl){o.push(l(u));return}f+=m.length,d.push({relPath:l(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 An(){const n=$.c(7),{org:e}=de();let t;n[0]!==e.id?(t=X.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await fe(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let l;return n[4]!==t||n[5]!==s?(l={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=l):l=n[6],ie(l)}function Sl(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t.slug||e[1]!==n?(s=l=>pe(t.slug,n,"read",{path:l}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function tt(){const n=$.c(2),{org:e}=de();let t;return n[0]!==e.slug?(t=(s,l)=>pe(e.slug,s,"read",{path:l}),n[0]=e.slug,n[1]=t):t=n[1],t}function _n(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async l=>(await(await fe(pe(t.slug,n,"file",{path:l.path}),{method:"PUT",headers:{"content-type":l.contentType??"text/html; charset=utf-8"},body:l.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function Nl(n){const e=$.c(18),{org:t}=de(),s=Ze();let l;e[0]!==t||e[1]!==n?(l=async d=>(await(await fe(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]=l):l=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=X.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:X.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:X.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:X.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:X.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=a):a=e[12];let c;return e[13]!==l||e[14]!==i||e[15]!==o||e[16]!==a?(c={mutationFn:l,onMutate:i,onError:o,onSettled:a},e[13]=l,e[14]=i,e[15]=o,e[16]=a,e[17]=c):c=e[17],We(c)}function Lt(n){const e=$.c(26),{org:t}=de(),s=Ze();let l;e[0]!==t||e[1]!==s||e[2]!==n?(l=()=>{s.invalidateQueries({queryKey:X.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:X.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:X.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=l):l=e[3];const i=l;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 fe(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 fe(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 fe(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 gt=S.createContext(null);gt.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"},Wt=10,Te=S.useLayoutEffect,tn=zs.useId,zl=typeof tn=="function"?tn:()=>null;let Cl=0;function Gt(n=null){const e=zl(),t=S.useRef(n||e||null);return t.current===null&&(t.current=""+Cl++),n??t.current}function Un({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:l,forwardedRef:i,id:o,maxSize:a,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=S.useContext(gt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:C,isPanelCollapsed:k,reevaluatePanelConstraints:w,registerPanel:B,resizePanel:R,unregisterPanel:_}=b,v=Gt(o),M=S.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:l,maxSize:a,minSize:c},id:v,idIsFromProps:o!==void 0,order:h});S.useRef({didLogMissingDefaultSizeWarning:!1}),Te(()=>{const{callbacks:U,constraints:O}=M.current,H={...O};M.current.id=v,M.current.idIsFromProps=o!==void 0,M.current.order=h,U.onCollapse=d,U.onExpand=f,U.onResize=u,O.collapsedSize=t,O.collapsible=s,O.defaultSize=l,O.maxSize=a,O.minSize=c,(H.collapsedSize!==O.collapsedSize||H.collapsible!==O.collapsible||H.maxSize!==O.maxSize||H.minSize!==O.minSize)&&w(M.current,H)}),Te(()=>{const U=M.current;return B(U),()=>{_(U)}},[h,v,B,_]),S.useImperativeHandle(i,()=>({collapse:()=>{x(M.current)},expand:U=>{y(M.current,U)},getId(){return v},getSize(){return j(M.current)},isCollapsed(){return k(M.current)},isExpanded(){return!k(M.current)},resize:U=>{R(M.current,U)}}),[x,y,j,k,v,R]);const Z=N(M.current,l);return S.createElement(p,{...g,children:n,className:e,id:v,style:{...Z,...m},[se.groupId]:C,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+Z.flexGrow).toFixed(1)})}const Bn=S.forwardRef((n,e)=>S.createElement(Un,{...n,forwardedRef:e}));Un.displayName="Panel";Bn.displayName="forwardRef(Panel)";let Ot=null,ct=-1,ze=null;function $l(n,e){if(e){const t=(e&Gn)!==0,s=(e&Vn)!==0,l=(e&Xn)!==0,i=(e&Qn)!==0;if(t)return l?"se-resize":i?"ne-resize":"e-resize";if(s)return l?"sw-resize":i?"nw-resize":"w-resize";if(l)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 Pl(){ze!==null&&(document.head.removeChild(ze),Ot=null,ze=null,ct=-1)}function Et(n,e){var t,s;const l=$l(n,e);if(Ot!==l){if(Ot=l,ze===null&&(ze=document.createElement("style"),document.head.appendChild(ze)),ct>=0){var i;(i=ze.sheet)===null||i===void 0||i.removeRule(ct)}ct=(t=(s=ze.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${l} !important;}`))!==null&&t!==void 0?t:-1}}function Hn(n){return n.type==="keydown"}function qn(n){return n.type.startsWith("pointer")}function Kn(n){return n.type.startsWith("mouse")}function bt(n){if(qn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(Kn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function El(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Dl(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 Tl(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:ln(n),b:ln(e)};let s;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),s=n;G(s,"Stacking order can only be calculated for elements with a common ancestor");const l={a:sn(nn(t.a)),b:sn(nn(t.b))};if(l.a===l.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(l.a-l.b)}const Fl=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Ml(n){var e;const t=getComputedStyle((e=Wn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Il(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Ml(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"||Fl.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function nn(n){let e=n.length;for(;e--;){const t=n[e];if(G(t,"Missing node"),Il(t))return t}return null}function sn(n){return n&&Number(getComputedStyle(n).zIndex)||0}function ln(n){const e=[];for(;n;)e.push(n),n=Wn(n);return e}function Wn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Gn=1,Vn=2,Xn=4,Qn=8,Ll=El()==="coarse";let xe=[],_e=!1,De=new Map,yt=new Map;const Qe=new Set;function Ol(n,e,t,s,l){var i;const{ownerDocument:o}=e,a={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:l},c=(i=De.get(o))!==null&&i!==void 0?i:0;return De.set(o,c+1),Qe.add(a),ht(),function(){var f;yt.delete(n),Qe.delete(a);const u=(f=De.get(o))!==null&&f!==void 0?f:1;if(De.set(o,u-1),ht(),u===1&&De.delete(o),xe.includes(a)){const h=xe.indexOf(a);h>=0&&xe.splice(h,1),Xt(),l("up",!0,null)}}}function Rl(n){const{target:e}=n,{x:t,y:s}=bt(n);_e=!0,Vt({target:e,x:t,y:s}),ht(),xe.length>0&&(mt("down",n),n.preventDefault(),Yn(e)||n.stopImmediatePropagation())}function Dt(n){const{x:e,y:t}=bt(n);if(_e&&n.buttons===0&&(_e=!1,mt("up",n)),!_e){const{target:s}=n;Vt({target:s,x:e,y:t})}mt("move",n),Xt(),xe.length>0&&n.preventDefault()}function Tt(n){const{target:e}=n,{x:t,y:s}=bt(n);yt.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Yn(e)||n.stopImmediatePropagation()),mt("up",n),Vt({target:e,x:t,y:s}),Xt(),ht()}function Yn(n){let e=n;for(;e;){if(e.hasAttribute(se.resizeHandle))return!0;e=e.parentElement}return!1}function Vt({target:n,x:e,y:t}){xe.splice(0);let s=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(s=n),Qe.forEach(l=>{const{element:i,hitAreaMargins:o}=l,a=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=a,h=Ll?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)&&Tl(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(Dl(p.getBoundingClientRect(),a)){g=!0;break}p=p.parentElement}if(g)return}xe.push(l)}})}function Ft(n,e){yt.set(n,e)}function Xt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:l}=s;l==="horizontal"?n=!0:e=!0});let t=0;yt.forEach(s=>{t|=s}),n&&e?Et("intersection",t):n?Et("horizontal",t):e?Et("vertical",t):Pl()}let Mt=new AbortController;function ht(){Mt.abort(),Mt=new AbortController;const n={capture:!0,signal:Mt.signal};Qe.size&&(_e?(xe.length>0&&De.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",Tt,n),s.addEventListener("pointerleave",Dt,n),s.addEventListener("pointermove",Dt,n))}),window.addEventListener("pointerup",Tt,n),window.addEventListener("pointercancel",Tt,n)):De.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Rl,n),s.addEventListener("pointermove",Dt,n))}))}function mt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,l=xe.includes(t);s(n,l,e)})}function Al(){const[n,e]=S.useState(0);return S.useCallback(()=>e(t=>t+1),[])}function G(n,e){if(!n)throw console.error(e),Error(e)}function Me(n,e,t=Wt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function we(n,e,t=Wt){return Me(n,e,t)===0}function me(n,e,t){return Me(n,e,t)===0}function _l(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const l=n[s],i=e[s];if(!me(l,i,t))return!1}return!0}function Ae({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];G(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:l=0,collapsible:i,maxSize:o=100,minSize:a=0}=s;if(Me(t,a)<0)if(i){const c=(l+a)/2;Me(t,c)<0?t=l:t=a}else t=a;return t=Math.min(o,t),t=parseFloat(t.toFixed(Wt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:l,trigger:i}){if(me(n,0))return e;const o=[...e],[a,c]=s;G(a!=null,"Invalid first pivot index"),G(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:a,h=t[u];G(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(G(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];G(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(G(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];G(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];G(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(_l(l,o))return l;{const u=n<0?c:a,h=e[u];G(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];G(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:l}function Ul({layout:n,panelsArray:e,pivotIndices:t}){let s=0,l=100,i=0,o=0;const a=t[0];G(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,l=p):(i+=g,o+=p)});const c=Math.min(l,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 Zn(n,e,t=document){const l=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return l??null}function Jn(n,e,t){const s=Zn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function es(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 vt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function Bl(n,e,t,s=document){var l,i,o,a;const c=vt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(l=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&l!==void 0?l: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 Hl({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:l,panelGroupElement:i,setLayout:o}){S.useRef({didWarnAboutMissingResizeHandle:!1}),Te(()=>{if(!i)return;const a=Ye(t,i);for(let c=0;c<l.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=Ul({layout:s,panelsArray:l,pivotIndices:[c,c+1]}),h=a[c];if(h!=null){const m=l[c];G(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,l,i]),S.useEffect(()=>{if(!i)return;const a=e.current;G(a,"Eager values not found");const{panelDataArray:c}=a,d=es(t,i);G(d!=null,`No group found for id "${t}"`);const f=Ye(t,i);G(f,`No resize handles found for group id "${t}"`);const u=f.map(h=>{const m=h.getAttribute(se.resizeHandleId);G(m,"Resize handle element has no handle id attribute");const[p,g]=Bl(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];G(j,`No panel data found for index ${y}`);const N=s[y],{collapsedSize:C=0,collapsible:k,minSize:w=0}=j.constraints;if(N!=null&&k){const B=He({delta:me(N,C)?w-C:C-N,initialLayout:s,panelConstraints:c.map(R=>R.constraints),pivotIndices:Jn(t,m,i),prevLayout:s,trigger:"keyboard"});s!==B&&o(B)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,l,o])}function rn(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 ts(n,e){const t=n==="horizontal",{x:s,y:l}=bt(e);return t?s:l}function ql(n,e,t,s,l){const i=t==="horizontal",o=vt(e,l);G(o,`No resize handle element found for id "${e}"`);const a=o.getAttribute(se.groupId);G(a,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=ts(t,n),f=es(a,l);G(f,`No group element found for id "${a}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function Kl(n,e,t,s,l,i){if(Hn(n)){const o=t==="horizontal";let a=0;n.shiftKey?a=100:l!=null?a=l: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:ql(n,e,t,s,i)}function Wl({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,l=100;for(let i=0;i<n.length;i++){const o=t[i];G(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;a!=null&&(s++,e[i]=a,l-=a)}for(let i=0;i<n.length;i++){const o=t[i];G(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;if(a!=null)continue;const c=n.length-s,d=l/c;s++,e[i]=d,l-=d}return e}function Ie(n,e,t){e.forEach((s,l)=>{const i=n[l];G(i,`Panel data not found for index ${l}`);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||we(u,d))&&!we(s,d)&&m(),h&&(u==null||!we(u,d))&&we(s,d)&&h())}})}function at(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 Gl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:l,precision:i=3}){const o=t[l];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 Vl(n,e=10){let t=null;return(...l)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...l)},e)}}function on(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 ns(n){return`react-resizable-panels:${n}`}function ss(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:l,order:i}=e;return l?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function ls(n,e){try{const t=ns(n),s=e.getItem(t);if(s){const l=JSON.parse(s);if(typeof l=="object"&&l!=null)return l}}catch{}return null}function Xl(n,e,t){var s,l;const i=(s=ls(n,t))!==null&&s!==void 0?s:{},o=ss(e);return(l=i[o])!==null&&l!==void 0?l:null}function Ql(n,e,t,s,l){var i;const o=ns(n),a=ss(e),c=(i=ls(n,l))!==null&&i!==void 0?i:{};c[a]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{l.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function an({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];G(o!=null,`No layout data found for index ${i}`);const a=100/s*o;t[i]=a}let l=0;for(let i=0;i<e.length;i++){const o=t[i];G(o!=null,`No layout data found for index ${i}`);const a=Ae({panelConstraints:e,panelIndex:i,size:o});o!=a&&(l+=o-a,t[i]=a)}if(!me(l,0))for(let i=0;i<e.length;i++){const o=t[i];G(o!=null,`No layout data found for index ${i}`);const a=o+l,c=Ae({panelConstraints:e,panelIndex:i,size:a});if(o!==c&&(l-=c-o,t[i]=c,me(l,0)))break}return t}const Yl=100,qe={getItem:n=>(on(qe),qe.getItem(n)),setItem:(n,e)=>{on(qe),qe.setItem(n,e)}},cn={};function rs({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:l,id:i=null,onLayout:o=null,keyboardResizeBy:a=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Gt(i),m=S.useRef(null),[p,g]=S.useState(null),[b,x]=S.useState([]),y=Al(),j=S.useRef({}),N=S.useRef(new Map),C=S.useRef(0),k=S.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:a,onLayout:o,storage:c}),w=S.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});S.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),S.useImperativeHandle(l,()=>({getId:()=>k.current.id,getLayout:()=>{const{layout:z}=w.current;return z},setLayout:z=>{const{onLayout:F}=k.current,{layout:I,panelDataArray:L}=w.current,D=an({layout:z,panelConstraints:L.map(A=>A.constraints)});rn(I,D)||(x(D),w.current.layout=D,F&&F(D),Ie(L,D,j.current))}}),[]),Te(()=>{k.current.autoSaveId=n,k.current.direction=s,k.current.dragState=p,k.current.id=h,k.current.onLayout=o,k.current.storage=c}),Hl({committedValuesRef:k,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),S.useEffect(()=>{const{panelDataArray:z}=w.current;if(n){if(b.length===0||b.length!==z.length)return;let F=cn[n];F==null&&(F=Vl(Ql,Yl),cn[n]=F);const I=[...z],L=new Map(N.current);F(n,I,L,b,c)}},[n,b,c]),S.useEffect(()=>{});const B=S.useCallback(z=>{const{onLayout:F}=k.current,{layout:I,panelDataArray:L}=w.current;if(z.constraints.collapsible){const D=L.map(he=>he.constraints),{collapsedSize:A=0,panelSize:Q,pivotIndices:te}=Ee(L,z,I);if(G(Q!=null,`Panel size not found for panel "${z.id}"`),!we(Q,A)){N.current.set(z.id,Q);const P=Oe(L,z)===L.length-1?Q-A:A-Q,V=He({delta:P,initialLayout:I,panelConstraints:D,pivotIndices:te,prevLayout:I,trigger:"imperative-api"});at(I,V)||(x(V),w.current.layout=V,F&&F(V),Ie(L,V,j.current))}}},[]),R=S.useCallback((z,F)=>{const{onLayout:I}=k.current,{layout:L,panelDataArray:D}=w.current;if(z.constraints.collapsible){const A=D.map(ne=>ne.constraints),{collapsedSize:Q=0,panelSize:te=0,minSize:he=0,pivotIndices:P}=Ee(D,z,L),V=F??he;if(we(te,Q)){const ne=N.current.get(z.id),ge=ne!=null&&ne>=V?ne:V,$e=Oe(D,z)===D.length-1?te-ge:ge-te,oe=He({delta:$e,initialLayout:L,panelConstraints:A,pivotIndices:P,prevLayout:L,trigger:"imperative-api"});at(L,oe)||(x(oe),w.current.layout=oe,I&&I(oe),Ie(D,oe,j.current))}}},[]),_=S.useCallback(z=>{const{layout:F,panelDataArray:I}=w.current,{panelSize:L}=Ee(I,z,F);return G(L!=null,`Panel size not found for panel "${z.id}"`),L},[]),v=S.useCallback((z,F)=>{const{panelDataArray:I}=w.current,L=Oe(I,z);return Gl({defaultSize:F,dragState:p,layout:b,panelData:I,panelIndex:L})},[p,b]),M=S.useCallback(z=>{const{layout:F,panelDataArray:I}=w.current,{collapsedSize:L=0,collapsible:D,panelSize:A}=Ee(I,z,F);return G(A!=null,`Panel size not found for panel "${z.id}"`),D===!0&&we(A,L)},[]),Z=S.useCallback(z=>{const{layout:F,panelDataArray:I}=w.current,{collapsedSize:L=0,collapsible:D,panelSize:A}=Ee(I,z,F);return G(A!=null,`Panel size not found for panel "${z.id}"`),!D||Me(A,L)>0},[]),U=S.useCallback(z=>{const{panelDataArray:F}=w.current;F.push(z),F.sort((I,L)=>{const D=I.order,A=L.order;return D==null&&A==null?0:D==null?-1:A==null?1:D-A}),w.current.panelDataArrayChanged=!0,y()},[y]);Te(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:z,onLayout:F,storage:I}=k.current,{layout:L,panelDataArray:D}=w.current;let A=null;if(z){const te=Xl(z,D,I);te&&(N.current=new Map(Object.entries(te.expandToSizes)),A=te.layout)}A==null&&(A=Wl({panelDataArray:D}));const Q=an({layout:A,panelConstraints:D.map(te=>te.constraints)});rn(L,Q)||(x(Q),w.current.layout=Q,F&&F(Q),Ie(D,Q,j.current))}}),Te(()=>{const z=w.current;return()=>{z.layout=[]}},[]);const O=S.useCallback(z=>{let F=!1;const I=m.current;return I&&window.getComputedStyle(I,null).getPropertyValue("direction")==="rtl"&&(F=!0),function(D){D.preventDefault();const A=m.current;if(!A)return()=>null;const{direction:Q,dragState:te,id:he,keyboardResizeBy:P,onLayout:V}=k.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Se}=te??{},$e=Jn(he,z,A);let oe=Kl(D,z,Q,te,P,A);const rt=Q==="horizontal";rt&&F&&(oe=-oe);const Ct=ge.map($t=>$t.constraints),Pe=He({delta:oe,initialLayout:Se??ne,panelConstraints:Ct,pivotIndices:$e,prevLayout:ne,trigger:Hn(D)?"keyboard":"mouse-or-touch"}),it=!at(ne,Pe);(qn(D)||Kn(D))&&C.current!=oe&&(C.current=oe,!it&&oe!==0?rt?Ft(z,oe<0?Gn:Vn):Ft(z,oe<0?Xn:Qn):Ft(z,0)),it&&(x(Pe),w.current.layout=Pe,V&&V(Pe),Ie(ge,Pe,j.current))}},[]),H=S.useCallback((z,F)=>{const{onLayout:I}=k.current,{layout:L,panelDataArray:D}=w.current,A=D.map(ne=>ne.constraints),{panelSize:Q,pivotIndices:te}=Ee(D,z,L);G(Q!=null,`Panel size not found for panel "${z.id}"`);const P=Oe(D,z)===D.length-1?Q-F:F-Q,V=He({delta:P,initialLayout:L,panelConstraints:A,pivotIndices:te,prevLayout:L,trigger:"imperative-api"});at(L,V)||(x(V),w.current.layout=V,I&&I(V),Ie(D,V,j.current))},[]),W=S.useCallback((z,F)=>{const{layout:I,panelDataArray:L}=w.current,{collapsedSize:D=0,collapsible:A}=F,{collapsedSize:Q=0,collapsible:te,maxSize:he=100,minSize:P=0}=z.constraints,{panelSize:V}=Ee(L,z,I);V!=null&&(A&&te&&we(V,D)?we(D,Q)||H(z,Q):V<P?H(z,P):V>he&&H(z,he))},[H]),q=S.useCallback((z,F)=>{const{direction:I}=k.current,{layout:L}=w.current;if(!m.current)return;const D=vt(z,m.current);G(D,`Drag handle element not found for id "${z}"`);const A=ts(I,F);g({dragHandleId:z,dragHandleRect:D.getBoundingClientRect(),initialCursorPosition:A,initialLayout:L})},[]),ee=S.useCallback(()=>{g(null)},[]),Y=S.useCallback(z=>{const{panelDataArray:F}=w.current,I=Oe(F,z);I>=0&&(F.splice(I,1),delete j.current[z.id],w.current.panelDataArrayChanged=!0,y())},[y]),T=S.useMemo(()=>({collapsePanel:B,direction:s,dragState:p,expandPanel:R,getPanelSize:_,getPanelStyle:v,groupId:h,isPanelCollapsed:M,isPanelExpanded:Z,reevaluatePanelConstraints:W,registerPanel:U,registerResizeHandle:O,resizePanel:H,startDragging:q,stopDragging:ee,unregisterPanel:Y,panelGroupElement:m.current}),[B,p,s,R,_,v,h,M,Z,W,U,O,H,q,ee,Y]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return S.createElement(gt.Provider,{value:T},S.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const is=S.forwardRef((n,e)=>S.createElement(rs,{...n,forwardedRef:e}));rs.displayName="PanelGroup";is.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function Ee(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 Zl({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){S.useEffect(()=>{if(n||t==null||s==null)return;const l=vt(e,s);if(l==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=l.getAttribute(se.groupId);G(a,`No group element found for id "${a}"`);const c=Ye(a,s),d=Zn(a,e,s);G(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 l.addEventListener("keydown",i),()=>{l.removeEventListener("keydown",i)}},[s,n,e,t])}function os({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:l,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=S.useRef(null),y=S.useRef({onClick:o,onDragging:a,onPointerDown:d,onPointerUp:f});S.useEffect(()=>{y.current.onClick=o,y.current.onDragging=a,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=S.useContext(gt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:C,registerResizeHandle:k,startDragging:w,stopDragging:B,panelGroupElement:R}=j,_=Gt(l),[v,M]=S.useState("inactive"),[Z,U]=S.useState(!1),[O,H]=S.useState(null),W=S.useRef({state:v});Te(()=>{W.current.state=v}),S.useEffect(()=>{if(t)H(null);else{const T=k(_);H(()=>T)}},[t,_,k]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;S.useEffect(()=>{if(t||O==null)return;const T=x.current;G(T,"Element ref not attached");let K=!1;return Ol(_,T,N,{coarse:q,fine:ee},(F,I,L)=>{if(!I){M("inactive");return}switch(F){case"down":{M("drag"),K=!1,G(L,'Expected event to be defined for "down" action'),w(_,L);const{onDragging:D,onPointerDown:A}=y.current;D?.(!0),A?.();break}case"move":{const{state:D}=W.current;K=!0,D!=="drag"&&M("hover"),G(L,'Expected event to be defined for "move" action'),O(L);break}case"up":{M("hover"),B();const{onClick:D,onDragging:A,onPointerUp:Q}=y.current;A?.(!1),Q?.(),K||D?.();break}}})},[q,N,t,ee,k,_,O,w,B]),Zl({disabled:t,handleId:_,resizeHandler:O,panelGroupElement:R});const Y={touchAction:"none",userSelect:"none"};return S.createElement(m,{...p,children:n,className:e,id:l,onBlur:()=>{U(!1),i?.()},onFocus:()=>{U(!0),c?.()},ref:x,role:"separator",style:{...Y,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:C,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":Z?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:_,[se.resizeHandleState]:v})}os.displayName="PanelResizeHandle";function Jl(n){const e=$.c(10);let t,s,l;e[0]!==n?({className:t,ref:l,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=l):(t=e[1],s=e[2],l=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]!==l||e[8]!==i?(o=r.jsx(is,{ref:l,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=l,e[8]=i,e[9]=o):o=e[9],o}function dn(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=r.jsx(Bn,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function er(n){const e=$.c(12);let t,s,l;e[0]!==n?({withHandle:l,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=l):(t=e[1],s=e[2],l=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]!==l?(o=l&&r.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:r.jsx(Gs,{className:"size-2.5"})}),e[6]=l,e[7]=o):o=e[7];let a;return e[8]!==s||e[9]!==i||e[10]!==o?(a=r.jsx(os,{"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 tr(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 nr(n){if(tr(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function sr(n){try{return decodeURIComponent(n)}catch{return n}}function lr(n){return nr(n),encodeURIComponent(n)}function rr(n){return`.deco/blocks/${lr(n)}.json`}function Mo(n){return`/${rr(n)}`}const Io=1e4,ir=3;function Rt(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function wt(n){return n.startsWith("/")?n.slice(1):n}function Lo(n){const e=wt(n);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}function pt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function or(n){const e=pt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function Oo(n,e){const t=e.replace(/^\/+|\/+$/g,"");return pt(t?`${n==="/"?"":n}/${t}`:n)}function Ro(n,e){return e==="directory"?n:or(n)}function Ao(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 ar(n){const e=wt(n);return e?e.split("/").filter(Boolean).length:0}function _o(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function Uo(n,e){return ar(n)>=ir&&!e.has(n)}function Bo(n,e,t=[]){const s=wt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const l=`${s}/`;return e.some(i=>i.startsWith(l))||t.some(i=>i.startsWith(l))}function Ho(n){const e=wt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return sr(s)}function cr(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 qo(n){const e=Rt(n).split("/").filter(Boolean),t=["/"];let s="";for(const l of e.slice(0,-1))s+=`/${l}`,t.push(s);return t}function Ko(n,e=[]){const t={children:[]},s=i=>{const a=Rt(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=Rt(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(pt(i));const l=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&&l(o.children)};return l(t.children),t.children}function dr(n,e,t=0){const s=[];for(const l of n)l.name!==".gitkeep"&&(s.push({node:l,depth:t}),l.kind==="directory"&&l.children.length>0&&e.has(l.path)&&s.push(...dr(l.children,e,t+1)));return s}function Wo(n){return n.split(`
|
|
1
|
+
import{c as $,C as de,n as Ze,d as We,K as X,m as ie,aY as wn,r as S,ap as zs,l as ce,j as r,U as Cs,i as $s,B as J,aL as jn,t as ue,w as Ps,L as Es,e as Ds,b as kn,u as Sn,E as Pt}from"./index-kW87eoYl.js";import{s as Nn}from"./Eye-BMAxGnGK.js";import{a as dt}from"./Palette-Bv_JYMYM.js";import{s as Ts}from"./Plus-CeRRdRrw.js";import{i as Fs}from"./SearchLg-EpoU8TwV.js";import{i as ut}from"./Upload01-Bpbyu6sv.js";import{s as zn}from"./XClose-CcOoHUUk.js";import{i as _t}from"./Zap-D3VZuva8.js";import{u as Cn}from"./use-mobile-DKQP_Jss.js";import{f as Ms,a as Is,b as Ls,c as Os,d as Rs,e as As,A as _s,g as Us}from"./alert-dialog-nxq3-B6t.js";import{D as $n,a as Ue,d as Je,e as et,i as Pn,h as Bs,c as Hs}from"./dialog-gLpw4bfG.js";import{I as Ve}from"./input-BUVWi6ji.js";import{F as ke,M as Ut,d as En}from"./file-type-icon-BZvnDuN0.js";import{T as qs}from"./toolbar-mHxlKpgC.js";import{a as Ks}from"./Package-CKW2xi_w.js";import{u as Ws}from"./use-debounced-value-Bb7tMvOa.js";import{b as Gs,c as Vs,e as Xs,i as Qs,f as Dn,a as Tn,g as Ys,d as Zs}from"./ZoomOut-Mbjnh50O.js";import{S as ae}from"./skeleton-1fz4b835.js";import{T as Js}from"./textarea-CJ9nnedq.js";import{t as el}from"./ChevronDown-C5CvsmcD.js";import{n as tl}from"./ChevronUp-DrDSr-mi.js";import{i as ft}from"./X-BZ_UKD_O.js";import{P as nl,b as sl,a as ll}from"./popover-1iWni6pj.js";import{b as be,T as ye,a as ve}from"./tooltip-MpF93QwW.js";import{i as rl}from"./Check-wimNrbhN.js";import{a as il}from"./Copy01-1_zUjHG9.js";import{n as Xe,i as xt}from"./Globe01-DJ_zs5G_.js";import{i as Fn}from"./Key01-BdmJ-1sf.js";import{n as Mn}from"./LinkExternal01-26v779uD.js";import{l as ol,F as al}from"./index-DKZ2zjKb.js";import{D as Bt,a as Ht,c as qt,d as Fe}from"./dropdown-menu-Bbpx10wk.js";import{i as cl}from"./LayoutLeft-DXtD65nH.js";import{i as dl}from"./ChevronRight-Bno5_0xg.js";import{t as ul}from"./Stars01-aA8DbwLH.js";import{i as In}from"./DotsVertical-SPVqsXfZ.js";import{s as Ln}from"./Trash01-kZy-N3Xo.js";function On(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const l=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${l?`?${l}`:""}`}async function fe(n,e,t){const s=await fetch(n,e);if(s.ok||t?.allow404&&s.status===404)return s;let l="";try{l=(await s.json()).error??""}catch{}throw new Error(l||`HTTP ${s.status}`)}function Kt(n,e){const t=$.c(11),{org:s}=de();let l;t[0]!==s.id||t[1]!==e||t[2]!==n?(l=X.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=l):l=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await fe(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(fl),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let o;return t[8]!==l||t[9]!==i?(o={queryKey:l,placeholderData:wn,queryFn:i},t[8]=l,t[9]=i,t[10]=o):o=t[10],ie(o)}function fl(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function Rn(n,e,t){const s=$.c(15),{org:l}=de();let i;s[0]!==l.id||s[1]!==e||s[2]!==n?(i=X.orgFsStat(l.id,n??"",e),s[0]=l.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]!==l.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fe(pe(l.slug,n??"","stat",{path:e}),void 0,{allow404:!0});return f.status===404?null:(await f.json()).entry},s[6]=l.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 hl(n){const e=$.c(9),{org:t}=de();let s;e[0]!==t.id||e[1]!==n?(s=X.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let l;e[3]!==t.slug||e[4]!==n?(l=async()=>await(await fe(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=l):l=e[5];let i;return e[6]!==s||e[7]!==l?(i={queryKey:s,queryFn:l},e[6]=s,e[7]=l,e[8]=i):i=e[8],ie(i)}function ml(n,e){const t=$.c(9),s=n===void 0?60:n,{org:l}=de();let i;t[0]!==l.id?(i=X.orgFsRecent(l.id),t[0]=l.id,t[1]=i):i=t[1];const o=e?.enabled;let a;t[2]!==s||t[3]!==l.slug?(a=async()=>(await(await fe(`/api/${encodeURIComponent(l.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=l.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 pl(n,e){const t=$.c(11),s=50,{org:l}=de();let i;t[0]!==l.id||t[1]!==n?(i=X.orgFsSearch(l.id,n),t[0]=l.id,t[1]=n,t[2]=i):i=t[2];const o=n.length>0;let a;t[3]!==s||t[4]!==l.slug||t[5]!==n?(a=async()=>(await(await fe(`/api/${encodeURIComponent(l.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=l.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:wn,queryFn:a},t[7]=i,t[8]=o,t[9]=a,t[10]=c):c=t[10],ie(c)}function Do(n){const e=$.c(8),{org:t}=de();let s;e[0]!==t.id?(s=X.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const l=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const a=await fe(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await a.json();return c.map(xl)},e[2]=t.slug,e[3]=i):i=e[3];let o;return e[4]!==s||e[5]!==l||e[6]!==i?(o={queryKey:s,enabled:l,queryFn:i},e[4]=s,e[5]=l,e[6]=i,e[7]=o):o=e[7],ie(o)}function xl(n){return{volume:n.volume,path:n.path}}async function To(n){const e=await fe(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function gl(n,e,t){return(await fe(pe(n,e,"read",{path:t}))).text()}const bl=new Set(["md","mdx","markdown","txt","text"]),yl=25,vl=64*1024,wl=256*1024,jl=4;function kl(n){const e=n.lastIndexOf(".");return e===-1?!1:bl.has(n.slice(e+1).toLowerCase())}async function Fo(n,e,t){const s=t?`${t}/`:"",l=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 fe(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<jl&&a.push({path:m.path,depth:u.depth+1});continue}kl(m.path)&&m.size<=vl&&i.length<yl?i.push(m.path):o.push(l(m.path))}}const c=await Promise.all(i.map(u=>gl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>wl){o.push(l(u));return}f+=m.length,d.push({relPath:l(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 An(){const n=$.c(7),{org:e}=de();let t;n[0]!==e.id?(t=X.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await fe(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let l;return n[4]!==t||n[5]!==s?(l={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=l):l=n[6],ie(l)}function Sl(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t.slug||e[1]!==n?(s=l=>pe(t.slug,n,"read",{path:l}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function tt(){const n=$.c(2),{org:e}=de();let t;return n[0]!==e.slug?(t=(s,l)=>pe(e.slug,s,"read",{path:l}),n[0]=e.slug,n[1]=t):t=n[1],t}function _n(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async l=>(await(await fe(pe(t.slug,n,"file",{path:l.path}),{method:"PUT",headers:{"content-type":l.contentType??"text/html; charset=utf-8"},body:l.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function Nl(n){const e=$.c(18),{org:t}=de(),s=Ze();let l;e[0]!==t||e[1]!==n?(l=async d=>(await(await fe(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]=l):l=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=X.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:X.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:X.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:X.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:X.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=a):a=e[12];let c;return e[13]!==l||e[14]!==i||e[15]!==o||e[16]!==a?(c={mutationFn:l,onMutate:i,onError:o,onSettled:a},e[13]=l,e[14]=i,e[15]=o,e[16]=a,e[17]=c):c=e[17],We(c)}function Lt(n){const e=$.c(26),{org:t}=de(),s=Ze();let l;e[0]!==t||e[1]!==s||e[2]!==n?(l=()=>{s.invalidateQueries({queryKey:X.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:X.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:X.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=l):l=e[3];const i=l;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 fe(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 fe(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 fe(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 gt=S.createContext(null);gt.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"},Wt=10,Te=S.useLayoutEffect,tn=zs.useId,zl=typeof tn=="function"?tn:()=>null;let Cl=0;function Gt(n=null){const e=zl(),t=S.useRef(n||e||null);return t.current===null&&(t.current=""+Cl++),n??t.current}function Un({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:l,forwardedRef:i,id:o,maxSize:a,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=S.useContext(gt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:C,isPanelCollapsed:k,reevaluatePanelConstraints:w,registerPanel:B,resizePanel:R,unregisterPanel:_}=b,v=Gt(o),M=S.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:l,maxSize:a,minSize:c},id:v,idIsFromProps:o!==void 0,order:h});S.useRef({didLogMissingDefaultSizeWarning:!1}),Te(()=>{const{callbacks:U,constraints:O}=M.current,H={...O};M.current.id=v,M.current.idIsFromProps=o!==void 0,M.current.order=h,U.onCollapse=d,U.onExpand=f,U.onResize=u,O.collapsedSize=t,O.collapsible=s,O.defaultSize=l,O.maxSize=a,O.minSize=c,(H.collapsedSize!==O.collapsedSize||H.collapsible!==O.collapsible||H.maxSize!==O.maxSize||H.minSize!==O.minSize)&&w(M.current,H)}),Te(()=>{const U=M.current;return B(U),()=>{_(U)}},[h,v,B,_]),S.useImperativeHandle(i,()=>({collapse:()=>{x(M.current)},expand:U=>{y(M.current,U)},getId(){return v},getSize(){return j(M.current)},isCollapsed(){return k(M.current)},isExpanded(){return!k(M.current)},resize:U=>{R(M.current,U)}}),[x,y,j,k,v,R]);const Z=N(M.current,l);return S.createElement(p,{...g,children:n,className:e,id:v,style:{...Z,...m},[se.groupId]:C,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+Z.flexGrow).toFixed(1)})}const Bn=S.forwardRef((n,e)=>S.createElement(Un,{...n,forwardedRef:e}));Un.displayName="Panel";Bn.displayName="forwardRef(Panel)";let Ot=null,ct=-1,ze=null;function $l(n,e){if(e){const t=(e&Gn)!==0,s=(e&Vn)!==0,l=(e&Xn)!==0,i=(e&Qn)!==0;if(t)return l?"se-resize":i?"ne-resize":"e-resize";if(s)return l?"sw-resize":i?"nw-resize":"w-resize";if(l)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 Pl(){ze!==null&&(document.head.removeChild(ze),Ot=null,ze=null,ct=-1)}function Et(n,e){var t,s;const l=$l(n,e);if(Ot!==l){if(Ot=l,ze===null&&(ze=document.createElement("style"),document.head.appendChild(ze)),ct>=0){var i;(i=ze.sheet)===null||i===void 0||i.removeRule(ct)}ct=(t=(s=ze.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${l} !important;}`))!==null&&t!==void 0?t:-1}}function Hn(n){return n.type==="keydown"}function qn(n){return n.type.startsWith("pointer")}function Kn(n){return n.type.startsWith("mouse")}function bt(n){if(qn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(Kn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function El(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Dl(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 Tl(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:ln(n),b:ln(e)};let s;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),s=n;G(s,"Stacking order can only be calculated for elements with a common ancestor");const l={a:sn(nn(t.a)),b:sn(nn(t.b))};if(l.a===l.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(l.a-l.b)}const Fl=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Ml(n){var e;const t=getComputedStyle((e=Wn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Il(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Ml(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"||Fl.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function nn(n){let e=n.length;for(;e--;){const t=n[e];if(G(t,"Missing node"),Il(t))return t}return null}function sn(n){return n&&Number(getComputedStyle(n).zIndex)||0}function ln(n){const e=[];for(;n;)e.push(n),n=Wn(n);return e}function Wn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Gn=1,Vn=2,Xn=4,Qn=8,Ll=El()==="coarse";let xe=[],_e=!1,De=new Map,yt=new Map;const Qe=new Set;function Ol(n,e,t,s,l){var i;const{ownerDocument:o}=e,a={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:l},c=(i=De.get(o))!==null&&i!==void 0?i:0;return De.set(o,c+1),Qe.add(a),ht(),function(){var f;yt.delete(n),Qe.delete(a);const u=(f=De.get(o))!==null&&f!==void 0?f:1;if(De.set(o,u-1),ht(),u===1&&De.delete(o),xe.includes(a)){const h=xe.indexOf(a);h>=0&&xe.splice(h,1),Xt(),l("up",!0,null)}}}function Rl(n){const{target:e}=n,{x:t,y:s}=bt(n);_e=!0,Vt({target:e,x:t,y:s}),ht(),xe.length>0&&(mt("down",n),n.preventDefault(),Yn(e)||n.stopImmediatePropagation())}function Dt(n){const{x:e,y:t}=bt(n);if(_e&&n.buttons===0&&(_e=!1,mt("up",n)),!_e){const{target:s}=n;Vt({target:s,x:e,y:t})}mt("move",n),Xt(),xe.length>0&&n.preventDefault()}function Tt(n){const{target:e}=n,{x:t,y:s}=bt(n);yt.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Yn(e)||n.stopImmediatePropagation()),mt("up",n),Vt({target:e,x:t,y:s}),Xt(),ht()}function Yn(n){let e=n;for(;e;){if(e.hasAttribute(se.resizeHandle))return!0;e=e.parentElement}return!1}function Vt({target:n,x:e,y:t}){xe.splice(0);let s=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(s=n),Qe.forEach(l=>{const{element:i,hitAreaMargins:o}=l,a=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=a,h=Ll?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)&&Tl(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(Dl(p.getBoundingClientRect(),a)){g=!0;break}p=p.parentElement}if(g)return}xe.push(l)}})}function Ft(n,e){yt.set(n,e)}function Xt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:l}=s;l==="horizontal"?n=!0:e=!0});let t=0;yt.forEach(s=>{t|=s}),n&&e?Et("intersection",t):n?Et("horizontal",t):e?Et("vertical",t):Pl()}let Mt=new AbortController;function ht(){Mt.abort(),Mt=new AbortController;const n={capture:!0,signal:Mt.signal};Qe.size&&(_e?(xe.length>0&&De.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",Tt,n),s.addEventListener("pointerleave",Dt,n),s.addEventListener("pointermove",Dt,n))}),window.addEventListener("pointerup",Tt,n),window.addEventListener("pointercancel",Tt,n)):De.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Rl,n),s.addEventListener("pointermove",Dt,n))}))}function mt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,l=xe.includes(t);s(n,l,e)})}function Al(){const[n,e]=S.useState(0);return S.useCallback(()=>e(t=>t+1),[])}function G(n,e){if(!n)throw console.error(e),Error(e)}function Me(n,e,t=Wt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function we(n,e,t=Wt){return Me(n,e,t)===0}function me(n,e,t){return Me(n,e,t)===0}function _l(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const l=n[s],i=e[s];if(!me(l,i,t))return!1}return!0}function Ae({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];G(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:l=0,collapsible:i,maxSize:o=100,minSize:a=0}=s;if(Me(t,a)<0)if(i){const c=(l+a)/2;Me(t,c)<0?t=l:t=a}else t=a;return t=Math.min(o,t),t=parseFloat(t.toFixed(Wt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:l,trigger:i}){if(me(n,0))return e;const o=[...e],[a,c]=s;G(a!=null,"Invalid first pivot index"),G(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:a,h=t[u];G(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(G(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];G(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(G(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];G(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];G(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(_l(l,o))return l;{const u=n<0?c:a,h=e[u];G(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];G(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:l}function Ul({layout:n,panelsArray:e,pivotIndices:t}){let s=0,l=100,i=0,o=0;const a=t[0];G(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,l=p):(i+=g,o+=p)});const c=Math.min(l,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 Zn(n,e,t=document){const l=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return l??null}function Jn(n,e,t){const s=Zn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function es(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 vt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function Bl(n,e,t,s=document){var l,i,o,a;const c=vt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(l=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&l!==void 0?l: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 Hl({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:l,panelGroupElement:i,setLayout:o}){S.useRef({didWarnAboutMissingResizeHandle:!1}),Te(()=>{if(!i)return;const a=Ye(t,i);for(let c=0;c<l.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=Ul({layout:s,panelsArray:l,pivotIndices:[c,c+1]}),h=a[c];if(h!=null){const m=l[c];G(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,l,i]),S.useEffect(()=>{if(!i)return;const a=e.current;G(a,"Eager values not found");const{panelDataArray:c}=a,d=es(t,i);G(d!=null,`No group found for id "${t}"`);const f=Ye(t,i);G(f,`No resize handles found for group id "${t}"`);const u=f.map(h=>{const m=h.getAttribute(se.resizeHandleId);G(m,"Resize handle element has no handle id attribute");const[p,g]=Bl(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];G(j,`No panel data found for index ${y}`);const N=s[y],{collapsedSize:C=0,collapsible:k,minSize:w=0}=j.constraints;if(N!=null&&k){const B=He({delta:me(N,C)?w-C:C-N,initialLayout:s,panelConstraints:c.map(R=>R.constraints),pivotIndices:Jn(t,m,i),prevLayout:s,trigger:"keyboard"});s!==B&&o(B)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,l,o])}function rn(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 ts(n,e){const t=n==="horizontal",{x:s,y:l}=bt(e);return t?s:l}function ql(n,e,t,s,l){const i=t==="horizontal",o=vt(e,l);G(o,`No resize handle element found for id "${e}"`);const a=o.getAttribute(se.groupId);G(a,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=ts(t,n),f=es(a,l);G(f,`No group element found for id "${a}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function Kl(n,e,t,s,l,i){if(Hn(n)){const o=t==="horizontal";let a=0;n.shiftKey?a=100:l!=null?a=l: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:ql(n,e,t,s,i)}function Wl({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,l=100;for(let i=0;i<n.length;i++){const o=t[i];G(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;a!=null&&(s++,e[i]=a,l-=a)}for(let i=0;i<n.length;i++){const o=t[i];G(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;if(a!=null)continue;const c=n.length-s,d=l/c;s++,e[i]=d,l-=d}return e}function Ie(n,e,t){e.forEach((s,l)=>{const i=n[l];G(i,`Panel data not found for index ${l}`);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||we(u,d))&&!we(s,d)&&m(),h&&(u==null||!we(u,d))&&we(s,d)&&h())}})}function at(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 Gl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:l,precision:i=3}){const o=t[l];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 Vl(n,e=10){let t=null;return(...l)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...l)},e)}}function on(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 ns(n){return`react-resizable-panels:${n}`}function ss(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:l,order:i}=e;return l?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function ls(n,e){try{const t=ns(n),s=e.getItem(t);if(s){const l=JSON.parse(s);if(typeof l=="object"&&l!=null)return l}}catch{}return null}function Xl(n,e,t){var s,l;const i=(s=ls(n,t))!==null&&s!==void 0?s:{},o=ss(e);return(l=i[o])!==null&&l!==void 0?l:null}function Ql(n,e,t,s,l){var i;const o=ns(n),a=ss(e),c=(i=ls(n,l))!==null&&i!==void 0?i:{};c[a]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{l.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function an({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];G(o!=null,`No layout data found for index ${i}`);const a=100/s*o;t[i]=a}let l=0;for(let i=0;i<e.length;i++){const o=t[i];G(o!=null,`No layout data found for index ${i}`);const a=Ae({panelConstraints:e,panelIndex:i,size:o});o!=a&&(l+=o-a,t[i]=a)}if(!me(l,0))for(let i=0;i<e.length;i++){const o=t[i];G(o!=null,`No layout data found for index ${i}`);const a=o+l,c=Ae({panelConstraints:e,panelIndex:i,size:a});if(o!==c&&(l-=c-o,t[i]=c,me(l,0)))break}return t}const Yl=100,qe={getItem:n=>(on(qe),qe.getItem(n)),setItem:(n,e)=>{on(qe),qe.setItem(n,e)}},cn={};function rs({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:l,id:i=null,onLayout:o=null,keyboardResizeBy:a=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Gt(i),m=S.useRef(null),[p,g]=S.useState(null),[b,x]=S.useState([]),y=Al(),j=S.useRef({}),N=S.useRef(new Map),C=S.useRef(0),k=S.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:a,onLayout:o,storage:c}),w=S.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});S.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),S.useImperativeHandle(l,()=>({getId:()=>k.current.id,getLayout:()=>{const{layout:z}=w.current;return z},setLayout:z=>{const{onLayout:F}=k.current,{layout:I,panelDataArray:L}=w.current,D=an({layout:z,panelConstraints:L.map(A=>A.constraints)});rn(I,D)||(x(D),w.current.layout=D,F&&F(D),Ie(L,D,j.current))}}),[]),Te(()=>{k.current.autoSaveId=n,k.current.direction=s,k.current.dragState=p,k.current.id=h,k.current.onLayout=o,k.current.storage=c}),Hl({committedValuesRef:k,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),S.useEffect(()=>{const{panelDataArray:z}=w.current;if(n){if(b.length===0||b.length!==z.length)return;let F=cn[n];F==null&&(F=Vl(Ql,Yl),cn[n]=F);const I=[...z],L=new Map(N.current);F(n,I,L,b,c)}},[n,b,c]),S.useEffect(()=>{});const B=S.useCallback(z=>{const{onLayout:F}=k.current,{layout:I,panelDataArray:L}=w.current;if(z.constraints.collapsible){const D=L.map(he=>he.constraints),{collapsedSize:A=0,panelSize:Q,pivotIndices:te}=Ee(L,z,I);if(G(Q!=null,`Panel size not found for panel "${z.id}"`),!we(Q,A)){N.current.set(z.id,Q);const P=Oe(L,z)===L.length-1?Q-A:A-Q,V=He({delta:P,initialLayout:I,panelConstraints:D,pivotIndices:te,prevLayout:I,trigger:"imperative-api"});at(I,V)||(x(V),w.current.layout=V,F&&F(V),Ie(L,V,j.current))}}},[]),R=S.useCallback((z,F)=>{const{onLayout:I}=k.current,{layout:L,panelDataArray:D}=w.current;if(z.constraints.collapsible){const A=D.map(ne=>ne.constraints),{collapsedSize:Q=0,panelSize:te=0,minSize:he=0,pivotIndices:P}=Ee(D,z,L),V=F??he;if(we(te,Q)){const ne=N.current.get(z.id),ge=ne!=null&&ne>=V?ne:V,$e=Oe(D,z)===D.length-1?te-ge:ge-te,oe=He({delta:$e,initialLayout:L,panelConstraints:A,pivotIndices:P,prevLayout:L,trigger:"imperative-api"});at(L,oe)||(x(oe),w.current.layout=oe,I&&I(oe),Ie(D,oe,j.current))}}},[]),_=S.useCallback(z=>{const{layout:F,panelDataArray:I}=w.current,{panelSize:L}=Ee(I,z,F);return G(L!=null,`Panel size not found for panel "${z.id}"`),L},[]),v=S.useCallback((z,F)=>{const{panelDataArray:I}=w.current,L=Oe(I,z);return Gl({defaultSize:F,dragState:p,layout:b,panelData:I,panelIndex:L})},[p,b]),M=S.useCallback(z=>{const{layout:F,panelDataArray:I}=w.current,{collapsedSize:L=0,collapsible:D,panelSize:A}=Ee(I,z,F);return G(A!=null,`Panel size not found for panel "${z.id}"`),D===!0&&we(A,L)},[]),Z=S.useCallback(z=>{const{layout:F,panelDataArray:I}=w.current,{collapsedSize:L=0,collapsible:D,panelSize:A}=Ee(I,z,F);return G(A!=null,`Panel size not found for panel "${z.id}"`),!D||Me(A,L)>0},[]),U=S.useCallback(z=>{const{panelDataArray:F}=w.current;F.push(z),F.sort((I,L)=>{const D=I.order,A=L.order;return D==null&&A==null?0:D==null?-1:A==null?1:D-A}),w.current.panelDataArrayChanged=!0,y()},[y]);Te(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:z,onLayout:F,storage:I}=k.current,{layout:L,panelDataArray:D}=w.current;let A=null;if(z){const te=Xl(z,D,I);te&&(N.current=new Map(Object.entries(te.expandToSizes)),A=te.layout)}A==null&&(A=Wl({panelDataArray:D}));const Q=an({layout:A,panelConstraints:D.map(te=>te.constraints)});rn(L,Q)||(x(Q),w.current.layout=Q,F&&F(Q),Ie(D,Q,j.current))}}),Te(()=>{const z=w.current;return()=>{z.layout=[]}},[]);const O=S.useCallback(z=>{let F=!1;const I=m.current;return I&&window.getComputedStyle(I,null).getPropertyValue("direction")==="rtl"&&(F=!0),function(D){D.preventDefault();const A=m.current;if(!A)return()=>null;const{direction:Q,dragState:te,id:he,keyboardResizeBy:P,onLayout:V}=k.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Se}=te??{},$e=Jn(he,z,A);let oe=Kl(D,z,Q,te,P,A);const rt=Q==="horizontal";rt&&F&&(oe=-oe);const Ct=ge.map($t=>$t.constraints),Pe=He({delta:oe,initialLayout:Se??ne,panelConstraints:Ct,pivotIndices:$e,prevLayout:ne,trigger:Hn(D)?"keyboard":"mouse-or-touch"}),it=!at(ne,Pe);(qn(D)||Kn(D))&&C.current!=oe&&(C.current=oe,!it&&oe!==0?rt?Ft(z,oe<0?Gn:Vn):Ft(z,oe<0?Xn:Qn):Ft(z,0)),it&&(x(Pe),w.current.layout=Pe,V&&V(Pe),Ie(ge,Pe,j.current))}},[]),H=S.useCallback((z,F)=>{const{onLayout:I}=k.current,{layout:L,panelDataArray:D}=w.current,A=D.map(ne=>ne.constraints),{panelSize:Q,pivotIndices:te}=Ee(D,z,L);G(Q!=null,`Panel size not found for panel "${z.id}"`);const P=Oe(D,z)===D.length-1?Q-F:F-Q,V=He({delta:P,initialLayout:L,panelConstraints:A,pivotIndices:te,prevLayout:L,trigger:"imperative-api"});at(L,V)||(x(V),w.current.layout=V,I&&I(V),Ie(D,V,j.current))},[]),W=S.useCallback((z,F)=>{const{layout:I,panelDataArray:L}=w.current,{collapsedSize:D=0,collapsible:A}=F,{collapsedSize:Q=0,collapsible:te,maxSize:he=100,minSize:P=0}=z.constraints,{panelSize:V}=Ee(L,z,I);V!=null&&(A&&te&&we(V,D)?we(D,Q)||H(z,Q):V<P?H(z,P):V>he&&H(z,he))},[H]),q=S.useCallback((z,F)=>{const{direction:I}=k.current,{layout:L}=w.current;if(!m.current)return;const D=vt(z,m.current);G(D,`Drag handle element not found for id "${z}"`);const A=ts(I,F);g({dragHandleId:z,dragHandleRect:D.getBoundingClientRect(),initialCursorPosition:A,initialLayout:L})},[]),ee=S.useCallback(()=>{g(null)},[]),Y=S.useCallback(z=>{const{panelDataArray:F}=w.current,I=Oe(F,z);I>=0&&(F.splice(I,1),delete j.current[z.id],w.current.panelDataArrayChanged=!0,y())},[y]),T=S.useMemo(()=>({collapsePanel:B,direction:s,dragState:p,expandPanel:R,getPanelSize:_,getPanelStyle:v,groupId:h,isPanelCollapsed:M,isPanelExpanded:Z,reevaluatePanelConstraints:W,registerPanel:U,registerResizeHandle:O,resizePanel:H,startDragging:q,stopDragging:ee,unregisterPanel:Y,panelGroupElement:m.current}),[B,p,s,R,_,v,h,M,Z,W,U,O,H,q,ee,Y]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return S.createElement(gt.Provider,{value:T},S.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const is=S.forwardRef((n,e)=>S.createElement(rs,{...n,forwardedRef:e}));rs.displayName="PanelGroup";is.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function Ee(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 Zl({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){S.useEffect(()=>{if(n||t==null||s==null)return;const l=vt(e,s);if(l==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=l.getAttribute(se.groupId);G(a,`No group element found for id "${a}"`);const c=Ye(a,s),d=Zn(a,e,s);G(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 l.addEventListener("keydown",i),()=>{l.removeEventListener("keydown",i)}},[s,n,e,t])}function os({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:l,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=S.useRef(null),y=S.useRef({onClick:o,onDragging:a,onPointerDown:d,onPointerUp:f});S.useEffect(()=>{y.current.onClick=o,y.current.onDragging=a,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=S.useContext(gt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:C,registerResizeHandle:k,startDragging:w,stopDragging:B,panelGroupElement:R}=j,_=Gt(l),[v,M]=S.useState("inactive"),[Z,U]=S.useState(!1),[O,H]=S.useState(null),W=S.useRef({state:v});Te(()=>{W.current.state=v}),S.useEffect(()=>{if(t)H(null);else{const T=k(_);H(()=>T)}},[t,_,k]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;S.useEffect(()=>{if(t||O==null)return;const T=x.current;G(T,"Element ref not attached");let K=!1;return Ol(_,T,N,{coarse:q,fine:ee},(F,I,L)=>{if(!I){M("inactive");return}switch(F){case"down":{M("drag"),K=!1,G(L,'Expected event to be defined for "down" action'),w(_,L);const{onDragging:D,onPointerDown:A}=y.current;D?.(!0),A?.();break}case"move":{const{state:D}=W.current;K=!0,D!=="drag"&&M("hover"),G(L,'Expected event to be defined for "move" action'),O(L);break}case"up":{M("hover"),B();const{onClick:D,onDragging:A,onPointerUp:Q}=y.current;A?.(!1),Q?.(),K||D?.();break}}})},[q,N,t,ee,k,_,O,w,B]),Zl({disabled:t,handleId:_,resizeHandler:O,panelGroupElement:R});const Y={touchAction:"none",userSelect:"none"};return S.createElement(m,{...p,children:n,className:e,id:l,onBlur:()=>{U(!1),i?.()},onFocus:()=>{U(!0),c?.()},ref:x,role:"separator",style:{...Y,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:C,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":Z?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:_,[se.resizeHandleState]:v})}os.displayName="PanelResizeHandle";function Jl(n){const e=$.c(10);let t,s,l;e[0]!==n?({className:t,ref:l,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=l):(t=e[1],s=e[2],l=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]!==l||e[8]!==i?(o=r.jsx(is,{ref:l,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=l,e[8]=i,e[9]=o):o=e[9],o}function dn(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=r.jsx(Bn,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function er(n){const e=$.c(12);let t,s,l;e[0]!==n?({withHandle:l,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=l):(t=e[1],s=e[2],l=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]!==l?(o=l&&r.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:r.jsx(Gs,{className:"size-2.5"})}),e[6]=l,e[7]=o):o=e[7];let a;return e[8]!==s||e[9]!==i||e[10]!==o?(a=r.jsx(os,{"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 tr(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 nr(n){if(tr(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function sr(n){try{return decodeURIComponent(n)}catch{return n}}function lr(n){return nr(n),encodeURIComponent(n)}function rr(n){return`.deco/blocks/${lr(n)}.json`}function Mo(n){return`/${rr(n)}`}const Io=1e4,ir=3;function Rt(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function wt(n){return n.startsWith("/")?n.slice(1):n}function Lo(n){const e=wt(n);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}function pt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function or(n){const e=pt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function Oo(n,e){const t=e.replace(/^\/+|\/+$/g,"");return pt(t?`${n==="/"?"":n}/${t}`:n)}function Ro(n,e){return e==="directory"?n:or(n)}function Ao(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 ar(n){const e=wt(n);return e?e.split("/").filter(Boolean).length:0}function _o(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function Uo(n,e){return ar(n)>=ir&&!e.has(n)}function Bo(n,e,t=[]){const s=wt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const l=`${s}/`;return e.some(i=>i.startsWith(l))||t.some(i=>i.startsWith(l))}function Ho(n){const e=wt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return sr(s)}function cr(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 qo(n){const e=Rt(n).split("/").filter(Boolean),t=["/"];let s="";for(const l of e.slice(0,-1))s+=`/${l}`,t.push(s);return t}function Ko(n,e=[]){const t={children:[]},s=i=>{const a=Rt(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=Rt(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(pt(i));const l=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&&l(o.children)};return l(t.children),t.children}function dr(n,e,t=0){const s=[];for(const l of n)l.name!==".gitkeep"&&(s.push({node:l,depth:t}),l.kind==="directory"&&l.children.length>0&&e.has(l.path)&&s.push(...dr(l.children,e,t+1)));return s}function Wo(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 ur(n){const e=$.c(11),{value:t,filename:s}=n,[l]=Cs(),i=l.theme==="dark"||l.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let o;e[0]!==s?(o=cr(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=r.jsx("div",{className:"flex h-full w-full items-center justify-center",children:r.jsx($s,{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=r.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 as(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const fr=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),hr=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),un=2*1024*1024;function mr(n,e){const t=n.split(".").pop()?.toLowerCase()??"";return fr.has(t)?"image":t==="pdf"?"pdf":t==="html"||t==="htm"?"html":t==="md"||t==="markdown"?e<=un?"markdown":"download":hr.has(t)&&e<=un?"text":"download"}function cs(){const n=$.c(2);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.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=r.jsx("div",{className:"flex h-full w-full items-center justify-center",children:r.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,r.jsxs("div",{className:"flex flex-col gap-1.5",children:[r.jsx(ae,{className:"h-3 w-full"}),r.jsx(ae,{className:"h-3 w-5/6"}),r.jsx(ae,{className:"h-3 w-2/3"})]})]})}),n[1]=t):t=n[1],t}function ds(n){const e=$.c(20),{file:t,note:s}=n;let l;e[0]!==t.filename?(l=r.jsx(ke,{filename:t.filename,className:"h-12 w-10"}),e[0]=t.filename,e[1]=l):l=e[1];let i;e[2]!==t.filename?(i=r.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=as(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=r.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=r.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=r.jsx(Xe,{size:14}),e[12]=f):f=e[12];let u;e[13]!==t.downloadUrl||e[14]!==t.filename?(u=r.jsx(J,{asChild:!0,variant:"outline",size:"sm",children:r.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]!==l||e[17]!==d||e[18]!==u?(h=r.jsx("div",{className:"flex h-full w-full items-center justify-center",children:r.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[l,d,u]})}),e[16]=l,e[17]=d,e[18]=u,e[19]=h):h=e[19],h}function fn(n){const e=$.c(16),{file:t,markdown:s}=n;let l;e[0]!==t.downloadUrl?(l=X.fileText(t.downloadUrl),e[0]=t.downloadUrl,e[1]=l):l=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]!==l||e[5]!==i?(o={queryKey:l,queryFn:i,staleTime:6e4,retry:!1},e[4]=l,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=r.jsx(cs,{}),e[7]=u):u=e[7],u}if(d||a===void 0){let u;return e[8]!==t?(u=r.jsx(ds,{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=r.jsx("div",{className:"h-full overflow-y-auto",children:r.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:r.jsx(Ut,{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=r.jsx(ur,{value:a,filename:t.filename}),e[13]=a,e[14]=t.filename,e[15]=f):f=e[15],f}function us(n){const e=$.c(15),{file:t}=n;switch(mr(t.filename,t.size)){case"image":{let l;return e[0]!==t.downloadUrl||e[1]!==t.filename?(l=r.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:r.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]=l):l=e[2],l}case"pdf":{let l;return e[3]!==t.downloadUrl||e[4]!==t.filename?(l=r.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]=l):l=e[5],l}case"html":{let l;return e[6]!==t.downloadUrl||e[7]!==t.filename?(l=r.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]=l):l=e[8],l}case"markdown":{let l;return e[9]!==t?(l=r.jsx(fn,{file:t,markdown:!0}),e[9]=t,e[10]=l):l=e[10],l}case"text":{let l;return e[11]!==t?(l=r.jsx(fn,{file:t,markdown:!1}),e[11]=t,e[12]=l):l=e[12],l}default:{let l;return e[13]!==t?(l=r.jsx(ds,{file:t}),e[13]=t,e[14]=l):l=e[14],l}}}function pr(n){const e=$.c(40),{readUrl:t,editor:s,downloadName:l,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&&r.jsxs(be,{children:[r.jsx(ye,{asChild:!0,children:r.jsx(J,{variant:s.railOpen?"secondary":"ghost",size:"icon","aria-label":s.railOpen?"Hide slide list":"Show slide list",onClick:()=>s.setRailOpen(!s.railOpen),children:r.jsx(cl,{size:14})})}),r.jsx(ve,{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=r.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=r.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&&r.jsxs(be,{children:[r.jsx(ye,{asChild:!0,children:r.jsxs(J,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:s.reload,children:[r.jsx(jn,{size:12}),"Agent updated — reload"]})}),r.jsx(ve,{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&&r.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&&r.jsxs(be,{children:[r.jsx(ye,{asChild:!0,children:r.jsx(J,{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:r.jsx(Vs,{size:14})})}),r.jsx(ve,{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]!==l||e[21]!==s.deckDetected?(g=s.deckDetected?r.jsxs(Bt,{children:[r.jsx(Ht,{asChild:!0,children:r.jsx(J,{variant:"ghost",size:"icon","aria-label":"Download",children:r.jsx(Xe,{size:14})})}),r.jsxs(qt,{align:"end",children:[r.jsxs(Fe,{onClick:()=>window.open(`${a}#print`,"_blank","noopener"),children:[r.jsx(Xs,{size:14}),"Export as PDF"]}),r.jsx(Fe,{asChild:!0,children:r.jsxs("a",{href:a,download:l,children:[r.jsx(Qs,{size:14}),"Download HTML"]})})]})]}):r.jsxs(be,{children:[r.jsx(ye,{asChild:!0,children:r.jsx(J,{variant:"ghost",size:"icon","aria-label":"Download",asChild:!0,children:r.jsx("a",{href:a,download:l,children:r.jsx(Xe,{size:14})})})}),r.jsx(ve,{side:"bottom",children:"Download"})]}),e[19]=a,e[20]=l,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=r.jsx(Mn,{size:14}),e[25]=x):x=e[25];let y;e[26]!==b?(y=r.jsx(ye,{asChild:!0,children:r.jsx(J,{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=r.jsx(ve,{side:"bottom",children:"Open in new tab"}),e[28]=j):j=e[28];let N;e[29]!==y?(N=r.jsxs(be,{children:[y,j]}),e[29]=y,e[30]=N):N=e[30];let C;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?(C=r.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]=C):C=e[39],C}const Re=1;function xr(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 Ne extends Error{constructor(e,t){super(e),this.code=t,this.name="DeckOpError"}code}function fs(n){return[...n.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function gr(n){const t=new DOMParser().parseFromString(n,"text/html").querySelector("deck-viewer");return t?fs(t).length:null}function br(n,e){const t=new DOMParser().parseFromString(n,"text/html"),s=t.querySelector("deck-viewer");if(!s)throw new Ne("no <deck-viewer> element in source","no-viewer");const l=fs(s),i=e.kind==="move"?e.from:e.at,o=l[i];if(!o)throw new Ne(`slide index ${i} out of range (${l.length})`,"stale-index");switch(e.kind){case"remove":{if(l.length<=1)throw new Ne("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>=l.length)throw new Ne(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const c=e.to<e.from?l[e.to]:l[e.to].nextSibling;s.insertBefore(o,c)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new Ne(`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 Ne("replace html has no root element","bad-op");o.replaceWith(t.importNode(d,!0));break}default:throw new Ne(`unknown op kind: ${e.kind}`,"bad-op")}return`${n.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
|
|
4
4
|
`:""}${t.documentElement.outerHTML}
|