decocms 4.357.1 → 4.357.2
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-UmLlY8gt.js → AlertCircle-DLI_y0kQ.js} +1 -1
- package/dist/client/assets/{AreaChart-DQQeycfj.js → AreaChart-He1fiu83.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CKGsgaFO.js → ArrowLeft-BHvdpjN6.js} +1 -1
- package/dist/client/assets/{ArrowRight-DkzY_YHb.js → ArrowRight-Bj-GI8Ha.js} +1 -1
- package/dist/client/assets/{ArrowUp-tJnhyHYV.js → ArrowUp-CxQswJ1J.js} +1 -1
- package/dist/client/assets/{Check-mIk-Zdri.js → Check-0QGdBtav.js} +1 -1
- package/dist/client/assets/{CheckCircle-DrFO4Bvc.js → CheckCircle-5uMvqoZP.js} +1 -1
- package/dist/client/assets/{ChevronRight-CoUl6dHM.js → ChevronRight-KK3qfphJ.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DgbgJIgx.js → ChevronSelectorVertical-Di4HYY3d.js} +1 -1
- package/dist/client/assets/{ChevronUp-BsQdOFhn.js → ChevronUp-Bsn6saD9.js} +1 -1
- package/dist/client/assets/{Copy01-B9voSPXW.js → Copy01-BMRPuGV4.js} +1 -1
- package/dist/client/assets/{CreditCard01-BwVgysoQ.js → CreditCard01-DNen_i5r.js} +1 -1
- package/dist/client/assets/{DotsVertical-LQnPIhpJ.js → DotsVertical-Dn-MiDeI.js} +1 -1
- package/dist/client/assets/{Download01-DuC_qV7_.js → Download01-CjNeMHjR.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-B2GlswO2.js → ErrorBarContext-CHi_lKnk.js} +1 -1
- package/dist/client/assets/{Eye-BNbA0ZH1.js → Eye-C1VPVGim.js} +1 -1
- package/dist/client/assets/{GitBranch01-CEGTuE7l.js → GitBranch01-G5fhFibo.js} +1 -1
- package/dist/client/assets/{Globe01-Ct8tiHdr.js → Globe01-Clx3pMu_.js} +1 -1
- package/dist/client/assets/{HardDrive-DeQRGeCm.js → HardDrive-Bkv0QB9j.js} +1 -1
- package/dist/client/assets/{Image01-BOV108nN.js → Image01-CZhyMtEF.js} +1 -1
- package/dist/client/assets/{Key01-DwPkNGAi.js → Key01-l9rf_sae.js} +1 -1
- package/dist/client/assets/{Link01-CaYtZMuf.js → Link01-pmZ5qfde.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BL5IYsGT.js → LinkExternal01-Bi0ckUR6.js} +1 -1
- package/dist/client/assets/{Monitor01-CcdvNcNU.js → Monitor01-DQ4DwDZX.js} +1 -1
- package/dist/client/assets/{Package-DuXJoDs3.js → Package-B9_K7TDa.js} +1 -1
- package/dist/client/assets/{Palette-BZ4o6l5p.js → Palette-Zdsosz4A.js} +1 -1
- package/dist/client/assets/{Play-BuyaXe7U.js → Play-B2K3VjrI.js} +1 -1
- package/dist/client/assets/{Plus-3CMW8aY5.js → Plus-BVBatL9e.js} +1 -1
- package/dist/client/assets/{SearchLg-Cw3nH7Cl.js → SearchLg-DgVlNXZH.js} +1 -1
- package/dist/client/assets/{SearchMd-DNTL0r7E.js → SearchMd-BtTKbpV7.js} +1 -1
- package/dist/client/assets/{Sector-KEmpVao_.js → Sector-oMsVtzCI.js} +1 -1
- package/dist/client/assets/{Settings02-BkXl17NJ.js → Settings02-DQCTSExV.js} +1 -1
- package/dist/client/assets/{Share07-_ciA_Du3.js → Share07-Dx_n7EOa.js} +1 -1
- package/dist/client/assets/{Shield01-DEeMJbvH.js → Shield01-Bvpvo2K4.js} +1 -1
- package/dist/client/assets/{Stars01-119xkrYB.js → Stars01-DhkBdj_U.js} +1 -1
- package/dist/client/assets/{Sun-iXMmiuE1.js → Sun-VtPgnV_v.js} +1 -1
- package/dist/client/assets/{Tool01-CxaNpYBN.js → Tool01-BmwTwlfJ.js} +1 -1
- package/dist/client/assets/{Tool02-D8aijKEK.js → Tool02-CRYhfXhb.js} +1 -1
- package/dist/client/assets/{Trash01-aDQVPlte.js → Trash01-D31Ecr1x.js} +1 -1
- package/dist/client/assets/{TrendUp01-BPcG0VZ2.js → TrendUp01-Caylus7C.js} +1 -1
- package/dist/client/assets/{Upload01-DP3uFIbj.js → Upload01-CEjRMsQd.js} +1 -1
- package/dist/client/assets/{User01-uB5x1Z7I.js → User01-vZR-v-xR.js} +1 -1
- package/dist/client/assets/{UserSquare-DgMxtQAT.js → UserSquare-B7TexH1I.js} +1 -1
- package/dist/client/assets/{Users01-C5oQyGpK.js → Users01-C3DEUFYy.js} +1 -1
- package/dist/client/assets/{Users03-DLEUw1TQ.js → Users03-D5nR6s0o.js} +1 -1
- package/dist/client/assets/{XCircle-CPARFFz5.js → XCircle-C4td4Lhj.js} +1 -1
- package/dist/client/assets/{XClose-D4ceJ-NM.js → XClose-DbuRGbMN.js} +1 -1
- package/dist/client/assets/{Zap-CN63rPHF.js → Zap-DyQlkdep.js} +1 -1
- package/dist/client/assets/{ZoomOut-C2eKrhT6.js → ZoomOut-CSVII-Bq.js} +1 -1
- package/dist/client/assets/{access-gate-BL9g1s42.js → access-gate-gSKKLOGB.js} +1 -1
- package/dist/client/assets/{agent-icon-CNkeVIGx.js → agent-icon-nBcb3BwE.js} +1 -1
- package/dist/client/assets/{agents-list-DcW9W957.js → agents-list-D_wwP_DY.js} +1 -1
- package/dist/client/assets/{ai-providers-Cg7WqewV.js → ai-providers-CmlDRHhH.js} +1 -1
- package/dist/client/assets/{alert-DuYG853b.js → alert-C9OUQRm7.js} +1 -1
- package/dist/client/assets/{alert-dialog-yY0onn0b.js → alert-dialog-DjjgGJeL.js} +1 -1
- package/dist/client/assets/{analytics-tab-CBaiSDzS.js → analytics-tab-jIp9vgl6.js} +1 -1
- package/dist/client/assets/api-keys-4ZdpS7lJ.js +1 -0
- package/dist/client/assets/{api-keys-DZUDO68_.js → api-keys-D_hTubUN.js} +1 -1
- package/dist/client/assets/{app-editor-DhnCLGga.js → app-editor-mebVvufE.js} +1 -1
- package/dist/client/assets/{auth-BifFxAMn.js → auth-B8Mzm_EX.js} +1 -1
- package/dist/client/assets/{auth-catchall-B0Qn0v5n.js → auth-catchall-BrlrtPGW.js} +1 -1
- package/dist/client/assets/{auth-entry-PO0b8IvR.js → auth-entry-BPPlsuOp.js} +1 -1
- package/dist/client/assets/{auth-split-layout-C99XAMUI.js → auth-split-layout-DFtmfJha.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-B89pdNMd.js → authenticate-and-persist-oauth-COQadTKi.js} +1 -1
- package/dist/client/assets/{automation-list-row-CzBcz6q8.js → automation-list-row-CpUaZGVF.js} +1 -1
- package/dist/client/assets/{automation-runs-CkurNXaa.js → automation-runs-Bb3CkrSt.js} +1 -1
- package/dist/client/assets/{automations-C796hwhr.js → automations-C570Rd34.js} +1 -1
- package/dist/client/assets/{autosend-H7vEr2E4.js → autosend-CBht_WWv.js} +1 -1
- package/dist/client/assets/{avatar-BRVlWhlB.js → avatar-BuB9trA8.js} +1 -1
- package/dist/client/assets/{badge-Bek9yAA7.js → badge-BMwkZ7og.js} +1 -1
- package/dist/client/assets/{block-document-C7l_-EBM.js → block-document-J_JsXkzG.js} +1 -1
- package/dist/client/assets/{breadcrumb-CqlTgO8l.js → breadcrumb-DhPILjvE.js} +1 -1
- package/dist/client/assets/{buckets-BTiZmovd.js → buckets-CdXybDIC.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CdkBUcU1.js → bulk-category-panel-6ClVqTlr.js} +1 -1
- package/dist/client/assets/{capability-load-error-C8dRTAUB.js → capability-load-error-Cp8uXuck.js} +1 -1
- package/dist/client/assets/{cards-C-vB_PHu.js → cards-6-8Wyhkv.js} +1 -1
- package/dist/client/assets/{category-editor-DOHGDj5Z.js → category-editor-BgQA9dNM.js} +1 -1
- package/dist/client/assets/{cdn-tab-x9o5M_Ww.js → cdn-tab-B1sXMhCc.js} +1 -1
- package/dist/client/assets/{chart-qdoCOGln.js → chart-CCEGAvV2.js} +1 -1
- package/dist/client/assets/{chat-context-kYTm66h1.js → chat-context-Blfv3wym.js} +1 -1
- package/dist/client/assets/{checkbox-D5UNPAi9.js → checkbox-DALxDqxN.js} +1 -1
- package/dist/client/assets/{choose-editor-Dslm8T8o.js → choose-editor-qn2lVpAu.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DOUtQsSl.js → cli-auth-success-BbwNlDLd.js} +1 -1
- package/dist/client/assets/{client-icons-DiZSUf5o.js → client-icons-DVPbIzit.js} +1 -1
- package/dist/client/assets/{collection-detail-Xf86HRc4.js → collection-detail-DHVhs9Ga.js} +1 -1
- package/dist/client/assets/{collection-display-button-BFmvDGYf.js → collection-display-button-Dw8P8MSS.js} +1 -1
- package/dist/client/assets/{collection-search-DgCzDom2.js → collection-search-Dsxgd7dA.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DWmtfHla.js → collection-table-wrapper-Ce76Q2dX.js} +1 -1
- package/dist/client/assets/{collection-tabs-htCjlN6e.js → collection-tabs-2A9_kiub.js} +1 -1
- package/dist/client/assets/{command-C8qMEhaG.js → command-CU2f3ZEt.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-DTQ0b9qS.js → commerce-onboarding-C-jn8m_F.js} +1 -1
- package/dist/client/assets/{connect-CAB2STVc.js → connect-DW6bQcKU.js} +1 -1
- package/dist/client/assets/{connect-layout-DrVv2vSW.js → connect-layout-BDyGEFK0.js} +1 -1
- package/dist/client/assets/{connection-D3PCvxub.js → connection-DXA3joTG.js} +1 -1
- package/dist/client/assets/{connection-card-CuQsth2r.js → connection-card-Dcl4Fay7.js} +1 -1
- package/dist/client/assets/{connection-detail-_Gp4DDsf.js → connection-detail-BjdZkUZ4.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-GOmangL6.js → connection-form-helpers-BOSwNvX9.js} +1 -1
- package/dist/client/assets/{connections-BPVxWIfq.js → connections-8IVVHc_b.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-DnARvowu.js → create-organization-dialog-BUMA72tj.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-CGUVxGA5.js → decopilot-sse-pool-CtuHCUcW.js} +1 -1
- package/dist/client/assets/{dialog-D6PrlHs3.js → dialog-BF8EEHBt.js} +1 -1
- package/dist/client/assets/{domain-settings-BBTMrO34.js → domain-settings-U88kGZyc.js} +1 -1
- package/dist/client/assets/{drawer-CKDQN4Qv.js → drawer-DxCOSfMO.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BN-ZPax7.js → dropdown-menu-Cil9yCsU.js} +1 -1
- package/dist/client/assets/{e2e-tab-BlET88YO.js → e2e-tab-DqkgTFSd.js} +1 -1
- package/dist/client/assets/{editor-0D0nYwQZ.js → editor-E5N3yCZ8.js} +1 -1
- package/dist/client/assets/{empty-state-PedwR9BY.js → empty-state-CANiglei.js} +1 -1
- package/dist/client/assets/{empty-state-oW1HtioG.js → empty-state-CuLrasEG.js} +1 -1
- package/dist/client/assets/{extract-connection-data-D_ov4A1f.js → extract-connection-data-fJZ_bVa3.js} +1 -1
- package/dist/client/assets/{file-explorer-BZ-qzAOo.js → file-explorer-B_GN9zEe.js} +1 -1
- package/dist/client/assets/{file-type-icon-Bnpkm6mQ.js → file-type-icon-DP6HmLFy.js} +1 -1
- package/dist/client/assets/{folder-icon-Cvyr8eQ5.js → folder-icon-BMW103zr.js} +1 -1
- package/dist/client/assets/{form-DCRMYQ5T.js → form-CmqshIy6.js} +1 -1
- package/dist/client/assets/{general-CE5xUtk_.js → general-_Duuf3bJ.js} +1 -1
- package/dist/client/assets/{github-icon-Dxk6kG9J.js → github-icon-2e-2LnS_.js} +1 -1
- package/dist/client/assets/{hooks-BE6Qu5f_.js → hooks-C6VZL2iB.js} +1 -1
- package/dist/client/assets/{index-CcwjIcL7.js → index-Bb8aArMr.js} +6 -6
- package/dist/client/assets/index-BlF62Qfm.js +1 -0
- package/dist/client/assets/{index-Dg7HcLhN.js → index-C4UI-M__.js} +1 -1
- package/dist/client/assets/{index-DSxOSuj0.js → index-Co6wudo0.js} +1 -1
- package/dist/client/assets/{index-BTUJIvwF.js → index-CsVcwu3N.js} +1 -1
- package/dist/client/assets/{index-CcAGGW2C.js → index-DQpqPLbf.js} +1 -1
- package/dist/client/assets/{index-DC6772TW.js → index-DR8_g0My.js} +1 -1
- package/dist/client/assets/{index-KykP8MNQ.js → index-DyTxImm_.js} +1 -1
- package/dist/client/assets/{index-CeaJSAMa.js → index-LQHBpOE1.js} +1 -1
- package/dist/client/assets/{index-CnMMSaSr.js → index-SqEqLylR.js} +1 -1
- package/dist/client/assets/{index-BEoXIi96.js → index-VUBQd1QI.js} +2 -2
- package/dist/client/assets/{index-BCYWiv5V.js → index-a5mBZaVh.js} +1 -1
- package/dist/client/assets/{index-redirect-CkemZHoW.js → index-redirect-CIA3ZXXN.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-C0gtCSKc.js → infiniteQueryObserver-BbfQOWBF.js} +1 -1
- package/dist/client/assets/{infra-billing-Cgv1Q04H.js → infra-billing-D2OZ__2N.js} +1 -1
- package/dist/client/assets/{input-DuuQU-5P.js → input-BGAt3C98.js} +1 -1
- package/dist/client/assets/{integration-icon-_O5BXH5s.js → integration-icon-BlDF5_6Y.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-DNbOb0sE.js → invite-member-dialog-BXl4x_yP.js} +1 -1
- package/dist/client/assets/{label-DfTzeVB6.js → label-Be-W0W9u.js} +1 -1
- package/dist/client/assets/{layout-CkEok-uQ.js → layout-CbLE6lYS.js} +1 -1
- package/dist/client/assets/{login-Cd7PyCNO.js → login-hhey_rUf.js} +1 -1
- package/dist/client/assets/{markdown-Bk2_0Mpp.js → markdown-zD6dAvSI.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-IailASEA.js → mcp-app-renderer-Ds9xwKQt.js} +1 -1
- package/dist/client/assets/{mcp-oauth-ytJMtAma.js → mcp-oauth-BGBOLuhT.js} +1 -1
- package/dist/client/assets/{members-BkTiUwYV.js → members-CENgiCtQ.js} +1 -1
- package/dist/client/assets/{monaco-editor-xqrL4C9W.js → monaco-editor-DMMM0u_X.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-9YJ3YK5E.js → monitoring-stats-row-DzyLUriY.js} +1 -1
- package/dist/client/assets/{multi-select-LkAyTIB4.js → multi-select-DMjvMCsJ.js} +1 -1
- package/dist/client/assets/{oauth-callback-Dk0et3QU.js → oauth-callback-CkKCUZpG.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BuI4vq64.js → oauth-callback-ai-provider-e4OumHEl.js} +1 -1
- package/dist/client/assets/{onboarding-BNomTh4g.js → onboarding-G9wYr4oI.js} +1 -1
- package/dist/client/assets/{org-layout-CTJtERf2.js → org-layout-BmnTp6bM.js} +1 -1
- package/dist/client/assets/{organization-choice-BI6EZHK-.js → organization-choice-DSe8R925.js} +1 -1
- package/dist/client/assets/{orgs-CTUQ8-uM.js → orgs-8WgzbPAi.js} +1 -1
- package/dist/client/assets/{page-seo-form-CBA1iAiu.js → page-seo-form-DChA5BXz.js} +1 -1
- package/dist/client/assets/{popover-CEyILQP8.js → popover-DYhzFl4_.js} +1 -1
- package/dist/client/assets/{post-calendar-DenT8uYn.js → post-calendar-C8-6lp6T.js} +1 -1
- package/dist/client/assets/{post-editor-Hc46Mx_G.js → post-editor-7jtKP3Nd.js} +1 -1
- package/dist/client/assets/{primitives-BmJPSaCw.js → primitives-Bn6FpBDX.js} +1 -1
- package/dist/client/assets/{profile-0vekQ69B.js → profile-C0_uGzFe.js} +1 -1
- package/dist/client/assets/{project-app-view-BXnLQtLD.js → project-app-view-C1SzAIe6.js} +1 -1
- package/dist/client/assets/{project-icon-Cvf-f60M.js → project-icon-ex8R4uHN.js} +1 -1
- package/dist/client/assets/{prompts-BM9Vcg8I.js → prompts-DhN7omtV.js} +1 -1
- package/dist/client/assets/record-editor-qdfO7H0C.js +1 -0
- package/dist/client/assets/redirect-editor-mAfSUxhQ.js +1 -0
- package/dist/client/assets/registry-CYOhx7no.js +2 -0
- package/dist/client/assets/{registry-layout-BHrN6Ljc.js → registry-layout-DXoZh7sU.js} +1 -1
- package/dist/client/assets/{reports-DgOiS-mQ.js → reports-nlk7gGwz.js} +1 -1
- package/dist/client/assets/{repositories-Bm6VO7EF.js → repositories-DMTTzNIB.js} +1 -1
- package/dist/client/assets/{repository-import-picker-CjXC2SBe.js → repository-import-picker-DSQ3IIhS.js} +1 -1
- package/dist/client/assets/repository-picker-x8SDlmDL.js +1 -0
- package/dist/client/assets/{require-capability-OCZS-hol.js → require-capability-DXnKRjPe.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Ce5Llpbj.js → required-auth-layout-OL7D9Vjj.js} +1 -1
- package/dist/client/assets/{reset-password-C4ad7SK4.js → reset-password-DrFO5u8O.js} +1 -1
- package/dist/client/assets/{review-settings-DTwV71Zz.js → review-settings-_n8cxUT3.js} +1 -1
- package/dist/client/assets/{roles-22e4YaK0.js → roles-IAbYWFA-.js} +1 -1
- package/dist/client/assets/{schema-BjF21APH.js → schema-DLlmVJMF.js} +1 -1
- package/dist/client/assets/{scroll-area-Dmoe3ZyS.js → scroll-area-CyMxSUbK.js} +1 -1
- package/dist/client/assets/{search-input-COgY1JoQ.js → search-input-C0-8I3qy.js} +1 -1
- package/dist/client/assets/{secrets-CwLIw14N.js → secrets-_Igxb9YO.js} +1 -1
- package/dist/client/assets/{sections-editor-BJdi0j1x.js → sections-editor-Ce8Te6oG.js} +1 -1
- package/dist/client/assets/{select-model-CI017hbz.js → select-model-Dz3oq-ew.js} +1 -1
- package/dist/client/assets/{select-Ctm5j_ac.js → select-vif3tL-Q.js} +1 -1
- package/dist/client/assets/{self-tool-result-hnx7DL9g.js → self-tool-result-BW8IKuXG.js} +1 -1
- package/dist/client/assets/{seo-editor-BAQhcdhi.js → seo-editor-DKjhnSnG.js} +1 -1
- package/dist/client/assets/settings-layout-CoN88C9q.js +1 -0
- package/dist/client/assets/{settings-sidebar-BBKY62CM.js → settings-sidebar-B3bdWk8d.js} +1 -1
- package/dist/client/assets/{shell-controls-CThcSmeK.js → shell-controls-Bubx5GwM.js} +1 -1
- package/dist/client/assets/{shell-layout-51PfGFjn.js → shell-layout-DSvk2D7T.js} +1 -1
- package/dist/client/assets/{skill-preview-yijVBbhT.js → skill-preview-BkPgENnB.js} +1 -1
- package/dist/client/assets/{skills-C2FUwmX3.js → skills-qYGcg9Nn.js} +1 -1
- package/dist/client/assets/{sso-CWsgRRWL.js → sso-eBJbfG6m.js} +1 -1
- package/dist/client/assets/{store-GojCzbD_.js → store-mnslcH6m.js} +1 -1
- package/dist/client/assets/store-registry-CiUFu0XV.js +2 -0
- package/dist/client/assets/{switch-C6U0UT4f.js → switch-2lRLfiu1.js} +1 -1
- package/dist/client/assets/{synced-repos-AN0hdpOT.js → synced-repos-DVkj4GiH.js} +1 -1
- package/dist/client/assets/{table-CFBqR8pE.js → table-jewwyo1w.js} +1 -1
- package/dist/client/assets/{tabs-BTqDMSRY.js → tabs-BH8PaWvJ.js} +1 -1
- package/dist/client/assets/{task-board-BfutDBLl.js → task-board-owENEs4d.js} +1 -1
- package/dist/client/assets/{task-route-CZAIG5rT.js → task-route-BC4fC8dN.js} +1 -1
- package/dist/client/assets/{tasks-bHdnjs2n.js → tasks-aIBQQ7LG.js} +1 -1
- package/dist/client/assets/{textarea-UK3aSYEU.js → textarea-Cz5uCTMx.js} +1 -1
- package/dist/client/assets/{thread-intent-Boq8aDUm.js → thread-intent-BMOAdgnN.js} +1 -1
- package/dist/client/assets/{thread-route-Ba6jPMs1.js → thread-route-B9iW6Km5.js} +1 -1
- package/dist/client/assets/{toggle-group-jOXSCXvB.js → toggle-group-BSAI9-Qw.js} +1 -1
- package/dist/client/assets/{toolbar-DJSf7gmi.js → toolbar-B8sUwOdc.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DcRfKvZu.js → toolbar-icon-button-B2-smK0F.js} +1 -1
- package/dist/client/assets/{track-CyUm3Jh9.js → track-D02qBkjM.js} +1 -1
- package/dist/client/assets/{types-CBEiD8NV.js → types-CdPsJIvO.js} +1 -1
- package/dist/client/assets/{use-ai-providers-b-_ZQ5bN.js → use-ai-providers--rHMvzLz.js} +1 -1
- package/dist/client/assets/{use-automations-BKfuici4.js → use-automations-tU3cTt-r.js} +1 -1
- package/dist/client/assets/{use-autosave-Cix74pa3.js → use-autosave-Cmfr4p18.js} +1 -1
- package/dist/client/assets/{use-connection-J9HU__FI.js → use-connection-DvJRkFmg.js} +1 -1
- package/dist/client/assets/{use-copy-1Ld-wFUW.js → use-copy-DXSeoqHy.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Cuf8IhFL.js → use-create-virtual-mcp-BI9fNhQH.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-iIq3KU2P.js → use-date-fns-locale-Bg1cUpNf.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BehbSyh9.js → use-debounced-autosave-XnXTl7ZL.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BJpIKS_c.js → use-debounced-value-DzkX22Ii.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BmNBMYMj.js → use-decopilot-events-Bz4MAIMA.js} +1 -1
- package/dist/client/assets/{use-delete-connection-8aB1gc6x.js → use-delete-connection-SFGjjYuE.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BnOU53k8.js → use-deployment-admin-h8fv2yVx.js} +1 -1
- package/dist/client/assets/{use-destination-route-0bGpW2wX.js → use-destination-route-CdOKevbC.js} +1 -1
- package/dist/client/assets/{use-file-configs-ChaOBE4-.js → use-file-configs-AGW0eECw.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-B16CEhLl.js → use-infinite-scroll-171C8-ng.js} +1 -1
- package/dist/client/assets/{use-join-requests-CHsZ3BPZ.js → use-join-requests-ikVE1e0O.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CIHDcWYi.js → use-mcp-auth-status-CAqtoHJY.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CBIDHgJb.js → use-mcp-client-C5dhZR3e.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-Dv2usnUu.js → use-mcp-prompts-rgyVkOBD.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CiXvaZ0u.js → use-mcp-tools-dAZWIyiM.js} +1 -1
- package/dist/client/assets/{use-members-DhN8JYyT.js → use-members-D32PB5N0.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-gJlVtuGH.js → use-navigate-to-agent-BThAfwFI.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DvxCLPMe.js → use-org-auth-client-qzjIoS6g.js} +1 -1
- package/dist/client/assets/{use-org-notice-BRkRTeOZ.js → use-org-notice-sTgCvjfb.js} +1 -1
- package/dist/client/assets/{use-org-sso-DsSzpTkG.js → use-org-sso-CU515a7l.js} +1 -1
- package/dist/client/assets/{use-organization-roles-D4YqA3AC.js → use-organization-roles-Bs9JrneR.js} +1 -1
- package/dist/client/assets/{use-organization-settings-PpTmoWC6.js → use-organization-settings-CiTHivvp.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-7pCkPHyQ.js → use-panel-navigate-CF8aiiM2.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Ddw_x5tM.js → use-registry-connections-Cpiw1HAD.js} +1 -1
- package/dist/client/assets/{use-secrets-C5CB8OUG.js → use-secrets-B8ulP8DF.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-B6RUH88V.js → use-section-preview-base-RVRWKPML.js} +1 -1
- package/dist/client/assets/{use-status-sounds-D3jpKPg_.js → use-status-sounds-k-N5cw1Y.js} +1 -1
- package/dist/client/assets/{use-tags-DRQoa0LP.js → use-tags-DAWUpbd7.js} +1 -1
- package/dist/client/assets/{use-view-mode-C2w1nkdo.js → use-view-mode-BjfgqyMX.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BBIVsgiJ.js → use-virtual-mcp-CtjcIygY.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DmFEvb15.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BrJU9R66.js +1 -0
- package/dist/client/assets/{users-DTDbkDSX.js → users-9JAHk-lb.js} +1 -1
- package/dist/client/assets/{variant-calendar-F1ire2me.js → variant-calendar-DgDQm7Wx.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-QdvFAndV.js → view-mode-toggle-Dlf9dFS2.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/api-keys-sLubfM9V.js +0 -1
- package/dist/client/assets/index-Px4ImwVA.js +0 -1
- package/dist/client/assets/record-editor-BavTRniY.js +0 -1
- package/dist/client/assets/redirect-editor-Chge8yeg.js +0 -1
- package/dist/client/assets/registry-yoOi33CH.js +0 -2
- package/dist/client/assets/repository-picker-DJhzZwbT.js +0 -1
- package/dist/client/assets/settings-layout-xYB5QvKm.js +0 -1
- package/dist/client/assets/store-registry-Cb8iuSTe.js +0 -2
- package/dist/client/assets/useInfiniteQuery-D46s077h.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Dt1al92J.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as K,b as X,r as Z,j as n,l as rt,a1 as ut,a4 as ht,B as tt,a2 as xt}from"./index-BEoXIi96.js";import{z as gt,a8 as at,aJ as bt}from"./agent-icon-CNkeVIGx.js";import{i as vt}from"./ChevronRight-CoUl6dHM.js";import{L as yt}from"./label-DfTzeVB6.js";import{S as lt}from"./scroll-area-Dmoe3ZyS.js";import{S as jt}from"./switch-C6U0UT4f.js";import{V as Tt}from"./view-mode-toggle-QdvFAndV.js";import{bu as ct,bv as mt,bw as Nt,bx as _t,by as kt,bz as U,bA as wt}from"./index-CcwjIcL7.js";import"./AlertCircle-UmLlY8gt.js";import"./Tool01-CxaNpYBN.js";import"./ArrowUp-tJnhyHYV.js";import"./ArrowLeft-CKGsgaFO.js";import"./Tool02-D8aijKEK.js";import"./ArrowRight-DkzY_YHb.js";import"./TrendUp01-BPcG0VZ2.js";import"./ZoomOut-C2eKrhT6.js";import"./Users03-DLEUw1TQ.js";import"./CheckCircle-DrFO4Bvc.js";import"./Check-mIk-Zdri.js";import"./ChevronUp-BsQdOFhn.js";import"./ChevronSelectorVertical-DgbgJIgx.js";import"./DotsVertical-LQnPIhpJ.js";import"./UserSquare-DgMxtQAT.js";import"./Copy01-B9voSPXW.js";import"./CreditCard01-BwVgysoQ.js";import"./Download01-DuC_qV7_.js";import"./Settings02-BkXl17NJ.js";import"./Eye-BNbA0ZH1.js";import"./Share07-_ciA_Du3.js";import"./GitBranch01-CEGTuE7l.js";import"./Globe01-Ct8tiHdr.js";import"./XClose-D4ceJ-NM.js";import"./HardDrive-DeQRGeCm.js";import"./Image01-BOV108nN.js";import"./Key01-DwPkNGAi.js";import"./Link01-CaYtZMuf.js";import"./LinkExternal01-BL5IYsGT.js";import"./Monitor01-CcdvNcNU.js";import"./Sun-iXMmiuE1.js";import"./Package-DuXJoDs3.js";import"./Palette-BZ4o6l5p.js";import"./Play-BuyaXe7U.js";import"./Plus-3CMW8aY5.js";import"./SearchLg-Cw3nH7Cl.js";import"./SearchMd-DNTL0r7E.js";import"./Shield01-DEeMJbvH.js";import"./Stars01-119xkrYB.js";import"./Trash01-aDQVPlte.js";import"./Upload01-DP3uFIbj.js";import"./User01-uB5x1Z7I.js";import"./Users01-C5oQyGpK.js";import"./XCircle-CPARFFz5.js";import"./Zap-CN63rPHF.js";import"./select-Ctm5j_ac.js";import"./chat-context-kYTm66h1.js";import"./use-panel-navigate-7pCkPHyQ.js";import"./use-destination-route-0bGpW2wX.js";import"./autosend-H7vEr2E4.js";import"./thread-intent-Boq8aDUm.js";import"./slugify-CEUa2lfQ.js";import"./hooks-BE6Qu5f_.js";import"./use-mcp-client-CBIDHgJb.js";import"./auth-BifFxAMn.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-CGUVxGA5.js";import"./task-board-BfutDBLl.js";import"./schema-BjF21APH.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-BBIVsgiJ.js";import"./use-ai-providers-b-_ZQ5bN.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-BmNBMYMj.js";import"./thread-route-Ba6jPMs1.js";import"./dialog-D6PrlHs3.js";import"./use-organization-settings-PpTmoWC6.js";import"./automation-runs-CkurNXaa.js";import"./useInfiniteQuery-D46s077h.js";import"./infiniteQueryObserver-C0gtCSKc.js";import"./use-connection-J9HU__FI.js";import"./table-CFBqR8pE.js";import"./empty-state-oW1HtioG.js";import"./use-infinite-scroll-B16CEhLl.js";import"./use-members-DhN8JYyT.js";import"./use-org-auth-client-DvxCLPMe.js";import"./use-automations-BKfuici4.js";import"./useSuspenseInfiniteQuery-Dt1al92J.js";import"./avatar-BRVlWhlB.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-copy-1Ld-wFUW.js";import"./markdown-Bk2_0Mpp.js";import"./monaco-editor-xqrL4C9W.js";import"./editor-0D0nYwQZ.js";import"./mcp-app-renderer-IailASEA.js";import"./types-CBEiD8NV.js";import"./shell-layout-51PfGFjn.js";import"./anchors-yqDzZN4K.js";import"./project-icon-Cvf-f60M.js";import"./github-repo-CTPv5ZM2.js";import"./source-system-tabs-CnEGUb4r.js";import"./command-C8qMEhaG.js";import"./index-KykP8MNQ.js";import"./integration-icon-_O5BXH5s.js";import"./required-auth-layout-Ce5Llpbj.js";import"./use-org-sso-DsSzpTkG.js";import"./use-org-notice-BRkRTeOZ.js";import"./use-navigate-to-agent-gJlVtuGH.js";import"./use-mcp-prompts-Dv2usnUu.js";import"./form-DCRMYQ5T.js";import"./input-DuuQU-5P.js";import"./file-type-icon-Bnpkm6mQ.js";import"./drawer-CKDQN4Qv.js";import"./collection-search-DgCzDom2.js";import"./tabs-BTqDMSRY.js";import"./toggle-group-jOXSCXvB.js";import"./task-route-CZAIG5rT.js";import"./extract-connection-data-D_ov4A1f.js";import"./metadata-dUsYcpuu.js";import"./connection-D3PCvxub.js";import"./connection-card-CuQsth2r.js";import"./use-registry-connections-Ddw_x5tM.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-UK3aSYEU.js";import"./connection-form-helpers-GOmangL6.js";import"./authenticate-and-persist-oauth-B89pdNMd.js";import"./mcp-oauth-ytJMtAma.js";import"./collection-tabs-htCjlN6e.js";import"./badge-Bek9yAA7.js";import"./use-file-configs-ChaOBE4-.js";import"./site-slug-uya6Wp4-.js";import"./dropdown-menu-BN-ZPax7.js";import"./popover-CEyILQP8.js";import"./github-icon-Dxk6kG9J.js";import"./get-initials-D-f_fDFw.js";import"./select-model-CI017hbz.js";import"./checkbox-D5UNPAi9.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-Cvyr8eQ5.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-D3jpKPg_.js";import"./toolbar-DJSf7gmi.js";import"./use-mcp-tools-CiXvaZ0u.js";import"./skill-preview-yijVBbhT.js";import"./use-date-fns-locale-iIq3KU2P.js";import"./alert-dialog-yY0onn0b.js";import"./use-debounced-autosave-BehbSyh9.js";import"./search-input-COgY1JoQ.js";import"./use-mcp-auth-status-CIHDcWYi.js";import"./breadcrumb-CqlTgO8l.js";import"./repository-import-picker-CjXC2SBe.js";import"./repository-picker-DJhzZwbT.js";import"./use-debounced-value-BJpIKS_c.js";import"./use-secrets-C5CB8OUG.js";import"./client-icons-DiZSUf5o.js";import"./connect-layout-DrVv2vSW.js";import"./self-tool-result-hnx7DL9g.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./track-CyUm3Jh9.js";import"./use-tags-DRQoa0LP.js";import"./toolbar-icon-button-DcRfKvZu.js";import"./safe-image-url-D5z803Ot.js";import"./automation-list-row-CzBcz6q8.js";import"./site-error--i37Vnuw.js";import"./cards-C-vB_PHu.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Mt=new Date(864e13),At=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,$t=/\/flags\/multivariate\.ts$/;function Lt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Rt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e,o=typeof t=="string",s=typeof r=="string";if(!o&&!s)return null;const i=o?new Date(t):Ct,a=s?new Date(r):Mt;return Number.isNaN(i.getTime())||Number.isNaN(a.getTime())||o&&s&&a.getTime()<=i.getTime()?null:{start:i,end:a,openStart:!o,openEnd:!s}}function pt(e,t){if(!e||typeof e!="object")return;const r=e.__resolveType;if(typeof r=="string"){if(Et.has(r)){const o=Rt(e);o&&t.push(o);return}if(St.has(r)){const o=e.matchers;if(Array.isArray(o))for(const s of o)pt(s,t)}}}function Dt(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!At.test(t))return!1;const r=e.variants;return Array.isArray(r)}function Ot(e){if(typeof e=="string"){const c=e.trim();if(c.length===0)return null;try{const m=new URL(c).pathname.split("/").filter(Boolean),p=m[m.length-1];if(p)return decodeURIComponent(p)}catch{}return c.length>80?`${c.slice(0,77)}…`:c}if(!e||typeof e!="object")return null;const t=e,r=t.config,s=t.desktop?.media,i=[t.title,t.name,t.label,t.alt,r?.title,r?.name,r?.typeAlert?.message,s?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const c of i)if(typeof c=="string"&&c.trim().length>0)return c.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let r=0;r<e.length;r++){const o=e[r];typeof o=="number"?t.length>0?t[t.length-1]+=`[${o}]`:t.push(`[${o}]`):t.push(o)}return t.join(" · ")}function Q(e,t,r,o,s){if(Dt(e)){const i=e.variants,a=e.__resolveType,c=$t.test(a)?"":Pt(o);i.forEach((l,m)=>{if(!l||typeof l!="object")return;const p=l,h=[];if(pt(p.rule,h),h.length===0)return;const g=Ot(p.value)??(c||r);for(const u of h)s.push({blockKey:t,blockLabel:r,innerPath:c,variantIndex:m,start:u.start,end:u.end,openStart:u.openStart,openEnd:u.openEnd,label:g,flagResolveType:a})});for(let l=0;l<i.length;l++){const m=i[l];m&&typeof m=="object"&&Q(m.value,t,r,[...o,"variants",l,"value"],s)}return}if(Array.isArray(e)){for(let i=0;i<e.length;i++)Q(e[i],t,r,[...o,i],s);return}if(e&&typeof e=="object")for(const[i,a]of Object.entries(e))i!=="__resolveType"&&Q(a,t,r,[...o,i],s)}function It(e){if(!e)return[];const t=[];for(const[r,o]of Object.entries(e))Q(o,r,Lt(r),[],t);return t.sort((r,o)=>r.start.getTime()-o.start.getTime())}function Vt(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((o,s)=>{const i=s*137.508%360;r.set(o,{bg:`oklch(0.62 0.14 ${i})`,text:"white",border:`oklch(0.50 0.14 ${i})`})}),r}const Ht={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function dt(e,t){return e.get(t)??Ht}const ot=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Bt(e,t){const r=e.openStart?t("sandbox.variantCalendar.always"):ot.format(e.start),o=e.openEnd?t("sandbox.variantCalendar.ongoing"):ot.format(e.end);return`${r} → ${o}`}function zt(e){const t=K.c(18),{variant:r}=e,o=X();let s;t[0]!==r.blockLabel?(s=n.jsx("div",{className:"font-semibold",children:r.blockLabel}),t[0]=r.blockLabel,t[1]=s):s=t[1];let i;t[2]!==r.innerPath?(i=r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.innerPath}),t[2]=r.innerPath,t[3]=i):i=t[3];let a;t[4]!==r.blockLabel||t[5]!==r.innerPath||t[6]!==r.label?(a=r.label!==r.blockLabel&&r.label!==r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.label}),t[4]=r.blockLabel,t[5]=r.innerPath,t[6]=r.label,t[7]=a):a=t[7];let c;t[8]!==o||t[9]!==r?(c=Bt(r,o),t[8]=o,t[9]=r,t[10]=c):c=t[10];let l;t[11]!==c?(l=n.jsx("div",{className:"mt-1",children:c}),t[11]=c,t[12]=l):l=t[12];let m;return t[13]!==s||t[14]!==i||t[15]!==a||t[16]!==l?(m=n.jsx(xt,{children:n.jsxs("div",{className:"text-xs",children:[s,i,a,l]})}),t[13]=s,t[14]=i,t[15]=a,t[16]=l,t[17]=m):m=t[17],m}const nt=16;function Ft(e,t){const r=e?"transparent":"#000 0",o=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${r}, #000 ${nt}px, #000 calc(100% - ${nt}px), ${o})`}function ft(e){const t=K.c(26),{variant:r,color:o,style:s,children:i,fadeStart:a,fadeEnd:c}=e,l=a===void 0?!1:a,m=c===void 0?!1:c;let p;t[0]!==m||t[1]!==l?(p=Ft(l,m),t[0]=m,t[1]=l,t[2]=p):p=t[2];const h=p;let f;t[3]!==l?(f=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=f):f=t[4];let g;t[5]!==m?(g=m&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=m,t[6]=g):g=t[6];let u;t[7]!==h?(u=h&&{maskImage:h,WebkitMaskImage:h},t[7]=h,t[8]=u):u=t[8];let x;t[9]!==o.bg||t[10]!==o.text||t[11]!==s||t[12]!==f||t[13]!==g||t[14]!==u?(x={background:o.bg,color:o.text,borderRadius:4,...f,...g,...u,...s},t[9]=o.bg,t[10]=o.text,t[11]=s,t[12]=f,t[13]=g,t[14]=u,t[15]=x):x=t[15];let b;t[16]!==i?(b=n.jsx("span",{className:"truncate",children:i}),t[16]=i,t[17]=b):b=t[17];let E;t[18]!==x||t[19]!==b?(E=n.jsx(ut,{asChild:!0,children:n.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:x,children:b})}),t[18]=x,t[19]=b,t[20]=E):E=t[20];let T;t[21]!==r?(T=n.jsx(zt,{variant:r}),t[21]=r,t[22]=T):T=t[22];let d;return t[23]!==T||t[24]!==E?(d=n.jsxs(ht,{children:[E,T]}),t[23]=T,t[24]=E,t[25]=d):d=t[25],d}function mn(e){const t=K.c(72),{decofile:r}=e,o=X(),[s,i]=Z.useState("calendar"),[a,c]=Z.useState(Kt),[l,m]=Z.useState(!1);let p,h,f;if(t[0]!==r||t[1]!==l){const I=It(r);p=I.filter(Ut).length,f=l?I:I.filter(Gt),h=Vt(f.map(Wt)),t[0]=r,t[1]=l,t[2]=p,t[3]=h,t[4]=f}else p=t[2],h=t[3],f=t[4];const g=h;let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=()=>c(mt(new Date)),t[5]=u):u=t[5];const x=u;let b;t[6]!==s?(b=()=>c(I=>s==="calendar"?U(I,-1):U(I,-3)),t[6]=s,t[7]=b):b=t[7];const E=b;let T;t[8]!==s?(T=()=>c(I=>s==="calendar"?U(I,1):U(I,3)),t[8]=s,t[9]=T):T=t[9];const d=T;let v;t[10]!==o?(v=o("sandbox.variantCalendar.today"),t[10]=o,t[11]=v):v=t[11];let y;t[12]!==v?(y=n.jsx(tt,{variant:"outline",size:"sm",onClick:x,children:v}),t[12]=v,t[13]=y):y=t[13];let N;t[14]!==o?(N=o("sandbox.variantCalendar.previous"),t[14]=o,t[15]=N):N=t[15];let A;t[16]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(gt,{size:16}),t[16]=A):A=t[16];let _;t[17]!==E||t[18]!==N?(_=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:E,"aria-label":N,children:A}),t[17]=E,t[18]=N,t[19]=_):_=t[19];let k;t[20]!==o?(k=o("sandbox.variantCalendar.next"),t[20]=o,t[21]=k):k=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(vt,{size:16}),t[22]=C):C=t[22];let $;t[23]!==d||t[24]!==k?($=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:d,"aria-label":k,children:C}),t[23]=d,t[24]=k,t[25]=$):$=t[25];const L=ct[a.getMonth()];let M;t[26]!==a?(M=a.getFullYear(),t[26]=a,t[27]=M):M=t[27];let w;t[28]!==L||t[29]!==M?(w=n.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[L," ",M]}),t[28]=L,t[29]=M,t[30]=w):w=t[30];let j;t[31]!==$||t[32]!==w||t[33]!==y||t[34]!==_?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[y,_,$,w]}),t[31]=$,t[32]=w,t[33]=y,t[34]=_,t[35]=j):j=t[35];let R;t[36]!==p||t[37]!==l||t[38]!==o?(R=p>0&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(jt,{id:"show-ongoing",checked:l,onCheckedChange:m}),n.jsx(yt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:o("sandbox.variantCalendar.showOngoing",{count:p})})]}),t[36]=p,t[37]=l,t[38]=o,t[39]=R):R=t[39];let B;t[40]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx(at,{}),t[40]=B):B=t[40];let V;t[41]!==o?(V=o("sandbox.variantCalendar.calendarMode"),t[41]=o,t[42]=V):V=t[42];let S;t[43]!==V?(S={value:"calendar",icon:B,label:V},t[43]=V,t[44]=S):S=t[44];let z;t[45]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsx(bt,{}),t[45]=z):z=t[45];let D;t[46]!==o?(D=o("sandbox.variantCalendar.timelineMode"),t[46]=o,t[47]=D):D=t[47];let O;t[48]!==D?(O={value:"timeline",icon:z,label:D},t[48]=D,t[49]=O):O=t[49];let P;t[50]!==S||t[51]!==O?(P=[S,O],t[50]=S,t[51]=O,t[52]=P):P=t[52];let H;t[53]!==P||t[54]!==s?(H=n.jsx(Tt,{value:s,onValueChange:i,options:P}),t[53]=P,t[54]=s,t[55]=H):H=t[55];let F;t[56]!==R||t[57]!==H?(F=n.jsxs("div",{className:"flex items-center gap-4",children:[R,H]}),t[56]=R,t[57]=H,t[58]=F):F=t[58];let W;t[59]!==j||t[60]!==F?(W=n.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,F]}),t[59]=j,t[60]=F,t[61]=W):W=t[61];let G;t[62]!==g||t[63]!==a||t[64]!==p||t[65]!==l||t[66]!==f||t[67]!==s?(G=f.length===0?n.jsx(Yt,{hiddenOngoing:l?0:p}):s==="calendar"?n.jsx(qt,{monthStart:a,variants:f,colorMap:g}):n.jsx(te,{monthStart:a,variants:f,colorMap:g}),t[62]=g,t[63]=a,t[64]=p,t[65]=l,t[66]=f,t[67]=s,t[68]=G):G=t[68];let J;return t[69]!==W||t[70]!==G?(J=n.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=J):J=t[71],J}function Wt(e){return e.blockKey}function Gt(e){return!e.openEnd}function Ut(e){return e.openEnd}function Kt(){return mt(new Date)}function Yt(e){const t=K.c(4),{hiddenOngoing:r}=e,o=r===void 0?0:r,s=X();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(at,{size:24,className:"text-muted-foreground/60"}),t[0]=i):i=t[0];let a;return t[1]!==o||t[2]!==s?(a=n.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[i,o>0?n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noDatedVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.hiddenOngoingVariants",{count:o})})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noScheduledVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=o,t[2]=s,t[3]=a):a=t[3],a}const et=20,it=2,st=28,Jt=6;function qt(e){const t=K.c(17),{monthStart:r,variants:o,colorMap:s}=e;let i,a,c,l,m;if(t[0]!==s||t[1]!==r||t[2]!==o){const f=Nt(r),g=_t(new Date);i=lt,m="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:wt.map(Xt)}),t[8]=c):c=t[8],l=f.map((u,x)=>{const b=kt(u,o),E=b.reduce(Qt,0),T=st+E*(et+it)+8;return n.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[u.map((d,v)=>{const y=d.getMonth()===r.getMonth(),N=d.getTime()===g.getTime();return n.jsx("div",{className:rt("border-r last:border-r-0 px-2 pt-1.5 text-xs",y?"bg-background":"bg-muted/30 text-muted-foreground"),children:n.jsx("span",{className:rt("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",N&&"bg-primary text-primary-foreground font-semibold"),children:d.getDate()})},v)}),b.map((d,v)=>{const y=dt(s,d.variant.blockKey),N=st+d.lane*(et+it),A=d.leftUnits/7*100,_=d.widthUnits/7*100,k=d.variant.openStart&&x===0,C=d.variant.openEnd&&x===f.length-1;return n.jsxs(ft,{variant:d.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${A}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:Jt,height:et},children:[d.variant.blockLabel,d.variant.label!==d.variant.blockLabel&&n.jsxs("span",{className:"opacity-70",children:[" · ",d.variant.label]})]},`${x}-${v}`)})]},x)}),t[0]=s,t[1]=r,t[2]=o,t[3]=i,t[4]=a,t[5]=c,t[6]=l,t[7]=m}else i=t[3],a=t[4],c=t[5],l=t[6],m=t[7];let p;t[9]!==a||t[10]!==c||t[11]!==l?(p=n.jsxs("div",{className:a,children:[c,l]}),t[9]=a,t[10]=c,t[11]=l,t[12]=p):p=t[12];let h;return t[13]!==i||t[14]!==m||t[15]!==p?(h=n.jsx(i,{className:m,children:p}),t[13]=i,t[14]=m,t[15]=p,t[16]=h):h=t[16],h}function Qt(e,t){return Math.max(e,t.lane+1)}function Xt(e){return n.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const q=4,Zt=32,Y=240;function te(e){const t=K.c(23),{monthStart:r,variants:o,colorMap:s}=e,i=r,a=U(r,q),c=new Date,l=new Map;for(const w of o){const j=l.get(w.blockKey)??[];j.push(w),l.set(w.blockKey,j)}const m=Array.from(l.entries()).sort(oe),p=a.getTime()-i.getTime(),h=w=>(Math.max(i.getTime(),Math.min(a.getTime(),w.getTime()))-i.getTime())/p*100;let f;t[0]!==i?(f=(w,j)=>U(i,j),t[0]=i,t[1]=f):f=t[1];const g=Array.from({length:q},f),u=c.getTime()>=i.getTime()&&c.getTime()<=a.getTime()?h(c):null,x=X(),b=lt,E="flex-1 min-h-0",T="min-w-[900px] relative";let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d={width:Y},t[2]=d):d=t[2];let v;t[3]!==x?(v=x("sandbox.variantCalendar.variantBlock"),t[3]=x,t[4]=v):v=t[4];let y;t[5]!==v?(y=n.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:d,children:v}),t[5]=v,t[6]=y):y=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${q}, minmax(0, 1fr))`},t[7]=N):N=t[7];const A=g.map(re);let _;t[8]!==A?(_=n.jsx("div",{className:"flex-1 grid",style:N,children:A}),t[8]=A,t[9]=_):_=t[9];let k;t[10]!==y||t[11]!==_?(k=n.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[y,_]}),t[10]=y,t[11]=_,t[12]=k):k=t[12];let C;t[13]!==x||t[14]!==u?(C=u!==null&&n.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${Y}px + (100% - ${Y}px) * ${u} / 100)`},children:n.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:x("sandbox.variantCalendar.todayLabel")})}),t[13]=x,t[14]=u,t[15]=C):C=t[15];const $=m.map(w=>{const[j,R]=w,B=dt(s,j),V=R[0]?.blockLabel??j;return n.jsxs("div",{children:[n.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:n.jsx("div",{className:"px-3 truncate",style:{width:Y},children:V})}),R.map((S,z)=>n.jsxs("div",{className:"flex border-b items-center",style:{height:Zt},children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:Y},children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:B.bg}}),n.jsx("span",{className:"truncate text-foreground/80",children:S.label})]}),n.jsxs("div",{className:"relative flex-1 h-full",children:[n.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${q}, minmax(0, 1fr))`},children:g.map(ee)}),(()=>{const D=Math.max(S.start.getTime(),i.getTime()),O=Math.min(S.end.getTime(),a.getTime());if(O<=D)return null;const P=h(new Date(D)),H=h(new Date(O))-P;return n.jsx(ft,{variant:S,color:B,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${P}%`,width:`calc(${H}% - 2px)`,height:22},children:S.label})})()]})]},z))]},j)});let L;t[16]!==k||t[17]!==C||t[18]!==$?(L=n.jsxs("div",{className:T,children:[k,C,$]}),t[16]=k,t[17]=C,t[18]=$,t[19]=L):L=t[19];let M;return t[20]!==b||t[21]!==L?(M=n.jsx(b,{className:E,children:L}),t[20]=b,t[21]=L,t[22]=M):M=t[22],M}function ee(e,t){return n.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function re(e,t){return n.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ct[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function oe(e,t){return e[0].localeCompare(t[0])}export{mn as VariantCalendar};
|
|
1
|
+
import{c as K,b as X,r as Z,j as n,l as rt,a1 as ut,a4 as ht,B as tt,a2 as xt}from"./index-VUBQd1QI.js";import{z as gt,a8 as at,aJ as bt}from"./agent-icon-nBcb3BwE.js";import{i as vt}from"./ChevronRight-KK3qfphJ.js";import{L as yt}from"./label-Be-W0W9u.js";import{S as lt}from"./scroll-area-CyMxSUbK.js";import{S as jt}from"./switch-2lRLfiu1.js";import{V as Tt}from"./view-mode-toggle-Dlf9dFS2.js";import{bu as ct,bv as mt,bw as Nt,bx as _t,by as kt,bz as U,bA as wt}from"./index-Bb8aArMr.js";import"./AlertCircle-DLI_y0kQ.js";import"./Tool01-BmwTwlfJ.js";import"./ArrowUp-CxQswJ1J.js";import"./ArrowLeft-BHvdpjN6.js";import"./Tool02-CRYhfXhb.js";import"./ArrowRight-Bj-GI8Ha.js";import"./TrendUp01-Caylus7C.js";import"./ZoomOut-CSVII-Bq.js";import"./Users03-D5nR6s0o.js";import"./CheckCircle-5uMvqoZP.js";import"./Check-0QGdBtav.js";import"./ChevronUp-Bsn6saD9.js";import"./ChevronSelectorVertical-Di4HYY3d.js";import"./DotsVertical-Dn-MiDeI.js";import"./UserSquare-B7TexH1I.js";import"./Copy01-BMRPuGV4.js";import"./CreditCard01-DNen_i5r.js";import"./Download01-CjNeMHjR.js";import"./Settings02-DQCTSExV.js";import"./Eye-C1VPVGim.js";import"./Share07-Dx_n7EOa.js";import"./GitBranch01-G5fhFibo.js";import"./Globe01-Clx3pMu_.js";import"./XClose-DbuRGbMN.js";import"./HardDrive-Bkv0QB9j.js";import"./Image01-CZhyMtEF.js";import"./Key01-l9rf_sae.js";import"./Link01-pmZ5qfde.js";import"./LinkExternal01-Bi0ckUR6.js";import"./Monitor01-DQ4DwDZX.js";import"./Sun-VtPgnV_v.js";import"./Package-B9_K7TDa.js";import"./Palette-Zdsosz4A.js";import"./Play-B2K3VjrI.js";import"./Plus-BVBatL9e.js";import"./SearchLg-DgVlNXZH.js";import"./SearchMd-BtTKbpV7.js";import"./Shield01-Bvpvo2K4.js";import"./Stars01-DhkBdj_U.js";import"./Trash01-D31Ecr1x.js";import"./Upload01-CEjRMsQd.js";import"./User01-vZR-v-xR.js";import"./Users01-C3DEUFYy.js";import"./XCircle-C4td4Lhj.js";import"./Zap-DyQlkdep.js";import"./select-vif3tL-Q.js";import"./chat-context-Blfv3wym.js";import"./use-panel-navigate-CF8aiiM2.js";import"./use-destination-route-CdOKevbC.js";import"./autosend-CBht_WWv.js";import"./thread-intent-BMOAdgnN.js";import"./slugify-CEUa2lfQ.js";import"./hooks-C6VZL2iB.js";import"./use-mcp-client-C5dhZR3e.js";import"./auth-B8Mzm_EX.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-CtuHCUcW.js";import"./task-board-owENEs4d.js";import"./schema-DLlmVJMF.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-CtjcIygY.js";import"./use-ai-providers--rHMvzLz.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-Bz4MAIMA.js";import"./thread-route-B9iW6Km5.js";import"./dialog-BF8EEHBt.js";import"./use-organization-settings-CiTHivvp.js";import"./automation-runs-Bb3CkrSt.js";import"./useInfiniteQuery-DmFEvb15.js";import"./infiniteQueryObserver-BbfQOWBF.js";import"./use-connection-DvJRkFmg.js";import"./table-jewwyo1w.js";import"./empty-state-CuLrasEG.js";import"./use-infinite-scroll-171C8-ng.js";import"./use-members-D32PB5N0.js";import"./use-org-auth-client-qzjIoS6g.js";import"./use-automations-tU3cTt-r.js";import"./useSuspenseInfiniteQuery-BrJU9R66.js";import"./avatar-BuB9trA8.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-copy-DXSeoqHy.js";import"./markdown-zD6dAvSI.js";import"./monaco-editor-DMMM0u_X.js";import"./editor-E5N3yCZ8.js";import"./mcp-app-renderer-Ds9xwKQt.js";import"./types-CdPsJIvO.js";import"./shell-layout-DSvk2D7T.js";import"./anchors-yqDzZN4K.js";import"./project-icon-ex8R4uHN.js";import"./github-repo-CTPv5ZM2.js";import"./source-system-tabs-CnEGUb4r.js";import"./command-CU2f3ZEt.js";import"./index-DyTxImm_.js";import"./integration-icon-BlDF5_6Y.js";import"./required-auth-layout-OL7D9Vjj.js";import"./use-org-sso-CU515a7l.js";import"./use-org-notice-sTgCvjfb.js";import"./use-navigate-to-agent-BThAfwFI.js";import"./use-mcp-prompts-rgyVkOBD.js";import"./form-CmqshIy6.js";import"./input-BGAt3C98.js";import"./file-type-icon-DP6HmLFy.js";import"./drawer-DxCOSfMO.js";import"./collection-search-Dsxgd7dA.js";import"./tabs-BH8PaWvJ.js";import"./toggle-group-BSAI9-Qw.js";import"./task-route-BC4fC8dN.js";import"./extract-connection-data-fJZ_bVa3.js";import"./metadata-dUsYcpuu.js";import"./connection-DXA3joTG.js";import"./connection-card-Dcl4Fay7.js";import"./use-registry-connections-Cpiw1HAD.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-Cz5uCTMx.js";import"./connection-form-helpers-BOSwNvX9.js";import"./authenticate-and-persist-oauth-COQadTKi.js";import"./mcp-oauth-BGBOLuhT.js";import"./collection-tabs-2A9_kiub.js";import"./badge-BMwkZ7og.js";import"./use-file-configs-AGW0eECw.js";import"./site-slug-uya6Wp4-.js";import"./dropdown-menu-Cil9yCsU.js";import"./popover-DYhzFl4_.js";import"./github-icon-2e-2LnS_.js";import"./get-initials-D-f_fDFw.js";import"./select-model-Dz3oq-ew.js";import"./checkbox-DALxDqxN.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-BMW103zr.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-k-N5cw1Y.js";import"./toolbar-B8sUwOdc.js";import"./use-mcp-tools-dAZWIyiM.js";import"./skill-preview-BkPgENnB.js";import"./use-date-fns-locale-Bg1cUpNf.js";import"./alert-dialog-DjjgGJeL.js";import"./use-debounced-autosave-XnXTl7ZL.js";import"./search-input-C0-8I3qy.js";import"./use-mcp-auth-status-CAqtoHJY.js";import"./breadcrumb-DhPILjvE.js";import"./repository-import-picker-DSQ3IIhS.js";import"./repository-picker-x8SDlmDL.js";import"./use-debounced-value-DzkX22Ii.js";import"./use-secrets-B8ulP8DF.js";import"./client-icons-DVPbIzit.js";import"./connect-layout-BDyGEFK0.js";import"./self-tool-result-BW8IKuXG.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./track-D02qBkjM.js";import"./use-tags-DAWUpbd7.js";import"./toolbar-icon-button-B2-smK0F.js";import"./safe-image-url-D5z803Ot.js";import"./automation-list-row-CpUaZGVF.js";import"./site-error--i37Vnuw.js";import"./cards-6-8Wyhkv.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Mt=new Date(864e13),At=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,$t=/\/flags\/multivariate\.ts$/;function Lt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Rt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e,o=typeof t=="string",s=typeof r=="string";if(!o&&!s)return null;const i=o?new Date(t):Ct,a=s?new Date(r):Mt;return Number.isNaN(i.getTime())||Number.isNaN(a.getTime())||o&&s&&a.getTime()<=i.getTime()?null:{start:i,end:a,openStart:!o,openEnd:!s}}function pt(e,t){if(!e||typeof e!="object")return;const r=e.__resolveType;if(typeof r=="string"){if(Et.has(r)){const o=Rt(e);o&&t.push(o);return}if(St.has(r)){const o=e.matchers;if(Array.isArray(o))for(const s of o)pt(s,t)}}}function Dt(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!At.test(t))return!1;const r=e.variants;return Array.isArray(r)}function Ot(e){if(typeof e=="string"){const c=e.trim();if(c.length===0)return null;try{const m=new URL(c).pathname.split("/").filter(Boolean),p=m[m.length-1];if(p)return decodeURIComponent(p)}catch{}return c.length>80?`${c.slice(0,77)}…`:c}if(!e||typeof e!="object")return null;const t=e,r=t.config,s=t.desktop?.media,i=[t.title,t.name,t.label,t.alt,r?.title,r?.name,r?.typeAlert?.message,s?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const c of i)if(typeof c=="string"&&c.trim().length>0)return c.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let r=0;r<e.length;r++){const o=e[r];typeof o=="number"?t.length>0?t[t.length-1]+=`[${o}]`:t.push(`[${o}]`):t.push(o)}return t.join(" · ")}function Q(e,t,r,o,s){if(Dt(e)){const i=e.variants,a=e.__resolveType,c=$t.test(a)?"":Pt(o);i.forEach((l,m)=>{if(!l||typeof l!="object")return;const p=l,h=[];if(pt(p.rule,h),h.length===0)return;const g=Ot(p.value)??(c||r);for(const u of h)s.push({blockKey:t,blockLabel:r,innerPath:c,variantIndex:m,start:u.start,end:u.end,openStart:u.openStart,openEnd:u.openEnd,label:g,flagResolveType:a})});for(let l=0;l<i.length;l++){const m=i[l];m&&typeof m=="object"&&Q(m.value,t,r,[...o,"variants",l,"value"],s)}return}if(Array.isArray(e)){for(let i=0;i<e.length;i++)Q(e[i],t,r,[...o,i],s);return}if(e&&typeof e=="object")for(const[i,a]of Object.entries(e))i!=="__resolveType"&&Q(a,t,r,[...o,i],s)}function It(e){if(!e)return[];const t=[];for(const[r,o]of Object.entries(e))Q(o,r,Lt(r),[],t);return t.sort((r,o)=>r.start.getTime()-o.start.getTime())}function Vt(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((o,s)=>{const i=s*137.508%360;r.set(o,{bg:`oklch(0.62 0.14 ${i})`,text:"white",border:`oklch(0.50 0.14 ${i})`})}),r}const Ht={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function dt(e,t){return e.get(t)??Ht}const ot=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Bt(e,t){const r=e.openStart?t("sandbox.variantCalendar.always"):ot.format(e.start),o=e.openEnd?t("sandbox.variantCalendar.ongoing"):ot.format(e.end);return`${r} → ${o}`}function zt(e){const t=K.c(18),{variant:r}=e,o=X();let s;t[0]!==r.blockLabel?(s=n.jsx("div",{className:"font-semibold",children:r.blockLabel}),t[0]=r.blockLabel,t[1]=s):s=t[1];let i;t[2]!==r.innerPath?(i=r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.innerPath}),t[2]=r.innerPath,t[3]=i):i=t[3];let a;t[4]!==r.blockLabel||t[5]!==r.innerPath||t[6]!==r.label?(a=r.label!==r.blockLabel&&r.label!==r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.label}),t[4]=r.blockLabel,t[5]=r.innerPath,t[6]=r.label,t[7]=a):a=t[7];let c;t[8]!==o||t[9]!==r?(c=Bt(r,o),t[8]=o,t[9]=r,t[10]=c):c=t[10];let l;t[11]!==c?(l=n.jsx("div",{className:"mt-1",children:c}),t[11]=c,t[12]=l):l=t[12];let m;return t[13]!==s||t[14]!==i||t[15]!==a||t[16]!==l?(m=n.jsx(xt,{children:n.jsxs("div",{className:"text-xs",children:[s,i,a,l]})}),t[13]=s,t[14]=i,t[15]=a,t[16]=l,t[17]=m):m=t[17],m}const nt=16;function Ft(e,t){const r=e?"transparent":"#000 0",o=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${r}, #000 ${nt}px, #000 calc(100% - ${nt}px), ${o})`}function ft(e){const t=K.c(26),{variant:r,color:o,style:s,children:i,fadeStart:a,fadeEnd:c}=e,l=a===void 0?!1:a,m=c===void 0?!1:c;let p;t[0]!==m||t[1]!==l?(p=Ft(l,m),t[0]=m,t[1]=l,t[2]=p):p=t[2];const h=p;let f;t[3]!==l?(f=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=f):f=t[4];let g;t[5]!==m?(g=m&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=m,t[6]=g):g=t[6];let u;t[7]!==h?(u=h&&{maskImage:h,WebkitMaskImage:h},t[7]=h,t[8]=u):u=t[8];let x;t[9]!==o.bg||t[10]!==o.text||t[11]!==s||t[12]!==f||t[13]!==g||t[14]!==u?(x={background:o.bg,color:o.text,borderRadius:4,...f,...g,...u,...s},t[9]=o.bg,t[10]=o.text,t[11]=s,t[12]=f,t[13]=g,t[14]=u,t[15]=x):x=t[15];let b;t[16]!==i?(b=n.jsx("span",{className:"truncate",children:i}),t[16]=i,t[17]=b):b=t[17];let E;t[18]!==x||t[19]!==b?(E=n.jsx(ut,{asChild:!0,children:n.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:x,children:b})}),t[18]=x,t[19]=b,t[20]=E):E=t[20];let T;t[21]!==r?(T=n.jsx(zt,{variant:r}),t[21]=r,t[22]=T):T=t[22];let d;return t[23]!==T||t[24]!==E?(d=n.jsxs(ht,{children:[E,T]}),t[23]=T,t[24]=E,t[25]=d):d=t[25],d}function mn(e){const t=K.c(72),{decofile:r}=e,o=X(),[s,i]=Z.useState("calendar"),[a,c]=Z.useState(Kt),[l,m]=Z.useState(!1);let p,h,f;if(t[0]!==r||t[1]!==l){const I=It(r);p=I.filter(Ut).length,f=l?I:I.filter(Gt),h=Vt(f.map(Wt)),t[0]=r,t[1]=l,t[2]=p,t[3]=h,t[4]=f}else p=t[2],h=t[3],f=t[4];const g=h;let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=()=>c(mt(new Date)),t[5]=u):u=t[5];const x=u;let b;t[6]!==s?(b=()=>c(I=>s==="calendar"?U(I,-1):U(I,-3)),t[6]=s,t[7]=b):b=t[7];const E=b;let T;t[8]!==s?(T=()=>c(I=>s==="calendar"?U(I,1):U(I,3)),t[8]=s,t[9]=T):T=t[9];const d=T;let v;t[10]!==o?(v=o("sandbox.variantCalendar.today"),t[10]=o,t[11]=v):v=t[11];let y;t[12]!==v?(y=n.jsx(tt,{variant:"outline",size:"sm",onClick:x,children:v}),t[12]=v,t[13]=y):y=t[13];let N;t[14]!==o?(N=o("sandbox.variantCalendar.previous"),t[14]=o,t[15]=N):N=t[15];let A;t[16]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(gt,{size:16}),t[16]=A):A=t[16];let _;t[17]!==E||t[18]!==N?(_=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:E,"aria-label":N,children:A}),t[17]=E,t[18]=N,t[19]=_):_=t[19];let k;t[20]!==o?(k=o("sandbox.variantCalendar.next"),t[20]=o,t[21]=k):k=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(vt,{size:16}),t[22]=C):C=t[22];let $;t[23]!==d||t[24]!==k?($=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:d,"aria-label":k,children:C}),t[23]=d,t[24]=k,t[25]=$):$=t[25];const L=ct[a.getMonth()];let M;t[26]!==a?(M=a.getFullYear(),t[26]=a,t[27]=M):M=t[27];let w;t[28]!==L||t[29]!==M?(w=n.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[L," ",M]}),t[28]=L,t[29]=M,t[30]=w):w=t[30];let j;t[31]!==$||t[32]!==w||t[33]!==y||t[34]!==_?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[y,_,$,w]}),t[31]=$,t[32]=w,t[33]=y,t[34]=_,t[35]=j):j=t[35];let R;t[36]!==p||t[37]!==l||t[38]!==o?(R=p>0&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(jt,{id:"show-ongoing",checked:l,onCheckedChange:m}),n.jsx(yt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:o("sandbox.variantCalendar.showOngoing",{count:p})})]}),t[36]=p,t[37]=l,t[38]=o,t[39]=R):R=t[39];let B;t[40]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx(at,{}),t[40]=B):B=t[40];let V;t[41]!==o?(V=o("sandbox.variantCalendar.calendarMode"),t[41]=o,t[42]=V):V=t[42];let S;t[43]!==V?(S={value:"calendar",icon:B,label:V},t[43]=V,t[44]=S):S=t[44];let z;t[45]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsx(bt,{}),t[45]=z):z=t[45];let D;t[46]!==o?(D=o("sandbox.variantCalendar.timelineMode"),t[46]=o,t[47]=D):D=t[47];let O;t[48]!==D?(O={value:"timeline",icon:z,label:D},t[48]=D,t[49]=O):O=t[49];let P;t[50]!==S||t[51]!==O?(P=[S,O],t[50]=S,t[51]=O,t[52]=P):P=t[52];let H;t[53]!==P||t[54]!==s?(H=n.jsx(Tt,{value:s,onValueChange:i,options:P}),t[53]=P,t[54]=s,t[55]=H):H=t[55];let F;t[56]!==R||t[57]!==H?(F=n.jsxs("div",{className:"flex items-center gap-4",children:[R,H]}),t[56]=R,t[57]=H,t[58]=F):F=t[58];let W;t[59]!==j||t[60]!==F?(W=n.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,F]}),t[59]=j,t[60]=F,t[61]=W):W=t[61];let G;t[62]!==g||t[63]!==a||t[64]!==p||t[65]!==l||t[66]!==f||t[67]!==s?(G=f.length===0?n.jsx(Yt,{hiddenOngoing:l?0:p}):s==="calendar"?n.jsx(qt,{monthStart:a,variants:f,colorMap:g}):n.jsx(te,{monthStart:a,variants:f,colorMap:g}),t[62]=g,t[63]=a,t[64]=p,t[65]=l,t[66]=f,t[67]=s,t[68]=G):G=t[68];let J;return t[69]!==W||t[70]!==G?(J=n.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=J):J=t[71],J}function Wt(e){return e.blockKey}function Gt(e){return!e.openEnd}function Ut(e){return e.openEnd}function Kt(){return mt(new Date)}function Yt(e){const t=K.c(4),{hiddenOngoing:r}=e,o=r===void 0?0:r,s=X();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(at,{size:24,className:"text-muted-foreground/60"}),t[0]=i):i=t[0];let a;return t[1]!==o||t[2]!==s?(a=n.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[i,o>0?n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noDatedVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.hiddenOngoingVariants",{count:o})})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noScheduledVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=o,t[2]=s,t[3]=a):a=t[3],a}const et=20,it=2,st=28,Jt=6;function qt(e){const t=K.c(17),{monthStart:r,variants:o,colorMap:s}=e;let i,a,c,l,m;if(t[0]!==s||t[1]!==r||t[2]!==o){const f=Nt(r),g=_t(new Date);i=lt,m="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:wt.map(Xt)}),t[8]=c):c=t[8],l=f.map((u,x)=>{const b=kt(u,o),E=b.reduce(Qt,0),T=st+E*(et+it)+8;return n.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[u.map((d,v)=>{const y=d.getMonth()===r.getMonth(),N=d.getTime()===g.getTime();return n.jsx("div",{className:rt("border-r last:border-r-0 px-2 pt-1.5 text-xs",y?"bg-background":"bg-muted/30 text-muted-foreground"),children:n.jsx("span",{className:rt("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",N&&"bg-primary text-primary-foreground font-semibold"),children:d.getDate()})},v)}),b.map((d,v)=>{const y=dt(s,d.variant.blockKey),N=st+d.lane*(et+it),A=d.leftUnits/7*100,_=d.widthUnits/7*100,k=d.variant.openStart&&x===0,C=d.variant.openEnd&&x===f.length-1;return n.jsxs(ft,{variant:d.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${A}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:Jt,height:et},children:[d.variant.blockLabel,d.variant.label!==d.variant.blockLabel&&n.jsxs("span",{className:"opacity-70",children:[" · ",d.variant.label]})]},`${x}-${v}`)})]},x)}),t[0]=s,t[1]=r,t[2]=o,t[3]=i,t[4]=a,t[5]=c,t[6]=l,t[7]=m}else i=t[3],a=t[4],c=t[5],l=t[6],m=t[7];let p;t[9]!==a||t[10]!==c||t[11]!==l?(p=n.jsxs("div",{className:a,children:[c,l]}),t[9]=a,t[10]=c,t[11]=l,t[12]=p):p=t[12];let h;return t[13]!==i||t[14]!==m||t[15]!==p?(h=n.jsx(i,{className:m,children:p}),t[13]=i,t[14]=m,t[15]=p,t[16]=h):h=t[16],h}function Qt(e,t){return Math.max(e,t.lane+1)}function Xt(e){return n.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const q=4,Zt=32,Y=240;function te(e){const t=K.c(23),{monthStart:r,variants:o,colorMap:s}=e,i=r,a=U(r,q),c=new Date,l=new Map;for(const w of o){const j=l.get(w.blockKey)??[];j.push(w),l.set(w.blockKey,j)}const m=Array.from(l.entries()).sort(oe),p=a.getTime()-i.getTime(),h=w=>(Math.max(i.getTime(),Math.min(a.getTime(),w.getTime()))-i.getTime())/p*100;let f;t[0]!==i?(f=(w,j)=>U(i,j),t[0]=i,t[1]=f):f=t[1];const g=Array.from({length:q},f),u=c.getTime()>=i.getTime()&&c.getTime()<=a.getTime()?h(c):null,x=X(),b=lt,E="flex-1 min-h-0",T="min-w-[900px] relative";let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d={width:Y},t[2]=d):d=t[2];let v;t[3]!==x?(v=x("sandbox.variantCalendar.variantBlock"),t[3]=x,t[4]=v):v=t[4];let y;t[5]!==v?(y=n.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:d,children:v}),t[5]=v,t[6]=y):y=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${q}, minmax(0, 1fr))`},t[7]=N):N=t[7];const A=g.map(re);let _;t[8]!==A?(_=n.jsx("div",{className:"flex-1 grid",style:N,children:A}),t[8]=A,t[9]=_):_=t[9];let k;t[10]!==y||t[11]!==_?(k=n.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[y,_]}),t[10]=y,t[11]=_,t[12]=k):k=t[12];let C;t[13]!==x||t[14]!==u?(C=u!==null&&n.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${Y}px + (100% - ${Y}px) * ${u} / 100)`},children:n.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:x("sandbox.variantCalendar.todayLabel")})}),t[13]=x,t[14]=u,t[15]=C):C=t[15];const $=m.map(w=>{const[j,R]=w,B=dt(s,j),V=R[0]?.blockLabel??j;return n.jsxs("div",{children:[n.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:n.jsx("div",{className:"px-3 truncate",style:{width:Y},children:V})}),R.map((S,z)=>n.jsxs("div",{className:"flex border-b items-center",style:{height:Zt},children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:Y},children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:B.bg}}),n.jsx("span",{className:"truncate text-foreground/80",children:S.label})]}),n.jsxs("div",{className:"relative flex-1 h-full",children:[n.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${q}, minmax(0, 1fr))`},children:g.map(ee)}),(()=>{const D=Math.max(S.start.getTime(),i.getTime()),O=Math.min(S.end.getTime(),a.getTime());if(O<=D)return null;const P=h(new Date(D)),H=h(new Date(O))-P;return n.jsx(ft,{variant:S,color:B,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${P}%`,width:`calc(${H}% - 2px)`,height:22},children:S.label})})()]})]},z))]},j)});let L;t[16]!==k||t[17]!==C||t[18]!==$?(L=n.jsxs("div",{className:T,children:[k,C,$]}),t[16]=k,t[17]=C,t[18]=$,t[19]=L):L=t[19];let M;return t[20]!==b||t[21]!==L?(M=n.jsx(b,{className:E,children:L}),t[20]=b,t[21]=L,t[22]=M):M=t[22],M}function ee(e,t){return n.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function re(e,t){return n.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ct[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function oe(e,t){return e[0].localeCompare(t[0])}export{mn as VariantCalendar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,r as C,l as f,j as i,a4 as k,a1 as I,a2 as P}from"./index-
|
|
1
|
+
import{c as $,r as C,l as f,j as i,a4 as k,a1 as I,a2 as P}from"./index-VUBQd1QI.js";const M={sm:{button:"size-7",buttonWithLabel:"h-7",icon:"size-4"},md:{button:"size-9",buttonWithLabel:"h-9",icon:"size-5"},lg:{button:"size-12",buttonWithLabel:"h-12",icon:"size-6"}};function A(E){const t=$.c(27),{value:s,onValueChange:y,options:o,size:L,fullWidth:R,className:z}=E,_=L===void 0?"sm":L,m=R===void 0?!1:R;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const T=C.useRef(h);let x;t[1]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},t[1]=x):x=t[1];const[d,S]=C.useState(x);let g,p;t[2]!==o||t[3]!==s?(g=()=>{const e=o.findIndex(j=>j.value===s),b=T.current[e];b&&S({left:b.offsetLeft,width:b.offsetWidth,opacity:1})},p=[s,o],t[2]=o,t[3]=s,t[4]=g,t[5]=p):(g=t[4],p=t[5]),C.useEffect(g,p);const l=M[_];let n;t[6]!==z?(n=f("relative flex gap-0 bg-muted rounded-lg",z),t[6]=z,t[7]=n):n=t[7];let a;t[8]!==l||t[9]!==m||t[10]!==y||t[11]!==o||t[12]!==s?(a=o.map((e,b)=>{const j=i.jsxs("button",{ref:V=>{T.current[b]=V},type:"button",onClick:()=>y(e.value),"aria-label":e.label,className:f("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",m?"flex-1 h-12 px-4":e.label?f(l.buttonWithLabel,"px-3"):l.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",l.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=l,t[9]=m,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=m?"h-12":l.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==n||t[25]!==a?(v=i.jsxs("div",{className:n,children:[a,u]}),t[23]=u,t[24]=n,t[25]=a,t[26]=v):v=t[26],v}export{A as V};
|
package/dist/client/index.html
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
<meta name="twitter:description" content="Hire specialized agents, give them access to your tools, and let them deliver real projects — with planning, verification, and observability built in." />
|
|
51
51
|
<meta name="twitter:image" content="/og-image.png" />
|
|
52
52
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
53
|
-
<script type="module" crossorigin src="/assets/index-
|
|
53
|
+
<script type="module" crossorigin src="/assets/index-VUBQd1QI.js"></script>
|
|
54
54
|
<link rel="stylesheet" crossorigin href="/assets/index-DJADaZ4J.css">
|
|
55
55
|
</head>
|
|
56
56
|
<body>
|
package/dist/server/cli.js
CHANGED
|
@@ -1965,7 +1965,7 @@ Usage: deco services <up|down|status>`),process.exit(1)}}var ra1=D(()=>{yy()});f
|
|
|
1965
1965
|
`.execute($);if(Number(W.rows[0]?.cnt)===0){console.warn(`Failed to migrate ${G}/${K}, keeping in old table`);continue}}await Hh`
|
|
1966
1966
|
DELETE FROM kysely_migration WHERE name = ${Q}
|
|
1967
1967
|
`.execute($)}}async function O8$($){await C94($),await _94($);let Z=new N8$({db:$,provider:{getMigrations:()=>Promise.resolve(Sr0)}}),{error:Q,results:X}=await Z.migrateToLatest(),Y=0;if(X?.forEach((J)=>{if(J.status==="Success")Y++;else if(J.status==="Error")console.error(`Failed to execute migration "${J.migrationName}"`)}),Q)throw console.error("Failed to migrate"),console.error(Q),Q;return Y}async function v94($){let{keepOpen:Z=!1,database:Q,skipBetterAuth:X=!1}=$??{},Y="skipped";if(!X&&!Q)Y=await $p0();let J=Q??l$(),G=async()=>{if(!Z&&!Q)await ZD(J).catch((K)=>{console.warn("Warning: Error closing database:",K)})};try{let K=await O8$(J.db);return await G(),{betterAuth:Y,kysely:K}}catch(K){throw await G(),K}}async function x94(){let $=l$(),Z=new N8$({db:$.db,provider:{getMigrations:()=>Promise.resolve(Sr0)}}),{error:Q,results:X}=await Z.migrateDown();if(X?.forEach((Y)=>{if(Y.status==="Success")console.log(`\u2705 Migration "${Y.migrationName}" rolled back successfully`);else if(Y.status==="Error")console.error(`\u274C Failed to rollback migration "${Y.migrationName}"`)}),Q)throw console.error("Failed to rollback migration"),console.error(Q),Q}var L8$=D(()=>{U8$();Zp0();AQ()});async function eX0($){let Z={...process.env},Q=c60($,Z);console.log(sA1(Q.settings.encryptionKey));let X=Q.settings.betterAuthSecret||(Q.settings.localMode?Ve1(Q.settings.dataDir):""),{ensureServices:Y}=await Promise.resolve().then(() => ($X0(),eQ0)),{outputs:J,services:G}=await Y({home:Q.settings.dataDir,externalDatabaseUrl:Q.externalDatabaseUrl,externalNatsUrl:Q.externalNatsUrl});if(!Q.skipMigrations){let{migrateBetterAuth:W}=await Promise.resolve().then(() => (Zp0(),Se1));await W(J.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (AQ(),ps1)),{migrateToLatest:F}=await Promise.resolve().then(() => (L8$(),D8$)),U=H(J.databaseUrl);await F({keepOpen:!0,database:U,skipBetterAuth:!0})}let K={...Q.settings,betterAuthSecret:X,databaseUrl:J.databaseUrl,natsUrls:J.natsUrls,...J.s3?{s3Endpoint:J.s3.endpoint,s3Bucket:J.s3.bucket,s3AccessKeyId:J.s3.accessKeyId,s3SecretAccessKey:J.s3.secretAccessKey,s3ForcePathStyle:J.s3.forcePathStyle}:{}};return aa1(K),{settings:K,services:G.map((W)=>({name:W.name==="PostgreSQL"?"Postgres":W.name,port:W.port})),managedServiceNames:G.filter((W)=>W.owner==="managed").map((W)=>W.name)}}var Cr0=D(()=>{yy();ke1();A$()});var z8$={};e(z8$,{updateService:()=>$z,subscribeCliState:()=>xr0,setTuiConsoleIntercepted:()=>$Y0,setServerUrl:()=>wt,setMigrationsDone:()=>Lt,setDevMode:()=>b94,resetCliStateForTests:()=>f94,isTuiConsoleIntercepted:()=>ZY0,getCliState:()=>vr0,addLogEntry:()=>KD});function w8$(){return[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}]}function j8$(){return{services:w8$(),migrationsStatus:"pending",serverUrl:null,logs:[]}}function f94(){OY=j8$()}function Dt(){for(let $ of _r0)$()}function vr0(){return OY}function xr0($){return _r0.add($),()=>_r0.delete($)}function $z($){OY={...OY,services:OY.services.map((Z)=>Z.name===$.name?$:Z)},Dt()}function Lt(){OY={...OY,migrationsStatus:"done"},Dt()}function wt($){OY={...OY,serverUrl:$},Dt()}function KD($){let Z=[...OY.logs,$];OY={...OY,logs:Z.length>500?Z.slice(-500):Z},Dt()}function b94(){OY={...OY,services:[...w8$(),{name:"API",status:"pending",port:0},{name:"Vite",status:"pending",port:0}]},Dt()}function $Y0($){E8$=$}function ZY0(){return E8$}var OY,_r0,E8$=!1;var Zz=D(()=>{OY=j8$();_r0=new Set});import{createServer as P8$}from"net";function y94($){return new Promise((Z)=>{let Q=P8$();Q.once("error",()=>Z(!1)),Q.listen($,"0.0.0.0",()=>{Q.close(()=>Z(!0))})})}async function jt($){if(await y94($))return $;let Z=await new Promise((Q,X)=>{let Y=P8$();Y.once("error",X),Y.listen(0,"0.0.0.0",()=>{let J=Y.address(),G=typeof J==="object"&&J?J.port:0;Y.close(()=>Q(G))})});return console.warn(`Port ${$} is in use, using port ${Z} instead.`),Z}var fr0=()=>{};var yr0={};e(yr0,{startDevServer:()=>h94,pipeToLogStore:()=>br0});import{join as g94}from"path";function br0($){let Z=$.getReader(),Q=new TextDecoder,X="";function Y(){let J=X.split(`
|
|
1968
|
-
`);X=J.pop()??"";for(let G of J){let K=Bun.stripANSI(G).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;KD({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{try{for(;;){let{done:J,value:G}=await Z.read();if(J)break;X+=Q.decode(G,{stream:!0}),Y()}}catch{}if(X.trim()){let J=Bun.stripANSI(X).replace(/^\[\d+\]\s*/,"").trim();if(J)KD({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:J})}})()}async function h94($){let{baseUrl:Z,noTui:Q}=$,X=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=X?process.env.PORT:$.vitePort,J=Z||`http://localhost:${Y}`,G=X?await jt(Number(Y)+1):await jt(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await eX0({port:String(G),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let L of W)$z({name:L.name,status:"ready",port:L.port});Lt();let F=g94(import.meta.dir,"..","..","..","..",".."),U=Q===!0,N=Bun.spawn(["bun","run","dev:servers"],{cwd:F,env:{...process.env,PORT:String(K.port),VITE_PORT:String(Y),DATABASE_URL:K.databaseUrl,NATS_URL:K.natsUrls.join(","),NODE_ENV:K.nodeEnv,BASE_URL:J,DECOCMS_LOCAL_MODE:String(K.localMode),DECOCMS_HOME:K.dataDir,DATA_DIR:K.dataDir,DECO_CLI:"1",...K.betterAuthSecret?{BETTER_AUTH_SECRET:K.betterAuthSecret}:{},...K.s3Endpoint?{S3_ENDPOINT:K.s3Endpoint,S3_BUCKET:K.s3Bucket??"",S3_ACCESS_KEY_ID:K.s3AccessKeyId??"",S3_SECRET_ACCESS_KEY:K.s3SecretAccessKey??"",S3_FORCE_PATH_STYLE:String(K.s3ForcePathStyle)}:{},...K.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)br0(N.stdout),br0(N.stderr);wt(J),$z({name:"Vite",status:"ready",port:Number(Y)}),$z({name:"API",status:"ready",port:Number(K.port)});let O=async(L)=>{if(N.kill(L),await N.exited,H.length>0){let{stopServices:w}=await Promise.resolve().then(() => ($X0(),eQ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:N}}var gr0=D(()=>{Cr0();Zz();fr0()});var QY0;var hr0=D(()=>{QY0={name:"decocms",version:"4.357.1",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js","db:migrate:dbos":"bun run ./dist/server/migrate-dbos.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts","migrate:dbos":"bun run src/database/migrate-dbos.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^3.0.85","@ai-sdk/google":"^3.0.83","@ai-sdk/openai":"^3.0.73","@anthropic-ai/sdk":"^0.105.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/client-sts":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.21.6","@inkjs/ui":"^2.0.0","@nats-io/jetstream":"3.4.0","@nats-io/kv":"3.4.0","@nats-io/nats-core":"3.4.0","@nats-io/transport-node":"3.4.0","@openrouter/ai-sdk-provider":"^2.9.1","@opentelemetry/core":"^2.6.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^3.0.10","@better-auth/sso":"1.4.1","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/shared":"workspace:*","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@types/bun":"^1.3.1","@types/google.maps":"^3.65.2","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@vercel/nft":"^1.1.1",ai:"^6.0.208","better-auth":"1.4.22",croner:"^9.1.0",degit:"^2.8.4",hono:"^4.10.7",jose:"^6.0.11",nanoid:"^5.1.6",pg:"^8.16.3",typescript:"^7.0.2",typescript5:"npm:typescript@^5.9.3",zod:"4.3.6"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as l94,Text as A8$}from"ink";import{jsx as c94,jsxs as T8$}from"react/jsx-runtime";function R8$({version:$}){return T8$(l94,{flexDirection:"column",marginTop:1,children:[RX0.map((Z,Q)=>c94(A8$,{color:qX0[Q],children:Z},Q)),T8$(A8$,{dimColor:!0,children:[" v",$]})]})}var q8$=D(()=>{Zt()});import{Box as Qz,Text as WD}from"ink";import{Spinner as m94}from"@inkjs/ui";import{jsx as CJ,jsxs as Fh}from"react/jsx-runtime";function I8$({status:$}){if($==="pending")return CJ(m94,{label:""});return CJ(WD,{color:"green",children:"\u2713"})}function d94($){return`${$.name}: ${$.port||"...."}`}function M8$({services:$,migrationsStatus:Z,home:Q,serverUrl:X}){return Fh(Qz,{flexDirection:"column",paddingBottom:1,children:[CJ(R8$,{version:QY0.version}),CJ(Qz,{marginBottom:1,children:CJ(WD,{dimColor:!0,children:"\u2500".repeat(80)})}),CJ(Qz,{children:Fh(WD,{dimColor:!0,children:["Home: ",Q]})}),Fh(Qz,{gap:2,children:[$.map((Y)=>Fh(Qz,{gap:1,children:[CJ(WD,{children:d94(Y)}),CJ(I8$,{status:Y.status})]},Y.name)),Fh(Qz,{gap:1,children:[CJ(WD,{children:"Migrations"}),CJ(I8$,{status:Z})]})]}),CJ(Qz,{children:X?Fh(WD,{children:["Open in browser: ",CJ(WD,{color:"cyan",children:X})]}):CJ(WD,{dimColor:!0,children:"Starting..."})})]})}var V8$=D(()=>{hr0();q8$()});import{Box as i94,Text as Et}from"ink";import{jsx as ur0,jsxs as lr0}from"react/jsx-runtime";function p94($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function k8$({logs:$}){return ur0(i94,{flexDirection:"column",children:$.map((Z,Q)=>{if(Z.rawLine)return ur0(Et,{dimColor:!0,children:Z.rawLine},Q);let X=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return lr0(Et,{children:[lr0(Et,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),ur0(Et,{color:p94(Z.status),children:Z.status}),lr0(Et,{dimColor:!0,children:[" ",X.padStart(8)]})]},Q)})})}var S8$=()=>{};var cr0={};e(cr0,{App:()=>o94});import{Box as n94}from"ink";import{useSyncExternalStore as t94}from"react";import{jsx as C8$,jsxs as r94}from"react/jsx-runtime";function o94({home:$}){let Z=t94(xr0,vr0);return r94(n94,{flexDirection:"column",children:[C8$(M8$,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),C8$(k8$,{logs:Z.logs})]})}var mr0=D(()=>{V8$();S8$();Zz()});var YG="thread-gate",GN="decopilot-hosted-harness",KN="decopilot-hosted-harness-sandboxed",JG="automations",HD="background-tools",Xz="task-board-github-reads";var _8$="11";function v8$($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:_8$,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var x8$=()=>{};import a94 from"pg";async function b8$($,Z){let{databaseUrl:Q,lockTimeoutMs:X=s94}=$,Y=$.log??((W)=>console.log(W)),J=new a94.Client({connectionString:Q});await J.connect();let G=Date.now(),K=!1;try{while(!K){if(K=(await J.query("SELECT pg_try_advisory_lock($1) AS locked",[f8$.toString()])).rows[0]?.locked===!0,K)break;if(Date.now()-G>=X)throw Error(`Timed out after ${X}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await B$(e94)}let W=Date.now()-G;if(W>1000)Y(`[dbos] waited ${W}ms for the migration lock; another process migrated first`);return await Z()}finally{if(K)try{await J.query("SELECT pg_advisory_unlock($1)",[f8$.toString()])}catch{}await J.end().catch(()=>{})}}var f8$=8314027461559302n,s94=600000,e94=500;var y8$=D(()=>{Z8()});function $Z4(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function dr0($,Z){for(let Q=0;Q<$.length;Q++){let X=$[Q];if(X===void 0)continue;if(X===Z)return $[Q+1];if(X.startsWith(`${Z}=`))return X.slice(Z.length+1)}return}function g8$(){let $=$Z4();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:dr0($,"--cpu-prof-dir")??process.cwd(),name:dr0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(dr0($,"--cpu-prof-interval")??1000),note:"profile is written on process exit"}));return}if(process.env.CPU_PROFILE)console.warn(JSON.stringify({msg:"cpu-profiling-requested-but-inactive",hint:'CPU profiling is a Bun launch flag. Set BUN_OPTIONS="--cpu-prof --cpu-prof-md --cpu-prof-dir=/tmp" before starting the process.'}))}function h8$(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let Q=rE();if(!Q)return;let X={};try{let{heapStats:Y}=await import("bun:jsc"),J=Y(),G=Object.entries(J.objectTypeCounts).sort((K,W)=>W[1]-K[1]).slice(0,20);X={objectCount:J.objectCount,heapSize:J.heapSize,top:Object.fromEntries(G)}}catch{}console.log(JSON.stringify({msg:"heap-watch",ts:new Date().toISOString(),uptimeS:Math.round(process.uptime()),rss:Q.rss,heapUsed:Q.heapUsed,heapTotal:Q.heapTotal,external:Q.external,arrayBuffers:Q.arrayBuffers,...X}))};return Z().catch(()=>{}),XY0=setInterval(()=>void Z().catch(()=>{}),$),XY0.unref?.(),process.on("SIGUSR2",()=>{try{let Q=Bun.generateHeapSnapshot("v8"),X=typeof Q==="string"?Q:JSON.stringify(Q),Y=`/tmp/heap-${process.pid}-${Date.now()}.heapsnapshot`;Bun.write(Y,X),console.log(JSON.stringify({msg:"heap-snapshot-written",path:Y}))}catch(Q){console.error("[heap-watch] snapshot failed:",Q)}}),()=>{if(XY0)clearInterval(XY0)}}var XY0;var u8$=()=>{};import*as ZZ4 from"bun:jsc";function l8$(){if(process.env.STALL_WATCHDOG!=="1")return()=>{};let $=Number(process.env.STALL_WATCHDOG_MS??100),Z=Number(process.env.STALL_WATCHDOG_TICK_MS??50);try{QZ4()}catch(J){return console.error("[stall-watchdog] failed to start sampling profiler:",J),()=>{}}let Q,X=performance.now()+Z,Y=()=>{let J=performance.now(),G=J-X;X=J+Z;let K=[];try{K=XZ4()?.traces??[]}catch{}if(G>$&&K.length>0){let W=new Map;for(let F of K){let U=F.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??F.frames[0];if(!U)continue;let N=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${U.name??"?"} @ ${N}:${U.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((F,U)=>U[1]-F[1]).slice(0,8).map(([F,U])=>({frame:F,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(G),samplesInWindow:K.length,top:H}))}Q=setTimeout(Y,Z),Q.unref?.()};return Q=setTimeout(Y,Z),Q.unref?.(),()=>{if(Q)clearTimeout(Q)}}var QZ4,XZ4;var c8$=D(()=>{({startSamplingProfiler:QZ4,samplingProfilerStackTraces:XZ4}=ZZ4)});function m8$(){g8$();let $=[h8$(),gs1(),l8$()];return()=>{for(let Z of $)Z()}}var d8$=D(()=>{pi0();u8$();c8$()});var Yz=v((i8$)=>{Object.defineProperty(i8$,"__esModule",{value:!0});i8$.RepublishHeaders=i8$.DirectMsgHeaders=i8$.JsHeaders=i8$.AdvisoryKind=void 0;i8$.isOrderedPushConsumerOptions=YZ4;i8$.isPullConsumer=JZ4;i8$.isPushConsumer=GZ4;i8$.isBoundPushConsumerOptions=KZ4;function YZ4($){if($&&typeof $==="object")return"name_prefix"in $||"deliver_subject_prefix"in $||"filter_subjects"in $||"filter_subject"in $||"deliver_policy"in $||"opt_start_seq"in $||"opt_start_time"in $||"replay_policy"in $||"inactive_threshold"in $||"headers_only"in $||"deliver_prefix"in $;return!1}function JZ4($){return $.isPullConsumer()}function GZ4($){return $.isPushConsumer()}function KZ4($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}i8$.AdvisoryKind={API:"api_audit",StreamAction:"stream_action",ConsumerAction:"consumer_action",SnapshotCreate:"snapshot_create",SnapshotComplete:"snapshot_complete",RestoreCreate:"restore_create",RestoreComplete:"restore_complete",MaxDeliver:"max_deliver",Terminated:"terminated",Ack:"consumer_ack",StreamLeaderElected:"stream_leader_elected",StreamQuorumLost:"stream_quorum_lost",ConsumerLeaderElected:"consumer_leader_elected",ConsumerQuorumLost:"consumer_quorum_lost"};i8$.JsHeaders={StreamSourceHdr:"Nats-Stream-Source",LastConsumerSeqHdr:"Nats-Last-Consumer",LastStreamSeqHdr:"Nats-Last-Stream",ConsumerStalledHdr:"Nats-Consumer-Stalled",MessageSizeHdr:"Nats-Msg-Size",RollupHdr:"Nats-Rollup",RollupValueSubject:"sub",RollupValueAll:"all",PendingMessagesHdr:"Nats-Pending-Messages",PendingBytesHdr:"Nats-Pending-Bytes",RequiredApiLevel:"Nats-Required-Api-Level"};i8$.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};i8$.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var _J=v((n8$)=>{Object.defineProperty(n8$,"__esModule",{value:!0});n8$.TD=n8$.TE=n8$.Empty=void 0;n8$.encode=LZ4;n8$.decode=wZ4;n8$.Empty=new Uint8Array(0);n8$.TE=new TextEncoder;n8$.TD=new TextDecoder;function DZ4(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let Q=new Uint8Array(Z),X=0;for(let Y=0;Y<$.length;Y++)Q.set($[Y],X),X+=$[Y].length;return Q}function LZ4(...$){let Z=[];for(let Q=0;Q<$.length;Q++)Z.push(n8$.TE.encode($[Q]));if(Z.length===0)return n8$.Empty;if(Z.length===1)return Z[0];return DZ4(...Z)}function wZ4($){if(!$||$.length===0)return"";return n8$.TD.decode($)}});var vJ=v((r8$)=>{Object.defineProperty(r8$,"__esModule",{value:!0});r8$.errors=r8$.PermissionViolationError=r8$.NoRespondersError=r8$.TimeoutError=r8$.RequestError=r8$.ProtocolError=r8$.ConnectionError=r8$.DrainingConnectionError=r8$.ClosedConnectionError=r8$.AuthorizationError=r8$.UserAuthenticationExpiredError=r8$.InvalidOperationError=r8$.InvalidArgumentError=r8$.InvalidSubjectError=void 0;class pr0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}r8$.InvalidSubjectError=pr0;class YY0 extends Error{constructor($,Z){super($,Z);this.name="InvalidArgumentError"}static format($,Z,Q){if(Array.isArray(Z)&&Z.length>1)Z=Z[0];if(Array.isArray($))$=$.map((X)=>`'${X}'`),$=$.join(",");else $=`'${$}'`;return new YY0(`${$} ${Z}`,Q)}}r8$.InvalidArgumentError=YY0;class nr0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}r8$.InvalidOperationError=nr0;class JY0 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new JY0($);return null}}r8$.UserAuthenticationExpiredError=JY0;class GY0 extends Error{constructor($,Z){super($,Z);this.name="AuthorizationError"}static parse($){let Z=["authorization violation","account authentication expired","authentication timeout"],Q=$.toLowerCase();for(let X=0;X<Z.length;X++)if(Q.indexOf(Z[X])!==-1)return new GY0($);return null}}r8$.AuthorizationError=GY0;class tr0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}r8$.ClosedConnectionError=tr0;class or0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}r8$.DrainingConnectionError=or0;class rr0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}r8$.ConnectionError=rr0;class ar0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}r8$.ProtocolError=ar0;class sr0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof KY0}}r8$.RequestError=sr0;class er0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}r8$.TimeoutError=er0;class KY0 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}r8$.NoRespondersError=KY0;class WY0 extends Error{operation;subject;queue;constructor($,Z,Q,X,Y){super($,Y);this.name="PermissionViolationError",this.operation=Z,this.subject=Q,this.queue=X}static parse($){if(($?$.toLowerCase():"").indexOf("permissions violation")===-1)return null;let Q="publish",X="",Y=void 0,J=$.match(/(Publish|Subscription) to "(\S+)"/);if(J){if(Q=J[1].toLowerCase(),X=J[2],Q==="subscription"){let G=$.match(/using queue "(\S+)"/);if(G)Y=G[1]}}return new WY0($,Q,X,Y)}}r8$.PermissionViolationError=WY0;r8$.errors={AuthorizationError:GY0,ClosedConnectionError:tr0,ConnectionError:rr0,DrainingConnectionError:or0,InvalidArgumentError:YY0,InvalidOperationError:nr0,InvalidSubjectError:pr0,NoRespondersError:KY0,PermissionViolationError:WY0,ProtocolError:ar0,RequestError:sr0,TimeoutError:er0,UserAuthenticationExpiredError:JY0}});var CK=v((Z4$)=>{Object.defineProperty(Z4$,"__esModule",{value:!0});Z4$.SimpleMutex=Z4$.Perf=void 0;Z4$.extend=xZ4;Z4$.render=fZ4;Z4$.timeout=bZ4;Z4$.delay=yZ4;Z4$.deadline=gZ4;Z4$.deferred=Za0;Z4$.debugDeferred=hZ4;Z4$.shuffle=uZ4;Z4$.collect=lZ4;Z4$.jitter=$4$;Z4$.backoff=cZ4;Z4$.nanos=mZ4;Z4$.millis=dZ4;Z4$.randomToken=nZ4;var vZ4=_J(),$a0=vJ();function xZ4($,...Z){for(let Q=0;Q<Z.length;Q++){let X=Z[Q];Object.keys(X).forEach(function(Y){$[Y]=X[Y]})}return $}function fZ4($){return vZ4.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function bZ4($,Z=!0){let Q=Z?new $a0.TimeoutError:null,X,Y,J=new Promise((G,K)=>{X={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(Q===null)K(new $a0.TimeoutError);else K(Q)},$)});return Object.assign(J,X)}function yZ4($=0){let Z,Q=new Promise((X)=>{let Y=setTimeout(()=>{X()},$);Z={cancel:()=>{if(Y)clearTimeout(Y),X()}}});return Object.assign(Q,Z)}async function gZ4($,Z=1000){let Q=Za0(),X=setTimeout(()=>{Q.reject(new $a0.TimeoutError)},Z);try{return await Promise.race([$,Q])}finally{clearTimeout(X)}}function Za0(){let $={},Z=new Promise((Q,X)=>{$={resolve:Q,reject:X}});return Object.assign(Z,$)}function hZ4(){let $={},Z=new Promise((Q,X)=>{$={resolve:(Y)=>{console.trace("resolve",Y),Q(Y)},reject:(Y)=>{console.trace("reject"),X(Y)}}});return Object.assign(Z,$)}function uZ4($){for(let Z=$.length-1;Z>0;Z--){let Q=Math.floor(Math.random()*(Z+1));[$[Z],$[Q]]=[$[Q],$[Z]]}return $}async function lZ4($){let Z=[];for await(let Q of $)Z.push(Q);return Z}class s8${timers;measures;constructor(){this.timers=new Map,this.measures=new Map}mark($){this.timers.set($,performance.now())}measure($,Z,Q){let X=this.timers.get(Z);if(X===void 0)throw Error(`${Z} is not defined`);let Y=this.timers.get(Q);if(Y===void 0)throw Error(`${Q} is not defined`);this.measures.set($,Y-X)}getEntries(){let $=[];return this.measures.forEach((Z,Q)=>{$.push({name:Q,duration:Z})}),$}}Z4$.Perf=s8$;class e8${max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=Za0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Z4$.SimpleMutex=e8$;function $4$($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function cZ4($=[0,250,250,500,500,3000,5000]){if(!Array.isArray($))$=[0,250,250,500,500,3000,5000];let Z=$.length-1;return{backoff(Q){return $4$(Q>Z?$[Z]:$[Q])}}}function mZ4($){return $*1e6}function dZ4($){return Math.floor($/1e6)}var iZ4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",WN=new Uint8Array(62);for(let $=0;$<62;$++)WN[$]=iZ4.charCodeAt($);var pZ4=218340105584896;function nZ4(){let $=Math.floor(Math.random()*pZ4),Z=$%62,Q=WN[Z];$=($-Z)/62,Z=$%62;let X=WN[Z];$=($-Z)/62,Z=$%62;let Y=WN[Z];$=($-Z)/62,Z=$%62;let J=WN[Z];$=($-Z)/62,Z=$%62;let G=WN[Z];$=($-Z)/62,Z=$%62;let K=WN[Z];$=($-Z)/62,Z=$%62;let W=WN[Z];$=($-Z)/62;let H=WN[$];return String.fromCharCode(Q,X,Y,J,G,K,W,H)}});var H4$=v((K4$)=>{Object.defineProperty(K4$,"__esModule",{value:!0});K4$.nuid=K4$.NuidImpl=void 0;var H74="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",FD=62,FY0=12,J4$=10,X4$=33,F74=333,Y4$=FY0+J4$,Xa0=new Uint8Array(FD);for(let $=0;$<FD;$++)Xa0[$]=H74.charCodeAt($);var HY0=4294967296,G4$=BigInt(FD)**BigInt(J4$),zt=Number(G4$/(1n<<32n)),Qa0=Number(G4$%(1n<<32n));function U74($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function N74($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else U74($)}class Ya0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(Y4$),this.cbuf=new Uint8Array(FY0),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(zt+1)),this.seqLo=Math.floor(Math.random()*HY0);while($++<8&&this.seqHi===zt&&this.seqLo>=Qa0);if(this.seqHi===zt&&this.seqLo>=Qa0)this.seqLo=0;this.inc=Math.random()*(F74-X4$)+X4$|0}setPre(){N74(this.cbuf);for(let $=0;$<FY0;$++)this.buf[$]=Xa0[this.cbuf[$]%FD]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let Q=Y4$-1;Q>=FY0;Q--){let X=Math.floor($/FD),J=($-X*FD)*HY0+Z,G=Math.floor(J/FD),K=J-G*FD;this.buf[Q]=Xa0[K],$=X,Z=G}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=HY0)this.seqLo-=HY0,this.seqHi+=1;if(this.seqHi>zt||this.seqHi===zt&&this.seqLo>=Qa0)this.setPre(),this.initSeqAndInc();this.fillSeq();let $=this.buf;return String.fromCharCode($[0],$[1],$[2],$[3],$[4],$[5],$[6],$[7],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15],$[16],$[17],$[18],$[19],$[20],$[21])}reset(){this.init()}}K4$.NuidImpl=Ya0;K4$.nuid=new Ya0});var B4$=v((U4$)=>{Object.defineProperty(U4$,"__esModule",{value:!0});U4$.nuid=U4$.Nuid=void 0;var F4$=H4$();U4$.Nuid=F4$.NuidImpl;U4$.nuid=F4$.nuid});var NY0=v((UY0)=>{Object.defineProperty(UY0,"__esModule",{value:!0});UY0.nuid=UY0.Nuid=void 0;var O4$=B4$();Object.defineProperty(UY0,"Nuid",{enumerable:!0,get:function(){return O4$.Nuid}});Object.defineProperty(UY0,"nuid",{enumerable:!0,get:function(){return O4$.nuid}})});var UD=v((D4$)=>{Object.defineProperty(D4$,"__esModule",{value:!0});D4$.DEFAULT_HOST=D4$.DEFAULT_PORT=D4$.Match=void 0;D4$.syncIterator=j74;D4$.createInbox=E74;var L74=NY0(),w74=vJ();D4$.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function j74($){let Z=$[Symbol.asyncIterator]();return{async next(){let Q=await Z.next();if(Q.done)return Promise.resolve(null);return Promise.resolve(Q.value)}}}function E74($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw w74.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${L74.nuid.next()}`}D4$.DEFAULT_PORT=4222;D4$.DEFAULT_HOST="127.0.0.1"});var Pt=v((E4$)=>{Object.defineProperty(E4$,"__esModule",{value:!0});E4$.DataBuffer=void 0;var w4$=_J();class j4${buffers;byteLength;constructor(){this.buffers=[],this.byteLength=0}static concat(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let Q=new Uint8Array(Z),X=0;for(let Y=0;Y<$.length;Y++)Q.set($[Y],X),X+=$[Y].length;return Q}static fromAscii($){if(!$)$="";return w4$.TE.encode($)}static toAscii($){return w4$.TD.decode($)}reset(){this.buffers.length=0,this.byteLength=0}pack(){if(this.buffers.length>1){let $=new Uint8Array(this.byteLength),Z=0;for(let Q=0;Q<this.buffers.length;Q++)$.set(this.buffers[Q],Z),Z+=this.buffers[Q].length;this.buffers.length=0,this.buffers.push($)}}shift(){if(this.buffers.length){let $=this.buffers.shift();if($)return this.byteLength-=$.length,$}return new Uint8Array(0)}drain($){if(this.buffers.length){this.pack();let Z=this.buffers.pop();if(Z){let Q=this.byteLength;if($===void 0||$>Q)$=Q;let X=Z.subarray(0,$);if(Q>$)this.buffers.push(Z.subarray($));return this.byteLength=Q-$,X}}return new Uint8Array(0)}fill($,...Z){if($)this.buffers.push($),this.byteLength+=$.length;for(let Q=0;Q<Z.length;Q++)if(Z[Q]&&Z[Q].length)this.buffers.push(Z[Q]),this.byteLength+=Z[Q].length}peek(){if(this.buffers.length)return this.pack(),this.buffers[0];return new Uint8Array(0)}size(){return this.byteLength}length(){return this.buffers.length}}E4$.DataBuffer=j4$});var Jz=v((A4$)=>{Object.defineProperty(A4$,"__esModule",{value:!0});A4$.LF=A4$.CR=A4$.CRLF=A4$.CR_LF_LEN=A4$.CR_LF=void 0;A4$.setTransportFactory=M74;A4$.defaultPort=V74;A4$.getUrlParseFn=k74;A4$.newTransport=S74;A4$.getResolveFn=C74;A4$.protoLen=P4$;A4$.extractProtocolMessage=_74;var R74=_J(),q74=UD(),I74=Pt(),xJ;function M74($){xJ=$}function V74(){return xJ!==void 0&&xJ.defaultPort!==void 0?xJ.defaultPort:q74.DEFAULT_PORT}function k74(){return xJ!==void 0&&xJ.urlParseFn?xJ.urlParseFn:void 0}function S74(){if(!xJ||typeof xJ.factory!=="function")throw Error("transport fn is not set");return xJ.factory()}function C74(){return xJ!==void 0&&xJ.dnsResolveFn?xJ.dnsResolveFn:void 0}A4$.CR_LF=`\r
|
|
1968
|
+
`);X=J.pop()??"";for(let G of J){let K=Bun.stripANSI(G).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;KD({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{try{for(;;){let{done:J,value:G}=await Z.read();if(J)break;X+=Q.decode(G,{stream:!0}),Y()}}catch{}if(X.trim()){let J=Bun.stripANSI(X).replace(/^\[\d+\]\s*/,"").trim();if(J)KD({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:J})}})()}async function h94($){let{baseUrl:Z,noTui:Q}=$,X=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=X?process.env.PORT:$.vitePort,J=Z||`http://localhost:${Y}`,G=X?await jt(Number(Y)+1):await jt(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await eX0({port:String(G),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let L of W)$z({name:L.name,status:"ready",port:L.port});Lt();let F=g94(import.meta.dir,"..","..","..","..",".."),U=Q===!0,N=Bun.spawn(["bun","run","dev:servers"],{cwd:F,env:{...process.env,PORT:String(K.port),VITE_PORT:String(Y),DATABASE_URL:K.databaseUrl,NATS_URL:K.natsUrls.join(","),NODE_ENV:K.nodeEnv,BASE_URL:J,DECOCMS_LOCAL_MODE:String(K.localMode),DECOCMS_HOME:K.dataDir,DATA_DIR:K.dataDir,DECO_CLI:"1",...K.betterAuthSecret?{BETTER_AUTH_SECRET:K.betterAuthSecret}:{},...K.s3Endpoint?{S3_ENDPOINT:K.s3Endpoint,S3_BUCKET:K.s3Bucket??"",S3_ACCESS_KEY_ID:K.s3AccessKeyId??"",S3_SECRET_ACCESS_KEY:K.s3SecretAccessKey??"",S3_FORCE_PATH_STYLE:String(K.s3ForcePathStyle)}:{},...K.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)br0(N.stdout),br0(N.stderr);wt(J),$z({name:"Vite",status:"ready",port:Number(Y)}),$z({name:"API",status:"ready",port:Number(K.port)});let O=async(L)=>{if(N.kill(L),await N.exited,H.length>0){let{stopServices:w}=await Promise.resolve().then(() => ($X0(),eQ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:N}}var gr0=D(()=>{Cr0();Zz();fr0()});var QY0;var hr0=D(()=>{QY0={name:"decocms",version:"4.357.2",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js","db:migrate:dbos":"bun run ./dist/server/migrate-dbos.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts","migrate:dbos":"bun run src/database/migrate-dbos.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^3.0.85","@ai-sdk/google":"^3.0.83","@ai-sdk/openai":"^3.0.73","@anthropic-ai/sdk":"^0.105.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/client-sts":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.21.6","@inkjs/ui":"^2.0.0","@nats-io/jetstream":"3.4.0","@nats-io/kv":"3.4.0","@nats-io/nats-core":"3.4.0","@nats-io/transport-node":"3.4.0","@openrouter/ai-sdk-provider":"^2.9.1","@opentelemetry/core":"^2.6.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^3.0.10","@better-auth/sso":"1.4.1","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/shared":"workspace:*","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@types/bun":"^1.3.1","@types/google.maps":"^3.65.2","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@vercel/nft":"^1.1.1",ai:"^6.0.208","better-auth":"1.4.22",croner:"^9.1.0",degit:"^2.8.4",hono:"^4.10.7",jose:"^6.0.11",nanoid:"^5.1.6",pg:"^8.16.3",typescript:"^7.0.2",typescript5:"npm:typescript@^5.9.3",zod:"4.3.6"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as l94,Text as A8$}from"ink";import{jsx as c94,jsxs as T8$}from"react/jsx-runtime";function R8$({version:$}){return T8$(l94,{flexDirection:"column",marginTop:1,children:[RX0.map((Z,Q)=>c94(A8$,{color:qX0[Q],children:Z},Q)),T8$(A8$,{dimColor:!0,children:[" v",$]})]})}var q8$=D(()=>{Zt()});import{Box as Qz,Text as WD}from"ink";import{Spinner as m94}from"@inkjs/ui";import{jsx as CJ,jsxs as Fh}from"react/jsx-runtime";function I8$({status:$}){if($==="pending")return CJ(m94,{label:""});return CJ(WD,{color:"green",children:"\u2713"})}function d94($){return`${$.name}: ${$.port||"...."}`}function M8$({services:$,migrationsStatus:Z,home:Q,serverUrl:X}){return Fh(Qz,{flexDirection:"column",paddingBottom:1,children:[CJ(R8$,{version:QY0.version}),CJ(Qz,{marginBottom:1,children:CJ(WD,{dimColor:!0,children:"\u2500".repeat(80)})}),CJ(Qz,{children:Fh(WD,{dimColor:!0,children:["Home: ",Q]})}),Fh(Qz,{gap:2,children:[$.map((Y)=>Fh(Qz,{gap:1,children:[CJ(WD,{children:d94(Y)}),CJ(I8$,{status:Y.status})]},Y.name)),Fh(Qz,{gap:1,children:[CJ(WD,{children:"Migrations"}),CJ(I8$,{status:Z})]})]}),CJ(Qz,{children:X?Fh(WD,{children:["Open in browser: ",CJ(WD,{color:"cyan",children:X})]}):CJ(WD,{dimColor:!0,children:"Starting..."})})]})}var V8$=D(()=>{hr0();q8$()});import{Box as i94,Text as Et}from"ink";import{jsx as ur0,jsxs as lr0}from"react/jsx-runtime";function p94($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function k8$({logs:$}){return ur0(i94,{flexDirection:"column",children:$.map((Z,Q)=>{if(Z.rawLine)return ur0(Et,{dimColor:!0,children:Z.rawLine},Q);let X=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return lr0(Et,{children:[lr0(Et,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),ur0(Et,{color:p94(Z.status),children:Z.status}),lr0(Et,{dimColor:!0,children:[" ",X.padStart(8)]})]},Q)})})}var S8$=()=>{};var cr0={};e(cr0,{App:()=>o94});import{Box as n94}from"ink";import{useSyncExternalStore as t94}from"react";import{jsx as C8$,jsxs as r94}from"react/jsx-runtime";function o94({home:$}){let Z=t94(xr0,vr0);return r94(n94,{flexDirection:"column",children:[C8$(M8$,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),C8$(k8$,{logs:Z.logs})]})}var mr0=D(()=>{V8$();S8$();Zz()});var YG="thread-gate",GN="decopilot-hosted-harness",KN="decopilot-hosted-harness-sandboxed",JG="automations",HD="background-tools",Xz="task-board-github-reads";var _8$="11";function v8$($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:_8$,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var x8$=()=>{};import a94 from"pg";async function b8$($,Z){let{databaseUrl:Q,lockTimeoutMs:X=s94}=$,Y=$.log??((W)=>console.log(W)),J=new a94.Client({connectionString:Q});await J.connect();let G=Date.now(),K=!1;try{while(!K){if(K=(await J.query("SELECT pg_try_advisory_lock($1) AS locked",[f8$.toString()])).rows[0]?.locked===!0,K)break;if(Date.now()-G>=X)throw Error(`Timed out after ${X}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await B$(e94)}let W=Date.now()-G;if(W>1000)Y(`[dbos] waited ${W}ms for the migration lock; another process migrated first`);return await Z()}finally{if(K)try{await J.query("SELECT pg_advisory_unlock($1)",[f8$.toString()])}catch{}await J.end().catch(()=>{})}}var f8$=8314027461559302n,s94=600000,e94=500;var y8$=D(()=>{Z8()});function $Z4(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function dr0($,Z){for(let Q=0;Q<$.length;Q++){let X=$[Q];if(X===void 0)continue;if(X===Z)return $[Q+1];if(X.startsWith(`${Z}=`))return X.slice(Z.length+1)}return}function g8$(){let $=$Z4();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:dr0($,"--cpu-prof-dir")??process.cwd(),name:dr0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(dr0($,"--cpu-prof-interval")??1000),note:"profile is written on process exit"}));return}if(process.env.CPU_PROFILE)console.warn(JSON.stringify({msg:"cpu-profiling-requested-but-inactive",hint:'CPU profiling is a Bun launch flag. Set BUN_OPTIONS="--cpu-prof --cpu-prof-md --cpu-prof-dir=/tmp" before starting the process.'}))}function h8$(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let Q=rE();if(!Q)return;let X={};try{let{heapStats:Y}=await import("bun:jsc"),J=Y(),G=Object.entries(J.objectTypeCounts).sort((K,W)=>W[1]-K[1]).slice(0,20);X={objectCount:J.objectCount,heapSize:J.heapSize,top:Object.fromEntries(G)}}catch{}console.log(JSON.stringify({msg:"heap-watch",ts:new Date().toISOString(),uptimeS:Math.round(process.uptime()),rss:Q.rss,heapUsed:Q.heapUsed,heapTotal:Q.heapTotal,external:Q.external,arrayBuffers:Q.arrayBuffers,...X}))};return Z().catch(()=>{}),XY0=setInterval(()=>void Z().catch(()=>{}),$),XY0.unref?.(),process.on("SIGUSR2",()=>{try{let Q=Bun.generateHeapSnapshot("v8"),X=typeof Q==="string"?Q:JSON.stringify(Q),Y=`/tmp/heap-${process.pid}-${Date.now()}.heapsnapshot`;Bun.write(Y,X),console.log(JSON.stringify({msg:"heap-snapshot-written",path:Y}))}catch(Q){console.error("[heap-watch] snapshot failed:",Q)}}),()=>{if(XY0)clearInterval(XY0)}}var XY0;var u8$=()=>{};import*as ZZ4 from"bun:jsc";function l8$(){if(process.env.STALL_WATCHDOG!=="1")return()=>{};let $=Number(process.env.STALL_WATCHDOG_MS??100),Z=Number(process.env.STALL_WATCHDOG_TICK_MS??50);try{QZ4()}catch(J){return console.error("[stall-watchdog] failed to start sampling profiler:",J),()=>{}}let Q,X=performance.now()+Z,Y=()=>{let J=performance.now(),G=J-X;X=J+Z;let K=[];try{K=XZ4()?.traces??[]}catch{}if(G>$&&K.length>0){let W=new Map;for(let F of K){let U=F.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??F.frames[0];if(!U)continue;let N=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${U.name??"?"} @ ${N}:${U.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((F,U)=>U[1]-F[1]).slice(0,8).map(([F,U])=>({frame:F,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(G),samplesInWindow:K.length,top:H}))}Q=setTimeout(Y,Z),Q.unref?.()};return Q=setTimeout(Y,Z),Q.unref?.(),()=>{if(Q)clearTimeout(Q)}}var QZ4,XZ4;var c8$=D(()=>{({startSamplingProfiler:QZ4,samplingProfilerStackTraces:XZ4}=ZZ4)});function m8$(){g8$();let $=[h8$(),gs1(),l8$()];return()=>{for(let Z of $)Z()}}var d8$=D(()=>{pi0();u8$();c8$()});var Yz=v((i8$)=>{Object.defineProperty(i8$,"__esModule",{value:!0});i8$.RepublishHeaders=i8$.DirectMsgHeaders=i8$.JsHeaders=i8$.AdvisoryKind=void 0;i8$.isOrderedPushConsumerOptions=YZ4;i8$.isPullConsumer=JZ4;i8$.isPushConsumer=GZ4;i8$.isBoundPushConsumerOptions=KZ4;function YZ4($){if($&&typeof $==="object")return"name_prefix"in $||"deliver_subject_prefix"in $||"filter_subjects"in $||"filter_subject"in $||"deliver_policy"in $||"opt_start_seq"in $||"opt_start_time"in $||"replay_policy"in $||"inactive_threshold"in $||"headers_only"in $||"deliver_prefix"in $;return!1}function JZ4($){return $.isPullConsumer()}function GZ4($){return $.isPushConsumer()}function KZ4($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}i8$.AdvisoryKind={API:"api_audit",StreamAction:"stream_action",ConsumerAction:"consumer_action",SnapshotCreate:"snapshot_create",SnapshotComplete:"snapshot_complete",RestoreCreate:"restore_create",RestoreComplete:"restore_complete",MaxDeliver:"max_deliver",Terminated:"terminated",Ack:"consumer_ack",StreamLeaderElected:"stream_leader_elected",StreamQuorumLost:"stream_quorum_lost",ConsumerLeaderElected:"consumer_leader_elected",ConsumerQuorumLost:"consumer_quorum_lost"};i8$.JsHeaders={StreamSourceHdr:"Nats-Stream-Source",LastConsumerSeqHdr:"Nats-Last-Consumer",LastStreamSeqHdr:"Nats-Last-Stream",ConsumerStalledHdr:"Nats-Consumer-Stalled",MessageSizeHdr:"Nats-Msg-Size",RollupHdr:"Nats-Rollup",RollupValueSubject:"sub",RollupValueAll:"all",PendingMessagesHdr:"Nats-Pending-Messages",PendingBytesHdr:"Nats-Pending-Bytes",RequiredApiLevel:"Nats-Required-Api-Level"};i8$.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};i8$.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var _J=v((n8$)=>{Object.defineProperty(n8$,"__esModule",{value:!0});n8$.TD=n8$.TE=n8$.Empty=void 0;n8$.encode=LZ4;n8$.decode=wZ4;n8$.Empty=new Uint8Array(0);n8$.TE=new TextEncoder;n8$.TD=new TextDecoder;function DZ4(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let Q=new Uint8Array(Z),X=0;for(let Y=0;Y<$.length;Y++)Q.set($[Y],X),X+=$[Y].length;return Q}function LZ4(...$){let Z=[];for(let Q=0;Q<$.length;Q++)Z.push(n8$.TE.encode($[Q]));if(Z.length===0)return n8$.Empty;if(Z.length===1)return Z[0];return DZ4(...Z)}function wZ4($){if(!$||$.length===0)return"";return n8$.TD.decode($)}});var vJ=v((r8$)=>{Object.defineProperty(r8$,"__esModule",{value:!0});r8$.errors=r8$.PermissionViolationError=r8$.NoRespondersError=r8$.TimeoutError=r8$.RequestError=r8$.ProtocolError=r8$.ConnectionError=r8$.DrainingConnectionError=r8$.ClosedConnectionError=r8$.AuthorizationError=r8$.UserAuthenticationExpiredError=r8$.InvalidOperationError=r8$.InvalidArgumentError=r8$.InvalidSubjectError=void 0;class pr0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}r8$.InvalidSubjectError=pr0;class YY0 extends Error{constructor($,Z){super($,Z);this.name="InvalidArgumentError"}static format($,Z,Q){if(Array.isArray(Z)&&Z.length>1)Z=Z[0];if(Array.isArray($))$=$.map((X)=>`'${X}'`),$=$.join(",");else $=`'${$}'`;return new YY0(`${$} ${Z}`,Q)}}r8$.InvalidArgumentError=YY0;class nr0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}r8$.InvalidOperationError=nr0;class JY0 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new JY0($);return null}}r8$.UserAuthenticationExpiredError=JY0;class GY0 extends Error{constructor($,Z){super($,Z);this.name="AuthorizationError"}static parse($){let Z=["authorization violation","account authentication expired","authentication timeout"],Q=$.toLowerCase();for(let X=0;X<Z.length;X++)if(Q.indexOf(Z[X])!==-1)return new GY0($);return null}}r8$.AuthorizationError=GY0;class tr0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}r8$.ClosedConnectionError=tr0;class or0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}r8$.DrainingConnectionError=or0;class rr0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}r8$.ConnectionError=rr0;class ar0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}r8$.ProtocolError=ar0;class sr0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof KY0}}r8$.RequestError=sr0;class er0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}r8$.TimeoutError=er0;class KY0 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}r8$.NoRespondersError=KY0;class WY0 extends Error{operation;subject;queue;constructor($,Z,Q,X,Y){super($,Y);this.name="PermissionViolationError",this.operation=Z,this.subject=Q,this.queue=X}static parse($){if(($?$.toLowerCase():"").indexOf("permissions violation")===-1)return null;let Q="publish",X="",Y=void 0,J=$.match(/(Publish|Subscription) to "(\S+)"/);if(J){if(Q=J[1].toLowerCase(),X=J[2],Q==="subscription"){let G=$.match(/using queue "(\S+)"/);if(G)Y=G[1]}}return new WY0($,Q,X,Y)}}r8$.PermissionViolationError=WY0;r8$.errors={AuthorizationError:GY0,ClosedConnectionError:tr0,ConnectionError:rr0,DrainingConnectionError:or0,InvalidArgumentError:YY0,InvalidOperationError:nr0,InvalidSubjectError:pr0,NoRespondersError:KY0,PermissionViolationError:WY0,ProtocolError:ar0,RequestError:sr0,TimeoutError:er0,UserAuthenticationExpiredError:JY0}});var CK=v((Z4$)=>{Object.defineProperty(Z4$,"__esModule",{value:!0});Z4$.SimpleMutex=Z4$.Perf=void 0;Z4$.extend=xZ4;Z4$.render=fZ4;Z4$.timeout=bZ4;Z4$.delay=yZ4;Z4$.deadline=gZ4;Z4$.deferred=Za0;Z4$.debugDeferred=hZ4;Z4$.shuffle=uZ4;Z4$.collect=lZ4;Z4$.jitter=$4$;Z4$.backoff=cZ4;Z4$.nanos=mZ4;Z4$.millis=dZ4;Z4$.randomToken=nZ4;var vZ4=_J(),$a0=vJ();function xZ4($,...Z){for(let Q=0;Q<Z.length;Q++){let X=Z[Q];Object.keys(X).forEach(function(Y){$[Y]=X[Y]})}return $}function fZ4($){return vZ4.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function bZ4($,Z=!0){let Q=Z?new $a0.TimeoutError:null,X,Y,J=new Promise((G,K)=>{X={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(Q===null)K(new $a0.TimeoutError);else K(Q)},$)});return Object.assign(J,X)}function yZ4($=0){let Z,Q=new Promise((X)=>{let Y=setTimeout(()=>{X()},$);Z={cancel:()=>{if(Y)clearTimeout(Y),X()}}});return Object.assign(Q,Z)}async function gZ4($,Z=1000){let Q=Za0(),X=setTimeout(()=>{Q.reject(new $a0.TimeoutError)},Z);try{return await Promise.race([$,Q])}finally{clearTimeout(X)}}function Za0(){let $={},Z=new Promise((Q,X)=>{$={resolve:Q,reject:X}});return Object.assign(Z,$)}function hZ4(){let $={},Z=new Promise((Q,X)=>{$={resolve:(Y)=>{console.trace("resolve",Y),Q(Y)},reject:(Y)=>{console.trace("reject"),X(Y)}}});return Object.assign(Z,$)}function uZ4($){for(let Z=$.length-1;Z>0;Z--){let Q=Math.floor(Math.random()*(Z+1));[$[Z],$[Q]]=[$[Q],$[Z]]}return $}async function lZ4($){let Z=[];for await(let Q of $)Z.push(Q);return Z}class s8${timers;measures;constructor(){this.timers=new Map,this.measures=new Map}mark($){this.timers.set($,performance.now())}measure($,Z,Q){let X=this.timers.get(Z);if(X===void 0)throw Error(`${Z} is not defined`);let Y=this.timers.get(Q);if(Y===void 0)throw Error(`${Q} is not defined`);this.measures.set($,Y-X)}getEntries(){let $=[];return this.measures.forEach((Z,Q)=>{$.push({name:Q,duration:Z})}),$}}Z4$.Perf=s8$;class e8${max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=Za0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Z4$.SimpleMutex=e8$;function $4$($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function cZ4($=[0,250,250,500,500,3000,5000]){if(!Array.isArray($))$=[0,250,250,500,500,3000,5000];let Z=$.length-1;return{backoff(Q){return $4$(Q>Z?$[Z]:$[Q])}}}function mZ4($){return $*1e6}function dZ4($){return Math.floor($/1e6)}var iZ4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",WN=new Uint8Array(62);for(let $=0;$<62;$++)WN[$]=iZ4.charCodeAt($);var pZ4=218340105584896;function nZ4(){let $=Math.floor(Math.random()*pZ4),Z=$%62,Q=WN[Z];$=($-Z)/62,Z=$%62;let X=WN[Z];$=($-Z)/62,Z=$%62;let Y=WN[Z];$=($-Z)/62,Z=$%62;let J=WN[Z];$=($-Z)/62,Z=$%62;let G=WN[Z];$=($-Z)/62,Z=$%62;let K=WN[Z];$=($-Z)/62,Z=$%62;let W=WN[Z];$=($-Z)/62;let H=WN[$];return String.fromCharCode(Q,X,Y,J,G,K,W,H)}});var H4$=v((K4$)=>{Object.defineProperty(K4$,"__esModule",{value:!0});K4$.nuid=K4$.NuidImpl=void 0;var H74="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",FD=62,FY0=12,J4$=10,X4$=33,F74=333,Y4$=FY0+J4$,Xa0=new Uint8Array(FD);for(let $=0;$<FD;$++)Xa0[$]=H74.charCodeAt($);var HY0=4294967296,G4$=BigInt(FD)**BigInt(J4$),zt=Number(G4$/(1n<<32n)),Qa0=Number(G4$%(1n<<32n));function U74($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function N74($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else U74($)}class Ya0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(Y4$),this.cbuf=new Uint8Array(FY0),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(zt+1)),this.seqLo=Math.floor(Math.random()*HY0);while($++<8&&this.seqHi===zt&&this.seqLo>=Qa0);if(this.seqHi===zt&&this.seqLo>=Qa0)this.seqLo=0;this.inc=Math.random()*(F74-X4$)+X4$|0}setPre(){N74(this.cbuf);for(let $=0;$<FY0;$++)this.buf[$]=Xa0[this.cbuf[$]%FD]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let Q=Y4$-1;Q>=FY0;Q--){let X=Math.floor($/FD),J=($-X*FD)*HY0+Z,G=Math.floor(J/FD),K=J-G*FD;this.buf[Q]=Xa0[K],$=X,Z=G}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=HY0)this.seqLo-=HY0,this.seqHi+=1;if(this.seqHi>zt||this.seqHi===zt&&this.seqLo>=Qa0)this.setPre(),this.initSeqAndInc();this.fillSeq();let $=this.buf;return String.fromCharCode($[0],$[1],$[2],$[3],$[4],$[5],$[6],$[7],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15],$[16],$[17],$[18],$[19],$[20],$[21])}reset(){this.init()}}K4$.NuidImpl=Ya0;K4$.nuid=new Ya0});var B4$=v((U4$)=>{Object.defineProperty(U4$,"__esModule",{value:!0});U4$.nuid=U4$.Nuid=void 0;var F4$=H4$();U4$.Nuid=F4$.NuidImpl;U4$.nuid=F4$.nuid});var NY0=v((UY0)=>{Object.defineProperty(UY0,"__esModule",{value:!0});UY0.nuid=UY0.Nuid=void 0;var O4$=B4$();Object.defineProperty(UY0,"Nuid",{enumerable:!0,get:function(){return O4$.Nuid}});Object.defineProperty(UY0,"nuid",{enumerable:!0,get:function(){return O4$.nuid}})});var UD=v((D4$)=>{Object.defineProperty(D4$,"__esModule",{value:!0});D4$.DEFAULT_HOST=D4$.DEFAULT_PORT=D4$.Match=void 0;D4$.syncIterator=j74;D4$.createInbox=E74;var L74=NY0(),w74=vJ();D4$.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function j74($){let Z=$[Symbol.asyncIterator]();return{async next(){let Q=await Z.next();if(Q.done)return Promise.resolve(null);return Promise.resolve(Q.value)}}}function E74($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw w74.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${L74.nuid.next()}`}D4$.DEFAULT_PORT=4222;D4$.DEFAULT_HOST="127.0.0.1"});var Pt=v((E4$)=>{Object.defineProperty(E4$,"__esModule",{value:!0});E4$.DataBuffer=void 0;var w4$=_J();class j4${buffers;byteLength;constructor(){this.buffers=[],this.byteLength=0}static concat(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let Q=new Uint8Array(Z),X=0;for(let Y=0;Y<$.length;Y++)Q.set($[Y],X),X+=$[Y].length;return Q}static fromAscii($){if(!$)$="";return w4$.TE.encode($)}static toAscii($){return w4$.TD.decode($)}reset(){this.buffers.length=0,this.byteLength=0}pack(){if(this.buffers.length>1){let $=new Uint8Array(this.byteLength),Z=0;for(let Q=0;Q<this.buffers.length;Q++)$.set(this.buffers[Q],Z),Z+=this.buffers[Q].length;this.buffers.length=0,this.buffers.push($)}}shift(){if(this.buffers.length){let $=this.buffers.shift();if($)return this.byteLength-=$.length,$}return new Uint8Array(0)}drain($){if(this.buffers.length){this.pack();let Z=this.buffers.pop();if(Z){let Q=this.byteLength;if($===void 0||$>Q)$=Q;let X=Z.subarray(0,$);if(Q>$)this.buffers.push(Z.subarray($));return this.byteLength=Q-$,X}}return new Uint8Array(0)}fill($,...Z){if($)this.buffers.push($),this.byteLength+=$.length;for(let Q=0;Q<Z.length;Q++)if(Z[Q]&&Z[Q].length)this.buffers.push(Z[Q]),this.byteLength+=Z[Q].length}peek(){if(this.buffers.length)return this.pack(),this.buffers[0];return new Uint8Array(0)}size(){return this.byteLength}length(){return this.buffers.length}}E4$.DataBuffer=j4$});var Jz=v((A4$)=>{Object.defineProperty(A4$,"__esModule",{value:!0});A4$.LF=A4$.CR=A4$.CRLF=A4$.CR_LF_LEN=A4$.CR_LF=void 0;A4$.setTransportFactory=M74;A4$.defaultPort=V74;A4$.getUrlParseFn=k74;A4$.newTransport=S74;A4$.getResolveFn=C74;A4$.protoLen=P4$;A4$.extractProtocolMessage=_74;var R74=_J(),q74=UD(),I74=Pt(),xJ;function M74($){xJ=$}function V74(){return xJ!==void 0&&xJ.defaultPort!==void 0?xJ.defaultPort:q74.DEFAULT_PORT}function k74(){return xJ!==void 0&&xJ.urlParseFn?xJ.urlParseFn:void 0}function S74(){if(!xJ||typeof xJ.factory!=="function")throw Error("transport fn is not set");return xJ.factory()}function C74(){return xJ!==void 0&&xJ.dnsResolveFn?xJ.dnsResolveFn:void 0}A4$.CR_LF=`\r
|
|
1969
1969
|
`;A4$.CR_LF_LEN=A4$.CR_LF.length;A4$.CRLF=I74.DataBuffer.fromAscii(A4$.CR_LF);A4$.CR=new Uint8Array(A4$.CRLF)[0];A4$.LF=new Uint8Array(A4$.CRLF)[1];function P4$($){for(let Z=0;Z<$.length;Z++){let Q=Z+1;if($.byteLength>Q&&$[Z]===A4$.CR&&$[Q]===A4$.LF)return Q+1}return 0}function _74($){let Z=P4$($);if(Z>0){let X=new Uint8Array($).slice(0,Z);return R74.TD.decode(X)}return""}});var Ha0=v((S4$)=>{Object.defineProperty(S4$,"__esModule",{value:!0});S4$.ipV4=M4$;S4$.isIP=m74;S4$.parseIP=V4$;var At=4,Gz=16,BY0=48,I4$=57,R4$=65,l74=70,q4$=97,c74=102,Wa0=16777215;function M4$($,Z,Q,X){let Y=new Uint8Array(Gz);return[0,0,0,0,0,0,0,0,0,0,255,255].forEach((G,K)=>{Y[K]=G}),Y[12]=$,Y[13]=Z,Y[14]=Q,Y[15]=X,Y}function m74($){return V4$($)!==void 0}function V4$($){for(let Z=0;Z<$.length;Z++)switch($[Z]){case".":return k4$($);case":":return d74($)}return}function k4$($){let Z=new Uint8Array(At);for(let Q=0;Q<At;Q++){if($.length===0)return;if(Q>0){if($[0]!==".")return;$=$.substring(1)}let{n:X,c:Y,ok:J}=i74($);if(!J||X>255)return;$=$.substring(Y),Z[Q]=X}return M4$(Z[0],Z[1],Z[2],Z[3])}function d74($){let Z=new Uint8Array(Gz),Q=-1;if($.length>=2&&$[0]===":"&&$[1]===":"){if(Q=0,$=$.substring(2),$.length===0)return Z}let X=0;while(X<Gz){let{n:Y,c:J,ok:G}=p74($);if(!G||Y>65535)return;if(J<$.length&&$[J]==="."){if(Q<0&&X!=Gz-At)return;if(X+At>Gz)return;let K=k4$($);if(K===void 0)return;Z[X]=K[12],Z[X+1]=K[13],Z[X+2]=K[14],Z[X+3]=K[15],$="",X+=At;break}if(Z[X]=Y>>8,Z[X+1]=Y,X+=2,$=$.substring(J),$.length===0)break;if($[0]!==":"||$.length==1)return;if($=$.substring(1),$[0]===":"){if(Q>=0)return;if(Q=X,$=$.substring(1),$.length===0)break}}if($.length!==0)return;if(X<Gz){if(Q<0)return;let Y=Gz-X;for(let J=X-1;J>=Q;J--)Z[J+Y]=Z[J];for(let J=Q+Y-1;J>=Q;J--)Z[J]=0}else if(Q>=0)return;return Z}function i74($){let Z=0,Q=0;for(Z=0;Z<$.length&&BY0<=$.charCodeAt(Z)&&$.charCodeAt(Z)<=I4$;Z++)if(Q=Q*10+($.charCodeAt(Z)-BY0),Q>=Wa0)return{n:Wa0,c:Z,ok:!1};if(Z===0)return{n:0,c:0,ok:!1};return{n:Q,c:Z,ok:!0}}function p74($){let Z=0,Q=0;for(Q=0;Q<$.length;Q++){if(BY0<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=I4$)Z*=16,Z+=$.charCodeAt(Q)-BY0;else if(q4$<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=c74)Z*=16,Z+=$.charCodeAt(Q)-q4$+10;else if(R4$<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=l74)Z*=16,Z+=$.charCodeAt(Q)-R4$+10;else break;if(Z>=Wa0)return{n:0,c:Q,ok:!1}}if(Q===0)return{n:0,c:Q,ok:!1};return{n:Z,c:Q,ok:!0}}});var Da0=v((_4$)=>{Object.defineProperty(_4$,"__esModule",{value:!0});_4$.Servers=_4$.ServerImpl=void 0;_4$.isIPV4OrHostname=C4$;_4$.hostPort=Oa0;var Fa0=Jz(),Ua0=CK(),Na0=Ha0(),r74=UD(),a74=vJ();function C4$($){if($.indexOf("[")!==-1||$.indexOf("::")!==-1)return!1;if($.indexOf(".")!==-1)return!0;if($.split(":").length<=2)return!0;return!1}function Ba0($){return!C4$($)}function s74($){let Q=$.toUpperCase().indexOf("::FFFF:");if(Q!==-1&&$.indexOf(".")!==-1){let X=$.substring(Q+7);return X=X.replace("[",""),X.replace("]","")}return $}function Oa0($){if($=$.trim(),$.match(/^(.*:\/\/)(.*)/m))$=$.replace(/^(.*:\/\/)(.*)/gm,"$2");if($=s74($),Ba0($)&&$.indexOf("[")===-1)$=`[${$}]`;let Z=Ba0($)?$.match(/(]:)(\d+)/):$.match(/(:)(\d+)/),Q=Z&&Z.length===3&&Z[1]&&Z[2]?parseInt(Z[2]):r74.DEFAULT_PORT,Y=new URL(`${Q===80?"https":"http"}://${$}`);Y.port=`${Q}`;let J=Y.hostname;if(J.charAt(0)==="[")J=J.substring(1,J.length-1);return{listen:Y.host,hostname:J,port:Q}}class Uh{src;listen;hostname;port;didConnect;reconnects;lastConnect;gossiped;tlsName;resolves;constructor($,Z=!1){this.src=$,this.tlsName="";let Q=Oa0($);this.listen=Q.listen,this.hostname=Q.hostname,this.port=Q.port,this.didConnect=!1,this.reconnects=0,this.lastConnect=0,this.gossiped=Z}toString(){return this.listen}async resolve($){if(!$.fn||$.resolve===!1)return[this];let Z=[];if((0,Na0.isIP)(this.hostname))return[this];else{let Q=await $.fn(this.hostname);if($.debug)console.log(`resolve ${this.hostname} = ${Q.join(",")}`);for(let X of Q){let Y=this.port===80?"https":"http",J=new URL(`${Y}://${Ba0(X)?"["+X+"]":X}`);J.port=`${this.port}`;let G=new Uh(J.host,!1);G.tlsName=this.hostname,Z.push(G)}}if($.randomize)(0,Ua0.shuffle)(Z);return this.resolves=Z,Z}}_4$.ServerImpl=Uh;class OY0{firstSelect;servers;currentServer;tlsName;randomize;constructor($={}){this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=$.randomize||!1}setServers($){if(!Array.isArray($)||$.length===0)throw a74.InvalidArgumentError.format("servers","cannot be empty");let Z=(0,Fa0.getUrlParseFn)(),Q=new Map;for(let Y of this.servers)Q.set(Y.listen,Y);let X=[];for(let Y of $){Y=Z?Z(Y):Y;let{listen:J}=Oa0(Y),G=Q.get(J);if(G)G.gossiped=!1,X.push(G);else X.push(new Uh(Y))}if(this.randomize)(0,Ua0.shuffle)(X);if(this.servers=X,this.currentServer===void 0||!X.includes(this.currentServer))this.currentServer=X[0],this.firstSelect=!0}clear(){this.servers.length=0}updateTLSName(){let $=this.getCurrentServer();if(!(0,Na0.isIP)($.hostname))this.tlsName=$.hostname,this.servers.forEach((Z)=>{if(Z.gossiped)Z.tlsName=this.tlsName})}getCurrentServer(){return this.currentServer}addServer($,Z=!1){let Q=(0,Fa0.getUrlParseFn)();$=Q?Q($):$;let X=new Uh($,Z);if((0,Na0.isIP)(X.hostname))X.tlsName=this.tlsName;this.servers.push(X)}selectServer(){if(this.firstSelect)return this.firstSelect=!1,this.currentServer;let $=this.servers.shift();if($)this.servers.push($),this.currentServer=$;return $}removeCurrentServer(){this.removeServer(this.currentServer)}removeServer($){if($){let Z=this.servers.indexOf($);this.servers.splice(Z,1)}}snapshot(){return OY0.freezeAll(this.servers)}snapshotForHandler(){let $=this.currentServer;if(!$)return this.snapshot();let Z=this.servers.indexOf($);if(Z<=0)return this.snapshot();return OY0.freezeAll([$,...this.servers.slice(0,Z),...this.servers.slice(Z+1)])}static freezeAll($){return $.map((Z)=>Object.freeze({hostname:Z.hostname,port:Z.port,listen:Z.listen,src:Z.src,tlsName:Z.tlsName,reconnects:Z.reconnects,lastConnect:Z.lastConnect,gossiped:Z.gossiped,didConnect:Z.didConnect}))}find($){return this.servers.find((Z)=>Z.listen===$.listen)}setCurrent($){this.currentServer=$}length(){return this.servers.length}next(){return this.servers.length?this.servers[0]:void 0}getServers(){return this.servers}update($,Z){let Q=[],X=[],Y=(0,Fa0.getUrlParseFn)(),J=new Map;if($.connect_urls&&$.connect_urls.length>0)$.connect_urls.forEach((K)=>{K=Y?Y(K,Z):K;let W=new Uh(K,!0);J.set(K,W)});let G=[];if(this.servers.forEach((K,W)=>{let H=K.listen;if(K.gossiped&&this.currentServer.listen!==H&&J.get(H)===void 0)G.push(W);J.delete(H)}),G.reverse(),G.forEach((K)=>{let W=this.servers.splice(K,1);X=X.concat(W[0].listen)}),J.forEach((K,W)=>{this.servers.push(K),Q.push(W)}),this.randomize&&Q.length>0){let K=this.currentServer,W=this.servers.filter((H)=>H!==K);(0,Ua0.shuffle)(W),this.servers=K?[K,...W]:W}return{added:Q,deleted:X}}}_4$.Servers=OY0});var DY0=v((b4$)=>{Object.defineProperty(b4$,"__esModule",{value:!0});b4$.QueuedIteratorImpl=void 0;var La0=CK(),x4$=vJ();class f4${inflight;processed;received;noIterator;iterClosed;done;signal;yields;filtered;pendingFiltered;ctx;_data;err;time;profile;yielding;didBreak;constructor(){this.inflight=0,this.filtered=0,this.pendingFiltered=0,this.processed=0,this.received=0,this.noIterator=!1,this.done=!1,this.signal=(0,La0.deferred)(),this.yields=[],this.iterClosed=(0,La0.deferred)(),this.time=0,this.yielding=!1,this.didBreak=!1,this.profile=!1}[Symbol.asyncIterator](){return this.iterate()}push($){if(this.done)return;if(this.didBreak){if(typeof $==="function"){let Z=$;try{Z()}catch(Q){}}return}if(typeof $==="function")this.pendingFiltered++;this.yields.push($),this.signal.resolve()}async*iterate(){if(this.noIterator)throw new x4$.InvalidOperationError("iterator cannot be used when a callback is registered");if(this.yielding)throw new x4$.InvalidOperationError("iterator is already yielding");this.yielding=!0;try{while(!0){if(this.yields.length===0)await this.signal;if(this.err)throw this.err;let $=this.yields;this.inflight=$.length,this.yields=[];for(let Z=0;Z<$.length;Z++){if(typeof $[Z]==="function"){this.pendingFiltered--;let X=$[Z];try{X()}catch(Y){throw Y}if(this.err)throw this.err;continue}this.processed++,this.inflight--;let Q=this.profile?Date.now():0;yield $[Z],this.time=this.profile?Date.now()-Q:0}if(this.done)break;else if(this.yields.length===0)$.length=0,this.yields=$,this.signal=(0,La0.deferred)()}}finally{this.didBreak=!0,this.stop()}}stop($){if(this.done)return;this.err=$,this.done=!0,this.signal.resolve(),this.iterClosed.resolve($)}getProcessed(){return this.noIterator?this.received:this.processed}getPending(){return this.yields.length+this.inflight-this.pendingFiltered}getReceived(){return this.received-this.filtered}}b4$.QueuedIteratorImpl=f4$});var wa0=v((u4$)=>{Object.defineProperty(u4$,"__esModule",{value:!0});u4$.MuxSubscription=void 0;var QQ4=UD(),g4$=vJ();class h4${baseInbox;reqs;constructor(){this.reqs=new Map}size(){return this.reqs.size}init($){return this.baseInbox=`${(0,QQ4.createInbox)($)}.`,this.baseInbox}add($){if(!isNaN($.received))$.received=0;this.reqs.set($.token,$)}get($){return this.reqs.get($)}cancel($){this.reqs.delete($.token)}getToken($){let Z=$.subject||"";if(Z.indexOf(this.baseInbox)===0)return Z.substring(this.baseInbox.length);return null}all(){return Array.from(this.reqs.values())}handleError($,Z){if($)return this.all().forEach((Q)=>{Q.resolver(Z,{})}),!0;if(Z.operation==="publish"){let Q=this.all().find((X)=>{return X.requestSubject===Z.subject});if(Q)return Q.resolver(Z,{}),!0}return!1}dispatcher(){return($,Z)=>{let Q=this.getToken(Z);if(Q){let X=this.get(Q);if(X){if($===null)$=Z?.data?.length===0&&Z.headers?.code===503?new g4$.NoRespondersError(X.requestSubject):null;X.resolver($,Z)}}}}close(){let $=new g4$.RequestError("connection closed");this.reqs.forEach((Z)=>{Z.resolver($,{})})}}u4$.MuxSubscription=h4$});var ja0=v((m4$)=>{Object.defineProperty(m4$,"__esModule",{value:!0});m4$.Heartbeat=void 0;var XQ4=CK();class c4${ph;interval;maxOut;timer;pendings;constructor($,Z,Q){this.ph=$,this.interval=Z,this.maxOut=Q,this.pendings=[]}start(){this.cancel(),this._schedule()}cancel($){if(this.timer)clearTimeout(this.timer),this.timer=void 0;if(this._reset(),$)this.ph.disconnect()}_schedule(){this.timer=setTimeout(()=>{if(this.ph.dispatchStatus({type:"ping",pendingPings:this.pendings.length+1}),this.pendings.length===this.maxOut){this.cancel(!0);return}let $=(0,XQ4.deferred)();this.ph.flush($).then(()=>{this._reset()}).catch(()=>{this.cancel()}),this.pendings.push($),this._schedule()},this.interval)}_reset(){this.pendings=this.pendings.filter(($)=>{return $.resolve(),!1})}}m4$.Heartbeat=c4$});var Pa0=v((t4$)=>{Object.defineProperty(t4$,"__esModule",{value:!0});t4$.DenoBuffer=t4$.MAX_SIZE=t4$.AssertionError=void 0;t4$.assert=p4$;t4$.concat=n4$;t4$.append=JQ4;t4$.readAll=GQ4;t4$.writeAll=KQ4;var YQ4=_J();class Ea0 extends Error{constructor($){super($);this.name="AssertionError"}}t4$.AssertionError=Ea0;function p4$($,Z="Assertion failed."){if(!$)throw new Ea0(Z)}var i4$=32768;t4$.MAX_SIZE=4294967294;function LY0($,Z,Q=0){let X=Z.byteLength-Q;if($.byteLength>X)$=$.subarray(0,X);return Z.set($,Q),$.byteLength}function n4$($,Z){if($===void 0&&Z===void 0)return new Uint8Array(0);if($===void 0)return Z;if(Z===void 0)return $;let Q=new Uint8Array($.length+Z.length);return Q.set($,0),Q.set(Z,$.length),Q}function JQ4($,Z){return n4$($,Uint8Array.of(Z))}class za0{_buf;_off;constructor($){if(this._off=0,$==null){this._buf=new Uint8Array(0);return}this._buf=new Uint8Array($)}bytes($={copy:!0}){if($.copy===!1)return this._buf.subarray(this._off);return this._buf.slice(this._off)}empty(){return this._buf.byteLength<=this._off}get length(){return this._buf.byteLength-this._off}get capacity(){return this._buf.buffer.byteLength}truncate($){if($===0){this.reset();return}if($<0||$>this.length)throw Error("bytes.Buffer: truncation out of range");this._reslice(this._off+$)}reset(){this._reslice(0),this._off=0}_tryGrowByReslice($){let Z=this._buf.byteLength;if($<=this.capacity-Z)return this._reslice(Z+$),Z;return-1}_reslice($){p4$($<=this._buf.buffer.byteLength),this._buf=new Uint8Array(this._buf.buffer,0,$)}readByte(){let $=new Uint8Array(1);if(this.read($))return $[0];return null}read($){if(this.empty()){if(this.reset(),$.byteLength===0)return 0;return null}let Z=LY0(this._buf.subarray(this._off),$);return this._off+=Z,Z}writeByte($){return this.write(Uint8Array.of($))}writeString($){return this.write(YQ4.TE.encode($))}write($){let Z=this._grow($.byteLength);return LY0($,this._buf,Z)}_grow($){let Z=this.length;if(Z===0&&this._off!==0)this.reset();let Q=this._tryGrowByReslice($);if(Q>=0)return Q;let X=this.capacity;if($<=Math.floor(X/2)-Z)LY0(this._buf.subarray(this._off),this._buf);else if(X+$>t4$.MAX_SIZE)throw Error("The buffer cannot be grown beyond the maximum size.");else{let Y=new Uint8Array(Math.min(2*X+$,t4$.MAX_SIZE));LY0(this._buf.subarray(this._off),Y),this._buf=Y}return this._off=0,this._reslice(Math.min(Z+$,t4$.MAX_SIZE)),Z}grow($){if($<0)throw Error("Buffer._grow: negative count");let Z=this._grow($);this._reslice(Z)}readFrom($){let Z=0,Q=new Uint8Array(i4$);while(!0){let X=this.capacity-this.length<i4$,Y=X?Q:new Uint8Array(this._buf.buffer,this.length),J=$.read(Y);if(J===null)return Z;if(X)this.write(Y.subarray(0,J));else this._reslice(this.length+J);Z+=J}}}t4$.DenoBuffer=za0;function GQ4($){let Z=new za0;return Z.readFrom($),Z.bytes()}function KQ4($,Z){let Q=0;while(Q<Z.length)Q+=$.write(Z.subarray(Q))}});var Ra0=v((e4$)=>{Object.defineProperty(e4$,"__esModule",{value:!0});e4$.cc=e4$.State=e4$.Parser=e4$.Kind=void 0;e4$.describe=OQ4;var Aa0=Pa0(),Ta0=_J();e4$.Kind={OK:0,ERR:1,MSG:2,INFO:3,PING:4,PONG:5};function OQ4($){let Z,Q="";switch($.kind){case e4$.Kind.MSG:Z="MSG";break;case e4$.Kind.OK:Z="OK";break;case e4$.Kind.ERR:Z="ERR",Q=Ta0.TD.decode($.data);break;case e4$.Kind.PING:Z="PING";break;case e4$.Kind.PONG:Z="PONG";break;case e4$.Kind.INFO:Z="INFO",Q=Ta0.TD.decode($.data)}return`${Z}: ${Q}`}function r4$(){let $={};return $.sid=-1,$.hdr=-1,$.size=-1,$}var a4$=48,DQ4=57,Nh=67108864;class s4${dispatcher;state;as;drop;hdr;ma;argBuf;msgBuf;constructor($){this.dispatcher=$,this.state=e4$.State.OP_START,this.as=0,this.drop=0,this.hdr=0}parse($){let Z;for(Z=0;Z<$.length;Z++){let Q=$[Z];switch(this.state){case e4$.State.OP_START:switch(Q){case e4$.cc.M:case e4$.cc.m:this.state=e4$.State.OP_M,this.hdr=-1,this.ma=r4$();break;case e4$.cc.H:case e4$.cc.h:this.state=e4$.State.OP_H,this.hdr=0,this.ma=r4$();break;case e4$.cc.P:case e4$.cc.p:this.state=e4$.State.OP_P;break;case e4$.cc.PLUS:this.state=e4$.State.OP_PLUS;break;case e4$.cc.MINUS:this.state=e4$.State.OP_MINUS;break;case e4$.cc.I:case e4$.cc.i:this.state=e4$.State.OP_I;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_H:switch(Q){case e4$.cc.M:case e4$.cc.m:this.state=e4$.State.OP_M;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_M:switch(Q){case e4$.cc.S:case e4$.cc.s:this.state=e4$.State.OP_MS;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_MS:switch(Q){case e4$.cc.G:case e4$.cc.g:this.state=e4$.State.OP_MSG;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_MSG:switch(Q){case e4$.cc.SPACE:case e4$.cc.TAB:this.state=e4$.State.OP_MSG_SPC;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_MSG_SPC:switch(Q){case e4$.cc.SPACE:case e4$.cc.TAB:continue;default:this.state=e4$.State.MSG_ARG,this.as=Z}break;case e4$.State.MSG_ARG:switch(Q){case e4$.cc.CR:this.drop=1;break;case e4$.cc.NL:{let X=this.argBuf?this.argBuf.bytes():$.subarray(this.as,Z-this.drop);this.processMsgArgs(X),this.drop=0,this.as=Z+1,this.state=e4$.State.MSG_PAYLOAD,Z=this.as+this.ma.size-1;break}default:if(this.argBuf)this.argBuf.writeByte(Q)}break;case e4$.State.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){let X=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:e4$.Kind.MSG,msg:this.ma,data:X}),this.argBuf=void 0,this.msgBuf=void 0,this.state=e4$.State.MSG_END}else{let X=this.ma.size-this.msgBuf.length,Y=$.length-Z;if(Y<X)X=Y;if(X>0)this.msgBuf.write($.subarray(Z,Z+X)),Z=Z+X-1;else this.msgBuf.writeByte(Q)}else if(Z-this.as>=this.ma.size)this.dispatcher.push({kind:e4$.Kind.MSG,msg:this.ma,data:$.subarray(this.as,Z)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=e4$.State.MSG_END;break;case e4$.State.MSG_END:switch(Q){case e4$.cc.NL:this.drop=0,this.as=Z+1,this.state=e4$.State.OP_START;break;default:continue}break;case e4$.State.OP_PLUS:switch(Q){case e4$.cc.O:case e4$.cc.o:this.state=e4$.State.OP_PLUS_O;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_PLUS_O:switch(Q){case e4$.cc.K:case e4$.cc.k:this.state=e4$.State.OP_PLUS_OK;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_PLUS_OK:switch(Q){case e4$.cc.NL:this.dispatcher.push({kind:e4$.Kind.OK}),this.drop=0,this.state=e4$.State.OP_START;break}break;case e4$.State.OP_MINUS:switch(Q){case e4$.cc.E:case e4$.cc.e:this.state=e4$.State.OP_MINUS_E;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_MINUS_E:switch(Q){case e4$.cc.R:case e4$.cc.r:this.state=e4$.State.OP_MINUS_ER;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_MINUS_ER:switch(Q){case e4$.cc.R:case e4$.cc.r:this.state=e4$.State.OP_MINUS_ERR;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_MINUS_ERR:switch(Q){case e4$.cc.SPACE:case e4$.cc.TAB:this.state=e4$.State.OP_MINUS_ERR_SPC;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_MINUS_ERR_SPC:switch(Q){case e4$.cc.SPACE:case e4$.cc.TAB:continue;default:this.state=e4$.State.MINUS_ERR_ARG,this.as=Z}break;case e4$.State.MINUS_ERR_ARG:switch(Q){case e4$.cc.CR:this.drop=1;break;case e4$.cc.NL:{let X;if(this.argBuf)X=this.argBuf.bytes(),this.argBuf=void 0;else X=$.subarray(this.as,Z-this.drop);this.dispatcher.push({kind:e4$.Kind.ERR,data:X}),this.drop=0,this.as=Z+1,this.state=e4$.State.OP_START;break}default:if(this.argBuf)this.argBuf.write(Uint8Array.of(Q))}break;case e4$.State.OP_P:switch(Q){case e4$.cc.I:case e4$.cc.i:this.state=e4$.State.OP_PI;break;case e4$.cc.O:case e4$.cc.o:this.state=e4$.State.OP_PO;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_PO:switch(Q){case e4$.cc.N:case e4$.cc.n:this.state=e4$.State.OP_PON;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_PON:switch(Q){case e4$.cc.G:case e4$.cc.g:this.state=e4$.State.OP_PONG;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_PONG:switch(Q){case e4$.cc.NL:this.dispatcher.push({kind:e4$.Kind.PONG}),this.drop=0,this.state=e4$.State.OP_START;break}break;case e4$.State.OP_PI:switch(Q){case e4$.cc.N:case e4$.cc.n:this.state=e4$.State.OP_PIN;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_PIN:switch(Q){case e4$.cc.G:case e4$.cc.g:this.state=e4$.State.OP_PING;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_PING:switch(Q){case e4$.cc.NL:this.dispatcher.push({kind:e4$.Kind.PING}),this.drop=0,this.state=e4$.State.OP_START;break}break;case e4$.State.OP_I:switch(Q){case e4$.cc.N:case e4$.cc.n:this.state=e4$.State.OP_IN;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_IN:switch(Q){case e4$.cc.F:case e4$.cc.f:this.state=e4$.State.OP_INF;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_INF:switch(Q){case e4$.cc.O:case e4$.cc.o:this.state=e4$.State.OP_INFO;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_INFO:switch(Q){case e4$.cc.SPACE:case e4$.cc.TAB:this.state=e4$.State.OP_INFO_SPC;break;default:throw this.fail($.subarray(Z))}break;case e4$.State.OP_INFO_SPC:switch(Q){case e4$.cc.SPACE:case e4$.cc.TAB:continue;default:this.state=e4$.State.INFO_ARG,this.as=Z}break;case e4$.State.INFO_ARG:switch(Q){case e4$.cc.CR:this.drop=1;break;case e4$.cc.NL:{let X;if(this.argBuf)X=this.argBuf.bytes(),this.argBuf=void 0;else X=$.subarray(this.as,Z-this.drop);this.dispatcher.push({kind:e4$.Kind.INFO,data:X}),this.drop=0,this.as=Z+1,this.state=e4$.State.OP_START;break}default:if(this.argBuf)this.argBuf.writeByte(Q)}break;default:throw this.fail($.subarray(Z))}}if((this.state===e4$.State.MSG_ARG||this.state===e4$.State.MINUS_ERR_ARG||this.state===e4$.State.INFO_ARG)&&!this.argBuf)this.argBuf=new Aa0.DenoBuffer($.subarray(this.as,Z-this.drop));if(this.state===e4$.State.MSG_PAYLOAD&&!this.msgBuf){if(!this.argBuf)this.cloneMsgArg();this.msgBuf=new Aa0.DenoBuffer($.subarray(this.as))}}cloneMsgArg(){let $=this.ma.subject.length,Z=this.ma.reply?this.ma.reply.length:0,Q=new Uint8Array($+Z);if(Q.set(this.ma.subject),this.ma.reply)Q.set(this.ma.reply,$);if(this.argBuf=new Aa0.DenoBuffer(Q),this.ma.subject=Q.subarray(0,$),this.ma.reply)this.ma.reply=Q.subarray($)}processMsgArgs($){if(this.hdr>=0)return this.processHeaderMsgArgs($);let Z=[],Q=-1;for(let X=0;X<$.length;X++)switch($[X]){case e4$.cc.SPACE:case e4$.cc.TAB:case e4$.cc.CR:case e4$.cc.NL:if(Q>=0)Z.push($.subarray(Q,X)),Q=-1;break;default:if(Q<0)Q=X}if(Q>=0)Z.push($.subarray(Q));switch(Z.length){case 3:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=void 0,this.ma.size=this.protoParseInt(Z[2],Nh);break;case 4:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=Z[2],this.ma.size=this.protoParseInt(Z[3],Nh);break;default:throw this.fail($,"processMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail($,"processMsgArgs Bad or Missing Sid Error");if(this.ma.size<0)throw this.fail($,"processMsgArgs Bad or Missing Size Error")}fail($,Z=""){if(!Z)Z=`parse error [${this.state}]`;else Z=`${Z} [${this.state}]`;return Error(`${Z}: ${Ta0.TD.decode($)}`)}processHeaderMsgArgs($){let Z=[],Q=-1;for(let X=0;X<$.length;X++)switch($[X]){case e4$.cc.SPACE:case e4$.cc.TAB:case e4$.cc.CR:case e4$.cc.NL:if(Q>=0)Z.push($.subarray(Q,X)),Q=-1;break;default:if(Q<0)Q=X}if(Q>=0)Z.push($.subarray(Q));switch(Z.length){case 4:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=void 0,this.ma.hdr=this.protoParseInt(Z[2],Nh),this.ma.size=this.protoParseInt(Z[3],Nh);break;case 5:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=Z[2],this.ma.hdr=this.protoParseInt(Z[3],Nh),this.ma.size=this.protoParseInt(Z[4],Nh);break;default:throw this.fail($,"processHeaderMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail($,"processHeaderMsgArgs Bad or Missing Sid Error");if(this.ma.hdr<0||this.ma.hdr>this.ma.size)throw this.fail($,"processHeaderMsgArgs Bad or Missing Header Size Error");if(this.ma.size<0)throw this.fail($,"processHeaderMsgArgs Bad or Missing Size Error")}protoParseInt($,Z){if($.length===0||$.length>15)return-1;let Q=0;for(let X=0;X<$.length;X++){if($[X]<a4$||$[X]>DQ4)return-1;Q=Q*10+($[X]-a4$)}return Z!==void 0&&Q>Z?-1:Q}}e4$.Parser=s4$;e4$.State={OP_START:0,OP_PLUS:1,OP_PLUS_O:2,OP_PLUS_OK:3,OP_MINUS:4,OP_MINUS_E:5,OP_MINUS_ER:6,OP_MINUS_ERR:7,OP_MINUS_ERR_SPC:8,MINUS_ERR_ARG:9,OP_M:10,OP_MS:11,OP_MSG:12,OP_MSG_SPC:13,MSG_ARG:14,MSG_PAYLOAD:15,MSG_END:16,OP_H:17,OP_P:18,OP_PI:19,OP_PIN:20,OP_PING:21,OP_PO:22,OP_PON:23,OP_PONG:24,OP_I:25,OP_IN:26,OP_INF:27,OP_INFO:28,OP_INFO_SPC:29,INFO_ARG:30};e4$.cc={CR:13,E:69,e:101,F:70,f:102,G:71,g:103,H:72,h:104,I:73,i:105,K:75,k:107,M:77,m:109,MINUS:45,N:78,n:110,NL:10,O:79,o:111,P:80,p:112,PLUS:43,R:82,r:114,S:83,s:115,SPACE:32,TAB:9}});var EY0=v((Z6$)=>{Object.defineProperty(Z6$,"__esModule",{value:!0});Z6$.MsgHdrsImpl=void 0;Z6$.canonicalMIMEHeaderKey=Ia0;Z6$.headers=jQ4;var $6$=_J(),_K=UD(),jY0=vJ();function Ia0($){let F=!0,U=Array($.length);for(let N=0;N<$.length;N++){let B=$.charCodeAt(N);if(B===58||B<33||B>126)throw jY0.InvalidArgumentError.format("header",`'${$[N]}' is not a valid character in a header name`);if(F&&97<=B&&B<=122)B-=32;else if(!F&&65<=B&&B<=90)B+=32;U[N]=B,F=B==45}return String.fromCharCode(...U)}function jQ4($=0,Z=""){if($===0&&Z!=="")throw jY0.InvalidArgumentError.format("code","is required");else if($>0&&Z==="")throw jY0.InvalidArgumentError.format("description","is required");return new Bh($,Z)}var qa0="NATS/1.0";class Bh{_code;headers;_description;constructor($=0,Z=""){this._code=$,this._description=Z,this.headers=new Map}[Symbol.iterator](){return this.headers.entries()}size(){return this.headers.size}equals($){if($&&this.headers.size===$.headers.size&&this._code===$._code){for(let[Z,Q]of this.headers){let X=$.values(Z);if(Q.length!==X.length)return!1;let Y=[...Q].sort(),J=[...X].sort();for(let G=0;G<Y.length;G++)if(Y[G]!==J[G])return!1}return!0}return!1}static decode($){let Z=new Bh,X=$6$.TD.decode($).split(`\r
|
|
1970
1970
|
`),Y=X[0];if(Y!==qa0){let J=Y.replace(qa0,"").trim();if(J.length>0){if(Z._code=parseInt(J,10),isNaN(Z._code))Z._code=0;let G=Z._code.toString();J=J.replace(G,""),Z._description=J.trim()}}if(X.length>=1)X.slice(1).map((J)=>{if(J){let G=J.indexOf(":");if(G>-1){let K=J.slice(0,G),W=J.slice(G+1).trim();Z.append(K,W)}}});return Z}toString(){if(this.headers.size===0&&this._code===0)return"";let $=qa0;if(this._code>0&&this._description!=="")$+=` ${this._code} ${this._description}`;for(let[Z,Q]of this.headers)for(let X=0;X<Q.length;X++)$=`${$}\r
|
|
1971
1971
|
${Z}: ${Q[X]}`;return`${$}\r
|