decocms 4.150.21 → 4.150.22
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-BaA3X0Vc.js → AlertCircle-BHNP9rUU.js} +1 -1
- package/dist/client/assets/{AreaChart-B4pcuH23.js → AreaChart-Dix8LhoJ.js} +1 -1
- package/dist/client/assets/{ArrowUp-Df4rbgne.js → ArrowUp-CYmWic6A.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-fq20wgvL.js → ArrowUpRight-BQZOilTG.js} +1 -1
- package/dist/client/assets/{Check-DdyKCl8O.js → Check-D3kjZMFv.js} +1 -1
- package/dist/client/assets/{CheckCircle-IiUO6eKZ.js → CheckCircle-myRIyunA.js} +1 -1
- package/dist/client/assets/{ChevronDown-BSVV4L9A.js → ChevronDown-Dn2piZ2G.js} +1 -1
- package/dist/client/assets/{ChevronRight-CSgj0z6i.js → ChevronRight-CwImj32A.js} +1 -1
- package/dist/client/assets/{ChevronUp-GR0-Yt4d.js → ChevronUp-N9Uneycs.js} +1 -1
- package/dist/client/assets/{Copy01-Cv0Vuqbe.js → Copy01-CFdaASyO.js} +1 -1
- package/dist/client/assets/{CpuChip01-UMJdnf1a.js → CpuChip01-W_PpJOQC.js} +1 -1
- package/dist/client/assets/{DotsVertical-OBlENp_a.js → DotsVertical-CrKPB-rb.js} +1 -1
- package/dist/client/assets/{Eye-CkjEvMwH.js → Eye-DJcOc9Zw.js} +1 -1
- package/dist/client/assets/{FilterLines-Ca7W3tHb.js → FilterLines-BFYjIaR9.js} +1 -1
- package/dist/client/assets/{HardDrive-B91rzidb.js → HardDrive-B2_Ula85.js} +1 -1
- package/dist/client/assets/{Key01-DVGzNfoY.js → Key01-BU6DEShZ.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Ciug-ep8.js → LayoutLeft-YSlG5Bjd.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CbfqV87q.js → LinkExternal01-C6Bmw0m6.js} +1 -1
- package/dist/client/assets/{LogOut01-B0JVxGo4.js → LogOut01-Cc5p345m.js} +1 -1
- package/dist/client/assets/{Monitor01-CEdUOtdj.js → Monitor01-Car-ubqN.js} +1 -1
- package/dist/client/assets/{Palette-DgmLnO_l.js → Palette-iwM8hSr_.js} +1 -1
- package/dist/client/assets/{Play-DcSuTxiG.js → Play-BOQvMkTV.js} +1 -1
- package/dist/client/assets/{Plus-DUvbS-Yy.js → Plus-CPMXdWiF.js} +1 -1
- package/dist/client/assets/{SearchLg-CSWY8viA.js → SearchLg-Ccga3kHp.js} +1 -1
- package/dist/client/assets/{SearchMd-D0poZQV_.js → SearchMd-kaVQ2swy.js} +1 -1
- package/dist/client/assets/{Settings02-Sy5kNpSu.js → Settings02-D2WBE2j5.js} +1 -1
- package/dist/client/assets/{Shield01-Bcql6hT4.js → Shield01-BrHF2Qbg.js} +1 -1
- package/dist/client/assets/{Star01-2mO5G0Xw.js → Star01-CduFPScO.js} +1 -1
- package/dist/client/assets/{Stars01-DqIThrOc.js → Stars01-BpwKVOpQ.js} +1 -1
- package/dist/client/assets/{Stars02-cKtwD-F2.js → Stars02-C-JOVi71.js} +1 -1
- package/dist/client/assets/{Sun-DsnsEGXF.js → Sun-C2hxlxHa.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BwAs_KcG.js → SwitchHorizontal01-Cm3MVkwA.js} +1 -1
- package/dist/client/assets/{Tool01-D2fd-Mg5.js → Tool01-pHGWkh_u.js} +1 -1
- package/dist/client/assets/{Tool02-C17Y4pBP.js → Tool02-C5toOJ2s.js} +1 -1
- package/dist/client/assets/{Trash01-BiVOd2DS.js → Trash01-BT5A-gEY.js} +1 -1
- package/dist/client/assets/{TrendUp01-D1GkdBOV.js → TrendUp01-ByibXYAc.js} +1 -1
- package/dist/client/assets/{Upload01-k2Sn0RXQ.js → Upload01-wyU_c8og.js} +1 -1
- package/dist/client/assets/{User01-cC3unvvx.js → User01-BgOg9cVa.js} +1 -1
- package/dist/client/assets/{Users01-BdNSg6CC.js → Users01-CXIce8sr.js} +1 -1
- package/dist/client/assets/{Users03-CqyDxwt6.js → Users03-TIXCT7Lp.js} +1 -1
- package/dist/client/assets/{X-Baqkpp1k.js → X-CbfkAYzJ.js} +1 -1
- package/dist/client/assets/{XCircle-8Wd2-AR5.js → XCircle-DsHpzoj1.js} +1 -1
- package/dist/client/assets/{XClose-CBFLmbVP.js → XClose-Dg24hRTQ.js} +1 -1
- package/dist/client/assets/{Zap-C4qF8Cn-.js → Zap-CRace4eX.js} +1 -1
- package/dist/client/assets/{ZapSquare-BH7ie7zg.js → ZapSquare-Bz1NVv_t.js} +1 -1
- package/dist/client/assets/{access-gate-CxXZPkIw.js → access-gate-B8ke5V9B.js} +1 -1
- package/dist/client/assets/{add-section-modal-C7ktQCug.js → add-section-modal-R6NgXhJA.js} +1 -1
- package/dist/client/assets/{agent-icon-q4cV7U67.js → agent-icon-OqQTNFsC.js} +1 -1
- package/dist/client/assets/{agents-list-UZwnNOjT.js → agents-list-_5s5JeHd.js} +1 -1
- package/dist/client/assets/{ai-providers-Cput0kVL.js → ai-providers-D5nYmfZB.js} +1 -1
- package/dist/client/assets/{alert-DjeIAXMV.js → alert-BsZRUEM2.js} +1 -1
- package/dist/client/assets/{alert-dialog-DIwINRgW.js → alert-dialog-iPj1kFsb.js} +1 -1
- package/dist/client/assets/{app-editor-DdSH3pAD.js → app-editor-Cqg3A1oU.js} +1 -1
- package/dist/client/assets/{auth-FouChJbb.js → auth-CU9nh5v5.js} +1 -1
- package/dist/client/assets/{auth-catchall-6cph4qce.js → auth-catchall-BkoM7GHE.js} +1 -1
- package/dist/client/assets/{auth-entry-i0rNcujn.js → auth-entry-Cnd5Yyo4.js} +1 -1
- package/dist/client/assets/{auth-split-layout-3qPwGE8Z.js → auth-split-layout-DEObuTt5.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Dx2DT3YD.js → authenticate-and-persist-oauth-Y0eAm4-d.js} +1 -1
- package/dist/client/assets/{automation-list-row-Brn7k31U.js → automation-list-row-Bs0wFLr_.js} +1 -1
- package/dist/client/assets/{automation-runs-CP1cxXFo.js → automation-runs-D7N1vsav.js} +1 -1
- package/dist/client/assets/{automations-BlJndOBe.js → automations-CfIG5b76.js} +1 -1
- package/dist/client/assets/{avatar-Du8HEobV.js → avatar-npAOJTNv.js} +1 -1
- package/dist/client/assets/{badge-swCoKQnC.js → badge-B7QGFlT2.js} +1 -1
- package/dist/client/assets/{block-document-DiB0SOp5.js → block-document-Sh0V11uT.js} +1 -1
- package/dist/client/assets/{brand-context-C8l7XNKr.js → brand-context-OfFgyNNa.js} +1 -1
- package/dist/client/assets/{buckets-Bs0sTGAu.js → buckets-sL5kUY2t.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-DE5pUVzi.js → bulk-category-panel-DejEHEKu.js} +1 -1
- package/dist/client/assets/{calendar-BZcldUNV.js → calendar-BKP3pISc.js} +1 -1
- package/dist/client/assets/{capability-load-error-CqwI-nav.js → capability-load-error-sN01EV-h.js} +1 -1
- package/dist/client/assets/{card-9OUE6Bzl.js → card-C6G1ZbAT.js} +1 -1
- package/dist/client/assets/{category-editor-JK7DojfI.js → category-editor-Co38yZEY.js} +1 -1
- package/dist/client/assets/{chat-context-DYO1ODPB.js → chat-context-Bkf3Y_YW.js} +1 -1
- package/dist/client/assets/{checkbox-Dd_rqLvT.js → checkbox-B9JLC7kz.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CFsjKhGa.js → cli-auth-success-CsEIMeSH.js} +1 -1
- package/dist/client/assets/{collection-detail-D0rtc2gf.js → collection-detail-zqQkeNgt.js} +1 -1
- package/dist/client/assets/{collection-display-button-iD10GGdW.js → collection-display-button-CUXNxY_5.js} +1 -1
- package/dist/client/assets/{collection-search-5SFjfCC8.js → collection-search-Oul6UFfq.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-fW-dsmLE.js → collection-table-wrapper-CDNw08E3.js} +1 -1
- package/dist/client/assets/{collection-tabs-DnykrgWW.js → collection-tabs-DfUm6FcP.js} +1 -1
- package/dist/client/assets/{command-CDVbjOi5.js → command-CFi_nxAL.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CAOuADZ6.js → commerce-onboarding-D4pJOG7X.js} +1 -1
- package/dist/client/assets/{companions-core-6m5dy3es.js → companions-core-DBaOS2yz.js} +1 -1
- package/dist/client/assets/{connect-B_K53Vaa.js → connect-qY6nUUFn.js} +1 -1
- package/dist/client/assets/{connection-DhlrJlFw.js → connection-_j4DuEiI.js} +1 -1
- package/dist/client/assets/{connection-card-CzF-xjYn.js → connection-card-CuJ2QFEt.js} +1 -1
- package/dist/client/assets/{connection-detail-DmWTCewb.js → connection-detail-C52r4r_5.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DRviH-Au.js → connection-form-helpers-Bmw91fnM.js} +1 -1
- package/dist/client/assets/{connections-DGvaZBx3.js → connections-CMPdUO57.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-BXMXu1gQ.js → decopilot-sse-pool-CmuV2kHg.js} +1 -1
- package/dist/client/assets/{dialog-C82H2S70.js → dialog-K6gwa7A3.js} +1 -1
- package/dist/client/assets/{domain-settings-DPn_9rd3.js → domain-settings-BPhwVIl_.js} +1 -1
- package/dist/client/assets/{drawer-lnIGl-vb.js → drawer-B_XFR2lX.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CRGAwBji.js → dropdown-menu-DUU_gv0n.js} +1 -1
- package/dist/client/assets/{empty-state-BKzUesA7.js → empty-state-Cp0ZI-r6.js} +1 -1
- package/dist/client/assets/{extract-connection-data-B9TIJ0UC.js → extract-connection-data-2A6KAT-f.js} +1 -1
- package/dist/client/assets/{file-explorer-tNI79jXo.js → file-explorer-Ua7ytqbC.js} +1 -1
- package/dist/client/assets/{form-DAiRK0vx.js → form-CGaw2YpJ.js} +1 -1
- package/dist/client/assets/{general-CXtIEOrf.js → general-DUtn268r.js} +1 -1
- package/dist/client/assets/{github-repo-picker-DUNQ1oJW.js → github-repo-picker-DtakWI4J.js} +1 -1
- package/dist/client/assets/{hooks-Bom1QoTc.js → hooks-D6e52Y4T.js} +1 -1
- package/dist/client/assets/{index-Dv8k1EHh.js → index-BMkqNEv8.js} +1 -1
- package/dist/client/assets/{index-Df7LGqDK.js → index-BcaeODv9.js} +1 -1
- package/dist/client/assets/{index-Z4CG7jJp.js → index-BvRZaTt9.js} +1 -1
- package/dist/client/assets/{index-BDQ6Ogmu.js → index-CpUxmDng.js} +5 -5
- package/dist/client/assets/{index-oBYlsJ_o.js → index-DBLw6mkp.js} +1 -1
- package/dist/client/assets/{index-D7cNsGmf.js → index-DDsGzWAW.js} +3 -3
- package/dist/client/assets/{index-DK8HHLRp.js → index-DI6Brofo.js} +1 -1
- package/dist/client/assets/{index-2KxPRjw5.js → index-DqXmpRSX.js} +3 -3
- package/dist/client/assets/{index-C_5SQGG6.js → index-Dqep-uNC.js} +1 -1
- package/dist/client/assets/{index-B_kqSbsO.js → index-Dy8kFJxu.js} +1 -1
- package/dist/client/assets/{index-C-JAJ-o5.js → index-rTnRAZMH.js} +1 -1
- package/dist/client/assets/{index-redirect-Cj-NIgvU.js → index-redirect-6k6UhjHL.js} +1 -1
- package/dist/client/assets/{input-BAuCATqg.js → input-Bp56QPzT.js} +1 -1
- package/dist/client/assets/{integration-icon-DKBuU8Fr.js → integration-icon-MouDA4V6.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BiHY2r7m.js → invite-member-dialog-CiJy3P9w.js} +1 -1
- package/dist/client/assets/{label-onkw7wrh.js → label-CXwRlswr.js} +1 -1
- package/dist/client/assets/{layout-D8O9_Poo.js → layout-B3j_gVFj.js} +1 -1
- package/dist/client/assets/{login-B0j1yr6w.js → login-Hjf4Zeii.js} +1 -1
- package/dist/client/assets/{mcp-oauth-95IH3VKT.js → mcp-oauth-BHDSTwSV.js} +1 -1
- package/dist/client/assets/{members-Y7A-UiF5.js → members-D2Ea76Rg.js} +1 -1
- package/dist/client/assets/{monaco-editor-CSUtCvVX.js → monaco-editor-C9o8bufU.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Dcug_wR7.js → monitoring-stats-row-C9gp4i2P.js} +1 -1
- package/dist/client/assets/{multi-select-C68tqs9V.js → multi-select-Ch6zaVsE.js} +1 -1
- package/dist/client/assets/{oauth-callback-CqH1tIve.js → oauth-callback-PpJTQQhm.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-C0UAY-58.js → oauth-callback-ai-provider-BCj-mtF9.js} +1 -1
- package/dist/client/assets/{onboarding-2ZJYmqTH.js → onboarding-CLYVE1a0.js} +1 -1
- package/dist/client/assets/{org-layout-qZcaYBLo.js → org-layout-CYEy29Ts.js} +1 -1
- package/dist/client/assets/{organization-choice-CduZOMP9.js → organization-choice-CWdxGykt.js} +1 -1
- package/dist/client/assets/{orgs-DU0BEJAc.js → orgs-B_4i8FPt.js} +1 -1
- package/dist/client/assets/{page-seo-form-nxKDUI-6.js → page-seo-form-DpY_sul3.js} +1 -1
- package/dist/client/assets/{popover-x1qHvmwD.js → popover-CVg35MYX.js} +1 -1
- package/dist/client/assets/{post-editor-BhfI7Odx.js → post-editor-Bpp2OmpX.js} +1 -1
- package/dist/client/assets/{primitives-DITXbj-2.js → primitives-Br2UT5Vf.js} +1 -1
- package/dist/client/assets/{profile-Dl3k4wub.js → profile-6ivG90Z_.js} +1 -1
- package/dist/client/assets/project-app-view-B3f5qhaT.js +1 -0
- package/dist/client/assets/record-editor-B0thyxFw.js +1 -0
- package/dist/client/assets/{redirect-editor-BamLe0Vb.js → redirect-editor-BOSsbfNh.js} +1 -1
- package/dist/client/assets/{registry-layout-Cfgh3Q9S.js → registry-layout-48QA7RsV.js} +1 -1
- package/dist/client/assets/registry-wAhFzL5P.js +2 -0
- package/dist/client/assets/{reports-2omVoMUm.js → reports-gCTgU_9n.js} +1 -1
- package/dist/client/assets/{require-capability-B1pg4EtO.js → require-capability-CCuG3VBt.js} +1 -1
- package/dist/client/assets/{required-auth-layout-wB2bMMGI.js → required-auth-layout-BU1eh7Wn.js} +1 -1
- package/dist/client/assets/{reset-password-BmxFRY37.js → reset-password-b8TsB2X9.js} +1 -1
- package/dist/client/assets/{roles-ClU1umGx.js → roles-bUKS9vRr.js} +1 -1
- package/dist/client/assets/{search-input-DtCL1YcZ.js → search-input-B0jSz39p.js} +1 -1
- package/dist/client/assets/{secrets-B-dmTgLw.js → secrets-DBVJEtoI.js} +1 -1
- package/dist/client/assets/{sections-editor-DqY5dzLX.js → sections-editor-WmcIIpkR.js} +1 -1
- package/dist/client/assets/{select-DfQiZ-4J.js → select-Cb3tiSDw.js} +1 -1
- package/dist/client/assets/{select-model-Clf7Hlwn.js → select-model-Bl2KSVsJ.js} +1 -1
- package/dist/client/assets/{self-tool-result-BCgUr0ik.js → self-tool-result-qixGUHHp.js} +1 -1
- package/dist/client/assets/{seo-editor-CEUCMyKF.js → seo-editor-CUQXJ1Cd.js} +1 -1
- package/dist/client/assets/{settings-layout-DJLSOlbv.js → settings-layout-D-dv9Bvf.js} +1 -1
- package/dist/client/assets/{settings-section-BaFcIjo5.js → settings-section-awXbfRFI.js} +1 -1
- package/dist/client/assets/{shell-controls-DIMDYHkk.js → shell-controls-wrDqoZ9L.js} +1 -1
- package/dist/client/assets/{shell-layout-B56j-p5N.js → shell-layout-BX0EOEmo.js} +1 -1
- package/dist/client/assets/{sidebar-DpVJgBAa.js → sidebar-BiPc8cWL.js} +1 -1
- package/dist/client/assets/{skeleton-BtiEyhAl.js → skeleton-CT6LmWQk.js} +1 -1
- package/dist/client/assets/{spinner-DPfrt4Tp.js → spinner-5nEupkU1.js} +1 -1
- package/dist/client/assets/{sso-CICOFYfX.js → sso-BH0Yk1RU.js} +1 -1
- package/dist/client/assets/{store-BJgQ6scG.js → store-DwUNbOmZ.js} +1 -1
- package/dist/client/assets/store-registry-Ci03spyl.js +2 -0
- package/dist/client/assets/{studio-tools-CTJuN7Yy.js → studio-tools-DvotCHSX.js} +1 -1
- package/dist/client/assets/{switch-DIwoxI1y.js → switch-C4EXURzI.js} +1 -1
- package/dist/client/assets/{tab-id-DJIms9m1.js → tab-id-CCUuJuHg.js} +1 -1
- package/dist/client/assets/{table-BbRTH9fF.js → table-BrY2fIko.js} +1 -1
- package/dist/client/assets/{tabs-DKyQ4Qe1.js → tabs-o5z4F4nX.js} +1 -1
- package/dist/client/assets/{textarea-Y242n44c.js → textarea-KF0bc7ey.js} +1 -1
- package/dist/client/assets/{toggle-group-BBsmjOfV.js → toggle-group-ImSBP57j.js} +1 -1
- package/dist/client/assets/{toolbar-BaZp82JP.js → toolbar-HbcGIVfO.js} +1 -1
- package/dist/client/assets/{tooltip-CEu_we5y.js → tooltip-DJ0CJ4nu.js} +1 -1
- package/dist/client/assets/{use-ai-providers-B2nAOoUO.js → use-ai-providers-BlXZ8OS9.js} +1 -1
- package/dist/client/assets/{use-automations-irLGHKpI.js → use-automations-D97aWna-.js} +1 -1
- package/dist/client/assets/{use-autosave-BAjK3u8R.js → use-autosave-BuWdMqxb.js} +1 -1
- package/dist/client/assets/{use-capability-Y4a4cK2y.js → use-capability-DjWP4c_V.js} +1 -1
- package/dist/client/assets/{use-clock-tick-kQx_nmDK.js → use-clock-tick-D08rNiex.js} +1 -1
- package/dist/client/assets/{use-connection-CvBcj0iA.js → use-connection-CV5pilpz.js} +1 -1
- package/dist/client/assets/{use-copy-POYUhIaM.js → use-copy-D8Z2epUY.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Df8fpCi4.js → use-create-virtual-mcp-DYyiqJWf.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-EvVOUA6S.js → use-debounced-autosave-BYO2w-tQ.js} +1 -1
- package/dist/client/assets/{use-debounced-value-IOz7dnNR.js → use-debounced-value-Pwi9o0RN.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CBOWsaT-.js → use-deco-credits-DwGKxBj1.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Dc8-pFMU.js → use-decopilot-events-cGJArGLt.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CxX7cCR_.js → use-delete-connection-Cnp4lOk4.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-ucDRDdNR.js → use-deployment-admin-BGRYyg5T.js} +1 -1
- package/dist/client/assets/{use-file-configs-BsCj6gUu.js → use-file-configs-mdE9JcAP.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-ccrh4_KW.js → use-infinite-scroll-C92EJ-_j.js} +1 -1
- package/dist/client/assets/{use-join-requests-DjYbXyL8.js → use-join-requests-Da6i-it5.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-vzmxIRHi.js → use-mcp-auth-status-DJKtOtTD.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DRwUSZdO.js → use-mcp-client-DwJl6WIN.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-PCSBjtNq.js → use-mcp-tools-BDghoqz7.js} +1 -1
- package/dist/client/assets/{use-members-DjRi0Onl.js → use-members-Evj2zR-F.js} +1 -1
- package/dist/client/assets/{use-mobile-CLE626Yq.js → use-mobile-lAVE_tNN.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CXMG3HNZ.js → use-navigate-to-agent-CvMJ7nhQ.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BxtVWNiI.js → use-org-auth-client-DXsqXIB3.js} +1 -1
- package/dist/client/assets/{use-org-sso-DBExuOVV.js → use-org-sso-BWke9nQX.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DFLLP3Qo.js → use-organization-roles-C3KJEjHx.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DKSNQ1_z.js → use-organization-settings-D9dl8fjV.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BRZCHKHD.js → use-registry-connections-DyTDBh31.js} +1 -1
- package/dist/client/assets/{use-secrets-DfGoccAw.js → use-secrets-DxzABMbU.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DcgHuUFX.js → use-status-sounds-Nup_Tqx4.js} +1 -1
- package/dist/client/assets/{use-tags-DRM6xsgU.js → use-tags-CghR51-0.js} +1 -1
- package/dist/client/assets/{use-view-mode-DvgBYhz6.js → use-view-mode-C9K2zt6M.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-D7SVi-2E.js → use-virtual-mcp-Co2Gxa_g.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-W7NcHma4.js +1 -0
- package/dist/client/assets/{useQueries-DVb_HjzV.js → useQueries-DQT-5ztu.js} +1 -1
- package/dist/client/assets/{useRouterState-CJ97gzOK.js → useRouterState-CfpQuL30.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-r5q75ddS.js +1 -0
- package/dist/client/assets/{users-CX6W_kiO.js → users-B34XbaLL.js} +1 -1
- package/dist/client/assets/{variant-calendar-BSUlgs-W.js → variant-calendar-DtyO8s_C.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DULJqLEB.js → view-mode-toggle-Be9Tyce0.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +178 -177
- package/dist/server/migrate.js +7 -7
- package/dist/server/server.js +145 -145
- package/package.json +1 -1
- package/dist/client/assets/project-app-view-CrBgtatz.js +0 -1
- package/dist/client/assets/record-editor-DUGdKTe8.js +0 -1
- package/dist/client/assets/registry-B4ci0gM-.js +0 -2
- package/dist/client/assets/store-registry-Di0pCo7I.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BWd6o-wh.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DPyRMURT.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as B,D as ke,r as y,e as ae,p as $,j as t,m as j,B as pe,o as Be,n as $e,K as oe,c as ce,b as xe,S as Fe}from"./index-2KxPRjw5.js";import{I as X}from"./input-BAuCATqg.js";import{i as Ve}from"./use-is-desktop-app-BNujXJc_.js";import{S as Qe}from"./spinner-DPfrt4Tp.js";import{r as ze,R as He}from"./retry-CErkP7V6.js";const _e={submitEmailPassword:({mode:r,email:e,password:c,name:f})=>r==="sign_up"?B.signUp.email({email:e,password:c,name:f||""}):B.signIn.email({email:e,password:c}),requestPasswordReset:({email:r,redirectTo:e})=>B.requestPasswordReset({email:r,redirectTo:e}),sendOtp:({email:r})=>B.emailOtp.sendVerificationOtp({email:r,type:"sign-in"}),submitOtp:({email:r,otp:e})=>B.signIn.emailOtp({email:r,otp:e}),socialSignIn:({provider:r,callbackURL:e})=>B.signIn.social({provider:r,callbackURL:e}),ssoSignIn:({providerId:r,callbackURL:e})=>B.signIn.sso({providerId:r,callbackURL:e}),onAuthenticated:r=>{window.location.href=r}},le="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Ke={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:r=>`Code sent to ${r}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:r=>`Continue with ${r}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Ye({redirectUrl:r,callbackUrl:e="/",title:c,subtitle:f,brand:p,copy:m,variant:i="default",allowedSocialProviders:l,allowPassword:u=!0,onAuthEvent:I,actions:N}){const{emailAndPassword:A,resetPassword:v,emailOtp:E,socialProviders:h}=ke(),d={..._e,...N},g=s=>{try{I?.(s)}catch{}},P=i==="compact",Z=l?h.providers.filter(s=>l.includes(s.name)):h.providers,ee=h.enabled&&Z.length>0,me=A.enabled&&(u||!E.enabled&&!ee),x=h.enabled&&h.providers.length>0&&!ee&&!E.enabled&&!me?h.providers:Z,O=h.enabled&&x.length>0,F=A.enabled&&(u||!E.enabled&&!O),[b,M]=y.useState(""),[_,V]=y.useState(""),[a,S]=y.useState(""),[q,T]=y.useState(""),[L,ue]=y.useState(!1),[ge,Le]=y.useState(()=>E.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[k,Q]=y.useState(""),[be,ye]=y.useState(!1),[Oe,he]=y.useState(null),n={...Ke,...m},te=y.useId(),z=`${te}-email`,H=`${te}-email-error`,ve=`${te}-name`,we=`${te}-password`,Ee=`${te}-otp`,C=ge==="signUp",W=ge==="forgotPassword",R=ge==="emailOtp",se=ae({mutationFn:async({email:s,password:o,name:D})=>{try{const J=await d.submitEmailPassword({mode:C?"sign_up":"sign_in",email:s,password:o,name:D});if(J.error)throw new Error(J.error.message||(C?n.signUpFailed:n.signInFailed));return J}catch(J){throw J instanceof Error?J:new Error(n.authenticationFailed)}},onMutate:()=>{g({type:"started",method:"email_password",mode:C?"sign_up":"sign_in"})},onSuccess:()=>{g({type:"succeeded",method:"email_password",mode:C?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(r??e)},onError:s=>{g({type:"failed",method:"email_password",mode:C?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),$(C?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),ne=ae({mutationFn:async({email:s})=>{const o=await d.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(o.error)throw new Error(o.error.message||n.resetEmailFailed);return o},onSuccess:()=>{$("password_reset_requested"),ye(!0)},onError:s=>{$("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),K=ae({mutationFn:async({email:s})=>{const o=await d.sendOtp({email:s});if(o.error)throw new Error(o.error.message||n.otpSendFailed);return o},onMutate:()=>{g({type:"started",method:"email_otp"})},onSuccess:()=>{g({type:"otp_sent",method:"email_otp"}),$("email_otp_sent"),ue(!0)},onError:s=>{g({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),$("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),Y=ae({mutationFn:async({email:s,otp:o})=>{const D=await d.submitOtp({email:s,otp:o});if(D.error)throw new Error(D.error.message||n.invalidCode);return D},onMutate:()=>{g({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{g({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(r??e)},onError:s=>{g({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),$("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),ie=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),fe=()=>{b.trim()&&!ie(b)&&Q(n.invalidEmail)},Te=s=>{if(s.preventDefault(),!ie(b)){Q(n.invalidEmail),g({type:"failed",method:"email_password",mode:C?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}se.mutate({email:b,password:_,name:a})},Re=s=>{if(s.preventDefault(),!ie(b)){Q(n.invalidEmail);return}ne.mutate({email:b})},De=s=>{if(s.preventDefault(),!ie(b)){Q(n.invalidEmail),g({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}K.mutate({email:b})},Me=s=>{s.preventDefault(),Y.mutate({email:b,otp:q})},G=s=>o=>{s(o.target.value),Se&&se.reset(),je&&ne.reset(),Ne&&(K.reset(),Y.reset()),s===M&&k&&Q("")},re=s=>{Le(s),S(""),T(""),ue(!1),Q(""),ye(!1),he(null),se.reset(),ne.reset(),K.reset(),Y.reset()},w=se.isPending||ne.isPending||K.isPending||Y.isPending,Se=se.error,je=ne.error,Ne=K.error||Y.error,U=C?b.trim()&&_.trim()&&a.trim():W?b.trim():R?L?q.trim():b.trim():b.trim()&&_.trim(),qe=s=>{if(!s)return null;const o=s.message.toLowerCase();return o.includes("unauthorized")||o.includes("401")?n.invalidEmailOrPassword:o.includes("already exists")||o.includes("409")?n.accountExists:o.includes("network")||o.includes("fetch")?n.networkError:o.includes("rate limit")||o.includes("429")?n.tooManyAttempts:o.includes("invalid")&&o.includes("otp")?n.invalidOrExpiredCode:s.message||n.genericError},Pe=Se||je||Ne||Oe,We=async s=>{g({type:"started",method:"social",provider:s}),he(null);try{const o=await d.socialSignIn({provider:s,callbackURL:r??e});if(o.error)throw new Error(o.error.message||n.authenticationFailed)}catch(o){const D=o instanceof Error?o.message:String(o);g({type:"failed",method:"social",provider:s,stage:"redirect",error:D}),$("social_signin_failed",{provider:s,error:D}),he(o instanceof Error?o:new Error(D))}},Ue=W?n.resetPasswordTitle:R&&L?n.verificationCodeTitle:c??n.welcomeTitle,Ae=W?n.resetPasswordSubtitle:R&&L?n.codeSentTo(b):f===void 0?n.defaultSubtitle:f;return t.jsxs("div",{className:j("grid w-full",P?"gap-5":"gap-10"),children:[p??t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:j("font-medium",P?"text-xl leading-7":"text-2xl leading-8"),children:Ue}),Ae&&t.jsx("p",{className:j("text-muted-foreground",P?"text-sm leading-5":"text-base leading-6"),children:Ae})]}),Pe&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:qe(Pe)}),be&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:n.resetEmailSent}),!W&&!(R&&L)&&O&&t.jsx("div",{className:"grid gap-2",children:x.map(s=>t.jsxs("button",{type:"button",disabled:w,onClick:()=>{We(s.name)},className:j("flex w-full items-center justify-center gap-3 bg-background px-3 text-sm font-medium text-foreground card-shadow transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50",P?"h-11 rounded-lg":"h-12 rounded-xl"),children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:j("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),n.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!W&&!(R&&L)&&O&&(F||E.enabled)&&t.jsxs("div",{className:j("flex items-center gap-2.5",P?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:j("text-muted-foreground",P?"text-sm":"text-base"),children:n.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),R&&E.enabled&&t.jsx(t.Fragment,{children:L?t.jsxs("form",{onSubmit:Me,className:j("grid gap-2",P&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:Ee,className:j("text-sm font-medium text-foreground",P&&"sr-only"),children:n.verificationCodeLabel}),t.jsx(X,{id:Ee,type:"text",placeholder:n.enterCodePlaceholder,value:q,onChange:G(T),required:!0,disabled:w,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),t.jsx("button",{type:"submit",disabled:w||!U,className:j("flex items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:pointer-events-none disabled:opacity-50",P?"h-11 sm:w-auto":"h-12 w-full"),children:w?n.verifying:n.verify}),t.jsx("button",{type:"button",onClick:()=>{ue(!1),T(""),K.reset(),Y.reset()},disabled:w,className:j("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",P&&"sm:col-span-2"),children:n.useDifferentEmail})]}):t.jsxs("form",{onSubmit:De,className:j("grid gap-2",P&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:z,className:j("text-sm font-medium text-foreground",P&&"sr-only"),children:n.emailLabel}),t.jsx(X,{id:z,type:"email",placeholder:n.emailPlaceholder,value:b,onChange:G(M),onBlur:fe,required:!0,disabled:w,autoComplete:"email","aria-invalid":!!k,"aria-describedby":k?H:void 0,className:"h-11 rounded-lg"}),k&&t.jsx("p",{id:H,role:"alert",className:"text-xs text-destructive",children:k})]}),t.jsx("button",{type:"submit",disabled:w||!U,className:j("flex items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:pointer-events-none disabled:opacity-50",P?"h-11 sm:w-auto":"h-12 w-full"),children:w?n.sending:n.sendCode})]})}),W&&F&&!be&&t.jsxs("form",{onSubmit:Re,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:z,className:"block text-sm font-medium text-foreground mb-2",children:n.emailLabel}),t.jsx(X,{id:z,type:"email",placeholder:"you@example.com",value:b,onChange:G(M),onBlur:fe,required:!0,disabled:w,autoComplete:"email","aria-invalid":!!k,"aria-describedby":k?H:void 0,className:"h-11 rounded-lg"}),k&&t.jsx("p",{id:H,role:"alert",className:"text-xs text-destructive mt-1.5",children:k})]}),t.jsx(pe,{type:"submit",disabled:w||!U,className:"w-full font-semibold",size:"xl",children:w?n.sending:n.sendResetLink})]}),!W&&!R&&F&&t.jsxs("form",{onSubmit:Te,className:"grid gap-5",children:[C&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:ve,className:"block text-sm font-medium text-foreground mb-2",children:n.nameLabel}),t.jsx(X,{id:ve,type:"text",placeholder:n.namePlaceholder,value:a,onChange:G(S),required:!0,disabled:w,autoComplete:"name",className:"h-11 rounded-lg"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:z,className:"block text-sm font-medium text-foreground mb-2",children:n.emailLabel}),t.jsx(X,{id:z,type:"email",placeholder:"you@example.com",value:b,onChange:G(M),onBlur:fe,required:!0,disabled:w,autoComplete:"email","aria-invalid":!!k,"aria-describedby":k?H:void 0,className:"h-11 rounded-lg"}),k&&t.jsx("p",{id:H,role:"alert",className:"text-xs text-destructive mt-1.5",children:k})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:we,className:"block text-sm font-medium text-foreground",children:n.passwordLabel}),!C&&v.enabled&&t.jsx("button",{type:"button",onClick:()=>re("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:n.forgotPassword})]}),t.jsx(X,{id:we,type:"password",placeholder:"••••••••",value:_,onChange:G(V),required:!0,disabled:w,autoComplete:C?"new-password":"current-password",className:"h-11 rounded-lg"})]}),t.jsx("div",{className:j("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",U?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:j("p-1",!U&&"pointer-events-none"),children:t.jsx(pe,{type:"submit",disabled:w||!U,className:j("w-full font-semibold"),size:"xl","aria-hidden":!U,children:w?C?n.creatingAccount:n.signingIn:n.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:W?t.jsx("button",{type:"button",onClick:()=>re("signIn"),disabled:w,className:le,children:n.backToSignIn}):R&&F?t.jsx("button",{type:"button",onClick:()=>re("signIn"),disabled:w,className:le,children:n.signInWithPassword}):!R&&F?t.jsxs(t.Fragment,{children:[C?n.alreadyHaveAccount:n.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>re(C?"signIn":"signUp"),disabled:w,className:le,children:C?n.signIn:n.signUp}),E.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>re("emailOtp"),disabled:w,className:le,children:n.signInWithEmailCode})]})]}):null})]})}async function de(){throw new Error("Tauri bridge is unavailable outside the desktop build")}function Ge(){const r=Be(),e=Ve(),c=$e({queryKey:oe.desktopAuthStatus(),queryFn:async()=>(await de()).fetchAuthStatus(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0}),[f,p]=y.useState(!1),[m,i]=y.useState(null),[l,u]=y.useState(!1),[I,N]=y.useState(null);y.useEffect(()=>{},[e,r]);async function A(){p(!0),i(null);try{const d=await de();await d.performAuthLogin();const g=await d.fetchAuthStatus();r.setQueryData(oe.desktopAuthStatus(),g)}catch(d){i(d instanceof Error?d.message:"Sign-in failed")}finally{p(!1)}}async function v(){p(!0);try{const d=await de();await d.performAuthLogout();const g=await d.fetchAuthStatus();r.setQueryData(oe.desktopAuthStatus(),g)}finally{p(!1)}}async function E(){u(!0),N(null);let d;try{d=await de()}catch(g){N(g instanceof Error?g.message:"Sign-in failed"),u(!1);return}try{await d.performAuthCompleteSession()}catch(g){N(g instanceof Error?g.message:"Sign-in failed")}finally{try{const g=await d.fetchAuthStatus();r.setQueryData(oe.desktopAuthStatus(),g)}finally{u(!1)}}}async function h(){await c.refetch()}return{status:c.data,isChecking:c.isLoading,isRetryingStatus:c.isFetching,isPending:f,loginError:m,login:A,logout:v,isCompletingSession:l,completeSessionError:I,completeSession:E,retryStatus:h}}function Je(r){return!(r.emailAndPassword.enabled||r.emailOtp.enabled||r.socialProviders.enabled)&&!r.sso.enabled&&r.magicLink.enabled}function Xe(){return ce.c(10),Ge(),null}function Ze(r){const e=ce.c(25),{onContinue:c,isPending:f,error:p}=r,m=xe();let i;e[0]!==m?(i=m("common.authEntry.browserOnlyTitle"),e[0]=m,e[1]=i):i=e[1];let l;e[2]!==i?(l=t.jsx("h1",{className:"text-lg font-medium text-foreground",children:i}),e[2]=i,e[3]=l):l=e[3];let u;e[4]!==m?(u=m("common.authEntry.browserOnlyDescription"),e[4]=m,e[5]=u):u=e[5];let I;e[6]!==u?(I=t.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:u}),e[6]=u,e[7]=I):I=e[7];let N;e[8]!==l||e[9]!==I?(N=t.jsxs("div",{className:"flex flex-col gap-1",children:[l,I]}),e[8]=l,e[9]=I,e[10]=N):N=e[10];let A;e[11]!==c?(A=()=>{c()},e[11]=c,e[12]=A):A=e[12];let v;e[13]!==m?(v=m("common.authEntry.browserOnlyCta"),e[13]=m,e[14]=v):v=e[14];let E;e[15]!==f||e[16]!==A||e[17]!==v?(E=t.jsx(pe,{onClick:A,disabled:f,children:v}),e[15]=f,e[16]=A,e[17]=v,e[18]=E):E=e[18];let h;e[19]!==p?(h=p&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:p}),e[19]=p,e[20]=h):h=e[20];let d;return e[21]!==N||e[22]!==E||e[23]!==h?(d=t.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[N,E,h]}),e[21]=N,e[22]=E,e[23]=h,e[24]=d):d=e[24],d}function Ce(r){const e=ce.c(8),{label:c,error:f}=r;let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(Qe,{size:"lg"}),e[0]=p):p=e[0];let m;e[1]!==c?(m=c&&t.jsx("p",{className:"text-sm text-muted-foreground",children:c}),e[1]=c,e[2]=m):m=e[2];let i;e[3]!==f?(i=f&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:f}),e[3]=f,e[4]=i):i=e[4];let l;return e[5]!==m||e[6]!==i?(l=t.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[p,m,i]}),e[5]=m,e[6]=i,e[7]=l):l=e[7],l}class Ie{constructor(e){this.response=e}response}function et(r){return r.startsWith("/")&&!r.startsWith("//")?r:"/"}function tt({redirectTo:r,onAuthEvent:e}){const c=xe(),[f,p]=y.useState(null),m=y.useEffectEvent(i=>{try{e?.(i)}catch{}});return y.useEffect(()=>{let i=!1;return(async()=>{m({type:"started",method:"local"});try{let l;try{l=await ze(async()=>{const u=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(u.status>=500)throw new Ie(u);return u},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(u){if(u instanceof He&&u.cause instanceof Ie)l=u.cause.response;else throw u}if(!l.ok){const u=await l.json().catch(()=>({}));throw new Error(u?.error||c("common.authEntry.autoLoginFailed"))}i||(m({type:"succeeded",method:"local"}),window.location.href=et(r))}catch(l){i||(m({type:"failed",method:"local",stage:"authenticate",error:l instanceof Error?l.message:String(l)}),p(l instanceof Error?l.message:c("common.authEntry.autoLoginFailed")))}})(),()=>{i=!0}},[r]),f?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:c("common.authEntry.autoLoginFailedWithError",{error:f})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:c("common.authEntry.tryRestartingServer")})]})}):t.jsx(Fe,{})}function st({callbackURL:r,providerId:e,ssoSignIn:c,onAuthEvent:f}){const p=y.useEffectEvent(i=>{try{f?.(i)}catch{}}),m=y.useEffectEvent(c);return y.useEffect(()=>{(async()=>{p({type:"started",method:"sso",provider:e});try{const i=await m({providerId:e,callbackURL:r});if(i.error)throw new Error(i.error.message||"SSO redirect failed")}catch(i){p({type:"failed",method:"sso",provider:e,stage:"redirect",error:i instanceof Error?i.message:String(i)})}})()},[e,r]),t.jsx(Fe,{})}function lt(r){const e=ce.c(45),{callbackUrl:c,redirectUrl:f,allowAutoLogin:p,title:m,subtitle:i,brand:l,copy:u,variant:I,allowedSocialProviders:N,allowPassword:A,onAuthEvent:v}=r,E=p===void 0?!0:p,h=xe(),{sso:d,emailAndPassword:g,magicLink:P,emailOtp:Z,socialProviders:ee,localMode:me}=ke(),x=Xe(),O=f||c,F=x?.actions;let b;e[0]!==F?(b={..._e,...F},e[0]=F,e[1]=b):b=e[1];const M=b;if(x?.isPending){let a;e[2]!==h?(a=h("common.authEntry.finishSignInInBrowser"),e[2]=h,e[3]=a):a=e[3];let S;return e[4]!==x.loginError||e[5]!==a?(S=t.jsx(Ce,{label:a,error:x.loginError}),e[4]=x.loginError,e[5]=a,e[6]=S):S=e[6],S}if(x?.isCompletingSession){let a;e[7]!==h?(a=h("common.authEntry.finishingSignIn"),e[7]=h,e[8]=a):a=e[8];let S;return e[9]!==x.completeSessionError||e[10]!==a?(S=t.jsx(Ce,{label:a,error:x.completeSessionError}),e[9]=x.completeSessionError,e[10]=a,e[11]=S):S=e[11],S}if(me&&E){let a;return e[12]!==v||e[13]!==O?(a=t.jsx(tt,{redirectTo:O,onAuthEvent:v}),e[12]=v,e[13]=O,e[14]=a):a=e[14],a}if(d.enabled){let a;return e[15]!==v||e[16]!==O||e[17]!==M.ssoSignIn||e[18]!==d.providerId?(a=t.jsx(st,{callbackURL:O,providerId:d.providerId,ssoSignIn:M.ssoSignIn,onAuthEvent:v}),e[15]=v,e[16]=O,e[17]=M.ssoSignIn,e[18]=d.providerId,e[19]=a):a=e[19],a}if(x&&Je({emailAndPassword:g,emailOtp:Z,socialProviders:ee,magicLink:P,sso:d})){let a;return e[20]!==x.isPending||e[21]!==x.login||e[22]!==x.loginError?(a=t.jsx(Ze,{onContinue:x.login,isPending:x.isPending,error:x.loginError}),e[20]=x.isPending,e[21]=x.login,e[22]=x.loginError,e[23]=a):a=e[23],a}if(g.enabled||P.enabled||Z.enabled||ee.enabled){const a=x?.loginError??x?.completeSessionError??null;let S;e[24]!==A||e[25]!==N||e[26]!==l||e[27]!==c||e[28]!==u||e[29]!==v||e[30]!==F||e[31]!==f||e[32]!==i||e[33]!==m||e[34]!==I?(S=t.jsx(Ye,{redirectUrl:f,callbackUrl:c,title:m,subtitle:i,brand:l,copy:u,variant:I,allowedSocialProviders:N,allowPassword:A,onAuthEvent:v,actions:F}),e[24]=A,e[25]=N,e[26]=l,e[27]=c,e[28]=u,e[29]=v,e[30]=F,e[31]=f,e[32]=i,e[33]=m,e[34]=I,e[35]=S):S=e[35];const q=S;if(!a)return q;let T;e[36]!==a?(T=t.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:a}),e[36]=a,e[37]=T):T=e[37];let L;return e[38]!==q||e[39]!==T?(L=t.jsxs("div",{className:"grid gap-4",children:[T,q]}),e[38]=q,e[39]=T,e[40]=L):L=e[40],L}let _;e[41]!==h?(_=h("common.authEntry.noLoginOptions"),e[41]=h,e[42]=_):_=e[42];let V;return e[43]!==_?(V=t.jsx("div",{children:_}),e[43]=_,e[44]=V):V=e[44],V}export{lt as A,Ge as u};
|
|
1
|
+
import{a as B,D as ke,r as y,e as ae,p as $,j as t,m as j,B as pe,o as Be,n as $e,K as oe,c as ce,b as xe,S as Fe}from"./index-DqXmpRSX.js";import{I as X}from"./input-Bp56QPzT.js";import{i as Ve}from"./use-is-desktop-app-BNujXJc_.js";import{S as Qe}from"./spinner-5nEupkU1.js";import{r as ze,R as He}from"./retry-CErkP7V6.js";const _e={submitEmailPassword:({mode:r,email:e,password:c,name:f})=>r==="sign_up"?B.signUp.email({email:e,password:c,name:f||""}):B.signIn.email({email:e,password:c}),requestPasswordReset:({email:r,redirectTo:e})=>B.requestPasswordReset({email:r,redirectTo:e}),sendOtp:({email:r})=>B.emailOtp.sendVerificationOtp({email:r,type:"sign-in"}),submitOtp:({email:r,otp:e})=>B.signIn.emailOtp({email:r,otp:e}),socialSignIn:({provider:r,callbackURL:e})=>B.signIn.social({provider:r,callbackURL:e}),ssoSignIn:({providerId:r,callbackURL:e})=>B.signIn.sso({providerId:r,callbackURL:e}),onAuthenticated:r=>{window.location.href=r}},le="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Ke={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:r=>`Code sent to ${r}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:r=>`Continue with ${r}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Ye({redirectUrl:r,callbackUrl:e="/",title:c,subtitle:f,brand:p,copy:m,variant:i="default",allowedSocialProviders:l,allowPassword:u=!0,onAuthEvent:I,actions:N}){const{emailAndPassword:A,resetPassword:v,emailOtp:E,socialProviders:h}=ke(),d={..._e,...N},g=s=>{try{I?.(s)}catch{}},P=i==="compact",Z=l?h.providers.filter(s=>l.includes(s.name)):h.providers,ee=h.enabled&&Z.length>0,me=A.enabled&&(u||!E.enabled&&!ee),x=h.enabled&&h.providers.length>0&&!ee&&!E.enabled&&!me?h.providers:Z,O=h.enabled&&x.length>0,F=A.enabled&&(u||!E.enabled&&!O),[b,M]=y.useState(""),[_,V]=y.useState(""),[a,S]=y.useState(""),[q,T]=y.useState(""),[L,ue]=y.useState(!1),[ge,Le]=y.useState(()=>E.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[k,Q]=y.useState(""),[be,ye]=y.useState(!1),[Oe,he]=y.useState(null),n={...Ke,...m},te=y.useId(),z=`${te}-email`,H=`${te}-email-error`,ve=`${te}-name`,we=`${te}-password`,Ee=`${te}-otp`,C=ge==="signUp",W=ge==="forgotPassword",R=ge==="emailOtp",se=ae({mutationFn:async({email:s,password:o,name:D})=>{try{const J=await d.submitEmailPassword({mode:C?"sign_up":"sign_in",email:s,password:o,name:D});if(J.error)throw new Error(J.error.message||(C?n.signUpFailed:n.signInFailed));return J}catch(J){throw J instanceof Error?J:new Error(n.authenticationFailed)}},onMutate:()=>{g({type:"started",method:"email_password",mode:C?"sign_up":"sign_in"})},onSuccess:()=>{g({type:"succeeded",method:"email_password",mode:C?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(r??e)},onError:s=>{g({type:"failed",method:"email_password",mode:C?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),$(C?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),ne=ae({mutationFn:async({email:s})=>{const o=await d.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(o.error)throw new Error(o.error.message||n.resetEmailFailed);return o},onSuccess:()=>{$("password_reset_requested"),ye(!0)},onError:s=>{$("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),K=ae({mutationFn:async({email:s})=>{const o=await d.sendOtp({email:s});if(o.error)throw new Error(o.error.message||n.otpSendFailed);return o},onMutate:()=>{g({type:"started",method:"email_otp"})},onSuccess:()=>{g({type:"otp_sent",method:"email_otp"}),$("email_otp_sent"),ue(!0)},onError:s=>{g({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),$("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),Y=ae({mutationFn:async({email:s,otp:o})=>{const D=await d.submitOtp({email:s,otp:o});if(D.error)throw new Error(D.error.message||n.invalidCode);return D},onMutate:()=>{g({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{g({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(r??e)},onError:s=>{g({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),$("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),ie=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),fe=()=>{b.trim()&&!ie(b)&&Q(n.invalidEmail)},Te=s=>{if(s.preventDefault(),!ie(b)){Q(n.invalidEmail),g({type:"failed",method:"email_password",mode:C?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}se.mutate({email:b,password:_,name:a})},Re=s=>{if(s.preventDefault(),!ie(b)){Q(n.invalidEmail);return}ne.mutate({email:b})},De=s=>{if(s.preventDefault(),!ie(b)){Q(n.invalidEmail),g({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}K.mutate({email:b})},Me=s=>{s.preventDefault(),Y.mutate({email:b,otp:q})},G=s=>o=>{s(o.target.value),Se&&se.reset(),je&&ne.reset(),Ne&&(K.reset(),Y.reset()),s===M&&k&&Q("")},re=s=>{Le(s),S(""),T(""),ue(!1),Q(""),ye(!1),he(null),se.reset(),ne.reset(),K.reset(),Y.reset()},w=se.isPending||ne.isPending||K.isPending||Y.isPending,Se=se.error,je=ne.error,Ne=K.error||Y.error,U=C?b.trim()&&_.trim()&&a.trim():W?b.trim():R?L?q.trim():b.trim():b.trim()&&_.trim(),qe=s=>{if(!s)return null;const o=s.message.toLowerCase();return o.includes("unauthorized")||o.includes("401")?n.invalidEmailOrPassword:o.includes("already exists")||o.includes("409")?n.accountExists:o.includes("network")||o.includes("fetch")?n.networkError:o.includes("rate limit")||o.includes("429")?n.tooManyAttempts:o.includes("invalid")&&o.includes("otp")?n.invalidOrExpiredCode:s.message||n.genericError},Pe=Se||je||Ne||Oe,We=async s=>{g({type:"started",method:"social",provider:s}),he(null);try{const o=await d.socialSignIn({provider:s,callbackURL:r??e});if(o.error)throw new Error(o.error.message||n.authenticationFailed)}catch(o){const D=o instanceof Error?o.message:String(o);g({type:"failed",method:"social",provider:s,stage:"redirect",error:D}),$("social_signin_failed",{provider:s,error:D}),he(o instanceof Error?o:new Error(D))}},Ue=W?n.resetPasswordTitle:R&&L?n.verificationCodeTitle:c??n.welcomeTitle,Ae=W?n.resetPasswordSubtitle:R&&L?n.codeSentTo(b):f===void 0?n.defaultSubtitle:f;return t.jsxs("div",{className:j("grid w-full",P?"gap-5":"gap-10"),children:[p??t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:j("font-medium",P?"text-xl leading-7":"text-2xl leading-8"),children:Ue}),Ae&&t.jsx("p",{className:j("text-muted-foreground",P?"text-sm leading-5":"text-base leading-6"),children:Ae})]}),Pe&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:qe(Pe)}),be&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:n.resetEmailSent}),!W&&!(R&&L)&&O&&t.jsx("div",{className:"grid gap-2",children:x.map(s=>t.jsxs("button",{type:"button",disabled:w,onClick:()=>{We(s.name)},className:j("flex w-full items-center justify-center gap-3 bg-background px-3 text-sm font-medium text-foreground card-shadow transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50",P?"h-11 rounded-lg":"h-12 rounded-xl"),children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:j("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),n.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!W&&!(R&&L)&&O&&(F||E.enabled)&&t.jsxs("div",{className:j("flex items-center gap-2.5",P?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:j("text-muted-foreground",P?"text-sm":"text-base"),children:n.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),R&&E.enabled&&t.jsx(t.Fragment,{children:L?t.jsxs("form",{onSubmit:Me,className:j("grid gap-2",P&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:Ee,className:j("text-sm font-medium text-foreground",P&&"sr-only"),children:n.verificationCodeLabel}),t.jsx(X,{id:Ee,type:"text",placeholder:n.enterCodePlaceholder,value:q,onChange:G(T),required:!0,disabled:w,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),t.jsx("button",{type:"submit",disabled:w||!U,className:j("flex items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:pointer-events-none disabled:opacity-50",P?"h-11 sm:w-auto":"h-12 w-full"),children:w?n.verifying:n.verify}),t.jsx("button",{type:"button",onClick:()=>{ue(!1),T(""),K.reset(),Y.reset()},disabled:w,className:j("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",P&&"sm:col-span-2"),children:n.useDifferentEmail})]}):t.jsxs("form",{onSubmit:De,className:j("grid gap-2",P&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:z,className:j("text-sm font-medium text-foreground",P&&"sr-only"),children:n.emailLabel}),t.jsx(X,{id:z,type:"email",placeholder:n.emailPlaceholder,value:b,onChange:G(M),onBlur:fe,required:!0,disabled:w,autoComplete:"email","aria-invalid":!!k,"aria-describedby":k?H:void 0,className:"h-11 rounded-lg"}),k&&t.jsx("p",{id:H,role:"alert",className:"text-xs text-destructive",children:k})]}),t.jsx("button",{type:"submit",disabled:w||!U,className:j("flex items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:pointer-events-none disabled:opacity-50",P?"h-11 sm:w-auto":"h-12 w-full"),children:w?n.sending:n.sendCode})]})}),W&&F&&!be&&t.jsxs("form",{onSubmit:Re,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:z,className:"block text-sm font-medium text-foreground mb-2",children:n.emailLabel}),t.jsx(X,{id:z,type:"email",placeholder:"you@example.com",value:b,onChange:G(M),onBlur:fe,required:!0,disabled:w,autoComplete:"email","aria-invalid":!!k,"aria-describedby":k?H:void 0,className:"h-11 rounded-lg"}),k&&t.jsx("p",{id:H,role:"alert",className:"text-xs text-destructive mt-1.5",children:k})]}),t.jsx(pe,{type:"submit",disabled:w||!U,className:"w-full font-semibold",size:"xl",children:w?n.sending:n.sendResetLink})]}),!W&&!R&&F&&t.jsxs("form",{onSubmit:Te,className:"grid gap-5",children:[C&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:ve,className:"block text-sm font-medium text-foreground mb-2",children:n.nameLabel}),t.jsx(X,{id:ve,type:"text",placeholder:n.namePlaceholder,value:a,onChange:G(S),required:!0,disabled:w,autoComplete:"name",className:"h-11 rounded-lg"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:z,className:"block text-sm font-medium text-foreground mb-2",children:n.emailLabel}),t.jsx(X,{id:z,type:"email",placeholder:"you@example.com",value:b,onChange:G(M),onBlur:fe,required:!0,disabled:w,autoComplete:"email","aria-invalid":!!k,"aria-describedby":k?H:void 0,className:"h-11 rounded-lg"}),k&&t.jsx("p",{id:H,role:"alert",className:"text-xs text-destructive mt-1.5",children:k})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:we,className:"block text-sm font-medium text-foreground",children:n.passwordLabel}),!C&&v.enabled&&t.jsx("button",{type:"button",onClick:()=>re("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:n.forgotPassword})]}),t.jsx(X,{id:we,type:"password",placeholder:"••••••••",value:_,onChange:G(V),required:!0,disabled:w,autoComplete:C?"new-password":"current-password",className:"h-11 rounded-lg"})]}),t.jsx("div",{className:j("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",U?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:j("p-1",!U&&"pointer-events-none"),children:t.jsx(pe,{type:"submit",disabled:w||!U,className:j("w-full font-semibold"),size:"xl","aria-hidden":!U,children:w?C?n.creatingAccount:n.signingIn:n.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:W?t.jsx("button",{type:"button",onClick:()=>re("signIn"),disabled:w,className:le,children:n.backToSignIn}):R&&F?t.jsx("button",{type:"button",onClick:()=>re("signIn"),disabled:w,className:le,children:n.signInWithPassword}):!R&&F?t.jsxs(t.Fragment,{children:[C?n.alreadyHaveAccount:n.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>re(C?"signIn":"signUp"),disabled:w,className:le,children:C?n.signIn:n.signUp}),E.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>re("emailOtp"),disabled:w,className:le,children:n.signInWithEmailCode})]})]}):null})]})}async function de(){throw new Error("Tauri bridge is unavailable outside the desktop build")}function Ge(){const r=Be(),e=Ve(),c=$e({queryKey:oe.desktopAuthStatus(),queryFn:async()=>(await de()).fetchAuthStatus(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0}),[f,p]=y.useState(!1),[m,i]=y.useState(null),[l,u]=y.useState(!1),[I,N]=y.useState(null);y.useEffect(()=>{},[e,r]);async function A(){p(!0),i(null);try{const d=await de();await d.performAuthLogin();const g=await d.fetchAuthStatus();r.setQueryData(oe.desktopAuthStatus(),g)}catch(d){i(d instanceof Error?d.message:"Sign-in failed")}finally{p(!1)}}async function v(){p(!0);try{const d=await de();await d.performAuthLogout();const g=await d.fetchAuthStatus();r.setQueryData(oe.desktopAuthStatus(),g)}finally{p(!1)}}async function E(){u(!0),N(null);let d;try{d=await de()}catch(g){N(g instanceof Error?g.message:"Sign-in failed"),u(!1);return}try{await d.performAuthCompleteSession()}catch(g){N(g instanceof Error?g.message:"Sign-in failed")}finally{try{const g=await d.fetchAuthStatus();r.setQueryData(oe.desktopAuthStatus(),g)}finally{u(!1)}}}async function h(){await c.refetch()}return{status:c.data,isChecking:c.isLoading,isRetryingStatus:c.isFetching,isPending:f,loginError:m,login:A,logout:v,isCompletingSession:l,completeSessionError:I,completeSession:E,retryStatus:h}}function Je(r){return!(r.emailAndPassword.enabled||r.emailOtp.enabled||r.socialProviders.enabled)&&!r.sso.enabled&&r.magicLink.enabled}function Xe(){return ce.c(10),Ge(),null}function Ze(r){const e=ce.c(25),{onContinue:c,isPending:f,error:p}=r,m=xe();let i;e[0]!==m?(i=m("common.authEntry.browserOnlyTitle"),e[0]=m,e[1]=i):i=e[1];let l;e[2]!==i?(l=t.jsx("h1",{className:"text-lg font-medium text-foreground",children:i}),e[2]=i,e[3]=l):l=e[3];let u;e[4]!==m?(u=m("common.authEntry.browserOnlyDescription"),e[4]=m,e[5]=u):u=e[5];let I;e[6]!==u?(I=t.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:u}),e[6]=u,e[7]=I):I=e[7];let N;e[8]!==l||e[9]!==I?(N=t.jsxs("div",{className:"flex flex-col gap-1",children:[l,I]}),e[8]=l,e[9]=I,e[10]=N):N=e[10];let A;e[11]!==c?(A=()=>{c()},e[11]=c,e[12]=A):A=e[12];let v;e[13]!==m?(v=m("common.authEntry.browserOnlyCta"),e[13]=m,e[14]=v):v=e[14];let E;e[15]!==f||e[16]!==A||e[17]!==v?(E=t.jsx(pe,{onClick:A,disabled:f,children:v}),e[15]=f,e[16]=A,e[17]=v,e[18]=E):E=e[18];let h;e[19]!==p?(h=p&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:p}),e[19]=p,e[20]=h):h=e[20];let d;return e[21]!==N||e[22]!==E||e[23]!==h?(d=t.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[N,E,h]}),e[21]=N,e[22]=E,e[23]=h,e[24]=d):d=e[24],d}function Ce(r){const e=ce.c(8),{label:c,error:f}=r;let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(Qe,{size:"lg"}),e[0]=p):p=e[0];let m;e[1]!==c?(m=c&&t.jsx("p",{className:"text-sm text-muted-foreground",children:c}),e[1]=c,e[2]=m):m=e[2];let i;e[3]!==f?(i=f&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:f}),e[3]=f,e[4]=i):i=e[4];let l;return e[5]!==m||e[6]!==i?(l=t.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[p,m,i]}),e[5]=m,e[6]=i,e[7]=l):l=e[7],l}class Ie{constructor(e){this.response=e}response}function et(r){return r.startsWith("/")&&!r.startsWith("//")?r:"/"}function tt({redirectTo:r,onAuthEvent:e}){const c=xe(),[f,p]=y.useState(null),m=y.useEffectEvent(i=>{try{e?.(i)}catch{}});return y.useEffect(()=>{let i=!1;return(async()=>{m({type:"started",method:"local"});try{let l;try{l=await ze(async()=>{const u=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(u.status>=500)throw new Ie(u);return u},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(u){if(u instanceof He&&u.cause instanceof Ie)l=u.cause.response;else throw u}if(!l.ok){const u=await l.json().catch(()=>({}));throw new Error(u?.error||c("common.authEntry.autoLoginFailed"))}i||(m({type:"succeeded",method:"local"}),window.location.href=et(r))}catch(l){i||(m({type:"failed",method:"local",stage:"authenticate",error:l instanceof Error?l.message:String(l)}),p(l instanceof Error?l.message:c("common.authEntry.autoLoginFailed")))}})(),()=>{i=!0}},[r]),f?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:c("common.authEntry.autoLoginFailedWithError",{error:f})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:c("common.authEntry.tryRestartingServer")})]})}):t.jsx(Fe,{})}function st({callbackURL:r,providerId:e,ssoSignIn:c,onAuthEvent:f}){const p=y.useEffectEvent(i=>{try{f?.(i)}catch{}}),m=y.useEffectEvent(c);return y.useEffect(()=>{(async()=>{p({type:"started",method:"sso",provider:e});try{const i=await m({providerId:e,callbackURL:r});if(i.error)throw new Error(i.error.message||"SSO redirect failed")}catch(i){p({type:"failed",method:"sso",provider:e,stage:"redirect",error:i instanceof Error?i.message:String(i)})}})()},[e,r]),t.jsx(Fe,{})}function lt(r){const e=ce.c(45),{callbackUrl:c,redirectUrl:f,allowAutoLogin:p,title:m,subtitle:i,brand:l,copy:u,variant:I,allowedSocialProviders:N,allowPassword:A,onAuthEvent:v}=r,E=p===void 0?!0:p,h=xe(),{sso:d,emailAndPassword:g,magicLink:P,emailOtp:Z,socialProviders:ee,localMode:me}=ke(),x=Xe(),O=f||c,F=x?.actions;let b;e[0]!==F?(b={..._e,...F},e[0]=F,e[1]=b):b=e[1];const M=b;if(x?.isPending){let a;e[2]!==h?(a=h("common.authEntry.finishSignInInBrowser"),e[2]=h,e[3]=a):a=e[3];let S;return e[4]!==x.loginError||e[5]!==a?(S=t.jsx(Ce,{label:a,error:x.loginError}),e[4]=x.loginError,e[5]=a,e[6]=S):S=e[6],S}if(x?.isCompletingSession){let a;e[7]!==h?(a=h("common.authEntry.finishingSignIn"),e[7]=h,e[8]=a):a=e[8];let S;return e[9]!==x.completeSessionError||e[10]!==a?(S=t.jsx(Ce,{label:a,error:x.completeSessionError}),e[9]=x.completeSessionError,e[10]=a,e[11]=S):S=e[11],S}if(me&&E){let a;return e[12]!==v||e[13]!==O?(a=t.jsx(tt,{redirectTo:O,onAuthEvent:v}),e[12]=v,e[13]=O,e[14]=a):a=e[14],a}if(d.enabled){let a;return e[15]!==v||e[16]!==O||e[17]!==M.ssoSignIn||e[18]!==d.providerId?(a=t.jsx(st,{callbackURL:O,providerId:d.providerId,ssoSignIn:M.ssoSignIn,onAuthEvent:v}),e[15]=v,e[16]=O,e[17]=M.ssoSignIn,e[18]=d.providerId,e[19]=a):a=e[19],a}if(x&&Je({emailAndPassword:g,emailOtp:Z,socialProviders:ee,magicLink:P,sso:d})){let a;return e[20]!==x.isPending||e[21]!==x.login||e[22]!==x.loginError?(a=t.jsx(Ze,{onContinue:x.login,isPending:x.isPending,error:x.loginError}),e[20]=x.isPending,e[21]=x.login,e[22]=x.loginError,e[23]=a):a=e[23],a}if(g.enabled||P.enabled||Z.enabled||ee.enabled){const a=x?.loginError??x?.completeSessionError??null;let S;e[24]!==A||e[25]!==N||e[26]!==l||e[27]!==c||e[28]!==u||e[29]!==v||e[30]!==F||e[31]!==f||e[32]!==i||e[33]!==m||e[34]!==I?(S=t.jsx(Ye,{redirectUrl:f,callbackUrl:c,title:m,subtitle:i,brand:l,copy:u,variant:I,allowedSocialProviders:N,allowPassword:A,onAuthEvent:v,actions:F}),e[24]=A,e[25]=N,e[26]=l,e[27]=c,e[28]=u,e[29]=v,e[30]=F,e[31]=f,e[32]=i,e[33]=m,e[34]=I,e[35]=S):S=e[35];const q=S;if(!a)return q;let T;e[36]!==a?(T=t.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:a}),e[36]=a,e[37]=T):T=e[37];let L;return e[38]!==q||e[39]!==T?(L=t.jsxs("div",{className:"grid gap-4",children:[T,q]}),e[38]=q,e[39]=T,e[40]=L):L=e[40],L}let _;e[41]!==h?(_=h("common.authEntry.noLoginOptions"),e[41]=h,e[42]=_):_=e[42];let V;return e[43]!==_?(V=t.jsx("div",{children:_}),e[43]=_,e[44]=V):V=e[44],V}export{lt as A,Ge as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,m as p,j as f}from"./index-
|
|
1
|
+
import{c as g,m as p,j as f}from"./index-DqXmpRSX.js";function w(b){const e=g.c(20),{children:m,visual:r,align:j}=b,d=(j===void 0?"center":j)==="fill",x=d?"min-h-[100dvh] md:min-h-screen":"min-h-screen";let l;e[0]!==x?(l=p("flex w-full",x),e[0]=x,e[1]=l):l=e[1];const h=d?"h-[100dvh] justify-start pt-4 pb-8 md:h-auto":"justify-center py-6";let t;e[2]!==h?(t=p("flex flex-1 flex-col items-center bg-sidebar px-6 md:justify-center md:px-10 md:py-10",h),e[2]=h,e[3]=t):t=e[3];const u=d&&"flex min-h-0 flex-1 flex-col md:block md:flex-none";let s;e[4]!==u?(s=p("w-full max-w-[440px]",u),e[4]=u,e[5]=s):s=e[5];let i;e[6]!==m||e[7]!==s?(i=f.jsx("div",{className:s,children:m}),e[6]=m,e[7]=s,e[8]=i):i=e[8];let n;e[9]!==t||e[10]!==i?(n=f.jsx("section",{className:t,children:i}),e[9]=t,e[10]=i,e[11]=n):n=e[11];let c;e[12]!==r?(c=r??f.jsx("img",{src:"/onboarding-placeholder.png",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e[12]=r,e[13]=c):c=e[13];let a;e[14]!==c?(a=f.jsx("aside",{className:"relative hidden flex-1 overflow-hidden bg-muted md:flex",children:c}),e[14]=c,e[15]=a):a=e[15];let o;return e[16]!==a||e[17]!==l||e[18]!==n?(o=f.jsxs("main",{className:l,children:[n,a]}),e[16]=a,e[17]=l,e[18]=n,e[19]=o):o=e[19],o}export{w as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./index-
|
|
1
|
+
import"./index-DqXmpRSX.js";import{i as u,a as p}from"./mcp-oauth-BHDSTwSV.js";async function k({connectionId:n,orgId:s,orgSlug:o,persistFallback:r}){const c=new URL(`/api/${o}/mcp/${n}`,window.location.origin),i=await u({url:c.href,token:null,orgId:s});if(!i.supportsOAuth||i.isAuthenticated)return{ran:!1,ok:!0,error:null};const{token:t,tokenInfo:e,error:a}=await p({connectionId:n,orgSlug:o,scope:"offline_access"});if(a||!t)return{ran:!0,ok:!1,error:a??"no token received"};if(e)try{(await fetch(`/api/${o}/connections/${n}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:e.accessToken,refreshToken:e.refreshToken,expiresIn:e.expiresIn,scope:e.scope,clientId:e.clientId,clientSecret:e.clientSecret,tokenEndpoint:e.tokenEndpoint})})).ok||await r(t)}catch{await r(t)}else await r(t);return{ran:!0,ok:!0,error:null}}export{k as a};
|
package/dist/client/assets/{automation-list-row-Brn7k31U.js → automation-list-row-Bs0wFLr_.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as G,b as J,r as U,m as W,j as t,B as X}from"./index-
|
|
1
|
+
import{c as G,b as J,r as U,m as W,j as t,B as X}from"./index-DqXmpRSX.js";import{c as Y,d as Z,b as ee,f as te,g as se,e as ie,a as ne,A as oe}from"./alert-dialog-iPj1kFsb.js";import{D as ae,c as re,b as le,a as ce}from"./dropdown-menu-DUU_gv0n.js";import{s as me}from"./Stars02-C-JOVi71.js";import{a as ue}from"./DotsVertical-CrKPB-rb.js";import{s as de}from"./Trash01-BT5A-gEY.js";import{i as fe}from"./Zap-CRace4eX.js";import{u as ge}from"./use-virtual-mcp-Co2Gxa_g.js";import{A as xe}from"./agent-icon-OqQTNFsC.js";import{u as pe}from"./use-automations-D97aWna-.js";function ke(c){const e=G.c(80),{automation:s,showAgent:a,onClick:n}=c,i=J(),{remove:o}=pe(),[l,O]=U.useState(!1),r=ge(a?s.virtual_mcp_id:void 0);let S;e[0]!==s.id||e[1]!==o?(S=()=>{o.mutate(s.id),O(!1)},e[0]=s.id,e[1]=o,e[2]=S):S=e[2];const I=S;let E;e[3]!==n?(E=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=E):E=e[4];const H=E,V=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==V?(u=W("inline-block size-2 rounded-full shrink-0",V),e[5]=V,e[6]=u):u=e[6];const q=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==q?(d=i(q),e[7]=i,e[8]=q,e[9]=d):d=e[9];let f;e[10]!==u||e[11]!==d?(f=t.jsx("span",{className:u,"aria-label":d}),e[10]=u,e[11]=d,e[12]=f):f=e[12];let g;e[13]!==r?.icon||e[14]!==r?.title||e[15]!==s.name||e[16]!==a?(g=a&&t.jsx(xe,{icon:r?.icon??null,name:r?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=r?.icon,e[14]=r?.title,e[15]=s.name,e[16]=a,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==r||e[21]!==a?(p=a&&r&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",r.title]}),e[20]=r,e[21]=a,e[22]=p):p=e[22];let h;e[23]!==p||e[24]!==x?(h=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p]}),e[23]=p,e[24]=x,e[25]=h):h=e[25];let j;e[26]!==s.nearest_next_run_at||e[27]!==s.trigger_count?(j=t.jsx(we,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[26]=s.nearest_next_run_at,e[27]=s.trigger_count,e[28]=j):j=e[28];let w;e[29]!==h||e[30]!==j?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[h,j]}),e[29]=h,e[30]=j,e[31]=w):w=e[31];let F;e[32]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(ae,{asChild:!0,children:t.jsx(X,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(ue,{size:16})})}),e[32]=F):F=e[32];let $,B;e[33]===Symbol.for("react.memo_cache_sentinel")?($=m=>{m.stopPropagation(),O(!0)},B=t.jsx(de,{size:16}),e[33]=$,e[34]=B):($=e[33],B=e[34]);let v;e[35]!==i?(v=i("automations.automationListRow.delete"),e[35]=i,e[36]=v):v=e[36];let _;e[37]!==v?(_=t.jsx("div",{onClick:je,onKeyDown:he,role:"presentation",className:"shrink-0",children:t.jsxs(re,{children:[F,t.jsx(le,{align:"end",children:t.jsxs(ce,{variant:"destructive",onClick:$,children:[B,v]})})]})}),e[37]=v,e[38]=_):_=e[38];let b;e[39]!==H||e[40]!==n||e[41]!==w||e[42]!==_||e[43]!==f||e[44]!==g?(b=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:H,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[f,g,w,_]}),e[39]=H,e[40]=n,e[41]=w,e[42]=_,e[43]=f,e[44]=g,e[45]=b):b=e[45];let A;e[46]!==i?(A=i("automations.automationListRow.deleteTitle"),e[46]=i,e[47]=A):A=e[47];let D;e[48]!==A?(D=t.jsx(Y,{children:A}),e[48]=A,e[49]=D):D=e[49];let N;e[50]!==s.name||e[51]!==i?(N=i("automations.automationListRow.deleteDescription",{name:s.name}),e[50]=s.name,e[51]=i,e[52]=N):N=e[52];let R;e[53]!==N?(R=t.jsx(Z,{children:N}),e[53]=N,e[54]=R):R=e[54];let y;e[55]!==D||e[56]!==R?(y=t.jsxs(ee,{children:[D,R]}),e[55]=D,e[56]=R,e[57]=y):y=e[57];let C;e[58]!==i?(C=i("automations.automationListRow.cancel"),e[58]=i,e[59]=C):C=e[59];let L;e[60]!==C?(L=t.jsx(te,{children:C}),e[60]=C,e[61]=L):L=e[61];const Q=o.isPending;let k;e[62]!==i?(k=i("automations.automationListRow.deleteButton"),e[62]=i,e[63]=k):k=e[63];let P;e[64]!==I||e[65]!==o.isPending||e[66]!==k?(P=t.jsx(se,{onClick:I,disabled:Q,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:k}),e[64]=I,e[65]=o.isPending,e[66]=k,e[67]=P):P=e[67];let T;e[68]!==L||e[69]!==P?(T=t.jsxs(ie,{children:[L,P]}),e[68]=L,e[69]=P,e[70]=T):T=e[70];let z;e[71]!==y||e[72]!==T?(z=t.jsxs(ne,{children:[y,T]}),e[71]=y,e[72]=T,e[73]=z):z=e[73];let M;e[74]!==l||e[75]!==z?(M=t.jsx(oe,{open:l,onOpenChange:O,children:z}),e[74]=l,e[75]=z,e[76]=M):M=e[76];let K;return e[77]!==b||e[78]!==M?(K=t.jsxs(t.Fragment,{children:[b,M]}),e[77]=b,e[78]=M,e[79]=K):K=e[79],K}function he(c){return c.stopPropagation()}function je(c){return c.stopPropagation()}function we(c){const e=G.c(8),{triggerCount:s,nextRunAt:a}=c,n=J();if(s===0){let o;e[0]!==n?(o=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=o):o=e[1];let l;return e[2]!==o?(l=t.jsx("span",{className:"text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=l):l=e[3],l}let i;return e[4]!==a||e[5]!==n||e[6]!==s?(i=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:a?t.jsxs(t.Fragment,{children:[t.jsx(me,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(a).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(fe,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=a,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{ke as A};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as z,c as W,Z as Ux,j as m,B as tn,Y as jm,X as Hx,_ as jx,bn as lf,ax as Zt,bD as Ca,b as ue,H as $x,m as Te,d as Dn,f as zx,p as qx,aB as Gx,ay as hn,aF as Vx,aE as fn,bC as Yr,aC as Mn,bE as Iy,aA as Ny,F as $t,o as Wx,e as Yx,K as xt,t as mp,n as Kr,E as vy,aw as Cy,bF as uf,aD as Kx,bG as An}from"./index-2KxPRjw5.js";import{e as Xx}from"./select-DfQiZ-4J.js";import{u as Ry}from"./useInfiniteQuery-BWd6o-wh.js";import{a as wy,u as Zx}from"./use-connection-CvBcj0iA.js";import{j as Qx,u as cf,f as Jx,i as ek,a as tk,S as nk}from"./use-mcp-client-DRwUSZdO.js";import{a as rk}from"./use-virtual-mcp-D7SVi-2E.js";import{C as ak}from"./card-9OUE6Bzl.js";import{o as Oy,m as Ly,p as df,q as pf}from"./sidebar-DpVJgBAa.js";import{c as Dy,e as My,a as Ti,d as yt,b as Py,T as St}from"./table-BbRTH9fF.js";import{E as hp}from"./empty-state-BKzUesA7.js";import{u as ff}from"./use-infinite-scroll-ccrh4_KW.js";import{u as ik}from"./use-members-DjRi0Onl.js";import{u as Fy,S as Kn}from"./use-clock-tick-kQx_nmDK.js";import{e as sk}from"./use-automations-irLGHKpI.js";import{u as By}from"./studio-tools-CTJuN7Yy.js";import{u as ok}from"./useSuspenseInfiniteQuery-DPyRMURT.js";import{A as Uy}from"./avatar-Du8HEobV.js";import{t as Ra}from"./ChevronDown-BSVV4L9A.js";import{n as gp}from"./ChevronUp-GR0-Yt4d.js";import{n as mf,t as lk,c as Hy,i as uk,a as hf}from"./Tool02-C17Y4pBP.js";import{aP as ck,aQ as dk,h as pk,aR as fk,aS as mk,a7 as hk,F as gk,aT as bk,ae as Ek,i as $m,aw as Tk,D as yk,m as Sk,aU as Ak,aN as jy,aV as _k,A as $y,aW as Ht,aX as xk,n as kk}from"./agent-icon-q4cV7U67.js";import{t as yi}from"./Stars01-DqIThrOc.js";import{i as zy,b as sa}from"./XCircle-8Wd2-AR5.js";import{i as Xr}from"./Check-DdyKCl8O.js";import{i as zm}from"./ChevronRight-CSgj0z6i.js";import{a as Si}from"./Copy01-Cv0Vuqbe.js";import{b as mn,t as gf,c as qm}from"./format-time-BnbuEtat.js";import{u as qy}from"./use-copy-POYUhIaM.js";import{T as vn,a as Cn,c as Rn}from"./tooltip-CEu_we5y.js";import{b as Gy,a as Ik,c as Nk,d as vk,e as Vy,g as Ck,f as Rk}from"./dialog-C82H2S70.js";import{u as wk}from"./use-mobile-CLE626Yq.js";import{h as Ok,f as Lk,n as Dk,o as Mk}from"./tab-id-DJIms9m1.js";import{R as Pk,c as Fk,r as Bk,d as Uk}from"./hooks-Bom1QoTc.js";import{l as nr,D as Hk,b as bf,d as Wy,a as jk}from"./chat-context-DYO1ODPB.js";import{c as $k}from"./monaco-editor-CSUtCvVX.js";import{g as Yy,M as zk}from"./index-Dv8k1EHh.js";import{N as ct,R as qk,l as Gk,a as kt,m as Vk,F as Gm,S as Ky,T as kn,n as Wk,o as Ef,D as Br,j as Ai,p as Ur,P as Ct,q as Yk,f as Rt,r as Kk,s as Xk,v as Zk,w as Xy,x as Xn,y as $e,z as rr,A as wn,B as Zn,G as bp,H as Qk,I as Jk,J as eI,K as tI,L as nI,O as rI,Q as aI,U as Zy,V as Ep,W as iI,X as sI,Y as Qy,Z as oI,_ as lI,$ as Vm,t as uI,a0 as wt,a1 as ar,c as cI,u as dI,M as pI,e as fI}from"./calendar-BZcldUNV.js";import{i as Jy}from"./AlertCircle-BaA3X0Vc.js";import{s as mI}from"./Eye-CkjEvMwH.js";import{s as wa,t as eS}from"./Star01-2mO5G0Xw.js";import{s as hI}from"./XClose-CBFLmbVP.js";import{n as Tp}from"./ZapSquare-BH7ie7zg.js";import{d as gI,c as bI,a as oa}from"./Tool01-D2fd-Mg5.js";import{i as Ar}from"./Monitor01-CEdUOtdj.js";import{i as EI}from"./SearchMd-D0poZQV_.js";import{i as TI}from"./Upload01-k2Sn0RXQ.js";import{u as yI,a as SI}from"./shell-layout-B56j-p5N.js";import{n as tS}from"./LinkExternal01-CbfqV87q.js";import{I as gn}from"./integration-icon-DKBuU8Fr.js";import{i as AI}from"./ArrowUpRight-fq20wgvL.js";import{a as Tf}from"./Users03-CqyDxwt6.js";import{a as jt}from"./Palette-DgmLnO_l.js";import{c as nS}from"./use-navigate-to-agent-CXMG3HNZ.js";import{a as _I}from"./Stars02-cKtwD-F2.js";import{g as xI}from"./AreaChart-B4pcuH23.js";import{a as kI,F as II,b as NI,c as vI,d as CI,e as RI}from"./form-DAiRK0vx.js";import{I as wI}from"./input-BAuCATqg.js";import{S as OI}from"./spinner-DPfrt4Tp.js";const LI={openrouter:t=>{const e=t?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function rS(t){if(!t?.providerMetadata)return 0;for(const e of Object.values(LI)){const n=e(t.providerMetadata);if(n!==null)return n}return 0}function aS(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function iS(t,e){if(!e)return t;const n=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,r=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:t.inputTokens+(e.inputTokens??0),outputTokens:t.outputTokens+(e.outputTokens??0),reasoningTokens:t.reasoningTokens+(e.reasoningTokens??0),totalTokens:t.totalTokens+(e.totalTokens??0),cost:t.cost+rS(e),cacheReadTokens:t.cacheReadTokens+n,cacheWriteTokens:t.cacheWriteTokens+r}}function dz(t){return t.reduce((e,n)=>iS(e,n.metadata?.usage),aS())}const DI={damping:.7,stiffness:.05,mass:1.25},MI=70,PI=1e3/60,FI=350;let _i=!1;globalThis.document?.addEventListener("mousedown",()=>{_i=!0});globalThis.document?.addEventListener("mouseup",()=>{_i=!1});globalThis.document?.addEventListener("click",()=>{_i=!1});const BI=(t={})=>{const[e,n]=z.useState(!1),[r,a]=z.useState(t.initial!==!1),[i,s]=z.useState(!1),o=z.useRef(null);o.current=t;const l=z.useCallback(()=>{if(!_i)return!1;const y=window.getSelection();if(!y||!y.rangeCount)return!1;const A=y.getRangeAt(0);return A.commonAncestorContainer.contains(T.current)||T.current?.contains(A.commonAncestorContainer)},[]),u=z.useCallback(y=>{c.isAtBottom=y,a(y)},[]),d=z.useCallback(y=>{c.escapedFromLock=y,n(y)},[]),c=z.useMemo(()=>{let y;return{escapedFromLock:e,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return T.current?.scrollTop??0},set scrollTop(A){if(T.current){const{scrollBehavior:_}=getComputedStyle(T.current);_!=="auto"&&(T.current.style.scrollBehavior="auto"),T.current.scrollTop=A,c.ignoreScrollToTop=T.current.scrollTop,_!=="auto"&&(T.current.style.scrollBehavior=_)}},get targetScrollTop(){return!T.current||!S.current?0:T.current.scrollHeight-1-T.current.clientHeight},get calculatedTargetScrollTop(){if(!T.current||!S.current)return 0;const{targetScrollTop:A}=this;if(!t.targetScrollTop)return A;if(y?.targetScrollTop===A)return y.calculatedScrollTop;const _=Math.max(Math.min(t.targetScrollTop(A,{scrollElement:T.current,contentElement:S.current}),A),0);return y={targetScrollTop:A,calculatedScrollTop:_},requestAnimationFrame(()=>{y=void 0}),_},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=MI}}},[]),p=z.useCallback((y={})=>{typeof y=="string"&&(y={animation:y}),y.preserveScrollPosition||u(!0);const A=Date.now()+(Number(y.wait)||0),_=Qi(o.current,y.animation),{ignoreEscapes:k=!1}=y;let E,x=c.calculatedTargetScrollTop;y.duration instanceof Promise?y.duration.finally(()=>{E=Date.now()}):E=A+(y.duration??0);const v=async()=>{const N=new Promise(requestAnimationFrame).then(()=>{if(!c.isAtBottom)return c.animation=void 0,!1;const{scrollTop:I}=c,L=performance.now(),M=(L-(c.lastTick??L))/PI;if(c.animation||(c.animation={behavior:_,promise:N,ignoreEscapes:k}),c.animation.behavior===_&&(c.lastTick=L),l()||A>Date.now())return v();if(I<Math.min(x,c.calculatedTargetScrollTop)){if(c.animation?.behavior===_){if(_==="instant")return c.scrollTop=c.calculatedTargetScrollTop,v();c.velocity=(_.damping*c.velocity+_.stiffness*c.scrollDifference)/_.mass,c.accumulated+=c.velocity*M,c.scrollTop+=c.accumulated,c.scrollTop!==I&&(c.accumulated=0)}return v()}return E>Date.now()?(x=c.calculatedTargetScrollTop,v()):(c.animation=void 0,c.scrollTop<c.calculatedTargetScrollTop?p({animation:Qi(o.current,o.current.resize),ignoreEscapes:k,duration:Math.max(0,E-Date.now())||void 0}):c.isAtBottom)});return N.then(I=>(requestAnimationFrame(()=>{c.animation||(c.lastTick=void 0,c.velocity=0)}),I))};return y.wait!==!0&&(c.animation=void 0),c.animation?.behavior===_?c.animation.promise:v()},[u,l,c]),f=z.useCallback(()=>{d(!0),u(!1)},[d,u]),g=z.useCallback(({target:y})=>{if(y!==T.current)return;const{scrollTop:A,ignoreScrollToTop:_}=c;let{lastScrollTop:k=A}=c;c.lastScrollTop=A,c.ignoreScrollToTop=void 0,_&&_>A&&(k=_),s(c.isNearBottom),setTimeout(()=>{if(c.resizeDifference||A===_)return;if(l()){d(!0),u(!1);return}const E=A>k,x=A<k;if(c.animation?.ignoreEscapes){c.scrollTop=k;return}x&&(d(!0),u(!1)),E&&d(!1),!c.escapedFromLock&&c.isNearBottom&&u(!0)},1)},[d,u,l,c]),b=z.useCallback(({target:y,deltaY:A})=>{let _=y;for(;!["scroll","auto"].includes(getComputedStyle(_).overflow);){if(!_.parentElement)return;_=_.parentElement}_===T.current&&A<0&&T.current.scrollHeight>T.current.clientHeight&&!c.animation?.ignoreEscapes&&(d(!0),u(!1))},[d,u,c]),T=Wm(y=>{T.current?.removeEventListener("scroll",g),T.current?.removeEventListener("wheel",b),y?.addEventListener("scroll",g,{passive:!0}),y?.addEventListener("wheel",b,{passive:!0})},[]),S=Wm(y=>{if(c.resizeObserver?.disconnect(),c.resizeObserver=void 0,!y)return;let A;c.resizeObserver=new ResizeObserver(([_])=>{const{height:k}=_.contentRect,E=k-(A??k);if(c.resizeDifference=E,c.scrollTop>c.targetScrollTop&&(c.scrollTop=c.targetScrollTop),s(c.isNearBottom),E>=0){const x=Qi(o.current,A?o.current.resize:o.current.initial);p({animation:x,wait:!0,preserveScrollPosition:!0,duration:x==="instant"?void 0:FI})}else c.isNearBottom&&(d(!1),u(!0));A=k,requestAnimationFrame(()=>{setTimeout(()=>{c.resizeDifference===E&&(c.resizeDifference=0)},1)})}),c.resizeObserver?.observe(y)},[]);return{contentRef:S,scrollRef:T,scrollToBottom:p,stopScroll:f,isAtBottom:r||i,isNearBottom:i,escapedFromLock:e,state:c}};function Wm(t,e){const n=z.useCallback(r=>(n.current=r,t(r)),e);return n}const Zi=new Map;function Qi(...t){const e={...DI};let n=!1;for(const a of t){if(a==="instant"){n=!0;continue}typeof a=="object"&&(n=!1,e.damping=a.damping??e.damping,e.stiffness=a.stiffness??e.stiffness,e.mass=a.mass??e.mass)}const r=JSON.stringify(e);return Zi.has(r)||Zi.set(r,Object.freeze(e)),n?"instant":Zi.get(r)}function UI(t){let e=2166136261;for(let n=0;n<t.length;n++)e=Math.imul(e^t.charCodeAt(n),16777619);return`a${(e>>>0).toString(36).padStart(6,"0").slice(-6)}`}function yf(t){if(t&&typeof t=="object"&&"gatewayClientId"in t&&typeof t.gatewayClientId=="string")return t.gatewayClientId}function Sf(t,e){if(!e)return t;const n=`${UI(e)}_`;return t.startsWith(n)?t.slice(n.length):t}function HI(t,e){return Sf(t,e).replace(/[_-]/g," ").toLowerCase()}function jI(t){const e={};for(const n of t?.arguments??[])e[n.name]=n.required?jm().min(1,"Required"):jm();return Hx(e)}function $I(t,e){const n={};for(const r of t.arguments??[])n[r.name]=e?.[r.name]??"";return n}function zI(t){const e=W.c(67),{prompt:n,setPrompt:r,onSubmit:a,defaultValues:i}=t,s=z.useId();let o,l;if(e[0]!==n){const G=jI(n);l=jx,o=Ux(G),e[0]=n,e[1]=o,e[2]=l}else o=e[1],l=e[2];let u;e[3]!==i||e[4]!==n?(u=n?$I(n,i):{},e[3]=i,e[4]=n,e[5]=u):u=e[5];let d;e[6]!==o||e[7]!==u?(d={resolver:o,defaultValues:u,mode:"onChange"},e[6]=o,e[7]=u,e[8]=d):d=e[8];const c=l(d);let p;e[9]!==n?.arguments?(p=n?.arguments??[],e[9]=n?.arguments,e[10]=p):p=e[10];const f=p;let g;e[11]!==c||e[12]!==a||e[13]!==r?(g=async G=>{await a(G),r(null),c.reset()},e[11]=c,e[12]=a,e[13]=r,e[14]=g):g=e[14];const b=g;let T;e[15]!==c||e[16]!==r?(T=G=>{G||(c.reset(),r(null))},e[15]=c,e[16]=r,e[17]=T):T=e[17];const S=T;if(!n)return null;let y;e[18]!==n._meta||e[19]!==n.name||e[20]!==n.title?(y=n.title||HI(n.name,yf(n._meta)),e[18]=n._meta,e[19]=n.name,e[20]=n.title,e[21]=y):y=e[21];let A;e[22]!==y?(A=m.jsx(Gy,{children:m.jsx("span",{className:"capitalize",children:y})}),e[22]=y,e[23]=A):A=e[23];let _;e[24]!==n.description?(_=n.description&&m.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[24]=n.description,e[25]=_):_=e[25];let k;e[26]!==_||e[27]!==A?(k=m.jsxs(Ik,{children:[A,_]}),e[26]=_,e[27]=A,e[28]=k):k=e[28];let E;e[29]!==c||e[30]!==b?(E=G=>{G.stopPropagation(),c.handleSubmit(b)(G)},e[29]=c,e[30]=b,e[31]=E):E=e[31];let x;if(e[32]!==f||e[33]!==c.control||e[34]!==c.formState.isSubmitting){let G;e[36]!==c.control||e[37]!==c.formState.isSubmitting?(G=j=>m.jsx(II,{control:c.control,name:j.name,render:V=>{const{field:C}=V;return m.jsxs(NI,{children:[m.jsxs(vI,{className:"text-xs",children:[j.name,j.required?null:m.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),m.jsx(CI,{children:m.jsx(wI,{...C,value:C.value??"",required:j.required,placeholder:j.description??"",className:"h-9",disabled:c.formState.isSubmitting})}),m.jsx(RI,{})]})}},j.name),e[36]=c.control,e[37]=c.formState.isSubmitting,e[38]=G):G=e[38],x=f.map(G),e[32]=f,e[33]=c.control,e[34]=c.formState.isSubmitting,e[35]=x}else x=e[35];let v;e[39]!==S?(v=()=>S(!1),e[39]=S,e[40]=v):v=e[40];let N;e[41]!==c.formState.isSubmitting||e[42]!==v?(N=m.jsx(tn,{type:"button",variant:"ghost",onClick:v,disabled:c.formState.isSubmitting,children:"Cancel"}),e[41]=c.formState.isSubmitting,e[42]=v,e[43]=N):N=e[43];let I;e[44]!==c.formState.isSubmitting?(I=c.formState.isSubmitting?m.jsxs("span",{className:"flex items-center gap-2",children:[m.jsx(OI,{size:"xs"}),"Loading..."]}):"Use prompt",e[44]=c.formState.isSubmitting,e[45]=I):I=e[45];let L;e[46]!==c.formState.isSubmitting||e[47]!==s||e[48]!==I?(L=m.jsx(tn,{type:"submit",form:s,disabled:c.formState.isSubmitting,children:I}),e[46]=c.formState.isSubmitting,e[47]=s,e[48]=I,e[49]=L):L=e[49];let M;e[50]!==N||e[51]!==L?(M=m.jsxs(Nk,{children:[N,L]}),e[50]=N,e[51]=L,e[52]=M):M=e[52];let B;e[53]!==s||e[54]!==E||e[55]!==x||e[56]!==M?(B=m.jsxs("form",{id:s,className:"space-y-4 py-4",autoComplete:"off",onSubmit:E,children:[x,M]}),e[53]=s,e[54]=E,e[55]=x,e[56]=M,e[57]=B):B=e[57];let F;e[58]!==c||e[59]!==B?(F=m.jsx(kI,{...c,children:B}),e[58]=c,e[59]=B,e[60]=F):F=e[60];let P;e[61]!==k||e[62]!==F?(P=m.jsxs(vk,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[k,F]}),e[61]=k,e[62]=F,e[63]=P):P=e[63];let H;return e[64]!==S||e[65]!==P?(H=m.jsx(Vy,{open:!0,onOpenChange:S,children:P}),e[64]=S,e[65]=P,e[66]=H):H=e[66],H}const qI=/^mcp__[a-zA-Z0-9_-]+__/;function sS(t){return t.replace(qI,"")}function Af(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Pn=Af();function oS(t){Pn=t}var _r={exec:()=>null};function ve(t,e=""){let n=typeof t=="string"?t:t.source;const r={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(it.caret,"$1"),n=n.replace(a,s),r},getRegex:()=>new RegExp(n,e)};return r}var it={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:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},GI=/^(?:[ \t]*(?:\n|$))+/,VI=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,WI=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Zr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,YI=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_f=/(?:[*+-]|\d{1,9}[.)])/,lS=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,uS=ve(lS).replace(/bull/g,_f).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(),KI=ve(lS).replace(/bull/g,_f).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(),xf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,XI=/^[^\n]+/,kf=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ZI=ve(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",kf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),QI=ve(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_f).getRegex(),xi="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",If=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,JI=ve("^ {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",If).replace("tag",xi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),cS=ve(xf).replace("hr",Zr).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",xi).getRegex(),eN=ve(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",cS).getRegex(),Nf={blockquote:eN,code:VI,def:ZI,fences:WI,heading:YI,hr:Zr,html:JI,lheading:uS,list:QI,newline:GI,paragraph:cS,table:_r,text:XI},Ym=ve("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Zr).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",xi).getRegex(),tN={...Nf,lheading:KI,table:Ym,paragraph:ve(xf).replace("hr",Zr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ym).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",xi).getRegex()},nN={...Nf,html:ve(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",If).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:_r,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ve(xf).replace("hr",Zr).replace("heading",` *#{1,6} *[^
|
|
1
|
+
import{r as z,c as W,Z as Ux,j as m,B as tn,Y as jm,X as Hx,_ as jx,bn as lf,ax as Zt,bD as Ca,b as ue,H as $x,m as Te,d as Dn,f as zx,p as qx,aB as Gx,ay as hn,aF as Vx,aE as fn,bC as Yr,aC as Mn,bE as Iy,aA as Ny,F as $t,o as Wx,e as Yx,K as xt,t as mp,n as Kr,E as vy,aw as Cy,bF as uf,aD as Kx,bG as An}from"./index-DqXmpRSX.js";import{e as Xx}from"./select-Cb3tiSDw.js";import{u as Ry}from"./useInfiniteQuery-W7NcHma4.js";import{a as wy,u as Zx}from"./use-connection-CV5pilpz.js";import{j as Qx,u as cf,f as Jx,i as ek,a as tk,S as nk}from"./use-mcp-client-DwJl6WIN.js";import{a as rk}from"./use-virtual-mcp-Co2Gxa_g.js";import{C as ak}from"./card-C6G1ZbAT.js";import{o as Oy,m as Ly,p as df,q as pf}from"./sidebar-BiPc8cWL.js";import{c as Dy,e as My,a as Ti,d as yt,b as Py,T as St}from"./table-BrY2fIko.js";import{E as hp}from"./empty-state-Cp0ZI-r6.js";import{u as ff}from"./use-infinite-scroll-C92EJ-_j.js";import{u as ik}from"./use-members-Evj2zR-F.js";import{u as Fy,S as Kn}from"./use-clock-tick-D08rNiex.js";import{e as sk}from"./use-automations-D97aWna-.js";import{u as By}from"./studio-tools-DvotCHSX.js";import{u as ok}from"./useSuspenseInfiniteQuery-r5q75ddS.js";import{A as Uy}from"./avatar-npAOJTNv.js";import{t as Ra}from"./ChevronDown-Dn2piZ2G.js";import{n as gp}from"./ChevronUp-N9Uneycs.js";import{n as mf,t as lk,c as Hy,i as uk,a as hf}from"./Tool02-C5toOJ2s.js";import{aP as ck,aQ as dk,h as pk,aR as fk,aS as mk,a7 as hk,F as gk,aT as bk,ae as Ek,i as $m,aw as Tk,D as yk,m as Sk,aU as Ak,aN as jy,aV as _k,A as $y,aW as Ht,aX as xk,n as kk}from"./agent-icon-OqQTNFsC.js";import{t as yi}from"./Stars01-BpwKVOpQ.js";import{i as zy,b as sa}from"./XCircle-DsHpzoj1.js";import{i as Xr}from"./Check-D3kjZMFv.js";import{i as zm}from"./ChevronRight-CwImj32A.js";import{a as Si}from"./Copy01-CFdaASyO.js";import{b as mn,t as gf,c as qm}from"./format-time-BnbuEtat.js";import{u as qy}from"./use-copy-D8Z2epUY.js";import{T as vn,a as Cn,c as Rn}from"./tooltip-DJ0CJ4nu.js";import{b as Gy,a as Ik,c as Nk,d as vk,e as Vy,g as Ck,f as Rk}from"./dialog-K6gwa7A3.js";import{u as wk}from"./use-mobile-lAVE_tNN.js";import{h as Ok,f as Lk,n as Dk,o as Mk}from"./tab-id-CCUuJuHg.js";import{R as Pk,c as Fk,r as Bk,d as Uk}from"./hooks-D6e52Y4T.js";import{l as nr,D as Hk,b as bf,d as Wy,a as jk}from"./chat-context-Bkf3Y_YW.js";import{c as $k}from"./monaco-editor-C9o8bufU.js";import{g as Yy,M as zk}from"./index-BMkqNEv8.js";import{N as ct,R as qk,l as Gk,a as kt,m as Vk,F as Gm,S as Ky,T as kn,n as Wk,o as Ef,D as Br,j as Ai,p as Ur,P as Ct,q as Yk,f as Rt,r as Kk,s as Xk,v as Zk,w as Xy,x as Xn,y as $e,z as rr,A as wn,B as Zn,G as bp,H as Qk,I as Jk,J as eI,K as tI,L as nI,O as rI,Q as aI,U as Zy,V as Ep,W as iI,X as sI,Y as Qy,Z as oI,_ as lI,$ as Vm,t as uI,a0 as wt,a1 as ar,c as cI,u as dI,M as pI,e as fI}from"./calendar-BKP3pISc.js";import{i as Jy}from"./AlertCircle-BHNP9rUU.js";import{s as mI}from"./Eye-DJcOc9Zw.js";import{s as wa,t as eS}from"./Star01-CduFPScO.js";import{s as hI}from"./XClose-Dg24hRTQ.js";import{n as Tp}from"./ZapSquare-Bz1NVv_t.js";import{d as gI,c as bI,a as oa}from"./Tool01-pHGWkh_u.js";import{i as Ar}from"./Monitor01-Car-ubqN.js";import{i as EI}from"./SearchMd-kaVQ2swy.js";import{i as TI}from"./Upload01-wyU_c8og.js";import{u as yI,a as SI}from"./shell-layout-BX0EOEmo.js";import{n as tS}from"./LinkExternal01-C6Bmw0m6.js";import{I as gn}from"./integration-icon-MouDA4V6.js";import{i as AI}from"./ArrowUpRight-BQZOilTG.js";import{a as Tf}from"./Users03-TIXCT7Lp.js";import{a as jt}from"./Palette-iwM8hSr_.js";import{c as nS}from"./use-navigate-to-agent-CvMJ7nhQ.js";import{a as _I}from"./Stars02-C-JOVi71.js";import{g as xI}from"./AreaChart-Dix8LhoJ.js";import{a as kI,F as II,b as NI,c as vI,d as CI,e as RI}from"./form-CGaw2YpJ.js";import{I as wI}from"./input-Bp56QPzT.js";import{S as OI}from"./spinner-5nEupkU1.js";const LI={openrouter:t=>{const e=t?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function rS(t){if(!t?.providerMetadata)return 0;for(const e of Object.values(LI)){const n=e(t.providerMetadata);if(n!==null)return n}return 0}function aS(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function iS(t,e){if(!e)return t;const n=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,r=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:t.inputTokens+(e.inputTokens??0),outputTokens:t.outputTokens+(e.outputTokens??0),reasoningTokens:t.reasoningTokens+(e.reasoningTokens??0),totalTokens:t.totalTokens+(e.totalTokens??0),cost:t.cost+rS(e),cacheReadTokens:t.cacheReadTokens+n,cacheWriteTokens:t.cacheWriteTokens+r}}function dz(t){return t.reduce((e,n)=>iS(e,n.metadata?.usage),aS())}const DI={damping:.7,stiffness:.05,mass:1.25},MI=70,PI=1e3/60,FI=350;let _i=!1;globalThis.document?.addEventListener("mousedown",()=>{_i=!0});globalThis.document?.addEventListener("mouseup",()=>{_i=!1});globalThis.document?.addEventListener("click",()=>{_i=!1});const BI=(t={})=>{const[e,n]=z.useState(!1),[r,a]=z.useState(t.initial!==!1),[i,s]=z.useState(!1),o=z.useRef(null);o.current=t;const l=z.useCallback(()=>{if(!_i)return!1;const y=window.getSelection();if(!y||!y.rangeCount)return!1;const A=y.getRangeAt(0);return A.commonAncestorContainer.contains(T.current)||T.current?.contains(A.commonAncestorContainer)},[]),u=z.useCallback(y=>{c.isAtBottom=y,a(y)},[]),d=z.useCallback(y=>{c.escapedFromLock=y,n(y)},[]),c=z.useMemo(()=>{let y;return{escapedFromLock:e,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return T.current?.scrollTop??0},set scrollTop(A){if(T.current){const{scrollBehavior:_}=getComputedStyle(T.current);_!=="auto"&&(T.current.style.scrollBehavior="auto"),T.current.scrollTop=A,c.ignoreScrollToTop=T.current.scrollTop,_!=="auto"&&(T.current.style.scrollBehavior=_)}},get targetScrollTop(){return!T.current||!S.current?0:T.current.scrollHeight-1-T.current.clientHeight},get calculatedTargetScrollTop(){if(!T.current||!S.current)return 0;const{targetScrollTop:A}=this;if(!t.targetScrollTop)return A;if(y?.targetScrollTop===A)return y.calculatedScrollTop;const _=Math.max(Math.min(t.targetScrollTop(A,{scrollElement:T.current,contentElement:S.current}),A),0);return y={targetScrollTop:A,calculatedScrollTop:_},requestAnimationFrame(()=>{y=void 0}),_},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=MI}}},[]),p=z.useCallback((y={})=>{typeof y=="string"&&(y={animation:y}),y.preserveScrollPosition||u(!0);const A=Date.now()+(Number(y.wait)||0),_=Qi(o.current,y.animation),{ignoreEscapes:k=!1}=y;let E,x=c.calculatedTargetScrollTop;y.duration instanceof Promise?y.duration.finally(()=>{E=Date.now()}):E=A+(y.duration??0);const v=async()=>{const N=new Promise(requestAnimationFrame).then(()=>{if(!c.isAtBottom)return c.animation=void 0,!1;const{scrollTop:I}=c,L=performance.now(),M=(L-(c.lastTick??L))/PI;if(c.animation||(c.animation={behavior:_,promise:N,ignoreEscapes:k}),c.animation.behavior===_&&(c.lastTick=L),l()||A>Date.now())return v();if(I<Math.min(x,c.calculatedTargetScrollTop)){if(c.animation?.behavior===_){if(_==="instant")return c.scrollTop=c.calculatedTargetScrollTop,v();c.velocity=(_.damping*c.velocity+_.stiffness*c.scrollDifference)/_.mass,c.accumulated+=c.velocity*M,c.scrollTop+=c.accumulated,c.scrollTop!==I&&(c.accumulated=0)}return v()}return E>Date.now()?(x=c.calculatedTargetScrollTop,v()):(c.animation=void 0,c.scrollTop<c.calculatedTargetScrollTop?p({animation:Qi(o.current,o.current.resize),ignoreEscapes:k,duration:Math.max(0,E-Date.now())||void 0}):c.isAtBottom)});return N.then(I=>(requestAnimationFrame(()=>{c.animation||(c.lastTick=void 0,c.velocity=0)}),I))};return y.wait!==!0&&(c.animation=void 0),c.animation?.behavior===_?c.animation.promise:v()},[u,l,c]),f=z.useCallback(()=>{d(!0),u(!1)},[d,u]),g=z.useCallback(({target:y})=>{if(y!==T.current)return;const{scrollTop:A,ignoreScrollToTop:_}=c;let{lastScrollTop:k=A}=c;c.lastScrollTop=A,c.ignoreScrollToTop=void 0,_&&_>A&&(k=_),s(c.isNearBottom),setTimeout(()=>{if(c.resizeDifference||A===_)return;if(l()){d(!0),u(!1);return}const E=A>k,x=A<k;if(c.animation?.ignoreEscapes){c.scrollTop=k;return}x&&(d(!0),u(!1)),E&&d(!1),!c.escapedFromLock&&c.isNearBottom&&u(!0)},1)},[d,u,l,c]),b=z.useCallback(({target:y,deltaY:A})=>{let _=y;for(;!["scroll","auto"].includes(getComputedStyle(_).overflow);){if(!_.parentElement)return;_=_.parentElement}_===T.current&&A<0&&T.current.scrollHeight>T.current.clientHeight&&!c.animation?.ignoreEscapes&&(d(!0),u(!1))},[d,u,c]),T=Wm(y=>{T.current?.removeEventListener("scroll",g),T.current?.removeEventListener("wheel",b),y?.addEventListener("scroll",g,{passive:!0}),y?.addEventListener("wheel",b,{passive:!0})},[]),S=Wm(y=>{if(c.resizeObserver?.disconnect(),c.resizeObserver=void 0,!y)return;let A;c.resizeObserver=new ResizeObserver(([_])=>{const{height:k}=_.contentRect,E=k-(A??k);if(c.resizeDifference=E,c.scrollTop>c.targetScrollTop&&(c.scrollTop=c.targetScrollTop),s(c.isNearBottom),E>=0){const x=Qi(o.current,A?o.current.resize:o.current.initial);p({animation:x,wait:!0,preserveScrollPosition:!0,duration:x==="instant"?void 0:FI})}else c.isNearBottom&&(d(!1),u(!0));A=k,requestAnimationFrame(()=>{setTimeout(()=>{c.resizeDifference===E&&(c.resizeDifference=0)},1)})}),c.resizeObserver?.observe(y)},[]);return{contentRef:S,scrollRef:T,scrollToBottom:p,stopScroll:f,isAtBottom:r||i,isNearBottom:i,escapedFromLock:e,state:c}};function Wm(t,e){const n=z.useCallback(r=>(n.current=r,t(r)),e);return n}const Zi=new Map;function Qi(...t){const e={...DI};let n=!1;for(const a of t){if(a==="instant"){n=!0;continue}typeof a=="object"&&(n=!1,e.damping=a.damping??e.damping,e.stiffness=a.stiffness??e.stiffness,e.mass=a.mass??e.mass)}const r=JSON.stringify(e);return Zi.has(r)||Zi.set(r,Object.freeze(e)),n?"instant":Zi.get(r)}function UI(t){let e=2166136261;for(let n=0;n<t.length;n++)e=Math.imul(e^t.charCodeAt(n),16777619);return`a${(e>>>0).toString(36).padStart(6,"0").slice(-6)}`}function yf(t){if(t&&typeof t=="object"&&"gatewayClientId"in t&&typeof t.gatewayClientId=="string")return t.gatewayClientId}function Sf(t,e){if(!e)return t;const n=`${UI(e)}_`;return t.startsWith(n)?t.slice(n.length):t}function HI(t,e){return Sf(t,e).replace(/[_-]/g," ").toLowerCase()}function jI(t){const e={};for(const n of t?.arguments??[])e[n.name]=n.required?jm().min(1,"Required"):jm();return Hx(e)}function $I(t,e){const n={};for(const r of t.arguments??[])n[r.name]=e?.[r.name]??"";return n}function zI(t){const e=W.c(67),{prompt:n,setPrompt:r,onSubmit:a,defaultValues:i}=t,s=z.useId();let o,l;if(e[0]!==n){const G=jI(n);l=jx,o=Ux(G),e[0]=n,e[1]=o,e[2]=l}else o=e[1],l=e[2];let u;e[3]!==i||e[4]!==n?(u=n?$I(n,i):{},e[3]=i,e[4]=n,e[5]=u):u=e[5];let d;e[6]!==o||e[7]!==u?(d={resolver:o,defaultValues:u,mode:"onChange"},e[6]=o,e[7]=u,e[8]=d):d=e[8];const c=l(d);let p;e[9]!==n?.arguments?(p=n?.arguments??[],e[9]=n?.arguments,e[10]=p):p=e[10];const f=p;let g;e[11]!==c||e[12]!==a||e[13]!==r?(g=async G=>{await a(G),r(null),c.reset()},e[11]=c,e[12]=a,e[13]=r,e[14]=g):g=e[14];const b=g;let T;e[15]!==c||e[16]!==r?(T=G=>{G||(c.reset(),r(null))},e[15]=c,e[16]=r,e[17]=T):T=e[17];const S=T;if(!n)return null;let y;e[18]!==n._meta||e[19]!==n.name||e[20]!==n.title?(y=n.title||HI(n.name,yf(n._meta)),e[18]=n._meta,e[19]=n.name,e[20]=n.title,e[21]=y):y=e[21];let A;e[22]!==y?(A=m.jsx(Gy,{children:m.jsx("span",{className:"capitalize",children:y})}),e[22]=y,e[23]=A):A=e[23];let _;e[24]!==n.description?(_=n.description&&m.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[24]=n.description,e[25]=_):_=e[25];let k;e[26]!==_||e[27]!==A?(k=m.jsxs(Ik,{children:[A,_]}),e[26]=_,e[27]=A,e[28]=k):k=e[28];let E;e[29]!==c||e[30]!==b?(E=G=>{G.stopPropagation(),c.handleSubmit(b)(G)},e[29]=c,e[30]=b,e[31]=E):E=e[31];let x;if(e[32]!==f||e[33]!==c.control||e[34]!==c.formState.isSubmitting){let G;e[36]!==c.control||e[37]!==c.formState.isSubmitting?(G=j=>m.jsx(II,{control:c.control,name:j.name,render:V=>{const{field:C}=V;return m.jsxs(NI,{children:[m.jsxs(vI,{className:"text-xs",children:[j.name,j.required?null:m.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),m.jsx(CI,{children:m.jsx(wI,{...C,value:C.value??"",required:j.required,placeholder:j.description??"",className:"h-9",disabled:c.formState.isSubmitting})}),m.jsx(RI,{})]})}},j.name),e[36]=c.control,e[37]=c.formState.isSubmitting,e[38]=G):G=e[38],x=f.map(G),e[32]=f,e[33]=c.control,e[34]=c.formState.isSubmitting,e[35]=x}else x=e[35];let v;e[39]!==S?(v=()=>S(!1),e[39]=S,e[40]=v):v=e[40];let N;e[41]!==c.formState.isSubmitting||e[42]!==v?(N=m.jsx(tn,{type:"button",variant:"ghost",onClick:v,disabled:c.formState.isSubmitting,children:"Cancel"}),e[41]=c.formState.isSubmitting,e[42]=v,e[43]=N):N=e[43];let I;e[44]!==c.formState.isSubmitting?(I=c.formState.isSubmitting?m.jsxs("span",{className:"flex items-center gap-2",children:[m.jsx(OI,{size:"xs"}),"Loading..."]}):"Use prompt",e[44]=c.formState.isSubmitting,e[45]=I):I=e[45];let L;e[46]!==c.formState.isSubmitting||e[47]!==s||e[48]!==I?(L=m.jsx(tn,{type:"submit",form:s,disabled:c.formState.isSubmitting,children:I}),e[46]=c.formState.isSubmitting,e[47]=s,e[48]=I,e[49]=L):L=e[49];let M;e[50]!==N||e[51]!==L?(M=m.jsxs(Nk,{children:[N,L]}),e[50]=N,e[51]=L,e[52]=M):M=e[52];let B;e[53]!==s||e[54]!==E||e[55]!==x||e[56]!==M?(B=m.jsxs("form",{id:s,className:"space-y-4 py-4",autoComplete:"off",onSubmit:E,children:[x,M]}),e[53]=s,e[54]=E,e[55]=x,e[56]=M,e[57]=B):B=e[57];let F;e[58]!==c||e[59]!==B?(F=m.jsx(kI,{...c,children:B}),e[58]=c,e[59]=B,e[60]=F):F=e[60];let P;e[61]!==k||e[62]!==F?(P=m.jsxs(vk,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[k,F]}),e[61]=k,e[62]=F,e[63]=P):P=e[63];let H;return e[64]!==S||e[65]!==P?(H=m.jsx(Vy,{open:!0,onOpenChange:S,children:P}),e[64]=S,e[65]=P,e[66]=H):H=e[66],H}const qI=/^mcp__[a-zA-Z0-9_-]+__/;function sS(t){return t.replace(qI,"")}function Af(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Pn=Af();function oS(t){Pn=t}var _r={exec:()=>null};function ve(t,e=""){let n=typeof t=="string"?t:t.source;const r={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(it.caret,"$1"),n=n.replace(a,s),r},getRegex:()=>new RegExp(n,e)};return r}var it={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:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},GI=/^(?:[ \t]*(?:\n|$))+/,VI=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,WI=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Zr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,YI=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_f=/(?:[*+-]|\d{1,9}[.)])/,lS=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,uS=ve(lS).replace(/bull/g,_f).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(),KI=ve(lS).replace(/bull/g,_f).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(),xf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,XI=/^[^\n]+/,kf=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ZI=ve(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",kf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),QI=ve(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_f).getRegex(),xi="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",If=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,JI=ve("^ {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",If).replace("tag",xi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),cS=ve(xf).replace("hr",Zr).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",xi).getRegex(),eN=ve(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",cS).getRegex(),Nf={blockquote:eN,code:VI,def:ZI,fences:WI,heading:YI,hr:Zr,html:JI,lheading:uS,list:QI,newline:GI,paragraph:cS,table:_r,text:XI},Ym=ve("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Zr).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",xi).getRegex(),tN={...Nf,lheading:KI,table:Ym,paragraph:ve(xf).replace("hr",Zr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ym).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",xi).getRegex()},nN={...Nf,html:ve(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",If).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:_r,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ve(xf).replace("hr",Zr).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",uS).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},rN=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,aN=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,dS=/^( {2,}|\\)\n(?!\s*$)/,iN=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ki=/[\p{P}\p{S}]/u,vf=/[\s\p{P}\p{S}]/u,pS=/[^\s\p{P}\p{S}]/u,sN=ve(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,vf).getRegex(),fS=/(?!~)[\p{P}\p{S}]/u,oN=/(?!~)[\s\p{P}\p{S}]/u,lN=/(?:[^\s\p{P}\p{S}]|~)/u,uN=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,mS=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,cN=ve(mS,"u").replace(/punct/g,ki).getRegex(),dN=ve(mS,"u").replace(/punct/g,fS).getRegex(),hS="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",pN=ve(hS,"gu").replace(/notPunctSpace/g,pS).replace(/punctSpace/g,vf).replace(/punct/g,ki).getRegex(),fN=ve(hS,"gu").replace(/notPunctSpace/g,lN).replace(/punctSpace/g,oN).replace(/punct/g,fS).getRegex(),mN=ve("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,pS).replace(/punctSpace/g,vf).replace(/punct/g,ki).getRegex(),hN=ve(/\\(punct)/,"gu").replace(/punct/g,ki).getRegex(),gN=ve(/^<(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(),bN=ve(If).replace("(?:-->|$)","-->").getRegex(),EN=ve("^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",bN).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Oa=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,TN=ve(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Oa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),gS=ve(/^!?\[(label)\]\[(ref)\]/).replace("label",Oa).replace("ref",kf).getRegex(),bS=ve(/^!?\[(ref)\](?:\[\])?/).replace("ref",kf).getRegex(),yN=ve("reflink|nolink(?!\\()","g").replace("reflink",gS).replace("nolink",bS).getRegex(),Cf={_backpedal:_r,anyPunctuation:hN,autolink:gN,blockSkip:uN,br:dS,code:aN,del:_r,emStrongLDelim:cN,emStrongRDelimAst:pN,emStrongRDelimUnd:mN,escape:rN,link:TN,nolink:bS,punctuation:sN,reflink:gS,reflinkSearch:yN,tag:EN,text:iN,url:_r},SN={...Cf,link:ve(/^!?\[(label)\]\((.*?)\)/).replace("label",Oa).getRegex(),reflink:ve(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Oa).getRegex()},yp={...Cf,emStrongRDelimAst:fN,emStrongLDelim:dN,url:ve(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},AN={...yp,br:ve(dS).replace("{2,}","*").getRegex(),text:ve(yp.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},la={normal:Nf,gfm:tN,pedantic:nN},dr={normal:Cf,gfm:yp,breaks:AN,pedantic:SN},_N={"&":"&","<":"<",">":">",'"':""","'":"'"},Km=t=>_N[t];function Dt(t,e){if(e){if(it.escapeTest.test(t))return t.replace(it.escapeReplace,Km)}else if(it.escapeTestNoEncode.test(t))return t.replace(it.escapeReplaceNoEncode,Km);return t}function Xm(t){try{t=encodeURI(t).replace(it.percentDecode,"%")}catch{return null}return t}function Zm(t,e){const n=t.replace(it.findPipe,(i,s,o)=>{let l=!1,u=s;for(;--u>=0&&o[u]==="\\";)l=!l;return l?"|":" |"}),r=n.split(it.splitPipe);let a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(it.slashPipe,"|");return r}function pr(t,e,n){const r=t.length;if(r===0)return"";let a=0;for(;a<r&&t.charAt(r-a-1)===e;)a++;return t.slice(0,r-a)}function xN(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function Qm(t,e,n,r,a){const i=e.href,s=e.title||null,o=t[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;const l={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:s,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,l}function kN(t,e,n){const r=t.match(n.other.indentCodeCompensation);if(r===null)return e;const a=r[1];return e.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 La=class{options;rules;lexer;constructor(t){this.options=t||Pn}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:pr(n,`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as B,j as o,b as D,F as M,d as $,r as q,B as F,p as R}from"./index-
|
|
1
|
+
import{c as B,j as o,b as D,F as M,d as $,r as q,B as F,p as R}from"./index-DqXmpRSX.js";import{s as V}from"./Plus-CPMXdWiF.js";import{i as S}from"./Zap-CRace4eX.js";import{S as G}from"./search-input-B0jSz39p.js";import{P as d}from"./index-DBLw6mkp.js";import{E as T}from"./empty-state-Cp0ZI-r6.js";import{c as H}from"./use-automations-D97aWna-.js";import{c as J}from"./use-navigate-to-agent-CvMJ7nhQ.js";import{A as K}from"./automation-list-row-Bs0wFLr_.js";import{q as O}from"./use-mcp-client-DwJl6WIN.js";import{a as Q}from"./use-virtual-mcp-Co2Gxa_g.js";import{R as U}from"./require-capability-CCuG3VBt.js";import"./SearchMd-kaVQ2swy.js";import"./sidebar-BiPc8cWL.js";import"./LayoutLeft-YSlG5Bjd.js";import"./use-mobile-lAVE_tNN.js";import"./X-CbfkAYzJ.js";import"./tooltip-DJ0CJ4nu.js";import"./studio-tools-DvotCHSX.js";import"./hooks-D6e52Y4T.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-CmuV2kHg.js";import"./reusable-new-chat-CouMjkYR.js";import"./alert-dialog-iPj1kFsb.js";import"./dropdown-menu-DUU_gv0n.js";import"./Check-D3kjZMFv.js";import"./ChevronRight-CwImj32A.js";import"./DotsVertical-CrKPB-rb.js";import"./Stars02-C-JOVi71.js";import"./Trash01-BT5A-gEY.js";import"./agent-icon-OqQTNFsC.js";import"./AlertCircle-BHNP9rUU.js";import"./Tool01-pHGWkh_u.js";import"./ArrowUp-CYmWic6A.js";import"./Settings02-D2WBE2j5.js";import"./Tool02-C5toOJ2s.js";import"./XCircle-DsHpzoj1.js";import"./ArrowUpRight-BQZOilTG.js";import"./TrendUp01-ByibXYAc.js";import"./ZapSquare-Bz1NVv_t.js";import"./Users03-TIXCT7Lp.js";import"./CheckCircle-myRIyunA.js";import"./ChevronDown-Dn2piZ2G.js";import"./ChevronUp-N9Uneycs.js";import"./Copy01-CFdaASyO.js";import"./CpuChip01-W_PpJOQC.js";import"./Eye-DJcOc9Zw.js";import"./FilterLines-BFYjIaR9.js";import"./Star01-CduFPScO.js";import"./Palette-iwM8hSr_.js";import"./SwitchHorizontal01-Cm3MVkwA.js";import"./HardDrive-B2_Ula85.js";import"./Key01-BU6DEShZ.js";import"./LinkExternal01-C6Bmw0m6.js";import"./LogOut01-Cc5p345m.js";import"./Monitor01-Car-ubqN.js";import"./Sun-C2hxlxHa.js";import"./Play-BOQvMkTV.js";import"./SearchLg-Ccga3kHp.js";import"./Shield01-BrHF2Qbg.js";import"./Stars01-BpwKVOpQ.js";import"./Upload01-wyU_c8og.js";import"./User01-BgOg9cVa.js";import"./Users01-CXIce8sr.js";import"./XClose-Dg24hRTQ.js";import"./auth-CU9nh5v5.js";import"./use-capability-DjWP4c_V.js";import"./access-gate-B8ke5V9B.js";import"./capability-load-error-sN01EV-h.js";function W(){const t=B.c(20),e=D(),{org:c}=M(),{data:C}=H(void 0),g=C===void 0?[]:C,k=Q(),P=J(),f=$(),[x,E]=q.useState(""),h=x.toLowerCase(),A=new Map(k.map(X)),b=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const p=A.get(i.virtual_mcp_id);if(p&&p.title.toLowerCase().includes(h))return!0}return!1}),z=(i,p)=>{const N=p&&A.has(p)?p:O(c.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),P(N,{search:{main:"automation:"+i}})};let l;t[0]!==f||t[1]!==c.slug?(l=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/agents",params:{org:c.slug}})},t[0]=f,t[1]=c.slug,t[2]=l):l=t[2];const L=l,j=d,v=d,w=d;let s;t[3]!==e?(s=e("settings.automations.pageTitle"),t[3]=e,t[4]=s):s=t[4];let r;t[5]!==s?(r=o.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const _=g.length>0&&o.jsx(G,{value:x,onChange:E,placeholder:e("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let m;t[7]!==r||t[8]!==_?(m=o.jsxs("div",{className:"flex flex-col gap-6",children:[r,_]}),t[7]=r,t[8]=_,t[9]=m):m=t[9];const y=g.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:e("settings.automations.emptyTitle"),description:e("settings.automations.emptyDescription"),actions:o.jsxs(F,{size:"sm",onClick:L,children:[o.jsx(V,{size:14}),e("settings.automations.browseAgentsButton")]})})}):b.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:e("settings.automations.noResultsTitle"),description:e("settings.automations.noResultsDescription",{search:x})})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:b.map(i=>o.jsx(K,{automation:i,showAgent:!0,onClick:()=>z(i.id,i.virtual_mcp_id)},i.id))});let n;t[10]!==w.Body||t[11]!==m||t[12]!==y?(n=o.jsxs(w.Body,{children:[m,y]}),t[10]=w.Body,t[11]=m,t[12]=y,t[13]=n):n=t[13];let a;t[14]!==v.Content||t[15]!==n?(a=o.jsx(v.Content,{children:n}),t[14]=v.Content,t[15]=n,t[16]=a):a=t[16];let u;return t[17]!==j||t[18]!==a?(u=o.jsx(j,{children:a}),t[17]=j,t[18]=a,t[19]=u):u=t[19],u}function X(t){return[t.id,t]}function go(){const t=B.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(U,{capability:"automations:manage",area:"automations",children:o.jsx(W,{})}),t[0]=e):e=t[0],e}export{go as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as i,m as f,bs as R,cM as V,cN as I,cO as O}from"./index-
|
|
1
|
+
import{c as k,j as i,m as f,bs as R,cM as V,cN as I,cO as O}from"./index-DqXmpRSX.js";import{s as $}from"./User01-BgOg9cVa.js";function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(O,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function U(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(V,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function E(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(I,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const S=R("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),_=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),D=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function W(r){const e=k.c(34);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g;let x;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],x=c;break e}x=t}const m=x;let y;e:{if(j){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const F=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=f(S({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==m||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",z),children:i.jsx($,{size:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(U,{src:l,loading:"lazy",alt:"Avatar",className:f(_({objectFit:u}))}),i.jsx(E,{className:f(z,"rounded-none"),delayMs:l?600:0,children:m})]}),e[22]=z,e[23]=m,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(M,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function B(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,x=h??"base";let m;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==x||e[16]!==l?(m=i.jsx(W,{shape:b,url:l,fallback:t,size:x,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=b,e[15]=x,e[16]=l,e[17]=m):m=e[17],m}B.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(S({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{B as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,m as l,j as g,b4 as v,bs as b}from"./index-
|
|
1
|
+
import{c as u,m as l,j as g,b4 as v,bs as b}from"./index-DqXmpRSX.js";const f=b("inline-flex items-center justify-center rounded-full border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"},size:{default:"px-2 py-0.5",icon:"size-5"}},defaultVariants:{variant:"default",size:"default"}});function h(c){const e=u.c(14);let r,s,i,n,t;e[0]!==c?({className:r,variant:t,size:i,asChild:n,...s}=c,e[0]=c,e[1]=r,e[2]=s,e[3]=i,e[4]=n,e[5]=t):(r=e[1],s=e[2],i=e[3],n=e[4],t=e[5]);const d=(n===void 0?!1:n)?v:"span";let a;e[6]!==r||e[7]!==i||e[8]!==t?(a=l(f({variant:t,size:i}),r),e[6]=r,e[7]=i,e[8]=t,e[9]=a):a=e[9];let o;return e[10]!==d||e[11]!==s||e[12]!==a?(o=g.jsx(d,{"data-slot":"badge",className:a,...s}),e[10]=d,e[11]=s,e[12]=a,e[13]=o):o=e[13],o}export{h as B};
|