decocms 2.310.1 → 2.310.3
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-BUuG9jUS.js → AlertCircle-B72APkrz.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-B2WgGuUG.js → ArrowNarrowLeft-Dz0P9WNF.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BRxJDyw2.js → ArrowUpRight-CCQZEQ7k.js} +1 -1
- package/dist/client/assets/{Check-DNFNSXQB.js → Check-CUpq9BBu.js} +1 -1
- package/dist/client/assets/{CheckCircle-fDjMIV_J.js → CheckCircle-DTCxFilU.js} +1 -1
- package/dist/client/assets/{ChevronDown-plDbvt9_.js → ChevronDown-D5WF5tyi.js} +1 -1
- package/dist/client/assets/{ChevronRight-C6IGuK_L.js → ChevronRight-DwbV0YDZ.js} +1 -1
- package/dist/client/assets/{ChevronUp-BQpSShtW.js → ChevronUp-CDMPc0ql.js} +1 -1
- package/dist/client/assets/{Container-cby1lpQK.js → Container-BioZd28q.js} +1 -1
- package/dist/client/assets/{DotsVertical-CrL41KCh.js → DotsVertical-D8wcDPCU.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DDjHJHtD.js → LinkExternal01-CKpEz_fF.js} +1 -1
- package/dist/client/assets/{Lock01-CMc8wMJA.js → Lock01-CHfwR6Qi.js} +1 -1
- package/dist/client/assets/{Palette-BsSq52os.js → Palette-brLBiHpP.js} +1 -1
- package/dist/client/assets/{Play-B93BJPTD.js → Play-DRCdZRLW.js} +1 -1
- package/dist/client/assets/{Plus-CsU0klMp.js → Plus-DNkjVBwq.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-GcJ7_jjW.js → RefreshCcw01-CdP9yH0w.js} +1 -1
- package/dist/client/assets/{SearchMd-CLV2ZHE1.js → SearchMd-JqX1mLMq.js} +1 -1
- package/dist/client/assets/{Settings02-CMQBJ6AU.js → Settings02-D1Jfvo1d.js} +1 -1
- package/dist/client/assets/{Shield01-Bb8uicnU.js → Shield01-D5fQpAyA.js} +1 -1
- package/dist/client/assets/{Star01-DOzaFb6_.js → Star01-Y834gtsL.js} +1 -1
- package/dist/client/assets/{Sun-Bp560G7u.js → Sun-BgOSswUu.js} +1 -1
- package/dist/client/assets/{Tool01-B1WXLPyp.js → Tool01-CXQZ3p7Z.js} +1 -1
- package/dist/client/assets/{Trash01-WbvRG8Rr.js → Trash01-B8-uqWxa.js} +1 -1
- package/dist/client/assets/{User01-Dqi_S_yw.js → User01-Cxb6YtJq.js} +1 -1
- package/dist/client/assets/{Users03-CmMFskSR.js → Users03-CXkopkPu.js} +1 -1
- package/dist/client/assets/{X-26aOhFK-.js → X-CdXDgTcN.js} +1 -1
- package/dist/client/assets/{XCircle-DuIm7Kpp.js → XCircle-CjR4LC4r.js} +1 -1
- package/dist/client/assets/{XClose-Bet7IpXN.js → XClose-zqTFiPq2.js} +1 -1
- package/dist/client/assets/{Zap-DHkXBm_R.js → Zap--FKeiDFf.js} +1 -1
- package/dist/client/assets/{ZapSquare-B0Ev1OMS.js → ZapSquare-CliIuzcs.js} +1 -1
- package/dist/client/assets/{accordion-D1MMgTV5.js → accordion-BBKL1fM-.js} +1 -1
- package/dist/client/assets/{agent-icon-BhSIvnHs.js → agent-icon-CaG-DX2m.js} +1 -1
- package/dist/client/assets/{agents-list-DfRZsmWN.js → agents-list-BUqQO9y3.js} +1 -1
- package/dist/client/assets/ai-providers-BvV5AI1b.js +1 -0
- package/dist/client/assets/{alert-dialog-Booud0bQ.js → alert-dialog-B-P8jHly.js} +1 -1
- package/dist/client/assets/{auth-catchall-CfLpBYfo.js → auth-catchall-CyIMPFaS.js} +1 -1
- package/dist/client/assets/{automation-list-row-3UbFqf20.js → automation-list-row-Qk3UXtKg.js} +1 -1
- package/dist/client/assets/{automations-Bpw-Bphr.js → automations-CkkIdwK3.js} +1 -1
- package/dist/client/assets/{avatar-Dr_hgnh5.js → avatar-CYyuZ3vB.js} +1 -1
- package/dist/client/assets/{badge-Dc_jqHv8.js → badge-C-R5WeFR.js} +1 -1
- package/dist/client/assets/{brand-context-DDkAkGby.js → brand-context-BqPn2XVA.js} +1 -1
- package/dist/client/assets/{card-I8QwhHay.js → card-BWjsP1pO.js} +1 -1
- package/dist/client/assets/{chat-context-DANvJNxJ.js → chat-context-D7DJNKEQ.js} +1 -1
- package/dist/client/assets/{checkbox-YDqzyyON.js → checkbox-DRyB8BVf.js} +1 -1
- package/dist/client/assets/{collection-detail-CEcX9P1L.js → collection-detail-BiG3-7wS.js} +1 -1
- package/dist/client/assets/{collection-display-button-CEbXTT1D.js → collection-display-button-D0yyhe94.js} +1 -1
- package/dist/client/assets/{collection-search-ZtrOS_FO.js → collection-search-BtC9EgTH.js} +1 -1
- package/dist/client/assets/{collection-search-54YVIzGK.js → collection-search-CVa4reVh.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CykRk2i4.js → collection-table-wrapper-C2Zi2ikn.js} +1 -1
- package/dist/client/assets/{collection-tabs-BJYdyh2U.js → collection-tabs-8bicuWoG.js} +1 -1
- package/dist/client/assets/{collections-B4Ew0_5W.js → collections-ZqRHYd6U.js} +1 -1
- package/dist/client/assets/{command-BUdSnxPX.js → command-BUJHwA-d.js} +1 -1
- package/dist/client/assets/{connection-card-CPkO4XVy.js → connection-card-CiNzXirJ.js} +1 -1
- package/dist/client/assets/{connection-detail-7MO-vamz.js → connection-detail-DQFCqOq5.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DTw0Qq7p.js → connection-form-helpers-BFnOvbFy.js} +1 -1
- package/dist/client/assets/{connections-Cae6WzSq.js → connections-BzqA2cUL.js} +1 -1
- package/dist/client/assets/{constants-8vN_wpoM.js → constants-BmLTAQzq.js} +1 -1
- package/dist/client/assets/{constants-C0Z_UV1B.js → constants-Df56C9B1.js} +1 -1
- package/dist/client/assets/{dialog-ChC8b-fd.js → dialog-HqMwvS0c.js} +1 -1
- package/dist/client/assets/{domain-settings-wSm6QNFe.js → domain-settings-8zUtZk7o.js} +1 -1
- package/dist/client/assets/{drawer-C1rmyAh5.js → drawer-hkToOxOG.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BYnm4L0S.js → dropdown-menu-CD1YJIi0.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-C8rDQhFA.js → dynamic-plugin-layout--sGvQXk2.js} +1 -1
- package/dist/client/assets/{empty-state-B5SEGNSf.js → empty-state-B29HN9Vl.js} +1 -1
- package/dist/client/assets/{empty-state-CS1xioMM.js → empty-state-CElAqeAn.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CnZlsGuF.js → extract-connection-data-DYXiFLZH.js} +1 -1
- package/dist/client/assets/{features-B16s5Y96.js → features-Dvru3uGD.js} +1 -1
- package/dist/client/assets/{form-DgLK3RL7.js → form-CKajJk24.js} +1 -1
- package/dist/client/assets/{general-f6TAIn-G.js → general-D8u2dVV2.js} +1 -1
- package/dist/client/assets/{index-fsAFWsFR.js → index--52kuhAD.js} +1 -1
- package/dist/client/assets/{index-DsyVbeAM.js → index-BPbckF-i.js} +3 -3
- package/dist/client/assets/{index-CbahmBQ1.js → index-BPgW_PVH.js} +1 -1
- package/dist/client/assets/index-BTded5vd.js +1 -0
- package/dist/client/assets/{index-CgQIf70g.js → index-Boo37gVZ.js} +1 -1
- package/dist/client/assets/{index-CGzddOPN.js → index-CHpjwsZ-.js} +1 -1
- package/dist/client/assets/{index-TdWHe30j.js → index-CMbhqARA.js} +1 -1
- package/dist/client/assets/{index-BtR3GFsv.js → index-CO402MfB.js} +1 -1
- package/dist/client/assets/{index-C5EaiV0u.js → index-CgQG3OxM.js} +1 -1
- package/dist/client/assets/{index-DlX-BDoo.js → index-ClxNnAsp.js} +1 -1
- package/dist/client/assets/{index-CVMf-cdp.js → index-CnR4TnGO.js} +1 -1
- package/dist/client/assets/{index-D3id_i25.js → index-D7rGFiVq.js} +1 -1
- package/dist/client/assets/{index-BrFuw-qb.js → index-D9-ppQFz.js} +1 -1
- package/dist/client/assets/{index-ofAY-Kzj.js → index-DVk4aJ0j.js} +1 -1
- package/dist/client/assets/{index-DCa8vMMj.js → index-Y4klGMPr.js} +1 -1
- package/dist/client/assets/{index--hcGoWBP.js → index-k8njt3_A.js} +2 -2
- package/dist/client/assets/{infiniteQueryObserver-Bw_LLK9Y.js → infiniteQueryObserver-IG8f9wWg.js} +1 -1
- package/dist/client/assets/{input-Di5VhXrx.js → input-DrFzs1Yw.js} +1 -1
- package/dist/client/assets/{integration-icon-BFclX5Vo.js → integration-icon-DUMCOZJc.js} +1 -1
- package/dist/client/assets/{label--CSWWgsb.js → label-0J4Z8Ji8.js} +1 -1
- package/dist/client/assets/{layout-DGzZ7eIZ.js → layout-zbF9c9kI.js} +1 -1
- package/dist/client/assets/{lean-canvas-recruit-modal-BRNt7FNZ.js → lean-canvas-recruit-modal-D2QgFiqW.js} +1 -1
- package/dist/client/assets/{login-CWxs7FH8.js → login-m1plet6k.js} +1 -1
- package/dist/client/assets/{members-D-RcZScv.js → members-DsVQeYYP.js} +1 -1
- package/dist/client/assets/{monaco-editor-BRZw2Ss_.js → monaco-editor-Br1M5lwR.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BELQHcMp.js → monitoring-stats-row-BtBHpMXc.js} +1 -1
- package/dist/client/assets/{oauth-callback-D1mU79r6.js → oauth-callback-D6DOFeyW.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BI3N0zYC.js → oauth-callback-ai-provider-wUhwntlH.js} +1 -1
- package/dist/client/assets/{onboarding-Corplh-J.js → onboarding-dml5YruP.js} +1 -1
- package/dist/client/assets/{org-layout-Dw015CRn.js → org-layout-QSP-N9k0.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-BhY_p3Sb.js → org-plugin-layout-ZONr0rlX.js} +1 -1
- package/dist/client/assets/{pair-BkQ-4R0Y.js → pair-mf97TAS_.js} +2 -2
- package/dist/client/assets/{plugin-empty-state-Daxzikof.js → plugin-empty-state-CFxEUNdF.js} +1 -1
- package/dist/client/assets/{plugin-header-DxSn3bJb.js → plugin-header-HXnwUdYS.js} +1 -1
- package/dist/client/assets/{plugin-layout-CLDR8aeJ.js → plugin-layout-ZwMLw5wK.js} +1 -1
- package/dist/client/assets/{popover-BxTvqO7l.js → popover-DUMNq33j.js} +1 -1
- package/dist/client/assets/{profile-CiaA4yp_.js → profile-CyqjRQfg.js} +1 -1
- package/dist/client/assets/{project-app-view-C9qLbJFL.js → project-app-view-Di4yF5Oz.js} +1 -1
- package/dist/client/assets/registry-DgOCTdY8.js +2 -0
- package/dist/client/assets/{registry-layout-DUo-P35f.js → registry-layout-B2U_9fgO.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BnqlPeG9.js → required-auth-layout-PH0-_blQ.js} +1 -1
- package/dist/client/assets/{reset-password-DHzLCFSu.js → reset-password-5ioWEbN5.js} +1 -1
- package/dist/client/assets/{roles-qTMcTl_m.js → roles-4ojRgHgc.js} +1 -1
- package/dist/client/assets/{scroll-area-VgUNFi6v.js → scroll-area-D_tsHfC-.js} +1 -1
- package/dist/client/assets/{search-input-Fm6Uugnb.js → search-input-Boj5tfQn.js} +1 -1
- package/dist/client/assets/{select-4BiO-1He.js → select-B3lWwv9y.js} +1 -1
- package/dist/client/assets/{select-model-DbFtB1R4.js → select-model-C-fLwr4k.js} +1 -1
- package/dist/client/assets/{settings-layout-B4AxAY74.js → settings-layout-U-ZhWkRq.js} +1 -1
- package/dist/client/assets/{settings-section-BqQHUry6.js → settings-section-qufbNRCL.js} +1 -1
- package/dist/client/assets/{shell-layout-CcLP72E6.js → shell-layout-G8D-0WXl.js} +1 -1
- package/dist/client/assets/{skeleton-D_v3jh_x.js → skeleton-BfKJMKYc.js} +1 -1
- package/dist/client/assets/{sso-BgjWtdcn.js → sso-BdojNoX2.js} +1 -1
- package/dist/client/assets/{store-IULAwEa2.js → store-DGVb_5C1.js} +1 -1
- package/dist/client/assets/store-registry-KlW3QwUJ.js +2 -0
- package/dist/client/assets/{switch-Uh77-H9s.js → switch-YLfAn92x.js} +1 -1
- package/dist/client/assets/{table-BCa0VyBS.js → table-wHPRdxYv.js} +1 -1
- package/dist/client/assets/{tabs-CJMCPubd.js → tabs-8aX3BTo-.js} +1 -1
- package/dist/client/assets/{task-status-QVkFLAWD.js → task-status-CY3ltf_M.js} +1 -1
- package/dist/client/assets/{textarea-IkB1PXd2.js → textarea-BJZt5-vN.js} +1 -1
- package/dist/client/assets/{toggle-group-CxTeQVbK.js → toggle-group-C_B32Tm8.js} +1 -1
- package/dist/client/assets/{tools-list-PZv7L79s.js → tools-list-bxPeEc0p.js} +1 -1
- package/dist/client/assets/{tooltip-DwEKoS3m.js → tooltip-B26xbtws.js} +1 -1
- package/dist/client/assets/{types-DBa5NWuL.js → types-DfgXo_cD.js} +1 -1
- package/dist/client/assets/{use-ai-providers-hUoQ1QKn.js → use-ai-providers-CnyJW7s-.js} +1 -1
- package/dist/client/assets/{use-collections-CbyJ6t6i.js → use-collections-D66SnH5Q.js} +1 -1
- package/dist/client/assets/{use-connection-BZIS5d-M.js → use-connection-9VrA1Bg7.js} +1 -1
- package/dist/client/assets/{use-copy-BhwMe7lW.js → use-copy-DpxSUjqd.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Qup6KxHA.js → use-create-virtual-mcp-DBfs4FWm.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-De7heoii.js → use-debounced-autosave-Ja8PcJv_.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BSFPv0OJ.js → use-decopilot-events-DjAxcjIH.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CVL2tyXf.js → use-delete-connection-7Blp6D0s.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-B1XpJhs7.js → use-infinite-scroll-IwyU_OvC.js} +1 -1
- package/dist/client/assets/{use-list-state-NYzHNEE3.js → use-list-state-Dk2QFrYd.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DEJYwjVI.js → use-mcp-tools-C7yIpDHe.js} +1 -1
- package/dist/client/assets/{use-members-CE8F-6Pl.js → use-members-Bg4ZFsu9.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BQCBqC6w.js → use-navigate-to-agent-BehsrrsA.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DWMaaDOW.js → use-org-auth-client-mkgKwCAh.js} +1 -1
- package/dist/client/assets/{use-org-sso-DG73ueOt.js → use-org-sso-Xv4QV2bL.js} +1 -1
- package/dist/client/assets/{use-organization-roles-C_InafKr.js → use-organization-roles-BmH8DM7C.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DU3tZPVG.js → use-organization-settings-Coi7Ggqq.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BB_6SUlA.js → use-registry-connections-_83vUYHS.js} +1 -1
- package/dist/client/assets/{use-status-sounds--S4wlp-c.js → use-status-sounds-DLYnzZvv.js} +1 -1
- package/dist/client/assets/{use-tasks-BXrbnymy.js → use-tasks-CUt44N_R.js} +1 -1
- package/dist/client/assets/{use-view-mode-30iczyXm.js → use-view-mode-CZXZPLm6.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DqC7TCRl.js → use-virtual-mcp-BlYQqAfZ.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BJ1I2JSf.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BpfkmtaB.js +1 -0
- package/dist/client/assets/{user-CU2SK3qY.js → user-BFqIXUgg.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-ChONnJPm.js → view-mode-toggle-BC7A6oBR.js} +1 -1
- package/dist/client/assets/{workflow-C2A8waKp.js → workflow-B3ajRQIi.js} +1 -1
- package/dist/client/assets/workflow-detail-l83JU-Mp.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +4 -4
- package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
- package/dist/server/node_modules/ansi-styles/index.js +223 -0
- package/dist/server/node_modules/ansi-styles/package.json +54 -0
- package/dist/server/node_modules/ansi-styles/readme.md +173 -0
- package/dist/server/node_modules/escape-string-regexp/index.d.ts +18 -0
- package/dist/server/node_modules/escape-string-regexp/index.js +11 -0
- package/dist/server/node_modules/escape-string-regexp/package.json +43 -0
- package/dist/server/node_modules/escape-string-regexp/readme.md +29 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.js +12 -0
- package/dist/server/node_modules/{slice-ansi → is-fullwidth-code-point}/license +0 -1
- package/dist/server/node_modules/is-fullwidth-code-point/package.json +53 -0
- package/dist/server/node_modules/is-fullwidth-code-point/readme.md +31 -0
- package/dist/server/server.js +3 -3
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-C2Z8tM8W.js +0 -1
- package/dist/client/assets/index-Cf1ZbDa8.js +0 -1
- package/dist/client/assets/registry-Ijr9ccjx.js +0 -2
- package/dist/client/assets/store-registry-BRPkAkWY.js +0 -2
- package/dist/client/assets/useInfiniteQuery-Cy6k7dIo.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DvQj0VfO.js +0 -1
- package/dist/client/assets/workflow-detail-DtfIhsSe.js +0 -1
- package/dist/server/node_modules/get-east-asian-width/index.d.ts +0 -60
- package/dist/server/node_modules/get-east-asian-width/index.js +0 -30
- package/dist/server/node_modules/get-east-asian-width/lookup-data.js +0 -18
- package/dist/server/node_modules/get-east-asian-width/lookup.js +0 -135
- package/dist/server/node_modules/get-east-asian-width/package.json +0 -71
- package/dist/server/node_modules/get-east-asian-width/readme.md +0 -65
- package/dist/server/node_modules/get-east-asian-width/utilities.js +0 -24
- package/dist/server/node_modules/mimic-fn/index.d.ts +0 -54
- package/dist/server/node_modules/mimic-fn/index.js +0 -13
- package/dist/server/node_modules/mimic-fn/package.json +0 -42
- package/dist/server/node_modules/mimic-fn/readme.md +0 -69
- package/dist/server/node_modules/slice-ansi/index.d.ts +0 -19
- package/dist/server/node_modules/slice-ansi/index.js +0 -260
- package/dist/server/node_modules/slice-ansi/package.json +0 -59
- package/dist/server/node_modules/slice-ansi/readme.md +0 -54
- package/dist/server/node_modules/slice-ansi/tokenize-ansi.js +0 -752
- /package/dist/server/node_modules/{get-east-asian-width → ansi-styles}/license +0 -0
- /package/dist/server/node_modules/{mimic-fn → escape-string-regexp}/license +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as ne,c as Re,j as b,bb as lc,bc as _t,bd as tr,r as ge,be as cS,B as uc,t as dS,s as cc,o as pS,a as fS,K as At,x as mS,n as dc,f as gS,E as hS,M as bS,bf as TE}from"./index--hcGoWBP.js";import{_ as ES,$ as TS,a0 as SS,W as yS,a1 as _S,q as AS,U as IS,F as ld,a2 as kS,a3 as NS,M as RS,V as SE,a4 as CS,a5 as xS,a6 as vS,a7 as wS,a8 as OS}from"./agent-icon-BhSIvnHs.js";import{b as LS,i as DS,a as Lr,t as pc}from"./Tool01-B1WXLPyp.js";import{n as fc,c as pr,b as MS,t as PS,h as FS}from"./XCircle-DuIm7Kpp.js";import{i as On}from"./Check-DNFNSXQB.js";import{i as ud}from"./ChevronRight-C6IGuK_L.js";import{N as yE,R as _E,e as AE,C as BS,f as US,g as HS,c as $S,i as qS,d as GS}from"./index-CbahmBQ1.js";import{u as IE}from"./use-copy-BhwMe7lW.js";import{a as Ot,b as Lt,T as Dt}from"./tooltip-DwEKoS3m.js";import{d as zS}from"./differenceInSeconds-NQ4PDo0z.js";import{b as jS,f as VS,g as WS,d as YS}from"./dialog-ChC8b-fd.js";import{c as KS}from"./content-blocks-o63cs2vh.js";import{g as kE,M as XS}from"./types-DBa5NWuL.js";import{g as NE,k as ZS,a as QS,h as JS}from"./chat-context-DANvJNxJ.js";import{S as ey,u as RE,c as ty}from"./constants-C0Z_UV1B.js";import{i as CE}from"./AlertCircle-BUuG9jUS.js";import{s as ny}from"./RefreshCcw01-GcJ7_jjW.js";import{s as nr}from"./Star01-DOzaFb6_.js";import{s as ry}from"./XClose-Bet7IpXN.js";import{c as xE}from"./ZapSquare-B0Ev1OMS.js";import{i as ay}from"./Sun-Bp560G7u.js";import{i as iy}from"./SearchMd-CLV2ZHE1.js";import{a as vE}from"./Users03-CmMFskSR.js";import{u as sy}from"./shell-layout-CcLP72E6.js";import{n as oy}from"./LinkExternal01-DDjHJHtD.js";import{I as ly}from"./integration-icon-BFclX5Vo.js";import{u as uy}from"./use-virtual-mcp-DqC7TCRl.js";const cy={openrouter:e=>{const t=e?.openrouter;return typeof t=="object"&&t!==null&&"usage"in t&&typeof t.usage=="object"&&t.usage!==null&&"cost"in t.usage&&typeof t.usage.cost=="number"?t.usage.cost:null}};function wE(e){if(!e?.providerMetadata)return 0;for(const t of Object.values(cy)){const n=t(e.providerMetadata);if(n!==null)return n}return 0}function OE(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0}}function LE(e,t){return t?{inputTokens:e.inputTokens+(t.inputTokens??0),outputTokens:e.outputTokens+(t.outputTokens??0),reasoningTokens:e.reasoningTokens+(t.reasoningTokens??0),totalTokens:e.totalTokens+(t.totalTokens??0),cost:e.cost+wE(t)}:e}function gB(e){return e.reduce((t,n)=>LE(t,n.metadata?.usage),OE())}function dy(e){if(!e||!e.startsWith("automation:"))return null;const t=e.slice(11);return t?{id:t}:null}function DE(e,t){return`app:${e}:${t}`}function hB(e){if(!e||!e.startsWith("app:"))return null;const t=e.slice(4),n=t.indexOf(":");if(n<=0)return null;const r=t.slice(0,n),a=t.slice(n+1);return!r||!a?null:{connectionId:r,toolName:a}}const py=["settings","automations","env","preview","git"],fy=new Set(py),mc=new Set(["instructions","connections","layout","settings"]);function bB(e){return!!e&&mc.has(e)}function my(e){const t=e?.defaultMainView??null;if(!t||mc.has(t.type))return"settings";if(fy.has(t.type))return t.type;if(t.type==="ext-app"||t.type==="ext-apps"){if(t.id&&t.toolName)return DE(t.id,t.toolName);const n=e?.tabs?.map(r=>r.id)??[];return t.id&&n.includes(t.id)?t.id:n[0]??"settings"}return e?.tabs?.[0]?.id??"settings"}function EB(e){const t=my(e.metadata);if(e.mainParam==="0")return{mainOpen:!1,activeTab:t};if(e.mainParam===void 0){const n=e.metadata?.defaultMainView??null;return{mainOpen:!(n==null||n.type==="chat"),activeTab:t}}return mc.has(e.mainParam)?{mainOpen:!0,activeTab:"settings"}:{mainOpen:!0,activeTab:e.mainParam}}function TB(e){return e.mainOpen&&e.clickedId===e.activeTab?"0":e.clickedId}function SB(e){return e.mainOpen?e.activeTab==="automations"?!0:dy(e.activeTab)!==null:!1}function yB(e){return e.mainOpen&&e.activeTab==="automations"?"0":"automations"}function gy(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function hy(e){if(e&&typeof e=="object"&&"gatewayClientId"in e&&typeof e.gatewayClientId=="string")return e.gatewayClientId}function ME(e,t){if(!t)return e;const n=`${gy(t)}_`;return e.startsWith(n)?e.slice(n.length):e}function _B(e,t){return ME(e,t).replace(/[_-]/g," ").toLowerCase()}function AB(e){const t=zS(new Date,e);return t<60?"<1m":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:t<604800?`${Math.floor(t/86400)}d ago`:t<2592e3?`${Math.floor(t/604800)}w ago`:t<31536e3?`${Math.floor(t/2592e3)}mo ago`:`${Math.floor(t/31536e3)}y ago`}function Kt(e){if(e<60)return`${e.toFixed(1)}s`;const t=Math.round(e%60*10)/10,n=t>=60?1:0;return`${Math.floor(e/60)+n}m ${(n?0:t).toFixed(1)}s`}function PE(e){return e?e.replace(/[_-]/g," ").toLowerCase().split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "):""}function fr(e,t){return e==="output-error"?"error":e==="approval-requested"?"approval":e==="input-streaming"||e==="input-available"||e==="output-available"&&t===!0?"loading":"idle"}function IB(e,t,n){e.chain().focus().insertContentAt(t,[by(n),{type:"text",text:" "}]).run()}function by(e){return{type:"mention",attrs:e}}function Ey(e){const t=ne.c(9),{node:n,selected:r,view:a}=e,{name:i,char:s}=n.attrs,o=r&&a.editable,u=s==="@"?"bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-400":"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300",c=o&&"outline-2 outline-blue-300 outline-offset-0";let p;t[0]!==u||t[1]!==c?(p=Re("px-1 py-1 rounded","inline-flex items-center gap-1","cursor-default select-none","text-xs font-light",u,c,"capitalize"),t[0]=u,t[1]=c,t[2]=p):p=t[2];let f;t[3]!==i?(f=i?PE(i):"",t[3]=i,t[4]=f):f=t[4];let m;return t[5]!==s||t[6]!==p||t[7]!==f?(m=b.jsxs(AE,{className:p,children:[s,f]}),t[5]=s,t[6]=p,t[7]=f,t[8]=m):m=t[8],m}const Ty=yE.create({name:"mention",group:"inline",inline:!0,atom:!0,addAttributes(){return{id:{default:null,parseHTML:e=>e.getAttribute("data-id")||null,renderHTML:e=>e.id?{"data-id":e.id}:{}},name:{default:null,parseHTML:e=>e.getAttribute("data-name")||null,renderHTML:e=>e.name?{"data-name":e.name}:{}},char:{default:"/",parseHTML:e=>e.getAttribute("data-char")||"/",renderHTML:e=>e.char?{"data-char":e.char}:{}},metadata:{default:null,parseHTML:e=>{try{return JSON.parse(e.getAttribute("data-metadata")||"null")}catch{return null}},renderHTML:e=>e.metadata?{"data-metadata":JSON.stringify(e.metadata)}:{}}}},parseHTML(){return[{tag:'span[data-type="mention"]'}]},renderHTML({node:e,HTMLAttributes:t}){const n={"data-type":"mention"};return e.attrs.id&&(n["data-id"]=e.attrs.id),e.attrs.name&&(n["data-name"]=e.attrs.name),e.attrs.char&&(n["data-char"]=e.attrs.char),e.attrs.metadata&&(n["data-metadata"]=JSON.stringify(e.attrs.metadata)),["span",{...t,...n}]},renderText({node:e}){const t=e.attrs.char??"@",n=e.attrs.name??"";return`${t}${n}`},addNodeView(){return _E(Ey)}}),Sy=/^mcp__[a-zA-Z0-9_-]+__/;function FE(e){return e.replace(Sy,"")}function gc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ft=gc();function BE(e){Ft=e}var En={exec:()=>null};function fe(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(ze.caret,"$1"),n=n.replace(a,s),r},getRegex:()=>new RegExp(n,t)};return r}var ze={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},yy=/^(?:[ \t]*(?:\n|$))+/,_y=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ay=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ln=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Iy=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hc=/(?:[*+-]|\d{1,9}[.)])/,UE=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,HE=fe(UE).replace(/bull/g,hc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ky=fe(UE).replace(/bull/g,hc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),bc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ny=/^[^\n]+/,Ec=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Ry=fe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ec).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Cy=fe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,hc).getRegex(),mr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Tc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,xy=fe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Tc).replace("tag",mr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),$E=fe(bc).replace("hr",Ln).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",mr).getRegex(),vy=fe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",$E).getRegex(),Sc={blockquote:vy,code:_y,def:Ry,fences:Ay,heading:Iy,hr:Ln,html:xy,lheading:HE,list:Cy,newline:yy,paragraph:$E,table:En,text:Ny},cd=fe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ln).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",mr).getRegex(),wy={...Sc,lheading:ky,table:cd,paragraph:fe(bc).replace("hr",Ln).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",cd).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",mr).getRegex()},Oy={...Sc,html:fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Tc).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:En,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fe(bc).replace("hr",Ln).replace("heading",` *#{1,6} *[^
|
|
1
|
+
import{e as ne,c as Re,j as b,bb as lc,bc as _t,bd as tr,r as ge,be as cS,B as uc,t as dS,s as cc,o as pS,a as fS,K as At,x as mS,n as dc,f as gS,E as hS,M as bS,bf as TE}from"./index-k8njt3_A.js";import{_ as ES,$ as TS,a0 as SS,W as yS,a1 as _S,q as AS,U as IS,F as ld,a2 as kS,a3 as NS,M as RS,V as SE,a4 as CS,a5 as xS,a6 as vS,a7 as wS,a8 as OS}from"./agent-icon-CaG-DX2m.js";import{b as LS,i as DS,a as Lr,t as pc}from"./Tool01-CXQZ3p7Z.js";import{n as fc,c as pr,b as MS,t as PS,h as FS}from"./XCircle-CjR4LC4r.js";import{i as On}from"./Check-CUpq9BBu.js";import{i as ud}from"./ChevronRight-DwbV0YDZ.js";import{N as yE,R as _E,e as AE,C as BS,f as US,g as HS,c as $S,i as qS,d as GS}from"./index-BPgW_PVH.js";import{u as IE}from"./use-copy-DpxSUjqd.js";import{a as Ot,b as Lt,T as Dt}from"./tooltip-B26xbtws.js";import{d as zS}from"./differenceInSeconds-NQ4PDo0z.js";import{b as jS,f as VS,g as WS,d as YS}from"./dialog-HqMwvS0c.js";import{c as KS}from"./content-blocks-o63cs2vh.js";import{g as kE,M as XS}from"./types-DfgXo_cD.js";import{g as NE,k as ZS,a as QS,h as JS}from"./chat-context-D7DJNKEQ.js";import{S as ey,u as RE,c as ty}from"./constants-Df56C9B1.js";import{i as CE}from"./AlertCircle-B72APkrz.js";import{s as ny}from"./RefreshCcw01-CdP9yH0w.js";import{s as nr}from"./Star01-Y834gtsL.js";import{s as ry}from"./XClose-zqTFiPq2.js";import{c as xE}from"./ZapSquare-CliIuzcs.js";import{i as ay}from"./Sun-BgOSswUu.js";import{i as iy}from"./SearchMd-JqX1mLMq.js";import{a as vE}from"./Users03-CXkopkPu.js";import{u as sy}from"./shell-layout-G8D-0WXl.js";import{n as oy}from"./LinkExternal01-CKpEz_fF.js";import{I as ly}from"./integration-icon-DUMCOZJc.js";import{u as uy}from"./use-virtual-mcp-BlYQqAfZ.js";const cy={openrouter:e=>{const t=e?.openrouter;return typeof t=="object"&&t!==null&&"usage"in t&&typeof t.usage=="object"&&t.usage!==null&&"cost"in t.usage&&typeof t.usage.cost=="number"?t.usage.cost:null}};function wE(e){if(!e?.providerMetadata)return 0;for(const t of Object.values(cy)){const n=t(e.providerMetadata);if(n!==null)return n}return 0}function OE(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0}}function LE(e,t){return t?{inputTokens:e.inputTokens+(t.inputTokens??0),outputTokens:e.outputTokens+(t.outputTokens??0),reasoningTokens:e.reasoningTokens+(t.reasoningTokens??0),totalTokens:e.totalTokens+(t.totalTokens??0),cost:e.cost+wE(t)}:e}function gB(e){return e.reduce((t,n)=>LE(t,n.metadata?.usage),OE())}function dy(e){if(!e||!e.startsWith("automation:"))return null;const t=e.slice(11);return t?{id:t}:null}function DE(e,t){return`app:${e}:${t}`}function hB(e){if(!e||!e.startsWith("app:"))return null;const t=e.slice(4),n=t.indexOf(":");if(n<=0)return null;const r=t.slice(0,n),a=t.slice(n+1);return!r||!a?null:{connectionId:r,toolName:a}}const py=["settings","automations","env","preview","git"],fy=new Set(py),mc=new Set(["instructions","connections","layout","settings"]);function bB(e){return!!e&&mc.has(e)}function my(e){const t=e?.defaultMainView??null;if(!t||mc.has(t.type))return"settings";if(fy.has(t.type))return t.type;if(t.type==="ext-app"||t.type==="ext-apps"){if(t.id&&t.toolName)return DE(t.id,t.toolName);const n=e?.tabs?.map(r=>r.id)??[];return t.id&&n.includes(t.id)?t.id:n[0]??"settings"}return e?.tabs?.[0]?.id??"settings"}function EB(e){const t=my(e.metadata);if(e.mainParam==="0")return{mainOpen:!1,activeTab:t};if(e.mainParam===void 0){const n=e.metadata?.defaultMainView??null;return{mainOpen:!(n==null||n.type==="chat"),activeTab:t}}return mc.has(e.mainParam)?{mainOpen:!0,activeTab:"settings"}:{mainOpen:!0,activeTab:e.mainParam}}function TB(e){return e.mainOpen&&e.clickedId===e.activeTab?"0":e.clickedId}function SB(e){return e.mainOpen?e.activeTab==="automations"?!0:dy(e.activeTab)!==null:!1}function yB(e){return e.mainOpen&&e.activeTab==="automations"?"0":"automations"}function gy(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function hy(e){if(e&&typeof e=="object"&&"gatewayClientId"in e&&typeof e.gatewayClientId=="string")return e.gatewayClientId}function ME(e,t){if(!t)return e;const n=`${gy(t)}_`;return e.startsWith(n)?e.slice(n.length):e}function _B(e,t){return ME(e,t).replace(/[_-]/g," ").toLowerCase()}function AB(e){const t=zS(new Date,e);return t<60?"<1m":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:t<604800?`${Math.floor(t/86400)}d ago`:t<2592e3?`${Math.floor(t/604800)}w ago`:t<31536e3?`${Math.floor(t/2592e3)}mo ago`:`${Math.floor(t/31536e3)}y ago`}function Kt(e){if(e<60)return`${e.toFixed(1)}s`;const t=Math.round(e%60*10)/10,n=t>=60?1:0;return`${Math.floor(e/60)+n}m ${(n?0:t).toFixed(1)}s`}function PE(e){return e?e.replace(/[_-]/g," ").toLowerCase().split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "):""}function fr(e,t){return e==="output-error"?"error":e==="approval-requested"?"approval":e==="input-streaming"||e==="input-available"||e==="output-available"&&t===!0?"loading":"idle"}function IB(e,t,n){e.chain().focus().insertContentAt(t,[by(n),{type:"text",text:" "}]).run()}function by(e){return{type:"mention",attrs:e}}function Ey(e){const t=ne.c(9),{node:n,selected:r,view:a}=e,{name:i,char:s}=n.attrs,o=r&&a.editable,u=s==="@"?"bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-400":"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300",c=o&&"outline-2 outline-blue-300 outline-offset-0";let p;t[0]!==u||t[1]!==c?(p=Re("px-1 py-1 rounded","inline-flex items-center gap-1","cursor-default select-none","text-xs font-light",u,c,"capitalize"),t[0]=u,t[1]=c,t[2]=p):p=t[2];let f;t[3]!==i?(f=i?PE(i):"",t[3]=i,t[4]=f):f=t[4];let m;return t[5]!==s||t[6]!==p||t[7]!==f?(m=b.jsxs(AE,{className:p,children:[s,f]}),t[5]=s,t[6]=p,t[7]=f,t[8]=m):m=t[8],m}const Ty=yE.create({name:"mention",group:"inline",inline:!0,atom:!0,addAttributes(){return{id:{default:null,parseHTML:e=>e.getAttribute("data-id")||null,renderHTML:e=>e.id?{"data-id":e.id}:{}},name:{default:null,parseHTML:e=>e.getAttribute("data-name")||null,renderHTML:e=>e.name?{"data-name":e.name}:{}},char:{default:"/",parseHTML:e=>e.getAttribute("data-char")||"/",renderHTML:e=>e.char?{"data-char":e.char}:{}},metadata:{default:null,parseHTML:e=>{try{return JSON.parse(e.getAttribute("data-metadata")||"null")}catch{return null}},renderHTML:e=>e.metadata?{"data-metadata":JSON.stringify(e.metadata)}:{}}}},parseHTML(){return[{tag:'span[data-type="mention"]'}]},renderHTML({node:e,HTMLAttributes:t}){const n={"data-type":"mention"};return e.attrs.id&&(n["data-id"]=e.attrs.id),e.attrs.name&&(n["data-name"]=e.attrs.name),e.attrs.char&&(n["data-char"]=e.attrs.char),e.attrs.metadata&&(n["data-metadata"]=JSON.stringify(e.attrs.metadata)),["span",{...t,...n}]},renderText({node:e}){const t=e.attrs.char??"@",n=e.attrs.name??"";return`${t}${n}`},addNodeView(){return _E(Ey)}}),Sy=/^mcp__[a-zA-Z0-9_-]+__/;function FE(e){return e.replace(Sy,"")}function gc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ft=gc();function BE(e){Ft=e}var En={exec:()=>null};function fe(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(ze.caret,"$1"),n=n.replace(a,s),r},getRegex:()=>new RegExp(n,t)};return r}var ze={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},yy=/^(?:[ \t]*(?:\n|$))+/,_y=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ay=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ln=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Iy=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hc=/(?:[*+-]|\d{1,9}[.)])/,UE=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,HE=fe(UE).replace(/bull/g,hc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ky=fe(UE).replace(/bull/g,hc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),bc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ny=/^[^\n]+/,Ec=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Ry=fe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ec).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Cy=fe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,hc).getRegex(),mr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Tc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,xy=fe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Tc).replace("tag",mr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),$E=fe(bc).replace("hr",Ln).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",mr).getRegex(),vy=fe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",$E).getRegex(),Sc={blockquote:vy,code:_y,def:Ry,fences:Ay,heading:Iy,hr:Ln,html:xy,lheading:HE,list:Cy,newline:yy,paragraph:$E,table:En,text:Ny},cd=fe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ln).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",mr).getRegex(),wy={...Sc,lheading:ky,table:cd,paragraph:fe(bc).replace("hr",Ln).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",cd).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",mr).getRegex()},Oy={...Sc,html:fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Tc).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:En,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fe(bc).replace("hr",Ln).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",HE).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ly=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Dy=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,qE=/^( {2,}|\\)\n(?!\s*$)/,My=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,gr=/[\p{P}\p{S}]/u,yc=/[\s\p{P}\p{S}]/u,GE=/[^\s\p{P}\p{S}]/u,Py=fe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,yc).getRegex(),zE=/(?!~)[\p{P}\p{S}]/u,Fy=/(?!~)[\s\p{P}\p{S}]/u,By=/(?:[^\s\p{P}\p{S}]|~)/u,Uy=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,jE=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Hy=fe(jE,"u").replace(/punct/g,gr).getRegex(),$y=fe(jE,"u").replace(/punct/g,zE).getRegex(),VE="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",qy=fe(VE,"gu").replace(/notPunctSpace/g,GE).replace(/punctSpace/g,yc).replace(/punct/g,gr).getRegex(),Gy=fe(VE,"gu").replace(/notPunctSpace/g,By).replace(/punctSpace/g,Fy).replace(/punct/g,zE).getRegex(),zy=fe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,GE).replace(/punctSpace/g,yc).replace(/punct/g,gr).getRegex(),jy=fe(/\\(punct)/,"gu").replace(/punct/g,gr).getRegex(),Vy=fe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Wy=fe(Tc).replace("(?:-->|$)","-->").getRegex(),Yy=fe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Wy).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),rr=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ky=fe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",rr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),WE=fe(/^!?\[(label)\]\[(ref)\]/).replace("label",rr).replace("ref",Ec).getRegex(),YE=fe(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ec).getRegex(),Xy=fe("reflink|nolink(?!\\()","g").replace("reflink",WE).replace("nolink",YE).getRegex(),_c={_backpedal:En,anyPunctuation:jy,autolink:Vy,blockSkip:Uy,br:qE,code:Dy,del:En,emStrongLDelim:Hy,emStrongRDelimAst:qy,emStrongRDelimUnd:zy,escape:Ly,link:Ky,nolink:YE,punctuation:Py,reflink:WE,reflinkSearch:Xy,tag:Yy,text:My,url:En},Zy={..._c,link:fe(/^!?\[(label)\]\((.*?)\)/).replace("label",rr).getRegex(),reflink:fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",rr).getRegex()},Uu={..._c,emStrongRDelimAst:Gy,emStrongLDelim:$y,url:fe(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Qy={...Uu,br:fe(qE).replace("{2,}","*").getRegex(),text:fe(Uu.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},$n={normal:Sc,gfm:wy,pedantic:Oy},un={normal:_c,gfm:Uu,breaks:Qy,pedantic:Zy},Jy={"&":"&","<":"<",">":">",'"':""","'":"'"},dd=e=>Jy[e];function st(e,t){if(t){if(ze.escapeTest.test(e))return e.replace(ze.escapeReplace,dd)}else if(ze.escapeTestNoEncode.test(e))return e.replace(ze.escapeReplaceNoEncode,dd);return e}function pd(e){try{e=encodeURI(e).replace(ze.percentDecode,"%")}catch{return null}return e}function fd(e,t){const n=e.replace(ze.findPipe,(i,s,o)=>{let l=!1,u=s;for(;--u>=0&&o[u]==="\\";)l=!l;return l?"|":" |"}),r=n.split(ze.splitPipe);let a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(ze.slashPipe,"|");return r}function cn(e,t,n){const r=e.length;if(r===0)return"";let a=0;for(;a<r&&e.charAt(r-a-1)===t;)a++;return e.slice(0,r-a)}function e1(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function md(e,t,n,r,a){const i=t.href,s=t.title||null,o=e[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;const l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:s,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,l}function t1(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(r===null)return t;const a=r[1];return t.split(`
|
|
3
3
|
`).map(i=>{const s=i.match(n.other.beginningSpace);if(s===null)return i;const[o]=s;return o.length>=a.length?i.slice(a.length):i}).join(`
|
|
4
4
|
`)}var ar=class{options;rules;lexer;constructor(e){this.options=e||Ft}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:cn(n,`
|
|
@@ -119,7 +119,7 @@ Output: Tool execution was denied`)}}}return n.length>0?n.join(`
|
|
|
119
119
|
`+(re??""))):n.output!==void 0&&!O&&(se&&(se=se+`
|
|
120
120
|
|
|
121
121
|
`),se=se+(`# Output
|
|
122
|
-
`+hE(n.output)));let me;e:{if(N){let ye;t[21]===Symbol.for("react.memo_cache_sentinel")?(ye=b.jsx(ry,{}),t[21]=ye):ye=t[21],me=ye;break e}if(O){let ye;t[22]===Symbol.for("react.memo_cache_sentinel")?(ye=b.jsx(SE,{className:"size-4 text-muted-foreground"}),t[22]=ye):ye=t[22],me=ye;break e}const pe=x?.icon;if(pe){let ye;t[23]!==pe?(ye=b.jsx(pe,{className:"size-4 text-muted-foreground"}),t[23]=pe,t[24]=ye):ye=t[24],me=ye;break e}let we;t[25]===Symbol.for("react.memo_cache_sentinel")?(we=b.jsx(CS,{className:"size-4 text-muted-foreground"}),t[25]=we):we=t[25],me=we}let be;t[26]!==r||t[27]!==s?(be=b.jsx(qP,{annotations:r,toolMeta:s}),t[26]=r,t[27]=s,t[28]=be):be=t[28];const Se=se||null;let Ne;t[29]!==ee||t[30]!==h||t[31]!==N||t[32]!==a||t[33]!==ce||t[34]!==me||t[35]!==be||t[36]!==Se?(Ne=b.jsx(ht,{icon:me,iconDestructive:N,trailing:be,title:h,latency:a,summary:ce,state:ee,detail:Se}),t[29]=ee,t[30]=h,t[31]=N,t[32]=a,t[33]=ce,t[34]=me,t[35]=be,t[36]=Se,t[37]=Ne):Ne=t[37];let Ae;t[38]!==P||t[39]!==$?(Ae=P&&b.jsx("div",{className:"flex justify-end mt-1.5 mb-1",children:b.jsxs("button",{type:"button",onClick:$,className:"flex items-center gap-1.5 px-2 py-1 text-xs text-muted-foreground rounded-md [@media(hover:hover)]:hover:bg-accent/50 [@media(hover:hover)]:hover:text-foreground transition-colors",children:[b.jsx(xS,{className:"size-3.5"}),"Open in panel"]})}),t[38]=P,t[39]=$,t[40]=Ae):Ae=t[40];let Fe;t[41]!==P||t[42]!==c||t[43]!==_||t[44]!==h||t[45]!==z||t[46]!==Y||t[47]!==O||t[48]!==S||t[49]!==p.id||t[50]!==p.slug||t[51]!==n.input||t[52]!==n.output||t[53]!==C||t[54]!==R||t[55]!==D?(Fe=O&&D&&_&&p?.id&&b.jsx(b.Fragment,{children:b.jsx(hS,{fallback:pe=>{const{resetError:we}=pe;return b.jsxs("div",{className:"mt-2 flex items-center gap-2 px-3 py-2.5 border border-dashed border-destructive/30 bg-destructive/5 rounded-lg",children:[b.jsx(CE,{size:16,className:"shrink-0 text-destructive"}),b.jsxs("span",{className:"flex-1 text-xs text-destructive font-medium",children:["Failed to load"," ",b.jsx("span",{className:"font-mono",children:h})," app"]}),b.jsxs(uc,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1.5 shrink-0",onClick:we,children:[b.jsx(bS,{className:"size-3.5"}),"Retry"]})]})},children:b.jsx(ge.Suspense,{fallback:b.jsx("div",{className:"mt-2 flex items-center justify-center h-12 border border-border/75 rounded-lg overflow-hidden p-3",children:b.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[b.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),b.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:b.jsx(VP,{uiResourceUri:D,connectionId:_,orgId:p.id,orgSlug:p.slug,toolName:R,toolInput:n.input,toolResult:n.output,toolMeta:S,onMessage:z,onUpdateModelContext:C&&c?pe=>c.setAppContext(C,pe):void 0,onTeardown:C&&c?()=>c.clearAppContext(C):void 0,onRequestDisplayMode:P?Y:void 0})})})}),t[41]=P,t[42]=c,t[43]=_,t[44]=h,t[45]=z,t[46]=Y,t[47]=O,t[48]=S,t[49]=p.id,t[50]=p.slug,t[51]=n.input,t[52]=n.output,t[53]=C,t[54]=R,t[55]=D,t[56]=Fe):Fe=t[56];let Oe;return t[57]!==Ne||t[58]!==Ae||t[59]!==Fe?(Oe=b.jsxs("div",{children:[Ne,Ae,Fe]}),t[57]=Ne,t[58]=Ae,t[59]=Fe,t[60]=Oe):Oe=t[60],Oe}function iS(e){return typeof e=="object"&&e!=null&&"type"in e&&e.type==="mcpToolCall"}function zP(e){if(e!=null)return iS(e)?e.arguments??void 0:e}function jP(e){if(e==null)return;if(iS(e)&&e.result!=null)return e.result;if(typeof e=="object"&&"content"in e&&Array.isArray(e.content)){const n=e.content;if(n.length>0&&typeof n[0]=="object"&&n[0]!=null&&"type"in n[0])return e}const t=typeof e=="string"?e:JSON.stringify(e);return{structuredContent:typeof e=="object"&&!Array.isArray(e)?e:void 0,content:[{type:"text",text:t}]}}function VP(e){const t=ne.c(27),{uiResourceUri:n,connectionId:r,orgId:a,orgSlug:i,toolName:s,toolInput:o,toolResult:l,toolMeta:u,onMessage:c,onUpdateModelContext:p,onTeardown:f,onRequestDisplayMode:m}=e;let g;t[0]!==r||t[1]!==a||t[2]!==i?(g={connectionId:r,orgId:a,orgSlug:i},t[0]=r,t[1]=a,t[2]=i,t[3]=g):g=t[3];const E=RE(g);let _;t[4]===Symbol.for("react.memo_cache_sentinel")?(_={type:"object"},t[4]=_):_=t[4];let y;t[5]!==u?(y=u!=null&&{_meta:u},t[5]=u,t[6]=y):y=t[6];let S;t[7]!==y||t[8]!==s?(S={name:s,inputSchema:_,...y},t[7]=y,t[8]=s,t[9]=S):S=t[9];const T=S;let R;t[10]!==T?(R={tool:T},t[10]=T,t[11]=R):R=t[11];let x;t[12]!==o?(x=zP(o),t[12]=o,t[13]=x):x=t[13];let h;t[14]!==l?(h=jP(l),t[14]=l,t[15]=h):h=t[15];let w;return t[16]!==E||t[17]!==c||t[18]!==m||t[19]!==f||t[20]!==p||t[21]!==a||t[22]!==R||t[23]!==x||t[24]!==h||t[25]!==n?(w=b.jsx("div",{className:"mt-2 border border-border/75 rounded-lg overflow-hidden p-3",children:b.jsx(XS,{resourceURI:n,orgId:a,toolInfo:R,toolInput:x,toolResult:h,client:E,onMessage:c,onUpdateModelContext:p,onTeardown:f,onRequestDisplayMode:m})}),t[16]=E,t[17]=c,t[18]=m,t[19]=f,t[20]=p,t[21]=a,t[22]=R,t[23]=x,t[24]=h,t[25]=n,t[26]=w):w=t[26],w}const EE="mesh-storage://";function ad(e){return e.startsWith(EE)?e.slice(EE.length):null}function sS(e,t){const n=ad(e);return n!==null?`/api/${t}/files/${n}`:e}function WP(e){if(!e?.usage)return null;const t=e.usage.inputTokens??0,n=e.usage.outputTokens??0,r=t+n;return r?{inputTokens:t,outputTokens:n,reasoningTokens:0,totalTokens:r,cost:0}:null}function YP(e){const t=ne.c(13),{uri:n,orgId:r}=e;let a;t[0]!==r||t[1]!==n?(a=sS(n,r),t[0]=r,t[1]=n,t[2]=a):a=t[2];const i=a;let s;t[3]!==n?(s=ad(n)!==null?n.slice(n.lastIndexOf("/")+1):"reference",t[3]=n,t[4]=s):s=t[4];const o=s;let l;t[5]!==o?(l=b.jsx(Ot,{asChild:!0,children:b.jsx("span",{className:"inline-flex items-center gap-1 px-1 py-0.5 rounded bg-muted text-muted-foreground text-xs cursor-default select-none",children:o})}),t[5]=o,t[6]=l):l=t[6];let u;t[7]!==o||t[8]!==i?(u=b.jsx(Lt,{side:"top",className:"max-w-sm p-1.5",children:b.jsx("img",{src:i,alt:o,className:"max-w-full max-h-64 object-contain rounded"})}),t[7]=o,t[8]=i,t[9]=u):u=t[9];let c;return t[10]!==l||t[11]!==u?(c=b.jsxs(Dt,{children:[l,u]}),t[10]=l,t[11]=u,t[12]=c):c=t[12],c}function KP(e){const t=ne.c(65),{part:n,latency:r}=e,a=TE();let i;t[0]!==n.state?(i=fr(n.state),t[0]=n.state,t[1]=i):i=t[1];const s=i,o=n.input,l=n.output,u=l?.images;let c;t[2]!==l?(c=WP(l),t[2]=l,t[3]=c):c=t[3];const p=c,f=l?.model;let m,g,E,_,y,S,T,R,x,h,w,D;if(t[4]!==u||t[5]!==o||t[6]!==r||t[7]!==f||t[8]!==a||t[9]!==s||t[10]!==p){y=Symbol.for("react.early_return_sentinel");e:{const $=Array.isArray(o?.referenceImages)?o.referenceImages.filter(XP):void 0;let U;t[23]!==r?(U=r!=null&&r>0?b.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground/60",children:Kt(r)}):null,t[23]=r,t[24]=U):U=t[24];const Y=U;if(s==="loading"){let W;t[25]===Symbol.for("react.memo_cache_sentinel")?(W=b.jsx(Lr,{size:14}),t[25]=W):W=t[25];let z;t[26]!==o?(z=o?.prompt?`"${o.prompt.slice(0,80)}…"`:void 0,t[26]=o,t[27]=z):z=t[27];let K;t[28]!==z?(K=b.jsx(ht,{icon:W,title:"Generating image",summary:z,state:"loading"}),t[28]=z,t[29]=K):K=t[29],y=K;break e}if(s==="error"||!u||u.length===0){let W;t[30]===Symbol.for("react.memo_cache_sentinel")?(W=b.jsx(Lr,{size:14}),t[30]=W):W=t[30];const z=s==="error"?"Failed":"No images generated",K=s==="error"?"error":"idle";let N;t[31]!==Y||t[32]!==z||t[33]!==K||t[34]!==p?(N=b.jsx(ht,{icon:W,title:"Image generation",summary:z,state:K,usage:p,trailing:Y}),t[31]=Y,t[32]=z,t[33]=K,t[34]=p,t[35]=N):N=t[35],y=N;break e}_="flex flex-col gap-2",m=ht,t[36]===Symbol.for("react.memo_cache_sentinel")?(x=b.jsx(Lr,{size:14,className:"text-pink-500"}),t[36]=x):x=t[36],h="Generated image",w=f,D="idle",g=p,E=Y,S="flex flex-col gap-1 pb-2 pl-6",t[37]!==o?(T=o?.prompt&&b.jsx("p",{className:"text-xs text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:o.prompt}),t[37]=o,t[38]=T):T=t[38],R=$&&$.length>0&&b.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[b.jsx("span",{className:"text-[11px] text-muted-foreground/50",children:"references:"}),$.map((W,z)=>{const K=W.uri??W.url;return b.jsx(YP,{uri:K,orgId:a.id},z)})]})}t[4]=u,t[5]=o,t[6]=r,t[7]=f,t[8]=a,t[9]=s,t[10]=p,t[11]=m,t[12]=g,t[13]=E,t[14]=_,t[15]=y,t[16]=S,t[17]=T,t[18]=R,t[19]=x,t[20]=h,t[21]=w,t[22]=D}else m=t[11],g=t[12],E=t[13],_=t[14],y=t[15],S=t[16],T=t[17],R=t[18],x=t[19],h=t[20],w=t[21],D=t[22];if(y!==Symbol.for("react.early_return_sentinel"))return y;let O;t[39]!==S||t[40]!==T||t[41]!==R?(O=b.jsxs("div",{className:S,children:[T,R]}),t[39]=S,t[40]=T,t[41]=R,t[42]=O):O=t[42];let C;t[43]!==m||t[44]!==g||t[45]!==E||t[46]!==O||t[47]!==x||t[48]!==h||t[49]!==w||t[50]!==D?(C=b.jsx(m,{icon:x,title:h,summary:w,state:D,usage:g,trailing:E,children:O}),t[43]=m,t[44]=g,t[45]=E,t[46]=O,t[47]=x,t[48]=h,t[49]=w,t[50]=D,t[51]=C):C=t[51];let M;if(t[52]!==u||t[53]!==o?.prompt||t[54]!==a){let $;t[56]!==o?.prompt||t[57]!==a?($=(U,Y)=>{const W=U.uri??U.url;if(!W)return null;const z=sS(W,a.id);return b.jsx(tS,{src:z,alt:o?.prompt??"Generated image",children:b.jsx("img",{src:z,alt:o?.prompt??"Generated image",className:"max-w-sm max-h-80 object-contain rounded-lg border border-border hover:border-foreground/20 transition-colors"})},Y)},t[56]=o?.prompt,t[57]=a,t[58]=$):$=t[58],M=u.map($),t[52]=u,t[53]=o?.prompt,t[54]=a,t[55]=M}else M=t[55];let P;t[59]!==M?(P=b.jsx("div",{className:"flex flex-wrap gap-2",children:M}),t[59]=M,t[60]=P):P=t[60];let V;return t[61]!==_||t[62]!==C||t[63]!==P?(V=b.jsxs("div",{className:_,children:[C,P]}),t[61]=_,t[62]=C,t[63]=P,t[64]=V):V=t[64],V}function XP(e){return e.uri??e.url}function ZP(e,t){const n=ad(e);return n!==null?`/api/${t}/files/${n}`:e}function QP(e){if(!e?.usage)return null;const t=e.usage.inputTokens??0,n=e.usage.outputTokens??0,r=t+n;if(!r)return null;const a={providerMetadata:e.usage.providerMetadata};return{inputTokens:t,outputTokens:n,reasoningTokens:0,totalTokens:r,cost:wE(a)}}function JP(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e}}function eF(e){try{return`${new URL(e).origin}/favicon.ico`}catch{return""}}function tF(e){const t=ne.c(16),{citation:n,index:r}=e;let a;t[0]!==n.url?(a=JP(n.url),t[0]=n.url,t[1]=a):a=t[1];const i=a;let s;t[2]!==n.url?(s=eF(n.url),t[2]=n.url,t[3]=s):s=t[3];const o=s,l=n.title||i;let u;t[4]!==o?(u=b.jsx("img",{src:o,alt:"",className:"size-3.5 rounded-sm shrink-0",onError:nF}),t[4]=o,t[5]=u):u=t[5];let c;t[6]!==l?(c=b.jsx("span",{className:"truncate max-w-[180px]",children:l}),t[6]=l,t[7]=c):c=t[7];const p=r+1;let f;t[8]!==p?(f=b.jsxs("span",{className:"text-[10px] text-muted-foreground/50 tabular-nums shrink-0",children:["[",p,"]"]}),t[8]=p,t[9]=f):f=t[9];let m;t[10]===Symbol.for("react.memo_cache_sentinel")?(m=b.jsx(oy,{size:10,className:"shrink-0 opacity-0 group-hover/src:opacity-100 transition-opacity"}),t[10]=m):m=t[10];let g;return t[11]!==n.url||t[12]!==u||t[13]!==c||t[14]!==f?(g=b.jsxs("a",{href:n.url,target:"_blank",rel:"noopener noreferrer",className:"group/src inline-flex items-center gap-1.5 rounded-md border border-border/50 bg-muted/30 px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted/60 hover:border-border hover:text-foreground",children:[u,c,f,m]}),t[11]=n.url,t[12]=u,t[13]=c,t[14]=f,t[15]=g):g=t[15],g}function nF(e){e.target.style.display="none"}function rF(e,t){return e.replace(/\[(\d+)\]/g,(n,r)=>{const a=parseInt(r,10)-1,i=t[a];return i?`[\\[${r}\\]](${i.url})`:n})}const Bu=5;function aF(e){const t=ne.c(12),{citations:n}=e,[r,a]=ge.useState(!1),i=n.length>Bu;let s;t[0]!==n||t[1]!==r?(s=r?n:n.slice(0,Bu),t[0]=n,t[1]=r,t[2]=s):s=t[2];const o=s;let l;t[3]!==o?(l=o.map(sF),t[3]=o,t[4]=l):l=t[4];let u;t[5]!==n.length||t[6]!==r||t[7]!==i?(u=i&&b.jsx("button",{type:"button",onClick:()=>a(iF),className:"inline-flex items-center rounded-md border border-border/50 bg-muted/30 px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted/60 hover:border-border hover:text-foreground",children:r?"show less":`+${n.length-Bu} more`}),t[5]=n.length,t[6]=r,t[7]=i,t[8]=u):u=t[8];let c;return t[9]!==l||t[10]!==u?(c=b.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[l,u]}),t[9]=l,t[10]=u,t[11]=c):c=t[11],c}function iF(e){return!e}function sF(e,t){return b.jsx(tF,{citation:e,index:t},e.url)}function oF(e){const t=ne.c(51),{part:n,latency:r,streamingText:a}=e,i=TE();let s;t[0]!==n.state?(s=fr(n.state),t[0]=n.state,t[1]=s):s=t[1];const o=s,l=n.input,u=n.output;let c,p,f;t[2]!==i||t[3]!==u?(c=u?.uri?ZP(u.uri,i.id):void 0,f=dc,p=At.webSearchBlob(c??""),t[2]=i,t[3]=u,t[4]=c,t[5]=p,t[6]=f):(c=t[4],p=t[5],f=t[6]);let m;t[7]!==c?(m=async()=>{const Z=await fetch(c);if(!Z.ok)throw new Error(`Failed to fetch: ${Z.status}`);return Z.text()},t[7]=c,t[8]=m):m=t[8];const g=!!c;let E;t[9]!==p||t[10]!==m||t[11]!==g?(E={queryKey:p,queryFn:m,enabled:g,staleTime:1/0},t[9]=p,t[10]=m,t[11]=g,t[12]=E):E=t[12];const{data:_}=f(E),y=o==="loading",S=o!=="loading"&&o!=="error",T=u?.citations;let R;t[13]!==u?(R=QP(u),t[13]=u,t[14]=R):R=t[14];const x=R,h=u?.content??_??a;let w;t[15]!==T||t[16]!==h?(w=h&&T?.length?rF(h,T):h,t[15]=T,t[16]=h,t[17]=w):w=t[17];const D=w;let O;t[18]!==r?(O=r!=null&&r>0?b.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground/60",children:Kt(r)}):null,t[18]=r,t[19]=O):O=t[19];const C=O;if(o==="error"){let Z;t[20]===Symbol.for("react.memo_cache_sentinel")?(Z=b.jsx(nr,{size:14}),t[20]=Z):Z=t[20];let k;return t[21]!==C||t[22]!==x?(k=b.jsx(ht,{icon:Z,title:"Web search",summary:"Failed",state:"error",usage:x,trailing:C}),t[21]=C,t[22]=x,t[23]=k):k=t[23],k}const M=y?"animate-pulse":"text-blue-500";let P;t[24]!==M?(P=Re(M),t[24]=M,t[25]=P):P=t[25];let V;t[26]!==P?(V=b.jsx(nr,{size:14,className:P}),t[26]=P,t[27]=V):V=t[27];const $=y?"Researching...":"Web search";let U;t[28]!==l||t[29]!==S||t[30]!==u?.model?(U=S?u?.model??l?.query?.slice(0,60):l?.query?`"${l.query.slice(0,80)}"`:void 0,t[28]=l,t[29]=S,t[30]=u?.model,t[31]=U):U=t[31];const Y=y?"loading":"idle";let W;t[32]!==l?(W=l?.query&&b.jsx("p",{className:"text-xs text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:l.query}),t[32]=l,t[33]=W):W=t[33];let z;t[34]!==D||t[35]!==n.toolCallId?(z=D?b.jsx("div",{className:"max-h-96 overflow-y-auto overflow-x-hidden rounded-lg border border-border/40 bg-muted/20 px-4 py-3 min-w-0",children:b.jsx("div",{className:"prose prose-sm prose-neutral dark:prose-invert max-w-none text-[13px] leading-relaxed break-words",children:b.jsx(td,{id:n.toolCallId,text:D})})}):b.jsx("div",{className:"rounded-lg border border-border/40 bg-muted/20 px-4 py-3",children:b.jsxs("div",{className:"space-y-2 animate-pulse",children:[b.jsx("div",{className:"h-3 rounded bg-muted-foreground/10 w-3/4"}),b.jsx("div",{className:"h-3 rounded bg-muted-foreground/10 w-1/2"})]})}),t[34]=D,t[35]=n.toolCallId,t[36]=z):z=t[36];let K;t[37]!==T?(K=T&&T.length>0&&b.jsx(aF,{citations:T}),t[37]=T,t[38]=K):K=t[38];let N;t[39]!==W||t[40]!==z||t[41]!==K?(N=b.jsxs("div",{className:"pl-6 pb-3 flex flex-col gap-1 min-w-0",children:[W,z,K]}),t[39]=W,t[40]=z,t[41]=K,t[42]=N):N=t[42];let Q;return t[43]!==C||t[44]!==V||t[45]!==$||t[46]!==U||t[47]!==Y||t[48]!==N||t[49]!==x?(Q=b.jsx(ht,{icon:V,title:$,summary:U,state:Y,usage:x,trailing:C,defaultOpen:!0,children:N}),t[43]=C,t[44]=V,t[45]=$,t[46]=U,t[47]=Y,t[48]=N,t[49]=x,t[50]=Q):Q=t[50],Q}function lF(e){const t=ne.c(14),{part:n}=e;if(!n.state.startsWith("output-"))return null;let r;t[0]!==n.input?.prompt?(r=n.input?.prompt?.trim()||"Question",t[0]=n.input?.prompt,t[1]=r):r=t[1];const a=r,i=n.state==="output-error"||n.state==="output-denied",s=n.state==="output-denied";let o;t[2]!==s||t[3]!==n?(o=s?"Skipped":n.state==="output-error"?rd(n)??"Error":n.output?.response??"",t[2]=s,t[3]=n,t[4]=o):o=t[4];const l=o;let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=b.jsx(PS,{className:"size-4 text-muted-foreground/50 shrink-0 mt-0.5"}),t[5]=u):u=t[5];let c;t[6]!==a?(c=b.jsxs("div",{className:"flex items-start gap-2",children:[u,b.jsx("span",{className:"text-[14px] text-muted-foreground leading-snug",children:a})]}),t[6]=a,t[7]=c):c=t[7];let p;t[8]!==l||t[9]!==i?(p=l&&b.jsx("div",{className:"ml-6 pl-2 border-l border-border/50",children:b.jsx("span",{className:Re("text-[14px] leading-snug",i?"text-muted-foreground/50 italic":"text-foreground/70"),children:l})}),t[8]=l,t[9]=i,t[10]=p):p=t[10];let f;return t[11]!==c||t[12]!==p?(f=b.jsxs("div",{className:"my-1.5 flex flex-col gap-1",children:[c,p]}),t[11]=c,t[12]=p,t[13]=f):f=t[13],f}function uF(e){const t=ne.c(18),{part:n,subtaskMeta:r,latency:a}=e,i=n.state==="input-streaming"||n.state==="input-available",s=n.state==="output-available"&&n.preliminary===!0,o=n.state==="output-available"&&!n.preliminary,l=n.state==="output-error",u="preliminary"in n?n.preliminary:!1;let c;t[0]!==n.state||t[1]!==u?(c=fr(n.state,u),t[0]=n.state,t[1]=u,t[2]=c):c=t[2];const p=c,f=p==="approval"?"idle":p,m=n.input?.agent_id,g=uy(m),E=r?.usage,_=g?.title?g.title:i?"Starting subtask...":s?"Subtask running...":o?"Subtask completed":l?"Subtask failed":"Subtask",y=n.input?.prompt??"",S=n.state==="approval-requested"?"Awaiting approval...":y.length>120?y.slice(0,120)+"…":y;let T;t[3]!==l||t[4]!==n?(T=l?rd(n):$P(n.output)??"No output available",t[3]=l,t[4]=n,t[5]=T):T=t[5];const R=T,x=`# Task
|
|
122
|
+
`+hE(n.output)));let me;e:{if(N){let ye;t[21]===Symbol.for("react.memo_cache_sentinel")?(ye=b.jsx(ry,{}),t[21]=ye):ye=t[21],me=ye;break e}if(O){let ye;t[22]===Symbol.for("react.memo_cache_sentinel")?(ye=b.jsx(SE,{className:"size-4 text-muted-foreground"}),t[22]=ye):ye=t[22],me=ye;break e}const pe=x?.icon;if(pe){let ye;t[23]!==pe?(ye=b.jsx(pe,{className:"size-4 text-muted-foreground"}),t[23]=pe,t[24]=ye):ye=t[24],me=ye;break e}let we;t[25]===Symbol.for("react.memo_cache_sentinel")?(we=b.jsx(CS,{className:"size-4 text-muted-foreground"}),t[25]=we):we=t[25],me=we}let be;t[26]!==r||t[27]!==s?(be=b.jsx(qP,{annotations:r,toolMeta:s}),t[26]=r,t[27]=s,t[28]=be):be=t[28];const Se=se||null;let Ne;t[29]!==ee||t[30]!==h||t[31]!==N||t[32]!==a||t[33]!==ce||t[34]!==me||t[35]!==be||t[36]!==Se?(Ne=b.jsx(ht,{icon:me,iconDestructive:N,trailing:be,title:h,latency:a,summary:ce,state:ee,detail:Se}),t[29]=ee,t[30]=h,t[31]=N,t[32]=a,t[33]=ce,t[34]=me,t[35]=be,t[36]=Se,t[37]=Ne):Ne=t[37];let Ae;t[38]!==P||t[39]!==$?(Ae=P&&b.jsx("div",{className:"flex justify-end mt-1.5 mb-1",children:b.jsxs("button",{type:"button",onClick:$,className:"flex items-center gap-1.5 px-2 py-1 text-xs text-muted-foreground rounded-md [@media(hover:hover)]:hover:bg-accent/50 [@media(hover:hover)]:hover:text-foreground transition-colors",children:[b.jsx(xS,{className:"size-3.5"}),"Open in panel"]})}),t[38]=P,t[39]=$,t[40]=Ae):Ae=t[40];let Fe;t[41]!==P||t[42]!==c||t[43]!==_||t[44]!==h||t[45]!==z||t[46]!==Y||t[47]!==O||t[48]!==S||t[49]!==p.id||t[50]!==p.slug||t[51]!==n.input||t[52]!==n.output||t[53]!==C||t[54]!==R||t[55]!==D?(Fe=O&&D&&_&&p?.id&&b.jsx(b.Fragment,{children:b.jsx(hS,{fallback:pe=>{const{resetError:we}=pe;return b.jsxs("div",{className:"mt-2 flex items-center gap-2 px-3 py-2.5 border border-dashed border-destructive/30 bg-destructive/5 rounded-lg",children:[b.jsx(CE,{size:16,className:"shrink-0 text-destructive"}),b.jsxs("span",{className:"flex-1 text-xs text-destructive font-medium",children:["Failed to load"," ",b.jsx("span",{className:"font-mono",children:h})," app"]}),b.jsxs(uc,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1.5 shrink-0",onClick:we,children:[b.jsx(bS,{className:"size-3.5"}),"Retry"]})]})},children:b.jsx(ge.Suspense,{fallback:b.jsx("div",{className:"mt-2 flex items-center justify-center h-12 border border-border/75 rounded-lg overflow-hidden p-3",children:b.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[b.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),b.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:b.jsx(VP,{uiResourceUri:D,connectionId:_,orgId:p.id,orgSlug:p.slug,toolName:R,toolInput:n.input,toolResult:n.output,toolMeta:S,onMessage:z,onUpdateModelContext:C&&c?pe=>c.setAppContext(C,pe):void 0,onTeardown:C&&c?()=>c.clearAppContext(C):void 0,onRequestDisplayMode:P?Y:void 0})})})}),t[41]=P,t[42]=c,t[43]=_,t[44]=h,t[45]=z,t[46]=Y,t[47]=O,t[48]=S,t[49]=p.id,t[50]=p.slug,t[51]=n.input,t[52]=n.output,t[53]=C,t[54]=R,t[55]=D,t[56]=Fe):Fe=t[56];let Oe;return t[57]!==Ne||t[58]!==Ae||t[59]!==Fe?(Oe=b.jsxs("div",{children:[Ne,Ae,Fe]}),t[57]=Ne,t[58]=Ae,t[59]=Fe,t[60]=Oe):Oe=t[60],Oe}function iS(e){return typeof e=="object"&&e!=null&&"type"in e&&e.type==="mcpToolCall"}function zP(e){if(e!=null)return iS(e)?e.arguments??void 0:e}function jP(e){if(e==null)return;if(iS(e)&&e.result!=null)return e.result;if(typeof e=="object"&&"content"in e&&Array.isArray(e.content)){const n=e.content;if(n.length>0&&typeof n[0]=="object"&&n[0]!=null&&"type"in n[0])return e}const t=typeof e=="string"?e:JSON.stringify(e);return{structuredContent:typeof e=="object"&&!Array.isArray(e)?e:void 0,content:[{type:"text",text:t}]}}function VP(e){const t=ne.c(27),{uiResourceUri:n,connectionId:r,orgId:a,orgSlug:i,toolName:s,toolInput:o,toolResult:l,toolMeta:u,onMessage:c,onUpdateModelContext:p,onTeardown:f,onRequestDisplayMode:m}=e;let g;t[0]!==r||t[1]!==a||t[2]!==i?(g={connectionId:r,orgId:a,orgSlug:i},t[0]=r,t[1]=a,t[2]=i,t[3]=g):g=t[3];const E=RE(g);let _;t[4]===Symbol.for("react.memo_cache_sentinel")?(_={type:"object"},t[4]=_):_=t[4];let y;t[5]!==u?(y=u!=null&&{_meta:u},t[5]=u,t[6]=y):y=t[6];let S;t[7]!==y||t[8]!==s?(S={name:s,inputSchema:_,...y},t[7]=y,t[8]=s,t[9]=S):S=t[9];const T=S;let R;t[10]!==T?(R={tool:T},t[10]=T,t[11]=R):R=t[11];let x;t[12]!==o?(x=zP(o),t[12]=o,t[13]=x):x=t[13];let h;t[14]!==l?(h=jP(l),t[14]=l,t[15]=h):h=t[15];let w;return t[16]!==E||t[17]!==c||t[18]!==m||t[19]!==f||t[20]!==p||t[21]!==a||t[22]!==R||t[23]!==x||t[24]!==h||t[25]!==n?(w=b.jsx("div",{className:"mt-2 border border-border/75 rounded-lg overflow-hidden p-3",children:b.jsx(XS,{resourceURI:n,orgId:a,toolInfo:R,toolInput:x,toolResult:h,client:E,onMessage:c,onUpdateModelContext:p,onTeardown:f,onRequestDisplayMode:m})}),t[16]=E,t[17]=c,t[18]=m,t[19]=f,t[20]=p,t[21]=a,t[22]=R,t[23]=x,t[24]=h,t[25]=n,t[26]=w):w=t[26],w}const EE="mesh-storage://";function ad(e){return e.startsWith(EE)?e.slice(EE.length):null}function sS(e,t){const n=ad(e);return n!==null?`/api/${t}/files/${n}`:e}function WP(e){if(!e?.usage)return null;const t=e.usage.inputTokens??0,n=e.usage.outputTokens??0,r=t+n;return r?{inputTokens:t,outputTokens:n,reasoningTokens:0,totalTokens:r,cost:0}:null}function YP(e){const t=ne.c(13),{uri:n,orgSlug:r}=e;let a;t[0]!==r||t[1]!==n?(a=sS(n,r),t[0]=r,t[1]=n,t[2]=a):a=t[2];const i=a;let s;t[3]!==n?(s=ad(n)!==null?n.slice(n.lastIndexOf("/")+1):"reference",t[3]=n,t[4]=s):s=t[4];const o=s;let l;t[5]!==o?(l=b.jsx(Ot,{asChild:!0,children:b.jsx("span",{className:"inline-flex items-center gap-1 px-1 py-0.5 rounded bg-muted text-muted-foreground text-xs cursor-default select-none",children:o})}),t[5]=o,t[6]=l):l=t[6];let u;t[7]!==o||t[8]!==i?(u=b.jsx(Lt,{side:"top",className:"max-w-sm p-1.5",children:b.jsx("img",{src:i,alt:o,className:"max-w-full max-h-64 object-contain rounded"})}),t[7]=o,t[8]=i,t[9]=u):u=t[9];let c;return t[10]!==l||t[11]!==u?(c=b.jsxs(Dt,{children:[l,u]}),t[10]=l,t[11]=u,t[12]=c):c=t[12],c}function KP(e){const t=ne.c(65),{part:n,latency:r}=e,a=TE();let i;t[0]!==n.state?(i=fr(n.state),t[0]=n.state,t[1]=i):i=t[1];const s=i,o=n.input,l=n.output,u=l?.images;let c;t[2]!==l?(c=WP(l),t[2]=l,t[3]=c):c=t[3];const p=c,f=l?.model;let m,g,E,_,y,S,T,R,x,h,w,D;if(t[4]!==u||t[5]!==o||t[6]!==r||t[7]!==f||t[8]!==a||t[9]!==s||t[10]!==p){y=Symbol.for("react.early_return_sentinel");e:{const $=Array.isArray(o?.referenceImages)?o.referenceImages.filter(XP):void 0;let U;t[23]!==r?(U=r!=null&&r>0?b.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground/60",children:Kt(r)}):null,t[23]=r,t[24]=U):U=t[24];const Y=U;if(s==="loading"){let W;t[25]===Symbol.for("react.memo_cache_sentinel")?(W=b.jsx(Lr,{size:14}),t[25]=W):W=t[25];let z;t[26]!==o?(z=o?.prompt?`"${o.prompt.slice(0,80)}…"`:void 0,t[26]=o,t[27]=z):z=t[27];let K;t[28]!==z?(K=b.jsx(ht,{icon:W,title:"Generating image",summary:z,state:"loading"}),t[28]=z,t[29]=K):K=t[29],y=K;break e}if(s==="error"||!u||u.length===0){let W;t[30]===Symbol.for("react.memo_cache_sentinel")?(W=b.jsx(Lr,{size:14}),t[30]=W):W=t[30];const z=s==="error"?"Failed":"No images generated",K=s==="error"?"error":"idle";let N;t[31]!==Y||t[32]!==z||t[33]!==K||t[34]!==p?(N=b.jsx(ht,{icon:W,title:"Image generation",summary:z,state:K,usage:p,trailing:Y}),t[31]=Y,t[32]=z,t[33]=K,t[34]=p,t[35]=N):N=t[35],y=N;break e}_="flex flex-col gap-2",m=ht,t[36]===Symbol.for("react.memo_cache_sentinel")?(x=b.jsx(Lr,{size:14,className:"text-pink-500"}),t[36]=x):x=t[36],h="Generated image",w=f,D="idle",g=p,E=Y,S="flex flex-col gap-1 pb-2 pl-6",t[37]!==o?(T=o?.prompt&&b.jsx("p",{className:"text-xs text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:o.prompt}),t[37]=o,t[38]=T):T=t[38],R=$&&$.length>0&&b.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[b.jsx("span",{className:"text-[11px] text-muted-foreground/50",children:"references:"}),$.map((W,z)=>{const K=W.uri??W.url;return b.jsx(YP,{uri:K,orgSlug:a.slug},z)})]})}t[4]=u,t[5]=o,t[6]=r,t[7]=f,t[8]=a,t[9]=s,t[10]=p,t[11]=m,t[12]=g,t[13]=E,t[14]=_,t[15]=y,t[16]=S,t[17]=T,t[18]=R,t[19]=x,t[20]=h,t[21]=w,t[22]=D}else m=t[11],g=t[12],E=t[13],_=t[14],y=t[15],S=t[16],T=t[17],R=t[18],x=t[19],h=t[20],w=t[21],D=t[22];if(y!==Symbol.for("react.early_return_sentinel"))return y;let O;t[39]!==S||t[40]!==T||t[41]!==R?(O=b.jsxs("div",{className:S,children:[T,R]}),t[39]=S,t[40]=T,t[41]=R,t[42]=O):O=t[42];let C;t[43]!==m||t[44]!==g||t[45]!==E||t[46]!==O||t[47]!==x||t[48]!==h||t[49]!==w||t[50]!==D?(C=b.jsx(m,{icon:x,title:h,summary:w,state:D,usage:g,trailing:E,children:O}),t[43]=m,t[44]=g,t[45]=E,t[46]=O,t[47]=x,t[48]=h,t[49]=w,t[50]=D,t[51]=C):C=t[51];let M;if(t[52]!==u||t[53]!==o?.prompt||t[54]!==a){let $;t[56]!==o?.prompt||t[57]!==a?($=(U,Y)=>{const W=U.uri??U.url;if(!W)return null;const z=sS(W,a.slug);return b.jsx(tS,{src:z,alt:o?.prompt??"Generated image",children:b.jsx("img",{src:z,alt:o?.prompt??"Generated image",className:"max-w-sm max-h-80 object-contain rounded-lg border border-border hover:border-foreground/20 transition-colors"})},Y)},t[56]=o?.prompt,t[57]=a,t[58]=$):$=t[58],M=u.map($),t[52]=u,t[53]=o?.prompt,t[54]=a,t[55]=M}else M=t[55];let P;t[59]!==M?(P=b.jsx("div",{className:"flex flex-wrap gap-2",children:M}),t[59]=M,t[60]=P):P=t[60];let V;return t[61]!==_||t[62]!==C||t[63]!==P?(V=b.jsxs("div",{className:_,children:[C,P]}),t[61]=_,t[62]=C,t[63]=P,t[64]=V):V=t[64],V}function XP(e){return e.uri??e.url}function ZP(e,t){const n=ad(e);return n!==null?`/api/${t}/files/${n}`:e}function QP(e){if(!e?.usage)return null;const t=e.usage.inputTokens??0,n=e.usage.outputTokens??0,r=t+n;if(!r)return null;const a={providerMetadata:e.usage.providerMetadata};return{inputTokens:t,outputTokens:n,reasoningTokens:0,totalTokens:r,cost:wE(a)}}function JP(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e}}function eF(e){try{return`${new URL(e).origin}/favicon.ico`}catch{return""}}function tF(e){const t=ne.c(16),{citation:n,index:r}=e;let a;t[0]!==n.url?(a=JP(n.url),t[0]=n.url,t[1]=a):a=t[1];const i=a;let s;t[2]!==n.url?(s=eF(n.url),t[2]=n.url,t[3]=s):s=t[3];const o=s,l=n.title||i;let u;t[4]!==o?(u=b.jsx("img",{src:o,alt:"",className:"size-3.5 rounded-sm shrink-0",onError:nF}),t[4]=o,t[5]=u):u=t[5];let c;t[6]!==l?(c=b.jsx("span",{className:"truncate max-w-[180px]",children:l}),t[6]=l,t[7]=c):c=t[7];const p=r+1;let f;t[8]!==p?(f=b.jsxs("span",{className:"text-[10px] text-muted-foreground/50 tabular-nums shrink-0",children:["[",p,"]"]}),t[8]=p,t[9]=f):f=t[9];let m;t[10]===Symbol.for("react.memo_cache_sentinel")?(m=b.jsx(oy,{size:10,className:"shrink-0 opacity-0 group-hover/src:opacity-100 transition-opacity"}),t[10]=m):m=t[10];let g;return t[11]!==n.url||t[12]!==u||t[13]!==c||t[14]!==f?(g=b.jsxs("a",{href:n.url,target:"_blank",rel:"noopener noreferrer",className:"group/src inline-flex items-center gap-1.5 rounded-md border border-border/50 bg-muted/30 px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted/60 hover:border-border hover:text-foreground",children:[u,c,f,m]}),t[11]=n.url,t[12]=u,t[13]=c,t[14]=f,t[15]=g):g=t[15],g}function nF(e){e.target.style.display="none"}function rF(e,t){return e.replace(/\[(\d+)\]/g,(n,r)=>{const a=parseInt(r,10)-1,i=t[a];return i?`[\\[${r}\\]](${i.url})`:n})}const Bu=5;function aF(e){const t=ne.c(12),{citations:n}=e,[r,a]=ge.useState(!1),i=n.length>Bu;let s;t[0]!==n||t[1]!==r?(s=r?n:n.slice(0,Bu),t[0]=n,t[1]=r,t[2]=s):s=t[2];const o=s;let l;t[3]!==o?(l=o.map(sF),t[3]=o,t[4]=l):l=t[4];let u;t[5]!==n.length||t[6]!==r||t[7]!==i?(u=i&&b.jsx("button",{type:"button",onClick:()=>a(iF),className:"inline-flex items-center rounded-md border border-border/50 bg-muted/30 px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted/60 hover:border-border hover:text-foreground",children:r?"show less":`+${n.length-Bu} more`}),t[5]=n.length,t[6]=r,t[7]=i,t[8]=u):u=t[8];let c;return t[9]!==l||t[10]!==u?(c=b.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[l,u]}),t[9]=l,t[10]=u,t[11]=c):c=t[11],c}function iF(e){return!e}function sF(e,t){return b.jsx(tF,{citation:e,index:t},e.url)}function oF(e){const t=ne.c(51),{part:n,latency:r,streamingText:a}=e,i=TE();let s;t[0]!==n.state?(s=fr(n.state),t[0]=n.state,t[1]=s):s=t[1];const o=s,l=n.input,u=n.output;let c,p,f;t[2]!==i||t[3]!==u?(c=u?.uri?ZP(u.uri,i.slug):void 0,f=dc,p=At.webSearchBlob(c??""),t[2]=i,t[3]=u,t[4]=c,t[5]=p,t[6]=f):(c=t[4],p=t[5],f=t[6]);let m;t[7]!==c?(m=async()=>{const Z=await fetch(c);if(!Z.ok)throw new Error(`Failed to fetch: ${Z.status}`);return Z.text()},t[7]=c,t[8]=m):m=t[8];const g=!!c;let E;t[9]!==p||t[10]!==m||t[11]!==g?(E={queryKey:p,queryFn:m,enabled:g,staleTime:1/0},t[9]=p,t[10]=m,t[11]=g,t[12]=E):E=t[12];const{data:_}=f(E),y=o==="loading",S=o!=="loading"&&o!=="error",T=u?.citations;let R;t[13]!==u?(R=QP(u),t[13]=u,t[14]=R):R=t[14];const x=R,h=u?.content??_??a;let w;t[15]!==T||t[16]!==h?(w=h&&T?.length?rF(h,T):h,t[15]=T,t[16]=h,t[17]=w):w=t[17];const D=w;let O;t[18]!==r?(O=r!=null&&r>0?b.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground/60",children:Kt(r)}):null,t[18]=r,t[19]=O):O=t[19];const C=O;if(o==="error"){let Z;t[20]===Symbol.for("react.memo_cache_sentinel")?(Z=b.jsx(nr,{size:14}),t[20]=Z):Z=t[20];let k;return t[21]!==C||t[22]!==x?(k=b.jsx(ht,{icon:Z,title:"Web search",summary:"Failed",state:"error",usage:x,trailing:C}),t[21]=C,t[22]=x,t[23]=k):k=t[23],k}const M=y?"animate-pulse":"text-blue-500";let P;t[24]!==M?(P=Re(M),t[24]=M,t[25]=P):P=t[25];let V;t[26]!==P?(V=b.jsx(nr,{size:14,className:P}),t[26]=P,t[27]=V):V=t[27];const $=y?"Researching...":"Web search";let U;t[28]!==l||t[29]!==S||t[30]!==u?.model?(U=S?u?.model??l?.query?.slice(0,60):l?.query?`"${l.query.slice(0,80)}"`:void 0,t[28]=l,t[29]=S,t[30]=u?.model,t[31]=U):U=t[31];const Y=y?"loading":"idle";let W;t[32]!==l?(W=l?.query&&b.jsx("p",{className:"text-xs text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:l.query}),t[32]=l,t[33]=W):W=t[33];let z;t[34]!==D||t[35]!==n.toolCallId?(z=D?b.jsx("div",{className:"max-h-96 overflow-y-auto overflow-x-hidden rounded-lg border border-border/40 bg-muted/20 px-4 py-3 min-w-0",children:b.jsx("div",{className:"prose prose-sm prose-neutral dark:prose-invert max-w-none text-[13px] leading-relaxed break-words",children:b.jsx(td,{id:n.toolCallId,text:D})})}):b.jsx("div",{className:"rounded-lg border border-border/40 bg-muted/20 px-4 py-3",children:b.jsxs("div",{className:"space-y-2 animate-pulse",children:[b.jsx("div",{className:"h-3 rounded bg-muted-foreground/10 w-3/4"}),b.jsx("div",{className:"h-3 rounded bg-muted-foreground/10 w-1/2"})]})}),t[34]=D,t[35]=n.toolCallId,t[36]=z):z=t[36];let K;t[37]!==T?(K=T&&T.length>0&&b.jsx(aF,{citations:T}),t[37]=T,t[38]=K):K=t[38];let N;t[39]!==W||t[40]!==z||t[41]!==K?(N=b.jsxs("div",{className:"pl-6 pb-3 flex flex-col gap-1 min-w-0",children:[W,z,K]}),t[39]=W,t[40]=z,t[41]=K,t[42]=N):N=t[42];let Q;return t[43]!==C||t[44]!==V||t[45]!==$||t[46]!==U||t[47]!==Y||t[48]!==N||t[49]!==x?(Q=b.jsx(ht,{icon:V,title:$,summary:U,state:Y,usage:x,trailing:C,defaultOpen:!0,children:N}),t[43]=C,t[44]=V,t[45]=$,t[46]=U,t[47]=Y,t[48]=N,t[49]=x,t[50]=Q):Q=t[50],Q}function lF(e){const t=ne.c(14),{part:n}=e;if(!n.state.startsWith("output-"))return null;let r;t[0]!==n.input?.prompt?(r=n.input?.prompt?.trim()||"Question",t[0]=n.input?.prompt,t[1]=r):r=t[1];const a=r,i=n.state==="output-error"||n.state==="output-denied",s=n.state==="output-denied";let o;t[2]!==s||t[3]!==n?(o=s?"Skipped":n.state==="output-error"?rd(n)??"Error":n.output?.response??"",t[2]=s,t[3]=n,t[4]=o):o=t[4];const l=o;let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=b.jsx(PS,{className:"size-4 text-muted-foreground/50 shrink-0 mt-0.5"}),t[5]=u):u=t[5];let c;t[6]!==a?(c=b.jsxs("div",{className:"flex items-start gap-2",children:[u,b.jsx("span",{className:"text-[14px] text-muted-foreground leading-snug",children:a})]}),t[6]=a,t[7]=c):c=t[7];let p;t[8]!==l||t[9]!==i?(p=l&&b.jsx("div",{className:"ml-6 pl-2 border-l border-border/50",children:b.jsx("span",{className:Re("text-[14px] leading-snug",i?"text-muted-foreground/50 italic":"text-foreground/70"),children:l})}),t[8]=l,t[9]=i,t[10]=p):p=t[10];let f;return t[11]!==c||t[12]!==p?(f=b.jsxs("div",{className:"my-1.5 flex flex-col gap-1",children:[c,p]}),t[11]=c,t[12]=p,t[13]=f):f=t[13],f}function uF(e){const t=ne.c(18),{part:n,subtaskMeta:r,latency:a}=e,i=n.state==="input-streaming"||n.state==="input-available",s=n.state==="output-available"&&n.preliminary===!0,o=n.state==="output-available"&&!n.preliminary,l=n.state==="output-error",u="preliminary"in n?n.preliminary:!1;let c;t[0]!==n.state||t[1]!==u?(c=fr(n.state,u),t[0]=n.state,t[1]=u,t[2]=c):c=t[2];const p=c,f=p==="approval"?"idle":p,m=n.input?.agent_id,g=uy(m),E=r?.usage,_=g?.title?g.title:i?"Starting subtask...":s?"Subtask running...":o?"Subtask completed":l?"Subtask failed":"Subtask",y=n.input?.prompt??"",S=n.state==="approval-requested"?"Awaiting approval...":y.length>120?y.slice(0,120)+"…":y;let T;t[3]!==l||t[4]!==n?(T=l?rd(n):$P(n.output)??"No output available",t[3]=l,t[4]=n,t[5]=T):T=t[5];const R=T,x=`# Task
|
|
123
123
|
${n.input?.prompt??"No prompt provided"}
|
|
124
124
|
|
|
125
125
|
# ${l?"Error":"Result"}
|
package/dist/client/assets/{plugin-empty-state-Daxzikof.js → plugin-empty-state-CFxEUNdF.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as o,j as t,Z as n}from"./index
|
|
1
|
+
import{e as o,j as t,Z as n}from"./index-k8njt3_A.js";function a(){const s=o.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(n,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),s[0]=e):e=s[0],e}export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as S,j as s,r as w,Z as y}from"./index
|
|
1
|
+
import{e as S,j as s,r as w,Z as y}from"./index-k8njt3_A.js";import{i as R}from"./Check-CUpq9BBu.js";import{t as _}from"./ChevronDown-D5WF5tyi.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function $(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{$ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as B,e as D,j as s,s as X,f as Z,g as ee,d as te,b as ne,K as se,n as ie,O as le,l as oe,B as re}from"./index
|
|
1
|
+
import{r as B,e as D,j as s,s as X,f as Z,g as ee,d as te,b as ne,K as se,n as ie,O as le,l as oe,B as re}from"./index-k8njt3_A.js";import{u as ae}from"./use-connection-9VrA1Bg7.js";import{S as ce,u as ue,k as de}from"./constants-Df56C9B1.js";import{a as me}from"./Settings02-D1Jfvo1d.js";import{P as z}from"./index-ClxNnAsp.js";const ge=B.createContext(null);function F(i){const e=D.c(3),{value:h,children:m}=i,t=h;let l;return e[0]!==m||e[1]!==t?(l=s.jsx(ge.Provider,{value:t,children:m}),e[0]=m,e[1]=t,e[2]=l):l=e[2],l}B.createContext(null);function fe(i){return{id:i.id,title:i.title,icon:i.icon,description:i.description,app_name:i.app_name,app_id:i.app_id,tools:i.tools,metadata:i.metadata}}function _e(i){const e=D.c(60),{bindingName:h,renderEmptyState:m}=i,{org:t,project:l}=X(),k=Z();let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={strict:!1},e[0]=j):j=e[0];const{org:T,taskId:w,pluginId:g}=ee(j);let I;e[1]===Symbol.for("react.memo_cache_sentinel")?(I={strict:!1},e[1]=I):I=e[1];const G=te(I).virtualmcpid;let P;e[2]!==h?(P={binding:h},e[2]=h,e[3]=P):P=e[3];const K=ae(P),{data:f}=ne.useSession();let _;e[4]!==t.id||e[5]!==t.slug?(_={connectionId:ce,orgId:t.id,orgSlug:t.slug},e[4]=t.id,e[5]=t.slug,e[6]=_):_=e[6];const O=ue(_);let x;e[7]!==g||e[8]!==l.id?(x=se.projectPluginConfig(l.id??"",g),e[7]=g,e[8]=l.id,e[9]=x):x=e[9];let p;e[10]!==g||e[11]!==l.id||e[12]!==O?(p=async()=>{const n=await O.callTool({name:"VIRTUAL_MCP_PLUGIN_CONFIG_GET",arguments:{virtualMcpId:l.id,pluginId:g}});return n.structuredContent??n},e[10]=g,e[11]=l.id,e[12]=O,e[13]=p):p=e[13];const U=!!l.id&&!!g;let v;e[14]!==x||e[15]!==p||e[16]!==U?(v={queryKey:x,queryFn:p,enabled:U},e[14]=x,e[15]=p,e[16]=U,e[17]=v):v=e[17];const{data:V,isLoading:Q}=ie(v),R=V?.config?.connectionId,C=R?K.find(n=>n.id===R):null,y=de({connectionId:C?.id,orgId:t.id,orgSlug:t.slug});let S;e[18]!==f?(S=f?.user?{user:{id:f.user.id,name:f.user.name,email:f.user.email,image:f.user.image}}:null,e[18]=f,e[19]=S):S=e[19];const a=S;let b;e[20]!==t.id||e[21]!==t.name||e[22]!==t.slug?(b={id:t.id,slug:t.slug,name:t.name},e[20]=t.id,e[21]=t.name,e[22]=t.slug,e[23]=b):b=e[23];const c=b;if(Q){let n;return e[24]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(oe,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),e[24]=n):n=e[24],n}if(K.length===0){let n;e[25]!==c||e[26]!==a?(n={connectionId:null,connection:null,toolCaller:null,org:c,session:a},e[25]=c,e[26]=a,e[27]=n):n=e[27];const u=n;let r;e[28]!==m?(r=m(),e[28]=m,e[29]=r):r=e[29];let o;e[30]!==r?(o=s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:r}),e[30]=r,e[31]=o):o=e[31];let d;return e[32]!==u||e[33]!==o?(d=s.jsx(F,{value:u,children:o}),e[32]=u,e[33]=o,e[34]=d):d=e[34],d}if(!C){let n;e[35]!==c||e[36]!==a?(n={connectionId:null,connection:null,toolCaller:null,org:c,session:a},e[35]=c,e[36]=a,e[37]=n):n=e[37];const u=n;let r;e[38]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[s.jsx(me,{size:48,className:"text-muted-foreground mb-2"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]}),e[38]=r):r=e[38];let o;e[39]!==k||e[40]!==t.slug||e[41]!==T||e[42]!==l.id||e[43]!==w||e[44]!==G?(o=s.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:[r,s.jsx(re,{onClick:()=>{const H=T??t.slug,J=G??l.id??"",W=w??crypto.randomUUID();k({to:"/$org/$taskId",params:{org:H,taskId:W},search:{virtualmcpid:J,main:"settings"}})},children:"Go to Project Settings"})]}),e[39]=k,e[40]=t.slug,e[41]=T,e[42]=l.id,e[43]=w,e[44]=G,e[45]=o):o=e[45];let d;return e[46]!==u||e[47]!==o?(d=s.jsx(F,{value:u,children:o}),e[46]=u,e[47]=o,e[48]=d):d=e[48],d}const Y=C.id,$=fe(C);let N;e[49]!==y?(N=(n,u)=>y?y.callTool({name:n,arguments:u}).then(xe):Promise.reject(new Error("MCP client is not available")),e[49]=y,e[50]=N):N=e[50];const q=N;let E;e[51]!==C||e[52]!==c||e[53]!==a||e[54]!==$||e[55]!==q?(E={connectionId:Y,connection:$,toolCaller:q,org:c,session:a},e[51]=C,e[52]=c,e[53]=a,e[54]=$,e[55]=q,e[56]=E):E=e[56];const A=E;let L;e[57]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(z,{children:s.jsx(z.Content,{children:s.jsx(le,{})})}),e[57]=L):L=e[57];let M;return e[58]!==A?(M=s.jsx(F,{value:A,children:L}),e[58]=A,e[59]=M):M=e[59],M}function xe(i){return i.structuredContent??i}export{_e as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,aT as $,j as c,c4 as L,aU as z,b6 as A,a7 as _,a8 as g,c5 as b,aW as j,c6 as G,c7 as w,c8 as H,c9 as K,ae as U,ca as W,cb as V,cc as Z,cd as q,ce as B,cf as J,e as R,c as Q}from"./index
|
|
1
|
+
import{r as i,aT as $,j as c,c4 as L,aU as z,b6 as A,a7 as _,a8 as g,c5 as b,aW as j,c6 as G,c7 as w,c8 as H,c9 as K,ae as U,ca as W,cb as V,cc as Z,cd as q,ce as B,cf as J,e as R,c as Q}from"./index-k8njt3_A.js";var C="Popover",[E]=U(C,[w]),P=w(),[X,u]=E(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(X,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(b,{...s,...r,ref:e})});Y.displayName=F;var S="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,o),s=P(o),a=A(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(b,{asChild:!0,...s,children:p})});y.displayName=S;var O="PopoverPortal",[ee,oe]=E(O,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(j,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=O;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(j,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=W("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return V(),c.jsx(Z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(q,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(B,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=Q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{ve as P,ge as a,fe as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as P,j as t,b as D,z as q,D as B,P as G,t as y,x as R}from"./index
|
|
1
|
+
import{e as P,j as t,b as D,z as q,D as B,P as G,t as y,x as R}from"./index-k8njt3_A.js";import{P as E}from"./index-ClxNnAsp.js";import{A as U}from"./avatar-CYyuZ3vB.js";import{S as I}from"./switch-YLfAn92x.js";import{S as F,a as H,d as V,c as Y}from"./select-B3lWwv9y.js";import{T as K,a as L}from"./toggle-group-C_B32Tm8.js";import{I as J}from"./input-DrFzs1Yw.js";import{n as M,a as O,i as Q}from"./Sun-BgOSswUu.js";import{i as W}from"./Play-DRCdZRLW.js";import{u as X}from"./use-debounced-autosave-Ja8PcJv_.js";import{p as Z,q as ee}from"./question-004-sINsf4GQ.js";import"./index-Y4klGMPr.js";import{d as te,b as C,S as T,a as $}from"./settings-section-qufbNRCL.js";import"./tooltip-B26xbtws.js";import"./X-CdXDgTcN.js";import"./User01-Cxb6YtJq.js";import"./Check-CUpq9BBu.js";import"./ChevronDown-D5WF5tyi.js";import"./ChevronUp-CDMPc0ql.js";import"./card-BWjsP1pO.js";import"./ArrowUpRight-CCQZEQ7k.js";function oe(){const e=P.c(19),{data:o,isPending:n}=D.useSession(),l=o?.user,s=l?.image,i=l?.name??"";let a;e[0]!==i?(a={values:{name:i}},e[0]=i,e[1]=a):a=e[1];const r=q(a);let p;e[2]!==r?(p={save:async()=>{if(!r.formState.isDirty)return;const{name:b}=r.getValues();try{await D.updateUser({name:b}),y("profile_updated",{fields:["name"]}),r.reset({name:b})}catch{R.error("Failed to update profile")}}},e[2]=r,e[3]=p):p=e[3];const{schedule:j,flush:u}=X(p);if(n)return null;const v=l?.name??"U";let c;e[4]!==v||e[5]!==s?(c=t.jsx(C,{title:"Avatar",action:t.jsx(U,{url:s,fallback:v,shape:"circle",size:"base"})}),e[4]=v,e[5]=s,e[6]=c):c=e[6];let f;e[7]!==u||e[8]!==j?(f=b=>{const{field:_}=b;return t.jsx(J,{id:"display-name",..._,onChange:S=>{_.onChange(S),j()},onBlur:()=>{_.onBlur(),u()},onKeyDown:S=>{S.key==="Enter"&&u()},placeholder:"Your name",className:"w-[280px]"})},e[7]=u,e[8]=j,e[9]=f):f=e[9];let x;e[10]!==r.control||e[11]!==f?(x=t.jsx(C,{title:"Display name",action:t.jsx(B,{control:r.control,name:"name",render:f})}),e[10]=r.control,e[11]=f,e[12]=x):x=e[12];const g=l?.email;let d;e[13]!==g?(d=t.jsx(C,{title:"Email",action:t.jsx("span",{className:"text-sm text-muted-foreground",children:g})}),e[13]=g,e[14]=d):d=e[14];let h;return e[15]!==c||e[16]!==x||e[17]!==d?(h=t.jsx(T,{children:t.jsxs($,{children:[c,x,d]})}),e[15]=c,e[16]=x,e[17]=d,e[18]=h):h=e[18],h}function ne(){const e=P.c(48),[o,n]=G();let l;e[0]!==n?(l=async m=>{if(m&&await Notification.requestPermission()!=="granted"){y("preferences_notifications_permission_denied"),R.error("Notifications denied. Please enable them in your browser settings."),n(re);return}y("preferences_notifications_toggled",{enabled:m}),n(N=>({...N,enableNotifications:m}))},e[0]=n,e[1]=l):l=e[1];const s=l;let i;e[2]!==n?(i=m=>{m&&(y("preferences_theme_changed",{to_value:m}),n(N=>({...N,theme:m})))},e[2]=n,e[3]=i):i=e[3];let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(L,{value:"light","aria-label":"Light theme",children:t.jsx(M,{size:14})}),e[4]=a):a=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(L,{value:"dark","aria-label":"Dark theme",children:t.jsx(O,{size:14})}),e[5]=r):r=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(L,{value:"system","aria-label":"System theme",children:t.jsx(Q,{size:14})}),e[6]=p):p=e[6];let j;e[7]!==o.theme||e[8]!==i?(j=t.jsx(C,{title:"Theme",description:"Your preferred color scheme.",action:t.jsxs(K,{type:"single",size:"sm",variant:"outline",value:o.theme,onValueChange:i,children:[a,r,p]})}),e[7]=o.theme,e[8]=i,e[9]=j):j=e[9];let u;e[10]!==s||e[11]!==o.enableNotifications?(u=typeof Notification<"u"?()=>s(!o.enableNotifications):void 0,e[10]=s,e[11]=o.enableNotifications,e[12]=u):u=e[12];let v;e[13]!==s||e[14]!==o.enableNotifications?(v=t.jsx(I,{disabled:typeof Notification>"u",checked:o.enableNotifications,onCheckedChange:s}),e[13]=s,e[14]=o.enableNotifications,e[15]=v):v=e[15];let c;e[16]!==u||e[17]!==v?(c=t.jsx(C,{title:"Notifications",description:"Receive browser notifications for important events.",onClick:u,action:v}),e[16]=u,e[17]=v,e[18]=c):c=e[18];let f;e[19]!==o.enableSounds||e[20]!==n?(f=()=>{y("preferences_sounds_toggled",{enabled:!o.enableSounds}),n(le)},e[19]=o.enableSounds,e[20]=n,e[21]=f):f=e[21];let x;e[22]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("button",{type:"button","aria-label":"Preview notification sound",onClick:se,className:"size-6 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",children:t.jsx(W,{size:11})}),e[22]=x):x=e[22];let g;e[23]!==n?(g=m=>{y("preferences_sounds_toggled",{enabled:m}),n(N=>({...N,enableSounds:m}))},e[23]=n,e[24]=g):g=e[24];let d;e[25]!==o.enableSounds||e[26]!==g?(d=t.jsxs("div",{className:"flex items-center gap-2",children:[x,t.jsx(I,{checked:o.enableSounds,onCheckedChange:g})]}),e[25]=o.enableSounds,e[26]=g,e[27]=d):d=e[27];let h;e[28]!==d||e[29]!==f?(h=t.jsx(C,{title:"Sounds",description:"Play sounds for agent actions and notifications.",onClick:f,action:d}),e[28]=d,e[29]=f,e[30]=h):h=e[30];let b;e[31]!==n?(b=m=>{y("preferences_tool_approval_changed",{to_value:m}),n(N=>({...N,toolApprovalLevel:m}))},e[31]=n,e[32]=b):b=e[32];let _;e[33]!==o.toolApprovalLevel?(_={readonly:"Ask before edit",auto:"Auto approve"}[o.toolApprovalLevel]??"Ask before edit",e[33]=o.toolApprovalLevel,e[34]=_):_=e[34];let S;e[35]!==_?(S=t.jsx(H,{className:"w-36 h-7 text-xs",children:t.jsx("span",{children:_})}),e[35]=_,e[36]=S):S=e[36];let k;e[37]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(V,{value:"readonly",textValue:"Ask before edit",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Ask before edit"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[37]=k):k=e[37];let w;e[38]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsxs(Y,{children:[k,t.jsx(V,{value:"auto",textValue:"Auto approve",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Auto approve"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all without approval"})]})})]}),e[38]=w):w=e[38];let A;e[39]!==o.toolApprovalLevel||e[40]!==b||e[41]!==S?(A=t.jsx(C,{title:"Tool Approval",description:"Control how tools are approved before execution.",action:t.jsxs(F,{value:o.toolApprovalLevel,onValueChange:b,children:[S,w]})}),e[39]=o.toolApprovalLevel,e[40]=b,e[41]=S,e[42]=A):A=e[42];let z;return e[43]!==h||e[44]!==A||e[45]!==j||e[46]!==c?(z=t.jsx(T,{title:"Preferences",children:t.jsxs($,{children:[j,c,h,A]})}),e[43]=h,e[44]=A,e[45]=j,e[46]=c,e[47]=z):z=e[47],z}function se(){y("preferences_sounds_previewed"),Z(ee.dataUri).catch(ie)}function ie(){}function le(e){return{...e,enableSounds:!e.enableSounds}}function re(e){return{...e,enableNotifications:!1}}function ae(){const e=P.c(11),[o,n]=G();let l;e[0]!==o.experimental_vibecode||e[1]!==n?(l=()=>{y("preferences_experimental_vibecode_toggled",{enabled:!o.experimental_vibecode}),n(ce)},e[0]=o.experimental_vibecode,e[1]=n,e[2]=l):l=e[2];let s;e[3]!==n?(s=r=>{y("preferences_experimental_vibecode_toggled",{enabled:r}),n(p=>({...p,experimental_vibecode:r}))},e[3]=n,e[4]=s):s=e[4];let i;e[5]!==o.experimental_vibecode||e[6]!==s?(i=t.jsx(I,{checked:o.experimental_vibecode,onCheckedChange:s}),e[5]=o.experimental_vibecode,e[6]=s,e[7]=i):i=e[7];let a;return e[8]!==l||e[9]!==i?(a=t.jsx(T,{title:"Experimental",children:t.jsx($,{children:t.jsx(C,{title:"Import from GitHub",description:"Enable importing agents from GitHub repositories.",onClick:l,action:i})})}),e[8]=l,e[9]=i,e[10]=a):a=e[10],a}function ce(e){return{...e,experimental_vibecode:!e.experimental_vibecode}}function fe(){const e=P.c(1);let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(E,{children:t.jsx(E.Content,{children:t.jsx(E.Body,{children:t.jsxs(te,{children:[t.jsx(E.Title,{children:"Profile & Preferences"}),t.jsx(oe,{}),t.jsx(ne,{}),t.jsx(ae,{})]})})})}),e[0]=o):o=e[0],o}function Le(){const e=P.c(1);let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(fe,{}),e[0]=o):o=e[0],o}export{Le as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as E,s as H,j as N}from"./index
|
|
1
|
+
import{e as E,s as H,j as N}from"./index-k8njt3_A.js";import{m as O,k as $,s as v}from"./pair-mf97TAS_.js";import{u as L}from"./constants-Df56C9B1.js";import{a as k,c as q}from"./use-mcp-tools-C7yIpDHe.js";import{c as B}from"./content-blocks-o63cs2vh.js";import{g as Y,M as G,b as w}from"./types-DfgXo_cD.js";import{c as V,b as z}from"./chat-context-D7DJNKEQ.js";import{u as F}from"./shell-layout-G8D-0WXl.js";import"./agent-icon-CaG-DX2m.js";import"./AlertCircle-B72APkrz.js";import"./Tool01-CXQZ3p7Z.js";import"./XClose-zqTFiPq2.js";import"./RefreshCcw01-CdP9yH0w.js";import"./ArrowNarrowLeft-Dz0P9WNF.js";import"./XCircle-CjR4LC4r.js";import"./ArrowUpRight-CCQZEQ7k.js";import"./ZapSquare-CliIuzcs.js";import"./Users03-CXkopkPu.js";import"./CheckCircle-DTCxFilU.js";import"./Check-CUpq9BBu.js";import"./ChevronDown-D5WF5tyi.js";import"./ChevronRight-DwbV0YDZ.js";import"./ChevronUp-CDMPc0ql.js";import"./DotsVertical-D8wcDPCU.js";import"./Container-BioZd28q.js";import"./Star01-Y834gtsL.js";import"./Palette-brLBiHpP.js";import"./SearchMd-JqX1mLMq.js";import"./index-ClxNnAsp.js";import"./tooltip-B26xbtws.js";import"./X-CdXDgTcN.js";import"./LinkExternal01-CKpEz_fF.js";import"./Lock01-CHfwR6Qi.js";import"./Sun-BgOSswUu.js";import"./Play-DRCdZRLW.js";import"./Plus-DNkjVBwq.js";import"./Settings02-D1Jfvo1d.js";import"./Shield01-D5fQpAyA.js";import"./Trash01-B8-uqWxa.js";import"./User01-Cxb6YtJq.js";import"./Zap--FKeiDFf.js";import"./index-BPgW_PVH.js";import"./use-copy-DpxSUjqd.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dialog-HqMwvS0c.js";import"./integration-icon-DUMCOZJc.js";import"./use-virtual-mcp-BlYQqAfZ.js";import"./use-collections-D66SnH5Q.js";import"./use-ai-providers-CnyJW7s-.js";import"./use-decopilot-events-DjAxcjIH.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-CUt44N_R.js";import"./use-organization-settings-Coi7Ggqq.js";import"./required-auth-layout-PH0-_blQ.js";import"./use-org-sso-Xv4QV2bL.js";const J={};function K(S){const t=E.c(37),{client:s,resourceURI:P,tool:e,connectionId:n,orgId:p,args:a}=S,{sendMessage:c}=V(),{setAppContext:f,clearAppContext:g}=z(),{setChatOpen:u,openTab:r}=F(),m=`${n}:${e.name}`;let o;t[0]!==r?(o=h=>h==="inline"?(r("0"),"inline"):"fullscreen",t[0]=r,t[1]=o):o=t[1];const d=o,l=a??J;let i;t[2]!==s||t[3]!==e.name||t[4]!==l?(i={client:s,toolName:e.name,toolArguments:l},t[2]=s,t[3]=e.name,t[4]=l,t[5]=i):i=t[5];const{data:T}=q(i);let R;if(t[6]!==e._meta||t[7]!==e.name){const h=$(e._meta);R=v(e.name,h),t[6]=e._meta,t[7]=e.name,t[8]=R}else R=t[8];const U=R;let x;t[9]!==e.inputSchema?(x=e.inputSchema??{type:"object"},t[9]=e.inputSchema,t[10]=x):x=t[10];let A;t[11]!==U||t[12]!==x||t[13]!==e?(A={...e,name:U,inputSchema:x},t[11]=U,t[12]=x,t[13]=e,t[14]=A):A=t[14];const y=A;let _;t[15]!==c||t[16]!==u?(_=h=>{const b=B(h.content);b.content.length>0&&(u(!0),c({tiptapDoc:b}))},t[15]=c,t[16]=u,t[17]=_):_=t[17];const D=_;let C;t[18]!==y?(C={tool:y},t[18]=y,t[19]=C):C=t[19];let I;t[20]!==f||t[21]!==m?(I=h=>f(m,h),t[20]=f,t[21]=m,t[22]=I):I=t[22];let M;t[23]!==g||t[24]!==m?(M=()=>g(m),t[23]=g,t[24]=m,t[25]=M):M=t[25];let j;return t[26]!==s||t[27]!==D||t[28]!==d||t[29]!==p||t[30]!==P||t[31]!==C||t[32]!==I||t[33]!==M||t[34]!==l||t[35]!==T?(j=N.jsx(G,{resourceURI:P,orgId:p,toolInfo:C,toolInput:l,toolResult:T,displayMode:"fullscreen",minHeight:w.fullscreen.minHeight,maxHeight:w.fullscreen.maxHeight,client:s,onMessage:D,onUpdateModelContext:I,onTeardown:M,onRequestDisplayMode:d,className:"h-full"}),t[26]=s,t[27]=D,t[28]=d,t[29]=p,t[30]=P,t[31]=C,t[32]=I,t[33]=M,t[34]=l,t[35]=T,t[36]=j):j=t[36],j}function Wt(S){const t=E.c(23),{connectionId:s,toolName:P,args:e}=S,{org:n}=H();let p;t[0]!==s||t[1]!==n.id||t[2]!==n.slug?(p={connectionId:s,orgId:n.id,orgSlug:n.slug},t[0]=s,t[1]=n.id,t[2]=n.slug,t[3]=p):p=t[3];const a=L(p);let c;t[4]!==a?(c={client:a},t[4]=a,t[5]=c):c=t[5];const{data:f}=k(c),g=decodeURIComponent(P);let u;t[6]!==g?(u=O(g),t[6]=g,t[7]=u):u=t[7];const r=u;let m,o;if(t[8]!==r||t[9]!==f.tools){let i;t[12]!==r?(i=T=>T.name===r,t[12]=r,t[13]=i):i=t[13],o=f.tools.find(i),m=o?._meta?Y(o._meta):void 0,t[8]=r,t[9]=f.tools,t[10]=m,t[11]=o}else m=t[10],o=t[11];const d=m;if(!o||!d){let i;return t[14]!==r?(i=N.jsx("div",{className:"flex items-center justify-center h-full w-full",children:N.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',r,'" not found or has no UI']})}),t[14]=r,t[15]=i):i=t[15],i}let l;return t[16]!==e||t[17]!==a||t[18]!==s||t[19]!==n.id||t[20]!==d||t[21]!==o?(l=N.jsx(K,{client:a,resourceURI:d,tool:o,connectionId:s,orgId:n.id,args:e}),t[16]=e,t[17]=a,t[18]=s,t[19]=n.id,t[20]=d,t[21]=o,t[22]=l):l=t[22],l}export{Wt as AppViewContent};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-B2U_9fgO.js","assets/index-k8njt3_A.js","assets/index-CpHJcJk3.css","assets/ArrowNarrowLeft-Dz0P9WNF.js","assets/CheckCircle-DTCxFilU.js","assets/Container-BioZd28q.js","assets/Settings02-D1Jfvo1d.js","assets/XCircle-CjR4LC4r.js","assets/constants-Df56C9B1.js","assets/useInfiniteQuery-BJ1I2JSf.js","assets/infiniteQueryObserver-IG8f9wWg.js","assets/badge-C-R5WeFR.js","assets/input-DrFzs1Yw.js","assets/dropdown-menu-CD1YJIi0.js","assets/Check-CUpq9BBu.js","assets/ChevronRight-DwbV0YDZ.js","assets/DotsVertical-D8wcDPCU.js","assets/table-wHPRdxYv.js","assets/toggle-group-C_B32Tm8.js","assets/use-view-mode-CZXZPLm6.js","assets/tooltip-B26xbtws.js","assets/SearchMd-JqX1mLMq.js","assets/dialog-HqMwvS0c.js","assets/X-CdXDgTcN.js","assets/AlertCircle-B72APkrz.js","assets/alert-dialog-B-P8jHly.js","assets/card-BWjsP1pO.js","assets/Trash01-B8-uqWxa.js","assets/label-0J4Z8Ji8.js","assets/select-B3lWwv9y.js","assets/ChevronDown-D5WF5tyi.js","assets/ChevronUp-CDMPc0ql.js","assets/switch-YLfAn92x.js","assets/textarea-BJZt5-vN.js","assets/RefreshCcw01-CdP9yH0w.js","assets/checkbox-DRyB8BVf.js","assets/LinkExternal01-CKpEz_fF.js","assets/use-copy-DpxSUjqd.js","assets/Plus-DNkjVBwq.js","assets/Play-DRCdZRLW.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{e as a,j as t,r,l as i,_ as o}from"./index-k8njt3_A.js";const n=r.lazy(()=>o(()=>import("./registry-layout-B2U_9fgO.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39])));function c(){const s=a.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(r.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(i,{size:20,className:"animate-spin text-muted-foreground"})}),children:t.jsx(n,{})}),s[0]=e):e=s[0],e}export{c as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as Y,s as ie,n as Ie,o as ke,a as je,x as V,r as P,j as t,B as G,l as Le,c as Z,G as Fs,F as Bs}from"./index
|
|
1
|
+
import{e as Y,s as ie,n as Ie,o as ke,a as je,x as V,r as P,j as t,B as G,l as Le,c as Z,G as Fs,F as Bs}from"./index-k8njt3_A.js";import{i as Qs}from"./ArrowNarrowLeft-Dz0P9WNF.js";import{i as qe}from"./CheckCircle-DTCxFilU.js";import{n as Vs}from"./Container-BioZd28q.js";import{a as Gs}from"./Settings02-D1Jfvo1d.js";import{b as Jt,n as Ks,a as ds,f as Zt,g as Ys,h as us,d as Hs,e as Ws,i as Js,c as St,t as Zs,j as Xs}from"./XCircle-CjR4LC4r.js";import{S as ce,u as oe,d as er}from"./constants-Df56C9B1.js";import{u as ms}from"./useInfiniteQuery-BJ1I2JSf.js";import{B as q}from"./badge-C-R5WeFR.js";import{I as ae}from"./input-DrFzs1Yw.js";import{a as dt,c as Ce,D as ut,b as mt,j as Xt,k as es,i as tr}from"./dropdown-menu-CD1YJIi0.js";import{c as Mt,d as Et,a as Fe,e as ue,b as Dt,T as me}from"./table-wHPRdxYv.js";import{T as sr,a as ts}from"./toggle-group-C_B32Tm8.js";import{u as rr}from"./use-view-mode-CZXZPLm6.js";import{i as At}from"./DotsVertical-D8wcDPCU.js";import{i as nr,a as ir}from"./SearchMd-JqX1mLMq.js";import{c as xt,d as ht,e as pt,D as ft,a as gt,b as jt}from"./dialog-HqMwvS0c.js";import{i as Ke}from"./AlertCircle-B72APkrz.js";import{c as Ye,b as He,d as We,f as Je,g as Ze,e as Xe,a as et,A as tt}from"./alert-dialog-B-P8jHly.js";import{C as ne}from"./card-BWjsP1pO.js";import{s as st}from"./Trash01-B8-uqWxa.js";import{L as X}from"./label-0J4Z8Ji8.js";import{S as lr,a as ar,b as or,c as cr,d as Rt}from"./select-B3lWwv9y.js";import{S as Oe}from"./switch-YLfAn92x.js";import{T as vt}from"./textarea-BJZt5-vN.js";import{a as $t,c as dr,i as ur,s as xs,b as mr}from"./RefreshCcw01-CdP9yH0w.js";import{i as xr}from"./X-CdXDgTcN.js";import{t as hr}from"./ChevronDown-D5WF5tyi.js";import{n as pr}from"./ChevronUp-CDMPc0ql.js";import{C as ss}from"./checkbox-DRyB8BVf.js";import{n as fr}from"./LinkExternal01-CKpEz_fF.js";import{u as Tt}from"./use-copy-DpxSUjqd.js";import{i as It}from"./Check-CUpq9BBu.js";import{s as gr}from"./Plus-DNkjVBwq.js";import{a as jr,b as vr,T as br}from"./tooltip-B26xbtws.js";import{i as yr}from"./Play-DRCdZRLW.js";import"./infiniteQueryObserver-IG8f9wWg.js";import"./ChevronRight-DwbV0YDZ.js";const $e="private-registry",Nr=`
|
|
2
2
|
You are an MCP tool tester running automated integration checks.
|
|
3
3
|
|
|
4
4
|
Goal:
|
package/dist/client/assets/{required-auth-layout-BnqlPeG9.js → required-auth-layout-PH0-_blQ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as c,j as i,A as a,S as u,h,k as f,U as m,N as x}from"./index
|
|
1
|
+
import{e as c,j as i,A as a,S as u,h,k as f,U as m,N as x}from"./index-k8njt3_A.js";function g(){const t=c.c(5),s=m().location.href;let r;t[0]!==s?(r=s==="/login"||s.startsWith("/login?"),t[0]=s,t[1]=r):r=t[1];const n=r;let o;if(t[2]!==s||t[3]!==n){const l=n?{}:{next:s};o=i.jsx(x,{to:"/login",search:l,replace:!0}),t[2]=s,t[3]=n,t[4]=o}else o=t[4];return o}function d(t){const e=c.c(6),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(a,{children:i.jsx(u,{})}),e[0]=r):r=e[0];let n;e[1]!==s?(n=i.jsx(h,{children:s}),e[1]=s,e[2]=n):n=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(f,{children:i.jsx(g,{})}),e[3]=o):o=e[3];let l;return e[4]!==n?(l=i.jsxs(i.Fragment,{children:[r,n,o]}),e[4]=n,e[5]=l):l=e[5],l}export{d as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as q,d as Y,f as A,r as B,a as G,j as s,B as z,b as K}from"./index
|
|
1
|
+
import{e as q,d as Y,f as A,r as B,a as G,j as s,B as z,b as K}from"./index-k8njt3_A.js";import{I as L}from"./input-DrFzs1Yw.js";function H(){const e=q.c(45);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/reset-password"},e[0]=n):n=e[0];const{token:r,error:h}=Y(n),a=A(),[o,D]=B.useState(""),[l,M]=B.useState(""),[t,T]=B.useState(!1),i=h==="INVALID_TOKEN";let j;e[1]===Symbol.for("react.memo_cache_sentinel")?(j={mutationFn:O,onSuccess:()=>{T(!0)}},e[1]=j):j=e[1];const w=G(j),v=o===l,c=o.length>=8&&l.length>=8&&v,d=w.isPending,N=w.error;let y;e[2]!==c||e[3]!==o||e[4]!==w||e[5]!==r?(y=b=>{b.preventDefault(),!(!r||!c)&&w.mutate({newPassword:o,token:r})},e[2]=c,e[3]=o,e[4]=w,e[5]=r,e[6]=y):y=e[6];const F=y;let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--primary-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e[7]=k):k=e[7];let S,_,P,C;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),_=s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),P=s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),C=s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),e[8]=S,e[9]=_,e[10]=P,e[11]=C):(S=e[8],_=e[9],P=e[10],C=e[11]);let E;e[12]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("div",{className:"flex justify-center",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e[12]=E):E=e[12];const I=t?"Password reset successful":"Set a new password";let m;e[13]!==I?(m=s.jsx("div",{className:"text-center space-y-1",children:s.jsx("p",{className:"text-sm text-foreground/70",children:I})}),e[13]=I,e[14]=m):m=e[14];let u;e[15]!==i||e[16]!==a||e[17]!==t||e[18]!==r?(u=(i||!r&&!t)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:"This reset link is invalid or has expired."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Back to login"})]}),e[15]=i,e[16]=a,e[17]=t,e[18]=r,e[19]=u):u=e[19];let x;e[20]!==N?(x=N&&s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:N.message||"Failed to reset password. Please try again."}),e[20]=N,e[21]=x):x=e[21];let f;e[22]!==a||e[23]!==t?(f=t&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Your password has been reset. You can now sign in with your new password."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Go to login"})]}),e[22]=a,e[23]=t,e[24]=f):f=e[24];let g;e[25]!==c||e[26]!==l||e[27]!==F||e[28]!==i||e[29]!==d||e[30]!==o||e[31]!==v||e[32]!==t||e[33]!==r?(g=r&&!i&&!t&&s.jsxs("form",{onSubmit:F,className:"grid gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"New password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:o,onChange:b=>D(b.target.value),required:!0,minLength:8,disabled:d})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Confirm password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:l,onChange:b=>M(b.target.value),required:!0,minLength:8,disabled:d}),l&&!v&&s.jsx("p",{className:"text-xs text-destructive mt-1.5",children:"Passwords do not match"})]}),s.jsx(z,{type:"submit",disabled:d||!c,className:"w-full font-semibold",size:"lg",children:d?"Resetting...":"Reset password"})]}),e[25]=c,e[26]=l,e[27]=F,e[28]=i,e[29]=d,e[30]=o,e[31]=v,e[32]=t,e[33]=r,e[34]=g):g=e[34];let p;e[35]!==a||e[36]!==t?(p=!t&&s.jsx("div",{className:"text-center",children:s.jsx(z,{type:"button",variant:"link",onClick:()=>a({to:"/login"}),className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"})}),e[35]=a,e[36]=t,e[37]=p):p=e[37];let R;return e[38]!==m||e[39]!==u||e[40]!==x||e[41]!==f||e[42]!==g||e[43]!==p?(R=s.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-primary to-primary/75 p-4",children:[k,s.jsxs("div",{className:"relative z-10",children:[S,_,P,C,s.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[E,m,u,x,f,g,p]})]})]}),e[38]=m,e[39]=u,e[40]=x,e[41]=f,e[42]=g,e[43]=p,e[44]=R):R=e[44],R}async function O(e){const{newPassword:n,token:r}=e,h=await K.resetPassword({newPassword:n,token:r});if(h.error)throw new Error(h.error.message||"Failed to reset password");return h}export{H as default};
|