decocms 4.112.1 → 4.113.0
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-BPAJ0AH_.js → AlertCircle-BgL3YyuU.js} +1 -1
- package/dist/client/assets/{AreaChart-D25dOd9L.js → AreaChart-CJz2G6k1.js} +1 -1
- package/dist/client/assets/{ArrowRight-DPHDASHB.js → ArrowRight-KW3xq1r6.js} +1 -1
- package/dist/client/assets/{ArrowUp-Bedb6L3V.js → ArrowUp-R6RJmaXD.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DVT7itvm.js → ArrowUpRight-WNzzQ_3i.js} +1 -1
- package/dist/client/assets/{Check-DVdr-fHD.js → Check-rFuMW35j.js} +1 -1
- package/dist/client/assets/{CheckCircle-qFtrLK-I.js → CheckCircle-DRPVedxI.js} +1 -1
- package/dist/client/assets/{ChevronDown-CP4K6WVC.js → ChevronDown-D48jTswz.js} +1 -1
- package/dist/client/assets/{ChevronRight-CURNdwHv.js → ChevronRight-LyFia1m2.js} +1 -1
- package/dist/client/assets/{ChevronUp-Bq5QY1HH.js → ChevronUp-Bf993jF8.js} +1 -1
- package/dist/client/assets/{Copy01-BrM3zThJ.js → Copy01-6Lk3T5kb.js} +1 -1
- package/dist/client/assets/{DotsVertical-CAEab9-7.js → DotsVertical-IM9-cL94.js} +1 -1
- package/dist/client/assets/{Eye-BPSpUM1B.js → Eye-DQ8_2da9.js} +1 -1
- package/dist/client/assets/{FilterLines-9idf71sf.js → FilterLines-DI_Qm1qr.js} +1 -1
- package/dist/client/assets/{Globe01-CRpOJGMW.js → Globe01-B3eOB-bI.js} +1 -1
- package/dist/client/assets/{Globe04-Df-FgXkI.js → Globe04-4yBmV3D1.js} +1 -1
- package/dist/client/assets/{HardDrive-CTD7kn1_.js → HardDrive-4DIbsS2x.js} +1 -1
- package/dist/client/assets/{Image01-CXegS0cf.js → Image01-CCt0OnVG.js} +1 -1
- package/dist/client/assets/{Key01-D4boOCfw.js → Key01-CE5ANePO.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Ct7yqT-8.js → LayoutLeft-CbYbxxcX.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Bt0kypGl.js → LinkExternal01-CORYkI7c.js} +1 -1
- package/dist/client/assets/{LogOut01-gzymfeiL.js → LogOut01-wWv0KF8i.js} +1 -1
- package/dist/client/assets/{Monitor01-lASV4aL_.js → Monitor01-C3jWkuS8.js} +1 -1
- package/dist/client/assets/{Package-4wIx6EXV.js → Package-aTPkrhbY.js} +1 -1
- package/dist/client/assets/{Palette-DQcG6f10.js → Palette-75tVOLKn.js} +1 -1
- package/dist/client/assets/{Play-BxXVqH8a.js → Play-CyFg0Xnr.js} +1 -1
- package/dist/client/assets/{Plus-DvkwjQys.js → Plus-DITXLV6z.js} +1 -1
- package/dist/client/assets/{SearchLg-BdXxED9F.js → SearchLg-D7Ui27Oz.js} +1 -1
- package/dist/client/assets/{SearchMd-BXStN27m.js → SearchMd-b92Qgt9y.js} +1 -1
- package/dist/client/assets/{Settings02-CxO9BwAX.js → Settings02-B5bpoiG8.js} +1 -1
- package/dist/client/assets/{Shield01-B7UX37fq.js → Shield01-DdEEjcd8.js} +1 -1
- package/dist/client/assets/{Star01-B9yyP_dl.js → Star01-DAVevbnE.js} +1 -1
- package/dist/client/assets/{Stars01-DzCuVtlp.js → Stars01-C03S5tVj.js} +1 -1
- package/dist/client/assets/{Stars02-BbJELdJJ.js → Stars02-C4BXaIW2.js} +1 -1
- package/dist/client/assets/{Sun-CQBv42eA.js → Sun-DL5_VVPF.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BCuXg9EG.js → SwitchHorizontal01-BS092iWr.js} +1 -1
- package/dist/client/assets/{Tool01-BK-Abo_W.js → Tool01-KoLvuxqs.js} +1 -1
- package/dist/client/assets/{Tool02-Cuvgxmz_.js → Tool02-D3ImSqnS.js} +1 -1
- package/dist/client/assets/{Trash01-Dg0PRDGo.js → Trash01-LLStDuc3.js} +1 -1
- package/dist/client/assets/{TrendUp01-DxN3AiAM.js → TrendUp01-BZX0N7yA.js} +1 -1
- package/dist/client/assets/{Upload01-IlLQszJa.js → Upload01-DSslfT87.js} +1 -1
- package/dist/client/assets/{User01-DAuN3raG.js → User01-CD3D25HA.js} +1 -1
- package/dist/client/assets/{Users01-ClVtIpAF.js → Users01-Cer51we5.js} +1 -1
- package/dist/client/assets/{Users03-DranLzQa.js → Users03-WL_LA7La.js} +1 -1
- package/dist/client/assets/{X-D2byo9sM.js → X-BOD96Sav.js} +1 -1
- package/dist/client/assets/{XCircle-7Vp7VZO2.js → XCircle-CyI4fk4M.js} +1 -1
- package/dist/client/assets/{XClose-C_sKhdsy.js → XClose-Bafb0lXd.js} +1 -1
- package/dist/client/assets/{Zap-CTWtvhM-.js → Zap-CbGxXZqE.js} +1 -1
- package/dist/client/assets/{ZapSquare-PYKE-3Yk.js → ZapSquare-DmF34u5V.js} +1 -1
- package/dist/client/assets/{ZoomOut-Dku36CkB.js → ZoomOut-B4I1BQI_.js} +1 -1
- package/dist/client/assets/{access-gate-V__oxJQU.js → access-gate-CvbhtVik.js} +1 -1
- package/dist/client/assets/{add-section-modal-Dz2CIZCQ.js → add-section-modal-BoP6xaUQ.js} +1 -1
- package/dist/client/assets/{agent-icon-DboEKEwb.js → agent-icon-CVTpL47E.js} +1 -1
- package/dist/client/assets/{agents-list-d0_V3zC5.js → agents-list-Bq8i44eF.js} +1 -1
- package/dist/client/assets/{ai-providers-p-o56TbN.js → ai-providers-DazhEEZ3.js} +1 -1
- package/dist/client/assets/{alert-OfMKhXOE.js → alert-BOtjHBZH.js} +1 -1
- package/dist/client/assets/{alert-dialog-CAjnI-sk.js → alert-dialog-vzxsz7Ne.js} +1 -1
- package/dist/client/assets/{app-editor-DG5ESbAh.js → app-editor-CZElX6py.js} +1 -1
- package/dist/client/assets/{auth-DL46EIm-.js → auth-DSO-QxMv.js} +1 -1
- package/dist/client/assets/{auth-catchall-b2ADNteC.js → auth-catchall-DV1NjViH.js} +1 -1
- package/dist/client/assets/{auth-entry-D8bWuy4I.js → auth-entry-Ct44cI9d.js} +1 -1
- package/dist/client/assets/{auth-split-layout-B4a4Xdor.js → auth-split-layout-io_AhQF5.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-LnJEhLBB.js → authenticate-and-persist-oauth-Dd_EJZaU.js} +1 -1
- package/dist/client/assets/{automation-list-row-DW9WNcl6.js → automation-list-row-BnFm2E0z.js} +1 -1
- package/dist/client/assets/{automation-runs-BU7awJwF.js → automation-runs-BBa6tRzS.js} +1 -1
- package/dist/client/assets/{automations-BdFtkBKU.js → automations-BnmLoAGI.js} +1 -1
- package/dist/client/assets/{autosend-q2XXJhGf.js → autosend-DRl8LNUl.js} +1 -1
- package/dist/client/assets/{avatar-BMQSTz7T.js → avatar-CAlKFgYv.js} +1 -1
- package/dist/client/assets/{badge-DTgp6kSY.js → badge-BtX_u9Ik.js} +1 -1
- package/dist/client/assets/{block-document-En1-9m4T.js → block-document-CBKnd6Ik.js} +1 -1
- package/dist/client/assets/{brand-context-Dwapn05Q.js → brand-context-Co4VvlV1.js} +1 -1
- package/dist/client/assets/{buckets-DEE1QH7D.js → buckets-HAaiIZ0C.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-Bvu632yW.js → bulk-category-panel-pAeQUi9o.js} +1 -1
- package/dist/client/assets/{calendar-DE27O6B3.js → calendar-DJl7BUkw.js} +1 -1
- package/dist/client/assets/{capability-load-error-DRgusnL-.js → capability-load-error-Cw0YiON3.js} +1 -1
- package/dist/client/assets/{card-C1E3IqIe.js → card-DN0OMeD8.js} +1 -1
- package/dist/client/assets/{category-editor-D4kEsE60.js → category-editor-DhLjpX1P.js} +1 -1
- package/dist/client/assets/{chat-context-Bqe9EjUf.js → chat-context-CkIYHDAo.js} +6 -6
- package/dist/client/assets/{checkbox-DucL6lfV.js → checkbox-Dz4CydV1.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BkCktMU5.js → cli-auth-success-eXe7rwCU.js} +1 -1
- package/dist/client/assets/{collection-detail-DUwAO62w.js → collection-detail--wzT7xnN.js} +1 -1
- package/dist/client/assets/{collection-display-button-BDbR9SRz.js → collection-display-button-Bz8HOr0b.js} +1 -1
- package/dist/client/assets/{collection-search-BeQcHO0e.js → collection-search-Ctfh-qXp.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DbIfg3Tu.js → collection-table-wrapper-Bzx7o70R.js} +1 -1
- package/dist/client/assets/{collection-tabs-B-z06u3L.js → collection-tabs-CXALICVQ.js} +1 -1
- package/dist/client/assets/{command-BpaxudUr.js → command-BeyKUDBs.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-C6AQvriJ.js → commerce-onboarding-DElqvPNA.js} +1 -1
- package/dist/client/assets/{companions-core-BKdg1X4N.js → companions-core-CCXnzcJC.js} +1 -1
- package/dist/client/assets/{connect-DwDf5hM9.js → connect-D9FNXrfQ.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-Dop9zIy0.js → connect-desktop-dialog-43RgE8kU.js} +1 -1
- package/dist/client/assets/{connection-card-YkA4B3Y2.js → connection-card-CctJljKT.js} +1 -1
- package/dist/client/assets/{connection-detail-B7fdM_RU.js → connection-detail-bsoH7wvV.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CEAyvcoM.js → connection-form-helpers-BisAHqq1.js} +1 -1
- package/dist/client/assets/{connections-CTLVBVZ-.js → connections-BsxZpP3_.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DvS9xmzn.js → decopilot-sse-pool-BBLfaSrg.js} +1 -1
- package/dist/client/assets/{dialog-DuG3B5hN.js → dialog-DgPEwnKb.js} +1 -1
- package/dist/client/assets/{domain-settings-BQZ9bk3J.js → domain-settings-B__P-BKw.js} +1 -1
- package/dist/client/assets/{drawer-C2jN8NT3.js → drawer-CVvfaKnS.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BNF_6r-n.js → dropdown-menu-Bh2yPg-X.js} +1 -1
- package/dist/client/assets/{empty-state-uOBrYEmx.js → empty-state-DZyW1mhx.js} +1 -1
- package/dist/client/assets/{extract-connection-data-mjantdQ3.js → extract-connection-data-C3b1P4MK.js} +1 -1
- package/dist/client/assets/{file-explorer-HVD4zjOj.js → file-explorer-BE9AtMWC.js} +1 -1
- package/dist/client/assets/{file-type-icon-DmqsPWVn.js → file-type-icon-5sVl9s18.js} +1 -1
- package/dist/client/assets/{files-DLlwt5M5.js → files-BJM5JsIX.js} +1 -1
- package/dist/client/assets/{form-CfiVR7-E.js → form-DkQE4eVe.js} +1 -1
- package/dist/client/assets/{general-DQpko3z7.js → general-BIiFUzbm.js} +1 -1
- package/dist/client/assets/{github-repo-picker-B67xOvpE.js → github-repo-picker-D7UG54M6.js} +1 -1
- package/dist/client/assets/{hooks--B2ClHkv.js → hooks-Bk5QuAXL.js} +6 -6
- package/dist/client/assets/{index-BEZBfxfq.js → index-8Q0HpbuT.js} +3 -3
- package/dist/client/assets/{index-BjqdNfD4.js → index-B5pAcdCj.js} +3 -3
- package/dist/client/assets/{index-GHnBSXbp.js → index-BHiuDSJx.js} +1 -1
- package/dist/client/assets/{index-D6ISBRIZ.js → index-BeF0PLGE.js} +1 -1
- package/dist/client/assets/{index-Cd6V9L5H.js → index-CaeZqPo0.js} +26 -26
- package/dist/client/assets/{index-DlK5F-9g.js → index-Cw6hQWKq.js} +1 -1
- package/dist/client/assets/{index-B4v8cE0Y.js → index-D4CJsBh0.js} +1 -1
- package/dist/client/assets/{index-BP_x5C5G.js → index-DFySzIf4.js} +1 -1
- package/dist/client/assets/{index-DzT6le2T.js → index-DLem6Pzd.js} +1 -1
- package/dist/client/assets/{index-CRhw6MPR.js → index-DNYodYcq.js} +1 -1
- package/dist/client/assets/{index-DrYlRUBO.js → index-DtfjCN6O.js} +1 -1
- package/dist/client/assets/{index-DQL_sX_z.js → index-Hn2CQpT_.js} +1 -1
- package/dist/client/assets/{index-C7C6Raa3.js → index-fznbry_P.js} +1 -1
- package/dist/client/assets/{index-redirect-f80Laun7.js → index-redirect-djiLL8Gv.js} +1 -1
- package/dist/client/assets/{input-DVKWqN4B.js → input-BdNp94xl.js} +1 -1
- package/dist/client/assets/{integration-icon-01krASjY.js → integration-icon-DoUJ97wM.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-C30-4wkQ.js → invite-member-dialog-BUKGJx85.js} +1 -1
- package/dist/client/assets/{label-DzsNH7Is.js → label-3zDA4sob.js} +1 -1
- package/dist/client/assets/{layout-BPSuHpAi.js → layout-Ah_so8m5.js} +1 -1
- package/dist/client/assets/{login-DMnYXve8.js → login-Bfk9mSR9.js} +1 -1
- package/dist/client/assets/{mcp-oauth-_4C32xnP.js → mcp-oauth-BSqmznxk.js} +1 -1
- package/dist/client/assets/{members-DopgSvLD.js → members-Q94CZbRC.js} +1 -1
- package/dist/client/assets/{monaco-editor-Cvn-LJcd.js → monaco-editor-Br0-yvqe.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DH7gWSkT.js → monitoring-stats-row-BSJi7XEI.js} +1 -1
- package/dist/client/assets/{multi-select-VwHL_OgI.js → multi-select-TtXKekQw.js} +1 -1
- package/dist/client/assets/{oauth-callback-BAa2XKVb.js → oauth-callback-BlLiyizg.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CS6Wvb7F.js → oauth-callback-ai-provider-_QN--zPD.js} +1 -1
- package/dist/client/assets/{onboarding-vbNUruQ8.js → onboarding-BNxGBQcz.js} +1 -1
- package/dist/client/assets/{org-install-syKja4u5.js → org-install-BBGpYAIG.js} +1 -1
- package/dist/client/assets/{org-layout-BY6L7U5G.js → org-layout-CLI7TgVY.js} +1 -1
- package/dist/client/assets/{organization-choice-Ca4Dtqx4.js → organization-choice-DZgNOnWh.js} +1 -1
- package/dist/client/assets/{orgs-DD3fRDFA.js → orgs-p-mTWOqj.js} +1 -1
- package/dist/client/assets/{page-seo-form-Dzn3gLSm.js → page-seo-form-BVe2Dc2G.js} +1 -1
- package/dist/client/assets/page-seo-sheet-BPkImI0M.js +1 -0
- package/dist/client/assets/{popover-SQDnlMpS.js → popover-BsG-Ut0C.js} +1 -1
- package/dist/client/assets/{post-editor-Cov0mKWE.js → post-editor-BQ2rP-Lo.js} +1 -1
- package/dist/client/assets/{primitives-CPIgjGnw.js → primitives-C6e3re9T.js} +1 -1
- package/dist/client/assets/{profile-NXhUR-9P.js → profile-BGWRg9rU.js} +1 -1
- package/dist/client/assets/project-app-view-CIj73Usx.js +1 -0
- package/dist/client/assets/record-editor-BZinXtog.js +1 -0
- package/dist/client/assets/{redirect-editor--IxkTzn1.js → redirect-editor-BWMV8TlH.js} +1 -1
- package/dist/client/assets/registry-R6uwuSEm.js +2 -0
- package/dist/client/assets/{registry-layout-CmIJcs6x.js → registry-layout-hiBuwR6F.js} +1 -1
- package/dist/client/assets/{reports-8jvxKoAI.js → reports-BgtUkLwF.js} +1 -1
- package/dist/client/assets/{require-capability-abQVxnhi.js → require-capability-bUvkt_Jq.js} +1 -1
- package/dist/client/assets/{required-auth-layout-ZhKgR5cl.js → required-auth-layout-D9l0Xiy5.js} +1 -1
- package/dist/client/assets/{reset-password-CBUiONN1.js → reset-password-CamgKbDk.js} +1 -1
- package/dist/client/assets/{roles-BLQFcEke.js → roles-C-UllILg.js} +1 -1
- package/dist/client/assets/{search-input-Bp2VsjKA.js → search-input-CrV3M9Tk.js} +1 -1
- package/dist/client/assets/{secrets-D-Y6gN0-.js → secrets-CxFN3xxF.js} +1 -1
- package/dist/client/assets/{sections-editor-C-xRLscC.js → sections-editor-RsOvoHIS.js} +1 -1
- package/dist/client/assets/{select-CHVMib0e.js → select-CWeHkbd3.js} +1 -1
- package/dist/client/assets/{select-model-LfcTr4nG.js → select-model-D_wCzl3W.js} +1 -1
- package/dist/client/assets/{self-tool-result-CBc1wtRN.js → self-tool-result-BYAMrGkc.js} +1 -1
- package/dist/client/assets/{seo-editor-DUKuzRGf.js → seo-editor-CG2yF8SD.js} +1 -1
- package/dist/client/assets/{settings-layout-CDDdQ2e0.js → settings-layout-BArEidDL.js} +1 -1
- package/dist/client/assets/{settings-section-IUcnM38x.js → settings-section-CFNIFUGZ.js} +1 -1
- package/dist/client/assets/{shell-controls-DERol15Q.js → shell-controls-DX4t6dyA.js} +1 -1
- package/dist/client/assets/shell-layout-CIdA6eed.js +1 -0
- package/dist/client/assets/{sidebar-BRu-Erl0.js → sidebar-Cv557HRI.js} +1 -1
- package/dist/client/assets/{skeleton-BJdGBxDn.js → skeleton-DvYV-OU_.js} +1 -1
- package/dist/client/assets/{sso-CSce7CAV.js → sso-BIem4TkP.js} +1 -1
- package/dist/client/assets/{store-Cvx8HpGf.js → store-CWBGfDtI.js} +1 -1
- package/dist/client/assets/store-registry-RRjwmJaV.js +2 -0
- package/dist/client/assets/{studio-tools-B6TBpJy3.js → studio-tools-BuOVhTAA.js} +1 -1
- package/dist/client/assets/{switch-GzXyTa7t.js → switch-BAJU0bt_.js} +1 -1
- package/dist/client/assets/{table-C_uxr9RS.js → table-D2y5PNds.js} +1 -1
- package/dist/client/assets/{tabs-D0HTooRp.js → tabs-C8DKGrnl.js} +1 -1
- package/dist/client/assets/{textarea-ZMDvthPv.js → textarea-BiTWgoYg.js} +1 -1
- package/dist/client/assets/{toggle-group-D7e2is13.js → toggle-group-DWZBcpKM.js} +1 -1
- package/dist/client/assets/{toolbar-Cof1BRQU.js → toolbar-DBqlqzIw.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BpU4_fmO.js → toolbar-icon-button-D1K93Ut2.js} +1 -1
- package/dist/client/assets/{tooltip-DhTKpLao.js → tooltip-sTtjDvoo.js} +1 -1
- package/dist/client/assets/{use-ai-providers-e0TsvBpy.js → use-ai-providers-C8qA53zS.js} +1 -1
- package/dist/client/assets/{use-api-keys-DPpqUPAA.js → use-api-keys-D8dgJYvw.js} +1 -1
- package/dist/client/assets/{use-automations-Cl7PLc9i.js → use-automations-DTVDL9Ac.js} +1 -1
- package/dist/client/assets/{use-autosave-lDLGG4vQ.js → use-autosave-u4Le0ZFS.js} +1 -1
- package/dist/client/assets/{use-capability-vqVc-i11.js → use-capability-CXuApCjP.js} +1 -1
- package/dist/client/assets/{use-clock-tick-B2mHIRSx.js → use-clock-tick-pfKuMtst.js} +1 -1
- package/dist/client/assets/{use-connection-BAQMsrJq.js → use-connection-n1ELT1mr.js} +1 -1
- package/dist/client/assets/{use-copy-BVuBsBUL.js → use-copy-CODIBpYX.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-9yNesJw-.js → use-create-virtual-mcp-D0W7ZbCQ.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-3nLcw0lp.js → use-debounced-autosave-DTt7IuhI.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Bm87M4-z.js → use-debounced-value-zMBLHFuc.js} +1 -1
- package/dist/client/assets/use-deco-credits-BLfvb2mQ.js +1 -0
- package/dist/client/assets/{use-decopilot-events-4nMOerOw.js → use-decopilot-events-BcQN2EhC.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CXDffDTB.js → use-delete-connection-DA40gOL9.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Co7CH0Lj.js → use-deployment-admin-DxQGqHiC.js} +1 -1
- package/dist/client/assets/{use-file-configs-DvDXTQzY.js → use-file-configs-4YZ-jvQA.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CDTP3cPC.js → use-infinite-scroll-B3Us0FOa.js} +1 -1
- package/dist/client/assets/{use-join-requests-DNpwA7f9.js → use-join-requests-Q3O8zdOv.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-Ddb476WY.js → use-mcp-auth-status-D70o-4EZ.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BT39mx9A.js → use-mcp-client-CFH86W63.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CGxK1_gj.js → use-mcp-tools-Dgke_qxb.js} +1 -1
- package/dist/client/assets/{use-members-_FPM_T6c.js → use-members-DQ4Ax4Dt.js} +1 -1
- package/dist/client/assets/{use-mobile-DSMb8fwP.js → use-mobile-BWrDGidp.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-zu-n6oJ9.js → use-navigate-to-agent-CeEInzVl.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DS3AIARn.js → use-org-auth-client-wPL3_F1w.js} +1 -1
- package/dist/client/assets/{use-org-sso-Cfer4AMn.js → use-org-sso-CLEffSXU.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CDueCpaQ.js → use-organization-roles-DkPj52in.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BnHHp7Sg.js → use-organization-settings-BZVys_CJ.js} +1 -1
- package/dist/client/assets/{use-registry-app-ClxY6KTL.js → use-registry-app-mTYX03DA.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DFS0CxCI.js → use-registry-connections-B9Mr8mO2.js} +1 -1
- package/dist/client/assets/{use-secrets-B83Wtq69.js → use-secrets-D6Ldx3Ng.js} +1 -1
- package/dist/client/assets/{use-status-sounds-spkqD0E7.js → use-status-sounds-28St6c5M.js} +1 -1
- package/dist/client/assets/{use-view-mode-DxVGeXom.js → use-view-mode-yI99KW7l.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DI0WnvSW.js → use-virtual-mcp-Tg-eDvSu.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DkWmKdoR.js +1 -0
- package/dist/client/assets/{useQueries-BUIk3SI1.js → useQueries-ezDKal5n.js} +1 -1
- package/dist/client/assets/{useRouterState-C7lhZIXx.js → useRouterState-6frlZCcO.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CoNmOb3b.js +1 -0
- package/dist/client/assets/{users-CyMJWljJ.js → users-CrCHLsmE.js} +1 -1
- package/dist/client/assets/{variant-calendar-DYdx-NyQ.js → variant-calendar-ky0ibTOg.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BUGE4j9R.js → view-mode-toggle-B-B7GuI8.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +605 -619
- package/dist/server/server.js +312 -312
- package/package.json +1 -1
- package/dist/client/assets/page-seo-sheet-C2ZuGi6g.js +0 -1
- package/dist/client/assets/project-app-view-aeAAnT3p.js +0 -1
- package/dist/client/assets/record-editor-B9G-sOGn.js +0 -1
- package/dist/client/assets/registry-DdvfpIFB.js +0 -2
- package/dist/client/assets/shell-layout-BLqcIFgl.js +0 -1
- package/dist/client/assets/store-registry-COelq8y_.js +0 -2
- package/dist/client/assets/use-deco-credits-Dkt5IHkt.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DiI89mMf.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B7Phg5ay.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as P,d as ae,F as Q,b as U,G as fs,j as s,B as be,r as G,E as Xe,H as ps,v as Mt,a as Ne,x as hs,K as It,e as it,q,I as ze,m as B,J as xs,t as ce,M as gs,P as bs,L as js,n as vs,R as ys,k as _s,f as Ss,u as Tt,O as Cs,U as Ns}from"./index-BjqdNfD4.js";import{u as _e,S as Qe,a as Je,b as J,c as Y,d as V,e as Pt,f as ks,g as At,h as ws,i as Ge,j as Ms,k as Is,l as Ts}from"./sidebar-BRu-Erl0.js";import{u as $t}from"./use-mobile-DSMb8fwP.js";import{C as Ps,p as Re,s as As,b as $s,S as zs,d as Os,e as Es,c as Ds,n as Rs}from"./self-tool-result-CBc1wtRN.js";import{f as Ls,b as Ze,e as et,g as Fs,d as zt,h as Ot,a as Et}from"./dialog-DuG3B5hN.js";import{f as Gs}from"./tab-id-BijBBRwE.js";import{C as Bs,W as Dt,g as Hs,u as Rt,S as Lt,a as rt}from"./use-mcp-client-BT39mx9A.js";import{i as tt}from"./ArrowRight-DPHDASHB.js";import{S as se}from"./skeleton-BJdGBxDn.js";import{i as Ft}from"./LayoutLeft-Ct7yqT-8.js";import{O as Be,A as st,u as Us,a as Ws,g as Ks,b as Vs,c as qs}from"./use-deco-credits-Dkt5IHkt.js";import{T as we}from"./toolbar-icon-button-BpU4_fmO.js";import{P as Gt,a as Bt,b as Ht}from"./popover-SQDnlMpS.js";import{D as Ys,a as Xs,b as Qs}from"./drawer-C2jN8NT3.js";import{A as He}from"./avatar-BMQSTz7T.js";import{T as je,a as ve,b as Ut,c as ye}from"./tooltip-DhTKpLao.js";import{a as Ue}from"./Copy01-BrM3zThJ.js";import{n as Js,i as Zs}from"./Globe01-CRpOJGMW.js";import{i as en}from"./ZoomOut-Dku36CkB.js";import{n as tn}from"./LinkExternal01-Bt0kypGl.js";import{i as at}from"./LogOut01-gzymfeiL.js";import{i as We}from"./Monitor01-lASV4aL_.js";import{n as sn,a as nn}from"./Sun-CQBv42eA.js";import{a as Oe}from"./Settings02-CxO9BwAX.js";import{i as on}from"./Shield01-B7UX37fq.js";import{t as Wt,a as ln,i as rn,b as ct,c as an,d as cn,e as Kt,A as ke,s as dn,f as mn,g as un,h as fn}from"./agent-icon-DboEKEwb.js";import{a as pn}from"./Users03-DranLzQa.js";import{u as hn}from"./use-deployment-admin-Co7CH0Lj.js";import"./index-CRhw6MPR.js";import{a as Vt}from"./XCircle-7Vp7VZO2.js";import{a as xn}from"./ZapSquare-PYKE-3Yk.js";import{I as qt}from"./invite-member-dialog-C30-4wkQ.js";import{u as dt}from"./use-copy-BVuBsBUL.js";import{i as Ke}from"./Check-DVdr-fHD.js";import{m as gn,u as bn,c as jn}from"./use-api-keys-DPpqUPAA.js";import{u as vn,C as yn}from"./chat-context-Bqe9EjUf.js";import{v as _n,C as mt}from"./connect-desktop-dialog-Dop9zIy0.js";import{u as nt}from"./use-organization-settings-BnHHp7Sg.js";import{i as Sn}from"./FilterLines-9idf71sf.js";import{T as Cn,a as Nn}from"./toggle-group-D7e2is13.js";import{u as Yt,a as kn}from"./use-virtual-mcp-DI0WnvSW.js";import{u as wn,a as Xt,b as Mn,T as In}from"./hooks--B2ClHkv.js";import{u as Qt,f as Tn}from"./shell-layout-BLqcIFgl.js";import{C as Pn,a as An,b as $n,c as zn,d as On}from"./command-BpaxudUr.js";import{u as Jt}from"./studio-tools-B6TBpJy3.js";import{i as Zt}from"./Zap-CTWtvhM-.js";import{S as es,M as En}from"./shell-controls-DERol15Q.js";import{n as Dn}from"./Stars02-BbJELdJJ.js";import{g as Rn,u as Ln,S as Fn}from"./use-clock-tick-B2mHIRSx.js";import{a as Gn}from"./format-time-BnbuEtat.js";import{t as Bn}from"./ChevronDown-CP4K6WVC.js";import{i as Hn}from"./ChevronRight-CURNdwHv.js";import{S as ts}from"./use-navigate-to-agent-zu-n6oJ9.js";import{T as xe}from"./toolbar-Cof1BRQU.js";import"./X-D2byo9sM.js";import"./integration-icon-01krASjY.js";import"./Tool02-Cuvgxmz_.js";import"./CheckCircle-qFtrLK-I.js";import"./companions-core-BKdg1X4N.js";import"./extract-connection-data-mjantdQ3.js";import"./github-repo-scope-DjMZbiKa.js";import"./form-CfiVR7-E.js";import"./label-DzsNH7Is.js";import"./input-DVKWqN4B.js";import"./Eye-BPSpUM1B.js";import"./use-debounced-value-Bm87M4-z.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./useQueries-BUIk3SI1.js";import"./authenticate-and-persist-oauth-LnJEhLBB.js";import"./mcp-oauth-_4C32xnP.js";import"./auth-DL46EIm-.js";import"./ArrowUpRight-DVT7itvm.js";import"./Plus-DvkwjQys.js";import"./SearchMd-BXStN27m.js";import"./XClose-C_sKhdsy.js";import"./alert-dialog-CAjnI-sk.js";import"./use-registry-app-ClxY6KTL.js";import"./use-mcp-tools-CGxK1_gj.js";import"./github-repo-picker-B67xOvpE.js";import"./collection-search-BeQcHO0e.js";import"./use-connection-BAQMsrJq.js";import"./reusable-new-chat-CouMjkYR.js";import"./connection-card-YkA4B3Y2.js";import"./use-registry-connections-DFS0CxCI.js";import"./useInfiniteQuery-DiI89mMf.js";import"./use-infinite-scroll-CDTP3cPC.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-eyAPH6o3.js";import"./card-C1E3IqIe.js";import"./select-CHVMib0e.js";import"./ChevronUp-Bq5QY1HH.js";import"./textarea-ZMDvthPv.js";import"./Star01-B9yyP_dl.js";import"./connection-form-helpers-CEAyvcoM.js";import"./Trash01-Dg0PRDGo.js";import"./collection-tabs-B-z06u3L.js";import"./badge-DTgp6kSY.js";import"./useSuspenseInfiniteQuery-B7Phg5ay.js";import"./use-ai-providers-e0TsvBpy.js";import"./User01-DAuN3raG.js";import"./AlertCircle-BPAJ0AH_.js";import"./Tool01-BK-Abo_W.js";import"./ArrowUp-Bedb6L3V.js";import"./TrendUp01-DxN3AiAM.js";import"./DotsVertical-CAEab9-7.js";import"./Globe04-Df-FgXkI.js";import"./SwitchHorizontal01-BCuXg9EG.js";import"./HardDrive-CTD7kn1_.js";import"./Image01-CXegS0cf.js";import"./Key01-D4boOCfw.js";import"./Package-4wIx6EXV.js";import"./Palette-DQcG6f10.js";import"./Play-BxXVqH8a.js";import"./SearchLg-BdXxED9F.js";import"./Stars01-DzCuVtlp.js";import"./Upload01-IlLQszJa.js";import"./Users01-ClVtIpAF.js";import"./use-org-auth-client-DS3AIARn.js";import"./use-organization-roles-CDueCpaQ.js";import"./autosend-q2XXJhGf.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-4nMOerOw.js";import"./decopilot-sse-pool-DvS9xmzn.js";import"./required-auth-layout-ZhKgR5cl.js";import"./use-org-sso-Cfer4AMn.js";import"./index-D6ISBRIZ.js";import"./differenceInSeconds-NQ4PDo0z.js";function Un(t){const e=P.c(22),{siteUrl:n}=t,l=ae(),{org:o}=Q(),i=U();let r;e[0]!==l||e[1]!==o.id||e[2]!==o.slug?(r=()=>{localStorage.setItem(fs.sidebarOpen(),JSON.stringify(!1)),l({to:"/$org/$taskId",params:{org:o.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:Hs(o.id),main:Gs(Dt.COMMERCE_DISCOVERY(o.id),Bs),sidepanel:0}})},e[0]=l,e[1]=o.id,e[2]=o.slug,e[3]=r):r=e[3];const a=r;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ls,{className:"bg-black/15 backdrop-blur-sm"}),e[4]=d):d=e[4];let c;e[5]!==i?(c=i("routes.commerceOnboarding.connectModal.dialogTitle"),e[5]=i,e[6]=c):c=e[6];let u;e[7]!==c?(u=s.jsx(Ze,{className:"sr-only",children:c}),e[7]=c,e[8]=u):u=e[8];let m;e[9]!==a||e[10]!==i?(m=()=>s.jsxs("div",{className:"grid gap-4 p-6",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:i("routes.commerceOnboarding.connectModal.loadError")}),s.jsxs(be,{type:"button",size:"xl",className:"w-full",onClick:a,children:[i("routes.commerceOnboarding.connectModal.continueButton"),s.jsx(tt,{size:18})]})]}),e[9]=a,e[10]=i,e[11]=m):m=e[11];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ps,{}),e[12]=f):f=e[12];let x;e[13]!==a||e[14]!==n?(x=s.jsx(G.Suspense,{fallback:f,children:s.jsx(qn,{siteUrlFromUrl:n,onComplete:a})}),e[13]=a,e[14]=n,e[15]=x):x=e[15];let p;e[16]!==m||e[17]!==x?(p=s.jsx(Xe,{fallback:m,children:x}),e[16]=m,e[17]=x,e[18]=p):p=e[18];let g;return e[19]!==u||e[20]!==p?(g=s.jsx(et,{open:!0,children:s.jsxs(Fs,{children:[d,s.jsxs(ps,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:Vn,onPointerDownOutside:Kn,onInteractOutside:Wn,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:[u,p]})]})}),e[19]=u,e[20]=p,e[21]=g):g=e[21],g}function Wn(t){return t.preventDefault()}function Kn(t){return t.preventDefault()}function Vn(t){return t.preventDefault()}function qn({siteUrlFromUrl:t,onComplete:e}){const n=U(),[l]=Mt(),{org:o}=Q(),{data:i}=Ne.useSession(),r=Dt.COMMERCE_DISCOVERY(o.id),a=Rt({connectionId:Lt,orgId:o.id,orgSlug:o.slug}),c=hs({queryKey:It.commerceDiscoveryConnection(o.id,r),queryFn:async()=>{const y=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:r}});return Re(y)},retry:!1}).data.item,u=typeof c?.metadata?.siteUrl=="string"?c.metadata.siteUrl:void 0,m=t||u,f=As(m),[x,p]=G.useState(!0),[g,h]=G.useState(null),b=it({mutationFn:async y=>Re(await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:y}})),retry:!1}),j=it({mutationFn:async y=>Re(await a.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:y}})),retry:!1}),_=$s({siteUrl:m,email:i?.user?.email,locale:l.language}),v=async()=>{h(null),q("commerce_onboarding_open_report_clicked",{domain:f??void 0,organization_id:o.id});const y=m?Rs(m):null;if(y?.ok)try{let C=await j.mutateAsync(y.value);if(C.triggered||(q("commerce_onboarding_run_reclaim",{domain:f??void 0,organization_id:o.id,reason:C.reason??"not_upgraded"}),await b.mutateAsync(y.value),C=await j.mutateAsync(y.value)),!C.triggered){q("commerce_onboarding_run_failed",{domain:f??void 0,organization_id:o.id,error:C.reason??"not_triggered"}),h(n("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(C){q("commerce_onboarding_run_failed",{domain:f??void 0,organization_id:o.id,error:C instanceof Error?C.message:String(C)}),h(n("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()};return s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col lg:flex-row",children:[s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 p-4 lg:gap-6 lg:bg-sidebar lg:p-10",children:[f?s.jsx(zs,{host:f}):null,s.jsx(Os,{org:o,cdConnectionId:r,siteUrl:m,onReadinessChange:p}),s.jsxs("div",{className:"flex shrink-0 flex-col gap-3",children:[s.jsx(Es,{href:_,orgId:o.id,className:"lg:hidden"}),g?s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:g}):null,s.jsxs(be,{type:"button",size:"xl",className:"w-full rounded-2xl text-base font-medium whitespace-normal h-auto py-3",onClick:()=>{v()},disabled:j.isPending||!x,children:[j.isPending?n("routes.commerceOnboarding.connectModal.openingReport"):n(x?"routes.commerceOnboarding.connectModal.viewFullReport":"routes.commerceOnboarding.connectModal.connectToolToContinue"),!j.isPending&&x?s.jsx(tt,{size:18}):null]})]})]}),s.jsx("aside",{className:"hidden lg:flex lg:w-[380px] lg:shrink-0 lg:items-center lg:justify-center lg:overflow-y-auto lg:border-l lg:border-border lg:bg-muted",children:s.jsx(Ds,{href:_,orgId:o.id})})]})}function Yn(t){const e=P.c(11),{onPointerDown:n,onDoubleClick:l}=t,o=U(),{state:i,isMobile:r}=_e();if(r||i==="collapsed")return null;let a;e[0]!==o?(a=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=a):a=e[1];let d;e[2]!==o?(d=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=d):d=e[3];let c,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={left:"var(--sidebar-width)"},u=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]=u):(c=e[4],u=e[5]);let m;return e[6]!==l||e[7]!==n||e[8]!==a||e[9]!==d?(m=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":a,title:d,onPointerDown:n,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:c,children:u}),e[6]=l,e[7]=n,e[8]=a,e[9]=d,e[10]=m):m=e[10],m}const ot=240,Xn=400,Qn="sidebar.width";function Ce(t){return Math.max(ot,Math.min(Xn,t))}function Jn(){const t=P.c(11),[e,n]=ze(Qn,Zn),l=G.useRef(null);let o;t[0]!==n||t[1]!==e?(o=u=>{u.preventDefault();const m=u.clientX,f=Ce(e),x=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),p=x?Array.from(x.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const b of p)b.style.transition="none";const g=b=>{const j=Ce(f+(b.clientX-m));x?.style.setProperty("--sidebar-width",`${j}px`)},h=b=>{const j=Ce(f+(b.clientX-m));n(j);for(const _ of p)_.style.transition="";window.removeEventListener("pointermove",g),window.removeEventListener("pointerup",h),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",g),window.addEventListener("pointerup",h)},t[0]=n,t[1]=e,t[2]=o):o=t[2];const i=o;let r;t[3]!==n?(r=()=>{n(ot)},t[3]=n,t[4]=r):r=t[4];const a=r;let d;t[5]!==e?(d=Ce(e),t[5]=e,t[6]=d):d=t[6];let c;return t[7]!==i||t[8]!==a||t[9]!==d?(c={width:d,wrapperRef:l,onStartResize:i,resetWidth:a},t[7]=i,t[8]=a,t[9]=d,t[10]=c):c=t[10],c}function Zn(t){return typeof t=="number"?Ce(t):ot}function ss(){return[]}function ns(t){const e=P.c(3),{children:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=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]=l):l=e[0];let o;return e[1]!==n?(o=s.jsxs(Qe,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[l,s.jsx(Je,{children:s.jsx(J,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=o):o=e[2],o}function os(t){const e=P.c(18),{item:n}=t,{isMobile:l,setOpenMobile:o}=_e();let i;e[0]!==l||e[1]!==n||e[2]!==o?(i=()=>{q("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:l}),n.onClick?.(),l&&o(!1)},e[0]=l,e[1]=n,e[2]=o,e[3]=i):i=e[3];const r=i,a=n.key,d=n.isActive&&"z-10";let c;e[4]!==d?(c=B(d),e[4]=d,e[5]=c):c=e[5];let u;e[6]!==n.label?(u=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=u):u=e[7];let m;e[8]!==r||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==u?(m=s.jsxs(Y,{onClick:r,isActive:n.isActive,tooltip:n.label,children:[n.icon,u]}),e[8]=r,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=u,e[13]=m):m=e[13];let f;return e[14]!==n.key||e[15]!==c||e[16]!==m?(f=s.jsx(V,{className:c,children:m},a),e[14]=n.key,e[15]=c,e[16]=m,e[17]=f):f=e[17],f}function eo(t){const e=P.c(12),{section:n}=t;switch(n.type){case"divider":{let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Pt,{className:"my-2"}),e[0]=l):l=e[0],l}case"spacer":{let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1"}),e[1]=l):l=e[1],l}case"group":{const l=n.group.label,o=n.group.defaultExpanded;let i;e[2]!==n.group.items?(i=n.group.items.map(so),e[2]=n.group.items,e[3]=i):i=e[3];let r;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==i?(r=s.jsx(ns,{label:l,defaultExpanded:o,children:i}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=i,e[7]=r):r=e[7],r}case"items":{let l;e[8]!==n.items?(l=n.items.map(to),e[8]=n.items,e[9]=l):l=e[9];let o;return e[10]!==l?(o=s.jsx(Qe,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Je,{children:s.jsx(J,{className:"gap-1.5",children:l})})}),e[10]=l,e[11]=o):o=e[11],o}case"custom":return n.content}}function to(t){return s.jsx(os,{item:t},t.key)}function so(t){return s.jsx(os,{item:t},t.key)}function no(t){const e=P.c(17),{sections:n,footer:l,additionalContent:o,header:i,variant:r,contentClassName:a}=t,d=r===void 0?"sidebar":r;let c;e[0]!==i?(c=i&&s.jsx(ks,{className:"sidebar-titlebar wco-drag shrink-0 h-12 flex flex-row items-center px-2 py-0 group-data-[collapsible=icon]/sidebar:hidden",children:i}),e[0]=i,e[1]=c):c=e[1];let u;e[2]!==a?(u=B("flex flex-col flex-1 px-2 pb-2 gap-0.5",a),e[2]=a,e[3]=u):u=e[3];let m;e[4]!==n?(m=n.map(oo),e[4]=n,e[5]=m):m=e[5];let f;e[6]!==o?(f=o&&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:o}),e[6]=o,e[7]=f):f=e[7];let x;e[8]!==u||e[9]!==m||e[10]!==f?(x=s.jsxs(At,{className:u,children:[m,f]}),e[8]=u,e[9]=m,e[10]=f,e[11]=x):x=e[11];let p;return e[12]!==l||e[13]!==c||e[14]!==x||e[15]!==d?(p=s.jsxs(ws,{variant:d,children:[c,x,l]}),e[12]=l,e[13]=c,e[14]=x,e[15]=d,e[16]=p):p=e[16],p}function oo(t,e){return s.jsx(eo,{section:t},e)}function ls(t){const e=P.c(2);let n;return e[0]!==t?(n=s.jsx(no,{...t}),e[0]=t,e[1]=n):n=e[1],n}ls.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(se,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function ut(t){const e=P.c(18),{item:n,onClose:l}=t,o=n.isActive&&"z-10";let i;e[0]!==o?(i=B(o),e[0]=o,e[1]=i):i=e[1];let r;e[2]!==n||e[3]!==l?(r=()=>{n.onClick?.(),l()},e[2]=n,e[3]=l,e[4]=r):r=e[4];let a;e[5]!==n.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=a):a=e[6];let d;e[7]!==n.label?(d=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=d):d=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==r||e[12]!==a||e[13]!==d?(c=s.jsxs(Y,{onClick:r,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,d]}),e[9]=n.isActive,e[10]=n.label,e[11]=r,e[12]=a,e[13]=d,e[14]=c):c=e[14];let u;return e[15]!==i||e[16]!==c?(u=s.jsx(V,{className:i,children:c}),e[15]=i,e[16]=c,e[17]=u):u=e[17],u}function lo(t){const e=P.c(18),{section:n,onClose:l}=t;switch(n.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Pt,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=n.group.label,i=n.group.defaultExpanded;let r;if(e[2]!==l||e[3]!==n.group.items){let d;e[5]!==l?(d=c=>s.jsx(ut,{item:c,onClose:l},c.key),e[5]=l,e[6]=d):d=e[6],r=n.group.items.map(d),e[2]=l,e[3]=n.group.items,e[4]=r}else r=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==r?(a=s.jsx(ns,{label:o,defaultExpanded:i,children:r}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=r,e[10]=a):a=e[10],a}case"items":{let o;if(e[11]!==l||e[12]!==n.items){let r;e[14]!==l?(r=a=>s.jsx(ut,{item:a,onClose:l},a.key),e[14]=l,e[15]=r):r=e[15],o=n.items.map(r),e[11]=l,e[12]=n.items,e[13]=o}else o=e[13];let i;return e[16]!==o?(i=s.jsx(Qe,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Je,{children:s.jsx(J,{className:"gap-1.5",children:o})})}),e[16]=o,e[17]=i):i=e[17],i}case"custom":return n.content}}function io(t){const e=P.c(27),{sections:n,onClose:l,footer:o,additionalContent:i}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Be,{}),e[0]=r):r=e[0];let a;e[1]!==l?(a=s.jsx(st,{onNavigate:l}),e[1]=l,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=U();let u;e[4]!==c?(u=c("sidebar.navigationMobile.closeSidebar"),e[4]=c,e[5]=u):u=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ft,{size:16}),e[6]=m):m=e[6];let f;e[7]!==l||e[8]!==u?(f=s.jsx(we,{onClick:l,"aria-label":u,children:m}),e[7]=l,e[8]=u,e[9]=f):f=e[9];let x;e[10]!==a||e[11]!==f?(x=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[r,a,d,f]}),e[10]=a,e[11]=f,e[12]=x):x=e[12];let p;if(e[13]!==l||e[14]!==n){let j;e[16]!==l?(j=(_,v)=>s.jsx(lo,{section:_,onClose:l},v),e[16]=l,e[17]=j):j=e[17],p=n.map(j),e[13]=l,e[14]=n,e[15]=p}else p=e[15];let g;e[18]!==i?(g=i&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:i}),e[18]=i,e[19]=g):g=e[19];let h;e[20]!==g||e[21]!==p?(h=s.jsxs(At,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[p,g]}),e[20]=g,e[21]=p,e[22]=h):h=e[22];let b;return e[23]!==o||e[24]!==h||e[25]!==x?(b=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[x,h,o]}),e[23]=o,e[24]=h,e[25]=x,e[26]=b):b=e[26],b}function ge(t){const e=P.c(26),{item:n,onClose:l}=t;let o;e[0]!==n.className?(o=B("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",n.className),e[0]=n.className,e[1]=o):o=e[1];const i=o;if(n.href){const u=n.external?"_blank":void 0,m=n.external?"noopener noreferrer":void 0;let f;e[2]!==n.icon?(f=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[2]=n.icon,e[3]=f):f=e[3];let x;e[4]!==n.label?(x=s.jsx("span",{className:"flex-1",children:n.label}),e[4]=n.label,e[5]=x):x=e[5];let p;return e[6]!==i||e[7]!==n.href||e[8]!==l||e[9]!==u||e[10]!==m||e[11]!==f||e[12]!==x?(p=s.jsxs("a",{href:n.href,target:u,rel:m,className:i,onClick:l,children:[f,x]}),e[6]=i,e[7]=n.href,e[8]=l,e[9]=u,e[10]=m,e[11]=f,e[12]=x,e[13]=p):p=e[13],p}let r;e[14]!==n||e[15]!==l?(r=()=>{n.onClick?.(),l()},e[14]=n,e[15]=l,e[16]=r):r=e[16];let a;e[17]!==n.icon?(a=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[17]=n.icon,e[18]=a):a=e[18];let d;e[19]!==n.label?(d=s.jsx("span",{className:"flex-1",children:n.label}),e[19]=n.label,e[20]=d):d=e[20];let c;return e[21]!==i||e[22]!==r||e[23]!==a||e[24]!==d?(c=s.jsxs("button",{type:"button",onClick:r,className:i,children:[a,d]}),e[21]=i,e[22]=r,e[23]=a,e[24]=d,e[25]=c):c=e[25],c}function ro(){const t=P.c(4),e=U();let n;t[0]!==e?(n=e("common.accountPopover.impersonating"),t[0]=e,t[1]=n):n=t[1];let l;return t[2]!==n?(l=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:n}),t[2]=n,t[3]=l):l=t[3],l}function ft(t){const e=P.c(38),{user:n,userImage:l,isImpersonating:o,isMobile:i}=t,r=U(),a=i?"py-4 border-b border-border":"py-3 mx-1 mt-1";let d;e[0]!==a?(d=B("flex items-center gap-3 px-4",a),e[0]=a,e[1]=d):d=e[1];const c=n?.name??"U";let u;e[2]!==c||e[3]!==l?(u=s.jsx(He,{url:l,fallback:c,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=c,e[3]=l,e[4]=u):u=e[4];let m;e[5]!==r||e[6]!==n?.name?(m=n?.name??r("common.accountPopover.defaultUserName"),e[5]=r,e[6]=n?.name,e[7]=m):m=e[7];let f;e[8]!==m?(f=s.jsx("p",{className:"text-sm font-medium truncate",children:m}),e[8]=m,e[9]=f):f=e[9];let x;e[10]!==o?(x=o&&s.jsx(ro,{}),e[10]=o,e[11]=x):x=e[11];let p;e[12]!==f||e[13]!==x?(p=s.jsxs("div",{className:"flex items-center gap-2",children:[f,x]}),e[12]=f,e[13]=x,e[14]=p):p=e[14];const g=n?.email;let h;e[15]!==g?(h=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:g}),e[15]=g,e[16]=h):h=e[16];let b;e[17]!==h||e[18]!==p?(b=s.jsxs("div",{className:"flex-1 min-w-0",children:[p,h]}),e[17]=h,e[18]=p,e[19]=b):b=e[19];let j;e[20]!==r||e[21]!==n?(j=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(()=>{ce.success(r("common.accountPopover.userIdCopied"))})},e[20]=r,e[21]=n,e[22]=j):j=e[22];let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Ue,{size:14}),e[23]=_):_=e[23];let v;e[24]!==j?(v=s.jsx(je,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:_})}),e[24]=j,e[25]=v):v=e[25];let y;e[26]!==r?(y=r("common.accountPopover.copyUserId"),e[26]=r,e[27]=y):y=e[27];let C;e[28]!==y?(C=s.jsx(ve,{side:"right",children:s.jsx("p",{className:"text-xs",children:y})}),e[28]=y,e[29]=C):C=e[29];let N;e[30]!==v||e[31]!==C?(N=s.jsx(Ut,{delayDuration:300,children:s.jsxs(ye,{children:[v,C]})}),e[30]=v,e[31]=C,e[32]=N):N=e[32];let S;return e[33]!==b||e[34]!==N||e[35]!==d||e[36]!==u?(S=s.jsxs("div",{className:d,children:[u,b,N]}),e[33]=b,e[34]=N,e[35]=d,e[36]=u,e[37]=S):S=e[37],S}function pt(t){const e=P.c(35),{themeOptions:n,preferences:l,setPreferences:o,isMobile:i}=t,r=U(),a=i?"size-8":"size-7",d=i?"px-3 py-3":"px-2 py-1.5";let c;e[0]!==d?(c=B("flex items-center justify-between border-t border-border/50",d),e[0]=d,e[1]=c):c=e[1];let u;if(e[2]!==a||e[3]!==l.theme||e[4]!==o||e[5]!==n){let y;e[7]!==a||e[8]!==l.theme||e[9]!==o?(y=C=>{const{value:N,icon:S,label:w}=C;return s.jsx("button",{type:"button","aria-label":w,onClick:()=>o(k=>({...k,theme:N})),className:B(a,"rounded-md flex items-center justify-center transition-colors",l.theme===N?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:S},N)},e[7]=a,e[8]=l.theme,e[9]=o,e[10]=y):y=e[10],u=n.map(y),e[2]=a,e[3]=l.theme,e[4]=o,e[5]=n,e[6]=u}else u=e[6];let m;e[11]!==u?(m=s.jsx("div",{className:"flex items-center gap-0.5",children:u}),e[11]=u,e[12]=m):m=e[12];let f;e[13]!==l.enableSounds||e[14]!==r?(f=l.enableSounds?r("common.accountPopover.disableSounds"):r("common.accountPopover.enableSounds"),e[13]=l.enableSounds,e[14]=r,e[15]=f):f=e[15];let x;e[16]!==o?(x=()=>o(ao),e[16]=o,e[17]=x):x=e[17];const p=l.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let g;e[18]!==a||e[19]!==p?(g=B(a,"rounded-md flex items-center justify-center transition-colors",p),e[18]=a,e[19]=p,e[20]=g):g=e[20];let h;e[21]!==l.enableSounds?(h=l.enableSounds?s.jsx(ln,{size:14}):s.jsx(rn,{size:14}),e[21]=l.enableSounds,e[22]=h):h=e[22];let b;e[23]!==f||e[24]!==x||e[25]!==g||e[26]!==h?(b=s.jsx("button",{type:"button","aria-label":f,onClick:x,className:g,children:h}),e[23]=f,e[24]=x,e[25]=g,e[26]=h,e[27]=b):b=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.112.1"]}),e[28]=j):j=e[28];let _;e[29]!==b?(_=s.jsxs("div",{className:"flex items-center gap-2",children:[b,j]}),e[29]=b,e[30]=_):_=e[30];let v;return e[31]!==_||e[32]!==c||e[33]!==m?(v=s.jsxs("div",{className:c,children:[m,_]}),e[31]=_,e[32]=c,e[33]=m,e[34]=v):v=e[34],v}function ao(t){return{...t,enableSounds:!t.enableSounds}}function ht(t){const e=P.c(54),{user:n,userImage:l,menuItems:o,signOutItem:i,stopImpersonatingItem:r,isImpersonating:a,themeOptions:d,preferences:c,setPreferences:u,close:m,isMobile:f}=t;if(f){let v;e[0]!==a||e[1]!==n||e[2]!==l?(v=s.jsx(ft,{user:n,userImage:l,isImpersonating:a,isMobile:!0}),e[0]=a,e[1]=n,e[2]=l,e[3]=v):v=e[3];let y;if(e[4]!==m||e[5]!==o){let I;e[7]!==m?(I=M=>s.jsx(ge,{item:M,onClose:m},M.key),e[7]=m,e[8]=I):I=e[8],y=o.map(I),e[4]=m,e[5]=o,e[6]=y}else y=e[6];let C;e[9]!==m||e[10]!==r?(C=r&&s.jsx(ge,{item:r,onClose:m}),e[9]=m,e[10]=r,e[11]=C):C=e[11];let N;e[12]!==m||e[13]!==i?(N=s.jsx(ge,{item:i,onClose:m}),e[12]=m,e[13]=i,e[14]=N):N=e[14];let S;e[15]!==y||e[16]!==C||e[17]!==N?(S=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:[y,C,N]})}),e[15]=y,e[16]=C,e[17]=N,e[18]=S):S=e[18];let w;e[19]!==c||e[20]!==u||e[21]!==d?(w=s.jsx(pt,{themeOptions:d,preferences:c,setPreferences:u,isMobile:!0}),e[19]=c,e[20]=u,e[21]=d,e[22]=w):w=e[22];let k;return e[23]!==v||e[24]!==S||e[25]!==w?(k=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[v,S,w]}),e[23]=v,e[24]=S,e[25]=w,e[26]=k):k=e[26],k}let x;e[27]!==a||e[28]!==n||e[29]!==l?(x=s.jsx(ft,{user:n,userImage:l,isImpersonating:a,isMobile:!1}),e[27]=a,e[28]=n,e[29]=l,e[30]=x):x=e[30];let p;if(e[31]!==m||e[32]!==o){let v;e[34]!==m?(v=y=>s.jsx(ge,{item:y,onClose:m},y.key),e[34]=m,e[35]=v):v=e[35],p=o.map(v),e[31]=m,e[32]=o,e[33]=p}else p=e[33];let g;e[36]!==m||e[37]!==r?(g=r&&s.jsx(ge,{item:r,onClose:m}),e[36]=m,e[37]=r,e[38]=g):g=e[38];let h;e[39]!==m||e[40]!==i?(h=s.jsx(ge,{item:i,onClose:m}),e[39]=m,e[40]=i,e[41]=h):h=e[41];let b;e[42]!==p||e[43]!==g||e[44]!==h?(b=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[p,g,h]}),e[42]=p,e[43]=g,e[44]=h,e[45]=b):b=e[45];let j;e[46]!==c||e[47]!==u||e[48]!==d?(j=s.jsx(pt,{themeOptions:d,preferences:c,setPreferences:u,isMobile:!1}),e[46]=c,e[47]=u,e[48]=d,e[49]=j):j=e[49];let _;return e[50]!==x||e[51]!==b||e[52]!==j?(_=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[x,b,j]})}),e[50]=x,e[51]=b,e[52]=j,e[53]=_):_=e[53],_}function Ve(){const t=P.c(99),e=U(),{data:n}=Ne.useSession(),{org:l}=Q(),o=ae();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org",shouldThrow:!1},t[0]=i):i=t[0];const a=xs(i)?.params.org,[d,c]=Mt(),u=$t(),{isAdmin:m}=hn(),[f,x]=G.useState(!1),p=n?.user,g=p?.image,h=!!n?.session?.impersonatedBy;let b;t[1]===Symbol.for("react.memo_cache_sentinel")?(b=()=>x(!1),t[1]=b):b=t[1];const j=b;let _;t[2]!==e?(_=e("common.accountPopover.preferences"),t[2]=e,t[3]=_):_=t[3];let v;t[4]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Oe,{size:16}),t[4]=v):v=t[4];let y;t[5]!==o||t[6]!==a?(y=()=>{o({to:"/$org/settings/profile",params:{org:a??""}})},t[5]=o,t[6]=a,t[7]=y):y=t[7];let C;t[8]!==_||t[9]!==y?(C={key:"preferences",label:_,icon:v,onClick:y},t[8]=_,t[9]=y,t[10]=C):C=t[10];let N;t[11]!==l||t[12]!==o||t[13]!==e?(N=l?[{key:"install-app",label:e("common.accountPopover.addToHomeScreen"),icon:s.jsx(Js,{size:16}),onClick:()=>{o({to:"/$org/install",params:{org:l.slug}})}},{key:"connect-clients",label:"Connect to Agents",icon:s.jsx(tn,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:l.slug}})}}]:[],t[11]=l,t[12]=o,t[13]=e,t[14]=N):N=t[14];let S;t[15]!==e?(S=e("common.accountPopover.termsOfUse"),t[15]=e,t[16]=S):S=t[16];let w;t[17]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(en,{size:16}),t[17]=w):w=t[17];let k;t[18]!==S?(k={key:"terms",label:S,icon:w,href:"https://www.decocms.com/terms-of-use",external:!0},t[18]=S,t[19]=k):k=t[19];let I;t[20]!==e?(I=e("common.accountPopover.privacyPolicy"),t[20]=e,t[21]=I):I=t[21];let M;t[22]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(on,{size:16}),t[22]=M):M=t[22];let z;t[23]!==I?(z={key:"privacy",label:I,icon:M,href:"https://www.decocms.com/privacy-policy",external:!0},t[23]=I,t[24]=z):z=t[24];let A;t[25]!==e?(A=e("common.accountPopover.githubRepo"),t[25]=e,t[26]=A):A=t[26];let $;t[27]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(gs,{className:"w-4 h-4"}),t[27]=$):$=t[27];let R;t[28]!==A?(R={key:"github",label:A,icon:$,href:"https://github.com/decocms/studio",external:!0},t[28]=A,t[29]=R):R=t[29];let E;t[30]!==e?(E=e("common.accountPopover.community"),t[30]=e,t[31]=E):E=t[31];let O;t[32]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(pn,{size:16}),t[32]=O):O=t[32];let D;t[33]!==E?(D={key:"community",label:E,icon:O,href:"https://decocms.com/discord",external:!0},t[33]=E,t[34]=D):D=t[34];let L;t[35]!==e?(L=e("common.accountPopover.homepage"),t[35]=e,t[36]=L):L=t[36];let K;t[37]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(Zs,{size:16}),t[37]=K):K=t[37];let Z;t[38]!==L?(Z={key:"homepage",label:L,icon:K,href:"https://decocms.com",external:!0},t[38]=L,t[39]=Z):Z=t[39];let ne;t[40]!==m||t[41]!==o||t[42]!==e?(ne=m?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:s.jsx(Wt,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[40]=m,t[41]=o,t[42]=e,t[43]=ne):ne=t[43];let de;t[44]!==z||t[45]!==R||t[46]!==D||t[47]!==Z||t[48]!==ne||t[49]!==C||t[50]!==N||t[51]!==k?(de=[C,...N,k,z,R,D,Z,...ne],t[44]=z,t[45]=R,t[46]=D,t[47]=Z,t[48]=ne,t[49]=C,t[50]=N,t[51]=k,t[52]=de):de=t[52];const oe=de;let ee;t[53]!==e?(ee=e("common.accountPopover.signOut"),t[53]=e,t[54]=ee):ee=t[54];let le;t[55]===Symbol.for("react.memo_cache_sentinel")?(le=s.jsx(at,{size:16}),t[55]=le):le=t[55];let me;t[56]!==ee?(me={key:"logout",label:ee,icon:le,onClick:mo},t[56]=ee,t[57]=me):me=t[57];const Se=me;let ue;t[58]!==h||t[59]!==e?(ue=h?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:s.jsx(at,{size:16}),onClick:async()=>{const{error:lt}=await Ne.admin.stopImpersonating();if(lt){ce.error(lt.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[58]=h,t[59]=e,t[60]=ue):ue=t[60];const fe=ue;let pe;t[61]===Symbol.for("react.memo_cache_sentinel")?(pe=s.jsx(sn,{size:14}),t[61]=pe):pe=t[61];let ie;t[62]!==e?(ie=e("common.accountPopover.lightTheme"),t[62]=e,t[63]=ie):ie=t[63];let X;t[64]!==ie?(X={value:"light",icon:pe,label:ie},t[64]=ie,t[65]=X):X=t[65];let he;t[66]===Symbol.for("react.memo_cache_sentinel")?(he=s.jsx(nn,{size:14}),t[66]=he):he=t[66];let te;t[67]!==e?(te=e("common.accountPopover.darkTheme"),t[67]=e,t[68]=te):te=t[68];let T;t[69]!==te?(T={value:"dark",icon:he,label:te},t[69]=te,t[70]=T):T=t[70];let F;t[71]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(We,{size:14}),t[71]=F):F=t[71];let W;t[72]!==e?(W=e("common.accountPopover.systemTheme"),t[72]=e,t[73]=W):W=t[73];let H;t[74]!==W?(H={value:"system",icon:F,label:W},t[74]=W,t[75]=H):H=t[75];let re;t[76]!==X||t[77]!==T||t[78]!==H?(re=[X,T,H],t[76]=X,t[77]=T,t[78]=H,t[79]=re):re=t[79];const De=re;let Me;t[80]!==h||t[81]!==u||t[82]!==oe||t[83]!==d||t[84]!==c||t[85]!==Se||t[86]!==fe||t[87]!==De||t[88]!==p||t[89]!==g?(Me={user:p,userImage:g,menuItems:oe,signOutItem:Se,stopImpersonatingItem:fe,isImpersonating:h,themeOptions:De,preferences:d,setPreferences:c,close:j,isMobile:u},t[80]=h,t[81]=u,t[82]=oe,t[83]=d,t[84]=c,t[85]=Se,t[86]=fe,t[87]=De,t[88]=p,t[89]=g,t[90]=Me):Me=t[90];const Ie=Me;let Te;return t[91]!==h||t[92]!==u||t[93]!==f||t[94]!==Ie||t[95]!==e||t[96]!==p?.name||t[97]!==g?(Te=s.jsx(s.Fragment,{children:u?s.jsxs(Ys,{open:f,onOpenChange:x,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>x(!0),className:B("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",h&&"border-2 border-dashed border-warning"),children:[s.jsx(He,{url:g,fallback:p?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:p?.name??e("common.accountPopover.defaultAccountLabel")})]}),s.jsxs(Xs,{className:"h-[80dvh] p-0",children:[s.jsx(Qs,{className:"sr-only",children:e("common.accountPopover.account")}),s.jsx(ht,{...Ie})]})]}):s.jsxs(Gt,{open:f,onOpenChange:x,children:[s.jsx(Bt,{asChild:!0,children:s.jsxs(Y,{tooltip:p?.name??e("common.accountPopover.defaultAccountLabel"),className:B("rounded-md",h&&"border-2 border-dashed border-warning"),children:[s.jsx(He,{url:g,fallback:p?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:p?.name??e("common.accountPopover.defaultAccountLabel")})]})}),s.jsx(Ht,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:co,children:s.jsx(ht,{...Ie})})]})}),t[91]=h,t[92]=u,t[93]=f,t[94]=Ie,t[95]=e,t[96]=p?.name,t[97]=g,t[98]=Te):Te=t[98],Te}function co(t){return t.preventDefault()}function mo(){q("signed_out",{source:"account_popover"}),bs(),Ne.signOut()}const uo=["Browse and edit your Library files","Run your agents","Enable and call any MCP tool in this org"],fo="Connect: ";function po(){return typeof window>"u"?"unknown host":window.location.hostname}function ho(t){const e=P.c(45),{onClose:n}=t,{org:l}=Q();let o;e[0]!==l.slug?(o=gn(l.slug),e[0]=l.slug,e[1]=o):o=e[1];const i=o,r=bn(),[a,d]=G.useState(null),c=dt(),u=dt();let m;e[2]!==r||e[3]!==l.slug?(m=()=>{r.mutate({name:`${fo}Claude Code on ${po()}`,permissions:{"*":["*"]}},{onSuccess:R=>{const E=jn(l.slug,R.key);d(E),q("connect_studio_generate",{target:"claude-code"}),navigator.clipboard?.writeText(E).then(jo,bo)},onError:go})},e[2]=r,e[3]=l.slug,e[4]=m):m=e[4];const f=m;let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("span",{className:"size-8 rounded-lg bg-special/15 text-special flex items-center justify-center shrink-0",children:s.jsx(Vt,{size:17})}),e[5]=x):x=e[5];let p;e[6]!==l.name?(p=s.jsxs(Ze,{className:"flex items-center gap-2.5",children:[x,"Connect ",l.name," to Claude"]}),e[6]=l.name,e[7]=p):p=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Ot,{children:"Hand Claude this org's MCP endpoint. Once linked, Claude can:"}),e[8]=g):g=e[8];let h;e[9]!==p?(h=s.jsxs(Et,{children:[p,g]}),e[9]=p,e[10]=h):h=e[10];let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("ul",{className:"flex flex-col gap-2 text-sm",children:uo.map(xo)}),e[11]=b):b=e[11];let j;e[12]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ct,{size:15,className:"text-muted-foreground"}),e[12]=j):j=e[12];let _;e[13]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[j,"Claude Code",s.jsx("span",{className:"ml-auto text-[11px] font-medium text-special uppercase tracking-wide",children:"Recommended"})]}),e[13]=_):_=e[13];let v;e[14]!==a||e[15]!==c||e[16]!==r.isPending||e[17]!==f?(v=s.jsxs("section",{className:"rounded-xl border border-border bg-muted/30 p-4 flex flex-col gap-3",children:[_,a?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-lg border border-border bg-background p-3 max-h-32 overflow-y-auto",children:s.jsx("code",{className:"text-xs leading-relaxed break-all font-mono text-foreground/90 whitespace-pre-wrap",children:a})}),s.jsxs(be,{size:"sm",className:"gap-1.5 self-start",onClick:()=>{c.handleCopy(a),q("connect_studio_copy",{target:"claude-code"}),ce.success("Command copied — paste it in your terminal")},children:[c.copied?s.jsx(Ke,{size:14}):s.jsx(Ue,{size:14}),c.copied?"Copied":"Copy command"]}),s.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-warning/40 bg-warning/10 px-3 py-2",children:[s.jsx(Wt,{size:14,className:"text-warning shrink-0 mt-0.5"}),s.jsxs("p",{className:"text-xs leading-relaxed text-foreground/80",children:["No login step — this command embeds a"," ",s.jsx("span",{className:"font-medium text-foreground",children:"full-access token"}),". Treat it like a password; revoke it any time in Settings → Connect."]})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"One command, no browser login. We'll mint a scoped access token and embed it so Claude Code connects instantly."}),s.jsxs(be,{size:"sm",className:"gap-1.5 self-start",disabled:r.isPending,onClick:f,children:[s.jsx(ct,{size:14}),r.isPending?"Generating…":"Generate connect command"]})]})]}),e[14]=a,e[15]=c,e[16]=r.isPending,e[17]=f,e[18]=v):v=e[18];let y,C;e[19]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[s.jsx(an,{size:15,className:"text-muted-foreground"}),"Claude Desktop or claude.ai"]}),C=s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"Add a custom connector in Settings → Connectors and paste this URL. Claude signs in with OAuth on first use."}),e[19]=y,e[20]=C):(y=e[19],C=e[20]);let N;e[21]!==i?(N=s.jsx("code",{className:"text-xs flex-1 min-w-0 truncate font-mono text-foreground/90",children:i}),e[21]=i,e[22]=N):N=e[22];let S;e[23]!==i||e[24]!==u?(S=()=>{u.handleCopy(i),q("connect_studio_copy",{target:"claude-connector"})},e[23]=i,e[24]=u,e[25]=S):S=e[25];let w;e[26]!==u.copied?(w=u.copied?s.jsx(Ke,{size:14}):s.jsx(Ue,{size:14}),e[26]=u.copied,e[27]=w):w=e[27];let k;e[28]!==S||e[29]!==w?(k=s.jsx(be,{variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"Copy URL",onClick:S,children:w}),e[28]=S,e[29]=w,e[30]=k):k=e[30];let I;e[31]!==N||e[32]!==k?(I=s.jsxs("section",{className:"flex flex-col gap-2.5",children:[y,C,s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-muted/30 pl-3 pr-1.5 py-1.5 min-w-0",children:[N,k]})]}),e[31]=N,e[32]=k,e[33]=I):I=e[33];let M;e[34]!==l.slug?(M={org:l.slug},e[34]=l.slug,e[35]=M):M=e[35];let z;e[36]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(tt,{size:12}),e[36]=z):z=e[36];let A;e[37]!==n||e[38]!==M?(A=s.jsx("div",{className:"flex items-center border-t border-border pt-3",children:s.jsx(be,{asChild:!0,variant:"link",size:"sm",className:"px-0 text-xs gap-1",children:s.jsxs(js,{to:"/$org/settings/connect",params:M,onClick:n,children:["More clients & API keys ",z]})})}),e[37]=n,e[38]=M,e[39]=A):A=e[39];let $;return e[40]!==v||e[41]!==I||e[42]!==A||e[43]!==h?($=s.jsxs("div",{className:"flex flex-col gap-4 min-w-0",children:[h,b,v,I,A]}),e[40]=v,e[41]=I,e[42]=A,e[43]=h,e[44]=$):$=e[44],$}function xo(t){return s.jsxs("li",{className:"flex items-center gap-2.5",children:[s.jsx("span",{className:"size-4 rounded-full bg-special/15 text-special flex items-center justify-center shrink-0",children:s.jsx(Ke,{size:11,strokeWidth:3})}),s.jsx("span",{className:"text-foreground",children:t})]},t)}function go(t){return ce.error(t.message)}function bo(){return ce.success("Command ready — copy it below")}function jo(){return ce.success("Command copied — paste it in your terminal")}function vo(t){const e=P.c(6),{open:n,onOpenChange:l}=t;let o;e[0]!==l?(o=s.jsx(zt,{className:"max-w-lg gap-4",children:s.jsx(ho,{onClose:()=>l(!1)})}),e[0]=l,e[1]=o):o=e[1];let i;return e[2]!==l||e[3]!==n||e[4]!==o?(i=s.jsx(et,{open:n,onOpenChange:l,children:o}),e[2]=l,e[3]=n,e[4]=o,e[5]=i):i=e[5],i}function qe(t){const e=P.c(50),{variant:n}=t===void 0?{}:t,l=n===void 0?"icon":n,o=U(),i=vn(),[r,a]=G.useState(!1);let d,c;if(e[0]!==i.capabilities||e[1]!==i.hostname||e[2]!==i.machineId||e[3]!==i.online||e[4]!==o){const v=_n(i.capabilities,o);let y;e[7]!==i.online||e[8]!==o?(y=i.online?o("header.linkedDesktopIndicator.desktopLinked"):o("header.linkedDesktopIndicator.connectDesktop"),e[7]=i.online,e[8]=o,e[9]=y):y=e[9],d=y,c=i.online?s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[s.jsx("span",{className:"font-medium",children:i.hostname??i.machineId??o("header.linkedDesktopIndicator.desktopLinked")}),s.jsx("span",{className:"text-muted-foreground",children:v.length>0?o("header.linkedDesktopIndicator.availableCapabilities",{capabilities:v.join(", ")}):o("header.linkedDesktopIndicator.noCliAgents")})]}):s.jsx("span",{className:"text-xs",children:o("header.linkedDesktopIndicator.desktopDisconnected")}),e[0]=i.capabilities,e[1]=i.hostname,e[2]=i.machineId,e[3]=i.online,e[4]=o,e[5]=d,e[6]=c}else d=e[5],c=e[6];const u=c;if(l==="full"){let v,y;e[10]===Symbol.for("react.memo_cache_sentinel")?(v=()=>a(!0),y=s.jsx(We,{}),e[10]=v,e[11]=y):(v=e[10],y=e[11]);let C;e[12]!==d?(C=s.jsx("span",{children:d}),e[12]=d,e[13]=C):C=e[13];let N;e[14]!==i.online?(N=i.online&&s.jsx("span",{className:"ml-auto size-2 rounded-full bg-success animate-pulse"}),e[14]=i.online,e[15]=N):N=e[15];let S;e[16]!==d||e[17]!==C||e[18]!==N?(S=s.jsx(je,{asChild:!0,children:s.jsxs(Y,{tooltip:d,onClick:v,children:[y,C,N]})}),e[16]=d,e[17]=C,e[18]=N,e[19]=S):S=e[19];let w;e[20]!==u?(w=s.jsx(ve,{side:"right",children:u}),e[20]=u,e[21]=w):w=e[21];let k;e[22]!==S||e[23]!==w?(k=s.jsxs(ye,{children:[S,w]}),e[22]=S,e[23]=w,e[24]=k):k=e[24];let I;e[25]!==r?(I=s.jsx(mt,{open:r,onOpenChange:a}),e[25]=r,e[26]=I):I=e[26];let M;return e[27]!==I||e[28]!==k?(M=s.jsxs(s.Fragment,{children:[k,I]}),e[27]=I,e[28]=k,e[29]=M):M=e[29],M}let m;e[30]===Symbol.for("react.memo_cache_sentinel")?(m=()=>a(!0),e[30]=m):m=e[30];let f;e[31]!==i.online||e[32]!==o?(f=i.online?o("header.linkedDesktopIndicator.desktopLinked"):o("header.linkedDesktopIndicator.connectYourDesktop"),e[31]=i.online,e[32]=o,e[33]=f):f=e[33];let x;e[34]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(We,{size:16}),e[34]=x):x=e[34];let p;e[35]!==i.online?(p=i.online&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[35]=i.online,e[36]=p):p=e[36];let g;e[37]!==f||e[38]!==p?(g=s.jsx(je,{asChild:!0,children:s.jsxs(we,{onClick:m,"aria-label":f,children:[x,p]})}),e[37]=f,e[38]=p,e[39]=g):g=e[39];let h;e[40]!==u?(h=s.jsx(ve,{side:"bottom",children:u}),e[40]=u,e[41]=h):h=e[41];let b;e[42]!==g||e[43]!==h?(b=s.jsxs(ye,{children:[g,h]}),e[42]=g,e[43]=h,e[44]=b):b=e[44];let j;e[45]!==r?(j=s.jsx(mt,{open:r,onOpenChange:a}),e[45]=r,e[46]=j):j=e[46];let _;return e[47]!==j||e[48]!==b?(_=s.jsxs(s.Fragment,{children:[b,j]}),e[47]=j,e[48]=b,e[49]=_):_=e[49],_}class yo extends G.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function _o(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function So(){const t=P.c(17),e=ae(),{org:n}=Q(),{hasDecoKey:l,balanceDollars:o}=Us();if(!l)return null;let i;t[0]!==o?(i=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=i):i=t[1];let r;t[2]!==o?(r=B(o!=null&&_o(o)),t[2]=o,t[3]=r):r=t[3];let a;t[4]!==e||t[5]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(cn,{}),t[7]=d):d=t[7];let c;t[8]!==o?(c=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=c):c=t[9];let u;t[10]!==c?(u=s.jsx("span",{children:c}),t[10]=c,t[11]=u):u=t[11];let m;return t[12]!==i||t[13]!==r||t[14]!==a||t[15]!==u?(m=s.jsx(J,{children:s.jsx(V,{children:s.jsxs(Y,{tooltip:i,className:r,onClick:a,children:[d,u]})})}),t[12]=i,t[13]=r,t[14]=a,t[15]=u,t[16]=m):m=t[16],m}function xt(){const t=P.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(yo,{children:s.jsx(G.Suspense,{fallback:null,children:s.jsx(So,{})})}),t[0]=e):e=t[0],e}function Co(){const t=P.c(14),e=U(),n=ae(),{org:l}=Q();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let i;t[2]!==n||t[3]!==l.slug?(i=()=>n({to:"/$org/settings",params:{org:l.slug}}),t[2]=n,t[3]=l.slug,t[4]=i):i=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Oe,{}),t[5]=r):r=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]!==o||t[11]!==i||t[12]!==d?(c=s.jsxs(Y,{tooltip:o,onClick:i,children:[r,d]}),t[10]=o,t[11]=i,t[12]=d,t[13]=c):c=t[13],c}function No(){const t=P.c(9),e=U(),n=ae(),{org:l}=Q();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let i;t[2]!==n||t[3]!==l.slug?(i=()=>n({to:"/$org/settings",params:{org:l.slug}}),t[2]=n,t[3]=l.slug,t[4]=i):i=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Oe,{size:15}),t[5]=r):r=t[5];let a;return t[6]!==o||t[7]!==i?(a=s.jsx("button",{type:"button","aria-label":o,onClick:i,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:r}),t[6]=o,t[7]=i,t[8]=a):a=t[8],a}function gt(){const t=P.c(33),e=U(),[n,l]=G.useState(!1),[o,i]=G.useState(!1);let r;t[0]!==e?(r=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=r):r=t[1];let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Kt,{}),t[2]=a):a=t[2];let d;t[3]!==e?(d=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=d):d=t[4];let c;t[5]!==d?(c=s.jsx("span",{children:d}),t[5]=d,t[6]=c):c=t[6];let u;t[7]!==r||t[8]!==c?(u=s.jsx(V,{children:s.jsx(qt,{trigger:s.jsxs(Y,{tooltip:r,children:[a,c]})})}),t[7]=r,t[8]=c,t[9]=u):u=t[9];let m;t[10]!==e?(m=e("sidebar.sidebarFooter.addConnection"),t[10]=e,t[11]=m):m=t[11];let f,x;t[12]===Symbol.for("react.memo_cache_sentinel")?(f=()=>l(!0),x=s.jsx(xn,{}),t[12]=f,t[13]=x):(f=t[12],x=t[13]);let p;t[14]!==e?(p=e("sidebar.sidebarFooter.addConnection"),t[14]=e,t[15]=p):p=t[15];let g;t[16]!==p?(g=s.jsx("span",{children:p}),t[16]=p,t[17]=g):g=t[17];let h;t[18]!==m||t[19]!==g?(h=s.jsx(V,{children:s.jsxs(Y,{tooltip:m,onClick:f,children:[x,g]})}),t[18]=m,t[19]=g,t[20]=h):h=t[20];let b;t[21]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(V,{children:s.jsxs(Y,{tooltip:"Connect to Claude",onClick:()=>{q("connect_studio_opened",{source:"sidebar_footer"}),i(!0)},children:[s.jsx(Vt,{}),s.jsx("span",{children:"Connect to Claude"})]})}),t[21]=b):b=t[21];let j;t[22]!==h||t[23]!==u?(j=s.jsxs(J,{className:"gap-0.5",children:[u,h,b]}),t[22]=h,t[23]=u,t[24]=j):j=t[24];let _;t[25]!==n?(_=s.jsx(Ws,{open:n,onOpenChange:l,mode:"browse"}),t[25]=n,t[26]=_):_=t[26];let v;t[27]!==o?(v=s.jsx(vo,{open:o,onOpenChange:i}),t[27]=o,t[28]=v):v=t[28];let y;return t[29]!==j||t[30]!==_||t[31]!==v?(y=s.jsxs(s.Fragment,{children:[j,_,v]}),t[29]=j,t[30]=_,t[31]=v,t[32]=y):y=t[32],y}function bt(){const t=P.c(10),e=U();let n;t[0]!==e?(n=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=n):n=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Kt,{}),t[2]=l):l=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let i;t[5]!==o?(i=s.jsx("span",{children:o}),t[5]=o,t[6]=i):i=t[6];let r;return t[7]!==n||t[8]!==i?(r=s.jsx(J,{className:"gap-0.5",children:s.jsx(V,{children:s.jsx(qt,{trigger:s.jsxs(Y,{tooltip:n,children:[l,i]})})})}),t[7]=n,t[8]=i,t[9]=r):r=t[9],r}function ko(){const t=P.c(19),{state:e}=_e(),n=e==="collapsed",l=nt(),o=!l;if(n){let u;t[0]!==l?(u=l?s.jsx(bt,{}):s.jsx(gt,{}),t[0]=l,t[1]=u):u=t[1];let m;t[2]!==o?(m=o&&s.jsx(xt,{}),t[2]=o,t[3]=m):m=t[3];let f;t[4]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(V,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(qe,{})})}),t[4]=f):f=t[4];let x;t[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(V,{children:s.jsx(Co,{})}),t[5]=x):x=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs(J,{children:[f,x,s.jsx(V,{children:s.jsx(Ve,{})})]}),t[6]=p):p=t[6];let g;return t[7]!==u||t[8]!==m?(g=s.jsxs(Ge,{className:"px-2 pb-3 gap-1",children:[u,m,p]}),t[7]=u,t[8]=m,t[9]=g):g=t[9],g}let i;t[10]!==l?(i=l?s.jsx(bt,{}):s.jsx(gt,{}),t[10]=l,t[11]=i):i=t[11];let r;t[12]!==o?(r=o&&s.jsx(xt,{}),t[12]=o,t[13]=r):r=t[13];let a;t[14]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(V,{children:s.jsx(qe,{variant:"full"})}),t[14]=a):a=t[14];let d;t[15]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(J,{className:"gap-0.5",children:[a,s.jsx(V,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Ve,{})}),s.jsx(No,{})]})})]}),t[15]=d):d=t[15];let c;return t[16]!==i||t[17]!==r?(c=s.jsxs(Ge,{className:"px-2 pb-3 gap-0.5",children:[i,r,d]}),t[16]=i,t[17]=r,t[18]=c):c=t[18],c}function wo(){const t=P.c(11),e=U(),n=ae(),{org:l}=Q(),{setOpenMobile:o}=_e();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(J,{children:s.jsx(V,{children:s.jsx(Ve,{})})})}),t[0]=i):i=t[0];let r;t[1]!==e?(r=e("sidebar.sidebarFooterMobile.settings"),t[1]=e,t[2]=r):r=t[2];let a;t[3]!==n||t[4]!==l.slug||t[5]!==o?(a=()=>{n({to:"/$org/settings",params:{org:l.slug}}),o(!1)},t[3]=n,t[4]=l.slug,t[5]=o,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Oe,{className:"size-4"}),t[7]=d):d=t[7];let c;return t[8]!==r||t[9]!==a?(c=s.jsx(Ge,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[i,s.jsx(we,{"aria-label":r,onClick:a,children:d})]})}),t[8]=r,t[9]=a,t[10]=c):c=t[10],c}function jt(t){const e=P.c(15),{className:n,wrapperClassName:l,children:o}=t,[i,r]=G.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=b=>{b&&r(b.scrollHeight>b.clientHeight+1)},e[0]=a):a=e[0];const d=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=b=>{const j=b.currentTarget;r(j.scrollHeight-j.scrollTop>j.clientHeight+1)},e[1]=c):c=e[1];const u=c;let m;e[2]!==l?(m=B("relative",l),e[2]=l,e[3]=m):m=e[3];let f;e[4]!==o||e[5]!==n?(f=s.jsx("div",{ref:d,onScroll:u,className:n,children:o}),e[4]=o,e[5]=n,e[6]=f):f=e[6];const x=i?"opacity-100":"opacity-0";let p;e[7]!==x?(p=B("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",x),e[7]=x,e[8]=p):p=e[8];let g;e[9]!==p?(g=s.jsx("div",{"aria-hidden":!0,className:p}),e[9]=p,e[10]=g):g=e[10];let h;return e[11]!==m||e[12]!==f||e[13]!==g?(h=s.jsxs("div",{className:m,children:[f,g]}),e[11]=m,e[12]=f,e[13]=g,e[14]=h):h=e[14],h}function Mo(t){const e=P.c(9),{virtualMcpId:n,size:l,showAutomationBadge:o}=t,i=l===void 0?"sm":l,r=U();let a;e[0]!==i||e[1]!==n?(a=n?s.jsx(Io,{virtualMcpId:n,size:i}):s.jsx(ke,{icon:null,name:"?",size:i}),e[0]=i,e[1]=n,e[2]=a):a=e[2];let d;e[3]!==o||e[4]!==r?(d=o&&s.jsx("span",{"aria-label":r("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(Zt,{size:10,className:"text-white"})}),e[3]=o,e[4]=r,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 Io(t){const e=P.c(6),{virtualMcpId:n,size:l}=t,o=Yt(n);if(!o){let a;return e[0]!==l?(a=s.jsx(ke,{icon:null,name:"?",size:l}),e[0]=l,e[1]=a):a=e[1],a}const i=o.icon??null;let r;return e[2]!==o.title||e[3]!==l||e[4]!==i?(r=s.jsx(ke,{icon:i,name:o.title,size:l}),e[2]=o.title,e[3]=l,e[4]=i,e[5]=r):r=e[5],r}function vt(t){const e=P.c(53),{open:n,onOpenChange:l}=t,[o,i]=G.useState(""),{org:r}=Q(),{setTaskId:a}=Qt(),d=Jt(),c=U();let u,m,f;e[0]!==r.id||e[1]!==o?(f=o.trim(),m=vs,u=It.globalSearch(r.id,f),e[0]=r.id,e[1]=o,e[2]=u,e[3]=m,e[4]=f):(u=e[2],m=e[3],f=e[4]);const x=n&&f.length>0;let p;e[5]!==d||e[6]!==f?(p=async()=>await d.call("GLOBAL_SEARCH",{query:f,limit:20}),e[5]=d,e[6]=f,e[7]=p):p=e[7];let g;e[8]!==u||e[9]!==x||e[10]!==p?(g={queryKey:u,enabled:x,queryFn:p,staleTime:1e4},e[8]=u,e[9]=x,e[10]=p,e[11]=g):g=e[11];const{data:h,isFetching:b}=m(g);let j;e[12]!==h?.items?(j=h?.items??[],e[12]=h?.items,e[13]=j):j=e[13];const _=j;let v;e[14]!==l?(v=L=>{L||i(""),l(L)},e[14]=l,e[15]=v):v=e[15];const y=v;let C;e[16]!==y||e[17]!==a?(C=L=>{y(!1),a(L.id,L.virtual_mcp_id??void 0)},e[16]=y,e[17]=a,e[18]=C):C=e[18];const N=C;let S;e[19]!==c?(S=c("tasksPanel.globalSearchDialog.title"),e[19]=c,e[20]=S):S=e[20];let w;e[21]!==S?(w=s.jsx(Ze,{children:S}),e[21]=S,e[22]=w):w=e[22];let k;e[23]!==c?(k=c("tasksPanel.globalSearchDialog.description"),e[23]=c,e[24]=k):k=e[24];let I;e[25]!==k?(I=s.jsx(Ot,{children:k}),e[25]=k,e[26]=I):I=e[26];let M;e[27]!==w||e[28]!==I?(M=s.jsxs(Et,{className:"sr-only",children:[w,I]}),e[27]=w,e[28]=I,e[29]=M):M=e[29];let z;e[30]!==c?(z=c("tasksPanel.globalSearchDialog.placeholder"),e[30]=c,e[31]=z):z=e[31];let A;e[32]!==o||e[33]!==z?(A=s.jsx($n,{value:o,onValueChange:i,placeholder:z}),e[32]=o,e[33]=z,e[34]=A):A=e[34];let $;e[35]!==N||e[36]!==b||e[37]!==_||e[38]!==c||e[39]!==f?($=f?b&&_.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c("tasksPanel.globalSearchDialog.searching")}):_.length===0?s.jsx(Pn,{children:c("tasksPanel.globalSearchDialog.noResults")}):_.map(L=>L.type==="thread"?s.jsxs(An,{value:`thread:${L.id}:${L.title}`,onSelect:()=>N(L),className:"gap-2.5",children:[s.jsx(Mo,{virtualMcpId:L.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:L.title||c("tasksPanel.globalSearchDialog.untitledChat")})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(L.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${L.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c("tasksPanel.globalSearchDialog.startTyping")}),e[35]=N,e[36]=b,e[37]=_,e[38]=c,e[39]=f,e[40]=$):$=e[40];let R;e[41]!==$?(R=s.jsx(zn,{children:$}),e[41]=$,e[42]=R):R=e[42];let E;e[43]!==A||e[44]!==R?(E=s.jsxs(On,{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:[A,R]}),e[43]=A,e[44]=R,e[45]=E):E=e[45];let O;e[46]!==M||e[47]!==E?(O=s.jsxs(zt,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[M,E]}),e[46]=M,e[47]=E,e[48]=O):O=e[48];let D;return e[49]!==y||e[50]!==n||e[51]!==O?(D=s.jsx(et,{open:n,onOpenChange:y,children:O}),e[49]=y,e[50]=n,e[51]=O,e[52]=D):D=e[52],D}function To(t){return t==="ephemeral"||t.startsWith("thread:")}function is(t){const e=P.c(45),{task:n,isActive:l,onClick:o,onArchive:i,showAutomationBadge:r,showAgentIcon:a,hideStatusIdle:d,indented:c}=t,u=U(),m=Rn(n.status),f=m.icon,x=n.metadata?.kind==="tool_call_run",p=Yt(x?void 0:n.virtual_mcp_id);let g;e[0]!==p?(g=Ks(p),e[0]=p,e[1]=g):g=e[1];const h=g;Ln(6e4);const b=r||!!n.trigger_id,j=n.id,_="button",v=0;let y;e[2]!==o?(y=K=>{K.target===K.currentTarget&&(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),o())},e[2]=o,e[3]=y):y=e[3];const C=c?"-ml-4 pl-6":"pl-[7px]",N=l?"bg-accent text-accent-foreground":"hover:bg-accent/60";let S;e[4]!==C||e[5]!==N?(S=B("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",C,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",N),e[4]=C,e[5]=N,e[6]=S):S=e[6];let w;e[7]!==x||e[8]!==a||e[9]!==p?.icon||e[10]!==p?.title?(w=a&&!x&&s.jsx(ke,{icon:p?.icon??null,name:p?.title??"?",size:"2xs"}),e[7]=x,e[8]=a,e[9]=p?.icon,e[10]=p?.title,e[11]=w):w=e[11];let k;e[12]!==b||e[13]!==u?(k=b&&s.jsx(Zt,{size:12,"aria-label":u("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-blue-500"}),e[12]=b,e[13]=u,e[14]=k):k=e[14];let I;e[15]!==u||e[16]!==n.title?(I=n.title||u("tasksPanel.taskRow.untitledTask"),e[15]=u,e[16]=n.title,e[17]=I):I=e[17];let M;e[18]!==I?(M=s.jsx("div",{className:"text-sm text-foreground truncate",children:I}),e[18]=I,e[19]=M):M=e[19];let z;e[20]!==k||e[21]!==M?(z=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[k,M]}),e[20]=k,e[21]=M,e[22]=z):z=e[22];let A;e[23]!==h||e[24]!==l||e[25]!==n.branch||e[26]!==n.updated_at?(A=n.updated_at&&s.jsxs("div",{className:B("flex items-center gap-1 text-[11px] min-w-0",l?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!To(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):h?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[h.owner,"/",h.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:Gn(new Date(n.updated_at))})]}),e[23]=h,e[24]=l,e[25]=n.branch,e[26]=n.updated_at,e[27]=A):A=e[27];let $;e[28]!==z||e[29]!==A?($=s.jsxs("div",{className:"flex-1 min-w-0",children:[z,A]}),e[28]=z,e[29]=A,e[30]=$):$=e[30];const R="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",E=!d&&s.jsx("span",{className:B("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",i&&"group-hover/row:opacity-0"),"aria-label":u("tasksPanel.taskRow.statusLabel",{status:m.label}),children:s.jsx(f,{size:14,className:B(m.iconClassName,n.status==="in_progress"&&"animate-spin")})});let O;e[31]!==i||e[32]!==u?(O=i&&s.jsxs(ye,{children:[s.jsx(je,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":u("tasksPanel.taskRow.archiveTask"),onClick:K=>{K.stopPropagation(),i()},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(ys,{size:14})})}),s.jsx(ve,{side:"right",children:u("tasksPanel.taskRow.archive")})]}),e[31]=i,e[32]=u,e[33]=O):O=e[33];let D;e[34]!==E||e[35]!==O?(D=s.jsxs("div",{className:R,children:[E,O]}),e[34]=E,e[35]=O,e[36]=D):D=e[36];let L;return e[37]!==o||e[38]!==$||e[39]!==D||e[40]!==y||e[41]!==S||e[42]!==w||e[43]!==n.id?(L=s.jsxs("div",{"data-task-id":j,role:_,tabIndex:v,onClick:o,onKeyDown:y,className:S,children:[w,$,D]}),e[37]=o,e[38]=$,e[39]=D,e[40]=y,e[41]=S,e[42]=w,e[43]=n.id,e[44]=L):L=e[44],L}const yt=["requires_action","in_progress","failed","expired","completed"];function Po(t){const e=new Map(yt.map(n=>[n,[]]));for(const n of t){const l=n.status??"completed";(e.get(l)??e.get("completed")).push(n)}return yt.map(n=>({status:n,threads:e.get(n)}))}const Ao="sidebar.group.expanded.";function $o(t,e){const n=P.c(3),[l,o]=ze(`${Ao}${t}`,e);let i;return n[0]!==l||n[1]!==o?(i=[l,o],n[0]=l,n[1]=o,n[2]=i):i=n[2],i}function rs(t){const e=P.c(18),{onClick:n,isFetching:l,indented:o}=t,i=U();let r;e[0]!==i?(r=i("sidebar.showMoreButton.ariaLabel"),e[0]=i,e[1]=r):r=e[1];const a=o?"-ml-4 pl-6 pr-2":"px-2";let d;e[2]!==a?(d=B("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]!==l?(c=l&&s.jsx(_s,{size:14,className:"animate-spin"}),e[4]=l,e[5]=c):c=e[5];let u;e[6]!==l||e[7]!==i?(u=i(l?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=l,e[7]=i,e[8]=u):u=e[8];let m;e[9]!==u?(m=s.jsx("span",{children:u}),e[9]=u,e[10]=m):m=e[10];let f;return e[11]!==l||e[12]!==n||e[13]!==r||e[14]!==d||e[15]!==c||e[16]!==m?(f=s.jsxs("button",{type:"button","aria-label":r,onClick:n,disabled:l,className:d,children:[c,m]}),e[11]=l,e[12]=n,e[13]=r,e[14]=d,e[15]=c,e[16]=m,e[17]=f):f=e[17],f}function zo(t,e,n,l){return[t,e,n,l.type,l.member,l.currentUserId??""].join("|")}function Oo(t){return t.member==="mine"&&!t.currentUserId}const as=4;let Ae=0;const Ye=[];function Eo(){for(;Ae<as&&Ye.length>0;){const t=Ye.shift();t&&t()}}function cs(t){return new Promise((e,n)=>{const l=()=>{Ae++,t().then(e,n).finally(()=>{Ae--,Eo()})};Ae<as?l():Ye.push(l)})}const Ee=10;function _t(t,e,n,l,o){const i={hidden:!1};l.member==="mine"&&l.currentUserId&&(i.created_by=l.currentUserId),l.type==="automation"&&(i.has_trigger=!0),l.type==="manual"&&(i.has_trigger=!1);const r={where:i,limit:o,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return r.status=e,r}function Do(t,e,n,l){let o=0;for(const i of t)ds(i,e,n,l)&&o++;return o}function Le(t,e,n,l){return Do(t,e,n,l)}function Ro(t,e){return!!(t>=Ee||t===0&&e)}function St(t,e){return t<e}function Lo(t,e){return e===!1?!1:e===!0?!0:t}function ds(t,e,n,l){return!(t.hidden||(t.status??"completed")!==n||l.member==="mine"&&l.currentUserId&&t.created_by!==l.currentUserId||l.type==="automation"&&!t.trigger_id||l.type==="manual"&&t.trigger_id)}const $e=new Map,Pe=new Map;function Fo(t,e){return e?t>=Ee?!0:null:!1}function Ct(t){return $e.get(t)}function Go(t,e){$e.set(t,e)}function Bo(t,e,n){const l=$e.get(t);if(l!==void 0){n(l);return}let o=Pe.get(t);o||(o=cs(e).then(i=>($e.set(t,i),Pe.delete(t),i)).catch(()=>(Pe.delete(t),Promise.reject(new Error("group probe failed")))),Pe.set(t,o)),o.then(n,()=>n(!1))}function Nt(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===Ee,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Ho(t,e,n,l,o){let i=0;for(const r of t)e.has(r.id)||ds(r,n,l,o)&&i++;return i}function Uo(t,e,n,l){const o=P.c(8),{org:i}=Q(),r=zo(i.id,t,e,n);let a;o[0]!==n?(a=Oo(n),o[0]=n,o[1]=a):a=o[1];const d=a,[c,u]=G.useState({isFetching:!1,isProbing:!1,identity:r,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==r&&u({isFetching:!1,isProbing:!1,identity:r,probeSubscribedIdentity:null,serverHasMore:null});const m=wn(),{threads:f,hasMore:x}=Xt(),p=Le(f,t,e,n),g=Ro(p,x),h=Fo(p,x),b=Jt();if(c.identity===r&&c.serverHasMore===null){const N=h??Ct(r);N!==void 0&&u({isFetching:!1,isProbing:!1,identity:r,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:N})}!d&&c.identity===r&&c.serverHasMore===null&&h===null&&Ct(r)===void 0&&c.probeSubscribedIdentity!==r&&(u(N=>N.identity===r?{...N,isProbing:!0,probeSubscribedIdentity:r}:N),Bo(r,async()=>{const N=_t(t,e,0,n,1),S=await b.call("COLLECTION_THREADS_LIST",N),{totalCount:w}=Nt(S),k=Le(m.threads.get(),t,e,n);return w===void 0?!1:St(k,w)},N=>{u(S=>S.identity!==r?S:{...S,isProbing:!1,serverHasMore:N})}));const _=async function(){if(c.isFetching||c.isProbing||d)return;const S=r;u(w=>w.identity===S?{...w,isFetching:!0}:w);try{const w=Le(f,t,e,n),k=_t(t,e,w,n,Ee),I=await cs(()=>b.call("COLLECTION_THREADS_LIST",k)),{items:M,hasMore:z,totalCount:A}=Nt(I),$=new Set(f.map(Wo)),R=Ho(M,$,t,e,n),E=w;m.mergeThreads(M),u(O=>{if(O.identity!==S)return O;let D;return A!==void 0?D=St(E+R,A):D=M.length===0||R===0?!1:z,Go(S,D),{...O,isFetching:!1,serverHasMore:D}})}catch(w){const k=w,I=k instanceof Error?k.message:String(k);ce.error(`Could not load more tasks: ${I}`),u(M=>M.identity===S?{...M,isFetching:!1}:M)}},v=c.isFetching||c.isProbing,y=!d&&!v&&Lo(g,c.serverHasMore);let C;return o[2]!==v||o[3]!==_||o[4]!==y||o[5]!==c.isProbing||o[6]!==c.serverHasMore?(C={hasMore:y,isFetching:v,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:_},o[2]=v,o[3]=_,o[4]=y,o[5]=c.isProbing,o[6]=c.serverHasMore,o[7]=C):C=o[7],C}function Wo(t){return t.id}function Ko(t){const e=P.c(20),{status:n,threads:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:a,filters:d}=t,{isFetching:c,isProbing:u,loadMore:m,hasMore:f,serverHasMore:x}=Uo("status",n,d),[p,g]=G.useState(!1);!p&&l.length===0&&x===!0&&!c&&!u&&(g(!0),queueMicrotask(()=>{m()}));let h;if(e[0]!==o||e[1]!==a||e[2]!==d||e[3]!==r||e[4]!==i||e[5]!==l){let _;e[7]!==o||e[8]!==a||e[9]!==d||e[10]!==r||e[11]!==i?(_=v=>s.jsx(is,{task:v,isActive:o===v.id,onClick:()=>i(v),onArchive:a&&v.created_by===d.currentUserId?()=>r(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[7]=o,e[8]=a,e[9]=d,e[10]=r,e[11]=i,e[12]=_):_=e[12],h=l.map(_),e[0]=o,e[1]=a,e[2]=d,e[3]=r,e[4]=i,e[5]=l,e[6]=h}else h=e[6];let b;e[13]!==f||e[14]!==c||e[15]!==m?(b=(f||c)&&s.jsx(rs,{onClick:()=>{m()},isFetching:c,indented:!0}),e[13]=f,e[14]=c,e[15]=m,e[16]=b):b=e[16];let j;return e[17]!==h||e[18]!==b?(j=s.jsxs(s.Fragment,{children:[h,b]}),e[17]=h,e[18]=b,e[19]=j):j=e[19],j}function Vo(t){const e=P.c(36),{status:n,threads:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:a,filters:d}=t,c=Fn[n],u=c.icon,[m,f]=$o(`status-${n}`,!1);let x;e[0]!==m||e[1]!==f?(x=function(){f(!m)},e[0]=m,e[1]=f,e[2]=x):x=e[2];const p=x;let g;e[3]!==p?(g=S=>{S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),p())},e[3]=p,e[4]=g):g=e[4];let h;e[5]!==u||e[6]!==c.iconClassName?(h=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(u,{size:12,className:c.iconClassName})}),e[5]=u,e[6]=c.iconClassName,e[7]=h):h=e[7];let b;e[8]!==m?(b=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:m?s.jsx(Bn,{size:14}):s.jsx(Hn,{size:14})}),e[8]=m,e[9]=b):b=e[9];let j;e[10]!==h||e[11]!==b?(j=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[h,b]}),e[10]=h,e[11]=b,e[12]=j):j=e[12];let _;e[13]!==c.label?(_=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=_):_=e[14];let v;e[15]!==l.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:l.length})}),e[15]=l.length,e[16]=v):v=e[16];let y;e[17]!==m||e[18]!==p||e[19]!==g||e[20]!==j||e[21]!==_||e[22]!==v?(y=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":m,onClick:p,onKeyDown:g,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,_,v]}),e[17]=m,e[18]=p,e[19]=g,e[20]=j,e[21]=_,e[22]=v,e[23]=y):y=e[23];let C;e[24]!==o||e[25]!==a||e[26]!==m||e[27]!==d||e[28]!==r||e[29]!==i||e[30]!==n||e[31]!==l?(C=m&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(Ko,{status:n,threads:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:a,filters:d})}),e[24]=o,e[25]=a,e[26]=m,e[27]=d,e[28]=r,e[29]=i,e[30]=n,e[31]=l,e[32]=C):C=e[32];let N;return e[33]!==y||e[34]!==C?(N=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[y,C]}),e[33]=y,e[34]=C,e[35]=N):N=e[35],N}function kt(t){const e=P.c(38),{threads:n,groupBy:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,filters:a,hasMore:d,isFetchingMore:c,onLoadMore:u,filtersActive:m}=t;if(n.length===0&&!d&&!c){let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Dn,{className:"size-6 opacity-60"}),e[0]=h):h=e[0];const b=m?"No chats match your filters":"No chats yet";let j;return e[1]!==b?(j=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[h,s.jsx("p",{className:"text-sm",children:b})]}),e[1]=b,e[2]=j):j=e[2],j}const f=n.length>1||d;if(l==="status"){let h;if(e[3]!==o||e[4]!==f||e[5]!==a||e[6]!==r||e[7]!==i||e[8]!==n){let j;e[10]!==o||e[11]!==f||e[12]!==a||e[13]!==r||e[14]!==i?(j=_=>s.jsx(Vo,{status:_.status,threads:_.threads,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:f,filters:a},_.status),e[10]=o,e[11]=f,e[12]=a,e[13]=r,e[14]=i,e[15]=j):j=e[15],h=Po(n).map(j),e[3]=o,e[4]=f,e[5]=a,e[6]=r,e[7]=i,e[8]=n,e[9]=h}else h=e[9];let b;return e[16]!==h?(b=s.jsx(s.Fragment,{children:h}),e[16]=h,e[17]=b):b=e[17],b}let x;if(e[18]!==o||e[19]!==f||e[20]!==a||e[21]!==r||e[22]!==i||e[23]!==n){let h;e[25]!==o||e[26]!==f||e[27]!==a||e[28]!==r||e[29]!==i?(h=b=>s.jsx(is,{task:b,isActive:o===b.id,onClick:()=>i(b),onArchive:f&&b.created_by===a.currentUserId?()=>r(b):void 0,showAutomationBadge:!!b.trigger_id,showAgentIcon:!0},b.id),e[25]=o,e[26]=f,e[27]=a,e[28]=r,e[29]=i,e[30]=h):h=e[30],x=n.map(h),e[18]=o,e[19]=f,e[20]=a,e[21]=r,e[22]=i,e[23]=n,e[24]=x}else x=e[24];let p;e[31]!==d||e[32]!==c||e[33]!==u?(p=(d||c)&&s.jsx(rs,{onClick:u,isFetching:c}),e[31]=d,e[32]=c,e[33]=u,e[34]=p):p=e[34];let g;return e[35]!==x||e[36]!==p?(g=s.jsxs(s.Fragment,{children:[x,p]}),e[35]=x,e[36]=p,e[37]=g):g=e[37],g}function qo(t,e,n){if(!n)return;const l=t.findIndex(o=>o.id===e);if(l!==-1){for(let o=l+1;o<t.length;o++){const i=t[o];if(i?.created_by===n)return i}for(let o=l-1;o>=0;o--){const i=t[o];if(i?.created_by===n)return i}}}function wt(t){const e=P.c(17),{label:n,onClick:l,active:o,children:i}=t,[r,a]=G.useState(!1);let d,c,u,m;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>a(!0),c=()=>a(!1),u=()=>a(!0),m=()=>a(!1),e[0]=d,e[1]=c,e[2]=u,e[3]=m):(d=e[0],c=e[1],u=e[2],m=e[3]);const f=o&&"bg-sidebar-accent text-foreground";let x;e[4]!==f?(x=B("md:size-[34px] rounded-lg",f),e[4]=f,e[5]=x):x=e[5];let p;e[6]!==i||e[7]!==n||e[8]!==l||e[9]!==x?(p=s.jsx(je,{asChild:!0,children:s.jsx(we,{"aria-label":n,onClick:l,onPointerEnter:d,onPointerLeave:c,onFocus:u,onBlur:m,className:x,children:i})}),e[6]=i,e[7]=n,e[8]=l,e[9]=x,e[10]=p):p=e[10];let g;e[11]!==n?(g=s.jsx(ve,{side:"bottom",children:n}),e[11]=n,e[12]=g):g=e[12];let h;return e[13]!==r||e[14]!==p||e[15]!==g?(h=s.jsxs(ye,{open:r,children:[p,g]}),e[13]=r,e[14]=p,e[15]=g,e[16]=h):h=e[16],h}function Fe(t){const e=P.c(13),{label:n,value:l,onChange:o,options:i}=t;let r;e[0]!==n?(r=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=r):r=e[1];let a;e[2]!==o?(a=m=>m&&o(m),e[2]=o,e[3]=a):a=e[3];let d;e[4]!==i?(d=i.map(Yo),e[4]=i,e[5]=d):d=e[5];let c;e[6]!==a||e[7]!==d||e[8]!==l?(c=s.jsx(Nn,{type:"single",size:"sm",value:l,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]=l,e[9]=c):c=e[9];let u;return e[10]!==r||e[11]!==c?(u=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r,c]}),e[10]=r,e[11]=c,e[12]=u):u=e[12],u}function Yo(t){return s.jsxs(Cn,{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 ms({onNavigate:t}={}){const e=U(),{data:n}=Ne.useSession(),l=n?.user?.id,{org:o}=Q(),i=Rt({connectionId:Lt,orgId:o.id,orgSlug:o.slug}),r=rt(o.id).id,a=kn(),{threads:d,hasMore:c,isFetchingMore:u,fetchNextPage:m}=Xt(),f=d.filter(T=>!T.hidden),{hide:x,setScope:p}=Mn(),g=ae(),{setTaskId:h,createNewTask:b}=Qt(),j=Ss({strict:!1}),_=Tt({strict:!1}),v=j.taskId??null,y=_.virtualmcpid??d.find(T=>T.id===v)?.virtual_mcp_id??null,C=()=>{t?.()},N=[...f].sort((T,F)=>(F.updated_at??"").localeCompare(T.updated_at??"")),[S,w]=G.useState("all"),[k,I]=G.useState("flat"),[M,z]=ze("sidebar-threads-scope-all",!1),[A,$]=G.useState(!1),[R,E]=G.useState(!1),O={type:S,member:"mine",currentUserId:l??null},D={};M||(D.created_by="me"),p(D);const L=T=>l?T.filter(F=>F.created_by===l):[],K=T=>S==="automation"?T.filter(F=>!!F.trigger_id):S==="manual"?T.filter(F=>!F.trigger_id):T,Z=L(N),ne=K(Z),de=K(N),oe=M?de:ne,ee=T=>{if(l&&T.created_by&&T.created_by!==l)return;const F=T.id===v;if(x(T.id),Tn(T.id),!F)return;const W=qo(oe,T.id,l);C(),W?h(W.id,W.virtual_mcp_id):g({to:"/$org",params:{org:o.slug}})},le=T=>{C(),h(T.id,T.virtual_mcp_id)},me=async T=>{try{const F=await i.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:T,limit:1,offset:0}});return((F.structuredContent??F).items?.length??0)===0}catch{return!1}},Se=async()=>{const T=y??r;q("sidebar_new_thread_clicked",{virtual_mcp_id:T});const F=Z.find(W=>W.virtual_mcp_id===T&&W.title==="New chat");if(F&&await me(F.id)){C(),h(F.id,T);return}C(),b(T)},{state:ue,isMobile:fe,toggleSidebar:pe}=_e();if(ue==="collapsed"&&!fe){const T=rt(o.id),F=new Map((a??[]).map(H=>[H.id,H])),W=H=>(H?F.get(H):void 0)??(H===r?T:void 0);return s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(Vs,{orgParam:o.slug,side:"right",align:"start",trigger:s.jsx(Y,{tooltip:o.name,children:s.jsx(qs,{org:o,size:"sm"})})})}),s.jsxs(J,{className:"mt-2 min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[s.jsx(V,{children:s.jsx(Y,{"aria-label":e("sidebar.taskGroupsList.toggleSidebar"),tooltip:e("sidebar.taskGroupsList.toggleSidebar"),onClick:pe,children:s.jsx(Ft,{size:16})})}),oe.map(H=>{const re=W(H.virtual_mcp_id);return s.jsx(V,{children:s.jsx(Y,{"aria-label":H.title||e("sidebar.taskGroupsList.newChat"),tooltip:H.title||e("sidebar.taskGroupsList.newChat"),isActive:H.id===v,onClick:()=>le(H),children:s.jsx(ke,{icon:re?.icon??null,name:re?.title??"Agent",size:"xs"})})},H.id)})]})]})}const X=k!=="flat"||S!=="all"||M===!0,he=s.jsxs(Gt,{children:[s.jsxs(ye,{children:[s.jsx(je,{asChild:!0,children:s.jsx(Bt,{asChild:!0,children:s.jsxs(we,{"aria-label":e("sidebar.taskGroupsList.filterChats"),active:X,className:"md:size-[34px] rounded-lg",children:[s.jsx(Sn,{size:16}),X&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"})]})})}),s.jsx(ve,{side:"bottom",children:e("sidebar.taskGroupsList.filterChats")})]}),s.jsxs(Ht,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[s.jsx(Fe,{label:e("sidebar.taskGroupsList.filterView"),value:k,onChange:T=>{q("tasks_panel_group_by_changed",{to_value:T}),I(T)},options:[{value:"flat",label:e("sidebar.taskGroupsList.viewList"),icon:s.jsx(dn,{size:13})},{value:"status",label:e("sidebar.taskGroupsList.viewStatus"),icon:s.jsx(mn,{size:13})}]}),s.jsx(Fe,{label:e("sidebar.taskGroupsList.filterType"),value:S,onChange:T=>{q("tasks_panel_filter_changed",{to_value:T}),w(T)},options:[{value:"all",label:e("sidebar.taskGroupsList.typeAll")},{value:"manual",label:e("sidebar.taskGroupsList.typeChats")},{value:"automation",label:e("sidebar.taskGroupsList.typeAuto")}]}),s.jsx(Fe,{label:e("sidebar.taskGroupsList.filterScope"),value:M?"team":"mine",onChange:T=>z(T==="team"),options:[{value:"mine",label:e("sidebar.taskGroupsList.scopeMine")},{value:"team",label:e("sidebar.taskGroupsList.scopeTeam")}]})]})]}),te=T=>s.jsx(Ut,{delayDuration:300,children:s.jsxs("div",{className:B("shrink-0 flex items-center justify-between",T?"h-10":"h-10 md:h-[34px] mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!T&&s.jsx(es,{className:"md:size-[34px] rounded-lg"}),he]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(wt,{label:e("sidebar.taskGroupsList.searchChats"),onClick:()=>{q("tasks_panel_search_opened"),E(!0),$(!0)},children:s.jsx(un,{size:16})}),s.jsx(wt,{label:e("sidebar.taskGroupsList.newChat"),onClick:()=>{Se()},children:s.jsx(fn,{size:16})})]})]})});return fe?s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[te(!0),s.jsx(jt,{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(kt,{threads:oe,groupBy:k,activeTaskId:v,onSelectTask:le,onArchiveTask:ee,filters:O,hasMore:c,isFetchingMore:u,onLoadMore:()=>{m()},filtersActive:X})}),R&&s.jsx(vt,{open:A,onOpenChange:$})]}):s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[te(!1),s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(jt,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(kt,{threads:oe,groupBy:k,activeTaskId:v,onSelectTask:le,onArchiveTask:ee,filters:O,hasMore:c,isFetchingMore:u,onLoadMore:()=>{m()},filtersActive:X})})}),R&&s.jsx(vt,{open:A,onOpenChange:$})]})}const Xo=5,Qo=[{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 us(){const t=P.c(3),{state:e}=_e();if(e==="collapsed"){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:Xo}).map(el)}),t[0]=o):o=t[0],o}let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=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(se,{className:"size-6 rounded-md"}),s.jsx(se,{className:"size-6 rounded-md"}),s.jsx(se,{className:"size-6 rounded-md"})]}),s.jsx(se,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[n,s.jsx("div",{className:"flex flex-col gap-0.5",children:Qo.map(Jo)})]}),t[2]=l):l=t[2],l}function Jo(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(se,{className:"size-5 rounded-full shrink-0"}),s.jsx(se,{className:B("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(Zo)})]},e)}function Zo(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(se,{className:"h-3 flex-1 rounded-sm"})},e)}function el(t,e){return s.jsx(se,{className:"size-10 rounded-lg mx-auto"},e)}function tl(){const t=P.c(2);if(nt()){let l;return t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Be,{showName:!0}),t[0]=l):l=t[0],l}let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs(s.Fragment,{children:[s.jsx(Be,{}),s.jsx(st,{})]}),t[1]=n):n=t[1],n}function sl(){const t=P.c(5),e=ss();let n,l;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ko,{}),l=s.jsx(tl,{}),t[0]=n,t[1]=l):(n=t[0],l=t[1]);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Xe,{children:s.jsx(G.Suspense,{fallback:s.jsx(us,{}),children:s.jsx(ms,{})})}),t[2]=o):o=t[2];let i;return t[3]!==e?(i=s.jsx(ts,{children:s.jsx(ls,{sections:e,footer:n,header:l,additionalContent:o})}),t[3]=e,t[4]=i):i=t[4],i}function nl(t){const e=P.c(8),{onClose:n}=t,l=ss();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(wo,{}),e[0]=o):o=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(us,{}),e[1]=i):i=e[1];let r;e[2]!==n?(r=s.jsx(Xe,{children:s.jsx(G.Suspense,{fallback:i,children:s.jsx(ms,{onNavigate:n})})}),e[2]=n,e[3]=r):r=e[3];let a;return e[4]!==n||e[5]!==l||e[6]!==r?(a=s.jsx(ts,{children:s.jsx(io,{sections:l,onClose:n,footer:o,additionalContent:r})}),e[4]=n,e[5]=l,e[6]=r,e[7]=a):a=e[7],a}const ol="sidebar.open";function ll(){const t=P.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ns,{}),t[0]=e):e=t[0],e}function Mr(){const t=P.c(37),e=$t(),n=nt();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[0]=l):l=t[0];const{connect:o,siteUrl:i}=Tt(l),r=o==="1",[a,d]=ze(ol,!1),{width:c,wrapperRef:u,onStartResize:m,resetWidth:f}=Jn(),x=e;let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(es,{}),t[1]=p):p=t[1];let g;t[2]!==n?(g=!n&&s.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:s.jsx(st,{})}),t[2]=n,t[3]=g):g=t[3];let h,b,j,_,v;t[4]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(qe,{}),b=s.jsx(xe.TogglesSlot,{}),j=s.jsx(xe.TabsSlot,{className:"shrink-0"}),_=s.jsx(xe.CenterSlot,{}),v=s.jsx(xe.RightSlot,{}),t[4]=h,t[5]=b,t[6]=j,t[7]=_,t[8]=v):(h=t[4],b=t[5],j=t[6],_=t[7],v=t[8]);let y;t[9]!==g?(y=s.jsx(xe.Header,{className:"grid-cols-1 px-1",children:s.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[p,g,h,b,j,_,v]})}),t[9]=g,t[10]=y):y=t[10];const C=y;let N;t[11]===Symbol.for("react.memo_cache_sentinel")?(N={background:"transparent",containerType:"inline-size"},t[11]=N):N=t[11];let S;t[12]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Ms,{className:"flex flex-col min-h-0",style:N,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(G.Suspense,{fallback:s.jsx(ll,{}),children:s.jsx(Cs,{})})})})}),t[12]=S):S=t[12];const w=S,k=x&&C,I=`${c}px`;let M;t[13]!==I?(M={"--sidebar-width":I,"--sidebar-width-icon":"3.125rem"},t[13]=I,t[14]=M):M=t[14];const z=M;let A;t[15]!==e||t[16]!==m||t[17]!==f?(A=!e&&s.jsxs(s.Fragment,{children:[s.jsx(sl,{}),s.jsx(Yn,{onPointerDown:m,onDoubleClick:f})]}),t[15]=e,t[16]=m,t[17]=f,t[18]=A):A=t[18];let $;t[19]!==z||t[20]!==A||t[21]!==u?($=s.jsxs(Is,{ref:u,className:"flex-1 bg-sidebar relative min-h-0",style:z,children:[A,w]}),t[19]=z,t[20]=A,t[21]=u,t[22]=$):$=t[22];let R;t[23]!==e?(R=e&&s.jsx(En,{renderSidebar:il}),t[23]=e,t[24]=R):R=t[24];let E;t[25]!==i||t[26]!==r?(E=r&&s.jsx(Un,{siteUrl:i}),t[25]=i,t[26]=r,t[27]=E):E=t[27];let O;t[28]!==k||t[29]!==$||t[30]!==R||t[31]!==E?(O=s.jsx(yn,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[k,$,R,E]})}),t[28]=k,t[29]=$,t[30]=R,t[31]=E,t[32]=O):O=t[32];let D;return t[33]!==d||t[34]!==a||t[35]!==O?(D=s.jsx(In,{children:s.jsx(xe.Provider,{children:s.jsx(Ts,{open:a,onOpenChange:d,children:O})})}),t[33]=d,t[34]=a,t[35]=O,t[36]=D):D=t[36],D}function il(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(nl,{onClose:e})})})}export{Mr as default};
|
|
1
|
+
import{c as P,d as ae,F as Q,b as U,G as fs,j as s,B as be,r as G,E as Xe,H as ps,v as Mt,a as Ne,x as hs,K as It,e as it,q,I as ze,m as B,J as xs,t as ce,M as gs,P as bs,L as js,n as vs,R as ys,k as _s,f as Ss,u as Tt,O as Cs,U as Ns}from"./index-B5pAcdCj.js";import{u as _e,S as Qe,a as Je,b as J,c as Y,d as V,e as Pt,f as ks,g as At,h as ws,i as Ge,j as Ms,k as Is,l as Ts}from"./sidebar-Cv557HRI.js";import{u as $t}from"./use-mobile-BWrDGidp.js";import{C as Ps,p as Re,s as As,b as $s,S as zs,d as Os,e as Es,c as Ds,n as Rs}from"./self-tool-result-BYAMrGkc.js";import{f as Ls,b as Ze,e as et,g as Fs,d as zt,h as Ot,a as Et}from"./dialog-DgPEwnKb.js";import{f as Gs}from"./tab-id-BijBBRwE.js";import{C as Bs,W as Dt,g as Hs,u as Rt,S as Lt,a as rt}from"./use-mcp-client-CFH86W63.js";import{i as tt}from"./ArrowRight-KW3xq1r6.js";import{S as se}from"./skeleton-DvYV-OU_.js";import{i as Ft}from"./LayoutLeft-CbYbxxcX.js";import{O as Be,A as st,u as Us,a as Ws,g as Ks,b as Vs,c as qs}from"./use-deco-credits-BLfvb2mQ.js";import{T as we}from"./toolbar-icon-button-D1K93Ut2.js";import{P as Gt,a as Bt,b as Ht}from"./popover-BsG-Ut0C.js";import{D as Ys,a as Xs,b as Qs}from"./drawer-CVvfaKnS.js";import{A as He}from"./avatar-CAlKFgYv.js";import{T as je,a as ve,b as Ut,c as ye}from"./tooltip-sTtjDvoo.js";import{a as Ue}from"./Copy01-6Lk3T5kb.js";import{n as Js,i as Zs}from"./Globe01-B3eOB-bI.js";import{i as en}from"./ZoomOut-B4I1BQI_.js";import{n as tn}from"./LinkExternal01-CORYkI7c.js";import{i as at}from"./LogOut01-wWv0KF8i.js";import{i as We}from"./Monitor01-C3jWkuS8.js";import{n as sn,a as nn}from"./Sun-DL5_VVPF.js";import{a as Oe}from"./Settings02-B5bpoiG8.js";import{i as on}from"./Shield01-DdEEjcd8.js";import{t as Wt,a as ln,i as rn,b as ct,c as an,d as cn,e as Kt,A as ke,s as dn,f as mn,g as un,h as fn}from"./agent-icon-CVTpL47E.js";import{a as pn}from"./Users03-WL_LA7La.js";import{u as hn}from"./use-deployment-admin-DxQGqHiC.js";import"./index-DNYodYcq.js";import{a as Vt}from"./XCircle-CyI4fk4M.js";import{a as xn}from"./ZapSquare-DmF34u5V.js";import{I as qt}from"./invite-member-dialog-BUKGJx85.js";import{u as dt}from"./use-copy-CODIBpYX.js";import{i as Ke}from"./Check-rFuMW35j.js";import{m as gn,u as bn,c as jn}from"./use-api-keys-D8dgJYvw.js";import{u as vn,C as yn}from"./chat-context-CkIYHDAo.js";import{v as _n,C as mt}from"./connect-desktop-dialog-43RgE8kU.js";import{u as nt}from"./use-organization-settings-BZVys_CJ.js";import{i as Sn}from"./FilterLines-DI_Qm1qr.js";import{T as Cn,a as Nn}from"./toggle-group-DWZBcpKM.js";import{u as Yt,a as kn}from"./use-virtual-mcp-Tg-eDvSu.js";import{u as wn,a as Xt,b as Mn,T as In}from"./hooks-Bk5QuAXL.js";import{u as Qt,f as Tn}from"./shell-layout-CIdA6eed.js";import{C as Pn,a as An,b as $n,c as zn,d as On}from"./command-BeyKUDBs.js";import{u as Jt}from"./studio-tools-BuOVhTAA.js";import{i as Zt}from"./Zap-CbGxXZqE.js";import{S as es,M as En}from"./shell-controls-DX4t6dyA.js";import{n as Dn}from"./Stars02-C4BXaIW2.js";import{g as Rn,u as Ln,S as Fn}from"./use-clock-tick-pfKuMtst.js";import{a as Gn}from"./format-time-BnbuEtat.js";import{t as Bn}from"./ChevronDown-D48jTswz.js";import{i as Hn}from"./ChevronRight-LyFia1m2.js";import{S as ts}from"./use-navigate-to-agent-CeEInzVl.js";import{T as xe}from"./toolbar-DBqlqzIw.js";import"./X-BOD96Sav.js";import"./integration-icon-DoUJ97wM.js";import"./Tool02-D3ImSqnS.js";import"./CheckCircle-DRPVedxI.js";import"./companions-core-CCXnzcJC.js";import"./extract-connection-data-C3b1P4MK.js";import"./github-repo-scope-DjMZbiKa.js";import"./form-DkQE4eVe.js";import"./label-3zDA4sob.js";import"./input-BdNp94xl.js";import"./Eye-DQ8_2da9.js";import"./use-debounced-value-zMBLHFuc.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./useQueries-ezDKal5n.js";import"./authenticate-and-persist-oauth-Dd_EJZaU.js";import"./mcp-oauth-BSqmznxk.js";import"./auth-DSO-QxMv.js";import"./ArrowUpRight-WNzzQ_3i.js";import"./Plus-DITXLV6z.js";import"./SearchMd-b92Qgt9y.js";import"./XClose-Bafb0lXd.js";import"./alert-dialog-vzxsz7Ne.js";import"./use-registry-app-mTYX03DA.js";import"./use-mcp-tools-Dgke_qxb.js";import"./github-repo-picker-D7UG54M6.js";import"./collection-search-Ctfh-qXp.js";import"./use-connection-n1ELT1mr.js";import"./reusable-new-chat-CouMjkYR.js";import"./connection-card-CctJljKT.js";import"./use-registry-connections-B9Mr8mO2.js";import"./useInfiniteQuery-DkWmKdoR.js";import"./use-infinite-scroll-B3Us0FOa.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-eyAPH6o3.js";import"./card-DN0OMeD8.js";import"./select-CWeHkbd3.js";import"./ChevronUp-Bf993jF8.js";import"./textarea-BiTWgoYg.js";import"./Star01-DAVevbnE.js";import"./connection-form-helpers-BisAHqq1.js";import"./Trash01-LLStDuc3.js";import"./collection-tabs-CXALICVQ.js";import"./badge-BtX_u9Ik.js";import"./useSuspenseInfiniteQuery-CoNmOb3b.js";import"./use-ai-providers-C8qA53zS.js";import"./User01-CD3D25HA.js";import"./AlertCircle-BgL3YyuU.js";import"./Tool01-KoLvuxqs.js";import"./ArrowUp-R6RJmaXD.js";import"./TrendUp01-BZX0N7yA.js";import"./DotsVertical-IM9-cL94.js";import"./Globe04-4yBmV3D1.js";import"./SwitchHorizontal01-BS092iWr.js";import"./HardDrive-4DIbsS2x.js";import"./Image01-CCt0OnVG.js";import"./Key01-CE5ANePO.js";import"./Package-aTPkrhbY.js";import"./Palette-75tVOLKn.js";import"./Play-CyFg0Xnr.js";import"./SearchLg-D7Ui27Oz.js";import"./Stars01-C03S5tVj.js";import"./Upload01-DSslfT87.js";import"./Users01-Cer51we5.js";import"./use-org-auth-client-wPL3_F1w.js";import"./use-organization-roles-DkPj52in.js";import"./autosend-DRl8LNUl.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-BcQN2EhC.js";import"./decopilot-sse-pool-BBLfaSrg.js";import"./required-auth-layout-D9l0Xiy5.js";import"./use-org-sso-CLEffSXU.js";import"./index-BeF0PLGE.js";import"./differenceInSeconds-NQ4PDo0z.js";function Un(t){const e=P.c(22),{siteUrl:n}=t,l=ae(),{org:o}=Q(),i=U();let r;e[0]!==l||e[1]!==o.id||e[2]!==o.slug?(r=()=>{localStorage.setItem(fs.sidebarOpen(),JSON.stringify(!1)),l({to:"/$org/$taskId",params:{org:o.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:Hs(o.id),main:Gs(Dt.COMMERCE_DISCOVERY(o.id),Bs),sidepanel:0}})},e[0]=l,e[1]=o.id,e[2]=o.slug,e[3]=r):r=e[3];const a=r;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ls,{className:"bg-black/15 backdrop-blur-sm"}),e[4]=d):d=e[4];let c;e[5]!==i?(c=i("routes.commerceOnboarding.connectModal.dialogTitle"),e[5]=i,e[6]=c):c=e[6];let u;e[7]!==c?(u=s.jsx(Ze,{className:"sr-only",children:c}),e[7]=c,e[8]=u):u=e[8];let m;e[9]!==a||e[10]!==i?(m=()=>s.jsxs("div",{className:"grid gap-4 p-6",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:i("routes.commerceOnboarding.connectModal.loadError")}),s.jsxs(be,{type:"button",size:"xl",className:"w-full",onClick:a,children:[i("routes.commerceOnboarding.connectModal.continueButton"),s.jsx(tt,{size:18})]})]}),e[9]=a,e[10]=i,e[11]=m):m=e[11];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ps,{}),e[12]=f):f=e[12];let x;e[13]!==a||e[14]!==n?(x=s.jsx(G.Suspense,{fallback:f,children:s.jsx(qn,{siteUrlFromUrl:n,onComplete:a})}),e[13]=a,e[14]=n,e[15]=x):x=e[15];let p;e[16]!==m||e[17]!==x?(p=s.jsx(Xe,{fallback:m,children:x}),e[16]=m,e[17]=x,e[18]=p):p=e[18];let g;return e[19]!==u||e[20]!==p?(g=s.jsx(et,{open:!0,children:s.jsxs(Fs,{children:[d,s.jsxs(ps,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:Vn,onPointerDownOutside:Kn,onInteractOutside:Wn,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:[u,p]})]})}),e[19]=u,e[20]=p,e[21]=g):g=e[21],g}function Wn(t){return t.preventDefault()}function Kn(t){return t.preventDefault()}function Vn(t){return t.preventDefault()}function qn({siteUrlFromUrl:t,onComplete:e}){const n=U(),[l]=Mt(),{org:o}=Q(),{data:i}=Ne.useSession(),r=Dt.COMMERCE_DISCOVERY(o.id),a=Rt({connectionId:Lt,orgId:o.id,orgSlug:o.slug}),c=hs({queryKey:It.commerceDiscoveryConnection(o.id,r),queryFn:async()=>{const y=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:r}});return Re(y)},retry:!1}).data.item,u=typeof c?.metadata?.siteUrl=="string"?c.metadata.siteUrl:void 0,m=t||u,f=As(m),[x,p]=G.useState(!0),[g,h]=G.useState(null),b=it({mutationFn:async y=>Re(await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:y}})),retry:!1}),j=it({mutationFn:async y=>Re(await a.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:y}})),retry:!1}),_=$s({siteUrl:m,email:i?.user?.email,locale:l.language}),v=async()=>{h(null),q("commerce_onboarding_open_report_clicked",{domain:f??void 0,organization_id:o.id});const y=m?Rs(m):null;if(y?.ok)try{let C=await j.mutateAsync(y.value);if(C.triggered||(q("commerce_onboarding_run_reclaim",{domain:f??void 0,organization_id:o.id,reason:C.reason??"not_upgraded"}),await b.mutateAsync(y.value),C=await j.mutateAsync(y.value)),!C.triggered){q("commerce_onboarding_run_failed",{domain:f??void 0,organization_id:o.id,error:C.reason??"not_triggered"}),h(n("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(C){q("commerce_onboarding_run_failed",{domain:f??void 0,organization_id:o.id,error:C instanceof Error?C.message:String(C)}),h(n("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()};return s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col lg:flex-row",children:[s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 p-4 lg:gap-6 lg:bg-sidebar lg:p-10",children:[f?s.jsx(zs,{host:f}):null,s.jsx(Os,{org:o,cdConnectionId:r,siteUrl:m,onReadinessChange:p}),s.jsxs("div",{className:"flex shrink-0 flex-col gap-3",children:[s.jsx(Es,{href:_,orgId:o.id,className:"lg:hidden"}),g?s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:g}):null,s.jsxs(be,{type:"button",size:"xl",className:"w-full rounded-2xl text-base font-medium whitespace-normal h-auto py-3",onClick:()=>{v()},disabled:j.isPending||!x,children:[j.isPending?n("routes.commerceOnboarding.connectModal.openingReport"):n(x?"routes.commerceOnboarding.connectModal.viewFullReport":"routes.commerceOnboarding.connectModal.connectToolToContinue"),!j.isPending&&x?s.jsx(tt,{size:18}):null]})]})]}),s.jsx("aside",{className:"hidden lg:flex lg:w-[380px] lg:shrink-0 lg:items-center lg:justify-center lg:overflow-y-auto lg:border-l lg:border-border lg:bg-muted",children:s.jsx(Ds,{href:_,orgId:o.id})})]})}function Yn(t){const e=P.c(11),{onPointerDown:n,onDoubleClick:l}=t,o=U(),{state:i,isMobile:r}=_e();if(r||i==="collapsed")return null;let a;e[0]!==o?(a=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=a):a=e[1];let d;e[2]!==o?(d=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=d):d=e[3];let c,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={left:"var(--sidebar-width)"},u=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]=u):(c=e[4],u=e[5]);let m;return e[6]!==l||e[7]!==n||e[8]!==a||e[9]!==d?(m=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":a,title:d,onPointerDown:n,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:c,children:u}),e[6]=l,e[7]=n,e[8]=a,e[9]=d,e[10]=m):m=e[10],m}const ot=240,Xn=400,Qn="sidebar.width";function Ce(t){return Math.max(ot,Math.min(Xn,t))}function Jn(){const t=P.c(11),[e,n]=ze(Qn,Zn),l=G.useRef(null);let o;t[0]!==n||t[1]!==e?(o=u=>{u.preventDefault();const m=u.clientX,f=Ce(e),x=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),p=x?Array.from(x.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const b of p)b.style.transition="none";const g=b=>{const j=Ce(f+(b.clientX-m));x?.style.setProperty("--sidebar-width",`${j}px`)},h=b=>{const j=Ce(f+(b.clientX-m));n(j);for(const _ of p)_.style.transition="";window.removeEventListener("pointermove",g),window.removeEventListener("pointerup",h),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",g),window.addEventListener("pointerup",h)},t[0]=n,t[1]=e,t[2]=o):o=t[2];const i=o;let r;t[3]!==n?(r=()=>{n(ot)},t[3]=n,t[4]=r):r=t[4];const a=r;let d;t[5]!==e?(d=Ce(e),t[5]=e,t[6]=d):d=t[6];let c;return t[7]!==i||t[8]!==a||t[9]!==d?(c={width:d,wrapperRef:l,onStartResize:i,resetWidth:a},t[7]=i,t[8]=a,t[9]=d,t[10]=c):c=t[10],c}function Zn(t){return typeof t=="number"?Ce(t):ot}function ss(){return[]}function ns(t){const e=P.c(3),{children:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=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]=l):l=e[0];let o;return e[1]!==n?(o=s.jsxs(Qe,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[l,s.jsx(Je,{children:s.jsx(J,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=o):o=e[2],o}function os(t){const e=P.c(18),{item:n}=t,{isMobile:l,setOpenMobile:o}=_e();let i;e[0]!==l||e[1]!==n||e[2]!==o?(i=()=>{q("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:l}),n.onClick?.(),l&&o(!1)},e[0]=l,e[1]=n,e[2]=o,e[3]=i):i=e[3];const r=i,a=n.key,d=n.isActive&&"z-10";let c;e[4]!==d?(c=B(d),e[4]=d,e[5]=c):c=e[5];let u;e[6]!==n.label?(u=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=u):u=e[7];let m;e[8]!==r||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==u?(m=s.jsxs(Y,{onClick:r,isActive:n.isActive,tooltip:n.label,children:[n.icon,u]}),e[8]=r,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=u,e[13]=m):m=e[13];let f;return e[14]!==n.key||e[15]!==c||e[16]!==m?(f=s.jsx(V,{className:c,children:m},a),e[14]=n.key,e[15]=c,e[16]=m,e[17]=f):f=e[17],f}function eo(t){const e=P.c(12),{section:n}=t;switch(n.type){case"divider":{let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Pt,{className:"my-2"}),e[0]=l):l=e[0],l}case"spacer":{let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1"}),e[1]=l):l=e[1],l}case"group":{const l=n.group.label,o=n.group.defaultExpanded;let i;e[2]!==n.group.items?(i=n.group.items.map(so),e[2]=n.group.items,e[3]=i):i=e[3];let r;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==i?(r=s.jsx(ns,{label:l,defaultExpanded:o,children:i}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=i,e[7]=r):r=e[7],r}case"items":{let l;e[8]!==n.items?(l=n.items.map(to),e[8]=n.items,e[9]=l):l=e[9];let o;return e[10]!==l?(o=s.jsx(Qe,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Je,{children:s.jsx(J,{className:"gap-1.5",children:l})})}),e[10]=l,e[11]=o):o=e[11],o}case"custom":return n.content}}function to(t){return s.jsx(os,{item:t},t.key)}function so(t){return s.jsx(os,{item:t},t.key)}function no(t){const e=P.c(17),{sections:n,footer:l,additionalContent:o,header:i,variant:r,contentClassName:a}=t,d=r===void 0?"sidebar":r;let c;e[0]!==i?(c=i&&s.jsx(ks,{className:"sidebar-titlebar wco-drag shrink-0 h-12 flex flex-row items-center px-2 py-0 group-data-[collapsible=icon]/sidebar:hidden",children:i}),e[0]=i,e[1]=c):c=e[1];let u;e[2]!==a?(u=B("flex flex-col flex-1 px-2 pb-2 gap-0.5",a),e[2]=a,e[3]=u):u=e[3];let m;e[4]!==n?(m=n.map(oo),e[4]=n,e[5]=m):m=e[5];let f;e[6]!==o?(f=o&&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:o}),e[6]=o,e[7]=f):f=e[7];let x;e[8]!==u||e[9]!==m||e[10]!==f?(x=s.jsxs(At,{className:u,children:[m,f]}),e[8]=u,e[9]=m,e[10]=f,e[11]=x):x=e[11];let p;return e[12]!==l||e[13]!==c||e[14]!==x||e[15]!==d?(p=s.jsxs(ws,{variant:d,children:[c,x,l]}),e[12]=l,e[13]=c,e[14]=x,e[15]=d,e[16]=p):p=e[16],p}function oo(t,e){return s.jsx(eo,{section:t},e)}function ls(t){const e=P.c(2);let n;return e[0]!==t?(n=s.jsx(no,{...t}),e[0]=t,e[1]=n):n=e[1],n}ls.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(se,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function ut(t){const e=P.c(18),{item:n,onClose:l}=t,o=n.isActive&&"z-10";let i;e[0]!==o?(i=B(o),e[0]=o,e[1]=i):i=e[1];let r;e[2]!==n||e[3]!==l?(r=()=>{n.onClick?.(),l()},e[2]=n,e[3]=l,e[4]=r):r=e[4];let a;e[5]!==n.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=a):a=e[6];let d;e[7]!==n.label?(d=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=d):d=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==r||e[12]!==a||e[13]!==d?(c=s.jsxs(Y,{onClick:r,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,d]}),e[9]=n.isActive,e[10]=n.label,e[11]=r,e[12]=a,e[13]=d,e[14]=c):c=e[14];let u;return e[15]!==i||e[16]!==c?(u=s.jsx(V,{className:i,children:c}),e[15]=i,e[16]=c,e[17]=u):u=e[17],u}function lo(t){const e=P.c(18),{section:n,onClose:l}=t;switch(n.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Pt,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=n.group.label,i=n.group.defaultExpanded;let r;if(e[2]!==l||e[3]!==n.group.items){let d;e[5]!==l?(d=c=>s.jsx(ut,{item:c,onClose:l},c.key),e[5]=l,e[6]=d):d=e[6],r=n.group.items.map(d),e[2]=l,e[3]=n.group.items,e[4]=r}else r=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==r?(a=s.jsx(ns,{label:o,defaultExpanded:i,children:r}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=r,e[10]=a):a=e[10],a}case"items":{let o;if(e[11]!==l||e[12]!==n.items){let r;e[14]!==l?(r=a=>s.jsx(ut,{item:a,onClose:l},a.key),e[14]=l,e[15]=r):r=e[15],o=n.items.map(r),e[11]=l,e[12]=n.items,e[13]=o}else o=e[13];let i;return e[16]!==o?(i=s.jsx(Qe,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Je,{children:s.jsx(J,{className:"gap-1.5",children:o})})}),e[16]=o,e[17]=i):i=e[17],i}case"custom":return n.content}}function io(t){const e=P.c(27),{sections:n,onClose:l,footer:o,additionalContent:i}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Be,{}),e[0]=r):r=e[0];let a;e[1]!==l?(a=s.jsx(st,{onNavigate:l}),e[1]=l,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=U();let u;e[4]!==c?(u=c("sidebar.navigationMobile.closeSidebar"),e[4]=c,e[5]=u):u=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ft,{size:16}),e[6]=m):m=e[6];let f;e[7]!==l||e[8]!==u?(f=s.jsx(we,{onClick:l,"aria-label":u,children:m}),e[7]=l,e[8]=u,e[9]=f):f=e[9];let x;e[10]!==a||e[11]!==f?(x=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[r,a,d,f]}),e[10]=a,e[11]=f,e[12]=x):x=e[12];let p;if(e[13]!==l||e[14]!==n){let j;e[16]!==l?(j=(_,v)=>s.jsx(lo,{section:_,onClose:l},v),e[16]=l,e[17]=j):j=e[17],p=n.map(j),e[13]=l,e[14]=n,e[15]=p}else p=e[15];let g;e[18]!==i?(g=i&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:i}),e[18]=i,e[19]=g):g=e[19];let h;e[20]!==g||e[21]!==p?(h=s.jsxs(At,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[p,g]}),e[20]=g,e[21]=p,e[22]=h):h=e[22];let b;return e[23]!==o||e[24]!==h||e[25]!==x?(b=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[x,h,o]}),e[23]=o,e[24]=h,e[25]=x,e[26]=b):b=e[26],b}function ge(t){const e=P.c(26),{item:n,onClose:l}=t;let o;e[0]!==n.className?(o=B("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",n.className),e[0]=n.className,e[1]=o):o=e[1];const i=o;if(n.href){const u=n.external?"_blank":void 0,m=n.external?"noopener noreferrer":void 0;let f;e[2]!==n.icon?(f=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[2]=n.icon,e[3]=f):f=e[3];let x;e[4]!==n.label?(x=s.jsx("span",{className:"flex-1",children:n.label}),e[4]=n.label,e[5]=x):x=e[5];let p;return e[6]!==i||e[7]!==n.href||e[8]!==l||e[9]!==u||e[10]!==m||e[11]!==f||e[12]!==x?(p=s.jsxs("a",{href:n.href,target:u,rel:m,className:i,onClick:l,children:[f,x]}),e[6]=i,e[7]=n.href,e[8]=l,e[9]=u,e[10]=m,e[11]=f,e[12]=x,e[13]=p):p=e[13],p}let r;e[14]!==n||e[15]!==l?(r=()=>{n.onClick?.(),l()},e[14]=n,e[15]=l,e[16]=r):r=e[16];let a;e[17]!==n.icon?(a=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[17]=n.icon,e[18]=a):a=e[18];let d;e[19]!==n.label?(d=s.jsx("span",{className:"flex-1",children:n.label}),e[19]=n.label,e[20]=d):d=e[20];let c;return e[21]!==i||e[22]!==r||e[23]!==a||e[24]!==d?(c=s.jsxs("button",{type:"button",onClick:r,className:i,children:[a,d]}),e[21]=i,e[22]=r,e[23]=a,e[24]=d,e[25]=c):c=e[25],c}function ro(){const t=P.c(4),e=U();let n;t[0]!==e?(n=e("common.accountPopover.impersonating"),t[0]=e,t[1]=n):n=t[1];let l;return t[2]!==n?(l=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:n}),t[2]=n,t[3]=l):l=t[3],l}function ft(t){const e=P.c(38),{user:n,userImage:l,isImpersonating:o,isMobile:i}=t,r=U(),a=i?"py-4 border-b border-border":"py-3 mx-1 mt-1";let d;e[0]!==a?(d=B("flex items-center gap-3 px-4",a),e[0]=a,e[1]=d):d=e[1];const c=n?.name??"U";let u;e[2]!==c||e[3]!==l?(u=s.jsx(He,{url:l,fallback:c,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=c,e[3]=l,e[4]=u):u=e[4];let m;e[5]!==r||e[6]!==n?.name?(m=n?.name??r("common.accountPopover.defaultUserName"),e[5]=r,e[6]=n?.name,e[7]=m):m=e[7];let f;e[8]!==m?(f=s.jsx("p",{className:"text-sm font-medium truncate",children:m}),e[8]=m,e[9]=f):f=e[9];let x;e[10]!==o?(x=o&&s.jsx(ro,{}),e[10]=o,e[11]=x):x=e[11];let p;e[12]!==f||e[13]!==x?(p=s.jsxs("div",{className:"flex items-center gap-2",children:[f,x]}),e[12]=f,e[13]=x,e[14]=p):p=e[14];const g=n?.email;let h;e[15]!==g?(h=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:g}),e[15]=g,e[16]=h):h=e[16];let b;e[17]!==h||e[18]!==p?(b=s.jsxs("div",{className:"flex-1 min-w-0",children:[p,h]}),e[17]=h,e[18]=p,e[19]=b):b=e[19];let j;e[20]!==r||e[21]!==n?(j=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(()=>{ce.success(r("common.accountPopover.userIdCopied"))})},e[20]=r,e[21]=n,e[22]=j):j=e[22];let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Ue,{size:14}),e[23]=_):_=e[23];let v;e[24]!==j?(v=s.jsx(je,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:_})}),e[24]=j,e[25]=v):v=e[25];let y;e[26]!==r?(y=r("common.accountPopover.copyUserId"),e[26]=r,e[27]=y):y=e[27];let C;e[28]!==y?(C=s.jsx(ve,{side:"right",children:s.jsx("p",{className:"text-xs",children:y})}),e[28]=y,e[29]=C):C=e[29];let N;e[30]!==v||e[31]!==C?(N=s.jsx(Ut,{delayDuration:300,children:s.jsxs(ye,{children:[v,C]})}),e[30]=v,e[31]=C,e[32]=N):N=e[32];let S;return e[33]!==b||e[34]!==N||e[35]!==d||e[36]!==u?(S=s.jsxs("div",{className:d,children:[u,b,N]}),e[33]=b,e[34]=N,e[35]=d,e[36]=u,e[37]=S):S=e[37],S}function pt(t){const e=P.c(35),{themeOptions:n,preferences:l,setPreferences:o,isMobile:i}=t,r=U(),a=i?"size-8":"size-7",d=i?"px-3 py-3":"px-2 py-1.5";let c;e[0]!==d?(c=B("flex items-center justify-between border-t border-border/50",d),e[0]=d,e[1]=c):c=e[1];let u;if(e[2]!==a||e[3]!==l.theme||e[4]!==o||e[5]!==n){let y;e[7]!==a||e[8]!==l.theme||e[9]!==o?(y=C=>{const{value:N,icon:S,label:w}=C;return s.jsx("button",{type:"button","aria-label":w,onClick:()=>o(k=>({...k,theme:N})),className:B(a,"rounded-md flex items-center justify-center transition-colors",l.theme===N?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:S},N)},e[7]=a,e[8]=l.theme,e[9]=o,e[10]=y):y=e[10],u=n.map(y),e[2]=a,e[3]=l.theme,e[4]=o,e[5]=n,e[6]=u}else u=e[6];let m;e[11]!==u?(m=s.jsx("div",{className:"flex items-center gap-0.5",children:u}),e[11]=u,e[12]=m):m=e[12];let f;e[13]!==l.enableSounds||e[14]!==r?(f=l.enableSounds?r("common.accountPopover.disableSounds"):r("common.accountPopover.enableSounds"),e[13]=l.enableSounds,e[14]=r,e[15]=f):f=e[15];let x;e[16]!==o?(x=()=>o(ao),e[16]=o,e[17]=x):x=e[17];const p=l.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let g;e[18]!==a||e[19]!==p?(g=B(a,"rounded-md flex items-center justify-center transition-colors",p),e[18]=a,e[19]=p,e[20]=g):g=e[20];let h;e[21]!==l.enableSounds?(h=l.enableSounds?s.jsx(ln,{size:14}):s.jsx(rn,{size:14}),e[21]=l.enableSounds,e[22]=h):h=e[22];let b;e[23]!==f||e[24]!==x||e[25]!==g||e[26]!==h?(b=s.jsx("button",{type:"button","aria-label":f,onClick:x,className:g,children:h}),e[23]=f,e[24]=x,e[25]=g,e[26]=h,e[27]=b):b=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.113.0"]}),e[28]=j):j=e[28];let _;e[29]!==b?(_=s.jsxs("div",{className:"flex items-center gap-2",children:[b,j]}),e[29]=b,e[30]=_):_=e[30];let v;return e[31]!==_||e[32]!==c||e[33]!==m?(v=s.jsxs("div",{className:c,children:[m,_]}),e[31]=_,e[32]=c,e[33]=m,e[34]=v):v=e[34],v}function ao(t){return{...t,enableSounds:!t.enableSounds}}function ht(t){const e=P.c(54),{user:n,userImage:l,menuItems:o,signOutItem:i,stopImpersonatingItem:r,isImpersonating:a,themeOptions:d,preferences:c,setPreferences:u,close:m,isMobile:f}=t;if(f){let v;e[0]!==a||e[1]!==n||e[2]!==l?(v=s.jsx(ft,{user:n,userImage:l,isImpersonating:a,isMobile:!0}),e[0]=a,e[1]=n,e[2]=l,e[3]=v):v=e[3];let y;if(e[4]!==m||e[5]!==o){let I;e[7]!==m?(I=M=>s.jsx(ge,{item:M,onClose:m},M.key),e[7]=m,e[8]=I):I=e[8],y=o.map(I),e[4]=m,e[5]=o,e[6]=y}else y=e[6];let C;e[9]!==m||e[10]!==r?(C=r&&s.jsx(ge,{item:r,onClose:m}),e[9]=m,e[10]=r,e[11]=C):C=e[11];let N;e[12]!==m||e[13]!==i?(N=s.jsx(ge,{item:i,onClose:m}),e[12]=m,e[13]=i,e[14]=N):N=e[14];let S;e[15]!==y||e[16]!==C||e[17]!==N?(S=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:[y,C,N]})}),e[15]=y,e[16]=C,e[17]=N,e[18]=S):S=e[18];let w;e[19]!==c||e[20]!==u||e[21]!==d?(w=s.jsx(pt,{themeOptions:d,preferences:c,setPreferences:u,isMobile:!0}),e[19]=c,e[20]=u,e[21]=d,e[22]=w):w=e[22];let k;return e[23]!==v||e[24]!==S||e[25]!==w?(k=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[v,S,w]}),e[23]=v,e[24]=S,e[25]=w,e[26]=k):k=e[26],k}let x;e[27]!==a||e[28]!==n||e[29]!==l?(x=s.jsx(ft,{user:n,userImage:l,isImpersonating:a,isMobile:!1}),e[27]=a,e[28]=n,e[29]=l,e[30]=x):x=e[30];let p;if(e[31]!==m||e[32]!==o){let v;e[34]!==m?(v=y=>s.jsx(ge,{item:y,onClose:m},y.key),e[34]=m,e[35]=v):v=e[35],p=o.map(v),e[31]=m,e[32]=o,e[33]=p}else p=e[33];let g;e[36]!==m||e[37]!==r?(g=r&&s.jsx(ge,{item:r,onClose:m}),e[36]=m,e[37]=r,e[38]=g):g=e[38];let h;e[39]!==m||e[40]!==i?(h=s.jsx(ge,{item:i,onClose:m}),e[39]=m,e[40]=i,e[41]=h):h=e[41];let b;e[42]!==p||e[43]!==g||e[44]!==h?(b=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[p,g,h]}),e[42]=p,e[43]=g,e[44]=h,e[45]=b):b=e[45];let j;e[46]!==c||e[47]!==u||e[48]!==d?(j=s.jsx(pt,{themeOptions:d,preferences:c,setPreferences:u,isMobile:!1}),e[46]=c,e[47]=u,e[48]=d,e[49]=j):j=e[49];let _;return e[50]!==x||e[51]!==b||e[52]!==j?(_=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[x,b,j]})}),e[50]=x,e[51]=b,e[52]=j,e[53]=_):_=e[53],_}function Ve(){const t=P.c(99),e=U(),{data:n}=Ne.useSession(),{org:l}=Q(),o=ae();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org",shouldThrow:!1},t[0]=i):i=t[0];const a=xs(i)?.params.org,[d,c]=Mt(),u=$t(),{isAdmin:m}=hn(),[f,x]=G.useState(!1),p=n?.user,g=p?.image,h=!!n?.session?.impersonatedBy;let b;t[1]===Symbol.for("react.memo_cache_sentinel")?(b=()=>x(!1),t[1]=b):b=t[1];const j=b;let _;t[2]!==e?(_=e("common.accountPopover.preferences"),t[2]=e,t[3]=_):_=t[3];let v;t[4]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Oe,{size:16}),t[4]=v):v=t[4];let y;t[5]!==o||t[6]!==a?(y=()=>{o({to:"/$org/settings/profile",params:{org:a??""}})},t[5]=o,t[6]=a,t[7]=y):y=t[7];let C;t[8]!==_||t[9]!==y?(C={key:"preferences",label:_,icon:v,onClick:y},t[8]=_,t[9]=y,t[10]=C):C=t[10];let N;t[11]!==l||t[12]!==o||t[13]!==e?(N=l?[{key:"install-app",label:e("common.accountPopover.addToHomeScreen"),icon:s.jsx(Js,{size:16}),onClick:()=>{o({to:"/$org/install",params:{org:l.slug}})}},{key:"connect-clients",label:"Connect to Agents",icon:s.jsx(tn,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:l.slug}})}}]:[],t[11]=l,t[12]=o,t[13]=e,t[14]=N):N=t[14];let S;t[15]!==e?(S=e("common.accountPopover.termsOfUse"),t[15]=e,t[16]=S):S=t[16];let w;t[17]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(en,{size:16}),t[17]=w):w=t[17];let k;t[18]!==S?(k={key:"terms",label:S,icon:w,href:"https://www.decocms.com/terms-of-use",external:!0},t[18]=S,t[19]=k):k=t[19];let I;t[20]!==e?(I=e("common.accountPopover.privacyPolicy"),t[20]=e,t[21]=I):I=t[21];let M;t[22]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(on,{size:16}),t[22]=M):M=t[22];let z;t[23]!==I?(z={key:"privacy",label:I,icon:M,href:"https://www.decocms.com/privacy-policy",external:!0},t[23]=I,t[24]=z):z=t[24];let A;t[25]!==e?(A=e("common.accountPopover.githubRepo"),t[25]=e,t[26]=A):A=t[26];let $;t[27]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(gs,{className:"w-4 h-4"}),t[27]=$):$=t[27];let R;t[28]!==A?(R={key:"github",label:A,icon:$,href:"https://github.com/decocms/studio",external:!0},t[28]=A,t[29]=R):R=t[29];let E;t[30]!==e?(E=e("common.accountPopover.community"),t[30]=e,t[31]=E):E=t[31];let O;t[32]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(pn,{size:16}),t[32]=O):O=t[32];let D;t[33]!==E?(D={key:"community",label:E,icon:O,href:"https://decocms.com/discord",external:!0},t[33]=E,t[34]=D):D=t[34];let L;t[35]!==e?(L=e("common.accountPopover.homepage"),t[35]=e,t[36]=L):L=t[36];let K;t[37]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(Zs,{size:16}),t[37]=K):K=t[37];let Z;t[38]!==L?(Z={key:"homepage",label:L,icon:K,href:"https://decocms.com",external:!0},t[38]=L,t[39]=Z):Z=t[39];let ne;t[40]!==m||t[41]!==o||t[42]!==e?(ne=m?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:s.jsx(Wt,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[40]=m,t[41]=o,t[42]=e,t[43]=ne):ne=t[43];let de;t[44]!==z||t[45]!==R||t[46]!==D||t[47]!==Z||t[48]!==ne||t[49]!==C||t[50]!==N||t[51]!==k?(de=[C,...N,k,z,R,D,Z,...ne],t[44]=z,t[45]=R,t[46]=D,t[47]=Z,t[48]=ne,t[49]=C,t[50]=N,t[51]=k,t[52]=de):de=t[52];const oe=de;let ee;t[53]!==e?(ee=e("common.accountPopover.signOut"),t[53]=e,t[54]=ee):ee=t[54];let le;t[55]===Symbol.for("react.memo_cache_sentinel")?(le=s.jsx(at,{size:16}),t[55]=le):le=t[55];let me;t[56]!==ee?(me={key:"logout",label:ee,icon:le,onClick:mo},t[56]=ee,t[57]=me):me=t[57];const Se=me;let ue;t[58]!==h||t[59]!==e?(ue=h?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:s.jsx(at,{size:16}),onClick:async()=>{const{error:lt}=await Ne.admin.stopImpersonating();if(lt){ce.error(lt.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[58]=h,t[59]=e,t[60]=ue):ue=t[60];const fe=ue;let pe;t[61]===Symbol.for("react.memo_cache_sentinel")?(pe=s.jsx(sn,{size:14}),t[61]=pe):pe=t[61];let ie;t[62]!==e?(ie=e("common.accountPopover.lightTheme"),t[62]=e,t[63]=ie):ie=t[63];let X;t[64]!==ie?(X={value:"light",icon:pe,label:ie},t[64]=ie,t[65]=X):X=t[65];let he;t[66]===Symbol.for("react.memo_cache_sentinel")?(he=s.jsx(nn,{size:14}),t[66]=he):he=t[66];let te;t[67]!==e?(te=e("common.accountPopover.darkTheme"),t[67]=e,t[68]=te):te=t[68];let T;t[69]!==te?(T={value:"dark",icon:he,label:te},t[69]=te,t[70]=T):T=t[70];let F;t[71]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(We,{size:14}),t[71]=F):F=t[71];let W;t[72]!==e?(W=e("common.accountPopover.systemTheme"),t[72]=e,t[73]=W):W=t[73];let H;t[74]!==W?(H={value:"system",icon:F,label:W},t[74]=W,t[75]=H):H=t[75];let re;t[76]!==X||t[77]!==T||t[78]!==H?(re=[X,T,H],t[76]=X,t[77]=T,t[78]=H,t[79]=re):re=t[79];const De=re;let Me;t[80]!==h||t[81]!==u||t[82]!==oe||t[83]!==d||t[84]!==c||t[85]!==Se||t[86]!==fe||t[87]!==De||t[88]!==p||t[89]!==g?(Me={user:p,userImage:g,menuItems:oe,signOutItem:Se,stopImpersonatingItem:fe,isImpersonating:h,themeOptions:De,preferences:d,setPreferences:c,close:j,isMobile:u},t[80]=h,t[81]=u,t[82]=oe,t[83]=d,t[84]=c,t[85]=Se,t[86]=fe,t[87]=De,t[88]=p,t[89]=g,t[90]=Me):Me=t[90];const Ie=Me;let Te;return t[91]!==h||t[92]!==u||t[93]!==f||t[94]!==Ie||t[95]!==e||t[96]!==p?.name||t[97]!==g?(Te=s.jsx(s.Fragment,{children:u?s.jsxs(Ys,{open:f,onOpenChange:x,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>x(!0),className:B("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",h&&"border-2 border-dashed border-warning"),children:[s.jsx(He,{url:g,fallback:p?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:p?.name??e("common.accountPopover.defaultAccountLabel")})]}),s.jsxs(Xs,{className:"h-[80dvh] p-0",children:[s.jsx(Qs,{className:"sr-only",children:e("common.accountPopover.account")}),s.jsx(ht,{...Ie})]})]}):s.jsxs(Gt,{open:f,onOpenChange:x,children:[s.jsx(Bt,{asChild:!0,children:s.jsxs(Y,{tooltip:p?.name??e("common.accountPopover.defaultAccountLabel"),className:B("rounded-md",h&&"border-2 border-dashed border-warning"),children:[s.jsx(He,{url:g,fallback:p?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:p?.name??e("common.accountPopover.defaultAccountLabel")})]})}),s.jsx(Ht,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:co,children:s.jsx(ht,{...Ie})})]})}),t[91]=h,t[92]=u,t[93]=f,t[94]=Ie,t[95]=e,t[96]=p?.name,t[97]=g,t[98]=Te):Te=t[98],Te}function co(t){return t.preventDefault()}function mo(){q("signed_out",{source:"account_popover"}),bs(),Ne.signOut()}const uo=["Browse and edit your Library files","Run your agents","Enable and call any MCP tool in this org"],fo="Connect: ";function po(){return typeof window>"u"?"unknown host":window.location.hostname}function ho(t){const e=P.c(45),{onClose:n}=t,{org:l}=Q();let o;e[0]!==l.slug?(o=gn(l.slug),e[0]=l.slug,e[1]=o):o=e[1];const i=o,r=bn(),[a,d]=G.useState(null),c=dt(),u=dt();let m;e[2]!==r||e[3]!==l.slug?(m=()=>{r.mutate({name:`${fo}Claude Code on ${po()}`,permissions:{"*":["*"]}},{onSuccess:R=>{const E=jn(l.slug,R.key);d(E),q("connect_studio_generate",{target:"claude-code"}),navigator.clipboard?.writeText(E).then(jo,bo)},onError:go})},e[2]=r,e[3]=l.slug,e[4]=m):m=e[4];const f=m;let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("span",{className:"size-8 rounded-lg bg-special/15 text-special flex items-center justify-center shrink-0",children:s.jsx(Vt,{size:17})}),e[5]=x):x=e[5];let p;e[6]!==l.name?(p=s.jsxs(Ze,{className:"flex items-center gap-2.5",children:[x,"Connect ",l.name," to Claude"]}),e[6]=l.name,e[7]=p):p=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Ot,{children:"Hand Claude this org's MCP endpoint. Once linked, Claude can:"}),e[8]=g):g=e[8];let h;e[9]!==p?(h=s.jsxs(Et,{children:[p,g]}),e[9]=p,e[10]=h):h=e[10];let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("ul",{className:"flex flex-col gap-2 text-sm",children:uo.map(xo)}),e[11]=b):b=e[11];let j;e[12]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ct,{size:15,className:"text-muted-foreground"}),e[12]=j):j=e[12];let _;e[13]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[j,"Claude Code",s.jsx("span",{className:"ml-auto text-[11px] font-medium text-special uppercase tracking-wide",children:"Recommended"})]}),e[13]=_):_=e[13];let v;e[14]!==a||e[15]!==c||e[16]!==r.isPending||e[17]!==f?(v=s.jsxs("section",{className:"rounded-xl border border-border bg-muted/30 p-4 flex flex-col gap-3",children:[_,a?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-lg border border-border bg-background p-3 max-h-32 overflow-y-auto",children:s.jsx("code",{className:"text-xs leading-relaxed break-all font-mono text-foreground/90 whitespace-pre-wrap",children:a})}),s.jsxs(be,{size:"sm",className:"gap-1.5 self-start",onClick:()=>{c.handleCopy(a),q("connect_studio_copy",{target:"claude-code"}),ce.success("Command copied — paste it in your terminal")},children:[c.copied?s.jsx(Ke,{size:14}):s.jsx(Ue,{size:14}),c.copied?"Copied":"Copy command"]}),s.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-warning/40 bg-warning/10 px-3 py-2",children:[s.jsx(Wt,{size:14,className:"text-warning shrink-0 mt-0.5"}),s.jsxs("p",{className:"text-xs leading-relaxed text-foreground/80",children:["No login step — this command embeds a"," ",s.jsx("span",{className:"font-medium text-foreground",children:"full-access token"}),". Treat it like a password; revoke it any time in Settings → Connect."]})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"One command, no browser login. We'll mint a scoped access token and embed it so Claude Code connects instantly."}),s.jsxs(be,{size:"sm",className:"gap-1.5 self-start",disabled:r.isPending,onClick:f,children:[s.jsx(ct,{size:14}),r.isPending?"Generating…":"Generate connect command"]})]})]}),e[14]=a,e[15]=c,e[16]=r.isPending,e[17]=f,e[18]=v):v=e[18];let y,C;e[19]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[s.jsx(an,{size:15,className:"text-muted-foreground"}),"Claude Desktop or claude.ai"]}),C=s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"Add a custom connector in Settings → Connectors and paste this URL. Claude signs in with OAuth on first use."}),e[19]=y,e[20]=C):(y=e[19],C=e[20]);let N;e[21]!==i?(N=s.jsx("code",{className:"text-xs flex-1 min-w-0 truncate font-mono text-foreground/90",children:i}),e[21]=i,e[22]=N):N=e[22];let S;e[23]!==i||e[24]!==u?(S=()=>{u.handleCopy(i),q("connect_studio_copy",{target:"claude-connector"})},e[23]=i,e[24]=u,e[25]=S):S=e[25];let w;e[26]!==u.copied?(w=u.copied?s.jsx(Ke,{size:14}):s.jsx(Ue,{size:14}),e[26]=u.copied,e[27]=w):w=e[27];let k;e[28]!==S||e[29]!==w?(k=s.jsx(be,{variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"Copy URL",onClick:S,children:w}),e[28]=S,e[29]=w,e[30]=k):k=e[30];let I;e[31]!==N||e[32]!==k?(I=s.jsxs("section",{className:"flex flex-col gap-2.5",children:[y,C,s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-muted/30 pl-3 pr-1.5 py-1.5 min-w-0",children:[N,k]})]}),e[31]=N,e[32]=k,e[33]=I):I=e[33];let M;e[34]!==l.slug?(M={org:l.slug},e[34]=l.slug,e[35]=M):M=e[35];let z;e[36]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(tt,{size:12}),e[36]=z):z=e[36];let A;e[37]!==n||e[38]!==M?(A=s.jsx("div",{className:"flex items-center border-t border-border pt-3",children:s.jsx(be,{asChild:!0,variant:"link",size:"sm",className:"px-0 text-xs gap-1",children:s.jsxs(js,{to:"/$org/settings/connect",params:M,onClick:n,children:["More clients & API keys ",z]})})}),e[37]=n,e[38]=M,e[39]=A):A=e[39];let $;return e[40]!==v||e[41]!==I||e[42]!==A||e[43]!==h?($=s.jsxs("div",{className:"flex flex-col gap-4 min-w-0",children:[h,b,v,I,A]}),e[40]=v,e[41]=I,e[42]=A,e[43]=h,e[44]=$):$=e[44],$}function xo(t){return s.jsxs("li",{className:"flex items-center gap-2.5",children:[s.jsx("span",{className:"size-4 rounded-full bg-special/15 text-special flex items-center justify-center shrink-0",children:s.jsx(Ke,{size:11,strokeWidth:3})}),s.jsx("span",{className:"text-foreground",children:t})]},t)}function go(t){return ce.error(t.message)}function bo(){return ce.success("Command ready — copy it below")}function jo(){return ce.success("Command copied — paste it in your terminal")}function vo(t){const e=P.c(6),{open:n,onOpenChange:l}=t;let o;e[0]!==l?(o=s.jsx(zt,{className:"max-w-lg gap-4",children:s.jsx(ho,{onClose:()=>l(!1)})}),e[0]=l,e[1]=o):o=e[1];let i;return e[2]!==l||e[3]!==n||e[4]!==o?(i=s.jsx(et,{open:n,onOpenChange:l,children:o}),e[2]=l,e[3]=n,e[4]=o,e[5]=i):i=e[5],i}function qe(t){const e=P.c(50),{variant:n}=t===void 0?{}:t,l=n===void 0?"icon":n,o=U(),i=vn(),[r,a]=G.useState(!1);let d,c;if(e[0]!==i.capabilities||e[1]!==i.hostname||e[2]!==i.machineId||e[3]!==i.online||e[4]!==o){const v=_n(i.capabilities,o);let y;e[7]!==i.online||e[8]!==o?(y=i.online?o("header.linkedDesktopIndicator.desktopLinked"):o("header.linkedDesktopIndicator.connectDesktop"),e[7]=i.online,e[8]=o,e[9]=y):y=e[9],d=y,c=i.online?s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[s.jsx("span",{className:"font-medium",children:i.hostname??i.machineId??o("header.linkedDesktopIndicator.desktopLinked")}),s.jsx("span",{className:"text-muted-foreground",children:v.length>0?o("header.linkedDesktopIndicator.availableCapabilities",{capabilities:v.join(", ")}):o("header.linkedDesktopIndicator.noCliAgents")})]}):s.jsx("span",{className:"text-xs",children:o("header.linkedDesktopIndicator.desktopDisconnected")}),e[0]=i.capabilities,e[1]=i.hostname,e[2]=i.machineId,e[3]=i.online,e[4]=o,e[5]=d,e[6]=c}else d=e[5],c=e[6];const u=c;if(l==="full"){let v,y;e[10]===Symbol.for("react.memo_cache_sentinel")?(v=()=>a(!0),y=s.jsx(We,{}),e[10]=v,e[11]=y):(v=e[10],y=e[11]);let C;e[12]!==d?(C=s.jsx("span",{children:d}),e[12]=d,e[13]=C):C=e[13];let N;e[14]!==i.online?(N=i.online&&s.jsx("span",{className:"ml-auto size-2 rounded-full bg-success animate-pulse"}),e[14]=i.online,e[15]=N):N=e[15];let S;e[16]!==d||e[17]!==C||e[18]!==N?(S=s.jsx(je,{asChild:!0,children:s.jsxs(Y,{tooltip:d,onClick:v,children:[y,C,N]})}),e[16]=d,e[17]=C,e[18]=N,e[19]=S):S=e[19];let w;e[20]!==u?(w=s.jsx(ve,{side:"right",children:u}),e[20]=u,e[21]=w):w=e[21];let k;e[22]!==S||e[23]!==w?(k=s.jsxs(ye,{children:[S,w]}),e[22]=S,e[23]=w,e[24]=k):k=e[24];let I;e[25]!==r?(I=s.jsx(mt,{open:r,onOpenChange:a}),e[25]=r,e[26]=I):I=e[26];let M;return e[27]!==I||e[28]!==k?(M=s.jsxs(s.Fragment,{children:[k,I]}),e[27]=I,e[28]=k,e[29]=M):M=e[29],M}let m;e[30]===Symbol.for("react.memo_cache_sentinel")?(m=()=>a(!0),e[30]=m):m=e[30];let f;e[31]!==i.online||e[32]!==o?(f=i.online?o("header.linkedDesktopIndicator.desktopLinked"):o("header.linkedDesktopIndicator.connectYourDesktop"),e[31]=i.online,e[32]=o,e[33]=f):f=e[33];let x;e[34]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(We,{size:16}),e[34]=x):x=e[34];let p;e[35]!==i.online?(p=i.online&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[35]=i.online,e[36]=p):p=e[36];let g;e[37]!==f||e[38]!==p?(g=s.jsx(je,{asChild:!0,children:s.jsxs(we,{onClick:m,"aria-label":f,children:[x,p]})}),e[37]=f,e[38]=p,e[39]=g):g=e[39];let h;e[40]!==u?(h=s.jsx(ve,{side:"bottom",children:u}),e[40]=u,e[41]=h):h=e[41];let b;e[42]!==g||e[43]!==h?(b=s.jsxs(ye,{children:[g,h]}),e[42]=g,e[43]=h,e[44]=b):b=e[44];let j;e[45]!==r?(j=s.jsx(mt,{open:r,onOpenChange:a}),e[45]=r,e[46]=j):j=e[46];let _;return e[47]!==j||e[48]!==b?(_=s.jsxs(s.Fragment,{children:[b,j]}),e[47]=j,e[48]=b,e[49]=_):_=e[49],_}class yo extends G.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function _o(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function So(){const t=P.c(17),e=ae(),{org:n}=Q(),{hasDecoKey:l,balanceDollars:o}=Us();if(!l)return null;let i;t[0]!==o?(i=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=i):i=t[1];let r;t[2]!==o?(r=B(o!=null&&_o(o)),t[2]=o,t[3]=r):r=t[3];let a;t[4]!==e||t[5]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(cn,{}),t[7]=d):d=t[7];let c;t[8]!==o?(c=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=c):c=t[9];let u;t[10]!==c?(u=s.jsx("span",{children:c}),t[10]=c,t[11]=u):u=t[11];let m;return t[12]!==i||t[13]!==r||t[14]!==a||t[15]!==u?(m=s.jsx(J,{children:s.jsx(V,{children:s.jsxs(Y,{tooltip:i,className:r,onClick:a,children:[d,u]})})}),t[12]=i,t[13]=r,t[14]=a,t[15]=u,t[16]=m):m=t[16],m}function xt(){const t=P.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(yo,{children:s.jsx(G.Suspense,{fallback:null,children:s.jsx(So,{})})}),t[0]=e):e=t[0],e}function Co(){const t=P.c(14),e=U(),n=ae(),{org:l}=Q();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let i;t[2]!==n||t[3]!==l.slug?(i=()=>n({to:"/$org/settings",params:{org:l.slug}}),t[2]=n,t[3]=l.slug,t[4]=i):i=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Oe,{}),t[5]=r):r=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]!==o||t[11]!==i||t[12]!==d?(c=s.jsxs(Y,{tooltip:o,onClick:i,children:[r,d]}),t[10]=o,t[11]=i,t[12]=d,t[13]=c):c=t[13],c}function No(){const t=P.c(9),e=U(),n=ae(),{org:l}=Q();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let i;t[2]!==n||t[3]!==l.slug?(i=()=>n({to:"/$org/settings",params:{org:l.slug}}),t[2]=n,t[3]=l.slug,t[4]=i):i=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Oe,{size:15}),t[5]=r):r=t[5];let a;return t[6]!==o||t[7]!==i?(a=s.jsx("button",{type:"button","aria-label":o,onClick:i,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:r}),t[6]=o,t[7]=i,t[8]=a):a=t[8],a}function gt(){const t=P.c(33),e=U(),[n,l]=G.useState(!1),[o,i]=G.useState(!1);let r;t[0]!==e?(r=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=r):r=t[1];let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Kt,{}),t[2]=a):a=t[2];let d;t[3]!==e?(d=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=d):d=t[4];let c;t[5]!==d?(c=s.jsx("span",{children:d}),t[5]=d,t[6]=c):c=t[6];let u;t[7]!==r||t[8]!==c?(u=s.jsx(V,{children:s.jsx(qt,{trigger:s.jsxs(Y,{tooltip:r,children:[a,c]})})}),t[7]=r,t[8]=c,t[9]=u):u=t[9];let m;t[10]!==e?(m=e("sidebar.sidebarFooter.addConnection"),t[10]=e,t[11]=m):m=t[11];let f,x;t[12]===Symbol.for("react.memo_cache_sentinel")?(f=()=>l(!0),x=s.jsx(xn,{}),t[12]=f,t[13]=x):(f=t[12],x=t[13]);let p;t[14]!==e?(p=e("sidebar.sidebarFooter.addConnection"),t[14]=e,t[15]=p):p=t[15];let g;t[16]!==p?(g=s.jsx("span",{children:p}),t[16]=p,t[17]=g):g=t[17];let h;t[18]!==m||t[19]!==g?(h=s.jsx(V,{children:s.jsxs(Y,{tooltip:m,onClick:f,children:[x,g]})}),t[18]=m,t[19]=g,t[20]=h):h=t[20];let b;t[21]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(V,{children:s.jsxs(Y,{tooltip:"Connect to Claude",onClick:()=>{q("connect_studio_opened",{source:"sidebar_footer"}),i(!0)},children:[s.jsx(Vt,{}),s.jsx("span",{children:"Connect to Claude"})]})}),t[21]=b):b=t[21];let j;t[22]!==h||t[23]!==u?(j=s.jsxs(J,{className:"gap-0.5",children:[u,h,b]}),t[22]=h,t[23]=u,t[24]=j):j=t[24];let _;t[25]!==n?(_=s.jsx(Ws,{open:n,onOpenChange:l,mode:"browse"}),t[25]=n,t[26]=_):_=t[26];let v;t[27]!==o?(v=s.jsx(vo,{open:o,onOpenChange:i}),t[27]=o,t[28]=v):v=t[28];let y;return t[29]!==j||t[30]!==_||t[31]!==v?(y=s.jsxs(s.Fragment,{children:[j,_,v]}),t[29]=j,t[30]=_,t[31]=v,t[32]=y):y=t[32],y}function bt(){const t=P.c(10),e=U();let n;t[0]!==e?(n=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=n):n=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Kt,{}),t[2]=l):l=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let i;t[5]!==o?(i=s.jsx("span",{children:o}),t[5]=o,t[6]=i):i=t[6];let r;return t[7]!==n||t[8]!==i?(r=s.jsx(J,{className:"gap-0.5",children:s.jsx(V,{children:s.jsx(qt,{trigger:s.jsxs(Y,{tooltip:n,children:[l,i]})})})}),t[7]=n,t[8]=i,t[9]=r):r=t[9],r}function ko(){const t=P.c(19),{state:e}=_e(),n=e==="collapsed",l=nt(),o=!l;if(n){let u;t[0]!==l?(u=l?s.jsx(bt,{}):s.jsx(gt,{}),t[0]=l,t[1]=u):u=t[1];let m;t[2]!==o?(m=o&&s.jsx(xt,{}),t[2]=o,t[3]=m):m=t[3];let f;t[4]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(V,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(qe,{})})}),t[4]=f):f=t[4];let x;t[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(V,{children:s.jsx(Co,{})}),t[5]=x):x=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs(J,{children:[f,x,s.jsx(V,{children:s.jsx(Ve,{})})]}),t[6]=p):p=t[6];let g;return t[7]!==u||t[8]!==m?(g=s.jsxs(Ge,{className:"px-2 pb-3 gap-1",children:[u,m,p]}),t[7]=u,t[8]=m,t[9]=g):g=t[9],g}let i;t[10]!==l?(i=l?s.jsx(bt,{}):s.jsx(gt,{}),t[10]=l,t[11]=i):i=t[11];let r;t[12]!==o?(r=o&&s.jsx(xt,{}),t[12]=o,t[13]=r):r=t[13];let a;t[14]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(V,{children:s.jsx(qe,{variant:"full"})}),t[14]=a):a=t[14];let d;t[15]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(J,{className:"gap-0.5",children:[a,s.jsx(V,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Ve,{})}),s.jsx(No,{})]})})]}),t[15]=d):d=t[15];let c;return t[16]!==i||t[17]!==r?(c=s.jsxs(Ge,{className:"px-2 pb-3 gap-0.5",children:[i,r,d]}),t[16]=i,t[17]=r,t[18]=c):c=t[18],c}function wo(){const t=P.c(11),e=U(),n=ae(),{org:l}=Q(),{setOpenMobile:o}=_e();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(J,{children:s.jsx(V,{children:s.jsx(Ve,{})})})}),t[0]=i):i=t[0];let r;t[1]!==e?(r=e("sidebar.sidebarFooterMobile.settings"),t[1]=e,t[2]=r):r=t[2];let a;t[3]!==n||t[4]!==l.slug||t[5]!==o?(a=()=>{n({to:"/$org/settings",params:{org:l.slug}}),o(!1)},t[3]=n,t[4]=l.slug,t[5]=o,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Oe,{className:"size-4"}),t[7]=d):d=t[7];let c;return t[8]!==r||t[9]!==a?(c=s.jsx(Ge,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[i,s.jsx(we,{"aria-label":r,onClick:a,children:d})]})}),t[8]=r,t[9]=a,t[10]=c):c=t[10],c}function jt(t){const e=P.c(15),{className:n,wrapperClassName:l,children:o}=t,[i,r]=G.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=b=>{b&&r(b.scrollHeight>b.clientHeight+1)},e[0]=a):a=e[0];const d=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=b=>{const j=b.currentTarget;r(j.scrollHeight-j.scrollTop>j.clientHeight+1)},e[1]=c):c=e[1];const u=c;let m;e[2]!==l?(m=B("relative",l),e[2]=l,e[3]=m):m=e[3];let f;e[4]!==o||e[5]!==n?(f=s.jsx("div",{ref:d,onScroll:u,className:n,children:o}),e[4]=o,e[5]=n,e[6]=f):f=e[6];const x=i?"opacity-100":"opacity-0";let p;e[7]!==x?(p=B("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",x),e[7]=x,e[8]=p):p=e[8];let g;e[9]!==p?(g=s.jsx("div",{"aria-hidden":!0,className:p}),e[9]=p,e[10]=g):g=e[10];let h;return e[11]!==m||e[12]!==f||e[13]!==g?(h=s.jsxs("div",{className:m,children:[f,g]}),e[11]=m,e[12]=f,e[13]=g,e[14]=h):h=e[14],h}function Mo(t){const e=P.c(9),{virtualMcpId:n,size:l,showAutomationBadge:o}=t,i=l===void 0?"sm":l,r=U();let a;e[0]!==i||e[1]!==n?(a=n?s.jsx(Io,{virtualMcpId:n,size:i}):s.jsx(ke,{icon:null,name:"?",size:i}),e[0]=i,e[1]=n,e[2]=a):a=e[2];let d;e[3]!==o||e[4]!==r?(d=o&&s.jsx("span",{"aria-label":r("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(Zt,{size:10,className:"text-white"})}),e[3]=o,e[4]=r,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 Io(t){const e=P.c(6),{virtualMcpId:n,size:l}=t,o=Yt(n);if(!o){let a;return e[0]!==l?(a=s.jsx(ke,{icon:null,name:"?",size:l}),e[0]=l,e[1]=a):a=e[1],a}const i=o.icon??null;let r;return e[2]!==o.title||e[3]!==l||e[4]!==i?(r=s.jsx(ke,{icon:i,name:o.title,size:l}),e[2]=o.title,e[3]=l,e[4]=i,e[5]=r):r=e[5],r}function vt(t){const e=P.c(53),{open:n,onOpenChange:l}=t,[o,i]=G.useState(""),{org:r}=Q(),{setTaskId:a}=Qt(),d=Jt(),c=U();let u,m,f;e[0]!==r.id||e[1]!==o?(f=o.trim(),m=vs,u=It.globalSearch(r.id,f),e[0]=r.id,e[1]=o,e[2]=u,e[3]=m,e[4]=f):(u=e[2],m=e[3],f=e[4]);const x=n&&f.length>0;let p;e[5]!==d||e[6]!==f?(p=async()=>await d.call("GLOBAL_SEARCH",{query:f,limit:20}),e[5]=d,e[6]=f,e[7]=p):p=e[7];let g;e[8]!==u||e[9]!==x||e[10]!==p?(g={queryKey:u,enabled:x,queryFn:p,staleTime:1e4},e[8]=u,e[9]=x,e[10]=p,e[11]=g):g=e[11];const{data:h,isFetching:b}=m(g);let j;e[12]!==h?.items?(j=h?.items??[],e[12]=h?.items,e[13]=j):j=e[13];const _=j;let v;e[14]!==l?(v=L=>{L||i(""),l(L)},e[14]=l,e[15]=v):v=e[15];const y=v;let C;e[16]!==y||e[17]!==a?(C=L=>{y(!1),a(L.id,L.virtual_mcp_id??void 0)},e[16]=y,e[17]=a,e[18]=C):C=e[18];const N=C;let S;e[19]!==c?(S=c("tasksPanel.globalSearchDialog.title"),e[19]=c,e[20]=S):S=e[20];let w;e[21]!==S?(w=s.jsx(Ze,{children:S}),e[21]=S,e[22]=w):w=e[22];let k;e[23]!==c?(k=c("tasksPanel.globalSearchDialog.description"),e[23]=c,e[24]=k):k=e[24];let I;e[25]!==k?(I=s.jsx(Ot,{children:k}),e[25]=k,e[26]=I):I=e[26];let M;e[27]!==w||e[28]!==I?(M=s.jsxs(Et,{className:"sr-only",children:[w,I]}),e[27]=w,e[28]=I,e[29]=M):M=e[29];let z;e[30]!==c?(z=c("tasksPanel.globalSearchDialog.placeholder"),e[30]=c,e[31]=z):z=e[31];let A;e[32]!==o||e[33]!==z?(A=s.jsx($n,{value:o,onValueChange:i,placeholder:z}),e[32]=o,e[33]=z,e[34]=A):A=e[34];let $;e[35]!==N||e[36]!==b||e[37]!==_||e[38]!==c||e[39]!==f?($=f?b&&_.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c("tasksPanel.globalSearchDialog.searching")}):_.length===0?s.jsx(Pn,{children:c("tasksPanel.globalSearchDialog.noResults")}):_.map(L=>L.type==="thread"?s.jsxs(An,{value:`thread:${L.id}:${L.title}`,onSelect:()=>N(L),className:"gap-2.5",children:[s.jsx(Mo,{virtualMcpId:L.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:L.title||c("tasksPanel.globalSearchDialog.untitledChat")})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(L.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${L.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c("tasksPanel.globalSearchDialog.startTyping")}),e[35]=N,e[36]=b,e[37]=_,e[38]=c,e[39]=f,e[40]=$):$=e[40];let R;e[41]!==$?(R=s.jsx(zn,{children:$}),e[41]=$,e[42]=R):R=e[42];let E;e[43]!==A||e[44]!==R?(E=s.jsxs(On,{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:[A,R]}),e[43]=A,e[44]=R,e[45]=E):E=e[45];let O;e[46]!==M||e[47]!==E?(O=s.jsxs(zt,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[M,E]}),e[46]=M,e[47]=E,e[48]=O):O=e[48];let D;return e[49]!==y||e[50]!==n||e[51]!==O?(D=s.jsx(et,{open:n,onOpenChange:y,children:O}),e[49]=y,e[50]=n,e[51]=O,e[52]=D):D=e[52],D}function To(t){return t==="ephemeral"||t.startsWith("thread:")}function is(t){const e=P.c(45),{task:n,isActive:l,onClick:o,onArchive:i,showAutomationBadge:r,showAgentIcon:a,hideStatusIdle:d,indented:c}=t,u=U(),m=Rn(n.status),f=m.icon,x=n.metadata?.kind==="tool_call_run",p=Yt(x?void 0:n.virtual_mcp_id);let g;e[0]!==p?(g=Ks(p),e[0]=p,e[1]=g):g=e[1];const h=g;Ln(6e4);const b=r||!!n.trigger_id,j=n.id,_="button",v=0;let y;e[2]!==o?(y=K=>{K.target===K.currentTarget&&(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),o())},e[2]=o,e[3]=y):y=e[3];const C=c?"-ml-4 pl-6":"pl-[7px]",N=l?"bg-accent text-accent-foreground":"hover:bg-accent/60";let S;e[4]!==C||e[5]!==N?(S=B("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",C,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",N),e[4]=C,e[5]=N,e[6]=S):S=e[6];let w;e[7]!==x||e[8]!==a||e[9]!==p?.icon||e[10]!==p?.title?(w=a&&!x&&s.jsx(ke,{icon:p?.icon??null,name:p?.title??"?",size:"2xs"}),e[7]=x,e[8]=a,e[9]=p?.icon,e[10]=p?.title,e[11]=w):w=e[11];let k;e[12]!==b||e[13]!==u?(k=b&&s.jsx(Zt,{size:12,"aria-label":u("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-blue-500"}),e[12]=b,e[13]=u,e[14]=k):k=e[14];let I;e[15]!==u||e[16]!==n.title?(I=n.title||u("tasksPanel.taskRow.untitledTask"),e[15]=u,e[16]=n.title,e[17]=I):I=e[17];let M;e[18]!==I?(M=s.jsx("div",{className:"text-sm text-foreground truncate",children:I}),e[18]=I,e[19]=M):M=e[19];let z;e[20]!==k||e[21]!==M?(z=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[k,M]}),e[20]=k,e[21]=M,e[22]=z):z=e[22];let A;e[23]!==h||e[24]!==l||e[25]!==n.branch||e[26]!==n.updated_at?(A=n.updated_at&&s.jsxs("div",{className:B("flex items-center gap-1 text-[11px] min-w-0",l?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!To(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):h?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[h.owner,"/",h.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:Gn(new Date(n.updated_at))})]}),e[23]=h,e[24]=l,e[25]=n.branch,e[26]=n.updated_at,e[27]=A):A=e[27];let $;e[28]!==z||e[29]!==A?($=s.jsxs("div",{className:"flex-1 min-w-0",children:[z,A]}),e[28]=z,e[29]=A,e[30]=$):$=e[30];const R="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",E=!d&&s.jsx("span",{className:B("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",i&&"group-hover/row:opacity-0"),"aria-label":u("tasksPanel.taskRow.statusLabel",{status:m.label}),children:s.jsx(f,{size:14,className:B(m.iconClassName,n.status==="in_progress"&&"animate-spin")})});let O;e[31]!==i||e[32]!==u?(O=i&&s.jsxs(ye,{children:[s.jsx(je,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":u("tasksPanel.taskRow.archiveTask"),onClick:K=>{K.stopPropagation(),i()},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(ys,{size:14})})}),s.jsx(ve,{side:"right",children:u("tasksPanel.taskRow.archive")})]}),e[31]=i,e[32]=u,e[33]=O):O=e[33];let D;e[34]!==E||e[35]!==O?(D=s.jsxs("div",{className:R,children:[E,O]}),e[34]=E,e[35]=O,e[36]=D):D=e[36];let L;return e[37]!==o||e[38]!==$||e[39]!==D||e[40]!==y||e[41]!==S||e[42]!==w||e[43]!==n.id?(L=s.jsxs("div",{"data-task-id":j,role:_,tabIndex:v,onClick:o,onKeyDown:y,className:S,children:[w,$,D]}),e[37]=o,e[38]=$,e[39]=D,e[40]=y,e[41]=S,e[42]=w,e[43]=n.id,e[44]=L):L=e[44],L}const yt=["requires_action","in_progress","failed","expired","completed"];function Po(t){const e=new Map(yt.map(n=>[n,[]]));for(const n of t){const l=n.status??"completed";(e.get(l)??e.get("completed")).push(n)}return yt.map(n=>({status:n,threads:e.get(n)}))}const Ao="sidebar.group.expanded.";function $o(t,e){const n=P.c(3),[l,o]=ze(`${Ao}${t}`,e);let i;return n[0]!==l||n[1]!==o?(i=[l,o],n[0]=l,n[1]=o,n[2]=i):i=n[2],i}function rs(t){const e=P.c(18),{onClick:n,isFetching:l,indented:o}=t,i=U();let r;e[0]!==i?(r=i("sidebar.showMoreButton.ariaLabel"),e[0]=i,e[1]=r):r=e[1];const a=o?"-ml-4 pl-6 pr-2":"px-2";let d;e[2]!==a?(d=B("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]!==l?(c=l&&s.jsx(_s,{size:14,className:"animate-spin"}),e[4]=l,e[5]=c):c=e[5];let u;e[6]!==l||e[7]!==i?(u=i(l?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=l,e[7]=i,e[8]=u):u=e[8];let m;e[9]!==u?(m=s.jsx("span",{children:u}),e[9]=u,e[10]=m):m=e[10];let f;return e[11]!==l||e[12]!==n||e[13]!==r||e[14]!==d||e[15]!==c||e[16]!==m?(f=s.jsxs("button",{type:"button","aria-label":r,onClick:n,disabled:l,className:d,children:[c,m]}),e[11]=l,e[12]=n,e[13]=r,e[14]=d,e[15]=c,e[16]=m,e[17]=f):f=e[17],f}function zo(t,e,n,l){return[t,e,n,l.type,l.member,l.currentUserId??""].join("|")}function Oo(t){return t.member==="mine"&&!t.currentUserId}const as=4;let Ae=0;const Ye=[];function Eo(){for(;Ae<as&&Ye.length>0;){const t=Ye.shift();t&&t()}}function cs(t){return new Promise((e,n)=>{const l=()=>{Ae++,t().then(e,n).finally(()=>{Ae--,Eo()})};Ae<as?l():Ye.push(l)})}const Ee=10;function _t(t,e,n,l,o){const i={hidden:!1};l.member==="mine"&&l.currentUserId&&(i.created_by=l.currentUserId),l.type==="automation"&&(i.has_trigger=!0),l.type==="manual"&&(i.has_trigger=!1);const r={where:i,limit:o,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return r.status=e,r}function Do(t,e,n,l){let o=0;for(const i of t)ds(i,e,n,l)&&o++;return o}function Le(t,e,n,l){return Do(t,e,n,l)}function Ro(t,e){return!!(t>=Ee||t===0&&e)}function St(t,e){return t<e}function Lo(t,e){return e===!1?!1:e===!0?!0:t}function ds(t,e,n,l){return!(t.hidden||(t.status??"completed")!==n||l.member==="mine"&&l.currentUserId&&t.created_by!==l.currentUserId||l.type==="automation"&&!t.trigger_id||l.type==="manual"&&t.trigger_id)}const $e=new Map,Pe=new Map;function Fo(t,e){return e?t>=Ee?!0:null:!1}function Ct(t){return $e.get(t)}function Go(t,e){$e.set(t,e)}function Bo(t,e,n){const l=$e.get(t);if(l!==void 0){n(l);return}let o=Pe.get(t);o||(o=cs(e).then(i=>($e.set(t,i),Pe.delete(t),i)).catch(()=>(Pe.delete(t),Promise.reject(new Error("group probe failed")))),Pe.set(t,o)),o.then(n,()=>n(!1))}function Nt(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===Ee,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Ho(t,e,n,l,o){let i=0;for(const r of t)e.has(r.id)||ds(r,n,l,o)&&i++;return i}function Uo(t,e,n,l){const o=P.c(8),{org:i}=Q(),r=zo(i.id,t,e,n);let a;o[0]!==n?(a=Oo(n),o[0]=n,o[1]=a):a=o[1];const d=a,[c,u]=G.useState({isFetching:!1,isProbing:!1,identity:r,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==r&&u({isFetching:!1,isProbing:!1,identity:r,probeSubscribedIdentity:null,serverHasMore:null});const m=wn(),{threads:f,hasMore:x}=Xt(),p=Le(f,t,e,n),g=Ro(p,x),h=Fo(p,x),b=Jt();if(c.identity===r&&c.serverHasMore===null){const N=h??Ct(r);N!==void 0&&u({isFetching:!1,isProbing:!1,identity:r,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:N})}!d&&c.identity===r&&c.serverHasMore===null&&h===null&&Ct(r)===void 0&&c.probeSubscribedIdentity!==r&&(u(N=>N.identity===r?{...N,isProbing:!0,probeSubscribedIdentity:r}:N),Bo(r,async()=>{const N=_t(t,e,0,n,1),S=await b.call("COLLECTION_THREADS_LIST",N),{totalCount:w}=Nt(S),k=Le(m.threads.get(),t,e,n);return w===void 0?!1:St(k,w)},N=>{u(S=>S.identity!==r?S:{...S,isProbing:!1,serverHasMore:N})}));const _=async function(){if(c.isFetching||c.isProbing||d)return;const S=r;u(w=>w.identity===S?{...w,isFetching:!0}:w);try{const w=Le(f,t,e,n),k=_t(t,e,w,n,Ee),I=await cs(()=>b.call("COLLECTION_THREADS_LIST",k)),{items:M,hasMore:z,totalCount:A}=Nt(I),$=new Set(f.map(Wo)),R=Ho(M,$,t,e,n),E=w;m.mergeThreads(M),u(O=>{if(O.identity!==S)return O;let D;return A!==void 0?D=St(E+R,A):D=M.length===0||R===0?!1:z,Go(S,D),{...O,isFetching:!1,serverHasMore:D}})}catch(w){const k=w,I=k instanceof Error?k.message:String(k);ce.error(`Could not load more tasks: ${I}`),u(M=>M.identity===S?{...M,isFetching:!1}:M)}},v=c.isFetching||c.isProbing,y=!d&&!v&&Lo(g,c.serverHasMore);let C;return o[2]!==v||o[3]!==_||o[4]!==y||o[5]!==c.isProbing||o[6]!==c.serverHasMore?(C={hasMore:y,isFetching:v,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:_},o[2]=v,o[3]=_,o[4]=y,o[5]=c.isProbing,o[6]=c.serverHasMore,o[7]=C):C=o[7],C}function Wo(t){return t.id}function Ko(t){const e=P.c(20),{status:n,threads:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:a,filters:d}=t,{isFetching:c,isProbing:u,loadMore:m,hasMore:f,serverHasMore:x}=Uo("status",n,d),[p,g]=G.useState(!1);!p&&l.length===0&&x===!0&&!c&&!u&&(g(!0),queueMicrotask(()=>{m()}));let h;if(e[0]!==o||e[1]!==a||e[2]!==d||e[3]!==r||e[4]!==i||e[5]!==l){let _;e[7]!==o||e[8]!==a||e[9]!==d||e[10]!==r||e[11]!==i?(_=v=>s.jsx(is,{task:v,isActive:o===v.id,onClick:()=>i(v),onArchive:a&&v.created_by===d.currentUserId?()=>r(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[7]=o,e[8]=a,e[9]=d,e[10]=r,e[11]=i,e[12]=_):_=e[12],h=l.map(_),e[0]=o,e[1]=a,e[2]=d,e[3]=r,e[4]=i,e[5]=l,e[6]=h}else h=e[6];let b;e[13]!==f||e[14]!==c||e[15]!==m?(b=(f||c)&&s.jsx(rs,{onClick:()=>{m()},isFetching:c,indented:!0}),e[13]=f,e[14]=c,e[15]=m,e[16]=b):b=e[16];let j;return e[17]!==h||e[18]!==b?(j=s.jsxs(s.Fragment,{children:[h,b]}),e[17]=h,e[18]=b,e[19]=j):j=e[19],j}function Vo(t){const e=P.c(36),{status:n,threads:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:a,filters:d}=t,c=Fn[n],u=c.icon,[m,f]=$o(`status-${n}`,!1);let x;e[0]!==m||e[1]!==f?(x=function(){f(!m)},e[0]=m,e[1]=f,e[2]=x):x=e[2];const p=x;let g;e[3]!==p?(g=S=>{S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),p())},e[3]=p,e[4]=g):g=e[4];let h;e[5]!==u||e[6]!==c.iconClassName?(h=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(u,{size:12,className:c.iconClassName})}),e[5]=u,e[6]=c.iconClassName,e[7]=h):h=e[7];let b;e[8]!==m?(b=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:m?s.jsx(Bn,{size:14}):s.jsx(Hn,{size:14})}),e[8]=m,e[9]=b):b=e[9];let j;e[10]!==h||e[11]!==b?(j=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[h,b]}),e[10]=h,e[11]=b,e[12]=j):j=e[12];let _;e[13]!==c.label?(_=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=_):_=e[14];let v;e[15]!==l.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:l.length})}),e[15]=l.length,e[16]=v):v=e[16];let y;e[17]!==m||e[18]!==p||e[19]!==g||e[20]!==j||e[21]!==_||e[22]!==v?(y=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":m,onClick:p,onKeyDown:g,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,_,v]}),e[17]=m,e[18]=p,e[19]=g,e[20]=j,e[21]=_,e[22]=v,e[23]=y):y=e[23];let C;e[24]!==o||e[25]!==a||e[26]!==m||e[27]!==d||e[28]!==r||e[29]!==i||e[30]!==n||e[31]!==l?(C=m&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(Ko,{status:n,threads:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:a,filters:d})}),e[24]=o,e[25]=a,e[26]=m,e[27]=d,e[28]=r,e[29]=i,e[30]=n,e[31]=l,e[32]=C):C=e[32];let N;return e[33]!==y||e[34]!==C?(N=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[y,C]}),e[33]=y,e[34]=C,e[35]=N):N=e[35],N}function kt(t){const e=P.c(38),{threads:n,groupBy:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,filters:a,hasMore:d,isFetchingMore:c,onLoadMore:u,filtersActive:m}=t;if(n.length===0&&!d&&!c){let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Dn,{className:"size-6 opacity-60"}),e[0]=h):h=e[0];const b=m?"No chats match your filters":"No chats yet";let j;return e[1]!==b?(j=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[h,s.jsx("p",{className:"text-sm",children:b})]}),e[1]=b,e[2]=j):j=e[2],j}const f=n.length>1||d;if(l==="status"){let h;if(e[3]!==o||e[4]!==f||e[5]!==a||e[6]!==r||e[7]!==i||e[8]!==n){let j;e[10]!==o||e[11]!==f||e[12]!==a||e[13]!==r||e[14]!==i?(j=_=>s.jsx(Vo,{status:_.status,threads:_.threads,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:f,filters:a},_.status),e[10]=o,e[11]=f,e[12]=a,e[13]=r,e[14]=i,e[15]=j):j=e[15],h=Po(n).map(j),e[3]=o,e[4]=f,e[5]=a,e[6]=r,e[7]=i,e[8]=n,e[9]=h}else h=e[9];let b;return e[16]!==h?(b=s.jsx(s.Fragment,{children:h}),e[16]=h,e[17]=b):b=e[17],b}let x;if(e[18]!==o||e[19]!==f||e[20]!==a||e[21]!==r||e[22]!==i||e[23]!==n){let h;e[25]!==o||e[26]!==f||e[27]!==a||e[28]!==r||e[29]!==i?(h=b=>s.jsx(is,{task:b,isActive:o===b.id,onClick:()=>i(b),onArchive:f&&b.created_by===a.currentUserId?()=>r(b):void 0,showAutomationBadge:!!b.trigger_id,showAgentIcon:!0},b.id),e[25]=o,e[26]=f,e[27]=a,e[28]=r,e[29]=i,e[30]=h):h=e[30],x=n.map(h),e[18]=o,e[19]=f,e[20]=a,e[21]=r,e[22]=i,e[23]=n,e[24]=x}else x=e[24];let p;e[31]!==d||e[32]!==c||e[33]!==u?(p=(d||c)&&s.jsx(rs,{onClick:u,isFetching:c}),e[31]=d,e[32]=c,e[33]=u,e[34]=p):p=e[34];let g;return e[35]!==x||e[36]!==p?(g=s.jsxs(s.Fragment,{children:[x,p]}),e[35]=x,e[36]=p,e[37]=g):g=e[37],g}function qo(t,e,n){if(!n)return;const l=t.findIndex(o=>o.id===e);if(l!==-1){for(let o=l+1;o<t.length;o++){const i=t[o];if(i?.created_by===n)return i}for(let o=l-1;o>=0;o--){const i=t[o];if(i?.created_by===n)return i}}}function wt(t){const e=P.c(17),{label:n,onClick:l,active:o,children:i}=t,[r,a]=G.useState(!1);let d,c,u,m;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>a(!0),c=()=>a(!1),u=()=>a(!0),m=()=>a(!1),e[0]=d,e[1]=c,e[2]=u,e[3]=m):(d=e[0],c=e[1],u=e[2],m=e[3]);const f=o&&"bg-sidebar-accent text-foreground";let x;e[4]!==f?(x=B("md:size-[34px] rounded-lg",f),e[4]=f,e[5]=x):x=e[5];let p;e[6]!==i||e[7]!==n||e[8]!==l||e[9]!==x?(p=s.jsx(je,{asChild:!0,children:s.jsx(we,{"aria-label":n,onClick:l,onPointerEnter:d,onPointerLeave:c,onFocus:u,onBlur:m,className:x,children:i})}),e[6]=i,e[7]=n,e[8]=l,e[9]=x,e[10]=p):p=e[10];let g;e[11]!==n?(g=s.jsx(ve,{side:"bottom",children:n}),e[11]=n,e[12]=g):g=e[12];let h;return e[13]!==r||e[14]!==p||e[15]!==g?(h=s.jsxs(ye,{open:r,children:[p,g]}),e[13]=r,e[14]=p,e[15]=g,e[16]=h):h=e[16],h}function Fe(t){const e=P.c(13),{label:n,value:l,onChange:o,options:i}=t;let r;e[0]!==n?(r=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=r):r=e[1];let a;e[2]!==o?(a=m=>m&&o(m),e[2]=o,e[3]=a):a=e[3];let d;e[4]!==i?(d=i.map(Yo),e[4]=i,e[5]=d):d=e[5];let c;e[6]!==a||e[7]!==d||e[8]!==l?(c=s.jsx(Nn,{type:"single",size:"sm",value:l,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]=l,e[9]=c):c=e[9];let u;return e[10]!==r||e[11]!==c?(u=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r,c]}),e[10]=r,e[11]=c,e[12]=u):u=e[12],u}function Yo(t){return s.jsxs(Cn,{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 ms({onNavigate:t}={}){const e=U(),{data:n}=Ne.useSession(),l=n?.user?.id,{org:o}=Q(),i=Rt({connectionId:Lt,orgId:o.id,orgSlug:o.slug}),r=rt(o.id).id,a=kn(),{threads:d,hasMore:c,isFetchingMore:u,fetchNextPage:m}=Xt(),f=d.filter(T=>!T.hidden),{hide:x,setScope:p}=Mn(),g=ae(),{setTaskId:h,createNewTask:b}=Qt(),j=Ss({strict:!1}),_=Tt({strict:!1}),v=j.taskId??null,y=_.virtualmcpid??d.find(T=>T.id===v)?.virtual_mcp_id??null,C=()=>{t?.()},N=[...f].sort((T,F)=>(F.updated_at??"").localeCompare(T.updated_at??"")),[S,w]=G.useState("all"),[k,I]=G.useState("flat"),[M,z]=ze("sidebar-threads-scope-all",!1),[A,$]=G.useState(!1),[R,E]=G.useState(!1),O={type:S,member:"mine",currentUserId:l??null},D={};M||(D.created_by="me"),p(D);const L=T=>l?T.filter(F=>F.created_by===l):[],K=T=>S==="automation"?T.filter(F=>!!F.trigger_id):S==="manual"?T.filter(F=>!F.trigger_id):T,Z=L(N),ne=K(Z),de=K(N),oe=M?de:ne,ee=T=>{if(l&&T.created_by&&T.created_by!==l)return;const F=T.id===v;if(x(T.id),Tn(T.id),!F)return;const W=qo(oe,T.id,l);C(),W?h(W.id,W.virtual_mcp_id):g({to:"/$org",params:{org:o.slug}})},le=T=>{C(),h(T.id,T.virtual_mcp_id)},me=async T=>{try{const F=await i.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:T,limit:1,offset:0}});return((F.structuredContent??F).items?.length??0)===0}catch{return!1}},Se=async()=>{const T=y??r;q("sidebar_new_thread_clicked",{virtual_mcp_id:T});const F=Z.find(W=>W.virtual_mcp_id===T&&W.title==="New chat");if(F&&await me(F.id)){C(),h(F.id,T);return}C(),b(T)},{state:ue,isMobile:fe,toggleSidebar:pe}=_e();if(ue==="collapsed"&&!fe){const T=rt(o.id),F=new Map((a??[]).map(H=>[H.id,H])),W=H=>(H?F.get(H):void 0)??(H===r?T:void 0);return s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(Vs,{orgParam:o.slug,side:"right",align:"start",trigger:s.jsx(Y,{tooltip:o.name,children:s.jsx(qs,{org:o,size:"sm"})})})}),s.jsxs(J,{className:"mt-2 min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[s.jsx(V,{children:s.jsx(Y,{"aria-label":e("sidebar.taskGroupsList.toggleSidebar"),tooltip:e("sidebar.taskGroupsList.toggleSidebar"),onClick:pe,children:s.jsx(Ft,{size:16})})}),oe.map(H=>{const re=W(H.virtual_mcp_id);return s.jsx(V,{children:s.jsx(Y,{"aria-label":H.title||e("sidebar.taskGroupsList.newChat"),tooltip:H.title||e("sidebar.taskGroupsList.newChat"),isActive:H.id===v,onClick:()=>le(H),children:s.jsx(ke,{icon:re?.icon??null,name:re?.title??"Agent",size:"xs"})})},H.id)})]})]})}const X=k!=="flat"||S!=="all"||M===!0,he=s.jsxs(Gt,{children:[s.jsxs(ye,{children:[s.jsx(je,{asChild:!0,children:s.jsx(Bt,{asChild:!0,children:s.jsxs(we,{"aria-label":e("sidebar.taskGroupsList.filterChats"),active:X,className:"md:size-[34px] rounded-lg",children:[s.jsx(Sn,{size:16}),X&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"})]})})}),s.jsx(ve,{side:"bottom",children:e("sidebar.taskGroupsList.filterChats")})]}),s.jsxs(Ht,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[s.jsx(Fe,{label:e("sidebar.taskGroupsList.filterView"),value:k,onChange:T=>{q("tasks_panel_group_by_changed",{to_value:T}),I(T)},options:[{value:"flat",label:e("sidebar.taskGroupsList.viewList"),icon:s.jsx(dn,{size:13})},{value:"status",label:e("sidebar.taskGroupsList.viewStatus"),icon:s.jsx(mn,{size:13})}]}),s.jsx(Fe,{label:e("sidebar.taskGroupsList.filterType"),value:S,onChange:T=>{q("tasks_panel_filter_changed",{to_value:T}),w(T)},options:[{value:"all",label:e("sidebar.taskGroupsList.typeAll")},{value:"manual",label:e("sidebar.taskGroupsList.typeChats")},{value:"automation",label:e("sidebar.taskGroupsList.typeAuto")}]}),s.jsx(Fe,{label:e("sidebar.taskGroupsList.filterScope"),value:M?"team":"mine",onChange:T=>z(T==="team"),options:[{value:"mine",label:e("sidebar.taskGroupsList.scopeMine")},{value:"team",label:e("sidebar.taskGroupsList.scopeTeam")}]})]})]}),te=T=>s.jsx(Ut,{delayDuration:300,children:s.jsxs("div",{className:B("shrink-0 flex items-center justify-between",T?"h-10":"h-10 md:h-[34px] mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!T&&s.jsx(es,{className:"md:size-[34px] rounded-lg"}),he]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(wt,{label:e("sidebar.taskGroupsList.searchChats"),onClick:()=>{q("tasks_panel_search_opened"),E(!0),$(!0)},children:s.jsx(un,{size:16})}),s.jsx(wt,{label:e("sidebar.taskGroupsList.newChat"),onClick:()=>{Se()},children:s.jsx(fn,{size:16})})]})]})});return fe?s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[te(!0),s.jsx(jt,{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(kt,{threads:oe,groupBy:k,activeTaskId:v,onSelectTask:le,onArchiveTask:ee,filters:O,hasMore:c,isFetchingMore:u,onLoadMore:()=>{m()},filtersActive:X})}),R&&s.jsx(vt,{open:A,onOpenChange:$})]}):s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[te(!1),s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(jt,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(kt,{threads:oe,groupBy:k,activeTaskId:v,onSelectTask:le,onArchiveTask:ee,filters:O,hasMore:c,isFetchingMore:u,onLoadMore:()=>{m()},filtersActive:X})})}),R&&s.jsx(vt,{open:A,onOpenChange:$})]})}const Xo=5,Qo=[{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 us(){const t=P.c(3),{state:e}=_e();if(e==="collapsed"){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:Xo}).map(el)}),t[0]=o):o=t[0],o}let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=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(se,{className:"size-6 rounded-md"}),s.jsx(se,{className:"size-6 rounded-md"}),s.jsx(se,{className:"size-6 rounded-md"})]}),s.jsx(se,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[n,s.jsx("div",{className:"flex flex-col gap-0.5",children:Qo.map(Jo)})]}),t[2]=l):l=t[2],l}function Jo(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(se,{className:"size-5 rounded-full shrink-0"}),s.jsx(se,{className:B("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(Zo)})]},e)}function Zo(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(se,{className:"h-3 flex-1 rounded-sm"})},e)}function el(t,e){return s.jsx(se,{className:"size-10 rounded-lg mx-auto"},e)}function tl(){const t=P.c(2);if(nt()){let l;return t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Be,{showName:!0}),t[0]=l):l=t[0],l}let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs(s.Fragment,{children:[s.jsx(Be,{}),s.jsx(st,{})]}),t[1]=n):n=t[1],n}function sl(){const t=P.c(5),e=ss();let n,l;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ko,{}),l=s.jsx(tl,{}),t[0]=n,t[1]=l):(n=t[0],l=t[1]);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Xe,{children:s.jsx(G.Suspense,{fallback:s.jsx(us,{}),children:s.jsx(ms,{})})}),t[2]=o):o=t[2];let i;return t[3]!==e?(i=s.jsx(ts,{children:s.jsx(ls,{sections:e,footer:n,header:l,additionalContent:o})}),t[3]=e,t[4]=i):i=t[4],i}function nl(t){const e=P.c(8),{onClose:n}=t,l=ss();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(wo,{}),e[0]=o):o=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(us,{}),e[1]=i):i=e[1];let r;e[2]!==n?(r=s.jsx(Xe,{children:s.jsx(G.Suspense,{fallback:i,children:s.jsx(ms,{onNavigate:n})})}),e[2]=n,e[3]=r):r=e[3];let a;return e[4]!==n||e[5]!==l||e[6]!==r?(a=s.jsx(ts,{children:s.jsx(io,{sections:l,onClose:n,footer:o,additionalContent:r})}),e[4]=n,e[5]=l,e[6]=r,e[7]=a):a=e[7],a}const ol="sidebar.open";function ll(){const t=P.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ns,{}),t[0]=e):e=t[0],e}function Mr(){const t=P.c(37),e=$t(),n=nt();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[0]=l):l=t[0];const{connect:o,siteUrl:i}=Tt(l),r=o==="1",[a,d]=ze(ol,!1),{width:c,wrapperRef:u,onStartResize:m,resetWidth:f}=Jn(),x=e;let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(es,{}),t[1]=p):p=t[1];let g;t[2]!==n?(g=!n&&s.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:s.jsx(st,{})}),t[2]=n,t[3]=g):g=t[3];let h,b,j,_,v;t[4]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(qe,{}),b=s.jsx(xe.TogglesSlot,{}),j=s.jsx(xe.TabsSlot,{className:"shrink-0"}),_=s.jsx(xe.CenterSlot,{}),v=s.jsx(xe.RightSlot,{}),t[4]=h,t[5]=b,t[6]=j,t[7]=_,t[8]=v):(h=t[4],b=t[5],j=t[6],_=t[7],v=t[8]);let y;t[9]!==g?(y=s.jsx(xe.Header,{className:"grid-cols-1 px-1",children:s.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[p,g,h,b,j,_,v]})}),t[9]=g,t[10]=y):y=t[10];const C=y;let N;t[11]===Symbol.for("react.memo_cache_sentinel")?(N={background:"transparent",containerType:"inline-size"},t[11]=N):N=t[11];let S;t[12]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Ms,{className:"flex flex-col min-h-0",style:N,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(G.Suspense,{fallback:s.jsx(ll,{}),children:s.jsx(Cs,{})})})})}),t[12]=S):S=t[12];const w=S,k=x&&C,I=`${c}px`;let M;t[13]!==I?(M={"--sidebar-width":I,"--sidebar-width-icon":"3.125rem"},t[13]=I,t[14]=M):M=t[14];const z=M;let A;t[15]!==e||t[16]!==m||t[17]!==f?(A=!e&&s.jsxs(s.Fragment,{children:[s.jsx(sl,{}),s.jsx(Yn,{onPointerDown:m,onDoubleClick:f})]}),t[15]=e,t[16]=m,t[17]=f,t[18]=A):A=t[18];let $;t[19]!==z||t[20]!==A||t[21]!==u?($=s.jsxs(Is,{ref:u,className:"flex-1 bg-sidebar relative min-h-0",style:z,children:[A,w]}),t[19]=z,t[20]=A,t[21]=u,t[22]=$):$=t[22];let R;t[23]!==e?(R=e&&s.jsx(En,{renderSidebar:il}),t[23]=e,t[24]=R):R=t[24];let E;t[25]!==i||t[26]!==r?(E=r&&s.jsx(Un,{siteUrl:i}),t[25]=i,t[26]=r,t[27]=E):E=t[27];let O;t[28]!==k||t[29]!==$||t[30]!==R||t[31]!==E?(O=s.jsx(yn,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[k,$,R,E]})}),t[28]=k,t[29]=$,t[30]=R,t[31]=E,t[32]=O):O=t[32];let D;return t[33]!==d||t[34]!==a||t[35]!==O?(D=s.jsx(In,{children:s.jsx(xe.Provider,{children:s.jsx(Ts,{open:a,onOpenChange:d,children:O})})}),t[33]=d,t[34]=a,t[35]=O,t[36]=D):D=t[36],D}function il(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(nl,{onClose:e})})})}export{Mr as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h}from"./index-
|
|
1
|
+
import{r as h}from"./index-B5pAcdCj.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as a,aA as R}from"./index-
|
|
1
|
+
import{r as a,aA as R}from"./index-B5pAcdCj.js";function re(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function me(e){if(Array.isArray(e))return e}function be(e,t,r){return(t=Se(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,c,s=[],f=!0,p=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(f=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);f=!0);}catch(j){p=!0,o=j}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(p)throw o}}return s}}function we(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function oe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ne(Object(r),!0).forEach(function(n){be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oe(e,t){if(e==null)return{};var r,n,o=je(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function je(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Me(e,t){return me(e)||ye(e,t)||Ee(e,t)||we()}function Pe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Se(e){var t=Pe(e,"string");return typeof t=="symbol"?t:t+""}function Ee(e,t){if(e){if(typeof e=="string")return re(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?re(e,t):void 0}}function Re(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ie(Object(r),!0).forEach(function(n){Re(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ie(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(o,i){return i(o)},n)}}function L(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function F(e){return{}.toString.call(e).includes("Object")}function Te(e){return!Object.keys(e).length}function D(e){return typeof e=="function"}function Ce(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ae(e,t){return F(t)||P("changeType"),Object.keys(t).some(function(r){return!Ce(e,r)})&&P("changeField"),t}function Le(e){D(e)||P("selectorType")}function $e(e){D(e)||F(e)||P("handlerType"),F(e)&&Object.values(e).some(function(t){return!D(t)})&&P("handlersType")}function De(e){e||P("initialIsRequired"),F(e)||P("initialType"),Te(e)&&P("initialContent")}function Ve(e,t){throw new Error(e[t]||e.default)}var xe={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},P=L(Ve)(xe),q={changes:Ae,selector:Le,handler:$e,initial:De};function Ne(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};q.initial(e),q.handler(t);var r={current:e},n=L(Fe)(r,t),o=L(ze)(r),i=L(q.changes)(e),c=L(qe)(r);function s(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(j){return j};return q.selector(p),p(r.current)}function f(p){Ie(n,o,i,c)(p)}return[s,f]}function qe(e,t){return D(t)?t(e.current):t}function ze(e,t){return e.current=ae(ae({},e.current),t),t}function Fe(e,t,r){return D(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var Ue={create:Ne},He={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function We(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function Be(e){return{}.toString.call(e).includes("Object")}function Ke(e){return e||ue("configIsRequired"),Be(e)||ue("configType"),e.urls?(Ge(),{paths:{vs:e.urls.monacoBase}}):e}function Ge(){console.warn(ce.deprecation)}function Ye(e,t){throw new Error(e[t]||e.default)}var ce={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
3
3
|
You are using deprecated way of configuration.
|
|
4
4
|
|
|
@@ -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,q as Xt,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,q as Xt,E as Vs}from"./index-B5pAcdCj.js";import{S as Us}from"./search-input-CrV3M9Tk.js";import{P as et}from"./index-BHiuDSJx.js";import{E as is}from"./empty-state-DZyW1mhx.js";import{R as Ks}from"./require-capability-bUvkt_Jq.js";import{r as ms,m as qs,t as Bs,v as us,w as Wt,x as qt,y as ys,z as Hs,B as fs,D as ws,A as Js,E as Qs}from"./automation-runs-BBa6tRzS.js";import{u as ts}from"./use-connection-n1ELT1mr.js";import{g as Ss}from"./connection-slug-eyAPH6o3.js";import{B as kt}from"./badge-BtX_u9Ik.js";import{P as $t,a as zt,b as Et}from"./popover-BsG-Ut0C.js";import{c as Bt,T as Ht,a as Jt}from"./tooltip-sTtjDvoo.js";import{i as Yt}from"./Check-rFuMW35j.js";import{a as Ut}from"./Copy01-6Lk3T5kb.js";import{n as xs}from"./Globe01-B3eOB-bI.js";import{i as ns}from"./FilterLines-DI_Qm1qr.js";import{i as Gs}from"./Key01-CE5ANePO.js";import{i as Xs}from"./Play-CyFg0Xnr.js";import{aD as Ws,X as Ys,a1 as Zs}from"./agent-icon-CVTpL47E.js";import{M as ps}from"./monaco-editor-Br0-yvqe.js";import{u as el}from"./use-members-DQ4Ax4Dt.js";import{S as tl,u as sl,W as ll}from"./use-mcp-client-CFH86W63.js";import{a as ol}from"./use-virtual-mcp-Tg-eDvSu.js";import{n as At}from"./Tool02-D3ImSqnS.js";import{c as rl}from"./SwitchHorizontal01-BS092iWr.js";import{s as il}from"./Plus-DITXLV6z.js";import{s as nl}from"./Trash01-LLStDuc3.js";import{I as Dt}from"./input-BdNp94xl.js";import{M as Rt}from"./multi-select-TtXKekQw.js";import{a as Pt,b as Ft,d as He,c as _t,S as Ot}from"./select-CWeHkbd3.js";import{t as Is}from"./ChevronDown-D48jTswz.js";import{s as al}from"./Stars02-C4BXaIW2.js";import{C as cl}from"./calendar-DJl7BUkw.js";import{T as dl}from"./textarea-BiTWgoYg.js";import{C as ks}from"./collection-tabs-CXALICVQ.js";import{S as ml}from"./switch-BAJU0bt_.js";import{L as ul}from"./label-3zDA4sob.js";import{I as Ct}from"./integration-icon-DoUJ97wM.js";import{A as Cs}from"./avatar-CAlKFgYv.js";import{A as fl,a as xl,b as pl}from"./alert-BOtjHBZH.js";import{C as Ts}from"./card-DN0OMeD8.js";import{K as Ye}from"./monitoring-stats-row-BSJi7XEI.js";import{u as Ms}from"./studio-tools-BuOVhTAA.js";import{u as gl}from"./useSuspenseInfiniteQuery-CoNmOb3b.js";import{o as hl,m as vl,p as jl,q as Nl}from"./sidebar-Cv557HRI.js";import{T as tt,a as Gt,b as Ls,c as Ds,d as Ee,e as Rs}from"./table-D2y5PNds.js";import{n as bl}from"./ChevronUp-Bf993jF8.js";import{u as yl}from"./use-infinite-scroll-B3Us0FOa.js";import{c as wl,b as Sl}from"./use-automations-DTVDL9Ac.js";import"./SearchMd-b92Qgt9y.js";import"./use-capability-CXuApCjP.js";import"./access-gate-CvbhtVik.js";import"./capability-load-error-Cw0YiON3.js";import"./useInfiniteQuery-DkWmKdoR.js";import"./use-clock-tick-pfKuMtst.js";import"./AlertCircle-BgL3YyuU.js";import"./CheckCircle-DRPVedxI.js";import"./DotsVertical-IM9-cL94.js";import"./XCircle-CyI4fk4M.js";import"./Stars01-C03S5tVj.js";import"./ArrowRight-KW3xq1r6.js";import"./ChevronRight-LyFia1m2.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CODIBpYX.js";import"./file-type-icon-5sVl9s18.js";import"./dialog-DgPEwnKb.js";import"./X-BOD96Sav.js";import"./ZoomOut-B4I1BQI_.js";import"./use-mobile-BWrDGidp.js";import"./tab-id-BijBBRwE.js";import"./hooks-Bk5QuAXL.js";import"./decopilot-sse-pool-BBLfaSrg.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-CkIYHDAo.js";import"./autosend-DRl8LNUl.js";import"./use-ai-providers-C8qA53zS.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-BcQN2EhC.js";import"./use-organization-settings-BZVys_CJ.js";import"./index-DFySzIf4.js";import"./Eye-DQ8_2da9.js";import"./Star01-DAVevbnE.js";import"./XClose-Bafb0lXd.js";import"./ZapSquare-DmF34u5V.js";import"./Tool01-KoLvuxqs.js";import"./Monitor01-C3jWkuS8.js";import"./Upload01-DSslfT87.js";import"./shell-layout-CIdA6eed.js";import"./Users03-WL_LA7La.js";import"./SearchLg-D7Ui27Oz.js";import"./Zap-CbGxXZqE.js";import"./required-auth-layout-D9l0Xiy5.js";import"./use-org-sso-CLEffSXU.js";import"./Image01-CCt0OnVG.js";import"./LinkExternal01-CORYkI7c.js";import"./ArrowUpRight-WNzzQ_3i.js";import"./Palette-75tVOLKn.js";import"./use-navigate-to-agent-CeEInzVl.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-CJz2G6k1.js";import"./form-DkQE4eVe.js";import"./ArrowUp-R6RJmaXD.js";import"./Settings02-B5bpoiG8.js";import"./TrendUp01-BZX0N7yA.js";import"./Globe04-4yBmV3D1.js";import"./HardDrive-4DIbsS2x.js";import"./LayoutLeft-CbYbxxcX.js";import"./LogOut01-wWv0KF8i.js";import"./Sun-DL5_VVPF.js";import"./Package-aTPkrhbY.js";import"./Shield01-DdEEjcd8.js";import"./User01-CD3D25HA.js";import"./Users01-Cer51we5.js";import"./index-DtfjCN6O.js";import"./use-org-auth-client-wPL3_F1w.js";import"./auth-DSO-QxMv.js";import"./checkbox-Dz4CydV1.js";import"./command-BeyKUDBs.js";import"./index-BeF0PLGE.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
|
|