decocms 4.167.4 → 4.167.5
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-BXOs8pgi.js → AlertCircle-DdtdV7M4.js} +1 -1
- package/dist/client/assets/{AreaChart-C8CciM_k.js → AreaChart-D7FaG8Lf.js} +1 -1
- package/dist/client/assets/{ArrowUp-BFGzDO5k.js → ArrowUp-CpEPYAOf.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-h69wSa4W.js → ArrowUpRight-CHW6cpx0.js} +1 -1
- package/dist/client/assets/{Check-CKtI4hGn.js → Check-BwHliFRj.js} +1 -1
- package/dist/client/assets/{CheckCircle-CP9SNP9d.js → CheckCircle-CTIPijUa.js} +1 -1
- package/dist/client/assets/{ChevronDown-DfcP5Y1G.js → ChevronDown-CKkO8sAW.js} +1 -1
- package/dist/client/assets/{ChevronRight-BIlAcWT5.js → ChevronRight-B8f4wyDl.js} +1 -1
- package/dist/client/assets/{ChevronUp-SkDgfV9P.js → ChevronUp-C1afs1xa.js} +1 -1
- package/dist/client/assets/{Copy01-CjgXfC24.js → Copy01-BlkL52M8.js} +1 -1
- package/dist/client/assets/{CpuChip01-t2Y6TVWu.js → CpuChip01-Cs3gfrhP.js} +1 -1
- package/dist/client/assets/{DotsVertical-DTkYQ2kM.js → DotsVertical-BFrinGvO.js} +1 -1
- package/dist/client/assets/{Eye-D7uVxsd6.js → Eye-CQsjSohp.js} +1 -1
- package/dist/client/assets/{FilterLines-FPJrIJmP.js → FilterLines-oPoBPuqv.js} +1 -1
- package/dist/client/assets/{HardDrive-DLAbk7yi.js → HardDrive-CpV48xOn.js} +1 -1
- package/dist/client/assets/{Key01-BNEdMwqa.js → Key01-CIup5BVm.js} +1 -1
- package/dist/client/assets/{LayoutLeft-pwNqM9Bq.js → LayoutLeft-DrcKo4sm.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CUFmEJ-r.js → LinkExternal01-CgpMIzO0.js} +1 -1
- package/dist/client/assets/{LogOut01-CL5erPho.js → LogOut01-uhMfgP0K.js} +1 -1
- package/dist/client/assets/{Monitor01-BTT_gkH0.js → Monitor01-BT8WHZmo.js} +1 -1
- package/dist/client/assets/{Palette-D4hJdFvA.js → Palette-CpgDl594.js} +1 -1
- package/dist/client/assets/{Play-BPaNNVsN.js → Play-BBCpB_Tz.js} +1 -1
- package/dist/client/assets/{Plus-DigHRvrB.js → Plus-DO9NbOAK.js} +1 -1
- package/dist/client/assets/{SearchLg-CcVjy7cv.js → SearchLg-Df6klb6Y.js} +1 -1
- package/dist/client/assets/{SearchMd-UJHWms5O.js → SearchMd-GYne36B-.js} +1 -1
- package/dist/client/assets/{Settings02-C2z8V4b1.js → Settings02-DerOgVc2.js} +1 -1
- package/dist/client/assets/{Shield01-CE6E4vWT.js → Shield01-gMQ1chGf.js} +1 -1
- package/dist/client/assets/{Star01-Cw9ulDl8.js → Star01-CH5MEDQn.js} +1 -1
- package/dist/client/assets/{Stars01-DqE2p9rj.js → Stars01-DAx8aZEr.js} +1 -1
- package/dist/client/assets/{Stars02-DKPhD_jS.js → Stars02-BG4AWaaX.js} +1 -1
- package/dist/client/assets/{Sun-quy8cVor.js → Sun-DPokUB7F.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-B7BlklUe.js → SwitchHorizontal01-B4ZgCyE5.js} +1 -1
- package/dist/client/assets/{Tool01-d6PLxuqZ.js → Tool01-Dn1kpGdl.js} +1 -1
- package/dist/client/assets/{Tool02-CG-MJEAZ.js → Tool02-DZ2vEkP4.js} +1 -1
- package/dist/client/assets/{Trash01-BEfNCj7H.js → Trash01-BOMqKZ1K.js} +1 -1
- package/dist/client/assets/{TrendUp01-CTjYh8Ln.js → TrendUp01-DwZeXU3a.js} +1 -1
- package/dist/client/assets/{Upload01-CSguqWGj.js → Upload01-S_KetqzT.js} +1 -1
- package/dist/client/assets/{User01-CN3QhMor.js → User01-HXIFsqtn.js} +1 -1
- package/dist/client/assets/{Users01-ALInePB-.js → Users01-ByuTyOLr.js} +1 -1
- package/dist/client/assets/{Users03-DBjTudH5.js → Users03-CI91FsuH.js} +1 -1
- package/dist/client/assets/{X-DvW6lnRi.js → X-B6K21IFp.js} +1 -1
- package/dist/client/assets/{XCircle-Fr7R0JyH.js → XCircle-Df3ZOY6R.js} +1 -1
- package/dist/client/assets/{XClose-yYL9HV11.js → XClose-DBug4o8k.js} +1 -1
- package/dist/client/assets/{Zap-B2AmO5T-.js → Zap-C9gRaG5K.js} +1 -1
- package/dist/client/assets/{ZapSquare-DHGjnuEa.js → ZapSquare-CPOIzhEC.js} +1 -1
- package/dist/client/assets/{access-gate-8z-Zjc69.js → access-gate-CScD5WwV.js} +1 -1
- package/dist/client/assets/{add-section-modal-DsiOPGLK.js → add-section-modal---WRWqCq.js} +1 -1
- package/dist/client/assets/{agent-icon-D0v0CAMQ.js → agent-icon-Dcc64Amv.js} +1 -1
- package/dist/client/assets/{agents-list-DYxy5a5k.js → agents-list-Cc9aJCuF.js} +1 -1
- package/dist/client/assets/{ai-providers-DMeor9A-.js → ai-providers-BSRRBbsG.js} +1 -1
- package/dist/client/assets/{alert-6lmsmlPy.js → alert-Bep9Lxpp.js} +1 -1
- package/dist/client/assets/{alert-dialog-DctPzbrJ.js → alert-dialog-tPwVc9uJ.js} +1 -1
- package/dist/client/assets/{app-editor-BSi2b5c2.js → app-editor-B6Hjw_Pg.js} +1 -1
- package/dist/client/assets/{auth-CVt7QHVR.js → auth-Q0kADPVB.js} +1 -1
- package/dist/client/assets/{auth-catchall-BBAoqWD1.js → auth-catchall-BGhPLdgj.js} +1 -1
- package/dist/client/assets/{auth-entry-BGQZOuqe.js → auth-entry-7vb620Uc.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CjrJN_23.js → auth-split-layout-_MAsIBb7.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DiCc1vu0.js → authenticate-and-persist-oauth-Dus5ShT0.js} +1 -1
- package/dist/client/assets/{automation-list-row-2xdC3lws.js → automation-list-row-eD1c19d3.js} +1 -1
- package/dist/client/assets/{automation-runs-BQK2qG6I.js → automation-runs-D7I8QaWS.js} +1 -1
- package/dist/client/assets/{automations-BQP8aSA2.js → automations-B6GTOD2v.js} +1 -1
- package/dist/client/assets/{avatar-DNua1J9J.js → avatar-3ae7eb9x.js} +1 -1
- package/dist/client/assets/{badge-p90WsvMa.js → badge-ClTHWVhH.js} +1 -1
- package/dist/client/assets/{block-document-gAmyXvk5.js → block-document-DoV2ApVE.js} +1 -1
- package/dist/client/assets/{brand-context-BfD_K-Ti.js → brand-context-DU88wlq-.js} +1 -1
- package/dist/client/assets/{buckets-CFmjd9DE.js → buckets-Dv64V13u.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CyIrpC-y.js → bulk-category-panel-D9d-CPZi.js} +1 -1
- package/dist/client/assets/{calendar-CsE8P_v6.js → calendar-CaFuCBn0.js} +1 -1
- package/dist/client/assets/{capability-load-error-BwIQSVk2.js → capability-load-error-Bb2HUhlv.js} +1 -1
- package/dist/client/assets/{card-CAY4LRtc.js → card-BkMfo3-L.js} +1 -1
- package/dist/client/assets/{category-editor-08CLTJQC.js → category-editor-95YwksDq.js} +1 -1
- package/dist/client/assets/{chat-context-CZ8b18Fc.js → chat-context-CklmWc6u.js} +1 -1
- package/dist/client/assets/{checkbox-CpkMAAxs.js → checkbox-BXAaMwzS.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CGJ8yhJu.js → cli-auth-success-Dgklezpk.js} +1 -1
- package/dist/client/assets/{collection-detail-5DB4iz01.js → collection-detail-8NE3cr65.js} +1 -1
- package/dist/client/assets/{collection-display-button-CdVHGe1g.js → collection-display-button-CyKBEium.js} +1 -1
- package/dist/client/assets/{collection-search-BXhZ3O1D.js → collection-search-CgEc7JVV.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BzYCc6H4.js → collection-table-wrapper-DwhAFC5W.js} +1 -1
- package/dist/client/assets/{collection-tabs-BMBpTAbo.js → collection-tabs-jHD3PV9U.js} +1 -1
- package/dist/client/assets/{command-BOE7MzSb.js → command-DUTyl3qs.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-B0diSDM4.js → commerce-onboarding-DYZssxx_.js} +1 -1
- package/dist/client/assets/{companions-core-BmlZqb3z.js → companions-core-DdNaKkOK.js} +1 -1
- package/dist/client/assets/{connect-NJbaa1Dq.js → connect-DnZs58Fx.js} +1 -1
- package/dist/client/assets/{connection-card-DdoyOAg3.js → connection-card-BoLbm0Lq.js} +1 -1
- package/dist/client/assets/{connection-detail-w7-8BS05.js → connection-detail-CuzNCThW.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-D6bw0HEg.js → connection-form-helpers-MuJLCV8m.js} +1 -1
- package/dist/client/assets/{connection-BvHGO9d1.js → connection-yFrSB_Ck.js} +1 -1
- package/dist/client/assets/{connections-WZ8-STzM.js → connections-C4UBN-Ku.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-B682c9RZ.js → decopilot-sse-pool-C9wT7nFZ.js} +1 -1
- package/dist/client/assets/{dialog-CRj0zBQ_.js → dialog-Y2c_xFO9.js} +1 -1
- package/dist/client/assets/{domain-settings-D51GX1ZP.js → domain-settings-BixkB4wg.js} +1 -1
- package/dist/client/assets/{drawer-ZyqfN_k8.js → drawer-Dn6DCG1a.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BaxzJoD1.js → dropdown-menu-hQO8uf9z.js} +1 -1
- package/dist/client/assets/{empty-state-CX0ihzR5.js → empty-state-BYwKHc7l.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DY9nlWot.js → extract-connection-data-C2o6ZTIY.js} +1 -1
- package/dist/client/assets/{file-explorer-DTnN5mkB.js → file-explorer-D4pNhhOc.js} +1 -1
- package/dist/client/assets/{form-r7LLoRlt.js → form-92MvHLxT.js} +1 -1
- package/dist/client/assets/{general-BPd6Q1nT.js → general-CCHZeIqH.js} +1 -1
- package/dist/client/assets/{github-repo-picker-C4LbYEVp.js → github-repo-picker-CgWDATG6.js} +1 -1
- package/dist/client/assets/{hooks-C_nIzkQJ.js → hooks-VEM1hLto.js} +1 -1
- package/dist/client/assets/{index-BDYacwdo.js → index-BAPkgzXp.js} +1 -1
- package/dist/client/assets/{index-BD1XIck_.js → index-BIINGXKR.js} +3 -3
- package/dist/client/assets/{index-Y5IRZDB7.js → index-BTg6jfKl.js} +5 -5
- package/dist/client/assets/{index-bW9oPKeA.js → index-C2-dhaI-.js} +1 -1
- package/dist/client/assets/{index-CKKq15hA.js → index-CG2piyb3.js} +1 -1
- package/dist/client/assets/{index-CsMY3E0n.js → index-Ct5z4bLK.js} +3 -3
- package/dist/client/assets/{index-B6b7-ndb.js → index-D3cRbFZn.js} +1 -1
- package/dist/client/assets/{index-D56QVQ2L.js → index-DCk4UwEM.js} +1 -1
- package/dist/client/assets/{index-BF6I2QS7.js → index-DWnwwFPu.js} +1 -1
- package/dist/client/assets/{index-DauQBNEJ.js → index-DXYTRa9w.js} +1 -1
- package/dist/client/assets/{index-Bur1TB7U.js → index-cp39w1Sm.js} +1 -1
- package/dist/client/assets/{index-redirect-Di0ZRgqA.js → index-redirect-mcpsT-db.js} +1 -1
- package/dist/client/assets/{input-Bxlv4wq5.js → input-J1mhqAdN.js} +1 -1
- package/dist/client/assets/{integration-icon-BnGA9SX5.js → integration-icon-C2mjeHEI.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-CIwtalGm.js → invite-member-dialog-CNAKazL-.js} +1 -1
- package/dist/client/assets/{label-CPAOOmgU.js → label-CXy-_gNr.js} +1 -1
- package/dist/client/assets/{layout-msWgxbNB.js → layout-X5hM7nOr.js} +1 -1
- package/dist/client/assets/{login-C36k4ZEx.js → login-BbQ5kAsz.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BBshTxEG.js → mcp-oauth-C2w2n5sc.js} +1 -1
- package/dist/client/assets/{members-BJnujW0k.js → members-DCcNOZYQ.js} +1 -1
- package/dist/client/assets/{monaco-editor-pAlq3Hbk.js → monaco-editor-BlUBHNk6.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BG7ttYuz.js → monitoring-stats-row-C8t8xcl-.js} +1 -1
- package/dist/client/assets/{multi-select-qotXRxVG.js → multi-select-Bsz4hp3f.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DUZnMuan.js → oauth-callback-ai-provider-CW0zzOtE.js} +1 -1
- package/dist/client/assets/{oauth-callback-DGSSyNOQ.js → oauth-callback-nGTeJjL9.js} +1 -1
- package/dist/client/assets/{onboarding-CHd3Ety4.js → onboarding-Bsyf93ke.js} +1 -1
- package/dist/client/assets/{org-layout-DTr6NF05.js → org-layout-B7FeJv1e.js} +1 -1
- package/dist/client/assets/{organization-choice-CeJCjdWH.js → organization-choice-Izk-OEPw.js} +1 -1
- package/dist/client/assets/{orgs-BwxsxSe_.js → orgs-C32kHiDb.js} +1 -1
- package/dist/client/assets/{page-seo-form-D0xtD3rR.js → page-seo-form-Cl2_e8dB.js} +1 -1
- package/dist/client/assets/{popover-DJARnKJN.js → popover-CqIaLo6d.js} +1 -1
- package/dist/client/assets/{post-editor-B3yOO9Jy.js → post-editor-CdNgXoS-.js} +1 -1
- package/dist/client/assets/{primitives-BmYJCXvO.js → primitives-Crc8xFCt.js} +1 -1
- package/dist/client/assets/{profile-BA45RqWa.js → profile-BEXHPCef.js} +1 -1
- package/dist/client/assets/project-app-view-Caj-wVy9.js +1 -0
- package/dist/client/assets/record-editor-Gg2yYvWK.js +1 -0
- package/dist/client/assets/{redirect-editor-cTl0Zx_4.js → redirect-editor-CECrXl-i.js} +1 -1
- package/dist/client/assets/registry-CrwbPuRI.js +2 -0
- package/dist/client/assets/{registry-layout-CwYqOrKQ.js → registry-layout-1tl7K2yu.js} +1 -1
- package/dist/client/assets/{reports-krQamnYh.js → reports-Dec6vyLn.js} +1 -1
- package/dist/client/assets/{require-capability-CFPLqPWb.js → require-capability-Cws6dYpT.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BB-yluZd.js → required-auth-layout-CKzC4Wry.js} +1 -1
- package/dist/client/assets/{reset-password-tBeq6iDe.js → reset-password-CF1AWZ9e.js} +1 -1
- package/dist/client/assets/{roles-CN9bPOqD.js → roles-D74h0S27.js} +1 -1
- package/dist/client/assets/{search-input-DoOBid5A.js → search-input-zDL_p_LQ.js} +1 -1
- package/dist/client/assets/{secrets-CdSh-98G.js → secrets-8wXE75XO.js} +1 -1
- package/dist/client/assets/{sections-editor-BSuE7v7K.js → sections-editor-BlTn3Sit.js} +1 -1
- package/dist/client/assets/{select-Bv-2ewD2.js → select-Ctd_ZZ0k.js} +1 -1
- package/dist/client/assets/{select-model-DGHQ7XQO.js → select-model-CRAkLaCL.js} +1 -1
- package/dist/client/assets/{self-tool-result-BJVDpzHC.js → self-tool-result-BCYw36Eu.js} +1 -1
- package/dist/client/assets/{seo-editor-BiXc5-eM.js → seo-editor-BKDYZkhV.js} +1 -1
- package/dist/client/assets/{settings-layout-2gF7ZghW.js → settings-layout-B5JYfisv.js} +1 -1
- package/dist/client/assets/{settings-section-DlAvH5Ow.js → settings-section-B_1oLymV.js} +1 -1
- package/dist/client/assets/{shell-controls-ui9DsV1B.js → shell-controls-D3ipd2jw.js} +1 -1
- package/dist/client/assets/{shell-layout-_reN3Shc.js → shell-layout-1C4_PYHs.js} +1 -1
- package/dist/client/assets/{sidebar-ChD8CCYT.js → sidebar-CAZ2FyoU.js} +1 -1
- package/dist/client/assets/{skeleton-C65ogTvo.js → skeleton-tW3UOR15.js} +1 -1
- package/dist/client/assets/{spinner-_TqSaOQN.js → spinner-BVMuKuHb.js} +1 -1
- package/dist/client/assets/{sso-BqBxDadH.js → sso-BFHTrmFE.js} +1 -1
- package/dist/client/assets/{store-T98vssIu.js → store-BL5oTmqc.js} +1 -1
- package/dist/client/assets/store-registry-CaYPeu2J.js +2 -0
- package/dist/client/assets/{studio-tools-DfsuYmJt.js → studio-tools-D0M8AyaL.js} +1 -1
- package/dist/client/assets/{switch-lfu04CGM.js → switch-DskVyYCS.js} +1 -1
- package/dist/client/assets/{tab-id-BqPdm69o.js → tab-id-BhaxduZ_.js} +1 -1
- package/dist/client/assets/{table-C2TMn1li.js → table-DrUjEYlL.js} +1 -1
- package/dist/client/assets/{tabs-oVlPQ_HA.js → tabs-DjKkhJF-.js} +1 -1
- package/dist/client/assets/{textarea-Bn4a6Dgo.js → textarea-BroNzwSJ.js} +1 -1
- package/dist/client/assets/{toggle-group-BRzf8EHW.js → toggle-group-BsjhKaUR.js} +1 -1
- package/dist/client/assets/{toolbar-DYLo2f04.js → toolbar-TQryde5B.js} +1 -1
- package/dist/client/assets/{tooltip-Cpi2mja1.js → tooltip-DcvI3Qmq.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DFQIA0YS.js → use-ai-providers-BWHJhqYW.js} +1 -1
- package/dist/client/assets/{use-automations-CwyD7KUw.js → use-automations-CZHCGQrS.js} +1 -1
- package/dist/client/assets/{use-autosave-DEblj-jV.js → use-autosave-C7cBRroM.js} +1 -1
- package/dist/client/assets/{use-capability-Cc8HiELK.js → use-capability-7L6HM4-F.js} +1 -1
- package/dist/client/assets/{use-clock-tick--ht2pzb8.js → use-clock-tick-BWJoXcll.js} +1 -1
- package/dist/client/assets/{use-connection-CSBpX4PU.js → use-connection-COSULjHn.js} +1 -1
- package/dist/client/assets/{use-copy-DTInUOoW.js → use-copy-DkOP7abA.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CMUKV_-M.js → use-create-virtual-mcp-C2ATuS8O.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-2vwUh_VG.js → use-debounced-autosave-Hz9sqsxr.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CwhSCFuf.js → use-debounced-value-DqJiqnYk.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DvYCBBFc.js → use-deco-credits-BHzyr0wR.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DM97rtIw.js → use-decopilot-events-DhC1PW_6.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B58V-_B1.js → use-delete-connection-JY4ayTjm.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CF8Zio-a.js → use-deployment-admin-DCJNChjl.js} +1 -1
- package/dist/client/assets/{use-file-configs-Eq9DEvtL.js → use-file-configs-shCGf-89.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BhWnCwa_.js → use-infinite-scroll-BQbD3RgJ.js} +1 -1
- package/dist/client/assets/{use-join-requests-Babs1XE8.js → use-join-requests-Eybe4FCk.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-8kwewAjR.js → use-mcp-auth-status-B3eaajte.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CpOZK5-l.js → use-mcp-client-B2w_Vv7G.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CqY2nbaz.js → use-mcp-tools-CpiBQMkC.js} +1 -1
- package/dist/client/assets/{use-members-DsksLoYY.js → use-members-1iyOisn8.js} +1 -1
- package/dist/client/assets/{use-mobile-ieOqtEHL.js → use-mobile-CEeeXHm_.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DBGPkYj0.js → use-navigate-to-agent-DtRj8Nu_.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BU-wvvoc.js → use-org-auth-client-Bcl40eqI.js} +1 -1
- package/dist/client/assets/{use-org-sso-DOw7Tfv8.js → use-org-sso-CM7UG764.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Dcy4uPK8.js → use-organization-roles-D5PTbPg1.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CVw_W4UD.js → use-organization-settings-CyU2O9C4.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BPju-Y9r.js → use-registry-connections-DRTunUDV.js} +1 -1
- package/dist/client/assets/{use-secrets-CaSIcPta.js → use-secrets-DzfLLYjI.js} +1 -1
- package/dist/client/assets/{use-status-sounds-BgT_jGkq.js → use-status-sounds-BsT1VQN-.js} +1 -1
- package/dist/client/assets/{use-tags-C7XcT7ZI.js → use-tags-B4S441L8.js} +1 -1
- package/dist/client/assets/{use-view-mode-ChsGe0PO.js → use-view-mode-CHvTaXmO.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-6MeqW-FL.js → use-virtual-mcp-DmnaO1IL.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-ddyR5cpH.js +1 -0
- package/dist/client/assets/{useQueries-B5JmsTek.js → useQueries-D3Lp43ym.js} +1 -1
- package/dist/client/assets/{useRouterState-Ch85_6Dg.js → useRouterState-C3P1iOeR.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D4QmwKBY.js +1 -0
- package/dist/client/assets/{users-CAHjBk9x.js → users-jpxk8SpM.js} +1 -1
- package/dist/client/assets/{variant-calendar-DwnAVLtp.js → variant-calendar-DLLlNEC5.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-D9-ncCO8.js → view-mode-toggle-mSOu7veP.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/project-app-view-D64d6xFs.js +0 -1
- package/dist/client/assets/record-editor-CkXMC3NF.js +0 -1
- package/dist/client/assets/registry-VbA6qBLr.js +0 -2
- package/dist/client/assets/store-registry-BcExQn86.js +0 -2
- package/dist/client/assets/useInfiniteQuery-D_QXkkfk.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-C2EK0lz_.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as P,F as _,a as R,u as V,r as b,j as h,W as k,N as y}from"./index-
|
|
1
|
+
import{c as P,F as _,a as R,u as V,r as b,j as h,W as k,N as y}from"./index-Ct5z4bLK.js";import{a as E}from"./use-mcp-client-B2w_Vv7G.js";import{a as M}from"./use-virtual-mcp-DmnaO1IL.js";import{a as N}from"./hooks-VEM1hLto.js";import{e as U}from"./use-organization-settings-CyU2O9C4.js";import{f as $}from"./reusable-new-chat-CouMjkYR.js";import"./auth-Q0kADPVB.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-C9wT7nFZ.js";import"./studio-tools-D0M8AyaL.js";function J(){const t=P.c(18),{org:e}=_();let a;t[0]!==e.id?(a=E(e.id),t[0]=e.id,t[1]=a):a=t[1];const x=a.id,{data:I}=R.useSession(),{threads:m,status:S}=N(),{mainAgentId:d,isPending:j}=U(),A=M();let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[2]=r):r=t[2];const{connect:u,siteUrl:f}=V(r),[C]=b.useState(v);if(j||S.kind==="loading"){let n;return t[3]===Symbol.for("react.memo_cache_sentinel")?(n=h.jsx(k,{}),t[3]=n):n=t[3],n}const s=d!=null&&(A??[]).some(n=>n.id===d)?d:x,g=I?.user?.id;let l;t[4]!==s||t[5]!==g||t[6]!==m?(l=$(m,s,g),t[4]=s,t[5]=g,t[6]=m,t[7]=l):l=t[7];const p=l?.id??C;let o;t[8]!==e.slug||t[9]!==p?(o={org:e.slug,taskId:p},t[8]=e.slug,t[9]=p,t[10]=o):o=t[10];let i;t[11]!==u||t[12]!==s||t[13]!==f?(i={virtualmcpid:s,connect:u,siteUrl:f},t[11]=u,t[12]=s,t[13]=f,t[14]=i):i=t[14];let c;return t[15]!==o||t[16]!==i?(c=h.jsx(y,{to:"/$org/$taskId",params:o,search:i,replace:!0}),t[15]=o,t[16]=i,t[17]=c):c=t[17],c}function v(){return crypto.randomUUID()}export{J as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as Me,r as ie,d as os,F as Tt,b as Ge,j as t,B as xe,t as Qe,m as qe,K as Qt,n as rs,z as Es,u as As,p as Wt,E as Vs}from"./index-
|
|
1
|
+
import{c as Me,r as ie,d as os,F as Tt,b as Ge,j as t,B as xe,t as Qe,m as qe,K as Qt,n as rs,z as Es,u as As,p as Wt,E as Vs}from"./index-Ct5z4bLK.js";import{S as Us}from"./search-input-zDL_p_LQ.js";import{P as et}from"./index-cp39w1Sm.js";import{E as is}from"./empty-state-BYwKHc7l.js";import{R as Ks}from"./require-capability-Cws6dYpT.js";import{r as ms,l as qs,t as Bs,v as us,w as Xt,x as qt,y as ys,z as Hs,B as fs,D as ws,A as Js,E as Qs}from"./automation-runs-D7I8QaWS.js";import{u as ts}from"./use-connection-COSULjHn.js";import{g as Ss}from"./connection-slug-eyAPH6o3.js";import{B as kt}from"./badge-ClTHWVhH.js";import{P as $t,a as zt,b as Et}from"./popover-CqIaLo6d.js";import{c as Bt,T as Ht,a as Jt}from"./tooltip-DcvI3Qmq.js";import{i as Yt}from"./Check-BwHliFRj.js";import{a as Ut}from"./Copy01-BlkL52M8.js";import{n as xs,a as At}from"./Tool02-DZ2vEkP4.js";import{i as ns}from"./FilterLines-oPoBPuqv.js";import{i as Gs}from"./Key01-CIup5BVm.js";import{i as Ws}from"./Play-BBCpB_Tz.js";import{aM as Xs,_ as Ys,a6 as Zs}from"./agent-icon-Dcc64Amv.js";import{M as ps}from"./monaco-editor-BlUBHNk6.js";import{u as el}from"./use-members-1iyOisn8.js";import{S as tl,u as sl,W as ll}from"./use-mcp-client-B2w_Vv7G.js";import{a as ol}from"./use-virtual-mcp-DmnaO1IL.js";import{c as rl}from"./SwitchHorizontal01-B4ZgCyE5.js";import{s as il}from"./Plus-DO9NbOAK.js";import{s as nl}from"./Trash01-BOMqKZ1K.js";import{I as Dt}from"./input-J1mhqAdN.js";import{M as Rt}from"./multi-select-Bsz4hp3f.js";import{a as Pt,b as Ft,d as He,c as _t,S as Ot}from"./select-Ctd_ZZ0k.js";import{t as Is}from"./ChevronDown-CKkO8sAW.js";import{s as al}from"./Stars02-BG4AWaaX.js";import{C as cl}from"./calendar-CaFuCBn0.js";import{T as dl}from"./textarea-BroNzwSJ.js";import{C as ks}from"./collection-tabs-jHD3PV9U.js";import{S as ml}from"./switch-DskVyYCS.js";import{L as ul}from"./label-CXy-_gNr.js";import{I as Ct}from"./integration-icon-C2mjeHEI.js";import{A as Cs}from"./avatar-3ae7eb9x.js";import{A as fl,a as xl,b as pl}from"./alert-Bep9Lxpp.js";import{C as Ts}from"./card-BkMfo3-L.js";import{K as Ye}from"./monitoring-stats-row-C8t8xcl-.js";import{u as Ms}from"./studio-tools-D0M8AyaL.js";import{u as gl}from"./useSuspenseInfiniteQuery-D4QmwKBY.js";import{o as hl,m as vl,p as jl,q as Nl}from"./sidebar-CAZ2FyoU.js";import{T as tt,a as Gt,b as Ls,c as Ds,d as Ee,e as Rs}from"./table-DrUjEYlL.js";import{n as bl}from"./ChevronUp-C1afs1xa.js";import{u as yl}from"./use-infinite-scroll-BQbD3RgJ.js";import{c as wl,b as Sl}from"./use-automations-CZHCGQrS.js";import"./SearchMd-GYne36B-.js";import"./use-capability-7L6HM4-F.js";import"./access-gate-CScD5WwV.js";import"./capability-load-error-Bb2HUhlv.js";import"./useInfiniteQuery-ddyR5cpH.js";import"./use-clock-tick-BWJoXcll.js";import"./AlertCircle-DdtdV7M4.js";import"./CheckCircle-CTIPijUa.js";import"./DotsVertical-BFrinGvO.js";import"./XCircle-Df3ZOY6R.js";import"./Stars01-DAx8aZEr.js";import"./ChevronRight-B8f4wyDl.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DkOP7abA.js";import"./hooks-VEM1hLto.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-C9wT7nFZ.js";import"./chat-context-CklmWc6u.js";import"./tab-id-BhaxduZ_.js";import"./dialog-Y2c_xFO9.js";import"./X-B6K21IFp.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-BWHJhqYW.js";import"./use-decopilot-events-DhC1PW_6.js";import"./use-organization-settings-CyU2O9C4.js";import"./index-DWnwwFPu.js";import"./Eye-CQsjSohp.js";import"./Star01-CH5MEDQn.js";import"./XClose-DBug4o8k.js";import"./ZapSquare-CPOIzhEC.js";import"./Tool01-Dn1kpGdl.js";import"./Monitor01-BT8WHZmo.js";import"./Upload01-S_KetqzT.js";import"./shell-layout-1C4_PYHs.js";import"./Users03-CI91FsuH.js";import"./SearchLg-Df6klb6Y.js";import"./CpuChip01-Cs3gfrhP.js";import"./Zap-C9gRaG5K.js";import"./required-auth-layout-CKzC4Wry.js";import"./use-org-sso-CM7UG764.js";import"./LinkExternal01-CgpMIzO0.js";import"./ArrowUpRight-CHW6cpx0.js";import"./Palette-CpgDl594.js";import"./use-navigate-to-agent-DtRj8Nu_.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-D7FaG8Lf.js";import"./form-92MvHLxT.js";import"./spinner-BVMuKuHb.js";import"./ArrowUp-CpEPYAOf.js";import"./Settings02-DerOgVc2.js";import"./TrendUp01-DwZeXU3a.js";import"./HardDrive-CpV48xOn.js";import"./LayoutLeft-DrcKo4sm.js";import"./LogOut01-uhMfgP0K.js";import"./Sun-DPokUB7F.js";import"./Shield01-gMQ1chGf.js";import"./User01-HXIFsqtn.js";import"./Users01-ByuTyOLr.js";import"./use-org-auth-client-Bcl40eqI.js";import"./auth-Q0kADPVB.js";import"./checkbox-BXAaMwzS.js";import"./command-DUTyl3qs.js";import"./index-C2-dhaI-.js";import"./use-mobile-CEeeXHm_.js";const ss={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},Il=["eq","contains","exists","in"];function kl(s){return Il.includes(s)}function st(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),i=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${i}`}).join(",")}function Cl(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,i,...d]=e.split(":"),n=l?decodeURIComponent(l):"";if(n.trim())return{key:n,operator:i&&kl(i)?i:"eq",value:decodeURIComponent(d.join(":")||"")}}).filter(e=>e!==void 0)}function Kt(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
|
|
2
2
|
`)}function gs(s){return s.trim()?s.split(`
|
|
3
3
|
`).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[l,...i]=e.split("=");return{key:l||"",operator:"eq",value:i.join("=")}}if(e.includes("~")){const[l,...i]=e.split("~");return{key:l||"",operator:"contains",value:i.join("~")}}if(e.includes("@")){const[l,...i]=e.split("@");return{key:l||"",operator:"in",value:i.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Tl(s){const e={},l={},i=[],d={};for(const n of s)if(n.key.trim())switch(n.operator){case"eq":n.value&&(e[n.key]=n.value);break;case"contains":n.value&&(l[n.key]=`%${n.value}%`);break;case"exists":i.push(n.key);break;case"in":n.value&&(d[n.key]=n.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(l).length>0?l:void 0,propertyKeys:i.length>0?i:void 0,propertyInValues:Object.keys(d).length>0?d:void 0}}function hs(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};const e=s._decocms_truncated;if(typeof e=="string"&&e.length>0)return{content:e,isTruncated:!0,originalSize:e.length};let l;try{l=JSON.stringify(s,null,2)}catch{return{content:"[Unable to serialize JSON]",isTruncated:!1,originalSize:0}}const i=l.length;return i<=ss.maxJsonRenderSize?{content:l,isTruncated:!1,originalSize:i}:{content:l.slice(0,ss.maxJsonRenderSize)+`
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bi as f,bj as t,a5 as R,Z as c,c6 as z,Y as s,a6 as v,a3 as g,aH as b,b8 as H,bg as V,c7 as xe,c8 as we,c9 as K,ca as W,cb as Ce,cc as Re,cd as Z,ce as Pe,cf as qe,cg as Te,ch as Ie,ci as Ee,cj as Le,ck as ze,cl as Ae,bv as De,cm as Ue,cn as Ne,co as $e,cp as Oe,cq as je,cr as Be,cs as Fe,bt as Ve,r as se,c as J,j as w,ct as We,cu as Ke,p as Ze,v as Je,m as ie,bx as Ye}from"./index-
|
|
1
|
+
import{bi as f,bj as t,a5 as R,Z as c,c6 as z,Y as s,a6 as v,a3 as g,aH as b,b8 as H,bg as V,c7 as xe,c8 as we,c9 as K,ca as W,cb as Ce,cc as Re,cd as Z,ce as Pe,cf as qe,cg as Te,ch as Ie,ci as Ee,cj as Le,ck as ze,cl as Ae,bv as De,cm as Ue,cn as Ne,co as $e,cp as Oe,cq as je,cr as Be,cs as Fe,bt as Ve,r as se,c as J,j as w,ct as We,cu as Ke,p as Ze,v as Je,m as ie,bx as Ye}from"./index-Ct5z4bLK.js";import{P as Qe}from"./use-mcp-client-B2w_Vv7G.js";const ue=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","media-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function Ge(r,e={}){const i=`<meta http-equiv="Content-Security-Policy" content="${et(e)}">`,n=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,l=r.match(n);if(l){const m=(l.index??0)+l[0].length;return r.slice(0,m)+`
|
|
2
2
|
`+i+r.slice(m)}const d=/<html(\s[^>]*)?>|<HTML(\s[^>]*)?>/i,u=r.match(d);if(u){const m=(u.index??0)+u[0].length;return r.slice(0,m)+`
|
|
3
3
|
<head>
|
|
4
4
|
`+i+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,b as B,j as s,y as xl,B as Os,d as Me,F as pe,G as gl,r as L,E as as,H as bl,x as jl,K as zs,e as xs,p as ce,I as Bt,m as G,a as Ft,J as vl,v as yl,t as Ht,M as _l,P as Sl,n as Nl,R as kl,k as wl,U as Cl,f as Ml,u as Ds,O as Al,W as Tl}from"./index-CsMY3E0n.js";import{u as kt,S as cs,a as ds,b as ue,c as de,d as ne,e as Es,f as Il,g as Rs,h as Pl,i as ls,j as $l,k as Ol,l as zl}from"./sidebar-ChD8CCYT.js";import{u as Fs}from"./use-mobile-ieOqtEHL.js";import{C as Dl,p as Zt,s as El,a as Rl,n as Fl}from"./self-tool-result-BJVDpzHC.js";import{f as Ll,b as Ls,e as Gs,g as Gl,h as Bl,a as Hl,d as Ul}from"./dialog-CRj0zBQ_.js";import{f as Wl,i as ql,D as Kl}from"./tab-id-BqPdm69o.js";import{C as Vl,W as Bs,g as Yl,u as Xl,S as Ql,a as Jl}from"./use-mcp-client-CpOZK5-l.js";import{i as Hs}from"./XCircle-Fr7R0JyH.js";import{u as Zl,a as ms}from"./use-organization-settings-CVw_W4UD.js";import{i as Us}from"./ChevronRight-BIlAcWT5.js";import{i as en}from"./X-DvW6lnRi.js";import{s as tn,a as sn,t as ln,i as nn,b as on,c as rn,d as an,e as Ws,A as Lt,f as gs,g as cn,h as dn,j as mn}from"./agent-icon-D0v0CAMQ.js";import{S as _e}from"./skeleton-C65ogTvo.js";import{i as qs}from"./LayoutLeft-pwNqM9Bq.js";import{O as ns,A as fs,u as fn,a as un,b as pn,c as hn}from"./use-deco-credits-DvYCBBFc.js";import{T as Ut,a as St}from"./toolbar-DYLo2f04.js";import{P as Ks,a as Vs,b as Ys}from"./popover-DJARnKJN.js";import{D as xn,a as gn,b as bn}from"./drawer-ZyqfN_k8.js";import{A as is}from"./avatar-DNua1J9J.js";import{T as Wt,a as qt,b as Xs,c as Kt}from"./tooltip-Cpi2mja1.js";import{a as jn}from"./Copy01-CjgXfC24.js";import{n as vn,i as yn}from"./Tool02-CG-MJEAZ.js";import{n as _n}from"./LinkExternal01-CUFmEJ-r.js";import{i as bs}from"./LogOut01-CL5erPho.js";import{i as Sn}from"./Monitor01-BTT_gkH0.js";import{n as Nn,a as kn}from"./Sun-quy8cVor.js";import{a as Vt}from"./Settings02-C2z8V4b1.js";import{i as wn}from"./Shield01-CE6E4vWT.js";import{a as Cn}from"./Users03-DBjTudH5.js";import{u as Mn}from"./use-deployment-admin-CF8Zio-a.js";import{u as An}from"./use-is-desktop-app-BNujXJc_.js";import"./index-CKKq15hA.js";import{a as Tn}from"./ZapSquare-DHGjnuEa.js";import{I as Qs}from"./invite-member-dialog-CIwtalGm.js";import{i as In}from"./FilterLines-FPJrIJmP.js";import{T as Pn,a as $n}from"./toggle-group-BRzf8EHW.js";import{u as On,a as Js,b as zn,T as Dn}from"./hooks-C_nIzkQJ.js";import{u as Zs,f as En}from"./shell-layout-_reN3Shc.js";import{C as Rn,a as Fn,b as Ln,c as Gn,d as Bn,e as Hn}from"./command-BOE7MzSb.js";import{u as us}from"./studio-tools-DfsuYmJt.js";import{u as el}from"./use-virtual-mcp-6MeqW-FL.js";import{i as tl}from"./Zap-B2AmO5T-.js";import{S as sl,M as Un}from"./shell-controls-ui9DsV1B.js";import{n as Wn}from"./Stars02-DKPhD_jS.js";import{g as qn,u as Kn,S as Vn}from"./use-clock-tick--ht2pzb8.js";import{a as Yn}from"./format-time-BnbuEtat.js";import{g as Xn}from"./agent-capabilities-cXfbMfjV.js";import{t as Qn}from"./ChevronDown-DfcP5Y1G.js";import{A as Jn,a as Zn,b as ei,c as ti,d as si,e as li,f as ni,g as ii}from"./alert-dialog-DctPzbrJ.js";import{S as ll}from"./use-navigate-to-agent-DBGPkYj0.js";import{C as oi}from"./chat-context-CZ8b18Fc.js";import"./integration-icon-BnGA9SX5.js";import"./companions-core-BmlZqb3z.js";import"./extract-connection-data-DY9nlWot.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CAXumITS.js";import"./CheckCircle-CP9SNP9d.js";import"./form-r7LLoRlt.js";import"./label-CPAOOmgU.js";import"./input-Bxlv4wq5.js";import"./Check-CKtI4hGn.js";import"./Eye-D7uVxsd6.js";import"./use-debounced-value-CwhSCFuf.js";import"./useQueries-B5JmsTek.js";import"./authenticate-and-persist-oauth-DiCc1vu0.js";import"./mcp-oauth-BBshTxEG.js";import"./auth-CVt7QHVR.js";import"./AlertCircle-BXOs8pgi.js";import"./Tool01-d6PLxuqZ.js";import"./ArrowUp-BFGzDO5k.js";import"./ArrowUpRight-h69wSa4W.js";import"./TrendUp01-CTjYh8Ln.js";import"./ChevronUp-SkDgfV9P.js";import"./DotsVertical-DTkYQ2kM.js";import"./CpuChip01-t2Y6TVWu.js";import"./Star01-Cw9ulDl8.js";import"./Palette-D4hJdFvA.js";import"./SwitchHorizontal01-B7BlklUe.js";import"./HardDrive-DLAbk7yi.js";import"./Key01-BNEdMwqa.js";import"./Play-BPaNNVsN.js";import"./Plus-DigHRvrB.js";import"./SearchLg-CcVjy7cv.js";import"./SearchMd-UJHWms5O.js";import"./Stars01-DqE2p9rj.js";import"./Trash01-BEfNCj7H.js";import"./Upload01-CSguqWGj.js";import"./User01-CN3QhMor.js";import"./Users01-ALInePB-.js";import"./XClose-yYL9HV11.js";import"./spinner-_TqSaOQN.js";import"./github-repo-picker-C4LbYEVp.js";import"./collection-search-BXhZ3O1D.js";import"./use-connection-CSBpX4PU.js";import"./use-mcp-tools-CqY2nbaz.js";import"./reusable-new-chat-CouMjkYR.js";import"./connection-card-DdoyOAg3.js";import"./use-registry-connections-BPju-Y9r.js";import"./useInfiniteQuery-D_QXkkfk.js";import"./use-infinite-scroll-BhWnCwa_.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-eyAPH6o3.js";import"./card-CAY4LRtc.js";import"./select-Bv-2ewD2.js";import"./textarea-Bn4a6Dgo.js";import"./connection-form-helpers-D6bw0HEg.js";import"./collection-tabs-BMBpTAbo.js";import"./badge-p90WsvMa.js";import"./useSuspenseInfiniteQuery-C2EK0lz_.js";import"./use-ai-providers-DFQIA0YS.js";import"./use-org-auth-client-BU-wvvoc.js";import"./use-organization-roles-Dcy4uPK8.js";import"./decopilot-sse-pool-B682c9RZ.js";import"./required-auth-layout-BB-yluZd.js";import"./use-org-sso-DOw7Tfv8.js";import"./index-bW9oPKeA.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-decopilot-events-DM97rtIw.js";const ri="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function ai(){const t=M.c(13),e=B();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),t[0]=l):l=t[0];let i;t[1]!==e?(i=e("routes.commerceOnboarding.connectModal.quote"),t[1]=e,t[2]=i):i=t[2];let n;t[3]!==i?(n=s.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",i,"”"]}),t[3]=i,t[4]=n):n=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("img",{src:ri,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),t[5]=r):r=t[5];let o;t[6]!==e?(o=e("routes.commerceOnboarding.connectModal.quoteAuthor"),t[6]=e,t[7]=o):o=t[7];let a;t[8]!==o?(a=s.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[r,s.jsx("span",{className:"text-base font-medium",children:o})]}),t[8]=o,t[9]=a):a=t[9];let d;return t[10]!==n||t[11]!==a?(d=s.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[l,n,a]}),t[10]=n,t[11]=a,t[12]=d):d=t[12],d}function ci(){const t=M.c(19),e=B();let l;t[0]!==e?(l=e("routes.commerceOnboarding.connectModal.trustRevoke"),t[0]=e,t[1]=l):l=t[1];let i;t[2]!==l?(i={Icon:tn,label:l},t[2]=l,t[3]=i):i=t[3];let n;t[4]!==e?(n=e("routes.commerceOnboarding.connectModal.trustEncrypted"),t[4]=e,t[5]=n):n=t[5];let r;t[6]!==n?(r={Icon:xl,label:n},t[6]=n,t[7]=r):r=t[7];let o;t[8]!==e?(o=e("routes.commerceOnboarding.connectModal.trustNeverSold"),t[8]=e,t[9]=o):o=t[9];let a;t[10]!==o?(a={Icon:sn,label:o},t[10]=o,t[11]=a):a=t[11];let d;t[12]!==i||t[13]!==r||t[14]!==a?(d=[i,r,a],t[12]=i,t[13]=r,t[14]=a,t[15]=d):d=t[15];const c=d;let m;t[16]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"h-px w-full bg-white/15"}),t[16]=m):m=t[16];let f;return t[17]!==c?(f=s.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[m,s.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:c.map(di)})]}),t[17]=c,t[18]=f):f=t[18],f}function di(t){const{Icon:e,label:l}=t;return s.jsxs("li",{className:"flex items-center gap-2.5 text-[13px] leading-tight text-white/70",children:[s.jsx(e,{className:"size-4 shrink-0 opacity-85"}),l]},l)}function mi(t){const e=M.c(22),{siteHost:l,footer:i,onClose:n,children:r}=t,o=B(),a=l?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null;let d;e[0]!==n||e[1]!==o?(d=n&&s.jsx("button",{type:"button",onClick:n,"aria-label":o("routes.commerceOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:s.jsx(en,{size:18})}),e[0]=n,e[1]=o,e[2]=d):d=e[2];let c,m;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),m=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=c,e[4]=m):(c=e[3],m=e[4]);let f;e[5]!==a||e[6]!==l?(f=l&&s.jsxs(s.Fragment,{children:[s.jsx(Us,{size:16,className:"shrink-0 text-foreground/25"}),a&&s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:s.jsx("img",{src:a,alt:"",className:"size-full"})}),s.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:l})]}),e[5]=a,e[6]=l,e[7]=f):f=e[7];let u;e[8]!==f?(u=s.jsxs("div",{className:"flex items-center gap-2",children:[c,m,f]}),e[8]=f,e[9]=u):u=e[9];let p;e[10]!==i?(p=s.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:i}),e[10]=i,e[11]=p):p=e[11];let h;e[12]!==r||e[13]!==u||e[14]!==p?(h=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[u,r,p]}),e[12]=r,e[13]=u,e[14]=p,e[15]=h):h=e[15];let b,g;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),g=s.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=b,e[17]=g):(b=e[16],g=e[17]);let x;e[18]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:p-14",children:[b,g,s.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[s.jsx("div",{className:"flex-1"}),s.jsx(ai,{}),s.jsx("div",{className:"flex-1"}),s.jsx(ci,{})]})]}),e[18]=x):x=e[18];let j;return e[19]!==d||e[20]!==h?(j=s.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[d,h,x]}),e[19]=d,e[20]=h,e[21]=j):j=e[21],j}function fi(t){const e=M.c(5),{ready:l,pending:i,label:n,onClick:r,children:o}=t,a=i||!l,d=l&&!i?o:null;let c;return e[0]!==n||e[1]!==r||e[2]!==a||e[3]!==d?(c=s.jsxs(Os,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal rounded-lg py-3 text-center text-base font-medium leading-tight",onClick:r,disabled:a,children:[n,d]}),e[0]=n,e[1]=r,e[2]=a,e[3]=d,e[4]=c):c=e[4],c}function ui(t){const e=M.c(22),{siteUrl:l}=t,i=Me(),{org:n}=pe(),r=B();let o;e[0]!==i||e[1]!==n.id||e[2]!==n.slug?(o=()=>{localStorage.setItem(gl.sidebarOpen(),JSON.stringify(!1)),i({to:"/$org/$taskId",params:{org:n.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:Yl(n.id),main:Wl(Bs.COMMERCE_DISCOVERY(n.id),Vl),sidepanel:0}})},e[0]=i,e[1]=n.id,e[2]=n.slug,e[3]=o):o=e[3];const a=o;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ll,{className:"bg-black/15 backdrop-blur-sm"}),e[4]=d):d=e[4];let c;e[5]!==r?(c=r("routes.commerceOnboarding.connectModal.dialogTitle"),e[5]=r,e[6]=c):c=e[6];let m;e[7]!==c?(m=s.jsx(Ls,{className:"sr-only",children:c}),e[7]=c,e[8]=m):m=e[8];let f;e[9]!==a||e[10]!==r?(f=()=>s.jsxs("div",{className:"grid gap-4 p-6",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:r("routes.commerceOnboarding.connectModal.loadError")}),s.jsxs(Os,{type:"button",size:"xl",className:"w-full",onClick:a,children:[r("routes.commerceOnboarding.connectModal.continueButton"),s.jsx(Hs,{size:18})]})]}),e[9]=a,e[10]=r,e[11]=f):f=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Dl,{}),e[12]=u):u=e[12];let p;e[13]!==a||e[14]!==l?(p=s.jsx(L.Suspense,{fallback:u,children:s.jsx(gi,{siteUrlFromUrl:l,onComplete:a})}),e[13]=a,e[14]=l,e[15]=p):p=e[15];let h;e[16]!==f||e[17]!==p?(h=s.jsx(as,{fallback:f,children:p}),e[16]=f,e[17]=p,e[18]=h):h=e[18];let b;return e[19]!==m||e[20]!==h?(b=s.jsx(Gs,{open:!0,children:s.jsxs(Gl,{children:[d,s.jsxs(bl,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:xi,onPointerDownOutside:hi,onInteractOutside:pi,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[m,h]})]})}),e[19]=m,e[20]=h,e[21]=b):b=e[21],b}function pi(t){return t.preventDefault()}function hi(t){return t.preventDefault()}function xi(t){return t.preventDefault()}function gi({siteUrlFromUrl:t,onComplete:e}){const l=B(),{org:i}=pe(),n=Bs.COMMERCE_DISCOVERY(i.id),r=Xl({connectionId:Ql,orgId:i.id,orgSlug:i.slug}),a=jl({queryKey:zs.commerceDiscoveryConnection(i.id,n),queryFn:async()=>{const v=await r.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:n}});return Zt(v)},retry:!1}).data.item,d=typeof a?.metadata?.siteUrl=="string"?a.metadata.siteUrl:void 0,c=t||d,m=El(c),[f,u]=L.useState(!0),[p,h]=L.useState(null),b=xs({mutationFn:async v=>Zt(await r.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:v}})),retry:!1}),g=xs({mutationFn:async v=>Zt(await r.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:v}})),retry:!1}),x=async()=>{h(null),ce("commerce_onboarding_open_report_clicked",{domain:m??void 0,organization_id:i.id});const v=c?Fl(c):null;if(v?.ok)try{let _=await g.mutateAsync(v.value);if(_.triggered||(ce("commerce_onboarding_run_reclaim",{domain:m??void 0,organization_id:i.id,reason:_.reason??"not_upgraded"}),await b.mutateAsync(v.value),_=await g.mutateAsync(v.value)),!_.triggered){ce("commerce_onboarding_run_failed",{domain:m??void 0,organization_id:i.id,error:_.reason??"not_triggered"}),h(l("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(_){ce("commerce_onboarding_run_failed",{domain:m??void 0,organization_id:i.id,error:_ instanceof Error?_.message:String(_)}),h(l("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()},j=Zl("demo_mode"),y=f||j;return s.jsx(mi,{siteHost:m,footer:s.jsxs(s.Fragment,{children:[p?s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:p}):null,s.jsx(fi,{ready:y,pending:g.isPending,label:g.isPending?l("routes.commerceOnboarding.connectModal.openingReport"):l(y?"routes.commerceOnboarding.connectModal.viewFullReport":"routes.commerceOnboarding.connectModal.connectToolToContinue"),onClick:()=>{x()},children:s.jsx(Hs,{size:18})})]}),children:s.jsx(Rl,{org:i,cdConnectionId:n,siteUrl:c,onReadinessChange:u})})}function bi(t){const e=M.c(11),{onPointerDown:l,onDoubleClick:i}=t,n=B(),{state:r,isMobile:o}=kt();if(o||r==="collapsed")return null;let a;e[0]!==n?(a=n("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=n,e[1]=a):a=e[1];let d;e[2]!==n?(d=n("sidebar.sidebarResizeHandle.title"),e[2]=n,e[3]=d):d=e[3];let c,m;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={left:"var(--sidebar-width)"},m=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[4]=c,e[5]=m):(c=e[4],m=e[5]);let f;return e[6]!==i||e[7]!==l||e[8]!==a||e[9]!==d?(f=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":a,title:d,onPointerDown:l,onDoubleClick:i,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:c,children:m}),e[6]=i,e[7]=l,e[8]=a,e[9]=d,e[10]=f):f=e[10],f}const ps=240,ji=400,vi="sidebar.width";function Ct(t){return Math.max(ps,Math.min(ji,t))}function yi(){const t=M.c(11),[e,l]=Bt(vi,_i),i=L.useRef(null);let n;t[0]!==l||t[1]!==e?(n=m=>{m.preventDefault();const f=m.clientX,u=Ct(e),p=i.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),h=p?Array.from(p.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const x of h)x.style.transition="none";const b=x=>{const j=Ct(u+(x.clientX-f));p?.style.setProperty("--sidebar-width",`${j}px`)},g=x=>{const j=Ct(u+(x.clientX-f));l(j);for(const y of h)y.style.transition="";window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",g),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",b),window.addEventListener("pointerup",g)},t[0]=l,t[1]=e,t[2]=n):n=t[2];const r=n;let o;t[3]!==l?(o=()=>{l(ps)},t[3]=l,t[4]=o):o=t[4];const a=o;let d;t[5]!==e?(d=Ct(e),t[5]=e,t[6]=d):d=t[6];let c;return t[7]!==r||t[8]!==a||t[9]!==d?(c={width:d,wrapperRef:i,onStartResize:r,resetWidth:a},t[7]=r,t[8]=a,t[9]=d,t[10]=c):c=t[10],c}function _i(t){return typeof t=="number"?Ct(t):ps}function nl(){return[]}function il(t){const e=M.c(3),{children:l}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=i):i=e[0];let n;return e[1]!==l?(n=s.jsxs(cs,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[i,s.jsx(ds,{children:s.jsx(ue,{className:"gap-0.5",children:l})})]}),e[1]=l,e[2]=n):n=e[2],n}function ol(t){const e=M.c(18),{item:l}=t,{isMobile:i,setOpenMobile:n}=kt();let r;e[0]!==i||e[1]!==l||e[2]!==n?(r=()=>{ce("nav_item_clicked",{nav_key:l.key,nav_label:l.label,is_active:!!l.isActive,is_mobile:i}),l.onClick?.(),i&&n(!1)},e[0]=i,e[1]=l,e[2]=n,e[3]=r):r=e[3];const o=r,a=l.key,d=l.isActive&&"z-10";let c;e[4]!==d?(c=G(d),e[4]=d,e[5]=c):c=e[5];let m;e[6]!==l.label?(m=s.jsx("span",{children:l.label}),e[6]=l.label,e[7]=m):m=e[7];let f;e[8]!==o||e[9]!==l.icon||e[10]!==l.isActive||e[11]!==l.label||e[12]!==m?(f=s.jsxs(de,{onClick:o,isActive:l.isActive,tooltip:l.label,children:[l.icon,m]}),e[8]=o,e[9]=l.icon,e[10]=l.isActive,e[11]=l.label,e[12]=m,e[13]=f):f=e[13];let u;return e[14]!==l.key||e[15]!==c||e[16]!==f?(u=s.jsx(ne,{className:c,children:f},a),e[14]=l.key,e[15]=c,e[16]=f,e[17]=u):u=e[17],u}function Si(t){const e=M.c(12),{section:l}=t;switch(l.type){case"divider":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Es,{className:"my-2"}),e[0]=i):i=e[0],i}case"spacer":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1"}),e[1]=i):i=e[1],i}case"group":{const i=l.group.label,n=l.group.defaultExpanded;let r;e[2]!==l.group.items?(r=l.group.items.map(ki),e[2]=l.group.items,e[3]=r):r=e[3];let o;return e[4]!==l.group.defaultExpanded||e[5]!==l.group.label||e[6]!==r?(o=s.jsx(il,{label:i,defaultExpanded:n,children:r}),e[4]=l.group.defaultExpanded,e[5]=l.group.label,e[6]=r,e[7]=o):o=e[7],o}case"items":{let i;e[8]!==l.items?(i=l.items.map(Ni),e[8]=l.items,e[9]=i):i=e[9];let n;return e[10]!==i?(n=s.jsx(cs,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(ds,{children:s.jsx(ue,{className:"gap-1.5",children:i})})}),e[10]=i,e[11]=n):n=e[11],n}case"custom":return l.content}}function Ni(t){return s.jsx(ol,{item:t},t.key)}function ki(t){return s.jsx(ol,{item:t},t.key)}function wi(t){const e=M.c(17),{sections:l,footer:i,additionalContent:n,header:r,variant:o,contentClassName:a}=t,d=o===void 0?"sidebar":o;let c;e[0]!==r?(c=r&&s.jsx(Il,{className:"shrink-0 h-12 flex flex-row items-center px-2 py-0 group-data-[collapsible=icon]/sidebar:hidden",children:r}),e[0]=r,e[1]=c):c=e[1];let m;e[2]!==a?(m=G("flex flex-col flex-1 px-2 pb-2 gap-0.5",a),e[2]=a,e[3]=m):m=e[3];let f;e[4]!==l?(f=l.map(Ci),e[4]=l,e[5]=f):f=e[5];let u;e[6]!==n?(u=n&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:n}),e[6]=n,e[7]=u):u=e[7];let p;e[8]!==m||e[9]!==f||e[10]!==u?(p=s.jsxs(Rs,{className:m,children:[f,u]}),e[8]=m,e[9]=f,e[10]=u,e[11]=p):p=e[11];let h;return e[12]!==i||e[13]!==c||e[14]!==p||e[15]!==d?(h=s.jsxs(Pl,{variant:d,children:[c,p,i]}),e[12]=i,e[13]=c,e[14]=p,e[15]=d,e[16]=h):h=e[16],h}function Ci(t,e){return s.jsx(Si,{section:t},e)}function rl(t){const e=M.c(2);let l;return e[0]!==t?(l=s.jsx(wi,{...t}),e[0]=t,e[1]=l):l=e[1],l}rl.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,l)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(_e,{className:"h-full bg-sidebar-accent rounded-md"})},l))})};function js(t){const e=M.c(18),{item:l,onClose:i}=t,n=l.isActive&&"z-10";let r;e[0]!==n?(r=G(n),e[0]=n,e[1]=r):r=e[1];let o;e[2]!==l||e[3]!==i?(o=()=>{l.onClick?.(),i()},e[2]=l,e[3]=i,e[4]=o):o=e[4];let a;e[5]!==l.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:l.icon}),e[5]=l.icon,e[6]=a):a=e[6];let d;e[7]!==l.label?(d=s.jsx("span",{children:l.label}),e[7]=l.label,e[8]=d):d=e[8];let c;e[9]!==l.isActive||e[10]!==l.label||e[11]!==o||e[12]!==a||e[13]!==d?(c=s.jsxs(de,{onClick:o,isActive:l.isActive,tooltip:l.label,className:"h-10! text-sm!",children:[a,d]}),e[9]=l.isActive,e[10]=l.label,e[11]=o,e[12]=a,e[13]=d,e[14]=c):c=e[14];let m;return e[15]!==r||e[16]!==c?(m=s.jsx(ne,{className:r,children:c}),e[15]=r,e[16]=c,e[17]=m):m=e[17],m}function Mi(t){const e=M.c(18),{section:l,onClose:i}=t;switch(l.type){case"divider":{let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Es,{className:"my-2"}),e[0]=n):n=e[0],n}case"spacer":{let n;return e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex-1"}),e[1]=n):n=e[1],n}case"group":{const n=l.group.label,r=l.group.defaultExpanded;let o;if(e[2]!==i||e[3]!==l.group.items){let d;e[5]!==i?(d=c=>s.jsx(js,{item:c,onClose:i},c.key),e[5]=i,e[6]=d):d=e[6],o=l.group.items.map(d),e[2]=i,e[3]=l.group.items,e[4]=o}else o=e[4];let a;return e[7]!==l.group.defaultExpanded||e[8]!==l.group.label||e[9]!==o?(a=s.jsx(il,{label:n,defaultExpanded:r,children:o}),e[7]=l.group.defaultExpanded,e[8]=l.group.label,e[9]=o,e[10]=a):a=e[10],a}case"items":{let n;if(e[11]!==i||e[12]!==l.items){let o;e[14]!==i?(o=a=>s.jsx(js,{item:a,onClose:i},a.key),e[14]=i,e[15]=o):o=e[15],n=l.items.map(o),e[11]=i,e[12]=l.items,e[13]=n}else n=e[13];let r;return e[16]!==n?(r=s.jsx(cs,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(ds,{children:s.jsx(ue,{className:"gap-1.5",children:n})})}),e[16]=n,e[17]=r):r=e[17],r}case"custom":return l.content}}function Ai(t){const e=M.c(27),{sections:l,onClose:i,footer:n,additionalContent:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ns,{}),e[0]=o):o=e[0];let a;e[1]!==i?(a=s.jsx(fs,{onNavigate:i}),e[1]=i,e[2]=a):a=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"flex-1"}),e[3]=d):d=e[3];const c=B();let m;e[4]!==c?(m=c("sidebar.navigationMobile.closeSidebar"),e[4]=c,e[5]=m):m=e[5];let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(qs,{size:16}),e[6]=f):f=e[6];let u;e[7]!==i||e[8]!==m?(u=s.jsx(Ut,{onClick:i,"aria-label":m,children:f}),e[7]=i,e[8]=m,e[9]=u):u=e[9];let p;e[10]!==a||e[11]!==u?(p=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[o,a,d,u]}),e[10]=a,e[11]=u,e[12]=p):p=e[12];let h;if(e[13]!==i||e[14]!==l){let j;e[16]!==i?(j=(y,v)=>s.jsx(Mi,{section:y,onClose:i},v),e[16]=i,e[17]=j):j=e[17],h=l.map(j),e[13]=i,e[14]=l,e[15]=h}else h=e[15];let b;e[18]!==r?(b=r&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:r}),e[18]=r,e[19]=b):b=e[19];let g;e[20]!==b||e[21]!==h?(g=s.jsxs(Rs,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[h,b]}),e[20]=b,e[21]=h,e[22]=g):g=e[22];let x;return e[23]!==n||e[24]!==g||e[25]!==p?(x=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[p,g,n]}),e[23]=n,e[24]=g,e[25]=p,e[26]=x):x=e[26],x}function Nt(t){const e=M.c(26),{item:l,onClose:i}=t;let n;e[0]!==l.className?(n=G("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",l.className),e[0]=l.className,e[1]=n):n=e[1];const r=n;if(l.href){const m=l.external?"_blank":void 0,f=l.external?"noopener noreferrer":void 0;let u;e[2]!==l.icon?(u=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:l.icon}),e[2]=l.icon,e[3]=u):u=e[3];let p;e[4]!==l.label?(p=s.jsx("span",{className:"flex-1",children:l.label}),e[4]=l.label,e[5]=p):p=e[5];let h;return e[6]!==r||e[7]!==l.href||e[8]!==i||e[9]!==m||e[10]!==f||e[11]!==u||e[12]!==p?(h=s.jsxs("a",{href:l.href,target:m,rel:f,className:r,onClick:i,children:[u,p]}),e[6]=r,e[7]=l.href,e[8]=i,e[9]=m,e[10]=f,e[11]=u,e[12]=p,e[13]=h):h=e[13],h}let o;e[14]!==l||e[15]!==i?(o=()=>{l.onClick?.(),i()},e[14]=l,e[15]=i,e[16]=o):o=e[16];let a;e[17]!==l.icon?(a=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:l.icon}),e[17]=l.icon,e[18]=a):a=e[18];let d;e[19]!==l.label?(d=s.jsx("span",{className:"flex-1",children:l.label}),e[19]=l.label,e[20]=d):d=e[20];let c;return e[21]!==r||e[22]!==o||e[23]!==a||e[24]!==d?(c=s.jsxs("button",{type:"button",onClick:o,className:r,children:[a,d]}),e[21]=r,e[22]=o,e[23]=a,e[24]=d,e[25]=c):c=e[25],c}function Ti(){const t=M.c(4),e=B();let l;t[0]!==e?(l=e("common.accountPopover.impersonating"),t[0]=e,t[1]=l):l=t[1];let i;return t[2]!==l?(i=s.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:l}),t[2]=l,t[3]=i):i=t[3],i}function vs(t){const e=M.c(38),{user:l,userImage:i,isImpersonating:n,isMobile:r}=t,o=B(),a=r?"py-4 border-b border-border":"py-3 mx-1 mt-1";let d;e[0]!==a?(d=G("flex items-center gap-3 px-4",a),e[0]=a,e[1]=d):d=e[1];const c=l?.name??"U";let m;e[2]!==c||e[3]!==i?(m=s.jsx(is,{url:i,fallback:c,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=c,e[3]=i,e[4]=m):m=e[4];let f;e[5]!==o||e[6]!==l?.name?(f=l?.name??o("common.accountPopover.defaultUserName"),e[5]=o,e[6]=l?.name,e[7]=f):f=e[7];let u;e[8]!==f?(u=s.jsx("p",{className:"text-sm font-medium truncate",children:f}),e[8]=f,e[9]=u):u=e[9];let p;e[10]!==n?(p=n&&s.jsx(Ti,{}),e[10]=n,e[11]=p):p=e[11];let h;e[12]!==u||e[13]!==p?(h=s.jsxs("div",{className:"flex items-center gap-2",children:[u,p]}),e[12]=u,e[13]=p,e[14]=h):h=e[14];const b=l?.email;let g;e[15]!==b?(g=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:b}),e[15]=b,e[16]=g):g=e[16];let x;e[17]!==g||e[18]!==h?(x=s.jsxs("div",{className:"flex-1 min-w-0",children:[h,g]}),e[17]=g,e[18]=h,e[19]=x):x=e[19];let j;e[20]!==o||e[21]!==l?(j=()=>{l?.id&&navigator.clipboard.writeText(l.id).then(()=>{Ht.success(o("common.accountPopover.userIdCopied"))})},e[20]=o,e[21]=l,e[22]=j):j=e[22];let y;e[23]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(jn,{size:14}),e[23]=y):y=e[23];let v;e[24]!==j?(v=s.jsx(Wt,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:y})}),e[24]=j,e[25]=v):v=e[25];let _;e[26]!==o?(_=o("common.accountPopover.copyUserId"),e[26]=o,e[27]=_):_=e[27];let w;e[28]!==_?(w=s.jsx(qt,{side:"right",children:s.jsx("p",{className:"text-xs",children:_})}),e[28]=_,e[29]=w):w=e[29];let S;e[30]!==v||e[31]!==w?(S=s.jsx(Xs,{delayDuration:300,children:s.jsxs(Kt,{children:[v,w]})}),e[30]=v,e[31]=w,e[32]=S):S=e[32];let k;return e[33]!==x||e[34]!==S||e[35]!==d||e[36]!==m?(k=s.jsxs("div",{className:d,children:[m,x,S]}),e[33]=x,e[34]=S,e[35]=d,e[36]=m,e[37]=k):k=e[37],k}function ys(t){const e=M.c(35),{themeOptions:l,preferences:i,setPreferences:n,isMobile:r}=t,o=B(),a=r?"size-8":"size-7",d=r?"px-3 py-3":"px-2 py-1.5";let c;e[0]!==d?(c=G("flex items-center justify-between border-t border-border/50",d),e[0]=d,e[1]=c):c=e[1];let m;if(e[2]!==a||e[3]!==i.theme||e[4]!==n||e[5]!==l){let _;e[7]!==a||e[8]!==i.theme||e[9]!==n?(_=w=>{const{value:S,icon:k,label:N}=w;return s.jsx("button",{type:"button","aria-label":N,onClick:()=>n(A=>({...A,theme:S})),className:G(a,"rounded-md flex items-center justify-center transition-colors",i.theme===S?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:k},S)},e[7]=a,e[8]=i.theme,e[9]=n,e[10]=_):_=e[10],m=l.map(_),e[2]=a,e[3]=i.theme,e[4]=n,e[5]=l,e[6]=m}else m=e[6];let f;e[11]!==m?(f=s.jsx("div",{className:"flex items-center gap-0.5",children:m}),e[11]=m,e[12]=f):f=e[12];let u;e[13]!==i.enableSounds||e[14]!==o?(u=i.enableSounds?o("common.accountPopover.disableSounds"):o("common.accountPopover.enableSounds"),e[13]=i.enableSounds,e[14]=o,e[15]=u):u=e[15];let p;e[16]!==n?(p=()=>n(Ii),e[16]=n,e[17]=p):p=e[17];const h=i.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let b;e[18]!==a||e[19]!==h?(b=G(a,"rounded-md flex items-center justify-center transition-colors",h),e[18]=a,e[19]=h,e[20]=b):b=e[20];let g;e[21]!==i.enableSounds?(g=i.enableSounds?s.jsx(on,{size:14}):s.jsx(rn,{size:14}),e[21]=i.enableSounds,e[22]=g):g=e[22];let x;e[23]!==u||e[24]!==p||e[25]!==b||e[26]!==g?(x=s.jsx("button",{type:"button","aria-label":u,onClick:p,className:b,children:g}),e[23]=u,e[24]=p,e[25]=b,e[26]=g,e[27]=x):x=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.167.4"]}),e[28]=j):j=e[28];let y;e[29]!==x?(y=s.jsxs("div",{className:"flex items-center gap-2",children:[x,j]}),e[29]=x,e[30]=y):y=e[30];let v;return e[31]!==y||e[32]!==c||e[33]!==f?(v=s.jsxs("div",{className:c,children:[f,y]}),e[31]=y,e[32]=c,e[33]=f,e[34]=v):v=e[34],v}function Ii(t){return{...t,enableSounds:!t.enableSounds}}function _s(t){const e=M.c(54),{user:l,userImage:i,menuItems:n,signOutItem:r,stopImpersonatingItem:o,isImpersonating:a,themeOptions:d,preferences:c,setPreferences:m,close:f,isMobile:u}=t;if(u){let v;e[0]!==a||e[1]!==l||e[2]!==i?(v=s.jsx(vs,{user:l,userImage:i,isImpersonating:a,isMobile:!0}),e[0]=a,e[1]=l,e[2]=i,e[3]=v):v=e[3];let _;if(e[4]!==f||e[5]!==n){let $;e[7]!==f?($=P=>s.jsx(Nt,{item:P,onClose:f},P.key),e[7]=f,e[8]=$):$=e[8],_=n.map($),e[4]=f,e[5]=n,e[6]=_}else _=e[6];let w;e[9]!==f||e[10]!==o?(w=o&&s.jsx(Nt,{item:o,onClose:f}),e[9]=f,e[10]=o,e[11]=w):w=e[11];let S;e[12]!==f||e[13]!==r?(S=s.jsx(Nt,{item:r,onClose:f}),e[12]=f,e[13]=r,e[14]=S):S=e[14];let k;e[15]!==_||e[16]!==w||e[17]!==S?(k=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[_,w,S]})}),e[15]=_,e[16]=w,e[17]=S,e[18]=k):k=e[18];let N;e[19]!==c||e[20]!==m||e[21]!==d?(N=s.jsx(ys,{themeOptions:d,preferences:c,setPreferences:m,isMobile:!0}),e[19]=c,e[20]=m,e[21]=d,e[22]=N):N=e[22];let A;return e[23]!==v||e[24]!==k||e[25]!==N?(A=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[v,k,N]}),e[23]=v,e[24]=k,e[25]=N,e[26]=A):A=e[26],A}let p;e[27]!==a||e[28]!==l||e[29]!==i?(p=s.jsx(vs,{user:l,userImage:i,isImpersonating:a,isMobile:!1}),e[27]=a,e[28]=l,e[29]=i,e[30]=p):p=e[30];let h;if(e[31]!==f||e[32]!==n){let v;e[34]!==f?(v=_=>s.jsx(Nt,{item:_,onClose:f},_.key),e[34]=f,e[35]=v):v=e[35],h=n.map(v),e[31]=f,e[32]=n,e[33]=h}else h=e[33];let b;e[36]!==f||e[37]!==o?(b=o&&s.jsx(Nt,{item:o,onClose:f}),e[36]=f,e[37]=o,e[38]=b):b=e[38];let g;e[39]!==f||e[40]!==r?(g=s.jsx(Nt,{item:r,onClose:f}),e[39]=f,e[40]=r,e[41]=g):g=e[41];let x;e[42]!==h||e[43]!==b||e[44]!==g?(x=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[h,b,g]}),e[42]=h,e[43]=b,e[44]=g,e[45]=x):x=e[45];let j;e[46]!==c||e[47]!==m||e[48]!==d?(j=s.jsx(ys,{themeOptions:d,preferences:c,setPreferences:m,isMobile:!1}),e[46]=c,e[47]=m,e[48]=d,e[49]=j):j=e[49];let y;return e[50]!==p||e[51]!==x||e[52]!==j?(y=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[p,x,j]})}),e[50]=p,e[51]=x,e[52]=j,e[53]=y):y=e[53],y}function os(){const t=M.c(107),e=B(),{data:l}=Ft.useSession(),{org:i}=pe(),n=Me();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org",shouldThrow:!1},t[0]=r):r=t[0];const a=vl(r)?.params.org,[d,c]=yl(),m=Fs(),{isAdmin:f}=Mn(),u=An(),[p,h]=L.useState(!1),[b,g]=L.useState(!1),x=l?.user,j=x?.image,y=!!l?.session?.impersonatedBy;let v;t[1]===Symbol.for("react.memo_cache_sentinel")?(v=()=>h(!1),t[1]=v):v=t[1];const _=v;let w;t[2]!==e?(w=e("common.accountPopover.preferences"),t[2]=e,t[3]=w):w=t[3];let S;t[4]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Vt,{size:16}),t[4]=S):S=t[4];let k;t[5]!==n||t[6]!==a?(k=()=>{n({to:"/$org/settings/profile",params:{org:a??""}})},t[5]=n,t[6]=a,t[7]=k):k=t[7];let N;t[8]!==w||t[9]!==k?(N={key:"preferences",label:w,icon:S,onClick:k},t[8]=w,t[9]=k,t[10]=N):N=t[10];let A;t[11]!==i||t[12]!==n?(A=i?[{key:"connect-clients",label:"Connect to Agents",icon:s.jsx(_n,{size:16}),onClick:()=>{n({to:"/$org/settings/connect",params:{org:i.slug}})}}]:[],t[11]=i,t[12]=n,t[13]=A):A=t[13];let $;t[14]!==u||t[15]!==e?($=ql()&&!u?[{key:"install-on-mac",label:e("downloadApp.installOnMac"),icon:s.jsx(vn,{size:16}),onClick:()=>g(!0)}]:[],t[14]=u,t[15]=e,t[16]=$):$=t[16];let P;t[17]!==e?(P=e("common.accountPopover.termsOfUse"),t[17]=e,t[18]=P):P=t[18];let O;t[19]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(nn,{size:16}),t[19]=O):O=t[19];let D;t[20]!==P?(D={key:"terms",label:P,icon:O,href:"https://www.decocms.com/terms-of-use",external:!0},t[20]=P,t[21]=D):D=t[21];let T;t[22]!==e?(T=e("common.accountPopover.privacyPolicy"),t[22]=e,t[23]=T):T=t[23];let E;t[24]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(wn,{size:16}),t[24]=E):E=t[24];let z;t[25]!==T?(z={key:"privacy",label:T,icon:E,href:"https://www.decocms.com/privacy-policy",external:!0},t[25]=T,t[26]=z):z=t[26];let I;t[27]!==e?(I=e("common.accountPopover.githubRepo"),t[27]=e,t[28]=I):I=t[28];let H;t[29]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(_l,{className:"w-4 h-4"}),t[29]=H):H=t[29];let Y;t[30]!==I?(Y={key:"github",label:I,icon:H,href:"https://github.com/decocms/studio",external:!0},t[30]=I,t[31]=Y):Y=t[31];let F;t[32]!==e?(F=e("common.accountPopover.community"),t[32]=e,t[33]=F):F=t[33];let U;t[34]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(Cn,{size:16}),t[34]=U):U=t[34];let K;t[35]!==F?(K={key:"community",label:F,icon:U,href:"https://decocms.com/discord",external:!0},t[35]=F,t[36]=K):K=t[36];let Q;t[37]!==e?(Q=e("common.accountPopover.homepage"),t[37]=e,t[38]=Q):Q=t[38];let se;t[39]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsx(yn,{size:16}),t[39]=se):se=t[39];let J;t[40]!==Q?(J={key:"homepage",label:Q,icon:se,href:"https://decocms.com",external:!0},t[40]=Q,t[41]=J):J=t[41];let me;t[42]!==f||t[43]!==n||t[44]!==e?(me=f?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:s.jsx(ln,{size:16}),onClick:()=>n({to:"/_admin"}),className:"text-warning"}]:[],t[42]=f,t[43]=n,t[44]=e,t[45]=me):me=t[45];let he;t[46]!==D||t[47]!==z||t[48]!==Y||t[49]!==K||t[50]!==J||t[51]!==me||t[52]!==N||t[53]!==A||t[54]!==$?(he=[N,...A,...$,D,z,Y,K,J,...me],t[46]=D,t[47]=z,t[48]=Y,t[49]=K,t[50]=J,t[51]=me,t[52]=N,t[53]=A,t[54]=$,t[55]=he):he=t[55];const fe=he;let xe;t[56]!==e?(xe=e("common.accountPopover.signOut"),t[56]=e,t[57]=xe):xe=t[57];let ge;t[58]===Symbol.for("react.memo_cache_sentinel")?(ge=s.jsx(bs,{size:16}),t[58]=ge):ge=t[58];let Ae;t[59]!==xe?(Ae={key:"logout",label:xe,icon:ge,onClick:$i},t[59]=xe,t[60]=Ae):Ae=t[60];const Se=Ae;let we;t[61]!==y||t[62]!==e?(we=y?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:s.jsx(bs,{size:16}),onClick:async()=>{const{error:Ie}=await Ft.admin.stopImpersonating();if(Ie){Ht.error(Ie.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[61]=y,t[62]=e,t[63]=we):we=t[63];const wt=we;let Te;t[64]===Symbol.for("react.memo_cache_sentinel")?(Te=s.jsx(Nn,{size:14}),t[64]=Te):Te=t[64];let Ne;t[65]!==e?(Ne=e("common.accountPopover.lightTheme"),t[65]=e,t[66]=Ne):Ne=t[66];let V;t[67]!==Ne?(V={value:"light",icon:Te,label:Ne},t[67]=Ne,t[68]=V):V=t[68];let be;t[69]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(kn,{size:14}),t[69]=be):be=t[69];let Z;t[70]!==e?(Z=e("common.accountPopover.darkTheme"),t[70]=e,t[71]=Z):Z=t[71];let ie;t[72]!==Z?(ie={value:"dark",icon:be,label:Z},t[72]=Z,t[73]=ie):ie=t[73];let ke;t[74]===Symbol.for("react.memo_cache_sentinel")?(ke=s.jsx(Sn,{size:14}),t[74]=ke):ke=t[74];let oe;t[75]!==e?(oe=e("common.accountPopover.systemTheme"),t[75]=e,t[76]=oe):oe=t[76];let ee;t[77]!==oe?(ee={value:"system",icon:ke,label:oe},t[77]=oe,t[78]=ee):ee=t[78];let je;t[79]!==V||t[80]!==ie||t[81]!==ee?(je=[V,ie,ee],t[79]=V,t[80]=ie,t[81]=ee,t[82]=je):je=t[82];const Ce=je;let ve;t[83]!==y||t[84]!==m||t[85]!==fe||t[86]!==d||t[87]!==c||t[88]!==Se||t[89]!==wt||t[90]!==Ce||t[91]!==x||t[92]!==j?(ve={user:x,userImage:j,menuItems:fe,signOutItem:Se,stopImpersonatingItem:wt,isImpersonating:y,themeOptions:Ce,preferences:d,setPreferences:c,close:_,isMobile:m},t[83]=y,t[84]=m,t[85]=fe,t[86]=d,t[87]=c,t[88]=Se,t[89]=wt,t[90]=Ce,t[91]=x,t[92]=j,t[93]=ve):ve=t[93];const X=ve;let re;t[94]!==y||t[95]!==m||t[96]!==p||t[97]!==X||t[98]!==e||t[99]!==x?.name||t[100]!==j?(re=m?s.jsxs(xn,{open:p,onOpenChange:h,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>h(!0),className:G("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",y&&"border-2 border-dashed border-warning"),children:[s.jsx(is,{url:j,fallback:x?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:x?.name??e("common.accountPopover.defaultAccountLabel")})]}),s.jsxs(gn,{className:"h-[80dvh] p-0",children:[s.jsx(bn,{className:"sr-only",children:e("common.accountPopover.account")}),s.jsx(_s,{...X})]})]}):s.jsxs(Ks,{open:p,onOpenChange:h,children:[s.jsx(Vs,{asChild:!0,children:s.jsxs(de,{tooltip:x?.name??e("common.accountPopover.defaultAccountLabel"),className:G("rounded-md",y&&"border-2 border-dashed border-warning"),children:[s.jsx(is,{url:j,fallback:x?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:x?.name??e("common.accountPopover.defaultAccountLabel")})]})}),s.jsx(Ys,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Pi,children:s.jsx(_s,{...X})})]}),t[94]=y,t[95]=m,t[96]=p,t[97]=X,t[98]=e,t[99]=x?.name,t[100]=j,t[101]=re):re=t[101];let te;t[102]!==b?(te=s.jsx(Kl,{open:b,onOpenChange:g}),t[102]=b,t[103]=te):te=t[103];let ye;return t[104]!==re||t[105]!==te?(ye=s.jsxs(s.Fragment,{children:[re,te]}),t[104]=re,t[105]=te,t[106]=ye):ye=t[106],ye}function Pi(t){return t.preventDefault()}function $i(){ce("signed_out",{source:"account_popover"}),Sl(),Ft.signOut()}class Oi extends L.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,l){}render(){return this.state.hasError?null:this.props.children}}function zi(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function Di(){const t=M.c(17),e=Me(),{org:l}=pe(),{hasDecoKey:i,balanceDollars:n}=fn();if(!i)return null;let r;t[0]!==n?(r=n!=null?`Credits: $${n.toFixed(2)}`:"Credits",t[0]=n,t[1]=r):r=t[1];let o;t[2]!==n?(o=G(n!=null&&zi(n)),t[2]=n,t[3]=o):o=t[3];let a;t[4]!==e||t[5]!==l.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:l.slug}}),t[4]=e,t[5]=l.slug,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(an,{}),t[7]=d):d=t[7];let c;t[8]!==n?(c=n!=null?`$${n.toFixed(2)}`:"Credits",t[8]=n,t[9]=c):c=t[9];let m;t[10]!==c?(m=s.jsx("span",{children:c}),t[10]=c,t[11]=m):m=t[11];let f;return t[12]!==r||t[13]!==o||t[14]!==a||t[15]!==m?(f=s.jsx(ue,{children:s.jsx(ne,{children:s.jsxs(de,{tooltip:r,className:o,onClick:a,children:[d,m]})})}),t[12]=r,t[13]=o,t[14]=a,t[15]=m,t[16]=f):f=t[16],f}function Ss(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Oi,{children:s.jsx(L.Suspense,{fallback:null,children:s.jsx(Di,{})})}),t[0]=e):e=t[0],e}function Ei(){const t=M.c(14),e=B(),l=Me(),{org:i}=pe();let n;t[0]!==e?(n=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==l||t[3]!==i.slug?(r=()=>l({to:"/$org/settings",params:{org:i.slug}}),t[2]=l,t[3]=i.slug,t[4]=r):r=t[4];let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Vt,{}),t[5]=o):o=t[5];let a;t[6]!==e?(a=e("sidebar.sidebarFooter.settings"),t[6]=e,t[7]=a):a=t[7];let d;t[8]!==a?(d=s.jsx("span",{children:a}),t[8]=a,t[9]=d):d=t[9];let c;return t[10]!==n||t[11]!==r||t[12]!==d?(c=s.jsxs(de,{tooltip:n,onClick:r,children:[o,d]}),t[10]=n,t[11]=r,t[12]=d,t[13]=c):c=t[13],c}function Ri(){const t=M.c(9),e=B(),l=Me(),{org:i}=pe();let n;t[0]!==e?(n=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==l||t[3]!==i.slug?(r=()=>l({to:"/$org/settings",params:{org:i.slug}}),t[2]=l,t[3]=i.slug,t[4]=r):r=t[4];let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Vt,{size:15}),t[5]=o):o=t[5];let a;return t[6]!==n||t[7]!==r?(a=s.jsx("button",{type:"button","aria-label":n,onClick:r,className:"shrink-0 flex items-center justify-center size-7 rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",children:o}),t[6]=n,t[7]=r,t[8]=a):a=t[8],a}function Ns(){const t=M.c(29),e=B(),[l,i]=L.useState(!1);let n;t[0]!==e?(n=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=n):n=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ws,{}),t[2]=r):r=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let a;t[5]!==o?(a=s.jsx("span",{children:o}),t[5]=o,t[6]=a):a=t[6];let d;t[7]!==n||t[8]!==a?(d=s.jsx(ne,{children:s.jsx(Qs,{trigger:s.jsxs(de,{tooltip:n,children:[r,a]})})}),t[7]=n,t[8]=a,t[9]=d):d=t[9];let c;t[10]!==e?(c=e("sidebar.sidebarFooter.addConnection"),t[10]=e,t[11]=c):c=t[11];let m,f;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=()=>i(!0),f=s.jsx(Tn,{}),t[12]=m,t[13]=f):(m=t[12],f=t[13]);let u;t[14]!==e?(u=e("sidebar.sidebarFooter.addConnection"),t[14]=e,t[15]=u):u=t[15];let p;t[16]!==u?(p=s.jsx("span",{children:u}),t[16]=u,t[17]=p):p=t[17];let h;t[18]!==c||t[19]!==p?(h=s.jsx(ne,{children:s.jsxs(de,{tooltip:c,onClick:m,children:[f,p]})}),t[18]=c,t[19]=p,t[20]=h):h=t[20];let b;t[21]!==h||t[22]!==d?(b=s.jsxs(ue,{className:"gap-0.5",children:[d,h]}),t[21]=h,t[22]=d,t[23]=b):b=t[23];let g;t[24]!==l?(g=s.jsx(un,{open:l,onOpenChange:i,mode:"browse"}),t[24]=l,t[25]=g):g=t[25];let x;return t[26]!==b||t[27]!==g?(x=s.jsxs(s.Fragment,{children:[b,g]}),t[26]=b,t[27]=g,t[28]=x):x=t[28],x}function ks(){const t=M.c(10),e=B();let l;t[0]!==e?(l=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=l):l=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ws,{}),t[2]=i):i=t[2];let n;t[3]!==e?(n=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=n):n=t[4];let r;t[5]!==n?(r=s.jsx("span",{children:n}),t[5]=n,t[6]=r):r=t[6];let o;return t[7]!==l||t[8]!==r?(o=s.jsx(ue,{className:"gap-0.5",children:s.jsx(ne,{children:s.jsx(Qs,{trigger:s.jsxs(de,{tooltip:l,children:[i,r]})})})}),t[7]=l,t[8]=r,t[9]=o):o=t[9],o}function Fi(){const t=M.c(17),{state:e}=kt(),l=e==="collapsed",i=ms(),n=!i;if(l){let c;t[0]!==n?(c=n&&s.jsx(Ss,{}),t[0]=n,t[1]=c):c=t[1];let m;t[2]!==i?(m=i?s.jsx(ks,{}):s.jsx(Ns,{}),t[2]=i,t[3]=m):m=t[3];let f;t[4]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(ne,{children:s.jsx(Ei,{})}),t[4]=f):f=t[4];let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsxs(ue,{children:[f,s.jsx(ne,{children:s.jsx(os,{})})]}),t[5]=u):u=t[5];let p;return t[6]!==c||t[7]!==m?(p=s.jsxs(ls,{className:"px-2 pb-3 gap-1",children:[c,m,u]}),t[6]=c,t[7]=m,t[8]=p):p=t[8],p}let r;t[9]!==n?(r=n&&s.jsx(Ss,{}),t[9]=n,t[10]=r):r=t[10];let o;t[11]!==i?(o=i?s.jsx(ks,{}):s.jsx(Ns,{}),t[11]=i,t[12]=o):o=t[12];let a;t[13]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(ue,{className:"gap-0.5",children:s.jsx(ne,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(os,{})}),s.jsx(Ri,{})]})})}),t[13]=a):a=t[13];let d;return t[14]!==r||t[15]!==o?(d=s.jsxs(ls,{className:"px-2 pb-3 gap-0.5",children:[r,o,a]}),t[14]=r,t[15]=o,t[16]=d):d=t[16],d}function Li(){const t=M.c(11),e=B(),l=Me(),{org:i}=pe(),{setOpenMobile:n}=kt();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(ue,{children:s.jsx(ne,{children:s.jsx(os,{})})})}),t[0]=r):r=t[0];let o;t[1]!==e?(o=e("sidebar.sidebarFooterMobile.settings"),t[1]=e,t[2]=o):o=t[2];let a;t[3]!==l||t[4]!==i.slug||t[5]!==n?(a=()=>{l({to:"/$org/settings",params:{org:i.slug}}),n(!1)},t[3]=l,t[4]=i.slug,t[5]=n,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Vt,{className:"size-4"}),t[7]=d):d=t[7];let c;return t[8]!==o||t[9]!==a?(c=s.jsx(ls,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[r,s.jsx(Ut,{"aria-label":o,onClick:a,children:d})]})}),t[8]=o,t[9]=a,t[10]=c):c=t[10],c}function ws(t){const e=M.c(15),{className:l,wrapperClassName:i,children:n}=t,[r,o]=L.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=x=>{x&&o(x.scrollHeight>x.clientHeight+1)},e[0]=a):a=e[0];const d=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=x=>{const j=x.currentTarget;o(j.scrollHeight-j.scrollTop>j.clientHeight+1)},e[1]=c):c=e[1];const m=c;let f;e[2]!==i?(f=G("relative",i),e[2]=i,e[3]=f):f=e[3];let u;e[4]!==n||e[5]!==l?(u=s.jsx("div",{ref:d,onScroll:m,className:l,children:n}),e[4]=n,e[5]=l,e[6]=u):u=e[6];const p=r?"opacity-100":"opacity-0";let h;e[7]!==p?(h=G("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",p),e[7]=p,e[8]=h):h=e[8];let b;e[9]!==h?(b=s.jsx("div",{"aria-hidden":!0,className:h}),e[9]=h,e[10]=b):b=e[10];let g;return e[11]!==f||e[12]!==u||e[13]!==b?(g=s.jsxs("div",{className:f,children:[u,b]}),e[11]=f,e[12]=u,e[13]=b,e[14]=g):g=e[14],g}function Gi(t){const e=M.c(9),{virtualMcpId:l,size:i,showAutomationBadge:n}=t,r=i===void 0?"sm":i,o=B();let a;e[0]!==r||e[1]!==l?(a=l?s.jsx(Bi,{virtualMcpId:l,size:r}):s.jsx(Lt,{icon:null,name:"?",size:r}),e[0]=r,e[1]=l,e[2]=a):a=e[2];let d;e[3]!==n||e[4]!==o?(d=n&&s.jsx("span",{"aria-label":o("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-blue-500 border border-blue-600 text-white",children:s.jsx(tl,{size:10,className:"text-white"})}),e[3]=n,e[4]=o,e[5]=d):d=e[5];let c;return e[6]!==a||e[7]!==d?(c=s.jsxs("div",{className:"relative shrink-0",children:[a,d]}),e[6]=a,e[7]=d,e[8]=c):c=e[8],c}function Bi(t){const e=M.c(6),{virtualMcpId:l,size:i}=t,n=el(l);if(!n){let a;return e[0]!==i?(a=s.jsx(Lt,{icon:null,name:"?",size:i}),e[0]=i,e[1]=a):a=e[1],a}const r=n.icon??null;let o;return e[2]!==n.title||e[3]!==i||e[4]!==r?(o=s.jsx(Lt,{icon:r,name:n.title,size:i}),e[2]=n.title,e[3]=i,e[4]=r,e[5]=o):o=e[5],o}function es(t){const e=M.c(51),{open:l,onOpenChange:i}=t,[n,r]=L.useState(""),{org:o}=pe(),{setTaskId:a}=Zs(),d=us(),c=B();let m,f,u;e[0]!==o.id||e[1]!==n?(u=n.trim(),f=Nl,m=zs.globalSearch(o.id,u),e[0]=o.id,e[1]=n,e[2]=m,e[3]=f,e[4]=u):(m=e[2],f=e[3],u=e[4]);let p;e[5]!==d||e[6]!==u?(p=async()=>await d.call("GLOBAL_SEARCH",{query:u,limit:u?20:10}),e[5]=d,e[6]=u,e[7]=p):p=e[7];let h;e[8]!==l||e[9]!==m||e[10]!==p?(h={queryKey:m,enabled:l,queryFn:p,staleTime:1e4},e[8]=l,e[9]=m,e[10]=p,e[11]=h):h=e[11];const{data:b,isFetching:g}=f(h);let x;e[12]!==b?.items?(x=b?.items??[],e[12]=b?.items,e[13]=x):x=e[13];const j=x;let y;e[14]!==i?(y=I=>{I||r(""),i(I)},e[14]=i,e[15]=y):y=e[15];const v=y;let _;e[16]!==v||e[17]!==a?(_=I=>{v(!1),a(I.id,I.virtual_mcp_id??void 0)},e[16]=v,e[17]=a,e[18]=_):_=e[18];const w=_;let S;e[19]!==c?(S=c("tasksPanel.globalSearchDialog.title"),e[19]=c,e[20]=S):S=e[20];let k;e[21]!==S?(k=s.jsx(Ls,{children:S}),e[21]=S,e[22]=k):k=e[22];let N;e[23]!==c?(N=c("tasksPanel.globalSearchDialog.description"),e[23]=c,e[24]=N):N=e[24];let A;e[25]!==N?(A=s.jsx(Bl,{children:N}),e[25]=N,e[26]=A):A=e[26];let $;e[27]!==A||e[28]!==k?($=s.jsxs(Hl,{className:"sr-only",children:[k,A]}),e[27]=A,e[28]=k,e[29]=$):$=e[29];let P;e[30]!==c?(P=c("tasksPanel.globalSearchDialog.placeholder"),e[30]=c,e[31]=P):P=e[31];let O;e[32]!==n||e[33]!==P?(O=s.jsx(Bn,{value:n,onValueChange:r,placeholder:P}),e[32]=n,e[33]=P,e[34]=O):O=e[34];let D;e[35]!==w||e[36]!==g||e[37]!==j||e[38]!==c||e[39]!==u?(D=s.jsx(Rn,{children:g&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c("tasksPanel.globalSearchDialog.searching")}):j.length===0?s.jsx(Fn,{children:c("tasksPanel.globalSearchDialog.noResults")}):s.jsx(Ln,{heading:u?void 0:c("tasksPanel.globalSearchDialog.recent"),children:j.map(I=>I.type==="thread"?s.jsxs(Gn,{value:`thread:${I.id}:${I.title}`,onSelect:()=>w(I),className:"gap-2.5",children:[s.jsx(Gi,{virtualMcpId:I.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:I.title||c("tasksPanel.globalSearchDialog.untitledChat")})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(I.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${I.id}`):null)})}),e[35]=w,e[36]=g,e[37]=j,e[38]=c,e[39]=u,e[40]=D):D=e[40];let T;e[41]!==O||e[42]!==D?(T=s.jsxs(Hn,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[O,D]}),e[41]=O,e[42]=D,e[43]=T):T=e[43];let E;e[44]!==$||e[45]!==T?(E=s.jsxs(Ul,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[$,T]}),e[44]=$,e[45]=T,e[46]=E):E=e[46];let z;return e[47]!==v||e[48]!==l||e[49]!==E?(z=s.jsx(Gs,{open:l,onOpenChange:v,children:E}),e[47]=v,e[48]=l,e[49]=E,e[50]=z):z=e[50],z}function Hi(t){return t==="ephemeral"||t.startsWith("thread:")}function al(t){const e=M.c(45),{task:l,isActive:i,onClick:n,onArchive:r,showAutomationBadge:o,showAgentIcon:a,hideStatusIdle:d,indented:c}=t,m=B(),f=qn(l.status),u=f.icon,p=l.metadata?.kind==="tool_call_run",h=el(p?void 0:l.virtual_mcp_id);let b;e[0]!==h?(b=Xn(h),e[0]=h,e[1]=b):b=e[1];const g=b;Kn(6e4);const x=o||!!l.trigger_id,j=l.id,y="button",v=0;let _;e[2]!==n?(_=F=>{F.target===F.currentTarget&&(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),n())},e[2]=n,e[3]=_):_=e[3];const w=c?"-ml-4 pl-6":"pl-[7px]",S=i?"bg-accent text-accent-foreground":"hover:bg-accent/60";let k;e[4]!==w||e[5]!==S?(k=G("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",w,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",S),e[4]=w,e[5]=S,e[6]=k):k=e[6];let N;e[7]!==p||e[8]!==a||e[9]!==h?.icon||e[10]!==h?.title?(N=a&&!p&&s.jsx(Lt,{icon:h?.icon??null,name:h?.title??"?",size:"2xs"}),e[7]=p,e[8]=a,e[9]=h?.icon,e[10]=h?.title,e[11]=N):N=e[11];let A;e[12]!==x||e[13]!==m?(A=x&&s.jsx(tl,{size:12,"aria-label":m("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-blue-500"}),e[12]=x,e[13]=m,e[14]=A):A=e[14];let $;e[15]!==m||e[16]!==l.title?($=l.title||m("tasksPanel.taskRow.untitledTask"),e[15]=m,e[16]=l.title,e[17]=$):$=e[17];let P;e[18]!==$?(P=s.jsx("div",{className:"text-sm text-foreground truncate",children:$}),e[18]=$,e[19]=P):P=e[19];let O;e[20]!==A||e[21]!==P?(O=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[A,P]}),e[20]=A,e[21]=P,e[22]=O):O=e[22];let D;e[23]!==g||e[24]!==i||e[25]!==l.branch||e[26]!==l.updated_at?(D=l.updated_at&&s.jsxs("div",{className:G("flex items-center gap-1 text-[11px] min-w-0",i?"text-accent-foreground/70":"text-muted-foreground/60"),children:[l.branch&&!Hi(l.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:l.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):g?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[g.owner,"/",g.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:Yn(new Date(l.updated_at))})]}),e[23]=g,e[24]=i,e[25]=l.branch,e[26]=l.updated_at,e[27]=D):D=e[27];let T;e[28]!==O||e[29]!==D?(T=s.jsxs("div",{className:"flex-1 min-w-0",children:[O,D]}),e[28]=O,e[29]=D,e[30]=T):T=e[30];const E="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",z=!d&&s.jsx("span",{className:G("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",r&&"group-hover/row:opacity-0"),"aria-label":m("tasksPanel.taskRow.statusLabel",{status:f.label}),children:s.jsx(u,{size:14,className:G(f.iconClassName,l.status==="in_progress"&&"animate-spin")})});let I;e[31]!==r||e[32]!==m?(I=r&&s.jsxs(Kt,{children:[s.jsx(Wt,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":m("tasksPanel.taskRow.archiveTask"),onClick:F=>{F.stopPropagation(),r()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto transition-opacity flex size-8 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx(kl,{size:14})})}),s.jsx(qt,{side:"right",children:m("tasksPanel.taskRow.archive")})]}),e[31]=r,e[32]=m,e[33]=I):I=e[33];let H;e[34]!==z||e[35]!==I?(H=s.jsxs("div",{className:E,children:[z,I]}),e[34]=z,e[35]=I,e[36]=H):H=e[36];let Y;return e[37]!==n||e[38]!==T||e[39]!==H||e[40]!==_||e[41]!==k||e[42]!==N||e[43]!==l.id?(Y=s.jsxs("div",{"data-task-id":j,role:y,tabIndex:v,onClick:n,onKeyDown:_,className:k,children:[N,T,H]}),e[37]=n,e[38]=T,e[39]=H,e[40]=_,e[41]=k,e[42]=N,e[43]=l.id,e[44]=Y):Y=e[44],Y}const Cs=["requires_action","in_progress","failed","expired","completed"];function Ui(t){const e=new Map(Cs.map(l=>[l,[]]));for(const l of t){const i=l.status??"completed";(e.get(i)??e.get("completed")).push(l)}return Cs.map(l=>({status:l,threads:e.get(l)}))}const Wi="sidebar.group.expanded.";function qi(t,e){const l=M.c(3),[i,n]=Bt(`${Wi}${t}`,e);let r;return l[0]!==i||l[1]!==n?(r=[i,n],l[0]=i,l[1]=n,l[2]=r):r=l[2],r}function cl(t){const e=M.c(18),{onClick:l,isFetching:i,indented:n}=t,r=B();let o;e[0]!==r?(o=r("sidebar.showMoreButton.ariaLabel"),e[0]=r,e[1]=o):o=e[1];const a=n?"-ml-4 pl-6 pr-2":"px-2";let d;e[2]!==a?(d=G("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",a,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=a,e[3]=d):d=e[3];let c;e[4]!==i?(c=i&&s.jsx(wl,{size:14,className:"animate-spin"}),e[4]=i,e[5]=c):c=e[5];let m;e[6]!==i||e[7]!==r?(m=r(i?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=i,e[7]=r,e[8]=m):m=e[8];let f;e[9]!==m?(f=s.jsx("span",{children:m}),e[9]=m,e[10]=f):f=e[10];let u;return e[11]!==i||e[12]!==l||e[13]!==o||e[14]!==d||e[15]!==c||e[16]!==f?(u=s.jsxs("button",{type:"button","aria-label":o,onClick:l,disabled:i,className:d,children:[c,f]}),e[11]=i,e[12]=l,e[13]=o,e[14]=d,e[15]=c,e[16]=f,e[17]=u):u=e[17],u}function Ki(t,e,l,i){return[t,e,l,i.type,i.member,i.currentUserId??""].join("|")}function Vi(t){return t.member==="mine"&&!t.currentUserId}const dl=4;let Rt=0;const rs=[];function Yi(){for(;Rt<dl&&rs.length>0;){const t=rs.shift();t&&t()}}function ml(t){return new Promise((e,l)=>{const i=()=>{Rt++,t().then(e,l).finally(()=>{Rt--,Yi()})};Rt<dl?i():rs.push(i)})}const Yt=10;function Ms(t,e,l,i,n){const r={hidden:!1};i.member==="mine"&&i.currentUserId&&(r.created_by=i.currentUserId),i.type==="automation"&&(r.has_trigger=!0),i.type==="manual"&&(r.has_trigger=!1);const o={where:r,limit:n,offset:l,orderBy:[{field:["updated_at"],direction:"desc"}]};return o.status=e,o}function Xi(t,e,l,i){let n=0;for(const r of t)fl(r,e,l,i)&&n++;return n}function ts(t,e,l,i){return Xi(t,e,l,i)}function Qi(t,e){return!!(t>=Yt||t===0&&e)}function As(t,e){return t<e}function Ji(t,e){return e===!1?!1:e===!0?!0:t}function fl(t,e,l,i){return!(t.hidden||(t.status??"completed")!==l||i.member==="mine"&&i.currentUserId&&t.created_by!==i.currentUserId||i.type==="automation"&&!t.trigger_id||i.type==="manual"&&t.trigger_id)}const Gt=new Map,Et=new Map;function Zi(t,e){return e?t>=Yt?!0:null:!1}function Ts(t){return Gt.get(t)}function eo(t,e){Gt.set(t,e)}function to(t,e,l){const i=Gt.get(t);if(i!==void 0){l(i);return}let n=Et.get(t);n||(n=ml(e).then(r=>(Gt.set(t,r),Et.delete(t),r)).catch(()=>(Et.delete(t),Promise.reject(new Error("group probe failed")))),Et.set(t,n)),n.then(l,()=>l(!1))}function Is(t){const e=t,l=Array.isArray(e.items)?e.items:[];return{items:l,hasMore:e.hasMore??l.length===Yt,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function so(t,e,l,i,n){let r=0;for(const o of t)e.has(o.id)||fl(o,l,i,n)&&r++;return r}function lo(t,e,l,i){const n=M.c(8),{org:r}=pe(),o=Ki(r.id,t,e,l);let a;n[0]!==l?(a=Vi(l),n[0]=l,n[1]=a):a=n[1];const d=a,[c,m]=L.useState({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==o&&m({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});const f=On(),{threads:u,hasMore:p}=Js(),h=ts(u,t,e,l),b=Qi(h,p),g=Zi(h,p),x=us();if(c.identity===o&&c.serverHasMore===null){const S=g??Ts(o);S!==void 0&&m({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:S})}!d&&c.identity===o&&c.serverHasMore===null&&g===null&&Ts(o)===void 0&&c.probeSubscribedIdentity!==o&&(m(S=>S.identity===o?{...S,isProbing:!0,probeSubscribedIdentity:o}:S),to(o,async()=>{const S=Ms(t,e,0,l,1),k=await x.call("COLLECTION_THREADS_LIST",S),{totalCount:N}=Is(k),A=ts(f.threads.get(),t,e,l);return N===void 0?!1:As(A,N)},S=>{m(k=>k.identity!==o?k:{...k,isProbing:!1,serverHasMore:S})}));const y=async function(){if(c.isFetching||c.isProbing||d)return;const k=o;m(N=>N.identity===k?{...N,isFetching:!0}:N);try{const N=ts(u,t,e,l),A=Ms(t,e,N,l,Yt),$=await ml(()=>x.call("COLLECTION_THREADS_LIST",A)),{items:P,hasMore:O,totalCount:D}=Is($),T=new Set(u.map(no)),E=so(P,T,t,e,l),z=N;f.mergeThreads(P),m(I=>{if(I.identity!==k)return I;let H;return D!==void 0?H=As(z+E,D):H=P.length===0||E===0?!1:O,eo(k,H),{...I,isFetching:!1,serverHasMore:H}})}catch(N){const A=N,$=A instanceof Error?A.message:String(A);Ht.error(`Could not load more tasks: ${$}`),m(P=>P.identity===k?{...P,isFetching:!1}:P)}},v=c.isFetching||c.isProbing,_=!d&&!v&&Ji(b,c.serverHasMore);let w;return n[2]!==v||n[3]!==y||n[4]!==_||n[5]!==c.isProbing||n[6]!==c.serverHasMore?(w={hasMore:_,isFetching:v,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:y},n[2]=v,n[3]=y,n[4]=_,n[5]=c.isProbing,n[6]=c.serverHasMore,n[7]=w):w=n[7],w}function no(t){return t.id}function io(t){const e=M.c(20),{status:l,threads:i,activeTaskId:n,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:d}=t,{isFetching:c,isProbing:m,loadMore:f,hasMore:u,serverHasMore:p}=lo("status",l,d),[h,b]=L.useState(!1);!h&&i.length===0&&p===!0&&!c&&!m&&(b(!0),queueMicrotask(()=>{f()}));let g;if(e[0]!==n||e[1]!==a||e[2]!==d||e[3]!==o||e[4]!==r||e[5]!==i){let y;e[7]!==n||e[8]!==a||e[9]!==d||e[10]!==o||e[11]!==r?(y=v=>s.jsx(al,{task:v,isActive:n===v.id,onClick:()=>r(v),onArchive:a&&v.created_by===d.currentUserId?()=>o(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[7]=n,e[8]=a,e[9]=d,e[10]=o,e[11]=r,e[12]=y):y=e[12],g=i.map(y),e[0]=n,e[1]=a,e[2]=d,e[3]=o,e[4]=r,e[5]=i,e[6]=g}else g=e[6];let x;e[13]!==u||e[14]!==c||e[15]!==f?(x=(u||c)&&s.jsx(cl,{onClick:()=>{f()},isFetching:c,indented:!0}),e[13]=u,e[14]=c,e[15]=f,e[16]=x):x=e[16];let j;return e[17]!==g||e[18]!==x?(j=s.jsxs(s.Fragment,{children:[g,x]}),e[17]=g,e[18]=x,e[19]=j):j=e[19],j}function oo(t){const e=M.c(36),{status:l,threads:i,activeTaskId:n,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:d}=t,c=Vn[l],m=c.icon,[f,u]=qi(`status-${l}`,!1);let p;e[0]!==f||e[1]!==u?(p=function(){u(!f)},e[0]=f,e[1]=u,e[2]=p):p=e[2];const h=p;let b;e[3]!==h?(b=k=>{k.target===k.currentTarget&&(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),h())},e[3]=h,e[4]=b):b=e[4];let g;e[5]!==m||e[6]!==c.iconClassName?(g=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(m,{size:12,className:c.iconClassName})}),e[5]=m,e[6]=c.iconClassName,e[7]=g):g=e[7];let x;e[8]!==f?(x=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:f?s.jsx(Qn,{size:14}):s.jsx(Us,{size:14})}),e[8]=f,e[9]=x):x=e[9];let j;e[10]!==g||e[11]!==x?(j=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[g,x]}),e[10]=g,e[11]=x,e[12]=j):j=e[12];let y;e[13]!==c.label?(y=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=y):y=e[14];let v;e[15]!==i.length?(v=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:i.length})}),e[15]=i.length,e[16]=v):v=e[16];let _;e[17]!==f||e[18]!==h||e[19]!==b||e[20]!==j||e[21]!==y||e[22]!==v?(_=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":f,onClick:h,onKeyDown:b,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-md text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[j,y,v]}),e[17]=f,e[18]=h,e[19]=b,e[20]=j,e[21]=y,e[22]=v,e[23]=_):_=e[23];let w;e[24]!==n||e[25]!==a||e[26]!==f||e[27]!==d||e[28]!==o||e[29]!==r||e[30]!==l||e[31]!==i?(w=f&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(io,{status:l,threads:i,activeTaskId:n,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:d})}),e[24]=n,e[25]=a,e[26]=f,e[27]=d,e[28]=o,e[29]=r,e[30]=l,e[31]=i,e[32]=w):w=e[32];let S;return e[33]!==_||e[34]!==w?(S=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[_,w]}),e[33]=_,e[34]=w,e[35]=S):S=e[35],S}function Ps(t){const e=M.c(38),{threads:l,groupBy:i,activeTaskId:n,onSelectTask:r,onArchiveTask:o,filters:a,hasMore:d,isFetchingMore:c,onLoadMore:m,filtersActive:f}=t;if(l.length===0&&!d&&!c){let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Wn,{className:"size-6 opacity-60"}),e[0]=g):g=e[0];const x=f?"No chats match your filters":"No chats yet";let j;return e[1]!==x?(j=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[g,s.jsx("p",{className:"text-sm",children:x})]}),e[1]=x,e[2]=j):j=e[2],j}const u=l.length>1||d;if(i==="status"){let g;if(e[3]!==n||e[4]!==u||e[5]!==a||e[6]!==o||e[7]!==r||e[8]!==l){let j;e[10]!==n||e[11]!==u||e[12]!==a||e[13]!==o||e[14]!==r?(j=y=>s.jsx(oo,{status:y.status,threads:y.threads,activeTaskId:n,onSelectTask:r,onArchiveTask:o,canArchive:u,filters:a},y.status),e[10]=n,e[11]=u,e[12]=a,e[13]=o,e[14]=r,e[15]=j):j=e[15],g=Ui(l).map(j),e[3]=n,e[4]=u,e[5]=a,e[6]=o,e[7]=r,e[8]=l,e[9]=g}else g=e[9];let x;return e[16]!==g?(x=s.jsx(s.Fragment,{children:g}),e[16]=g,e[17]=x):x=e[17],x}let p;if(e[18]!==n||e[19]!==u||e[20]!==a||e[21]!==o||e[22]!==r||e[23]!==l){let g;e[25]!==n||e[26]!==u||e[27]!==a||e[28]!==o||e[29]!==r?(g=x=>s.jsx(al,{task:x,isActive:n===x.id,onClick:()=>r(x),onArchive:u&&x.created_by===a.currentUserId?()=>o(x):void 0,showAutomationBadge:!!x.trigger_id,showAgentIcon:!0},x.id),e[25]=n,e[26]=u,e[27]=a,e[28]=o,e[29]=r,e[30]=g):g=e[30],p=l.map(g),e[18]=n,e[19]=u,e[20]=a,e[21]=o,e[22]=r,e[23]=l,e[24]=p}else p=e[24];let h;e[31]!==d||e[32]!==c||e[33]!==m?(h=(d||c)&&s.jsx(cl,{onClick:m,isFetching:c}),e[31]=d,e[32]=c,e[33]=m,e[34]=h):h=e[34];let b;return e[35]!==p||e[36]!==h?(b=s.jsxs(s.Fragment,{children:[p,h]}),e[35]=p,e[36]=h,e[37]=b):b=e[37],b}function ro(t,e,l){if(!l)return;const i=t.findIndex(n=>n.id===e);if(i!==-1){for(let n=i+1;n<t.length;n++){const r=t[n];if(r?.created_by===l)return r}for(let n=i-1;n>=0;n--){const r=t[n];if(r?.created_by===l)return r}}}function ao(t){const e=M.c(43),{branch:l,onOutcome:i}=t,n=B();let r;e[0]!==i?(r=S=>{S||i("cancel")},e[0]=i,e[1]=r):r=e[1];let o;e[2]!==n?(o=n("sidebar.archiveWorktreeDialog.title"),e[2]=n,e[3]=o):o=e[3];let a;e[4]!==o?(a=s.jsx(Jn,{children:o}),e[4]=o,e[5]=a):a=e[5];let d;e[6]!==n?(d=n("sidebar.archiveWorktreeDialog.stopsAndDeletesBefore"),e[6]=n,e[7]=d):d=e[7];let c;e[8]!==l?(c=s.jsx("span",{className:"font-mono",children:l}),e[8]=l,e[9]=c):c=e[9];let m;e[10]!==n?(m=n("sidebar.archiveWorktreeDialog.stopsAndDeletesAfter"),e[10]=n,e[11]=m):m=e[11];let f;e[12]!==d||e[13]!==c||e[14]!==m?(f=s.jsxs(Zn,{children:[d," ",c," ",m]}),e[12]=d,e[13]=c,e[14]=m,e[15]=f):f=e[15];let u;e[16]!==a||e[17]!==f?(u=s.jsxs(ei,{children:[a,f]}),e[16]=a,e[17]=f,e[18]=u):u=e[18];let p;e[19]!==i?(p=()=>i("cancel"),e[19]=i,e[20]=p):p=e[20];let h;e[21]!==n?(h=n("sidebar.archiveWorktreeDialog.cancel"),e[21]=n,e[22]=h):h=e[22];let b;e[23]!==h||e[24]!==p?(b=s.jsx(ti,{onClick:p,children:h}),e[23]=h,e[24]=p,e[25]=b):b=e[25];let g;e[26]===Symbol.for("react.memo_cache_sentinel")?(g=G(Cl({variant:"destructive"})),e[26]=g):g=e[26];let x;e[27]!==i?(x=()=>i("confirm"),e[27]=i,e[28]=x):x=e[28];let j;e[29]!==n?(j=n("sidebar.archiveWorktreeDialog.confirm"),e[29]=n,e[30]=j):j=e[30];let y;e[31]!==x||e[32]!==j?(y=s.jsx(si,{className:g,onClick:x,children:j}),e[31]=x,e[32]=j,e[33]=y):y=e[33];let v;e[34]!==b||e[35]!==y?(v=s.jsxs(li,{children:[b,y]}),e[34]=b,e[35]=y,e[36]=v):v=e[36];let _;e[37]!==v||e[38]!==u?(_=s.jsxs(ni,{children:[u,v]}),e[37]=v,e[38]=u,e[39]=_):_=e[39];let w;return e[40]!==r||e[41]!==_?(w=s.jsx(ii,{open:!0,onOpenChange:r,children:_}),e[40]=r,e[41]=_,e[42]=w):w=e[42],w}function co(t,e){return null}function mo(t,e){return t.some(l=>l.id!==e.taskId&&!l.hidden&&l.branch===e.branch&&l.virtual_mcp_id===e.virtualMcpId)}const fo=["archive","reclaim-worktree"],uo=[];function po(t){return t==="confirm"?fo:uo}function $s(t){const e=M.c(17),{label:l,onClick:i,active:n,children:r}=t,[o,a]=L.useState(!1);let d,c,m,f;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>a(!0),c=()=>a(!1),m=()=>a(!0),f=()=>a(!1),e[0]=d,e[1]=c,e[2]=m,e[3]=f):(d=e[0],c=e[1],m=e[2],f=e[3]);const u=n&&"bg-sidebar-accent text-foreground";let p;e[4]!==u?(p=G("md:size-[34px] rounded-lg",u),e[4]=u,e[5]=p):p=e[5];let h;e[6]!==r||e[7]!==l||e[8]!==i||e[9]!==p?(h=s.jsx(Wt,{asChild:!0,children:s.jsx(Ut,{"aria-label":l,onClick:i,onPointerEnter:d,onPointerLeave:c,onFocus:m,onBlur:f,className:p,children:r})}),e[6]=r,e[7]=l,e[8]=i,e[9]=p,e[10]=h):h=e[10];let b;e[11]!==l?(b=s.jsx(qt,{side:"bottom",children:l}),e[11]=l,e[12]=b):b=e[12];let g;return e[13]!==o||e[14]!==h||e[15]!==b?(g=s.jsxs(Kt,{open:o,children:[h,b]}),e[13]=o,e[14]=h,e[15]=b,e[16]=g):g=e[16],g}function ss(t){const e=M.c(13),{label:l,value:i,onChange:n,options:r}=t;let o;e[0]!==l?(o=s.jsx("span",{className:"text-sm text-muted-foreground",children:l}),e[0]=l,e[1]=o):o=e[1];let a;e[2]!==n?(a=f=>f&&n(f),e[2]=n,e[3]=a):a=e[3];let d;e[4]!==r?(d=r.map(ho),e[4]=r,e[5]=d):d=e[5];let c;e[6]!==a||e[7]!==d||e[8]!==i?(c=s.jsx($n,{type:"single",size:"sm",value:i,onValueChange:a,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:d}),e[6]=a,e[7]=d,e[8]=i,e[9]=c):c=e[9];let m;return e[10]!==o||e[11]!==c?(m=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,c]}),e[10]=o,e[11]=c,e[12]=m):m=e[12],m}function ho(t){return s.jsxs(Pn,{value:t.value,className:"h-6 gap-1.5 rounded-md border border-transparent px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:border-border data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",children:[t.icon,t.label]},t.value)}function ul(t){const e=M.c(239);let l;e[0]!==t?(l=t===void 0?{}:t,e[0]=t,e[1]=l):l=e[1];const{onNavigate:i}=l,n=B(),{data:r}=Ft.useSession(),o=r?.user?.id,{org:a}=pe();let d;e[2]!==a.id?(d=Jl(a.id),e[2]=a.id,e[3]=d):d=e[3];const c=d.id,{threads:m,hasMore:f,isFetchingMore:u,fetchNextPage:p}=Js(),h=m.filter(jo),{hide:b,setScope:g}=zn(),x=Me(),j=us(),{setTaskId:y,createNewTask:v}=Zs();let _;e[4]===Symbol.for("react.memo_cache_sentinel")?(_={strict:!1},e[4]=_):_=e[4];const w=Ml(_);let S;e[5]===Symbol.for("react.memo_cache_sentinel")?(S={strict:!1},e[5]=S):S=e[5];const k=Ds(S),N=w.taskId??null;let A;e[6]!==N||e[7]!==m||e[8]!==k.virtualmcpid?(A=k.virtualmcpid??m.find(C=>C.id===N)?.virtual_mcp_id??null,e[6]=N,e[7]=m,e[8]=k.virtualmcpid,e[9]=A):A=e[9];const $=A;let P;e[10]!==i?(P=()=>{i?.()},e[10]=i,e[11]=P):P=e[11];const O=P,D=[...h].sort(bo),[T,E]=L.useState("all"),[z,I]=L.useState("flat"),[H,Y]=Bt("sidebar-threads-scope-all",!1),[F,U]=L.useState(!1),[K,Q]=L.useState(!1),[se,J]=L.useState(null),me=o??null;let he;e[12]!==me||e[13]!==T?(he={type:T,member:"mine",currentUserId:me},e[12]=me,e[13]=T,e[14]=he):he=e[14];const fe=he,xe={};H||(xe.created_by="me"),g(xe);let ge;e[15]!==o?(ge=C=>o?C.filter(R=>R.created_by===o):[],e[15]=o,e[16]=ge):ge=e[16];const Ae=ge;let Se;e[17]!==T?(Se=C=>T==="automation"?C.filter(go):T==="manual"?C.filter(xo):C,e[17]=T,e[18]=Se):Se=e[18];const we=Se,wt=Ae(D),Te=we(wt),Ne=we(D),V=H?Ne:Te;let be;e[19]!==N||e[20]!==O||e[21]!==o||e[22]!==b||e[23]!==x||e[24]!==a.slug||e[25]!==y||e[26]!==V?(be=C=>{const R=C.id===N,W=b(C.id);if(En(C.id),!R)return W;const q=ro(V,C.id,o);return O(),q?y(q.id,q.virtual_mcp_id):x({to:"/$org",params:{org:a.slug}}),W},e[19]=N,e[20]=O,e[21]=o,e[22]=b,e[23]=x,e[24]=a.slug,e[25]=y,e[26]=V,e[27]=be):be=e[27];const Z=be;let ie;e[28]!==j||e[29]!==n?(ie=async C=>{try{await j.call("SANDBOX_DELETE",{virtualMcpId:C.virtualMcpId,branch:C.branch,sandboxProviderKind:"user-desktop",removeWorktree:!0})}catch{Ht.error(n("sidebar.archiveWorktreeDialog.reclaimFailed",{branch:C.branch}))}},e[28]=j,e[29]=n,e[30]=ie):ie=e[30];const ke=ie;let oe;e[31]!==m||e[32]!==Z||e[33]!==o||e[34]!==J?(oe=C=>{if(o&&C.created_by&&C.created_by!==o)return;const R=co();if(!R||mo(m,R)){Z(C);return}J({task:C,target:R})},e[31]=m,e[32]=Z,e[33]=o,e[34]=J,e[35]=oe):oe=e[35];const ee=oe;let je;e[36]!==Z||e[37]!==se||e[38]!==ke||e[39]!==J?(je=C=>{const R=se;R&&(J(null),(async()=>{for(const W of po(C))if(W==="archive")try{await Z(R.task)}catch{return}else await ke(R.target)})())},e[36]=Z,e[37]=se,e[38]=ke,e[39]=J,e[40]=je):je=e[40];const Ce=je;let ve;e[41]!==Ce||e[42]!==se?(ve=se?s.jsx(ao,{branch:se.target.branch,onOutcome:Ce}):null,e[41]=Ce,e[42]=se,e[43]=ve):ve=e[43];const X=ve;let re;e[44]!==O||e[45]!==y?(re=C=>{O(),y(C.id,C.virtual_mcp_id)},e[44]=O,e[45]=y,e[46]=re):re=e[46];const te=re;let ye;e[47]!==$||e[48]!==N||e[49]!==m||e[50]!==O||e[51]!==v||e[52]!==c?(ye=()=>{const C=$??c,R=m.find(W=>W.id===N)?.branch??null;ce("sidebar_new_thread_clicked",{virtual_mcp_id:C}),O(),v(C,R)},e[47]=$,e[48]=N,e[49]=m,e[50]=O,e[51]=v,e[52]=c,e[53]=ye):ye=e[53];const Ie=ye,{state:hl,isMobile:hs,toggleSidebar:Xt}=kt();if(hl==="collapsed"&&!hs){let C;e[54]!==a?(C=s.jsx(hn,{org:a,size:"sm"}),e[54]=a,e[55]=C):C=e[55];let R;e[56]!==a.name||e[57]!==C?(R=s.jsx(de,{tooltip:a.name,children:C}),e[56]=a.name,e[57]=C,e[58]=R):R=e[58];let W;e[59]!==a.slug||e[60]!==R?(W=s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(pn,{orgParam:a.slug,side:"right",align:"start",trigger:R})}),e[59]=a.slug,e[60]=R,e[61]=W):W=e[61];let q;e[62]!==n?(q=n("sidebar.taskGroupsList.toggleSidebar"),e[62]=n,e[63]=q):q=e[63];let ae;e[64]!==n?(ae=n("sidebar.taskGroupsList.toggleSidebar"),e[64]=n,e[65]=ae):ae=e[65];let Ot;e[66]===Symbol.for("react.memo_cache_sentinel")?(Ot=s.jsx(qs,{size:16}),e[66]=Ot):Ot=e[66];let xt;e[67]!==q||e[68]!==ae||e[69]!==Xt?(xt=s.jsx(ne,{children:s.jsx(de,{"aria-label":q,tooltip:ae,onClick:Xt,children:Ot})}),e[67]=q,e[68]=ae,e[69]=Xt,e[70]=xt):xt=e[70];let gt;e[71]!==n?(gt=n("sidebar.taskGroupsList.searchChats"),e[71]=n,e[72]=gt):gt=e[72];let bt;e[73]!==n?(bt=n("sidebar.taskGroupsList.searchChats"),e[73]=n,e[74]=bt):bt=e[74];let jt;e[75]!==Q||e[76]!==U?(jt=()=>{ce("tasks_panel_search_opened"),Q(!0),U(!0)},e[75]=Q,e[76]=U,e[77]=jt):jt=e[77];let zt;e[78]===Symbol.for("react.memo_cache_sentinel")?(zt=s.jsx(gs,{size:16}),e[78]=zt):zt=e[78];let vt;e[79]!==gt||e[80]!==bt||e[81]!==jt?(vt=s.jsx(ne,{children:s.jsx(de,{"aria-label":gt,tooltip:bt,onClick:jt,children:zt})}),e[79]=gt,e[80]=bt,e[81]=jt,e[82]=vt):vt=e[82];let yt;e[83]!==xt||e[84]!==vt?(yt=s.jsxs(ue,{className:"mt-2 min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[xt,vt]}),e[83]=xt,e[84]=vt,e[85]=yt):yt=e[85];let _t;e[86]!==K||e[87]!==F||e[88]!==U?(_t=K&&s.jsx(es,{open:F,onOpenChange:U}),e[86]=K,e[87]=F,e[88]=U,e[89]=_t):_t=e[89];let Dt;return e[90]!==X||e[91]!==W||e[92]!==yt||e[93]!==_t?(Dt=s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[W,yt,_t,X]}),e[90]=X,e[91]=W,e[92]=yt,e[93]=_t,e[94]=Dt):Dt=e[94],Dt}const le=z!=="flat"||T!=="all"||H===!0;let Pe;e[95]!==n?(Pe=n("sidebar.taskGroupsList.filterChats"),e[95]=n,e[96]=Pe):Pe=e[96];let Mt;e[97]===Symbol.for("react.memo_cache_sentinel")?(Mt=s.jsx(In,{size:16}),e[97]=Mt):Mt=e[97];let $e;e[98]!==le?($e=le&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[98]=le,e[99]=$e):$e=e[99];let Oe;e[100]!==le||e[101]!==Pe||e[102]!==$e?(Oe=s.jsx(Wt,{asChild:!0,children:s.jsx(Vs,{asChild:!0,children:s.jsxs(Ut,{"aria-label":Pe,active:le,className:"md:size-[34px] rounded-lg",children:[Mt,$e]})})}),e[100]=le,e[101]=Pe,e[102]=$e,e[103]=Oe):Oe=e[103];let ze;e[104]!==n?(ze=n("sidebar.taskGroupsList.filterChats"),e[104]=n,e[105]=ze):ze=e[105];let De;e[106]!==ze?(De=s.jsx(qt,{side:"bottom",children:ze}),e[106]=ze,e[107]=De):De=e[107];let Ee;e[108]!==Oe||e[109]!==De?(Ee=s.jsxs(Kt,{children:[Oe,De]}),e[108]=Oe,e[109]=De,e[110]=Ee):Ee=e[110];let Re;e[111]!==n?(Re=n("sidebar.taskGroupsList.filterView"),e[111]=n,e[112]=Re):Re=e[112];let Fe;e[113]!==I?(Fe=C=>{ce("tasks_panel_group_by_changed",{to_value:C}),I(C)},e[113]=I,e[114]=Fe):Fe=e[114];let Le;e[115]!==n?(Le=n("sidebar.taskGroupsList.viewList"),e[115]=n,e[116]=Le):Le=e[116];let At;e[117]===Symbol.for("react.memo_cache_sentinel")?(At=s.jsx(cn,{size:13}),e[117]=At):At=e[117];let Ge;e[118]!==Le?(Ge={value:"flat",label:Le,icon:At},e[118]=Le,e[119]=Ge):Ge=e[119];let Be;e[120]!==n?(Be=n("sidebar.taskGroupsList.viewStatus"),e[120]=n,e[121]=Be):Be=e[121];let Tt;e[122]===Symbol.for("react.memo_cache_sentinel")?(Tt=s.jsx(dn,{size:13}),e[122]=Tt):Tt=e[122];let He;e[123]!==Be?(He={value:"status",label:Be,icon:Tt},e[123]=Be,e[124]=He):He=e[124];let Ue;e[125]!==Ge||e[126]!==He?(Ue=[Ge,He],e[125]=Ge,e[126]=He,e[127]=Ue):Ue=e[127];let We;e[128]!==z||e[129]!==Re||e[130]!==Fe||e[131]!==Ue?(We=s.jsx(ss,{label:Re,value:z,onChange:Fe,options:Ue}),e[128]=z,e[129]=Re,e[130]=Fe,e[131]=Ue,e[132]=We):We=e[132];let qe;e[133]!==n?(qe=n("sidebar.taskGroupsList.filterType"),e[133]=n,e[134]=qe):qe=e[134];let Ke;e[135]!==E?(Ke=C=>{ce("tasks_panel_filter_changed",{to_value:C}),E(C)},e[135]=E,e[136]=Ke):Ke=e[136];let Ve;e[137]!==n?(Ve=n("sidebar.taskGroupsList.typeAll"),e[137]=n,e[138]=Ve):Ve=e[138];let Ye;e[139]!==Ve?(Ye={value:"all",label:Ve},e[139]=Ve,e[140]=Ye):Ye=e[140];let Xe;e[141]!==n?(Xe=n("sidebar.taskGroupsList.typeChats"),e[141]=n,e[142]=Xe):Xe=e[142];let Qe;e[143]!==Xe?(Qe={value:"manual",label:Xe},e[143]=Xe,e[144]=Qe):Qe=e[144];let Je;e[145]!==n?(Je=n("sidebar.taskGroupsList.typeAuto"),e[145]=n,e[146]=Je):Je=e[146];let Ze;e[147]!==Je?(Ze={value:"automation",label:Je},e[147]=Je,e[148]=Ze):Ze=e[148];let et;e[149]!==Ye||e[150]!==Qe||e[151]!==Ze?(et=[Ye,Qe,Ze],e[149]=Ye,e[150]=Qe,e[151]=Ze,e[152]=et):et=e[152];let tt;e[153]!==qe||e[154]!==Ke||e[155]!==et||e[156]!==T?(tt=s.jsx(ss,{label:qe,value:T,onChange:Ke,options:et}),e[153]=qe,e[154]=Ke,e[155]=et,e[156]=T,e[157]=tt):tt=e[157];let st;e[158]!==n?(st=n("sidebar.taskGroupsList.filterScope"),e[158]=n,e[159]=st):st=e[159];const Qt=H?"team":"mine";let lt;e[160]!==Y?(lt=C=>Y(C==="team"),e[160]=Y,e[161]=lt):lt=e[161];let nt;e[162]!==n?(nt=n("sidebar.taskGroupsList.scopeMine"),e[162]=n,e[163]=nt):nt=e[163];let it;e[164]!==nt?(it={value:"mine",label:nt},e[164]=nt,e[165]=it):it=e[165];let ot;e[166]!==n?(ot=n("sidebar.taskGroupsList.scopeTeam"),e[166]=n,e[167]=ot):ot=e[167];let rt;e[168]!==ot?(rt={value:"team",label:ot},e[168]=ot,e[169]=rt):rt=e[169];let at;e[170]!==it||e[171]!==rt?(at=[it,rt],e[170]=it,e[171]=rt,e[172]=at):at=e[172];let ct;e[173]!==st||e[174]!==Qt||e[175]!==lt||e[176]!==at?(ct=s.jsx(ss,{label:st,value:Qt,onChange:lt,options:at}),e[173]=st,e[174]=Qt,e[175]=lt,e[176]=at,e[177]=ct):ct=e[177];let dt;e[178]!==We||e[179]!==tt||e[180]!==ct?(dt=s.jsxs(Ys,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[We,tt,ct]}),e[178]=We,e[179]=tt,e[180]=ct,e[181]=dt):dt=e[181];let It;e[182]!==Ee||e[183]!==dt?(It=s.jsxs(Ks,{children:[Ee,dt]}),e[182]=Ee,e[183]=dt,e[184]=It):It=e[184];const Jt=It;let Pt;e[185]!==Jt||e[186]!==Ie||e[187]!==Q||e[188]!==U||e[189]!==n?(Pt=C=>s.jsx(Xs,{delayDuration:300,children:s.jsxs("div",{className:G("shrink-0 flex items-center justify-between",C?"h-10":"h-10 md:h-[34px] mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!C&&s.jsx(sl,{className:"md:size-[34px] rounded-lg"}),Jt]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx($s,{label:n("sidebar.taskGroupsList.searchChats"),onClick:()=>{ce("tasks_panel_search_opened"),Q(!0),U(!0)},children:s.jsx(gs,{size:16})}),s.jsx($s,{label:n("sidebar.taskGroupsList.newChat"),onClick:()=>{Ie()},children:s.jsx(mn,{size:16})})]})]})}),e[185]=Jt,e[186]=Ie,e[187]=Q,e[188]=U,e[189]=n,e[190]=Pt):Pt=e[190];const mt=Pt;if(hs){let C;e[191]!==mt?(C=mt(!0),e[191]=mt,e[192]=C):C=e[192];let R;e[193]!==p?(R=()=>{p()},e[193]=p,e[194]=R):R=e[194];let W;e[195]!==N||e[196]!==fe||e[197]!==le||e[198]!==z||e[199]!==ee||e[200]!==te||e[201]!==f||e[202]!==u||e[203]!==R||e[204]!==V?(W=s.jsx(ws,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain px-1 h-full",children:s.jsx(Ps,{threads:V,groupBy:z,activeTaskId:N,onSelectTask:te,onArchiveTask:ee,filters:fe,hasMore:f,isFetchingMore:u,onLoadMore:R,filtersActive:le})}),e[195]=N,e[196]=fe,e[197]=le,e[198]=z,e[199]=ee,e[200]=te,e[201]=f,e[202]=u,e[203]=R,e[204]=V,e[205]=W):W=e[205];let q;e[206]!==K||e[207]!==F||e[208]!==U?(q=K&&s.jsx(es,{open:F,onOpenChange:U}),e[206]=K,e[207]=F,e[208]=U,e[209]=q):q=e[209];let ae;return e[210]!==X||e[211]!==C||e[212]!==W||e[213]!==q?(ae=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[C,W,q,X]}),e[210]=X,e[211]=C,e[212]=W,e[213]=q,e[214]=ae):ae=e[214],ae}let ft;e[215]!==mt?(ft=mt(!1),e[215]=mt,e[216]=ft):ft=e[216];let ut;e[217]!==p?(ut=()=>{p()},e[217]=p,e[218]=ut):ut=e[218];let pt;e[219]!==N||e[220]!==fe||e[221]!==le||e[222]!==z||e[223]!==ee||e[224]!==te||e[225]!==f||e[226]!==u||e[227]!==ut||e[228]!==V?(pt=s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(ws,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(Ps,{threads:V,groupBy:z,activeTaskId:N,onSelectTask:te,onArchiveTask:ee,filters:fe,hasMore:f,isFetchingMore:u,onLoadMore:ut,filtersActive:le})})}),e[219]=N,e[220]=fe,e[221]=le,e[222]=z,e[223]=ee,e[224]=te,e[225]=f,e[226]=u,e[227]=ut,e[228]=V,e[229]=pt):pt=e[229];let ht;e[230]!==K||e[231]!==F||e[232]!==U?(ht=K&&s.jsx(es,{open:F,onOpenChange:U}),e[230]=K,e[231]=F,e[232]=U,e[233]=ht):ht=e[233];let $t;return e[234]!==X||e[235]!==ft||e[236]!==pt||e[237]!==ht?($t=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[ft,pt,ht,X]}),e[234]=X,e[235]=ft,e[236]=pt,e[237]=ht,e[238]=$t):$t=e[238],$t}function xo(t){return!t.trigger_id}function go(t){return!!t.trigger_id}function bo(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function jo(t){return!t.hidden}const vo=5,yo=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function pl(){const t=M.c(3),{state:e}=kt();if(e==="collapsed"){let n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:vo}).map(No)}),t[0]=n):n=t[0],n}let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(_e,{className:"size-6 rounded-md"}),s.jsx(_e,{className:"size-6 rounded-md"}),s.jsx(_e,{className:"size-6 rounded-md"})]}),s.jsx(_e,{className:"h-6 w-20 rounded-md"})]}),t[1]=l):l=t[1];let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[l,s.jsx("div",{className:"flex flex-col gap-0.5",children:yo.map(_o)})]}),t[2]=i):i=t[2],i}function _o(t,e){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(_e,{className:"size-5 rounded-full shrink-0"}),s.jsx(_e,{className:G("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(So)})]},e)}function So(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(_e,{className:"h-3 flex-1 rounded-sm"})},e)}function No(t,e){return s.jsx(_e,{className:"size-10 rounded-lg mx-auto"},e)}function ko(){const t=M.c(2);if(ms()){let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ns,{showName:!0}),t[0]=i):i=t[0],i}let l;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(s.Fragment,{children:[s.jsx(ns,{}),s.jsx(fs,{})]}),t[1]=l):l=t[1],l}function wo(){const t=M.c(5),e=nl();let l,i;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Fi,{}),i=s.jsx(ko,{}),t[0]=l,t[1]=i):(l=t[0],i=t[1]);let n;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(as,{children:s.jsx(L.Suspense,{fallback:s.jsx(pl,{}),children:s.jsx(ul,{})})}),t[2]=n):n=t[2];let r;return t[3]!==e?(r=s.jsx(ll,{children:s.jsx(rl,{sections:e,footer:l,header:i,additionalContent:n})}),t[3]=e,t[4]=r):r=t[4],r}function Co(t){const e=M.c(8),{onClose:l}=t,i=nl();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Li,{}),e[0]=n):n=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(pl,{}),e[1]=r):r=e[1];let o;e[2]!==l?(o=s.jsx(as,{children:s.jsx(L.Suspense,{fallback:r,children:s.jsx(ul,{onNavigate:l})})}),e[2]=l,e[3]=o):o=e[3];let a;return e[4]!==l||e[5]!==i||e[6]!==o?(a=s.jsx(ll,{children:s.jsx(Ai,{sections:i,onClose:l,footer:n,additionalContent:o})}),e[4]=l,e[5]=i,e[6]=o,e[7]=a):a=e[7],a}const Mo="sidebar.open";function Ao(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Tl,{}),t[0]=e):e=t[0],e}function Ua(){const t=M.c(36),e=Fs(),l=ms();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},t[0]=i):i=t[0];const{connect:n,siteUrl:r}=Ds(i),o=n==="1",[a,d]=Bt(Mo,!1),{width:c,wrapperRef:m,onStartResize:f,resetWidth:u}=yi(),p=e;let h;t[1]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(sl,{}),t[1]=h):h=t[1];let b;t[2]!==l?(b=!l&&s.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:s.jsx(fs,{})}),t[2]=l,t[3]=b):b=t[3];let g,x,j,y;t[4]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(St.TogglesSlot,{}),x=s.jsx(St.TabsSlot,{className:"shrink-0"}),j=s.jsx(St.CenterSlot,{}),y=s.jsx(St.RightSlot,{}),t[4]=g,t[5]=x,t[6]=j,t[7]=y):(g=t[4],x=t[5],j=t[6],y=t[7]);let v;t[8]!==b?(v=s.jsx(St.Header,{className:"grid-cols-1 px-1",children:s.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[h,b,g,x,j,y]})}),t[8]=b,t[9]=v):v=t[9];const _=v;let w;t[10]===Symbol.for("react.memo_cache_sentinel")?(w={background:"transparent",containerType:"inline-size"},t[10]=w):w=t[10];let S;t[11]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx($l,{className:"flex flex-col min-h-0",style:w,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(L.Suspense,{fallback:s.jsx(Ao,{}),children:s.jsx(Al,{})})})})}),t[11]=S):S=t[11];const k=S,N=p&&_,A=`${c}px`;let $;t[12]!==A?($={"--sidebar-width":A,"--sidebar-width-icon":"3.125rem"},t[12]=A,t[13]=$):$=t[13];const P=$;let O;t[14]!==e||t[15]!==f||t[16]!==u?(O=!e&&s.jsxs(s.Fragment,{children:[s.jsx(wo,{}),s.jsx(bi,{onPointerDown:f,onDoubleClick:u})]}),t[14]=e,t[15]=f,t[16]=u,t[17]=O):O=t[17];let D;t[18]!==P||t[19]!==O||t[20]!==m?(D=s.jsxs(Ol,{ref:m,className:"flex-1 bg-sidebar relative min-h-0",style:P,children:[O,k]}),t[18]=P,t[19]=O,t[20]=m,t[21]=D):D=t[21];let T;t[22]!==e?(T=e&&s.jsx(Un,{renderSidebar:To}),t[22]=e,t[23]=T):T=t[23];let E;t[24]!==r||t[25]!==o?(E=o&&s.jsx(ui,{siteUrl:r}),t[24]=r,t[25]=o,t[26]=E):E=t[26];let z;t[27]!==N||t[28]!==D||t[29]!==T||t[30]!==E?(z=s.jsx(oi,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[N,D,T,E]})}),t[27]=N,t[28]=D,t[29]=T,t[30]=E,t[31]=z):z=t[31];let I;return t[32]!==d||t[33]!==a||t[34]!==z?(I=s.jsx(Dn,{children:s.jsx(St.Provider,{children:s.jsx(zl,{open:a,onOpenChange:d,children:z})})}),t[32]=d,t[33]=a,t[34]=z,t[35]=I):I=t[35],I}function To(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(Co,{onClose:e})})})}export{Ua as default};
|
|
1
|
+
import{c as M,b as B,j as s,y as xl,B as Os,d as Me,F as pe,G as gl,r as L,E as as,H as bl,x as jl,K as zs,e as xs,p as ce,I as Bt,m as G,a as Ft,J as vl,v as yl,t as Ht,M as _l,P as Sl,n as Nl,R as kl,k as wl,U as Cl,f as Ml,u as Ds,O as Al,W as Tl}from"./index-Ct5z4bLK.js";import{u as kt,S as cs,a as ds,b as ue,c as de,d as ne,e as Es,f as Il,g as Rs,h as Pl,i as ls,j as $l,k as Ol,l as zl}from"./sidebar-CAZ2FyoU.js";import{u as Fs}from"./use-mobile-CEeeXHm_.js";import{C as Dl,p as Zt,s as El,a as Rl,n as Fl}from"./self-tool-result-BCYw36Eu.js";import{f as Ll,b as Ls,e as Gs,g as Gl,h as Bl,a as Hl,d as Ul}from"./dialog-Y2c_xFO9.js";import{f as Wl,i as ql,D as Kl}from"./tab-id-BhaxduZ_.js";import{C as Vl,W as Bs,g as Yl,u as Xl,S as Ql,a as Jl}from"./use-mcp-client-B2w_Vv7G.js";import{i as Hs}from"./XCircle-Df3ZOY6R.js";import{u as Zl,a as ms}from"./use-organization-settings-CyU2O9C4.js";import{i as Us}from"./ChevronRight-B8f4wyDl.js";import{i as en}from"./X-B6K21IFp.js";import{s as tn,a as sn,t as ln,i as nn,b as on,c as rn,d as an,e as Ws,A as Lt,f as gs,g as cn,h as dn,j as mn}from"./agent-icon-Dcc64Amv.js";import{S as _e}from"./skeleton-tW3UOR15.js";import{i as qs}from"./LayoutLeft-DrcKo4sm.js";import{O as ns,A as fs,u as fn,a as un,b as pn,c as hn}from"./use-deco-credits-BHzyr0wR.js";import{T as Ut,a as St}from"./toolbar-TQryde5B.js";import{P as Ks,a as Vs,b as Ys}from"./popover-CqIaLo6d.js";import{D as xn,a as gn,b as bn}from"./drawer-Dn6DCG1a.js";import{A as is}from"./avatar-3ae7eb9x.js";import{T as Wt,a as qt,b as Xs,c as Kt}from"./tooltip-DcvI3Qmq.js";import{a as jn}from"./Copy01-BlkL52M8.js";import{n as vn,i as yn}from"./Tool02-DZ2vEkP4.js";import{n as _n}from"./LinkExternal01-CgpMIzO0.js";import{i as bs}from"./LogOut01-uhMfgP0K.js";import{i as Sn}from"./Monitor01-BT8WHZmo.js";import{n as Nn,a as kn}from"./Sun-DPokUB7F.js";import{a as Vt}from"./Settings02-DerOgVc2.js";import{i as wn}from"./Shield01-gMQ1chGf.js";import{a as Cn}from"./Users03-CI91FsuH.js";import{u as Mn}from"./use-deployment-admin-DCJNChjl.js";import{u as An}from"./use-is-desktop-app-BNujXJc_.js";import"./index-CG2piyb3.js";import{a as Tn}from"./ZapSquare-CPOIzhEC.js";import{I as Qs}from"./invite-member-dialog-CNAKazL-.js";import{i as In}from"./FilterLines-oPoBPuqv.js";import{T as Pn,a as $n}from"./toggle-group-BsjhKaUR.js";import{u as On,a as Js,b as zn,T as Dn}from"./hooks-VEM1hLto.js";import{u as Zs,f as En}from"./shell-layout-1C4_PYHs.js";import{C as Rn,a as Fn,b as Ln,c as Gn,d as Bn,e as Hn}from"./command-DUTyl3qs.js";import{u as us}from"./studio-tools-D0M8AyaL.js";import{u as el}from"./use-virtual-mcp-DmnaO1IL.js";import{i as tl}from"./Zap-C9gRaG5K.js";import{S as sl,M as Un}from"./shell-controls-D3ipd2jw.js";import{n as Wn}from"./Stars02-BG4AWaaX.js";import{g as qn,u as Kn,S as Vn}from"./use-clock-tick-BWJoXcll.js";import{a as Yn}from"./format-time-BnbuEtat.js";import{g as Xn}from"./agent-capabilities-cXfbMfjV.js";import{t as Qn}from"./ChevronDown-CKkO8sAW.js";import{A as Jn,a as Zn,b as ei,c as ti,d as si,e as li,f as ni,g as ii}from"./alert-dialog-tPwVc9uJ.js";import{S as ll}from"./use-navigate-to-agent-DtRj8Nu_.js";import{C as oi}from"./chat-context-CklmWc6u.js";import"./integration-icon-C2mjeHEI.js";import"./companions-core-DdNaKkOK.js";import"./extract-connection-data-C2o6ZTIY.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CAXumITS.js";import"./CheckCircle-CTIPijUa.js";import"./form-92MvHLxT.js";import"./label-CXy-_gNr.js";import"./input-J1mhqAdN.js";import"./Check-BwHliFRj.js";import"./Eye-CQsjSohp.js";import"./use-debounced-value-DqJiqnYk.js";import"./useQueries-D3Lp43ym.js";import"./authenticate-and-persist-oauth-Dus5ShT0.js";import"./mcp-oauth-C2w2n5sc.js";import"./auth-Q0kADPVB.js";import"./AlertCircle-DdtdV7M4.js";import"./Tool01-Dn1kpGdl.js";import"./ArrowUp-CpEPYAOf.js";import"./ArrowUpRight-CHW6cpx0.js";import"./TrendUp01-DwZeXU3a.js";import"./ChevronUp-C1afs1xa.js";import"./DotsVertical-BFrinGvO.js";import"./CpuChip01-Cs3gfrhP.js";import"./Star01-CH5MEDQn.js";import"./Palette-CpgDl594.js";import"./SwitchHorizontal01-B4ZgCyE5.js";import"./HardDrive-CpV48xOn.js";import"./Key01-CIup5BVm.js";import"./Play-BBCpB_Tz.js";import"./Plus-DO9NbOAK.js";import"./SearchLg-Df6klb6Y.js";import"./SearchMd-GYne36B-.js";import"./Stars01-DAx8aZEr.js";import"./Trash01-BOMqKZ1K.js";import"./Upload01-S_KetqzT.js";import"./User01-HXIFsqtn.js";import"./Users01-ByuTyOLr.js";import"./XClose-DBug4o8k.js";import"./spinner-BVMuKuHb.js";import"./github-repo-picker-CgWDATG6.js";import"./collection-search-CgEc7JVV.js";import"./use-connection-COSULjHn.js";import"./use-mcp-tools-CpiBQMkC.js";import"./reusable-new-chat-CouMjkYR.js";import"./connection-card-BoLbm0Lq.js";import"./use-registry-connections-DRTunUDV.js";import"./useInfiniteQuery-ddyR5cpH.js";import"./use-infinite-scroll-BQbD3RgJ.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-eyAPH6o3.js";import"./card-BkMfo3-L.js";import"./select-Ctd_ZZ0k.js";import"./textarea-BroNzwSJ.js";import"./connection-form-helpers-MuJLCV8m.js";import"./collection-tabs-jHD3PV9U.js";import"./badge-ClTHWVhH.js";import"./useSuspenseInfiniteQuery-D4QmwKBY.js";import"./use-ai-providers-BWHJhqYW.js";import"./use-org-auth-client-Bcl40eqI.js";import"./use-organization-roles-D5PTbPg1.js";import"./decopilot-sse-pool-C9wT7nFZ.js";import"./required-auth-layout-CKzC4Wry.js";import"./use-org-sso-CM7UG764.js";import"./index-C2-dhaI-.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-decopilot-events-DhC1PW_6.js";const ri="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function ai(){const t=M.c(13),e=B();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),t[0]=l):l=t[0];let i;t[1]!==e?(i=e("routes.commerceOnboarding.connectModal.quote"),t[1]=e,t[2]=i):i=t[2];let n;t[3]!==i?(n=s.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",i,"”"]}),t[3]=i,t[4]=n):n=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("img",{src:ri,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),t[5]=r):r=t[5];let o;t[6]!==e?(o=e("routes.commerceOnboarding.connectModal.quoteAuthor"),t[6]=e,t[7]=o):o=t[7];let a;t[8]!==o?(a=s.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[r,s.jsx("span",{className:"text-base font-medium",children:o})]}),t[8]=o,t[9]=a):a=t[9];let d;return t[10]!==n||t[11]!==a?(d=s.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[l,n,a]}),t[10]=n,t[11]=a,t[12]=d):d=t[12],d}function ci(){const t=M.c(19),e=B();let l;t[0]!==e?(l=e("routes.commerceOnboarding.connectModal.trustRevoke"),t[0]=e,t[1]=l):l=t[1];let i;t[2]!==l?(i={Icon:tn,label:l},t[2]=l,t[3]=i):i=t[3];let n;t[4]!==e?(n=e("routes.commerceOnboarding.connectModal.trustEncrypted"),t[4]=e,t[5]=n):n=t[5];let r;t[6]!==n?(r={Icon:xl,label:n},t[6]=n,t[7]=r):r=t[7];let o;t[8]!==e?(o=e("routes.commerceOnboarding.connectModal.trustNeverSold"),t[8]=e,t[9]=o):o=t[9];let a;t[10]!==o?(a={Icon:sn,label:o},t[10]=o,t[11]=a):a=t[11];let d;t[12]!==i||t[13]!==r||t[14]!==a?(d=[i,r,a],t[12]=i,t[13]=r,t[14]=a,t[15]=d):d=t[15];const c=d;let m;t[16]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"h-px w-full bg-white/15"}),t[16]=m):m=t[16];let f;return t[17]!==c?(f=s.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[m,s.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:c.map(di)})]}),t[17]=c,t[18]=f):f=t[18],f}function di(t){const{Icon:e,label:l}=t;return s.jsxs("li",{className:"flex items-center gap-2.5 text-[13px] leading-tight text-white/70",children:[s.jsx(e,{className:"size-4 shrink-0 opacity-85"}),l]},l)}function mi(t){const e=M.c(22),{siteHost:l,footer:i,onClose:n,children:r}=t,o=B(),a=l?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null;let d;e[0]!==n||e[1]!==o?(d=n&&s.jsx("button",{type:"button",onClick:n,"aria-label":o("routes.commerceOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:s.jsx(en,{size:18})}),e[0]=n,e[1]=o,e[2]=d):d=e[2];let c,m;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),m=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=c,e[4]=m):(c=e[3],m=e[4]);let f;e[5]!==a||e[6]!==l?(f=l&&s.jsxs(s.Fragment,{children:[s.jsx(Us,{size:16,className:"shrink-0 text-foreground/25"}),a&&s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:s.jsx("img",{src:a,alt:"",className:"size-full"})}),s.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:l})]}),e[5]=a,e[6]=l,e[7]=f):f=e[7];let u;e[8]!==f?(u=s.jsxs("div",{className:"flex items-center gap-2",children:[c,m,f]}),e[8]=f,e[9]=u):u=e[9];let p;e[10]!==i?(p=s.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:i}),e[10]=i,e[11]=p):p=e[11];let h;e[12]!==r||e[13]!==u||e[14]!==p?(h=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[u,r,p]}),e[12]=r,e[13]=u,e[14]=p,e[15]=h):h=e[15];let b,g;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),g=s.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=b,e[17]=g):(b=e[16],g=e[17]);let x;e[18]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:p-14",children:[b,g,s.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[s.jsx("div",{className:"flex-1"}),s.jsx(ai,{}),s.jsx("div",{className:"flex-1"}),s.jsx(ci,{})]})]}),e[18]=x):x=e[18];let j;return e[19]!==d||e[20]!==h?(j=s.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[d,h,x]}),e[19]=d,e[20]=h,e[21]=j):j=e[21],j}function fi(t){const e=M.c(5),{ready:l,pending:i,label:n,onClick:r,children:o}=t,a=i||!l,d=l&&!i?o:null;let c;return e[0]!==n||e[1]!==r||e[2]!==a||e[3]!==d?(c=s.jsxs(Os,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal rounded-lg py-3 text-center text-base font-medium leading-tight",onClick:r,disabled:a,children:[n,d]}),e[0]=n,e[1]=r,e[2]=a,e[3]=d,e[4]=c):c=e[4],c}function ui(t){const e=M.c(22),{siteUrl:l}=t,i=Me(),{org:n}=pe(),r=B();let o;e[0]!==i||e[1]!==n.id||e[2]!==n.slug?(o=()=>{localStorage.setItem(gl.sidebarOpen(),JSON.stringify(!1)),i({to:"/$org/$taskId",params:{org:n.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:Yl(n.id),main:Wl(Bs.COMMERCE_DISCOVERY(n.id),Vl),sidepanel:0}})},e[0]=i,e[1]=n.id,e[2]=n.slug,e[3]=o):o=e[3];const a=o;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ll,{className:"bg-black/15 backdrop-blur-sm"}),e[4]=d):d=e[4];let c;e[5]!==r?(c=r("routes.commerceOnboarding.connectModal.dialogTitle"),e[5]=r,e[6]=c):c=e[6];let m;e[7]!==c?(m=s.jsx(Ls,{className:"sr-only",children:c}),e[7]=c,e[8]=m):m=e[8];let f;e[9]!==a||e[10]!==r?(f=()=>s.jsxs("div",{className:"grid gap-4 p-6",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:r("routes.commerceOnboarding.connectModal.loadError")}),s.jsxs(Os,{type:"button",size:"xl",className:"w-full",onClick:a,children:[r("routes.commerceOnboarding.connectModal.continueButton"),s.jsx(Hs,{size:18})]})]}),e[9]=a,e[10]=r,e[11]=f):f=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Dl,{}),e[12]=u):u=e[12];let p;e[13]!==a||e[14]!==l?(p=s.jsx(L.Suspense,{fallback:u,children:s.jsx(gi,{siteUrlFromUrl:l,onComplete:a})}),e[13]=a,e[14]=l,e[15]=p):p=e[15];let h;e[16]!==f||e[17]!==p?(h=s.jsx(as,{fallback:f,children:p}),e[16]=f,e[17]=p,e[18]=h):h=e[18];let b;return e[19]!==m||e[20]!==h?(b=s.jsx(Gs,{open:!0,children:s.jsxs(Gl,{children:[d,s.jsxs(bl,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:xi,onPointerDownOutside:hi,onInteractOutside:pi,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[m,h]})]})}),e[19]=m,e[20]=h,e[21]=b):b=e[21],b}function pi(t){return t.preventDefault()}function hi(t){return t.preventDefault()}function xi(t){return t.preventDefault()}function gi({siteUrlFromUrl:t,onComplete:e}){const l=B(),{org:i}=pe(),n=Bs.COMMERCE_DISCOVERY(i.id),r=Xl({connectionId:Ql,orgId:i.id,orgSlug:i.slug}),a=jl({queryKey:zs.commerceDiscoveryConnection(i.id,n),queryFn:async()=>{const v=await r.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:n}});return Zt(v)},retry:!1}).data.item,d=typeof a?.metadata?.siteUrl=="string"?a.metadata.siteUrl:void 0,c=t||d,m=El(c),[f,u]=L.useState(!0),[p,h]=L.useState(null),b=xs({mutationFn:async v=>Zt(await r.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:v}})),retry:!1}),g=xs({mutationFn:async v=>Zt(await r.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:v}})),retry:!1}),x=async()=>{h(null),ce("commerce_onboarding_open_report_clicked",{domain:m??void 0,organization_id:i.id});const v=c?Fl(c):null;if(v?.ok)try{let _=await g.mutateAsync(v.value);if(_.triggered||(ce("commerce_onboarding_run_reclaim",{domain:m??void 0,organization_id:i.id,reason:_.reason??"not_upgraded"}),await b.mutateAsync(v.value),_=await g.mutateAsync(v.value)),!_.triggered){ce("commerce_onboarding_run_failed",{domain:m??void 0,organization_id:i.id,error:_.reason??"not_triggered"}),h(l("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(_){ce("commerce_onboarding_run_failed",{domain:m??void 0,organization_id:i.id,error:_ instanceof Error?_.message:String(_)}),h(l("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()},j=Zl("demo_mode"),y=f||j;return s.jsx(mi,{siteHost:m,footer:s.jsxs(s.Fragment,{children:[p?s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:p}):null,s.jsx(fi,{ready:y,pending:g.isPending,label:g.isPending?l("routes.commerceOnboarding.connectModal.openingReport"):l(y?"routes.commerceOnboarding.connectModal.viewFullReport":"routes.commerceOnboarding.connectModal.connectToolToContinue"),onClick:()=>{x()},children:s.jsx(Hs,{size:18})})]}),children:s.jsx(Rl,{org:i,cdConnectionId:n,siteUrl:c,onReadinessChange:u})})}function bi(t){const e=M.c(11),{onPointerDown:l,onDoubleClick:i}=t,n=B(),{state:r,isMobile:o}=kt();if(o||r==="collapsed")return null;let a;e[0]!==n?(a=n("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=n,e[1]=a):a=e[1];let d;e[2]!==n?(d=n("sidebar.sidebarResizeHandle.title"),e[2]=n,e[3]=d):d=e[3];let c,m;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={left:"var(--sidebar-width)"},m=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[4]=c,e[5]=m):(c=e[4],m=e[5]);let f;return e[6]!==i||e[7]!==l||e[8]!==a||e[9]!==d?(f=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":a,title:d,onPointerDown:l,onDoubleClick:i,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:c,children:m}),e[6]=i,e[7]=l,e[8]=a,e[9]=d,e[10]=f):f=e[10],f}const ps=240,ji=400,vi="sidebar.width";function Ct(t){return Math.max(ps,Math.min(ji,t))}function yi(){const t=M.c(11),[e,l]=Bt(vi,_i),i=L.useRef(null);let n;t[0]!==l||t[1]!==e?(n=m=>{m.preventDefault();const f=m.clientX,u=Ct(e),p=i.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),h=p?Array.from(p.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const x of h)x.style.transition="none";const b=x=>{const j=Ct(u+(x.clientX-f));p?.style.setProperty("--sidebar-width",`${j}px`)},g=x=>{const j=Ct(u+(x.clientX-f));l(j);for(const y of h)y.style.transition="";window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",g),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",b),window.addEventListener("pointerup",g)},t[0]=l,t[1]=e,t[2]=n):n=t[2];const r=n;let o;t[3]!==l?(o=()=>{l(ps)},t[3]=l,t[4]=o):o=t[4];const a=o;let d;t[5]!==e?(d=Ct(e),t[5]=e,t[6]=d):d=t[6];let c;return t[7]!==r||t[8]!==a||t[9]!==d?(c={width:d,wrapperRef:i,onStartResize:r,resetWidth:a},t[7]=r,t[8]=a,t[9]=d,t[10]=c):c=t[10],c}function _i(t){return typeof t=="number"?Ct(t):ps}function nl(){return[]}function il(t){const e=M.c(3),{children:l}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=i):i=e[0];let n;return e[1]!==l?(n=s.jsxs(cs,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[i,s.jsx(ds,{children:s.jsx(ue,{className:"gap-0.5",children:l})})]}),e[1]=l,e[2]=n):n=e[2],n}function ol(t){const e=M.c(18),{item:l}=t,{isMobile:i,setOpenMobile:n}=kt();let r;e[0]!==i||e[1]!==l||e[2]!==n?(r=()=>{ce("nav_item_clicked",{nav_key:l.key,nav_label:l.label,is_active:!!l.isActive,is_mobile:i}),l.onClick?.(),i&&n(!1)},e[0]=i,e[1]=l,e[2]=n,e[3]=r):r=e[3];const o=r,a=l.key,d=l.isActive&&"z-10";let c;e[4]!==d?(c=G(d),e[4]=d,e[5]=c):c=e[5];let m;e[6]!==l.label?(m=s.jsx("span",{children:l.label}),e[6]=l.label,e[7]=m):m=e[7];let f;e[8]!==o||e[9]!==l.icon||e[10]!==l.isActive||e[11]!==l.label||e[12]!==m?(f=s.jsxs(de,{onClick:o,isActive:l.isActive,tooltip:l.label,children:[l.icon,m]}),e[8]=o,e[9]=l.icon,e[10]=l.isActive,e[11]=l.label,e[12]=m,e[13]=f):f=e[13];let u;return e[14]!==l.key||e[15]!==c||e[16]!==f?(u=s.jsx(ne,{className:c,children:f},a),e[14]=l.key,e[15]=c,e[16]=f,e[17]=u):u=e[17],u}function Si(t){const e=M.c(12),{section:l}=t;switch(l.type){case"divider":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Es,{className:"my-2"}),e[0]=i):i=e[0],i}case"spacer":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1"}),e[1]=i):i=e[1],i}case"group":{const i=l.group.label,n=l.group.defaultExpanded;let r;e[2]!==l.group.items?(r=l.group.items.map(ki),e[2]=l.group.items,e[3]=r):r=e[3];let o;return e[4]!==l.group.defaultExpanded||e[5]!==l.group.label||e[6]!==r?(o=s.jsx(il,{label:i,defaultExpanded:n,children:r}),e[4]=l.group.defaultExpanded,e[5]=l.group.label,e[6]=r,e[7]=o):o=e[7],o}case"items":{let i;e[8]!==l.items?(i=l.items.map(Ni),e[8]=l.items,e[9]=i):i=e[9];let n;return e[10]!==i?(n=s.jsx(cs,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(ds,{children:s.jsx(ue,{className:"gap-1.5",children:i})})}),e[10]=i,e[11]=n):n=e[11],n}case"custom":return l.content}}function Ni(t){return s.jsx(ol,{item:t},t.key)}function ki(t){return s.jsx(ol,{item:t},t.key)}function wi(t){const e=M.c(17),{sections:l,footer:i,additionalContent:n,header:r,variant:o,contentClassName:a}=t,d=o===void 0?"sidebar":o;let c;e[0]!==r?(c=r&&s.jsx(Il,{className:"shrink-0 h-12 flex flex-row items-center px-2 py-0 group-data-[collapsible=icon]/sidebar:hidden",children:r}),e[0]=r,e[1]=c):c=e[1];let m;e[2]!==a?(m=G("flex flex-col flex-1 px-2 pb-2 gap-0.5",a),e[2]=a,e[3]=m):m=e[3];let f;e[4]!==l?(f=l.map(Ci),e[4]=l,e[5]=f):f=e[5];let u;e[6]!==n?(u=n&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:n}),e[6]=n,e[7]=u):u=e[7];let p;e[8]!==m||e[9]!==f||e[10]!==u?(p=s.jsxs(Rs,{className:m,children:[f,u]}),e[8]=m,e[9]=f,e[10]=u,e[11]=p):p=e[11];let h;return e[12]!==i||e[13]!==c||e[14]!==p||e[15]!==d?(h=s.jsxs(Pl,{variant:d,children:[c,p,i]}),e[12]=i,e[13]=c,e[14]=p,e[15]=d,e[16]=h):h=e[16],h}function Ci(t,e){return s.jsx(Si,{section:t},e)}function rl(t){const e=M.c(2);let l;return e[0]!==t?(l=s.jsx(wi,{...t}),e[0]=t,e[1]=l):l=e[1],l}rl.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,l)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(_e,{className:"h-full bg-sidebar-accent rounded-md"})},l))})};function js(t){const e=M.c(18),{item:l,onClose:i}=t,n=l.isActive&&"z-10";let r;e[0]!==n?(r=G(n),e[0]=n,e[1]=r):r=e[1];let o;e[2]!==l||e[3]!==i?(o=()=>{l.onClick?.(),i()},e[2]=l,e[3]=i,e[4]=o):o=e[4];let a;e[5]!==l.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:l.icon}),e[5]=l.icon,e[6]=a):a=e[6];let d;e[7]!==l.label?(d=s.jsx("span",{children:l.label}),e[7]=l.label,e[8]=d):d=e[8];let c;e[9]!==l.isActive||e[10]!==l.label||e[11]!==o||e[12]!==a||e[13]!==d?(c=s.jsxs(de,{onClick:o,isActive:l.isActive,tooltip:l.label,className:"h-10! text-sm!",children:[a,d]}),e[9]=l.isActive,e[10]=l.label,e[11]=o,e[12]=a,e[13]=d,e[14]=c):c=e[14];let m;return e[15]!==r||e[16]!==c?(m=s.jsx(ne,{className:r,children:c}),e[15]=r,e[16]=c,e[17]=m):m=e[17],m}function Mi(t){const e=M.c(18),{section:l,onClose:i}=t;switch(l.type){case"divider":{let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Es,{className:"my-2"}),e[0]=n):n=e[0],n}case"spacer":{let n;return e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex-1"}),e[1]=n):n=e[1],n}case"group":{const n=l.group.label,r=l.group.defaultExpanded;let o;if(e[2]!==i||e[3]!==l.group.items){let d;e[5]!==i?(d=c=>s.jsx(js,{item:c,onClose:i},c.key),e[5]=i,e[6]=d):d=e[6],o=l.group.items.map(d),e[2]=i,e[3]=l.group.items,e[4]=o}else o=e[4];let a;return e[7]!==l.group.defaultExpanded||e[8]!==l.group.label||e[9]!==o?(a=s.jsx(il,{label:n,defaultExpanded:r,children:o}),e[7]=l.group.defaultExpanded,e[8]=l.group.label,e[9]=o,e[10]=a):a=e[10],a}case"items":{let n;if(e[11]!==i||e[12]!==l.items){let o;e[14]!==i?(o=a=>s.jsx(js,{item:a,onClose:i},a.key),e[14]=i,e[15]=o):o=e[15],n=l.items.map(o),e[11]=i,e[12]=l.items,e[13]=n}else n=e[13];let r;return e[16]!==n?(r=s.jsx(cs,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(ds,{children:s.jsx(ue,{className:"gap-1.5",children:n})})}),e[16]=n,e[17]=r):r=e[17],r}case"custom":return l.content}}function Ai(t){const e=M.c(27),{sections:l,onClose:i,footer:n,additionalContent:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ns,{}),e[0]=o):o=e[0];let a;e[1]!==i?(a=s.jsx(fs,{onNavigate:i}),e[1]=i,e[2]=a):a=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"flex-1"}),e[3]=d):d=e[3];const c=B();let m;e[4]!==c?(m=c("sidebar.navigationMobile.closeSidebar"),e[4]=c,e[5]=m):m=e[5];let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(qs,{size:16}),e[6]=f):f=e[6];let u;e[7]!==i||e[8]!==m?(u=s.jsx(Ut,{onClick:i,"aria-label":m,children:f}),e[7]=i,e[8]=m,e[9]=u):u=e[9];let p;e[10]!==a||e[11]!==u?(p=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[o,a,d,u]}),e[10]=a,e[11]=u,e[12]=p):p=e[12];let h;if(e[13]!==i||e[14]!==l){let j;e[16]!==i?(j=(y,v)=>s.jsx(Mi,{section:y,onClose:i},v),e[16]=i,e[17]=j):j=e[17],h=l.map(j),e[13]=i,e[14]=l,e[15]=h}else h=e[15];let b;e[18]!==r?(b=r&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:r}),e[18]=r,e[19]=b):b=e[19];let g;e[20]!==b||e[21]!==h?(g=s.jsxs(Rs,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[h,b]}),e[20]=b,e[21]=h,e[22]=g):g=e[22];let x;return e[23]!==n||e[24]!==g||e[25]!==p?(x=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[p,g,n]}),e[23]=n,e[24]=g,e[25]=p,e[26]=x):x=e[26],x}function Nt(t){const e=M.c(26),{item:l,onClose:i}=t;let n;e[0]!==l.className?(n=G("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",l.className),e[0]=l.className,e[1]=n):n=e[1];const r=n;if(l.href){const m=l.external?"_blank":void 0,f=l.external?"noopener noreferrer":void 0;let u;e[2]!==l.icon?(u=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:l.icon}),e[2]=l.icon,e[3]=u):u=e[3];let p;e[4]!==l.label?(p=s.jsx("span",{className:"flex-1",children:l.label}),e[4]=l.label,e[5]=p):p=e[5];let h;return e[6]!==r||e[7]!==l.href||e[8]!==i||e[9]!==m||e[10]!==f||e[11]!==u||e[12]!==p?(h=s.jsxs("a",{href:l.href,target:m,rel:f,className:r,onClick:i,children:[u,p]}),e[6]=r,e[7]=l.href,e[8]=i,e[9]=m,e[10]=f,e[11]=u,e[12]=p,e[13]=h):h=e[13],h}let o;e[14]!==l||e[15]!==i?(o=()=>{l.onClick?.(),i()},e[14]=l,e[15]=i,e[16]=o):o=e[16];let a;e[17]!==l.icon?(a=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:l.icon}),e[17]=l.icon,e[18]=a):a=e[18];let d;e[19]!==l.label?(d=s.jsx("span",{className:"flex-1",children:l.label}),e[19]=l.label,e[20]=d):d=e[20];let c;return e[21]!==r||e[22]!==o||e[23]!==a||e[24]!==d?(c=s.jsxs("button",{type:"button",onClick:o,className:r,children:[a,d]}),e[21]=r,e[22]=o,e[23]=a,e[24]=d,e[25]=c):c=e[25],c}function Ti(){const t=M.c(4),e=B();let l;t[0]!==e?(l=e("common.accountPopover.impersonating"),t[0]=e,t[1]=l):l=t[1];let i;return t[2]!==l?(i=s.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:l}),t[2]=l,t[3]=i):i=t[3],i}function vs(t){const e=M.c(38),{user:l,userImage:i,isImpersonating:n,isMobile:r}=t,o=B(),a=r?"py-4 border-b border-border":"py-3 mx-1 mt-1";let d;e[0]!==a?(d=G("flex items-center gap-3 px-4",a),e[0]=a,e[1]=d):d=e[1];const c=l?.name??"U";let m;e[2]!==c||e[3]!==i?(m=s.jsx(is,{url:i,fallback:c,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=c,e[3]=i,e[4]=m):m=e[4];let f;e[5]!==o||e[6]!==l?.name?(f=l?.name??o("common.accountPopover.defaultUserName"),e[5]=o,e[6]=l?.name,e[7]=f):f=e[7];let u;e[8]!==f?(u=s.jsx("p",{className:"text-sm font-medium truncate",children:f}),e[8]=f,e[9]=u):u=e[9];let p;e[10]!==n?(p=n&&s.jsx(Ti,{}),e[10]=n,e[11]=p):p=e[11];let h;e[12]!==u||e[13]!==p?(h=s.jsxs("div",{className:"flex items-center gap-2",children:[u,p]}),e[12]=u,e[13]=p,e[14]=h):h=e[14];const b=l?.email;let g;e[15]!==b?(g=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:b}),e[15]=b,e[16]=g):g=e[16];let x;e[17]!==g||e[18]!==h?(x=s.jsxs("div",{className:"flex-1 min-w-0",children:[h,g]}),e[17]=g,e[18]=h,e[19]=x):x=e[19];let j;e[20]!==o||e[21]!==l?(j=()=>{l?.id&&navigator.clipboard.writeText(l.id).then(()=>{Ht.success(o("common.accountPopover.userIdCopied"))})},e[20]=o,e[21]=l,e[22]=j):j=e[22];let y;e[23]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(jn,{size:14}),e[23]=y):y=e[23];let v;e[24]!==j?(v=s.jsx(Wt,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:y})}),e[24]=j,e[25]=v):v=e[25];let _;e[26]!==o?(_=o("common.accountPopover.copyUserId"),e[26]=o,e[27]=_):_=e[27];let w;e[28]!==_?(w=s.jsx(qt,{side:"right",children:s.jsx("p",{className:"text-xs",children:_})}),e[28]=_,e[29]=w):w=e[29];let S;e[30]!==v||e[31]!==w?(S=s.jsx(Xs,{delayDuration:300,children:s.jsxs(Kt,{children:[v,w]})}),e[30]=v,e[31]=w,e[32]=S):S=e[32];let k;return e[33]!==x||e[34]!==S||e[35]!==d||e[36]!==m?(k=s.jsxs("div",{className:d,children:[m,x,S]}),e[33]=x,e[34]=S,e[35]=d,e[36]=m,e[37]=k):k=e[37],k}function ys(t){const e=M.c(35),{themeOptions:l,preferences:i,setPreferences:n,isMobile:r}=t,o=B(),a=r?"size-8":"size-7",d=r?"px-3 py-3":"px-2 py-1.5";let c;e[0]!==d?(c=G("flex items-center justify-between border-t border-border/50",d),e[0]=d,e[1]=c):c=e[1];let m;if(e[2]!==a||e[3]!==i.theme||e[4]!==n||e[5]!==l){let _;e[7]!==a||e[8]!==i.theme||e[9]!==n?(_=w=>{const{value:S,icon:k,label:N}=w;return s.jsx("button",{type:"button","aria-label":N,onClick:()=>n(A=>({...A,theme:S})),className:G(a,"rounded-md flex items-center justify-center transition-colors",i.theme===S?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:k},S)},e[7]=a,e[8]=i.theme,e[9]=n,e[10]=_):_=e[10],m=l.map(_),e[2]=a,e[3]=i.theme,e[4]=n,e[5]=l,e[6]=m}else m=e[6];let f;e[11]!==m?(f=s.jsx("div",{className:"flex items-center gap-0.5",children:m}),e[11]=m,e[12]=f):f=e[12];let u;e[13]!==i.enableSounds||e[14]!==o?(u=i.enableSounds?o("common.accountPopover.disableSounds"):o("common.accountPopover.enableSounds"),e[13]=i.enableSounds,e[14]=o,e[15]=u):u=e[15];let p;e[16]!==n?(p=()=>n(Ii),e[16]=n,e[17]=p):p=e[17];const h=i.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let b;e[18]!==a||e[19]!==h?(b=G(a,"rounded-md flex items-center justify-center transition-colors",h),e[18]=a,e[19]=h,e[20]=b):b=e[20];let g;e[21]!==i.enableSounds?(g=i.enableSounds?s.jsx(on,{size:14}):s.jsx(rn,{size:14}),e[21]=i.enableSounds,e[22]=g):g=e[22];let x;e[23]!==u||e[24]!==p||e[25]!==b||e[26]!==g?(x=s.jsx("button",{type:"button","aria-label":u,onClick:p,className:b,children:g}),e[23]=u,e[24]=p,e[25]=b,e[26]=g,e[27]=x):x=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.167.5"]}),e[28]=j):j=e[28];let y;e[29]!==x?(y=s.jsxs("div",{className:"flex items-center gap-2",children:[x,j]}),e[29]=x,e[30]=y):y=e[30];let v;return e[31]!==y||e[32]!==c||e[33]!==f?(v=s.jsxs("div",{className:c,children:[f,y]}),e[31]=y,e[32]=c,e[33]=f,e[34]=v):v=e[34],v}function Ii(t){return{...t,enableSounds:!t.enableSounds}}function _s(t){const e=M.c(54),{user:l,userImage:i,menuItems:n,signOutItem:r,stopImpersonatingItem:o,isImpersonating:a,themeOptions:d,preferences:c,setPreferences:m,close:f,isMobile:u}=t;if(u){let v;e[0]!==a||e[1]!==l||e[2]!==i?(v=s.jsx(vs,{user:l,userImage:i,isImpersonating:a,isMobile:!0}),e[0]=a,e[1]=l,e[2]=i,e[3]=v):v=e[3];let _;if(e[4]!==f||e[5]!==n){let $;e[7]!==f?($=P=>s.jsx(Nt,{item:P,onClose:f},P.key),e[7]=f,e[8]=$):$=e[8],_=n.map($),e[4]=f,e[5]=n,e[6]=_}else _=e[6];let w;e[9]!==f||e[10]!==o?(w=o&&s.jsx(Nt,{item:o,onClose:f}),e[9]=f,e[10]=o,e[11]=w):w=e[11];let S;e[12]!==f||e[13]!==r?(S=s.jsx(Nt,{item:r,onClose:f}),e[12]=f,e[13]=r,e[14]=S):S=e[14];let k;e[15]!==_||e[16]!==w||e[17]!==S?(k=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[_,w,S]})}),e[15]=_,e[16]=w,e[17]=S,e[18]=k):k=e[18];let N;e[19]!==c||e[20]!==m||e[21]!==d?(N=s.jsx(ys,{themeOptions:d,preferences:c,setPreferences:m,isMobile:!0}),e[19]=c,e[20]=m,e[21]=d,e[22]=N):N=e[22];let A;return e[23]!==v||e[24]!==k||e[25]!==N?(A=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[v,k,N]}),e[23]=v,e[24]=k,e[25]=N,e[26]=A):A=e[26],A}let p;e[27]!==a||e[28]!==l||e[29]!==i?(p=s.jsx(vs,{user:l,userImage:i,isImpersonating:a,isMobile:!1}),e[27]=a,e[28]=l,e[29]=i,e[30]=p):p=e[30];let h;if(e[31]!==f||e[32]!==n){let v;e[34]!==f?(v=_=>s.jsx(Nt,{item:_,onClose:f},_.key),e[34]=f,e[35]=v):v=e[35],h=n.map(v),e[31]=f,e[32]=n,e[33]=h}else h=e[33];let b;e[36]!==f||e[37]!==o?(b=o&&s.jsx(Nt,{item:o,onClose:f}),e[36]=f,e[37]=o,e[38]=b):b=e[38];let g;e[39]!==f||e[40]!==r?(g=s.jsx(Nt,{item:r,onClose:f}),e[39]=f,e[40]=r,e[41]=g):g=e[41];let x;e[42]!==h||e[43]!==b||e[44]!==g?(x=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[h,b,g]}),e[42]=h,e[43]=b,e[44]=g,e[45]=x):x=e[45];let j;e[46]!==c||e[47]!==m||e[48]!==d?(j=s.jsx(ys,{themeOptions:d,preferences:c,setPreferences:m,isMobile:!1}),e[46]=c,e[47]=m,e[48]=d,e[49]=j):j=e[49];let y;return e[50]!==p||e[51]!==x||e[52]!==j?(y=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[p,x,j]})}),e[50]=p,e[51]=x,e[52]=j,e[53]=y):y=e[53],y}function os(){const t=M.c(107),e=B(),{data:l}=Ft.useSession(),{org:i}=pe(),n=Me();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org",shouldThrow:!1},t[0]=r):r=t[0];const a=vl(r)?.params.org,[d,c]=yl(),m=Fs(),{isAdmin:f}=Mn(),u=An(),[p,h]=L.useState(!1),[b,g]=L.useState(!1),x=l?.user,j=x?.image,y=!!l?.session?.impersonatedBy;let v;t[1]===Symbol.for("react.memo_cache_sentinel")?(v=()=>h(!1),t[1]=v):v=t[1];const _=v;let w;t[2]!==e?(w=e("common.accountPopover.preferences"),t[2]=e,t[3]=w):w=t[3];let S;t[4]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Vt,{size:16}),t[4]=S):S=t[4];let k;t[5]!==n||t[6]!==a?(k=()=>{n({to:"/$org/settings/profile",params:{org:a??""}})},t[5]=n,t[6]=a,t[7]=k):k=t[7];let N;t[8]!==w||t[9]!==k?(N={key:"preferences",label:w,icon:S,onClick:k},t[8]=w,t[9]=k,t[10]=N):N=t[10];let A;t[11]!==i||t[12]!==n?(A=i?[{key:"connect-clients",label:"Connect to Agents",icon:s.jsx(_n,{size:16}),onClick:()=>{n({to:"/$org/settings/connect",params:{org:i.slug}})}}]:[],t[11]=i,t[12]=n,t[13]=A):A=t[13];let $;t[14]!==u||t[15]!==e?($=ql()&&!u?[{key:"install-on-mac",label:e("downloadApp.installOnMac"),icon:s.jsx(vn,{size:16}),onClick:()=>g(!0)}]:[],t[14]=u,t[15]=e,t[16]=$):$=t[16];let P;t[17]!==e?(P=e("common.accountPopover.termsOfUse"),t[17]=e,t[18]=P):P=t[18];let O;t[19]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(nn,{size:16}),t[19]=O):O=t[19];let D;t[20]!==P?(D={key:"terms",label:P,icon:O,href:"https://www.decocms.com/terms-of-use",external:!0},t[20]=P,t[21]=D):D=t[21];let T;t[22]!==e?(T=e("common.accountPopover.privacyPolicy"),t[22]=e,t[23]=T):T=t[23];let E;t[24]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(wn,{size:16}),t[24]=E):E=t[24];let z;t[25]!==T?(z={key:"privacy",label:T,icon:E,href:"https://www.decocms.com/privacy-policy",external:!0},t[25]=T,t[26]=z):z=t[26];let I;t[27]!==e?(I=e("common.accountPopover.githubRepo"),t[27]=e,t[28]=I):I=t[28];let H;t[29]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(_l,{className:"w-4 h-4"}),t[29]=H):H=t[29];let Y;t[30]!==I?(Y={key:"github",label:I,icon:H,href:"https://github.com/decocms/studio",external:!0},t[30]=I,t[31]=Y):Y=t[31];let F;t[32]!==e?(F=e("common.accountPopover.community"),t[32]=e,t[33]=F):F=t[33];let U;t[34]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(Cn,{size:16}),t[34]=U):U=t[34];let K;t[35]!==F?(K={key:"community",label:F,icon:U,href:"https://decocms.com/discord",external:!0},t[35]=F,t[36]=K):K=t[36];let Q;t[37]!==e?(Q=e("common.accountPopover.homepage"),t[37]=e,t[38]=Q):Q=t[38];let se;t[39]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsx(yn,{size:16}),t[39]=se):se=t[39];let J;t[40]!==Q?(J={key:"homepage",label:Q,icon:se,href:"https://decocms.com",external:!0},t[40]=Q,t[41]=J):J=t[41];let me;t[42]!==f||t[43]!==n||t[44]!==e?(me=f?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:s.jsx(ln,{size:16}),onClick:()=>n({to:"/_admin"}),className:"text-warning"}]:[],t[42]=f,t[43]=n,t[44]=e,t[45]=me):me=t[45];let he;t[46]!==D||t[47]!==z||t[48]!==Y||t[49]!==K||t[50]!==J||t[51]!==me||t[52]!==N||t[53]!==A||t[54]!==$?(he=[N,...A,...$,D,z,Y,K,J,...me],t[46]=D,t[47]=z,t[48]=Y,t[49]=K,t[50]=J,t[51]=me,t[52]=N,t[53]=A,t[54]=$,t[55]=he):he=t[55];const fe=he;let xe;t[56]!==e?(xe=e("common.accountPopover.signOut"),t[56]=e,t[57]=xe):xe=t[57];let ge;t[58]===Symbol.for("react.memo_cache_sentinel")?(ge=s.jsx(bs,{size:16}),t[58]=ge):ge=t[58];let Ae;t[59]!==xe?(Ae={key:"logout",label:xe,icon:ge,onClick:$i},t[59]=xe,t[60]=Ae):Ae=t[60];const Se=Ae;let we;t[61]!==y||t[62]!==e?(we=y?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:s.jsx(bs,{size:16}),onClick:async()=>{const{error:Ie}=await Ft.admin.stopImpersonating();if(Ie){Ht.error(Ie.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[61]=y,t[62]=e,t[63]=we):we=t[63];const wt=we;let Te;t[64]===Symbol.for("react.memo_cache_sentinel")?(Te=s.jsx(Nn,{size:14}),t[64]=Te):Te=t[64];let Ne;t[65]!==e?(Ne=e("common.accountPopover.lightTheme"),t[65]=e,t[66]=Ne):Ne=t[66];let V;t[67]!==Ne?(V={value:"light",icon:Te,label:Ne},t[67]=Ne,t[68]=V):V=t[68];let be;t[69]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(kn,{size:14}),t[69]=be):be=t[69];let Z;t[70]!==e?(Z=e("common.accountPopover.darkTheme"),t[70]=e,t[71]=Z):Z=t[71];let ie;t[72]!==Z?(ie={value:"dark",icon:be,label:Z},t[72]=Z,t[73]=ie):ie=t[73];let ke;t[74]===Symbol.for("react.memo_cache_sentinel")?(ke=s.jsx(Sn,{size:14}),t[74]=ke):ke=t[74];let oe;t[75]!==e?(oe=e("common.accountPopover.systemTheme"),t[75]=e,t[76]=oe):oe=t[76];let ee;t[77]!==oe?(ee={value:"system",icon:ke,label:oe},t[77]=oe,t[78]=ee):ee=t[78];let je;t[79]!==V||t[80]!==ie||t[81]!==ee?(je=[V,ie,ee],t[79]=V,t[80]=ie,t[81]=ee,t[82]=je):je=t[82];const Ce=je;let ve;t[83]!==y||t[84]!==m||t[85]!==fe||t[86]!==d||t[87]!==c||t[88]!==Se||t[89]!==wt||t[90]!==Ce||t[91]!==x||t[92]!==j?(ve={user:x,userImage:j,menuItems:fe,signOutItem:Se,stopImpersonatingItem:wt,isImpersonating:y,themeOptions:Ce,preferences:d,setPreferences:c,close:_,isMobile:m},t[83]=y,t[84]=m,t[85]=fe,t[86]=d,t[87]=c,t[88]=Se,t[89]=wt,t[90]=Ce,t[91]=x,t[92]=j,t[93]=ve):ve=t[93];const X=ve;let re;t[94]!==y||t[95]!==m||t[96]!==p||t[97]!==X||t[98]!==e||t[99]!==x?.name||t[100]!==j?(re=m?s.jsxs(xn,{open:p,onOpenChange:h,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>h(!0),className:G("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",y&&"border-2 border-dashed border-warning"),children:[s.jsx(is,{url:j,fallback:x?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:x?.name??e("common.accountPopover.defaultAccountLabel")})]}),s.jsxs(gn,{className:"h-[80dvh] p-0",children:[s.jsx(bn,{className:"sr-only",children:e("common.accountPopover.account")}),s.jsx(_s,{...X})]})]}):s.jsxs(Ks,{open:p,onOpenChange:h,children:[s.jsx(Vs,{asChild:!0,children:s.jsxs(de,{tooltip:x?.name??e("common.accountPopover.defaultAccountLabel"),className:G("rounded-md",y&&"border-2 border-dashed border-warning"),children:[s.jsx(is,{url:j,fallback:x?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:x?.name??e("common.accountPopover.defaultAccountLabel")})]})}),s.jsx(Ys,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Pi,children:s.jsx(_s,{...X})})]}),t[94]=y,t[95]=m,t[96]=p,t[97]=X,t[98]=e,t[99]=x?.name,t[100]=j,t[101]=re):re=t[101];let te;t[102]!==b?(te=s.jsx(Kl,{open:b,onOpenChange:g}),t[102]=b,t[103]=te):te=t[103];let ye;return t[104]!==re||t[105]!==te?(ye=s.jsxs(s.Fragment,{children:[re,te]}),t[104]=re,t[105]=te,t[106]=ye):ye=t[106],ye}function Pi(t){return t.preventDefault()}function $i(){ce("signed_out",{source:"account_popover"}),Sl(),Ft.signOut()}class Oi extends L.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,l){}render(){return this.state.hasError?null:this.props.children}}function zi(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function Di(){const t=M.c(17),e=Me(),{org:l}=pe(),{hasDecoKey:i,balanceDollars:n}=fn();if(!i)return null;let r;t[0]!==n?(r=n!=null?`Credits: $${n.toFixed(2)}`:"Credits",t[0]=n,t[1]=r):r=t[1];let o;t[2]!==n?(o=G(n!=null&&zi(n)),t[2]=n,t[3]=o):o=t[3];let a;t[4]!==e||t[5]!==l.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:l.slug}}),t[4]=e,t[5]=l.slug,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(an,{}),t[7]=d):d=t[7];let c;t[8]!==n?(c=n!=null?`$${n.toFixed(2)}`:"Credits",t[8]=n,t[9]=c):c=t[9];let m;t[10]!==c?(m=s.jsx("span",{children:c}),t[10]=c,t[11]=m):m=t[11];let f;return t[12]!==r||t[13]!==o||t[14]!==a||t[15]!==m?(f=s.jsx(ue,{children:s.jsx(ne,{children:s.jsxs(de,{tooltip:r,className:o,onClick:a,children:[d,m]})})}),t[12]=r,t[13]=o,t[14]=a,t[15]=m,t[16]=f):f=t[16],f}function Ss(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Oi,{children:s.jsx(L.Suspense,{fallback:null,children:s.jsx(Di,{})})}),t[0]=e):e=t[0],e}function Ei(){const t=M.c(14),e=B(),l=Me(),{org:i}=pe();let n;t[0]!==e?(n=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==l||t[3]!==i.slug?(r=()=>l({to:"/$org/settings",params:{org:i.slug}}),t[2]=l,t[3]=i.slug,t[4]=r):r=t[4];let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Vt,{}),t[5]=o):o=t[5];let a;t[6]!==e?(a=e("sidebar.sidebarFooter.settings"),t[6]=e,t[7]=a):a=t[7];let d;t[8]!==a?(d=s.jsx("span",{children:a}),t[8]=a,t[9]=d):d=t[9];let c;return t[10]!==n||t[11]!==r||t[12]!==d?(c=s.jsxs(de,{tooltip:n,onClick:r,children:[o,d]}),t[10]=n,t[11]=r,t[12]=d,t[13]=c):c=t[13],c}function Ri(){const t=M.c(9),e=B(),l=Me(),{org:i}=pe();let n;t[0]!==e?(n=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==l||t[3]!==i.slug?(r=()=>l({to:"/$org/settings",params:{org:i.slug}}),t[2]=l,t[3]=i.slug,t[4]=r):r=t[4];let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Vt,{size:15}),t[5]=o):o=t[5];let a;return t[6]!==n||t[7]!==r?(a=s.jsx("button",{type:"button","aria-label":n,onClick:r,className:"shrink-0 flex items-center justify-center size-7 rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",children:o}),t[6]=n,t[7]=r,t[8]=a):a=t[8],a}function Ns(){const t=M.c(29),e=B(),[l,i]=L.useState(!1);let n;t[0]!==e?(n=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=n):n=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ws,{}),t[2]=r):r=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let a;t[5]!==o?(a=s.jsx("span",{children:o}),t[5]=o,t[6]=a):a=t[6];let d;t[7]!==n||t[8]!==a?(d=s.jsx(ne,{children:s.jsx(Qs,{trigger:s.jsxs(de,{tooltip:n,children:[r,a]})})}),t[7]=n,t[8]=a,t[9]=d):d=t[9];let c;t[10]!==e?(c=e("sidebar.sidebarFooter.addConnection"),t[10]=e,t[11]=c):c=t[11];let m,f;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=()=>i(!0),f=s.jsx(Tn,{}),t[12]=m,t[13]=f):(m=t[12],f=t[13]);let u;t[14]!==e?(u=e("sidebar.sidebarFooter.addConnection"),t[14]=e,t[15]=u):u=t[15];let p;t[16]!==u?(p=s.jsx("span",{children:u}),t[16]=u,t[17]=p):p=t[17];let h;t[18]!==c||t[19]!==p?(h=s.jsx(ne,{children:s.jsxs(de,{tooltip:c,onClick:m,children:[f,p]})}),t[18]=c,t[19]=p,t[20]=h):h=t[20];let b;t[21]!==h||t[22]!==d?(b=s.jsxs(ue,{className:"gap-0.5",children:[d,h]}),t[21]=h,t[22]=d,t[23]=b):b=t[23];let g;t[24]!==l?(g=s.jsx(un,{open:l,onOpenChange:i,mode:"browse"}),t[24]=l,t[25]=g):g=t[25];let x;return t[26]!==b||t[27]!==g?(x=s.jsxs(s.Fragment,{children:[b,g]}),t[26]=b,t[27]=g,t[28]=x):x=t[28],x}function ks(){const t=M.c(10),e=B();let l;t[0]!==e?(l=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=l):l=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ws,{}),t[2]=i):i=t[2];let n;t[3]!==e?(n=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=n):n=t[4];let r;t[5]!==n?(r=s.jsx("span",{children:n}),t[5]=n,t[6]=r):r=t[6];let o;return t[7]!==l||t[8]!==r?(o=s.jsx(ue,{className:"gap-0.5",children:s.jsx(ne,{children:s.jsx(Qs,{trigger:s.jsxs(de,{tooltip:l,children:[i,r]})})})}),t[7]=l,t[8]=r,t[9]=o):o=t[9],o}function Fi(){const t=M.c(17),{state:e}=kt(),l=e==="collapsed",i=ms(),n=!i;if(l){let c;t[0]!==n?(c=n&&s.jsx(Ss,{}),t[0]=n,t[1]=c):c=t[1];let m;t[2]!==i?(m=i?s.jsx(ks,{}):s.jsx(Ns,{}),t[2]=i,t[3]=m):m=t[3];let f;t[4]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(ne,{children:s.jsx(Ei,{})}),t[4]=f):f=t[4];let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsxs(ue,{children:[f,s.jsx(ne,{children:s.jsx(os,{})})]}),t[5]=u):u=t[5];let p;return t[6]!==c||t[7]!==m?(p=s.jsxs(ls,{className:"px-2 pb-3 gap-1",children:[c,m,u]}),t[6]=c,t[7]=m,t[8]=p):p=t[8],p}let r;t[9]!==n?(r=n&&s.jsx(Ss,{}),t[9]=n,t[10]=r):r=t[10];let o;t[11]!==i?(o=i?s.jsx(ks,{}):s.jsx(Ns,{}),t[11]=i,t[12]=o):o=t[12];let a;t[13]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(ue,{className:"gap-0.5",children:s.jsx(ne,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(os,{})}),s.jsx(Ri,{})]})})}),t[13]=a):a=t[13];let d;return t[14]!==r||t[15]!==o?(d=s.jsxs(ls,{className:"px-2 pb-3 gap-0.5",children:[r,o,a]}),t[14]=r,t[15]=o,t[16]=d):d=t[16],d}function Li(){const t=M.c(11),e=B(),l=Me(),{org:i}=pe(),{setOpenMobile:n}=kt();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(ue,{children:s.jsx(ne,{children:s.jsx(os,{})})})}),t[0]=r):r=t[0];let o;t[1]!==e?(o=e("sidebar.sidebarFooterMobile.settings"),t[1]=e,t[2]=o):o=t[2];let a;t[3]!==l||t[4]!==i.slug||t[5]!==n?(a=()=>{l({to:"/$org/settings",params:{org:i.slug}}),n(!1)},t[3]=l,t[4]=i.slug,t[5]=n,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Vt,{className:"size-4"}),t[7]=d):d=t[7];let c;return t[8]!==o||t[9]!==a?(c=s.jsx(ls,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[r,s.jsx(Ut,{"aria-label":o,onClick:a,children:d})]})}),t[8]=o,t[9]=a,t[10]=c):c=t[10],c}function ws(t){const e=M.c(15),{className:l,wrapperClassName:i,children:n}=t,[r,o]=L.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=x=>{x&&o(x.scrollHeight>x.clientHeight+1)},e[0]=a):a=e[0];const d=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=x=>{const j=x.currentTarget;o(j.scrollHeight-j.scrollTop>j.clientHeight+1)},e[1]=c):c=e[1];const m=c;let f;e[2]!==i?(f=G("relative",i),e[2]=i,e[3]=f):f=e[3];let u;e[4]!==n||e[5]!==l?(u=s.jsx("div",{ref:d,onScroll:m,className:l,children:n}),e[4]=n,e[5]=l,e[6]=u):u=e[6];const p=r?"opacity-100":"opacity-0";let h;e[7]!==p?(h=G("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",p),e[7]=p,e[8]=h):h=e[8];let b;e[9]!==h?(b=s.jsx("div",{"aria-hidden":!0,className:h}),e[9]=h,e[10]=b):b=e[10];let g;return e[11]!==f||e[12]!==u||e[13]!==b?(g=s.jsxs("div",{className:f,children:[u,b]}),e[11]=f,e[12]=u,e[13]=b,e[14]=g):g=e[14],g}function Gi(t){const e=M.c(9),{virtualMcpId:l,size:i,showAutomationBadge:n}=t,r=i===void 0?"sm":i,o=B();let a;e[0]!==r||e[1]!==l?(a=l?s.jsx(Bi,{virtualMcpId:l,size:r}):s.jsx(Lt,{icon:null,name:"?",size:r}),e[0]=r,e[1]=l,e[2]=a):a=e[2];let d;e[3]!==n||e[4]!==o?(d=n&&s.jsx("span",{"aria-label":o("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-blue-500 border border-blue-600 text-white",children:s.jsx(tl,{size:10,className:"text-white"})}),e[3]=n,e[4]=o,e[5]=d):d=e[5];let c;return e[6]!==a||e[7]!==d?(c=s.jsxs("div",{className:"relative shrink-0",children:[a,d]}),e[6]=a,e[7]=d,e[8]=c):c=e[8],c}function Bi(t){const e=M.c(6),{virtualMcpId:l,size:i}=t,n=el(l);if(!n){let a;return e[0]!==i?(a=s.jsx(Lt,{icon:null,name:"?",size:i}),e[0]=i,e[1]=a):a=e[1],a}const r=n.icon??null;let o;return e[2]!==n.title||e[3]!==i||e[4]!==r?(o=s.jsx(Lt,{icon:r,name:n.title,size:i}),e[2]=n.title,e[3]=i,e[4]=r,e[5]=o):o=e[5],o}function es(t){const e=M.c(51),{open:l,onOpenChange:i}=t,[n,r]=L.useState(""),{org:o}=pe(),{setTaskId:a}=Zs(),d=us(),c=B();let m,f,u;e[0]!==o.id||e[1]!==n?(u=n.trim(),f=Nl,m=zs.globalSearch(o.id,u),e[0]=o.id,e[1]=n,e[2]=m,e[3]=f,e[4]=u):(m=e[2],f=e[3],u=e[4]);let p;e[5]!==d||e[6]!==u?(p=async()=>await d.call("GLOBAL_SEARCH",{query:u,limit:u?20:10}),e[5]=d,e[6]=u,e[7]=p):p=e[7];let h;e[8]!==l||e[9]!==m||e[10]!==p?(h={queryKey:m,enabled:l,queryFn:p,staleTime:1e4},e[8]=l,e[9]=m,e[10]=p,e[11]=h):h=e[11];const{data:b,isFetching:g}=f(h);let x;e[12]!==b?.items?(x=b?.items??[],e[12]=b?.items,e[13]=x):x=e[13];const j=x;let y;e[14]!==i?(y=I=>{I||r(""),i(I)},e[14]=i,e[15]=y):y=e[15];const v=y;let _;e[16]!==v||e[17]!==a?(_=I=>{v(!1),a(I.id,I.virtual_mcp_id??void 0)},e[16]=v,e[17]=a,e[18]=_):_=e[18];const w=_;let S;e[19]!==c?(S=c("tasksPanel.globalSearchDialog.title"),e[19]=c,e[20]=S):S=e[20];let k;e[21]!==S?(k=s.jsx(Ls,{children:S}),e[21]=S,e[22]=k):k=e[22];let N;e[23]!==c?(N=c("tasksPanel.globalSearchDialog.description"),e[23]=c,e[24]=N):N=e[24];let A;e[25]!==N?(A=s.jsx(Bl,{children:N}),e[25]=N,e[26]=A):A=e[26];let $;e[27]!==A||e[28]!==k?($=s.jsxs(Hl,{className:"sr-only",children:[k,A]}),e[27]=A,e[28]=k,e[29]=$):$=e[29];let P;e[30]!==c?(P=c("tasksPanel.globalSearchDialog.placeholder"),e[30]=c,e[31]=P):P=e[31];let O;e[32]!==n||e[33]!==P?(O=s.jsx(Bn,{value:n,onValueChange:r,placeholder:P}),e[32]=n,e[33]=P,e[34]=O):O=e[34];let D;e[35]!==w||e[36]!==g||e[37]!==j||e[38]!==c||e[39]!==u?(D=s.jsx(Rn,{children:g&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c("tasksPanel.globalSearchDialog.searching")}):j.length===0?s.jsx(Fn,{children:c("tasksPanel.globalSearchDialog.noResults")}):s.jsx(Ln,{heading:u?void 0:c("tasksPanel.globalSearchDialog.recent"),children:j.map(I=>I.type==="thread"?s.jsxs(Gn,{value:`thread:${I.id}:${I.title}`,onSelect:()=>w(I),className:"gap-2.5",children:[s.jsx(Gi,{virtualMcpId:I.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:I.title||c("tasksPanel.globalSearchDialog.untitledChat")})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(I.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${I.id}`):null)})}),e[35]=w,e[36]=g,e[37]=j,e[38]=c,e[39]=u,e[40]=D):D=e[40];let T;e[41]!==O||e[42]!==D?(T=s.jsxs(Hn,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[O,D]}),e[41]=O,e[42]=D,e[43]=T):T=e[43];let E;e[44]!==$||e[45]!==T?(E=s.jsxs(Ul,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[$,T]}),e[44]=$,e[45]=T,e[46]=E):E=e[46];let z;return e[47]!==v||e[48]!==l||e[49]!==E?(z=s.jsx(Gs,{open:l,onOpenChange:v,children:E}),e[47]=v,e[48]=l,e[49]=E,e[50]=z):z=e[50],z}function Hi(t){return t==="ephemeral"||t.startsWith("thread:")}function al(t){const e=M.c(45),{task:l,isActive:i,onClick:n,onArchive:r,showAutomationBadge:o,showAgentIcon:a,hideStatusIdle:d,indented:c}=t,m=B(),f=qn(l.status),u=f.icon,p=l.metadata?.kind==="tool_call_run",h=el(p?void 0:l.virtual_mcp_id);let b;e[0]!==h?(b=Xn(h),e[0]=h,e[1]=b):b=e[1];const g=b;Kn(6e4);const x=o||!!l.trigger_id,j=l.id,y="button",v=0;let _;e[2]!==n?(_=F=>{F.target===F.currentTarget&&(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),n())},e[2]=n,e[3]=_):_=e[3];const w=c?"-ml-4 pl-6":"pl-[7px]",S=i?"bg-accent text-accent-foreground":"hover:bg-accent/60";let k;e[4]!==w||e[5]!==S?(k=G("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",w,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",S),e[4]=w,e[5]=S,e[6]=k):k=e[6];let N;e[7]!==p||e[8]!==a||e[9]!==h?.icon||e[10]!==h?.title?(N=a&&!p&&s.jsx(Lt,{icon:h?.icon??null,name:h?.title??"?",size:"2xs"}),e[7]=p,e[8]=a,e[9]=h?.icon,e[10]=h?.title,e[11]=N):N=e[11];let A;e[12]!==x||e[13]!==m?(A=x&&s.jsx(tl,{size:12,"aria-label":m("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-blue-500"}),e[12]=x,e[13]=m,e[14]=A):A=e[14];let $;e[15]!==m||e[16]!==l.title?($=l.title||m("tasksPanel.taskRow.untitledTask"),e[15]=m,e[16]=l.title,e[17]=$):$=e[17];let P;e[18]!==$?(P=s.jsx("div",{className:"text-sm text-foreground truncate",children:$}),e[18]=$,e[19]=P):P=e[19];let O;e[20]!==A||e[21]!==P?(O=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[A,P]}),e[20]=A,e[21]=P,e[22]=O):O=e[22];let D;e[23]!==g||e[24]!==i||e[25]!==l.branch||e[26]!==l.updated_at?(D=l.updated_at&&s.jsxs("div",{className:G("flex items-center gap-1 text-[11px] min-w-0",i?"text-accent-foreground/70":"text-muted-foreground/60"),children:[l.branch&&!Hi(l.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:l.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):g?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[g.owner,"/",g.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:Yn(new Date(l.updated_at))})]}),e[23]=g,e[24]=i,e[25]=l.branch,e[26]=l.updated_at,e[27]=D):D=e[27];let T;e[28]!==O||e[29]!==D?(T=s.jsxs("div",{className:"flex-1 min-w-0",children:[O,D]}),e[28]=O,e[29]=D,e[30]=T):T=e[30];const E="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",z=!d&&s.jsx("span",{className:G("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",r&&"group-hover/row:opacity-0"),"aria-label":m("tasksPanel.taskRow.statusLabel",{status:f.label}),children:s.jsx(u,{size:14,className:G(f.iconClassName,l.status==="in_progress"&&"animate-spin")})});let I;e[31]!==r||e[32]!==m?(I=r&&s.jsxs(Kt,{children:[s.jsx(Wt,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":m("tasksPanel.taskRow.archiveTask"),onClick:F=>{F.stopPropagation(),r()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto transition-opacity flex size-8 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx(kl,{size:14})})}),s.jsx(qt,{side:"right",children:m("tasksPanel.taskRow.archive")})]}),e[31]=r,e[32]=m,e[33]=I):I=e[33];let H;e[34]!==z||e[35]!==I?(H=s.jsxs("div",{className:E,children:[z,I]}),e[34]=z,e[35]=I,e[36]=H):H=e[36];let Y;return e[37]!==n||e[38]!==T||e[39]!==H||e[40]!==_||e[41]!==k||e[42]!==N||e[43]!==l.id?(Y=s.jsxs("div",{"data-task-id":j,role:y,tabIndex:v,onClick:n,onKeyDown:_,className:k,children:[N,T,H]}),e[37]=n,e[38]=T,e[39]=H,e[40]=_,e[41]=k,e[42]=N,e[43]=l.id,e[44]=Y):Y=e[44],Y}const Cs=["requires_action","in_progress","failed","expired","completed"];function Ui(t){const e=new Map(Cs.map(l=>[l,[]]));for(const l of t){const i=l.status??"completed";(e.get(i)??e.get("completed")).push(l)}return Cs.map(l=>({status:l,threads:e.get(l)}))}const Wi="sidebar.group.expanded.";function qi(t,e){const l=M.c(3),[i,n]=Bt(`${Wi}${t}`,e);let r;return l[0]!==i||l[1]!==n?(r=[i,n],l[0]=i,l[1]=n,l[2]=r):r=l[2],r}function cl(t){const e=M.c(18),{onClick:l,isFetching:i,indented:n}=t,r=B();let o;e[0]!==r?(o=r("sidebar.showMoreButton.ariaLabel"),e[0]=r,e[1]=o):o=e[1];const a=n?"-ml-4 pl-6 pr-2":"px-2";let d;e[2]!==a?(d=G("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",a,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=a,e[3]=d):d=e[3];let c;e[4]!==i?(c=i&&s.jsx(wl,{size:14,className:"animate-spin"}),e[4]=i,e[5]=c):c=e[5];let m;e[6]!==i||e[7]!==r?(m=r(i?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=i,e[7]=r,e[8]=m):m=e[8];let f;e[9]!==m?(f=s.jsx("span",{children:m}),e[9]=m,e[10]=f):f=e[10];let u;return e[11]!==i||e[12]!==l||e[13]!==o||e[14]!==d||e[15]!==c||e[16]!==f?(u=s.jsxs("button",{type:"button","aria-label":o,onClick:l,disabled:i,className:d,children:[c,f]}),e[11]=i,e[12]=l,e[13]=o,e[14]=d,e[15]=c,e[16]=f,e[17]=u):u=e[17],u}function Ki(t,e,l,i){return[t,e,l,i.type,i.member,i.currentUserId??""].join("|")}function Vi(t){return t.member==="mine"&&!t.currentUserId}const dl=4;let Rt=0;const rs=[];function Yi(){for(;Rt<dl&&rs.length>0;){const t=rs.shift();t&&t()}}function ml(t){return new Promise((e,l)=>{const i=()=>{Rt++,t().then(e,l).finally(()=>{Rt--,Yi()})};Rt<dl?i():rs.push(i)})}const Yt=10;function Ms(t,e,l,i,n){const r={hidden:!1};i.member==="mine"&&i.currentUserId&&(r.created_by=i.currentUserId),i.type==="automation"&&(r.has_trigger=!0),i.type==="manual"&&(r.has_trigger=!1);const o={where:r,limit:n,offset:l,orderBy:[{field:["updated_at"],direction:"desc"}]};return o.status=e,o}function Xi(t,e,l,i){let n=0;for(const r of t)fl(r,e,l,i)&&n++;return n}function ts(t,e,l,i){return Xi(t,e,l,i)}function Qi(t,e){return!!(t>=Yt||t===0&&e)}function As(t,e){return t<e}function Ji(t,e){return e===!1?!1:e===!0?!0:t}function fl(t,e,l,i){return!(t.hidden||(t.status??"completed")!==l||i.member==="mine"&&i.currentUserId&&t.created_by!==i.currentUserId||i.type==="automation"&&!t.trigger_id||i.type==="manual"&&t.trigger_id)}const Gt=new Map,Et=new Map;function Zi(t,e){return e?t>=Yt?!0:null:!1}function Ts(t){return Gt.get(t)}function eo(t,e){Gt.set(t,e)}function to(t,e,l){const i=Gt.get(t);if(i!==void 0){l(i);return}let n=Et.get(t);n||(n=ml(e).then(r=>(Gt.set(t,r),Et.delete(t),r)).catch(()=>(Et.delete(t),Promise.reject(new Error("group probe failed")))),Et.set(t,n)),n.then(l,()=>l(!1))}function Is(t){const e=t,l=Array.isArray(e.items)?e.items:[];return{items:l,hasMore:e.hasMore??l.length===Yt,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function so(t,e,l,i,n){let r=0;for(const o of t)e.has(o.id)||fl(o,l,i,n)&&r++;return r}function lo(t,e,l,i){const n=M.c(8),{org:r}=pe(),o=Ki(r.id,t,e,l);let a;n[0]!==l?(a=Vi(l),n[0]=l,n[1]=a):a=n[1];const d=a,[c,m]=L.useState({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==o&&m({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});const f=On(),{threads:u,hasMore:p}=Js(),h=ts(u,t,e,l),b=Qi(h,p),g=Zi(h,p),x=us();if(c.identity===o&&c.serverHasMore===null){const S=g??Ts(o);S!==void 0&&m({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:S})}!d&&c.identity===o&&c.serverHasMore===null&&g===null&&Ts(o)===void 0&&c.probeSubscribedIdentity!==o&&(m(S=>S.identity===o?{...S,isProbing:!0,probeSubscribedIdentity:o}:S),to(o,async()=>{const S=Ms(t,e,0,l,1),k=await x.call("COLLECTION_THREADS_LIST",S),{totalCount:N}=Is(k),A=ts(f.threads.get(),t,e,l);return N===void 0?!1:As(A,N)},S=>{m(k=>k.identity!==o?k:{...k,isProbing:!1,serverHasMore:S})}));const y=async function(){if(c.isFetching||c.isProbing||d)return;const k=o;m(N=>N.identity===k?{...N,isFetching:!0}:N);try{const N=ts(u,t,e,l),A=Ms(t,e,N,l,Yt),$=await ml(()=>x.call("COLLECTION_THREADS_LIST",A)),{items:P,hasMore:O,totalCount:D}=Is($),T=new Set(u.map(no)),E=so(P,T,t,e,l),z=N;f.mergeThreads(P),m(I=>{if(I.identity!==k)return I;let H;return D!==void 0?H=As(z+E,D):H=P.length===0||E===0?!1:O,eo(k,H),{...I,isFetching:!1,serverHasMore:H}})}catch(N){const A=N,$=A instanceof Error?A.message:String(A);Ht.error(`Could not load more tasks: ${$}`),m(P=>P.identity===k?{...P,isFetching:!1}:P)}},v=c.isFetching||c.isProbing,_=!d&&!v&&Ji(b,c.serverHasMore);let w;return n[2]!==v||n[3]!==y||n[4]!==_||n[5]!==c.isProbing||n[6]!==c.serverHasMore?(w={hasMore:_,isFetching:v,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:y},n[2]=v,n[3]=y,n[4]=_,n[5]=c.isProbing,n[6]=c.serverHasMore,n[7]=w):w=n[7],w}function no(t){return t.id}function io(t){const e=M.c(20),{status:l,threads:i,activeTaskId:n,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:d}=t,{isFetching:c,isProbing:m,loadMore:f,hasMore:u,serverHasMore:p}=lo("status",l,d),[h,b]=L.useState(!1);!h&&i.length===0&&p===!0&&!c&&!m&&(b(!0),queueMicrotask(()=>{f()}));let g;if(e[0]!==n||e[1]!==a||e[2]!==d||e[3]!==o||e[4]!==r||e[5]!==i){let y;e[7]!==n||e[8]!==a||e[9]!==d||e[10]!==o||e[11]!==r?(y=v=>s.jsx(al,{task:v,isActive:n===v.id,onClick:()=>r(v),onArchive:a&&v.created_by===d.currentUserId?()=>o(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[7]=n,e[8]=a,e[9]=d,e[10]=o,e[11]=r,e[12]=y):y=e[12],g=i.map(y),e[0]=n,e[1]=a,e[2]=d,e[3]=o,e[4]=r,e[5]=i,e[6]=g}else g=e[6];let x;e[13]!==u||e[14]!==c||e[15]!==f?(x=(u||c)&&s.jsx(cl,{onClick:()=>{f()},isFetching:c,indented:!0}),e[13]=u,e[14]=c,e[15]=f,e[16]=x):x=e[16];let j;return e[17]!==g||e[18]!==x?(j=s.jsxs(s.Fragment,{children:[g,x]}),e[17]=g,e[18]=x,e[19]=j):j=e[19],j}function oo(t){const e=M.c(36),{status:l,threads:i,activeTaskId:n,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:d}=t,c=Vn[l],m=c.icon,[f,u]=qi(`status-${l}`,!1);let p;e[0]!==f||e[1]!==u?(p=function(){u(!f)},e[0]=f,e[1]=u,e[2]=p):p=e[2];const h=p;let b;e[3]!==h?(b=k=>{k.target===k.currentTarget&&(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),h())},e[3]=h,e[4]=b):b=e[4];let g;e[5]!==m||e[6]!==c.iconClassName?(g=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(m,{size:12,className:c.iconClassName})}),e[5]=m,e[6]=c.iconClassName,e[7]=g):g=e[7];let x;e[8]!==f?(x=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:f?s.jsx(Qn,{size:14}):s.jsx(Us,{size:14})}),e[8]=f,e[9]=x):x=e[9];let j;e[10]!==g||e[11]!==x?(j=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[g,x]}),e[10]=g,e[11]=x,e[12]=j):j=e[12];let y;e[13]!==c.label?(y=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=y):y=e[14];let v;e[15]!==i.length?(v=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:i.length})}),e[15]=i.length,e[16]=v):v=e[16];let _;e[17]!==f||e[18]!==h||e[19]!==b||e[20]!==j||e[21]!==y||e[22]!==v?(_=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":f,onClick:h,onKeyDown:b,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-md text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[j,y,v]}),e[17]=f,e[18]=h,e[19]=b,e[20]=j,e[21]=y,e[22]=v,e[23]=_):_=e[23];let w;e[24]!==n||e[25]!==a||e[26]!==f||e[27]!==d||e[28]!==o||e[29]!==r||e[30]!==l||e[31]!==i?(w=f&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(io,{status:l,threads:i,activeTaskId:n,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:d})}),e[24]=n,e[25]=a,e[26]=f,e[27]=d,e[28]=o,e[29]=r,e[30]=l,e[31]=i,e[32]=w):w=e[32];let S;return e[33]!==_||e[34]!==w?(S=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[_,w]}),e[33]=_,e[34]=w,e[35]=S):S=e[35],S}function Ps(t){const e=M.c(38),{threads:l,groupBy:i,activeTaskId:n,onSelectTask:r,onArchiveTask:o,filters:a,hasMore:d,isFetchingMore:c,onLoadMore:m,filtersActive:f}=t;if(l.length===0&&!d&&!c){let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Wn,{className:"size-6 opacity-60"}),e[0]=g):g=e[0];const x=f?"No chats match your filters":"No chats yet";let j;return e[1]!==x?(j=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[g,s.jsx("p",{className:"text-sm",children:x})]}),e[1]=x,e[2]=j):j=e[2],j}const u=l.length>1||d;if(i==="status"){let g;if(e[3]!==n||e[4]!==u||e[5]!==a||e[6]!==o||e[7]!==r||e[8]!==l){let j;e[10]!==n||e[11]!==u||e[12]!==a||e[13]!==o||e[14]!==r?(j=y=>s.jsx(oo,{status:y.status,threads:y.threads,activeTaskId:n,onSelectTask:r,onArchiveTask:o,canArchive:u,filters:a},y.status),e[10]=n,e[11]=u,e[12]=a,e[13]=o,e[14]=r,e[15]=j):j=e[15],g=Ui(l).map(j),e[3]=n,e[4]=u,e[5]=a,e[6]=o,e[7]=r,e[8]=l,e[9]=g}else g=e[9];let x;return e[16]!==g?(x=s.jsx(s.Fragment,{children:g}),e[16]=g,e[17]=x):x=e[17],x}let p;if(e[18]!==n||e[19]!==u||e[20]!==a||e[21]!==o||e[22]!==r||e[23]!==l){let g;e[25]!==n||e[26]!==u||e[27]!==a||e[28]!==o||e[29]!==r?(g=x=>s.jsx(al,{task:x,isActive:n===x.id,onClick:()=>r(x),onArchive:u&&x.created_by===a.currentUserId?()=>o(x):void 0,showAutomationBadge:!!x.trigger_id,showAgentIcon:!0},x.id),e[25]=n,e[26]=u,e[27]=a,e[28]=o,e[29]=r,e[30]=g):g=e[30],p=l.map(g),e[18]=n,e[19]=u,e[20]=a,e[21]=o,e[22]=r,e[23]=l,e[24]=p}else p=e[24];let h;e[31]!==d||e[32]!==c||e[33]!==m?(h=(d||c)&&s.jsx(cl,{onClick:m,isFetching:c}),e[31]=d,e[32]=c,e[33]=m,e[34]=h):h=e[34];let b;return e[35]!==p||e[36]!==h?(b=s.jsxs(s.Fragment,{children:[p,h]}),e[35]=p,e[36]=h,e[37]=b):b=e[37],b}function ro(t,e,l){if(!l)return;const i=t.findIndex(n=>n.id===e);if(i!==-1){for(let n=i+1;n<t.length;n++){const r=t[n];if(r?.created_by===l)return r}for(let n=i-1;n>=0;n--){const r=t[n];if(r?.created_by===l)return r}}}function ao(t){const e=M.c(43),{branch:l,onOutcome:i}=t,n=B();let r;e[0]!==i?(r=S=>{S||i("cancel")},e[0]=i,e[1]=r):r=e[1];let o;e[2]!==n?(o=n("sidebar.archiveWorktreeDialog.title"),e[2]=n,e[3]=o):o=e[3];let a;e[4]!==o?(a=s.jsx(Jn,{children:o}),e[4]=o,e[5]=a):a=e[5];let d;e[6]!==n?(d=n("sidebar.archiveWorktreeDialog.stopsAndDeletesBefore"),e[6]=n,e[7]=d):d=e[7];let c;e[8]!==l?(c=s.jsx("span",{className:"font-mono",children:l}),e[8]=l,e[9]=c):c=e[9];let m;e[10]!==n?(m=n("sidebar.archiveWorktreeDialog.stopsAndDeletesAfter"),e[10]=n,e[11]=m):m=e[11];let f;e[12]!==d||e[13]!==c||e[14]!==m?(f=s.jsxs(Zn,{children:[d," ",c," ",m]}),e[12]=d,e[13]=c,e[14]=m,e[15]=f):f=e[15];let u;e[16]!==a||e[17]!==f?(u=s.jsxs(ei,{children:[a,f]}),e[16]=a,e[17]=f,e[18]=u):u=e[18];let p;e[19]!==i?(p=()=>i("cancel"),e[19]=i,e[20]=p):p=e[20];let h;e[21]!==n?(h=n("sidebar.archiveWorktreeDialog.cancel"),e[21]=n,e[22]=h):h=e[22];let b;e[23]!==h||e[24]!==p?(b=s.jsx(ti,{onClick:p,children:h}),e[23]=h,e[24]=p,e[25]=b):b=e[25];let g;e[26]===Symbol.for("react.memo_cache_sentinel")?(g=G(Cl({variant:"destructive"})),e[26]=g):g=e[26];let x;e[27]!==i?(x=()=>i("confirm"),e[27]=i,e[28]=x):x=e[28];let j;e[29]!==n?(j=n("sidebar.archiveWorktreeDialog.confirm"),e[29]=n,e[30]=j):j=e[30];let y;e[31]!==x||e[32]!==j?(y=s.jsx(si,{className:g,onClick:x,children:j}),e[31]=x,e[32]=j,e[33]=y):y=e[33];let v;e[34]!==b||e[35]!==y?(v=s.jsxs(li,{children:[b,y]}),e[34]=b,e[35]=y,e[36]=v):v=e[36];let _;e[37]!==v||e[38]!==u?(_=s.jsxs(ni,{children:[u,v]}),e[37]=v,e[38]=u,e[39]=_):_=e[39];let w;return e[40]!==r||e[41]!==_?(w=s.jsx(ii,{open:!0,onOpenChange:r,children:_}),e[40]=r,e[41]=_,e[42]=w):w=e[42],w}function co(t,e){return null}function mo(t,e){return t.some(l=>l.id!==e.taskId&&!l.hidden&&l.branch===e.branch&&l.virtual_mcp_id===e.virtualMcpId)}const fo=["archive","reclaim-worktree"],uo=[];function po(t){return t==="confirm"?fo:uo}function $s(t){const e=M.c(17),{label:l,onClick:i,active:n,children:r}=t,[o,a]=L.useState(!1);let d,c,m,f;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>a(!0),c=()=>a(!1),m=()=>a(!0),f=()=>a(!1),e[0]=d,e[1]=c,e[2]=m,e[3]=f):(d=e[0],c=e[1],m=e[2],f=e[3]);const u=n&&"bg-sidebar-accent text-foreground";let p;e[4]!==u?(p=G("md:size-[34px] rounded-lg",u),e[4]=u,e[5]=p):p=e[5];let h;e[6]!==r||e[7]!==l||e[8]!==i||e[9]!==p?(h=s.jsx(Wt,{asChild:!0,children:s.jsx(Ut,{"aria-label":l,onClick:i,onPointerEnter:d,onPointerLeave:c,onFocus:m,onBlur:f,className:p,children:r})}),e[6]=r,e[7]=l,e[8]=i,e[9]=p,e[10]=h):h=e[10];let b;e[11]!==l?(b=s.jsx(qt,{side:"bottom",children:l}),e[11]=l,e[12]=b):b=e[12];let g;return e[13]!==o||e[14]!==h||e[15]!==b?(g=s.jsxs(Kt,{open:o,children:[h,b]}),e[13]=o,e[14]=h,e[15]=b,e[16]=g):g=e[16],g}function ss(t){const e=M.c(13),{label:l,value:i,onChange:n,options:r}=t;let o;e[0]!==l?(o=s.jsx("span",{className:"text-sm text-muted-foreground",children:l}),e[0]=l,e[1]=o):o=e[1];let a;e[2]!==n?(a=f=>f&&n(f),e[2]=n,e[3]=a):a=e[3];let d;e[4]!==r?(d=r.map(ho),e[4]=r,e[5]=d):d=e[5];let c;e[6]!==a||e[7]!==d||e[8]!==i?(c=s.jsx($n,{type:"single",size:"sm",value:i,onValueChange:a,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:d}),e[6]=a,e[7]=d,e[8]=i,e[9]=c):c=e[9];let m;return e[10]!==o||e[11]!==c?(m=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,c]}),e[10]=o,e[11]=c,e[12]=m):m=e[12],m}function ho(t){return s.jsxs(Pn,{value:t.value,className:"h-6 gap-1.5 rounded-md border border-transparent px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:border-border data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",children:[t.icon,t.label]},t.value)}function ul(t){const e=M.c(239);let l;e[0]!==t?(l=t===void 0?{}:t,e[0]=t,e[1]=l):l=e[1];const{onNavigate:i}=l,n=B(),{data:r}=Ft.useSession(),o=r?.user?.id,{org:a}=pe();let d;e[2]!==a.id?(d=Jl(a.id),e[2]=a.id,e[3]=d):d=e[3];const c=d.id,{threads:m,hasMore:f,isFetchingMore:u,fetchNextPage:p}=Js(),h=m.filter(jo),{hide:b,setScope:g}=zn(),x=Me(),j=us(),{setTaskId:y,createNewTask:v}=Zs();let _;e[4]===Symbol.for("react.memo_cache_sentinel")?(_={strict:!1},e[4]=_):_=e[4];const w=Ml(_);let S;e[5]===Symbol.for("react.memo_cache_sentinel")?(S={strict:!1},e[5]=S):S=e[5];const k=Ds(S),N=w.taskId??null;let A;e[6]!==N||e[7]!==m||e[8]!==k.virtualmcpid?(A=k.virtualmcpid??m.find(C=>C.id===N)?.virtual_mcp_id??null,e[6]=N,e[7]=m,e[8]=k.virtualmcpid,e[9]=A):A=e[9];const $=A;let P;e[10]!==i?(P=()=>{i?.()},e[10]=i,e[11]=P):P=e[11];const O=P,D=[...h].sort(bo),[T,E]=L.useState("all"),[z,I]=L.useState("flat"),[H,Y]=Bt("sidebar-threads-scope-all",!1),[F,U]=L.useState(!1),[K,Q]=L.useState(!1),[se,J]=L.useState(null),me=o??null;let he;e[12]!==me||e[13]!==T?(he={type:T,member:"mine",currentUserId:me},e[12]=me,e[13]=T,e[14]=he):he=e[14];const fe=he,xe={};H||(xe.created_by="me"),g(xe);let ge;e[15]!==o?(ge=C=>o?C.filter(R=>R.created_by===o):[],e[15]=o,e[16]=ge):ge=e[16];const Ae=ge;let Se;e[17]!==T?(Se=C=>T==="automation"?C.filter(go):T==="manual"?C.filter(xo):C,e[17]=T,e[18]=Se):Se=e[18];const we=Se,wt=Ae(D),Te=we(wt),Ne=we(D),V=H?Ne:Te;let be;e[19]!==N||e[20]!==O||e[21]!==o||e[22]!==b||e[23]!==x||e[24]!==a.slug||e[25]!==y||e[26]!==V?(be=C=>{const R=C.id===N,W=b(C.id);if(En(C.id),!R)return W;const q=ro(V,C.id,o);return O(),q?y(q.id,q.virtual_mcp_id):x({to:"/$org",params:{org:a.slug}}),W},e[19]=N,e[20]=O,e[21]=o,e[22]=b,e[23]=x,e[24]=a.slug,e[25]=y,e[26]=V,e[27]=be):be=e[27];const Z=be;let ie;e[28]!==j||e[29]!==n?(ie=async C=>{try{await j.call("SANDBOX_DELETE",{virtualMcpId:C.virtualMcpId,branch:C.branch,sandboxProviderKind:"user-desktop",removeWorktree:!0})}catch{Ht.error(n("sidebar.archiveWorktreeDialog.reclaimFailed",{branch:C.branch}))}},e[28]=j,e[29]=n,e[30]=ie):ie=e[30];const ke=ie;let oe;e[31]!==m||e[32]!==Z||e[33]!==o||e[34]!==J?(oe=C=>{if(o&&C.created_by&&C.created_by!==o)return;const R=co();if(!R||mo(m,R)){Z(C);return}J({task:C,target:R})},e[31]=m,e[32]=Z,e[33]=o,e[34]=J,e[35]=oe):oe=e[35];const ee=oe;let je;e[36]!==Z||e[37]!==se||e[38]!==ke||e[39]!==J?(je=C=>{const R=se;R&&(J(null),(async()=>{for(const W of po(C))if(W==="archive")try{await Z(R.task)}catch{return}else await ke(R.target)})())},e[36]=Z,e[37]=se,e[38]=ke,e[39]=J,e[40]=je):je=e[40];const Ce=je;let ve;e[41]!==Ce||e[42]!==se?(ve=se?s.jsx(ao,{branch:se.target.branch,onOutcome:Ce}):null,e[41]=Ce,e[42]=se,e[43]=ve):ve=e[43];const X=ve;let re;e[44]!==O||e[45]!==y?(re=C=>{O(),y(C.id,C.virtual_mcp_id)},e[44]=O,e[45]=y,e[46]=re):re=e[46];const te=re;let ye;e[47]!==$||e[48]!==N||e[49]!==m||e[50]!==O||e[51]!==v||e[52]!==c?(ye=()=>{const C=$??c,R=m.find(W=>W.id===N)?.branch??null;ce("sidebar_new_thread_clicked",{virtual_mcp_id:C}),O(),v(C,R)},e[47]=$,e[48]=N,e[49]=m,e[50]=O,e[51]=v,e[52]=c,e[53]=ye):ye=e[53];const Ie=ye,{state:hl,isMobile:hs,toggleSidebar:Xt}=kt();if(hl==="collapsed"&&!hs){let C;e[54]!==a?(C=s.jsx(hn,{org:a,size:"sm"}),e[54]=a,e[55]=C):C=e[55];let R;e[56]!==a.name||e[57]!==C?(R=s.jsx(de,{tooltip:a.name,children:C}),e[56]=a.name,e[57]=C,e[58]=R):R=e[58];let W;e[59]!==a.slug||e[60]!==R?(W=s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(pn,{orgParam:a.slug,side:"right",align:"start",trigger:R})}),e[59]=a.slug,e[60]=R,e[61]=W):W=e[61];let q;e[62]!==n?(q=n("sidebar.taskGroupsList.toggleSidebar"),e[62]=n,e[63]=q):q=e[63];let ae;e[64]!==n?(ae=n("sidebar.taskGroupsList.toggleSidebar"),e[64]=n,e[65]=ae):ae=e[65];let Ot;e[66]===Symbol.for("react.memo_cache_sentinel")?(Ot=s.jsx(qs,{size:16}),e[66]=Ot):Ot=e[66];let xt;e[67]!==q||e[68]!==ae||e[69]!==Xt?(xt=s.jsx(ne,{children:s.jsx(de,{"aria-label":q,tooltip:ae,onClick:Xt,children:Ot})}),e[67]=q,e[68]=ae,e[69]=Xt,e[70]=xt):xt=e[70];let gt;e[71]!==n?(gt=n("sidebar.taskGroupsList.searchChats"),e[71]=n,e[72]=gt):gt=e[72];let bt;e[73]!==n?(bt=n("sidebar.taskGroupsList.searchChats"),e[73]=n,e[74]=bt):bt=e[74];let jt;e[75]!==Q||e[76]!==U?(jt=()=>{ce("tasks_panel_search_opened"),Q(!0),U(!0)},e[75]=Q,e[76]=U,e[77]=jt):jt=e[77];let zt;e[78]===Symbol.for("react.memo_cache_sentinel")?(zt=s.jsx(gs,{size:16}),e[78]=zt):zt=e[78];let vt;e[79]!==gt||e[80]!==bt||e[81]!==jt?(vt=s.jsx(ne,{children:s.jsx(de,{"aria-label":gt,tooltip:bt,onClick:jt,children:zt})}),e[79]=gt,e[80]=bt,e[81]=jt,e[82]=vt):vt=e[82];let yt;e[83]!==xt||e[84]!==vt?(yt=s.jsxs(ue,{className:"mt-2 min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[xt,vt]}),e[83]=xt,e[84]=vt,e[85]=yt):yt=e[85];let _t;e[86]!==K||e[87]!==F||e[88]!==U?(_t=K&&s.jsx(es,{open:F,onOpenChange:U}),e[86]=K,e[87]=F,e[88]=U,e[89]=_t):_t=e[89];let Dt;return e[90]!==X||e[91]!==W||e[92]!==yt||e[93]!==_t?(Dt=s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[W,yt,_t,X]}),e[90]=X,e[91]=W,e[92]=yt,e[93]=_t,e[94]=Dt):Dt=e[94],Dt}const le=z!=="flat"||T!=="all"||H===!0;let Pe;e[95]!==n?(Pe=n("sidebar.taskGroupsList.filterChats"),e[95]=n,e[96]=Pe):Pe=e[96];let Mt;e[97]===Symbol.for("react.memo_cache_sentinel")?(Mt=s.jsx(In,{size:16}),e[97]=Mt):Mt=e[97];let $e;e[98]!==le?($e=le&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[98]=le,e[99]=$e):$e=e[99];let Oe;e[100]!==le||e[101]!==Pe||e[102]!==$e?(Oe=s.jsx(Wt,{asChild:!0,children:s.jsx(Vs,{asChild:!0,children:s.jsxs(Ut,{"aria-label":Pe,active:le,className:"md:size-[34px] rounded-lg",children:[Mt,$e]})})}),e[100]=le,e[101]=Pe,e[102]=$e,e[103]=Oe):Oe=e[103];let ze;e[104]!==n?(ze=n("sidebar.taskGroupsList.filterChats"),e[104]=n,e[105]=ze):ze=e[105];let De;e[106]!==ze?(De=s.jsx(qt,{side:"bottom",children:ze}),e[106]=ze,e[107]=De):De=e[107];let Ee;e[108]!==Oe||e[109]!==De?(Ee=s.jsxs(Kt,{children:[Oe,De]}),e[108]=Oe,e[109]=De,e[110]=Ee):Ee=e[110];let Re;e[111]!==n?(Re=n("sidebar.taskGroupsList.filterView"),e[111]=n,e[112]=Re):Re=e[112];let Fe;e[113]!==I?(Fe=C=>{ce("tasks_panel_group_by_changed",{to_value:C}),I(C)},e[113]=I,e[114]=Fe):Fe=e[114];let Le;e[115]!==n?(Le=n("sidebar.taskGroupsList.viewList"),e[115]=n,e[116]=Le):Le=e[116];let At;e[117]===Symbol.for("react.memo_cache_sentinel")?(At=s.jsx(cn,{size:13}),e[117]=At):At=e[117];let Ge;e[118]!==Le?(Ge={value:"flat",label:Le,icon:At},e[118]=Le,e[119]=Ge):Ge=e[119];let Be;e[120]!==n?(Be=n("sidebar.taskGroupsList.viewStatus"),e[120]=n,e[121]=Be):Be=e[121];let Tt;e[122]===Symbol.for("react.memo_cache_sentinel")?(Tt=s.jsx(dn,{size:13}),e[122]=Tt):Tt=e[122];let He;e[123]!==Be?(He={value:"status",label:Be,icon:Tt},e[123]=Be,e[124]=He):He=e[124];let Ue;e[125]!==Ge||e[126]!==He?(Ue=[Ge,He],e[125]=Ge,e[126]=He,e[127]=Ue):Ue=e[127];let We;e[128]!==z||e[129]!==Re||e[130]!==Fe||e[131]!==Ue?(We=s.jsx(ss,{label:Re,value:z,onChange:Fe,options:Ue}),e[128]=z,e[129]=Re,e[130]=Fe,e[131]=Ue,e[132]=We):We=e[132];let qe;e[133]!==n?(qe=n("sidebar.taskGroupsList.filterType"),e[133]=n,e[134]=qe):qe=e[134];let Ke;e[135]!==E?(Ke=C=>{ce("tasks_panel_filter_changed",{to_value:C}),E(C)},e[135]=E,e[136]=Ke):Ke=e[136];let Ve;e[137]!==n?(Ve=n("sidebar.taskGroupsList.typeAll"),e[137]=n,e[138]=Ve):Ve=e[138];let Ye;e[139]!==Ve?(Ye={value:"all",label:Ve},e[139]=Ve,e[140]=Ye):Ye=e[140];let Xe;e[141]!==n?(Xe=n("sidebar.taskGroupsList.typeChats"),e[141]=n,e[142]=Xe):Xe=e[142];let Qe;e[143]!==Xe?(Qe={value:"manual",label:Xe},e[143]=Xe,e[144]=Qe):Qe=e[144];let Je;e[145]!==n?(Je=n("sidebar.taskGroupsList.typeAuto"),e[145]=n,e[146]=Je):Je=e[146];let Ze;e[147]!==Je?(Ze={value:"automation",label:Je},e[147]=Je,e[148]=Ze):Ze=e[148];let et;e[149]!==Ye||e[150]!==Qe||e[151]!==Ze?(et=[Ye,Qe,Ze],e[149]=Ye,e[150]=Qe,e[151]=Ze,e[152]=et):et=e[152];let tt;e[153]!==qe||e[154]!==Ke||e[155]!==et||e[156]!==T?(tt=s.jsx(ss,{label:qe,value:T,onChange:Ke,options:et}),e[153]=qe,e[154]=Ke,e[155]=et,e[156]=T,e[157]=tt):tt=e[157];let st;e[158]!==n?(st=n("sidebar.taskGroupsList.filterScope"),e[158]=n,e[159]=st):st=e[159];const Qt=H?"team":"mine";let lt;e[160]!==Y?(lt=C=>Y(C==="team"),e[160]=Y,e[161]=lt):lt=e[161];let nt;e[162]!==n?(nt=n("sidebar.taskGroupsList.scopeMine"),e[162]=n,e[163]=nt):nt=e[163];let it;e[164]!==nt?(it={value:"mine",label:nt},e[164]=nt,e[165]=it):it=e[165];let ot;e[166]!==n?(ot=n("sidebar.taskGroupsList.scopeTeam"),e[166]=n,e[167]=ot):ot=e[167];let rt;e[168]!==ot?(rt={value:"team",label:ot},e[168]=ot,e[169]=rt):rt=e[169];let at;e[170]!==it||e[171]!==rt?(at=[it,rt],e[170]=it,e[171]=rt,e[172]=at):at=e[172];let ct;e[173]!==st||e[174]!==Qt||e[175]!==lt||e[176]!==at?(ct=s.jsx(ss,{label:st,value:Qt,onChange:lt,options:at}),e[173]=st,e[174]=Qt,e[175]=lt,e[176]=at,e[177]=ct):ct=e[177];let dt;e[178]!==We||e[179]!==tt||e[180]!==ct?(dt=s.jsxs(Ys,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[We,tt,ct]}),e[178]=We,e[179]=tt,e[180]=ct,e[181]=dt):dt=e[181];let It;e[182]!==Ee||e[183]!==dt?(It=s.jsxs(Ks,{children:[Ee,dt]}),e[182]=Ee,e[183]=dt,e[184]=It):It=e[184];const Jt=It;let Pt;e[185]!==Jt||e[186]!==Ie||e[187]!==Q||e[188]!==U||e[189]!==n?(Pt=C=>s.jsx(Xs,{delayDuration:300,children:s.jsxs("div",{className:G("shrink-0 flex items-center justify-between",C?"h-10":"h-10 md:h-[34px] mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!C&&s.jsx(sl,{className:"md:size-[34px] rounded-lg"}),Jt]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx($s,{label:n("sidebar.taskGroupsList.searchChats"),onClick:()=>{ce("tasks_panel_search_opened"),Q(!0),U(!0)},children:s.jsx(gs,{size:16})}),s.jsx($s,{label:n("sidebar.taskGroupsList.newChat"),onClick:()=>{Ie()},children:s.jsx(mn,{size:16})})]})]})}),e[185]=Jt,e[186]=Ie,e[187]=Q,e[188]=U,e[189]=n,e[190]=Pt):Pt=e[190];const mt=Pt;if(hs){let C;e[191]!==mt?(C=mt(!0),e[191]=mt,e[192]=C):C=e[192];let R;e[193]!==p?(R=()=>{p()},e[193]=p,e[194]=R):R=e[194];let W;e[195]!==N||e[196]!==fe||e[197]!==le||e[198]!==z||e[199]!==ee||e[200]!==te||e[201]!==f||e[202]!==u||e[203]!==R||e[204]!==V?(W=s.jsx(ws,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain px-1 h-full",children:s.jsx(Ps,{threads:V,groupBy:z,activeTaskId:N,onSelectTask:te,onArchiveTask:ee,filters:fe,hasMore:f,isFetchingMore:u,onLoadMore:R,filtersActive:le})}),e[195]=N,e[196]=fe,e[197]=le,e[198]=z,e[199]=ee,e[200]=te,e[201]=f,e[202]=u,e[203]=R,e[204]=V,e[205]=W):W=e[205];let q;e[206]!==K||e[207]!==F||e[208]!==U?(q=K&&s.jsx(es,{open:F,onOpenChange:U}),e[206]=K,e[207]=F,e[208]=U,e[209]=q):q=e[209];let ae;return e[210]!==X||e[211]!==C||e[212]!==W||e[213]!==q?(ae=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[C,W,q,X]}),e[210]=X,e[211]=C,e[212]=W,e[213]=q,e[214]=ae):ae=e[214],ae}let ft;e[215]!==mt?(ft=mt(!1),e[215]=mt,e[216]=ft):ft=e[216];let ut;e[217]!==p?(ut=()=>{p()},e[217]=p,e[218]=ut):ut=e[218];let pt;e[219]!==N||e[220]!==fe||e[221]!==le||e[222]!==z||e[223]!==ee||e[224]!==te||e[225]!==f||e[226]!==u||e[227]!==ut||e[228]!==V?(pt=s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(ws,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(Ps,{threads:V,groupBy:z,activeTaskId:N,onSelectTask:te,onArchiveTask:ee,filters:fe,hasMore:f,isFetchingMore:u,onLoadMore:ut,filtersActive:le})})}),e[219]=N,e[220]=fe,e[221]=le,e[222]=z,e[223]=ee,e[224]=te,e[225]=f,e[226]=u,e[227]=ut,e[228]=V,e[229]=pt):pt=e[229];let ht;e[230]!==K||e[231]!==F||e[232]!==U?(ht=K&&s.jsx(es,{open:F,onOpenChange:U}),e[230]=K,e[231]=F,e[232]=U,e[233]=ht):ht=e[233];let $t;return e[234]!==X||e[235]!==ft||e[236]!==pt||e[237]!==ht?($t=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[ft,pt,ht,X]}),e[234]=X,e[235]=ft,e[236]=pt,e[237]=ht,e[238]=$t):$t=e[238],$t}function xo(t){return!t.trigger_id}function go(t){return!!t.trigger_id}function bo(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function jo(t){return!t.hidden}const vo=5,yo=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function pl(){const t=M.c(3),{state:e}=kt();if(e==="collapsed"){let n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:vo}).map(No)}),t[0]=n):n=t[0],n}let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(_e,{className:"size-6 rounded-md"}),s.jsx(_e,{className:"size-6 rounded-md"}),s.jsx(_e,{className:"size-6 rounded-md"})]}),s.jsx(_e,{className:"h-6 w-20 rounded-md"})]}),t[1]=l):l=t[1];let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[l,s.jsx("div",{className:"flex flex-col gap-0.5",children:yo.map(_o)})]}),t[2]=i):i=t[2],i}function _o(t,e){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(_e,{className:"size-5 rounded-full shrink-0"}),s.jsx(_e,{className:G("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(So)})]},e)}function So(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(_e,{className:"h-3 flex-1 rounded-sm"})},e)}function No(t,e){return s.jsx(_e,{className:"size-10 rounded-lg mx-auto"},e)}function ko(){const t=M.c(2);if(ms()){let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ns,{showName:!0}),t[0]=i):i=t[0],i}let l;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(s.Fragment,{children:[s.jsx(ns,{}),s.jsx(fs,{})]}),t[1]=l):l=t[1],l}function wo(){const t=M.c(5),e=nl();let l,i;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Fi,{}),i=s.jsx(ko,{}),t[0]=l,t[1]=i):(l=t[0],i=t[1]);let n;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(as,{children:s.jsx(L.Suspense,{fallback:s.jsx(pl,{}),children:s.jsx(ul,{})})}),t[2]=n):n=t[2];let r;return t[3]!==e?(r=s.jsx(ll,{children:s.jsx(rl,{sections:e,footer:l,header:i,additionalContent:n})}),t[3]=e,t[4]=r):r=t[4],r}function Co(t){const e=M.c(8),{onClose:l}=t,i=nl();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Li,{}),e[0]=n):n=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(pl,{}),e[1]=r):r=e[1];let o;e[2]!==l?(o=s.jsx(as,{children:s.jsx(L.Suspense,{fallback:r,children:s.jsx(ul,{onNavigate:l})})}),e[2]=l,e[3]=o):o=e[3];let a;return e[4]!==l||e[5]!==i||e[6]!==o?(a=s.jsx(ll,{children:s.jsx(Ai,{sections:i,onClose:l,footer:n,additionalContent:o})}),e[4]=l,e[5]=i,e[6]=o,e[7]=a):a=e[7],a}const Mo="sidebar.open";function Ao(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Tl,{}),t[0]=e):e=t[0],e}function Ua(){const t=M.c(36),e=Fs(),l=ms();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},t[0]=i):i=t[0];const{connect:n,siteUrl:r}=Ds(i),o=n==="1",[a,d]=Bt(Mo,!1),{width:c,wrapperRef:m,onStartResize:f,resetWidth:u}=yi(),p=e;let h;t[1]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(sl,{}),t[1]=h):h=t[1];let b;t[2]!==l?(b=!l&&s.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:s.jsx(fs,{})}),t[2]=l,t[3]=b):b=t[3];let g,x,j,y;t[4]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(St.TogglesSlot,{}),x=s.jsx(St.TabsSlot,{className:"shrink-0"}),j=s.jsx(St.CenterSlot,{}),y=s.jsx(St.RightSlot,{}),t[4]=g,t[5]=x,t[6]=j,t[7]=y):(g=t[4],x=t[5],j=t[6],y=t[7]);let v;t[8]!==b?(v=s.jsx(St.Header,{className:"grid-cols-1 px-1",children:s.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[h,b,g,x,j,y]})}),t[8]=b,t[9]=v):v=t[9];const _=v;let w;t[10]===Symbol.for("react.memo_cache_sentinel")?(w={background:"transparent",containerType:"inline-size"},t[10]=w):w=t[10];let S;t[11]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx($l,{className:"flex flex-col min-h-0",style:w,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(L.Suspense,{fallback:s.jsx(Ao,{}),children:s.jsx(Al,{})})})})}),t[11]=S):S=t[11];const k=S,N=p&&_,A=`${c}px`;let $;t[12]!==A?($={"--sidebar-width":A,"--sidebar-width-icon":"3.125rem"},t[12]=A,t[13]=$):$=t[13];const P=$;let O;t[14]!==e||t[15]!==f||t[16]!==u?(O=!e&&s.jsxs(s.Fragment,{children:[s.jsx(wo,{}),s.jsx(bi,{onPointerDown:f,onDoubleClick:u})]}),t[14]=e,t[15]=f,t[16]=u,t[17]=O):O=t[17];let D;t[18]!==P||t[19]!==O||t[20]!==m?(D=s.jsxs(Ol,{ref:m,className:"flex-1 bg-sidebar relative min-h-0",style:P,children:[O,k]}),t[18]=P,t[19]=O,t[20]=m,t[21]=D):D=t[21];let T;t[22]!==e?(T=e&&s.jsx(Un,{renderSidebar:To}),t[22]=e,t[23]=T):T=t[23];let E;t[24]!==r||t[25]!==o?(E=o&&s.jsx(ui,{siteUrl:r}),t[24]=r,t[25]=o,t[26]=E):E=t[26];let z;t[27]!==N||t[28]!==D||t[29]!==T||t[30]!==E?(z=s.jsx(oi,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[N,D,T,E]})}),t[27]=N,t[28]=D,t[29]=T,t[30]=E,t[31]=z):z=t[31];let I;return t[32]!==d||t[33]!==a||t[34]!==z?(I=s.jsx(Dn,{children:s.jsx(St.Provider,{children:s.jsx(zl,{open:a,onOpenChange:d,children:z})})}),t[32]=d,t[33]=a,t[34]=z,t[35]=I):I=t[35],I}function To(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(Co,{onClose:e})})})}export{Ua as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,m as d,r as p,j as r}from"./index-
|
|
1
|
+
import{c as f,m as d,r as p,j as r}from"./index-Ct5z4bLK.js";import{r as w}from"./sidebar-CAZ2FyoU.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 +1 @@
|
|
|
1
|
-
import{c as g,f as p,j as s,k as u,N as a}from"./index-
|
|
1
|
+
import{c as g,f as p,j as s,k as u,N as a}from"./index-Ct5z4bLK.js";import{a as x}from"./use-capability-7L6HM4-F.js";import{C as j}from"./capability-load-error-Bb2HUhlv.js";function v(){const t=g.c(21);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:f,error:c}=x();if(f){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:s.jsx(u,{size:20,className:"animate-spin text-muted-foreground"})}),t[1]=e):e=t[1],e}if(c){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("registry:manage")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/store",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("monitoring:view")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}if(i("members:manage")){let e;return t[17]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[17]=r,t[18]=e):e=t[18],e}let n;return t[19]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[19]=r,t[20]=n):n=t[20],n}export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,m as a,j as d}from"./index-
|
|
1
|
+
import{c as s,m as a,j as d}from"./index-Ct5z4bLK.js";function f(l){const e=s.c(10);let i,t,r;e[0]!==l?({className:i,type:r,...t}=l,e[0]=l,e[1]=i,e[2]=t,e[3]=r):(i=e[1],t=e[2],r=e[3]);let n;e[4]!==i?(n=a("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-lg bg-background dark:bg-input/30 px-3 py-1 text-sm transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:opacity-50 card-shadow","focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==r?(o=d.jsx("input",{type:r,"data-slot":"input",className:n,...t}),e[6]=t,e[7]=n,e[8]=r,e[9]=o):o=e[9],o}export{f as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as h,r as C,m as L}from"./index-
|
|
1
|
+
import{c as k,j as h,r as C,m as L}from"./index-Ct5z4bLK.js";import{a as Z}from"./Tool02-DZ2vEkP4.js";import{A as y}from"./agent-icon-Dcc64Amv.js";const M={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},R={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},T={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},W={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function G(E){const t=k.c(13),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g;if(e?.startsWith("icon://")||e?.includes("#agentcolor=")){const r=W[n];let l;return t[0]!==o||t[1]!==e||t[2]!==s||t[3]!==r?(l=h.jsx(y,{icon:e,name:s,size:r,className:o}),t[0]=o,t[1]=e,t[2]=s,t[3]=r,t[4]=l):l=t[4],l}const S=e??"no-icon";let i;return t[5]!==o||t[6]!==c||t[7]!==I||t[8]!==e||t[9]!==s||t[10]!==n||t[11]!==S?(i=h.jsx($,{icon:e,name:s,size:n,className:o,fallbackIcon:c,fit:I},S),t[5]=o,t[6]=c,t[7]=I,t[8]=e,t[9]=s,t[10]=n,t[11]=S,t[12]=i):i=t[12],i}function $(E){const t=k.c(25),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g,[S,i]=C.useState(!1),r=!!e&&S,l=M[n],p=R[n];let a;t[0]!==o||t[1]!==l||t[2]!==p?(a=L("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,p,o),t[0]=o,t[1]=l,t[2]=p,t[3]=a):a=t[3];const N=e||void 0,_=I==="contain"?"object-contain":"object-cover",A=!r&&"hidden";let m;t[4]!==_||t[5]!==A?(m=L("h-full w-full",_,A),t[4]=_,t[5]=A,t[6]=m):m=t[6];let v,j;t[7]===Symbol.for("react.memo_cache_sentinel")?(v=()=>i(!1),j=()=>i(!0),t[7]=v,t[8]=j):(v=t[7],j=t[8]);let d;t[9]!==s||t[10]!==N||t[11]!==m?(d=h.jsx("img",{src:N,alt:s,className:m,onError:v,onLoad:j}),t[9]=s,t[10]=N,t[11]=m,t[12]=d):d=t[12];const z=r&&"hidden";let f;t[13]!==z?(f=L("h-full w-full flex items-center justify-center bg-muted/20",z),t[13]=z,t[14]=f):f=t[14];let x;t[15]!==c||t[16]!==n?(x=c??h.jsx(Z,{size:T[n],className:"text-muted-foreground"}),t[15]=c,t[16]=n,t[17]=x):x=t[17];let u;t[18]!==f||t[19]!==x?(u=h.jsx("div",{className:f,children:x}),t[18]=f,t[19]=x,t[20]=u):u=t[20];let b;return t[21]!==d||t[22]!==u||t[23]!==a?(b=h.jsxs("div",{className:a,children:[d,u]}),t[21]=d,t[22]=u,t[23]=a,t[24]=b):b=t[24],b}export{G as I};
|