decocms 4.182.11 → 4.184.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-4T5dhPVC.js → AlertCircle-B3JS1Ogr.js} +1 -1
- package/dist/client/assets/{AreaChart-rVA6_L_b.js → AreaChart-BMS62HNl.js} +1 -1
- package/dist/client/assets/{ArrowUp-DuuiK3ou.js → ArrowUp-D9KeZg3z.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-H9aG5R8d.js → ArrowUpRight-C7vjzlfR.js} +1 -1
- package/dist/client/assets/{Check-DV41qQCZ.js → Check-C-LauNEP.js} +1 -1
- package/dist/client/assets/{CheckCircle-cfI0IRxO.js → CheckCircle-BAtVWz02.js} +1 -1
- package/dist/client/assets/{ChevronDown-LRklqTCZ.js → ChevronDown-BR_rY5I7.js} +1 -1
- package/dist/client/assets/{ChevronRight-D0-75ONs.js → ChevronRight-DNaF9GmC.js} +1 -1
- package/dist/client/assets/{ChevronUp-hBciOqSP.js → ChevronUp-DYqaZocr.js} +1 -1
- package/dist/client/assets/{Copy01-B84E1l4r.js → Copy01-b-czDxAP.js} +1 -1
- package/dist/client/assets/{CpuChip01-CWMarS5R.js → CpuChip01-CzTGabjK.js} +1 -1
- package/dist/client/assets/{CreditCard01-CWPKn35r.js → CreditCard01-DHT3Rv6c.js} +1 -1
- package/dist/client/assets/{DotsVertical-BRZ7SqU7.js → DotsVertical-SHbBfUyY.js} +1 -1
- package/dist/client/assets/{Eye-Dvl22oXz.js → Eye-CWQ6QYQ_.js} +1 -1
- package/dist/client/assets/{FilterLines-thvAmmYS.js → FilterLines-FKt18eu-.js} +1 -1
- package/dist/client/assets/{HardDrive-BdbtdNau.js → HardDrive--Ca3_i9z.js} +1 -1
- package/dist/client/assets/{Key01-D1h6mWWx.js → Key01-Cxb_dTY9.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BFm5EcdH.js → LayoutLeft-619VnLrS.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DbC6e4CO.js → LinkExternal01-B7fSoBl7.js} +1 -1
- package/dist/client/assets/{LogOut01-MnG04HIb.js → LogOut01-8nsv1Zrx.js} +1 -1
- package/dist/client/assets/{Monitor01-DrUW0HYl.js → Monitor01-Ddtu0GLO.js} +1 -1
- package/dist/client/assets/{Palette-CFGdKKVI.js → Palette-BjvX1ruC.js} +1 -1
- package/dist/client/assets/{Play-Dso0XpJX.js → Play-B6BIJve0.js} +1 -1
- package/dist/client/assets/{Plus-BOieVQpx.js → Plus-BQ3wCu8K.js} +1 -1
- package/dist/client/assets/{SearchLg-hqRFV8lc.js → SearchLg-Bf0OE8pv.js} +1 -1
- package/dist/client/assets/{SearchMd-C9ivQjrD.js → SearchMd-DDYxMG_A.js} +1 -1
- package/dist/client/assets/{Settings02-xjTW_j0d.js → Settings02-C8JbwZnu.js} +1 -1
- package/dist/client/assets/{Shield01-B8r00o1L.js → Shield01-n9H7rn2N.js} +1 -1
- package/dist/client/assets/{Star01-B6f_g5t9.js → Star01-B_crwKS8.js} +1 -1
- package/dist/client/assets/{Stars01-DRG6gh2H.js → Stars01-C1ltyRgO.js} +1 -1
- package/dist/client/assets/{Stars02-CE6kqQyW.js → Stars02-CrM-SKfV.js} +1 -1
- package/dist/client/assets/{Sun-DK9VJTt0.js → Sun-EctD6SlF.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-YUHYHaFA.js → SwitchHorizontal01-LVXImEqS.js} +1 -1
- package/dist/client/assets/{Tool01-gbyOwgT1.js → Tool01-C13i3FWq.js} +1 -1
- package/dist/client/assets/{Tool02-Dz_Du0eI.js → Tool02-DUySVGxt.js} +1 -1
- package/dist/client/assets/{Trash01-Dz7-G1X7.js → Trash01-C_efCdAs.js} +1 -1
- package/dist/client/assets/{TrendUp01-BO2bdJvu.js → TrendUp01-BgnnhLXr.js} +1 -1
- package/dist/client/assets/{Upload01-CJlYU_hH.js → Upload01-sXK5QJkl.js} +1 -1
- package/dist/client/assets/{User01-D7dvbQcO.js → User01-DQ1vt8a0.js} +1 -1
- package/dist/client/assets/{Users01-DOgNXaWY.js → Users01-Do4gmbPq.js} +1 -1
- package/dist/client/assets/{Users03-RHYREmhF.js → Users03-BcYjhwHT.js} +1 -1
- package/dist/client/assets/{X-B5OZ1P1M.js → X-ypK_5s2v.js} +1 -1
- package/dist/client/assets/{XCircle-C7FYHuAe.js → XCircle-CVncmwo8.js} +1 -1
- package/dist/client/assets/{XClose-7rKXUrvj.js → XClose-BewBCx_H.js} +1 -1
- package/dist/client/assets/{Zap-CBOIOKOj.js → Zap-BVnrXYPx.js} +1 -1
- package/dist/client/assets/{ZapSquare-DVsHsuHi.js → ZapSquare-CK2EnhlO.js} +1 -1
- package/dist/client/assets/{access-gate-hEziYoT_.js → access-gate-gdInAd9D.js} +1 -1
- package/dist/client/assets/{add-section-modal-BCNeGvb2.js → add-section-modal-Dsb07QT9.js} +1 -1
- package/dist/client/assets/{agent-icon-D0Bfih1T.js → agent-icon-CG09iBgJ.js} +1 -1
- package/dist/client/assets/{agents-list-CtKBjVwF.js → agents-list-CxTuXJiz.js} +1 -1
- package/dist/client/assets/{ai-providers-DcuIcKKE.js → ai-providers-50eDPRO_.js} +1 -1
- package/dist/client/assets/{alert-eSNrz7fH.js → alert-cYzFjVuf.js} +1 -1
- package/dist/client/assets/{alert-dialog-CA-geTwD.js → alert-dialog-CquqUuRD.js} +1 -1
- package/dist/client/assets/{app-editor-trM4u8f1.js → app-editor-BIp-SPOE.js} +1 -1
- package/dist/client/assets/{auth-catchall-BaN3NXgb.js → auth-catchall-Y9gjp8x5.js} +1 -1
- package/dist/client/assets/{auth-entry-C-cYIE7O.js → auth-entry-D_uyCSIa.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DrxFdZO2.js → auth-split-layout-BFduyX9Q.js} +1 -1
- package/dist/client/assets/{auth-NDJPKSl9.js → auth-xxR7y6tl.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CVJ09JzN.js → authenticate-and-persist-oauth-k5Z-pOOh.js} +1 -1
- package/dist/client/assets/{automation-list-row-Yuke0OMC.js → automation-list-row-CHCVO6NE.js} +1 -1
- package/dist/client/assets/{automation-runs-BoBKRqsz.js → automation-runs-iQ7GyF0U.js} +1 -1
- package/dist/client/assets/{automations-DyNYqAb1.js → automations-DeMGyuP4.js} +1 -1
- package/dist/client/assets/{avatar-DNpxAGcL.js → avatar-D2tOztUd.js} +1 -1
- package/dist/client/assets/{badge-ltIZGTKi.js → badge-D8pOsxKV.js} +1 -1
- package/dist/client/assets/{billing-BLgnNaqy.js → billing-CeHAuexv.js} +1 -1
- package/dist/client/assets/{block-document-B8BE5_VV.js → block-document-0akRZYsC.js} +1 -1
- package/dist/client/assets/{brand-context-Ci4P1S5y.js → brand-context-DLuDCZRi.js} +1 -1
- package/dist/client/assets/{buckets-CCNVgXnz.js → buckets-Bfd_j2Km.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-D5mVOyFj.js → bulk-category-panel-Bzoc6rdI.js} +1 -1
- package/dist/client/assets/{calendar-D6wnYOFU.js → calendar-VVAQUXnL.js} +1 -1
- package/dist/client/assets/{capability-load-error-CG3fiZmw.js → capability-load-error-CQdkThFQ.js} +1 -1
- package/dist/client/assets/{card-yjAvGlIX.js → card-DYTU8rq7.js} +1 -1
- package/dist/client/assets/{category-editor-BSsWqXbo.js → category-editor-Bhcsodv9.js} +1 -1
- package/dist/client/assets/{chat-context-dHFpqQXv.js → chat-context-GCEjbEBj.js} +1 -1
- package/dist/client/assets/{checkbox-Dedtxheu.js → checkbox-CXTjTXUs.js} +1 -1
- package/dist/client/assets/{cli-auth-success-B-lvfH5K.js → cli-auth-success-VQyjBBAB.js} +1 -1
- package/dist/client/assets/{collection-detail-D8Tp5I9V.js → collection-detail-C26eu1Jv.js} +1 -1
- package/dist/client/assets/{collection-display-button-oQ_fvpY-.js → collection-display-button-CX7FxCDx.js} +1 -1
- package/dist/client/assets/{collection-search-kxCjV-AG.js → collection-search-Dw7EfxX-.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BtEQ9C4R.js → collection-table-wrapper-BrLnTwVA.js} +1 -1
- package/dist/client/assets/{collection-tabs-DzWbCF0d.js → collection-tabs-B3WFfHWI.js} +1 -1
- package/dist/client/assets/{command-BsV2RQjJ.js → command-AYLm7ZwQ.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CyIRq7um.js → commerce-onboarding-DlJhSB6g.js} +1 -1
- package/dist/client/assets/{companions-core-Cne_8fVL.js → companions-core-BRC46RL7.js} +1 -1
- package/dist/client/assets/{connect-DDAgChG5.js → connect-D39aX-bO.js} +1 -1
- package/dist/client/assets/{connection-DTJFBgNv.js → connection-BWmmybbw.js} +1 -1
- package/dist/client/assets/{connection-card-BDubnL3U.js → connection-card-DHCHpIgN.js} +1 -1
- package/dist/client/assets/{connection-detail-yVPDiBGA.js → connection-detail-C7ifYQvZ.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-YOXUEkDi.js → connection-form-helpers-YtamX_oI.js} +1 -1
- package/dist/client/assets/{connections-B4FjZO8v.js → connections-DRXr97Ow.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-B915L-51.js → decopilot-sse-pool-BuDEKE2B.js} +1 -1
- package/dist/client/assets/{dialog-BufvtBqP.js → dialog-DSJ_GZJt.js} +1 -1
- package/dist/client/assets/{domain-settings-mhG-bECZ.js → domain-settings-QXVJq8E8.js} +1 -1
- package/dist/client/assets/{drawer-sRFC7fp-.js → drawer-BoNzql-k.js} +1 -1
- package/dist/client/assets/{dropdown-menu-jCNpNe96.js → dropdown-menu-Dl-K6r1z.js} +1 -1
- package/dist/client/assets/{empty-state-k6--wQa7.js → empty-state-DU0gJX7R.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BWVtqOUT.js → extract-connection-data-C8kYmTwA.js} +1 -1
- package/dist/client/assets/{file-explorer-C6cfmElY.js → file-explorer-Dd_UXfQe.js} +1 -1
- package/dist/client/assets/{form-BDZaeSnp.js → form-CfXwbDnQ.js} +1 -1
- package/dist/client/assets/{general-CDMUK_CU.js → general-cjioWpU5.js} +1 -1
- package/dist/client/assets/{github-repo-picker-BBDaU8gM.js → github-repo-picker-BX2_UCL9.js} +1 -1
- package/dist/client/assets/{hooks-lLuYfmrC.js → hooks-BnzTub3t.js} +1 -1
- package/dist/client/assets/{index-BvpCo-YM.js → index-BOOmt4KH.js} +1 -1
- package/dist/client/assets/{index-mPVKmgAM.js → index-BU4e8BQP.js} +1 -1
- package/dist/client/assets/{index-DUC3fObX.js → index-BiL1coyY.js} +1 -1
- package/dist/client/assets/index-BnjU2dTw.js +77 -0
- package/dist/client/assets/{index-CexzHP_6.js → index-C7Jqgqec.js} +1 -1
- package/dist/client/assets/{index-DCRkU5Wy.js → index-CZI3aMGz.js} +5 -5
- package/dist/client/assets/{index-Dh2l9BzC.js → index-CzkBTHyl.js} +1 -1
- package/dist/client/assets/{index-C__5QEv-.js → index-D5s7iB_G.js} +31 -31
- package/dist/client/assets/{index-CnAMNK9t.js → index-D8679f_U.js} +1 -1
- package/dist/client/assets/{index-DjzBtoMr.js → index-DEa1H475.js} +1 -1
- package/dist/client/assets/{index-CcC75qoZ.js → index-DTdwBEkE.js} +1 -1
- package/dist/client/assets/index-UhwFQSWG.js +1 -0
- package/dist/client/assets/{index-redirect-BOIkyJqM.js → index-redirect-ISnwOhy2.js} +1 -1
- package/dist/client/assets/{input-BLr4RTsm.js → input-BLW13qDV.js} +1 -1
- package/dist/client/assets/{integration-icon-CgTNjILq.js → integration-icon-DiC7PYLo.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-Bfrnlszn.js → invite-member-dialog-DknO-g5T.js} +1 -1
- package/dist/client/assets/{label-BYiQyfwG.js → label-CdAnELsh.js} +1 -1
- package/dist/client/assets/{layout-C33n3ap-.js → layout-Chy4pfib.js} +1 -1
- package/dist/client/assets/{login-DYmy2I7n.js → login-DTpypykn.js} +1 -1
- package/dist/client/assets/{mcp-oauth-gxjUgI6c.js → mcp-oauth-D1xsqTbw.js} +1 -1
- package/dist/client/assets/{members-J471oWTL.js → members-445MstFS.js} +1 -1
- package/dist/client/assets/{monaco-editor-DuTeczAH.js → monaco-editor-d6E7Zvd9.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row--OFfIL1b.js → monitoring-stats-row-DKN2Z1_i.js} +1 -1
- package/dist/client/assets/{multi-select-BPX5SnC4.js → multi-select-CfCRhmSe.js} +1 -1
- package/dist/client/assets/{oauth-callback-D6tHlqio.js → oauth-callback-DJvOMDUI.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CI2z2ViD.js → oauth-callback-ai-provider-BdhWesBZ.js} +1 -1
- package/dist/client/assets/{onboarding-CSfTXUFc.js → onboarding-CS8UTzzK.js} +1 -1
- package/dist/client/assets/{org-layout-Cs_GIuEG.js → org-layout-_EcLoVko.js} +1 -1
- package/dist/client/assets/{organization-choice-vicqUeRJ.js → organization-choice-BxSBJQGA.js} +1 -1
- package/dist/client/assets/{orgs-w49xqOtp.js → orgs-GuS4oucW.js} +1 -1
- package/dist/client/assets/{page-seo-form-DgmTUIQW.js → page-seo-form-B9po7fEi.js} +1 -1
- package/dist/client/assets/{popover-CfzhWoAD.js → popover-D2qLkEGb.js} +1 -1
- package/dist/client/assets/{post-editor-C4fKRxG9.js → post-editor-Deu2F14G.js} +1 -1
- package/dist/client/assets/{primitives-LGUFHKb1.js → primitives-pV6A0yki.js} +1 -1
- package/dist/client/assets/{profile-D5DSVQbd.js → profile-c2z8X6Kq.js} +1 -1
- package/dist/client/assets/project-app-view-CcHtyOQQ.js +1 -0
- package/dist/client/assets/record-editor-BA-UmwkJ.js +1 -0
- package/dist/client/assets/{redirect-editor-C1pd0iUE.js → redirect-editor-BibKbBqp.js} +1 -1
- package/dist/client/assets/registry-C3cqMqjN.js +2 -0
- package/dist/client/assets/{registry-layout-DWlVWhCR.js → registry-layout-C3zb9sDp.js} +1 -1
- package/dist/client/assets/{reports-v0IFyfE_.js → reports-EmI1mHpW.js} +1 -1
- package/dist/client/assets/{require-capability-BE_VuvWI.js → require-capability-CaR1pXbU.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BHSr3aqs.js → required-auth-layout-CUZmEaxs.js} +1 -1
- package/dist/client/assets/{reset-password-D8Vl2pq6.js → reset-password-CBXAvhH9.js} +1 -1
- package/dist/client/assets/roles-mZf8kH6y.js +1 -0
- package/dist/client/assets/{search-input-DvW5PgOv.js → search-input-DDVxkABf.js} +1 -1
- package/dist/client/assets/{secrets-DtdNCPLN.js → secrets-B_9IMoe1.js} +1 -1
- package/dist/client/assets/{sections-editor-JGSlPtmT.js → sections-editor-DB_QzUbA.js} +1 -1
- package/dist/client/assets/{select-BL1P0bDg.js → select-CWnB_uQx.js} +1 -1
- package/dist/client/assets/{select-model-CGzVf4da.js → select-model-LJrrvVPW.js} +1 -1
- package/dist/client/assets/{self-tool-result-CMu01sf8.js → self-tool-result-Bz21E3aZ.js} +1 -1
- package/dist/client/assets/{seo-editor-_tosIPFs.js → seo-editor-Cp7502yh.js} +1 -1
- package/dist/client/assets/{settings-layout-B3G2RZfv.js → settings-layout-GF-G0wjF.js} +1 -1
- package/dist/client/assets/{settings-section-st_oGcki.js → settings-section-ZIpqpn6u.js} +1 -1
- package/dist/client/assets/{shell-controls-CDLVMtqy.js → shell-controls-Bng45Su0.js} +1 -1
- package/dist/client/assets/{shell-layout-BcPRW4gw.js → shell-layout-DnVpUUuI.js} +1 -1
- package/dist/client/assets/{sidebar-3mXW1Dgt.js → sidebar-BghCVHZt.js} +1 -1
- package/dist/client/assets/{skeleton-DpvUx22g.js → skeleton-lc9kh8qd.js} +1 -1
- package/dist/client/assets/{spinner-BkDJnwEi.js → spinner-D1VHlCPg.js} +1 -1
- package/dist/client/assets/{sso-Sbczr10D.js → sso-BR_j0lud.js} +1 -1
- package/dist/client/assets/{store-B08X9qYw.js → store-DL3KLkjK.js} +1 -1
- package/dist/client/assets/store-registry-YLkbINDi.js +2 -0
- package/dist/client/assets/{studio-tools-BC9ftyn5.js → studio-tools-Dnhai2E2.js} +1 -1
- package/dist/client/assets/{switch-Bka2RfWB.js → switch-5ORj8iPy.js} +1 -1
- package/dist/client/assets/{tab-id-wPrlxsjG.js → tab-id-BkkhJopj.js} +1 -1
- package/dist/client/assets/{table-B_qS-D5L.js → table-dGsHWyfu.js} +1 -1
- package/dist/client/assets/{tabs-BA_k2e-1.js → tabs-BLQN3Bzj.js} +1 -1
- package/dist/client/assets/{textarea-cxk9ek3A.js → textarea-89LUuJW5.js} +1 -1
- package/dist/client/assets/{toggle-group-Iy_VUwLD.js → toggle-group-1VbMPded.js} +1 -1
- package/dist/client/assets/{toolbar-D5fqlq8n.js → toolbar-Dx6B96vS.js} +1 -1
- package/dist/client/assets/{tooltip-DUVwztGf.js → tooltip-aoWInzoh.js} +1 -1
- package/dist/client/assets/{use-ai-providers-FM7xVK8g.js → use-ai-providers-CFfUlF1f.js} +1 -1
- package/dist/client/assets/{use-automations-6KaPhQ1G.js → use-automations-B8-RtV1z.js} +1 -1
- package/dist/client/assets/{use-autosave-CL1WkV0y.js → use-autosave-CXpoagL6.js} +1 -1
- package/dist/client/assets/{use-capability-DylT3-bJ.js → use-capability-DiPv8Zb8.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BVuuIMJZ.js → use-clock-tick-ClPZ6D9Y.js} +1 -1
- package/dist/client/assets/{use-connection-CTwU4ysF.js → use-connection-DvPLUiIA.js} +1 -1
- package/dist/client/assets/{use-copy-CFnr24YY.js → use-copy-DIay_-Je.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CDvl06gG.js → use-create-virtual-mcp-BZXqo_pO.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CH_IdRdc.js → use-debounced-autosave-CvLLnMGe.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BnMAWtVd.js → use-debounced-value-bthpDZiE.js} +1 -1
- package/dist/client/assets/{use-deco-credits-Lzh1yWK0.js → use-deco-credits-D1TNghK4.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CAKI0rwk.js → use-decopilot-events-CEnoV83H.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DBKiXL1K.js → use-delete-connection-9f3obKAs.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Dy4saSW-.js → use-deployment-admin-C59HdwZf.js} +1 -1
- package/dist/client/assets/{use-file-configs-MJ-EZm1A.js → use-file-configs-ClgScKvu.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-B-Oo1Otc.js → use-infinite-scroll-C32yKpeT.js} +1 -1
- package/dist/client/assets/{use-join-requests-DNQ46mpf.js → use-join-requests-CzXf25FI.js} +1 -1
- package/dist/client/assets/{use-mcp-client-B16oXzhe.js → use-mcp-client-DrSHoCVl.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BgeJ8qUA.js → use-mcp-tools-BN79MGPB.js} +1 -1
- package/dist/client/assets/{use-members-B5SQkFvM.js → use-members-0dOk8VV6.js} +1 -1
- package/dist/client/assets/{use-mobile-wLzzxF5y.js → use-mobile-CGdxblv_.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DgCZGKt-.js → use-navigate-to-agent-BeeZom_X.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-DmgsXfM4.js → use-open-billing-url-mk1x37uU.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-T89F9n26.js → use-org-auth-client-BgXvHZ3n.js} +1 -1
- package/dist/client/assets/{use-org-sso-DFfY9EPW.js → use-org-sso-CFX6XDqX.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BInNn5ib.js → use-organization-roles-DtGn2caD.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DAdANOJE.js → use-organization-settings-CRDxfnxm.js} +1 -1
- package/dist/client/assets/{use-registry-connections-3EggE_zB.js → use-registry-connections-BUfxuowY.js} +1 -1
- package/dist/client/assets/{use-secrets-BHxBEjeU.js → use-secrets-D8ds-9XA.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Ghdqdv3-.js → use-status-sounds-DZ5Z_g91.js} +1 -1
- package/dist/client/assets/{use-tags-CTx2UWjs.js → use-tags-D1HbmIof.js} +1 -1
- package/dist/client/assets/{use-view-mode-SuqQjVD9.js → use-view-mode-mhODNaJU.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-u0hz3Cgm.js → use-virtual-mcp-BfqTkZTV.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DiQjMEo-.js +1 -0
- package/dist/client/assets/{useRouterState-jhA4Flll.js → useRouterState-ivpTEnE_.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-tRLMDsN2.js +1 -0
- package/dist/client/assets/{users-DKcMmH69.js → users-vab4Zr9W.js} +1 -1
- package/dist/client/assets/{variant-calendar-B8Iu9LPq.js → variant-calendar-CvDCuacg.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CcVpCY4p.js → view-mode-toggle-BEe5tOOR.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +475 -475
- package/dist/server/migrate.js +146 -146
- package/dist/server/server.js +308 -308
- package/package.json +1 -1
- package/dist/client/assets/index--KwwhTPn.js +0 -77
- package/dist/client/assets/index-BPdWwgNf.js +0 -1
- package/dist/client/assets/project-app-view-BjNES_YQ.js +0 -1
- package/dist/client/assets/record-editor-CDYQ5b6y.js +0 -1
- package/dist/client/assets/registry-CRmFchCJ.js +0 -2
- package/dist/client/assets/roles-kiWYLeFt.js +0 -1
- package/dist/client/assets/store-registry-DsRP0sKP.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BWLdVZcQ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DY3vWHGi.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cA as v,cB as $,cC as W,cD as L,cE as H,cF as D,cG as V,cH as x,cI as q,cJ as j,cK as y,cL as N,cM as B,cN as F,cO as Z}from"./index-C__5QEv-.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 Y(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 Q(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 S=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(S),d=S}}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 k=await e.tokens();if(k?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:k.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 Z(),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=Y(r,h);Q(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 F.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{cA as v,cB as $,cC as W,cD as L,cE as H,cF as D,cG as V,cH as x,cI as q,cJ as j,cK as y,cL as N,cM as B,cN as F,cO as Z}from"./index-D5s7iB_G.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 Y(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 Q(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 S=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(S),d=S}}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 k=await e.tokens();if(k?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:k.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 Z(),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=Y(r,h);Q(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 F.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-D5s7iB_G.js";import{i as u,a as p}from"./mcp-oauth-D1xsqTbw.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-Yuke0OMC.js → automation-list-row-CHCVO6NE.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-D5s7iB_G.js";import{A as Y,a as Z,b as ee,c as te,d as se,e as ie,f as ne,g as oe}from"./alert-dialog-CquqUuRD.js";import{D as ae,c as re,b as le,a as ce}from"./dropdown-menu-Dl-K6r1z.js";import{s as me}from"./Stars02-CrM-SKfV.js";import{a as ue}from"./DotsVertical-SHbBfUyY.js";import{s as de}from"./Trash01-C_efCdAs.js";import{i as fe}from"./Zap-BVnrXYPx.js";import{u as ge}from"./use-virtual-mcp-BfqTkZTV.js";import{A as xe}from"./agent-icon-CG09iBgJ.js";import{u as pe}from"./use-automations-B8-RtV1z.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 M,b as V,a2 as Pn,j as n,B as Ce,$ as ns,Z as An,a1 as En,m as K,p as Mn,aA as Ln,ax as we,aE as Dn,aD as Se,bM as Be,aB as Pe,bN as hs,az as gs,F as je,o as Fn,e as zn,K as pe,t as ft,n as Ue,d as Le,E as bs,av as ys,bO as kt,aC as On,bP as _e}from"./index-C__5QEv-.js";import{e as Bn}from"./select-BL1P0bDg.js";import{u as js}from"./useInfiniteQuery-BWLdVZcQ.js";import{a as vs,u as Un}from"./use-connection-CTwU4ysF.js";import{k as Hn,u as Tt,f as Wn,i as Vn,a as qn,S as Gn}from"./use-mcp-client-B16oXzhe.js";import{a as Xn}from"./use-virtual-mcp-u0hz3Cgm.js";import{C as Yn}from"./card-yjAvGlIX.js";import{o as Ss,m as Ns,p as _t,q as Ct}from"./sidebar-3mXW1Dgt.js";import{c as ws,e as ks,a as Qe,d as fe,b as Ts,T as me}from"./table-B_qS-D5L.js";import{E as mt}from"./empty-state-k6--wQa7.js";import{u as It}from"./use-infinite-scroll-B-Oo1Otc.js";import{u as Kn}from"./use-members-B5SQkFvM.js";import{u as _s,S as Ee}from"./use-clock-tick-BVuuIMJZ.js";import{e as Jn}from"./use-automations-6KaPhQ1G.js";import{u as Cs}from"./studio-tools-BC9ftyn5.js";import{u as Qn}from"./useSuspenseInfiniteQuery-DY3vWHGi.js";import{A as Is}from"./avatar-DNpxAGcL.js";import{t as Ge}from"./ChevronDown-LRklqTCZ.js";import{n as pt}from"./ChevronUp-hBciOqSP.js";import{n as $s,t as Zn,c as Rs,i as el,a as $t}from"./Tool02-Dz_Du0eI.js";import{f as tl,aO as sl,aP as nl,a5 as ll,C as ol,aQ as rl,ac as al,i as ls,as as il,z as cl,j as ul,aR as dl,aM as Ps,aS as fl,A as As,aT as be,aU as ml,k as pl}from"./agent-icon-D0Bfih1T.js";import{t as Ze}from"./Stars01-DRG6gh2H.js";import{i as Es,b as He}from"./XCircle-C7FYHuAe.js";import{i as Rt}from"./Check-DV41qQCZ.js";import{i as os}from"./ChevronRight-D0-75ONs.js";import{a as Ms}from"./Copy01-B84E1l4r.js";import{b as Ne,t as Pt,c as rs}from"./format-time-BnbuEtat.js";import{u as Ls}from"./use-copy-CFnr24YY.js";import{T as Ie,a as $e,c as Re}from"./tooltip-DUVwztGf.js";import{j as At,I as xl,R as hl,J as gl,t as bl,U as he,V as Ds,W as De,c as yl,u as jl,M as vl,e as Sl,f as Nl}from"./calendar-D6wnYOFU.js";import{d as wl,c as kl,r as Tl,e as _l}from"./hooks-lLuYfmrC.js";import{j as Fe,D as Cl,k as Et,b as Fs,a as Il}from"./chat-context-dHFpqQXv.js";import{c as $l}from"./monaco-editor-DuTeczAH.js";import{g as zs,M as Rl}from"./index-mPVKmgAM.js";import{f as Pl,o as Al,q as El}from"./tab-id-wPrlxsjG.js";import{i as Os}from"./AlertCircle-4T5dhPVC.js";import{s as Ml}from"./Eye-Dvl22oXz.js";import{s as Xe,t as Bs}from"./Star01-B6f_g5t9.js";import{s as Ll}from"./XClose-7rKXUrvj.js";import{n as xt}from"./ZapSquare-DVsHsuHi.js";import{d as Dl,c as Fl,a as We}from"./Tool01-gbyOwgT1.js";import{i as ze}from"./Monitor01-DrUW0HYl.js";import{i as zl}from"./SearchMd-C9ivQjrD.js";import{i as Ol}from"./Upload01-CJlYU_hH.js";import{u as Bl,a as Ul}from"./shell-layout-BcPRW4gw.js";import{n as Us}from"./LinkExternal01-DbC6e4CO.js";import{I as ke}from"./integration-icon-CgTNjILq.js";import{i as Hl}from"./ArrowUpRight-H9aG5R8d.js";import{a as Mt}from"./Users03-RHYREmhF.js";import{a as ye}from"./Palette-CFGdKKVI.js";import{c as Hs}from"./use-navigate-to-agent-DgCZGKt-.js";import{a as Wl}from"./Stars02-CE6kqQyW.js";import{g as Vl}from"./AreaChart-rVA6_L_b.js";import{b as ql,a as Gl,c as Xl,d as Yl,e as Kl}from"./dialog-BufvtBqP.js";import{F as Jl,d as Ql,a as Zl,e as eo,b as to,c as so}from"./form-BDZaeSnp.js";import{I as no}from"./input-BLr4RTsm.js";import{S as lo}from"./spinner-BkDJnwEi.js";const oo={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 Ws(s){if(!s?.providerMetadata)return 0;for(const e of Object.values(oo)){const t=e(s.providerMetadata);if(t!==null)return t}return 0}function Vs(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function qs(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+Ws(e),cacheReadTokens:s.cacheReadTokens+t,cacheWriteTokens:s.cacheWriteTokens+l}}function Lt(s){const e=Math.max(s.inputTokens,s.cacheReadTokens+s.cacheWriteTokens);return e>0?s.cacheReadTokens/e:0}function Uc(s){return s.reduce((e,t)=>qs(e,t.metadata?.usage),Vs())}const ro={damping:.7,stiffness:.05,mass:1.25},ao=70,io=1e3/60,co=350;let et=!1;globalThis.document?.addEventListener("mousedown",()=>{et=!0});globalThis.document?.addEventListener("mouseup",()=>{et=!1});globalThis.document?.addEventListener("click",()=>{et=!1});const uo=(s={})=>{const[e,t]=R.useState(!1),[l,o]=R.useState(s.initial!==!1),[a,r]=R.useState(!1),c=R.useRef(null);c.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)},[]),u=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<=ao}}},[]),d=R.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||u(!0);const v=Date.now()+(Number(b.wait)||0),j=it(c.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))/io;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(c.current,c.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()},[u,i,f]),p=R.useCallback(()=>{m(!0),u(!1)},[m,u]),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),u(!1);return}const S=v>T,N=v<T;if(f.animation?.ignoreEscapes){f.scrollTop=T;return}N&&(m(!0),u(!1)),S&&m(!1),!f.escapedFromLock&&f.isNearBottom&&u(!0)},1)},[m,u,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),u(!1))},[m,u,f]),g=as(b=>{g.current?.removeEventListener("scroll",x),g.current?.removeEventListener("wheel",h),b?.addEventListener("scroll",x,{passive:!0}),b?.addEventListener("wheel",h,{passive:!0})},[]),y=as(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(c.current,v?c.current.resize:c.current.initial);d({animation:N,wait:!0,preserveScrollPosition:!0,duration:N==="instant"?void 0:co})}else f.isNearBottom&&(m(!1),u(!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 as(s,e){const t=R.useCallback(l=>(t.current=l,s(l)),e);return t}const at=new Map;function it(...s){const e={...ro};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 fo(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 Dt(s){if(s&&typeof s=="object"&&"gatewayClientId"in s&&typeof s.gatewayClientId=="string")return s.gatewayClientId}function Ft(s,e){if(!e)return s;const t=`${fo(e)}_`;return s.startsWith(t)?s.slice(t.length):s}function mo(s,e){return Ft(s,e).replace(/[_-]/g," ").toLowerCase()}function po(s,e){const t={};for(const l of s?.arguments??[])t[l.name]=l.required?ns().min(1,e):ns();return An(t)}function xo(s,e){const t={};for(const l of s.arguments??[])t[l.name]=e?.[l.name]??"";return t}function ho(s){const e=M.c(74),{prompt:t,setPrompt:l,onSubmit:o,defaultValues:a}=s,r=R.useId(),c=V();let i,u;if(e[0]!==t||e[1]!==c){const D=po(t,c("chat.dialogPromptArguments.required"));u=En,i=Pn(D),e[0]=t,e[1]=c,e[2]=i,e[3]=u}else i=e[2],u=e[3];let m;e[4]!==a||e[5]!==t?(m=t?xo(t,a):{},e[4]=a,e[5]=t,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==m?(f={resolver:i,defaultValues:m,mode:"onChange"},e[7]=i,e[8]=m,e[9]=f):f=e[9];const d=u(f);let p;e[10]!==t?.arguments?(p=t?.arguments??[],e[10]=t?.arguments,e[11]=p):p=e[11];const x=p;let h;e[12]!==d||e[13]!==o||e[14]!==l?(h=async D=>{await o(D),l(null),d.reset()},e[12]=d,e[13]=o,e[14]=l,e[15]=h):h=e[15];const g=h;let y;e[16]!==d||e[17]!==l?(y=D=>{D||(d.reset(),l(null))},e[16]=d,e[17]=l,e[18]=y):y=e[18];const b=y;if(!t)return null;let v;e[19]!==t._meta||e[20]!==t.name||e[21]!==t.title?(v=t.title||mo(t.name,Dt(t._meta)),e[19]=t._meta,e[20]=t.name,e[21]=t.title,e[22]=v):v=e[22];let j;e[23]!==v?(j=n.jsx(ql,{children:n.jsx("span",{className:"capitalize",children:v})}),e[23]=v,e[24]=j):j=e[24];let T;e[25]!==t.description?(T=t.description&&n.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),e[25]=t.description,e[26]=T):T=e[26];let S;e[27]!==T||e[28]!==j?(S=n.jsxs(Gl,{children:[j,T]}),e[27]=T,e[28]=j,e[29]=S):S=e[29];let N;e[30]!==d||e[31]!==g?(N=D=>{D.stopPropagation(),d.handleSubmit(g)(D)},e[30]=d,e[31]=g,e[32]=N):N=e[32];let w;if(e[33]!==x||e[34]!==d.control||e[35]!==d.formState.isSubmitting||e[36]!==c){let D;e[38]!==d.control||e[39]!==d.formState.isSubmitting||e[40]!==c?(D=O=>n.jsx(Ql,{control:d.control,name:O.name,render:B=>{const{field:U}=B;return n.jsxs(Zl,{children:[n.jsxs(eo,{className:"text-xs",children:[O.name,O.required?null:n.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ",c("chat.dialogPromptArguments.optional")]})]}),n.jsx(to,{children:n.jsx(no,{...U,value:U.value??"",required:O.required,placeholder:O.description??"",className:"h-9",disabled:d.formState.isSubmitting})}),n.jsx(so,{})]})}},O.name),e[38]=d.control,e[39]=d.formState.isSubmitting,e[40]=c,e[41]=D):D=e[41],w=x.map(D),e[33]=x,e[34]=d.control,e[35]=d.formState.isSubmitting,e[36]=c,e[37]=w}else w=e[37];let k;e[42]!==b?(k=()=>b(!1),e[42]=b,e[43]=k):k=e[43];const _=d.formState.isSubmitting;let C;e[44]!==c?(C=c("chat.dialogPromptArguments.cancel"),e[44]=c,e[45]=C):C=e[45];let I;e[46]!==d.formState.isSubmitting||e[47]!==k||e[48]!==C?(I=n.jsx(Ce,{type:"button",variant:"ghost",onClick:k,disabled:_,children:C}),e[46]=d.formState.isSubmitting,e[47]=k,e[48]=C,e[49]=I):I=e[49];let E;e[50]!==d.formState.isSubmitting||e[51]!==c?(E=d.formState.isSubmitting?n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(lo,{size:"xs"}),c("chat.dialogPromptArguments.loading")]}):c("chat.dialogPromptArguments.usePrompt"),e[50]=d.formState.isSubmitting,e[51]=c,e[52]=E):E=e[52];let P;e[53]!==d.formState.isSubmitting||e[54]!==r||e[55]!==E?(P=n.jsx(Ce,{type:"submit",form:r,disabled:d.formState.isSubmitting,children:E}),e[53]=d.formState.isSubmitting,e[54]=r,e[55]=E,e[56]=P):P=e[56];let $;e[57]!==I||e[58]!==P?($=n.jsxs(Xl,{children:[I,P]}),e[57]=I,e[58]=P,e[59]=$):$=e[59];let A;e[60]!==r||e[61]!==N||e[62]!==w||e[63]!==$?(A=n.jsxs("form",{id:r,className:"space-y-4 py-4",autoComplete:"off",onSubmit:N,children:[w,$]}),e[60]=r,e[61]=N,e[62]=w,e[63]=$,e[64]=A):A=e[64];let L;e[65]!==d||e[66]!==A?(L=n.jsx(Jl,{...d,children:A}),e[65]=d,e[66]=A,e[67]=L):L=e[67];let F;e[68]!==S||e[69]!==L?(F=n.jsxs(Yl,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[S,L]}),e[68]=S,e[69]=L,e[70]=F):F=e[70];let z;return e[71]!==b||e[72]!==F?(z=n.jsx(Kl,{open:!0,onOpenChange:b,children:F}),e[71]=b,e[72]=F,e[73]=z):z=e[73],z}const go=/^mcp__[a-zA-Z0-9_-]+__/;function Gs(s){return s.replace(go,"")}function tt(s){const e=M.c(19),{id:t,part:l,copyable:o,extraActions:a,alwaysShowActions:r,animate:c}=s,i=o===void 0?!1:o,u=r===void 0?!1:r,m=c===void 0?!1:c,{handleCopy:f}=Ls(),d=V(),[p,x]=R.useState(!1);let h;e[0]!==f||e[1]!==t||e[2]!==l.text?(h=async()=>{Mn("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]!==u||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",u?"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(Ms,{className:"size-4"})})]}),e[8]=u,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 Hc(s,e,t){s.chain().focus().insertContentAt(e,[bo(t),{type:"text",text:" "}]).run()}function bo(s){return{type:"file",attrs:s}}function yo(s){const e=M.c(17),{node:t,selected:l,view:o}=s,{name:a,mimeType:r,data:c}=t.attrs,i=l&&o.editable;let u;e[0]!==r?(u=r.startsWith("image/"),e[0]=r,e[1]=u):u=e[1];const m=u,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]!==c||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,${c}`,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]=c,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(gl,{className:d,children:h}),e[14]=d,e[15]=h,e[16]=g):g=e[16],g}const jo=xl.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 hl(yo)}}),Te=16,ht=2.5,gt=(Te-ht)/2,ct=2*Math.PI*gt;function Xs(s){const e=M.c(29),{usage:t}=s;if(!t)return null;const{totalTokens:l,inputTokens:o,outputTokens:a,cost:r}=t;if(!l&&!o&&!a)return null;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(tl,{size:12}),e[0]=c):c=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 u;e[4]!==i?(u=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:[c,n.jsx("span",{className:"text-sm font-mono tabular-nums",children:i})]})}),e[4]=i,e[5]=u):u=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]!==t?(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:`${(Lt(t)*100).toFixed(0)}%`})]}),e[17]=t,e[18]=b):b=e[18];let v;e[19]!==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[19]=r,e[20]=v):v=e[20];let j;e[21]!==y||e[22]!==b||e[23]!==v||e[24]!==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[21]=y,e[22]=b,e[23]=v,e[24]=p,e[25]=j):j=e[25];let T;return e[26]!==j||e[27]!==u?(T=n.jsxs(Re,{children:[u,j]}),e[26]=j,e[27]=u,e[28]=T):T=e[28],T}function vo(s){const e=M.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 c;e[0]!==l||e[1]!==o?(c=o?Ne(l/1e3):null,e[0]=l,e[1]=o,e[2]=c):c=e[2];const i=c;let u;e[3]!==l||e[4]!==i||e[5]!==t?(u=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]=u):u=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:`${(Lt(t)*100).toFixed(0)}%`})]})]})]})]}),e[11]=a,e[12]=r,e[13]=t,e[14]=f):f=e[14];let d;return e[15]!==u||e[16]!==m||e[17]!==f?(d=n.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[u,m,f]}),e[15]=u,e[16]=m,e[17]=f,e[18]=d):d=e[18],d}function Wc(s){const e=M.c(49),{usage:t,totalTokens:l,contextWindow:o,onOpenContextPanel:a}=s,r=Math.min(l/o*100,100),c=ct-r/100*ct,i=t?.cost??0,u=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]!==c||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:c,strokeLinecap:"round",className:b})]}),e[9]=c,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]!==u||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:u.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]=u,e[38]=m,e[39]=E):E=e[39];let P;e[40]!==t?(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:`${(Lt(t)*100).toFixed(0)}%`})]}),e[40]=t,e[41]=P):P=e[41];let $;e[42]!==I||e[43]!==E||e[44]!==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[42]=I,e[43]=E,e[44]=P,e[45]=$):$=e[45];let A;return e[46]!==N||e[47]!==$?(A=n.jsxs(Re,{children:[N,$]}),e[46]=N,e[47]=$,e[48]=A):A=e[48],A}var st="Collapsible",[So,Vc]=gs(st),[No,zt]=So(st),Ys=R.forwardRef((s,e)=>{const{__scopeCollapsible:t,open:l,defaultOpen:o,disabled:a,onOpenChange:r,...c}=s,[i,u]=Ln({prop:l,defaultProp:o??!1,onChange:r,caller:st});return n.jsx(No,{scope:t,disabled:a,contentId:Dn(),open:i,onOpenToggle:R.useCallback(()=>u(m=>!m),[u]),children:n.jsx(we.div,{"data-state":Ht(i),"data-disabled":a?"":void 0,...c,ref:e})})});Ys.displayName=st;var Ks="CollapsibleTrigger",Ot=R.forwardRef((s,e)=>{const{__scopeCollapsible:t,...l}=s,o=zt(Ks,t);return n.jsx(we.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Ht(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...l,ref:e,onClick:Se(s.onClick,o.onOpenToggle)})});Ot.displayName=Ks;var Bt="CollapsibleContent",Ut=R.forwardRef((s,e)=>{const{forceMount:t,...l}=s,o=zt(Bt,s.__scopeCollapsible);return n.jsx(Be,{present:t||o.open,children:({present:a})=>n.jsx(wo,{...l,ref:e,present:a})})});Ut.displayName=Bt;var wo=R.forwardRef((s,e)=>{const{__scopeCollapsible:t,present:l,children:o,...a}=s,r=zt(Bt,t),[c,i]=R.useState(l),u=R.useRef(null),m=Pe(e,u),f=R.useRef(0),d=f.current,p=R.useRef(0),x=p.current,h=r.open||c,g=R.useRef(h),y=R.useRef(void 0);return R.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),hs(()=>{const b=u.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":Ht(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 Ht(s){return s?"open":"closed"}var ko=Ys,qc=Ot,Gc=Ut;function To(s){const e=M.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(ko,{"data-slot":"collapsible",...t}),e[2]=t,e[3]=l):l=e[3],l}function _o(s){const e=M.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(Ot,{"data-slot":"collapsible-trigger",...t}),e[2]=t,e[3]=l):l=e[3],l}function Co(s){const e=M.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(Ut,{"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:c,variant:i="default",trailing:u,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=(c??!1)||h,k=uo({initial:v?"instant":!1}),_=n.jsxs(To,{open:w,onOpenChange:c?void 0:g,className:"min-w-0",children:[n.jsxs(_o,{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(os,{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(os,{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"}),u&&n.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:u}),n.jsx(Xs,{usage:t})]}),S&&n.jsx(Co,{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(Ms,{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=M.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 Js=4;function Qs(s){const e=M.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 c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Es,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=c):c=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,c]}),e[5]=o,e[6]=r,e[7]=i):i=e[7],i}function Zs(s){const e=M.c(12),{message:t,className:l}=s,o=t.created_at??t.metadata?.created_at??null;let a,r,c,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],c=f.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=l,e[1]=o,e[2]=a,e[3]=r,e[4]=c,e[5]=i}else a=e[2],r=e[3],c=e[4],i=e[5];if(i!==Symbol.for("react.early_return_sentinel"))return i;let u;return e[8]!==a||e[9]!==r||e[10]!==c?(u=n.jsx("span",{title:a,className:r,children:c}),e[8]=a,e[9]=r,e[10]=c,e[11]=u):u=e[11],u}function bt(s){const e=M.c(9),{since:t}=s;let l;e[0]!==t?(l=()=>rs(t,Date.now()),e[0]=t,e[1]=l):l=e[1];const[o,a]=R.useState(l);let r,c;e[2]!==t?(r=()=>{const f=setInterval(()=>a(rs(t,Date.now())),100);return()=>clearInterval(f)},c=[t],e[2]=t,e[3]=r,e[4]=c):(r=e[3],c=e[4]),R.useEffect(r,c);const i=o/1e3;let u;e[5]!==i?(u=Ne(i),e[5]=i,e[6]=u):u=e[6];let m;return e[7]!==u?(m=n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:u}),e[7]=u,e[8]=m):m=e[8],m}const en=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Io(){const s=M.c(5),[e]=R.useState($o);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=en.map((a,r)=>{const{delay:c}=a;return n.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[r],animation:"grid-ripple 1s ease infinite",animationDelay:`${c}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 $o(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return en.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}function Ro(s){return{planning:{icon:n.jsx(nl,{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 Po=1200;function yt(s){const e=M.c(8),{icon:t,title:l,summary:o,detail:a,state:r,detailVariant:c,trailing:i}=s,u=c===void 0?"prose":c;let m;return e[0]!==a||e[1]!==u||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:u,trailing:i}),e[0]=a,e[1]=u,e[2]=t,e[3]=r,e[4]=o,e[5]=l,e[6]=i,e[7]=m):m=e[7],m}function Ao(s){const e=M.c(22),{startedAt:t}=s,l=V(),o=Fe()?.runStatusStage??null,[a,r]=R.useState("planning");let c,i;if(e[0]!==o?(c=()=>{if(o!==null)return;const h=setTimeout(()=>{r("thinking")},Po);return()=>{clearTimeout(h)}},i=[o],e[0]=o,e[1]=c,e[2]=i):(c=e[1],i=e[2]),R.useEffect(c,i),o!==null){let h;e[3]!==o||e[4]!==l?(h=wl(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 u;e[13]!==l?(u=Ro(l),e[13]=l,e[14]=u):u=e[14];const f=u[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 Eo(s){const e=M.c(3),{startedAt:t}=s;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Io,{}),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 Mo=2e4;function Lo(s){const e=M.c(9),{startedAt:t}=s,l=V();_s(1e3);const o=Fe(),r=(t!==null?Date.now()-t:0)>=Mo;let c;e[0]!==t?(c=n.jsx(Ao,{startedAt:t}),e[0]=t,e[1]=c):c=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 u;return e[6]!==c||e[7]!==i?(u=n.jsxs("div",{className:"flex flex-col gap-0.5",children:[c,i]}),e[6]=c,e[7]=i,e[8]=u):u=e[8],u}function Do(s){const e=M.c(24),{duration:t,parts:l,isStreaming:o}=s,a=V();let r;e[0]!==l?(r=l.every(Oo),e[0]=l,e[1]=r):r=e[1];const c=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 u=i;let m;if(e[5]!==c||e[6]!==o||e[7]!==l){const v=l.map(zo).join(`
|
|
1
|
+
import{r as R,c as M,b as V,a2 as Pn,j as n,B as Ce,$ as ns,Z as An,a1 as En,m as K,p as Mn,aA as Ln,ax as we,aE as Dn,aD as Se,bM as Be,aB as Pe,bN as hs,az as gs,F as je,o as Fn,e as zn,K as pe,t as ft,n as Ue,d as Le,E as bs,av as ys,bO as kt,aC as On,bP as _e}from"./index-D5s7iB_G.js";import{e as Bn}from"./select-CWnB_uQx.js";import{u as js}from"./useInfiniteQuery-DiQjMEo-.js";import{a as vs,u as Un}from"./use-connection-DvPLUiIA.js";import{k as Hn,u as Tt,f as Wn,i as Vn,a as qn,S as Gn}from"./use-mcp-client-DrSHoCVl.js";import{a as Xn}from"./use-virtual-mcp-BfqTkZTV.js";import{C as Yn}from"./card-DYTU8rq7.js";import{o as Ss,m as Ns,p as _t,q as Ct}from"./sidebar-BghCVHZt.js";import{c as ws,e as ks,a as Qe,d as fe,b as Ts,T as me}from"./table-dGsHWyfu.js";import{E as mt}from"./empty-state-DU0gJX7R.js";import{u as It}from"./use-infinite-scroll-C32yKpeT.js";import{u as Kn}from"./use-members-0dOk8VV6.js";import{u as _s,S as Ee}from"./use-clock-tick-ClPZ6D9Y.js";import{e as Jn}from"./use-automations-B8-RtV1z.js";import{u as Cs}from"./studio-tools-Dnhai2E2.js";import{u as Qn}from"./useSuspenseInfiniteQuery-tRLMDsN2.js";import{A as Is}from"./avatar-D2tOztUd.js";import{t as Ge}from"./ChevronDown-BR_rY5I7.js";import{n as pt}from"./ChevronUp-DYqaZocr.js";import{n as $s,t as Zn,c as Rs,i as el,a as $t}from"./Tool02-DUySVGxt.js";import{f as tl,aO as sl,aP as nl,a5 as ll,C as ol,aQ as rl,ac as al,i as ls,as as il,z as cl,j as ul,aR as dl,aM as Ps,aS as fl,A as As,aT as be,aU as ml,k as pl}from"./agent-icon-CG09iBgJ.js";import{t as Ze}from"./Stars01-C1ltyRgO.js";import{i as Es,b as He}from"./XCircle-CVncmwo8.js";import{i as Rt}from"./Check-C-LauNEP.js";import{i as os}from"./ChevronRight-DNaF9GmC.js";import{a as Ms}from"./Copy01-b-czDxAP.js";import{b as Ne,t as Pt,c as rs}from"./format-time-BnbuEtat.js";import{u as Ls}from"./use-copy-DIay_-Je.js";import{T as Ie,a as $e,c as Re}from"./tooltip-aoWInzoh.js";import{j as At,I as xl,R as hl,J as gl,t as bl,U as he,V as Ds,W as De,c as yl,u as jl,M as vl,e as Sl,f as Nl}from"./calendar-VVAQUXnL.js";import{d as wl,c as kl,r as Tl,e as _l}from"./hooks-BnzTub3t.js";import{j as Fe,D as Cl,k as Et,b as Fs,a as Il}from"./chat-context-GCEjbEBj.js";import{c as $l}from"./monaco-editor-d6E7Zvd9.js";import{g as zs,M as Rl}from"./index-BU4e8BQP.js";import{f as Pl,o as Al,q as El}from"./tab-id-BkkhJopj.js";import{i as Os}from"./AlertCircle-B3JS1Ogr.js";import{s as Ml}from"./Eye-CWQ6QYQ_.js";import{s as Xe,t as Bs}from"./Star01-B_crwKS8.js";import{s as Ll}from"./XClose-BewBCx_H.js";import{n as xt}from"./ZapSquare-CK2EnhlO.js";import{d as Dl,c as Fl,a as We}from"./Tool01-C13i3FWq.js";import{i as ze}from"./Monitor01-Ddtu0GLO.js";import{i as zl}from"./SearchMd-DDYxMG_A.js";import{i as Ol}from"./Upload01-sXK5QJkl.js";import{u as Bl,a as Ul}from"./shell-layout-DnVpUUuI.js";import{n as Us}from"./LinkExternal01-B7fSoBl7.js";import{I as ke}from"./integration-icon-DiC7PYLo.js";import{i as Hl}from"./ArrowUpRight-C7vjzlfR.js";import{a as Mt}from"./Users03-BcYjhwHT.js";import{a as ye}from"./Palette-BjvX1ruC.js";import{c as Hs}from"./use-navigate-to-agent-BeeZom_X.js";import{a as Wl}from"./Stars02-CrM-SKfV.js";import{g as Vl}from"./AreaChart-BMS62HNl.js";import{b as ql,a as Gl,c as Xl,d as Yl,e as Kl}from"./dialog-DSJ_GZJt.js";import{F as Jl,d as Ql,a as Zl,e as eo,b as to,c as so}from"./form-CfXwbDnQ.js";import{I as no}from"./input-BLW13qDV.js";import{S as lo}from"./spinner-D1VHlCPg.js";const oo={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 Ws(s){if(!s?.providerMetadata)return 0;for(const e of Object.values(oo)){const t=e(s.providerMetadata);if(t!==null)return t}return 0}function Vs(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function qs(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+Ws(e),cacheReadTokens:s.cacheReadTokens+t,cacheWriteTokens:s.cacheWriteTokens+l}}function Lt(s){const e=Math.max(s.inputTokens,s.cacheReadTokens+s.cacheWriteTokens);return e>0?s.cacheReadTokens/e:0}function Uc(s){return s.reduce((e,t)=>qs(e,t.metadata?.usage),Vs())}const ro={damping:.7,stiffness:.05,mass:1.25},ao=70,io=1e3/60,co=350;let et=!1;globalThis.document?.addEventListener("mousedown",()=>{et=!0});globalThis.document?.addEventListener("mouseup",()=>{et=!1});globalThis.document?.addEventListener("click",()=>{et=!1});const uo=(s={})=>{const[e,t]=R.useState(!1),[l,o]=R.useState(s.initial!==!1),[a,r]=R.useState(!1),c=R.useRef(null);c.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)},[]),u=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<=ao}}},[]),d=R.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||u(!0);const v=Date.now()+(Number(b.wait)||0),j=it(c.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))/io;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(c.current,c.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()},[u,i,f]),p=R.useCallback(()=>{m(!0),u(!1)},[m,u]),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),u(!1);return}const S=v>T,N=v<T;if(f.animation?.ignoreEscapes){f.scrollTop=T;return}N&&(m(!0),u(!1)),S&&m(!1),!f.escapedFromLock&&f.isNearBottom&&u(!0)},1)},[m,u,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),u(!1))},[m,u,f]),g=as(b=>{g.current?.removeEventListener("scroll",x),g.current?.removeEventListener("wheel",h),b?.addEventListener("scroll",x,{passive:!0}),b?.addEventListener("wheel",h,{passive:!0})},[]),y=as(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(c.current,v?c.current.resize:c.current.initial);d({animation:N,wait:!0,preserveScrollPosition:!0,duration:N==="instant"?void 0:co})}else f.isNearBottom&&(m(!1),u(!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 as(s,e){const t=R.useCallback(l=>(t.current=l,s(l)),e);return t}const at=new Map;function it(...s){const e={...ro};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 fo(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 Dt(s){if(s&&typeof s=="object"&&"gatewayClientId"in s&&typeof s.gatewayClientId=="string")return s.gatewayClientId}function Ft(s,e){if(!e)return s;const t=`${fo(e)}_`;return s.startsWith(t)?s.slice(t.length):s}function mo(s,e){return Ft(s,e).replace(/[_-]/g," ").toLowerCase()}function po(s,e){const t={};for(const l of s?.arguments??[])t[l.name]=l.required?ns().min(1,e):ns();return An(t)}function xo(s,e){const t={};for(const l of s.arguments??[])t[l.name]=e?.[l.name]??"";return t}function ho(s){const e=M.c(74),{prompt:t,setPrompt:l,onSubmit:o,defaultValues:a}=s,r=R.useId(),c=V();let i,u;if(e[0]!==t||e[1]!==c){const D=po(t,c("chat.dialogPromptArguments.required"));u=En,i=Pn(D),e[0]=t,e[1]=c,e[2]=i,e[3]=u}else i=e[2],u=e[3];let m;e[4]!==a||e[5]!==t?(m=t?xo(t,a):{},e[4]=a,e[5]=t,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==m?(f={resolver:i,defaultValues:m,mode:"onChange"},e[7]=i,e[8]=m,e[9]=f):f=e[9];const d=u(f);let p;e[10]!==t?.arguments?(p=t?.arguments??[],e[10]=t?.arguments,e[11]=p):p=e[11];const x=p;let h;e[12]!==d||e[13]!==o||e[14]!==l?(h=async D=>{await o(D),l(null),d.reset()},e[12]=d,e[13]=o,e[14]=l,e[15]=h):h=e[15];const g=h;let y;e[16]!==d||e[17]!==l?(y=D=>{D||(d.reset(),l(null))},e[16]=d,e[17]=l,e[18]=y):y=e[18];const b=y;if(!t)return null;let v;e[19]!==t._meta||e[20]!==t.name||e[21]!==t.title?(v=t.title||mo(t.name,Dt(t._meta)),e[19]=t._meta,e[20]=t.name,e[21]=t.title,e[22]=v):v=e[22];let j;e[23]!==v?(j=n.jsx(ql,{children:n.jsx("span",{className:"capitalize",children:v})}),e[23]=v,e[24]=j):j=e[24];let T;e[25]!==t.description?(T=t.description&&n.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),e[25]=t.description,e[26]=T):T=e[26];let S;e[27]!==T||e[28]!==j?(S=n.jsxs(Gl,{children:[j,T]}),e[27]=T,e[28]=j,e[29]=S):S=e[29];let N;e[30]!==d||e[31]!==g?(N=D=>{D.stopPropagation(),d.handleSubmit(g)(D)},e[30]=d,e[31]=g,e[32]=N):N=e[32];let w;if(e[33]!==x||e[34]!==d.control||e[35]!==d.formState.isSubmitting||e[36]!==c){let D;e[38]!==d.control||e[39]!==d.formState.isSubmitting||e[40]!==c?(D=O=>n.jsx(Ql,{control:d.control,name:O.name,render:B=>{const{field:U}=B;return n.jsxs(Zl,{children:[n.jsxs(eo,{className:"text-xs",children:[O.name,O.required?null:n.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ",c("chat.dialogPromptArguments.optional")]})]}),n.jsx(to,{children:n.jsx(no,{...U,value:U.value??"",required:O.required,placeholder:O.description??"",className:"h-9",disabled:d.formState.isSubmitting})}),n.jsx(so,{})]})}},O.name),e[38]=d.control,e[39]=d.formState.isSubmitting,e[40]=c,e[41]=D):D=e[41],w=x.map(D),e[33]=x,e[34]=d.control,e[35]=d.formState.isSubmitting,e[36]=c,e[37]=w}else w=e[37];let k;e[42]!==b?(k=()=>b(!1),e[42]=b,e[43]=k):k=e[43];const _=d.formState.isSubmitting;let C;e[44]!==c?(C=c("chat.dialogPromptArguments.cancel"),e[44]=c,e[45]=C):C=e[45];let I;e[46]!==d.formState.isSubmitting||e[47]!==k||e[48]!==C?(I=n.jsx(Ce,{type:"button",variant:"ghost",onClick:k,disabled:_,children:C}),e[46]=d.formState.isSubmitting,e[47]=k,e[48]=C,e[49]=I):I=e[49];let E;e[50]!==d.formState.isSubmitting||e[51]!==c?(E=d.formState.isSubmitting?n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(lo,{size:"xs"}),c("chat.dialogPromptArguments.loading")]}):c("chat.dialogPromptArguments.usePrompt"),e[50]=d.formState.isSubmitting,e[51]=c,e[52]=E):E=e[52];let P;e[53]!==d.formState.isSubmitting||e[54]!==r||e[55]!==E?(P=n.jsx(Ce,{type:"submit",form:r,disabled:d.formState.isSubmitting,children:E}),e[53]=d.formState.isSubmitting,e[54]=r,e[55]=E,e[56]=P):P=e[56];let $;e[57]!==I||e[58]!==P?($=n.jsxs(Xl,{children:[I,P]}),e[57]=I,e[58]=P,e[59]=$):$=e[59];let A;e[60]!==r||e[61]!==N||e[62]!==w||e[63]!==$?(A=n.jsxs("form",{id:r,className:"space-y-4 py-4",autoComplete:"off",onSubmit:N,children:[w,$]}),e[60]=r,e[61]=N,e[62]=w,e[63]=$,e[64]=A):A=e[64];let L;e[65]!==d||e[66]!==A?(L=n.jsx(Jl,{...d,children:A}),e[65]=d,e[66]=A,e[67]=L):L=e[67];let F;e[68]!==S||e[69]!==L?(F=n.jsxs(Yl,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[S,L]}),e[68]=S,e[69]=L,e[70]=F):F=e[70];let z;return e[71]!==b||e[72]!==F?(z=n.jsx(Kl,{open:!0,onOpenChange:b,children:F}),e[71]=b,e[72]=F,e[73]=z):z=e[73],z}const go=/^mcp__[a-zA-Z0-9_-]+__/;function Gs(s){return s.replace(go,"")}function tt(s){const e=M.c(19),{id:t,part:l,copyable:o,extraActions:a,alwaysShowActions:r,animate:c}=s,i=o===void 0?!1:o,u=r===void 0?!1:r,m=c===void 0?!1:c,{handleCopy:f}=Ls(),d=V(),[p,x]=R.useState(!1);let h;e[0]!==f||e[1]!==t||e[2]!==l.text?(h=async()=>{Mn("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]!==u||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",u?"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(Ms,{className:"size-4"})})]}),e[8]=u,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 Hc(s,e,t){s.chain().focus().insertContentAt(e,[bo(t),{type:"text",text:" "}]).run()}function bo(s){return{type:"file",attrs:s}}function yo(s){const e=M.c(17),{node:t,selected:l,view:o}=s,{name:a,mimeType:r,data:c}=t.attrs,i=l&&o.editable;let u;e[0]!==r?(u=r.startsWith("image/"),e[0]=r,e[1]=u):u=e[1];const m=u,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]!==c||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,${c}`,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]=c,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(gl,{className:d,children:h}),e[14]=d,e[15]=h,e[16]=g):g=e[16],g}const jo=xl.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 hl(yo)}}),Te=16,ht=2.5,gt=(Te-ht)/2,ct=2*Math.PI*gt;function Xs(s){const e=M.c(29),{usage:t}=s;if(!t)return null;const{totalTokens:l,inputTokens:o,outputTokens:a,cost:r}=t;if(!l&&!o&&!a)return null;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(tl,{size:12}),e[0]=c):c=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 u;e[4]!==i?(u=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:[c,n.jsx("span",{className:"text-sm font-mono tabular-nums",children:i})]})}),e[4]=i,e[5]=u):u=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]!==t?(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:`${(Lt(t)*100).toFixed(0)}%`})]}),e[17]=t,e[18]=b):b=e[18];let v;e[19]!==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[19]=r,e[20]=v):v=e[20];let j;e[21]!==y||e[22]!==b||e[23]!==v||e[24]!==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[21]=y,e[22]=b,e[23]=v,e[24]=p,e[25]=j):j=e[25];let T;return e[26]!==j||e[27]!==u?(T=n.jsxs(Re,{children:[u,j]}),e[26]=j,e[27]=u,e[28]=T):T=e[28],T}function vo(s){const e=M.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 c;e[0]!==l||e[1]!==o?(c=o?Ne(l/1e3):null,e[0]=l,e[1]=o,e[2]=c):c=e[2];const i=c;let u;e[3]!==l||e[4]!==i||e[5]!==t?(u=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]=u):u=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:`${(Lt(t)*100).toFixed(0)}%`})]})]})]})]}),e[11]=a,e[12]=r,e[13]=t,e[14]=f):f=e[14];let d;return e[15]!==u||e[16]!==m||e[17]!==f?(d=n.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[u,m,f]}),e[15]=u,e[16]=m,e[17]=f,e[18]=d):d=e[18],d}function Wc(s){const e=M.c(49),{usage:t,totalTokens:l,contextWindow:o,onOpenContextPanel:a}=s,r=Math.min(l/o*100,100),c=ct-r/100*ct,i=t?.cost??0,u=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]!==c||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:c,strokeLinecap:"round",className:b})]}),e[9]=c,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]!==u||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:u.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]=u,e[38]=m,e[39]=E):E=e[39];let P;e[40]!==t?(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:`${(Lt(t)*100).toFixed(0)}%`})]}),e[40]=t,e[41]=P):P=e[41];let $;e[42]!==I||e[43]!==E||e[44]!==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[42]=I,e[43]=E,e[44]=P,e[45]=$):$=e[45];let A;return e[46]!==N||e[47]!==$?(A=n.jsxs(Re,{children:[N,$]}),e[46]=N,e[47]=$,e[48]=A):A=e[48],A}var st="Collapsible",[So,Vc]=gs(st),[No,zt]=So(st),Ys=R.forwardRef((s,e)=>{const{__scopeCollapsible:t,open:l,defaultOpen:o,disabled:a,onOpenChange:r,...c}=s,[i,u]=Ln({prop:l,defaultProp:o??!1,onChange:r,caller:st});return n.jsx(No,{scope:t,disabled:a,contentId:Dn(),open:i,onOpenToggle:R.useCallback(()=>u(m=>!m),[u]),children:n.jsx(we.div,{"data-state":Ht(i),"data-disabled":a?"":void 0,...c,ref:e})})});Ys.displayName=st;var Ks="CollapsibleTrigger",Ot=R.forwardRef((s,e)=>{const{__scopeCollapsible:t,...l}=s,o=zt(Ks,t);return n.jsx(we.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Ht(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...l,ref:e,onClick:Se(s.onClick,o.onOpenToggle)})});Ot.displayName=Ks;var Bt="CollapsibleContent",Ut=R.forwardRef((s,e)=>{const{forceMount:t,...l}=s,o=zt(Bt,s.__scopeCollapsible);return n.jsx(Be,{present:t||o.open,children:({present:a})=>n.jsx(wo,{...l,ref:e,present:a})})});Ut.displayName=Bt;var wo=R.forwardRef((s,e)=>{const{__scopeCollapsible:t,present:l,children:o,...a}=s,r=zt(Bt,t),[c,i]=R.useState(l),u=R.useRef(null),m=Pe(e,u),f=R.useRef(0),d=f.current,p=R.useRef(0),x=p.current,h=r.open||c,g=R.useRef(h),y=R.useRef(void 0);return R.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),hs(()=>{const b=u.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":Ht(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 Ht(s){return s?"open":"closed"}var ko=Ys,qc=Ot,Gc=Ut;function To(s){const e=M.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(ko,{"data-slot":"collapsible",...t}),e[2]=t,e[3]=l):l=e[3],l}function _o(s){const e=M.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(Ot,{"data-slot":"collapsible-trigger",...t}),e[2]=t,e[3]=l):l=e[3],l}function Co(s){const e=M.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(Ut,{"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:c,variant:i="default",trailing:u,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=(c??!1)||h,k=uo({initial:v?"instant":!1}),_=n.jsxs(To,{open:w,onOpenChange:c?void 0:g,className:"min-w-0",children:[n.jsxs(_o,{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(os,{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(os,{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"}),u&&n.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:u}),n.jsx(Xs,{usage:t})]}),S&&n.jsx(Co,{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(Ms,{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=M.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 Js=4;function Qs(s){const e=M.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 c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Es,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=c):c=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,c]}),e[5]=o,e[6]=r,e[7]=i):i=e[7],i}function Zs(s){const e=M.c(12),{message:t,className:l}=s,o=t.created_at??t.metadata?.created_at??null;let a,r,c,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],c=f.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=l,e[1]=o,e[2]=a,e[3]=r,e[4]=c,e[5]=i}else a=e[2],r=e[3],c=e[4],i=e[5];if(i!==Symbol.for("react.early_return_sentinel"))return i;let u;return e[8]!==a||e[9]!==r||e[10]!==c?(u=n.jsx("span",{title:a,className:r,children:c}),e[8]=a,e[9]=r,e[10]=c,e[11]=u):u=e[11],u}function bt(s){const e=M.c(9),{since:t}=s;let l;e[0]!==t?(l=()=>rs(t,Date.now()),e[0]=t,e[1]=l):l=e[1];const[o,a]=R.useState(l);let r,c;e[2]!==t?(r=()=>{const f=setInterval(()=>a(rs(t,Date.now())),100);return()=>clearInterval(f)},c=[t],e[2]=t,e[3]=r,e[4]=c):(r=e[3],c=e[4]),R.useEffect(r,c);const i=o/1e3;let u;e[5]!==i?(u=Ne(i),e[5]=i,e[6]=u):u=e[6];let m;return e[7]!==u?(m=n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:u}),e[7]=u,e[8]=m):m=e[8],m}const en=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Io(){const s=M.c(5),[e]=R.useState($o);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=en.map((a,r)=>{const{delay:c}=a;return n.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[r],animation:"grid-ripple 1s ease infinite",animationDelay:`${c}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 $o(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return en.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}function Ro(s){return{planning:{icon:n.jsx(nl,{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 Po=1200;function yt(s){const e=M.c(8),{icon:t,title:l,summary:o,detail:a,state:r,detailVariant:c,trailing:i}=s,u=c===void 0?"prose":c;let m;return e[0]!==a||e[1]!==u||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:u,trailing:i}),e[0]=a,e[1]=u,e[2]=t,e[3]=r,e[4]=o,e[5]=l,e[6]=i,e[7]=m):m=e[7],m}function Ao(s){const e=M.c(22),{startedAt:t}=s,l=V(),o=Fe()?.runStatusStage??null,[a,r]=R.useState("planning");let c,i;if(e[0]!==o?(c=()=>{if(o!==null)return;const h=setTimeout(()=>{r("thinking")},Po);return()=>{clearTimeout(h)}},i=[o],e[0]=o,e[1]=c,e[2]=i):(c=e[1],i=e[2]),R.useEffect(c,i),o!==null){let h;e[3]!==o||e[4]!==l?(h=wl(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 u;e[13]!==l?(u=Ro(l),e[13]=l,e[14]=u):u=e[14];const f=u[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 Eo(s){const e=M.c(3),{startedAt:t}=s;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Io,{}),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 Mo=2e4;function Lo(s){const e=M.c(9),{startedAt:t}=s,l=V();_s(1e3);const o=Fe(),r=(t!==null?Date.now()-t:0)>=Mo;let c;e[0]!==t?(c=n.jsx(Ao,{startedAt:t}),e[0]=t,e[1]=c):c=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 u;return e[6]!==c||e[7]!==i?(u=n.jsxs("div",{className:"flex flex-col gap-0.5",children:[c,i]}),e[6]=c,e[7]=i,e[8]=u):u=e[8],u}function Do(s){const e=M.c(24),{duration:t,parts:l,isStreaming:o}=s,a=V();let r;e[0]!==l?(r=l.every(Oo),e[0]=l,e[1]=r):r=e[1];const c=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 u=i;let m;if(e[5]!==c||e[6]!==o||e[7]!==l){const v=l.map(zo).join(`
|
|
2
2
|
`).trim().split(`
|
|
3
3
|
`).filter(Boolean),j=o?v[v.length-1]??"":v[0]??"";m=!c&&j?j.length>100?j.slice(0,100)+"…":j:void 0,e[5]=c,e[6]=o,e[7]=l,e[8]=m}else m=e[8];const f=m;let d;if(e[9]!==c||e[10]!==l){const b=l.map(Fo).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-D5s7iB_G.js";import{s as V}from"./Plus-BQ3wCu8K.js";import{i as S}from"./Zap-BVnrXYPx.js";import{S as G}from"./search-input-DDVxkABf.js";import{P as d}from"./index-D8679f_U.js";import{E as T}from"./empty-state-DU0gJX7R.js";import{c as H}from"./use-automations-B8-RtV1z.js";import{c as J}from"./use-navigate-to-agent-BeeZom_X.js";import{A as K}from"./automation-list-row-CHCVO6NE.js";import{r as O}from"./use-mcp-client-DrSHoCVl.js";import{a as Q}from"./use-virtual-mcp-BfqTkZTV.js";import{R as U}from"./require-capability-CaR1pXbU.js";import"./SearchMd-DDYxMG_A.js";import"./sidebar-BghCVHZt.js";import"./LayoutLeft-619VnLrS.js";import"./use-mobile-CGdxblv_.js";import"./X-ypK_5s2v.js";import"./tooltip-aoWInzoh.js";import"./studio-tools-Dnhai2E2.js";import"./hooks-BnzTub3t.js";import"./decopilot-sse-pool-BuDEKE2B.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./alert-dialog-CquqUuRD.js";import"./dropdown-menu-Dl-K6r1z.js";import"./Check-C-LauNEP.js";import"./ChevronRight-DNaF9GmC.js";import"./DotsVertical-SHbBfUyY.js";import"./Stars02-CrM-SKfV.js";import"./Trash01-C_efCdAs.js";import"./agent-icon-CG09iBgJ.js";import"./AlertCircle-B3JS1Ogr.js";import"./Tool01-C13i3FWq.js";import"./ArrowUp-D9KeZg3z.js";import"./Settings02-C8JbwZnu.js";import"./Tool02-DUySVGxt.js";import"./XCircle-CVncmwo8.js";import"./ArrowUpRight-C7vjzlfR.js";import"./TrendUp01-BgnnhLXr.js";import"./ZapSquare-CK2EnhlO.js";import"./Users03-BcYjhwHT.js";import"./CheckCircle-BAtVWz02.js";import"./ChevronDown-BR_rY5I7.js";import"./ChevronUp-DYqaZocr.js";import"./Copy01-b-czDxAP.js";import"./CpuChip01-CzTGabjK.js";import"./CreditCard01-DHT3Rv6c.js";import"./Eye-CWQ6QYQ_.js";import"./FilterLines-FKt18eu-.js";import"./Star01-B_crwKS8.js";import"./Palette-BjvX1ruC.js";import"./SwitchHorizontal01-LVXImEqS.js";import"./HardDrive--Ca3_i9z.js";import"./Key01-Cxb_dTY9.js";import"./LinkExternal01-B7fSoBl7.js";import"./LogOut01-8nsv1Zrx.js";import"./Monitor01-Ddtu0GLO.js";import"./Sun-EctD6SlF.js";import"./Play-B6BIJve0.js";import"./SearchLg-Bf0OE8pv.js";import"./Shield01-n9H7rn2N.js";import"./Stars01-C1ltyRgO.js";import"./Upload01-sXK5QJkl.js";import"./User01-DQ1vt8a0.js";import"./Users01-Do4gmbPq.js";import"./XClose-BewBCx_H.js";import"./auth-xxR7y6tl.js";import"./use-capability-DiPv8Zb8.js";import"./access-gate-gdInAd9D.js";import"./capability-load-error-CQdkThFQ.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 fo(){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{fo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as i,m as f,bC as R,cP as V,cQ as I,cR as $}from"./index-
|
|
1
|
+
import{c as k,j as i,m as f,bC as R,cP as V,cQ as I,cR as $}from"./index-D5s7iB_G.js";import{s as O}from"./User01-DQ1vt8a0.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(V,{"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 S=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"}}),_=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),D=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 P(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(S({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:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(E,{src:l,loading:"lazy",alt:"Avatar",className:f(_({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 Q(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(P,{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}Q.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(S({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{Q as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,m as l,j as g,be as v,bC as b}from"./index-
|
|
1
|
+
import{c as u,m as l,j as g,be as v,bC as b}from"./index-D5s7iB_G.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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as le,j as s,cx as re,cy as ge,c as D,m as ne,b as ae,F as xe,K as pe,n as be,B as Y,k as J}from"./index-
|
|
1
|
+
import{r as le,j as s,cx as re,cy as ge,c as D,m as ne,b as ae,F as xe,K as pe,n as be,B as Y,k as J}from"./index-D5s7iB_G.js";import{i as W}from"./CreditCard01-DHT3Rv6c.js";import{B as Q}from"./badge-D8pOsxKV.js";import{S as ee}from"./skeleton-lc9kh8qd.js";import{P as M}from"./index-D8679f_U.js";import{c as he,S as ve,a as Z,b as je}from"./settings-section-ZIpqpn6u.js";import{u as Ne}from"./studio-tools-Dnhai2E2.js";import{u as te}from"./use-open-billing-url-mk1x37uU.js";import{R as Pe}from"./require-capability-CaR1pXbU.js";import"./sidebar-BghCVHZt.js";import"./LayoutLeft-619VnLrS.js";import"./use-mobile-CGdxblv_.js";import"./X-ypK_5s2v.js";import"./tooltip-aoWInzoh.js";import"./card-DYTU8rq7.js";import"./ArrowUpRight-C7vjzlfR.js";import"./use-capability-DiPv8Zb8.js";import"./access-gate-gdInAd9D.js";import"./capability-load-error-CQdkThFQ.js";var X="Progress",H=100,[ye]=ge(X),[Te,_e]=ye(X),oe=le.forwardRef((e,t)=>{const{__scopeProgress:o,value:r=null,max:i,getValueLabel:a=Se,...c}=e;(i||i===0)&&!se(i)&&console.error(Ie(`${i}`,"Progress"));const l=se(i)?i:H;r!==null&&!ie(r,l)&&console.error(Ee(`${r}`,"Progress"));const n=ie(r,l)?r:null,u=V(n)?a(n,l):void 0;return s.jsx(Te,{scope:o,value:n,max:l,children:s.jsx(re.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":V(n)?n:void 0,"aria-valuetext":u,role:"progressbar","data-state":ue(n,l),"data-value":n??void 0,"data-max":l,...c,ref:t})})});oe.displayName=X;var ce="ProgressIndicator",de=le.forwardRef((e,t)=>{const{__scopeProgress:o,...r}=e,i=_e(ce,o);return s.jsx(re.div,{"data-state":ue(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});de.displayName=ce;function Se(e,t){return`${Math.round(e/t*100)}%`}function ue(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function V(e){return typeof e=="number"}function se(e){return V(e)&&!isNaN(e)&&e>0}function ie(e,t){return V(e)&&!isNaN(e)&&e<=t&&e>=0}function Ie(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${H}\`.`}function Ee(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
2
2
|
- a positive number
|
|
3
3
|
- less than the value passed to \`max\` (or ${H} if no \`max\` prop is set)
|
|
4
4
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|