decocms 4.576.4 → 4.577.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CsPTcN_S.js → AlertCircle-BdE1rZoJ.js} +1 -1
- package/dist/client/assets/{AreaChart-CPcUCL9A.js → AreaChart-D0m3b7qG.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BYhfnAa5.js → ArrowLeft-DIrnwv8l.js} +1 -1
- package/dist/client/assets/{ArrowUp-Cv1SmuzD.js → ArrowUp-km-Xmh__.js} +1 -1
- package/dist/client/assets/BookOpen01-BneB1q9z.js +1 -0
- package/dist/client/assets/{CartesianChart-1SsRQdZi.js → CartesianChart-BwsWHEdb.js} +1 -1
- package/dist/client/assets/{CategoricalChart-B9nv4p9e.js → CategoricalChart-Dxo_7xLg.js} +1 -1
- package/dist/client/assets/{CheckCircle-LO8Q7KlB.js → CheckCircle-CiBUynzC.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-Bo1EsiyQ.js → ChevronSelectorVertical-CRWdnYCm.js} +1 -1
- package/dist/client/assets/{ChevronUp-Dh24Sq_k.js → ChevronUp-B7dgqvYM.js} +1 -1
- package/dist/client/assets/{CreditCard01-B0xYA-L3.js → CreditCard01-CcIddg9s.js} +1 -1
- package/dist/client/assets/{Globe04-ceJSWDa3.js → Globe04-DIBckqos.js} +1 -1
- package/dist/client/assets/{Key01-D9P3FMiY.js → Key01-BV5ckBOE.js} +1 -1
- package/dist/client/assets/{LinkBroken01-B3rPhu7D.js → LinkBroken01-Mv2kbzSM.js} +1 -1
- package/dist/client/assets/{Minus-BP4M5eUu.js → Minus-Bygm9L7w.js} +1 -1
- package/dist/client/assets/{Monitor01-BIy7Jnq0.js → Monitor01-HDGt-WwC.js} +1 -1
- package/dist/client/assets/{Play-C4cdDhC3.js → Play-DROL2O51.js} +1 -1
- package/dist/client/assets/{Plus-Bcl7avNA.js → Plus-C-Or0hIv.js} +1 -1
- package/dist/client/assets/ReferenceLine-BPmIH9b3.js +1 -0
- package/dist/client/assets/{SearchMd-DRs-Ld4Z.js → SearchMd-D88tiwag.js} +1 -1
- package/dist/client/assets/ShoppingBag01-Cdbqpanm.js +1 -0
- package/dist/client/assets/{Sun-oVWnfq_E.js → Sun-CgOyXDTW.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BTdsV_bI.js → SwitchHorizontal01-Dkkqg27i.js} +1 -1
- package/dist/client/assets/{Tool01-BWMOxR8v.js → Tool01-D4tVVqAj.js} +1 -1
- package/dist/client/assets/{Tooltip-DHjHeuys.js → Tooltip-cgLuNyXo.js} +1 -1
- package/dist/client/assets/{Trash01-CgWosjFE.js → Trash01-Cqkcp6ky.js} +1 -1
- package/dist/client/assets/{Upload01-DAMBCMxP.js → Upload01-CsOcxm5q.js} +1 -1
- package/dist/client/assets/{UserSquare-BjqAifU8.js → UserSquare-CK-bjijW.js} +1 -1
- package/dist/client/assets/{Users01-Bt0rcyOL.js → Users01-BpEuprvx.js} +1 -1
- package/dist/client/assets/{XClose-TMdj_yIm.js → XClose-D9taHFI1.js} +1 -1
- package/dist/client/assets/{Zap-BJ5eCR1y.js → Zap-BhxT34oC.js} +1 -1
- package/dist/client/assets/{access-gate-DbqD_EAv.js → access-gate-Bbt03qvc.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-DigMA6Jw.js → add-connection-dialog-EzR6kkmo.js} +1 -1
- package/dist/client/assets/agent-app-xUigIkK8.js +1 -0
- package/dist/client/assets/agent-assets-DUoWUOFt.js +1 -0
- package/dist/client/assets/agent-automation-Cyb5qsWY.js +20 -0
- package/dist/client/assets/agent-automations-HcbM2XMD.js +1 -0
- package/dist/client/assets/agent-blog-BLi3oKLw.js +2 -0
- package/dist/client/assets/agent-blog-post-DXyE25Wg.js +2 -0
- package/dist/client/assets/agent-calendar-D7ih9de1.js +1 -0
- package/dist/client/assets/{agent-capabilities-DODsAfWG.js → agent-capabilities-CrqOfLmC.js} +1 -1
- package/dist/client/assets/agent-connect-sources-DtVo8JXM.js +1 -0
- package/dist/client/assets/agent-deck-Cs__MOn_.js +1 -0
- package/dist/client/assets/agent-e2e-CBM_w3qk.js +1 -0
- package/dist/client/assets/agent-experiments-CR3rcuNZ.js +1 -0
- package/dist/client/assets/agent-file-DjiNMKB3.js +1 -0
- package/dist/client/assets/agent-hosting-C70MC-PA.js +1 -0
- package/dist/client/assets/agent-icon-bK3wLPrb.js +1 -0
- package/dist/client/assets/agent-library-CeznhRs4.js +1 -0
- package/dist/client/assets/agent-library-file-B-Sx2y3P.js +1 -0
- package/dist/client/assets/agent-overview-CFue46Ll.js +1 -0
- package/dist/client/assets/agent-releases-BlbJtMk9.js +2 -0
- package/dist/client/assets/agent-settings-BljPRjiA.js +1 -0
- package/dist/client/assets/{agent-site-editor-Z6rBuS35.js → agent-site-editor-BeTpu1p8.js} +9 -9
- package/dist/client/assets/agent-site-editor-code-BAiYvGFH.js +2 -0
- package/dist/client/assets/agent-site-editor-content-Bl3XwQ5q.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-Cys48HaE.js +1 -0
- package/dist/client/assets/agent-view-DlR04ups.js +1 -0
- package/dist/client/assets/agent-view-guard-CruOWgYs.js +1 -0
- package/dist/client/assets/ai-providers-C2yFfgyi.js +1 -0
- package/dist/client/assets/{alert-TFdEDT2O.js → alert-jF8tTR34.js} +1 -1
- package/dist/client/assets/{analytics-sections-CopwZcAF.js → analytics-sections-Qo8FMsPn.js} +1 -1
- package/dist/client/assets/{api-keys-BRzjuZvx.js → api-keys-15uqAkvj.js} +1 -1
- package/dist/client/assets/api-keys-BYU6jhvq.js +1 -0
- package/dist/client/assets/app-editor-B4pmL5qY.js +1 -0
- package/dist/client/assets/{asset-utils-B4QYhZxH.js → asset-utils-CwQVXoYw.js} +1 -1
- package/dist/client/assets/{auth-TL5_hJeY.js → auth-YGSVzhUG.js} +1 -1
- package/dist/client/assets/{auth-catchall-na7siRgx.js → auth-catchall-hWKWJU80.js} +1 -1
- package/dist/client/assets/{auth-entry-BGo8_cbu.js → auth-entry-DpL4vu4t.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BISVCxy2.js → auth-split-layout-BFmr3RnK.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CUE7ik09.js → authenticate-and-persist-oauth-DHgqzdUM.js} +1 -1
- package/dist/client/assets/{automation-list-row-DpSl9UM5.js → automation-list-row-BAeLE453.js} +1 -1
- package/dist/client/assets/{automation-runs-BfKHSay9.js → automation-runs-C7o6atC8.js} +1 -1
- package/dist/client/assets/automations-BvOuQD58.js +1 -0
- package/dist/client/assets/{badge-D7MkXlu5.js → badge-D9oJO89f.js} +1 -1
- package/dist/client/assets/block-document-Phc0b_hv.js +3 -0
- package/dist/client/assets/{blocks-preview-workspace-context-DFEoJmhw.js → blocks-preview-workspace-context-XztheX0p.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-DASlUdvo.js → blocks-tab-states-CPXZUbSV.js} +1 -1
- package/dist/client/assets/blog-preview-url-BlQDNdnl.js +1 -0
- package/dist/client/assets/blog-schema-BY4m7Viq.js +1 -0
- package/dist/client/assets/blog-source-gate-CiOBhTPt.js +1 -0
- package/dist/client/assets/blog-view-gate-CCZFjbaz.js +1 -0
- package/dist/client/assets/{buckets-DWZ0uMIH.js → buckets-BkOGaNvk.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-Cp4dU57k.js → build-improve-prompt-doc-BvBG7PT7.js} +1 -1
- package/dist/client/assets/{calendar-J9rCuEM0.js → calendar-CNAmcpRM.js} +1 -1
- package/dist/client/assets/{capability-load-error-cDMC87PI.js → capability-load-error-BfsuWu82.js} +1 -1
- package/dist/client/assets/category-editor-DfKRUZ0M.js +1 -0
- package/dist/client/assets/category-tree-C0ZkCPxc.js +4 -0
- package/dist/client/assets/{chart-sO-wf7w_.js → chart-CjhZfLhJ.js} +1 -1
- package/dist/client/assets/chat-context-BXBBnsXM.js +39 -0
- package/dist/client/assets/{chat-draft-B_pQlOo7.js → chat-draft-BiNhHFHP.js} +1 -1
- package/dist/client/assets/{checkbox-CDdGUfxj.js → checkbox-BqeIWnOr.js} +1 -1
- package/dist/client/assets/choose-editor-C3lPTBrc.js +1 -0
- package/dist/client/assets/{cli-auth-success-BAsObd7a.js → cli-auth-success-DXTy0zTr.js} +1 -1
- package/dist/client/assets/{client-icons-Bp0n81sC.js → client-icons-bVQyh7Ui.js} +1 -1
- package/dist/client/assets/cms-settings-editor-BGhvXRA5.js +1 -0
- package/dist/client/assets/cms-store-drafts-C_2pJAHv.js +1 -0
- package/dist/client/assets/collapsible-M6EMuds1.js +1 -0
- package/dist/client/assets/collection-detail-DtpW8ulK.js +1 -0
- package/dist/client/assets/{collection-display-button-D3cSy-rU.js → collection-display-button-CLT_iQ9K.js} +1 -1
- package/dist/client/assets/{collection-search-DmyrNuWr.js → collection-search-d8_we7KS.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BVBFYCyq.js → collection-table-wrapper-jjhzHxOC.js} +1 -1
- package/dist/client/assets/{collection-tabs-CzJgsFmP.js → collection-tabs-CDEZauaw.js} +1 -1
- package/dist/client/assets/{combobox-Cy1ac_Va.js → combobox-eXr44O4N.js} +1 -1
- package/dist/client/assets/{command-Bh995x5J.js → command-CL5fBjco.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-DHnNnyh5.js → companion-mcps-section-ZhumvGkq.js} +1 -1
- package/dist/client/assets/config-DTkH3DlA.js +1 -0
- package/dist/client/assets/{connect-DN6GB1WI.js → connect-DTRBNGAJ.js} +3 -3
- package/dist/client/assets/{connect-layout-DllpY2qm.js → connect-layout-C9YZDE5a.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-C4jdSJZP.js → connect-source-dialog-CtNzRZNm.js} +1 -1
- package/dist/client/assets/{connection-S1Y-z6Ze.js → connection-DQRUSri4.js} +1 -1
- package/dist/client/assets/{connection-card-GbDbFKHX.js → connection-card-DiXDtKCD.js} +1 -1
- package/dist/client/assets/connection-detail-A1N-eCPy.js +1 -0
- package/dist/client/assets/{connection-form-helpers-DwQM2AXJ.js → connection-form-helpers-DbQ-1SYg.js} +1 -1
- package/dist/client/assets/{connection-slug-CQeaB-ii.js → connection-slug-eNvNu5ns.js} +1 -1
- package/dist/client/assets/connections-F6Cb4hev.js +1 -0
- package/dist/client/assets/content-tab-zWTaVHTI.js +19 -0
- package/dist/client/assets/context-jjXucCze.js +1 -0
- package/dist/client/assets/{context-menu-_4SjkJP2.js → context-menu-C8EhSOHZ.js} +1 -1
- package/dist/client/assets/{context-shell-2FHUOtQh.js → context-shell-DAsZEr3G.js} +3 -3
- package/dist/client/assets/{core.esm-Cx2tI-v0.js → core.esm-q-GZRseF.js} +2 -2
- package/dist/client/assets/{create-organization-dialog-DztBZJfG.js → create-organization-dialog-B0fwudcl.js} +1 -1
- package/dist/client/assets/delete-copy-DewsXC-x.js +4 -0
- package/dist/client/assets/{device-hint-DiJItdVl.js → device-hint-DOHdIy74.js} +1 -1
- package/dist/client/assets/discover-Sgb2XR4X.js +1 -0
- package/dist/client/assets/{domain-settings-DEAsOpnU.js → domain-settings-CzQKvon-.js} +1 -1
- package/dist/client/assets/{drawer-BcaULeep.js → drawer-CT21cqiT.js} +1 -1
- package/dist/client/assets/{editor-DXF9rwVo.js → editor-DSTLBMSV.js} +2 -2
- package/dist/client/assets/{editor-classes-DEwbN0MI.js → editor-classes-DNgU6VQ_.js} +1 -1
- package/dist/client/assets/empty-message-0iKzEZgc.js +15 -0
- package/dist/client/assets/{empty-state-Ccl8OC-j.js → empty-state-C7mAM8aV.js} +1 -1
- package/dist/client/assets/{empty-state-Cfajk5TO.js → empty-state-De0GyKdS.js} +1 -1
- package/dist/client/assets/experiments-tab-choice-DwnKczQ0.js +1 -0
- package/dist/client/assets/{extract-connection-data-biKUq-5E.js → extract-connection-data-C9uUQyrf.js} +1 -1
- package/dist/client/assets/feature-gate-BekWNhM3.js +1 -0
- package/dist/client/assets/{feature-paywall-DasxziSs.js → feature-paywall-CzMsGR-v.js} +1 -1
- package/dist/client/assets/file-explorer-BA6AotC6.js +2 -0
- package/dist/client/assets/{file-preview-Dmy5YhII.js → file-preview-CK5Pkylz.js} +1 -1
- package/dist/client/assets/{file-share-button-Cl-IgS5x.js → file-share-button-qjRy5kh1.js} +1 -1
- package/dist/client/assets/{file-type-icon-D75nksOt.js → file-type-icon-DI74_rhH.js} +1 -1
- package/dist/client/assets/{folder-icon-C5I9OzDM.js → folder-icon-RhxrL37z.js} +1 -1
- package/dist/client/assets/{form-CIThj_T9.js → form-czY_WZeB.js} +1 -1
- package/dist/client/assets/frame-navigation-D3lcT6PQ.js +1 -0
- package/dist/client/assets/general-DyfkLFv0.js +1 -0
- package/dist/client/assets/{github-icon--dnMj3-y.js → github-icon-DbvGzNXg.js} +1 -1
- package/dist/client/assets/held-block-view-616AHRnA.js +3 -0
- package/dist/client/assets/home-CvjGQ8iY.js +1 -0
- package/dist/client/assets/{home-overview-g3rcNgW7.js → home-overview-BspPD0Qy.js} +1 -1
- package/dist/client/assets/hosted-reconcile-gX34y3hJ.js +1 -0
- package/dist/client/assets/{icon-button-CyNmKrzV.js → icon-button-Bek6uWU8.js} +1 -1
- package/dist/client/assets/{index-Dd5hidCj.js → index-5IFWC0PS.js} +47 -47
- package/dist/client/assets/index-BASUN16S.js +4 -0
- package/dist/client/assets/{index-BtqPZIqH.js → index-BFLUunGm.js} +1 -1
- package/dist/client/assets/index-BVaQtZpO.js +1 -0
- package/dist/client/assets/index-B_hHGrWo.js +1 -0
- package/dist/client/assets/{index-DjpHvK_4.js → index-BgGa_gEX.js} +1 -1
- package/dist/client/assets/{index-B_wKEr5f.js → index-CJqO_lXj.js} +1 -1
- package/dist/client/assets/{index-DrqsNFYR.js → index-CLog75-o.js} +1 -1
- package/dist/client/assets/{index-nO2S2V0T.js → index-CYAg_mZ5.js} +6 -6
- package/dist/client/assets/{index-_nd_1JQz.js → index-Cb-PI-oM.js} +1 -1
- package/dist/client/assets/{index-BF9ePDqU.js → index-Cn4blTB2.js} +2 -2
- package/dist/client/assets/{index-ozu548h3.js → index-Co1pEKoz.js} +1 -1
- package/dist/client/assets/{index-BrihqSoi.js → index-Cq3k2rBV.js} +1 -1
- package/dist/client/assets/index-D6lWWdm-.js +1 -0
- package/dist/client/assets/{index-BCZy-897.js → index-DI1WEe1Y.js} +1 -1
- package/dist/client/assets/index-DYPWHH-M.css +1 -0
- package/dist/client/assets/{index-DgYBSkMj.js → index-ZpYsIOky.js} +2 -2
- package/dist/client/assets/{index-B57dAAxD.js → index-e47kvUTQ.js} +1 -1
- package/dist/client/assets/{index-redirect-DUi7z5TL.js → index-redirect-B5LCK4UZ.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-C1uWfhgO.js → infiniteQueryObserver-CgeE9MzI.js} +1 -1
- package/dist/client/assets/{infra-billing-DWMi-9eg.js → infra-billing-D_NOfbaI.js} +1 -1
- package/dist/client/assets/{input-B-TiyPUk.js → input-1bbcsHzM.js} +3 -3
- package/dist/client/assets/{input-DKlZJGf0.js → input-Cof38_0i.js} +1 -1
- package/dist/client/assets/{integration-icon-DHvbSqTM.js → integration-icon-ClorKiq5.js} +1 -1
- package/dist/client/assets/item-actions-pz3LKYdP.js +1 -0
- package/dist/client/assets/{jira-icon-CUlCkXDM.js → jira-icon-CSE5FXRa.js} +1 -1
- package/dist/client/assets/{label-BZoCdZa0.js → label-C1myK8cj.js} +1 -1
- package/dist/client/assets/{layout-C4bx239O.js → layout-B4vND3NH.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-BgMnIQY9.js → legacy-admin-welcome-dialog-DtBTs-JZ.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-BELlTHpx.js → legacy-agents-deep-wdUtLgZd.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-CxAuaPrB.js → legacy-main-redirect-D0dw61Zg.js} +1 -1
- package/dist/client/assets/library-DmRa8bBp.js +1 -0
- package/dist/client/assets/{library-tab-CnjcP9yb.js → library-tab-3lHWVZnM.js} +4 -4
- package/dist/client/assets/{login-CA5_HXz3.js → login-OeBuTK5R.js} +1 -1
- package/dist/client/assets/{markdown-ZlzKtNkL.js → markdown-BhnPL5Bs.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CRFiwN6n.js → mcp-app-renderer-DeImvVKz.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Cq-Z82WC.js → mcp-oauth-D2St0yzi.js} +1 -1
- package/dist/client/assets/{mcp-oauth-VaMDOw7T.js → mcp-oauth-DAPLorIu.js} +1 -1
- package/dist/client/assets/{members-CHUd-Ol1.js → members-CRV8r-1W.js} +1 -1
- package/dist/client/assets/{memory-CltSbzPH.js → memory-C08OAgnC.js} +2 -2
- package/dist/client/assets/{mock-board-TQVQrJy0.js → mock-board-UupkdDTJ.js} +3 -3
- package/dist/client/assets/{monaco-editor-BZNPSifL.js → monaco-editor-DgmLjwMj.js} +1 -1
- package/dist/client/assets/{monitoring-D-eHzsjl.js → monitoring-C2AkJ1E2.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-C7sD_prp.js → monitoring-stats-row-BkupHr4w.js} +1 -1
- package/dist/client/assets/{multi-select-DL8hrKQv.js → multi-select-D_-o3Z5k.js} +1 -1
- package/dist/client/assets/mustache-D-pZ4GVh.js +4 -0
- package/dist/client/assets/named-rule-step-BqRLfozU.js +1 -0
- package/dist/client/assets/named-rule-view-Cjao8aHC.js +1 -0
- package/dist/client/assets/{new-project-dialog-BDUp1HsF.js → new-project-dialog-ly3jlxrO.js} +1 -1
- package/dist/client/assets/{oauth-callback-D-Igsrh7.js → oauth-callback-DGsbFvpE.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Yifk_dmU.js → oauth-callback-ai-provider-DH_kBA_S.js} +1 -1
- package/dist/client/assets/{oauth-consent-DlsvLpih.js → oauth-consent-DiV1G_a8.js} +1 -1
- package/dist/client/assets/{onboarding-CyvbU-47.js → onboarding-wSysb6DG.js} +1 -1
- package/dist/client/assets/openai-conversation-BnmAjQv3.js +3 -0
- package/dist/client/assets/{optimistic-project-sidebar-views-DMLee7lV.js → optimistic-project-sidebar-views-BddiZzQV.js} +1 -1
- package/dist/client/assets/{order-monitor-day-D_UJY8n7.js → order-monitor-day-vJd_rbss.js} +1 -1
- package/dist/client/assets/{organization-choice-11vPd3Oe.js → organization-choice-B_C6gRzc.js} +1 -1
- package/dist/client/assets/{orgs-CO5mj27b.js → orgs-Hd1POC7b.js} +1 -1
- package/dist/client/assets/{own-accounts-section-VOVPBP5x.js → own-accounts-section-DRAcUJQm.js} +1 -1
- package/dist/client/assets/{pair-D5jYRLOi.js → pair-DsQEIDjk.js} +7 -7
- package/dist/client/assets/parse-sections-DAMeYP46.js +4 -0
- package/dist/client/assets/plan-9F8q1LmB.js +1 -0
- package/dist/client/assets/{plan-ladder-42sSWoBs.js → plan-ladder-BVTNP5Xz.js} +1 -1
- package/dist/client/assets/{plan-usage-card-DawnbwSf.js → plan-usage-card-Du0lOF_J.js} +2 -2
- package/dist/client/assets/{popover-4z9eDM-9.js → popover-DP7XfF8t.js} +1 -1
- package/dist/client/assets/post-calendar-DDpUGeeB.js +1 -0
- package/dist/client/assets/post-editor-DtDeATFH.js +2 -0
- package/dist/client/assets/{preview-content-DAApomFo.js → preview-content-C5OVyGLr.js} +1 -1
- package/dist/client/assets/{preview-dialog-BYfDupos.js → preview-dialog-DuuWqEir.js} +1 -1
- package/dist/client/assets/{preview-panel-BnTSUu1W.js → preview-panel-BZ5HJll2.js} +1 -1
- package/dist/client/assets/preview-tab-P_107JPX.js +551 -0
- package/dist/client/assets/{product-picker-dialog-CtVVJBu_.js → product-picker-dialog-Dt7DCQ6n.js} +1 -1
- package/dist/client/assets/{profile-Cespz5EQ.js → profile-GhJox0Lx.js} +1 -1
- package/dist/client/assets/project-app-view-qeUPQ38h.js +1 -0
- package/dist/client/assets/project-apps-DfPcY68g.js +1 -0
- package/dist/client/assets/{project-icon-BC5BTHqT.js → project-icon-B90806PF.js} +1 -1
- package/dist/client/assets/{project-index-Cov2uCEL.js → project-index-Do6iewlo.js} +1 -1
- package/dist/client/assets/project-reports-CidF3Xyg.js +1 -0
- package/dist/client/assets/project-tasks-BYy46ISP.js +1 -0
- package/dist/client/assets/projects-CymMldT7.js +1 -0
- package/dist/client/assets/{projects-empty-state-BKHYkH3g.js → projects-empty-state-BTGd2cv1.js} +1 -1
- package/dist/client/assets/{prompts-Bf1h2RZu.js → prompts-Cd0qPZsx.js} +1 -1
- package/dist/client/assets/record-editor-BH3fKYC8.js +1 -0
- package/dist/client/assets/redirect-editor-xZO49sls.js +1 -0
- package/dist/client/assets/{reports-DRRYJcxd.js → reports-B9pEcRxn.js} +1 -1
- package/dist/client/assets/reports-DtEFVn9D.js +1 -0
- package/dist/client/assets/reports-onboarding-DxeuhIZr.js +1 -0
- package/dist/client/assets/reports-tab-YeP0tPeK.js +2 -0
- package/dist/client/assets/repositories-B0Temlg5.js +1 -0
- package/dist/client/assets/repositories-YEhOcvb2.js +1 -0
- package/dist/client/assets/{repository-binding-DV3kkbZ_.js → repository-binding-L4ChVpPs.js} +1 -1
- package/dist/client/assets/repository-picker-CCYsOJZQ.js +1 -0
- package/dist/client/assets/{require-capability-Dlaolf-u.js → require-capability-Cm5TFoc0.js} +1 -1
- package/dist/client/assets/{required-auth-layout-lVrZieBu.js → required-auth-layout-BUx3f5eg.js} +1 -1
- package/dist/client/assets/{reset-password-H302zhc9.js → reset-password-DWi7rqRm.js} +1 -1
- package/dist/client/assets/{resizable-D6Bvwzfl.js → resizable-Biivyzu2.js} +1 -1
- package/dist/client/assets/resolve-tab-icon-C_X-fR95.js +1 -0
- package/dist/client/assets/review-settings-DhlyLgn0.js +1 -0
- package/dist/client/assets/role-color-_0YSG8Dj.js +1 -0
- package/dist/client/assets/roles-akRjx2S4.js +1 -0
- package/dist/client/assets/route-CKHdrn7R.js +1 -0
- package/dist/client/assets/route-D1Gpwe4D.js +1 -0
- package/dist/client/assets/route-tQ0sT4aI.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-2RE5Jlvg.js → sandbox-lifecycle-context-BJx1JU2-.js} +1 -1
- package/dist/client/assets/save-status-T9dswXr1.js +1 -0
- package/dist/client/assets/{schema-paIXrOCY.js → schema-Dc_MkHkp.js} +1 -1
- package/dist/client/assets/{schema-CINYRcKK.js → schema-DjfjCUhq.js} +1 -1
- package/dist/client/assets/{scroll-area-BwaclrCR.js → scroll-area-cgfYHO2J.js} +1 -1
- package/dist/client/assets/search-input-CgAhBcAm.js +1 -0
- package/dist/client/assets/{search-toggle-CShA1wOK.js → search-toggle-BvL2EnQl.js} +1 -1
- package/dist/client/assets/{secret-picker-C6s_jvhV.js → secret-picker-pXy37N0W.js} +1 -1
- package/dist/client/assets/{secrets-Bz4L84Vo.js → secrets-DY2kpTfw.js} +1 -1
- package/dist/client/assets/section-array-field-Dqv2uZIX.js +1 -0
- package/dist/client/assets/{sections-CnLSarWD.js → sections-BYpfTFZT.js} +1 -1
- package/dist/client/assets/sections-editor-D7uS2U4v.js +1 -0
- package/dist/client/assets/{select-iwVnUZSM.js → select-Dj8hBfnd.js} +1 -1
- package/dist/client/assets/{select-model-DhxdeY5p.js → select-model-BCp0KUZW.js} +1 -1
- package/dist/client/assets/seo-editor-C6gHCSwh.js +1 -0
- package/dist/client/assets/{separator-C1bonuaY.js → separator-CD_4C4Y0.js} +1 -1
- package/dist/client/assets/settings-tab-DPVLqmJT.js +1 -0
- package/dist/client/assets/{sheet-DUtlbS4K.js → sheet-w42F36Fm.js} +1 -1
- package/dist/client/assets/shell-layout-SnEo2Z8s.js +1 -0
- package/dist/client/assets/site-draft-actions-X8qdJpR6.js +3 -0
- package/dist/client/assets/site-draft-view-DieOLT9Q.js +1 -0
- package/dist/client/assets/site-editor-D71enwO7.js +1 -0
- package/dist/client/assets/{site-editor-toast-DL4aC3pF.js → site-editor-toast-CAmfWZOg.js} +1 -1
- package/dist/client/assets/skills-BPDMMsh1.js +1 -0
- package/dist/client/assets/{slider-Cmkjh66S.js → slider-BUH8Dwgf.js} +1 -1
- package/dist/client/assets/{sortable.esm-C7rI9jHM.js → sortable.esm-BwyBVE7G.js} +1 -1
- package/dist/client/assets/{sso-BEfIFSWt.js → sso-Cf_QJD0l.js} +1 -1
- package/dist/client/assets/suggestion-EZp_1C2Z.js +2 -0
- package/dist/client/assets/{super-agent-icon-Dq4U-BQv.js → super-agent-icon-Cuh3vhpx.js} +1 -1
- package/dist/client/assets/{switch-BZMVD_xA.js → switch-CcIiziq_.js} +1 -1
- package/dist/client/assets/synced-repos-Cnb_uqs2.js +1 -0
- package/dist/client/assets/{tab-icon-glyph-CeBm3H92.js → tab-icon-glyph-DvOK9lLO.js} +1 -1
- package/dist/client/assets/{table-C9boQ5tZ.js → table-CX_Xjv5_.js} +1 -1
- package/dist/client/assets/{tabs-CFdE2LmD.js → tabs-BVFow_A3.js} +1 -1
- package/dist/client/assets/{task-board-BZ6FZl9j.js → task-board-DVtARw_U.js} +1 -1
- package/dist/client/assets/{task-route-WWLMyAp6.js → task-route-Ck3RXNt1.js} +1 -1
- package/dist/client/assets/{task-status-CLkNYnsS.js → task-status-DFMg9mu2.js} +1 -1
- package/dist/client/assets/taskboard-analytics-BUGnnj7V.js +1 -0
- package/dist/client/assets/{tasks-DOLkXzI6.js → tasks-B3OOn3U2.js} +3 -3
- package/dist/client/assets/tasks-DHWz5CTo.js +1 -0
- package/dist/client/assets/{textarea-hEv7rKyL.js → textarea-BxqysnAf.js} +1 -1
- package/dist/client/assets/thread-analytics-dnNDwV70.js +1 -0
- package/dist/client/assets/{thread-intent-DMhB2sy4.js → thread-intent-BujELieJ.js} +6 -6
- package/dist/client/assets/thread-route-BAkMWoFr.js +1 -0
- package/dist/client/assets/{thread-route-B_swkleJ.js → thread-route-CG4NoBnV.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-DTCZxxw9.js → thread-sheet-body-iPIMT5tX.js} +1 -1
- package/dist/client/assets/{time-range-picker-VzZM-nq4.js → time-range-picker-DXMtxhmu.js} +1 -1
- package/dist/client/assets/{toggle-group-DDk8xPXe.js → toggle-group-CFCrTuTF.js} +1 -1
- package/dist/client/assets/{tool-namespace-EVeG8Fs5.js → tool-namespace-C9gQSjv3.js} +1 -1
- package/dist/client/assets/{tool-set-selector-DuVmSXqq.js → tool-set-selector-Dpj_1lJt.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-99r2aG4V.js → toolbar-icon-button-Bk7F5Fex.js} +1 -1
- package/dist/client/assets/{tooltip-Dyh2h0NV.js → tooltip-Bj0ggRLV.js} +1 -1
- package/dist/client/assets/{tooltipContext-CQdoW9wa.js → tooltipContext-BSiIa8-6.js} +1 -1
- package/dist/client/assets/{track-B5m4mxJj.js → track-uewKzN4A.js} +1 -1
- package/dist/client/assets/{types-Mb9DEKKQ.js → types-BuSDoCm5.js} +3 -3
- package/dist/client/assets/{url-slug-Cli-NAkj.js → url-slug-BFZflu8h.js} +1 -1
- package/dist/client/assets/{usage-stats-iRJ2oM0y.js → usage-stats-FTjlrZsR.js} +2 -2
- package/dist/client/assets/{use-ai-providers-DQAzIwY2.js → use-ai-providers-hOyNnU7s.js} +1 -1
- package/dist/client/assets/use-apply-named-rule-JRuS8Fqz.js +1 -0
- package/dist/client/assets/use-ask-in-chat-BkWoc5AG.js +1 -0
- package/dist/client/assets/{use-automations-akR-tcRi.js → use-automations-BW9n1XZu.js} +1 -1
- package/dist/client/assets/use-autosave-CFQpxLa7.js +1 -0
- package/dist/client/assets/use-blocks-v8-project-B4vRqcEf.js +1 -0
- package/dist/client/assets/use-chat-layout-state-Bib3kRoh.js +1 -0
- package/dist/client/assets/{use-cms-publish-actions-CntIxbra.js → use-cms-publish-actions-BanOYWkB.js} +5 -5
- package/dist/client/assets/{use-connect-companion-FU7Yjyv3.js → use-connect-companion-hxxGTIoI.js} +1 -1
- package/dist/client/assets/use-connection-CKudd0UO.js +1 -0
- package/dist/client/assets/use-content-sync-DVFphaEf.js +1 -0
- package/dist/client/assets/{use-copy-DJs5balG.js → use-copy-s7vshP5o.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DytcjJ4v.js → use-date-fns-locale-BcLGuFCX.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CY6fvvGj.js → use-debounced-autosave-DF7xOcC9.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CezJqVSj.js → use-debounced-value-B0C48w17.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CHRRrI8G.js → use-deco-credits-Cc7w_fUS.js} +1 -1
- package/dist/client/assets/use-decopilot-events-Ctfpdj_z.js +1 -0
- package/dist/client/assets/use-delete-block-CMQm89VB.js +1 -0
- package/dist/client/assets/use-delete-connection-BM0YKMsI.js +1 -0
- package/dist/client/assets/{use-deployment-admin-mLJFncG4.js → use-deployment-admin-CJOxofw6.js} +1 -1
- package/dist/client/assets/{use-entitlements-mX8bg5XG.js → use-entitlements-BPjzEs4p.js} +1 -1
- package/dist/client/assets/use-fast-preview-draft-url-BwHAw0OT.js +1 -0
- package/dist/client/assets/{use-file-configs-z22DUi0c.js → use-file-configs-DA74H1hE.js} +1 -1
- package/dist/client/assets/{use-id-selection-Bg3vd8Ma.js → use-id-selection-CMNzhPoi.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-r_crN8AB.js → use-inbox-feed-C-HQ6EgP.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CvgjtV8K.js → use-infinite-scroll-M12K1Dpn.js} +1 -1
- package/dist/client/assets/{use-join-requests-DQ56VmKG.js → use-join-requests-ntiStw2Q.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-DLlaHA4v.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-D0LzrG1g.js → use-mcp-auth-status-B2OMY_Tu.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CNXpOf52.js → use-mcp-client-D_jTz-1i.js} +10 -10
- package/dist/client/assets/{use-mcp-prompts-COb2l8gW.js → use-mcp-prompts-CFPSpaeI.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-fDABrIOV.js → use-mcp-tools-BMGCtRJK.js} +1 -1
- package/dist/client/assets/{use-mobile-DDy9Znlf.js → use-mobile-M7B5YJR_.js} +1 -1
- package/dist/client/assets/use-move-blocks-B5DoaBOm.js +1 -0
- package/dist/client/assets/use-navigate-to-agent-BoWId4qC.js +1 -0
- package/dist/client/assets/use-never-published-8p9ySrBa.js +1 -0
- package/dist/client/assets/{use-org-fs-8086pm93.js → use-org-fs-Dpr5-hHp.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-BqoQhBbI.js → use-org-repo-syncs-DOKrzBXU.js} +1 -1
- package/dist/client/assets/{use-org-sso-DNEWwtoA.js → use-org-sso-zsNytoCe.js} +1 -1
- package/dist/client/assets/{use-organization-settings-488vpN0c.js → use-organization-settings-CIEI8bNF.js} +1 -1
- package/dist/client/assets/use-project-native-view-presence-tu_PxC_K.js +1 -0
- package/dist/client/assets/use-project-scope-D1EeIJG0.js +1 -0
- package/dist/client/assets/use-recent-apps-DSYeKmJU.js +1 -0
- package/dist/client/assets/{use-reports-diagnostic-JXB8tUrM.js → use-reports-diagnostic-ChnnkK6V.js} +1 -1
- package/dist/client/assets/use-sandbox-events-bxyyBbR-.js +2 -0
- package/dist/client/assets/{use-secrets-Bj9oVJrr.js → use-secrets-NY7H3OwI.js} +1 -1
- package/dist/client/assets/use-section-preview-base-Beu0iQz9.js +1 -0
- package/dist/client/assets/{use-sidebar-collapsed-CSXlwHC3.js → use-sidebar-collapsed-D0GS7hdN.js} +1 -1
- package/dist/client/assets/{use-tags-CZ8FU88Q.js → use-tags-NAzrZ60o.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-S9D-SUGj.js → use-task-board-analytics-DdzuizDS.js} +1 -1
- package/dist/client/assets/{use-task-board-events-CuH-inlF.js → use-task-board-events-iA0mSg2Q.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-DuTkhVPp.js → use-task-board-item-prs-Dw8_2urj.js} +1 -1
- package/dist/client/assets/{use-task-board-items-BNRTDOsU.js → use-task-board-items-DQYVvsFC.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-CTcrXcvj.js → use-task-board-prompts-DaZyR7M-.js} +1 -1
- package/dist/client/assets/{use-task-metadata-BvTVrzAT.js → use-task-metadata-c0FPnJ80.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-COaP8znq.js → use-thread-outputs-nmtU5Zq-.js} +1 -1
- package/dist/client/assets/use-view-draft-kind-Cu0aFeKZ.js +1 -0
- package/dist/client/assets/{use-voice-input-miWnQR-2.js → use-voice-input-DPQbRCzt.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CfdlXnOy.js +1 -0
- package/dist/client/assets/{useQueries-BYTcJkC-.js → useQueries-BncTnCJs.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-QQvh5ycV.js +1 -0
- package/dist/client/assets/{users-CkCjBxij.js → users-DnLbGcVd.js} +1 -1
- package/dist/client/assets/{utils-Cugj1NVM.js → utils-yu1cqe5g.js} +2 -2
- package/dist/client/assets/variant-calendar-B9yPwKNQ.js +1 -0
- package/dist/client/assets/{variant-matcher-override-CA2qg3Y9.js → variant-matcher-override-DUz7pA6N.js} +1 -1
- package/dist/client/assets/{view-header-CNnF9Sbv.js → view-header-DYVjdF9_.js} +1 -1
- package/dist/client/assets/virtual-mcp-B46xFMzN.js +1 -0
- package/dist/client/assets/{watch-sse-pool-2U2aYEEI.js → watch-sse-pool-Cgkbp7EA.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +584 -584
- package/package.json +1 -1
- package/dist/client/assets/ReferenceLine-CZfceFos.js +0 -1
- package/dist/client/assets/ShoppingBag01-BcBJW8Ry.js +0 -1
- package/dist/client/assets/agent-app-z2dEAE0c.js +0 -1
- package/dist/client/assets/agent-assets-B50PlEch.js +0 -1
- package/dist/client/assets/agent-automation-ZC5pUe0X.js +0 -20
- package/dist/client/assets/agent-automations-BqJwcAQY.js +0 -1
- package/dist/client/assets/agent-calendar-6cFcqsTq.js +0 -1
- package/dist/client/assets/agent-connect-sources-BMcGkScg.js +0 -1
- package/dist/client/assets/agent-deck-oSNNh6Oq.js +0 -1
- package/dist/client/assets/agent-e2e-qon8RqKT.js +0 -1
- package/dist/client/assets/agent-experiments-DSDO0e_Q.js +0 -1
- package/dist/client/assets/agent-file-BDrgchCG.js +0 -1
- package/dist/client/assets/agent-hosting-lyen0G2R.js +0 -1
- package/dist/client/assets/agent-icon-CMiKlX_f.js +0 -1
- package/dist/client/assets/agent-library-BL3gqRVT.js +0 -1
- package/dist/client/assets/agent-library-file-qyRRAu7t.js +0 -1
- package/dist/client/assets/agent-overview-D-M__QCC.js +0 -1
- package/dist/client/assets/agent-releases-CDlgQRKx.js +0 -2
- package/dist/client/assets/agent-settings-J3n5UPp_.js +0 -1
- package/dist/client/assets/agent-site-editor-code-BaufV44m.js +0 -2
- package/dist/client/assets/agent-site-editor-content-BZesN91A.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-n4h_ozj2.js +0 -1
- package/dist/client/assets/agent-view-guard-DGsM3j-h.js +0 -1
- package/dist/client/assets/agent-view-xa9IiygI.js +0 -1
- package/dist/client/assets/ai-providers-CAe-vRzr.js +0 -1
- package/dist/client/assets/api-keys-B7PbIf1K.js +0 -1
- package/dist/client/assets/app-editor-CUySEecw.js +0 -1
- package/dist/client/assets/automations-Dg2lSOc5.js +0 -1
- package/dist/client/assets/autosend-CGJPJD3U.js +0 -1
- package/dist/client/assets/block-document-BAvIRwEs.js +0 -3
- package/dist/client/assets/blog-schema-D7LUSvhR.js +0 -1
- package/dist/client/assets/category-editor-B6mXBz4W.js +0 -1
- package/dist/client/assets/chat-context-DgCR75CY.js +0 -39
- package/dist/client/assets/choose-editor-DOwdvoLE.js +0 -1
- package/dist/client/assets/cms-settings-editor-B6ALhYaf.js +0 -1
- package/dist/client/assets/cms-store-drafts-CZfXb7jx.js +0 -1
- package/dist/client/assets/collapsible-BF7fiKEY.js +0 -1
- package/dist/client/assets/collection-detail-DHIJx408.js +0 -1
- package/dist/client/assets/config-C1KKnNPa.js +0 -1
- package/dist/client/assets/connection-detail-Bt9fqrdv.js +0 -1
- package/dist/client/assets/connections-023t3K8C.js +0 -1
- package/dist/client/assets/content-tab-DnZUk0R_.js +0 -25
- package/dist/client/assets/context-BviRKxpu.js +0 -1
- package/dist/client/assets/discover-CZ-mJztz.js +0 -1
- package/dist/client/assets/experiments-tab-choice-BVL1j6B7.js +0 -1
- package/dist/client/assets/feature-gate-TKaLsYFc.js +0 -1
- package/dist/client/assets/file-explorer-DgzFCGgU.js +0 -2
- package/dist/client/assets/general-Cz8UZeQh.js +0 -1
- package/dist/client/assets/home-Dxjl17s5.js +0 -1
- package/dist/client/assets/hosted-reconcile-D236FadC.js +0 -1
- package/dist/client/assets/index-BVHbGN5c.js +0 -1
- package/dist/client/assets/index-CRog5tFp.js +0 -1
- package/dist/client/assets/index-CXMGhRs4.js +0 -4
- package/dist/client/assets/index-DJZmV4c9.js +0 -1
- package/dist/client/assets/index-DO-A5xCQ.css +0 -1
- package/dist/client/assets/library-D_ryD5pc.js +0 -1
- package/dist/client/assets/mustache-DZix8TV9.js +0 -4
- package/dist/client/assets/named-rule-view-xs5Ukf19.js +0 -1
- package/dist/client/assets/openai-conversation-CKtOG2f6.js +0 -3
- package/dist/client/assets/parse-sections-BqIle9mt.js +0 -20
- package/dist/client/assets/plan-BkqYlxrI.js +0 -1
- package/dist/client/assets/post-calendar-DXSJQozg.js +0 -1
- package/dist/client/assets/post-editor-BOGWSxB3.js +0 -2
- package/dist/client/assets/preview-tab-DoF3705n.js +0 -551
- package/dist/client/assets/project-app-view-BZhEHrBD.js +0 -1
- package/dist/client/assets/project-apps-C1L1P3Il.js +0 -1
- package/dist/client/assets/project-reports-C2rrdScO.js +0 -1
- package/dist/client/assets/project-tasks-BIUh6BbU.js +0 -1
- package/dist/client/assets/projects-Dp44Mtfj.js +0 -1
- package/dist/client/assets/record-editor-Du-SgLkC.js +0 -1
- package/dist/client/assets/redirect-editor-Diqw7Nkh.js +0 -1
- package/dist/client/assets/reports-onboarding-C4BoLN-j.js +0 -1
- package/dist/client/assets/reports-qs02DwnV.js +0 -1
- package/dist/client/assets/reports-tab-Cr_0nAF2.js +0 -2
- package/dist/client/assets/repositories-B4lUSmlm.js +0 -1
- package/dist/client/assets/repositories-CHJClbl6.js +0 -1
- package/dist/client/assets/repository-picker-DhcwcPzc.js +0 -1
- package/dist/client/assets/resolve-tab-icon-JhqhoNvw.js +0 -1
- package/dist/client/assets/review-settings-D1OJYsDt.js +0 -1
- package/dist/client/assets/role-color-CxM5Kzh7.js +0 -1
- package/dist/client/assets/roles-C3sEk6Ey.js +0 -1
- package/dist/client/assets/route-AzUNCIcU.js +0 -1
- package/dist/client/assets/route-CKIi5OR7.js +0 -1
- package/dist/client/assets/route-xJV1Kwll.js +0 -1
- package/dist/client/assets/search-input-BG8rdrCe.js +0 -1
- package/dist/client/assets/section-array-field-B8BsNXRT.js +0 -1
- package/dist/client/assets/sections-editor-2QTriBkM.js +0 -1
- package/dist/client/assets/seo-editor-BPqT6KgW.js +0 -1
- package/dist/client/assets/settings-tab-S0xeJTM-.js +0 -1
- package/dist/client/assets/shell-layout-Dcfsytx-.js +0 -1
- package/dist/client/assets/site-draft-actions-B5A2QjjI.js +0 -3
- package/dist/client/assets/site-draft-view-DsHq6hEs.js +0 -1
- package/dist/client/assets/site-editor-BUp_Zz62.js +0 -1
- package/dist/client/assets/skills-5rkbKVfD.js +0 -1
- package/dist/client/assets/suggestion-DGz7gtzE.js +0 -2
- package/dist/client/assets/synced-repos-MBV_b16M.js +0 -1
- package/dist/client/assets/taskboard-analytics-WayyDOd5.js +0 -1
- package/dist/client/assets/tasks-B6kmgmmz.js +0 -1
- package/dist/client/assets/thread-analytics-CM8gvu0V.js +0 -1
- package/dist/client/assets/thread-route-Ce3yplCj.js +0 -1
- package/dist/client/assets/use-apply-named-rule-qGNe9B-Q.js +0 -1
- package/dist/client/assets/use-ask-in-chat-4DqUxBJG.js +0 -1
- package/dist/client/assets/use-autosave-ClND9MZU.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-DHH8umJ9.js +0 -1
- package/dist/client/assets/use-chat-layout-state-BsOGOEOo.js +0 -1
- package/dist/client/assets/use-connection-e-hq9vT7.js +0 -1
- package/dist/client/assets/use-content-sync-tJgGPJpi.js +0 -1
- package/dist/client/assets/use-decopilot-events-CtnAXgLl.js +0 -1
- package/dist/client/assets/use-delete-connection-Cbnv8IDj.js +0 -1
- package/dist/client/assets/use-fast-preview-draft-url-DrTS3dt5.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-BzQUBql-.js +0 -1
- package/dist/client/assets/use-move-blocks-D7WfYgve.js +0 -1
- package/dist/client/assets/use-navigate-to-agent-B-iTaYhm.js +0 -1
- package/dist/client/assets/use-project-native-view-presence-C27ltBxd.js +0 -1
- package/dist/client/assets/use-project-scope-Dqnjf5Fg.js +0 -1
- package/dist/client/assets/use-recent-apps-2cMLzs_u.js +0 -1
- package/dist/client/assets/use-sandbox-events-D9uSNLH2.js +0 -2
- package/dist/client/assets/use-section-preview-base-DoOLobhv.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DqQNqcJl.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-0A6saVT8.js +0 -1
- package/dist/client/assets/variant-calendar-CumR4poM.js +0 -1
- package/dist/client/assets/virtual-mcp-NII7Lu6q.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{fI as U,q as xe,b as V,r as L,e as Ae,K as Q,fJ as oe,ea as Ee,fK as Me,fL as le,fM as ae,fN as Oe,fO as Fe,fP as ze,fQ as Le,fR as He,fS as Re,c as H,j as o,x as Ue,aT as $e,w as Be,dY as Ie,R as Qe,v as Ve,D as qe,m as Ge,B as ve,h as _e,t as ke,X as Ye,bu as ce,Y as ee,a7 as We,Z as Je,_ as Ze}from"./index-5IFWC0PS.js";import{u as Xe}from"./use-voice-input-DPQbRCzt.js";import{x as Ke,c as et,u as Se,v as tt,ax as it,ay as je,az as nt,aA as _,aB as X,an as rt,aC as st,aD as fe,aE as te,aF as ue,Z as ot,X as lt,Y as at,aG as ct,aH as de,af as ft,aI as ut,y as dt,$ as mt,aJ as ht,aK as pt,aL as gt,a1 as yt}from"./site-editor-toast-CAmfWZOg.js";import{b as xt,h as vt,a as kt,d as me,e as he,f as St,c as jt,g as wt}from"./hosted-reconcile-gX34y3hJ.js";import{z as bt,y as Pt}from"./blocks-tab-states-CPXZUbSV.js";import{s as Ct}from"./sandbox-git-api-DcqI6XE4.js";import{u as Nt}from"./chat-context-BXBBnsXM.js";import{b as Dt}from"./sandbox-url-D3mC8qhT.js";import{d as Tt}from"./utils-yu1cqe5g.js";import{d as At}from"./delay-CnY5UFtP.js";import{i as Et}from"./AlertCircle-BdE1rZoJ.js";import{P as Mt,e as Ot}from"./agent-icon-bK3wLPrb.js";import{a as Ft}from"./SwitchHorizontal01-Dkkqg27i.js";import{b as K}from"./Tool01-D4tVVqAj.js";import{i as we}from"./Upload01-CsOcxm5q.js";import{S as zt}from"./search-input-CgAhBcAm.js";import{T as Lt,a as Ht,c as Rt,b as Ut}from"./tabs-BVFow_A3.js";import{u as $t}from"./use-debounced-value-B0C48w17.js";import{a as Bt}from"./use-file-configs-DA74H1hE.js";import{a as It,u as Qt,i as be,e as Vt,b as pe,f as qt}from"./asset-utils-CwQVXoYw.js";import{f as q,M as Gt,c as _t,g as Z}from"./usage-stats-FTjlrZsR.js";function Yt(t,e,i,r={}){return Pe("",t,e,i,r)}function Pe(t,e,i,r,n){if(Y(i,r)||Y(e,r))return i;if(Y(e,i))return r;if(ie(i)&&ie(r)){const s=ie(e)?e:{},c={},f=[...Object.keys(i),...Object.keys(r).filter(h=>!(h in i))];for(const h of f){const p=Pe(`${t}/${Wt(h)}`,s[h],i[h],r[h],n);p!==void 0&&(c[h]=p)}return c}if(Array.isArray(e)&&Array.isArray(i)&&Array.isArray(r)&&i.length===e.length&&r.length===e.length){const s=[];for(const[c,f]of e.entries()){const h=!Y(f,i[c]),p=!Y(f,r[c]);if(h&&p&&!Y(i[c],r[c]))return ge(t,i,r,n);s.push(h?i[c]:r[c])}return s}return ge(t,i,r,n)}function ge(t,e,i,r){return r.conflicts?.push(t),r.prefer==="theirs"?i:e}function Wt(t){return t.replaceAll("~","~0").replaceAll("/","~1")}function Y(t,e){return U(t)===U(e)}function ie(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function Jt(t){return t?1e3:700}function ne(t){return!!t&&typeof t=="object"&&t.keptTheirs===!0}const W=new Map,Zt=20,Xt=200,Kt=1500;function Ce(t){const e=W.get(t);W.delete(t);const i=e??[];if(W.set(t,i),W.size>Xt){const r=W.keys().next().value;r!==void 0&&W.delete(r)}return i}function ei(t,e){const i=Ce(t);i.push(U(e)),i.length>Zt&&i.shift()}function ti(t,e){return Ce(t).includes(U(e))}async function ii(t,e){if(e){if(e.value===void 0)return{[t]:null};try{return{[t]:await Re(e.value)}}catch{return}}}function ni({orgSlug:t,virtualMcpId:e,branch:i},r){const n=xe(),s=Nt()?.taskId??null,c=Ke(e),f=Xe(e).runtime==="cms",{url:h}=et(e),p=Se(e,i),y=p.kind==="protocol"?p:null,u=tt({orgSlug:t,virtualMcpId:e,branch:i}),k=V(),w=y?.source==="github",[m]=L.useState(()=>r?.holdsCopy?new wt(()=>gt(n,u)):null);m?.settle();const g=w?m:null,S=async(l,a,d,j)=>{if(h)return{blockKey:l,data:a};if(f){const v=async($,E)=>{const B=await ii(l,E);return ht({orgSlug:t,virtualMcpId:e,branch:i},{set:{[l]:$},...B?{expect:B}:{}})},b=`${u}:${l}`,P=($,E=[])=>new _($,E.length>0?k("sectionsEditor.sectionsEditor.blockFieldsChangedElsewhere",{fields:He(E)}):k("sectionsEditor.sectionsEditor.blockChangedElsewhere"),E),D=async $=>{await n.invalidateQueries({queryKey:Q.decofile(u)});const E=n.getQueryData(Q.decofile(u))?.[l];if(d&&ti(b,E)&&U(E)!==U(d.value))return await At(Kt),{draft:await v(a,d),written:a};const B=[],G=j&&d?.fromCache?Yt(d.value,a,E,{prefer:"theirs",conflicts:B}):void 0;if(G===void 0||B.length>0)throw P($.blocks,B);const I=oe(G);return{draft:await v(I,{value:E}),written:I}};let R=a,F;try{F=await v(a,d)}catch($){if(!($ instanceof _))throw $;try{({draft:F,written:R}=await D($))}catch(E){throw!(E instanceof _)||E.fields.length>0?E:(await n.invalidateQueries({queryKey:Q.decofile(u)}),P(E.blocks))}}return ei(b,R),ut(n,{orgSlug:t,virtualMcpId:e,branch:i},F),await n.invalidateQueries({queryKey:Ct({orgSlug:t,virtualMcpId:e,branch:i,threadId:s})}),{...F,written:R}}const x=dt(c,Tt(l)),N=JSON.stringify(a,null,2),A=await fetch(Dt({orgSlug:t,virtualMcpId:e,branch:i,threadId:s},"write"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:x,content:N})});return A.ok?A.json():mt(A,"Write")},C=async(l,a,d,j,x,N)=>{const A=y,v={queryClient:n,backend:A,params:l,cacheKey:u};let b=d,P=x?void 0:N?N.value:j?.value,D=x?{[a]:null}:N?{[a]:await vt(N,Me(n,u,a))}:await kt(v,[a],j?{[a]:j.value}:void 0);for(let R=0;;R++)try{return{...await te(n,A,l,u,{set:{[a]:b}},D),written:b}}catch(F){if(!X(F))throw F;const $=await ue(n,A,l,u,a,F),E=n.getQueryData(Q.decofile(u))?.[a],B=de(n,u,a,A),G=b;if(R+1>=me||!le()||B===void 0||!J(G)||E!==void 0&&!J(E))throw new _([a],R+1>=me?k("siteEditor.save.keptChanging"):k("siteEditor.save.conflict"),[],$);if(D={[a]:B},!J(E)){if(!J(P))continue;if(await ae({kind:"theyDeleted",label:he(a,P,G)})==="theirs")return{keptTheirs:!0,deleted:!0};P=void 0;continue}const I=Oe({ancestor:J(P)?P:{},mine:G,theirs:E}),se=I.pointers.length===0?{}:await Fe(I,ze(I,T(l,E),!0),{block:bt(a,E),author:{draft:l,blockKey:a}});if(b=I.pointers.length===0?I.merged:Le(I,se),St(se)&&U(b)===U(E))return{keptTheirs:!0,deleted:!1};P=E}},T=(l,a)=>{const d=a.__resolveType,j=n.getQueryData(ft(l,y));if(typeof d!="string"||!j?.manifest)return null;try{return Pt(d,j)}catch{return null}},z=async(l,a,d,j,x)=>{const N=y,A=n.getQueryData(Q.decofile(u));if(A&&Object.hasOwn(A,a)||!le()||!J(d))return;if(await ae({kind:"theyDeleted",label:he(a,x?.value,d)})==="theirs")return{keptTheirs:!0,deleted:!0};const b=de(n,u,a,N);if(b===void 0)return;const P=await te(n,N,l,u,{set:{[a]:d}},{[a]:b});return j.onApplied?.(P.versions),{...P,written:d}},M=Ae({mutationKey:at(t,e,i),scope:lt(t,e,i),mutationFn:async({blockKey:l,data:a,base:d,rebaseOnConflict:j=!0,guard:x,create:N=!1,edit:A})=>{if(p.kind==="pending"||p.kind==="unavailable")throw rt("CMS storage");if(y?.source!=="github"&&(a=oe(a)),y){const v={orgSlug:t,virtualMcpId:e,branch:i},b=D=>{!g||ne(D)||U(D.written)===U(a)&&D.versions[l]&&g.saved(l,a)};if(w&&!x){const D=await C(v,l,a,d,N,N?void 0:g?.guardOf(l,A));return b(D),D}if(w&&x&&!x.reloadOnConflict){const D=await x.ifMatch(l),R=N||!!D&&D[l]===null;try{const F=await C(v,l,a,d,R,R?void 0:g?.guardOf(l,A));return b(F),x.onApplied?.(ne(F)?{}:F.versions),F}catch(F){throw x.onRejected?.(F),F}}let P=await x?.ifMatch(l);if(x&&!P&&w&&(await st(n,y,v,u).catch(()=>{throw new fe}),P=await x.ifMatch(l),!P))throw new fe;try{const D=await te(n,y,v,u,{set:{[l]:a}},P);return P&&x?.onApplied?.(D.versions),D}catch(D){if(P&&x?.onRejected?.(D),P&&x?.reloadOnConflict&&X(D)){const R=await ue(n,y,v,u,l,D);if(w)try{const F=await z(v,l,a,x,d);if(F)return F}catch(F){if(!X(F))throw F}throw new _([l],k("sectionsEditor.sectionsEditor.blockChangedElsewhere"),[],R)}throw D}}return ot({queryClient:n,orgSlug:t,virtualMcpId:e,branch:i,backend:p,cacheKey:u},{kind:"edit",write:()=>S(l,a,d,j)})},onMutate:async({blockKey:l,data:a})=>{const d=Q.decofile(u);await n.cancelQueries({queryKey:d});const j=n.getQueryData(d),x=!!j&&l in j,N=j?.[l];return n.setQueryData(d,A=>({...A??{},[l]:a})),{queryKey:d,blockKey:l,hadKey:x,previousValue:N}},onError:(l,a,d)=>{nt(k,l),!(!d||l instanceof _)&&(X(l)&&n.invalidateQueries({queryKey:d.queryKey}),n.setQueryData(d.queryKey,j=>{if(!j)return j;if(!d.hadKey){const{[d.blockKey]:x,...N}=j;return N}return{...j,[d.blockKey]:d.previousValue}}))},onSuccess:(l,{blockKey:a,data:d})=>{const j=()=>{if(!g)return;const N=jt({orgSlug:t,virtualMcpId:e,branch:i});Ee.schedule(()=>xt(N,a))};if(ne(l)){it(k,l.deleted,l.deleted&&je(n,u,a)),j();return}const x=l&&typeof l=="object"&&"written"in l?l.written:d;n.setQueryData(Q.decofile(u),N=>({...N??{},[a]:x})),U(x)!==U(d)&&j()}}),O=l=>{if(l.base)return l;const a=n.getQueryData(Q.decofile(u));return a?{...l,base:{value:a[l.blockKey],fromCache:!0}}:l};return{...M,v8:p.kind!=="legacy",mutate:(l,a)=>M.mutate(O(l),a),mutateAsync:(l,a)=>M.mutateAsync(O(l),a),reportError:l=>ct(k,l,y?.source??null),hold:l=>m?.hold(l),holdsCopy:g!==null,autosaveDelay:Jt(y!==null),edited:l=>g?.edited(l),shown:l=>g?.get(l)}}function tn(t,e){const i=H.c(29),r=e?.holdsCopy;let n;i[0]!==r?(n={holdsCopy:r},i[0]=r,i[1]=n):n=i[1];const s=ni(t,n);let c;i[2]===Symbol.for("react.memo_cache_sentinel")?(c=new Map,i[2]=c):c=i[2];const f=L.useRef(c);let h;i[3]===Symbol.for("react.memo_cache_sentinel")?(h=new Map,i[3]=h):h=i[3];const p=L.useRef(h);let y;i[4]===Symbol.for("react.memo_cache_sentinel")?(y=new Map,i[4]=y):y=i[4];const u=L.useRef(y);let k;i[5]===Symbol.for("react.memo_cache_sentinel")?(k=new Set,i[5]=k):k=i[5];const w=L.useRef(k);let m;i[6]===Symbol.for("react.memo_cache_sentinel")?(m=new Set,i[6]=m):m=i[6];const g=L.useRef(m);let S,C;i[7]!==e||i[8]!==s?(S=v=>{if(w.current.has(v)){g.current.add(v);return}const b=f.current.get(v);if(!b)return;const P=typeof b=="function"?b():b;f.current.delete(v);const D=p.current.get(v);p.current.delete(v),P&&(w.current.add(v),s.mutateAsync({blockKey:v,data:P,guard:e?.guard,edit:D}).then(()=>e?.onSaved?.(),s.reportError).finally(()=>{w.current.delete(v),g.current.delete(v)&&S(v)}))},C=()=>{for(const v of u.current.values())clearTimeout(v);u.current.clear();for(const v of[...f.current.keys()])S(v)},i[7]=e,i[8]=s,i[9]=S,i[10]=C):(S=i[9],C=i[10]);const T=C;let z;i[11]===Symbol.for("react.memo_cache_sentinel")?(z=v=>{for(const b of v){const P=u.current.get(b);P&&clearTimeout(P),u.current.delete(b),f.current.delete(b),p.current.delete(b),g.current.delete(b)}},i[11]=z):z=i[11],pt(t.orgSlug,t.virtualMcpId,z);let M,O;i[12]===Symbol.for("react.memo_cache_sentinel")?(O=()=>{const v=b=>{(f.current.size>0||w.current.size>0)&&b.preventDefault()};return window.addEventListener("beforeunload",v),()=>window.removeEventListener("beforeunload",v)},M=[],i[12]=M,i[13]=O):(M=i[12],O=i[13]),L.useEffect(O,M);let l;i[14]!==T||i[15]!==s.holdsCopy?(l=()=>(s.holdsCopy&&T(),s.holdsCopy),i[14]=T,i[15]=s.holdsCopy,i[16]=l):l=i[16];const a=L.useEffectEvent(l);let d;i[17]!==a?(d=()=>{const v=u.current;return()=>{if(!a())for(const b of v.values())clearTimeout(b)}},i[17]=a,i[18]=d):d=i[18];let j;i[19]===Symbol.for("react.memo_cache_sentinel")?(j=[],i[19]=j):j=i[19],L.useEffect(d,j);let x;i[20]!==S||i[21]!==s?(x=(v,b)=>{if(!p.current.has(v)){const D=s.edited(v);D&&p.current.set(v,D)}f.current.set(v,b);const P=u.current.get(v);P&&clearTimeout(P),u.current.set(v,setTimeout(()=>{u.current.delete(v),S(v)},s.autosaveDelay))},i[20]=S,i[21]=s,i[22]=x):x=i[22];const N=x;let A;return i[23]!==T||i[24]!==N||i[25]!==s.hold||i[26]!==s.isPending||i[27]!==s.v8?(A={save:N,flush:T,isPending:s.isPending,hold:s.hold,v8:s.v8},i[23]=T,i[24]=N,i[25]=s.hold,i[26]=s.isPending,i[27]=s.v8,i[28]=A):A=i[28],A}function J(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}const Ne="file-picker:last-config-id";function nn(t){const e=H.c(31),i=V(),r=t.open,n=t.onOpenChange;let s;e[0]!==t.mode||e[1]!==i?(s=t.mode==="image"?i("filePicker.filePickerDialog.pickAnImage"):i("filePicker.filePickerDialog.pickAFile"),e[0]=t.mode,e[1]=i,e[2]=s):s=e[2];let c;e[3]!==s?(c=o.jsx(Ue,{children:s}),e[3]=s,e[4]=c):c=e[4];let f;e[5]!==i?(f=i("filePicker.filePickerDialog.description"),e[5]=i,e[6]=f):f=e[6];let h;e[7]!==f?(h=o.jsx($e,{children:f}),e[7]=f,e[8]=h):h=e[8];let p;e[9]!==c||e[10]!==h?(p=o.jsxs(Be,{children:[c,h]}),e[9]=c,e[10]=h,e[11]=p):p=e[11];let y;e[12]!==i?(y=C=>{const{error:T}=C;return o.jsx(ri,{error:T??new Error(i("filePicker.filePickerDialog.failedToLoadBuckets"))})},e[12]=i,e[13]=y):y=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(Ie,{className:"h-64 w-full"}),e[14]=u):u=e[14];let k;e[15]!==t?(k=C=>{t.onSelect(C),t.onOpenChange(!1)},e[15]=t,e[16]=k):k=e[16];let w;e[17]!==t.lockedConfigId||e[18]!==t.mode||e[19]!==k?(w=o.jsx(L.Suspense,{fallback:u,children:o.jsx(si,{mode:t.mode,lockedConfigId:t.lockedConfigId,onSelect:k})}),e[17]=t.lockedConfigId,e[18]=t.mode,e[19]=k,e[20]=w):w=e[20];let m;e[21]!==w||e[22]!==y?(m=o.jsx(Qe,{fallback:y,children:w}),e[21]=w,e[22]=y,e[23]=m):m=e[23];let g;e[24]!==m||e[25]!==p?(g=o.jsxs(Ve,{className:"sm:max-w-3xl max-h-[85vh] overflow-hidden flex flex-col",children:[p,m]}),e[24]=m,e[25]=p,e[26]=g):g=e[26];let S;return e[27]!==t.onOpenChange||e[28]!==t.open||e[29]!==g?(S=o.jsx(qe,{open:r,onOpenChange:n,children:g}),e[27]=t.onOpenChange,e[28]=t.open,e[29]=g,e[30]=S):S=e[30],S}function ri(t){const e=H.c(3),{error:i}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(Et,{size:16}),e[0]=r):r=e[0];let n;return e[1]!==i.message?(n=o.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[r,o.jsx("span",{className:"text-sm font-medium",children:i.message})]}),e[1]=i.message,e[2]=n):n=e[2],n}function si(t){const e=H.c(32),{mode:i,lockedConfigId:r,onSelect:n}=t,s=Bt();if(s.length===0){let m;return e[0]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(ai,{}),e[0]=m):m=e[0],m}if(r){let m;if(e[1]!==s||e[2]!==r){let S;e[4]!==r?(S=C=>C.id===r,e[4]=r,e[5]=S):S=e[5],m=s.find(S),e[1]=s,e[2]=r,e[3]=m}else m=e[3];const g=m;if(g){let S;return e[6]!==g||e[7]!==i||e[8]!==n?(S=o.jsx(re,{config:g,mode:i,onSelect:n}),e[6]=g,e[7]=i,e[8]=n,e[9]=S):S=e[9],S}}if(s.length===1){const m=s[0];let g;return e[10]!==m||e[11]!==i||e[12]!==n?(g=o.jsx(re,{config:m,mode:i,onSelect:n}),e[10]=m,e[11]=i,e[12]=n,e[13]=g):g=e[13],g}let c;e[14]===Symbol.for("react.memo_cache_sentinel")?(c=typeof window<"u"?window.localStorage.getItem(Ne):null,e[14]=c):c=e[14];const f=c;let h;e[15]!==s?(h=s.find(m=>m.id===f)?.id??s[0].id,e[15]=s,e[16]=h):h=e[16];const p=h;let y;e[17]!==s?(y=s.map(oi),e[17]=s,e[18]=y):y=e[18];let u;e[19]!==y?(u=o.jsx(Ht,{className:"self-start",children:y}),e[19]=y,e[20]=u):u=e[20];let k;if(e[21]!==s||e[22]!==i||e[23]!==n){let m;e[25]!==i||e[26]!==n?(m=g=>o.jsx(Rt,{value:g.id,className:"min-h-0 flex-1 overflow-hidden flex flex-col",children:o.jsx(re,{config:g,mode:i,onSelect:n})},g.id),e[25]=i,e[26]=n,e[27]=m):m=e[27],k=s.map(m),e[21]=s,e[22]=i,e[23]=n,e[24]=k}else k=e[24];let w;return e[28]!==p||e[29]!==u||e[30]!==k?(w=o.jsxs(Ut,{defaultValue:p,onValueChange:li,className:"min-h-0 flex-1 flex flex-col",children:[u,k]}),e[28]=p,e[29]=u,e[30]=k,e[31]=w):w=e[31],w}function oi(t){return o.jsx(Lt,{value:t.id,children:t.name},t.id)}function li(t){typeof window<"u"&&window.localStorage.setItem(Ne,t)}function ai(){const t=H.c(12),e=V();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:o.jsx(we,{size:20,className:"text-muted-foreground"})}),t[0]=i):i=t[0];let r;t[1]!==e?(r=e("filePicker.filePickerDialog.noBucketConfigured"),t[1]=e,t[2]=r):r=t[2];let n;t[3]!==r?(n=o.jsx("p",{className:"font-medium text-sm",children:r}),t[3]=r,t[4]=n):n=t[4];let s;t[5]!==e?(s=e("filePicker.filePickerDialog.noBucketDescription"),t[5]=e,t[6]=s):s=t[6];let c;t[7]!==s?(c=o.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:s}),t[7]=s,t[8]=c):c=t[8];let f;return t[9]!==n||t[10]!==c?(f=o.jsxs("div",{className:"rounded-xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[i,o.jsxs("div",{children:[n,c]})]}),t[9]=n,t[10]=c,t[11]=f):f=t[11],f}function re({config:t,mode:e,onSelect:i}){const r=V(),[n,s]=L.useState(""),c=$t(n,300),f=It({configId:t.id,search:c,imageOnly:e==="image"}),h=Qt(),[p,y]=L.useState(!1),u=L.useRef(null),k=e==="image"?"image/*":void 0;async function w(a){if(!a)return;const d=Array.from(a);if(d.length===0)return;let j=null;const x=[];for(const N of d)try{const A=await h.mutateAsync({configId:t.id,file:N});j??=A.publicUrl}catch(A){x.push(`${N.name} (${A instanceof Error?A.message:"upload failed"})`)}await f.refetch(),x.length>0&&ke.error(x.length===d.length?r("filePicker.filePickerDialog.uploadFailedAll",{errors:x.join("; ")}):r("filePicker.filePickerDialog.uploadFailedSome",{errors:x.join("; ")})),j&&i(j)}function m(a){a.preventDefault(),y(!0)}function g(){y(!1)}function S(a){a.preventDefault(),a.stopPropagation(),y(!1),w(a.dataTransfer.files)}const T=(f.data?.pages??[]).flatMap(a=>a.items),z=T.filter(a=>e==="image"?be(a.key):!0),M=c.trim(),O=T.length>0||n.trim().length>0,l=n!==c||f.isFetching&&!f.isFetchingNextPage;return o.jsxs("div",{className:"flex flex-col gap-3 min-h-0 flex-1",children:[o.jsxs("button",{type:"button",onClick:()=>u.current?.click(),onDragOver:m,onDragLeave:g,onDrop:S,className:Ge("rounded-xl border border-dashed border-border/60 p-6 flex flex-col items-center justify-center gap-2 text-center transition-colors",p&&"border-primary bg-primary/5",h.isPending&&"opacity-60 pointer-events-none"),children:[o.jsx(we,{size:18,className:"text-muted-foreground"}),o.jsx("p",{className:"text-sm font-medium",children:h.isPending?r("filePicker.filePickerDialog.uploading"):r("filePicker.filePickerDialog.dropFilesOrClick")}),o.jsxs("p",{className:"text-xs text-muted-foreground",children:[r("filePicker.filePickerDialog.uploadSizeLimit")," ",r(e==="image"?"filePicker.filePickerDialog.imagesOnlyTypes":"filePicker.filePickerDialog.commonMediaTypes")]}),o.jsx("input",{ref:u,type:"file",accept:k,multiple:!0,className:"hidden",onChange:a=>{const d=Array.from(a.target.files??[]);a.target.value="",w(d)}})]}),O?o.jsx(zt,{value:n,onChange:s,isSearching:l,placeholder:r(e==="image"?"filePicker.filePickerDialog.searchImagesPlaceholder":"filePicker.filePickerDialog.searchFilesPlaceholder"),className:"shrink-0"}):null,o.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto pr-1",children:[z.length===0?M?o.jsx(ui,{query:M}):e==="image"&&T.length>0?o.jsx(fi,{}):o.jsx(ci,{}):e==="image"?o.jsx(di,{items:z,onSelect:i}):o.jsx(mi,{items:z,onSelect:i}),f.hasNextPage&&o.jsx("div",{className:"flex justify-center py-4",children:o.jsx(ve,{type:"button",variant:"outline",size:"sm",disabled:f.isFetchingNextPage,onClick:()=>f.fetchNextPage(),children:f.isFetchingNextPage?o.jsxs(o.Fragment,{children:[o.jsx(_e,{className:"size-3.5"}),r("filePicker.filePickerDialog.loading")]}):r("filePicker.filePickerDialog.loadMore")})})]})]})}function ci(){const t=H.c(12),e=V();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:o.jsx(K,{size:18,className:"text-muted-foreground"})}),t[0]=i):i=t[0];let r;t[1]!==e?(r=e("filePicker.filePickerDialog.noFilesYet"),t[1]=e,t[2]=r):r=t[2];let n;t[3]!==r?(n=o.jsx("p",{className:"text-sm font-medium",children:r}),t[3]=r,t[4]=n):n=t[4];let s;t[5]!==e?(s=e("filePicker.filePickerDialog.dropFileToGetStarted"),t[5]=e,t[6]=s):s=t[6];let c;t[7]!==s?(c=o.jsx("p",{className:"text-xs text-muted-foreground",children:s}),t[7]=s,t[8]=c):c=t[8];let f;return t[9]!==n||t[10]!==c?(f=o.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[i,n,c]}),t[9]=n,t[10]=c,t[11]=f):f=t[11],f}function fi(){const t=H.c(12),e=V();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:o.jsx(K,{size:18,className:"text-muted-foreground"})}),t[0]=i):i=t[0];let r;t[1]!==e?(r=e("filePicker.filePickerDialog.noImagesYet"),t[1]=e,t[2]=r):r=t[2];let n;t[3]!==r?(n=o.jsx("p",{className:"text-sm font-medium",children:r}),t[3]=r,t[4]=n):n=t[4];let s;t[5]!==e?(s=e("filePicker.filePickerDialog.noImagesFormatDesc"),t[5]=e,t[6]=s):s=t[6];let c;t[7]!==s?(c=o.jsx("p",{className:"text-xs text-muted-foreground",children:s}),t[7]=s,t[8]=c):c=t[8];let f;return t[9]!==n||t[10]!==c?(f=o.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[i,n,c]}),t[9]=n,t[10]=c,t[11]=f):f=t[11],f}function ui(t){const e=H.c(13),{query:i}=t,r=V();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:o.jsx(K,{size:18,className:"text-muted-foreground"})}),e[0]=n):n=e[0];let s;e[1]!==i||e[2]!==r?(s=r("filePicker.filePickerDialog.noMatches",{query:i}),e[1]=i,e[2]=r,e[3]=s):s=e[3];let c;e[4]!==s?(c=o.jsx("p",{className:"text-sm font-medium",children:s}),e[4]=s,e[5]=c):c=e[5];let f;e[6]!==r?(f=r("filePicker.filePickerDialog.tryDifferentSearchOrLoadMore"),e[6]=r,e[7]=f):f=e[7];let h;e[8]!==f?(h=o.jsx("p",{className:"text-xs text-muted-foreground",children:f}),e[8]=f,e[9]=h):h=e[9];let p;return e[10]!==c||e[11]!==h?(p=o.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[n,c,h]}),e[10]=c,e[11]=h,e[12]=p):p=e[12],p}function di(t){const e=H.c(7),{items:i,onSelect:r}=t;let n;if(e[0]!==i||e[1]!==r){let c;e[3]!==r?(c=f=>o.jsx(De,{item:f,variant:"image",onSelect:r},f.key),e[3]=r,e[4]=c):c=e[4],n=i.map(c),e[0]=i,e[1]=r,e[2]=n}else n=e[2];let s;return e[5]!==n?(s=o.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3",children:n}),e[5]=n,e[6]=s):s=e[6],s}function mi(t){const e=H.c(7),{items:i,onSelect:r}=t;let n;if(e[0]!==i||e[1]!==r){let c;e[3]!==r?(c=f=>o.jsx("li",{children:o.jsx(De,{item:f,variant:"row",onSelect:r})},f.key),e[3]=r,e[4]=c):c=e[4],n=i.map(c),e[0]=i,e[1]=r,e[2]=n}else n=e[2];let s;return e[5]!==n?(s=o.jsx("ul",{className:"divide-y divide-border/60 rounded-lg border border-border/60",children:n}),e[5]=n,e[6]=s):s=e[6],s}function De(t){const e=H.c(58),{item:i,variant:r,onSelect:n}=t;let s;e[0]!==i.key?(s=Vt(i.key),e[0]=i.key,e[1]=s):s=e[1];const c=s;if(r==="image"){let z;e[2]!==i.publicUrl||e[3]!==n?(z=()=>n(i.publicUrl),e[2]=i.publicUrl,e[3]=n,e[4]=z):z=e[4];let M;e[5]!==i.key||e[6]!==i.publicUrl?(M=o.jsx("img",{src:i.publicUrl,alt:i.key,loading:"lazy",className:"h-full w-full object-cover",onError:hi}),e[5]=i.key,e[6]=i.publicUrl,e[7]=M):M=e[7];let O;e[8]!==i.key||e[9]!==z||e[10]!==M?(O=o.jsx("button",{type:"button",onClick:z,className:"block h-full w-full transition hover:ring-2 hover:ring-primary",title:i.key,children:M}),e[8]=i.key,e[9]=z,e[10]=M,e[11]=O):O=e[11];let l;e[12]!==c?(l=o.jsx("span",{className:"pointer-events-none absolute left-1.5 top-1.5 rounded bg-background/80 px-1.5 py-0.5 text-2xs font-medium uppercase text-foreground opacity-0 backdrop-blur-sm transition-opacity group-hover:opacity-100",children:c}),e[12]=c,e[13]=l):l=e[13];let a;e[14]!==i||e[15]!==n?(a=o.jsx("div",{className:"absolute right-1.5 top-1.5 opacity-0 transition-opacity group-hover:opacity-100",children:o.jsx(ye,{item:i,onSelect:n})}),e[14]=i,e[15]=n,e[16]=a):a=e[16];let d;e[17]!==i.key?(d=pe(i.key),e[17]=i.key,e[18]=d):d=e[18];let j;e[19]!==d?(j=o.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 to-transparent p-2 opacity-0 transition-opacity group-hover:opacity-100",children:o.jsx("p",{className:"truncate text-xs text-white",children:d})}),e[19]=d,e[20]=j):j=e[20];let x;return e[21]!==O||e[22]!==l||e[23]!==a||e[24]!==j?(x=o.jsxs("div",{className:"group relative aspect-square overflow-hidden rounded-lg border border-border/60 bg-muted",children:[O,l,a,j]}),e[21]=O,e[22]=l,e[23]=a,e[24]=j,e[25]=x):x=e[25],x}let f;e[26]!==i.publicUrl||e[27]!==n?(f=()=>n(i.publicUrl),e[26]=i.publicUrl,e[27]=n,e[28]=f):f=e[28];let h;e[29]!==i.key?(h=o.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-md bg-muted",children:be(i.key)?o.jsx(K,{size:16,className:"text-muted-foreground"}):o.jsx(Mt,{size:16,className:"text-muted-foreground"})}),e[29]=i.key,e[30]=h):h=e[30];let p;e[31]!==i.key?(p=pe(i.key),e[31]=i.key,e[32]=p):p=e[32];let y;e[33]!==p?(y=o.jsx("p",{className:"truncate text-sm font-medium",children:p}),e[33]=p,e[34]=y):y=e[34];let u;e[35]!==i.key?(u=o.jsx("p",{className:"truncate font-mono text-xs text-muted-foreground",children:i.key}),e[35]=i.key,e[36]=u):u=e[36];let k;e[37]!==y||e[38]!==u?(k=o.jsxs("div",{className:"min-w-0 flex-1",children:[y,u]}),e[37]=y,e[38]=u,e[39]=k):k=e[39];let w;e[40]!==c?(w=o.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-2xs font-medium uppercase text-muted-foreground",children:c}),e[40]=c,e[41]=w):w=e[41];let m;e[42]!==i.size?(m=qt(i.size),e[42]=i.size,e[43]=m):m=e[43];let g;e[44]!==m?(g=o.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:m}),e[44]=m,e[45]=g):g=e[45];let S;e[46]!==g||e[47]!==f||e[48]!==h||e[49]!==k||e[50]!==w?(S=o.jsxs("button",{type:"button",onClick:f,className:"flex min-w-0 flex-1 items-center gap-3 text-left",children:[h,k,w,g]}),e[46]=g,e[47]=f,e[48]=h,e[49]=k,e[50]=w,e[51]=S):S=e[51];let C;e[52]!==i||e[53]!==n?(C=o.jsx(ye,{item:i,onSelect:n}),e[52]=i,e[53]=n,e[54]=C):C=e[54];let T;return e[55]!==S||e[56]!==C?(T=o.jsxs("div",{className:"group flex items-center gap-3 px-3 py-2 transition hover:bg-accent",children:[S,C]}),e[55]=S,e[56]=C,e[57]=T):T=e[57],T}function hi(t){t.target.style.display="none"}function ye(t){const e=H.c(39),{item:i,onSelect:r}=t,n=V(),[s,c]=L.useState(!1);let f;e[0]!==i.publicUrl||e[1]!==n?(f=async function(x){x.preventDefault(),x.stopPropagation();try{await navigator.clipboard.writeText(i.publicUrl),c(!0),window.setTimeout(()=>c(!1),1500)}catch{ke.error(n("filePicker.filePickerDialog.failedToCopyUrl"))}},e[0]=i.publicUrl,e[1]=n,e[2]=f):f=e[2];const h=f;let p;e[3]!==n?(p=n("filePicker.filePickerDialog.assetActions"),e[3]=n,e[4]=p):p=e[4];let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx(Ft,{size:14}),e[5]=y):y=e[5];let u;e[6]!==p?(u=o.jsx(Ye,{asChild:!0,children:o.jsx(ve,{type:"button",variant:"ghost",size:"icon-sm",className:"bg-background/80 backdrop-blur-sm",onClick:yi,"aria-label":p,children:y})}),e[6]=p,e[7]=u):u=e[7];let k;e[8]!==i.publicUrl||e[9]!==r?(k=()=>r(i.publicUrl),e[8]=i.publicUrl,e[9]=r,e[10]=k):k=e[10];let w;e[11]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(ce,{size:14}),e[11]=w):w=e[11];let m;e[12]!==n?(m=n("filePicker.filePickerDialog.useThis"),e[12]=n,e[13]=m):m=e[13];let g;e[14]!==k||e[15]!==m?(g=o.jsxs(ee,{onClick:k,children:[w,m]}),e[14]=k,e[15]=m,e[16]=g):g=e[16];let S;e[17]!==s?(S=s?o.jsx(ce,{size:14}):o.jsx(Ot,{size:14}),e[17]=s,e[18]=S):S=e[18];let C;e[19]!==s||e[20]!==n?(C=n(s?"filePicker.filePickerDialog.copied":"filePicker.filePickerDialog.copyUrl"),e[19]=s,e[20]=n,e[21]=C):C=e[21];let T;e[22]!==h||e[23]!==C||e[24]!==S?(T=o.jsxs(ee,{onClick:h,children:[S,C]}),e[22]=h,e[23]=C,e[24]=S,e[25]=T):T=e[25];const z=i.publicUrl;let M;e[26]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsx(We,{size:14}),e[26]=M):M=e[26];let O;e[27]!==n?(O=n("filePicker.filePickerDialog.openInNewTab"),e[27]=n,e[28]=O):O=e[28];let l;e[29]!==i.publicUrl||e[30]!==O?(l=o.jsx(ee,{asChild:!0,children:o.jsxs("a",{href:z,target:"_blank",rel:"noreferrer",onClick:pi,children:[M,O]})}),e[29]=i.publicUrl,e[30]=O,e[31]=l):l=e[31];let a;e[32]!==T||e[33]!==l||e[34]!==g?(a=o.jsxs(Je,{align:"end",onClick:gi,children:[g,T,l]}),e[32]=T,e[33]=l,e[34]=g,e[35]=a):a=e[35];let d;return e[36]!==a||e[37]!==u?(d=o.jsxs(Ze,{children:[u,a]}),e[36]=a,e[37]=u,e[38]=d):d=e[38],d}function pi(t){return t.stopPropagation()}function gi(t){return t.stopPropagation()}function yi(t){return t.stopPropagation()}function rn(t,e,i){return e||(t.length===1?t[0].id:t.length===0?null:t.some(r=>r.id===i)?i:null)}const xi=new Set(["http:","https:"]),vi=/[\u0000-\u001F\u007F]/g;function ki(t){return t.replace(vi,"").trim()}const Si=/^[a-zA-Z][a-zA-Z0-9+.-]*:/;function sn(t){return ji(t)!==""}function ji(t){const e=ki(t);if(!e)return"";if(!Si.test(e))try{return encodeURI(e)}catch{return""}try{const i=new URL(e);return xi.has(i.protocol)||i.protocol==="data:"&&/^data:image\//i.test(i.href)?i.href:""}catch{return""}}const wi=q.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(i=>e.updateAttributes(i,{textAlign:t})).some(i=>i):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:t=>({editor:e,commands:i})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?i.unsetTextAlign():i.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});var on=wi;const bi=20,Te=(t,e=0)=>{const i=[];return!t.children.length||e>bi||Array.from(t.children).forEach(r=>{r.tagName==="SPAN"?i.push(r):r.children.length&&i.push(...Te(r,e+1))}),i},Pi=t=>{if(!t.children.length)return;const e=Te(t);e&&e.forEach(i=>{var r;const n=i.getAttribute("style"),s=(r=i.parentElement)===null||r===void 0||(r=r.closest("span"))===null||r===void 0?void 0:r.getAttribute("style");i.setAttribute("style",`${s};${n}`)})},Ci=Gt.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!0}},parseHTML(){return[{tag:"span",consuming:!1,getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&Pi(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",_t(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleTextStyle:t=>({commands:e})=>e.toggleMark(this.name,t),removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(i,r)=>{if(!i.isInline)return!0;i.marks.filter(n=>n.type===this.type).some(n=>Object.values(n.attrs).some(s=>!!s))||t.removeMark(r,r+i.nodeSize,this.type)}),!0}}}}),Ni=q.create({name:"backgroundColor",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:t=>{var e;const i=(e=Z(t,"background-color"))!==null&&e!==void 0?e:t.style.backgroundColor;return i?.replace(/['"]+/g,"")},renderHTML:t=>t.backgroundColor?{style:`background-color: ${t.backgroundColor}`}:{}}}}]},addCommands(){return{setBackgroundColor:t=>({chain:e})=>e().setMark("textStyle",{backgroundColor:t}).run(),unsetBackgroundColor:()=>({chain:t})=>t().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}),Di=q.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;const i=(e=Z(t,"color"))!==null&&e!==void 0?e:t.style.color;return i?.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),Ti=q.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>{var e;return(e=Z(t,"font-family"))!==null&&e!==void 0?e:t.style.fontFamily},renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),Ai=q.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>{var e;return(e=Z(t,"font-size"))!==null&&e!==void 0?e:t.style.fontSize},renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),Ei=q.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>{var e;return(e=Z(t,"line-height"))!==null&&e!==void 0?e:t.style.lineHeight},renderHTML:t=>t.lineHeight?{style:`line-height: ${t.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:t=>({chain:e})=>e().setMark("textStyle",{lineHeight:t}).run(),unsetLineHeight:()=>({chain:t})=>t().setMark("textStyle",{lineHeight:null}).removeEmptyTextStyle().run()}}});q.create({name:"textStyleKit",addExtensions(){const t=[];return this.options.backgroundColor!==!1&&t.push(Ni.configure(this.options.backgroundColor)),this.options.color!==!1&&t.push(Di.configure(this.options.color)),this.options.fontFamily!==!1&&t.push(Ti.configure(this.options.fontFamily)),this.options.fontSize!==!1&&t.push(Ai.configure(this.options.fontSize)),this.options.lineHeight!==!1&&t.push(Ei.configure(this.options.lineHeight)),this.options.textStyle!==!1&&t.push(Ci.configure(this.options.textStyle)),t}});function ln(t){const e=H.c(6),i=xe(),r=Se(t.virtualMcpId,t.branch);if(r.kind!=="protocol"||r.source!=="github")return Mi;let n;e[0]!==r||e[1]!==t?(n=yt(t,r),e[0]=r,e[1]=t,e[2]=n):n=e[2];const s=n;let c;return e[3]!==s||e[4]!==i?(c=f=>je(i,s,f),e[3]=s,e[4]=i,e[5]=c):c=e[5],c}function Mi(){return!1}export{Di as C,nn as F,Ne as L,Ci as T,ln as a,tn as b,Ai as c,on as d,Jt as e,sn as i,ne as k,rn as r,ji as s,ni as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as F,a4 as w,K as y,i as $,q as k,e as P}from"./index-Dd5hidCj.js";import{u as x}from"./useInfiniteQuery-DqQNqcJl.js";function G(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function p(n,e,t,s){const i=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${i?`?${i}`:""}`}async function h(n,e,t){const s=await fetch(n,e);if(s.ok||t?.allow404&&s.status===404)return s;let i="";try{i=(await s.json()).error??""}catch{}throw new Error(i||`HTTP ${s.status}`)}async function E(n,e,t){return(await(await h(p(n,e,"list",{path:t}))).json()).entries.toSorted((r,a)=>r.kind!==a.kind?r.kind==="dir"?-1:1:r.path.localeCompare(a.path))}function Z(n,e,t){const s=F.c(16),{org:i}=w(),r=t?.enabled??!0;let a;s[0]!==i.id||s[1]!==e||s[2]!==n?(a=y.orgFsList(i.id,n,e),s[0]=i.id,s[1]=e,s[2]=n,s[3]=a):a=s[3];let o;s[4]!==i.id||s[5]!==n?(o=(f,u)=>u?.queryKey[1]===i.id&&u.queryKey[2]===n?f:void 0,s[4]=i.id,s[5]=n,s[6]=o):o=s[6];let c;s[7]!==i.slug||s[8]!==e||s[9]!==n?(c=()=>E(i.slug,n,e),s[7]=i.slug,s[8]=e,s[9]=n,s[10]=c):c=s[10];let l;return s[11]!==r||s[12]!==a||s[13]!==o||s[14]!==c?(l={enabled:r,queryKey:a,placeholderData:o,queryFn:c},s[11]=r,s[12]=a,s[13]=o,s[14]=c,s[15]=l):l=s[15],$(l)}async function _(n,e,t){const s=await h(p(n,e,"stat",{path:t}),void 0,{allow404:!0});return s.status===404?null:(await s.json()).entry}function v(n,e,t){const s=F.c(16),{org:i}=w();let r;s[0]!==i.id||s[1]!==e||s[2]!==n?(r=y.orgFsStat(i.id,n??"",e),s[0]=i.id,s[1]=e,s[2]=n,s[3]=r):r=s[3];const a=n!==null,o=t?.staleTime;let c;s[4]!==t?(c=t?.refetchIntervalWhenAbsent?u=>u.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=c):c=s[5];let l;s[6]!==i.slug||s[7]!==e||s[8]!==n?(l=()=>_(i.slug,n??"",e),s[6]=i.slug,s[7]=e,s[8]=n,s[9]=l):l=s[9];let f;return s[10]!==r||s[11]!==a||s[12]!==o||s[13]!==c||s[14]!==l?(f={queryKey:r,enabled:a,staleTime:o,refetchInterval:c,queryFn:l},s[10]=r,s[11]=a,s[12]=o,s[13]=c,s[14]=l,s[15]=f):f=s[15],$(f)}function ee(n,e){const t=F.c(9),s=n===void 0?60:n,{org:i}=w();let r;t[0]!==i.id?(r=y.orgFsRecent(i.id),t[0]=i.id,t[1]=r):r=t[1];const a=e?.enabled;let o;t[2]!==s||t[3]!==i.slug?(o=async()=>(await(await h(`/api/${encodeURIComponent(i.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=i.slug,t[4]=o):o=t[4];let c;return t[5]!==r||t[6]!==a||t[7]!==o?(c={queryKey:r,enabled:a,queryFn:o},t[5]=r,t[6]=a,t[7]=o,t[8]=c):c=t[8],$(c)}const R=200;function te(n){const e=F.c(9),{org:t}=w();let s;e[0]!==t.id||e[1]!==n?(s=y.orgFsVolumeFiles(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let i;e[3]!==t.slug||e[4]!==n?(i=async a=>{const{pageParam:o}=a,c=new URLSearchParams({limit:String(R)});return o&&c.set("before",o),await(await h(`/api/${encodeURIComponent(t.slug)}/fs/${encodeURIComponent(n)}/files?${c}`)).json()},e[3]=t.slug,e[4]=n,e[5]=i):i=e[5];let r;return e[6]!==s||e[7]!==i?(r={queryKey:s,initialPageParam:null,queryFn:i,getNextPageParam:C},e[6]=s,e[7]=i,e[8]=r):r=e[8],x(r)}function C(n){return n.next??void 0}const U=50;function se(n,e){const t=F.c(16),{org:s}=w();let i;t[0]!==s.id||t[1]!==n||t[2]!==e?.prefix||t[3]!==e?.volume?(i=y.orgFsSearch(s.id,n,e?.volume??"",e?.prefix??""),t[0]=s.id,t[1]=n,t[2]=e?.prefix,t[3]=e?.volume,t[4]=i):i=t[4];const r=n.length>0;let a;t[5]!==s.id?(a=(l,f)=>f?.queryKey[1]===s.id?l:void 0,t[5]=s.id,t[6]=a):a=t[6];let o;t[7]!==s.slug||t[8]!==n||t[9]!==e?(o=async()=>{const l=new URLSearchParams({q:n,limit:String(U)});return e&&(l.set("volume",e.volume),e.prefix&&l.set("prefix",e.prefix)),(await(await h(`/api/${encodeURIComponent(s.slug)}/fs/search?${l}`)).json()).entries},t[7]=s.slug,t[8]=n,t[9]=e,t[10]=o):o=t[10];let c;return t[11]!==i||t[12]!==r||t[13]!==a||t[14]!==o?(c={queryKey:i,enabled:r,placeholderData:a,queryFn:o},t[11]=i,t[12]=r,t[13]=a,t[14]=o,t[15]=c):c=t[15],$(c)}function ne(n){const e=F.c(8),{org:t}=w();let s;e[0]!==t.id?(s=y.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const i=n?.enabled;let r;e[2]!==t.slug?(r=async()=>{const o=await h(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await o.json();return c.map(j)},e[2]=t.slug,e[3]=r):r=e[3];let a;return e[4]!==s||e[5]!==i||e[6]!==r?(a={queryKey:s,enabled:i,queryFn:r},e[4]=s,e[5]=i,e[6]=r,e[7]=a):a=e[7],$(a)}function j(n){return{volume:n.volume,path:n.path}}async function Q(n){const e=await h(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}function ie(){const n=F.c(7),{org:e}=w();let t;n[0]!==e.id?(t=y.slashSkills(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=()=>Q(e.slug),n[2]=e.slug,n[3]=s):s=n[3];let i;return n[4]!==t||n[5]!==s?(i={queryKey:t,queryFn:s,staleTime:6e4},n[4]=t,n[5]=s,n[6]=i):i=n[6],$(i)}async function M(n,e,t){return(await h(p(n,e,"read",{path:t}))).text()}function re(n,e){const t=F.c(8);let s;t[0]!==n?(s=y.fileText(n),t[0]=n,t[1]=s):s=t[1];const i=e?.enabled!==!1&&n!=="";let r;t[2]!==n?(r=async()=>{const o=await fetch(n,{credentials:"include"});return o.ok?await o.text():null},t[2]=n,t[3]=r):r=t[3];let a;return t[4]!==s||t[5]!==i||t[6]!==r?(a={queryKey:s,enabled:i,staleTime:6e4,retry:!1,queryFn:r},t[4]=s,t[5]=i,t[6]=r,t[7]=a):a=t[7],$(a)}const A=new Set(["md","mdx","markdown","txt","text"]),D=25,N=64*1024,H=256*1024,V=4;function W(n){const e=n.lastIndexOf(".");return e===-1?!1:A.has(n.slice(e+1).toLowerCase())}async function ae(n,e,t){const s=t?`${t}/`:"",i=u=>u.startsWith(s)?u.slice(s.length):u,r=[],a=[],o=[{path:t,depth:0}];for(;o.length>0;){const u=o.shift();if(!u)break;let g;try{g=(await(await h(p(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const d of[...g].sort((b,m)=>b.path.localeCompare(m.path))){if(d.kind==="dir"){u.depth<V&&o.push({path:d.path,depth:u.depth+1});continue}W(d.path)&&d.size<=N&&r.length<D?r.push(d.path):a.push(i(d.path))}}const c=await Promise.all(r.map(u=>M(n,e,u).catch(()=>null))),l=[];let f=0;return r.forEach((u,g)=>{const d=c[g];if(d==null||f+d.length>H){a.push(i(u));return}f+=d.length,l.push({relPath:i(u),content:d})}),l.sort((u,g)=>u.relPath==="SKILL.md"?-1:g.relPath==="SKILL.md"?1:u.relPath.localeCompare(g.relPath)),a.sort(),{files:l,omittedPaths:a}}function oe(){const n=F.c(7),{org:e}=w();let t;n[0]!==e.id?(t=y.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await h(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let i;return n[4]!==t||n[5]!==s?(i={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=i):i=n[6],$(i)}function le(n){const e=F.c(3),{org:t}=w();let s;return e[0]!==t.slug||e[1]!==n?(s=i=>p(t.slug,n,"read",{path:i}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function ce(){const n=F.c(2),{org:e}=w();let t;return n[0]!==e.slug?(t=(s,i)=>p(e.slug,s,"read",{path:i}),n[0]=e.slug,n[1]=t):t=n[1],t}function ue(n){const e=F.c(3),{org:t}=w();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async i=>(await(await h(p(t.slug,n,"file",{path:i.path}),{method:"PUT",headers:{"content-type":i.contentType??"text/html; charset=utf-8"},body:i.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],P(s)}async function fe(n,e,t,s,i,r="text/markdown; charset=utf-8"){const a={"content-type":r};i&&"absent"in i?a["if-none-match"]="*":i&&(a["if-match"]=`"${i.contentHash}"`);const o=await fetch(p(n,e,"file",{path:t}),{method:"PUT",headers:a,body:s});if(o.status===412)return{ok:!1,reason:"conflict"};if(o.status===403)return{ok:!1,reason:"forbidden"};if(!o.ok)throw new Error(`HTTP ${o.status}`);return{ok:!0,entry:(await o.json()).entry}}function de(n){const e=F.c(18),{org:t}=w(),s=k();let i;e[0]!==t||e[1]!==n?(i=async l=>(await(await h(p(t.slug,n,"public",{path:l.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:l.mode,password:l.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=i):i=e[2];let r;e[3]!==t||e[4]!==s||e[5]!==n?(r=async l=>{const f=y.orgFsStat(t.id,n,l.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),g=l.mode!=="private";return s.setQueryData(f,d=>d&&{...d,readPublic:g,effectivePublic:g,shareMode:l.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=r):r=e[6];let a;e[7]!==s?(a=(l,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=a):a=e[8];let o;e[9]!==t||e[10]!==s||e[11]!==n?(o=(l,f,u)=>{s.invalidateQueries({queryKey:y.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:y.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:y.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:y.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=o):o=e[12];let c;return e[13]!==i||e[14]!==r||e[15]!==a||e[16]!==o?(c={mutationFn:i,onMutate:r,onError:a,onSettled:o},e[13]=i,e[14]=r,e[15]=a,e[16]=o,e[17]=c):c=e[17],P(c)}function X(n,e,t){n.invalidateQueries({queryKey:y.orgFsVolume(e,t)}),n.invalidateQueries({queryKey:y.orgFsRecent(e)}),n.invalidateQueries({queryKey:y.orgFsSearchRoot(e)})}function ge(n){const e=F.c(33),{org:t}=w(),s=k();let i;e[0]!==t||e[1]!==s||e[2]!==n?(i=()=>X(s,t.id,n),e[0]=t,e[1]=s,e[2]=n,e[3]=i):i=e[3];const r=i;let a;e[4]!==t||e[5]!==n?(a=async S=>{const T=(await Promise.allSettled(S.files.map(L=>{const q=S.dir?`${S.dir}/${L.name}`:L.name;return h(p(t.slug,n,"file",{path:q}),{method:"PUT",headers:{"content-type":L.type||"application/octet-stream"},body:L})}))).find(Y);if(T)throw T.reason},e[4]=t,e[5]=n,e[6]=a):a=e[6];let o;e[7]!==r||e[8]!==a?(o={mutationFn:a,onSettled:r},e[7]=r,e[8]=a,e[9]=o):o=e[9];const c=P(o);let l;e[10]!==t||e[11]!==n?(l=async S=>{await h(p(t.slug,n,"dir",{path:S}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=l):l=e[12];let f;e[13]!==r||e[14]!==l?(f={mutationFn:l,onSuccess:r},e[13]=r,e[14]=l,e[15]=f):f=e[15];const u=P(f);let g;e[16]!==t||e[17]!==n?(g=async S=>{await h(p(t.slug,n,"file",{path:S}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=g):g=e[18];let d;e[19]!==r||e[20]!==g?(d={mutationFn:g,onSuccess:r},e[19]=r,e[20]=g,e[21]=d):d=e[21];const b=P(d);let m;e[22]!==t||e[23]!==n?(m=async S=>{await h(p(t.slug,n,"move"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(S)})},e[22]=t,e[23]=n,e[24]=m):m=e[24];let I;e[25]!==r||e[26]!==m?(I={mutationFn:m,onSuccess:r},e[25]=r,e[26]=m,e[27]=I):I=e[27];const O=P(I);let K;return e[28]!==u||e[29]!==O||e[30]!==b||e[31]!==c?(K={upload:c,mkdir:u,remove:b,move:O},e[28]=u,e[29]=O,e[30]=b,e[31]=c,e[32]=K):K=e[32],K}function Y(n){return n.status==="rejected"}export{le as a,Q as b,v as c,ue as d,G as e,ae as f,de as g,re as h,E as i,ie as j,ge as k,ce as l,X as m,_ as n,M as o,ee as p,ne as q,oe as r,se as s,te as t,Z as u,fe as w};
|
|
1
|
+
import{c as F,a4 as w,K as y,i as $,q as k,e as P}from"./index-5IFWC0PS.js";import{u as x}from"./useInfiniteQuery-CfdlXnOy.js";function G(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function p(n,e,t,s){const i=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${i?`?${i}`:""}`}async function h(n,e,t){const s=await fetch(n,e);if(s.ok||t?.allow404&&s.status===404)return s;let i="";try{i=(await s.json()).error??""}catch{}throw new Error(i||`HTTP ${s.status}`)}async function E(n,e,t){return(await(await h(p(n,e,"list",{path:t}))).json()).entries.toSorted((r,a)=>r.kind!==a.kind?r.kind==="dir"?-1:1:r.path.localeCompare(a.path))}function Z(n,e,t){const s=F.c(16),{org:i}=w(),r=t?.enabled??!0;let a;s[0]!==i.id||s[1]!==e||s[2]!==n?(a=y.orgFsList(i.id,n,e),s[0]=i.id,s[1]=e,s[2]=n,s[3]=a):a=s[3];let o;s[4]!==i.id||s[5]!==n?(o=(f,u)=>u?.queryKey[1]===i.id&&u.queryKey[2]===n?f:void 0,s[4]=i.id,s[5]=n,s[6]=o):o=s[6];let c;s[7]!==i.slug||s[8]!==e||s[9]!==n?(c=()=>E(i.slug,n,e),s[7]=i.slug,s[8]=e,s[9]=n,s[10]=c):c=s[10];let l;return s[11]!==r||s[12]!==a||s[13]!==o||s[14]!==c?(l={enabled:r,queryKey:a,placeholderData:o,queryFn:c},s[11]=r,s[12]=a,s[13]=o,s[14]=c,s[15]=l):l=s[15],$(l)}async function _(n,e,t){const s=await h(p(n,e,"stat",{path:t}),void 0,{allow404:!0});return s.status===404?null:(await s.json()).entry}function v(n,e,t){const s=F.c(16),{org:i}=w();let r;s[0]!==i.id||s[1]!==e||s[2]!==n?(r=y.orgFsStat(i.id,n??"",e),s[0]=i.id,s[1]=e,s[2]=n,s[3]=r):r=s[3];const a=n!==null,o=t?.staleTime;let c;s[4]!==t?(c=t?.refetchIntervalWhenAbsent?u=>u.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=c):c=s[5];let l;s[6]!==i.slug||s[7]!==e||s[8]!==n?(l=()=>_(i.slug,n??"",e),s[6]=i.slug,s[7]=e,s[8]=n,s[9]=l):l=s[9];let f;return s[10]!==r||s[11]!==a||s[12]!==o||s[13]!==c||s[14]!==l?(f={queryKey:r,enabled:a,staleTime:o,refetchInterval:c,queryFn:l},s[10]=r,s[11]=a,s[12]=o,s[13]=c,s[14]=l,s[15]=f):f=s[15],$(f)}function ee(n,e){const t=F.c(9),s=n===void 0?60:n,{org:i}=w();let r;t[0]!==i.id?(r=y.orgFsRecent(i.id),t[0]=i.id,t[1]=r):r=t[1];const a=e?.enabled;let o;t[2]!==s||t[3]!==i.slug?(o=async()=>(await(await h(`/api/${encodeURIComponent(i.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=i.slug,t[4]=o):o=t[4];let c;return t[5]!==r||t[6]!==a||t[7]!==o?(c={queryKey:r,enabled:a,queryFn:o},t[5]=r,t[6]=a,t[7]=o,t[8]=c):c=t[8],$(c)}const R=200;function te(n){const e=F.c(9),{org:t}=w();let s;e[0]!==t.id||e[1]!==n?(s=y.orgFsVolumeFiles(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let i;e[3]!==t.slug||e[4]!==n?(i=async a=>{const{pageParam:o}=a,c=new URLSearchParams({limit:String(R)});return o&&c.set("before",o),await(await h(`/api/${encodeURIComponent(t.slug)}/fs/${encodeURIComponent(n)}/files?${c}`)).json()},e[3]=t.slug,e[4]=n,e[5]=i):i=e[5];let r;return e[6]!==s||e[7]!==i?(r={queryKey:s,initialPageParam:null,queryFn:i,getNextPageParam:C},e[6]=s,e[7]=i,e[8]=r):r=e[8],x(r)}function C(n){return n.next??void 0}const U=50;function se(n,e){const t=F.c(16),{org:s}=w();let i;t[0]!==s.id||t[1]!==n||t[2]!==e?.prefix||t[3]!==e?.volume?(i=y.orgFsSearch(s.id,n,e?.volume??"",e?.prefix??""),t[0]=s.id,t[1]=n,t[2]=e?.prefix,t[3]=e?.volume,t[4]=i):i=t[4];const r=n.length>0;let a;t[5]!==s.id?(a=(l,f)=>f?.queryKey[1]===s.id?l:void 0,t[5]=s.id,t[6]=a):a=t[6];let o;t[7]!==s.slug||t[8]!==n||t[9]!==e?(o=async()=>{const l=new URLSearchParams({q:n,limit:String(U)});return e&&(l.set("volume",e.volume),e.prefix&&l.set("prefix",e.prefix)),(await(await h(`/api/${encodeURIComponent(s.slug)}/fs/search?${l}`)).json()).entries},t[7]=s.slug,t[8]=n,t[9]=e,t[10]=o):o=t[10];let c;return t[11]!==i||t[12]!==r||t[13]!==a||t[14]!==o?(c={queryKey:i,enabled:r,placeholderData:a,queryFn:o},t[11]=i,t[12]=r,t[13]=a,t[14]=o,t[15]=c):c=t[15],$(c)}function ne(n){const e=F.c(8),{org:t}=w();let s;e[0]!==t.id?(s=y.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const i=n?.enabled;let r;e[2]!==t.slug?(r=async()=>{const o=await h(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await o.json();return c.map(j)},e[2]=t.slug,e[3]=r):r=e[3];let a;return e[4]!==s||e[5]!==i||e[6]!==r?(a={queryKey:s,enabled:i,queryFn:r},e[4]=s,e[5]=i,e[6]=r,e[7]=a):a=e[7],$(a)}function j(n){return{volume:n.volume,path:n.path}}async function Q(n){const e=await h(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}function ie(){const n=F.c(7),{org:e}=w();let t;n[0]!==e.id?(t=y.slashSkills(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=()=>Q(e.slug),n[2]=e.slug,n[3]=s):s=n[3];let i;return n[4]!==t||n[5]!==s?(i={queryKey:t,queryFn:s,staleTime:6e4},n[4]=t,n[5]=s,n[6]=i):i=n[6],$(i)}async function M(n,e,t){return(await h(p(n,e,"read",{path:t}))).text()}function re(n,e){const t=F.c(8);let s;t[0]!==n?(s=y.fileText(n),t[0]=n,t[1]=s):s=t[1];const i=e?.enabled!==!1&&n!=="";let r;t[2]!==n?(r=async()=>{const o=await fetch(n,{credentials:"include"});return o.ok?await o.text():null},t[2]=n,t[3]=r):r=t[3];let a;return t[4]!==s||t[5]!==i||t[6]!==r?(a={queryKey:s,enabled:i,staleTime:6e4,retry:!1,queryFn:r},t[4]=s,t[5]=i,t[6]=r,t[7]=a):a=t[7],$(a)}const A=new Set(["md","mdx","markdown","txt","text"]),D=25,N=64*1024,H=256*1024,V=4;function W(n){const e=n.lastIndexOf(".");return e===-1?!1:A.has(n.slice(e+1).toLowerCase())}async function ae(n,e,t){const s=t?`${t}/`:"",i=u=>u.startsWith(s)?u.slice(s.length):u,r=[],a=[],o=[{path:t,depth:0}];for(;o.length>0;){const u=o.shift();if(!u)break;let g;try{g=(await(await h(p(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const d of[...g].sort((b,m)=>b.path.localeCompare(m.path))){if(d.kind==="dir"){u.depth<V&&o.push({path:d.path,depth:u.depth+1});continue}W(d.path)&&d.size<=N&&r.length<D?r.push(d.path):a.push(i(d.path))}}const c=await Promise.all(r.map(u=>M(n,e,u).catch(()=>null))),l=[];let f=0;return r.forEach((u,g)=>{const d=c[g];if(d==null||f+d.length>H){a.push(i(u));return}f+=d.length,l.push({relPath:i(u),content:d})}),l.sort((u,g)=>u.relPath==="SKILL.md"?-1:g.relPath==="SKILL.md"?1:u.relPath.localeCompare(g.relPath)),a.sort(),{files:l,omittedPaths:a}}function oe(){const n=F.c(7),{org:e}=w();let t;n[0]!==e.id?(t=y.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await h(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let i;return n[4]!==t||n[5]!==s?(i={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=i):i=n[6],$(i)}function le(n){const e=F.c(3),{org:t}=w();let s;return e[0]!==t.slug||e[1]!==n?(s=i=>p(t.slug,n,"read",{path:i}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function ce(){const n=F.c(2),{org:e}=w();let t;return n[0]!==e.slug?(t=(s,i)=>p(e.slug,s,"read",{path:i}),n[0]=e.slug,n[1]=t):t=n[1],t}function ue(n){const e=F.c(3),{org:t}=w();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async i=>(await(await h(p(t.slug,n,"file",{path:i.path}),{method:"PUT",headers:{"content-type":i.contentType??"text/html; charset=utf-8"},body:i.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],P(s)}async function fe(n,e,t,s,i,r="text/markdown; charset=utf-8"){const a={"content-type":r};i&&"absent"in i?a["if-none-match"]="*":i&&(a["if-match"]=`"${i.contentHash}"`);const o=await fetch(p(n,e,"file",{path:t}),{method:"PUT",headers:a,body:s});if(o.status===412)return{ok:!1,reason:"conflict"};if(o.status===403)return{ok:!1,reason:"forbidden"};if(!o.ok)throw new Error(`HTTP ${o.status}`);return{ok:!0,entry:(await o.json()).entry}}function de(n){const e=F.c(18),{org:t}=w(),s=k();let i;e[0]!==t||e[1]!==n?(i=async l=>(await(await h(p(t.slug,n,"public",{path:l.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:l.mode,password:l.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=i):i=e[2];let r;e[3]!==t||e[4]!==s||e[5]!==n?(r=async l=>{const f=y.orgFsStat(t.id,n,l.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),g=l.mode!=="private";return s.setQueryData(f,d=>d&&{...d,readPublic:g,effectivePublic:g,shareMode:l.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=r):r=e[6];let a;e[7]!==s?(a=(l,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=a):a=e[8];let o;e[9]!==t||e[10]!==s||e[11]!==n?(o=(l,f,u)=>{s.invalidateQueries({queryKey:y.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:y.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:y.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:y.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=o):o=e[12];let c;return e[13]!==i||e[14]!==r||e[15]!==a||e[16]!==o?(c={mutationFn:i,onMutate:r,onError:a,onSettled:o},e[13]=i,e[14]=r,e[15]=a,e[16]=o,e[17]=c):c=e[17],P(c)}function X(n,e,t){n.invalidateQueries({queryKey:y.orgFsVolume(e,t)}),n.invalidateQueries({queryKey:y.orgFsRecent(e)}),n.invalidateQueries({queryKey:y.orgFsSearchRoot(e)})}function ge(n){const e=F.c(33),{org:t}=w(),s=k();let i;e[0]!==t||e[1]!==s||e[2]!==n?(i=()=>X(s,t.id,n),e[0]=t,e[1]=s,e[2]=n,e[3]=i):i=e[3];const r=i;let a;e[4]!==t||e[5]!==n?(a=async S=>{const T=(await Promise.allSettled(S.files.map(L=>{const q=S.dir?`${S.dir}/${L.name}`:L.name;return h(p(t.slug,n,"file",{path:q}),{method:"PUT",headers:{"content-type":L.type||"application/octet-stream"},body:L})}))).find(Y);if(T)throw T.reason},e[4]=t,e[5]=n,e[6]=a):a=e[6];let o;e[7]!==r||e[8]!==a?(o={mutationFn:a,onSettled:r},e[7]=r,e[8]=a,e[9]=o):o=e[9];const c=P(o);let l;e[10]!==t||e[11]!==n?(l=async S=>{await h(p(t.slug,n,"dir",{path:S}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=l):l=e[12];let f;e[13]!==r||e[14]!==l?(f={mutationFn:l,onSuccess:r},e[13]=r,e[14]=l,e[15]=f):f=e[15];const u=P(f);let g;e[16]!==t||e[17]!==n?(g=async S=>{await h(p(t.slug,n,"file",{path:S}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=g):g=e[18];let d;e[19]!==r||e[20]!==g?(d={mutationFn:g,onSuccess:r},e[19]=r,e[20]=g,e[21]=d):d=e[21];const b=P(d);let m;e[22]!==t||e[23]!==n?(m=async S=>{await h(p(t.slug,n,"move"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(S)})},e[22]=t,e[23]=n,e[24]=m):m=e[24];let I;e[25]!==r||e[26]!==m?(I={mutationFn:m,onSuccess:r},e[25]=r,e[26]=m,e[27]=I):I=e[27];const O=P(I);let K;return e[28]!==u||e[29]!==O||e[30]!==b||e[31]!==c?(K={upload:c,mkdir:u,remove:b,move:O},e[28]=u,e[29]=O,e[30]=b,e[31]=c,e[32]=K):K=e[32],K}function Y(n){return n.status==="rejected"}export{le as a,Q as b,v as c,ue as d,G as e,ae as f,de as g,re as h,E as i,ie as j,ge as k,ce as l,X as m,_ as n,M as o,ee as p,ne as q,oe as r,se as s,te as t,Z as u,fe as w};
|
package/dist/client/assets/{use-org-repo-syncs-BqoQhBbI.js → use-org-repo-syncs-DOKrzBXU.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,a4 as f,
|
|
1
|
+
import{c as r,a4 as f,ak as y,K as S,i as _,q as d,e as R}from"./index-5IFWC0PS.js";const p=5e3;function m(e){return(e??[]).some(n=>!n.lastSyncedAt&&!n.lastSyncError)}function g(){const e=r.c(7),{org:n}=f(),t=y();let i;e[0]!==n.id?(i=S.orgRepoSyncs(n.id),e[0]=n.id,e[1]=i):i=e[1];let s;e[2]!==t?(s=async()=>(await t.call("ORG_REPO_SYNC_LIST",{})).configs,e[2]=t,e[3]=s):s=e[3];let o;return e[4]!==i||e[5]!==s?(o={queryKey:i,staleTime:6e4,refetchInterval:E,queryFn:s},e[4]=i,e[5]=s,e[6]=o):o=e[6],_(o)}function E(e){return m(e.state.data)?p:!1}function P(){const e=r.c(2),n=g();let t;return e[0]!==n.data?(t=new Set((n.data??[]).map(O)),e[0]=n.data,e[1]=t):t=e[1],t}function O(e){return e.volume}function q(){const e=r.c(12),{org:n}=f(),t=y(),i=d();let s;e[0]!==n||e[1]!==i?(s=()=>i.invalidateQueries({queryKey:S.orgRepoSyncs(n.id)}),e[0]=n,e[1]=i,e[2]=s):s=e[2];const o=s;let c;e[3]!==t?(c=async u=>(await t.call("ORG_REPO_SYNC_CREATE",u)).config,e[3]=t,e[4]=c):c=e[4];let a;e[5]!==o||e[6]!==t?(a=u=>{t.call("ORG_REPO_SYNC_RUN",{id:u.id}).catch(C).then(o)},e[5]=o,e[6]=t,e[7]=a):a=e[7];let l;return e[8]!==o||e[9]!==c||e[10]!==a?(l={mutationFn:c,onSuccess:a,onSettled:o},e[8]=o,e[9]=c,e[10]=a,e[11]=l):l=e[11],R(l)}function C(){return null}function T(){const e=r.c(8),{org:n}=f(),t=y(),i=d();let s;e[0]!==t?(s=a=>t.call("ORG_REPO_SYNC_DELETE",{id:a}),e[0]=t,e[1]=s):s=e[1];let o;e[2]!==n||e[3]!==i?(o=()=>i.invalidateQueries({queryKey:S.orgRepoSyncs(n.id)}),e[2]=n,e[3]=i,e[4]=o):o=e[4];let c;return e[5]!==s||e[6]!==o?(c={mutationFn:s,onSettled:o},e[5]=s,e[6]=o,e[7]=c):c=e[7],R(c)}export{P as a,q as b,T as c,g as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,i as S,q as r,e as y,K as c}from"./index-
|
|
1
|
+
import{c as u,i as S,q as r,e as y,K as c}from"./index-5IFWC0PS.js";async function f(i,a,e){const s=await fetch(i,a);if(!s.ok){const t=await s.json().catch(()=>null);throw new Error(t?.error||e)}return s.json()}function q(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoStatus(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/status`,void 0,"Failed to check SSO status"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function C(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoConfig(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/config`,void 0,"Failed to fetch SSO config"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function O(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)},"Failed to save SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function m(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=()=>f(`/api/${a}/sso/config`,{method:"DELETE"},"Failed to delete SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function h(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config/enforce`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enforced:l})},"Failed to toggle SSO enforcement"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}export{C as a,O as b,m as c,h as d,q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,a as w,
|
|
1
|
+
import{c as u,a as w,dS as b,a4 as E,i as F,al as M,K as y,ak as T,q as A,e as O}from"./index-5IFWC0PS.js";import{D as C,o as G,a as $}from"./schema-Dc_MkHkp.js";import{r as z}from"./task-board-DVtARw_U.js";const I={organizationId:"",sidebar_items:null,coding_agent_mcp_excluded:null,simple_mode:null,default_home_agents:null,flags:null,submodule_credentials:null},x={tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}};function P(t,e){return{queryKey:y.organizationSettings(e),queryFn:async()=>{try{return await M(t,"ORGANIZATION_SETTINGS_GET",{})}catch{return{...I,organizationId:e}}},staleTime:6e4}}function c(t){const e=u.c(7),{org:n}=E();let s;e[0]!==n.id||e[1]!==n.slug?(s=P(n.slug,n.id),e[0]=n.id,e[1]=n.slug,e[2]=s):s=e[2];const o=t,a=!!n.id;let i;return e[3]!==s||e[4]!==o||e[5]!==a?(i={...s,select:o,enabled:a},e[3]=s,e[4]=o,e[5]=a,e[6]=i):i=e[6],F(i)}function _(){const t=u.c(9),{org:e}=E(),n=T(),s=A();let o;t[0]!==e||t[1]!==n?(o=async l=>{const r=await n.call("ORGANIZATION_SETTINGS_UPDATE",{organizationId:e.id,...l});if(!r)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return r},t[0]=e,t[1]=n,t[2]=o):o=t[2];let a;t[3]!==e||t[4]!==s?(a=l=>{s.setQueryData(y.organizationSettings(e.id),r=>({...r??I,...l}))},t[3]=e,t[4]=s,t[5]=a):a=t[5];let i;return t[6]!==o||t[7]!==a?(i={mutationFn:o,onSuccess:a},t[6]=o,t[7]=a,t[8]=i):i=t[8],O(i)}function R(t){return t?.tiers?{tiers:{fast:t.tiers.fast??null,smart:t.tiers.smart??null,thinking:t.tiers.thinking??null,image:t.tiers.image??null,web_search:t.tiers.web_search??null,deep_research:t.tiers.deep_research??null}}:x}function Y(){const{data:t}=c(D);return t??x}function D(t){return R(t.simple_mode)}function j(){const t=u.c(7),e=_();let n,s;t[0]!==e?(n=(a,i)=>e.mutate({simple_mode:a},i),s=(a,i)=>e.mutateAsync({simple_mode:a},i),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function B(){return d("reports_only")}function d(t){const e=u.c(5);let n;e[0]!==t?(n=a=>G(a.flags,t),e[0]=t,e[1]=n):n=e[1];const{data:s}=c(n);let o;return e[2]!==s||e[3]!==t?(o=s??C.has(t),e[2]=s,e[3]=t,e[4]=o):o=e[4],o}function V(t){const e=u.c(6);let n;e[0]!==t?(n=i=>G(i.flags,t),e[0]=t,e[1]=n):n=e[1];const{data:s,isError:o}=c(n);let a;return e[2]!==s||e[3]!==t||e[4]!==o?(a=s??(o?C.has(t):void 0),e[2]=s,e[3]=t,e[4]=o,e[5]=a):a=e[5],a}function W(){const t=d("chat_harness_sandbox_only");return b().runtime.agentSandbox&&t}function H(){const t=u.c(8),{org:e}=E(),n=T(),s=A();let o;t[0]!==n?(o=l=>n.call("ORGANIZATION_BLOCKS_EDITOR_SET",{enabled:l}),t[0]=n,t[1]=o):o=t[1];let a;t[2]!==e||t[3]!==s?(a=l=>{const{enabled:r}=l;s.setQueryData(y.organizationSettings(e.id),m=>m&&{...m,flags:{...m.flags,new_blocks_editor:r}})},t[2]=e,t[3]=s,t[4]=a):a=t[4];let i;return t[5]!==o||t[6]!==a?(i={mutationFn:o,onSuccess:a},t[5]=o,t[6]=a,t[7]=i):i=t[7],O(i)}function k(t){return!!t&&t.trim().toLowerCase().endsWith("@deco.cx")}function J(){const t=u.c(8),{data:e}=w.useSession(),n=b();let s;t[0]!==n.auth.localMode||t[1]!==e?.user?.email?(s=n.auth.localMode===!0||k(e?.user?.email),t[0]=n.auth.localMode,t[1]=e?.user?.email,t[2]=s):s=t[2];const o=s,a=n.hostingControlPlaneGa===!0,i=n.monitorGa===!0,l=d("hosting_enabled"),r=d("e2e_enabled"),m=d("monitor_enabled"),N=d("experiments_enabled"),g=o||a||l,S=o||a||r,p=o||i||m,h=o||a||N;let f;return t[3]!==g||t[4]!==S||t[5]!==p||t[6]!==h?(f={hosting:g,e2e:S,monitor:p,experiments:h},t[3]=g,t[4]=S,t[5]=p,t[6]=h,t[7]=f):f=t[7],f}function X(){const{data:t}=c(L);return t??!1}function L(t){return $(t.flags)}function tt(){const{data:t}=c(q);return t??!0}function q(t){return z(t.flags)}function et(){const t=u.c(7),e=_();let n,s;t[0]!==e?(n=(a,i,l)=>e.mutate({flags:{[a]:i}},l),s=(a,i,l)=>e.mutateAsync({flags:{[a]:i}},l),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function nt(){const t=u.c(2),{data:e}=c(Q);let n;return t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1],n}function Q(t){return t.coding_agent_mcp_excluded}function st(){const t=u.c(5),e=_();let n;t[0]!==e?(n=(o,a)=>e.mutate({coding_agent_mcp_excluded:o},a),t[0]=e,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s={...e,mutate:n},t[2]=e,t[3]=n,t[4]=s):s=t[4],s}function ot(){const t=u.c(2),{data:e}=c(U);let n;return t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1],n}function U(t){return t.submodule_credentials}function at(){const t=u.c(5),e=_();let n;t[0]!==e?(n=(o,a)=>e.mutateAsync({submodule_credentials:o},a),t[0]=e,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s={...e,mutateAsync:n},t[2]=e,t[3]=n,t[4]=s):s=t[4],s}export{d as a,W as b,V as c,Y as d,J as e,tt as f,H as g,X as h,et as i,nt as j,st as k,j as l,ot as m,at as n,B as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as v,a4 as W,dS as y,gS as B,i as C,K as N}from"./index-5IFWC0PS.js";import{m as F}from"./match-site-slug-config-D3fUJ6vX.js";import{u as J}from"./use-file-configs-DA74H1hE.js";import{f as K}from"./use-view-draft-kind-Cu0aFeKZ.js";import{e as U}from"./use-organization-settings-CIEI8bNF.js";import{b as $}from"./use-blocks-v8-project-B4vRqcEf.js";const u=["overview","context","monitor","plan","reports","board","site-editor","calendar","experiments","blog","assets","releases","hosting","e2e","automations"],k=["overview","reports","board","site-editor","blog"],O=1,h=["overview","context","monitor","plan","board"],q=["blog"],L=["calendar","experiments"],Q=["hosting"],H={calendar:!1,hosting:!1,"site-editor":!1,blog:!1};function T(t){return[...h,...t.calendar?L:[],...t.hosting&&t["site-editor"]?Q:[],...t.blog?q:[]]}function Y(t,e){const n=new Set(t??[]);return T(e).filter(s=>!n.has(s))}function ae(t,e,n){const s=new Set([...t??[],...T({...e,"site-editor":e["site-editor"]&&n.includes("site-editor")})]);return u.filter(r=>s.has(r))}function le(t,e){if(!t&&e===void 0)return new Set(h);const n=new Set(e!==void 0?g(e,O):g(G(t),t?.sidebarViewsVersion,Y(t?.sidebarViewsSeen,H)));return new Set(h.filter(s=>n.has(s)))}const z=["calendar","experiments","assets","releases","hosting","e2e"];function fe(t,e,n){if(!t)return{project:n??null,resolvedScopeId:null};const s=e?.id===t?e:n?.id===t?n:null;return{project:s,resolvedScopeId:s?t:null}}function G(t){return t?.sidebarViews!==void 0?t.sidebarViews:t?.ui?.layout?.sidebarViews}function g(t,e,n=[]){const s=new Set(t??[]);if(e!==O)for(const r of k)s.add(r);for(const r of n)r==="hosting"&&!s.has("site-editor")||s.add(r);return u.filter(r=>s.has(r))}function X(t){return u.some(e=>e===t)}function Z(t){return z.some(e=>e===t)}function M(t,e){return{overview:t,context:!0,monitor:!0,plan:!0,reports:t,board:t,"site-editor":t,blog:t&&e.blog===!0,assets:e.assets,releases:t&&e.releases,hosting:e.hosting,e2e:e.e2e,calendar:t&&e.calendar,experiments:t&&e.experiments,automations:!0}}function ue(t,e,n){const s=M(e,n);return t?s:{...s,overview:!0,reports:!0,board:!0}}function de(t,e,n,s=[]){const r=new Set(g(t,n,s));return u.filter(o=>e[o]&&r.has(o))}function Se(t,e,n){return n||!t?t:(t.type==="preview"||t.type==="content"||t.type==="code"?"site-editor":t.type)===e?{type:"settings"}:t}function be(t){return u.filter(e=>t[e])}function ee(t,e,n){return!X(t)||e[t]?!1:t==="blog"?n.blog!==!0:!Z(t)||t==="releases"||t==="calendar"||t==="experiments"?!0:!(t==="assets"?n.assets:n.siteAccess)}function Ve(t,e,n,s,r){return ee(t==="preview"||t==="content"||t==="code"?"site-editor":t,e,n)||t==="content"&&!s.includes("content")||t==="code"&&r&&!s.includes("code")}function ge(t,e,n,s){const r=new Set(g(t,s));return n?r.add(e):r.delete(e),u.filter(o=>r.has(o))}function we(t){const e=v.c(21),{org:n}=W(),s=y(),r=U(),o=K(),i=J();let c;e[0]!==t?(c=$(t),e[0]=t,e[1]=c):c=e[1];const d=c;let S;e[2]!==t?(S=B(t),e[2]=t,e[3]=S):S=e[3];const a=S,w=s.hostingEnabled===!0,x=w&&!!a,D=te(n.slug,a,x),R=D.data?.owned===!0;let l;e[4]!==i.data?.configs?(l=i.data?.configs??[],e[4]=i.data?.configs,e[5]=l):l=e[5];let b;e[6]!==a||e[7]!==l?(b=F(l,a),e[6]=a,e[7]=l,e[8]=b):b=e[8];const P=!!b,E=d&&!!t?.metadata?.siteSlug,m=w&&R&&r.hosting,p=w&&R&&r.e2e,_=o===!0;let f;e[9]!==P||e[10]!==E||e[11]!==m||e[12]!==p||e[13]!==_||e[14]!==d?(f={assets:P,releases:E,hosting:m,e2e:p,calendar:d,experiments:d,blog:_},e[9]=P,e[10]=E,e[11]=m,e[12]=p,e[13]=_,e[14]=d,e[15]=f):f=e[15];const A=!!a&&i.isPending,I=x&&D.isPending,j=o===void 0;let V;return e[16]!==A||e[17]!==I||e[18]!==j||e[19]!==f?(V={presence:f,assetsPending:A,siteAccessPending:I,blogPending:j},e[16]=A,e[17]=I,e[18]=j,e[19]=f,e[20]=V):V=e[20],V}function te(t,e,n){const s=v.c(10);let r;s[0]!==t||s[1]!==e?(r=N.hostingAccess(t,e??""),s[0]=t,s[1]=e,s[2]=r):r=s[2];let o;s[3]!==t||s[4]!==e?(o=async()=>{const c=await fetch(`/api/${t}/hosting/${encodeURIComponent(e??"")}/access`);return c.ok?await c.json():{owned:!1,canWrite:!1}},s[3]=t,s[4]=e,s[5]=o):o=s[5];let i;return s[6]!==n||s[7]!==r||s[8]!==o?(i={queryKey:r,queryFn:o,enabled:n,staleTime:6e4},s[6]=n,s[7]=r,s[8]=o,s[9]=i):i=s[9],C(i)}export{u as P,de as a,O as b,fe as c,ue as d,Ve as e,ee as f,g,be as h,Z as i,h as j,ae as k,Se as l,Y as o,M as p,G as r,le as s,ge as t,we as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as _,f as P,u as T,d as N,cK as R,dI as E,cI as k,ae as l}from"./index-5IFWC0PS.js";import{d as C,b as O,p as w}from"./repository-binding-L4ChVpPs.js";const x=1;function b(e){return(e??[]).filter(E)}function M(){const e=_.c(4);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const r=P(o);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[1]=n):n=e[1];const t=T(n);if(r.agentId)return r.agentId;let a;return e[2]!==t?(a="virtualmcpid"in t&&typeof t.virtualmcpid=="string"?t.virtualmcpid.trim():void 0,e[2]=t,e[3]=a):a=e[3],a||null}function D(){const e=_.c(16),o=N();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const n=P(r),t=R(),a=C(),i=b(a),s=M(),y=i.find(c=>c.id===s)??null;let p;e[1]!==a||e[2]!==s?(p=s&&a.length>0&&!a.some(c=>c.id===s)?s:null,e[1]=a,e[2]=s,e[3]=p):p=e[3];const S=O(p),u=y??b(S?[S]:[])[0]??null;let m;e[4]!==t||e[5]!==o||e[6]!==n||e[7]!==s?(m=c=>{if(c===s&&t!==void 0)return;const h=n.org??"",I=V;if(c){k(o,{org:h,agentId:c,tabId:t==="board"||t==="reports"?t:"overview",search:I,replace:!1});return}if(t==="board"){o({to:l.tasks,params:{org:h,taskKey:void 0},search:I});return}const j=t==="files"?l.library:t==="monitoring"?l.monitoring:t==="plan"?l.plan:l.home;o({to:j,params:{org:h},search:I})},e[4]=t,e[5]=o,e[6]=n,e[7]=s,e[8]=m):m=e[8];const f=m,v=w(u),g=i.length>=x;let d;return e[9]!==u||e[10]!==i||e[11]!==s||e[12]!==f||e[13]!==v||e[14]!==g?(d={scopeId:s,project:u,repo:v,projects:i,hasProjects:g,setScope:f},e[9]=u,e[10]=i,e[11]=s,e[12]=f,e[13]=v,e[14]=g,e[15]=d):d=e[15],d}function V(e){return{...e,virtualmcpid:void 0,thread:void 0,mainpanel:void 0,path:void 0,preview:void 0,expanded:void 0}}export{D as a,b as s,M as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as A,c as m,l as j,ar as b,at as y,ag as N}from"./index-5IFWC0PS.js";import{e as w}from"./use-view-draft-kind-Cu0aFeKZ.js";import{P as E}from"./project-apps-DfPcY68g.js";import{b as P}from"./repository-binding-L4ChVpPs.js";function D(n,e){const t=new Set(e);return t.size===0?n:n.filter(c=>t.has(c.connectionId))}function R(n){const e=n.metadata?.ui;return Array.isArray(e?.pinnedViews)?e.pinnedViews.filter(t=>!!t&&typeof t=="object"&&typeof t.connectionId=="string"&&typeof t.toolName=="string"&&["undefined","string"].includes(typeof t.label)&&(t.icon==null||typeof t.icon=="string")):[]}const V=4;function I(n,e){return n.app===e.app&&n.projectId===e.projectId}function h(n,e,t=V){return[e,...n.filter(c=>!I(c,e))].slice(0,t)}function _(n,e){return n.filter(t=>!I(t,e))}function g(n,e,t){const c=n.findLast(l=>l.staticData.mainView);if(!c)return null;const{mainView:r,siteEditorView:p,local:i}=c.staticData;if(!r)return null;const o=c.params,a=o?.agentId;if(a&&r==="app"&&o.connectionId&&o.toolName)return{app:t(o.connectionId,o.toolName),projectId:a,connection:{id:o.connectionId,toolName:o.toolName}};const s=p?"site-editor":r;return e(s)?a?{app:s,projectId:a}:i?{app:s,projectId:null}:null:null}const d=[];function O(n){const e=m.c(12);let t;e[0]!==n?(t=y.recentApps(n),e[0]=n,e[1]=t):t=e[1];const[c,r]=b(t,d),p=w(),i=Array.isArray(c)?c:d;let o;e[2]!==p||e[3]!==i?(o=p?i:i.filter(S),e[2]=p,e[3]=i,e[4]=o):o=e[4];let a,s;e[5]!==r?(a=f=>r(u=>h(Array.isArray(u)?u:[],f)),s=f=>r(u=>_(Array.isArray(u)?u:[],f)),e[5]=r,e[6]=a,e[7]=s):(a=e[6],s=e[7]);let l;return e[8]!==o||e[9]!==a||e[10]!==s?(l={recent:o,remember:a,forget:s},e[8]=o,e[9]=a,e[10]=s,e[11]=l):l=e[11],l}function S(n){return n.app!=="blog"}function T(){const n=m.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:L,structuralSharing:!0},n[0]=e):e=n[0],j(e)}function L(n){return g(n.matches,C,N)}function C(n){return n in E}function Y(n){const{remember:e}=O(n),t=T(),c=P(t?.projectId),r=t?.projectId&&c?.id===t.projectId?c.title:null,p=t?.connection&&c?R(c).find(o=>o.connectionId===t.connection?.id&&o.toolName===t.connection.toolName):void 0,i=t?.connection&&{id:t.connection.id,toolName:t.connection.toolName,label:p?.label||t.connection.toolName,icon:p?.icon};A.useEffect(()=>{!t?.projectId||!r||e({app:t.app,projectId:t.projectId,projectTitle:r,...i&&{connection:i}})},[n,t?.app,t?.projectId,r,i?.label,i?.icon])}export{T as a,O as b,D as k,R as p,Y as u};
|
package/dist/client/assets/{use-reports-diagnostic-JXB8tUrM.js → use-reports-diagnostic-ChnnkK6V.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as N,a4 as Q,W as F,T as A,i as f,K as R,
|
|
1
|
+
import{c as N,a4 as Q,W as F,T as A,i as f,K as R,g_ as L,$ as K,U}from"./index-5IFWC0PS.js";import{m as O}from"./use-mcp-client-D_jTz-1i.js";import{u as h}from"./companions-core-DhUD88pR.js";function D(n){return n?n.scanned_at?"ready":n.run_in_progress?"generating":"none":"none"}function M(n){return n.connectionQueryPending?!0:!n.hasConnection||n.cdClientFailed?!1:n.diagnosticQueryPending}const b=2e4;function q(n){if(typeof n!="string"||!n)return null;try{return new URL(n).hostname||null}catch{return null}}function j(){const n=N.c(24),{org:e}=Q(),t=F.REPORTS(e.id);let l;n[0]!==e.id||n[1]!==e.slug?(l=O({connectionId:A,orgId:e.id,orgSlug:e.slug}),n[0]=e.id,n[1]=e.slug,n[2]=l):l=n[2];const{data:p}=f(l),u=f({queryKey:R.reportsConnection(e.id,t),enabled:!!p,retry:!1,staleTime:6e4,queryFn:async()=>{if(!p)throw new Error("selfClient not ready");const T=await p.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:t}});return h(T)}}),m=u.data?.item??null,{data:s,isError:y}=f({...O({connectionId:t,orgId:e.id,orgSlug:e.slug}),enabled:!!m}),C=R.reportsDiagnostic(e.id,t),E=!!s;let i;n[3]!==s?(i=async()=>{if(!s)throw new Error("cdClient not ready");const T=await s.callTool({name:L,arguments:{}});return h(T).diagnostic??null},n[3]=s,n[4]=i):i=n[4];let d;n[5]!==C||n[6]!==E||n[7]!==i?(d={queryKey:C,enabled:E,retry:1,refetchInterval:v,queryFn:i},n[5]=C,n[6]=E,n[7]=i,n[8]=d):d=n[8];const r=f(d),o=m?.metadata?.siteUrl,P=r.data??null,w=r.isSuccess,_=!!m;let a;n[9]!==y||n[10]!==u.isPending||n[11]!==r.isPending||n[12]!==_?(a=M({connectionQueryPending:u.isPending,hasConnection:_,cdClientFailed:y,diagnosticQueryPending:r.isPending}),n[9]=y,n[10]=u.isPending,n[11]=r.isPending,n[12]=_,n[13]=a):a=n[13];const I=typeof o=="string"&&o?o:null;let c;n[14]!==o?(c=q(o),n[14]=o,n[15]=c):c=n[15];const S=s??null;let g;return n[16]!==t||n[17]!==r.isSuccess||n[18]!==c||n[19]!==S||n[20]!==P||n[21]!==a||n[22]!==I?(g={diagnostic:P,isSuccess:w,isLoading:a,siteUrl:I,host:c,connectionId:t,cdClient:S},n[16]=t,n[17]=r.isSuccess,n[18]=c,n[19]=S,n[20]=P,n[21]=a,n[22]=I,n[23]=g):g=n[23],g}function v(n){return n.state.status!=="error"&&D(n.state.data)==="generating"?b:!1}function B(n,e){return{to:K.app,params:{org:n.slug,agentId:U(n.id),connectionId:e,toolName:L},search:{}}}export{D as d,B as r,j as u};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as he,j as G,r as a,a4 as Ee,q as ve,K as C,cF as J}from"./index-5IFWC0PS.js";import{h as pe,u as me}from"./chat-context-BXBBnsXM.js";import{b as Se}from"./sandbox-url-D3mC8qhT.js";import{u as ge}from"./repository-binding-L4ChVpPs.js";import{e as ye}from"./backoff-CrEUbyZT.js";function W(t){return t==="installing"||t==="install-failed"||t==="starting"||t==="start-failed"||t==="running"||t==="crashed"}const be={phase:null,lifecycle:{phase:"idle"},status:{state:"running"},branch:{kind:"unknown"},notFound:!1,scripts:[],activeProcesses:[],getBuffer:()=>"",hasData:()=>!1,subscribeChunks:()=>()=>{},subscribeReload:()=>()=>{}},Z=a.createContext(be),z=16384;class De{data="";append(e){this.data+=e,this.data.length>z&&(this.data=this.data.slice(this.data.length-z))}get(){return this.data}clear(){this.data=""}}const ke=1e3,Re=3e4,Te=3e3,X=["lifecycle","status","tasks","scripts","branch","reload","file-changed"],I="log";function xe(t){if(!t)return null;try{return new URL("/_sandbox/events",t).href}catch{return null}}function Ce(t){return t===404}function Le(t){return/(?:^|[\s;&|(])deno\s+task\b/.test(t)}async function _e(t){try{const e=await fetch(t,{headers:{Accept:"text/event-stream"},cache:"no-store",signal:AbortSignal.timeout(Te)});return await e.body?.cancel().catch(()=>{}),Ce(e.status)}catch{return!1}}const ee=pe(Z);function Me(t){const e=he.c(10);let i,f,c;e[0]!==t?({resetKey:c,children:i,...f}=t,e[0]=t,e[1]=i,e[2]=f,e[3]=c):(i=e[1],f=e[2],c=e[3]);let o;e[4]!==f||e[5]!==c?(o=G.jsx(we,{...f},c),e[4]=f,e[5]=c,e[6]=o):o=e[6];let h;return e[7]!==i||e[8]!==o?(h=G.jsx(ee.Host,{source:o,children:i}),e[7]=i,e[8]=o,e[9]=h):h=e[9],h}function we(t){return ee.usePublish(Pe(t)),null}function Pe({virtualMcpId:t,branch:e,previewUrl:i=null,enabled:f=!0}){const{org:c}=Ee(),o=ve(),h=me()?.taskId??null,[ne,L]=a.useState(null),[se,_]=a.useState({phase:"idle"}),[re,w]=a.useState({state:"running"}),[ae,P]=a.useState({kind:"unknown"}),[ce,O]=a.useState(!1),[oe,N]=a.useState([]),[ue,B]=a.useState([]),[,ie]=a.useState(0),m=a.useRef(new Map),K=a.useRef(new Set),k=a.useRef(new Set),A=a.useRef(null),R=xe(i),Q=ge(t)?.metadata?.runtime?.selected==="deno",le=l=>{let d=m.current.get(l);return d||(d=new De,m.current.set(l,d)),d};return a.useEffect(()=>{if(L(null),_({phase:"idle"}),w({state:"running"}),P({kind:"unknown"}),A.current=null,O(!1),N([]),B([]),m.current.clear(),!t||!e||!f)return;const l=Se({orgSlug:c.slug,virtualMcpId:t,branch:e,threadId:h??null},"events");let d=!1,S=0,T=null,g=null,y=null,v=null,E=null,x=null,V=!1;const F=()=>{g&&clearTimeout(g),g=setTimeout(()=>{g=null,o.invalidateQueries({queryKey:C.liveMeta(c.slug,t,e)})},1e3)},de=n=>{try{const s=JSON.parse(n.data);L(s),s.kind!=="failed"&&(O(!1),S=0),s.kind==="ready"&&H()}catch(s){console.warn("[vm-events] bad phase payload",s)}},$=()=>{O(!0),L(null),_({phase:"idle"}),w({state:"running"}),P({kind:"unknown"}),N([]),B([]),m.current.clear()},j=n=>{try{const s=JSON.parse(n.data);if(typeof s.data!="string")return;S=0;const u=s.data.replace(/\r?\n/g,`\r
|
|
2
|
+
`);le(s.source).append(u);for(const r of K.current)try{r(s.source,u)}catch{}ie(r=>r+1)}catch{}},q=n=>{const s=n.type;try{const u=JSON.parse(n.data);switch(S=0,s){case"lifecycle":{const r=u;_(r.state);const b=`${c.slug}/${t}/${e}`;if(W(r.state.phase)&&!(x&&W(x))){J(o,c.id);const D=C.decofile(b);o.getQueryData(D)===void 0&&o.invalidateQueries({queryKey:D})}r.state.phase==="running"&&x!=="running"&&(J(o,c.id),o.invalidateQueries({queryKey:C.decofile(b)}),F()),x=r.state.phase;const p=r.state.phase==="running"?r.state.port:null,U=A.current;if(A.current=p,U!==null&&p!==null&&U!==p)for(const D of k.current)try{D()}catch{}return}case"status":w(u);return;case"tasks":{const r=u;V=r.active.some(p=>Le(p.command));const b=r.active.map(p=>p.logName??"").filter(Boolean);B(b);return}case"scripts":N(u.scripts);return;case"branch":{const r=u.meta;P(r);return}case"reload":for(const r of k.current)try{r()}catch{}return;case"file-changed":{const{path:r}=u,b=`${c.slug}/${t}/${e}`;if(r.startsWith(".deco/")||r.includes("/.deco/")){if(!(x==="running"))return;r.endsWith(".deco/meta.gen.json")&&F(),y&&clearTimeout(y),y=setTimeout(()=>{if(y=null,o.invalidateQueries({queryKey:C.decofile(b)}),Q||V)for(const D of k.current)try{D()}catch{}},500)}else F();return}}}catch{}};function M(){if(d)return;const n=new EventSource(l);v=n,n.onopen=()=>{},n.onerror=()=>{v===n&&n.readyState===EventSource.CLOSED&&Y("studio")},n.addEventListener("phase",de),n.addEventListener("gone",$),n.addEventListener(I,j);for(const s of X)n.addEventListener(s,q)}function H(){if(d||!R||E)return;const n=new EventSource(R);E=n;let s=!1;n.onopen=()=>{if(d||E!==n)return;s=!0,S=0;const u=v;v=null,u?.close()},n.onerror=()=>{E===n&&n.readyState===EventSource.CLOSED&&fe(n,s)},n.addEventListener(I,j);for(const u of X)n.addEventListener(u,q)}async function fe(n,s){const u=R?await _e(R):!1;if(!(d||E!==n)){if(n.close(),E=null,u){$(),v||M();return}s&&Y("direct")}}function Y(n){if(d||T)return;const s=ye(Re,ke,S,2,0);S++,T=setTimeout(()=>{if(T=null,!d){if(n==="direct"){E?.close(),E=null,H();return}v?.close(),v=null,M()}},s)}return M(),()=>{d=!0,v?.close(),E?.close(),T&&clearTimeout(T),g&&clearTimeout(g),y&&clearTimeout(y)}},[t,e,c.slug,c.id,f,h,R,o,Q]),{phase:ne,lifecycle:se,status:re,branch:ae,notFound:ce,scripts:oe,activeProcesses:ue,getBuffer:l=>m.current.get(l)?.get()??"",hasData:l=>(m.current.get(l)?.get().length??0)>0,subscribeChunks:l=>(K.current.add(l),()=>{K.current.delete(l)}),subscribeReload:l=>(k.current.add(l),()=>{k.current.delete(l)})}}function te(){return a.use(Z)}function Ue(t){const{subscribeChunks:e}=te(),i=a.useRef(t);i.current=t,a.useEffect(()=>e((o,h)=>{i.current?.(o,h)}),[e])}function Qe(t){const{subscribeReload:e}=te(),i=a.useRef(t);i.current=t,a.useEffect(()=>e(()=>{i.current?.()}),[e])}export{Me as S,Ue as a,Qe as b,W as i,te as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,a4 as c,
|
|
1
|
+
import{c as u,a4 as c,ak as r,K as l,V as d,q as f,e as S}from"./index-5IFWC0PS.js";function C(){const e=u.c(7),{org:i}=c(),n=r();let a;e[0]!==i.id?(a=l.secrets(i.id),e[0]=i.id,e[1]=a):a=e[1];let t;e[2]!==n?(t=async()=>await n.call("SECRET_LIST",{}),e[2]=n,e[3]=t):t=e[3];let s;e[4]!==a||e[5]!==t?(s={queryKey:a,staleTime:6e4,queryFn:t},e[4]=a,e[5]=t,e[6]=s):s=e[6];const{data:o}=d(s);return o.secrets}function m(){const e=u.c(8),{org:i}=c(),n=r(),a=f();let t;e[0]!==n?(t=async y=>await n.call("SECRET_CREATE",{...y}),e[0]=n,e[1]=t):t=e[1];let s;e[2]!==i||e[3]!==a?(s=()=>{a.invalidateQueries({queryKey:l.secrets(i.id)})},e[2]=i,e[3]=a,e[4]=s):s=e[4];let o;return e[5]!==t||e[6]!==s?(o={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=o):o=e[7],S(o)}export{m as a,C as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i8 as ee,bn as te,c as M,b as re,r as b,j as i,m as se,bm as oe,D as ie,v as ne,x as le,I as ce,w as ae}from"./index-5IFWC0PS.js";import{a as G,e as V}from"./UserSquare-CK-bjijW.js";import{b as fe}from"./agent-icon-bK3wLPrb.js";import{i as ue}from"./SearchMd-D88tiwag.js";import{a as _}from"./save-status-T9dswXr1.js";import{ac as de,k as me,an as ve}from"./blocks-tab-states-CPXZUbSV.js";import{a$ as K,c as pe,u as xe,i as he,E as ge}from"./site-editor-toast-CAmfWZOg.js";import{d as Y,r as we}from"./held-block-view-616AHRnA.js";import{u as Se}from"./use-voice-input-DPQbRCzt.js";function be(r){return r.schema?.definitions??r.schema?.$defs??{}}function Z(r,e){const t=be(e),s=t[btoa(r)];if(!s)return[];const o=[s];if(Array.isArray(s.allOf)){const l=s.allOf.find(n=>typeof n.$ref=="string")?.$ref;if(typeof l=="string"){const n=t[l.replace("#/definitions/","")];n&&o.push(n)}}return o}function je(r,e){for(const t of Z(r,e)){const s=typeof t.image=="string"?t.image:void 0;if(s?.includes("{{{"))return s}}function We(r,e){if(!e)return;const t=ee(r,te(e));if(!t)return;const s=je(t.resolveType,e);if(!s)return;const o=we(s,t.data);if(o)return Y(o)}function ye(r,e){for(const t of Z(r,e)){const s=typeof t.image=="string"?t.image:void 0;if(s&&!s.includes("{{"))return Y(s)}}const Ne=12,z=new Set,F=new Set;function Re(){for(const r of F)r()}function Pe(r){return z.has(r)?!0:z.size>=Ne?!1:(z.add(r),!0)}function Q(r){z.delete(r)&&Re()}function Ie(r){return F.add(r),()=>{F.delete(r)}}function Te(r,e){const t=b.useRef(!1),[s,o]=b.useState(!1),l=b.useRef(null),n=b.useRef(null),f=b.useRef(null),c=b.useRef(r);c.current=r;const[p]=b.useState(()=>{const u=()=>{f.current?.(),f.current=null},d=()=>t.current?!0:Pe(e)?(t.current=!0,o(!0),u(),!0):!1;return a=>{if(n.current=a,l.current&&(l.current.disconnect(),l.current=null),u(),!a){t.current&&(Q(e),t.current=!1,o(!1));return}queueMicrotask(()=>{if(n.current!==a)return;const w=new IntersectionObserver(m=>{if(m[0]?.isIntersecting??!1){!d()&&!f.current&&(f.current=Ie(()=>{n.current===a&&d()}));return}u(),t.current&&(Q(e),t.current=!1,o(!1))},{root:c.current.current,rootMargin:"160px 0px"});w.observe(a),l.current=w})}});return{ref:p,iframeActive:s}}function Ce(r){const e=M.c(9),{previewUrl:t,title:s,scrollRootRef:o,slotId:l}=r,{ref:n,iframeActive:f}=Te(o,l),[c,p]=b.useState(!1),u=_()?V:G;let d;e[0]!==u||e[1]!==f||e[2]!==c||e[3]!==t||e[4]!==s?(d=f?i.jsxs(i.Fragment,{children:[!c&&i.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted/40",children:i.jsx(u,{className:"h-8 w-8 animate-pulse text-muted-foreground/40"})}),i.jsx("iframe",{src:t,title:`Preview ${s}`,sandbox:"allow-scripts allow-same-origin",referrerPolicy:"no-referrer",className:"pointer-events-none h-[200%] w-[200%] origin-top-left scale-50 border-0 bg-white",tabIndex:-1,onLoad:()=>p(!0)})]}):i.jsx("div",{className:"flex h-full items-center justify-center",children:i.jsx(u,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=u,e[1]=f,e[2]=c,e[3]=t,e[4]=s,e[5]=d):d=e[5];let a;return e[6]!==n||e[7]!==d?(a=i.jsx("div",{ref:n,className:"relative aspect-[16/10] w-full overflow-hidden bg-muted/40",children:d}),e[6]=n,e[7]=d,e[8]=a):a=e[8],a}function Ue(r){const e=M.c(3),{image:t}=r,s=_()?V:G;let o;return e[0]!==s||e[1]!==t?(o=i.jsx("div",{className:"relative flex aspect-[16/10] w-full items-center justify-center overflow-hidden bg-muted/40",children:t?i.jsx("img",{src:t,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):i.jsx(s,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=s,e[1]=t,e[2]=o):o=e[2],o}function ke(r){const e=M.c(28),{entry:t,previewUrl:s,image:o,scrollRootRef:l,onSelect:n}=r,c=_()?t.isSavedBlock?fe:V:G,p=t.isSavedBlock&&"border-global-section/35 hover:bg-global-section/8";let u;e[0]!==p?(u=se("group flex flex-col overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-lg))] border bg-card text-left transition-colors shadow-edge","hover:border-primary/40 hover:bg-accent",p),e[0]=p,e[1]=u):u=e[1];let d;e[2]!==t.resolveType||e[3]!==t.title||e[4]!==o||e[5]!==s||e[6]!==l?(d=s?i.jsx(Ce,{previewUrl:s,title:t.title,scrollRootRef:l,slotId:t.resolveType}):i.jsx(Ue,{image:o}),e[2]=t.resolveType,e[3]=t.title,e[4]=o,e[5]=s,e[6]=l,e[7]=d):d=e[7];let a;e[8]!==t.isSavedBlock?(a=t.isSavedBlock?{color:oe}:void 0,e[8]=t.isSavedBlock,e[9]=a):a=e[9];let w;e[10]!==c||e[11]!==a?(w=i.jsx(c,{className:"h-4 w-4 shrink-0",style:a}),e[10]=c,e[11]=a,e[12]=w):w=e[12];let m;e[13]!==t.title?(m=i.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e[13]=t.title,e[14]=m):m=e[14];let x;e[15]!==t.description?(x=t.description&&i.jsx("p",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[15]=t.description,e[16]=x):x=e[16];let h;e[17]!==m||e[18]!==x?(h=i.jsxs("div",{className:"min-w-0 flex-1",children:[m,x]}),e[17]=m,e[18]=x,e[19]=h):h=e[19];let g;e[20]!==w||e[21]!==h?(g=i.jsxs("div",{className:"flex items-center gap-2 border-t px-3 py-2.5",children:[w,h]}),e[20]=w,e[21]=h,e[22]=g):g=e[22];let S;return e[23]!==n||e[24]!==u||e[25]!==d||e[26]!==g?(S=i.jsxs("button",{type:"button",onClick:n,className:u,children:[d,g]}),e[23]=n,e[24]=u,e[25]=d,e[26]=g,e[27]=S):S=e[27],S}function qe(r){const e=M.c(51),{open:t,onOpenChange:s,meta:o,decofile:l,previewBaseUrl:n,onSelect:f}=r,c=re(),[p,u]=b.useState(""),[d,a]=b.useState(t),w=b.useRef(null);t!==d&&(a(t),t&&u(""));let m,x,h,g,S,y,N,R,j,P,I;if(e[0]!==l||e[1]!==o||e[2]!==s||e[3]!==f||e[4]!==t||e[5]!==n||e[6]!==p||e[7]!==c){const W=t&&o&&l?de(o,l):[],q=o?me(o):"",H=l?ve(l):void 0,X=new Map;if(t&&q&&n)for(const v of W)X.set(v.resolveType,K(n,q,v.previewBlock,H));const O=p.trim().toLowerCase(),J=O?W.filter(v=>v.title.toLowerCase().includes(O)||v.resolveType.toLowerCase().includes(O)||v.description?.toLowerCase().includes(O)):W;x=ie,P=t,I=s,m=ne,N="top-3 right-3",R="flex h-[90vh] max-h-[90vh] w-[96vw] max-w-[96vw] sm:max-w-[96vw] flex-col gap-0 overflow-hidden p-0";let k;e[19]!==c?(k=c("sectionsEditor.addSectionModal.title"),e[19]=c,e[20]=k):k=e[20];let B;e[21]!==k?(B=i.jsx(le,{children:k}),e[21]=k,e[22]=B):B=e[22];let $;e[23]===Symbol.for("react.memo_cache_sentinel")?($=i.jsx(ue,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[23]=$):$=e[23];let D;e[24]===Symbol.for("react.memo_cache_sentinel")?(D=v=>u(v.target.value),e[24]=D):D=e[24];let A;e[25]!==c?(A=c("sectionsEditor.addSectionModal.searchPlaceholder"),e[25]=c,e[26]=A):A=e[26];let L;e[27]!==p||e[28]!==A?(L=i.jsxs("div",{className:"relative pt-2",children:[$,i.jsx(ce,{value:p,onChange:D,placeholder:A,className:"h-9 pl-8"})]}),e[27]=p,e[28]=A,e[29]=L):L=e[29],e[30]!==B||e[31]!==L?(j=i.jsxs(ae,{className:"shrink-0 border-b px-4 py-3 text-left",children:[B,L]}),e[30]=B,e[31]=L,e[32]=j):j=e[32],S=w,y="min-h-0 flex-1 overflow-y-auto",h="p-4",g=J.length===0?i.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:c("sectionsEditor.addSectionModal.noSectionsFound")}):i.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:J.map(v=>i.jsx(ke,{entry:v,scrollRootRef:w,previewUrl:n?X.get(v.resolveType)??K(n,q,v.previewBlock,H):null,image:n||!o?void 0:ye(v.resolveType,o),onSelect:()=>f(v)},v.resolveType))}),e[0]=l,e[1]=o,e[2]=s,e[3]=f,e[4]=t,e[5]=n,e[6]=p,e[7]=c,e[8]=m,e[9]=x,e[10]=h,e[11]=g,e[12]=S,e[13]=y,e[14]=N,e[15]=R,e[16]=j,e[17]=P,e[18]=I}else m=e[8],x=e[9],h=e[10],g=e[11],S=e[12],y=e[13],N=e[14],R=e[15],j=e[16],P=e[17],I=e[18];let T;e[33]!==h||e[34]!==g?(T=i.jsx("div",{className:h,children:g}),e[33]=h,e[34]=g,e[35]=T):T=e[35];let C;e[36]!==T||e[37]!==S||e[38]!==y?(C=i.jsx("div",{ref:S,className:y,children:T}),e[36]=T,e[37]=S,e[38]=y,e[39]=C):C=e[39];let U;e[40]!==m||e[41]!==C||e[42]!==N||e[43]!==R||e[44]!==j?(U=i.jsxs(m,{closeButtonClassName:N,className:R,children:[j,C]}),e[40]=m,e[41]=C,e[42]=N,e[43]=R,e[44]=j,e[45]=U):U=e[45];let E;return e[46]!==x||e[47]!==U||e[48]!==P||e[49]!==I?(E=i.jsx(x,{open:P,onOpenChange:I,children:U}),e[46]=x,e[47]=U,e[48]=P,e[49]=I,e[50]=E):E=e[50],E}function Fe(r){const e=M.c(4),{previewServerUrl:t,runtime:s}=Se(r.virtualMcpId),{url:o}=pe(r.virtualMcpId),l=xe(r.virtualMcpId,r.branch),n=s==="cms";if(he(l))return null;if(o)return o;let f;return e[0]!==n||e[1]!==r.sandboxUrl||e[2]!==t?(f=ge({sandboxUrl:r.sandboxUrl,previewServerUrl:t,fastPreviewActive:n}),e[0]=n,e[1]=r.sandboxUrl,e[2]=t,e[3]=f):f=e[3],f}export{qe as A,We as g,Z as s,Fe as u};
|
package/dist/client/assets/{use-sidebar-collapsed-CSXlwHC3.js → use-sidebar-collapsed-D0GS7hdN.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as C,c as j,j as o,m as y,cx as A,cy as R,a6 as H,bR as L,b as V,d as W,a4 as F}from"./index-Dd5hidCj.js";import{m as q}from"./use-chat-layout-state-BsOGOEOo.js";import{M as G}from"./agent-icon-CMiKlX_f.js";import{b as J,a as E,T as P,c as z}from"./tooltip-Dyh2h0NV.js";import{T as K}from"./toolbar-icon-button-99r2aG4V.js";import{g as Q}from"./shell-layout-Dcfsytx-.js";import{u as U}from"./use-mobile-DDy9Znlf.js";import{b as X,c as Y,S as Z,d as ee,a as te}from"./sheet-DUtlbS4K.js";const se="15rem",ae="18rem",ie="4.5rem",D=C.createContext(null);function I(){const s=C.useContext(D);if(!s)throw new Error("useSidebar must be used within a SidebarProvider.");return s}function ge(s){const e=j.c(19),{children:t,defaultOpen:a,open:i,onOpenChange:n}=s,d=a===void 0?!1:a,r=U(),[l,c]=C.useState(d),[b,v]=C.useState(!1),u=i!==void 0,f=u?i:l;let h;e[0]!==u||e[1]!==n?(h=M=>{u||c(M),n?.(M)},e[0]=u,e[1]=n,e[2]=h):h=e[2];const p=h;let w;e[3]!==r||e[4]!==f||e[5]!==p?(w=()=>{r?v(ne):p(!f)},e[3]=r,e[4]=f,e[5]=p,e[6]=w):w=e[6];const N=w,x=f?"expanded":"collapsed";let m;e[7]!==r||e[8]!==f||e[9]!==b||e[10]!==p||e[11]!==x||e[12]!==N?(m={state:x,open:f,setOpen:p,isMobile:r,openMobile:b,setOpenMobile:v,toggleSidebar:N},e[7]=r,e[8]=f,e[9]=b,e[10]=p,e[11]=x,e[12]=N,e[13]=m):m=e[13];const S=m;let g;e[14]!==t?(g=o.jsx(J,{delayDuration:0,children:t}),e[14]=t,e[15]=g):g=e[15];let T;return e[16]!==S||e[17]!==g?(T=o.jsx(D.Provider,{value:S,children:g}),e[16]=S,e[17]=g,e[18]=T):T=e[18],T}function ne(s){return!s}function ve(s){const e=j.c(14);let t,a,i,n;e[0]!==s?({className:a,style:n,children:t,...i}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=i,e[4]=n):(t=e[1],a=e[2],i=e[3],n=e[4]);let d;e[5]!==n?(d={"--sidebar-width":se,"--sidebar-width-icon":ie,...n},e[5]=n,e[6]=d):d=e[6];const r=d;let l;e[7]!==a?(l=y("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",a),e[7]=a,e[8]=l):l=e[8];let c;return e[9]!==t||e[10]!==i||e[11]!==r||e[12]!==l?(c=o.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:l,...i,children:t}),e[9]=t,e[10]=i,e[11]=r,e[12]=l,e[13]=c):c=e[13],c}function Se(s){const e=j.c(36);let t,a,i,n,d;e[0]!==s?({side:n,variant:d,className:a,children:t,...i}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=i,e[4]=n,e[5]=d):(t=e[1],a=e[2],i=e[3],n=e[4],d=e[5]);const r=n===void 0?"left":n,l=d===void 0?"sidebar":d,{isMobile:c,state:b,openMobile:v,setOpenMobile:u}=I();if(c){let T;e[6]===Symbol.for("react.memo_cache_sentinel")?(T={"--sidebar-width":ae},e[6]=T):T=e[6];let M;e[7]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsxs(Y,{className:"sr-only",children:[o.jsx(Z,{children:"Sidebar"}),o.jsx(ee,{children:"Displays the mobile sidebar."})]}),e[7]=M):M=e[7];let $;e[8]!==t?($=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let _;e[10]!==r||e[11]!==$?(_=o.jsxs(te,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:T,side:r,children:[M,$]}),e[10]=r,e[11]=$,e[12]=_):_=e[12];let B;return e[13]!==v||e[14]!==i||e[15]!==u||e[16]!==_?(B=o.jsx(X,{open:v,onOpenChange:u,...i,children:_}),e[13]=v,e[14]=i,e[15]=u,e[16]=_,e[17]=B):B=e[17],B}const f=b==="expanded",h=f?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let p;e[18]!==h?(p=y("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",h),e[18]=h,e[19]=p):p=e[19];const w=f?void 0:"icon",N=f?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let x;e[20]!==a||e[21]!==N?(x=y("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",N,a),e[20]=a,e[21]=N,e[22]=x):x=e[22];let m;e[23]!==t?(m=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=m):m=e[24];let S;e[25]!==i||e[26]!==x||e[27]!==m?(S=o.jsx("div",{"data-slot":"sidebar-container",className:x,...i,children:m}),e[25]=i,e[26]=x,e[27]=m,e[28]=S):S=e[28];let g;return e[29]!==r||e[30]!==b||e[31]!==p||e[32]!==w||e[33]!==S||e[34]!==l?(g=o.jsx("div",{className:p,"data-state":b,"data-collapsible":w,"data-variant":l,"data-side":r,"data-slot":"sidebar",children:S}),e[29]=r,e[30]=b,e[31]=p,e[32]=w,e[33]=S,e[34]=l,e[35]=g):g=e[35],g}function je(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=y("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("main",{"data-slot":"sidebar-inset",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}function we(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=y("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}function Ne(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=y("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}function Te(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=y("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}function ye(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=y("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}const le=R("peer/menu-button flex w-full cursor-pointer items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm focus-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg:not([class*='text-'])]:text-muted-foreground hover:[&_svg:not([class*='text-'])]:text-sidebar-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm group-data-[state=collapsed]/sidebar:size-8! group-data-[state=collapsed]/sidebar:rounded-full",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ce(s){const e=j.c(28);let t,a,i,n,d,r,l;e[0]!==s?({asChild:i,isActive:n,variant:d,size:r,tooltip:l,className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=i,e[4]=n,e[5]=d,e[6]=r,e[7]=l):(t=e[1],a=e[2],i=e[3],n=e[4],d=e[5],r=e[6],l=e[7]);const c=i===void 0?!1:i,b=n===void 0?!1:n,v=d===void 0?"default":d,u=r===void 0?"default":r,f=c?A:"button",{isMobile:h}=I();let p;e[8]!==t||e[9]!==u||e[10]!==v?(p=y(le({variant:v,size:u}),t),e[8]=t,e[9]=u,e[10]=v,e[11]=p):p=e[11];let w;e[12]!==f||e[13]!==b||e[14]!==a||e[15]!==u||e[16]!==p?(w=o.jsx(f,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":b,className:p,...a}),e[12]=f,e[13]=b,e[14]=a,e[15]=u,e[16]=p,e[17]=w):w=e[17];const N=w;if(!l)return N;if(typeof l=="string"){let g;e[18]!==l?(g={children:l},e[18]=l,e[19]=g):g=e[19],l=g}let x;e[20]!==N?(x=o.jsx(P,{asChild:!0,children:N}),e[20]=N,e[21]=x):x=e[21];let m;e[22]!==h||e[23]!==l?(m=o.jsx(E,{side:"right",align:"center",hidden:h,...l}),e[22]=h,e[23]=l,e[24]=m):m=e[24];let S;return e[25]!==x||e[26]!==m?(S=o.jsxs(z,{children:[x,m]}),e[25]=x,e[26]=m,e[27]=S):S=e[27],S}function re(){const s=j.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings",shouldThrow:!1},s[0]=e):e=s[0],!!H(e)}const O=C.createContext(null);function Me(s){const e=j.c(5),{children:t}=s,[a,i]=C.useState(null);let n;e[0]!==a?(n={target:a,setTarget:i},e[0]=a,e[1]=n):n=e[1];let d;return e[2]!==t||e[3]!==n?(d=o.jsx(O,{value:n,children:t}),e[2]=t,e[3]=n,e[4]=d):d=e[4],d}function oe(){const s=C.use(O);if(!s)throw new Error("Sidebar thread controls require a Layout");return s}function k(s){const e=j.c(17),{open:t,onToggle:a}=s,i=V(),{isMobile:n,setOpenMobile:d}=I(),r=t?"page.closeThread":"page.openThread";let l;e[0]!==i||e[1]!==r?(l=i(r),e[0]=i,e[1]=r,e[2]=l):l=e[2];const c=l;let b;e[3]!==n||e[4]!==a||e[5]!==d?(b=()=>{a(),n&&d(!1)},e[3]=n,e[4]=a,e[5]=d,e[6]=b):b=e[6];let v;e[7]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(G,{size:16}),e[7]=v):v=e[7];let u;e[8]!==c||e[9]!==t||e[10]!==b?(u=o.jsx(P,{asChild:!0,children:o.jsx(K,{"aria-label":c,"aria-pressed":t,active:t,className:"size-7 shrink-0 group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:size-8",onClick:b,children:v})}),e[8]=c,e[9]=t,e[10]=b,e[11]=u):u=e[11];let f;e[12]!==c?(f=o.jsx(E,{side:"right",children:c}),e[12]=c,e[13]=f):f=e[13];let h;return e[14]!==u||e[15]!==f?(h=o.jsxs(z,{children:[u,f]}),e[14]=u,e[15]=f,e[16]=h):h=e[16],h}function $e(s){const e=j.c(3),t=C.use(O);let a;return e[0]!==s||e[1]!==t?(a=t?.target?L.createPortal(o.jsx(k,{...s}),t.target):null,e[0]=s,e[1]=t,e[2]=a):a=e[2],a}function _e(){const s=j.c(11),{setTarget:e}=oe(),t=re(),{isMobile:a}=I(),i=W(),{org:n}=F(),{openSidePanel:d}=Q();let r;s[0]!==e?(r=o.jsx("div",{ref:e,className:"peer/thread-button contents empty:hidden"}),s[0]=e,s[1]=r):r=s[1];let l;s[2]!==t||s[3]!==a||s[4]!==i||s[5]!==d||s[6]!==n?(l=o.jsx("div",{className:"hidden peer-empty/thread-button:contents",children:o.jsx(k,{open:!1,onToggle:()=>{t?i({to:"/$org/home",params:{org:n.slug},search:{sidepanel:!0,mainpanel:!a}}):a?i({to:".",search:de,replace:!0}):d()}})}),s[2]=t,s[3]=a,s[4]=i,s[5]=d,s[6]=n,s[7]=l):l=s[7];let c;return s[8]!==r||s[9]!==l?(c=o.jsxs(o.Fragment,{children:[r,l]}),s[8]=r,s[9]=l,s[10]=c):c=s[10],c}function de(s){return{...s,...q("chat")}}function Ie(){const{state:s,isMobile:e}=I();return s==="collapsed"&&!e}export{Ce as S,Te as a,ye as b,I as c,we as d,_e as e,Ne as f,Se as g,re as h,ge as i,ve as j,Me as k,je as l,$e as m,Ie as u};
|
|
1
|
+
import{r as y,c as j,j as o,m as C,bW as A,bX as R,a6 as H,c7 as W,b as L,d as V,a4 as F}from"./index-5IFWC0PS.js";import{m as q}from"./use-chat-layout-state-Bib3kRoh.js";import{M as X}from"./agent-icon-bK3wLPrb.js";import{b as G,a as E,T as P,c as z}from"./tooltip-Bj0ggRLV.js";import{T as J}from"./toolbar-icon-button-Bk7F5Fex.js";import{g as K}from"./shell-layout-SnEo2Z8s.js";import{u as Q}from"./use-mobile-M7B5YJR_.js";import{b as U,c as Y,S as Z,d as ee,a as te}from"./sheet-w42F36Fm.js";const se="15rem",ae="18rem",ie="4.5rem",D=y.createContext(null);function I(){const s=y.useContext(D);if(!s)throw new Error("useSidebar must be used within a SidebarProvider.");return s}function ge(s){const e=j.c(19),{children:t,defaultOpen:a,open:i,onOpenChange:n}=s,d=a===void 0?!1:a,r=Q(),[l,c]=y.useState(d),[p,v]=y.useState(!1),u=i!==void 0,f=u?i:l;let h;e[0]!==u||e[1]!==n?(h=M=>{u||c(M),n?.(M)},e[0]=u,e[1]=n,e[2]=h):h=e[2];const b=h;let w;e[3]!==r||e[4]!==f||e[5]!==b?(w=()=>{r?v(ne):b(!f)},e[3]=r,e[4]=f,e[5]=b,e[6]=w):w=e[6];const N=w,x=f?"expanded":"collapsed";let m;e[7]!==r||e[8]!==f||e[9]!==p||e[10]!==b||e[11]!==x||e[12]!==N?(m={state:x,open:f,setOpen:b,isMobile:r,openMobile:p,setOpenMobile:v,toggleSidebar:N},e[7]=r,e[8]=f,e[9]=p,e[10]=b,e[11]=x,e[12]=N,e[13]=m):m=e[13];const S=m;let g;e[14]!==t?(g=o.jsx(G,{delayDuration:0,children:t}),e[14]=t,e[15]=g):g=e[15];let T;return e[16]!==S||e[17]!==g?(T=o.jsx(D.Provider,{value:S,children:g}),e[16]=S,e[17]=g,e[18]=T):T=e[18],T}function ne(s){return!s}function ve(s){const e=j.c(14);let t,a,i,n;e[0]!==s?({className:a,style:n,children:t,...i}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=i,e[4]=n):(t=e[1],a=e[2],i=e[3],n=e[4]);let d;e[5]!==n?(d={"--sidebar-width":se,"--sidebar-width-icon":ie,...n},e[5]=n,e[6]=d):d=e[6];const r=d;let l;e[7]!==a?(l=C("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",a),e[7]=a,e[8]=l):l=e[8];let c;return e[9]!==t||e[10]!==i||e[11]!==r||e[12]!==l?(c=o.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:l,...i,children:t}),e[9]=t,e[10]=i,e[11]=r,e[12]=l,e[13]=c):c=e[13],c}function Se(s){const e=j.c(36);let t,a,i,n,d;e[0]!==s?({side:n,variant:d,className:a,children:t,...i}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=i,e[4]=n,e[5]=d):(t=e[1],a=e[2],i=e[3],n=e[4],d=e[5]);const r=n===void 0?"left":n,l=d===void 0?"sidebar":d,{isMobile:c,state:p,openMobile:v,setOpenMobile:u}=I();if(c){let T;e[6]===Symbol.for("react.memo_cache_sentinel")?(T={"--sidebar-width":ae},e[6]=T):T=e[6];let M;e[7]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsxs(Y,{className:"sr-only",children:[o.jsx(Z,{children:"Sidebar"}),o.jsx(ee,{children:"Displays the mobile sidebar."})]}),e[7]=M):M=e[7];let $;e[8]!==t?($=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let _;e[10]!==r||e[11]!==$?(_=o.jsxs(te,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:T,side:r,children:[M,$]}),e[10]=r,e[11]=$,e[12]=_):_=e[12];let B;return e[13]!==v||e[14]!==i||e[15]!==u||e[16]!==_?(B=o.jsx(U,{open:v,onOpenChange:u,...i,children:_}),e[13]=v,e[14]=i,e[15]=u,e[16]=_,e[17]=B):B=e[17],B}const f=p==="expanded",h=f?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let b;e[18]!==h?(b=C("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",h),e[18]=h,e[19]=b):b=e[19];const w=f?void 0:"icon",N=f?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let x;e[20]!==a||e[21]!==N?(x=C("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",N,a),e[20]=a,e[21]=N,e[22]=x):x=e[22];let m;e[23]!==t?(m=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=m):m=e[24];let S;e[25]!==i||e[26]!==x||e[27]!==m?(S=o.jsx("div",{"data-slot":"sidebar-container",className:x,...i,children:m}),e[25]=i,e[26]=x,e[27]=m,e[28]=S):S=e[28];let g;return e[29]!==r||e[30]!==p||e[31]!==b||e[32]!==w||e[33]!==S||e[34]!==l?(g=o.jsx("div",{className:b,"data-state":p,"data-collapsible":w,"data-variant":l,"data-side":r,"data-slot":"sidebar",children:S}),e[29]=r,e[30]=p,e[31]=b,e[32]=w,e[33]=S,e[34]=l,e[35]=g):g=e[35],g}function je(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=C("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("main",{"data-slot":"sidebar-inset",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}function we(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=C("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}function Ne(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=C("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}function Te(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=C("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}function Ce(s){const e=j.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let i;e[3]!==t?(i=C("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=i):i=e[4];let n;return e[5]!==a||e[6]!==i?(n=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:i,...a}),e[5]=a,e[6]=i,e[7]=n):n=e[7],n}const le=R("peer/menu-button flex w-full cursor-pointer items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm focus-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg:not([class*='text-'])]:text-muted-foreground hover:[&_svg:not([class*='text-'])]:text-sidebar-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm group-data-[state=collapsed]/sidebar:size-8! group-data-[state=collapsed]/sidebar:rounded-full",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function ye(s){const e=j.c(28);let t,a,i,n,d,r,l;e[0]!==s?({asChild:i,isActive:n,variant:d,size:r,tooltip:l,className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=i,e[4]=n,e[5]=d,e[6]=r,e[7]=l):(t=e[1],a=e[2],i=e[3],n=e[4],d=e[5],r=e[6],l=e[7]);const c=i===void 0?!1:i,p=n===void 0?!1:n,v=d===void 0?"default":d,u=r===void 0?"default":r,f=c?A:"button",{isMobile:h}=I();let b;e[8]!==t||e[9]!==u||e[10]!==v?(b=C(le({variant:v,size:u}),t),e[8]=t,e[9]=u,e[10]=v,e[11]=b):b=e[11];let w;e[12]!==f||e[13]!==p||e[14]!==a||e[15]!==u||e[16]!==b?(w=o.jsx(f,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":p,className:b,...a}),e[12]=f,e[13]=p,e[14]=a,e[15]=u,e[16]=b,e[17]=w):w=e[17];const N=w;if(!l)return N;if(typeof l=="string"){let g;e[18]!==l?(g={children:l},e[18]=l,e[19]=g):g=e[19],l=g}let x;e[20]!==N?(x=o.jsx(P,{asChild:!0,children:N}),e[20]=N,e[21]=x):x=e[21];let m;e[22]!==h||e[23]!==l?(m=o.jsx(E,{side:"right",align:"center",hidden:h,...l}),e[22]=h,e[23]=l,e[24]=m):m=e[24];let S;return e[25]!==x||e[26]!==m?(S=o.jsxs(z,{children:[x,m]}),e[25]=x,e[26]=m,e[27]=S):S=e[27],S}function re(){const s=j.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings",shouldThrow:!1},s[0]=e):e=s[0],!!H(e)}const O=y.createContext(null);function Me(s){const e=j.c(5),{children:t}=s,[a,i]=y.useState(null);let n;e[0]!==a?(n={target:a,setTarget:i},e[0]=a,e[1]=n):n=e[1];let d;return e[2]!==t||e[3]!==n?(d=o.jsx(O,{value:n,children:t}),e[2]=t,e[3]=n,e[4]=d):d=e[4],d}function oe(){const s=y.use(O);if(!s)throw new Error("Sidebar thread controls require a Layout");return s}function k(s){const e=j.c(17),{open:t,onToggle:a}=s,i=L(),{isMobile:n,setOpenMobile:d}=I(),r=t?"page.closeThread":"page.openThread";let l;e[0]!==i||e[1]!==r?(l=i(r),e[0]=i,e[1]=r,e[2]=l):l=e[2];const c=l;let p;e[3]!==n||e[4]!==a||e[5]!==d?(p=()=>{a(),n&&d(!1)},e[3]=n,e[4]=a,e[5]=d,e[6]=p):p=e[6];let v;e[7]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(X,{size:16}),e[7]=v):v=e[7];let u;e[8]!==c||e[9]!==t||e[10]!==p?(u=o.jsx(P,{asChild:!0,children:o.jsx(J,{"aria-label":c,"aria-pressed":t,active:t,className:"size-7 shrink-0 group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:size-8",onClick:p,children:v})}),e[8]=c,e[9]=t,e[10]=p,e[11]=u):u=e[11];let f;e[12]!==c?(f=o.jsx(E,{side:"right",children:c}),e[12]=c,e[13]=f):f=e[13];let h;return e[14]!==u||e[15]!==f?(h=o.jsxs(z,{children:[u,f]}),e[14]=u,e[15]=f,e[16]=h):h=e[16],h}function $e(s){const e=j.c(3),t=y.use(O);let a;return e[0]!==s||e[1]!==t?(a=t?.target?W.createPortal(o.jsx(k,{...s}),t.target):null,e[0]=s,e[1]=t,e[2]=a):a=e[2],a}function _e(){const s=j.c(11),{setTarget:e}=oe(),t=re(),{isMobile:a}=I(),i=V(),{org:n}=F(),{openSidePanel:d}=K();let r;s[0]!==e?(r=o.jsx("div",{ref:e,className:"peer/thread-button contents empty:hidden"}),s[0]=e,s[1]=r):r=s[1];let l;s[2]!==t||s[3]!==a||s[4]!==i||s[5]!==d||s[6]!==n?(l=o.jsx("div",{className:"hidden peer-empty/thread-button:contents",children:o.jsx(k,{open:!1,onToggle:()=>{t?i({to:"/$org/home",params:{org:n.slug},search:{sidepanel:!0,mainpanel:!a}}):a?i({to:".",search:de,replace:!0}):d()}})}),s[2]=t,s[3]=a,s[4]=i,s[5]=d,s[6]=n,s[7]=l):l=s[7];let c;return s[8]!==r||s[9]!==l?(c=o.jsxs(o.Fragment,{children:[r,l]}),s[8]=r,s[9]=l,s[10]=c):c=s[10],c}function de(s){return{...s,...q("chat")}}function Ie(){const{state:s,isMobile:e}=I();return s==="collapsed"&&!e}export{ye as S,Te as a,Ce as b,I as c,we as d,_e as e,Ne as f,Se as g,re as h,ge as i,ve as j,Me as k,je as l,$e as m,Ie as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,a4 as f,
|
|
1
|
+
import{c as u,a4 as f,ak as y,i as m,q as g,e as T,K as l,t as E}from"./index-5IFWC0PS.js";function K(){const e=u.c(7),{locator:t}=f(),o=y();let n;e[0]!==t?(n=l.tags(t),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==o?(s=async()=>{const{tags:r}=await o.call("TAGS_LIST",{});return r},e[2]=o,e[3]=s):s=e[3];let a;return e[4]!==n||e[5]!==s?(a={queryKey:n,queryFn:s,staleTime:3e4},e[4]=n,e[5]=s,e[6]=a):a=e[6],m(a)}function p(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{tag:i}=await n.call("TAGS_CREATE",typeof c=="string"?{name:c}:c);return i},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:S},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function S(e){E.error(e instanceof Error?e.message:"Failed to create tag")}function C(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{await n.call("TAGS_DELETE",{tagId:c})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)}),t.invalidateQueries({queryKey:l.taskBoardItems(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:q},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function q(e){E.error(e instanceof Error?e.message:"Failed to delete tag")}function M(e){const t=u.c(10),{locator:o}=f(),n=y();let s;t[0]!==o||t[1]!==e?(s=l.memberTags(o,e),t[0]=o,t[1]=e,t[2]=s):s=t[2];let a;t[3]!==e||t[4]!==n?(a=async()=>{const{tags:i}=await n.call("MEMBER_TAGS_GET",{memberId:e});return i},t[3]=e,t[4]=n,t[5]=a):a=t[5];const r=!!e;let c;return t[6]!==s||t[7]!==a||t[8]!==r?(c={queryKey:s,queryFn:a,staleTime:3e4,enabled:r},t[6]=s,t[7]=a,t[8]=r,t[9]=c):c=t[9],m(c)}function A(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{memberId:i,tagIds:d}=c;return await n.call("MEMBER_TAGS_SET",{memberId:i,tagIds:d})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=(c,i)=>{t.invalidateQueries({queryKey:l.memberTags(o,i.memberId)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:_},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function _(e){E.error(e instanceof Error?e.message:"Failed to update member tags")}export{p as a,C as b,M as c,A as d,K as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as O,f,i as S,K as _,
|
|
1
|
+
import{c as O,f,i as S,K as _,al as R,a4 as i,ak as l}from"./index-5IFWC0PS.js";const K=["TASK_BOARD_OPERATION","TASK_BOARD_REWORK","TASK_BOARD_DELIVERY","TASK_BOARD_SPRINTS","TASK_BOARD_STUCK","TASK_BOARD_COST","TASK_BOARD_ERRORS","TASK_BOARD_TENANTS"];function B(){const t=O.c(8),o=f({strict:!1}).org??"";let e;t[0]!==o?(e=_.taskBoardAdminOrgs(o),t[0]=o,t[1]=e):e=t[1];const s=!!o;let n;t[2]!==o?(n=()=>R(o,"TASK_BOARD_ADMIN_ORG_LIST",{}),t[2]=o,t[3]=n):n=t[3];let c;return t[4]!==e||t[5]!==s||t[6]!==n?(c={queryKey:e,enabled:s,queryFn:n,staleTime:3e5},t[4]=e,t[5]=s,t[6]=n,t[7]=c):c=t[7],S(c)}function y(t,o){const e=O.c(14),{locator:s}=i(),n=l();let c;e[0]!==s||e[1]!==o.from||e[2]!==o.org||e[3]!==o.project||e[4]!==o.to||e[5]!==t?(c=_.taskBoardAnalytics(s,t,o.org??"",o.project??"",o.from,o.to),e[0]=s,e[1]=o.from,e[2]=o.org,e[3]=o.project,e[4]=o.to,e[5]=t,e[6]=c):c=e[6];let T;e[7]!==o||e[8]!==n||e[9]!==t?(T=()=>n.call(t,o),e[7]=o,e[8]=n,e[9]=t,e[10]=T):T=e[10];let A;return e[11]!==c||e[12]!==T?(A={queryKey:c,queryFn:T},e[11]=c,e[12]=T,e[13]=A):A=e[13],S(A)}function D(t,o){const e=O.c(15),{locator:s}=i(),n=l();let c;e[0]!==o||e[1]!==s||e[2]!==t.from||e[3]!==t.org||e[4]!==t.project||e[5]!==t.to?(c=_.taskBoardOperationTasks(s,t.org??"",t.project??"",t.from,t.to,o??""),e[0]=o,e[1]=s,e[2]=t.from,e[3]=t.org,e[4]=t.project,e[5]=t.to,e[6]=c):c=e[6];const T=o!==null;let A;e[7]!==o||e[8]!==t||e[9]!==n?(A=()=>n.call("TASK_BOARD_OPERATION_TASKS",{...t,drill:o??""}),e[7]=o,e[8]=t,e[9]=n,e[10]=A):A=e[10];let u;return e[11]!==c||e[12]!==T||e[13]!==A?(u={queryKey:c,enabled:T,queryFn:A},e[11]=c,e[12]=T,e[13]=A,e[14]=u):u=e[14],S(u)}export{K as A,y as a,D as b,B as u};
|
package/dist/client/assets/{use-task-board-events-CuH-inlF.js → use-task-board-events-iA0mSg2Q.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"./task-board-
|
|
1
|
+
import{a as m}from"./task-board-DVtARw_U.js";import{r as e}from"./index-5IFWC0PS.js";import{t as g}from"./watch-sse-pool-Cgkbp7EA.js";const p=()=>0;function v(E){const{orgSlug:r,enabled:t=!0,onUpdate:u,onDelete:c,onResync:o}=E,a=e.useRef(u);a.current=u;const f=e.useRef(c);f.current=c;const d=e.useRef(o);d.current=o;const s=e.useRef(null),R=e.useRef(t),i=e.useRef(r);(!s.current||R.current!==t||i.current!==r)&&(R.current=t,i.current=r,s.current=b=>{if(!t||!r)return()=>{};const S=l=>{let n;try{n=JSON.parse(l.data)}catch{return}n.data&&(l.type===m?f.current?.(n.data.id):a.current(n.data)),b()};return g.subscribe(r,S,()=>d.current?.())}),e.useSyncExternalStore(s.current,p,p)}export{v as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as y,
|
|
1
|
+
import{r as y,at as w,c as h,a4 as R,ak as k,q as T,i as O,K as A}from"./index-5IFWC0PS.js";import{c as B}from"./watch-sse-pool-Cgkbp7EA.js";const P=()=>0;function C(e){const{orgSlug:t,itemId:s,onPrs:r}=e,o=y.useRef(r);o.current=r;const l=y.useRef(null),a=y.useRef(""),i=`${t}:${s??""}`;(!l.current||a.current!==i)&&(a.current=i,l.current=u=>{if(!t||!s)return()=>{};const d=c=>{let n;try{n=JSON.parse(c.data)}catch{return}n.data?.id!==s||!Array.isArray(n.data.prs)||(o.current(n.data.prs),u())};return B.subscribe(t,d)}),y.useSyncExternalStore(l.current,P,P)}const E=1440*60*1e3,D=40;function g(e){try{const t=window.localStorage.getItem(w.taskBoardPrs(e));return t?JSON.parse(t):{}}catch{return{}}}function L(e){const t=Date.now(),s=Object.entries(e).filter(([,r])=>t-r.updatedAt<=E);for(s.sort(([,r],[,o])=>r.updatedAt-o.updatedAt);s.length>D;)s.shift();return Object.fromEntries(s)}function _(e,t){if(typeof window>"u")return null;const s=g(e)[t];return!s||Date.now()-s.updatedAt>E?null:s}function b(e,t,s){if(!(typeof window>"u"))try{const r=g(e);r[t]={data:s,updatedAt:Date.now()},window.localStorage.setItem(w.taskBoardPrs(e),JSON.stringify(L(r)))}catch{}}const v=6e4,K=2e3,N=e=>e.state===null;function j(e){const t=h.c(25),{org:s,locator:r}=R(),o=k(),l=T();let a;t[0]!==e||t[1]!==r||t[2]!==l?(a=S=>{l.setQueryData(A.taskBoardItemPrs(r,e??""),S)},t[0]=e,t[1]=r,t[2]=l,t[3]=a):a=t[3];let i;t[4]!==e||t[5]!==s.slug||t[6]!==a?(i={orgSlug:s.slug,itemId:e,onPrs:a},t[4]=e,t[5]=s.slug,t[6]=a,t[7]=i):i=t[7],C(i);let u;t[8]!==e||t[9]!==r?(u=A.taskBoardItemPrs(r,e??""),t[8]=e,t[9]=r,t[10]=u):u=t[10];const d=!!e;let c,n;t[11]!==e||t[12]!==r?(c=()=>e?_(r,e)?.data??void 0:void 0,n=()=>e?_(r,e)?.updatedAt:void 0,t[11]=e,t[12]=r,t[13]=c,t[14]=n):(c=t[13],n=t[14]);let f;t[15]!==e||t[16]!==r||t[17]!==o?(f=async()=>{const{prs:S}=await o.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:e});return b(r,e,S),S},t[15]=e,t[16]=r,t[17]=o,t[18]=f):f=t[18];let p;return t[19]!==u||t[20]!==d||t[21]!==c||t[22]!==n||t[23]!==f?(p={queryKey:u,enabled:d,refetchInterval:M,initialData:c,initialDataUpdatedAt:n,queryFn:f},t[19]=u,t[20]=d,t[21]=c,t[22]=n,t[23]=f,t[24]=p):p=t[24],O(p)}function M(e){return e.state.data?.some(N)?K:v}export{j as u};
|
package/dist/client/assets/{use-task-board-items-BNRTDOsU.js → use-task-board-items-DQYVvsFC.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as j,b as Y}from"./config-
|
|
1
|
+
import{i as j,b as Y}from"./config-DTkH3DlA.js";import{c as P,a4 as U,q as W,K as E,ak as G,i as V,b as X,e as R,E as Z,t as H}from"./index-5IFWC0PS.js";import{u as tt}from"./use-task-board-events-iA0mSg2Q.js";import{u as et}from"./use-decopilot-events-Ctfpdj_z.js";const st=new Set(["post_deploy_validation","done"]),at=new Set(["done","archived"]);function J(t){if(!st.has(t.status)||!t.updatedAt)return null;const r=Date.parse(t.updatedAt);return Number.isNaN(r)?null:r}function ft(t,r){return t.filter(s=>(J(s)??-1/0)>=r).length}function mt(t,r){return t.filter(s=>at.has(s.status)?!1:r&&s.assigneeId===r?!0:j(s)||Y(s)).sort((s,e)=>(s.updatedAt??"").localeCompare(e.updatedAt??""))}function yt(t){return j(t)?"answer":Y(t)?"review":"assigned"}function ht(t){const r=[];for(const s of t)for(const e of s.threads)e.status==="in_progress"&&r.push({threadId:e.threadId,taskId:s.id,taskTitle:s.title,runTitle:e.title,startedAt:e.createdAt});return r.sort((s,e)=>e.startedAt.localeCompare(s.startedAt))}const gt=14;function At(t,r,s=Date.now()){const e=new Array(r).fill(0);for(const a of t){const n=J(a);if(n===null)continue;const i=r-1-Math.floor(Math.max(0,s-n)/864e5);i>=0&&i<r&&(e[i]+=1)}return e}function It(t,r,s=Date.now()){const e=new Array(r).fill(0);for(const a of t)for(const n of a.threads){const i=Date.parse(n.lastActiveAt);if(Number.isNaN(i))continue;const o=r-1-Math.floor(Math.max(0,s-i)/864e5);o>=0&&o<r&&(e[o]+=1)}return e}function rt(t){const r=new Date(t);r.setDate(1),r.setHours(0,0,0,0);const s=r.getTime();return{since:s,days:Math.floor((t-s)/864e5)+1}}function St(t,r=Date.now()){const{since:s,days:e}=rt(r),a=new Array(e).fill(0);for(const n of t)for(const i of n.threads){const o=Date.parse(i.lastActiveAt);if(Number.isNaN(o)||o<s||o>r)continue;const m=Math.floor((o-s)/864e5);m>=0&&m<e&&(a[m]+=i.costUsd??0)}return a}function Tt(t){return t<=0?"$0":t>=1e3?`$${(t/1e3).toFixed(1)}k`:t>=10?`$${Math.round(t)}`:`$${t.toFixed(2)}`}function nt(t,r){return{queryKey:E.taskBoardItems(t),refetchInterval:6e4,queryFn:async()=>{const{items:s,demoFrozenItemIds:e}=await r.call("TASK_BOARD_ITEM_LIST",{});return{items:s,demoFrozenItemIds:e}}}}function ot(){const t=P.c(21),{org:r,locator:s}=U(),e=W();let a;t[0]!==s?(a=E.taskBoardItems(s),t[0]=s,t[1]=a):a=t[1];const n=a;let i;t[2]!==s||t[3]!==e||t[4]!==n?(i=y=>{e.cancelQueries({queryKey:n}),e.setQueryData(n,d=>d&&{...d,items:d.items.some(c=>c.id===y.id)?d.items.map(c=>c.id===y.id?y:c):[y,...d.items]}),e.invalidateQueries({queryKey:E.taskBoardActivity(s,y.id)}),e.invalidateQueries({queryKey:E.taskBoardComments(s,y.id)})},t[2]=s,t[3]=e,t[4]=n,t[5]=i):i=t[5];let o,m;t[6]!==e||t[7]!==n?(o=()=>{e.invalidateQueries({queryKey:n})},m=y=>{e.cancelQueries({queryKey:n}),e.setQueryData(n,d=>d&&{...d,items:d.items.filter(c=>c.id!==y)})},t[6]=e,t[7]=n,t[8]=o,t[9]=m):(o=t[8],m=t[9]);let u;t[10]!==r.slug||t[11]!==i||t[12]!==o||t[13]!==m?(u={orgSlug:r.slug,onUpdate:i,onResync:o,onDelete:m},t[10]=r.slug,t[11]=i,t[12]=o,t[13]=m,t[14]=u):u=t[14],tt(u);let h;t[15]!==e||t[16]!==n?(h=y=>{const d=y.subject,c=y.data.status;e.cancelQueries({queryKey:n}),e.setQueryData(n,g=>g&&{...g,items:g.items.map(A=>A.threads.some(S=>S.threadId===d)?{...A,threads:A.threads.map(S=>S.threadId===d?{...S,status:c}:S)}:A)});const D=e.getQueryData(n)?.items.some(g=>g.threads.some(A=>A.threadId===d));c==="failed"&&D&&e.invalidateQueries({queryKey:n})},t[15]=e,t[16]=n,t[17]=h):h=t[17];let T;t[18]!==r.slug||t[19]!==h?(T={orgSlug:r.slug,onTaskStatus:h},t[18]=r.slug,t[19]=h,t[20]=T):T=t[20],et(T)}function Dt(){const t=P.c(13),{locator:r}=U(),s=G();let e;t[0]!==r||t[1]!==s?(e=nt(r,s),t[0]=r,t[1]=s,t[2]=e):e=t[2];const a=V(e);ot();let n;t[3]!==a.data?.items?(n=a.data?.items??[],t[3]=a.data?.items,t[4]=n):n=t[4];let i;t[5]!==a.data?.demoFrozenItemIds?(i=a.data?.demoFrozenItemIds??[],t[5]=a.data?.demoFrozenItemIds,t[6]=i):i=t[6];let o;return t[7]!==a.error||t[8]!==a.isFetching||t[9]!==a.isLoading||t[10]!==n||t[11]!==i?(o={items:n,demoFrozenItemIds:i,isLoading:a.isLoading,isFetching:a.isFetching,error:a.error},t[7]=a.error,t[8]=a.isFetching,t[9]=a.isLoading,t[10]=n,t[11]=i,t[12]=o):o=t[12],o}function Et(){const t=P.c(70),{org:r,locator:s}=U(),e=G(),a=W(),n=X();let i;t[0]!==s?(i=E.taskBoardItems(s),t[0]=s,t[1]=i):i=t[1];const o=i;let m;t[2]!==a||t[3]!==o?(m=()=>a.invalidateQueries({queryKey:o}),t[2]=a,t[3]=o,t[4]=m):m=t[4];const u=m;let h;t[5]!==e?(h=l=>e.call("TASK_BOARD_ITEM_CREATE",l),t[5]=e,t[6]=h):h=t[6];let T;t[7]!==u||t[8]!==h?(T={mutationFn:h,onSuccess:u},t[7]=u,t[8]=h,t[9]=T):T=t[9];const y=R(T);let d;t[10]!==e?(d=l=>e.call("TASK_BOARD_ITEM_UPDATE",l),t[10]=e,t[11]=d):d=t[11];let c;t[12]!==a||t[13]!==o?(c=async l=>{await a.cancelQueries({queryKey:o});const I=a.getQueryData(o);return a.setQueryData(o,f=>f&&{...f,items:f.items.map(O=>O.id===l.id?{...O,...l,...l.status!==void 0&&l.status!==O.status&&{statusSince:new Date().toISOString()}}:O)}),{previous:I}},t[12]=a,t[13]=o,t[14]=c):c=t[14];let D;t[15]!==r?(D=(l,I)=>{I.status==="done"&&Z("task_marked_done",{organization_id:r.id,task_board_item_id:I.id})},t[15]=r,t[16]=D):D=t[16];let g;t[17]!==a||t[18]!==o?(g=(l,I,f)=>{f?.previous&&a.setQueryData(o,f.previous)},t[17]=a,t[18]=o,t[19]=g):g=t[19];let A;t[20]!==u||t[21]!==s||t[22]!==a?(A=(l,I,f)=>{u(),a.invalidateQueries({queryKey:E.taskBoardActivity(s,f.id)})},t[20]=u,t[21]=s,t[22]=a,t[23]=A):A=t[23];let S;t[24]!==d||t[25]!==c||t[26]!==D||t[27]!==g||t[28]!==A?(S={mutationFn:d,onMutate:c,onSuccess:D,onError:g,onSettled:A},t[24]=d,t[25]=c,t[26]=D,t[27]=g,t[28]=A,t[29]=S):S=t[29];const $=R(S);let k;t[30]!==e?(k=l=>e.call("TASK_BOARD_ITEM_DELETE",{id:l}),t[30]=e,t[31]=k):k=t[31];let _;t[32]!==u||t[33]!==n?(_=l=>{H.error(l instanceof Error&&l.message?l.message:n("taskBoard.taskBoard.deleteError")),u()},t[32]=u,t[33]=n,t[34]=_):_=t[34];let w;t[35]!==u||t[36]!==k||t[37]!==_?(w={mutationFn:k,onSuccess:u,onError:_},t[35]=u,t[36]=k,t[37]=_,t[38]=w):w=t[38];const x=R(w);let B;t[39]!==e?(B=async l=>{const I=await Promise.allSettled(l.map(f=>e.call("TASK_BOARD_ITEM_DELETE",{id:f})));return{total:l.length,failed:I.filter(it).length}},t[39]=e,t[40]=B):B=t[40];let p,Q;t[41]!==n?(p=l=>{const{total:I,failed:f}=l;f!==0&&H.error(n("taskBoard.taskBoard.deleteBulkError",{failed:String(f),total:String(I)}))},Q=()=>H.error(n("taskBoard.taskBoard.deleteError")),t[41]=n,t[42]=p,t[43]=Q):(p=t[42],Q=t[43]);let q;t[44]!==u||t[45]!==B||t[46]!==p||t[47]!==Q?(q={mutationFn:B,onSuccess:p,onError:Q,onSettled:u},t[44]=u,t[45]=B,t[46]=p,t[47]=Q,t[48]=q):q=t[48];const L=R(q);let M;t[49]!==e?(M=l=>e.call("TASK_BOARD_ITEM_UPDATE",l),t[49]=e,t[50]=M):M=t[50];let v;t[51]!==u||t[52]!==M?(v={mutationFn:M,onSuccess:u},t[51]=u,t[52]=M,t[53]=v):v=t[53];const b=R(v);let F;t[54]!==e?(F=l=>e.call("TASK_BOARD_ITEM_RERUN",l),t[54]=e,t[55]=F):F=t[55];let K;t[56]!==u||t[57]!==s||t[58]!==a?(K=(l,I,f)=>{u(),a.invalidateQueries({queryKey:E.taskBoardActivity(s,f.id)})},t[56]=u,t[57]=s,t[58]=a,t[59]=K):K=t[59];let N;t[60]!==F||t[61]!==K?(N={mutationFn:F,onSettled:K},t[60]=F,t[61]=K,t[62]=N):N=t[62];const z=R(N);let C;return t[63]!==y||t[64]!==b||t[65]!==x||t[66]!==L||t[67]!==z||t[68]!==$?(C={create:y,update:$,remove:x,removeMany:L,link:b,rerun:z},t[63]=y,t[64]=b,t[65]=x,t[66]=L,t[67]=z,t[68]=$,t[69]=C):C=t[69],C}function it(t){return t.status==="rejected"}export{gt as R,nt as a,yt as b,At as c,It as d,St as e,Tt as f,Dt as g,Et as h,ht as r,ft as s,mt as t,ot as u};
|
package/dist/client/assets/{use-task-board-prompts-CTcrXcvj.js → use-task-board-prompts-DaZyR7M-.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,b as D,m as z,j as o,a4 as q,L as Z,ar as ee,d as te,r as U,h9 as se,B as ae,t as oe,aj as V,K as F,i as ne,q as Y,e as le}from"./index-Dd5hidCj.js";import{s as W}from"./Plus-Bcl7avNA.js";import{s as re}from"./XClose-TMdj_yIm.js";import{i as ie}from"./Zap-BJ5eCR1y.js";import{B as K}from"./badge-D7MkXlu5.js";import{f as ce,a as ue,c as de,C as me,e as fe,b as pe}from"./command-Bh995x5J.js";import{I as xe}from"./icon-button-CyNmKrzV.js";import{c as ge,a as he,b as je,S as ve}from"./sheet-DUtlbS4K.js";import{j as ke}from"./use-org-fs-8086pm93.js";import{a as Ne}from"./use-project-scope-Dqnjf5Fg.js";import{u as J,a as _e}from"./use-automations-akR-tcRi.js";import{C as ye}from"./task-board-BZ6FZl9j.js";import{b as be}from"./watch-sse-pool-2U2aYEEI.js";const Be={triage:"taskBoard.columnGuide.triage",todo:"taskBoard.columnGuide.todo",in_progress:"taskBoard.columnGuide.inProgress",in_review:"taskBoard.columnGuide.inReview",qa:"taskBoard.columnGuide.qa",customer_approval:"taskBoard.columnGuide.customerApproval",ready_for_deployment:"taskBoard.columnGuide.readyForDeployment",post_deploy_validation:"taskBoard.columnGuide.postDeployValidation",done:null,archived:null};function Se(t){const e=ye.find(a=>a===t);return e?Be[e]:null}function He(t){const e=$.c(7),{data:a}=J();let s;e[0]!==a?(s=a??[],e[0]=a,e[1]=s):s=e[1];let n;if(e[2]!==t||e[3]!==s){let l;e[5]!==t?(l=r=>r.board_triggers.some(c=>c.type==="board_column_transition"&&c.column_key===t),e[5]=t,e[6]=l):l=e[6],n=s.filter(l),e[2]=t,e[3]=s,e[4]=n}else n=e[4];return n}function Q(t){switch(t){case"board_column_transition":return 0;case"board_pr_ready":return 1;case"board_pr_merged":return 2;default:return t}}function Ce(t){switch(t){case"board_column_transition":return"taskBoard.columnRules.starter.board_column_transition";case"board_pr_ready":return"taskBoard.columnRules.starter.board_pr_ready";case"board_pr_merged":return"taskBoard.columnRules.starter.board_pr_merged";default:return t}}function Re(t){const e=$.c(5),{data:a}=J();let s;if(e[0]!==t||e[1]!==a){let n;e[3]!==t?(n=l=>{const r=l.board_triggers.find(c=>c.column_key===t);return r?[{automation:l,starter:r.type}]:[]},e[3]=t,e[4]=n):n=e[4],s=(a??[]).flatMap(n).sort(Ae),e[0]=t,e[1]=a,e[2]=s}else s=e[2];return s}function Ae(t,e){return Number(e.automation.active)-Number(t.automation.active)||Q(t.starter)-Q(e.starter)}function Ue(t){const e=$.c(37),{columnKey:a,label:s,icon:n,iconClassName:l,open:r,onOpenChange:c}=t,i=D(),{org:u}=q(),g=Se(a),d=Re(a);let h;e[0]!==c?(h=()=>c(!1),e[0]=c,e[1]=h):h=e[1];const x=h,R=je,_=he,O="w-full gap-0 sm:max-w-md",y=void 0,b=Te,B=ge,A="gap-1 pb-0";let m;e[2]!==n||e[3]!==l?(m=n&&o.jsx(n,{size:16,className:l}),e[2]=n,e[3]=l,e[4]=m):m=e[4];let j;e[5]!==s||e[6]!==m?(j=o.jsxs(ve,{className:"flex items-center gap-2",children:[m,s]}),e[5]=s,e[6]=m,e[7]=j):j=e[7];const T=g&&o.jsx("p",{className:"surface-inset mt-2 rounded-xl px-3.5 py-3 text-sm leading-relaxed text-foreground",children:i(g)});let v;e[8]!==B||e[9]!==j||e[10]!==T?(v=o.jsxs(B,{className:A,children:[j,T]}),e[8]=B,e[9]=j,e[10]=T,e[11]=v):v=e[11];let k;e[12]!==i?(k=i("taskBoard.columnRules.runsHere"),e[12]=i,e[13]=k):k=e[13];let S;e[14]!==k?(S=o.jsx("h3",{className:"text-meta",children:k}),e[14]=k,e[15]=S):S=e[15];let f;e[16]!==d||e[17]!==a||e[18]!==s||e[19]!==x||e[20]!==u||e[21]!==i?(f=d.length===0?o.jsx(we,{columnKey:a,label:s,onLeave:x}):o.jsx("div",{className:"surface divide-y divide-border",children:d.map(L=>{const{automation:N,starter:E}=L;return o.jsxs(Z,{to:"/$org/projects/$agentId/automations/$automationId",params:{org:u.slug,agentId:N.virtual_mcp_id,automationId:N.id},onClick:x,className:"group flex items-center gap-3 px-3 py-2.5 transition-colors hover:bg-accent/50",children:[o.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[o.jsx("span",{className:z("truncate text-sm",N.active?"text-foreground":"text-muted-foreground"),children:N.name}),o.jsx("span",{className:"text-meta",children:N.active?i(Ce(E)):i("taskBoard.columnRules.off")})]}),o.jsx(ee,{size:14,className:"shrink-0 text-muted-foreground transition-colors group-hover:text-foreground"})]},N.id)})}),e[16]=d,e[17]=a,e[18]=s,e[19]=x,e[20]=u,e[21]=i,e[22]=f):f=e[22];let w;e[23]!==S||e[24]!==f?(w=o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto px-4 pt-6 pb-6",children:[S,f]}),e[23]=S,e[24]=f,e[25]=w):w=e[25];let I;e[26]!==_||e[27]!==w||e[28]!==y||e[29]!==b||e[30]!==v?(I=o.jsxs(_,{className:O,"aria-describedby":y,onOpenAutoFocus:b,children:[v,w]}),e[26]=_,e[27]=w,e[28]=y,e[29]=b,e[30]=v,e[31]=I):I=e[31];let C;return e[32]!==R||e[33]!==r||e[34]!==c||e[35]!==I?(C=o.jsx(R,{open:r,onOpenChange:c,children:I}),e[32]=R,e[33]=r,e[34]=c,e[35]=I,e[36]=C):C=e[36],C}function Te(t){return t.preventDefault()}function we({columnKey:t,label:e,onLeave:a}){const s=D(),{org:n}=q(),{project:l}=Ne(),r=te(),{create:c,triggerAdd:i}=_e(),[u,g]=U.useState(!1),d=l?.id??se(n.id),h=async()=>{g(!0);try{const x=await c.mutateAsync({name:s("taskBoard.columnRules.newAutomationName",{column:e}),messages:[],models:{tier:"smart"},active:!1,virtual_mcp_id:d});await i.mutateAsync({automation_id:x.id,type:"board_column_transition",column_key:t}),a(),r({to:"/$org/projects/$agentId/automations/$automationId",params:{org:n.slug,agentId:d,automationId:x.id}})}catch{oe.error(s("taskBoard.columnRules.newAutomationFailed"))}finally{g(!1)}};return o.jsxs("div",{className:"surface flex flex-col items-center gap-3 px-6 py-8 text-center",children:[o.jsx("span",{className:"flex size-9 items-center justify-center rounded-full bg-muted text-muted-foreground",children:o.jsx(ie,{size:16})}),o.jsx("p",{className:"text-sm font-medium text-foreground",children:s("taskBoard.columnRules.noAutomations")}),o.jsxs(ae,{variant:"outline",size:"sm",className:"gap-1.5",disabled:u,onClick:h,children:[o.jsx(W,{size:14}),s("taskBoard.columnRules.newAutomation")]})]})}const Ie=[];function Ve(t){const e=$.c(71),{value:a,onChange:s,inherited:n,fill:l}=t,r=n===void 0?Ie:n,c=l===void 0?!1:l,i=D(),u=ke();let g;e[0]!==u.data?(g=f=>u.data?.find(w=>w.id===f)?.name??f,e[0]=u.data,e[1]=g):g=e[1];const d=g;let h,x,R,_,O,y,b,B,A,m;if(e[2]!==u.data||e[3]!==c||e[4]!==r||e[5]!==d||e[6]!==s||e[7]!==i||e[8]!==a){let f;e[19]!==r||e[20]!==a?(f=p=>!p.disableModelInvocation&&!a.includes(p.id)&&!r.includes(p.id),e[19]=r,e[20]=a,e[21]=f):f=e[21];const w=(u.data??[]).filter(f);if(e[22]!==c||e[23]!==r||e[24]!==d||e[25]!==s||e[26]!==i||e[27]!==a){let p;e[30]!==r?(p=P=>!r.includes(P),e[30]=r,e[31]=p):p=e[31];const M=a.filter(p),G=c&&"min-h-0 flex-1";e[32]!==G?(m=z("flex flex-col gap-2",G),e[32]=G,e[33]=m):m=e[33],_=M.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1.5",children:M.map(P=>o.jsxs(K,{variant:"outline",className:"py-0 pr-0 pl-2",children:[d(P),o.jsx(xe,{label:i("taskBoard.columnRules.removeSkill",{skill:d(P)}),onClick:()=>s(a.filter(X=>X!==P)),className:"size-5 text-muted-foreground",children:o.jsx(re,{size:12})})]},P))}),e[22]=c,e[23]=r,e[24]=d,e[25]=s,e[26]=i,e[27]=a,e[28]=_,e[29]=m}else _=e[28],m=e[29];R=ce;const I=c&&"min-h-0 flex-1";e[34]!==I?(B=z("h-auto border",I),e[34]=I,e[35]=B):B=e[35];let C;e[36]!==i?(C=i("taskBoard.columnRules.searchSkills"),e[36]=i,e[37]=C):C=e[37],e[38]!==C?(A=o.jsx(ue,{placeholder:C,className:"h-9"}),e[38]=C,e[39]=A):A=e[39],x=de;const L=c?"max-h-none flex-1":"max-h-56";e[40]!==L?(y=z(L),e[40]=L,e[41]=y):y=e[41];let N;e[42]!==i?(N=i("taskBoard.columnRules.noSkills"),e[42]=i,e[43]=N):N=e[43],e[44]!==N?(b=o.jsx(me,{children:N}),e[44]=N,e[45]=b):b=e[45],h=fe;let E;e[46]!==s||e[47]!==a?(E=p=>o.jsxs(pe,{value:`${p.name} ${p.id}`,onSelect:()=>s([...a,p.id]),children:[o.jsx(W,{size:14,className:"shrink-0 text-muted-foreground"}),o.jsxs("span",{className:"flex min-w-0 flex-col",children:[o.jsx("span",{className:"truncate text-sm",children:p.name}),p.description&&o.jsx("span",{className:"text-meta line-clamp-1",children:p.description})]})]},p.id),e[46]=s,e[47]=a,e[48]=E):E=e[48],O=w.map(E),e[2]=u.data,e[3]=c,e[4]=r,e[5]=d,e[6]=s,e[7]=i,e[8]=a,e[9]=h,e[10]=x,e[11]=R,e[12]=_,e[13]=O,e[14]=y,e[15]=b,e[16]=B,e[17]=A,e[18]=m}else h=e[9],x=e[10],R=e[11],_=e[12],O=e[13],y=e[14],b=e[15],B=e[16],A=e[17],m=e[18];let j;e[49]!==h||e[50]!==O?(j=o.jsx(h,{children:O}),e[49]=h,e[50]=O,e[51]=j):j=e[51];let T;e[52]!==x||e[53]!==j||e[54]!==y||e[55]!==b?(T=o.jsxs(x,{className:y,children:[b,j]}),e[52]=x,e[53]=j,e[54]=y,e[55]=b,e[56]=T):T=e[56];let v;e[57]!==R||e[58]!==T||e[59]!==B||e[60]!==A?(v=o.jsxs(R,{className:B,children:[A,T]}),e[57]=R,e[58]=T,e[59]=B,e[60]=A,e[61]=v):v=e[61];let k;e[62]!==r||e[63]!==d||e[64]!==i?(k=r.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-meta",children:i("taskBoard.columnRules.inheritedHint")}),o.jsx("div",{className:"flex flex-wrap gap-1.5",children:r.map(f=>o.jsx(K,{variant:"muted",children:d(f)},f))})]}),e[62]=r,e[63]=d,e[64]=i,e[65]=k):k=e[65];let S;return e[66]!==_||e[67]!==v||e[68]!==k||e[69]!==m?(S=o.jsxs("div",{className:m,children:[_,v,k]}),e[66]=_,e[67]=v,e[68]=k,e[69]=m,e[70]=S):S=e[70],S}function Ye(){const t=$.c(7),{org:e}=q(),a=V();let s;t[0]!==e.id?(s=F.taskBoardPrompts(e.id),t[0]=e.id,t[1]=s):s=t[1];let n;t[2]!==a?(n=async()=>(await a.call("TASK_BOARD_PROMPT_LIST",{})).prompts,t[2]=a,t[3]=n):n=t[3];let l;return t[4]!==s||t[5]!==n?(l={queryKey:s,staleTime:6e4,queryFn:n},t[4]=s,t[5]=n,t[6]=l):l=t[6],ne(l)}function We(){const t=$.c(8),{org:e}=q(),a=V(),s=Y();let n;t[0]!==a?(n=async c=>{const{columnKey:i,rules:u}=c;if(u){const g=u.prompt.trim();await(g||u.skills.length?a.call("TASK_BOARD_PROMPT_UPSERT",{columnKey:i,prompt:g,skills:u.skills}):a.call("TASK_BOARD_PROMPT_DELETE",{columnKey:i}))}},t[0]=a,t[1]=n):n=t[1];let l;t[2]!==e||t[3]!==s?(l=()=>s.invalidateQueries({queryKey:F.taskBoardPrompts(e.id)}),t[2]=e,t[3]=s,t[4]=l):l=t[4];let r;return t[5]!==n||t[6]!==l?(r={mutationFn:n,onSettled:l},t[5]=n,t[6]=l,t[7]=r):r=t[7],le(r)}const H=()=>0;function Je(){const t=$.c(6),{org:e}=q(),a=Y();let s;t[0]!==e.id||t[1]!==a?(s=()=>a.invalidateQueries({queryKey:F.taskBoardPrompts(e.id)}),t[0]=e.id,t[1]=a,t[2]=s):s=t[2];const n=s;let l;t[3]!==e.slug||t[4]!==n?(l=()=>be.subscribe(e.slug,n,n),t[3]=e.slug,t[4]=n,t[5]=l):l=t[5];const r=l;U.useSyncExternalStore(r,H,H)}export{Ue as C,Ve as S,He as a,Ye as b,Se as c,We as d,Je as u};
|
|
1
|
+
import{c as $,b as D,m as z,j as o,a4 as q,L as Z,as as ee,d as te,r as U,hh as se,B as ae,t as oe,ak as V,K as F,i as ne,q as Y,e as le}from"./index-5IFWC0PS.js";import{s as W}from"./Plus-C-Or0hIv.js";import{s as re}from"./XClose-D9taHFI1.js";import{i as ie}from"./Zap-BhxT34oC.js";import{B as K}from"./badge-D9oJO89f.js";import{f as ce,a as ue,c as de,C as me,e as fe,b as pe}from"./command-CL5fBjco.js";import{I as xe}from"./icon-button-Bek6uWU8.js";import{c as he,a as ge,b as je,S as ke}from"./sheet-w42F36Fm.js";import{j as ve}from"./use-org-fs-Dpr5-hHp.js";import{a as Ne}from"./use-project-scope-D1EeIJG0.js";import{u as J,a as _e}from"./use-automations-BW9n1XZu.js";import{C as ye}from"./task-board-DVtARw_U.js";import{b as be}from"./watch-sse-pool-Cgkbp7EA.js";const Be={triage:"taskBoard.columnGuide.triage",todo:"taskBoard.columnGuide.todo",in_progress:"taskBoard.columnGuide.inProgress",in_review:"taskBoard.columnGuide.inReview",qa:"taskBoard.columnGuide.qa",customer_approval:"taskBoard.columnGuide.customerApproval",ready_for_deployment:"taskBoard.columnGuide.readyForDeployment",post_deploy_validation:"taskBoard.columnGuide.postDeployValidation",done:null,archived:null};function Se(t){const e=ye.find(a=>a===t);return e?Be[e]:null}function He(t){const e=$.c(7),{data:a}=J();let s;e[0]!==a?(s=a??[],e[0]=a,e[1]=s):s=e[1];let n;if(e[2]!==t||e[3]!==s){let l;e[5]!==t?(l=r=>r.board_triggers.some(c=>c.type==="board_column_transition"&&c.column_key===t),e[5]=t,e[6]=l):l=e[6],n=s.filter(l),e[2]=t,e[3]=s,e[4]=n}else n=e[4];return n}function Q(t){switch(t){case"board_column_transition":return 0;case"board_pr_ready":return 1;case"board_pr_merged":return 2;default:return t}}function Ce(t){switch(t){case"board_column_transition":return"taskBoard.columnRules.starter.board_column_transition";case"board_pr_ready":return"taskBoard.columnRules.starter.board_pr_ready";case"board_pr_merged":return"taskBoard.columnRules.starter.board_pr_merged";default:return t}}function Re(t){const e=$.c(5),{data:a}=J();let s;if(e[0]!==t||e[1]!==a){let n;e[3]!==t?(n=l=>{const r=l.board_triggers.find(c=>c.column_key===t);return r?[{automation:l,starter:r.type}]:[]},e[3]=t,e[4]=n):n=e[4],s=(a??[]).flatMap(n).sort(Ae),e[0]=t,e[1]=a,e[2]=s}else s=e[2];return s}function Ae(t,e){return Number(e.automation.active)-Number(t.automation.active)||Q(t.starter)-Q(e.starter)}function Ue(t){const e=$.c(37),{columnKey:a,label:s,icon:n,iconClassName:l,open:r,onOpenChange:c}=t,i=D(),{org:u}=q(),h=Se(a),d=Re(a);let g;e[0]!==c?(g=()=>c(!1),e[0]=c,e[1]=g):g=e[1];const x=g,R=je,_=ge,O="w-full gap-0 sm:max-w-md",y=void 0,b=Te,B=he,A="gap-1 pb-0";let m;e[2]!==n||e[3]!==l?(m=n&&o.jsx(n,{size:16,className:l}),e[2]=n,e[3]=l,e[4]=m):m=e[4];let j;e[5]!==s||e[6]!==m?(j=o.jsxs(ke,{className:"flex items-center gap-2",children:[m,s]}),e[5]=s,e[6]=m,e[7]=j):j=e[7];const T=h&&o.jsx("p",{className:"surface-inset mt-2 rounded-xl px-3.5 py-3 text-sm leading-relaxed text-foreground",children:i(h)});let k;e[8]!==B||e[9]!==j||e[10]!==T?(k=o.jsxs(B,{className:A,children:[j,T]}),e[8]=B,e[9]=j,e[10]=T,e[11]=k):k=e[11];let v;e[12]!==i?(v=i("taskBoard.columnRules.runsHere"),e[12]=i,e[13]=v):v=e[13];let S;e[14]!==v?(S=o.jsx("h3",{className:"text-meta",children:v}),e[14]=v,e[15]=S):S=e[15];let f;e[16]!==d||e[17]!==a||e[18]!==s||e[19]!==x||e[20]!==u||e[21]!==i?(f=d.length===0?o.jsx(we,{columnKey:a,label:s,onLeave:x}):o.jsx("div",{className:"surface divide-y divide-border",children:d.map(L=>{const{automation:N,starter:E}=L;return o.jsxs(Z,{to:"/$org/projects/$agentId/automations/$automationId",params:{org:u.slug,agentId:N.virtual_mcp_id,automationId:N.id},onClick:x,className:"group flex items-center gap-3 px-3 py-2.5 transition-colors hover:bg-accent/50",children:[o.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[o.jsx("span",{className:z("truncate text-sm",N.active?"text-foreground":"text-muted-foreground"),children:N.name}),o.jsx("span",{className:"text-meta",children:N.active?i(Ce(E)):i("taskBoard.columnRules.off")})]}),o.jsx(ee,{size:14,className:"shrink-0 text-muted-foreground transition-colors group-hover:text-foreground"})]},N.id)})}),e[16]=d,e[17]=a,e[18]=s,e[19]=x,e[20]=u,e[21]=i,e[22]=f):f=e[22];let w;e[23]!==S||e[24]!==f?(w=o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto px-4 pt-6 pb-6",children:[S,f]}),e[23]=S,e[24]=f,e[25]=w):w=e[25];let I;e[26]!==_||e[27]!==w||e[28]!==y||e[29]!==b||e[30]!==k?(I=o.jsxs(_,{className:O,"aria-describedby":y,onOpenAutoFocus:b,children:[k,w]}),e[26]=_,e[27]=w,e[28]=y,e[29]=b,e[30]=k,e[31]=I):I=e[31];let C;return e[32]!==R||e[33]!==r||e[34]!==c||e[35]!==I?(C=o.jsx(R,{open:r,onOpenChange:c,children:I}),e[32]=R,e[33]=r,e[34]=c,e[35]=I,e[36]=C):C=e[36],C}function Te(t){return t.preventDefault()}function we({columnKey:t,label:e,onLeave:a}){const s=D(),{org:n}=q(),{project:l}=Ne(),r=te(),{create:c,triggerAdd:i}=_e(),[u,h]=U.useState(!1),d=l?.id??se(n.id),g=async()=>{h(!0);try{const x=await c.mutateAsync({name:s("taskBoard.columnRules.newAutomationName",{column:e}),messages:[],models:{tier:"smart"},active:!1,virtual_mcp_id:d});await i.mutateAsync({automation_id:x.id,type:"board_column_transition",column_key:t}),a(),r({to:"/$org/projects/$agentId/automations/$automationId",params:{org:n.slug,agentId:d,automationId:x.id}})}catch{oe.error(s("taskBoard.columnRules.newAutomationFailed"))}finally{h(!1)}};return o.jsxs("div",{className:"surface flex flex-col items-center gap-3 px-6 py-8 text-center",children:[o.jsx("span",{className:"flex size-9 items-center justify-center rounded-full bg-muted text-muted-foreground",children:o.jsx(ie,{size:16})}),o.jsx("p",{className:"text-sm font-medium text-foreground",children:s("taskBoard.columnRules.noAutomations")}),o.jsxs(ae,{variant:"outline",size:"sm",className:"gap-1.5",disabled:u,onClick:g,children:[o.jsx(W,{size:14}),s("taskBoard.columnRules.newAutomation")]})]})}const Ie=[];function Ve(t){const e=$.c(71),{value:a,onChange:s,inherited:n,fill:l}=t,r=n===void 0?Ie:n,c=l===void 0?!1:l,i=D(),u=ve();let h;e[0]!==u.data?(h=f=>u.data?.find(w=>w.id===f)?.name??f,e[0]=u.data,e[1]=h):h=e[1];const d=h;let g,x,R,_,O,y,b,B,A,m;if(e[2]!==u.data||e[3]!==c||e[4]!==r||e[5]!==d||e[6]!==s||e[7]!==i||e[8]!==a){let f;e[19]!==r||e[20]!==a?(f=p=>!p.disableModelInvocation&&!a.includes(p.id)&&!r.includes(p.id),e[19]=r,e[20]=a,e[21]=f):f=e[21];const w=(u.data??[]).filter(f);if(e[22]!==c||e[23]!==r||e[24]!==d||e[25]!==s||e[26]!==i||e[27]!==a){let p;e[30]!==r?(p=P=>!r.includes(P),e[30]=r,e[31]=p):p=e[31];const M=a.filter(p),G=c&&"min-h-0 flex-1";e[32]!==G?(m=z("flex flex-col gap-2",G),e[32]=G,e[33]=m):m=e[33],_=M.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1.5",children:M.map(P=>o.jsxs(K,{variant:"outline",className:"py-0 pr-0 pl-2",children:[d(P),o.jsx(xe,{label:i("taskBoard.columnRules.removeSkill",{skill:d(P)}),onClick:()=>s(a.filter(X=>X!==P)),className:"size-5 text-muted-foreground",children:o.jsx(re,{size:12})})]},P))}),e[22]=c,e[23]=r,e[24]=d,e[25]=s,e[26]=i,e[27]=a,e[28]=_,e[29]=m}else _=e[28],m=e[29];R=ce;const I=c&&"min-h-0 flex-1";e[34]!==I?(B=z("h-auto border",I),e[34]=I,e[35]=B):B=e[35];let C;e[36]!==i?(C=i("taskBoard.columnRules.searchSkills"),e[36]=i,e[37]=C):C=e[37],e[38]!==C?(A=o.jsx(ue,{placeholder:C,className:"h-9"}),e[38]=C,e[39]=A):A=e[39],x=de;const L=c?"max-h-none flex-1":"max-h-56";e[40]!==L?(y=z(L),e[40]=L,e[41]=y):y=e[41];let N;e[42]!==i?(N=i("taskBoard.columnRules.noSkills"),e[42]=i,e[43]=N):N=e[43],e[44]!==N?(b=o.jsx(me,{children:N}),e[44]=N,e[45]=b):b=e[45],g=fe;let E;e[46]!==s||e[47]!==a?(E=p=>o.jsxs(pe,{value:`${p.name} ${p.id}`,onSelect:()=>s([...a,p.id]),children:[o.jsx(W,{size:14,className:"shrink-0 text-muted-foreground"}),o.jsxs("span",{className:"flex min-w-0 flex-col",children:[o.jsx("span",{className:"truncate text-sm",children:p.name}),p.description&&o.jsx("span",{className:"text-meta line-clamp-1",children:p.description})]})]},p.id),e[46]=s,e[47]=a,e[48]=E):E=e[48],O=w.map(E),e[2]=u.data,e[3]=c,e[4]=r,e[5]=d,e[6]=s,e[7]=i,e[8]=a,e[9]=g,e[10]=x,e[11]=R,e[12]=_,e[13]=O,e[14]=y,e[15]=b,e[16]=B,e[17]=A,e[18]=m}else g=e[9],x=e[10],R=e[11],_=e[12],O=e[13],y=e[14],b=e[15],B=e[16],A=e[17],m=e[18];let j;e[49]!==g||e[50]!==O?(j=o.jsx(g,{children:O}),e[49]=g,e[50]=O,e[51]=j):j=e[51];let T;e[52]!==x||e[53]!==j||e[54]!==y||e[55]!==b?(T=o.jsxs(x,{className:y,children:[b,j]}),e[52]=x,e[53]=j,e[54]=y,e[55]=b,e[56]=T):T=e[56];let k;e[57]!==R||e[58]!==T||e[59]!==B||e[60]!==A?(k=o.jsxs(R,{className:B,children:[A,T]}),e[57]=R,e[58]=T,e[59]=B,e[60]=A,e[61]=k):k=e[61];let v;e[62]!==r||e[63]!==d||e[64]!==i?(v=r.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-meta",children:i("taskBoard.columnRules.inheritedHint")}),o.jsx("div",{className:"flex flex-wrap gap-1.5",children:r.map(f=>o.jsx(K,{variant:"muted",children:d(f)},f))})]}),e[62]=r,e[63]=d,e[64]=i,e[65]=v):v=e[65];let S;return e[66]!==_||e[67]!==k||e[68]!==v||e[69]!==m?(S=o.jsxs("div",{className:m,children:[_,k,v]}),e[66]=_,e[67]=k,e[68]=v,e[69]=m,e[70]=S):S=e[70],S}function Ye(){const t=$.c(7),{org:e}=q(),a=V();let s;t[0]!==e.id?(s=F.taskBoardPrompts(e.id),t[0]=e.id,t[1]=s):s=t[1];let n;t[2]!==a?(n=async()=>(await a.call("TASK_BOARD_PROMPT_LIST",{})).prompts,t[2]=a,t[3]=n):n=t[3];let l;return t[4]!==s||t[5]!==n?(l={queryKey:s,staleTime:6e4,queryFn:n},t[4]=s,t[5]=n,t[6]=l):l=t[6],ne(l)}function We(){const t=$.c(8),{org:e}=q(),a=V(),s=Y();let n;t[0]!==a?(n=async c=>{const{columnKey:i,rules:u}=c;if(u){const h=u.prompt.trim();await(h||u.skills.length?a.call("TASK_BOARD_PROMPT_UPSERT",{columnKey:i,prompt:h,skills:u.skills}):a.call("TASK_BOARD_PROMPT_DELETE",{columnKey:i}))}},t[0]=a,t[1]=n):n=t[1];let l;t[2]!==e||t[3]!==s?(l=()=>s.invalidateQueries({queryKey:F.taskBoardPrompts(e.id)}),t[2]=e,t[3]=s,t[4]=l):l=t[4];let r;return t[5]!==n||t[6]!==l?(r={mutationFn:n,onSettled:l},t[5]=n,t[6]=l,t[7]=r):r=t[7],le(r)}const H=()=>0;function Je(){const t=$.c(6),{org:e}=q(),a=Y();let s;t[0]!==e.id||t[1]!==a?(s=()=>a.invalidateQueries({queryKey:F.taskBoardPrompts(e.id)}),t[0]=e.id,t[1]=a,t[2]=s):s=t[2];const n=s;let l;t[3]!==e.slug||t[4]!==n?(l=()=>be.subscribe(e.slug,n,n),t[3]=e.slug,t[4]=n,t[5]=l):l=t[5];const r=l;U.useSyncExternalStore(r,H,H)}export{Ue as C,Ve as S,He as a,Ye as b,Se as c,We as d,Je as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a4 as l,
|
|
1
|
+
import{a4 as l,ak as c,r as i,V as d,K as T}from"./index-5IFWC0PS.js";import{u as m}from"./thread-intent-BujELieJ.js";const p=[],S=()=>()=>{},h=()=>p;function f(t){const{org:s}=l(),r=c(),n=m(),o=i.useSyncExternalStore(n?.threads.subscribe??S,n?.threads.get??h),e=t===null?null:o.find(a=>a.id===t)??null,{data:u}=d({queryKey:T.ensureTask(s.id,t),queryFn:async()=>{if(t===null)return null;try{const{item:a}=await r.call("COLLECTION_THREADS_GET",{id:t});return a??null}catch{return null}},initialData:e&&!e.partial?e:void 0,select:a=>a?.metadata??null,staleTime:3e4});return e?.metadata??u??null}export{f as u};
|
package/dist/client/assets/{use-thread-outputs-COaP8znq.js → use-thread-outputs-nmtU5Zq-.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,a4 as i,i as l,K as p}from"./index-
|
|
1
|
+
import{c,a4 as i,i as l,K as p}from"./index-5IFWC0PS.js";import{f}from"./chat-context-BXBBnsXM.js";async function m(e,s){const t=await fetch(`/api/${s}/threads/${encodeURIComponent(e)}/outputs`,{credentials:"include"});if(!t.ok)throw new Error(`Failed to fetch thread outputs: ${t.status}`);return(await t.json()).objects??[]}function $(){const e=c.c(2),s=f()?.messages??[];let t;return e[0]!==s?(t=s.some(y),e[0]=s,e[1]=t):t=e[1],t}function y(e){return e.parts?.some(b)}function b(e){const s=e;return(s.type==="tool-bash"||s.type==="tool-write")&&s.state==="output-available"}function g(e,s){const t=c.c(9),{org:u}=i();let o;t[0]!==e?(o=p.threadOutputs(e??""),t[0]=e,t[1]=o):o=t[1];let n;t[2]!==u||t[3]!==e?(n=()=>m(e??"",u.slug),t[2]=u,t[3]=e,t[4]=n):n=t[4];const r=!!e&&(s?.enabled??!0);let a;return t[5]!==o||t[6]!==n||t[7]!==r?(a={queryKey:o,queryFn:n,enabled:r,staleTime:0},t[5]=o,t[6]=n,t[7]=r,t[8]=a):a=t[8],l(a)}export{g as a,$ as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as m,f as w,u as A,cG as k,d as x,l as I,cH as _,cI as P,at as K,cJ as O,cK as R}from"./index-5IFWC0PS.js";import{b as j}from"./thread-route-CG4NoBnV.js";import{u as B}from"./use-project-scope-D1EeIJG0.js";import{a as L,c as M}from"./use-organization-settings-CIEI8bNF.js";import{f as v,i as c,j as F,t as U,d as J,g as T}from"./thread-intent-BujELieJ.js";function $(e){const t=e.destination==="agent",n={thread:t?e.previous.thread:void 0,sidepanel:e.previous.sidepanel,autosend:t?e.previous.autosend:void 0};return{...e.update?e.update(n):n,mainpanel:void 0}}function z(){const e=m.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={structuralSharing:!0,select:C},e[0]=t):t=e[0],I(t)}function C(e){for(let t=e.matches.length-1;t>=0;t--){const n=e.matches[t]?.staticData;if(n?.mainView||n?.siteEditorView)return{mainView:n.mainView,siteEditorView:n.siteEditorView}}return{mainView:void 0,siteEditorView:void 0}}function ce(){const e=m.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=w(t);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const r=A(a),i={file:"file"in r&&typeof r.file=="string"?r.file:void 0,key:"key"in r&&typeof r.key=="string"?r.key:void 0,path:"path"in r&&typeof r.path=="string"?r.path:void 0},{mainView:o,siteEditorView:s}=z();return k({mainView:o,siteEditorView:s,params:n,search:i})}function ue(){const e=m.c(11),t=x();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const a=w(n),r=j(),i=B(),o=a.org??"";let s;e[1]!==t||e[2]!==o||e[3]!==r||e[4]!==i?(s=(d,u)=>{const y=_(d),S=u?.virtualmcpid!==void 0||i!==null?"project":"organization",D=y.kind==="org-destination"||y.kind==="project-destination"&&S==="organization",E=N=>$({previous:N,destination:D?"organization":"agent",update:u?.search});P(t,{org:o,agentId:u?.virtualmcpid??r,tabId:d,destinationScope:S,taskKey:u?.taskKey,search:E,replace:u?.replace??!0})},e[1]=t,e[2]=o,e[3]=r,e[4]=i,e[5]=s):s=e[5];const p=s;let l;e[6]!==t?(l=d=>t({to:".",search:G,replace:d?.replace??!0}),e[6]=t,e[7]=l):l=e[7];const h=l;let f;return e[8]!==h||e[9]!==p?(f={openPanel:p,closePanel:h},e[8]=h,e[9]=p,e[10]=f):f=e[10],f}function G(e){return{...e,mainpanel:!1,sidepanel:!0}}const Y=1e4,le="true",b=2;function g(e,t){return K.chatAutosend(e,t)}function H(e){return e==="pending"||e==="sending"}function Q(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}if(!t||typeof t!="object")return null;const n=t;let a=0;n.status==="sending"?a=n.retryAt===void 0?1:b:n.retryAt!==void 0&&(a=1);const r=n.attempt===void 0?a:n.attempt;return typeof n.createdAt!="number"||typeof n.message!="object"||!H(n.status)||n.retryAt!==void 0&&typeof n.retryAt!="number"||typeof r!="number"||!Number.isInteger(r)||r<0||r>b?null:{...t,attempt:r}}function fe(e,t,n,a,r=Date.now()){const i={message:a,createdAt:r,status:"pending",attempt:0};return e.setItem(g(t,n),JSON.stringify(i)),i}function W(e,t,n){const a=g(t,n),r=Q(e.getItem(a));return r||(e.removeItem(a),null)}function de(e,t,n,a=Date.now()){const r=g(t,n),i=W(e,t,n);if(!i||i.status!=="pending")return null;if(i.attempt>=b)return e.removeItem(r),null;const o=i.retryAt??i.createdAt;if(a-o>=Y)return e.removeItem(r),null;const s={...i,status:"sending",attempt:i.attempt+1};return e.setItem(r,JSON.stringify(s)),{message:s.message,createdAt:s.createdAt,attempt:s.attempt}}function me(e,t,n){e.removeItem(g(t,n))}const X=new Set(["site-editor","content","code","calendar","experiments"]);function q(e,t,n){return n?e==="blog"||e==="blog-post"?"blog":e==="monitoring"?t==="experiments"?"site":null:e&&X.has(e)?"site":null:null}function V(e){return c(e)?"blog":"site"}function ge(e,t,n){return t===null?[...e]:e.filter(a=>V(a.branch)===t||a.branch===n)}function pe(e,t,n,a){const r=e.filter(i=>i.branch!==t&&(n===null||V(i.branch)===n));return r.find(i=>(i.runtime??a)!=="sandbox")??r[0]}function he(e){return c(e)?"thread.branchPicker.blogDraftName":"thread.branchPicker.defaultVersionName"}function Z(e,t,n){return e==="blog"?c(t.branch)||F(t.metadata,n)==="sandbox":e==="site"?!c(t.branch):!0}function be(e,t,n){return!t.partial&&e==="blog"===c(t.branch)&&U(t,J(n))}function ve(e,t){const n=e||v(t);return c(n)?{branch:n}:{branch:n,runtime:"sandbox"}}function ee(e,t,n){return Z(e,t,n)?null:e==="blog"?"site-editor":"blog"}function ye(e,t,n){return n&&c(e)?v(t):T(t)}function Se(e){const t=e.viewKind==="blog"||e.blogView&&c(e.branch)?v(e.userLabel):T(e.userLabel);return e.projectDefault==="cms"?{kind:"new-thread",runtime:"cms",branch:t}:{kind:"repoint",branch:t}}function te(e){if(!e)return null;const t=_(e);return t.kind==="blog"?"blog":t.kind==="site-editor"||t.kind==="agent-section"&&(t.section==="calendar"||t.section==="experiments")?"site":null}function we(e,t,n){return!e||!t||!n?e:ee(te(e),t,void 0)??e}function ne(){return L("blog_view_enabled")}function Ae(){const e=O()?.org.id,t=M("blog_view_enabled");return e?t:!1}function _e(){const e=m.c(5),t=R(),n=ne();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const r=A(a),i="view"in r&&typeof r.view=="string"?r.view:void 0;let o;return e[1]!==n||e[2]!==t||e[3]!==i?(o=q(t,i,n),e[1]=n,e[2]=t,e[3]=i,e[4]=o):o=e[4],o}export{le as A,_e as a,ue as b,ve as c,he as d,ne as e,Ae as f,de as g,me as h,be as i,ge as j,V as k,Se as l,ye as n,$ as r,pe as s,we as t,ce as u,Z as v,fe as w};
|