decocms 4.166.0 → 4.166.1
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-BGHhwPMz.js → AlertCircle-BYNQ7Jkt.js} +1 -1
- package/dist/client/assets/{AreaChart-ARF_scZ5.js → AreaChart-CYQD4k74.js} +1 -1
- package/dist/client/assets/{ArrowUp-RkZpUqyg.js → ArrowUp-BP3McfGy.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BDWcfY0c.js → ArrowUpRight-D8Yru5LS.js} +1 -1
- package/dist/client/assets/{Check-CHkRYtKv.js → Check-9lRvtdWC.js} +1 -1
- package/dist/client/assets/{CheckCircle-BRfhpwch.js → CheckCircle-C7vqJ0tl.js} +1 -1
- package/dist/client/assets/{ChevronDown-iz8GGXYf.js → ChevronDown-bjr6MfsA.js} +1 -1
- package/dist/client/assets/{ChevronRight-IZpQro-r.js → ChevronRight-DKljoVRD.js} +1 -1
- package/dist/client/assets/{ChevronUp-B_5wkNuX.js → ChevronUp-DZ3KXJj2.js} +1 -1
- package/dist/client/assets/{Copy01-DqCXRbuf.js → Copy01-WdtIApkR.js} +1 -1
- package/dist/client/assets/{CpuChip01-CSPqCMu_.js → CpuChip01-1xWaywPW.js} +1 -1
- package/dist/client/assets/{DotsVertical-D8cy0gVu.js → DotsVertical-B9HzbaMu.js} +1 -1
- package/dist/client/assets/{Eye-B3l_I5H4.js → Eye-DiCzIXG3.js} +1 -1
- package/dist/client/assets/{FilterLines-1XQzY6ly.js → FilterLines-B9kof_U0.js} +1 -1
- package/dist/client/assets/{HardDrive-Cntx7QhC.js → HardDrive-k3jAqr1U.js} +1 -1
- package/dist/client/assets/{Key01-CTICJm_V.js → Key01-7Qa4qU2i.js} +1 -1
- package/dist/client/assets/{LayoutLeft-i2g0QuKY.js → LayoutLeft-CsKErbeQ.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BB8z5B3f.js → LinkExternal01-BdGE95-A.js} +1 -1
- package/dist/client/assets/{LogOut01-C-LAGZ7R.js → LogOut01-zNCjjgBE.js} +1 -1
- package/dist/client/assets/{Monitor01-DzTNjVje.js → Monitor01-Bt0uc0us.js} +1 -1
- package/dist/client/assets/{Palette-kESI43-X.js → Palette-BUAxJzMW.js} +1 -1
- package/dist/client/assets/{Play-T2v41POK.js → Play-CCSM72zW.js} +1 -1
- package/dist/client/assets/{Plus-9ZthcVz_.js → Plus-DAdMLXGQ.js} +1 -1
- package/dist/client/assets/{SearchLg-01k2H3ZU.js → SearchLg-BtOUZE8E.js} +1 -1
- package/dist/client/assets/{SearchMd-DDDVQvP3.js → SearchMd-CcK3a1rX.js} +1 -1
- package/dist/client/assets/{Settings02-CAuG4C_k.js → Settings02-DPYzCcfi.js} +1 -1
- package/dist/client/assets/{Shield01-CznW2JFr.js → Shield01-BqdCWNs4.js} +1 -1
- package/dist/client/assets/{Star01-CrRln1Rx.js → Star01-BBwSXqXY.js} +1 -1
- package/dist/client/assets/{Stars01-CG7B88Hp.js → Stars01-B6LcwT44.js} +1 -1
- package/dist/client/assets/{Stars02-CS8WQJ6g.js → Stars02-foLNDsGr.js} +1 -1
- package/dist/client/assets/{Sun-DzgMotQ7.js → Sun-CQkXGbR-.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-sltmgIjh.js → SwitchHorizontal01-D0i5ZIfp.js} +1 -1
- package/dist/client/assets/{Tool01-CI-RLBBN.js → Tool01-Bd3Lw8Th.js} +1 -1
- package/dist/client/assets/{Tool02-Cl243TWc.js → Tool02-Dh8WmTu2.js} +1 -1
- package/dist/client/assets/{Trash01-DMTjAPun.js → Trash01-DztRWcPm.js} +1 -1
- package/dist/client/assets/{TrendUp01-BlCy62Rs.js → TrendUp01-CCJa9Jip.js} +1 -1
- package/dist/client/assets/{Upload01-BsMkvI2Y.js → Upload01-x8BbaEO4.js} +1 -1
- package/dist/client/assets/{User01-BNqxMqFJ.js → User01-CZYGYzmf.js} +1 -1
- package/dist/client/assets/{Users01-BfvEASmn.js → Users01-TN6U6obM.js} +1 -1
- package/dist/client/assets/{Users03-B6z_0qm4.js → Users03-D4U-n8Y-.js} +1 -1
- package/dist/client/assets/{X-CuyklNqf.js → X-D41LEseN.js} +1 -1
- package/dist/client/assets/{XCircle-kQ0ojGH_.js → XCircle-jdbnXcmW.js} +1 -1
- package/dist/client/assets/{XClose-D6-r04ej.js → XClose-7B366K4b.js} +1 -1
- package/dist/client/assets/{Zap-BjF8Jp4Q.js → Zap-DU2GtHsA.js} +1 -1
- package/dist/client/assets/{ZapSquare-DoqhYI6E.js → ZapSquare-B00HYz0P.js} +1 -1
- package/dist/client/assets/{access-gate-BALm-VCD.js → access-gate-L6Rshjlb.js} +1 -1
- package/dist/client/assets/{add-section-modal--pW36YsF.js → add-section-modal-COV35J6f.js} +1 -1
- package/dist/client/assets/{agent-icon-CCUMqxdM.js → agent-icon-BJvz5x4A.js} +1 -1
- package/dist/client/assets/{agents-list-B3k8pxFo.js → agents-list-il7ykOJS.js} +1 -1
- package/dist/client/assets/{ai-providers-C7pBRErM.js → ai-providers-BzQCfUMh.js} +1 -1
- package/dist/client/assets/{alert-C2_NzIm1.js → alert-BeiNLywN.js} +1 -1
- package/dist/client/assets/{alert-dialog-DVNkUJjm.js → alert-dialog-CFi8SxDt.js} +1 -1
- package/dist/client/assets/{app-editor-DJT_Qz-J.js → app-editor-V8d2LxIW.js} +1 -1
- package/dist/client/assets/{auth-catchall-B1Ik9Itk.js → auth-catchall-D8uekUSf.js} +1 -1
- package/dist/client/assets/{auth-entry-CY_ssxmW.js → auth-entry-B4a3bJ6W.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CvuEv68p.js → auth-split-layout-Bem23q5n.js} +1 -1
- package/dist/client/assets/{auth-COfv9D-B.js → auth-tbnnxlQ1.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-B5djp_oM.js → authenticate-and-persist-oauth-CyaKLed1.js} +1 -1
- package/dist/client/assets/{automation-list-row-D8s_P_fv.js → automation-list-row-BZwO9g9-.js} +1 -1
- package/dist/client/assets/{automation-runs-Bd8cRFcO.js → automation-runs-BFX2xacs.js} +1 -1
- package/dist/client/assets/{automations-Du69F5M_.js → automations-q20R0WsI.js} +1 -1
- package/dist/client/assets/{avatar-CTumFCbj.js → avatar-DWN9ZeFA.js} +1 -1
- package/dist/client/assets/{badge-DJBwpmtq.js → badge-CoAQc4Np.js} +1 -1
- package/dist/client/assets/{block-document-Dlm_Dzpe.js → block-document-Bg8m_yX7.js} +1 -1
- package/dist/client/assets/{brand-context-B1Qzip09.js → brand-context-Bl6HM-wM.js} +1 -1
- package/dist/client/assets/{buckets-CIjiU_3o.js → buckets-Bsgd4cnO.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-C2IclmsB.js → bulk-category-panel-C6ZUcvDF.js} +1 -1
- package/dist/client/assets/{calendar-BWxZGbm4.js → calendar-GFSVia_G.js} +1 -1
- package/dist/client/assets/{capability-load-error-OUTqyDRM.js → capability-load-error-QVMu_PcW.js} +1 -1
- package/dist/client/assets/{card-D9wL9dTh.js → card-CZUw8wdn.js} +1 -1
- package/dist/client/assets/{category-editor-AqrzC3KY.js → category-editor-U4yM88TF.js} +1 -1
- package/dist/client/assets/{chat-context-BfEg8nLE.js → chat-context-DCRbAwAe.js} +1 -1
- package/dist/client/assets/{checkbox-CBG5xl1d.js → checkbox-C1YAfvvB.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BVXGOFm6.js → cli-auth-success-B-2chvC0.js} +1 -1
- package/dist/client/assets/{collection-detail-CI9aEA1H.js → collection-detail-BjPElPAS.js} +1 -1
- package/dist/client/assets/{collection-display-button-BkkjTo6d.js → collection-display-button-uRbYvOmi.js} +1 -1
- package/dist/client/assets/{collection-search-B2fbRBQJ.js → collection-search-BxLYs4Z_.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DKjUMz3H.js → collection-table-wrapper-BEeQqAUW.js} +1 -1
- package/dist/client/assets/{collection-tabs-Grs389jJ.js → collection-tabs-auEA3Mr4.js} +1 -1
- package/dist/client/assets/{command-Bao-cGlR.js → command-DIYa6n9f.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-IkNVAerO.js → commerce-onboarding-BZsUKjtP.js} +1 -1
- package/dist/client/assets/{companions-core-LjY7XBGa.js → companions-core-CHzY8shE.js} +1 -1
- package/dist/client/assets/{connect-DCKPjTx7.js → connect-Bz-pO0ps.js} +1 -1
- package/dist/client/assets/{connection-Dd8ev5HO.js → connection-BD1WR6Pb.js} +1 -1
- package/dist/client/assets/{connection-card-b_DqdKo_.js → connection-card-CvsbZEWW.js} +1 -1
- package/dist/client/assets/{connection-detail-BT84-wag.js → connection-detail-WwrKkVVQ.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CUpc9Yvi.js → connection-form-helpers-D30nNJ8B.js} +1 -1
- package/dist/client/assets/{connections-D-UAPTVc.js → connections-B834aFC-.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-D1_ZD6_y.js → decopilot-sse-pool-Bqd4_YIf.js} +1 -1
- package/dist/client/assets/{dialog-BAq0LYoh.js → dialog-FKE1myak.js} +1 -1
- package/dist/client/assets/{domain-settings-B3F521Q6.js → domain-settings-C9Gu5AYh.js} +1 -1
- package/dist/client/assets/{drawer-CnX4ynVO.js → drawer-CpNlNmNW.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Bh6_ogTn.js → dropdown-menu-BV1vrBtO.js} +1 -1
- package/dist/client/assets/{empty-state-BCvGyZLy.js → empty-state-m9N9NPai.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CrCZ-wtE.js → extract-connection-data-CiHOXrFE.js} +1 -1
- package/dist/client/assets/{file-explorer-D89KT_1L.js → file-explorer-D5Q8Nuwj.js} +1 -1
- package/dist/client/assets/{form-BESoe__r.js → form-CXtyRGVW.js} +1 -1
- package/dist/client/assets/{general-CZGOpzbT.js → general-CHbEpJYu.js} +1 -1
- package/dist/client/assets/{github-repo-picker-Cky-dO7f.js → github-repo-picker-Ce961E_9.js} +1 -1
- package/dist/client/assets/{hooks-BjnWnySg.js → hooks-BNzxeS18.js} +1 -1
- package/dist/client/assets/{index-ByEwmsIV.js → index-Cbqc0cBu.js} +1 -1
- package/dist/client/assets/{index-B2zjCJKf.js → index-CizlJi9g.js} +5 -5
- package/dist/client/assets/{index-CE-GAU54.js → index-CmZWv9Y5.js} +1 -1
- package/dist/client/assets/{index-PyVbwLgh.js → index-D-oCCbE4.js} +1 -1
- package/dist/client/assets/{index-BMpbhEhn.js → index-DBYF0h5j.js} +1 -1
- package/dist/client/assets/{index-FmKCot8W.js → index-DJE2tfk5.js} +1 -1
- package/dist/client/assets/{index-B0tLvq56.js → index-DJYAfN91.js} +1 -1
- package/dist/client/assets/{index-C5z96HUa.js → index-McNHHn0I.js} +27 -27
- package/dist/client/assets/{index-DLA40b1F.js → index-XK7U3Fe7.js} +3 -3
- package/dist/client/assets/{index-BzKLOnFf.js → index-kpWNxDXC.js} +1 -1
- package/dist/client/assets/{index-redirect-DvUmQQly.js → index-redirect-aynDvqWT.js} +1 -1
- package/dist/client/assets/{index-3BU1GVh0.js → index-xjyE43qd.js} +1 -1
- package/dist/client/assets/{input-CbEIVRiv.js → input-DEpui_nJ.js} +1 -1
- package/dist/client/assets/{integration-icon-BaxJDQkh.js → integration-icon-CK3ofyKi.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-CAZNrLTY.js → invite-member-dialog-DzMJGRWj.js} +1 -1
- package/dist/client/assets/{label-e_K4YDqp.js → label-CsL-OElX.js} +1 -1
- package/dist/client/assets/{layout-Cy_J0p_o.js → layout-DF9wdGSW.js} +1 -1
- package/dist/client/assets/{login-xGEpDivd.js → login-DyMtPKsY.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C-pMNz9v.js → mcp-oauth-Oh3fBR-I.js} +1 -1
- package/dist/client/assets/{members-CC-2cCAT.js → members-mI9ssb-e.js} +1 -1
- package/dist/client/assets/{monaco-editor-DUyZdAa_.js → monaco-editor-CYehdSpz.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-bNijYvvx.js → monitoring-stats-row-CDR8BLpn.js} +1 -1
- package/dist/client/assets/{multi-select-gtHlBK9r.js → multi-select-BbW8P09i.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CTTnR4Mu.js → oauth-callback-ai-provider-Bz5xK9o7.js} +1 -1
- package/dist/client/assets/{oauth-callback-DNfh6ZtW.js → oauth-callback-cFKyUyJ8.js} +1 -1
- package/dist/client/assets/{onboarding-CoFIBVvV.js → onboarding-D6cdF-KB.js} +1 -1
- package/dist/client/assets/{org-layout-JbEu2nBF.js → org-layout-C67zScwb.js} +1 -1
- package/dist/client/assets/{organization-choice-DkBUMeta.js → organization-choice-BddSHo8S.js} +1 -1
- package/dist/client/assets/{orgs-FFap09Yo.js → orgs-CabJqlQF.js} +1 -1
- package/dist/client/assets/{page-seo-form-XQBBNsnP.js → page-seo-form-K9J3MbqA.js} +1 -1
- package/dist/client/assets/{popover-DsXc6l2I.js → popover-e3NOnq27.js} +1 -1
- package/dist/client/assets/{post-editor-Xy1CQHW4.js → post-editor-mmw5Whkz.js} +1 -1
- package/dist/client/assets/{primitives-BRbKcQWJ.js → primitives-CXkzmtDO.js} +1 -1
- package/dist/client/assets/{profile-BCgRKRSx.js → profile-BrIttCoG.js} +1 -1
- package/dist/client/assets/project-app-view-DfVcz3mz.js +1 -0
- package/dist/client/assets/record-editor-jFe4oltd.js +1 -0
- package/dist/client/assets/{redirect-editor-B6avvLR2.js → redirect-editor-NmOaoYXA.js} +1 -1
- package/dist/client/assets/registry-BVB8AhHM.js +2 -0
- package/dist/client/assets/{registry-layout-D4CeNzPB.js → registry-layout-DfZvCE4r.js} +1 -1
- package/dist/client/assets/{reports-BeuSE98w.js → reports-C8cpegoY.js} +1 -1
- package/dist/client/assets/{require-capability-B2xNqWlE.js → require-capability-Ugvygn2l.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DKB0DSoW.js → required-auth-layout-B7fJ-urm.js} +1 -1
- package/dist/client/assets/{reset-password-B3xAhRZC.js → reset-password-BBeztk88.js} +1 -1
- package/dist/client/assets/{roles-Brd8jWim.js → roles-DJVtts4C.js} +1 -1
- package/dist/client/assets/{search-input-pF42nMvu.js → search-input-DuNbyDnI.js} +1 -1
- package/dist/client/assets/{secrets-B7Pozgu1.js → secrets-CL6VpQMw.js} +1 -1
- package/dist/client/assets/{sections-editor-BNH4SlNG.js → sections-editor-BEa6HqWr.js} +1 -1
- package/dist/client/assets/{select-CfHjzQs1.js → select-C4aFiW2I.js} +1 -1
- package/dist/client/assets/{select-model-BZGyVnGU.js → select-model-B0MmI45q.js} +2 -2
- package/dist/client/assets/self-tool-result-B7Vs-DB4.js +1 -0
- package/dist/client/assets/{seo-editor-o2hT1Fd1.js → seo-editor-aemMUIyH.js} +1 -1
- package/dist/client/assets/{settings-layout-Bw3eywxs.js → settings-layout-BpN79oxk.js} +1 -1
- package/dist/client/assets/{settings-section-BA0c6PY5.js → settings-section-CKusp0NV.js} +1 -1
- package/dist/client/assets/{shell-controls-BX6v9ABL.js → shell-controls-DCF_o1Wz.js} +1 -1
- package/dist/client/assets/{shell-layout-B14LHt19.js → shell-layout-C7X7u7dF.js} +1 -1
- package/dist/client/assets/{sidebar-CqFJJsn_.js → sidebar-DEKq2mMP.js} +1 -1
- package/dist/client/assets/{skeleton-C6AkZENI.js → skeleton-5Jz-giH7.js} +1 -1
- package/dist/client/assets/{spinner-BKOlJNrL.js → spinner-CbvPV2aL.js} +1 -1
- package/dist/client/assets/{sso-CtTJKqYM.js → sso-Bz3HJguV.js} +1 -1
- package/dist/client/assets/{store-B8ngEb7f.js → store-CZxNhIqd.js} +1 -1
- package/dist/client/assets/store-registry-DmW6WtYk.js +2 -0
- package/dist/client/assets/{studio-tools-CLFVLlmy.js → studio-tools-BqN3YlVg.js} +1 -1
- package/dist/client/assets/{switch-BbwFIFVc.js → switch-C949Jz8k.js} +1 -1
- package/dist/client/assets/{tab-id-C4ltBuCa.js → tab-id-CANmBUoL.js} +1 -1
- package/dist/client/assets/{table-D-BeO5iq.js → table-DWRwEwJN.js} +1 -1
- package/dist/client/assets/{tabs-DKxrb6gS.js → tabs-er9hIkoX.js} +1 -1
- package/dist/client/assets/{textarea-CuGss4kW.js → textarea-DeNW1syB.js} +1 -1
- package/dist/client/assets/{toggle-group-BefwCY1T.js → toggle-group-BvqZ7hTZ.js} +1 -1
- package/dist/client/assets/{toolbar-iFmi5hLl.js → toolbar-BFoReQai.js} +1 -1
- package/dist/client/assets/{tooltip-Bvm9Xbb5.js → tooltip-DVLkD7eP.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DpuyC8C4.js → use-ai-providers-DqSmhoHO.js} +1 -1
- package/dist/client/assets/{use-automations-CuNoYyo2.js → use-automations-BbdOX1EI.js} +1 -1
- package/dist/client/assets/{use-autosave-RO8-WsHU.js → use-autosave-CT_x5Kwx.js} +1 -1
- package/dist/client/assets/{use-capability-DkBqztj8.js → use-capability-C8s9UNLp.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CCMI_QzN.js → use-clock-tick-D2QjFOq5.js} +1 -1
- package/dist/client/assets/{use-connection-BCaQjlRr.js → use-connection-CQiPqd5M.js} +1 -1
- package/dist/client/assets/{use-copy-DszG7Ezv.js → use-copy-BBEZDlhE.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Bjq7Dbci.js → use-create-virtual-mcp-CBU32EIm.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-FrA4S0j-.js → use-debounced-autosave-NyR6RMqh.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Byzx0x69.js → use-debounced-value-JkXvUgNA.js} +1 -1
- package/dist/client/assets/{use-deco-credits-4VjgP2qZ.js → use-deco-credits-BtkkTpkF.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CI4d8DWY.js → use-decopilot-events-CxMUbQvc.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BYEy0smD.js → use-delete-connection-Cu2A-eg_.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Bz0fhG6h.js → use-deployment-admin-D2jiEiF4.js} +1 -1
- package/dist/client/assets/{use-file-configs-BqypoWGa.js → use-file-configs-lX-2aSMW.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CA4EtLp-.js → use-infinite-scroll-DGD_C7Nc.js} +1 -1
- package/dist/client/assets/{use-join-requests-B6PctWgv.js → use-join-requests-YGWyNLcj.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-D1B-7_GU.js → use-mcp-auth-status-DUueea7l.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BYtR6Aj1.js → use-mcp-client-Bp0V_VYt.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BU63GSUC.js → use-mcp-tools-Dx7BvXz3.js} +1 -1
- package/dist/client/assets/{use-members-DsTlXoH1.js → use-members-pO3FysO_.js} +1 -1
- package/dist/client/assets/{use-mobile-B6O3bT8M.js → use-mobile-BioOlGj3.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DZ1moCkE.js → use-navigate-to-agent-2RaJlgXp.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-D5_yKvt2.js → use-org-auth-client-Bd53q4-3.js} +1 -1
- package/dist/client/assets/{use-org-sso-DhnjOsdB.js → use-org-sso-ChjV-NAY.js} +1 -1
- package/dist/client/assets/{use-organization-roles-VEKl-lNF.js → use-organization-roles-DaRUGOEG.js} +1 -1
- package/dist/client/assets/{use-organization-settings-UbVLVwZl.js → use-organization-settings-BdKCIltZ.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DkNVOupz.js → use-registry-connections-jce4fdTg.js} +1 -1
- package/dist/client/assets/{use-secrets-BCUyTIPx.js → use-secrets-CSe23K3Y.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DFcxItJU.js → use-status-sounds-Dn-K97JH.js} +1 -1
- package/dist/client/assets/{use-tags-U4MW2IKo.js → use-tags-BoPTnX1y.js} +1 -1
- package/dist/client/assets/{use-view-mode-CNYTRP_z.js → use-view-mode-B41avsK7.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-4HBmTrxs.js → use-virtual-mcp-d5fqtvja.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-XvwZZsPO.js +1 -0
- package/dist/client/assets/{useQueries-wDLuP_61.js → useQueries-B9aPgIOE.js} +1 -1
- package/dist/client/assets/{useRouterState-ByzhxHyn.js → useRouterState-onycPMlI.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DEsN-TgG.js +1 -0
- package/dist/client/assets/{users-CsSQqyF1.js → users-D4L6gJd6.js} +1 -1
- package/dist/client/assets/{variant-calendar-Dv1Q208w.js → variant-calendar-Bkdzenxa.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-C0MvSLJ0.js → view-mode-toggle-CjT9F-lG.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +218 -218
- package/dist/server/server.js +40 -40
- package/package.json +1 -1
- package/dist/client/assets/project-app-view-Cm8HmU1B.js +0 -1
- package/dist/client/assets/record-editor-BcexChf4.js +0 -1
- package/dist/client/assets/registry-Bn_PSmDC.js +0 -2
- package/dist/client/assets/self-tool-result-BUVCvp3t.js +0 -1
- package/dist/client/assets/store-registry-Cn0U3BtV.js +0 -2
- package/dist/client/assets/useInfiniteQuery-hqL0Oy0c.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Dx-lbWy-.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cG as v,cH as $,cI as W,cJ as L,cK as H,cL as D,cM as V,cN as x,cO as q,cP as j,cQ as y,cR as N,cS as B,cT as Z,cU as F}from"./index-C5z96HUa.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function K(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function Q(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&K(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Y(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function M(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=N.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=B[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof H||n instanceof D)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof V)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await P(c,{fetchFn:i}),!o)try{o=await T(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new q(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const k=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(k),d=k}}const C=!e.redirectUrl;if(n!==void 0||C){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const S=await e.tokens();if(S?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:S.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof j)||l instanceof y))throw l}const z=e.state?await e.state():void 0,{authorizationUrl:I,codeVerifier:b}=await ue(c,{metadata:u,clientInformation:d,state:z,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(b),await e.redirectToAuthorization(I),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function T(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return v.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function E(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??L;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await E(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await E(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function P(e,{fetchFn:t=fetch,protocolVersion:n=L}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?$.parse(await o.json()):W.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await T(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await P(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await F(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function O(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=Q(r,h);Y(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await M(u);return x.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=O(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=O(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await M(s);return Z.parse(await s.json())}export{pe as U,_e as a,P as b,me as c,T as d,Ue as e};
|
|
1
|
+
import{cG as v,cH as $,cI as W,cJ as L,cK as H,cL as D,cM as V,cN as x,cO as q,cP as j,cQ as y,cR as N,cS as B,cT as Z,cU as F}from"./index-McNHHn0I.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function K(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function Q(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&K(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Y(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function M(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=N.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=B[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof H||n instanceof D)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof V)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await P(c,{fetchFn:i}),!o)try{o=await T(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new q(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const k=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(k),d=k}}const C=!e.redirectUrl;if(n!==void 0||C){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const S=await e.tokens();if(S?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:S.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof j)||l instanceof y))throw l}const z=e.state?await e.state():void 0,{authorizationUrl:I,codeVerifier:b}=await ue(c,{metadata:u,clientInformation:d,state:z,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(b),await e.redirectToAuthorization(I),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function T(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return v.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function E(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??L;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await E(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await E(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function P(e,{fetchFn:t=fetch,protocolVersion:n=L}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?$.parse(await o.json()):W.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await T(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await P(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await F(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function O(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=Q(r,h);Y(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await M(u);return x.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=O(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=O(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await M(s);return Z.parse(await s.json())}export{pe as U,_e as a,P as b,me as c,T as d,Ue as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./index-
|
|
1
|
+
import"./index-McNHHn0I.js";import{i as u,a as p}from"./mcp-oauth-Oh3fBR-I.js";async function k({connectionId:n,orgId:s,orgSlug:o,persistFallback:r}){const c=new URL(`/api/${o}/mcp/${n}`,window.location.origin),i=await u({url:c.href,token:null,orgId:s});if(!i.supportsOAuth||i.isAuthenticated)return{ran:!1,ok:!0,error:null};const{token:t,tokenInfo:e,error:a}=await p({connectionId:n,orgSlug:o,scope:"offline_access"});if(a||!t)return{ran:!0,ok:!1,error:a??"no token received"};if(e)try{(await fetch(`/api/${o}/connections/${n}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:e.accessToken,refreshToken:e.refreshToken,expiresIn:e.expiresIn,scope:e.scope,clientId:e.clientId,clientSecret:e.clientSecret,tokenEndpoint:e.tokenEndpoint})})).ok||await r(t)}catch{await r(t)}else await r(t);return{ran:!0,ok:!0,error:null}}export{k as a};
|
package/dist/client/assets/{automation-list-row-D8s_P_fv.js → automation-list-row-BZwO9g9-.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as G,b as J,r as U,m as W,j as t,B as X}from"./index-
|
|
1
|
+
import{c as G,b as J,r as U,m as W,j as t,B as X}from"./index-McNHHn0I.js";import{c as Y,d as Z,b as ee,f as te,g as se,e as ie,a as ne,A as oe}from"./alert-dialog-CFi8SxDt.js";import{D as ae,c as re,b as le,a as ce}from"./dropdown-menu-BV1vrBtO.js";import{s as me}from"./Stars02-foLNDsGr.js";import{a as ue}from"./DotsVertical-B9HzbaMu.js";import{s as de}from"./Trash01-DztRWcPm.js";import{i as fe}from"./Zap-DU2GtHsA.js";import{u as ge}from"./use-virtual-mcp-d5fqtvja.js";import{A as xe}from"./agent-icon-BJvz5x4A.js";import{u as pe}from"./use-automations-BbdOX1EI.js";function ke(c){const e=G.c(80),{automation:s,showAgent:a,onClick:n}=c,i=J(),{remove:o}=pe(),[l,O]=U.useState(!1),r=ge(a?s.virtual_mcp_id:void 0);let S;e[0]!==s.id||e[1]!==o?(S=()=>{o.mutate(s.id),O(!1)},e[0]=s.id,e[1]=o,e[2]=S):S=e[2];const I=S;let E;e[3]!==n?(E=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=E):E=e[4];const H=E,V=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==V?(u=W("inline-block size-2 rounded-full shrink-0",V),e[5]=V,e[6]=u):u=e[6];const q=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==q?(d=i(q),e[7]=i,e[8]=q,e[9]=d):d=e[9];let f;e[10]!==u||e[11]!==d?(f=t.jsx("span",{className:u,"aria-label":d}),e[10]=u,e[11]=d,e[12]=f):f=e[12];let g;e[13]!==r?.icon||e[14]!==r?.title||e[15]!==s.name||e[16]!==a?(g=a&&t.jsx(xe,{icon:r?.icon??null,name:r?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=r?.icon,e[14]=r?.title,e[15]=s.name,e[16]=a,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==r||e[21]!==a?(p=a&&r&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",r.title]}),e[20]=r,e[21]=a,e[22]=p):p=e[22];let h;e[23]!==p||e[24]!==x?(h=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p]}),e[23]=p,e[24]=x,e[25]=h):h=e[25];let j;e[26]!==s.nearest_next_run_at||e[27]!==s.trigger_count?(j=t.jsx(we,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[26]=s.nearest_next_run_at,e[27]=s.trigger_count,e[28]=j):j=e[28];let w;e[29]!==h||e[30]!==j?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[h,j]}),e[29]=h,e[30]=j,e[31]=w):w=e[31];let F;e[32]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(ae,{asChild:!0,children:t.jsx(X,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(ue,{size:16})})}),e[32]=F):F=e[32];let $,B;e[33]===Symbol.for("react.memo_cache_sentinel")?($=m=>{m.stopPropagation(),O(!0)},B=t.jsx(de,{size:16}),e[33]=$,e[34]=B):($=e[33],B=e[34]);let v;e[35]!==i?(v=i("automations.automationListRow.delete"),e[35]=i,e[36]=v):v=e[36];let _;e[37]!==v?(_=t.jsx("div",{onClick:je,onKeyDown:he,role:"presentation",className:"shrink-0",children:t.jsxs(re,{children:[F,t.jsx(le,{align:"end",children:t.jsxs(ce,{variant:"destructive",onClick:$,children:[B,v]})})]})}),e[37]=v,e[38]=_):_=e[38];let b;e[39]!==H||e[40]!==n||e[41]!==w||e[42]!==_||e[43]!==f||e[44]!==g?(b=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:H,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[f,g,w,_]}),e[39]=H,e[40]=n,e[41]=w,e[42]=_,e[43]=f,e[44]=g,e[45]=b):b=e[45];let A;e[46]!==i?(A=i("automations.automationListRow.deleteTitle"),e[46]=i,e[47]=A):A=e[47];let D;e[48]!==A?(D=t.jsx(Y,{children:A}),e[48]=A,e[49]=D):D=e[49];let N;e[50]!==s.name||e[51]!==i?(N=i("automations.automationListRow.deleteDescription",{name:s.name}),e[50]=s.name,e[51]=i,e[52]=N):N=e[52];let R;e[53]!==N?(R=t.jsx(Z,{children:N}),e[53]=N,e[54]=R):R=e[54];let y;e[55]!==D||e[56]!==R?(y=t.jsxs(ee,{children:[D,R]}),e[55]=D,e[56]=R,e[57]=y):y=e[57];let C;e[58]!==i?(C=i("automations.automationListRow.cancel"),e[58]=i,e[59]=C):C=e[59];let L;e[60]!==C?(L=t.jsx(te,{children:C}),e[60]=C,e[61]=L):L=e[61];const Q=o.isPending;let k;e[62]!==i?(k=i("automations.automationListRow.deleteButton"),e[62]=i,e[63]=k):k=e[63];let P;e[64]!==I||e[65]!==o.isPending||e[66]!==k?(P=t.jsx(se,{onClick:I,disabled:Q,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:k}),e[64]=I,e[65]=o.isPending,e[66]=k,e[67]=P):P=e[67];let T;e[68]!==L||e[69]!==P?(T=t.jsxs(ie,{children:[L,P]}),e[68]=L,e[69]=P,e[70]=T):T=e[70];let z;e[71]!==y||e[72]!==T?(z=t.jsxs(ne,{children:[y,T]}),e[71]=y,e[72]=T,e[73]=z):z=e[73];let M;e[74]!==l||e[75]!==z?(M=t.jsx(oe,{open:l,onOpenChange:O,children:z}),e[74]=l,e[75]=z,e[76]=M):M=e[76];let K;return e[77]!==b||e[78]!==M?(K=t.jsxs(t.Fragment,{children:[b,M]}),e[77]=b,e[78]=M,e[79]=K):K=e[79],K}function he(c){return c.stopPropagation()}function je(c){return c.stopPropagation()}function we(c){const e=G.c(8),{triggerCount:s,nextRunAt:a}=c,n=J();if(s===0){let o;e[0]!==n?(o=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=o):o=e[1];let l;return e[2]!==o?(l=t.jsx("span",{className:"text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=l):l=e[3],l}let i;return e[4]!==a||e[5]!==n||e[6]!==s?(i=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:a?t.jsxs(t.Fragment,{children:[t.jsx(me,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(a).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(fe,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=a,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{ke as A};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as R,c as L,b as V,Z as Rn,j as n,B as Ce,Y as ss,X as Pn,_ as An,m as K,p as En,aA as Ln,ax as we,aE as Mn,aD as Se,bL as Be,aB as Pe,bM as xs,az as hs,F as je,o as Dn,e as Fn,K as pe,t as ft,n as Ue,d as Me,E as gs,av as bs,bN as kt,aC as zn,bO as _e}from"./index-C5z96HUa.js";import{e as On}from"./select-CfHjzQs1.js";import{u as ys}from"./useInfiniteQuery-hqL0Oy0c.js";import{a as js,u as Bn}from"./use-connection-BCaQjlRr.js";import{k as Un,u as Tt,f as Hn,i as Wn,a as Vn,S as qn}from"./use-mcp-client-BYtR6Aj1.js";import{a as Gn}from"./use-virtual-mcp-4HBmTrxs.js";import{C as Xn}from"./card-D9wL9dTh.js";import{o as vs,m as Ss,p as _t,q as Ct}from"./sidebar-CqFJJsn_.js";import{c as Ns,e as ws,a as Qe,d as fe,b as ks,T as me}from"./table-D-BeO5iq.js";import{E as mt}from"./empty-state-BCvGyZLy.js";import{u as It}from"./use-infinite-scroll-CA4EtLp-.js";import{u as Yn}from"./use-members-DsTlXoH1.js";import{u as Ts,S as Ee}from"./use-clock-tick-CCMI_QzN.js";import{e as Kn}from"./use-automations-CuNoYyo2.js";import{u as _s}from"./studio-tools-CLFVLlmy.js";import{u as Jn}from"./useSuspenseInfiniteQuery-Dx-lbWy-.js";import{A as Cs}from"./avatar-CTumFCbj.js";import{t as Ge}from"./ChevronDown-iz8GGXYf.js";import{n as pt}from"./ChevronUp-B_5wkNuX.js";import{n as Is,t as Qn,c as $s,i as Zn,a as $t}from"./Tool02-Cl243TWc.js";import{h as el,aN as tl,aO as sl,a6 as nl,E as ll,aP as ol,ad as rl,i as ns,at as al,C as il,m as cl,aQ as ul,aL as Rs,aR as dl,A as Ps,aS as be,aT as fl,n as ml}from"./agent-icon-CCUMqxdM.js";import{t as Ze}from"./Stars01-CG7B88Hp.js";import{i as As,b as He}from"./XCircle-kQ0ojGH_.js";import{i as Rt}from"./Check-CHkRYtKv.js";import{i as ls}from"./ChevronRight-IZpQro-r.js";import{a as Es}from"./Copy01-DqCXRbuf.js";import{b as Ne,t as Pt,c as os}from"./format-time-BnbuEtat.js";import{u as Ls}from"./use-copy-DszG7Ezv.js";import{T as Ie,a as $e,c as Re}from"./tooltip-Bvm9Xbb5.js";import{j as At,I as pl,R as xl,J as hl,t as gl,U as he,V as Ms,W as De,c as bl,u as yl,M as jl,e as vl,f as Sl}from"./calendar-BWxZGbm4.js";import{d as Nl,c as wl,r as kl,e as Tl}from"./hooks-BjnWnySg.js";import{j as Fe,F as _l,k as Et,b as Ds,a as Cl}from"./chat-context-BfEg8nLE.js";import{c as Il}from"./monaco-editor-DUyZdAa_.js";import{g as Fs,M as $l}from"./index-BzKLOnFf.js";import{f as Rl,o as Pl,q as Al}from"./tab-id-C4ltBuCa.js";import{i as zs}from"./AlertCircle-BGHhwPMz.js";import{s as El}from"./Eye-B3l_I5H4.js";import{s as Xe,t as Os}from"./Star01-CrRln1Rx.js";import{s as Ll}from"./XClose-D6-r04ej.js";import{n as xt}from"./ZapSquare-DoqhYI6E.js";import{d as Ml,c as Dl,a as We}from"./Tool01-CI-RLBBN.js";import{i as ze}from"./Monitor01-DzTNjVje.js";import{i as Fl}from"./SearchMd-DDDVQvP3.js";import{i as zl}from"./Upload01-BsMkvI2Y.js";import{u as Ol,a as Bl}from"./shell-layout-B14LHt19.js";import{n as Bs}from"./LinkExternal01-BB8z5B3f.js";import{I as ke}from"./integration-icon-BaxJDQkh.js";import{i as Ul}from"./ArrowUpRight-BDWcfY0c.js";import{a as Lt}from"./Users03-B6z_0qm4.js";import{a as ye}from"./Palette-kESI43-X.js";import{c as Us}from"./use-navigate-to-agent-DZ1moCkE.js";import{a as Hl}from"./Stars02-CS8WQJ6g.js";import{g as Wl}from"./AreaChart-ARF_scZ5.js";import{b as Vl,a as ql,c as Gl,d as Xl,e as Yl}from"./dialog-BAq0LYoh.js";import{a as Kl,F as Jl,b as Ql,c as Zl,d as eo,e as to}from"./form-BESoe__r.js";import{I as so}from"./input-CbEIVRiv.js";import{S as no}from"./spinner-BKOlJNrL.js";const lo={openrouter:s=>{const e=s?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function Hs(s){if(!s?.providerMetadata)return 0;for(const e of Object.values(lo)){const t=e(s.providerMetadata);if(t!==null)return t}return 0}function Ws(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function Vs(s,e){if(!e)return s;const t=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,l=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:s.inputTokens+(e.inputTokens??0),outputTokens:s.outputTokens+(e.outputTokens??0),reasoningTokens:s.reasoningTokens+(e.reasoningTokens??0),totalTokens:s.totalTokens+(e.totalTokens??0),cost:s.cost+Hs(e),cacheReadTokens:s.cacheReadTokens+t,cacheWriteTokens:s.cacheWriteTokens+l}}function Bc(s){return s.reduce((e,t)=>Vs(e,t.metadata?.usage),Ws())}const oo={damping:.7,stiffness:.05,mass:1.25},ro=70,ao=1e3/60,io=350;let et=!1;globalThis.document?.addEventListener("mousedown",()=>{et=!0});globalThis.document?.addEventListener("mouseup",()=>{et=!1});globalThis.document?.addEventListener("click",()=>{et=!1});const co=(s={})=>{const[e,t]=R.useState(!1),[l,o]=R.useState(s.initial!==!1),[a,r]=R.useState(!1),u=R.useRef(null);u.current=s;const i=R.useCallback(()=>{if(!et)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const v=b.getRangeAt(0);return v.commonAncestorContainer.contains(g.current)||g.current?.contains(v.commonAncestorContainer)},[]),c=R.useCallback(b=>{f.isAtBottom=b,o(b)},[]),m=R.useCallback(b=>{f.escapedFromLock=b,t(b)},[]),f=R.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:l,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return g.current?.scrollTop??0},set scrollTop(v){if(g.current){const{scrollBehavior:j}=getComputedStyle(g.current);j!=="auto"&&(g.current.style.scrollBehavior="auto"),g.current.scrollTop=v,f.ignoreScrollToTop=g.current.scrollTop,j!=="auto"&&(g.current.style.scrollBehavior=j)}},get targetScrollTop(){return!g.current||!y.current?0:g.current.scrollHeight-1-g.current.clientHeight},get calculatedTargetScrollTop(){if(!g.current||!y.current)return 0;const{targetScrollTop:v}=this;if(!s.targetScrollTop)return v;if(b?.targetScrollTop===v)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(v,{scrollElement:g.current,contentElement:y.current}),v),0);return b={targetScrollTop:v,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=ro}}},[]),d=R.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||c(!0);const v=Date.now()+(Number(b.wait)||0),j=it(u.current,b.animation),{ignoreEscapes:T=!1}=b;let S,N=f.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{S=Date.now()}):S=v+(b.duration??0);const w=async()=>{const k=new Promise(requestAnimationFrame).then(()=>{if(!f.isAtBottom)return f.animation=void 0,!1;const{scrollTop:_}=f,C=performance.now(),I=(C-(f.lastTick??C))/ao;if(f.animation||(f.animation={behavior:j,promise:k,ignoreEscapes:T}),f.animation.behavior===j&&(f.lastTick=C),i()||v>Date.now())return w();if(_<Math.min(N,f.calculatedTargetScrollTop)){if(f.animation?.behavior===j){if(j==="instant")return f.scrollTop=f.calculatedTargetScrollTop,w();f.velocity=(j.damping*f.velocity+j.stiffness*f.scrollDifference)/j.mass,f.accumulated+=f.velocity*I,f.scrollTop+=f.accumulated,f.scrollTop!==_&&(f.accumulated=0)}return w()}return S>Date.now()?(N=f.calculatedTargetScrollTop,w()):(f.animation=void 0,f.scrollTop<f.calculatedTargetScrollTop?d({animation:it(u.current,u.current.resize),ignoreEscapes:T,duration:Math.max(0,S-Date.now())||void 0}):f.isAtBottom)});return k.then(_=>(requestAnimationFrame(()=>{f.animation||(f.lastTick=void 0,f.velocity=0)}),_))};return b.wait!==!0&&(f.animation=void 0),f.animation?.behavior===j?f.animation.promise:w()},[c,i,f]),p=R.useCallback(()=>{m(!0),c(!1)},[m,c]),x=R.useCallback(({target:b})=>{if(b!==g.current)return;const{scrollTop:v,ignoreScrollToTop:j}=f;let{lastScrollTop:T=v}=f;f.lastScrollTop=v,f.ignoreScrollToTop=void 0,j&&j>v&&(T=j),r(f.isNearBottom),setTimeout(()=>{if(f.resizeDifference||v===j)return;if(i()){m(!0),c(!1);return}const S=v>T,N=v<T;if(f.animation?.ignoreEscapes){f.scrollTop=T;return}N&&(m(!0),c(!1)),S&&m(!1),!f.escapedFromLock&&f.isNearBottom&&c(!0)},1)},[m,c,i,f]),h=R.useCallback(({target:b,deltaY:v})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===g.current&&v<0&&g.current.scrollHeight>g.current.clientHeight&&!f.animation?.ignoreEscapes&&(m(!0),c(!1))},[m,c,f]),g=rs(b=>{g.current?.removeEventListener("scroll",x),g.current?.removeEventListener("wheel",h),b?.addEventListener("scroll",x,{passive:!0}),b?.addEventListener("wheel",h,{passive:!0})},[]),y=rs(b=>{if(f.resizeObserver?.disconnect(),f.resizeObserver=void 0,!b)return;let v;f.resizeObserver=new ResizeObserver(([j])=>{const{height:T}=j.contentRect,S=T-(v??T);if(f.resizeDifference=S,f.scrollTop>f.targetScrollTop&&(f.scrollTop=f.targetScrollTop),r(f.isNearBottom),S>=0){const N=it(u.current,v?u.current.resize:u.current.initial);d({animation:N,wait:!0,preserveScrollPosition:!0,duration:N==="instant"?void 0:io})}else f.isNearBottom&&(m(!1),c(!0));v=T,requestAnimationFrame(()=>{setTimeout(()=>{f.resizeDifference===S&&(f.resizeDifference=0)},1)})}),f.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:g,scrollToBottom:d,stopScroll:p,isAtBottom:l||a,isNearBottom:a,escapedFromLock:e,state:f}};function rs(s,e){const t=R.useCallback(l=>(t.current=l,s(l)),e);return t}const at=new Map;function it(...s){const e={...oo};let t=!1;for(const o of s){if(o==="instant"){t=!0;continue}typeof o=="object"&&(t=!1,e.damping=o.damping??e.damping,e.stiffness=o.stiffness??e.stiffness,e.mass=o.mass??e.mass)}const l=JSON.stringify(e);return at.has(l)||at.set(l,Object.freeze(e)),t?"instant":at.get(l)}function uo(s){let e=2166136261;for(let t=0;t<s.length;t++)e=Math.imul(e^s.charCodeAt(t),16777619);return`a${(e>>>0).toString(36).padStart(6,"0").slice(-6)}`}function Mt(s){if(s&&typeof s=="object"&&"gatewayClientId"in s&&typeof s.gatewayClientId=="string")return s.gatewayClientId}function Dt(s,e){if(!e)return s;const t=`${uo(e)}_`;return s.startsWith(t)?s.slice(t.length):s}function fo(s,e){return Dt(s,e).replace(/[_-]/g," ").toLowerCase()}function mo(s){const e={};for(const t of s?.arguments??[])e[t.name]=t.required?ss().min(1,"Required"):ss();return Pn(e)}function po(s,e){const t={};for(const l of s.arguments??[])t[l.name]=e?.[l.name]??"";return t}function xo(s){const e=L.c(71),{prompt:t,setPrompt:l,onSubmit:o,defaultValues:a}=s,r=R.useId(),u=V();let i,c;if(e[0]!==t){const D=mo(t);c=An,i=Rn(D),e[0]=t,e[1]=i,e[2]=c}else i=e[1],c=e[2];let m;e[3]!==a||e[4]!==t?(m=t?po(t,a):{},e[3]=a,e[4]=t,e[5]=m):m=e[5];let f;e[6]!==i||e[7]!==m?(f={resolver:i,defaultValues:m,mode:"onChange"},e[6]=i,e[7]=m,e[8]=f):f=e[8];const d=c(f);let p;e[9]!==t?.arguments?(p=t?.arguments??[],e[9]=t?.arguments,e[10]=p):p=e[10];const x=p;let h;e[11]!==d||e[12]!==o||e[13]!==l?(h=async D=>{await o(D),l(null),d.reset()},e[11]=d,e[12]=o,e[13]=l,e[14]=h):h=e[14];const g=h;let y;e[15]!==d||e[16]!==l?(y=D=>{D||(d.reset(),l(null))},e[15]=d,e[16]=l,e[17]=y):y=e[17];const b=y;if(!t)return null;let v;e[18]!==t._meta||e[19]!==t.name||e[20]!==t.title?(v=t.title||fo(t.name,Mt(t._meta)),e[18]=t._meta,e[19]=t.name,e[20]=t.title,e[21]=v):v=e[21];let j;e[22]!==v?(j=n.jsx(Vl,{children:n.jsx("span",{className:"capitalize",children:v})}),e[22]=v,e[23]=j):j=e[23];let T;e[24]!==t.description?(T=t.description&&n.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),e[24]=t.description,e[25]=T):T=e[25];let S;e[26]!==T||e[27]!==j?(S=n.jsxs(ql,{children:[j,T]}),e[26]=T,e[27]=j,e[28]=S):S=e[28];let N;e[29]!==d||e[30]!==g?(N=D=>{D.stopPropagation(),d.handleSubmit(g)(D)},e[29]=d,e[30]=g,e[31]=N):N=e[31];let w;if(e[32]!==x||e[33]!==d.control||e[34]!==d.formState.isSubmitting){let D;e[36]!==d.control||e[37]!==d.formState.isSubmitting?(D=O=>n.jsx(Jl,{control:d.control,name:O.name,render:B=>{const{field:U}=B;return n.jsxs(Ql,{children:[n.jsxs(Zl,{className:"text-xs",children:[O.name,O.required?null:n.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),n.jsx(eo,{children:n.jsx(so,{...U,value:U.value??"",required:O.required,placeholder:O.description??"",className:"h-9",disabled:d.formState.isSubmitting})}),n.jsx(to,{})]})}},O.name),e[36]=d.control,e[37]=d.formState.isSubmitting,e[38]=D):D=e[38],w=x.map(D),e[32]=x,e[33]=d.control,e[34]=d.formState.isSubmitting,e[35]=w}else w=e[35];let k;e[39]!==b?(k=()=>b(!1),e[39]=b,e[40]=k):k=e[40];const _=d.formState.isSubmitting;let C;e[41]!==u?(C=u("chat.dialogPromptArguments.cancel"),e[41]=u,e[42]=C):C=e[42];let I;e[43]!==d.formState.isSubmitting||e[44]!==k||e[45]!==C?(I=n.jsx(Ce,{type:"button",variant:"ghost",onClick:k,disabled:_,children:C}),e[43]=d.formState.isSubmitting,e[44]=k,e[45]=C,e[46]=I):I=e[46];let E;e[47]!==d.formState.isSubmitting||e[48]!==u?(E=d.formState.isSubmitting?n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(no,{size:"xs"}),u("chat.dialogPromptArguments.loading")]}):u("chat.dialogPromptArguments.usePrompt"),e[47]=d.formState.isSubmitting,e[48]=u,e[49]=E):E=e[49];let P;e[50]!==d.formState.isSubmitting||e[51]!==r||e[52]!==E?(P=n.jsx(Ce,{type:"submit",form:r,disabled:d.formState.isSubmitting,children:E}),e[50]=d.formState.isSubmitting,e[51]=r,e[52]=E,e[53]=P):P=e[53];let $;e[54]!==I||e[55]!==P?($=n.jsxs(Gl,{children:[I,P]}),e[54]=I,e[55]=P,e[56]=$):$=e[56];let A;e[57]!==r||e[58]!==N||e[59]!==w||e[60]!==$?(A=n.jsxs("form",{id:r,className:"space-y-4 py-4",autoComplete:"off",onSubmit:N,children:[w,$]}),e[57]=r,e[58]=N,e[59]=w,e[60]=$,e[61]=A):A=e[61];let M;e[62]!==d||e[63]!==A?(M=n.jsx(Kl,{...d,children:A}),e[62]=d,e[63]=A,e[64]=M):M=e[64];let F;e[65]!==S||e[66]!==M?(F=n.jsxs(Xl,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[S,M]}),e[65]=S,e[66]=M,e[67]=F):F=e[67];let z;return e[68]!==b||e[69]!==F?(z=n.jsx(Yl,{open:!0,onOpenChange:b,children:F}),e[68]=b,e[69]=F,e[70]=z):z=e[70],z}const ho=/^mcp__[a-zA-Z0-9_-]+__/;function qs(s){return s.replace(ho,"")}function tt(s){const e=L.c(19),{id:t,part:l,copyable:o,extraActions:a,alwaysShowActions:r,animate:u}=s,i=o===void 0?!1:o,c=r===void 0?!1:r,m=u===void 0?!1:u,{handleCopy:f}=Ls(),d=V(),[p,x]=R.useState(!1);let h;e[0]!==f||e[1]!==t||e[2]!==l.text?(h=async()=>{En("chat_message_copied",{message_id:t,chars:l.text.length}),await f(l.text),x(!0),setTimeout(()=>x(!1),2e3)},e[0]=f,e[1]=t,e[2]=l.text,e[3]=h):h=e[3];const g=h,y=i&&a,b=y||a;let v;e[4]!==m||e[5]!==t||e[6]!==l.text?(v=n.jsx(At,{id:t,text:l.text,animate:m}),e[4]=m,e[5]=t,e[6]=l.text,e[7]=v):v=e[7];let j;e[8]!==c||e[9]!==a||e[10]!==g||e[11]!==p||e[12]!==b||e[13]!==y||e[14]!==d?(j=b&&n.jsxs("div",{className:K("flex w-full items-center gap-2 text-sm text-muted-foreground transition-all duration-200 mt-1 py-1",c?"opacity-100":"opacity-0 pointer-events-none group-hover/part:opacity-100 group-hover/part:pointer-events-auto"),children:[a,y&&a&&n.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),y&&n.jsx("button",{type:"button",onClick:g,className:"text-muted-foreground [@media(hover:hover)]:hover:text-foreground transition-colors active:scale-[0.97]","aria-label":d("chat.textPart.copyMessage"),children:p?n.jsx(Rt,{className:"size-4"}):n.jsx(Es,{className:"size-4"})})]}),e[8]=c,e[9]=a,e[10]=g,e[11]=p,e[12]=b,e[13]=y,e[14]=d,e[15]=j):j=e[15];let T;return e[16]!==v||e[17]!==j?(T=n.jsxs("div",{className:"group/part relative",children:[v,j]}),e[16]=v,e[17]=j,e[18]=T):T=e[18],T}function Uc(s,e,t){s.chain().focus().insertContentAt(e,[go(t),{type:"text",text:" "}]).run()}function go(s){return{type:"file",attrs:s}}function bo(s){const e=L.c(17),{node:t,selected:l,view:o}=s,{name:a,mimeType:r,data:u}=t.attrs,i=l&&o.editable;let c;e[0]!==r?(c=r.startsWith("image/"),e[0]=r,e[1]=c):c=e[1];const m=c,f=i&&"outline-2 outline-blue-300 outline-offset-0";let d;e[2]!==f?(d=K("px-1 py-1 rounded","inline-flex items-center gap-1","cursor-default select-none","text-xs font-light","bg-muted text-muted-foreground",f),e[2]=f,e[3]=d):d=e[3];let p;e[4]!==a?(p=n.jsx(Ie,{asChild:!0,children:n.jsx("span",{children:a})}),e[4]=a,e[5]=p):p=e[5];let x;e[6]!==u||e[7]!==m||e[8]!==r||e[9]!==a?(x=n.jsx($e,{side:"top",className:"max-w-sm p-1.5",children:m?n.jsx("img",{src:`data:${r};base64,${u}`,alt:a,className:"max-w-full max-h-64 object-contain rounded"}):n.jsxs("div",{className:"text-xs",children:[n.jsx("div",{className:"font-medium",children:a}),n.jsx("div",{className:"text-muted-foreground mt-1",children:r})]})}),e[6]=u,e[7]=m,e[8]=r,e[9]=a,e[10]=x):x=e[10];let h;e[11]!==p||e[12]!==x?(h=n.jsxs(Re,{children:[p,x]}),e[11]=p,e[12]=x,e[13]=h):h=e[13];let g;return e[14]!==d||e[15]!==h?(g=n.jsx(hl,{className:d,children:h}),e[14]=d,e[15]=h,e[16]=g):g=e[16],g}const yo=pl.create({name:"file",group:"inline",inline:!0,atom:!0,addAttributes(){return{id:{default:null,parseHTML:s=>s.getAttribute("data-id")||null,renderHTML:s=>s.id?{"data-id":s.id}:{}},name:{default:null,parseHTML:s=>s.getAttribute("data-name")||null,renderHTML:s=>s.name?{"data-name":s.name}:{}},mimeType:{default:null,parseHTML:s=>s.getAttribute("data-mime-type")||null,renderHTML:s=>s.mimeType?{"data-mime-type":s.mimeType}:{}},size:{default:0,parseHTML:s=>{const e=s.getAttribute("data-size");return e?Number.parseInt(e,10):0},renderHTML:s=>s.size?{"data-size":String(s.size)}:{}},data:{default:null,parseHTML:s=>s.getAttribute("data-data")||null,renderHTML:s=>s.data?{"data-data":s.data}:{}}}},parseHTML(){return[{tag:'span[data-type="file"]'}]},renderHTML({node:s,HTMLAttributes:e}){const t={"data-type":"file"};return s.attrs.id&&(t["data-id"]=s.attrs.id),s.attrs.name&&(t["data-name"]=s.attrs.name),s.attrs.mimeType&&(t["data-mime-type"]=s.attrs.mimeType),s.attrs.size&&(t["data-size"]=String(s.attrs.size)),s.attrs.data&&(t["data-data"]=s.attrs.data),["span",{...e,...t}]},renderText({node:s}){return`[${s.attrs.name??""}]`},addNodeView(){return xl(bo)}}),Te=16,ht=2.5,gt=(Te-ht)/2,ct=2*Math.PI*gt;function Gs(s){const e=L.c(31),{usage:t}=s;if(!t)return null;const{totalTokens:l,inputTokens:o,outputTokens:a,cost:r}=t;if(!l&&!o&&!a)return null;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(el,{size:12}),e[0]=u):u=e[0];let i;e[1]!==r||e[2]!==l?(i=r>0?`$${r.toFixed(4)}`:l.toLocaleString(),e[1]=r,e[2]=l,e[3]=i):i=e[3];let c;e[4]!==i?(c=n.jsx(Ie,{asChild:!0,children:n.jsxs("span",{className:"inline-flex items-center text-muted-foreground [@media(hover:hover)]:hover:text-foreground pl-1 h-6 gap-1 whitespace-nowrap shrink-0 cursor-default",children:[u,n.jsx("span",{className:"text-sm font-mono tabular-nums",children:i})]})}),e[4]=i,e[5]=c):c=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("p",{className:"text-muted text-[10px] mb-1",children:"tokens"}),e[6]=m):m=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("span",{className:"text-muted",children:"in"}),e[7]=f):f=e[7];let d;e[8]!==o?(d=o.toLocaleString(),e[8]=o,e[9]=d):d=e[9];let p;e[10]!==d?(p=n.jsx("span",{className:"text-right tabular-nums",children:d}),e[10]=d,e[11]=p):p=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("span",{className:"text-muted",children:"out"}),e[12]=x):x=e[12];const h=a-(t.reasoningTokens??0);let g;e[13]!==h?(g=h.toLocaleString(),e[13]=h,e[14]=g):g=e[14];let y;e[15]!==g?(y=n.jsx("span",{className:"text-right tabular-nums",children:g}),e[15]=g,e[16]=y):y=e[16];let b;e[17]!==o||e[18]!==t.cacheReadTokens||e[19]!==t.cacheWriteTokens?(b=(t.cacheReadTokens>0||t.cacheWriteTokens>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:o>0?`${(t.cacheReadTokens/o*100).toFixed(0)}%`:"0%"})]}),e[17]=o,e[18]=t.cacheReadTokens,e[19]=t.cacheWriteTokens,e[20]=b):b=e[20];let v;e[21]!==r?(v=r>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cost"}),n.jsxs("span",{className:"text-right tabular-nums",children:["$",r.toFixed(4)]})]}),e[21]=r,e[22]=v):v=e[22];let j;e[23]!==y||e[24]!==b||e[25]!==v||e[26]!==p?(j=n.jsxs($e,{side:"top",className:"font-mono text-[11px]",children:[m,n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[f,p,x,y,b,v]})]}),e[23]=y,e[24]=b,e[25]=v,e[26]=p,e[27]=j):j=e[27];let T;return e[28]!==j||e[29]!==c?(T=n.jsxs(Re,{children:[c,j]}),e[28]=j,e[29]=c,e[30]=T):T=e[30],T}function jo(s){const e=L.c(19),{usage:t,duration:l}=s,o=l!=null&&l>0,a=t!=null&&(t.cost??0)>0,r=t!=null&&(t.totalTokens??0)>0;if(!o&&!a&&!r)return null;let u;e[0]!==l||e[1]!==o?(u=o?Ne(l/1e3):null,e[0]=l,e[1]=o,e[2]=u):u=e[2];const i=u;let c;e[3]!==l||e[4]!==i||e[5]!==t?(c=i&&n.jsxs(Re,{children:[n.jsx(Ie,{asChild:!0,children:n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:i})}),n.jsxs($e,{side:"top",className:"font-mono text-[11px]",children:[n.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"thinking"}),n.jsx("span",{className:"tabular-nums",children:Ne(l/1e3)}),(t?.reasoningTokens??0)>0&&n.jsxs("span",{className:"ml-2 opacity-50",children:[t.reasoningTokens.toLocaleString()," tok"]})]})]}),e[3]=l,e[4]=i,e[5]=t,e[6]=c):c=e[6];let m;e[7]!==a||e[8]!==o||e[9]!==r?(m=o&&(a||r)&&n.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),e[7]=a,e[8]=o,e[9]=r,e[10]=m):m=e[10];let f;e[11]!==a||e[12]!==r||e[13]!==t?(f=(a||r)&&n.jsxs(Re,{children:[n.jsx(Ie,{asChild:!0,children:n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:a?`$${t.cost.toFixed(4)}`:`${t.totalTokens.toLocaleString()} tok`})}),n.jsxs($e,{side:"top",className:"font-mono text-[11px]",children:[n.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"tokens"}),n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[n.jsx("span",{className:"opacity-60",children:"in"}),n.jsx("span",{className:"text-right tabular-nums",children:(t.inputTokens??0).toLocaleString()}),n.jsx("span",{className:"opacity-60",children:"out"}),n.jsx("span",{className:"text-right tabular-nums",children:((t.outputTokens??0)-(t?.reasoningTokens??0)).toLocaleString()}),(t?.reasoningTokens??0)>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"opacity-60",children:"think"}),n.jsx("span",{className:"text-right tabular-nums",children:t.reasoningTokens.toLocaleString()})]}),((t?.cacheReadTokens??0)>0||(t?.cacheWriteTokens??0)>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"opacity-60",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:(t?.inputTokens??0)>0?`${((t?.cacheReadTokens??0)/t.inputTokens*100).toFixed(0)}%`:"0%"})]})]})]})]}),e[11]=a,e[12]=r,e[13]=t,e[14]=f):f=e[14];let d;return e[15]!==c||e[16]!==m||e[17]!==f?(d=n.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[c,m,f]}),e[15]=c,e[16]=m,e[17]=f,e[18]=d):d=e[18],d}function Hc(s){const e=L.c(51),{usage:t,totalTokens:l,contextWindow:o,onOpenContextPanel:a}=s,r=Math.min(l/o*100,100),u=ct-r/100*ct,i=t?.cost??0,c=t?.inputTokens??0,m=t?.outputTokens??0;let f;e[0]!==r?(f=r.toFixed(0),e[0]=r,e[1]=f):f=e[1];let d;e[2]!==i?(d=i>0?`, $${i.toFixed(2)}`:"",e[2]=i,e[3]=d):d=e[3];const p=`Context usage: ${f}%${d}`,x=a?"cursor-pointer":"cursor-default";let h;e[4]!==x?(h=K("flex items-center gap-1.5 text-muted-foreground hover:text-foreground h-6 px-1 shrink-0",x),e[4]=x,e[5]=h):h=e[5];let g;e[6]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx("circle",{cx:Te/2,cy:Te/2,r:gt,fill:"none",stroke:"currentColor",strokeWidth:ht,className:"opacity-15"}),e[6]=g):g=e[6];const y=r>90?"text-destructive":r>70?"text-warning":"text-muted-foreground";let b;e[7]!==y?(b=K(y),e[7]=y,e[8]=b):b=e[8];let v;e[9]!==u||e[10]!==b?(v=n.jsxs("svg",{width:Te,height:Te,className:"-rotate-90",children:[g,n.jsx("circle",{cx:Te/2,cy:Te/2,r:gt,fill:"none",stroke:"currentColor",strokeWidth:ht,strokeDasharray:ct,strokeDashoffset:u,strokeLinecap:"round",className:b})]}),e[9]=u,e[10]=b,e[11]=v):v=e[11];let j;e[12]!==r?(j=r.toFixed(0),e[12]=r,e[13]=j):j=e[13];let T;e[14]!==i?(T=i>0?` · $${i.toFixed(2)}`:"",e[14]=i,e[15]=T):T=e[15];let S;e[16]!==j||e[17]!==T?(S=n.jsxs("span",{className:"inline-block overflow-hidden whitespace-nowrap max-w-0 opacity-0 transition-[max-width,opacity] duration-200 ease-out @[320px]/chat-bottom:max-w-32 @[320px]/chat-bottom:opacity-100 text-[11px] font-mono tabular-nums",children:[j,"%",T]}),e[16]=j,e[17]=T,e[18]=S):S=e[18];let N;e[19]!==a||e[20]!==S||e[21]!==p||e[22]!==h||e[23]!==v?(N=n.jsx(Ie,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:a,"aria-label":p,className:h,children:[v,S]})}),e[19]=a,e[20]=S,e[21]=p,e[22]=h,e[23]=v,e[24]=N):N=e[24];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx("span",{className:"text-muted",children:"context"}),e[25]=w):w=e[25];let k;e[26]!==l?(k=l.toLocaleString(),e[26]=l,e[27]=k):k=e[27];let _;e[28]!==o?(_=o.toLocaleString(),e[28]=o,e[29]=_):_=e[29];let C;e[30]!==r?(C=r.toFixed(1),e[30]=r,e[31]=C):C=e[31];let I;e[32]!==k||e[33]!==_||e[34]!==C?(I=n.jsxs("span",{className:"text-right tabular-nums",children:[k," / ",_," (",C,"%)"]}),e[32]=k,e[33]=_,e[34]=C,e[35]=I):I=e[35];let E;e[36]!==i||e[37]!==c||e[38]!==m?(E=i>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cost"}),n.jsxs("span",{className:"text-right tabular-nums",children:["$",i.toFixed(4)]}),n.jsx("span",{className:"text-muted",children:"in"}),n.jsx("span",{className:"text-right tabular-nums",children:c.toLocaleString()}),n.jsx("span",{className:"text-muted",children:"out"}),n.jsx("span",{className:"text-right tabular-nums",children:m.toLocaleString()})]}),e[36]=i,e[37]=c,e[38]=m,e[39]=E):E=e[39];let P;e[40]!==c||e[41]!==t?.cacheReadTokens||e[42]!==t?.cacheWriteTokens?(P=((t?.cacheReadTokens??0)>0||(t?.cacheWriteTokens??0)>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:c>0?`${((t?.cacheReadTokens??0)/c*100).toFixed(0)}%`:"0%"})]}),e[40]=c,e[41]=t?.cacheReadTokens,e[42]=t?.cacheWriteTokens,e[43]=P):P=e[43];let $;e[44]!==I||e[45]!==E||e[46]!==P?($=n.jsx($e,{side:"top",className:"font-mono text-[11px]",children:n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[w,I,E,P]})}),e[44]=I,e[45]=E,e[46]=P,e[47]=$):$=e[47];let A;return e[48]!==N||e[49]!==$?(A=n.jsxs(Re,{children:[N,$]}),e[48]=N,e[49]=$,e[50]=A):A=e[50],A}var st="Collapsible",[vo,Wc]=hs(st),[So,Ft]=vo(st),Xs=R.forwardRef((s,e)=>{const{__scopeCollapsible:t,open:l,defaultOpen:o,disabled:a,onOpenChange:r,...u}=s,[i,c]=Ln({prop:l,defaultProp:o??!1,onChange:r,caller:st});return n.jsx(So,{scope:t,disabled:a,contentId:Mn(),open:i,onOpenToggle:R.useCallback(()=>c(m=>!m),[c]),children:n.jsx(we.div,{"data-state":Ut(i),"data-disabled":a?"":void 0,...u,ref:e})})});Xs.displayName=st;var Ys="CollapsibleTrigger",zt=R.forwardRef((s,e)=>{const{__scopeCollapsible:t,...l}=s,o=Ft(Ys,t);return n.jsx(we.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Ut(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...l,ref:e,onClick:Se(s.onClick,o.onOpenToggle)})});zt.displayName=Ys;var Ot="CollapsibleContent",Bt=R.forwardRef((s,e)=>{const{forceMount:t,...l}=s,o=Ft(Ot,s.__scopeCollapsible);return n.jsx(Be,{present:t||o.open,children:({present:a})=>n.jsx(No,{...l,ref:e,present:a})})});Bt.displayName=Ot;var No=R.forwardRef((s,e)=>{const{__scopeCollapsible:t,present:l,children:o,...a}=s,r=Ft(Ot,t),[u,i]=R.useState(l),c=R.useRef(null),m=Pe(e,c),f=R.useRef(0),d=f.current,p=R.useRef(0),x=p.current,h=r.open||u,g=R.useRef(h),y=R.useRef(void 0);return R.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),xs(()=>{const b=c.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const v=b.getBoundingClientRect();f.current=v.height,p.current=v.width,g.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),i(l)}},[r.open,l]),n.jsx(we.div,{"data-state":Ut(r.open),"data-disabled":r.disabled?"":void 0,id:r.contentId,hidden:!h,...a,ref:m,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...s.style},children:h&&o})});function Ut(s){return s?"open":"closed"}var wo=Xs,Vc=zt,qc=Bt;function ko(s){const e=L.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(wo,{"data-slot":"collapsible",...t}),e[2]=t,e[3]=l):l=e[3],l}function To(s){const e=L.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(zt,{"data-slot":"collapsible-trigger",...t}),e[2]=t,e[3]=l):l=e[3],l}function _o(s){const e=L.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(Bt,{"data-slot":"collapsible-content",...t}),e[2]=t,e[3]=l):l=e[3],l}function Y({icon:s,title:e,usage:t,summary:l,state:o,detail:a,detailVariant:r="code",forceOpen:u,variant:i="default",trailing:c,iconDestructive:m,alwaysChevron:f,defaultOpen:d,children:p}){const x=V(),[h,g]=R.useState(d??!1),{handleCopy:y,copied:b}=Ls(),v=o==="loading",j=o==="error",S=!!(a&&a.trim())||!!p,N=i==="subtask",w=(u??!1)||h,k=co({initial:v?"instant":!1}),_=n.jsxs(ko,{open:w,onOpenChange:u?void 0:g,className:"min-w-0",children:[n.jsxs(To,{disabled:!S,className:K("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",S&&"[@media(hover:hover)]:hover:bg-accent/30",!S&&"cursor-default",v&&"shimmer"),"aria-disabled":!S,children:[n.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:f?n.jsx(ls,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",w&&"rotate-90")}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:K("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",m?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",S&&(w?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),S&&n.jsx("div",{className:K("absolute inset-0 flex items-center justify-center transition-opacity duration-150",w?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:n.jsx(ls,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",w&&"rotate-90")})})]})}),n.jsx("span",{className:K("shrink-0 text-[14px] font-normal",j?"text-warning/80":"text-foreground"),children:e}),l?n.jsx("span",{className:"min-w-0 flex-1 truncate",children:n.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:l})}):n.jsx("div",{className:"flex-1"}),c&&n.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:c}),n.jsx(Gs,{usage:t})]}),S&&n.jsx(_o,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(r==="prose"?n.jsx("div",{className:"mt-1 mb-1",children:n.jsx("div",{ref:k.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:n.jsx("p",{ref:k.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:a})})}):n.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:n.jsx("div",{ref:k.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:n.jsxs("div",{ref:k.contentRef,className:"flex items-start justify-between gap-2",children:[n.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:n.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:a})}),n.jsx("button",{type:"button",onClick:()=>y(a),className:"shrink-0 p-1.5 rounded-md text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":x("common.copy"),children:b?n.jsx(Rt,{className:"size-3.5"}):n.jsx(Es,{className:"size-3.5"})})]})})}))})]});return N?n.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:_}):_}function ue(s){const e=L.c(4),{latency:t}=s;if(t==null||t<=0)return null;let l;e[0]!==t?(l=Ne(t),e[0]=t,e[1]=l):l=e[1];let o;return e[2]!==l?(o=n.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:l}),e[2]=l,e[3]=o):o=e[3],o}const Ks=4;function Js(s){const e=L.c(8),{count:t,noun:l,onClick:o}=s,a=V();let r;e[0]!==t||e[1]!==l||e[2]!==a?(r=a("common.seeAll",{count:t,noun:l}),e[0]=t,e[1]=l,e[2]=a,e[3]=r):r=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(As,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=u):u=e[4];let i;return e[5]!==o||e[6]!==r?(i=n.jsxs("button",{type:"button",onClick:o,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[r,u]}),e[5]=o,e[6]=r,e[7]=i):i=e[7],i}function Qs(s){const e=L.c(12),{message:t,className:l}=s,o=t.created_at??t.metadata?.created_at??null;let a,r,u,i;if(e[0]!==l||e[1]!==o){i=Symbol.for("react.early_return_sentinel");e:{const m=Pt(o);if(m===null){i=null;break e}const f=new Date(m);a=f.toLocaleString(),e[6]!==l?(r=K("text-[11px] text-muted-foreground/60 select-none",l),e[6]=l,e[7]=r):r=e[7],u=f.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=l,e[1]=o,e[2]=a,e[3]=r,e[4]=u,e[5]=i}else a=e[2],r=e[3],u=e[4],i=e[5];if(i!==Symbol.for("react.early_return_sentinel"))return i;let c;return e[8]!==a||e[9]!==r||e[10]!==u?(c=n.jsx("span",{title:a,className:r,children:u}),e[8]=a,e[9]=r,e[10]=u,e[11]=c):c=e[11],c}function bt(s){const e=L.c(9),{since:t}=s;let l;e[0]!==t?(l=()=>os(t,Date.now()),e[0]=t,e[1]=l):l=e[1];const[o,a]=R.useState(l);let r,u;e[2]!==t?(r=()=>{const f=setInterval(()=>a(os(t,Date.now())),100);return()=>clearInterval(f)},u=[t],e[2]=t,e[3]=r,e[4]=u):(r=e[3],u=e[4]),R.useEffect(r,u);const i=o/1e3;let c;e[5]!==i?(c=Ne(i),e[5]=i,e[6]=c):c=e[6];let m;return e[7]!==c?(m=n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:c}),e[7]=c,e[8]=m):m=e[8],m}const Zs=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Co(){const s=L.c(5),[e]=R.useState(Io);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let l;s[1]!==e?(l=Zs.map((a,r)=>{const{delay:u}=a;return n.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[r],animation:"grid-ripple 1s ease infinite",animationDelay:`${u}ms`}},r)}),s[1]=e,s[2]=l):l=s[2];let o;return s[3]!==l?(o=n.jsx("div",{className:"grid",style:t,children:l}),s[3]=l,s[4]=o):o=s[4],o}function Io(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Zs.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}function $o(s){return{planning:{icon:n.jsx(sl,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:n.jsx(Ze,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const Ro=1200;function yt(s){const e=L.c(8),{icon:t,title:l,summary:o,detail:a,state:r,detailVariant:u,trailing:i}=s,c=u===void 0?"prose":u;let m;return e[0]!==a||e[1]!==c||e[2]!==t||e[3]!==r||e[4]!==o||e[5]!==l||e[6]!==i?(m=n.jsx(Y,{icon:t,title:l,summary:o,detail:a,state:r,detailVariant:c,trailing:i}),e[0]=a,e[1]=c,e[2]=t,e[3]=r,e[4]=o,e[5]=l,e[6]=i,e[7]=m):m=e[7],m}function Po(s){const e=L.c(22),{startedAt:t}=s,l=V(),o=Fe()?.runStatusStage??null,[a,r]=R.useState("planning");let u,i;if(e[0]!==o?(u=()=>{if(o!==null)return;const h=setTimeout(()=>{r("thinking")},Ro);return()=>{clearTimeout(h)}},i=[o],e[0]=o,e[1]=u,e[2]=i):(u=e[1],i=e[2]),R.useEffect(u,i),o!==null){let h;e[3]!==o||e[4]!==l?(h=Nl(l,o),e[3]=o,e[4]=l,e[5]=h):h=e[5];const g=h;let y;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(Ze,{className:"size-4"}),e[6]=y):y=e[6];const b=`${g.label}...`;let v;e[7]!==t?(v=t!==null&&n.jsx(bt,{since:t}),e[7]=t,e[8]=v):v=e[8];let j;return e[9]!==g.detail||e[10]!==b||e[11]!==v?(j=n.jsx(yt,{icon:y,title:b,summary:g.detail,state:"loading",trailing:v}),e[9]=g.detail,e[10]=b,e[11]=v,e[12]=j):j=e[12],j}let c;e[13]!==l?(c=$o(l),e[13]=l,e[14]=c):c=e[14];const f=c[a],d=`${f.label}...`;let p;e[15]!==t?(p=t!==null&&n.jsx(bt,{since:t}),e[15]=t,e[16]=p):p=e[16];let x;return e[17]!==f.detail||e[18]!==f.icon||e[19]!==d||e[20]!==p?(x=n.jsx(yt,{icon:f.icon,title:d,summary:f.detail,state:"loading",trailing:p}),e[17]=f.detail,e[18]=f.icon,e[19]=d,e[20]=p,e[21]=x):x=e[21],x}function Ao(s){const e=L.c(3),{startedAt:t}=s;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Co,{}),e[0]=l):l=e[0];let o;return e[1]!==t?(o=n.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[l,n.jsx(bt,{since:t})]}),e[1]=t,e[2]=o):o=e[2],o}const Eo=2e4;function Lo(s){const e=L.c(9),{startedAt:t}=s,l=V();Ts(1e3);const o=Fe(),r=(t!==null?Date.now()-t:0)>=Eo;let u;e[0]!==t?(u=n.jsx(Po,{startedAt:t}),e[0]=t,e[1]=u):u=e[1];let i;e[2]!==r||e[3]!==o||e[4]!==l?(i=r&&o?.stop&&n.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[n.jsx("span",{children:l("chat.thinkingIndicator.takingLonger")}),n.jsx("button",{type:"button",onClick:()=>o.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:l("chat.thinkingIndicator.cancel")})]}),e[2]=r,e[3]=o,e[4]=l,e[5]=i):i=e[5];let c;return e[6]!==u||e[7]!==i?(c=n.jsxs("div",{className:"flex flex-col gap-0.5",children:[u,i]}),e[6]=u,e[7]=i,e[8]=c):c=e[8],c}function Mo(s){const e=L.c(24),{duration:t,parts:l,isStreaming:o}=s,a=V();let r;e[0]!==l?(r=l.every(zo),e[0]=l,e[1]=r):r=e[1];const u=r;let i;e[2]!==t||e[3]!==a?(i=t&&t/1e3>1?a("chat.thinkingIndicator.thoughtFor",{duration:Ne(t/1e3)}):a("chat.thinkingIndicator.thought"),e[2]=t,e[3]=a,e[4]=i):i=e[4];const c=i;let m;if(e[5]!==u||e[6]!==o||e[7]!==l){const v=l.map(Fo).join(`
|
|
1
|
+
import{r as R,c as L,b as V,Z as Rn,j as n,B as Ce,Y as ss,X as Pn,_ as An,m as K,p as En,aA as Ln,ax as we,aE as Mn,aD as Se,bL as Be,aB as Pe,bM as xs,az as hs,F as je,o as Dn,e as Fn,K as pe,t as ft,n as Ue,d as Me,E as gs,av as bs,bN as kt,aC as zn,bO as _e}from"./index-McNHHn0I.js";import{e as On}from"./select-C4aFiW2I.js";import{u as ys}from"./useInfiniteQuery-XvwZZsPO.js";import{a as js,u as Bn}from"./use-connection-CQiPqd5M.js";import{k as Un,u as Tt,f as Hn,i as Wn,a as Vn,S as qn}from"./use-mcp-client-Bp0V_VYt.js";import{a as Gn}from"./use-virtual-mcp-d5fqtvja.js";import{C as Xn}from"./card-CZUw8wdn.js";import{o as vs,m as Ss,p as _t,q as Ct}from"./sidebar-DEKq2mMP.js";import{c as Ns,e as ws,a as Qe,d as fe,b as ks,T as me}from"./table-DWRwEwJN.js";import{E as mt}from"./empty-state-m9N9NPai.js";import{u as It}from"./use-infinite-scroll-DGD_C7Nc.js";import{u as Yn}from"./use-members-pO3FysO_.js";import{u as Ts,S as Ee}from"./use-clock-tick-D2QjFOq5.js";import{e as Kn}from"./use-automations-BbdOX1EI.js";import{u as _s}from"./studio-tools-BqN3YlVg.js";import{u as Jn}from"./useSuspenseInfiniteQuery-DEsN-TgG.js";import{A as Cs}from"./avatar-DWN9ZeFA.js";import{t as Ge}from"./ChevronDown-bjr6MfsA.js";import{n as pt}from"./ChevronUp-DZ3KXJj2.js";import{n as Is,t as Qn,c as $s,i as Zn,a as $t}from"./Tool02-Dh8WmTu2.js";import{h as el,aN as tl,aO as sl,a6 as nl,E as ll,aP as ol,ad as rl,i as ns,at as al,C as il,m as cl,aQ as ul,aL as Rs,aR as dl,A as Ps,aS as be,aT as fl,n as ml}from"./agent-icon-BJvz5x4A.js";import{t as Ze}from"./Stars01-B6LcwT44.js";import{i as As,b as He}from"./XCircle-jdbnXcmW.js";import{i as Rt}from"./Check-9lRvtdWC.js";import{i as ls}from"./ChevronRight-DKljoVRD.js";import{a as Es}from"./Copy01-WdtIApkR.js";import{b as Ne,t as Pt,c as os}from"./format-time-BnbuEtat.js";import{u as Ls}from"./use-copy-BBEZDlhE.js";import{T as Ie,a as $e,c as Re}from"./tooltip-DVLkD7eP.js";import{j as At,I as pl,R as xl,J as hl,t as gl,U as he,V as Ms,W as De,c as bl,u as yl,M as jl,e as vl,f as Sl}from"./calendar-GFSVia_G.js";import{d as Nl,c as wl,r as kl,e as Tl}from"./hooks-BNzxeS18.js";import{j as Fe,F as _l,k as Et,b as Ds,a as Cl}from"./chat-context-DCRbAwAe.js";import{c as Il}from"./monaco-editor-CYehdSpz.js";import{g as Fs,M as $l}from"./index-kpWNxDXC.js";import{f as Rl,o as Pl,q as Al}from"./tab-id-CANmBUoL.js";import{i as zs}from"./AlertCircle-BYNQ7Jkt.js";import{s as El}from"./Eye-DiCzIXG3.js";import{s as Xe,t as Os}from"./Star01-BBwSXqXY.js";import{s as Ll}from"./XClose-7B366K4b.js";import{n as xt}from"./ZapSquare-B00HYz0P.js";import{d as Ml,c as Dl,a as We}from"./Tool01-Bd3Lw8Th.js";import{i as ze}from"./Monitor01-Bt0uc0us.js";import{i as Fl}from"./SearchMd-CcK3a1rX.js";import{i as zl}from"./Upload01-x8BbaEO4.js";import{u as Ol,a as Bl}from"./shell-layout-C7X7u7dF.js";import{n as Bs}from"./LinkExternal01-BdGE95-A.js";import{I as ke}from"./integration-icon-CK3ofyKi.js";import{i as Ul}from"./ArrowUpRight-D8Yru5LS.js";import{a as Lt}from"./Users03-D4U-n8Y-.js";import{a as ye}from"./Palette-BUAxJzMW.js";import{c as Us}from"./use-navigate-to-agent-2RaJlgXp.js";import{a as Hl}from"./Stars02-foLNDsGr.js";import{g as Wl}from"./AreaChart-CYQD4k74.js";import{b as Vl,a as ql,c as Gl,d as Xl,e as Yl}from"./dialog-FKE1myak.js";import{a as Kl,F as Jl,b as Ql,c as Zl,d as eo,e as to}from"./form-CXtyRGVW.js";import{I as so}from"./input-DEpui_nJ.js";import{S as no}from"./spinner-CbvPV2aL.js";const lo={openrouter:s=>{const e=s?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function Hs(s){if(!s?.providerMetadata)return 0;for(const e of Object.values(lo)){const t=e(s.providerMetadata);if(t!==null)return t}return 0}function Ws(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function Vs(s,e){if(!e)return s;const t=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,l=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:s.inputTokens+(e.inputTokens??0),outputTokens:s.outputTokens+(e.outputTokens??0),reasoningTokens:s.reasoningTokens+(e.reasoningTokens??0),totalTokens:s.totalTokens+(e.totalTokens??0),cost:s.cost+Hs(e),cacheReadTokens:s.cacheReadTokens+t,cacheWriteTokens:s.cacheWriteTokens+l}}function Bc(s){return s.reduce((e,t)=>Vs(e,t.metadata?.usage),Ws())}const oo={damping:.7,stiffness:.05,mass:1.25},ro=70,ao=1e3/60,io=350;let et=!1;globalThis.document?.addEventListener("mousedown",()=>{et=!0});globalThis.document?.addEventListener("mouseup",()=>{et=!1});globalThis.document?.addEventListener("click",()=>{et=!1});const co=(s={})=>{const[e,t]=R.useState(!1),[l,o]=R.useState(s.initial!==!1),[a,r]=R.useState(!1),u=R.useRef(null);u.current=s;const i=R.useCallback(()=>{if(!et)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const v=b.getRangeAt(0);return v.commonAncestorContainer.contains(g.current)||g.current?.contains(v.commonAncestorContainer)},[]),c=R.useCallback(b=>{f.isAtBottom=b,o(b)},[]),m=R.useCallback(b=>{f.escapedFromLock=b,t(b)},[]),f=R.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:l,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return g.current?.scrollTop??0},set scrollTop(v){if(g.current){const{scrollBehavior:j}=getComputedStyle(g.current);j!=="auto"&&(g.current.style.scrollBehavior="auto"),g.current.scrollTop=v,f.ignoreScrollToTop=g.current.scrollTop,j!=="auto"&&(g.current.style.scrollBehavior=j)}},get targetScrollTop(){return!g.current||!y.current?0:g.current.scrollHeight-1-g.current.clientHeight},get calculatedTargetScrollTop(){if(!g.current||!y.current)return 0;const{targetScrollTop:v}=this;if(!s.targetScrollTop)return v;if(b?.targetScrollTop===v)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(v,{scrollElement:g.current,contentElement:y.current}),v),0);return b={targetScrollTop:v,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=ro}}},[]),d=R.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||c(!0);const v=Date.now()+(Number(b.wait)||0),j=it(u.current,b.animation),{ignoreEscapes:T=!1}=b;let S,N=f.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{S=Date.now()}):S=v+(b.duration??0);const w=async()=>{const k=new Promise(requestAnimationFrame).then(()=>{if(!f.isAtBottom)return f.animation=void 0,!1;const{scrollTop:_}=f,C=performance.now(),I=(C-(f.lastTick??C))/ao;if(f.animation||(f.animation={behavior:j,promise:k,ignoreEscapes:T}),f.animation.behavior===j&&(f.lastTick=C),i()||v>Date.now())return w();if(_<Math.min(N,f.calculatedTargetScrollTop)){if(f.animation?.behavior===j){if(j==="instant")return f.scrollTop=f.calculatedTargetScrollTop,w();f.velocity=(j.damping*f.velocity+j.stiffness*f.scrollDifference)/j.mass,f.accumulated+=f.velocity*I,f.scrollTop+=f.accumulated,f.scrollTop!==_&&(f.accumulated=0)}return w()}return S>Date.now()?(N=f.calculatedTargetScrollTop,w()):(f.animation=void 0,f.scrollTop<f.calculatedTargetScrollTop?d({animation:it(u.current,u.current.resize),ignoreEscapes:T,duration:Math.max(0,S-Date.now())||void 0}):f.isAtBottom)});return k.then(_=>(requestAnimationFrame(()=>{f.animation||(f.lastTick=void 0,f.velocity=0)}),_))};return b.wait!==!0&&(f.animation=void 0),f.animation?.behavior===j?f.animation.promise:w()},[c,i,f]),p=R.useCallback(()=>{m(!0),c(!1)},[m,c]),x=R.useCallback(({target:b})=>{if(b!==g.current)return;const{scrollTop:v,ignoreScrollToTop:j}=f;let{lastScrollTop:T=v}=f;f.lastScrollTop=v,f.ignoreScrollToTop=void 0,j&&j>v&&(T=j),r(f.isNearBottom),setTimeout(()=>{if(f.resizeDifference||v===j)return;if(i()){m(!0),c(!1);return}const S=v>T,N=v<T;if(f.animation?.ignoreEscapes){f.scrollTop=T;return}N&&(m(!0),c(!1)),S&&m(!1),!f.escapedFromLock&&f.isNearBottom&&c(!0)},1)},[m,c,i,f]),h=R.useCallback(({target:b,deltaY:v})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===g.current&&v<0&&g.current.scrollHeight>g.current.clientHeight&&!f.animation?.ignoreEscapes&&(m(!0),c(!1))},[m,c,f]),g=rs(b=>{g.current?.removeEventListener("scroll",x),g.current?.removeEventListener("wheel",h),b?.addEventListener("scroll",x,{passive:!0}),b?.addEventListener("wheel",h,{passive:!0})},[]),y=rs(b=>{if(f.resizeObserver?.disconnect(),f.resizeObserver=void 0,!b)return;let v;f.resizeObserver=new ResizeObserver(([j])=>{const{height:T}=j.contentRect,S=T-(v??T);if(f.resizeDifference=S,f.scrollTop>f.targetScrollTop&&(f.scrollTop=f.targetScrollTop),r(f.isNearBottom),S>=0){const N=it(u.current,v?u.current.resize:u.current.initial);d({animation:N,wait:!0,preserveScrollPosition:!0,duration:N==="instant"?void 0:io})}else f.isNearBottom&&(m(!1),c(!0));v=T,requestAnimationFrame(()=>{setTimeout(()=>{f.resizeDifference===S&&(f.resizeDifference=0)},1)})}),f.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:g,scrollToBottom:d,stopScroll:p,isAtBottom:l||a,isNearBottom:a,escapedFromLock:e,state:f}};function rs(s,e){const t=R.useCallback(l=>(t.current=l,s(l)),e);return t}const at=new Map;function it(...s){const e={...oo};let t=!1;for(const o of s){if(o==="instant"){t=!0;continue}typeof o=="object"&&(t=!1,e.damping=o.damping??e.damping,e.stiffness=o.stiffness??e.stiffness,e.mass=o.mass??e.mass)}const l=JSON.stringify(e);return at.has(l)||at.set(l,Object.freeze(e)),t?"instant":at.get(l)}function uo(s){let e=2166136261;for(let t=0;t<s.length;t++)e=Math.imul(e^s.charCodeAt(t),16777619);return`a${(e>>>0).toString(36).padStart(6,"0").slice(-6)}`}function Mt(s){if(s&&typeof s=="object"&&"gatewayClientId"in s&&typeof s.gatewayClientId=="string")return s.gatewayClientId}function Dt(s,e){if(!e)return s;const t=`${uo(e)}_`;return s.startsWith(t)?s.slice(t.length):s}function fo(s,e){return Dt(s,e).replace(/[_-]/g," ").toLowerCase()}function mo(s){const e={};for(const t of s?.arguments??[])e[t.name]=t.required?ss().min(1,"Required"):ss();return Pn(e)}function po(s,e){const t={};for(const l of s.arguments??[])t[l.name]=e?.[l.name]??"";return t}function xo(s){const e=L.c(71),{prompt:t,setPrompt:l,onSubmit:o,defaultValues:a}=s,r=R.useId(),u=V();let i,c;if(e[0]!==t){const D=mo(t);c=An,i=Rn(D),e[0]=t,e[1]=i,e[2]=c}else i=e[1],c=e[2];let m;e[3]!==a||e[4]!==t?(m=t?po(t,a):{},e[3]=a,e[4]=t,e[5]=m):m=e[5];let f;e[6]!==i||e[7]!==m?(f={resolver:i,defaultValues:m,mode:"onChange"},e[6]=i,e[7]=m,e[8]=f):f=e[8];const d=c(f);let p;e[9]!==t?.arguments?(p=t?.arguments??[],e[9]=t?.arguments,e[10]=p):p=e[10];const x=p;let h;e[11]!==d||e[12]!==o||e[13]!==l?(h=async D=>{await o(D),l(null),d.reset()},e[11]=d,e[12]=o,e[13]=l,e[14]=h):h=e[14];const g=h;let y;e[15]!==d||e[16]!==l?(y=D=>{D||(d.reset(),l(null))},e[15]=d,e[16]=l,e[17]=y):y=e[17];const b=y;if(!t)return null;let v;e[18]!==t._meta||e[19]!==t.name||e[20]!==t.title?(v=t.title||fo(t.name,Mt(t._meta)),e[18]=t._meta,e[19]=t.name,e[20]=t.title,e[21]=v):v=e[21];let j;e[22]!==v?(j=n.jsx(Vl,{children:n.jsx("span",{className:"capitalize",children:v})}),e[22]=v,e[23]=j):j=e[23];let T;e[24]!==t.description?(T=t.description&&n.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),e[24]=t.description,e[25]=T):T=e[25];let S;e[26]!==T||e[27]!==j?(S=n.jsxs(ql,{children:[j,T]}),e[26]=T,e[27]=j,e[28]=S):S=e[28];let N;e[29]!==d||e[30]!==g?(N=D=>{D.stopPropagation(),d.handleSubmit(g)(D)},e[29]=d,e[30]=g,e[31]=N):N=e[31];let w;if(e[32]!==x||e[33]!==d.control||e[34]!==d.formState.isSubmitting){let D;e[36]!==d.control||e[37]!==d.formState.isSubmitting?(D=O=>n.jsx(Jl,{control:d.control,name:O.name,render:B=>{const{field:U}=B;return n.jsxs(Ql,{children:[n.jsxs(Zl,{className:"text-xs",children:[O.name,O.required?null:n.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),n.jsx(eo,{children:n.jsx(so,{...U,value:U.value??"",required:O.required,placeholder:O.description??"",className:"h-9",disabled:d.formState.isSubmitting})}),n.jsx(to,{})]})}},O.name),e[36]=d.control,e[37]=d.formState.isSubmitting,e[38]=D):D=e[38],w=x.map(D),e[32]=x,e[33]=d.control,e[34]=d.formState.isSubmitting,e[35]=w}else w=e[35];let k;e[39]!==b?(k=()=>b(!1),e[39]=b,e[40]=k):k=e[40];const _=d.formState.isSubmitting;let C;e[41]!==u?(C=u("chat.dialogPromptArguments.cancel"),e[41]=u,e[42]=C):C=e[42];let I;e[43]!==d.formState.isSubmitting||e[44]!==k||e[45]!==C?(I=n.jsx(Ce,{type:"button",variant:"ghost",onClick:k,disabled:_,children:C}),e[43]=d.formState.isSubmitting,e[44]=k,e[45]=C,e[46]=I):I=e[46];let E;e[47]!==d.formState.isSubmitting||e[48]!==u?(E=d.formState.isSubmitting?n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(no,{size:"xs"}),u("chat.dialogPromptArguments.loading")]}):u("chat.dialogPromptArguments.usePrompt"),e[47]=d.formState.isSubmitting,e[48]=u,e[49]=E):E=e[49];let P;e[50]!==d.formState.isSubmitting||e[51]!==r||e[52]!==E?(P=n.jsx(Ce,{type:"submit",form:r,disabled:d.formState.isSubmitting,children:E}),e[50]=d.formState.isSubmitting,e[51]=r,e[52]=E,e[53]=P):P=e[53];let $;e[54]!==I||e[55]!==P?($=n.jsxs(Gl,{children:[I,P]}),e[54]=I,e[55]=P,e[56]=$):$=e[56];let A;e[57]!==r||e[58]!==N||e[59]!==w||e[60]!==$?(A=n.jsxs("form",{id:r,className:"space-y-4 py-4",autoComplete:"off",onSubmit:N,children:[w,$]}),e[57]=r,e[58]=N,e[59]=w,e[60]=$,e[61]=A):A=e[61];let M;e[62]!==d||e[63]!==A?(M=n.jsx(Kl,{...d,children:A}),e[62]=d,e[63]=A,e[64]=M):M=e[64];let F;e[65]!==S||e[66]!==M?(F=n.jsxs(Xl,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[S,M]}),e[65]=S,e[66]=M,e[67]=F):F=e[67];let z;return e[68]!==b||e[69]!==F?(z=n.jsx(Yl,{open:!0,onOpenChange:b,children:F}),e[68]=b,e[69]=F,e[70]=z):z=e[70],z}const ho=/^mcp__[a-zA-Z0-9_-]+__/;function qs(s){return s.replace(ho,"")}function tt(s){const e=L.c(19),{id:t,part:l,copyable:o,extraActions:a,alwaysShowActions:r,animate:u}=s,i=o===void 0?!1:o,c=r===void 0?!1:r,m=u===void 0?!1:u,{handleCopy:f}=Ls(),d=V(),[p,x]=R.useState(!1);let h;e[0]!==f||e[1]!==t||e[2]!==l.text?(h=async()=>{En("chat_message_copied",{message_id:t,chars:l.text.length}),await f(l.text),x(!0),setTimeout(()=>x(!1),2e3)},e[0]=f,e[1]=t,e[2]=l.text,e[3]=h):h=e[3];const g=h,y=i&&a,b=y||a;let v;e[4]!==m||e[5]!==t||e[6]!==l.text?(v=n.jsx(At,{id:t,text:l.text,animate:m}),e[4]=m,e[5]=t,e[6]=l.text,e[7]=v):v=e[7];let j;e[8]!==c||e[9]!==a||e[10]!==g||e[11]!==p||e[12]!==b||e[13]!==y||e[14]!==d?(j=b&&n.jsxs("div",{className:K("flex w-full items-center gap-2 text-sm text-muted-foreground transition-all duration-200 mt-1 py-1",c?"opacity-100":"opacity-0 pointer-events-none group-hover/part:opacity-100 group-hover/part:pointer-events-auto"),children:[a,y&&a&&n.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),y&&n.jsx("button",{type:"button",onClick:g,className:"text-muted-foreground [@media(hover:hover)]:hover:text-foreground transition-colors active:scale-[0.97]","aria-label":d("chat.textPart.copyMessage"),children:p?n.jsx(Rt,{className:"size-4"}):n.jsx(Es,{className:"size-4"})})]}),e[8]=c,e[9]=a,e[10]=g,e[11]=p,e[12]=b,e[13]=y,e[14]=d,e[15]=j):j=e[15];let T;return e[16]!==v||e[17]!==j?(T=n.jsxs("div",{className:"group/part relative",children:[v,j]}),e[16]=v,e[17]=j,e[18]=T):T=e[18],T}function Uc(s,e,t){s.chain().focus().insertContentAt(e,[go(t),{type:"text",text:" "}]).run()}function go(s){return{type:"file",attrs:s}}function bo(s){const e=L.c(17),{node:t,selected:l,view:o}=s,{name:a,mimeType:r,data:u}=t.attrs,i=l&&o.editable;let c;e[0]!==r?(c=r.startsWith("image/"),e[0]=r,e[1]=c):c=e[1];const m=c,f=i&&"outline-2 outline-blue-300 outline-offset-0";let d;e[2]!==f?(d=K("px-1 py-1 rounded","inline-flex items-center gap-1","cursor-default select-none","text-xs font-light","bg-muted text-muted-foreground",f),e[2]=f,e[3]=d):d=e[3];let p;e[4]!==a?(p=n.jsx(Ie,{asChild:!0,children:n.jsx("span",{children:a})}),e[4]=a,e[5]=p):p=e[5];let x;e[6]!==u||e[7]!==m||e[8]!==r||e[9]!==a?(x=n.jsx($e,{side:"top",className:"max-w-sm p-1.5",children:m?n.jsx("img",{src:`data:${r};base64,${u}`,alt:a,className:"max-w-full max-h-64 object-contain rounded"}):n.jsxs("div",{className:"text-xs",children:[n.jsx("div",{className:"font-medium",children:a}),n.jsx("div",{className:"text-muted-foreground mt-1",children:r})]})}),e[6]=u,e[7]=m,e[8]=r,e[9]=a,e[10]=x):x=e[10];let h;e[11]!==p||e[12]!==x?(h=n.jsxs(Re,{children:[p,x]}),e[11]=p,e[12]=x,e[13]=h):h=e[13];let g;return e[14]!==d||e[15]!==h?(g=n.jsx(hl,{className:d,children:h}),e[14]=d,e[15]=h,e[16]=g):g=e[16],g}const yo=pl.create({name:"file",group:"inline",inline:!0,atom:!0,addAttributes(){return{id:{default:null,parseHTML:s=>s.getAttribute("data-id")||null,renderHTML:s=>s.id?{"data-id":s.id}:{}},name:{default:null,parseHTML:s=>s.getAttribute("data-name")||null,renderHTML:s=>s.name?{"data-name":s.name}:{}},mimeType:{default:null,parseHTML:s=>s.getAttribute("data-mime-type")||null,renderHTML:s=>s.mimeType?{"data-mime-type":s.mimeType}:{}},size:{default:0,parseHTML:s=>{const e=s.getAttribute("data-size");return e?Number.parseInt(e,10):0},renderHTML:s=>s.size?{"data-size":String(s.size)}:{}},data:{default:null,parseHTML:s=>s.getAttribute("data-data")||null,renderHTML:s=>s.data?{"data-data":s.data}:{}}}},parseHTML(){return[{tag:'span[data-type="file"]'}]},renderHTML({node:s,HTMLAttributes:e}){const t={"data-type":"file"};return s.attrs.id&&(t["data-id"]=s.attrs.id),s.attrs.name&&(t["data-name"]=s.attrs.name),s.attrs.mimeType&&(t["data-mime-type"]=s.attrs.mimeType),s.attrs.size&&(t["data-size"]=String(s.attrs.size)),s.attrs.data&&(t["data-data"]=s.attrs.data),["span",{...e,...t}]},renderText({node:s}){return`[${s.attrs.name??""}]`},addNodeView(){return xl(bo)}}),Te=16,ht=2.5,gt=(Te-ht)/2,ct=2*Math.PI*gt;function Gs(s){const e=L.c(31),{usage:t}=s;if(!t)return null;const{totalTokens:l,inputTokens:o,outputTokens:a,cost:r}=t;if(!l&&!o&&!a)return null;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(el,{size:12}),e[0]=u):u=e[0];let i;e[1]!==r||e[2]!==l?(i=r>0?`$${r.toFixed(4)}`:l.toLocaleString(),e[1]=r,e[2]=l,e[3]=i):i=e[3];let c;e[4]!==i?(c=n.jsx(Ie,{asChild:!0,children:n.jsxs("span",{className:"inline-flex items-center text-muted-foreground [@media(hover:hover)]:hover:text-foreground pl-1 h-6 gap-1 whitespace-nowrap shrink-0 cursor-default",children:[u,n.jsx("span",{className:"text-sm font-mono tabular-nums",children:i})]})}),e[4]=i,e[5]=c):c=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("p",{className:"text-muted text-[10px] mb-1",children:"tokens"}),e[6]=m):m=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("span",{className:"text-muted",children:"in"}),e[7]=f):f=e[7];let d;e[8]!==o?(d=o.toLocaleString(),e[8]=o,e[9]=d):d=e[9];let p;e[10]!==d?(p=n.jsx("span",{className:"text-right tabular-nums",children:d}),e[10]=d,e[11]=p):p=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("span",{className:"text-muted",children:"out"}),e[12]=x):x=e[12];const h=a-(t.reasoningTokens??0);let g;e[13]!==h?(g=h.toLocaleString(),e[13]=h,e[14]=g):g=e[14];let y;e[15]!==g?(y=n.jsx("span",{className:"text-right tabular-nums",children:g}),e[15]=g,e[16]=y):y=e[16];let b;e[17]!==o||e[18]!==t.cacheReadTokens||e[19]!==t.cacheWriteTokens?(b=(t.cacheReadTokens>0||t.cacheWriteTokens>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:o>0?`${(t.cacheReadTokens/o*100).toFixed(0)}%`:"0%"})]}),e[17]=o,e[18]=t.cacheReadTokens,e[19]=t.cacheWriteTokens,e[20]=b):b=e[20];let v;e[21]!==r?(v=r>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cost"}),n.jsxs("span",{className:"text-right tabular-nums",children:["$",r.toFixed(4)]})]}),e[21]=r,e[22]=v):v=e[22];let j;e[23]!==y||e[24]!==b||e[25]!==v||e[26]!==p?(j=n.jsxs($e,{side:"top",className:"font-mono text-[11px]",children:[m,n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[f,p,x,y,b,v]})]}),e[23]=y,e[24]=b,e[25]=v,e[26]=p,e[27]=j):j=e[27];let T;return e[28]!==j||e[29]!==c?(T=n.jsxs(Re,{children:[c,j]}),e[28]=j,e[29]=c,e[30]=T):T=e[30],T}function jo(s){const e=L.c(19),{usage:t,duration:l}=s,o=l!=null&&l>0,a=t!=null&&(t.cost??0)>0,r=t!=null&&(t.totalTokens??0)>0;if(!o&&!a&&!r)return null;let u;e[0]!==l||e[1]!==o?(u=o?Ne(l/1e3):null,e[0]=l,e[1]=o,e[2]=u):u=e[2];const i=u;let c;e[3]!==l||e[4]!==i||e[5]!==t?(c=i&&n.jsxs(Re,{children:[n.jsx(Ie,{asChild:!0,children:n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:i})}),n.jsxs($e,{side:"top",className:"font-mono text-[11px]",children:[n.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"thinking"}),n.jsx("span",{className:"tabular-nums",children:Ne(l/1e3)}),(t?.reasoningTokens??0)>0&&n.jsxs("span",{className:"ml-2 opacity-50",children:[t.reasoningTokens.toLocaleString()," tok"]})]})]}),e[3]=l,e[4]=i,e[5]=t,e[6]=c):c=e[6];let m;e[7]!==a||e[8]!==o||e[9]!==r?(m=o&&(a||r)&&n.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),e[7]=a,e[8]=o,e[9]=r,e[10]=m):m=e[10];let f;e[11]!==a||e[12]!==r||e[13]!==t?(f=(a||r)&&n.jsxs(Re,{children:[n.jsx(Ie,{asChild:!0,children:n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:a?`$${t.cost.toFixed(4)}`:`${t.totalTokens.toLocaleString()} tok`})}),n.jsxs($e,{side:"top",className:"font-mono text-[11px]",children:[n.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"tokens"}),n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[n.jsx("span",{className:"opacity-60",children:"in"}),n.jsx("span",{className:"text-right tabular-nums",children:(t.inputTokens??0).toLocaleString()}),n.jsx("span",{className:"opacity-60",children:"out"}),n.jsx("span",{className:"text-right tabular-nums",children:((t.outputTokens??0)-(t?.reasoningTokens??0)).toLocaleString()}),(t?.reasoningTokens??0)>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"opacity-60",children:"think"}),n.jsx("span",{className:"text-right tabular-nums",children:t.reasoningTokens.toLocaleString()})]}),((t?.cacheReadTokens??0)>0||(t?.cacheWriteTokens??0)>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"opacity-60",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:(t?.inputTokens??0)>0?`${((t?.cacheReadTokens??0)/t.inputTokens*100).toFixed(0)}%`:"0%"})]})]})]})]}),e[11]=a,e[12]=r,e[13]=t,e[14]=f):f=e[14];let d;return e[15]!==c||e[16]!==m||e[17]!==f?(d=n.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[c,m,f]}),e[15]=c,e[16]=m,e[17]=f,e[18]=d):d=e[18],d}function Hc(s){const e=L.c(51),{usage:t,totalTokens:l,contextWindow:o,onOpenContextPanel:a}=s,r=Math.min(l/o*100,100),u=ct-r/100*ct,i=t?.cost??0,c=t?.inputTokens??0,m=t?.outputTokens??0;let f;e[0]!==r?(f=r.toFixed(0),e[0]=r,e[1]=f):f=e[1];let d;e[2]!==i?(d=i>0?`, $${i.toFixed(2)}`:"",e[2]=i,e[3]=d):d=e[3];const p=`Context usage: ${f}%${d}`,x=a?"cursor-pointer":"cursor-default";let h;e[4]!==x?(h=K("flex items-center gap-1.5 text-muted-foreground hover:text-foreground h-6 px-1 shrink-0",x),e[4]=x,e[5]=h):h=e[5];let g;e[6]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx("circle",{cx:Te/2,cy:Te/2,r:gt,fill:"none",stroke:"currentColor",strokeWidth:ht,className:"opacity-15"}),e[6]=g):g=e[6];const y=r>90?"text-destructive":r>70?"text-warning":"text-muted-foreground";let b;e[7]!==y?(b=K(y),e[7]=y,e[8]=b):b=e[8];let v;e[9]!==u||e[10]!==b?(v=n.jsxs("svg",{width:Te,height:Te,className:"-rotate-90",children:[g,n.jsx("circle",{cx:Te/2,cy:Te/2,r:gt,fill:"none",stroke:"currentColor",strokeWidth:ht,strokeDasharray:ct,strokeDashoffset:u,strokeLinecap:"round",className:b})]}),e[9]=u,e[10]=b,e[11]=v):v=e[11];let j;e[12]!==r?(j=r.toFixed(0),e[12]=r,e[13]=j):j=e[13];let T;e[14]!==i?(T=i>0?` · $${i.toFixed(2)}`:"",e[14]=i,e[15]=T):T=e[15];let S;e[16]!==j||e[17]!==T?(S=n.jsxs("span",{className:"inline-block overflow-hidden whitespace-nowrap max-w-0 opacity-0 transition-[max-width,opacity] duration-200 ease-out @[320px]/chat-bottom:max-w-32 @[320px]/chat-bottom:opacity-100 text-[11px] font-mono tabular-nums",children:[j,"%",T]}),e[16]=j,e[17]=T,e[18]=S):S=e[18];let N;e[19]!==a||e[20]!==S||e[21]!==p||e[22]!==h||e[23]!==v?(N=n.jsx(Ie,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:a,"aria-label":p,className:h,children:[v,S]})}),e[19]=a,e[20]=S,e[21]=p,e[22]=h,e[23]=v,e[24]=N):N=e[24];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx("span",{className:"text-muted",children:"context"}),e[25]=w):w=e[25];let k;e[26]!==l?(k=l.toLocaleString(),e[26]=l,e[27]=k):k=e[27];let _;e[28]!==o?(_=o.toLocaleString(),e[28]=o,e[29]=_):_=e[29];let C;e[30]!==r?(C=r.toFixed(1),e[30]=r,e[31]=C):C=e[31];let I;e[32]!==k||e[33]!==_||e[34]!==C?(I=n.jsxs("span",{className:"text-right tabular-nums",children:[k," / ",_," (",C,"%)"]}),e[32]=k,e[33]=_,e[34]=C,e[35]=I):I=e[35];let E;e[36]!==i||e[37]!==c||e[38]!==m?(E=i>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cost"}),n.jsxs("span",{className:"text-right tabular-nums",children:["$",i.toFixed(4)]}),n.jsx("span",{className:"text-muted",children:"in"}),n.jsx("span",{className:"text-right tabular-nums",children:c.toLocaleString()}),n.jsx("span",{className:"text-muted",children:"out"}),n.jsx("span",{className:"text-right tabular-nums",children:m.toLocaleString()})]}),e[36]=i,e[37]=c,e[38]=m,e[39]=E):E=e[39];let P;e[40]!==c||e[41]!==t?.cacheReadTokens||e[42]!==t?.cacheWriteTokens?(P=((t?.cacheReadTokens??0)>0||(t?.cacheWriteTokens??0)>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:c>0?`${((t?.cacheReadTokens??0)/c*100).toFixed(0)}%`:"0%"})]}),e[40]=c,e[41]=t?.cacheReadTokens,e[42]=t?.cacheWriteTokens,e[43]=P):P=e[43];let $;e[44]!==I||e[45]!==E||e[46]!==P?($=n.jsx($e,{side:"top",className:"font-mono text-[11px]",children:n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[w,I,E,P]})}),e[44]=I,e[45]=E,e[46]=P,e[47]=$):$=e[47];let A;return e[48]!==N||e[49]!==$?(A=n.jsxs(Re,{children:[N,$]}),e[48]=N,e[49]=$,e[50]=A):A=e[50],A}var st="Collapsible",[vo,Wc]=hs(st),[So,Ft]=vo(st),Xs=R.forwardRef((s,e)=>{const{__scopeCollapsible:t,open:l,defaultOpen:o,disabled:a,onOpenChange:r,...u}=s,[i,c]=Ln({prop:l,defaultProp:o??!1,onChange:r,caller:st});return n.jsx(So,{scope:t,disabled:a,contentId:Mn(),open:i,onOpenToggle:R.useCallback(()=>c(m=>!m),[c]),children:n.jsx(we.div,{"data-state":Ut(i),"data-disabled":a?"":void 0,...u,ref:e})})});Xs.displayName=st;var Ys="CollapsibleTrigger",zt=R.forwardRef((s,e)=>{const{__scopeCollapsible:t,...l}=s,o=Ft(Ys,t);return n.jsx(we.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Ut(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...l,ref:e,onClick:Se(s.onClick,o.onOpenToggle)})});zt.displayName=Ys;var Ot="CollapsibleContent",Bt=R.forwardRef((s,e)=>{const{forceMount:t,...l}=s,o=Ft(Ot,s.__scopeCollapsible);return n.jsx(Be,{present:t||o.open,children:({present:a})=>n.jsx(No,{...l,ref:e,present:a})})});Bt.displayName=Ot;var No=R.forwardRef((s,e)=>{const{__scopeCollapsible:t,present:l,children:o,...a}=s,r=Ft(Ot,t),[u,i]=R.useState(l),c=R.useRef(null),m=Pe(e,c),f=R.useRef(0),d=f.current,p=R.useRef(0),x=p.current,h=r.open||u,g=R.useRef(h),y=R.useRef(void 0);return R.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),xs(()=>{const b=c.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const v=b.getBoundingClientRect();f.current=v.height,p.current=v.width,g.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),i(l)}},[r.open,l]),n.jsx(we.div,{"data-state":Ut(r.open),"data-disabled":r.disabled?"":void 0,id:r.contentId,hidden:!h,...a,ref:m,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...s.style},children:h&&o})});function Ut(s){return s?"open":"closed"}var wo=Xs,Vc=zt,qc=Bt;function ko(s){const e=L.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(wo,{"data-slot":"collapsible",...t}),e[2]=t,e[3]=l):l=e[3],l}function To(s){const e=L.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(zt,{"data-slot":"collapsible-trigger",...t}),e[2]=t,e[3]=l):l=e[3],l}function _o(s){const e=L.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(Bt,{"data-slot":"collapsible-content",...t}),e[2]=t,e[3]=l):l=e[3],l}function Y({icon:s,title:e,usage:t,summary:l,state:o,detail:a,detailVariant:r="code",forceOpen:u,variant:i="default",trailing:c,iconDestructive:m,alwaysChevron:f,defaultOpen:d,children:p}){const x=V(),[h,g]=R.useState(d??!1),{handleCopy:y,copied:b}=Ls(),v=o==="loading",j=o==="error",S=!!(a&&a.trim())||!!p,N=i==="subtask",w=(u??!1)||h,k=co({initial:v?"instant":!1}),_=n.jsxs(ko,{open:w,onOpenChange:u?void 0:g,className:"min-w-0",children:[n.jsxs(To,{disabled:!S,className:K("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",S&&"[@media(hover:hover)]:hover:bg-accent/30",!S&&"cursor-default",v&&"shimmer"),"aria-disabled":!S,children:[n.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:f?n.jsx(ls,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",w&&"rotate-90")}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:K("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",m?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",S&&(w?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),S&&n.jsx("div",{className:K("absolute inset-0 flex items-center justify-center transition-opacity duration-150",w?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:n.jsx(ls,{className:K("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",w&&"rotate-90")})})]})}),n.jsx("span",{className:K("shrink-0 text-[14px] font-normal",j?"text-warning/80":"text-foreground"),children:e}),l?n.jsx("span",{className:"min-w-0 flex-1 truncate",children:n.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:l})}):n.jsx("div",{className:"flex-1"}),c&&n.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:c}),n.jsx(Gs,{usage:t})]}),S&&n.jsx(_o,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(r==="prose"?n.jsx("div",{className:"mt-1 mb-1",children:n.jsx("div",{ref:k.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:n.jsx("p",{ref:k.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:a})})}):n.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:n.jsx("div",{ref:k.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:n.jsxs("div",{ref:k.contentRef,className:"flex items-start justify-between gap-2",children:[n.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:n.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:a})}),n.jsx("button",{type:"button",onClick:()=>y(a),className:"shrink-0 p-1.5 rounded-md text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":x("common.copy"),children:b?n.jsx(Rt,{className:"size-3.5"}):n.jsx(Es,{className:"size-3.5"})})]})})}))})]});return N?n.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:_}):_}function ue(s){const e=L.c(4),{latency:t}=s;if(t==null||t<=0)return null;let l;e[0]!==t?(l=Ne(t),e[0]=t,e[1]=l):l=e[1];let o;return e[2]!==l?(o=n.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:l}),e[2]=l,e[3]=o):o=e[3],o}const Ks=4;function Js(s){const e=L.c(8),{count:t,noun:l,onClick:o}=s,a=V();let r;e[0]!==t||e[1]!==l||e[2]!==a?(r=a("common.seeAll",{count:t,noun:l}),e[0]=t,e[1]=l,e[2]=a,e[3]=r):r=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(As,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=u):u=e[4];let i;return e[5]!==o||e[6]!==r?(i=n.jsxs("button",{type:"button",onClick:o,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[r,u]}),e[5]=o,e[6]=r,e[7]=i):i=e[7],i}function Qs(s){const e=L.c(12),{message:t,className:l}=s,o=t.created_at??t.metadata?.created_at??null;let a,r,u,i;if(e[0]!==l||e[1]!==o){i=Symbol.for("react.early_return_sentinel");e:{const m=Pt(o);if(m===null){i=null;break e}const f=new Date(m);a=f.toLocaleString(),e[6]!==l?(r=K("text-[11px] text-muted-foreground/60 select-none",l),e[6]=l,e[7]=r):r=e[7],u=f.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=l,e[1]=o,e[2]=a,e[3]=r,e[4]=u,e[5]=i}else a=e[2],r=e[3],u=e[4],i=e[5];if(i!==Symbol.for("react.early_return_sentinel"))return i;let c;return e[8]!==a||e[9]!==r||e[10]!==u?(c=n.jsx("span",{title:a,className:r,children:u}),e[8]=a,e[9]=r,e[10]=u,e[11]=c):c=e[11],c}function bt(s){const e=L.c(9),{since:t}=s;let l;e[0]!==t?(l=()=>os(t,Date.now()),e[0]=t,e[1]=l):l=e[1];const[o,a]=R.useState(l);let r,u;e[2]!==t?(r=()=>{const f=setInterval(()=>a(os(t,Date.now())),100);return()=>clearInterval(f)},u=[t],e[2]=t,e[3]=r,e[4]=u):(r=e[3],u=e[4]),R.useEffect(r,u);const i=o/1e3;let c;e[5]!==i?(c=Ne(i),e[5]=i,e[6]=c):c=e[6];let m;return e[7]!==c?(m=n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:c}),e[7]=c,e[8]=m):m=e[8],m}const Zs=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Co(){const s=L.c(5),[e]=R.useState(Io);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let l;s[1]!==e?(l=Zs.map((a,r)=>{const{delay:u}=a;return n.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[r],animation:"grid-ripple 1s ease infinite",animationDelay:`${u}ms`}},r)}),s[1]=e,s[2]=l):l=s[2];let o;return s[3]!==l?(o=n.jsx("div",{className:"grid",style:t,children:l}),s[3]=l,s[4]=o):o=s[4],o}function Io(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Zs.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}function $o(s){return{planning:{icon:n.jsx(sl,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:n.jsx(Ze,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const Ro=1200;function yt(s){const e=L.c(8),{icon:t,title:l,summary:o,detail:a,state:r,detailVariant:u,trailing:i}=s,c=u===void 0?"prose":u;let m;return e[0]!==a||e[1]!==c||e[2]!==t||e[3]!==r||e[4]!==o||e[5]!==l||e[6]!==i?(m=n.jsx(Y,{icon:t,title:l,summary:o,detail:a,state:r,detailVariant:c,trailing:i}),e[0]=a,e[1]=c,e[2]=t,e[3]=r,e[4]=o,e[5]=l,e[6]=i,e[7]=m):m=e[7],m}function Po(s){const e=L.c(22),{startedAt:t}=s,l=V(),o=Fe()?.runStatusStage??null,[a,r]=R.useState("planning");let u,i;if(e[0]!==o?(u=()=>{if(o!==null)return;const h=setTimeout(()=>{r("thinking")},Ro);return()=>{clearTimeout(h)}},i=[o],e[0]=o,e[1]=u,e[2]=i):(u=e[1],i=e[2]),R.useEffect(u,i),o!==null){let h;e[3]!==o||e[4]!==l?(h=Nl(l,o),e[3]=o,e[4]=l,e[5]=h):h=e[5];const g=h;let y;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(Ze,{className:"size-4"}),e[6]=y):y=e[6];const b=`${g.label}...`;let v;e[7]!==t?(v=t!==null&&n.jsx(bt,{since:t}),e[7]=t,e[8]=v):v=e[8];let j;return e[9]!==g.detail||e[10]!==b||e[11]!==v?(j=n.jsx(yt,{icon:y,title:b,summary:g.detail,state:"loading",trailing:v}),e[9]=g.detail,e[10]=b,e[11]=v,e[12]=j):j=e[12],j}let c;e[13]!==l?(c=$o(l),e[13]=l,e[14]=c):c=e[14];const f=c[a],d=`${f.label}...`;let p;e[15]!==t?(p=t!==null&&n.jsx(bt,{since:t}),e[15]=t,e[16]=p):p=e[16];let x;return e[17]!==f.detail||e[18]!==f.icon||e[19]!==d||e[20]!==p?(x=n.jsx(yt,{icon:f.icon,title:d,summary:f.detail,state:"loading",trailing:p}),e[17]=f.detail,e[18]=f.icon,e[19]=d,e[20]=p,e[21]=x):x=e[21],x}function Ao(s){const e=L.c(3),{startedAt:t}=s;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Co,{}),e[0]=l):l=e[0];let o;return e[1]!==t?(o=n.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[l,n.jsx(bt,{since:t})]}),e[1]=t,e[2]=o):o=e[2],o}const Eo=2e4;function Lo(s){const e=L.c(9),{startedAt:t}=s,l=V();Ts(1e3);const o=Fe(),r=(t!==null?Date.now()-t:0)>=Eo;let u;e[0]!==t?(u=n.jsx(Po,{startedAt:t}),e[0]=t,e[1]=u):u=e[1];let i;e[2]!==r||e[3]!==o||e[4]!==l?(i=r&&o?.stop&&n.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[n.jsx("span",{children:l("chat.thinkingIndicator.takingLonger")}),n.jsx("button",{type:"button",onClick:()=>o.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:l("chat.thinkingIndicator.cancel")})]}),e[2]=r,e[3]=o,e[4]=l,e[5]=i):i=e[5];let c;return e[6]!==u||e[7]!==i?(c=n.jsxs("div",{className:"flex flex-col gap-0.5",children:[u,i]}),e[6]=u,e[7]=i,e[8]=c):c=e[8],c}function Mo(s){const e=L.c(24),{duration:t,parts:l,isStreaming:o}=s,a=V();let r;e[0]!==l?(r=l.every(zo),e[0]=l,e[1]=r):r=e[1];const u=r;let i;e[2]!==t||e[3]!==a?(i=t&&t/1e3>1?a("chat.thinkingIndicator.thoughtFor",{duration:Ne(t/1e3)}):a("chat.thinkingIndicator.thought"),e[2]=t,e[3]=a,e[4]=i):i=e[4];const c=i;let m;if(e[5]!==u||e[6]!==o||e[7]!==l){const v=l.map(Fo).join(`
|
|
2
2
|
`).trim().split(`
|
|
3
3
|
`).filter(Boolean),j=o?v[v.length-1]??"":v[0]??"";m=!u&&j?j.length>100?j.slice(0,100)+"…":j:void 0,e[5]=u,e[6]=o,e[7]=l,e[8]=m}else m=e[8];const f=m;let d;if(e[9]!==u||e[10]!==l){const b=l.map(Do).join(`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as B,j as o,b as D,F as M,d as $,r as q,B as F,p as R}from"./index-
|
|
1
|
+
import{c as B,j as o,b as D,F as M,d as $,r as q,B as F,p as R}from"./index-McNHHn0I.js";import{s as V}from"./Plus-DAdMLXGQ.js";import{i as S}from"./Zap-DU2GtHsA.js";import{S as G}from"./search-input-DuNbyDnI.js";import{P as d}from"./index-DJE2tfk5.js";import{E as T}from"./empty-state-m9N9NPai.js";import{c as H}from"./use-automations-BbdOX1EI.js";import{c as J}from"./use-navigate-to-agent-2RaJlgXp.js";import{A as K}from"./automation-list-row-BZwO9g9-.js";import{r as O}from"./use-mcp-client-Bp0V_VYt.js";import{a as Q}from"./use-virtual-mcp-d5fqtvja.js";import{R as U}from"./require-capability-Ugvygn2l.js";import"./SearchMd-CcK3a1rX.js";import"./sidebar-DEKq2mMP.js";import"./LayoutLeft-CsKErbeQ.js";import"./use-mobile-BioOlGj3.js";import"./X-D41LEseN.js";import"./tooltip-DVLkD7eP.js";import"./studio-tools-BqN3YlVg.js";import"./hooks-BNzxeS18.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-Bqd4_YIf.js";import"./reusable-new-chat-CouMjkYR.js";import"./alert-dialog-CFi8SxDt.js";import"./dropdown-menu-BV1vrBtO.js";import"./Check-9lRvtdWC.js";import"./ChevronRight-DKljoVRD.js";import"./DotsVertical-B9HzbaMu.js";import"./Stars02-foLNDsGr.js";import"./Trash01-DztRWcPm.js";import"./agent-icon-BJvz5x4A.js";import"./AlertCircle-BYNQ7Jkt.js";import"./Tool01-Bd3Lw8Th.js";import"./ArrowUp-BP3McfGy.js";import"./Settings02-DPYzCcfi.js";import"./Tool02-Dh8WmTu2.js";import"./XCircle-jdbnXcmW.js";import"./ArrowUpRight-D8Yru5LS.js";import"./TrendUp01-CCJa9Jip.js";import"./ZapSquare-B00HYz0P.js";import"./Users03-D4U-n8Y-.js";import"./CheckCircle-C7vqJ0tl.js";import"./ChevronDown-bjr6MfsA.js";import"./ChevronUp-DZ3KXJj2.js";import"./Copy01-WdtIApkR.js";import"./CpuChip01-1xWaywPW.js";import"./Eye-DiCzIXG3.js";import"./FilterLines-B9kof_U0.js";import"./Star01-BBwSXqXY.js";import"./Palette-BUAxJzMW.js";import"./SwitchHorizontal01-D0i5ZIfp.js";import"./HardDrive-k3jAqr1U.js";import"./Key01-7Qa4qU2i.js";import"./LinkExternal01-BdGE95-A.js";import"./LogOut01-zNCjjgBE.js";import"./Monitor01-Bt0uc0us.js";import"./Sun-CQkXGbR-.js";import"./Play-CCSM72zW.js";import"./SearchLg-BtOUZE8E.js";import"./Shield01-BqdCWNs4.js";import"./Stars01-B6LcwT44.js";import"./Upload01-x8BbaEO4.js";import"./User01-CZYGYzmf.js";import"./Users01-TN6U6obM.js";import"./XClose-7B366K4b.js";import"./auth-tbnnxlQ1.js";import"./use-capability-C8s9UNLp.js";import"./access-gate-L6Rshjlb.js";import"./capability-load-error-QVMu_PcW.js";function W(){const t=B.c(20),e=D(),{org:c}=M(),{data:C}=H(void 0),g=C===void 0?[]:C,k=Q(),P=J(),f=$(),[x,E]=q.useState(""),h=x.toLowerCase(),A=new Map(k.map(X)),b=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const p=A.get(i.virtual_mcp_id);if(p&&p.title.toLowerCase().includes(h))return!0}return!1}),z=(i,p)=>{const N=p&&A.has(p)?p:O(c.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),P(N,{search:{main:"automation:"+i}})};let l;t[0]!==f||t[1]!==c.slug?(l=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/agents",params:{org:c.slug}})},t[0]=f,t[1]=c.slug,t[2]=l):l=t[2];const L=l,j=d,v=d,w=d;let s;t[3]!==e?(s=e("settings.automations.pageTitle"),t[3]=e,t[4]=s):s=t[4];let r;t[5]!==s?(r=o.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const _=g.length>0&&o.jsx(G,{value:x,onChange:E,placeholder:e("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let m;t[7]!==r||t[8]!==_?(m=o.jsxs("div",{className:"flex flex-col gap-6",children:[r,_]}),t[7]=r,t[8]=_,t[9]=m):m=t[9];const y=g.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:e("settings.automations.emptyTitle"),description:e("settings.automations.emptyDescription"),actions:o.jsxs(F,{size:"sm",onClick:L,children:[o.jsx(V,{size:14}),e("settings.automations.browseAgentsButton")]})})}):b.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:e("settings.automations.noResultsTitle"),description:e("settings.automations.noResultsDescription",{search:x})})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:b.map(i=>o.jsx(K,{automation:i,showAgent:!0,onClick:()=>z(i.id,i.virtual_mcp_id)},i.id))});let n;t[10]!==w.Body||t[11]!==m||t[12]!==y?(n=o.jsxs(w.Body,{children:[m,y]}),t[10]=w.Body,t[11]=m,t[12]=y,t[13]=n):n=t[13];let a;t[14]!==v.Content||t[15]!==n?(a=o.jsx(v.Content,{children:n}),t[14]=v.Content,t[15]=n,t[16]=a):a=t[16];let u;return t[17]!==j||t[18]!==a?(u=o.jsx(j,{children:a}),t[17]=j,t[18]=a,t[19]=u):u=t[19],u}function X(t){return[t.id,t]}function go(){const t=B.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(U,{capability:"automations:manage",area:"automations",children:o.jsx(W,{})}),t[0]=e):e=t[0],e}export{go as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as i,m as f,bB as R,cV as S,cW as I,cX as $}from"./index-
|
|
1
|
+
import{c as k,j as i,m as f,bB as R,cV as S,cW as I,cX as $}from"./index-McNHHn0I.js";import{s as O}from"./User01-CZYGYzmf.js";function U(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function E(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(S,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(I,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const V=R("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),W=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),_=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function B(r){const e=k.c(34);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g;let x;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],x=c;break e}x=t}const m=x;let y;e:{if(j){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const F=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=f(V({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==m||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",z),children:i.jsx(O,{size:_(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(E,{src:l,loading:"lazy",alt:"Avatar",className:f(W({objectFit:u}))}),i.jsx(M,{className:f(z,"rounded-none"),delayMs:l?600:0,children:m})]}),e[22]=z,e[23]=m,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(U,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function D(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,x=h??"base";let m;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==x||e[16]!==l?(m=i.jsx(B,{shape:b,url:l,fallback:t,size:x,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=b,e[15]=x,e[16]=l,e[17]=m):m=e[17],m}D.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(V({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{D as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,m as l,j as g,bd as v,bB as b}from"./index-
|
|
1
|
+
import{c as u,m as l,j as g,bd as v,bB as b}from"./index-McNHHn0I.js";const f=b("inline-flex items-center justify-center rounded-full border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"},size:{default:"px-2 py-0.5",icon:"size-5"}},defaultVariants:{variant:"default",size:"default"}});function h(c){const e=u.c(14);let r,s,i,n,t;e[0]!==c?({className:r,variant:t,size:i,asChild:n,...s}=c,e[0]=c,e[1]=r,e[2]=s,e[3]=i,e[4]=n,e[5]=t):(r=e[1],s=e[2],i=e[3],n=e[4],t=e[5]);const d=(n===void 0?!1:n)?v:"span";let a;e[6]!==r||e[7]!==i||e[8]!==t?(a=l(f({variant:t,size:i}),r),e[6]=r,e[7]=i,e[8]=t,e[9]=a):a=e[9];let o;return e[10]!==d||e[11]!==s||e[12]!==a?(o=g.jsx(d,{"data-slot":"badge",className:a,...s}),e[10]=d,e[11]=s,e[12]=a,e[13]=o):o=e[13],o}export{h as B};
|