decocms 4.278.2 → 4.278.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-Bb6FRU8a.js → AlertCircle-DtwsXGC2.js} +1 -1
- package/dist/client/assets/{AreaChart-Dq81L4gg.js → AreaChart-BKb6QcVq.js} +1 -1
- package/dist/client/assets/{ArrowLeft-C0hAgD6M.js → ArrowLeft-D6IoGmY_.js} +1 -1
- package/dist/client/assets/{ArrowUp-BDGxIrAA.js → ArrowUp-DUpBJOqG.js} +1 -1
- package/dist/client/assets/{Check-WlWaXYF9.js → Check-BPGnsu8b.js} +1 -1
- package/dist/client/assets/{CheckCircle-DmAi_140.js → CheckCircle-BrmOZWeI.js} +1 -1
- package/dist/client/assets/{ChevronDown-BqBF9C5y.js → ChevronDown-D-_V7VXi.js} +1 -1
- package/dist/client/assets/{ChevronRight-8pjjZlxH.js → ChevronRight-B_79VY_Z.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CPnxgrLS.js → ChevronSelectorVertical-FSV_fFkH.js} +1 -1
- package/dist/client/assets/{ChevronUp-KgE4O_l1.js → ChevronUp-2g4BA9y4.js} +1 -1
- package/dist/client/assets/{Copy01-Np500SnR.js → Copy01-Bz-SfOdw.js} +1 -1
- package/dist/client/assets/{CreditCard01-BhE8yNep.js → CreditCard01-DvXJbbVt.js} +1 -1
- package/dist/client/assets/{DotsVertical-C3WH6llC.js → DotsVertical-BSeXHJUW.js} +1 -1
- package/dist/client/assets/{Download01-B8cJgK5e.js → Download01-CbE7s8-U.js} +1 -1
- package/dist/client/assets/{Eye-CzBFKM-L.js → Eye-8x8Uw5MT.js} +1 -1
- package/dist/client/assets/{FilterLines-DdBjOfEd.js → FilterLines-BRRwlHBq.js} +1 -1
- package/dist/client/assets/{Globe01-BWuiVR1j.js → Globe01-CV213oum.js} +1 -1
- package/dist/client/assets/{Globe04-BItmwhdw.js → Globe04-DQzxrGjs.js} +1 -1
- package/dist/client/assets/{HardDrive-L9CiFEWJ.js → HardDrive-DhWW9RYb.js} +1 -1
- package/dist/client/assets/{Key01-Dbm-PX-2.js → Key01-CQPJv3J8.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DVob2UYb.js → LinkExternal01-CZUY0CeT.js} +1 -1
- package/dist/client/assets/{LockUnlocked01-tMad0Pce.js → LockUnlocked01-B8bwafjp.js} +1 -1
- package/dist/client/assets/{LogOut01-CwJAH7zT.js → LogOut01-cXzSjnh3.js} +1 -1
- package/dist/client/assets/{Monitor01-BdhCFDSd.js → Monitor01-C-IL6ZKV.js} +1 -1
- package/dist/client/assets/{Palette-B2Eio7Hc.js → Palette-69qhHJHR.js} +1 -1
- package/dist/client/assets/{Play-CEwpA6EY.js → Play-CrEGl8pv.js} +1 -1
- package/dist/client/assets/{Plus-Bfn8BH21.js → Plus-xYB5Dsm0.js} +1 -1
- package/dist/client/assets/{SearchLg-KuoPDjby.js → SearchLg-dQqz43uz.js} +1 -1
- package/dist/client/assets/{SearchMd-BcUnwyKC.js → SearchMd-CssHjTYi.js} +1 -1
- package/dist/client/assets/{Settings02-V1ViRqug.js → Settings02-4zSUgYVv.js} +1 -1
- package/dist/client/assets/{Share07-DGnYYt7D.js → Share07-Bx2mgf-n.js} +1 -1
- package/dist/client/assets/{Shield01-Bqx1h0PL.js → Shield01-COrA3rJW.js} +1 -1
- package/dist/client/assets/{Stars01-MMy-zbHP.js → Stars01-B73Hpikz.js} +1 -1
- package/dist/client/assets/{Stars02-C72jvkQj.js → Stars02-CAUvDdy5.js} +1 -1
- package/dist/client/assets/{Sun-BKY5-F0P.js → Sun-CP0PgjXa.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CMuqftuh.js → SwitchHorizontal01-C_Aq39fM.js} +1 -1
- package/dist/client/assets/{Tool01-DIwF7u8X.js → Tool01-C_ZOac7L.js} +1 -1
- package/dist/client/assets/{Tool02-q2GDj5Hw.js → Tool02-Cs4_DgaF.js} +1 -1
- package/dist/client/assets/{Trash01-K8yam7IK.js → Trash01-BmON3Qzj.js} +1 -1
- package/dist/client/assets/{TrendUp01-Ce4nKX2u.js → TrendUp01-C56KYupw.js} +1 -1
- package/dist/client/assets/{Upload01-Dr_KRwAe.js → Upload01-C7kTKAxT.js} +1 -1
- package/dist/client/assets/{User01-BBEaaXWI.js → User01-CBR4t5vu.js} +1 -1
- package/dist/client/assets/{UserSquare-BCM5dWEC.js → UserSquare-DAG1cgSV.js} +1 -1
- package/dist/client/assets/{Users01-227TEJc-.js → Users01-Dj18XL3M.js} +1 -1
- package/dist/client/assets/{Users03-BDfMZVCO.js → Users03-C4hBWXjU.js} +1 -1
- package/dist/client/assets/{XCircle-DzA_c4No.js → XCircle-C02YlSjf.js} +1 -1
- package/dist/client/assets/{XClose-J9xkAa1i.js → XClose-BDS5RSm1.js} +1 -1
- package/dist/client/assets/{YAxis-CmQnsFcT.js → YAxis-YldZwOKp.js} +1 -1
- package/dist/client/assets/{Zap-cq6eUNZ7.js → Zap-DOnMc-yq.js} +1 -1
- package/dist/client/assets/{ZapSquare-JVR5MrmP.js → ZapSquare-C5afvpWM.js} +1 -1
- package/dist/client/assets/{access-gate-Dbuw7Ff3.js → access-gate-CF8U_u7L.js} +1 -1
- package/dist/client/assets/{agent-icon-CIgm8iow.js → agent-icon-B0M60Nn2.js} +1 -1
- package/dist/client/assets/{agents-list-SAwbZOcn.js → agents-list-D3WZUmaX.js} +1 -1
- package/dist/client/assets/{ai-providers-eMgh6HIA.js → ai-providers-CEel1Kxd.js} +1 -1
- package/dist/client/assets/{alert-dialog-h74gWvAo.js → alert-dialog-C6na9cij.js} +1 -1
- package/dist/client/assets/{alert-GoDcQBJh.js → alert-wR2H6LYZ.js} +1 -1
- package/dist/client/assets/{api-keys-B-62GEl_.js → api-keys-BDcueASF.js} +1 -1
- package/dist/client/assets/{app-editor-CeR8c5XA.js → app-editor-Do5YBnTD.js} +1 -1
- package/dist/client/assets/{auth-YchFVt1J.js → auth-9DZMPJym.js} +1 -1
- package/dist/client/assets/{auth-catchall-DO5khXz8.js → auth-catchall-ZbJ19y6L.js} +1 -1
- package/dist/client/assets/{auth-entry-Cu5WuiYj.js → auth-entry-BaRW7IKa.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Cx_MjVG2.js → auth-split-layout-BPx08tzw.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CLSn8eTd.js → authenticate-and-persist-oauth-BkCxLTF9.js} +1 -1
- package/dist/client/assets/{automation-list-row-Dofld-Hr.js → automation-list-row-Ab7r2O1w.js} +1 -1
- package/dist/client/assets/{automation-runs-BU_2Xqps.js → automation-runs-ByY51gwW.js} +1 -1
- package/dist/client/assets/{automations-CCjIQLCt.js → automations-B0rVjRSv.js} +1 -1
- package/dist/client/assets/{avatar-COsnIS4k.js → avatar-CTAGPgLq.js} +1 -1
- package/dist/client/assets/{badge-tHp_c8Dr.js → badge-D_0uJtcY.js} +1 -1
- package/dist/client/assets/{block-document-C51dYjIM.js → block-document-GuYzLHOl.js} +1 -1
- package/dist/client/assets/{buckets-Bho1jX29.js → buckets-C7ozxKK2.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-Bnsjpx0y.js → bulk-category-panel-BawF4ejA.js} +1 -1
- package/dist/client/assets/{capability-load-error-kmGxhT7e.js → capability-load-error-X8P82ike.js} +1 -1
- package/dist/client/assets/{cards-Ccmd_Xib.js → cards-mKUrKafR.js} +1 -1
- package/dist/client/assets/{category-editor-BpZZ4FU9.js → category-editor-D99UhuYa.js} +1 -1
- package/dist/client/assets/{chart-C8ZFL9iH.js → chart-D83dT5ec.js} +1 -1
- package/dist/client/assets/{chat-context-Y3tDPbjh.js → chat-context-a18IWAnl.js} +1 -1
- package/dist/client/assets/{checkbox-DHffV6C7.js → checkbox-DyN7wyQT.js} +1 -1
- package/dist/client/assets/{choose-editor-z-VvhXSG.js → choose-editor-CfhQCbjB.js} +1 -1
- package/dist/client/assets/{cli-auth-success-COOEgthX.js → cli-auth-success-BwOOGlAh.js} +1 -1
- package/dist/client/assets/{collection-detail-DgI2pUKU.js → collection-detail-DFQlpq6d.js} +1 -1
- package/dist/client/assets/{collection-display-button-BXMX0jxV.js → collection-display-button-BUtnvKEh.js} +1 -1
- package/dist/client/assets/{collection-search-G8A747be.js → collection-search-gB5G6Rjf.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Df14qp_Y.js → collection-table-wrapper-DuR3TSf0.js} +1 -1
- package/dist/client/assets/{collection-tabs-BDKNYNJY.js → collection-tabs-DjiQdF9-.js} +1 -1
- package/dist/client/assets/{command-VuHgSTxP.js → command-DkVpOcdV.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-BO2buywb.js → commerce-onboarding-C18Il7HL.js} +1 -1
- package/dist/client/assets/{connect-B8f9g4HL.js → connect-BrPFeR0P.js} +1 -1
- package/dist/client/assets/{connection-CTOVogpW.js → connection-B80ppug8.js} +1 -1
- package/dist/client/assets/{connection-card-qDOySoej.js → connection-card-C53iwc_G.js} +1 -1
- package/dist/client/assets/{connection-detail-D-EsGENA.js → connection-detail-B38_3G5P.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-1rp99iDU.js → connection-form-helpers-CWV7mVX6.js} +1 -1
- package/dist/client/assets/{connections-mnvFdKWS.js → connections-BpPNRLqA.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-mCgx_uqK.js → decopilot-sse-pool-BpVdKuG4.js} +1 -1
- package/dist/client/assets/{dialog-DyNaARMb.js → dialog-Xebj-cr9.js} +1 -1
- package/dist/client/assets/{domain-settings-Dgm6v4N6.js → domain-settings-2hDKIi4A.js} +1 -1
- package/dist/client/assets/{drawer-CjptIWrE.js → drawer-9IMGIRIT.js} +1 -1
- package/dist/client/assets/{dropdown-menu-B9ZSiAIz.js → dropdown-menu-rujqZyHA.js} +1 -1
- package/dist/client/assets/{empty-state-DkPucUga.js → empty-state-CJsm72yq.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Cp8_cUEt.js → extract-connection-data-CtuRaRgY.js} +1 -1
- package/dist/client/assets/{file-explorer-0ZCNYzbw.js → file-explorer-DAiev5r1.js} +1 -1
- package/dist/client/assets/{file-type-icon-Dyb5XU2y.js → file-type-icon-DO4DPONO.js} +1 -1
- package/dist/client/assets/{form-b3ZA5r4A.js → form-Dw5NqOGw.js} +1 -1
- package/dist/client/assets/{general-BQBIX055.js → general-DmNMK5DC.js} +1 -1
- package/dist/client/assets/{github-repo-picker-BKe-Fpd_.js → github-repo-picker-DdcM_jh3.js} +1 -1
- package/dist/client/assets/{hooks-Bvr5z9c-.js → hooks-DQt8VGNQ.js} +1 -1
- package/dist/client/assets/{index-DEEVDvvZ.js → index-2ZAdPFtQ.js} +1 -1
- package/dist/client/assets/{index-Tox1eOsI.js → index-B56ptN7d.js} +1 -1
- package/dist/client/assets/{index-D_1bQqzH.js → index-B9KN61Zb.js} +1 -1
- package/dist/client/assets/{index-B-opk6_e.js → index-C-6V4n2d.js} +1 -1
- package/dist/client/assets/{index-9w4hN6EE.js → index-CA55JwNP.js} +1 -1
- package/dist/client/assets/{index-CcsTL9K7.js → index-CVuvbEct.js} +1 -1
- package/dist/client/assets/{index-BCjpgUdQ.js → index-DB-DucRE.js} +3 -3
- package/dist/client/assets/{index-CIXSX2Pn.js → index-DiBQu-jJ.js} +1 -1
- package/dist/client/assets/{index-C-bhFNnJ.js → index-KY1m5FLN.js} +1 -1
- package/dist/client/assets/{index-Lole7lQX.js → index-Pd8T24f8.js} +50 -50
- package/dist/client/assets/{index-redirect-DrsZZOEx.js → index-redirect-BRrm1xtt.js} +1 -1
- package/dist/client/assets/{infra-billing-DEYH829b.js → infra-billing-BgEnlJuY.js} +1 -1
- package/dist/client/assets/{input-AFSgicQ2.js → input-DFTVJNFh.js} +1 -1
- package/dist/client/assets/{integration-icon-CG1bE5vT.js → integration-icon-CufQDodW.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-C9RjFL-5.js → invite-member-dialog-zQPVNc6s.js} +1 -1
- package/dist/client/assets/{label-De4DUtiK.js → label-D7VPbn9e.js} +1 -1
- package/dist/client/assets/{layout-DNyppYOA.js → layout-BBeIuUXJ.js} +1 -1
- package/dist/client/assets/{login-6yILtTaN.js → login-BjkeDnFW.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DOl7TGn7.js → mcp-oauth-CemCQOYs.js} +1 -1
- package/dist/client/assets/{members-DcgMulyv.js → members-QoGICphi.js} +1 -1
- package/dist/client/assets/{monaco-editor-Dj42noEC.js → monaco-editor-Cpy-p2w2.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CTo1iT58.js → monitoring-stats-row-C_4ByZoY.js} +1 -1
- package/dist/client/assets/{multi-select-BRAzQ5tu.js → multi-select--HPHh25-.js} +1 -1
- package/dist/client/assets/{oauth-callback-CqRKT12c.js → oauth-callback-CXDBHB10.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-mzWFM8g-.js → oauth-callback-ai-provider-Bje0b_rh.js} +1 -1
- package/dist/client/assets/{onboarding-CkMkGdFM.js → onboarding-BgbR95mN.js} +1 -1
- package/dist/client/assets/{org-layout-Bl0hmikK.js → org-layout-6AXtb0JJ.js} +1 -1
- package/dist/client/assets/{organization-choice-DJedocV3.js → organization-choice-Bg3KEsS2.js} +1 -1
- package/dist/client/assets/{orgs-3WvM6N1s.js → orgs-CUdHqgm_.js} +1 -1
- package/dist/client/assets/{page-seo-form-D--r-LeG.js → page-seo-form-CHBgguvx.js} +1 -1
- package/dist/client/assets/{popover-DwBt5xul.js → popover-DZ03JJW4.js} +1 -1
- package/dist/client/assets/{post-calendar-xT9ZBR3h.js → post-calendar-CfBaS0AI.js} +1 -1
- package/dist/client/assets/{post-editor-DlTovvuo.js → post-editor-B3js2-Xm.js} +1 -1
- package/dist/client/assets/{primitives-B9XqcTmL.js → primitives-BF4gxF6S.js} +1 -1
- package/dist/client/assets/{profile-CRWrypWs.js → profile-DtGG01xD.js} +1 -1
- package/dist/client/assets/{project-app-view-pASaT-wV.js → project-app-view-mFGYa4nQ.js} +1 -1
- package/dist/client/assets/{prompts-BLL09gEI.js → prompts-kKHreFb-.js} +1 -1
- package/dist/client/assets/record-editor-D35xBogl.js +1 -0
- package/dist/client/assets/{redirect-editor-CeiY3kWW.js → redirect-editor-H0b0c_QI.js} +1 -1
- package/dist/client/assets/registry-BIBNuxvC.js +2 -0
- package/dist/client/assets/{registry-layout-D1923Fd5.js → registry-layout-BTDeFLdf.js} +1 -1
- package/dist/client/assets/{reports-CVyPc8z8.js → reports-Chv9CO3O.js} +1 -1
- package/dist/client/assets/{require-capability-sCbwyKfB.js → require-capability-CG46pewr.js} +1 -1
- package/dist/client/assets/{required-auth-layout-SL6CM6nK.js → required-auth-layout-CMY3sqmN.js} +1 -1
- package/dist/client/assets/{reset-password-D9bf5JQj.js → reset-password-CFXp-FB2.js} +1 -1
- package/dist/client/assets/{review-settings-CtRRCuvx.js → review-settings-Bnm6xdEd.js} +1 -1
- package/dist/client/assets/{roles-DEeaqRLl.js → roles-GbEVC2na.js} +1 -1
- package/dist/client/assets/{search-input-BL9LK33O.js → search-input-BJ9OvAH_.js} +1 -1
- package/dist/client/assets/{secrets-B-7EQFdR.js → secrets-CoBr5OPm.js} +1 -1
- package/dist/client/assets/{sections-editor-TFzZysn0.js → sections-editor-YcV3WI06.js} +1 -1
- package/dist/client/assets/{select-D0djbI7W.js → select-BdgTQ-wl.js} +1 -1
- package/dist/client/assets/{select-model-tl49hZs_.js → select-model-DyL5Ob_o.js} +1 -1
- package/dist/client/assets/{self-tool-result-DY5y5UCh.js → self-tool-result-CG2ewk8w.js} +1 -1
- package/dist/client/assets/{seo-editor-DeZcIGX6.js → seo-editor-DZc7TOrv.js} +1 -1
- package/dist/client/assets/{settings-layout-CGvD1XwK.js → settings-layout-DDlpVjSw.js} +1 -1
- package/dist/client/assets/{shell-controls-qTwmoKwH.js → shell-controls-D4rSUTAd.js} +1 -1
- package/dist/client/assets/{shell-layout-QA993J8Y.js → shell-layout-DPwYWDiA.js} +1 -1
- package/dist/client/assets/{spinner-BVQ60Lwr.js → spinner-BVcwiwgJ.js} +1 -1
- package/dist/client/assets/{sso-32Bvvv3y.js → sso-S7sO09eF.js} +1 -1
- package/dist/client/assets/{store-Cjl5Y942.js → store-nVEMZ6vx.js} +1 -1
- package/dist/client/assets/store-registry-BfA8_yZr.js +2 -0
- package/dist/client/assets/{switch-CnRBEFCz.js → switch-D1HI39y0.js} +1 -1
- package/dist/client/assets/{synced-repos-dZxXVzOk.js → synced-repos-BbWXmwMg.js} +1 -1
- package/dist/client/assets/{tab-id-BPut-S8_.js → tab-id-CqJ7FtXG.js} +1 -1
- package/dist/client/assets/{table-VwgR7aSz.js → table-_VXIO-nb.js} +1 -1
- package/dist/client/assets/{tabs-q7TrLH4J.js → tabs-BnKRzvJ9.js} +1 -1
- package/dist/client/assets/{tasks-DgoC300L.js → tasks-CmkXBKmv.js} +1 -1
- package/dist/client/assets/{textarea-CnC4xPzd.js → textarea-Dpy6uVmb.js} +1 -1
- package/dist/client/assets/{toggle-group-BteKK96h.js → toggle-group-D-LuQzBQ.js} +1 -1
- package/dist/client/assets/{toolbar-CblIK7Xq.js → toolbar-CKrMebWN.js} +1 -1
- package/dist/client/assets/{track-CyiCyGRI.js → track-Ctua7fmf.js} +1 -1
- package/dist/client/assets/{types-CkLZpDc5.js → types-C3c_o5zM.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DTow-Mye.js → use-ai-providers-DVYHluz-.js} +1 -1
- package/dist/client/assets/{use-api-keys-DapQgbCV.js → use-api-keys-ogRuTcSX.js} +1 -1
- package/dist/client/assets/{use-automations-BVKQNMVi.js → use-automations-BiLrEqUM.js} +1 -1
- package/dist/client/assets/{use-autosave-zgGYxv5Z.js → use-autosave-3_F2hbge.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DZC0K6ge.js → use-clock-tick-CrWitjbZ.js} +1 -1
- package/dist/client/assets/{use-commerce-diagnostic-ZQ9vjett.js → use-commerce-diagnostic-D3ZWCcVl.js} +1 -1
- package/dist/client/assets/{use-connection-BXZ0YKSx.js → use-connection-DTe3xRtU.js} +1 -1
- package/dist/client/assets/{use-copy-B_fXlDcS.js → use-copy-rAq8os-P.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BPIMc7LL.js → use-create-virtual-mcp-CbpKnaZI.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BiJ8-45I.js → use-debounced-autosave-KtyEOcAu.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BdaSqbr2.js → use-debounced-value-CK2kDVPk.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CWe3Zh2O.js → use-decopilot-events-COVTNyWo.js} +1 -1
- package/dist/client/assets/{use-delete-connection-m7u43PjT.js → use-delete-connection-CFYWd9vz.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DhSEroyB.js → use-deployment-admin-DtWv5gbp.js} +1 -1
- package/dist/client/assets/{use-file-configs-B_gl6RPo.js → use-file-configs-BKu_qNXg.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-4s9C7kfW.js → use-infinite-scroll-v0tZTHEw.js} +1 -1
- package/dist/client/assets/{use-join-requests-Jqzki8yG.js → use-join-requests-BVrnyff0.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-UvCWQKb5.js → use-mcp-auth-status-D50F8jA6.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BP2p87OD.js → use-mcp-client-CSNeF8wR.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Dc955WPx.js → use-mcp-tools-SgSHP21p.js} +1 -1
- package/dist/client/assets/{use-members-CR_qX3wJ.js → use-members-BJSM5npF.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BHmaITwm.js → use-navigate-to-agent-B-gzjrb_.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-fdd-0Jdn.js → use-org-auth-client-BqM8mZLD.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-Cev3rFfX.js → use-org-repo-syncs-BD9WYKmE.js} +1 -1
- package/dist/client/assets/{use-org-sso-BKUd6dcp.js → use-org-sso-2GVzixxu.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Dm-6T1CA.js → use-organization-roles-DxtVaPbF.js} +1 -1
- package/dist/client/assets/{use-organization-settings-B0J-LJIe.js → use-organization-settings-uTdwzh3G.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DFd8Ba3d.js → use-registry-connections-Cnqrp3zt.js} +1 -1
- package/dist/client/assets/{use-secrets-5CQwEjb6.js → use-secrets-DRQlzn7q.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-yfsU69Yh.js → use-section-preview-base-CAjCSpGL.js} +1 -1
- package/dist/client/assets/{use-status-sounds-C7X_L8MT.js → use-status-sounds-DaBK4Z_I.js} +1 -1
- package/dist/client/assets/{use-tags-CJ6w6Ien.js → use-tags-D29FgVnF.js} +1 -1
- package/dist/client/assets/{use-task-board-items-BkeCFlnj.js → use-task-board-items-DaYOfHGf.js} +1 -1
- package/dist/client/assets/{use-view-mode-Cj5VNwDB.js → use-view-mode-DBHS_l_5.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DIl_WZwd.js → use-virtual-mcp-BEkVs7Pw.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-f5bGl1qN.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-kDKn2-vQ.js +1 -0
- package/dist/client/assets/{users-SfcwrSJt.js → users-DP2sXROF.js} +1 -1
- package/dist/client/assets/{variant-calendar-Bn5KYzNB.js → variant-calendar-B10Ud7_d.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CnjiENa8.js → view-mode-toggle-ojRGND4J.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/record-editor-1LEViVI9.js +0 -1
- package/dist/client/assets/registry-Bv9s4BqF.js +0 -2
- package/dist/client/assets/store-registry-Cf4XwcQU.js +0 -2
- package/dist/client/assets/useInfiniteQuery-stzFqMsX.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BJ8fdY6D.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as K,b as X,r as Z,j as o,n as rt,a8 as ut,ab as ht,B as tt,a9 as xt}from"./index-BCjpgUdQ.js";import{w as gt,ae as at,aS as bt}from"./agent-icon-CIgm8iow.js";import{i as vt}from"./ChevronRight-8pjjZlxH.js";import{L as yt}from"./label-De4DUtiK.js";import{S as lt}from"./use-clock-tick-DZC0K6ge.js";import{S as jt}from"./switch-CnRBEFCz.js";import{V as Tt}from"./view-mode-toggle-CnjiENa8.js";import{bP as ct,bQ as mt,bR as Nt,bS as _t,bT as kt,bU as U,bV as wt}from"./index-Lole7lQX.js";import"./AlertCircle-Bb6FRU8a.js";import"./Tool01-DIwF7u8X.js";import"./ArrowUp-BDGxIrAA.js";import"./ArrowLeft-C0hAgD6M.js";import"./Tool02-q2GDj5Hw.js";import"./XCircle-DzA_c4No.js";import"./TrendUp01-Ce4nKX2u.js";import"./ZapSquare-JVR5MrmP.js";import"./Users03-BDfMZVCO.js";import"./CheckCircle-DmAi_140.js";import"./Check-WlWaXYF9.js";import"./ChevronDown-BqBF9C5y.js";import"./ChevronSelectorVertical-CPnxgrLS.js";import"./ChevronUp-KgE4O_l1.js";import"./DotsVertical-C3WH6llC.js";import"./Stars02-C72jvkQj.js";import"./UserSquare-BCM5dWEC.js";import"./Copy01-Np500SnR.js";import"./CreditCard01-BhE8yNep.js";import"./Download01-B8cJgK5e.js";import"./Settings02-V1ViRqug.js";import"./Eye-CzBFKM-L.js";import"./FilterLines-DdBjOfEd.js";import"./Share07-DGnYYt7D.js";import"./Globe01-BWuiVR1j.js";import"./Globe04-BItmwhdw.js";import"./SwitchHorizontal01-CMuqftuh.js";import"./HardDrive-L9CiFEWJ.js";import"./Key01-Dbm-PX-2.js";import"./LinkExternal01-DVob2UYb.js";import"./LockUnlocked01-tMad0Pce.js";import"./LogOut01-CwJAH7zT.js";import"./Monitor01-BdhCFDSd.js";import"./Sun-BKY5-F0P.js";import"./Palette-B2Eio7Hc.js";import"./Play-CEwpA6EY.js";import"./Plus-Bfn8BH21.js";import"./SearchLg-KuoPDjby.js";import"./SearchMd-BcUnwyKC.js";import"./Shield01-Bqx1h0PL.js";import"./Stars01-MMy-zbHP.js";import"./Trash01-K8yam7IK.js";import"./Upload01-Dr_KRwAe.js";import"./User01-BBEaaXWI.js";import"./Users01-227TEJc-.js";import"./XClose-J9xkAa1i.js";import"./Zap-cq6eUNZ7.js";import"./select-D0djbI7W.js";import"./chat-context-Y3tDPbjh.js";import"./tab-id-BPut-S8_.js";import"./dialog-DyNaARMb.js";import"./session-runtime-wVXsCwcJ.js";import"./hooks-Bvr5z9c-.js";import"./use-mcp-client-BP2p87OD.js";import"./constants-z9Iog-sb.js";import"./auth-YchFVt1J.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-mCgx_uqK.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-DIl_WZwd.js";import"./use-ai-providers-DTow-Mye.js";import"./use-decopilot-events-CWe3Zh2O.js";import"./use-organization-settings-B0J-LJIe.js";import"./automation-runs-BU_2Xqps.js";import"./useInfiniteQuery-stzFqMsX.js";import"./use-infinite-scroll-4s9C7kfW.js";import"./use-connection-BXZ0YKSx.js";import"./table-VwgR7aSz.js";import"./empty-state-DkPucUga.js";import"./use-members-CR_qX3wJ.js";import"./use-org-auth-client-fdd-0Jdn.js";import"./use-automations-BVKQNMVi.js";import"./useSuspenseInfiniteQuery-BJ8fdY6D.js";import"./avatar-COsnIS4k.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-B_fXlDcS.js";import"./monaco-editor-Dj42noEC.js";import"./spinner-BVQ60Lwr.js";import"./types-CkLZpDc5.js";import"./shell-layout-QA993J8Y.js";import"./required-auth-layout-SL6CM6nK.js";import"./use-org-sso-BKUd6dcp.js";import"./integration-icon-CG1bE5vT.js";import"./use-navigate-to-agent-BHmaITwm.js";import"./reusable-new-chat-CzvRy4Pe.js";import"./chart-C8ZFL9iH.js";import"./index-CcsTL9K7.js";import"./form-b3ZA5r4A.js";import"./input-AFSgicQ2.js";import"./file-type-icon-Dyb5XU2y.js";import"./drawer-CjptIWrE.js";import"./collection-search-G8A747be.js";import"./tabs-q7TrLH4J.js";import"./toggle-group-BteKK96h.js";import"./use-commerce-diagnostic-ZQ9vjett.js";import"./popover-DwBt5xul.js";import"./self-tool-result-DY5y5UCh.js";import"./alert-dialog-h74gWvAo.js";import"./extract-connection-data-Cp8_cUEt.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-BdaSqbr2.js";import"./authenticate-and-persist-oauth-CLSn8eTd.js";import"./mcp-oauth-DOl7TGn7.js";import"./track-CyiCyGRI.js";import"./toolbar-CblIK7Xq.js";import"./github-repo-picker-BKe-Fpd_.js";import"./use-mcp-tools-Dc955WPx.js";import"./agent-capabilities-B52k7xCe.js";import"./connection-card-qDOySoej.js";import"./use-registry-connections-DFd8Ba3d.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-CnC4xPzd.js";import"./connection-form-helpers-1rp99iDU.js";import"./collection-tabs-BDKNYNJY.js";import"./badge-tHp_c8Dr.js";import"./command-VuHgSTxP.js";import"./index-B-opk6_e.js";import"./select-model-tl49hZs_.js";import"./checkbox-DHffV6C7.js";import"./ai-providers-logos-DD3qZ33J.js";import"./cards-Ccmd_Xib.js";import"./dropdown-menu-B9ZSiAIz.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-C7X_L8MT.js";import"./use-file-configs-B_gl6RPo.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-BiJ8-45I.js";import"./search-input-BL9LK33O.js";import"./use-mcp-auth-status-UvCWQKb5.js";import"./use-secrets-5CQwEjb6.js";import"./AreaChart-Dq81L4gg.js";import"./use-task-board-items-BkeCFlnj.js";import"./get-initials-D-f_fDFw.js";import"./use-tags-CJ6w6Ien.js";import"./task-key-BCHdFiOO.js";import"./automation-list-row-Dofld-Hr.js";import"./site-error--i37Vnuw.js";import"./use-org-repo-syncs-Cev3rFfX.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 Rt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Lt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e,n=typeof t=="string",s=typeof r=="string";if(!n&&!s)return null;const i=n?new Date(t):Ct,a=s?new Date(r):Mt;return Number.isNaN(i.getTime())||Number.isNaN(a.getTime())||n&&s&&a.getTime()<=i.getTime()?null:{start:i,end:a,openStart:!n,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 n=Lt(e);n&&t.push(n);return}if(St.has(r)){const n=e.matchers;if(Array.isArray(n))for(const s of n)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 Pt(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 Ot(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];typeof n=="number"?t.length>0?t[t.length-1]+=`[${n}]`:t.push(`[${n}]`):t.push(n)}return t.join(" · ")}function J(e,t,r,n,s){if(Dt(e)){const i=e.variants,a=e.__resolveType,c=$t.test(a)?"":Ot(n);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=Pt(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"&&J(m.value,t,r,[...n,"variants",l,"value"],s)}return}if(Array.isArray(e)){for(let i=0;i<e.length;i++)J(e[i],t,r,[...n,i],s);return}if(e&&typeof e=="object")for(const[i,a]of Object.entries(e))i!=="__resolveType"&&J(a,t,r,[...n,i],s)}function Vt(e){if(!e)return[];const t=[];for(const[r,n]of Object.entries(e))J(n,r,Rt(r),[],t);return t.sort((r,n)=>r.start.getTime()-n.start.getTime())}function It(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((n,s)=>{const i=s*137.508%360;r.set(n,{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 nt=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Bt(e,t){const r=e.openStart?t("sandbox.variantCalendar.always"):nt.format(e.start),n=e.openEnd?t("sandbox.variantCalendar.ongoing"):nt.format(e.end);return`${r} → ${n}`}function Ft(e){const t=K.c(18),{variant:r}=e,n=X();let s;t[0]!==r.blockLabel?(s=o.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&&o.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&&o.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]!==n||t[9]!==r?(c=Bt(r,n),t[8]=n,t[9]=r,t[10]=c):c=t[10];let l;t[11]!==c?(l=o.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=o.jsx(xt,{children:o.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 ot=16;function zt(e,t){const r=e?"transparent":"#000 0",n=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${r}, #000 ${ot}px, #000 calc(100% - ${ot}px), ${n})`}function ft(e){const t=K.c(26),{variant:r,color:n,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=zt(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]!==n.bg||t[10]!==n.text||t[11]!==s||t[12]!==f||t[13]!==g||t[14]!==u?(x={background:n.bg,color:n.text,borderRadius:4,...f,...g,...u,...s},t[9]=n.bg,t[10]=n.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=o.jsx("span",{className:"truncate",children:i}),t[16]=i,t[17]=b):b=t[17];let E;t[18]!==x||t[19]!==b?(E=o.jsx(ut,{asChild:!0,children:o.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=o.jsx(Ft,{variant:r}),t[21]=r,t[22]=T):T=t[22];let d;return t[23]!==T||t[24]!==E?(d=o.jsxs(ht,{children:[E,T]}),t[23]=T,t[24]=E,t[25]=d):d=t[25],d}function Kn(e){const t=K.c(72),{decofile:r}=e,n=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 V=Vt(r);p=V.filter(Ut).length,f=l?V:V.filter(Gt),h=It(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(V=>s==="calendar"?U(V,-1):U(V,-3)),t[6]=s,t[7]=b):b=t[7];const E=b;let T;t[8]!==s?(T=()=>c(V=>s==="calendar"?U(V,1):U(V,3)),t[8]=s,t[9]=T):T=t[9];const d=T;let v;t[10]!==n?(v=n("sandbox.variantCalendar.today"),t[10]=n,t[11]=v):v=t[11];let y;t[12]!==v?(y=o.jsx(tt,{variant:"outline",size:"sm",onClick:x,children:v}),t[12]=v,t[13]=y):y=t[13];let N;t[14]!==n?(N=n("sandbox.variantCalendar.previous"),t[14]=n,t[15]=N):N=t[15];let A;t[16]===Symbol.for("react.memo_cache_sentinel")?(A=o.jsx(gt,{size:16}),t[16]=A):A=t[16];let _;t[17]!==E||t[18]!==N?(_=o.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]!==n?(k=n("sandbox.variantCalendar.next"),t[20]=n,t[21]=k):k=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsx(vt,{size:16}),t[22]=C):C=t[22];let $;t[23]!==d||t[24]!==k?($=o.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 R=ct[a.getMonth()];let M;t[26]!==a?(M=a.getFullYear(),t[26]=a,t[27]=M):M=t[27];let w;t[28]!==R||t[29]!==M?(w=o.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[R," ",M]}),t[28]=R,t[29]=M,t[30]=w):w=t[30];let j;t[31]!==$||t[32]!==w||t[33]!==y||t[34]!==_?(j=o.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 L;t[36]!==p||t[37]!==l||t[38]!==n?(L=p>0&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(jt,{id:"show-ongoing",checked:l,onCheckedChange:m}),o.jsx(yt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:n("sandbox.variantCalendar.showOngoing",{count:p})})]}),t[36]=p,t[37]=l,t[38]=n,t[39]=L):L=t[39];let B;t[40]===Symbol.for("react.memo_cache_sentinel")?(B=o.jsx(at,{}),t[40]=B):B=t[40];let I;t[41]!==n?(I=n("sandbox.variantCalendar.calendarMode"),t[41]=n,t[42]=I):I=t[42];let S;t[43]!==I?(S={value:"calendar",icon:B,label:I},t[43]=I,t[44]=S):S=t[44];let F;t[45]===Symbol.for("react.memo_cache_sentinel")?(F=o.jsx(bt,{}),t[45]=F):F=t[45];let D;t[46]!==n?(D=n("sandbox.variantCalendar.timelineMode"),t[46]=n,t[47]=D):D=t[47];let P;t[48]!==D?(P={value:"timeline",icon:F,label:D},t[48]=D,t[49]=P):P=t[49];let O;t[50]!==S||t[51]!==P?(O=[S,P],t[50]=S,t[51]=P,t[52]=O):O=t[52];let H;t[53]!==O||t[54]!==s?(H=o.jsx(Tt,{value:s,onValueChange:i,options:O}),t[53]=O,t[54]=s,t[55]=H):H=t[55];let z;t[56]!==L||t[57]!==H?(z=o.jsxs("div",{className:"flex items-center gap-4",children:[L,H]}),t[56]=L,t[57]=H,t[58]=z):z=t[58];let W;t[59]!==j||t[60]!==z?(W=o.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,z]}),t[59]=j,t[60]=z,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?o.jsx(Yt,{hiddenOngoing:l?0:p}):s==="calendar"?o.jsx(qt,{monthStart:a,variants:f,colorMap:g}):o.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 Q;return t[69]!==W||t[70]!==G?(Q=o.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=Q):Q=t[71],Q}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,n=r===void 0?0:r,s=X();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(at,{size:24,className:"text-muted-foreground/60"}),t[0]=i):i=t[0];let a;return t[1]!==n||t[2]!==s?(a=o.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,n>0?o.jsxs(o.Fragment,{children:[o.jsx("div",{children:s("sandbox.variantCalendar.noDatedVariants")}),o.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.hiddenOngoingVariants",{count:n})})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{children:s("sandbox.variantCalendar.noScheduledVariants")}),o.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=n,t[2]=s,t[3]=a):a=t[3],a}const et=20,it=2,st=28,Qt=6;function qt(e){const t=K.c(17),{monthStart:r,variants:n,colorMap:s}=e;let i,a,c,l,m;if(t[0]!==s||t[1]!==r||t[2]!==n){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=o.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,n),E=b.reduce(Jt,0),T=st+E*(et+it)+8;return o.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 o.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:o.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 o.jsxs(ft,{variant:d.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${A}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:Qt,height:et},children:[d.variant.blockLabel,d.variant.label!==d.variant.blockLabel&&o.jsxs("span",{className:"opacity-70",children:[" · ",d.variant.label]})]},`${x}-${v}`)})]},x)}),t[0]=s,t[1]=r,t[2]=n,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=o.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=o.jsx(i,{className:m,children:p}),t[13]=i,t[14]=m,t[15]=p,t[16]=h):h=t[16],h}function Jt(e,t){return Math.max(e,t.lane+1)}function Xt(e){return o.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:n,colorMap:s}=e,i=r,a=U(r,q),c=new Date,l=new Map;for(const w of n){const j=l.get(w.blockKey)??[];j.push(w),l.set(w.blockKey,j)}const m=Array.from(l.entries()).sort(ne),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=o.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?(_=o.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=o.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&&o.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:o.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,L]=w,B=dt(s,j),I=L[0]?.blockLabel??j;return o.jsxs("div",{children:[o.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:o.jsx("div",{className:"px-3 truncate",style:{width:Y},children:I})}),L.map((S,F)=>o.jsxs("div",{className:"flex border-b items-center",style:{height:Zt},children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:Y},children:[o.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:B.bg}}),o.jsx("span",{className:"truncate text-foreground/80",children:S.label})]}),o.jsxs("div",{className:"relative flex-1 h-full",children:[o.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()),P=Math.min(S.end.getTime(),a.getTime());if(P<=D)return null;const O=h(new Date(D)),H=h(new Date(P))-O;return o.jsx(ft,{variant:S,color:B,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${O}%`,width:`calc(${H}% - 2px)`,height:22},children:S.label})})()]})]},F))]},j)});let R;t[16]!==k||t[17]!==C||t[18]!==$?(R=o.jsxs("div",{className:T,children:[k,C,$]}),t[16]=k,t[17]=C,t[18]=$,t[19]=R):R=t[19];let M;return t[20]!==b||t[21]!==R?(M=o.jsx(b,{className:E,children:R}),t[20]=b,t[21]=R,t[22]=M):M=t[22],M}function ee(e,t){return o.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function re(e,t){return o.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 ne(e,t){return e[0].localeCompare(t[0])}export{Kn as VariantCalendar};
|
|
1
|
+
import{c as K,b as X,r as Z,j as o,n as rt,a8 as ut,ab as ht,B as tt,a9 as xt}from"./index-DB-DucRE.js";import{w as gt,ae as at,aS as bt}from"./agent-icon-B0M60Nn2.js";import{i as vt}from"./ChevronRight-B_79VY_Z.js";import{L as yt}from"./label-D7VPbn9e.js";import{S as lt}from"./use-clock-tick-CrWitjbZ.js";import{S as jt}from"./switch-D1HI39y0.js";import{V as Tt}from"./view-mode-toggle-ojRGND4J.js";import{bP as ct,bQ as mt,bR as Nt,bS as _t,bT as kt,bU as U,bV as wt}from"./index-Pd8T24f8.js";import"./AlertCircle-DtwsXGC2.js";import"./Tool01-C_ZOac7L.js";import"./ArrowUp-DUpBJOqG.js";import"./ArrowLeft-D6IoGmY_.js";import"./Tool02-Cs4_DgaF.js";import"./XCircle-C02YlSjf.js";import"./TrendUp01-C56KYupw.js";import"./ZapSquare-C5afvpWM.js";import"./Users03-C4hBWXjU.js";import"./CheckCircle-BrmOZWeI.js";import"./Check-BPGnsu8b.js";import"./ChevronDown-D-_V7VXi.js";import"./ChevronSelectorVertical-FSV_fFkH.js";import"./ChevronUp-2g4BA9y4.js";import"./DotsVertical-BSeXHJUW.js";import"./Stars02-CAUvDdy5.js";import"./UserSquare-DAG1cgSV.js";import"./Copy01-Bz-SfOdw.js";import"./CreditCard01-DvXJbbVt.js";import"./Download01-CbE7s8-U.js";import"./Settings02-4zSUgYVv.js";import"./Eye-8x8Uw5MT.js";import"./FilterLines-BRRwlHBq.js";import"./Share07-Bx2mgf-n.js";import"./Globe01-CV213oum.js";import"./Globe04-DQzxrGjs.js";import"./SwitchHorizontal01-C_Aq39fM.js";import"./HardDrive-DhWW9RYb.js";import"./Key01-CQPJv3J8.js";import"./LinkExternal01-CZUY0CeT.js";import"./LockUnlocked01-B8bwafjp.js";import"./LogOut01-cXzSjnh3.js";import"./Monitor01-C-IL6ZKV.js";import"./Sun-CP0PgjXa.js";import"./Palette-69qhHJHR.js";import"./Play-CrEGl8pv.js";import"./Plus-xYB5Dsm0.js";import"./SearchLg-dQqz43uz.js";import"./SearchMd-CssHjTYi.js";import"./Shield01-COrA3rJW.js";import"./Stars01-B73Hpikz.js";import"./Trash01-BmON3Qzj.js";import"./Upload01-C7kTKAxT.js";import"./User01-CBR4t5vu.js";import"./Users01-Dj18XL3M.js";import"./XClose-BDS5RSm1.js";import"./Zap-DOnMc-yq.js";import"./select-BdgTQ-wl.js";import"./chat-context-a18IWAnl.js";import"./tab-id-CqJ7FtXG.js";import"./dialog-Xebj-cr9.js";import"./session-runtime-wVXsCwcJ.js";import"./hooks-DQt8VGNQ.js";import"./use-mcp-client-CSNeF8wR.js";import"./constants-z9Iog-sb.js";import"./auth-9DZMPJym.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BpVdKuG4.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-BEkVs7Pw.js";import"./use-ai-providers-DVYHluz-.js";import"./use-decopilot-events-COVTNyWo.js";import"./use-organization-settings-uTdwzh3G.js";import"./automation-runs-ByY51gwW.js";import"./useInfiniteQuery-f5bGl1qN.js";import"./use-infinite-scroll-v0tZTHEw.js";import"./use-connection-DTe3xRtU.js";import"./table-_VXIO-nb.js";import"./empty-state-CJsm72yq.js";import"./use-members-BJSM5npF.js";import"./use-org-auth-client-BqM8mZLD.js";import"./use-automations-BiLrEqUM.js";import"./useSuspenseInfiniteQuery-kDKn2-vQ.js";import"./avatar-CTAGPgLq.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-rAq8os-P.js";import"./monaco-editor-Cpy-p2w2.js";import"./spinner-BVcwiwgJ.js";import"./types-C3c_o5zM.js";import"./shell-layout-DPwYWDiA.js";import"./required-auth-layout-CMY3sqmN.js";import"./use-org-sso-2GVzixxu.js";import"./integration-icon-CufQDodW.js";import"./use-navigate-to-agent-B-gzjrb_.js";import"./reusable-new-chat-CzvRy4Pe.js";import"./chart-D83dT5ec.js";import"./index-CVuvbEct.js";import"./form-Dw5NqOGw.js";import"./input-DFTVJNFh.js";import"./file-type-icon-DO4DPONO.js";import"./drawer-9IMGIRIT.js";import"./collection-search-gB5G6Rjf.js";import"./tabs-BnKRzvJ9.js";import"./toggle-group-D-LuQzBQ.js";import"./use-commerce-diagnostic-D3ZWCcVl.js";import"./popover-DZ03JJW4.js";import"./self-tool-result-CG2ewk8w.js";import"./alert-dialog-C6na9cij.js";import"./extract-connection-data-CtuRaRgY.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-CK2kDVPk.js";import"./authenticate-and-persist-oauth-BkCxLTF9.js";import"./mcp-oauth-CemCQOYs.js";import"./track-Ctua7fmf.js";import"./toolbar-CKrMebWN.js";import"./github-repo-picker-DdcM_jh3.js";import"./use-mcp-tools-SgSHP21p.js";import"./agent-capabilities-B52k7xCe.js";import"./connection-card-C53iwc_G.js";import"./use-registry-connections-Cnqrp3zt.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-Dpy6uVmb.js";import"./connection-form-helpers-CWV7mVX6.js";import"./collection-tabs-DjiQdF9-.js";import"./badge-D_0uJtcY.js";import"./command-DkVpOcdV.js";import"./index-C-6V4n2d.js";import"./select-model-DyL5Ob_o.js";import"./checkbox-DyN7wyQT.js";import"./ai-providers-logos-DD3qZ33J.js";import"./cards-mKUrKafR.js";import"./dropdown-menu-rujqZyHA.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DaBK4Z_I.js";import"./use-file-configs-BKu_qNXg.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-KtyEOcAu.js";import"./search-input-BJ9OvAH_.js";import"./use-mcp-auth-status-D50F8jA6.js";import"./use-secrets-DRQlzn7q.js";import"./AreaChart-BKb6QcVq.js";import"./use-task-board-items-DaYOfHGf.js";import"./get-initials-D-f_fDFw.js";import"./use-tags-D29FgVnF.js";import"./task-key-BCHdFiOO.js";import"./automation-list-row-Ab7r2O1w.js";import"./site-error--i37Vnuw.js";import"./use-org-repo-syncs-BD9WYKmE.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 Rt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Lt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e,n=typeof t=="string",s=typeof r=="string";if(!n&&!s)return null;const i=n?new Date(t):Ct,a=s?new Date(r):Mt;return Number.isNaN(i.getTime())||Number.isNaN(a.getTime())||n&&s&&a.getTime()<=i.getTime()?null:{start:i,end:a,openStart:!n,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 n=Lt(e);n&&t.push(n);return}if(St.has(r)){const n=e.matchers;if(Array.isArray(n))for(const s of n)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 Pt(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 Ot(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];typeof n=="number"?t.length>0?t[t.length-1]+=`[${n}]`:t.push(`[${n}]`):t.push(n)}return t.join(" · ")}function J(e,t,r,n,s){if(Dt(e)){const i=e.variants,a=e.__resolveType,c=$t.test(a)?"":Ot(n);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=Pt(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"&&J(m.value,t,r,[...n,"variants",l,"value"],s)}return}if(Array.isArray(e)){for(let i=0;i<e.length;i++)J(e[i],t,r,[...n,i],s);return}if(e&&typeof e=="object")for(const[i,a]of Object.entries(e))i!=="__resolveType"&&J(a,t,r,[...n,i],s)}function Vt(e){if(!e)return[];const t=[];for(const[r,n]of Object.entries(e))J(n,r,Rt(r),[],t);return t.sort((r,n)=>r.start.getTime()-n.start.getTime())}function It(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((n,s)=>{const i=s*137.508%360;r.set(n,{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 nt=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Bt(e,t){const r=e.openStart?t("sandbox.variantCalendar.always"):nt.format(e.start),n=e.openEnd?t("sandbox.variantCalendar.ongoing"):nt.format(e.end);return`${r} → ${n}`}function Ft(e){const t=K.c(18),{variant:r}=e,n=X();let s;t[0]!==r.blockLabel?(s=o.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&&o.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&&o.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]!==n||t[9]!==r?(c=Bt(r,n),t[8]=n,t[9]=r,t[10]=c):c=t[10];let l;t[11]!==c?(l=o.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=o.jsx(xt,{children:o.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 ot=16;function zt(e,t){const r=e?"transparent":"#000 0",n=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${r}, #000 ${ot}px, #000 calc(100% - ${ot}px), ${n})`}function ft(e){const t=K.c(26),{variant:r,color:n,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=zt(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]!==n.bg||t[10]!==n.text||t[11]!==s||t[12]!==f||t[13]!==g||t[14]!==u?(x={background:n.bg,color:n.text,borderRadius:4,...f,...g,...u,...s},t[9]=n.bg,t[10]=n.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=o.jsx("span",{className:"truncate",children:i}),t[16]=i,t[17]=b):b=t[17];let E;t[18]!==x||t[19]!==b?(E=o.jsx(ut,{asChild:!0,children:o.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=o.jsx(Ft,{variant:r}),t[21]=r,t[22]=T):T=t[22];let d;return t[23]!==T||t[24]!==E?(d=o.jsxs(ht,{children:[E,T]}),t[23]=T,t[24]=E,t[25]=d):d=t[25],d}function Kn(e){const t=K.c(72),{decofile:r}=e,n=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 V=Vt(r);p=V.filter(Ut).length,f=l?V:V.filter(Gt),h=It(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(V=>s==="calendar"?U(V,-1):U(V,-3)),t[6]=s,t[7]=b):b=t[7];const E=b;let T;t[8]!==s?(T=()=>c(V=>s==="calendar"?U(V,1):U(V,3)),t[8]=s,t[9]=T):T=t[9];const d=T;let v;t[10]!==n?(v=n("sandbox.variantCalendar.today"),t[10]=n,t[11]=v):v=t[11];let y;t[12]!==v?(y=o.jsx(tt,{variant:"outline",size:"sm",onClick:x,children:v}),t[12]=v,t[13]=y):y=t[13];let N;t[14]!==n?(N=n("sandbox.variantCalendar.previous"),t[14]=n,t[15]=N):N=t[15];let A;t[16]===Symbol.for("react.memo_cache_sentinel")?(A=o.jsx(gt,{size:16}),t[16]=A):A=t[16];let _;t[17]!==E||t[18]!==N?(_=o.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]!==n?(k=n("sandbox.variantCalendar.next"),t[20]=n,t[21]=k):k=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsx(vt,{size:16}),t[22]=C):C=t[22];let $;t[23]!==d||t[24]!==k?($=o.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 R=ct[a.getMonth()];let M;t[26]!==a?(M=a.getFullYear(),t[26]=a,t[27]=M):M=t[27];let w;t[28]!==R||t[29]!==M?(w=o.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[R," ",M]}),t[28]=R,t[29]=M,t[30]=w):w=t[30];let j;t[31]!==$||t[32]!==w||t[33]!==y||t[34]!==_?(j=o.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 L;t[36]!==p||t[37]!==l||t[38]!==n?(L=p>0&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(jt,{id:"show-ongoing",checked:l,onCheckedChange:m}),o.jsx(yt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:n("sandbox.variantCalendar.showOngoing",{count:p})})]}),t[36]=p,t[37]=l,t[38]=n,t[39]=L):L=t[39];let B;t[40]===Symbol.for("react.memo_cache_sentinel")?(B=o.jsx(at,{}),t[40]=B):B=t[40];let I;t[41]!==n?(I=n("sandbox.variantCalendar.calendarMode"),t[41]=n,t[42]=I):I=t[42];let S;t[43]!==I?(S={value:"calendar",icon:B,label:I},t[43]=I,t[44]=S):S=t[44];let F;t[45]===Symbol.for("react.memo_cache_sentinel")?(F=o.jsx(bt,{}),t[45]=F):F=t[45];let D;t[46]!==n?(D=n("sandbox.variantCalendar.timelineMode"),t[46]=n,t[47]=D):D=t[47];let P;t[48]!==D?(P={value:"timeline",icon:F,label:D},t[48]=D,t[49]=P):P=t[49];let O;t[50]!==S||t[51]!==P?(O=[S,P],t[50]=S,t[51]=P,t[52]=O):O=t[52];let H;t[53]!==O||t[54]!==s?(H=o.jsx(Tt,{value:s,onValueChange:i,options:O}),t[53]=O,t[54]=s,t[55]=H):H=t[55];let z;t[56]!==L||t[57]!==H?(z=o.jsxs("div",{className:"flex items-center gap-4",children:[L,H]}),t[56]=L,t[57]=H,t[58]=z):z=t[58];let W;t[59]!==j||t[60]!==z?(W=o.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,z]}),t[59]=j,t[60]=z,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?o.jsx(Yt,{hiddenOngoing:l?0:p}):s==="calendar"?o.jsx(qt,{monthStart:a,variants:f,colorMap:g}):o.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 Q;return t[69]!==W||t[70]!==G?(Q=o.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=Q):Q=t[71],Q}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,n=r===void 0?0:r,s=X();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(at,{size:24,className:"text-muted-foreground/60"}),t[0]=i):i=t[0];let a;return t[1]!==n||t[2]!==s?(a=o.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,n>0?o.jsxs(o.Fragment,{children:[o.jsx("div",{children:s("sandbox.variantCalendar.noDatedVariants")}),o.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.hiddenOngoingVariants",{count:n})})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{children:s("sandbox.variantCalendar.noScheduledVariants")}),o.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=n,t[2]=s,t[3]=a):a=t[3],a}const et=20,it=2,st=28,Qt=6;function qt(e){const t=K.c(17),{monthStart:r,variants:n,colorMap:s}=e;let i,a,c,l,m;if(t[0]!==s||t[1]!==r||t[2]!==n){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=o.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,n),E=b.reduce(Jt,0),T=st+E*(et+it)+8;return o.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 o.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:o.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 o.jsxs(ft,{variant:d.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${A}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:Qt,height:et},children:[d.variant.blockLabel,d.variant.label!==d.variant.blockLabel&&o.jsxs("span",{className:"opacity-70",children:[" · ",d.variant.label]})]},`${x}-${v}`)})]},x)}),t[0]=s,t[1]=r,t[2]=n,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=o.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=o.jsx(i,{className:m,children:p}),t[13]=i,t[14]=m,t[15]=p,t[16]=h):h=t[16],h}function Jt(e,t){return Math.max(e,t.lane+1)}function Xt(e){return o.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:n,colorMap:s}=e,i=r,a=U(r,q),c=new Date,l=new Map;for(const w of n){const j=l.get(w.blockKey)??[];j.push(w),l.set(w.blockKey,j)}const m=Array.from(l.entries()).sort(ne),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=o.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?(_=o.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=o.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&&o.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:o.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,L]=w,B=dt(s,j),I=L[0]?.blockLabel??j;return o.jsxs("div",{children:[o.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:o.jsx("div",{className:"px-3 truncate",style:{width:Y},children:I})}),L.map((S,F)=>o.jsxs("div",{className:"flex border-b items-center",style:{height:Zt},children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:Y},children:[o.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:B.bg}}),o.jsx("span",{className:"truncate text-foreground/80",children:S.label})]}),o.jsxs("div",{className:"relative flex-1 h-full",children:[o.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()),P=Math.min(S.end.getTime(),a.getTime());if(P<=D)return null;const O=h(new Date(D)),H=h(new Date(P))-O;return o.jsx(ft,{variant:S,color:B,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${O}%`,width:`calc(${H}% - 2px)`,height:22},children:S.label})})()]})]},F))]},j)});let R;t[16]!==k||t[17]!==C||t[18]!==$?(R=o.jsxs("div",{className:T,children:[k,C,$]}),t[16]=k,t[17]=C,t[18]=$,t[19]=R):R=t[19];let M;return t[20]!==b||t[21]!==R?(M=o.jsx(b,{className:E,children:R}),t[20]=b,t[21]=R,t[22]=M):M=t[22],M}function ee(e,t){return o.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function re(e,t){return o.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 ne(e,t){return e[0].localeCompare(t[0])}export{Kn as VariantCalendar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,r as C,n as f,j as i,ab as k,a8 as I,a9 as P}from"./index-
|
|
1
|
+
import{c as $,r as C,n as f,j as i,ab as k,a8 as I,a9 as P}from"./index-DB-DucRE.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 n=M[_];let l;t[6]!==z?(l=f("relative flex gap-0 bg-muted rounded-lg",z),t[6]=z,t[7]=l):l=t[7];let a;t[8]!==n||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(n.buttonWithLabel,"px-3"):n.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",n.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]=n,t[9]=m,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=m?"h-12":n.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]!==l||t[25]!==a?(v=i.jsxs("div",{className:l,children:[a,u]}),t[23]=u,t[24]=l,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-DB-DucRE.js"></script>
|
|
54
54
|
<link rel="stylesheet" crossorigin href="/assets/index-CT0xBlIh.css">
|
|
55
55
|
</head>
|
|
56
56
|
<body>
|
package/dist/server/cli.js
CHANGED
|
@@ -1441,7 +1441,7 @@ Usage: deco services <up|down|status>`),process.exit(1)}}var Op1=L(()=>{xf()});f
|
|
|
1441
1441
|
`.execute($);if(Number(W.rows[0]?.cnt)===0){console.warn(`Failed to migrate ${J}/${K}, keeping in old table`);continue}}await Jy`
|
|
1442
1442
|
DELETE FROM kysely_migration WHERE name = ${X}
|
|
1443
1443
|
`.execute($)}}async function $a1($){await za8($),await Pa8($);let Z=new sr1({db:$,provider:{getMigrations:()=>Promise.resolve(Pp0)}}),{error:X,results:Q}=await Z.migrateToLatest(),Y=0;if(Q?.forEach((G)=>{if(G.status==="Success")Y++;else if(G.status==="Error")console.error(`Failed to execute migration "${G.migrationName}"`)}),X)throw console.error("Failed to migrate"),console.error(X),X;return Y}async function Aa8($){let{keepOpen:Z=!1,database:X,skipBetterAuth:Q=!1}=$??{},Y="skipped";if(!Q&&!X)Y=await Rl0();let G=X??Y8(),J=async()=>{if(!Z&&!X)await mB(G).catch((K)=>{console.warn("Warning: Error closing database:",K)})};try{let K=await $a1(G.db);return await J(),{betterAuth:Y,kysely:K}}catch(K){throw await J(),K}}async function Ta8(){let $=Y8(),Z=new sr1({db:$.db,provider:{getMigrations:()=>Promise.resolve(Pp0)}}),{error:X,results:Q}=await Z.migrateDown();if(Q?.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}"`)}),X)throw console.error("Failed to rollback migration"),console.error(X),X}var Xa1=L(()=>{ar1();Il0();XX()});async function X70($){let Z={...process.env},X=s$0($,Z);console.log(Dw1(X.settings.encryptionKey));let Q=X.settings.betterAuthSecret||(X.settings.localMode?in1(X.settings.dataDir):""),{ensureServices:Y}=await Promise.resolve().then(() => (FZ0(),HZ0)),{outputs:G,services:J}=await Y({home:X.settings.dataDir,externalDatabaseUrl:X.externalDatabaseUrl,externalNatsUrl:X.externalNatsUrl});if(!X.skipMigrations){let{migrateBetterAuth:W}=await Promise.resolve().then(() => (Il0(),nn1));await W(G.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (XX(),Hn1)),{migrateToLatest:F}=await Promise.resolve().then(() => (Xa1(),Za1)),N=H(G.databaseUrl);await F({keepOpen:!0,database:N,skipBetterAuth:!0})}let K={...X.settings,betterAuthSecret:Q,databaseUrl:G.databaseUrl,natsUrls:G.natsUrls,...G.s3?{s3Endpoint:G.s3.endpoint,s3Bucket:G.s3.bucket,s3AccessKeyId:G.s3.accessKeyId,s3SecretAccessKey:G.s3.secretAccessKey,s3ForcePathStyle:G.s3.forcePathStyle}:{}};return Lp1(K),{settings:K,services:J.map((W)=>({name:W.name==="PostgreSQL"?"Postgres":W.name,port:W.port})),managedServiceNames:J.filter((W)=>W.owner==="managed").map((W)=>W.name)}}var Ap0=L(()=>{xf();pn1();V$()});var Ja1={};Q0(Ja1,{updateService:()=>_E,subscribeCliState:()=>Ip0,setTuiConsoleIntercepted:()=>Q70,setServerUrl:()=>Wp,setMigrationsDone:()=>Kp,setDevMode:()=>Ia8,resetCliStateForTests:()=>Ra8,isTuiConsoleIntercepted:()=>Y70,getCliState:()=>Rp0,addLogEntry:()=>aB});function Qa1(){return[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}]}function Ya1(){return{services:Qa1(),migrationsStatus:"pending",serverUrl:null,logs:[]}}function Ra8(){lQ=Ya1()}function Jp(){for(let $ of Tp0)$()}function Rp0(){return lQ}function Ip0($){return Tp0.add($),()=>Tp0.delete($)}function _E($){lQ={...lQ,services:lQ.services.map((Z)=>Z.name===$.name?$:Z)},Jp()}function Kp(){lQ={...lQ,migrationsStatus:"done"},Jp()}function Wp($){lQ={...lQ,serverUrl:$},Jp()}function aB($){let Z=[...lQ.logs,$];lQ={...lQ,logs:Z.length>500?Z.slice(-500):Z},Jp()}function Ia8(){lQ={...lQ,services:[...Qa1(),{name:"API",status:"pending",port:0},{name:"Vite",status:"pending",port:0}]},Jp()}function Q70($){Ga1=$}function Y70(){return Ga1}var lQ,Tp0,Ga1=!1;var vE=L(()=>{lQ=Ya1();Tp0=new Set});import{createServer as Ka1}from"net";function qa8($){return new Promise((Z)=>{let X=Ka1();X.once("error",()=>Z(!1)),X.listen($,"0.0.0.0",()=>{X.close(()=>Z(!0))})})}async function Hp($){if(await qa8($))return $;let Z=await new Promise((X,Q)=>{let Y=Ka1();Y.once("error",Q),Y.listen(0,"0.0.0.0",()=>{let G=Y.address(),J=typeof G==="object"&&G?G.port:0;Y.close(()=>X(J))})});return console.warn(`Port ${$} is in use, using port ${Z} instead.`),Z}var qp0=()=>{};var Vp0={};Q0(Vp0,{startDevServer:()=>Va8,pipeToLogStore:()=>Mp0});import{join as Ma8}from"path";function Mp0($){let Z=$.getReader(),X=new TextDecoder,Q="";function Y(){let G=Q.split(`
|
|
1444
|
-
`);Q=G.pop()??"";for(let J of G){let K=Bun.stripANSI(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;aB({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{try{for(;;){let{done:G,value:J}=await Z.read();if(G)break;Q+=X.decode(J,{stream:!0}),Y()}}catch{}if(Q.trim()){let G=Bun.stripANSI(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)aB({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function Va8($){let{baseUrl:Z,noTui:X}=$,Q=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=Q?process.env.PORT:$.vitePort,G=Z||`http://localhost:${Y}`,J=Q?await Hp(Number(Y)+1):await Hp(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await X70({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let D of W)_E({name:D.name,status:"ready",port:D.port});Kp();let F=Ma8(import.meta.dir,"..","..","..","..",".."),N=X===!0,U=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:G,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",N?"inherit":"pipe",N?"inherit":"pipe"]});if(!N)Mp0(U.stdout),Mp0(U.stderr);Wp(G),_E({name:"Vite",status:"ready",port:Number(Y)}),_E({name:"API",status:"ready",port:Number(K.port)});let O=async(D)=>{if(U.kill(D),await U.exited,H.length>0){let{stopServices:w}=await Promise.resolve().then(() => (FZ0(),HZ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:U}}var kp0=L(()=>{Ap0();vE();qp0()});var G70;var Sp0=L(()=>{G70={name:"decocms",version:"4.278.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 Sa8,Text as Wa1}from"ink";import{jsx as Ca8,jsxs as Ha1}from"react/jsx-runtime";function Fa1({version:$}){return Ha1(Sa8,{flexDirection:"column",marginTop:1,children:[_Z0.map((Z,X)=>Ca8(Wa1,{color:vZ0[X],children:Z},X)),Ha1(Wa1,{dimColor:!0,children:[" v",$]})]})}var Na1=L(()=>{oi()});import{Box as xE,Text as sB}from"ink";import{Spinner as _a8}from"@inkjs/ui";import{jsx as eY,jsxs as Ky}from"react/jsx-runtime";function Ua1({status:$}){if($==="pending")return eY(_a8,{label:""});return eY(sB,{color:"green",children:"\u2713"})}function va8($){return`${$.name}: ${$.port||"...."}`}function Ba1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return Ky(xE,{flexDirection:"column",paddingBottom:1,children:[eY(Fa1,{version:G70.version}),eY(xE,{marginBottom:1,children:eY(sB,{dimColor:!0,children:"\u2500".repeat(80)})}),eY(xE,{children:Ky(sB,{dimColor:!0,children:["Home: ",X]})}),Ky(xE,{gap:2,children:[$.map((Y)=>Ky(xE,{gap:1,children:[eY(sB,{children:va8(Y)}),eY(Ua1,{status:Y.status})]},Y.name)),Ky(xE,{gap:1,children:[eY(sB,{children:"Migrations"}),eY(Ua1,{status:Z})]})]}),eY(xE,{children:Q?Ky(sB,{children:["Open in browser: ",eY(sB,{color:"cyan",children:Q})]}):eY(sB,{dimColor:!0,children:"Starting..."})})]})}var Oa1=L(()=>{Sp0();Na1()});import{Box as xa8,Text as Fp}from"ink";import{jsx as Cp0,jsxs as _p0}from"react/jsx-runtime";function fa8($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function La1({logs:$}){return Cp0(xa8,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return Cp0(Fp,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return _p0(Fp,{children:[_p0(Fp,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Cp0(Fp,{color:fa8(Z.status),children:Z.status}),_p0(Fp,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var Da1=()=>{};var vp0={};Q0(vp0,{App:()=>ga8});import{Box as ba8}from"ink";import{useSyncExternalStore as ya8}from"react";import{jsx as wa1,jsxs as ha8}from"react/jsx-runtime";function ga8({home:$}){let Z=ya8(Ip0,Rp0);return ha8(ba8,{flexDirection:"column",children:[wa1(Ba1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),wa1(La1,{logs:Z.logs})]})}var xp0=L(()=>{Oa1();Da1();vE()});var h3="thread-gate",JN="decopilot-hosted-harness",KN="decopilot-hosted-harness-sandboxed",OJ="automations",eB="background-tools",fE="task-board-github-reads",bE="jira-push";var Ea1="9";function ja1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:Ea1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var za1=()=>{};import ua8 from"pg";async function Aa1($,Z){let{databaseUrl:X,lockTimeoutMs:Q=ca8}=$,Y=$.log??((W)=>console.log(W)),G=new ua8.Client({connectionString:X});await G.connect();let J=Date.now(),K=!1;try{while(!K){if(K=(await G.query("SELECT pg_try_advisory_lock($1) AS locked",[Pa1.toString()])).rows[0]?.locked===!0,K)break;if(Date.now()-J>=Q)throw Error(`Timed out after ${Q}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await W$(la8)}let W=Date.now()-J;if(W>1000)Y(`[dbos] waited ${W}ms for the migration lock; another process migrated first`);return await Z()}finally{if(K)try{await G.query("SELECT pg_advisory_unlock($1)",[Pa1.toString()])}catch{}await G.end().catch(()=>{})}}var Pa1=8314027461559302n,ca8=600000,la8=500;var Ta1=L(()=>{J4()});function da8(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function fp0($,Z){for(let X=0;X<$.length;X++){let Q=$[X];if(Q===void 0)continue;if(Q===Z)return $[X+1];if(Q.startsWith(`${Z}=`))return Q.slice(Z.length+1)}return}function Ra1(){let $=da8();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:fp0($,"--cpu-prof-dir")??process.cwd(),name:fp0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(fp0($,"--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 Ia1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=VE();if(!X)return;let Q={};try{let{heapStats:Y}=await import("bun:jsc"),G=Y(),J=Object.entries(G.objectTypeCounts).sort((K,W)=>W[1]-K[1]).slice(0,20);Q={objectCount:G.objectCount,heapSize:G.heapSize,top:Object.fromEntries(J)}}catch{}console.log(JSON.stringify({msg:"heap-watch",ts:new Date().toISOString(),uptimeS:Math.round(process.uptime()),rss:X.rss,heapUsed:X.heapUsed,heapTotal:X.heapTotal,external:X.external,arrayBuffers:X.arrayBuffers,...Q}))};return Z().catch(()=>{}),J70=setInterval(()=>void Z().catch(()=>{}),$),J70.unref?.(),process.on("SIGUSR2",()=>{try{let X=Bun.generateHeapSnapshot("v8"),Q=typeof X==="string"?X:JSON.stringify(X),Y=`/tmp/heap-${process.pid}-${Date.now()}.heapsnapshot`;Bun.write(Y,Q),console.log(JSON.stringify({msg:"heap-snapshot-written",path:Y}))}catch(X){console.error("[heap-watch] snapshot failed:",X)}}),()=>{if(J70)clearInterval(J70)}}var J70;var qa1=()=>{};import*as ma8 from"bun:jsc";function Ma1(){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{ia8()}catch(G){return console.error("[stall-watchdog] failed to start sampling profiler:",G),()=>{}}let X,Q=performance.now()+Z,Y=()=>{let G=performance.now(),J=G-Q;Q=G+Z;let K=[];try{K=pa8()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let F of K){let N=F.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??F.frames[0];if(!N)continue;let U=(N.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${N.name??"?"} @ ${U}:${N.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((F,N)=>N[1]-F[1]).slice(0,8).map(([F,N])=>({frame:F,count:N}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(J),samplesInWindow:K.length,top:H}))}X=setTimeout(Y,Z),X.unref?.()};return X=setTimeout(Y,Z),X.unref?.(),()=>{if(X)clearTimeout(X)}}var ia8,pa8;var Va1=L(()=>{({startSamplingProfiler:ia8,samplingProfilerStackTraces:pa8}=ma8)});function ka1(){Ra1();let $=[Ia1(),Zn1(),Ma1()];return()=>{for(let Z of $)Z()}}var Sa1=L(()=>{Ll0();qa1();Va1()});var yE=v((Ca1)=>{Object.defineProperty(Ca1,"__esModule",{value:!0});Ca1.RepublishHeaders=Ca1.DirectMsgHeaders=Ca1.JsHeaders=Ca1.AdvisoryKind=void 0;Ca1.isOrderedPushConsumerOptions=na8;Ca1.isPullConsumer=ta8;Ca1.isPushConsumer=oa8;Ca1.isBoundPushConsumerOptions=ra8;function na8($){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 ta8($){return $.isPullConsumer()}function oa8($){return $.isPushConsumer()}function ra8($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}Ca1.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"};Ca1.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"};Ca1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};Ca1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var $G=v((va1)=>{Object.defineProperty(va1,"__esModule",{value:!0});va1.TD=va1.TE=va1.Empty=void 0;va1.encode=Gs8;va1.decode=Js8;va1.Empty=new Uint8Array(0);va1.TE=new TextEncoder;va1.TD=new TextDecoder;function Ys8(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}function Gs8(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(va1.TE.encode($[X]));if(Z.length===0)return va1.Empty;if(Z.length===1)return Z[0];return Ys8(...Z)}function Js8($){if(!$||$.length===0)return"";return va1.TD.decode($)}});var ZG=v((ba1)=>{Object.defineProperty(ba1,"__esModule",{value:!0});ba1.errors=ba1.PermissionViolationError=ba1.NoRespondersError=ba1.TimeoutError=ba1.RequestError=ba1.ProtocolError=ba1.ConnectionError=ba1.DrainingConnectionError=ba1.ClosedConnectionError=ba1.AuthorizationError=ba1.UserAuthenticationExpiredError=ba1.InvalidOperationError=ba1.InvalidArgumentError=ba1.InvalidSubjectError=void 0;class yp0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}ba1.InvalidSubjectError=yp0;class K70 extends Error{constructor($,Z){super($,Z);this.name="InvalidArgumentError"}static format($,Z,X){if(Array.isArray(Z)&&Z.length>1)Z=Z[0];if(Array.isArray($))$=$.map((Q)=>`'${Q}'`),$=$.join(",");else $=`'${$}'`;return new K70(`${$} ${Z}`,X)}}ba1.InvalidArgumentError=K70;class gp0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}ba1.InvalidOperationError=gp0;class W70 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new W70($);return null}}ba1.UserAuthenticationExpiredError=W70;class H70 extends Error{constructor($,Z){super($,Z);this.name="AuthorizationError"}static parse($){let Z=["authorization violation","account authentication expired","authentication timeout"],X=$.toLowerCase();for(let Q=0;Q<Z.length;Q++)if(X.indexOf(Z[Q])!==-1)return new H70($);return null}}ba1.AuthorizationError=H70;class hp0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}ba1.ClosedConnectionError=hp0;class up0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}ba1.DrainingConnectionError=up0;class cp0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}ba1.ConnectionError=cp0;class lp0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}ba1.ProtocolError=lp0;class dp0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof F70}}ba1.RequestError=dp0;class mp0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}ba1.TimeoutError=mp0;class F70 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}ba1.NoRespondersError=F70;class N70 extends Error{operation;subject;queue;constructor($,Z,X,Q,Y){super($,Y);this.name="PermissionViolationError",this.operation=Z,this.subject=X,this.queue=Q}static parse($){if(($?$.toLowerCase():"").indexOf("permissions violation")===-1)return null;let X="publish",Q="",Y=void 0,G=$.match(/(Publish|Subscription) to "(\S+)"/);if(G){if(X=G[1].toLowerCase(),Q=G[2],X==="subscription"){let J=$.match(/using queue "(\S+)"/);if(J)Y=J[1]}}return new N70($,X,Q,Y)}}ba1.PermissionViolationError=N70;ba1.errors={AuthorizationError:H70,ClosedConnectionError:hp0,ConnectionError:cp0,DrainingConnectionError:up0,InvalidArgumentError:K70,InvalidOperationError:gp0,InvalidSubjectError:yp0,NoRespondersError:F70,PermissionViolationError:N70,ProtocolError:lp0,RequestError:dp0,TimeoutError:mp0,UserAuthenticationExpiredError:W70}});var u3=v((ca1)=>{Object.defineProperty(ca1,"__esModule",{value:!0});ca1.SimpleMutex=ca1.Perf=void 0;ca1.extend=Ts8;ca1.render=Rs8;ca1.timeout=Is8;ca1.delay=qs8;ca1.deadline=Ms8;ca1.deferred=pp0;ca1.debugDeferred=Vs8;ca1.shuffle=ks8;ca1.collect=Ss8;ca1.jitter=ua1;ca1.backoff=Cs8;ca1.nanos=_s8;ca1.millis=vs8;ca1.randomToken=bs8;var As8=$G(),ip0=ZG();function Ts8($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function Rs8($){return As8.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function Is8($,Z=!0){let X=Z?new ip0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new ip0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function qs8($=0){let Z,X=new Promise((Q)=>{let Y=setTimeout(()=>{Q()},$);Z={cancel:()=>{if(Y)clearTimeout(Y),Q()}}});return Object.assign(X,Z)}async function Ms8($,Z=1000){let X=pp0(),Q=setTimeout(()=>{X.reject(new ip0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function pp0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function Vs8(){let $={},Z=new Promise((X,Q)=>{$={resolve:(Y)=>{console.trace("resolve",Y),X(Y)},reject:(Y)=>{console.trace("reject"),Q(Y)}}});return Object.assign(Z,$)}function ks8($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function Ss8($){let Z=[];for await(let X of $)Z.push(X);return Z}class ga1{timers;measures;constructor(){this.timers=new Map,this.measures=new Map}mark($){this.timers.set($,performance.now())}measure($,Z,X){let Q=this.timers.get(Z);if(Q===void 0)throw Error(`${Z} is not defined`);let Y=this.timers.get(X);if(Y===void 0)throw Error(`${X} is not defined`);this.measures.set($,Y-Q)}getEntries(){let $=[];return this.measures.forEach((Z,X)=>{$.push({name:X,duration:Z})}),$}}ca1.Perf=ga1;class ha1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=pp0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}ca1.SimpleMutex=ha1;function ua1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function Cs8($=[0,250,250,500,500,3000,5000]){if(!Array.isArray($))$=[0,250,250,500,500,3000,5000];let Z=$.length-1;return{backoff(X){return ua1(X>Z?$[Z]:$[X])}}}function _s8($){return $*1e6}function vs8($){return Math.floor($/1e6)}var xs8="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",WN=new Uint8Array(62);for(let $=0;$<62;$++)WN[$]=xs8.charCodeAt($);var fs8=218340105584896;function bs8(){let $=Math.floor(Math.random()*fs8),Z=$%62,X=WN[Z];$=($-Z)/62,Z=$%62;let Q=WN[Z];$=($-Z)/62,Z=$%62;let Y=WN[Z];$=($-Z)/62,Z=$%62;let G=WN[Z];$=($-Z)/62,Z=$%62;let J=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(X,Q,Y,G,J,K,W,H)}});var oa1=v((na1)=>{Object.defineProperty(na1,"__esModule",{value:!0});na1.nuid=na1.NuidImpl=void 0;var ss8="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",$O=62,B70=12,ia1=10,da1=33,es8=333,ma1=B70+ia1,tp0=new Uint8Array($O);for(let $=0;$<$O;$++)tp0[$]=ss8.charCodeAt($);var U70=4294967296,pa1=BigInt($O)**BigInt(ia1),Np=Number(pa1/(1n<<32n)),np0=Number(pa1%(1n<<32n));function $e8($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function Ze8($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else $e8($)}class op0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(ma1),this.cbuf=new Uint8Array(B70),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(Np+1)),this.seqLo=Math.floor(Math.random()*U70);while($++<8&&this.seqHi===Np&&this.seqLo>=np0);if(this.seqHi===Np&&this.seqLo>=np0)this.seqLo=0;this.inc=Math.random()*(es8-da1)+da1|0}setPre(){Ze8(this.cbuf);for(let $=0;$<B70;$++)this.buf[$]=tp0[this.cbuf[$]%$O]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=ma1-1;X>=B70;X--){let Q=Math.floor($/$O),G=($-Q*$O)*U70+Z,J=Math.floor(G/$O),K=G-J*$O;this.buf[X]=tp0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=U70)this.seqLo-=U70,this.seqHi+=1;if(this.seqHi>Np||this.seqHi===Np&&this.seqLo>=np0)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()}}na1.NuidImpl=op0;na1.nuid=new op0});var ea1=v((aa1)=>{Object.defineProperty(aa1,"__esModule",{value:!0});aa1.nuid=aa1.Nuid=void 0;var ra1=oa1();aa1.Nuid=ra1.NuidImpl;aa1.nuid=ra1.nuid});var L70=v((O70)=>{Object.defineProperty(O70,"__esModule",{value:!0});O70.nuid=O70.Nuid=void 0;var $s1=ea1();Object.defineProperty(O70,"Nuid",{enumerable:!0,get:function(){return $s1.Nuid}});Object.defineProperty(O70,"nuid",{enumerable:!0,get:function(){return $s1.nuid}})});var ZO=v((Zs1)=>{Object.defineProperty(Zs1,"__esModule",{value:!0});Zs1.DEFAULT_HOST=Zs1.DEFAULT_PORT=Zs1.Match=void 0;Zs1.syncIterator=Ke8;Zs1.createInbox=We8;var Ge8=L70(),Je8=ZG();Zs1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function Ke8($){let Z=$[Symbol.asyncIterator]();return{async next(){let X=await Z.next();if(X.done)return Promise.resolve(null);return Promise.resolve(X.value)}}}function We8($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw Je8.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${Ge8.nuid.next()}`}Zs1.DEFAULT_PORT=4222;Zs1.DEFAULT_HOST="127.0.0.1"});var Up=v((Gs1)=>{Object.defineProperty(Gs1,"__esModule",{value:!0});Gs1.DataBuffer=void 0;var Qs1=$G();class Ys1{buffers;byteLength;constructor(){this.buffers=[],this.byteLength=0}static concat(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}static fromAscii($){if(!$)$="";return Qs1.TE.encode($)}static toAscii($){return Qs1.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 X=0;X<this.buffers.length;X++)$.set(this.buffers[X],Z),Z+=this.buffers[X].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 X=this.byteLength;if($===void 0||$>X)$=X;let Q=Z.subarray(0,$);if(X>$)this.buffers.push(Z.subarray($));return this.byteLength=X-$,Q}}return new Uint8Array(0)}fill($,...Z){if($)this.buffers.push($),this.byteLength+=$.length;for(let X=0;X<Z.length;X++)if(Z[X]&&Z[X].length)this.buffers.push(Z[X]),this.byteLength+=Z[X].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}}Gs1.DataBuffer=Ys1});var gE=v((Ws1)=>{Object.defineProperty(Ws1,"__esModule",{value:!0});Ws1.LF=Ws1.CR=Ws1.CRLF=Ws1.CR_LF_LEN=Ws1.CR_LF=void 0;Ws1.setTransportFactory=De8;Ws1.defaultPort=we8;Ws1.getUrlParseFn=Ee8;Ws1.newTransport=je8;Ws1.getResolveFn=ze8;Ws1.protoLen=Ks1;Ws1.extractProtocolMessage=Pe8;var Be8=$G(),Oe8=ZO(),Le8=Up(),XG;function De8($){XG=$}function we8(){return XG!==void 0&&XG.defaultPort!==void 0?XG.defaultPort:Oe8.DEFAULT_PORT}function Ee8(){return XG!==void 0&&XG.urlParseFn?XG.urlParseFn:void 0}function je8(){if(!XG||typeof XG.factory!=="function")throw Error("transport fn is not set");return XG.factory()}function ze8(){return XG!==void 0&&XG.dnsResolveFn?XG.dnsResolveFn:void 0}Ws1.CR_LF=`\r
|
|
1444
|
+
`);Q=G.pop()??"";for(let J of G){let K=Bun.stripANSI(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;aB({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{try{for(;;){let{done:G,value:J}=await Z.read();if(G)break;Q+=X.decode(J,{stream:!0}),Y()}}catch{}if(Q.trim()){let G=Bun.stripANSI(Q).replace(/^\[\d+\]\s*/,"").trim();if(G)aB({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function Va8($){let{baseUrl:Z,noTui:X}=$,Q=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=Q?process.env.PORT:$.vitePort,G=Z||`http://localhost:${Y}`,J=Q?await Hp(Number(Y)+1):await Hp(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await X70({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let D of W)_E({name:D.name,status:"ready",port:D.port});Kp();let F=Ma8(import.meta.dir,"..","..","..","..",".."),N=X===!0,U=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:G,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",N?"inherit":"pipe",N?"inherit":"pipe"]});if(!N)Mp0(U.stdout),Mp0(U.stderr);Wp(G),_E({name:"Vite",status:"ready",port:Number(Y)}),_E({name:"API",status:"ready",port:Number(K.port)});let O=async(D)=>{if(U.kill(D),await U.exited,H.length>0){let{stopServices:w}=await Promise.resolve().then(() => (FZ0(),HZ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:U}}var kp0=L(()=>{Ap0();vE();qp0()});var G70;var Sp0=L(()=>{G70={name:"decocms",version:"4.278.3",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 Sa8,Text as Wa1}from"ink";import{jsx as Ca8,jsxs as Ha1}from"react/jsx-runtime";function Fa1({version:$}){return Ha1(Sa8,{flexDirection:"column",marginTop:1,children:[_Z0.map((Z,X)=>Ca8(Wa1,{color:vZ0[X],children:Z},X)),Ha1(Wa1,{dimColor:!0,children:[" v",$]})]})}var Na1=L(()=>{oi()});import{Box as xE,Text as sB}from"ink";import{Spinner as _a8}from"@inkjs/ui";import{jsx as eY,jsxs as Ky}from"react/jsx-runtime";function Ua1({status:$}){if($==="pending")return eY(_a8,{label:""});return eY(sB,{color:"green",children:"\u2713"})}function va8($){return`${$.name}: ${$.port||"...."}`}function Ba1({services:$,migrationsStatus:Z,home:X,serverUrl:Q}){return Ky(xE,{flexDirection:"column",paddingBottom:1,children:[eY(Fa1,{version:G70.version}),eY(xE,{marginBottom:1,children:eY(sB,{dimColor:!0,children:"\u2500".repeat(80)})}),eY(xE,{children:Ky(sB,{dimColor:!0,children:["Home: ",X]})}),Ky(xE,{gap:2,children:[$.map((Y)=>Ky(xE,{gap:1,children:[eY(sB,{children:va8(Y)}),eY(Ua1,{status:Y.status})]},Y.name)),Ky(xE,{gap:1,children:[eY(sB,{children:"Migrations"}),eY(Ua1,{status:Z})]})]}),eY(xE,{children:Q?Ky(sB,{children:["Open in browser: ",eY(sB,{color:"cyan",children:Q})]}):eY(sB,{dimColor:!0,children:"Starting..."})})]})}var Oa1=L(()=>{Sp0();Na1()});import{Box as xa8,Text as Fp}from"ink";import{jsx as Cp0,jsxs as _p0}from"react/jsx-runtime";function fa8($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function La1({logs:$}){return Cp0(xa8,{flexDirection:"column",children:$.map((Z,X)=>{if(Z.rawLine)return Cp0(Fp,{dimColor:!0,children:Z.rawLine},X);let Q=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return _p0(Fp,{children:[_p0(Fp,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Cp0(Fp,{color:fa8(Z.status),children:Z.status}),_p0(Fp,{dimColor:!0,children:[" ",Q.padStart(8)]})]},X)})})}var Da1=()=>{};var vp0={};Q0(vp0,{App:()=>ga8});import{Box as ba8}from"ink";import{useSyncExternalStore as ya8}from"react";import{jsx as wa1,jsxs as ha8}from"react/jsx-runtime";function ga8({home:$}){let Z=ya8(Ip0,Rp0);return ha8(ba8,{flexDirection:"column",children:[wa1(Ba1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),wa1(La1,{logs:Z.logs})]})}var xp0=L(()=>{Oa1();Da1();vE()});var h3="thread-gate",JN="decopilot-hosted-harness",KN="decopilot-hosted-harness-sandboxed",OJ="automations",eB="background-tools",fE="task-board-github-reads",bE="jira-push";var Ea1="9";function ja1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:Ea1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var za1=()=>{};import ua8 from"pg";async function Aa1($,Z){let{databaseUrl:X,lockTimeoutMs:Q=ca8}=$,Y=$.log??((W)=>console.log(W)),G=new ua8.Client({connectionString:X});await G.connect();let J=Date.now(),K=!1;try{while(!K){if(K=(await G.query("SELECT pg_try_advisory_lock($1) AS locked",[Pa1.toString()])).rows[0]?.locked===!0,K)break;if(Date.now()-J>=Q)throw Error(`Timed out after ${Q}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await W$(la8)}let W=Date.now()-J;if(W>1000)Y(`[dbos] waited ${W}ms for the migration lock; another process migrated first`);return await Z()}finally{if(K)try{await G.query("SELECT pg_advisory_unlock($1)",[Pa1.toString()])}catch{}await G.end().catch(()=>{})}}var Pa1=8314027461559302n,ca8=600000,la8=500;var Ta1=L(()=>{J4()});function da8(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function fp0($,Z){for(let X=0;X<$.length;X++){let Q=$[X];if(Q===void 0)continue;if(Q===Z)return $[X+1];if(Q.startsWith(`${Z}=`))return Q.slice(Z.length+1)}return}function Ra1(){let $=da8();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:fp0($,"--cpu-prof-dir")??process.cwd(),name:fp0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(fp0($,"--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 Ia1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let X=VE();if(!X)return;let Q={};try{let{heapStats:Y}=await import("bun:jsc"),G=Y(),J=Object.entries(G.objectTypeCounts).sort((K,W)=>W[1]-K[1]).slice(0,20);Q={objectCount:G.objectCount,heapSize:G.heapSize,top:Object.fromEntries(J)}}catch{}console.log(JSON.stringify({msg:"heap-watch",ts:new Date().toISOString(),uptimeS:Math.round(process.uptime()),rss:X.rss,heapUsed:X.heapUsed,heapTotal:X.heapTotal,external:X.external,arrayBuffers:X.arrayBuffers,...Q}))};return Z().catch(()=>{}),J70=setInterval(()=>void Z().catch(()=>{}),$),J70.unref?.(),process.on("SIGUSR2",()=>{try{let X=Bun.generateHeapSnapshot("v8"),Q=typeof X==="string"?X:JSON.stringify(X),Y=`/tmp/heap-${process.pid}-${Date.now()}.heapsnapshot`;Bun.write(Y,Q),console.log(JSON.stringify({msg:"heap-snapshot-written",path:Y}))}catch(X){console.error("[heap-watch] snapshot failed:",X)}}),()=>{if(J70)clearInterval(J70)}}var J70;var qa1=()=>{};import*as ma8 from"bun:jsc";function Ma1(){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{ia8()}catch(G){return console.error("[stall-watchdog] failed to start sampling profiler:",G),()=>{}}let X,Q=performance.now()+Z,Y=()=>{let G=performance.now(),J=G-Q;Q=G+Z;let K=[];try{K=pa8()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let F of K){let N=F.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??F.frames[0];if(!N)continue;let U=(N.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${N.name??"?"} @ ${U}:${N.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((F,N)=>N[1]-F[1]).slice(0,8).map(([F,N])=>({frame:F,count:N}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(J),samplesInWindow:K.length,top:H}))}X=setTimeout(Y,Z),X.unref?.()};return X=setTimeout(Y,Z),X.unref?.(),()=>{if(X)clearTimeout(X)}}var ia8,pa8;var Va1=L(()=>{({startSamplingProfiler:ia8,samplingProfilerStackTraces:pa8}=ma8)});function ka1(){Ra1();let $=[Ia1(),Zn1(),Ma1()];return()=>{for(let Z of $)Z()}}var Sa1=L(()=>{Ll0();qa1();Va1()});var yE=v((Ca1)=>{Object.defineProperty(Ca1,"__esModule",{value:!0});Ca1.RepublishHeaders=Ca1.DirectMsgHeaders=Ca1.JsHeaders=Ca1.AdvisoryKind=void 0;Ca1.isOrderedPushConsumerOptions=na8;Ca1.isPullConsumer=ta8;Ca1.isPushConsumer=oa8;Ca1.isBoundPushConsumerOptions=ra8;function na8($){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 ta8($){return $.isPullConsumer()}function oa8($){return $.isPushConsumer()}function ra8($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}Ca1.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"};Ca1.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"};Ca1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};Ca1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var $G=v((va1)=>{Object.defineProperty(va1,"__esModule",{value:!0});va1.TD=va1.TE=va1.Empty=void 0;va1.encode=Gs8;va1.decode=Js8;va1.Empty=new Uint8Array(0);va1.TE=new TextEncoder;va1.TD=new TextDecoder;function Ys8(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}function Gs8(...$){let Z=[];for(let X=0;X<$.length;X++)Z.push(va1.TE.encode($[X]));if(Z.length===0)return va1.Empty;if(Z.length===1)return Z[0];return Ys8(...Z)}function Js8($){if(!$||$.length===0)return"";return va1.TD.decode($)}});var ZG=v((ba1)=>{Object.defineProperty(ba1,"__esModule",{value:!0});ba1.errors=ba1.PermissionViolationError=ba1.NoRespondersError=ba1.TimeoutError=ba1.RequestError=ba1.ProtocolError=ba1.ConnectionError=ba1.DrainingConnectionError=ba1.ClosedConnectionError=ba1.AuthorizationError=ba1.UserAuthenticationExpiredError=ba1.InvalidOperationError=ba1.InvalidArgumentError=ba1.InvalidSubjectError=void 0;class yp0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}ba1.InvalidSubjectError=yp0;class K70 extends Error{constructor($,Z){super($,Z);this.name="InvalidArgumentError"}static format($,Z,X){if(Array.isArray(Z)&&Z.length>1)Z=Z[0];if(Array.isArray($))$=$.map((Q)=>`'${Q}'`),$=$.join(",");else $=`'${$}'`;return new K70(`${$} ${Z}`,X)}}ba1.InvalidArgumentError=K70;class gp0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}ba1.InvalidOperationError=gp0;class W70 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new W70($);return null}}ba1.UserAuthenticationExpiredError=W70;class H70 extends Error{constructor($,Z){super($,Z);this.name="AuthorizationError"}static parse($){let Z=["authorization violation","account authentication expired","authentication timeout"],X=$.toLowerCase();for(let Q=0;Q<Z.length;Q++)if(X.indexOf(Z[Q])!==-1)return new H70($);return null}}ba1.AuthorizationError=H70;class hp0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}ba1.ClosedConnectionError=hp0;class up0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}ba1.DrainingConnectionError=up0;class cp0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}ba1.ConnectionError=cp0;class lp0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}ba1.ProtocolError=lp0;class dp0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof F70}}ba1.RequestError=dp0;class mp0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}ba1.TimeoutError=mp0;class F70 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}ba1.NoRespondersError=F70;class N70 extends Error{operation;subject;queue;constructor($,Z,X,Q,Y){super($,Y);this.name="PermissionViolationError",this.operation=Z,this.subject=X,this.queue=Q}static parse($){if(($?$.toLowerCase():"").indexOf("permissions violation")===-1)return null;let X="publish",Q="",Y=void 0,G=$.match(/(Publish|Subscription) to "(\S+)"/);if(G){if(X=G[1].toLowerCase(),Q=G[2],X==="subscription"){let J=$.match(/using queue "(\S+)"/);if(J)Y=J[1]}}return new N70($,X,Q,Y)}}ba1.PermissionViolationError=N70;ba1.errors={AuthorizationError:H70,ClosedConnectionError:hp0,ConnectionError:cp0,DrainingConnectionError:up0,InvalidArgumentError:K70,InvalidOperationError:gp0,InvalidSubjectError:yp0,NoRespondersError:F70,PermissionViolationError:N70,ProtocolError:lp0,RequestError:dp0,TimeoutError:mp0,UserAuthenticationExpiredError:W70}});var u3=v((ca1)=>{Object.defineProperty(ca1,"__esModule",{value:!0});ca1.SimpleMutex=ca1.Perf=void 0;ca1.extend=Ts8;ca1.render=Rs8;ca1.timeout=Is8;ca1.delay=qs8;ca1.deadline=Ms8;ca1.deferred=pp0;ca1.debugDeferred=Vs8;ca1.shuffle=ks8;ca1.collect=Ss8;ca1.jitter=ua1;ca1.backoff=Cs8;ca1.nanos=_s8;ca1.millis=vs8;ca1.randomToken=bs8;var As8=$G(),ip0=ZG();function Ts8($,...Z){for(let X=0;X<Z.length;X++){let Q=Z[X];Object.keys(Q).forEach(function(Y){$[Y]=Q[Y]})}return $}function Rs8($){return As8.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function Is8($,Z=!0){let X=Z?new ip0.TimeoutError:null,Q,Y,G=new Promise((J,K)=>{Q={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(X===null)K(new ip0.TimeoutError);else K(X)},$)});return Object.assign(G,Q)}function qs8($=0){let Z,X=new Promise((Q)=>{let Y=setTimeout(()=>{Q()},$);Z={cancel:()=>{if(Y)clearTimeout(Y),Q()}}});return Object.assign(X,Z)}async function Ms8($,Z=1000){let X=pp0(),Q=setTimeout(()=>{X.reject(new ip0.TimeoutError)},Z);try{return await Promise.race([$,X])}finally{clearTimeout(Q)}}function pp0(){let $={},Z=new Promise((X,Q)=>{$={resolve:X,reject:Q}});return Object.assign(Z,$)}function Vs8(){let $={},Z=new Promise((X,Q)=>{$={resolve:(Y)=>{console.trace("resolve",Y),X(Y)},reject:(Y)=>{console.trace("reject"),Q(Y)}}});return Object.assign(Z,$)}function ks8($){for(let Z=$.length-1;Z>0;Z--){let X=Math.floor(Math.random()*(Z+1));[$[Z],$[X]]=[$[X],$[Z]]}return $}async function Ss8($){let Z=[];for await(let X of $)Z.push(X);return Z}class ga1{timers;measures;constructor(){this.timers=new Map,this.measures=new Map}mark($){this.timers.set($,performance.now())}measure($,Z,X){let Q=this.timers.get(Z);if(Q===void 0)throw Error(`${Z} is not defined`);let Y=this.timers.get(X);if(Y===void 0)throw Error(`${X} is not defined`);this.measures.set($,Y-Q)}getEntries(){let $=[];return this.measures.forEach((Z,X)=>{$.push({name:X,duration:Z})}),$}}ca1.Perf=ga1;class ha1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=pp0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}ca1.SimpleMutex=ha1;function ua1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function Cs8($=[0,250,250,500,500,3000,5000]){if(!Array.isArray($))$=[0,250,250,500,500,3000,5000];let Z=$.length-1;return{backoff(X){return ua1(X>Z?$[Z]:$[X])}}}function _s8($){return $*1e6}function vs8($){return Math.floor($/1e6)}var xs8="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",WN=new Uint8Array(62);for(let $=0;$<62;$++)WN[$]=xs8.charCodeAt($);var fs8=218340105584896;function bs8(){let $=Math.floor(Math.random()*fs8),Z=$%62,X=WN[Z];$=($-Z)/62,Z=$%62;let Q=WN[Z];$=($-Z)/62,Z=$%62;let Y=WN[Z];$=($-Z)/62,Z=$%62;let G=WN[Z];$=($-Z)/62,Z=$%62;let J=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(X,Q,Y,G,J,K,W,H)}});var oa1=v((na1)=>{Object.defineProperty(na1,"__esModule",{value:!0});na1.nuid=na1.NuidImpl=void 0;var ss8="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",$O=62,B70=12,ia1=10,da1=33,es8=333,ma1=B70+ia1,tp0=new Uint8Array($O);for(let $=0;$<$O;$++)tp0[$]=ss8.charCodeAt($);var U70=4294967296,pa1=BigInt($O)**BigInt(ia1),Np=Number(pa1/(1n<<32n)),np0=Number(pa1%(1n<<32n));function $e8($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function Ze8($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else $e8($)}class op0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(ma1),this.cbuf=new Uint8Array(B70),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(Np+1)),this.seqLo=Math.floor(Math.random()*U70);while($++<8&&this.seqHi===Np&&this.seqLo>=np0);if(this.seqHi===Np&&this.seqLo>=np0)this.seqLo=0;this.inc=Math.random()*(es8-da1)+da1|0}setPre(){Ze8(this.cbuf);for(let $=0;$<B70;$++)this.buf[$]=tp0[this.cbuf[$]%$O]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let X=ma1-1;X>=B70;X--){let Q=Math.floor($/$O),G=($-Q*$O)*U70+Z,J=Math.floor(G/$O),K=G-J*$O;this.buf[X]=tp0[K],$=Q,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=U70)this.seqLo-=U70,this.seqHi+=1;if(this.seqHi>Np||this.seqHi===Np&&this.seqLo>=np0)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()}}na1.NuidImpl=op0;na1.nuid=new op0});var ea1=v((aa1)=>{Object.defineProperty(aa1,"__esModule",{value:!0});aa1.nuid=aa1.Nuid=void 0;var ra1=oa1();aa1.Nuid=ra1.NuidImpl;aa1.nuid=ra1.nuid});var L70=v((O70)=>{Object.defineProperty(O70,"__esModule",{value:!0});O70.nuid=O70.Nuid=void 0;var $s1=ea1();Object.defineProperty(O70,"Nuid",{enumerable:!0,get:function(){return $s1.Nuid}});Object.defineProperty(O70,"nuid",{enumerable:!0,get:function(){return $s1.nuid}})});var ZO=v((Zs1)=>{Object.defineProperty(Zs1,"__esModule",{value:!0});Zs1.DEFAULT_HOST=Zs1.DEFAULT_PORT=Zs1.Match=void 0;Zs1.syncIterator=Ke8;Zs1.createInbox=We8;var Ge8=L70(),Je8=ZG();Zs1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function Ke8($){let Z=$[Symbol.asyncIterator]();return{async next(){let X=await Z.next();if(X.done)return Promise.resolve(null);return Promise.resolve(X.value)}}}function We8($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw Je8.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${Ge8.nuid.next()}`}Zs1.DEFAULT_PORT=4222;Zs1.DEFAULT_HOST="127.0.0.1"});var Up=v((Gs1)=>{Object.defineProperty(Gs1,"__esModule",{value:!0});Gs1.DataBuffer=void 0;var Qs1=$G();class Ys1{buffers;byteLength;constructor(){this.buffers=[],this.byteLength=0}static concat(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let X=new Uint8Array(Z),Q=0;for(let Y=0;Y<$.length;Y++)X.set($[Y],Q),Q+=$[Y].length;return X}static fromAscii($){if(!$)$="";return Qs1.TE.encode($)}static toAscii($){return Qs1.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 X=0;X<this.buffers.length;X++)$.set(this.buffers[X],Z),Z+=this.buffers[X].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 X=this.byteLength;if($===void 0||$>X)$=X;let Q=Z.subarray(0,$);if(X>$)this.buffers.push(Z.subarray($));return this.byteLength=X-$,Q}}return new Uint8Array(0)}fill($,...Z){if($)this.buffers.push($),this.byteLength+=$.length;for(let X=0;X<Z.length;X++)if(Z[X]&&Z[X].length)this.buffers.push(Z[X]),this.byteLength+=Z[X].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}}Gs1.DataBuffer=Ys1});var gE=v((Ws1)=>{Object.defineProperty(Ws1,"__esModule",{value:!0});Ws1.LF=Ws1.CR=Ws1.CRLF=Ws1.CR_LF_LEN=Ws1.CR_LF=void 0;Ws1.setTransportFactory=De8;Ws1.defaultPort=we8;Ws1.getUrlParseFn=Ee8;Ws1.newTransport=je8;Ws1.getResolveFn=ze8;Ws1.protoLen=Ks1;Ws1.extractProtocolMessage=Pe8;var Be8=$G(),Oe8=ZO(),Le8=Up(),XG;function De8($){XG=$}function we8(){return XG!==void 0&&XG.defaultPort!==void 0?XG.defaultPort:Oe8.DEFAULT_PORT}function Ee8(){return XG!==void 0&&XG.urlParseFn?XG.urlParseFn:void 0}function je8(){if(!XG||typeof XG.factory!=="function")throw Error("transport fn is not set");return XG.factory()}function ze8(){return XG!==void 0&&XG.dnsResolveFn?XG.dnsResolveFn:void 0}Ws1.CR_LF=`\r
|
|
1445
1445
|
`;Ws1.CR_LF_LEN=Ws1.CR_LF.length;Ws1.CRLF=Le8.DataBuffer.fromAscii(Ws1.CR_LF);Ws1.CR=new Uint8Array(Ws1.CRLF)[0];Ws1.LF=new Uint8Array(Ws1.CRLF)[1];function Ks1($){for(let Z=0;Z<$.length;Z++){let X=Z+1;if($.byteLength>X&&$[Z]===Ws1.CR&&$[X]===Ws1.LF)return X+1}return 0}function Pe8($){let Z=Ks1($);if(Z>0){let Q=new Uint8Array($).slice(0,Z);return Be8.TD.decode(Q)}return""}});var $n0=v((Ds1)=>{Object.defineProperty(Ds1,"__esModule",{value:!0});Ds1.ipV4=Bs1;Ds1.isIP=_e8;Ds1.parseIP=Os1;var Bp=4,hE=16,D70=48,Us1=57,Fs1=65,Se8=70,Ns1=97,Ce8=102,ep0=16777215;function Bs1($,Z,X,Q){let Y=new Uint8Array(hE);return[0,0,0,0,0,0,0,0,0,0,255,255].forEach((J,K)=>{Y[K]=J}),Y[12]=$,Y[13]=Z,Y[14]=X,Y[15]=Q,Y}function _e8($){return Os1($)!==void 0}function Os1($){for(let Z=0;Z<$.length;Z++)switch($[Z]){case".":return Ls1($);case":":return ve8($)}return}function Ls1($){let Z=new Uint8Array(Bp);for(let X=0;X<Bp;X++){if($.length===0)return;if(X>0){if($[0]!==".")return;$=$.substring(1)}let{n:Q,c:Y,ok:G}=xe8($);if(!G||Q>255)return;$=$.substring(Y),Z[X]=Q}return Bs1(Z[0],Z[1],Z[2],Z[3])}function ve8($){let Z=new Uint8Array(hE),X=-1;if($.length>=2&&$[0]===":"&&$[1]===":"){if(X=0,$=$.substring(2),$.length===0)return Z}let Q=0;while(Q<hE){let{n:Y,c:G,ok:J}=fe8($);if(!J||Y>65535)return;if(G<$.length&&$[G]==="."){if(X<0&&Q!=hE-Bp)return;if(Q+Bp>hE)return;let K=Ls1($);if(K===void 0)return;Z[Q]=K[12],Z[Q+1]=K[13],Z[Q+2]=K[14],Z[Q+3]=K[15],$="",Q+=Bp;break}if(Z[Q]=Y>>8,Z[Q+1]=Y,Q+=2,$=$.substring(G),$.length===0)break;if($[0]!==":"||$.length==1)return;if($=$.substring(1),$[0]===":"){if(X>=0)return;if(X=Q,$=$.substring(1),$.length===0)break}}if($.length!==0)return;if(Q<hE){if(X<0)return;let Y=hE-Q;for(let G=Q-1;G>=X;G--)Z[G+Y]=Z[G];for(let G=X+Y-1;G>=X;G--)Z[G]=0}else if(X>=0)return;return Z}function xe8($){let Z=0,X=0;for(Z=0;Z<$.length&&D70<=$.charCodeAt(Z)&&$.charCodeAt(Z)<=Us1;Z++)if(X=X*10+($.charCodeAt(Z)-D70),X>=ep0)return{n:ep0,c:Z,ok:!1};if(Z===0)return{n:0,c:0,ok:!1};return{n:X,c:Z,ok:!0}}function fe8($){let Z=0,X=0;for(X=0;X<$.length;X++){if(D70<=$.charCodeAt(X)&&$.charCodeAt(X)<=Us1)Z*=16,Z+=$.charCodeAt(X)-D70;else if(Ns1<=$.charCodeAt(X)&&$.charCodeAt(X)<=Ce8)Z*=16,Z+=$.charCodeAt(X)-Ns1+10;else if(Fs1<=$.charCodeAt(X)&&$.charCodeAt(X)<=Se8)Z*=16,Z+=$.charCodeAt(X)-Fs1+10;else break;if(Z>=ep0)return{n:0,c:X,ok:!1}}if(X===0)return{n:0,c:X,ok:!1};return{n:Z,c:X,ok:!0}}});var Jn0=v((Es1)=>{Object.defineProperty(Es1,"__esModule",{value:!0});Es1.Servers=Es1.ServerImpl=void 0;Es1.isIPV4OrHostname=ws1;Es1.hostPort=Gn0;var Zn0=gE(),Xn0=u3(),Qn0=$n0(),he8=ZO(),ue8=ZG();function ws1($){if($.indexOf("[")!==-1||$.indexOf("::")!==-1)return!1;if($.indexOf(".")!==-1)return!0;if($.split(":").length<=2)return!0;return!1}function Yn0($){return!ws1($)}function ce8($){let X=$.toUpperCase().indexOf("::FFFF:");if(X!==-1&&$.indexOf(".")!==-1){let Q=$.substring(X+7);return Q=Q.replace("[",""),Q.replace("]","")}return $}function Gn0($){if($=$.trim(),$.match(/^(.*:\/\/)(.*)/m))$=$.replace(/^(.*:\/\/)(.*)/gm,"$2");if($=ce8($),Yn0($)&&$.indexOf("[")===-1)$=`[${$}]`;let Z=Yn0($)?$.match(/(]:)(\d+)/):$.match(/(:)(\d+)/),X=Z&&Z.length===3&&Z[1]&&Z[2]?parseInt(Z[2]):he8.DEFAULT_PORT,Y=new URL(`${X===80?"https":"http"}://${$}`);Y.port=`${X}`;let G=Y.hostname;if(G.charAt(0)==="[")G=G.substring(1,G.length-1);return{listen:Y.host,hostname:G,port:X}}class Wy{src;listen;hostname;port;didConnect;reconnects;lastConnect;gossiped;tlsName;resolves;constructor($,Z=!1){this.src=$,this.tlsName="";let X=Gn0($);this.listen=X.listen,this.hostname=X.hostname,this.port=X.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,Qn0.isIP)(this.hostname))return[this];else{let X=await $.fn(this.hostname);if($.debug)console.log(`resolve ${this.hostname} = ${X.join(",")}`);for(let Q of X){let Y=this.port===80?"https":"http",G=new URL(`${Y}://${Yn0(Q)?"["+Q+"]":Q}`);G.port=`${this.port}`;let J=new Wy(G.host,!1);J.tlsName=this.hostname,Z.push(J)}}if($.randomize)(0,Xn0.shuffle)(Z);return this.resolves=Z,Z}}Es1.ServerImpl=Wy;class w70{firstSelect;servers;currentServer;tlsName;randomize;constructor($={}){this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=$.randomize||!1}setServers($){if(!Array.isArray($)||$.length===0)throw ue8.InvalidArgumentError.format("servers","cannot be empty");let Z=(0,Zn0.getUrlParseFn)(),X=new Map;for(let Y of this.servers)X.set(Y.listen,Y);let Q=[];for(let Y of $){Y=Z?Z(Y):Y;let{listen:G}=Gn0(Y),J=X.get(G);if(J)J.gossiped=!1,Q.push(J);else Q.push(new Wy(Y))}if(this.randomize)(0,Xn0.shuffle)(Q);if(this.servers=Q,this.currentServer===void 0||!Q.includes(this.currentServer))this.currentServer=Q[0],this.firstSelect=!0}clear(){this.servers.length=0}updateTLSName(){let $=this.getCurrentServer();if(!(0,Qn0.isIP)($.hostname))this.tlsName=$.hostname,this.servers.forEach((Z)=>{if(Z.gossiped)Z.tlsName=this.tlsName})}getCurrentServer(){return this.currentServer}addServer($,Z=!1){let X=(0,Zn0.getUrlParseFn)();$=X?X($):$;let Q=new Wy($,Z);if((0,Qn0.isIP)(Q.hostname))Q.tlsName=this.tlsName;this.servers.push(Q)}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 w70.freezeAll(this.servers)}snapshotForHandler(){let $=this.currentServer;if(!$)return this.snapshot();let Z=this.servers.indexOf($);if(Z<=0)return this.snapshot();return w70.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 X=[],Q=[],Y=(0,Zn0.getUrlParseFn)(),G=new Map;if($.connect_urls&&$.connect_urls.length>0)$.connect_urls.forEach((K)=>{K=Y?Y(K,Z):K;let W=new Wy(K,!0);G.set(K,W)});let J=[];if(this.servers.forEach((K,W)=>{let H=K.listen;if(K.gossiped&&this.currentServer.listen!==H&&G.get(H)===void 0)J.push(W);G.delete(H)}),J.reverse(),J.forEach((K)=>{let W=this.servers.splice(K,1);Q=Q.concat(W[0].listen)}),G.forEach((K,W)=>{this.servers.push(K),X.push(W)}),this.randomize&&X.length>0){let K=this.currentServer,W=this.servers.filter((H)=>H!==K);(0,Xn0.shuffle)(W),this.servers=K?[K,...W]:W}return{added:X,deleted:Q}}}Es1.Servers=w70});var E70=v((As1)=>{Object.defineProperty(As1,"__esModule",{value:!0});As1.QueuedIteratorImpl=void 0;var Kn0=u3(),zs1=ZG();class Ps1{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,Kn0.deferred)(),this.yields=[],this.iterClosed=(0,Kn0.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(X){}}return}if(typeof $==="function")this.pendingFiltered++;this.yields.push($),this.signal.resolve()}async*iterate(){if(this.noIterator)throw new zs1.InvalidOperationError("iterator cannot be used when a callback is registered");if(this.yielding)throw new zs1.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 Q=$[Z];try{Q()}catch(Y){throw Y}if(this.err)throw this.err;continue}this.processed++,this.inflight--;let X=this.profile?Date.now():0;yield $[Z],this.time=this.profile?Date.now()-X:0}if(this.done)break;else if(this.yields.length===0)$.length=0,this.yields=$,this.signal=(0,Kn0.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}}As1.QueuedIteratorImpl=Ps1});var Wn0=v((qs1)=>{Object.defineProperty(qs1,"__esModule",{value:!0});qs1.MuxSubscription=void 0;var ie8=ZO(),Rs1=ZG();class Is1{baseInbox;reqs;constructor(){this.reqs=new Map}size(){return this.reqs.size}init($){return this.baseInbox=`${(0,ie8.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((X)=>{X.resolver(Z,{})}),!0;if(Z.operation==="publish"){let X=this.all().find((Q)=>{return Q.requestSubject===Z.subject});if(X)return X.resolver(Z,{}),!0}return!1}dispatcher(){return($,Z)=>{let X=this.getToken(Z);if(X){let Q=this.get(X);if(Q){if($===null)$=Z?.data?.length===0&&Z.headers?.code===503?new Rs1.NoRespondersError(Q.requestSubject):null;Q.resolver($,Z)}}}}close(){let $=new Rs1.RequestError("connection closed");this.reqs.forEach((Z)=>{Z.resolver($,{})})}}qs1.MuxSubscription=Is1});var Hn0=v((ks1)=>{Object.defineProperty(ks1,"__esModule",{value:!0});ks1.Heartbeat=void 0;var pe8=u3();class Vs1{ph;interval;maxOut;timer;pendings;constructor($,Z,X){this.ph=$,this.interval=Z,this.maxOut=X,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,pe8.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})}}ks1.Heartbeat=Vs1});var Un0=v((xs1)=>{Object.defineProperty(xs1,"__esModule",{value:!0});xs1.DenoBuffer=xs1.MAX_SIZE=xs1.AssertionError=void 0;xs1.assert=_s1;xs1.concat=vs1;xs1.append=te8;xs1.readAll=oe8;xs1.writeAll=re8;var ne8=$G();class Fn0 extends Error{constructor($){super($);this.name="AssertionError"}}xs1.AssertionError=Fn0;function _s1($,Z="Assertion failed."){if(!$)throw new Fn0(Z)}var Cs1=32768;xs1.MAX_SIZE=4294967294;function j70($,Z,X=0){let Q=Z.byteLength-X;if($.byteLength>Q)$=$.subarray(0,Q);return Z.set($,X),$.byteLength}function vs1($,Z){if($===void 0&&Z===void 0)return new Uint8Array(0);if($===void 0)return Z;if(Z===void 0)return $;let X=new Uint8Array($.length+Z.length);return X.set($,0),X.set(Z,$.length),X}function te8($,Z){return vs1($,Uint8Array.of(Z))}class Nn0{_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($){_s1($<=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=j70(this._buf.subarray(this._off),$);return this._off+=Z,Z}writeByte($){return this.write(Uint8Array.of($))}writeString($){return this.write(ne8.TE.encode($))}write($){let Z=this._grow($.byteLength);return j70($,this._buf,Z)}_grow($){let Z=this.length;if(Z===0&&this._off!==0)this.reset();let X=this._tryGrowByReslice($);if(X>=0)return X;let Q=this.capacity;if($<=Math.floor(Q/2)-Z)j70(this._buf.subarray(this._off),this._buf);else if(Q+$>xs1.MAX_SIZE)throw Error("The buffer cannot be grown beyond the maximum size.");else{let Y=new Uint8Array(Math.min(2*Q+$,xs1.MAX_SIZE));j70(this._buf.subarray(this._off),Y),this._buf=Y}return this._off=0,this._reslice(Math.min(Z+$,xs1.MAX_SIZE)),Z}grow($){if($<0)throw Error("Buffer._grow: negative count");let Z=this._grow($);this._reslice(Z)}readFrom($){let Z=0,X=new Uint8Array(Cs1);while(!0){let Q=this.capacity-this.length<Cs1,Y=Q?X:new Uint8Array(this._buf.buffer,this.length),G=$.read(Y);if(G===null)return Z;if(Q)this.write(Y.subarray(0,G));else this._reslice(this.length+G);Z+=G}}}xs1.DenoBuffer=Nn0;function oe8($){let Z=new Nn0;return Z.readFrom($),Z.bytes()}function re8($,Z){let X=0;while(X<Z.length)X+=$.write(Z.subarray(X))}});var Ln0=v((hs1)=>{Object.defineProperty(hs1,"__esModule",{value:!0});hs1.cc=hs1.State=hs1.Parser=hs1.Kind=void 0;hs1.describe=Q04;var Bn0=Un0(),On0=$G();hs1.Kind={OK:0,ERR:1,MSG:2,INFO:3,PING:4,PONG:5};function Q04($){let Z,X="";switch($.kind){case hs1.Kind.MSG:Z="MSG";break;case hs1.Kind.OK:Z="OK";break;case hs1.Kind.ERR:Z="ERR",X=On0.TD.decode($.data);break;case hs1.Kind.PING:Z="PING";break;case hs1.Kind.PONG:Z="PONG";break;case hs1.Kind.INFO:Z="INFO",X=On0.TD.decode($.data)}return`${Z}: ${X}`}function bs1(){let $={};return $.sid=-1,$.hdr=-1,$.size=-1,$}var ys1=48,Y04=57,Hy=67108864;class gs1{dispatcher;state;as;drop;hdr;ma;argBuf;msgBuf;constructor($){this.dispatcher=$,this.state=hs1.State.OP_START,this.as=0,this.drop=0,this.hdr=0}parse($){let Z;for(Z=0;Z<$.length;Z++){let X=$[Z];switch(this.state){case hs1.State.OP_START:switch(X){case hs1.cc.M:case hs1.cc.m:this.state=hs1.State.OP_M,this.hdr=-1,this.ma=bs1();break;case hs1.cc.H:case hs1.cc.h:this.state=hs1.State.OP_H,this.hdr=0,this.ma=bs1();break;case hs1.cc.P:case hs1.cc.p:this.state=hs1.State.OP_P;break;case hs1.cc.PLUS:this.state=hs1.State.OP_PLUS;break;case hs1.cc.MINUS:this.state=hs1.State.OP_MINUS;break;case hs1.cc.I:case hs1.cc.i:this.state=hs1.State.OP_I;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_H:switch(X){case hs1.cc.M:case hs1.cc.m:this.state=hs1.State.OP_M;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_M:switch(X){case hs1.cc.S:case hs1.cc.s:this.state=hs1.State.OP_MS;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_MS:switch(X){case hs1.cc.G:case hs1.cc.g:this.state=hs1.State.OP_MSG;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_MSG:switch(X){case hs1.cc.SPACE:case hs1.cc.TAB:this.state=hs1.State.OP_MSG_SPC;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_MSG_SPC:switch(X){case hs1.cc.SPACE:case hs1.cc.TAB:continue;default:this.state=hs1.State.MSG_ARG,this.as=Z}break;case hs1.State.MSG_ARG:switch(X){case hs1.cc.CR:this.drop=1;break;case hs1.cc.NL:{let Q=this.argBuf?this.argBuf.bytes():$.subarray(this.as,Z-this.drop);this.processMsgArgs(Q),this.drop=0,this.as=Z+1,this.state=hs1.State.MSG_PAYLOAD,Z=this.as+this.ma.size-1;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;case hs1.State.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){let Q=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:hs1.Kind.MSG,msg:this.ma,data:Q}),this.argBuf=void 0,this.msgBuf=void 0,this.state=hs1.State.MSG_END}else{let Q=this.ma.size-this.msgBuf.length,Y=$.length-Z;if(Y<Q)Q=Y;if(Q>0)this.msgBuf.write($.subarray(Z,Z+Q)),Z=Z+Q-1;else this.msgBuf.writeByte(X)}else if(Z-this.as>=this.ma.size)this.dispatcher.push({kind:hs1.Kind.MSG,msg:this.ma,data:$.subarray(this.as,Z)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=hs1.State.MSG_END;break;case hs1.State.MSG_END:switch(X){case hs1.cc.NL:this.drop=0,this.as=Z+1,this.state=hs1.State.OP_START;break;default:continue}break;case hs1.State.OP_PLUS:switch(X){case hs1.cc.O:case hs1.cc.o:this.state=hs1.State.OP_PLUS_O;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_PLUS_O:switch(X){case hs1.cc.K:case hs1.cc.k:this.state=hs1.State.OP_PLUS_OK;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_PLUS_OK:switch(X){case hs1.cc.NL:this.dispatcher.push({kind:hs1.Kind.OK}),this.drop=0,this.state=hs1.State.OP_START;break}break;case hs1.State.OP_MINUS:switch(X){case hs1.cc.E:case hs1.cc.e:this.state=hs1.State.OP_MINUS_E;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_MINUS_E:switch(X){case hs1.cc.R:case hs1.cc.r:this.state=hs1.State.OP_MINUS_ER;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_MINUS_ER:switch(X){case hs1.cc.R:case hs1.cc.r:this.state=hs1.State.OP_MINUS_ERR;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_MINUS_ERR:switch(X){case hs1.cc.SPACE:case hs1.cc.TAB:this.state=hs1.State.OP_MINUS_ERR_SPC;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_MINUS_ERR_SPC:switch(X){case hs1.cc.SPACE:case hs1.cc.TAB:continue;default:this.state=hs1.State.MINUS_ERR_ARG,this.as=Z}break;case hs1.State.MINUS_ERR_ARG:switch(X){case hs1.cc.CR:this.drop=1;break;case hs1.cc.NL:{let Q;if(this.argBuf)Q=this.argBuf.bytes(),this.argBuf=void 0;else Q=$.subarray(this.as,Z-this.drop);this.dispatcher.push({kind:hs1.Kind.ERR,data:Q}),this.drop=0,this.as=Z+1,this.state=hs1.State.OP_START;break}default:if(this.argBuf)this.argBuf.write(Uint8Array.of(X))}break;case hs1.State.OP_P:switch(X){case hs1.cc.I:case hs1.cc.i:this.state=hs1.State.OP_PI;break;case hs1.cc.O:case hs1.cc.o:this.state=hs1.State.OP_PO;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_PO:switch(X){case hs1.cc.N:case hs1.cc.n:this.state=hs1.State.OP_PON;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_PON:switch(X){case hs1.cc.G:case hs1.cc.g:this.state=hs1.State.OP_PONG;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_PONG:switch(X){case hs1.cc.NL:this.dispatcher.push({kind:hs1.Kind.PONG}),this.drop=0,this.state=hs1.State.OP_START;break}break;case hs1.State.OP_PI:switch(X){case hs1.cc.N:case hs1.cc.n:this.state=hs1.State.OP_PIN;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_PIN:switch(X){case hs1.cc.G:case hs1.cc.g:this.state=hs1.State.OP_PING;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_PING:switch(X){case hs1.cc.NL:this.dispatcher.push({kind:hs1.Kind.PING}),this.drop=0,this.state=hs1.State.OP_START;break}break;case hs1.State.OP_I:switch(X){case hs1.cc.N:case hs1.cc.n:this.state=hs1.State.OP_IN;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_IN:switch(X){case hs1.cc.F:case hs1.cc.f:this.state=hs1.State.OP_INF;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_INF:switch(X){case hs1.cc.O:case hs1.cc.o:this.state=hs1.State.OP_INFO;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_INFO:switch(X){case hs1.cc.SPACE:case hs1.cc.TAB:this.state=hs1.State.OP_INFO_SPC;break;default:throw this.fail($.subarray(Z))}break;case hs1.State.OP_INFO_SPC:switch(X){case hs1.cc.SPACE:case hs1.cc.TAB:continue;default:this.state=hs1.State.INFO_ARG,this.as=Z}break;case hs1.State.INFO_ARG:switch(X){case hs1.cc.CR:this.drop=1;break;case hs1.cc.NL:{let Q;if(this.argBuf)Q=this.argBuf.bytes(),this.argBuf=void 0;else Q=$.subarray(this.as,Z-this.drop);this.dispatcher.push({kind:hs1.Kind.INFO,data:Q}),this.drop=0,this.as=Z+1,this.state=hs1.State.OP_START;break}default:if(this.argBuf)this.argBuf.writeByte(X)}break;default:throw this.fail($.subarray(Z))}}if((this.state===hs1.State.MSG_ARG||this.state===hs1.State.MINUS_ERR_ARG||this.state===hs1.State.INFO_ARG)&&!this.argBuf)this.argBuf=new Bn0.DenoBuffer($.subarray(this.as,Z-this.drop));if(this.state===hs1.State.MSG_PAYLOAD&&!this.msgBuf){if(!this.argBuf)this.cloneMsgArg();this.msgBuf=new Bn0.DenoBuffer($.subarray(this.as))}}cloneMsgArg(){let $=this.ma.subject.length,Z=this.ma.reply?this.ma.reply.length:0,X=new Uint8Array($+Z);if(X.set(this.ma.subject),this.ma.reply)X.set(this.ma.reply,$);if(this.argBuf=new Bn0.DenoBuffer(X),this.ma.subject=X.subarray(0,$),this.ma.reply)this.ma.reply=X.subarray($)}processMsgArgs($){if(this.hdr>=0)return this.processHeaderMsgArgs($);let Z=[],X=-1;for(let Q=0;Q<$.length;Q++)switch($[Q]){case hs1.cc.SPACE:case hs1.cc.TAB:case hs1.cc.CR:case hs1.cc.NL:if(X>=0)Z.push($.subarray(X,Q)),X=-1;break;default:if(X<0)X=Q}if(X>=0)Z.push($.subarray(X));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],Hy);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],Hy);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}: ${On0.TD.decode($)}`)}processHeaderMsgArgs($){let Z=[],X=-1;for(let Q=0;Q<$.length;Q++)switch($[Q]){case hs1.cc.SPACE:case hs1.cc.TAB:case hs1.cc.CR:case hs1.cc.NL:if(X>=0)Z.push($.subarray(X,Q)),X=-1;break;default:if(X<0)X=Q}if(X>=0)Z.push($.subarray(X));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],Hy),this.ma.size=this.protoParseInt(Z[3],Hy);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],Hy),this.ma.size=this.protoParseInt(Z[4],Hy);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 X=0;for(let Q=0;Q<$.length;Q++){if($[Q]<ys1||$[Q]>Y04)return-1;X=X*10+($[Q]-ys1)}return Z!==void 0&&X>Z?-1:X}}hs1.Parser=gs1;hs1.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};hs1.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 A70=v((cs1)=>{Object.defineProperty(cs1,"__esModule",{value:!0});cs1.MsgHdrsImpl=void 0;cs1.canonicalMIMEHeaderKey=wn0;cs1.headers=K04;var us1=$G(),c3=ZO(),P70=ZG();function wn0($){let F=!0,N=Array($.length);for(let U=0;U<$.length;U++){let B=$.charCodeAt(U);if(B===58||B<33||B>126)throw P70.InvalidArgumentError.format("header",`'${$[U]}' 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;N[U]=B,F=B==45}return String.fromCharCode(...N)}function K04($=0,Z=""){if($===0&&Z!=="")throw P70.InvalidArgumentError.format("code","is required");else if($>0&&Z==="")throw P70.InvalidArgumentError.format("description","is required");return new Fy($,Z)}var Dn0="NATS/1.0";class Fy{_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,X]of this.headers){let Q=$.values(Z);if(X.length!==Q.length)return!1;let Y=[...X].sort(),G=[...Q].sort();for(let J=0;J<Y.length;J++)if(Y[J]!==G[J])return!1}return!0}return!1}static decode($){let Z=new Fy,Q=us1.TD.decode($).split(`\r
|
|
1446
1446
|
`),Y=Q[0];if(Y!==Dn0){let G=Y.replace(Dn0,"").trim();if(G.length>0){if(Z._code=parseInt(G,10),isNaN(Z._code))Z._code=0;let J=Z._code.toString();G=G.replace(J,""),Z._description=G.trim()}}if(Q.length>=1)Q.slice(1).map((G)=>{if(G){let J=G.indexOf(":");if(J>-1){let K=G.slice(0,J),W=G.slice(J+1).trim();Z.append(K,W)}}});return Z}toString(){if(this.headers.size===0&&this._code===0)return"";let $=Dn0;if(this._code>0&&this._description!=="")$+=` ${this._code} ${this._description}`;for(let[Z,X]of this.headers)for(let Q=0;Q<X.length;Q++)$=`${$}\r
|
|
1447
1447
|
${Z}: ${X[Q]}`;return`${$}\r
|