decocms 4.491.3 → 4.493.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/{ActiveShapeUtils-CO9ka_yi.js → ActiveShapeUtils-5xWWHSL1.js} +1 -1
- package/dist/client/assets/{AlertCircle-C3fpFT5I.js → AlertCircle-B5gBB9h_.js} +1 -1
- package/dist/client/assets/{AreaChart-BvjH9pmK.js → AreaChart-BTyzss2a.js} +1 -1
- package/dist/client/assets/{ArrowLeft-C1IFj0Ic.js → ArrowLeft-B7455tPl.js} +1 -1
- package/dist/client/assets/{ArrowUp-DR-Jhbl1.js → ArrowUp-CP6XCJnB.js} +1 -1
- package/dist/client/assets/{BarChart-CJ_IiQ71.js → BarChart-Ch51NWPz.js} +1 -1
- package/dist/client/assets/{Building02-uHT4KVtK.js → Building02-BZItaEYx.js} +1 -1
- package/dist/client/assets/{CategoricalChart-zte0bRec.js → CategoricalChart-DqN5Jy74.js} +1 -1
- package/dist/client/assets/{CheckCircle-BKHstO_Q.js → CheckCircle-C3CiaCW4.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DAO6R1Op.js → ChevronSelectorVertical-DIPs2sw-.js} +1 -1
- package/dist/client/assets/{ChevronUp-CceLPRrE.js → ChevronUp-nynZHATg.js} +1 -1
- package/dist/client/assets/{Copy01-Dx3ZT0bA.js → Copy01-CdRMK9o7.js} +1 -1
- package/dist/client/assets/{CreditCard01-Dko0T335.js → CreditCard01-DVQTLvKO.js} +1 -1
- package/dist/client/assets/{DotsVertical-aHYBPlin.js → DotsVertical-3XBYz4yU.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-B8QqSSmC.js → ErrorBarContext-Csmpy3UX.js} +1 -1
- package/dist/client/assets/{Globe04-BDe-0jS0.js → Globe04-DoxNod_i.js} +1 -1
- package/dist/client/assets/{Image01-Cxa392ef.js → Image01-DdBetDCI.js} +1 -1
- package/dist/client/assets/{Key01-BHiUNW_5.js → Key01-DcSonP-G.js} +1 -1
- package/dist/client/assets/{Link01-BRZRc4wX.js → Link01-3BacRGrf.js} +1 -1
- package/dist/client/assets/{LinkBroken01-kK_na_OL.js → LinkBroken01-BZFZ6N-h.js} +1 -1
- package/dist/client/assets/{Monitor01-Cl4JLYVa.js → Monitor01-DU19-CHk.js} +1 -1
- package/dist/client/assets/{Play-CzTcIQz_.js → Play-B7i_-ibU.js} +1 -1
- package/dist/client/assets/{Plus-nldAzVeQ.js → Plus-XYNDZJ4s.js} +1 -1
- package/dist/client/assets/{SearchMd-BiZNveM1.js → SearchMd-BFitEH5z.js} +1 -1
- package/dist/client/assets/{Sector-DOgIwKt7.js → Sector-CYOl8Efm.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-o0DdjJD9.js → ShoppingBag01-Ci8H67G0.js} +1 -1
- package/dist/client/assets/{Sun-BYGxydmh.js → Sun-D1Mdg8Cq.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Bx3d-jDI.js → SwitchHorizontal01-BHr8jCjb.js} +1 -1
- package/dist/client/assets/{Tool01-Blw6F5iV.js → Tool01-DQnW-zjg.js} +1 -1
- package/dist/client/assets/{Trash01-DAoFHSpp.js → Trash01-DZ8laRwu.js} +1 -1
- package/dist/client/assets/{Upload01-CtKBhqsv.js → Upload01-CrRTpeMX.js} +1 -1
- package/dist/client/assets/{User01-Awky2MVQ.js → User01-9bZ-cKa7.js} +1 -1
- package/dist/client/assets/{UserSquare-BMOlWqCu.js → UserSquare-CuRnLJZ6.js} +1 -1
- package/dist/client/assets/{Users01-D7ZFKC4W.js → Users01-cUGZjxDe.js} +1 -1
- package/dist/client/assets/{XAxis-BLZT-vtl.js → XAxis-DDG3qYHW.js} +1 -1
- package/dist/client/assets/{XClose-DBJ7sD1T.js → XClose-DjFCAP5F.js} +1 -1
- package/dist/client/assets/{ZoomOut-CQckFmS9.js → ZoomOut-BggitXDv.js} +1 -1
- package/dist/client/assets/{access-gate-DEyXiK2N.js → access-gate-Cu8JZecz.js} +1 -1
- package/dist/client/assets/add-connection-dialog-DBnkMFp9.js +1 -0
- package/dist/client/assets/agent-analytics-B1wni80p.js +2 -0
- package/dist/client/assets/agent-app-DY95_zYY.js +1 -0
- package/dist/client/assets/agent-assets-B18leh3z.js +1 -0
- package/dist/client/assets/agent-automation-CWXHzvtY.js +20 -0
- package/dist/client/assets/agent-automations-C0tbQ1R9.js +1 -0
- package/dist/client/assets/agent-connect-sources-CKiU44XZ.js +1 -0
- package/dist/client/assets/agent-deck-C8T7Jj3o.js +1 -0
- package/dist/client/assets/agent-e2e-LdVq-drf.js +1 -0
- package/dist/client/assets/agent-experiments-ClDYYnWj.js +1 -0
- package/dist/client/assets/agent-file-CjZFekiU.js +1 -0
- package/dist/client/assets/agent-hosting-zrg11_-A.js +1 -0
- package/dist/client/assets/agent-icon-BewGjsar.js +1 -0
- package/dist/client/assets/agent-library-BAUPDsyD.js +1 -0
- package/dist/client/assets/agent-library-file-CHlnBg90.js +1 -0
- package/dist/client/assets/agent-monitor-CKpvG_Lm.js +1 -0
- package/dist/client/assets/agent-overview-Di3y0uXp.js +1 -0
- package/dist/client/assets/agent-settings-C-kNuurj.js +1 -0
- package/dist/client/assets/{agent-site-editor-Dv8qh0xB.js → agent-site-editor-16duoEZY.js} +5 -5
- package/dist/client/assets/agent-site-editor-code-BUJylH9_.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-EotWUMUT.js → agent-site-editor-content-B64VGP55.js} +6 -6
- package/dist/client/assets/agent-site-editor-preview-DIihiuj0.js +518 -0
- package/dist/client/assets/agent-view-SjLiGW-o.js +1 -0
- package/dist/client/assets/{agent-view-guard-Bf5Bn5K4.js → agent-view-guard-CoiTTfLB.js} +1 -1
- package/dist/client/assets/agents-list-CFQQdh1t.js +1 -0
- package/dist/client/assets/{ai-providers-VCM02Z-N.js → ai-providers-CTzk8MgQ.js} +2 -2
- package/dist/client/assets/{alert-CGA3Ty0D.js → alert-Dyx5I-Y3.js} +1 -1
- package/dist/client/assets/{alert-dialog-kjq4dW3k.js → alert-dialog-BXEG2ySJ.js} +2 -2
- package/dist/client/assets/{analytics-sections-Cjkr8Muu.js → analytics-sections-BeEYJnmv.js} +1 -1
- package/dist/client/assets/api-keys-CH5G5_Qp.js +1 -0
- package/dist/client/assets/api-keys-JMxYvHms.js +1 -0
- package/dist/client/assets/app-editor-DqEmpUhy.js +1 -0
- package/dist/client/assets/asset-utils-Euq8y8zU.js +1 -0
- package/dist/client/assets/{auth-Cps-90jQ.js → auth-Dwu4WH32.js} +1 -1
- package/dist/client/assets/{auth-catchall-Batt4Wp1.js → auth-catchall-D9Xe8fii.js} +1 -1
- package/dist/client/assets/auth-entry-CCIy-Mhs.js +1 -0
- package/dist/client/assets/{auth-split-layout-lt03dL19.js → auth-split-layout-DXUbMgnq.js} +1 -1
- package/dist/client/assets/authenticate-and-persist-oauth-BEdNWkUl.js +1 -0
- package/dist/client/assets/{automation-list-row-C9YrfX3o.js → automation-list-row-Du4blVfm.js} +1 -1
- package/dist/client/assets/automation-runs-BsFnE3d4.js +1 -0
- package/dist/client/assets/automations-Cpff9O08.js +1 -0
- package/dist/client/assets/autosend-BaKgBZDQ.js +1 -0
- package/dist/client/assets/{avatar-TL9HUab0.js → avatar-BEl6nltF.js} +1 -1
- package/dist/client/assets/{badge-CKM84j2S.js → badge-DFdotQFQ.js} +1 -1
- package/dist/client/assets/{block-document-w2kAyl6z.js → block-document-BlUE8Eks.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-PwUYRK7b.js → blocks-preview-workspace-context-DSOKao_H.js} +1 -1
- package/dist/client/assets/{blog-schema-Cx6xDQRb.js → blog-schema-B_yGbArL.js} +1 -1
- package/dist/client/assets/{board-analytics-DT3f2AVB.js → board-analytics-UmA2i-Sq.js} +1 -1
- package/dist/client/assets/buckets-CJ11qX_5.js +1 -0
- package/dist/client/assets/{build-improve-prompt-doc-R0amEUpn.js → build-improve-prompt-doc-QS7b7hRr.js} +1 -1
- package/dist/client/assets/{calendar-DaaBbvOH.js → calendar-CT7cVD7N.js} +1 -1
- package/dist/client/assets/capability-load-error-yZzl8b80.js +1 -0
- package/dist/client/assets/category-editor-CTdWf8oW.js +1 -0
- package/dist/client/assets/{chart-DZbYggl3.js → chart-C-785ZEj.js} +1 -1
- package/dist/client/assets/chat-context-DJGYyGlB.js +39 -0
- package/dist/client/assets/chat-draft-DbBgaLY_.js +1 -0
- package/dist/client/assets/{checkbox-B2kVXKBD.js → checkbox-DmaIcPoL.js} +1 -1
- package/dist/client/assets/choose-editor-CirVpDXw.js +1 -0
- package/dist/client/assets/claim-phase-copy-BnoHLlrM.js +1 -0
- package/dist/client/assets/{cli-auth-success-DtMJnqjK.js → cli-auth-success-XcMuETZQ.js} +1 -1
- package/dist/client/assets/{client-icons-D3ZaOjXM.js → client-icons-DLhjrwzL.js} +1 -1
- package/dist/client/assets/{collapsible-vN3Y9B-p.js → collapsible-CgZ4-XuF.js} +1 -1
- package/dist/client/assets/collection-detail-gYU6aRKx.js +1 -0
- package/dist/client/assets/collection-display-button-YyNX5Efp.js +1 -0
- package/dist/client/assets/{collection-search-BoB9COGX.js → collection-search-BC0JMMNp.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CxJ6Bp-f.js → collection-table-wrapper-DFn43mg0.js} +1 -1
- package/dist/client/assets/{collection-tabs-Cw7XLgNG.js → collection-tabs-DeQ7zbGh.js} +1 -1
- package/dist/client/assets/column-rules-b8eo73o4.js +3 -0
- package/dist/client/assets/{combobox-PSOtDaya.js → combobox-DeXU4vSR.js} +1 -1
- package/dist/client/assets/command-D2QlwSrW.js +1 -0
- package/dist/client/assets/{companion-mcps-section-gXkjR-XD.js → companion-mcps-section-DtzaYg0J.js} +1 -1
- package/dist/client/assets/config-DP6xvcYW.js +1 -0
- package/dist/client/assets/{connect-Dn2pI97X.js → connect-ClKIaF8K.js} +3 -3
- package/dist/client/assets/connect-layout-CyyX0xPx.js +1 -0
- package/dist/client/assets/{connection-FKmTBjan.js → connection-BjzBHJVc.js} +1 -1
- package/dist/client/assets/connection-card-BVD8Ppl9.js +1 -0
- package/dist/client/assets/connection-detail-DfYF7TR9.js +1 -0
- package/dist/client/assets/connection-form-helpers-5EXuPZ4G.js +1 -0
- package/dist/client/assets/connections-D1tC1_hB.js +1 -0
- package/dist/client/assets/context-DzTTGbcd.js +1 -0
- package/dist/client/assets/{context-menu-BLhcVqO0.js → context-menu-Can7-rLt.js} +1 -1
- package/dist/client/assets/{core.esm-DbclD67Y.js → core.esm-Cvui6jds.js} +1 -1
- package/dist/client/assets/create-organization-dialog-CD66iA3E.js +1 -0
- package/dist/client/assets/daily-pulse-Bz92WYIP.js +1 -0
- package/dist/client/assets/device-hint-DZcinuip.js +1 -0
- package/dist/client/assets/discover-BRALl0mU.js +1 -0
- package/dist/client/assets/domain-settings-DiitZO4z.js +1 -0
- package/dist/client/assets/{drawer-CXs6iEYK.js → drawer-BPz4t5dt.js} +1 -1
- package/dist/client/assets/{editor-CPkkN1Zr.js → editor-2jNHgdUN.js} +3 -3
- package/dist/client/assets/{empty-state-D45gZaZ-.js → empty-state-D8iC8fkc.js} +1 -1
- package/dist/client/assets/{empty-state-DnQ_qEjI.js → empty-state-Zf0MeIMv.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Q_j_fmQx.js → extract-connection-data-BTBLhbEe.js} +1 -1
- package/dist/client/assets/{feature-gate-CFL9eB8c.js → feature-gate-Dhf-LwS1.js} +1 -1
- package/dist/client/assets/feature-paywall-CHcwEHRJ.js +1 -0
- package/dist/client/assets/file-explorer-BhYSdjXu.js +2 -0
- package/dist/client/assets/{file-preview-DT-0IR-r.js → file-preview-DvxQuX3P.js} +1 -1
- package/dist/client/assets/file-share-button-C1EB3dOc.js +3 -0
- package/dist/client/assets/{file-type-icon-Du5QihE_.js → file-type-icon-DzYK4NqY.js} +1 -1
- package/dist/client/assets/flat-project-D2zrr-4_.js +1 -0
- package/dist/client/assets/{folder-icon-DXEgDwxo.js → folder-icon-C_Jv4E7N.js} +2 -2
- package/dist/client/assets/{form-BBtB5neb.js → form-BCYpCYIL.js} +1 -1
- package/dist/client/assets/general-D8kDc8NB.js +1 -0
- package/dist/client/assets/home-CiV29kW5.js +1 -0
- package/dist/client/assets/{icon-button-BiR7Hy07.js → icon-button-sHj7Q6Fp.js} +1 -1
- package/dist/client/assets/index-6UUldwCZ.js +1 -0
- package/dist/client/assets/index-BVmIdqXu.js +1 -0
- package/dist/client/assets/{index-C-3lNbMm.js → index-BhyQWjoM.js} +6 -6
- package/dist/client/assets/{index-D_7jfHk6.js → index-Bm9FTdjr.js} +43 -43
- package/dist/client/assets/{index-DWUcsrDk.js → index-CspW_Aw1.js} +2 -2
- package/dist/client/assets/{index-BvwJHqHQ.js → index-CuOTEpMz.js} +2 -2
- package/dist/client/assets/{index-D1CuHcEn.js → index-D2iZ6syL.js} +1 -1
- package/dist/client/assets/{index-CmC6v99h.js → index-DmfwrRER.js} +5 -5
- package/dist/client/assets/{index-CoDuotD7.js → index-GgiP6YIr.js} +1 -1
- package/dist/client/assets/{index-KqttCHw1.js → index-KCu_K9eF.js} +1 -1
- package/dist/client/assets/{index-CeMEs5dC.js → index-YEKHk89C.js} +2 -2
- package/dist/client/assets/{index-redirect-_9q4bmDQ.js → index-redirect-C_FoZNOn.js} +1 -1
- package/dist/client/assets/{index-DltLvtZg.js → index-s6P2p4h7.js} +1 -1
- package/dist/client/assets/{index-D8mID9PZ.js → index-wABYnbOM.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DG8sBe4B.js → infiniteQueryObserver-zxl9Rj5F.js} +1 -1
- package/dist/client/assets/infra-billing-heizZxEC.js +1 -0
- package/dist/client/assets/{input-DQp1LVsq.js → input-BkQDO0Ef.js} +5 -5
- package/dist/client/assets/input-Bvc3OT4I.js +1 -0
- package/dist/client/assets/{integration-icon-BM3EOzpn.js → integration-icon-DoYtKqdf.js} +1 -1
- package/dist/client/assets/jira-icon-BeORJXLw.js +1 -0
- package/dist/client/assets/{label-DxOPcXJe.js → label-BL2W0Pcn.js} +1 -1
- package/dist/client/assets/{layout-bHPl4zx9.js → layout-vy24lHLj.js} +1 -1
- package/dist/client/assets/legacy-agents-deep-B5L4MOtR.js +1 -0
- package/dist/client/assets/{legacy-main-redirect-z5zSFE1g.js → legacy-main-redirect-Pp-THt9D.js} +1 -1
- package/dist/client/assets/library-DZte0T9-.js +1 -0
- package/dist/client/assets/{library-tab-Z6y7ewdW.js → library-tab-2usQWRYi.js} +3 -3
- package/dist/client/assets/login-CwsPhEpC.js +1 -0
- package/dist/client/assets/{markdown-6zdu9t3J.js → markdown-B3PJYX-4.js} +3 -3
- package/dist/client/assets/{mcp-app-renderer-D5zA7BfR.js → mcp-app-renderer-BLT3VM-G.js} +1 -1
- package/dist/client/assets/mcp-oauth-4gmyTyah.js +1 -0
- package/dist/client/assets/mcp-oauth-BTa4N28L.js +1 -0
- package/dist/client/assets/members-Dba6HROK.js +1 -0
- package/dist/client/assets/{memory-C67vpugN.js → memory-DAV2Pmj2.js} +2 -2
- package/dist/client/assets/{mini-report-page-jD0aWOQw.js → mini-report-page-B9WE5YW-.js} +1 -1
- package/dist/client/assets/{mock-board-DX11vRZx.js → mock-board-D9i0Vi9l.js} +1 -1
- package/dist/client/assets/{monaco-editor-BfKI4VlA.js → monaco-editor-DANiMmsL.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-DB55KTTw.js → monitoring-stats-row-B1hQA0Lu.js} +1 -1
- package/dist/client/assets/{multi-select-DVylmGoB.js → multi-select-BJgtMlC2.js} +1 -1
- package/dist/client/assets/mustache-GMlXm0yl.js +4 -0
- package/dist/client/assets/new-project-dialog-C-thpPQ-.js +1 -0
- package/dist/client/assets/{oauth-callback-Cqdj0zbM.js → oauth-callback-DZwrYGu7.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Cwy6YGO7.js → oauth-callback-ai-provider-B7d3QWP4.js} +1 -1
- package/dist/client/assets/onboarding-DK0DTXli.js +1 -0
- package/dist/client/assets/openai-conversation-BMdPtMrp.js +3 -0
- package/dist/client/assets/optimistic-project-sidebar-views-B4v48qUS.js +1 -0
- package/dist/client/assets/{organization-choice-CG-C6xsW.js → organization-choice-BIWVNvRP.js} +1 -1
- package/dist/client/assets/orgs-D5AZUxP6.js +1 -0
- package/dist/client/assets/{page-seo-form-C6V8K2um.js → page-seo-form-gaHyPBMV.js} +1 -1
- package/dist/client/assets/pair-DXTFiJNl.js +48 -0
- package/dist/client/assets/plan-ladder-BUDRjzbj.js +1 -0
- package/dist/client/assets/{popover-C2vJrXky.js → popover-jNB4XciF.js} +1 -1
- package/dist/client/assets/post-calendar-D8EAMZvz.js +1 -0
- package/dist/client/assets/post-editor-BQa57f7n.js +2 -0
- package/dist/client/assets/preview-content-B6K8Jkd_.js +1 -0
- package/dist/client/assets/preview-dialog-Dl22mWwN.js +1 -0
- package/dist/client/assets/{preview-panel-CaQ4Pbpr.js → preview-panel-LWLVsrdx.js} +1 -1
- package/dist/client/assets/product-picker-dialog-RglVwX1Q.js +1 -0
- package/dist/client/assets/profile-BWcfZQ7V.js +1 -0
- package/dist/client/assets/project-app-view-qeunpPC-.js +1 -0
- package/dist/client/assets/project-feed-Dm758F3_.js +1 -0
- package/dist/client/assets/{project-icon-DU1uywdD.js → project-icon-D2vCEWQy.js} +1 -1
- package/dist/client/assets/project-reports-6TMbK6-4.js +1 -0
- package/dist/client/assets/project-tasks-3mU9NrZf.js +1 -0
- package/dist/client/assets/projects-DyGysCyv.js +1 -0
- package/dist/client/assets/{projects-empty-state-BsW_dfGL.js → projects-empty-state-BuMMPopD.js} +1 -1
- package/dist/client/assets/prompts-BrbpQc3X.js +1 -0
- package/dist/client/assets/record-editor-hwH5zZn-.js +1 -0
- package/dist/client/assets/redirect-editor-Dc4HBQwl.js +1 -0
- package/dist/client/assets/{reports-CMClJ0_S.js → reports-D7gOlgZm.js} +2 -2
- package/dist/client/assets/reports-DPHZG4Rx.js +1 -0
- package/dist/client/assets/reports-onboarding-DGmwN9iV.js +1 -0
- package/dist/client/assets/reports-tab-Bb7ApLUW.js +2 -0
- package/dist/client/assets/repositories-GlkzQQVy.js +1 -0
- package/dist/client/assets/repository-binding-D2wL-4Vr.js +1 -0
- package/dist/client/assets/repository-import-picker-DtM7QfYh.js +1 -0
- package/dist/client/assets/repository-picker-28zwGBgK.js +1 -0
- package/dist/client/assets/require-capability-Dm4XTD9Y.js +1 -0
- package/dist/client/assets/{required-auth-layout-CDif9NZC.js → required-auth-layout-CbgA2xIU.js} +1 -1
- package/dist/client/assets/reset-password-15IQ61HR.js +1 -0
- package/dist/client/assets/{resizable-CIqqPf7O.js → resizable-CGWosOTw.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-S311kwwr.js → resolve-tab-icon-BEIojUgL.js} +1 -1
- package/dist/client/assets/review-settings-BAqWAPVV.js +1 -0
- package/dist/client/assets/{rich-text-link-control-CMeXviAY.js → rich-text-link-control-CE4nCWAz.js} +1 -1
- package/dist/client/assets/roles-etRZjRQM.js +1 -0
- package/dist/client/assets/route-BCQ2a7UE.js +1 -0
- package/dist/client/assets/route-CdaJ86mX.js +1 -0
- package/dist/client/assets/route-DCLsEeq7.js +1 -0
- package/dist/client/assets/{runnable-block-editor-BWSWYcJ-.js → runnable-block-editor-xVvcrNA2.js} +4 -4
- package/dist/client/assets/sandbox-lifecycle-context-BKjyczlw.js +1 -0
- package/dist/client/assets/{schema-D1veJPjJ.js → schema-C_wSANSe.js} +1 -1
- package/dist/client/assets/{scroll-area-Ce9NeF1s.js → scroll-area-BT00diUA.js} +1 -1
- package/dist/client/assets/{search-input-DpJBHwWo.js → search-input-D-uP0R3f.js} +1 -1
- package/dist/client/assets/search-toggle-Hgq_Klme.js +1 -0
- package/dist/client/assets/{secret-picker-B_ADx-sY.js → secret-picker-BitsdCaD.js} +1 -1
- package/dist/client/assets/secrets-C_yZKBHs.js +1 -0
- package/dist/client/assets/sections-editor-DrNkE-5_.js +1 -0
- package/dist/client/assets/{select-CZdnCwuC.js → select-BVEgIanS.js} +1 -1
- package/dist/client/assets/select-model-CTmCsZzT.js +1 -0
- package/dist/client/assets/seo-editor-Cr-VPdNi.js +1 -0
- package/dist/client/assets/{separator-BtrJ5AFz.js → separator-CJOPtNz-.js} +1 -1
- package/dist/client/assets/settings-tab-zoRR23UC.js +4 -0
- package/dist/client/assets/sheet-D-h-caij.js +1 -0
- package/dist/client/assets/shell-layout-Ckss0QqA.js +1 -0
- package/dist/client/assets/skills-Dx8G-x-T.js +1 -0
- package/dist/client/assets/{slider-BpZoep6A.js → slider-DtTzb8JT.js} +1 -1
- package/dist/client/assets/{sortable.esm-DyjKGVzh.js → sortable.esm-DCsYtWcb.js} +1 -1
- package/dist/client/assets/sso-DDpjWaoO.js +1 -0
- package/dist/client/assets/{suggestion-DmBBrXFD.js → suggestion-Bso4uBRF.js} +2 -2
- package/dist/client/assets/{switch-hSsSQMgC.js → switch-DZo6rAtc.js} +1 -1
- package/dist/client/assets/{symbol-CkeqKRPe.js → symbol-Co3D-iSE.js} +1 -1
- package/dist/client/assets/synced-repos-B1f0culo.js +1 -0
- package/dist/client/assets/{tab-icon-glyph-BRREqFJ3.js → tab-icon-glyph-ClCao4gx.js} +1 -1
- package/dist/client/assets/{table-Dfov51xE.js → table-Gm-jWCpy.js} +1 -1
- package/dist/client/assets/{tabs-Df848FrP.js → tabs-CXsAC8nO.js} +1 -1
- package/dist/client/assets/{task-board-ChFrokIN.js → task-board-Bgw_xVJW.js} +1 -1
- package/dist/client/assets/{task-route-4t67EvVC.js → task-route-BxRkc6kt.js} +1 -1
- package/dist/client/assets/{task-status-cI-KMHji.js → task-status-B92ESgef.js} +1 -1
- package/dist/client/assets/taskboard-analytics-BEBBYmzN.js +1 -0
- package/dist/client/assets/{tasks-Dcje4OJR.js → tasks-BS9sXVdl.js} +3 -3
- package/dist/client/assets/tasks-DckB4c8m.js +1 -0
- package/dist/client/assets/{textarea-DaHaRA0Z.js → textarea-bcNEcwC6.js} +1 -1
- package/dist/client/assets/thread-analytics-BE8EaB4a.js +1 -0
- package/dist/client/assets/thread-button-BdyWFdme.js +1 -0
- package/dist/client/assets/{thread-intent-Cxso0qKW.js → thread-intent-DzHkd78g.js} +4 -4
- package/dist/client/assets/thread-route-CIiqv6HG.js +1 -0
- package/dist/client/assets/thread-route-mhniW_q8.js +1 -0
- package/dist/client/assets/thread-sheet-body-C1CJm0mZ.js +1 -0
- package/dist/client/assets/time-range-picker-BUGifbSV.js +1 -0
- package/dist/client/assets/{toggle-group-BFX-9eHs.js → toggle-group-5iPAspL-.js} +1 -1
- package/dist/client/assets/{tool-namespace-BHB8Go32.js → tool-namespace-CYa7zzrf.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-D9aCXzS4.js → toolbar-icon-button-CZBCq2Ko.js} +1 -1
- package/dist/client/assets/{tooltip-BULKkf4A.js → tooltip-XZmQWwgB.js} +1 -1
- package/dist/client/assets/{tooltipContext-1NNpJuJd.js → tooltipContext-BpyR0oly.js} +1 -1
- package/dist/client/assets/{track-CpjpKs1v.js → track-Ba2I9E5t.js} +1 -1
- package/dist/client/assets/{types-Blm6OQRg.js → types-2TlDAuAc.js} +3 -3
- package/dist/client/assets/{url-slug-d-Er1jOR.js → url-slug-B-L2Z8me.js} +1 -1
- package/dist/client/assets/{usage-stats-Dqycj-p-.js → usage-stats-BihPbkIg.js} +8 -8
- package/dist/client/assets/use-ai-providers-BP69qr77.js +1 -0
- package/dist/client/assets/use-automations-Biu6cV7d.js +1 -0
- package/dist/client/assets/{use-autosave-DBCPQM6l.js → use-autosave-9jHQ-y1f.js} +1 -1
- package/dist/client/assets/use-chat-layout-state-J-94EUwt.js +1 -0
- package/dist/client/assets/use-chat-navigation-BXZpM5MQ.js +1 -0
- package/dist/client/assets/{use-clock-tick-DGTQe72H.js → use-clock-tick-rPXqIJP8.js} +1 -1
- package/dist/client/assets/use-connect-companion-BupOmQ7x.js +1 -0
- package/dist/client/assets/use-connection-DUF3XC9E.js +1 -0
- package/dist/client/assets/{use-copy-CRIUfo35.js → use-copy-B01v9eRq.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DzmQH3J8.js → use-create-virtual-mcp-BxoXyDoq.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DIokBBqe.js → use-date-fns-locale-CPtrEugx.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BRSYFOGW.js → use-debounced-autosave-C__Xzre-.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DCB8Le0h.js → use-debounced-value-D5_QO1dT.js} +1 -1
- package/dist/client/assets/use-deco-credits-DkZSWK0d.js +1 -0
- package/dist/client/assets/{use-decopilot-events-uItZ_pJe.js → use-decopilot-events-1iPDcTcf.js} +1 -1
- package/dist/client/assets/use-delete-connection-DUG0172F.js +1 -0
- package/dist/client/assets/{use-deployment-admin-BSf-NdBG.js → use-deployment-admin-COeWRtXj.js} +1 -1
- package/dist/client/assets/use-ensure-project-folder-A0But3O1.js +1 -0
- package/dist/client/assets/{use-fast-preview-draft-url-8LcTSnsj.js → use-fast-preview-draft-url-BRdebqFC.js} +1 -1
- package/dist/client/assets/use-file-configs-B8mqylSR.js +1 -0
- package/dist/client/assets/{use-infinite-scroll-B02yfFGd.js → use-infinite-scroll-DewChEmc.js} +1 -1
- package/dist/client/assets/use-join-requests-CDGwHERc.js +1 -0
- package/dist/client/assets/use-main-panel-tabs-D7q-AygO.js +1 -0
- package/dist/client/assets/use-mcp-auth-status-CUurQWMq.js +1 -0
- package/dist/client/assets/{use-mcp-client-MUIIizLf.js → use-mcp-client-Dh_4AZgb.js} +4 -4
- package/dist/client/assets/{use-mcp-prompts-C3siW74f.js → use-mcp-prompts-LJf01t7x.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CPLGkZB5.js → use-mcp-tools-p8MJKmfB.js} +1 -1
- package/dist/client/assets/use-members-DQe3FYGy.js +1 -0
- package/dist/client/assets/{use-mobile-DF1FX6Xv.js → use-mobile-UYmsi-dp.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-DDZo26Jw.js +1 -0
- package/dist/client/assets/use-new-blocks-editor-nCMzaJ9Q.js +1 -0
- package/dist/client/assets/{use-open-billing-url-CqJ0vDkP.js → use-open-billing-url-C0JU6CzN.js} +1 -1
- package/dist/client/assets/use-org-auth-client-CPbs0OVW.js +1 -0
- package/dist/client/assets/use-org-fs-gQ0RuIPK.js +1 -0
- package/dist/client/assets/use-org-repo-syncs-KkmagwRy.js +1 -0
- package/dist/client/assets/{use-org-sso-BEGhJLya.js → use-org-sso-DWtbATGD.js} +1 -1
- package/dist/client/assets/use-organization-roles-BKQWBZmO.js +1 -0
- package/dist/client/assets/use-organization-settings-xcc5-6DS.js +1 -0
- package/dist/client/assets/{use-panel-navigate-C4UE8Qkr.js → use-panel-navigate-A1obvdVI.js} +1 -1
- package/dist/client/assets/{use-project-scope-BMVXwaQ4.js → use-project-scope-BxCbtcTE.js} +1 -1
- package/dist/client/assets/use-releases-G79MSxhR.js +1 -0
- package/dist/client/assets/use-reports-diagnostic-a7ERyr_7.js +1 -0
- package/dist/client/assets/use-sandbox-events-CSN74_aC.js +2 -0
- package/dist/client/assets/use-secrets-CmTpPaF9.js +1 -0
- package/dist/client/assets/use-section-preview-base-DbQlCGNR.js +1 -0
- package/dist/client/assets/use-tags-Ch6_1it4.js +1 -0
- package/dist/client/assets/use-task-board-analytics-v7nFgyEB.js +1 -0
- package/dist/client/assets/{use-task-board-events-BDjHMnwS.js → use-task-board-events-DHjlo-9e.js} +1 -1
- package/dist/client/assets/use-task-board-item-prs-CoXnP9ys.js +1 -0
- package/dist/client/assets/use-task-board-items-erbHwxMh.js +1 -0
- package/dist/client/assets/use-task-metadata-DmWCG43J.js +1 -0
- package/dist/client/assets/{use-thread-analytics-DJQ2zz_B.js → use-thread-analytics-DJfFmK1j.js} +1 -1
- package/dist/client/assets/use-thread-outputs-7J4Ek_Zs.js +1 -0
- package/dist/client/assets/useInfiniteQuery-vZqvTY4f.js +1 -0
- package/dist/client/assets/{useQueries-DKVO6hGe.js → useQueries-DoURbZYb.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DdGuWYX3.js +1 -0
- package/dist/client/assets/{users-DbpeSClG.js → users-BfQBxfCk.js} +1 -1
- package/dist/client/assets/{utils-Cxy1EsFU.js → utils-DAEMarMy.js} +1 -1
- package/dist/client/assets/variant-calendar-DNADqO99.js +1 -0
- package/dist/client/assets/{variant-matcher-override-BD9nzwGm.js → variant-matcher-override-BDRgB-Pq.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CVVPadaN.js → view-mode-toggle-DPJfZa3C.js} +1 -1
- package/dist/client/assets/{virtual-mcp-CYDFCAA6.js → virtual-mcp-C54PVPPw.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-BXtoXPGx.js → watch-sse-pool-DmOqvBBq.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +633 -633
- package/package.json +1 -1
- package/dist/client/assets/LinkExternal01-CILXo-bC.js +0 -1
- package/dist/client/assets/X-DzPShgV5.js +0 -1
- package/dist/client/assets/add-connection-dialog-Eph5CbUo.js +0 -1
- package/dist/client/assets/agent-analytics-DSdixv-f.js +0 -2
- package/dist/client/assets/agent-app-CT6U3s2r.js +0 -1
- package/dist/client/assets/agent-assets-G93-pOM9.js +0 -1
- package/dist/client/assets/agent-automation-DP6Bv0AB.js +0 -20
- package/dist/client/assets/agent-automations-YDqRnDcc.js +0 -1
- package/dist/client/assets/agent-connect-sources-CSrFX52j.js +0 -1
- package/dist/client/assets/agent-deck-D9Bphszm.js +0 -1
- package/dist/client/assets/agent-e2e-k9wCqssu.js +0 -1
- package/dist/client/assets/agent-experiments-CPSBbmYr.js +0 -1
- package/dist/client/assets/agent-file-BAkSJWMw.js +0 -1
- package/dist/client/assets/agent-hosting-B1Ag0zD8.js +0 -1
- package/dist/client/assets/agent-icon-CnnNyirr.js +0 -1
- package/dist/client/assets/agent-library-Ch3sHhuh.js +0 -1
- package/dist/client/assets/agent-library-file-Bq6m6SHP.js +0 -1
- package/dist/client/assets/agent-monitor-DyddEd79.js +0 -1
- package/dist/client/assets/agent-overview-BlP2a40h.js +0 -1
- package/dist/client/assets/agent-settings-CaxlA04S.js +0 -1
- package/dist/client/assets/agent-site-editor-code-D0j_GVVh.js +0 -2
- package/dist/client/assets/agent-site-editor-preview-DaqE_qX4.js +0 -518
- package/dist/client/assets/agent-view-UQmbv7nk.js +0 -1
- package/dist/client/assets/agents-list-CJcm3Kq8.js +0 -1
- package/dist/client/assets/api-keys-BjTJSB_i.js +0 -1
- package/dist/client/assets/api-keys-BrfzhtIS.js +0 -1
- package/dist/client/assets/app-editor-CJudcxBz.js +0 -1
- package/dist/client/assets/asset-utils-Cdgz7yau.js +0 -1
- package/dist/client/assets/auth-entry-BUqhj_6T.js +0 -1
- package/dist/client/assets/authenticate-and-persist-oauth-eDHShxj5.js +0 -1
- package/dist/client/assets/automation-runs-BZA4OsIt.js +0 -1
- package/dist/client/assets/automations-DpWIQ3oV.js +0 -1
- package/dist/client/assets/autosend-BQ3F90GX.js +0 -1
- package/dist/client/assets/buckets-AVx7AXso.js +0 -1
- package/dist/client/assets/capability-load-error-BVlvKXjS.js +0 -1
- package/dist/client/assets/category-editor-B-jccGXu.js +0 -1
- package/dist/client/assets/chat-context-UMp8QwjT.js +0 -39
- package/dist/client/assets/chat-draft-CYy-Qv-a.js +0 -1
- package/dist/client/assets/choose-editor-BDo9cuNm.js +0 -1
- package/dist/client/assets/claim-phase-copy-DG8E1-gc.js +0 -1
- package/dist/client/assets/collection-detail-CBqQPzi0.js +0 -1
- package/dist/client/assets/collection-display-button-XaptFv9u.js +0 -1
- package/dist/client/assets/column-rules-Bq3eiowV.js +0 -3
- package/dist/client/assets/command-Doiz3O29.js +0 -1
- package/dist/client/assets/config-B01oZvpJ.js +0 -1
- package/dist/client/assets/connect-layout-CoxrwG6t.js +0 -1
- package/dist/client/assets/connection-card-Cvk5T5vt.js +0 -1
- package/dist/client/assets/connection-detail-BRdQkO7d.js +0 -1
- package/dist/client/assets/connection-form-helpers-D4Q7rLyt.js +0 -1
- package/dist/client/assets/connections-C8qSBDCe.js +0 -1
- package/dist/client/assets/context-Bt7kDQzj.js +0 -1
- package/dist/client/assets/create-organization-dialog-D-t_ZE2o.js +0 -1
- package/dist/client/assets/daily-pulse-DYPs4tl1.js +0 -1
- package/dist/client/assets/device-hint-CbxzMdRC.js +0 -1
- package/dist/client/assets/dialog-DRpbbWU1.js +0 -1
- package/dist/client/assets/discover-3ATGdKP8.js +0 -1
- package/dist/client/assets/domain-settings-C4-yAgIW.js +0 -1
- package/dist/client/assets/feature-paywall-0RYA-1Op.js +0 -1
- package/dist/client/assets/file-explorer-Cyg7RguR.js +0 -2
- package/dist/client/assets/file-share-button-C8ZBUx_e.js +0 -3
- package/dist/client/assets/flat-project-BpQGs-gN.js +0 -1
- package/dist/client/assets/general-B3jgLFML.js +0 -1
- package/dist/client/assets/home-DYCk_i5V.js +0 -1
- package/dist/client/assets/index-Cx0uPPmh.js +0 -1
- package/dist/client/assets/index-qeM6EfxB.js +0 -1
- package/dist/client/assets/infra-billing-BFh6IlFL.js +0 -1
- package/dist/client/assets/input-B0doV0os.js +0 -1
- package/dist/client/assets/input-BQ74PHN6.js +0 -1
- package/dist/client/assets/jira-icon-C1bLqdEg.js +0 -1
- package/dist/client/assets/legacy-agents-deep-BBjNU_wv.js +0 -1
- package/dist/client/assets/library-CVuXHyjV.js +0 -1
- package/dist/client/assets/login-DNhk4MX6.js +0 -1
- package/dist/client/assets/mcp-oauth-C5T-IVs8.js +0 -1
- package/dist/client/assets/members-BftWOm2t.js +0 -1
- package/dist/client/assets/mustache-D-VzFUJG.js +0 -4
- package/dist/client/assets/new-project-dialog-CXEwhrv6.js +0 -1
- package/dist/client/assets/onboarding-BisuojYF.js +0 -1
- package/dist/client/assets/openai-conversation-BICNFmxp.js +0 -3
- package/dist/client/assets/optimistic-project-sidebar-views-BINKTU3_.js +0 -1
- package/dist/client/assets/orgs-DCjydoUZ.js +0 -1
- package/dist/client/assets/pair-knnOGTuF.js +0 -47
- package/dist/client/assets/plan-ladder-DlpzxobM.js +0 -1
- package/dist/client/assets/post-calendar-3X9xGSKe.js +0 -1
- package/dist/client/assets/post-editor-BS-N2LHp.js +0 -2
- package/dist/client/assets/preview-content-CWMTMNmp.js +0 -1
- package/dist/client/assets/preview-dialog-CmtjgV1o.js +0 -1
- package/dist/client/assets/product-picker-dialog-904WCGJu.js +0 -1
- package/dist/client/assets/profile-aIUaVWtC.js +0 -1
- package/dist/client/assets/project-app-view-ChZmhZ13.js +0 -1
- package/dist/client/assets/project-feed-t8IHFF-d.js +0 -1
- package/dist/client/assets/project-reports-BF24m5b-.js +0 -1
- package/dist/client/assets/project-tasks-Wmmy6hRq.js +0 -1
- package/dist/client/assets/projects-CxEhyr52.js +0 -1
- package/dist/client/assets/prompts-Cad3gM_K.js +0 -1
- package/dist/client/assets/record-editor-Cu0LbDVm.js +0 -1
- package/dist/client/assets/redirect-editor-B65ggNrM.js +0 -1
- package/dist/client/assets/reports-B3_ASbsZ.js +0 -1
- package/dist/client/assets/reports-onboarding-DzC8BMPj.js +0 -1
- package/dist/client/assets/reports-tab-flC8aPMq.js +0 -2
- package/dist/client/assets/repositories-BRVHvY5X.js +0 -1
- package/dist/client/assets/repository-binding-DpX8yLri.js +0 -1
- package/dist/client/assets/repository-import-picker-CO5nKRxA.js +0 -1
- package/dist/client/assets/repository-picker-C2HnHK1A.js +0 -1
- package/dist/client/assets/require-capability-Do1773Hs.js +0 -1
- package/dist/client/assets/reset-password-Dh0gWEkU.js +0 -1
- package/dist/client/assets/review-settings-C9jJxNAv.js +0 -1
- package/dist/client/assets/roles-BOnFVbcr.js +0 -1
- package/dist/client/assets/route-Bvv7axF1.js +0 -1
- package/dist/client/assets/route-DNZvy3kt.js +0 -1
- package/dist/client/assets/route-DdkXah7z.js +0 -1
- package/dist/client/assets/sandbox-lifecycle-context-BJE24h7z.js +0 -1
- package/dist/client/assets/search-toggle-Br3rmrbk.js +0 -1
- package/dist/client/assets/secrets-t0Aczfol.js +0 -1
- package/dist/client/assets/sections-editor-CEBB7XW8.js +0 -1
- package/dist/client/assets/select-model-ER05JMp8.js +0 -1
- package/dist/client/assets/seo-editor-DHXJaGsL.js +0 -1
- package/dist/client/assets/settings-tab-CTiWw7bm.js +0 -4
- package/dist/client/assets/sheet-Gpaizien.js +0 -1
- package/dist/client/assets/shell-layout-B0-NcUCt.js +0 -1
- package/dist/client/assets/skills-BHEjjAUu.js +0 -1
- package/dist/client/assets/sso-Dgg4nP6H.js +0 -1
- package/dist/client/assets/synced-repos-B1QJsQos.js +0 -1
- package/dist/client/assets/taskboard-analytics-C5y5DQZh.js +0 -1
- package/dist/client/assets/tasks-B6PT7ia3.js +0 -1
- package/dist/client/assets/thread-analytics-5o8rlytc.js +0 -1
- package/dist/client/assets/thread-button-DwjwmudD.js +0 -1
- package/dist/client/assets/thread-route-BcAw7-v0.js +0 -1
- package/dist/client/assets/thread-route-CW2be8Kx.js +0 -1
- package/dist/client/assets/thread-sheet-body-B6geJ00B.js +0 -1
- package/dist/client/assets/time-range-picker-Bu58tMJr.js +0 -1
- package/dist/client/assets/use-ai-providers-C1bb7SnA.js +0 -1
- package/dist/client/assets/use-automations-zlAoF9SL.js +0 -1
- package/dist/client/assets/use-chat-layout-state-DDDFQN6Y.js +0 -1
- package/dist/client/assets/use-chat-navigation-BF9opsK8.js +0 -1
- package/dist/client/assets/use-connect-companion-DcLSyBxl.js +0 -1
- package/dist/client/assets/use-connection-5LUEsGlJ.js +0 -1
- package/dist/client/assets/use-deco-credits-BgPf-IIH.js +0 -1
- package/dist/client/assets/use-delete-connection-BLZ4VLoa.js +0 -1
- package/dist/client/assets/use-ensure-project-folder-BUpbRP81.js +0 -1
- package/dist/client/assets/use-file-configs-By7UB_YZ.js +0 -1
- package/dist/client/assets/use-join-requests-Cb1ihQM1.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-xXeWrfnF.js +0 -1
- package/dist/client/assets/use-mcp-auth-status-B-gyzfqG.js +0 -1
- package/dist/client/assets/use-members-vjX9lJhj.js +0 -1
- package/dist/client/assets/use-navigate-to-agent-p65xWFDF.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-DZnaAqkX.js +0 -1
- package/dist/client/assets/use-org-auth-client-CuZ7oLTb.js +0 -1
- package/dist/client/assets/use-org-fs-DPxqVRhB.js +0 -1
- package/dist/client/assets/use-org-repo-syncs-BG16MD5Q.js +0 -1
- package/dist/client/assets/use-organization-roles-DOROP0yS.js +0 -1
- package/dist/client/assets/use-organization-settings-CB0-LYjl.js +0 -1
- package/dist/client/assets/use-releases-DO5M1M4y.js +0 -1
- package/dist/client/assets/use-reports-diagnostic-C3LmmHKo.js +0 -1
- package/dist/client/assets/use-sandbox-events-E2bKOQlM.js +0 -2
- package/dist/client/assets/use-secrets-C2sdbGJM.js +0 -1
- package/dist/client/assets/use-section-preview-base-26sYGS0B.js +0 -1
- package/dist/client/assets/use-tags-CFN9IU6i.js +0 -1
- package/dist/client/assets/use-task-board-analytics-BmwRnCgb.js +0 -1
- package/dist/client/assets/use-task-board-item-prs-DY1JtBFR.js +0 -1
- package/dist/client/assets/use-task-board-items-DUgOnZAe.js +0 -1
- package/dist/client/assets/use-task-metadata-BCqsxDXx.js +0 -1
- package/dist/client/assets/use-thread-outputs-DfIiLAuO.js +0 -1
- package/dist/client/assets/useInfiniteQuery-eYXaZ_bo.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-i_drPWHc.js +0 -1
- package/dist/client/assets/variant-calendar-BR3Tvz7m.js +0 -1
package/dist/client/assets/{analytics-sections-Cjkr8Muu.js → analytics-sections-BeEYJnmv.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as w,j as s,b as B,ef as Q,l as O,s as fe,r as Z,d as me}from"./index-D_7jfHk6.js";import{d as q,C as J}from"./chart-DZbYggl3.js";import{e as xe,a as pe,b as W,T as he,d as ge,c as je}from"./table-Dfov51xE.js";import{i as be}from"./AlertCircle-C3fpFT5I.js";import{i as ye,n as ve}from"./ArrowUp-DR-Jhbl1.js";import{a0 as ke,Z as Ne,am as Se,a6 as Ce}from"./agent-icon-CnnNyirr.js";import{s as we}from"./User01-Awky2MVQ.js";import{V as ee}from"./view-mode-toggle-CVVPadaN.js";import{t as te}from"./format-time-CjIPQhCN.js";import{B as Y}from"./badge-CKM84j2S.js";import{l as se,c as $e,b as De,S as Oe}from"./config-B01oZvpJ.js";import{B as U,a as G}from"./BarChart-CJ_IiQ71.js";import{C as H,Y as P,a as Te,A as Ie}from"./AreaChart-BvjH9pmK.js";import{X as V}from"./XAxis-BLZT-vtl.js";function ne(a){const e=w.c(8),{href:t,className:d,children:o}=a,c=me();let r;e[0]!==t||e[1]!==c?(r=n=>{!t||n.button!==0||n.metaKey||n.ctrlKey||n.shiftKey||(n.preventDefault(),c({href:t}))},e[0]=t,e[1]=c,e[2]=r):r=e[2];let l;return e[3]!==o||e[4]!==d||e[5]!==t||e[6]!==r?(l=s.jsx("a",{href:t,className:d,onClick:r,children:o}),e[3]=o,e[4]=d,e[5]=t,e[6]=r,e[7]=l):l=e[7],l}const L=(a,e,t)=>a&&e?()=>a({drill:e,label:t}):void 0,F="cursor-pointer text-left transition-colors hover:bg-accent/50 focus-ring",E=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"],A={fontSize:11,fill:"var(--muted-foreground)",opacity:.7};function le(a){const e=Math.abs(a);return e<60?`${Math.round(a)}s`:e<3600?`${Math.round(a/60)}m`:e<86400?`${(a/3600).toFixed(1)}h`:`${(a/86400).toFixed(1)}d`}function M(a,e){return a===null||Number.isNaN(a)?"—":e==="s"?le(a):e==="%"?`${Math.round(a*10)/10}%`:e==="USD"?`$${a.toFixed(2)}`:a.toLocaleString()}function X(a,e){return e==="s"?le(a):e==="%"?`${a}%`:e==="USD"?`$${a}`:a>=1e3?`${(a/1e3).toFixed(1)}k`:String(a)}const ae=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/,Be=/^\d{4}-\d{2}-\d{2}$/;function Le(a,e){return typeof a=="number"?M(a,e):Be.test(a)?new Date(`${a}T12:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric"}):ae.test(a)?te(a):a}function _(a){const e=w.c(20),{title:t,value:d,caption:o,aside:c,children:r,onClick:l}=a,n=l?"button":"section",i=l?"button":void 0,u=l&&F;let f;e[0]!==u?(f=O("surface flex h-full w-full flex-col gap-6 px-4 pt-4 pb-5",u),e[0]=u,e[1]=f):f=e[1];let x;e[2]!==t?(x=s.jsx("h3",{className:"text-sm text-foreground/70",children:t}),e[2]=t,e[3]=x):x=e[3];let m;e[4]!==d?(m=d!==void 0&&s.jsx("span",{className:"tnum text-4xl font-normal text-foreground",children:d}),e[4]=d,e[5]=m):m=e[5];let h;e[6]!==o||e[7]!==x||e[8]!==m?(h=s.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[x,m,o]}),e[6]=o,e[7]=x,e[8]=m,e[9]=h):h=e[9];let p;e[10]!==c||e[11]!==h?(p=s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[h,c]}),e[10]=c,e[11]=h,e[12]=p):p=e[12];let j;return e[13]!==n||e[14]!==r||e[15]!==l||e[16]!==i||e[17]!==f||e[18]!==p?(j=s.jsxs(n,{type:i,onClick:l,className:f,children:[p,r]}),e[13]=n,e[14]=r,e[15]=l,e[16]=i,e[17]=f,e[18]=p,e[19]=j):j=e[19],j}function re(a){const e=w.c(9),{lane:t}=a,d=B();let o;e[0]!==t||e[1]!==d?(o=se(t,d),e[0]=t,e[1]=d,e[2]=o):o=e[2];const{label:c,visual:r}=o,l=r.icon;let n;e[3]!==l||e[4]!==r.iconClassName?(n=s.jsx(l,{className:r.iconClassName}),e[3]=l,e[4]=r.iconClassName,e[5]=n):n=e[5];let i;return e[6]!==c||e[7]!==n?(i=s.jsxs(Y,{variant:"muted",children:[n,c]}),e[6]=c,e[7]=n,e[8]=i):i=e[8],i}function R(a){const e=w.c(2),{children:t}=a;let d;return e[0]!==t?(d=s.jsx("div",{className:"flex h-20 items-center justify-center text-sm text-muted-foreground",children:t}),e[0]=t,e[1]=d):d=e[1],d}function Me(a){const e=w.c(21),{value:t,previous:d,unit:o,better:c}=a,r=B();if(t===null||d===null||d===void 0){let p;e[0]!==r?(p=r("taskBoard.analytics.noPrior"),e[0]=r,e[1]=p):p=e[1];let j;return e[2]!==p?(j=s.jsx("span",{className:"text-meta",children:p}),e[2]=p,e[3]=j):j=e[3],j}const l=Math.round((t-d)*10)/10,n=c==="down"?l<0:l>0;let i;e[4]!==l||e[5]!==r||e[6]!==o?(i=o==="%"?r("taskBoard.analytics.points",{n:String(Math.abs(l))}):M(Math.abs(l),o),e[4]=l,e[5]=r,e[6]=o,e[7]=i):i=e[7];const u=i;let f;e[8]!==u||e[9]!==c||e[10]!==l||e[11]!==n||e[12]!==r?(f=l===0?r("taskBoard.analytics.unchanged"):s.jsxs("span",{className:O("inline-flex items-center gap-0.5 font-medium",c&&(n?"text-success":"text-destructive")),children:[l>0?s.jsx(ye,{size:12}):s.jsx(ve,{size:12}),u]}),e[8]=u,e[9]=c,e[10]=l,e[11]=n,e[12]=r,e[13]=f):f=e[13];let x;e[14]!==r?(x=r("taskBoard.analytics.vsPrevious"),e[14]=r,e[15]=x):x=e[15];let m;e[16]!==x?(m=s.jsx("span",{children:x}),e[16]=x,e[17]=m):m=e[17];let h;return e[18]!==f||e[19]!==m?(h=s.jsxs("span",{className:"text-meta inline-flex items-center gap-1",children:[f,m]}),e[18]=f,e[19]=m,e[20]=h):h=e[20],h}const _e={1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",5:"lg:grid-cols-5",6:"lg:grid-cols-3",9:"lg:grid-cols-3"};function Re(a){const e=w.c(10),{section:t,onDrill:d}=a,o=_e[t.values.length]??"lg:grid-cols-4";let c;e[0]!==o?(c=O("grid grid-cols-2 gap-4",o),e[0]=o,e[1]=c):c=e[1];let r;if(e[2]!==d||e[3]!==t.values){let n;e[5]!==d?(n=i=>s.jsx(_,{title:i.label,value:M(i.value,i.unit),onClick:L(d,i.drill,i.label),caption:s.jsxs(s.Fragment,{children:[i.detail&&s.jsx("span",{className:"text-sm text-muted-foreground",children:i.detail}),i.previous!==void 0&&s.jsx(Me,{value:i.value,previous:i.previous,unit:i.unit,better:i.better})]})},i.label),e[5]=d,e[6]=n):n=e[6],r=t.values.map(n),e[2]=d,e[3]=t.values,e[4]=r}else r=e[4];let l;return e[7]!==c||e[8]!==r?(l=s.jsx("div",{className:c,children:r}),e[7]=c,e[8]=r,e[9]=l):l=e[9],l}function Ae(a){return Array.from(new Set(a.flatMap(e=>Object.keys(e)))).filter(e=>e!=="t").sort()}function Ke(a,e){const t=e.filter(d=>a.some(o=>typeof o[d]=="number"&&o[d]!==0));return t.length>0?t:e}function Ee(a,e,t){const d=new Map(a.map(l=>[String(l.t??"").slice(0,10),l])),o=new Date(`${t.from.slice(0,10)}T00:00:00.000Z`),c=t.to.slice(0,10),r=[];for(;o.toISOString().slice(0,10)<=c;){const l=o.toISOString().slice(0,10);r.push(d.get(l)??{t:o.toISOString(),...Object.fromEntries(e.map(n=>[n,0]))}),o.setUTCDate(o.getUTCDate()+1)}return r}function ie(a){const e=w.c(17),{active:t,payload:d,unit:o,nameOf:c}=a,r=c===void 0?String:c;if(!t||!d?.length)return null;const l=d[0]?.payload,n=l?.t;let i;e[0]!==l?.label||e[1]!==n?(i=typeof n=="string"?new Date(n).toLocaleDateString(void 0,{month:"short",day:"numeric"}):String(l?.label??""),e[0]=l?.label,e[1]=n,e[2]=i):i=e[2];let u;e[3]!==i?(u=s.jsx("div",{className:"mb-1 text-xs text-muted-foreground",children:i}),e[3]=i,e[4]=u):u=e[4];let f;if(e[5]!==r||e[6]!==d||e[7]!==o){let h;e[9]!==r||e[10]!==o?(h=p=>s.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[s.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:p.color}}),s.jsx("span",{className:"text-muted-foreground",children:r(String(p.dataKey))}),s.jsx("span",{className:"tnum ml-auto pl-3 font-medium",children:M(typeof p.value=="number"?p.value:null,o)})]},String(p.dataKey)),e[9]=r,e[10]=o,e[11]=h):h=e[11],f=d.map(h),e[5]=r,e[6]=d,e[7]=o,e[8]=f}else f=e[8];let x;e[12]!==f?(x=s.jsx("div",{className:"flex flex-col gap-1",children:f}),e[12]=f,e[13]=x):x=e[13];let m;return e[14]!==u||e[15]!==x?(m=s.jsxs("div",{className:"rounded-lg border bg-background px-3 py-2 shadow-md",children:[u,x]}),e[14]=u,e[15]=x,e[16]=m):m=e[16],m}function Fe(a){const e=w.c(27),{section:t,range:d}=a,o=B(),c=t.unit??void 0,r=c!=="%"&&c!=="s";let l;if(e[0]!==r||e[1]!==d||e[2]!==t.points||e[3]!==t.title||e[4]!==o||e[5]!==c){const n=Ae(t.points),i=r?Ke(t.points,n):n,u=b=>E[n.indexOf(b)%E.length],f=Object.fromEntries(i.map(b=>[b,{label:b,color:u(b)}])),m=(r&&d?Ee(t.points,n,d):t.points).map(ze);let h;if(e[7]!==t.title){let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=/\W+/g,e[9]=b):b=e[9],h=t.title.replace(b,"-"),e[7]=t.title,e[8]=h}else h=e[8];const p=`analytics-${h}`;let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),e[10]=j):j=e[10];const y=j;let v;e[11]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(V,{dataKey:"label",axisLine:!1,tickLine:!1,tick:A,minTickGap:24,tickMargin:8}),e[11]=v):v=e[11];const k=v;let $;e[12]!==c?($=c==="%"?[0,100]:[0,"auto"],e[12]=c,e[13]=$):$=e[13];const S=c!==void 0;let g;e[14]!==c?(g=b=>X(b,c),e[14]=c,e[15]=g):g=e[15];let C;e[16]!==$||e[17]!==S||e[18]!==g?(C=s.jsx(P,{orientation:"right",axisLine:!1,tickLine:!1,tick:A,domain:$,allowDecimals:S,tickFormatter:g,width:48,tickCount:5}),e[16]=$,e[17]=S,e[18]=g,e[19]=C):C=e[19];const T=C;let D;e[20]!==r?(D=r?{fill:"var(--muted)",opacity:.4}:{stroke:"var(--border)",strokeDasharray:"4 4"},e[20]=r,e[21]=D):D=e[21];let I;e[22]!==c?(I=b=>{const{active:z,payload:ue}=b;return s.jsx(ie,{active:z,payload:ue,unit:c})},e[22]=c,e[23]=I):I=e[23];let N;e[24]!==I||e[25]!==D?(N=s.jsx(J,{cursor:D,content:I}),e[24]=I,e[25]=D,e[26]=N):N=e[26];const K=N;l=s.jsx(_,{title:t.title,aside:i.length>1&&s.jsx("ul",{className:"flex flex-wrap justify-end gap-x-3 gap-y-1",children:i.map(b=>s.jsxs("li",{className:"text-meta flex items-center gap-1.5",children:[s.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:u(b)}}),b]},b))}),children:m.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx(q,{role:"img","aria-label":t.title,className:"h-[140px] w-full md:h-[180px]",config:f,children:r?s.jsxs(U,{data:m,margin:{left:0,right:0,top:8},children:[y,k,T,K,i.map((b,z)=>s.jsx(G,{dataKey:b,stackId:"day",fill:u(b),maxBarSize:24,radius:z===i.length-1?[4,4,0,0]:0,animationDuration:300},b))]}):s.jsxs(Te,{data:m,margin:{left:0,right:0,top:8},children:[i.length===1&&s.jsx("defs",{children:s.jsxs("linearGradient",{id:p,x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:u(i[0]??""),stopOpacity:.2}),s.jsx("stop",{offset:"100%",stopColor:u(i[0]??""),stopOpacity:0})]})}),y,k,T,K,i.map(b=>s.jsx(Ie,{type:"linear",dataKey:b,stroke:u(b),strokeWidth:2,fill:i.length===1?`url(#${p})`:"none",dot:m.length===1?{r:4}:!1,activeDot:{r:4,stroke:"var(--background)",strokeWidth:2},connectNulls:!0,animationDuration:300},b))]})})}),e[0]=r,e[1]=d,e[2]=t.points,e[3]=t.title,e[4]=o,e[5]=c,e[6]=l}else l=e[6];return l}function ze(a){return{...a,label:new Date(String(a.t??"")).toLocaleDateString(void 0,{month:"short",day:"numeric"})}}function oe(a){const e=w.c(25),{label:t,note:d,share:o,value:c,fill:r,color:l,onClick:n}=a,i=n?"button":"div",u=n?"button":void 0;let f;e[0]!==n?(f=n&&O(F,"-mx-2 w-[calc(100%+1rem)] rounded-md px-2"),e[0]=n,e[1]=f):f=e[1];let x;e[2]!==f?(x=O("flex h-10 w-full items-center gap-3",f),e[2]=f,e[3]=x):x=e[3];let m;e[4]!==d?(m=d&&s.jsx("span",{className:"text-meta ml-2",children:d}),e[4]=d,e[5]=m):m=e[5];let h;e[6]!==t||e[7]!==m?(h=s.jsxs("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:[t,m]}),e[6]=t,e[7]=m,e[8]=h):h=e[8];const p=`${Math.max(0,Math.min(100,r))}%`;let j;e[9]!==l||e[10]!==p?(j=s.jsx("span",{className:"h-1.5 w-20 shrink-0 overflow-hidden rounded-full bg-muted",children:s.jsx("span",{className:"block h-full rounded-full",style:{width:p,backgroundColor:l}})}),e[9]=l,e[10]=p,e[11]=j):j=e[11];let y;e[12]!==o?(y=o!==void 0&&s.jsx("span",{className:"tnum w-16 shrink-0 text-right text-sm text-foreground/40",children:o}),e[12]=o,e[13]=y):y=e[13];let v;e[14]!==c?(v=s.jsx("span",{className:"tnum w-8 shrink-0 text-right text-sm text-foreground",children:c}),e[14]=c,e[15]=v):v=e[15];let k;return e[16]!==i||e[17]!==n||e[18]!==u||e[19]!==x||e[20]!==h||e[21]!==j||e[22]!==y||e[23]!==v?(k=s.jsx("li",{className:"border-b border-border/50 last:border-b-0",children:s.jsxs(i,{type:u,onClick:n,className:x,children:[h,j,y,v]})}),e[16]=i,e[17]=n,e[18]=u,e[19]=x,e[20]=h,e[21]=j,e[22]=y,e[23]=v,e[24]=k):k=e[24],k}function Ue(a){const e=w.c(17),{section:t,onDrill:d}=a,o=B(),c=t.stages[0]?.value??0,r=t.stages.at(-1)?.value??0;let l;e[0]!==r||e[1]!==c?(l=c?`${Math.round(100*r/c)}%`:"—",e[0]=r,e[1]=c,e[2]=l):l=e[2];let n;e[3]!==r||e[4]!==c||e[5]!==o?(n=c>0&&s.jsx("span",{className:"text-meta",children:o("taskBoard.analytics.funnelCaption",{end:String(r),start:String(c)})}),e[3]=r,e[4]=c,e[5]=o,e[6]=n):n=e[6];let i;e[7]!==d||e[8]!==t.stages||e[9]!==c||e[10]!==o?(i=c===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx("ol",{className:"flex flex-col",children:t.stages.map((f,x)=>{const m=t.stages[x-1]?.value,h=m===void 0?0:m-f.value;return s.jsx(oe,{label:f.label,note:h>0?o("taskBoard.analytics.dropped",{n:String(h)}):void 0,share:`${Math.round(100*f.value/c)}%`,value:f.value.toLocaleString(),fill:100*f.value/c,color:"var(--chart-2)",onClick:L(d,f.drill,f.label)},f.label)})}),e[7]=d,e[8]=t.stages,e[9]=c,e[10]=o,e[11]=i):i=e[11];let u;return e[12]!==t.title||e[13]!==l||e[14]!==n||e[15]!==i?(u=s.jsx(_,{title:t.title,value:l,caption:n,children:i}),e[12]=t.title,e[13]=l,e[14]=n,e[15]=i,e[16]=u):u=e[16],u}function Ge(a){const e=w.c(19),{section:t,onDrill:d}=a,o=B();let c;e[0]!==t.bars?(c=Math.max(0,...t.bars.map(He)),e[0]=t.bars,e[1]=c):c=e[1];const r=c;let l;e[2]!==t.total?.value?(l=t.total?.value.toLocaleString(),e[2]=t.total?.value,e[3]=l):l=e[3];let n;e[4]!==t.total?(n=t.total&&s.jsx("span",{className:"text-meta",children:t.total.label}),e[4]=t.total,e[5]=n):n=e[5];let i;e[6]!==t.unit?(i=t.unit&&s.jsx("span",{className:"text-meta",children:t.unit}),e[6]=t.unit,e[7]=i):i=e[7];let u;e[8]!==r||e[9]!==d||e[10]!==t.bars||e[11]!==o?(u=t.bars.length===0?s.jsx(R,{children:o("taskBoard.analytics.nobodyStepped")}):s.jsx("ul",{className:"flex flex-col",children:t.bars.map(x=>s.jsx(oe,{label:x.label,note:x.note,share:x.detail,value:x.value.toLocaleString(),fill:r?100*x.value/r:0,color:"var(--chart-1)",onClick:L(d,x.drill,x.label)},x.label))}),e[8]=r,e[9]=d,e[10]=t.bars,e[11]=o,e[12]=u):u=e[12];let f;return e[13]!==t.title||e[14]!==l||e[15]!==n||e[16]!==i||e[17]!==u?(f=s.jsx(_,{title:t.title,value:l,caption:n,aside:i,children:u}),e[13]=t.title,e[14]=l,e[15]=n,e[16]=i,e[17]=u,e[18]=f):f=e[18],f}function He(a){return a.value}function Pe(a,e){return`/${encodeURIComponent(a)}/${encodeURIComponent(e)}`}const Ve=new Set(["Org ID","Task ID"]),Xe=new Set(["Run outcome","Failure kind","Moved in by","State"]),Ye=new Set(["Error","Signature"]),Qe=new Set(["Org","Orgs"]);function We(a){const e=w.c(32),{section:t,threadLinks:d,showOrg:o,taskHref:c,onDrill:r}=a,l=B(),n=t.columns.indexOf("Org");let i;e[0]!==n||e[1]!==t.columns||e[2]!==d?(i=d&&n>=0?t.columns.indexOf("Thread"):-1,e[0]=n,e[1]=t.columns,e[2]=d,e[3]=i):i=e[3];const u=i,f=t.columns.indexOf("Task ID");let x;e[4]!==t.columns||e[5]!==c||e[6]!==f?(x=c&&f>=0?t.columns.indexOf("Task"):-1,e[4]=t.columns,e[5]=c,e[6]=f,e[7]=x):x=e[7];const m=x,h=t.columns;let p,j;if(e[8]!==r||e[9]!==n||e[10]!==t.columns||e[11]!==t.drills||e[12]!==t.rows||e[13]!==t.title||e[14]!==t.units||e[15]!==o||e[16]!==l||e[17]!==m||e[18]!==c||e[19]!==f||e[20]!==u){j=Symbol.for("react.early_return_sentinel");e:{let y;e[23]!==o?(y=S=>{const{c:g}=S;return!Ve.has(g)&&(o!==!1||!Qe.has(g))},e[23]=o,e[24]=y):y=e[24];const v=h.map(tt).filter(y).sort(et);let k;e[25]!==t.rows?(k=S=>{const{j:g}=S,C=t.rows.map(T=>T[g]).filter(Je);return C.length>0&&C.every(qe)},e[25]=t.rows,e[26]=k):k=e[26];const $=new Set(v.filter(k).map(Ze));if(t.rows.length===1&&v.every(S=>{const{c:g}=S;return $.has(g)})){let S;e[27]!==t.rows[0]?(S=t.rows[0]??[],e[27]=t.rows[0],e[28]=S):S=e[28];const g=S;let C;e[29]!==g||e[30]!==t.units?(C=T=>{const{c:D,j:I}=T,N=g[I];return s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("dt",{className:"text-meta",children:D}),s.jsx("dd",{className:"tnum text-2xl text-foreground",children:typeof N=="number"?M(N,t.units?.[D]):"—"})]},D)},e[29]=g,e[30]=t.units,e[31]=C):C=e[31],j=s.jsx(Q,{title:t.title,children:s.jsx("dl",{className:"surface grid px-4 pt-4 pb-5 grid-cols-2 gap-x-6 gap-y-4 sm:grid-cols-3 lg:grid-cols-[repeat(auto-fill,minmax(120px,1fr))]",children:v.map(C)})});break e}p=s.jsx(Q,{title:t.title,children:t.rows.length===0?s.jsx("p",{className:"surface px-4 py-4 text-sm text-muted-foreground",children:l("taskBoard.analytics.nothingToShow")}):s.jsx("div",{className:"surface max-h-[480px] overflow-auto",children:s.jsxs(xe,{variant:"flush",children:[s.jsx(pe,{children:s.jsx(W,{children:v.map(S=>{const{c:g}=S;return s.jsx(he,{className:O("whitespace-nowrap first:pl-4 last:pr-4",$.has(g)&&"text-right"),children:g==="Thread"?"":g},g)})})}),s.jsx(ge,{children:t.rows.map((S,g)=>s.jsx(W,{children:v.map((C,T)=>{const{c:D,j:I}=C,N=S[I],K=m===I?S[f]:null,b=T===0?L(r,t.drills?.[g]??void 0,String(N??"")):void 0;return s.jsx(je,{className:O("max-w-md truncate text-sm first:pl-4 last:pr-4",$.has(D)&&"text-right"),children:N==null?s.jsx("span",{className:"text-muted-foreground",children:"—"}):I===u?s.jsxs("a",{href:Pe(String(S[n]),String(N)),target:"_blank",rel:"noreferrer",className:"focus-ring inline-flex items-center gap-1 text-muted-foreground underline-offset-2 hover:text-foreground hover:underline",children:[l("taskBoard.analytics.openChat"),s.jsx(fe,{size:12})]}):b?s.jsx("button",{type:"button",onClick:b,className:"focus-ring text-left text-foreground underline-offset-2 hover:underline",children:String(N)}):K?s.jsx(ne,{href:c?.(String(K)),className:"focus-ring text-foreground underline-offset-2 hover:underline",children:String(N)}):D==="Lane"&&typeof N=="string"?s.jsx(re,{lane:N}):D==="Priority"&&typeof N=="string"?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(ce,{drill:`priority:${N.toLowerCase()}`}),N]}):Xe.has(D)?s.jsx(Y,{variant:"muted",children:String(N)}):Ye.has(D)?s.jsx("span",{title:String(N),className:"font-mono text-xs text-muted-foreground",children:String(N)}):s.jsx("span",{className:O("tnum",typeof N=="string"&&ae.test(N)&&"text-muted-foreground"),children:Le(N,t.units?.[D])})},D)})},`${t.title}-${g}`))})]})})})}e[8]=r,e[9]=n,e[10]=t.columns,e[11]=t.drills,e[12]=t.rows,e[13]=t.title,e[14]=t.units,e[15]=o,e[16]=l,e[17]=m,e[18]=c,e[19]=f,e[20]=u,e[21]=p,e[22]=j}else p=e[21],j=e[22];return j!==Symbol.for("react.early_return_sentinel")?j:p}function Ze(a){const{c:e}=a;return e}function qe(a){return typeof a=="number"}function Je(a){return a!==null}function et(a,e){return+(e.c==="Task")-+(a.c==="Task")}function tt(a,e){return{c:a,j:e}}function Ot(a){const e=w.c(17),{section:t,taskHref:d}=a,o=B();let c;e[0]!==t.columns?(c=i=>t.columns.indexOf(i),e[0]=t.columns,e[1]=c):c=e[1];const r=c;if(t.rows.length===0){let i;e[2]!==o?(i=o("taskBoard.analytics.nothingToShow"),e[2]=o,e[3]=i):i=e[3];let u;return e[4]!==i?(u=s.jsx(R,{children:i}),e[4]=i,e[5]=u):u=e[5],u}let l;if(e[6]!==r||e[7]!==t.rows||e[8]!==o||e[9]!==d){let i;e[11]!==r||e[12]!==o||e[13]!==d?(i=u=>{const f=String(u[r("Task ID")]??""),x=u[r("Lane")],m=u[r("Picked up")],h=Number(u[r("Actions by people")]??0),p=Number(u[r("Failed QA")]??0),j=[typeof m=="string"?te(m):null,h>0&&o(h===1?"taskBoard.analytics.humanActionsOne":"taskBoard.analytics.humanActions",{n:String(h)})].filter(Boolean),y=s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[s.jsx("span",{className:"truncate text-sm text-foreground",children:String(u[r("Task")]??"")}),s.jsx("span",{className:"text-meta truncate",children:j.join(" · ")})]}),p>0&&s.jsxs(Y,{variant:"muted",children:[s.jsx(be,{className:"text-destructive"}),p===1?o("taskBoard.analytics.failedQa"):o("taskBoard.analytics.failedQaTimes",{n:String(p)})]}),typeof x=="string"&&s.jsx(re,{lane:x})]});return s.jsx("li",{className:"border-b border-border/50 last:border-b-0",children:d?s.jsx(ne,{href:d(f),className:O(F,"flex items-center gap-3 rounded-md p-2"),children:y}):s.jsx("div",{className:"flex items-center gap-3 p-2",children:y})},f)},e[11]=r,e[12]=o,e[13]=d,e[14]=i):i=e[14],l=t.rows.map(i),e[6]=r,e[7]=t.rows,e[8]=o,e[9]=d,e[10]=l}else l=e[10];let n;return e[15]!==l?(n=s.jsx("ul",{className:"flex flex-col",children:l}),e[15]=l,e[16]=n):n=e[16],n}const st={Type:Ce,Priority:Se,Tag:Ne,Sprint:ke,"Brief by":we};function ce(a){const e=w.c(10),{drill:t}=a;let d;e[0]!==t?(d=(t??"").split("&")[0]?.split(":")??[],e[0]=t,e[1]=d):d=e[1];const[o,c]=d;let r,l,n;if(e[2]!==o||e[3]!==c){n=Symbol.for("react.early_return_sentinel");e:{const u=o==="type"?Object.entries($e).find(x=>{const[m]=x;return m===c})?.[1]:o==="priority"?Object.entries(De).find(x=>{const[m]=x;return m===c})?.[1]:void 0;if(!u){n=null;break e}r=u.icon,l=O("size-3.5 shrink-0",u.iconClassName)}e[2]=o,e[3]=c,e[4]=r,e[5]=l,e[6]=n}else r=e[4],l=e[5],n=e[6];if(n!==Symbol.for("react.early_return_sentinel"))return n;let i;return e[7]!==r||e[8]!==l?(i=s.jsx(r,{className:l}),e[7]=r,e[8]=l,e[9]=i):i=e[9],i}function nt(a){const e=w.c(11),{value:t,metric:d,color:o}=a,c=t??0,r=`${d.unit==="%"?Math.min(100,c):0}%`;let l;e[0]!==o||e[1]!==r?(l=s.jsx("span",{className:"h-1.5 min-w-0 flex-1 overflow-hidden rounded-full bg-muted",children:s.jsx("span",{className:"block h-full rounded-full",style:{width:r,backgroundColor:o}})}),e[0]=o,e[1]=r,e[2]=l):l=e[2];const n=t??null;let i;e[3]!==d.unit||e[4]!==n?(i=M(n,d.unit),e[3]=d.unit,e[4]=n,e[5]=i):i=e[5];let u;e[6]!==i?(u=s.jsx("span",{className:"tnum w-12 shrink-0 text-right text-sm text-foreground",children:i}),e[6]=i,e[7]=u):u=e[7];let f;return e[8]!==l||e[9]!==u?(f=s.jsxs("span",{className:"flex items-center gap-2",children:[l,u]}),e[8]=l,e[9]=u,e[10]=f):f=e[10],f}function lt(a){const e=w.c(16),{section:t,onDrill:d}=a,o=B(),[c,r]=Z.useState(t.dimensions[0]?.label??"");let l;e[0]!==c||e[1]!==t.dimensions?(l=t.dimensions.find(m=>m.label===c)??t.dimensions[0],e[0]=c,e[1]=t.dimensions,e[2]=l):l=e[2];const n=l,i=`minmax(0,1fr) 56px repeat(${t.metrics.length}, minmax(96px, 168px))`;let u;e[3]!==n?.label||e[4]!==t.dimensions?(u=t.dimensions.length>1&&s.jsx(ee,{value:n?.label??"",onValueChange:r,options:t.dimensions.map(rt)}),e[3]=n?.label,e[4]=t.dimensions,e[5]=u):u=e[5];let f;e[6]!==i||e[7]!==n||e[8]!==d||e[9]!==t.metrics||e[10]!==o?(f=!n||n.rows.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("div",{className:"text-meta grid items-center gap-4 border-b border-border/50 pb-2",style:{gridTemplateColumns:i},children:[s.jsx("span",{children:n.label}),s.jsx("span",{className:"text-right",children:o("taskBoard.analytics.tasks")}),t.metrics.map(at)]}),n.rows.map(m=>{const h=L(d,m.drill,m.label),p=h?"button":"div";return s.jsxs(p,{type:h?"button":void 0,onClick:h,className:O("grid h-11 items-center gap-4 border-b border-border/50 last:border-b-0",h&&O(F,"-mx-2 w-[calc(100%+1rem)] rounded-md px-2")),style:{gridTemplateColumns:i},children:[s.jsxs("span",{className:"flex min-w-0 items-center gap-2 text-sm text-foreground",children:[s.jsx(ce,{drill:m.drill}),s.jsx("span",{className:"truncate",children:m.label})]}),s.jsx("span",{className:"tnum text-right text-sm text-muted-foreground",children:m.count.toLocaleString()}),t.metrics.map(j=>s.jsx(nt,{value:m.values[j.key],metric:j,color:j.better==="up"?"var(--success)":"var(--destructive)"},j.key))]},m.label)})]}),e[6]=i,e[7]=n,e[8]=d,e[9]=t.metrics,e[10]=o,e[11]=f):f=e[11];let x;return e[12]!==t.title||e[13]!==u||e[14]!==f?(x=s.jsx(_,{title:t.title,aside:u,children:f}),e[12]=t.title,e[13]=u,e[14]=f,e[15]=x):x=e[15],x}function at(a){return s.jsx("span",{className:"text-right",children:a.label},a.key)}function rt(a){const e=st[a.label];return{value:a.label,label:a.label,icon:e?s.jsx(e,{}):void 0}}const de=3;function it(a){const e=w.c(26),{section:t,onDrill:d}=a,o=B(),[c,r]=Z.useState(t.metrics[0]?.key??"");let l;e[0]!==c||e[1]!==t.metrics?(l=t.metrics.find(k=>k.key===c)??t.metrics[0],e[0]=c,e[1]=t.metrics,e[2]=l):l=e[2];const n=l;if(!n)return null;const i=n.better==="up"?"var(--success)":"var(--destructive)";let u;e[3]!==t.cols||e[4]!==t.rows?(u=t.rows.length===t.cols.length&&t.rows.every((k,$)=>t.cols[$]===k),e[3]=t.cols,e[4]=t.rows,e[5]=u):u=e[5];const f=u,x=`minmax(96px, 1fr) repeat(${t.cols.length}, minmax(72px, 1fr))`,m=t.title;let h;e[6]!==o?(h=o("taskBoard.analytics.matrixCaption",{n:String(de)}),e[6]=o,e[7]=h):h=e[7];let p;e[8]!==h?(p=s.jsx("span",{className:"text-meta",children:h}),e[8]=h,e[9]=p):p=e[9];let j;e[10]!==n.key||e[11]!==t.metrics?(j=t.metrics.length>1&&s.jsx(ee,{value:n.key,onValueChange:r,options:t.metrics.map(ct)}),e[10]=n.key,e[11]=t.metrics,e[12]=j):j=e[12];let y;e[13]!==x||e[14]!==n||e[15]!==d||e[16]!==t||e[17]!==f||e[18]!==o||e[19]!==i?(y=t.rows.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("div",{className:"grid min-w-fit gap-1",style:{gridTemplateColumns:x},children:[s.jsxs("span",{className:"text-meta self-end pb-1",children:[t.rowLabel," / ",t.colLabel]}),t.cols.map(ot),t.rows.map((k,$)=>s.jsx(dt,{row:k,section:t,metric:n,tint:i,onDrill:d,upTo:f?$:void 0},k))]})}),e[13]=x,e[14]=n,e[15]=d,e[16]=t,e[17]=f,e[18]=o,e[19]=i,e[20]=y):y=e[20];let v;return e[21]!==t.title||e[22]!==p||e[23]!==j||e[24]!==y?(v=s.jsx(_,{title:m,caption:p,aside:j,children:y}),e[21]=t.title,e[22]=p,e[23]=j,e[24]=y,e[25]=v):v=e[25],v}function ot(a){return s.jsx("span",{className:"text-meta self-end pb-1 text-center",children:a},a)}function ct(a){return{value:a.key,label:a.label}}function dt(a){const e=w.c(22),{row:t,section:d,metric:o,tint:c,onDrill:r,upTo:l}=a,n=B();let i;e[0]!==t?(i=s.jsx("span",{className:"flex items-center truncate pr-2 text-sm text-foreground",children:t}),e[0]=t,e[1]=i):i=e[1];let u;if(e[2]!==o||e[3]!==r||e[4]!==t||e[5]!==d.cells||e[6]!==d.cols||e[7]!==n||e[8]!==c||e[9]!==l){let x;e[11]!==o||e[12]!==r||e[13]!==t||e[14]!==d.cells||e[15]!==n||e[16]!==c||e[17]!==l?(x=(m,h)=>{if(l!==void 0&&h>l)return s.jsx("span",{},m);const p=d.cells.find(k=>k.row===t&&k.col===m),j=p?.values[o.key]??null;if(!p)return s.jsx("span",{className:"flex h-14 items-center justify-center rounded-md bg-muted/40 text-sm text-muted-foreground",children:"—"},m);const y=j===null?0:Math.min(100,o.unit==="%"?j:0),v=L(r,p.drill,t===m?t:`${t} · ${m}`);return s.jsxs("button",{type:"button",onClick:v,disabled:!v,className:O("flex h-14 flex-col items-center justify-center rounded-md transition-opacity focus-ring",v&&"cursor-pointer hover:opacity-80",p.count<de&&"opacity-50"),style:{backgroundColor:`color-mix(in oklch, ${c} ${Math.round(8+y*.5)}%, var(--muted))`},children:[s.jsx("span",{className:"tnum text-sm font-medium text-foreground",children:M(j,o.unit)}),s.jsx("span",{className:"text-meta",children:p.count===1?n("taskBoard.analytics.drillCountOne"):n("taskBoard.analytics.drillCount",{n:String(p.count)})})]},m)},e[11]=o,e[12]=r,e[13]=t,e[14]=d.cells,e[15]=n,e[16]=c,e[17]=l,e[18]=x):x=e[18],u=d.cols.map(x),e[2]=o,e[3]=r,e[4]=t,e[5]=d.cells,e[6]=d.cols,e[7]=n,e[8]=c,e[9]=l,e[10]=u}else u=e[10];let f;return e[19]!==i||e[20]!==u?(f=s.jsxs(s.Fragment,{children:[i,u]}),e[19]=i,e[20]=u,e[21]=f):f=e[21],f}function ut(){const a=w.c(2),e=B();let t;return a[0]!==e?(t=d=>Object.hasOwn(Oe,d)?se(d,e).label:d,a[0]=e,a[1]=t):t=a[1],t}function ft(a){const e=w.c(21),{section:t,onDrill:d}=a,o=B(),c=ut(),r=t.unit??void 0,l=t.layout==="stacked";let n;if(e[0]!==c||e[1]!==d||e[2]!==t.baseline||e[3]!==t.categories||e[4]!==t.keys||e[5]!==t.title||e[6]!==l||e[7]!==o||e[8]!==r){let i;e[10]!==t.baseline?(i=g=>g!==t.baseline,e[10]=t.baseline,e[11]=i):i=e[11];const u=t.keys.filter(i),f=g=>g===t.baseline?"var(--border)":E[u.indexOf(g)%E.length]??"",x=Object.fromEntries(t.keys.map(g=>[g,{label:c(g),color:f(g)}]));let m;e[12]!==t.categories?(m=t.categories.map(xt),e[12]=t.categories,e[13]=m):m=e[13];const h=m;let p;e[14]!==d||e[15]!==t.categories?(p=g=>{const C=t.categories[g];C&&L(d,C.drill,C.label)?.()},e[14]=d,e[15]=t.categories,e[16]=p):p=e[16];const j=p,y=t.categories.some(mt)&&!!d,v=l?Math.max(120,t.categories.length*44+32):220;let k;e[17]===Symbol.for("react.memo_cache_sentinel")?(k={fill:"var(--muted)",opacity:.4},e[17]=k):k=e[17];let $;e[18]!==c||e[19]!==r?($=s.jsx(J,{cursor:k,content:g=>{const{active:C,payload:T}=g;return s.jsx(ie,{active:C,payload:T,unit:r,nameOf:c})}}),e[18]=c,e[19]=r,e[20]=$):$=e[20];const S=$;n=s.jsx(_,{title:t.title,aside:s.jsx("ul",{className:"flex flex-wrap justify-end gap-x-3 gap-y-1",children:t.keys.map(g=>s.jsxs("li",{className:"text-meta flex items-center gap-1.5",children:[s.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:f(g)}}),c(g)]},g))}),children:h.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx(q,{role:"img","aria-label":t.title,className:"w-full",style:{height:v},config:x,children:l?s.jsxs(U,{data:h,layout:"vertical",margin:{left:0,right:8,top:0},children:[s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,horizontal:!1}),s.jsx(V,{type:"number",axisLine:!1,tickLine:!1,tick:A,tickFormatter:g=>X(g,r)}),s.jsx(P,{type:"category",dataKey:"label",axisLine:!1,tickLine:!1,tick:A,width:72}),S,t.keys.map((g,C)=>s.jsx(G,{dataKey:g,stackId:"all",fill:f(g),maxBarSize:22,radius:C===t.keys.length-1?[0,4,4,0]:0,animationDuration:300},g))]}):s.jsxs(U,{data:h,margin:{left:0,right:0,top:8},barGap:4,barCategoryGap:"28%",children:[s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),s.jsx(V,{dataKey:"label",axisLine:!1,tickLine:!1,tick:A,tickMargin:8}),s.jsx(P,{orientation:"right",axisLine:!1,tickLine:!1,tick:A,allowDecimals:r!==void 0,tickFormatter:g=>X(g,r),width:48}),S,t.keys.map(g=>s.jsx(G,{dataKey:g,fill:f(g),maxBarSize:32,radius:[4,4,0,0],animationDuration:300,className:O(y&&"cursor-pointer"),onClick:(C,T)=>j(T)},g))]})})}),e[0]=c,e[1]=d,e[2]=t.baseline,e[3]=t.categories,e[4]=t.keys,e[5]=t.title,e[6]=l,e[7]=o,e[8]=r,e[9]=n}else n=e[9];return n}function mt(a){return a.drill}function xt(a){return{label:a.label,...a.values}}function Tt(a){return a.kind==="funnel"||a.kind==="bars"?"half":"full"}function It(a){const e=w.c(27),{section:t,threadLinks:d,showOrg:o,taskHref:c,range:r,onDrill:l}=a;switch(t.kind){case"stat":{let n;return e[0]!==l||e[1]!==t?(n=s.jsx(Re,{section:t,onDrill:l}),e[0]=l,e[1]=t,e[2]=n):n=e[2],n}case"series":{let n;return e[3]!==r||e[4]!==t?(n=s.jsx(Fe,{section:t,range:r}),e[3]=r,e[4]=t,e[5]=n):n=e[5],n}case"funnel":{let n;return e[6]!==l||e[7]!==t?(n=s.jsx(Ue,{section:t,onDrill:l}),e[6]=l,e[7]=t,e[8]=n):n=e[8],n}case"bars":{let n;return e[9]!==l||e[10]!==t?(n=s.jsx(Ge,{section:t,onDrill:l}),e[9]=l,e[10]=t,e[11]=n):n=e[11],n}case"breakdown":{let n;return e[12]!==l||e[13]!==t?(n=s.jsx(lt,{section:t,onDrill:l}),e[12]=l,e[13]=t,e[14]=n):n=e[14],n}case"matrix":{let n;return e[15]!==l||e[16]!==t?(n=s.jsx(it,{section:t,onDrill:l}),e[15]=l,e[16]=t,e[17]=n):n=e[17],n}case"categories":{let n;return e[18]!==l||e[19]!==t?(n=s.jsx(ft,{section:t,onDrill:l}),e[18]=l,e[19]=t,e[20]=n):n=e[20],n}case"table":{let n;return e[21]!==l||e[22]!==t||e[23]!==o||e[24]!==c||e[25]!==d?(n=s.jsx(We,{section:t,threadLinks:d,showOrg:o,taskHref:c,onDrill:l}),e[21]=l,e[22]=t,e[23]=o,e[24]=c,e[25]=d,e[26]=n):n=e[26],n}default:return t}}export{Ot as D,It as S,Tt as s};
|
|
1
|
+
import{c as w,j as s,b as B,et as Q,l as O,z as fe,r as Z,d as me}from"./index-Bm9FTdjr.js";import{d as q,C as J}from"./chart-C-785ZEj.js";import{e as xe,a as pe,b as W,T as he,d as ge,c as je}from"./table-Gm-jWCpy.js";import{i as be}from"./AlertCircle-B5gBB9h_.js";import{i as ye,n as ve}from"./ArrowUp-CP6XCJnB.js";import{a0 as ke,Z as Ne,am as Se,a6 as Ce}from"./agent-icon-BewGjsar.js";import{s as we}from"./User01-9bZ-cKa7.js";import{V as ee}from"./view-mode-toggle-DPJfZa3C.js";import{t as te}from"./format-time-CjIPQhCN.js";import{B as Y}from"./badge-DFdotQFQ.js";import{l as se,c as $e,b as De,S as Oe}from"./config-DP6xvcYW.js";import{B as U,a as G}from"./BarChart-Ch51NWPz.js";import{C as H,Y as P,a as Te,A as Ie}from"./AreaChart-BTyzss2a.js";import{X as V}from"./XAxis-DDG3qYHW.js";function ne(a){const e=w.c(8),{href:t,className:d,children:o}=a,c=me();let r;e[0]!==t||e[1]!==c?(r=n=>{!t||n.button!==0||n.metaKey||n.ctrlKey||n.shiftKey||(n.preventDefault(),c({href:t}))},e[0]=t,e[1]=c,e[2]=r):r=e[2];let l;return e[3]!==o||e[4]!==d||e[5]!==t||e[6]!==r?(l=s.jsx("a",{href:t,className:d,onClick:r,children:o}),e[3]=o,e[4]=d,e[5]=t,e[6]=r,e[7]=l):l=e[7],l}const L=(a,e,t)=>a&&e?()=>a({drill:e,label:t}):void 0,F="cursor-pointer text-left transition-colors hover:bg-accent/50 focus-ring",E=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"],A={fontSize:11,fill:"var(--muted-foreground)",opacity:.7};function le(a){const e=Math.abs(a);return e<60?`${Math.round(a)}s`:e<3600?`${Math.round(a/60)}m`:e<86400?`${(a/3600).toFixed(1)}h`:`${(a/86400).toFixed(1)}d`}function M(a,e){return a===null||Number.isNaN(a)?"—":e==="s"?le(a):e==="%"?`${Math.round(a*10)/10}%`:e==="USD"?`$${a.toFixed(2)}`:a.toLocaleString()}function X(a,e){return e==="s"?le(a):e==="%"?`${a}%`:e==="USD"?`$${a}`:a>=1e3?`${(a/1e3).toFixed(1)}k`:String(a)}const ae=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/,Be=/^\d{4}-\d{2}-\d{2}$/;function Le(a,e){return typeof a=="number"?M(a,e):Be.test(a)?new Date(`${a}T12:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric"}):ae.test(a)?te(a):a}function _(a){const e=w.c(20),{title:t,value:d,caption:o,aside:c,children:r,onClick:l}=a,n=l?"button":"section",i=l?"button":void 0,u=l&&F;let f;e[0]!==u?(f=O("surface flex h-full w-full flex-col gap-6 px-4 pt-4 pb-5",u),e[0]=u,e[1]=f):f=e[1];let x;e[2]!==t?(x=s.jsx("h3",{className:"text-sm text-foreground/70",children:t}),e[2]=t,e[3]=x):x=e[3];let m;e[4]!==d?(m=d!==void 0&&s.jsx("span",{className:"tnum text-4xl font-normal text-foreground",children:d}),e[4]=d,e[5]=m):m=e[5];let h;e[6]!==o||e[7]!==x||e[8]!==m?(h=s.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[x,m,o]}),e[6]=o,e[7]=x,e[8]=m,e[9]=h):h=e[9];let p;e[10]!==c||e[11]!==h?(p=s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[h,c]}),e[10]=c,e[11]=h,e[12]=p):p=e[12];let j;return e[13]!==n||e[14]!==r||e[15]!==l||e[16]!==i||e[17]!==f||e[18]!==p?(j=s.jsxs(n,{type:i,onClick:l,className:f,children:[p,r]}),e[13]=n,e[14]=r,e[15]=l,e[16]=i,e[17]=f,e[18]=p,e[19]=j):j=e[19],j}function re(a){const e=w.c(9),{lane:t}=a,d=B();let o;e[0]!==t||e[1]!==d?(o=se(t,d),e[0]=t,e[1]=d,e[2]=o):o=e[2];const{label:c,visual:r}=o,l=r.icon;let n;e[3]!==l||e[4]!==r.iconClassName?(n=s.jsx(l,{className:r.iconClassName}),e[3]=l,e[4]=r.iconClassName,e[5]=n):n=e[5];let i;return e[6]!==c||e[7]!==n?(i=s.jsxs(Y,{variant:"muted",children:[n,c]}),e[6]=c,e[7]=n,e[8]=i):i=e[8],i}function R(a){const e=w.c(2),{children:t}=a;let d;return e[0]!==t?(d=s.jsx("div",{className:"flex h-20 items-center justify-center text-sm text-muted-foreground",children:t}),e[0]=t,e[1]=d):d=e[1],d}function Me(a){const e=w.c(21),{value:t,previous:d,unit:o,better:c}=a,r=B();if(t===null||d===null||d===void 0){let p;e[0]!==r?(p=r("taskBoard.analytics.noPrior"),e[0]=r,e[1]=p):p=e[1];let j;return e[2]!==p?(j=s.jsx("span",{className:"text-meta",children:p}),e[2]=p,e[3]=j):j=e[3],j}const l=Math.round((t-d)*10)/10,n=c==="down"?l<0:l>0;let i;e[4]!==l||e[5]!==r||e[6]!==o?(i=o==="%"?r("taskBoard.analytics.points",{n:String(Math.abs(l))}):M(Math.abs(l),o),e[4]=l,e[5]=r,e[6]=o,e[7]=i):i=e[7];const u=i;let f;e[8]!==u||e[9]!==c||e[10]!==l||e[11]!==n||e[12]!==r?(f=l===0?r("taskBoard.analytics.unchanged"):s.jsxs("span",{className:O("inline-flex items-center gap-0.5 font-medium",c&&(n?"text-success":"text-destructive")),children:[l>0?s.jsx(ye,{size:12}):s.jsx(ve,{size:12}),u]}),e[8]=u,e[9]=c,e[10]=l,e[11]=n,e[12]=r,e[13]=f):f=e[13];let x;e[14]!==r?(x=r("taskBoard.analytics.vsPrevious"),e[14]=r,e[15]=x):x=e[15];let m;e[16]!==x?(m=s.jsx("span",{children:x}),e[16]=x,e[17]=m):m=e[17];let h;return e[18]!==f||e[19]!==m?(h=s.jsxs("span",{className:"text-meta inline-flex items-center gap-1",children:[f,m]}),e[18]=f,e[19]=m,e[20]=h):h=e[20],h}const _e={1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",5:"lg:grid-cols-5",6:"lg:grid-cols-3",9:"lg:grid-cols-3"};function Re(a){const e=w.c(10),{section:t,onDrill:d}=a,o=_e[t.values.length]??"lg:grid-cols-4";let c;e[0]!==o?(c=O("grid grid-cols-2 gap-4",o),e[0]=o,e[1]=c):c=e[1];let r;if(e[2]!==d||e[3]!==t.values){let n;e[5]!==d?(n=i=>s.jsx(_,{title:i.label,value:M(i.value,i.unit),onClick:L(d,i.drill,i.label),caption:s.jsxs(s.Fragment,{children:[i.detail&&s.jsx("span",{className:"text-sm text-muted-foreground",children:i.detail}),i.previous!==void 0&&s.jsx(Me,{value:i.value,previous:i.previous,unit:i.unit,better:i.better})]})},i.label),e[5]=d,e[6]=n):n=e[6],r=t.values.map(n),e[2]=d,e[3]=t.values,e[4]=r}else r=e[4];let l;return e[7]!==c||e[8]!==r?(l=s.jsx("div",{className:c,children:r}),e[7]=c,e[8]=r,e[9]=l):l=e[9],l}function Ae(a){return Array.from(new Set(a.flatMap(e=>Object.keys(e)))).filter(e=>e!=="t").sort()}function Ke(a,e){const t=e.filter(d=>a.some(o=>typeof o[d]=="number"&&o[d]!==0));return t.length>0?t:e}function Ee(a,e,t){const d=new Map(a.map(l=>[String(l.t??"").slice(0,10),l])),o=new Date(`${t.from.slice(0,10)}T00:00:00.000Z`),c=t.to.slice(0,10),r=[];for(;o.toISOString().slice(0,10)<=c;){const l=o.toISOString().slice(0,10);r.push(d.get(l)??{t:o.toISOString(),...Object.fromEntries(e.map(n=>[n,0]))}),o.setUTCDate(o.getUTCDate()+1)}return r}function ie(a){const e=w.c(17),{active:t,payload:d,unit:o,nameOf:c}=a,r=c===void 0?String:c;if(!t||!d?.length)return null;const l=d[0]?.payload,n=l?.t;let i;e[0]!==l?.label||e[1]!==n?(i=typeof n=="string"?new Date(n).toLocaleDateString(void 0,{month:"short",day:"numeric"}):String(l?.label??""),e[0]=l?.label,e[1]=n,e[2]=i):i=e[2];let u;e[3]!==i?(u=s.jsx("div",{className:"mb-1 text-xs text-muted-foreground",children:i}),e[3]=i,e[4]=u):u=e[4];let f;if(e[5]!==r||e[6]!==d||e[7]!==o){let h;e[9]!==r||e[10]!==o?(h=p=>s.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[s.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:p.color}}),s.jsx("span",{className:"text-muted-foreground",children:r(String(p.dataKey))}),s.jsx("span",{className:"tnum ml-auto pl-3 font-medium",children:M(typeof p.value=="number"?p.value:null,o)})]},String(p.dataKey)),e[9]=r,e[10]=o,e[11]=h):h=e[11],f=d.map(h),e[5]=r,e[6]=d,e[7]=o,e[8]=f}else f=e[8];let x;e[12]!==f?(x=s.jsx("div",{className:"flex flex-col gap-1",children:f}),e[12]=f,e[13]=x):x=e[13];let m;return e[14]!==u||e[15]!==x?(m=s.jsxs("div",{className:"rounded-lg border bg-background px-3 py-2 shadow-md",children:[u,x]}),e[14]=u,e[15]=x,e[16]=m):m=e[16],m}function Fe(a){const e=w.c(27),{section:t,range:d}=a,o=B(),c=t.unit??void 0,r=c!=="%"&&c!=="s";let l;if(e[0]!==r||e[1]!==d||e[2]!==t.points||e[3]!==t.title||e[4]!==o||e[5]!==c){const n=Ae(t.points),i=r?Ke(t.points,n):n,u=b=>E[n.indexOf(b)%E.length],f=Object.fromEntries(i.map(b=>[b,{label:b,color:u(b)}])),m=(r&&d?Ee(t.points,n,d):t.points).map(ze);let h;if(e[7]!==t.title){let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=/\W+/g,e[9]=b):b=e[9],h=t.title.replace(b,"-"),e[7]=t.title,e[8]=h}else h=e[8];const p=`analytics-${h}`;let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),e[10]=j):j=e[10];const y=j;let v;e[11]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(V,{dataKey:"label",axisLine:!1,tickLine:!1,tick:A,minTickGap:24,tickMargin:8}),e[11]=v):v=e[11];const k=v;let $;e[12]!==c?($=c==="%"?[0,100]:[0,"auto"],e[12]=c,e[13]=$):$=e[13];const S=c!==void 0;let g;e[14]!==c?(g=b=>X(b,c),e[14]=c,e[15]=g):g=e[15];let C;e[16]!==$||e[17]!==S||e[18]!==g?(C=s.jsx(P,{orientation:"right",axisLine:!1,tickLine:!1,tick:A,domain:$,allowDecimals:S,tickFormatter:g,width:48,tickCount:5}),e[16]=$,e[17]=S,e[18]=g,e[19]=C):C=e[19];const T=C;let D;e[20]!==r?(D=r?{fill:"var(--muted)",opacity:.4}:{stroke:"var(--border)",strokeDasharray:"4 4"},e[20]=r,e[21]=D):D=e[21];let I;e[22]!==c?(I=b=>{const{active:z,payload:ue}=b;return s.jsx(ie,{active:z,payload:ue,unit:c})},e[22]=c,e[23]=I):I=e[23];let N;e[24]!==I||e[25]!==D?(N=s.jsx(J,{cursor:D,content:I}),e[24]=I,e[25]=D,e[26]=N):N=e[26];const K=N;l=s.jsx(_,{title:t.title,aside:i.length>1&&s.jsx("ul",{className:"flex flex-wrap justify-end gap-x-3 gap-y-1",children:i.map(b=>s.jsxs("li",{className:"text-meta flex items-center gap-1.5",children:[s.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:u(b)}}),b]},b))}),children:m.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx(q,{role:"img","aria-label":t.title,className:"h-[140px] w-full md:h-[180px]",config:f,children:r?s.jsxs(U,{data:m,margin:{left:0,right:0,top:8},children:[y,k,T,K,i.map((b,z)=>s.jsx(G,{dataKey:b,stackId:"day",fill:u(b),maxBarSize:24,radius:z===i.length-1?[4,4,0,0]:0,animationDuration:300},b))]}):s.jsxs(Te,{data:m,margin:{left:0,right:0,top:8},children:[i.length===1&&s.jsx("defs",{children:s.jsxs("linearGradient",{id:p,x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:u(i[0]??""),stopOpacity:.2}),s.jsx("stop",{offset:"100%",stopColor:u(i[0]??""),stopOpacity:0})]})}),y,k,T,K,i.map(b=>s.jsx(Ie,{type:"linear",dataKey:b,stroke:u(b),strokeWidth:2,fill:i.length===1?`url(#${p})`:"none",dot:m.length===1?{r:4}:!1,activeDot:{r:4,stroke:"var(--background)",strokeWidth:2},connectNulls:!0,animationDuration:300},b))]})})}),e[0]=r,e[1]=d,e[2]=t.points,e[3]=t.title,e[4]=o,e[5]=c,e[6]=l}else l=e[6];return l}function ze(a){return{...a,label:new Date(String(a.t??"")).toLocaleDateString(void 0,{month:"short",day:"numeric"})}}function oe(a){const e=w.c(25),{label:t,note:d,share:o,value:c,fill:r,color:l,onClick:n}=a,i=n?"button":"div",u=n?"button":void 0;let f;e[0]!==n?(f=n&&O(F,"-mx-2 w-[calc(100%+1rem)] rounded-md px-2"),e[0]=n,e[1]=f):f=e[1];let x;e[2]!==f?(x=O("flex h-10 w-full items-center gap-3",f),e[2]=f,e[3]=x):x=e[3];let m;e[4]!==d?(m=d&&s.jsx("span",{className:"text-meta ml-2",children:d}),e[4]=d,e[5]=m):m=e[5];let h;e[6]!==t||e[7]!==m?(h=s.jsxs("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:[t,m]}),e[6]=t,e[7]=m,e[8]=h):h=e[8];const p=`${Math.max(0,Math.min(100,r))}%`;let j;e[9]!==l||e[10]!==p?(j=s.jsx("span",{className:"h-1.5 w-20 shrink-0 overflow-hidden rounded-full bg-muted",children:s.jsx("span",{className:"block h-full rounded-full",style:{width:p,backgroundColor:l}})}),e[9]=l,e[10]=p,e[11]=j):j=e[11];let y;e[12]!==o?(y=o!==void 0&&s.jsx("span",{className:"tnum w-16 shrink-0 text-right text-sm text-foreground/40",children:o}),e[12]=o,e[13]=y):y=e[13];let v;e[14]!==c?(v=s.jsx("span",{className:"tnum w-8 shrink-0 text-right text-sm text-foreground",children:c}),e[14]=c,e[15]=v):v=e[15];let k;return e[16]!==i||e[17]!==n||e[18]!==u||e[19]!==x||e[20]!==h||e[21]!==j||e[22]!==y||e[23]!==v?(k=s.jsx("li",{className:"border-b border-border/50 last:border-b-0",children:s.jsxs(i,{type:u,onClick:n,className:x,children:[h,j,y,v]})}),e[16]=i,e[17]=n,e[18]=u,e[19]=x,e[20]=h,e[21]=j,e[22]=y,e[23]=v,e[24]=k):k=e[24],k}function Ue(a){const e=w.c(17),{section:t,onDrill:d}=a,o=B(),c=t.stages[0]?.value??0,r=t.stages.at(-1)?.value??0;let l;e[0]!==r||e[1]!==c?(l=c?`${Math.round(100*r/c)}%`:"—",e[0]=r,e[1]=c,e[2]=l):l=e[2];let n;e[3]!==r||e[4]!==c||e[5]!==o?(n=c>0&&s.jsx("span",{className:"text-meta",children:o("taskBoard.analytics.funnelCaption",{end:String(r),start:String(c)})}),e[3]=r,e[4]=c,e[5]=o,e[6]=n):n=e[6];let i;e[7]!==d||e[8]!==t.stages||e[9]!==c||e[10]!==o?(i=c===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx("ol",{className:"flex flex-col",children:t.stages.map((f,x)=>{const m=t.stages[x-1]?.value,h=m===void 0?0:m-f.value;return s.jsx(oe,{label:f.label,note:h>0?o("taskBoard.analytics.dropped",{n:String(h)}):void 0,share:`${Math.round(100*f.value/c)}%`,value:f.value.toLocaleString(),fill:100*f.value/c,color:"var(--chart-2)",onClick:L(d,f.drill,f.label)},f.label)})}),e[7]=d,e[8]=t.stages,e[9]=c,e[10]=o,e[11]=i):i=e[11];let u;return e[12]!==t.title||e[13]!==l||e[14]!==n||e[15]!==i?(u=s.jsx(_,{title:t.title,value:l,caption:n,children:i}),e[12]=t.title,e[13]=l,e[14]=n,e[15]=i,e[16]=u):u=e[16],u}function Ge(a){const e=w.c(19),{section:t,onDrill:d}=a,o=B();let c;e[0]!==t.bars?(c=Math.max(0,...t.bars.map(He)),e[0]=t.bars,e[1]=c):c=e[1];const r=c;let l;e[2]!==t.total?.value?(l=t.total?.value.toLocaleString(),e[2]=t.total?.value,e[3]=l):l=e[3];let n;e[4]!==t.total?(n=t.total&&s.jsx("span",{className:"text-meta",children:t.total.label}),e[4]=t.total,e[5]=n):n=e[5];let i;e[6]!==t.unit?(i=t.unit&&s.jsx("span",{className:"text-meta",children:t.unit}),e[6]=t.unit,e[7]=i):i=e[7];let u;e[8]!==r||e[9]!==d||e[10]!==t.bars||e[11]!==o?(u=t.bars.length===0?s.jsx(R,{children:o("taskBoard.analytics.nobodyStepped")}):s.jsx("ul",{className:"flex flex-col",children:t.bars.map(x=>s.jsx(oe,{label:x.label,note:x.note,share:x.detail,value:x.value.toLocaleString(),fill:r?100*x.value/r:0,color:"var(--chart-1)",onClick:L(d,x.drill,x.label)},x.label))}),e[8]=r,e[9]=d,e[10]=t.bars,e[11]=o,e[12]=u):u=e[12];let f;return e[13]!==t.title||e[14]!==l||e[15]!==n||e[16]!==i||e[17]!==u?(f=s.jsx(_,{title:t.title,value:l,caption:n,aside:i,children:u}),e[13]=t.title,e[14]=l,e[15]=n,e[16]=i,e[17]=u,e[18]=f):f=e[18],f}function He(a){return a.value}function Pe(a,e){return`/${encodeURIComponent(a)}/${encodeURIComponent(e)}`}const Ve=new Set(["Org ID","Task ID"]),Xe=new Set(["Run outcome","Failure kind","Moved in by","State"]),Ye=new Set(["Error","Signature"]),Qe=new Set(["Org","Orgs"]);function We(a){const e=w.c(32),{section:t,threadLinks:d,showOrg:o,taskHref:c,onDrill:r}=a,l=B(),n=t.columns.indexOf("Org");let i;e[0]!==n||e[1]!==t.columns||e[2]!==d?(i=d&&n>=0?t.columns.indexOf("Thread"):-1,e[0]=n,e[1]=t.columns,e[2]=d,e[3]=i):i=e[3];const u=i,f=t.columns.indexOf("Task ID");let x;e[4]!==t.columns||e[5]!==c||e[6]!==f?(x=c&&f>=0?t.columns.indexOf("Task"):-1,e[4]=t.columns,e[5]=c,e[6]=f,e[7]=x):x=e[7];const m=x,h=t.columns;let p,j;if(e[8]!==r||e[9]!==n||e[10]!==t.columns||e[11]!==t.drills||e[12]!==t.rows||e[13]!==t.title||e[14]!==t.units||e[15]!==o||e[16]!==l||e[17]!==m||e[18]!==c||e[19]!==f||e[20]!==u){j=Symbol.for("react.early_return_sentinel");e:{let y;e[23]!==o?(y=S=>{const{c:g}=S;return!Ve.has(g)&&(o!==!1||!Qe.has(g))},e[23]=o,e[24]=y):y=e[24];const v=h.map(tt).filter(y).sort(et);let k;e[25]!==t.rows?(k=S=>{const{j:g}=S,C=t.rows.map(T=>T[g]).filter(Je);return C.length>0&&C.every(qe)},e[25]=t.rows,e[26]=k):k=e[26];const $=new Set(v.filter(k).map(Ze));if(t.rows.length===1&&v.every(S=>{const{c:g}=S;return $.has(g)})){let S;e[27]!==t.rows[0]?(S=t.rows[0]??[],e[27]=t.rows[0],e[28]=S):S=e[28];const g=S;let C;e[29]!==g||e[30]!==t.units?(C=T=>{const{c:D,j:I}=T,N=g[I];return s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("dt",{className:"text-meta",children:D}),s.jsx("dd",{className:"tnum text-2xl text-foreground",children:typeof N=="number"?M(N,t.units?.[D]):"—"})]},D)},e[29]=g,e[30]=t.units,e[31]=C):C=e[31],j=s.jsx(Q,{title:t.title,children:s.jsx("dl",{className:"surface grid px-4 pt-4 pb-5 grid-cols-2 gap-x-6 gap-y-4 sm:grid-cols-3 lg:grid-cols-[repeat(auto-fill,minmax(120px,1fr))]",children:v.map(C)})});break e}p=s.jsx(Q,{title:t.title,children:t.rows.length===0?s.jsx("p",{className:"surface px-4 py-4 text-sm text-muted-foreground",children:l("taskBoard.analytics.nothingToShow")}):s.jsx("div",{className:"surface max-h-[480px] overflow-auto",children:s.jsxs(xe,{variant:"flush",children:[s.jsx(pe,{children:s.jsx(W,{children:v.map(S=>{const{c:g}=S;return s.jsx(he,{className:O("whitespace-nowrap first:pl-4 last:pr-4",$.has(g)&&"text-right"),children:g==="Thread"?"":g},g)})})}),s.jsx(ge,{children:t.rows.map((S,g)=>s.jsx(W,{children:v.map((C,T)=>{const{c:D,j:I}=C,N=S[I],K=m===I?S[f]:null,b=T===0?L(r,t.drills?.[g]??void 0,String(N??"")):void 0;return s.jsx(je,{className:O("max-w-md truncate text-sm first:pl-4 last:pr-4",$.has(D)&&"text-right"),children:N==null?s.jsx("span",{className:"text-muted-foreground",children:"—"}):I===u?s.jsxs("a",{href:Pe(String(S[n]),String(N)),target:"_blank",rel:"noreferrer",className:"focus-ring inline-flex items-center gap-1 text-muted-foreground underline-offset-2 hover:text-foreground hover:underline",children:[l("taskBoard.analytics.openChat"),s.jsx(fe,{size:12})]}):b?s.jsx("button",{type:"button",onClick:b,className:"focus-ring text-left text-foreground underline-offset-2 hover:underline",children:String(N)}):K?s.jsx(ne,{href:c?.(String(K)),className:"focus-ring text-foreground underline-offset-2 hover:underline",children:String(N)}):D==="Lane"&&typeof N=="string"?s.jsx(re,{lane:N}):D==="Priority"&&typeof N=="string"?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(ce,{drill:`priority:${N.toLowerCase()}`}),N]}):Xe.has(D)?s.jsx(Y,{variant:"muted",children:String(N)}):Ye.has(D)?s.jsx("span",{title:String(N),className:"font-mono text-xs text-muted-foreground",children:String(N)}):s.jsx("span",{className:O("tnum",typeof N=="string"&&ae.test(N)&&"text-muted-foreground"),children:Le(N,t.units?.[D])})},D)})},`${t.title}-${g}`))})]})})})}e[8]=r,e[9]=n,e[10]=t.columns,e[11]=t.drills,e[12]=t.rows,e[13]=t.title,e[14]=t.units,e[15]=o,e[16]=l,e[17]=m,e[18]=c,e[19]=f,e[20]=u,e[21]=p,e[22]=j}else p=e[21],j=e[22];return j!==Symbol.for("react.early_return_sentinel")?j:p}function Ze(a){const{c:e}=a;return e}function qe(a){return typeof a=="number"}function Je(a){return a!==null}function et(a,e){return+(e.c==="Task")-+(a.c==="Task")}function tt(a,e){return{c:a,j:e}}function Ot(a){const e=w.c(17),{section:t,taskHref:d}=a,o=B();let c;e[0]!==t.columns?(c=i=>t.columns.indexOf(i),e[0]=t.columns,e[1]=c):c=e[1];const r=c;if(t.rows.length===0){let i;e[2]!==o?(i=o("taskBoard.analytics.nothingToShow"),e[2]=o,e[3]=i):i=e[3];let u;return e[4]!==i?(u=s.jsx(R,{children:i}),e[4]=i,e[5]=u):u=e[5],u}let l;if(e[6]!==r||e[7]!==t.rows||e[8]!==o||e[9]!==d){let i;e[11]!==r||e[12]!==o||e[13]!==d?(i=u=>{const f=String(u[r("Task ID")]??""),x=u[r("Lane")],m=u[r("Picked up")],h=Number(u[r("Actions by people")]??0),p=Number(u[r("Failed QA")]??0),j=[typeof m=="string"?te(m):null,h>0&&o(h===1?"taskBoard.analytics.humanActionsOne":"taskBoard.analytics.humanActions",{n:String(h)})].filter(Boolean),y=s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[s.jsx("span",{className:"truncate text-sm text-foreground",children:String(u[r("Task")]??"")}),s.jsx("span",{className:"text-meta truncate",children:j.join(" · ")})]}),p>0&&s.jsxs(Y,{variant:"muted",children:[s.jsx(be,{className:"text-destructive"}),p===1?o("taskBoard.analytics.failedQa"):o("taskBoard.analytics.failedQaTimes",{n:String(p)})]}),typeof x=="string"&&s.jsx(re,{lane:x})]});return s.jsx("li",{className:"border-b border-border/50 last:border-b-0",children:d?s.jsx(ne,{href:d(f),className:O(F,"flex items-center gap-3 rounded-md p-2"),children:y}):s.jsx("div",{className:"flex items-center gap-3 p-2",children:y})},f)},e[11]=r,e[12]=o,e[13]=d,e[14]=i):i=e[14],l=t.rows.map(i),e[6]=r,e[7]=t.rows,e[8]=o,e[9]=d,e[10]=l}else l=e[10];let n;return e[15]!==l?(n=s.jsx("ul",{className:"flex flex-col",children:l}),e[15]=l,e[16]=n):n=e[16],n}const st={Type:Ce,Priority:Se,Tag:Ne,Sprint:ke,"Brief by":we};function ce(a){const e=w.c(10),{drill:t}=a;let d;e[0]!==t?(d=(t??"").split("&")[0]?.split(":")??[],e[0]=t,e[1]=d):d=e[1];const[o,c]=d;let r,l,n;if(e[2]!==o||e[3]!==c){n=Symbol.for("react.early_return_sentinel");e:{const u=o==="type"?Object.entries($e).find(x=>{const[m]=x;return m===c})?.[1]:o==="priority"?Object.entries(De).find(x=>{const[m]=x;return m===c})?.[1]:void 0;if(!u){n=null;break e}r=u.icon,l=O("size-3.5 shrink-0",u.iconClassName)}e[2]=o,e[3]=c,e[4]=r,e[5]=l,e[6]=n}else r=e[4],l=e[5],n=e[6];if(n!==Symbol.for("react.early_return_sentinel"))return n;let i;return e[7]!==r||e[8]!==l?(i=s.jsx(r,{className:l}),e[7]=r,e[8]=l,e[9]=i):i=e[9],i}function nt(a){const e=w.c(11),{value:t,metric:d,color:o}=a,c=t??0,r=`${d.unit==="%"?Math.min(100,c):0}%`;let l;e[0]!==o||e[1]!==r?(l=s.jsx("span",{className:"h-1.5 min-w-0 flex-1 overflow-hidden rounded-full bg-muted",children:s.jsx("span",{className:"block h-full rounded-full",style:{width:r,backgroundColor:o}})}),e[0]=o,e[1]=r,e[2]=l):l=e[2];const n=t??null;let i;e[3]!==d.unit||e[4]!==n?(i=M(n,d.unit),e[3]=d.unit,e[4]=n,e[5]=i):i=e[5];let u;e[6]!==i?(u=s.jsx("span",{className:"tnum w-12 shrink-0 text-right text-sm text-foreground",children:i}),e[6]=i,e[7]=u):u=e[7];let f;return e[8]!==l||e[9]!==u?(f=s.jsxs("span",{className:"flex items-center gap-2",children:[l,u]}),e[8]=l,e[9]=u,e[10]=f):f=e[10],f}function lt(a){const e=w.c(16),{section:t,onDrill:d}=a,o=B(),[c,r]=Z.useState(t.dimensions[0]?.label??"");let l;e[0]!==c||e[1]!==t.dimensions?(l=t.dimensions.find(m=>m.label===c)??t.dimensions[0],e[0]=c,e[1]=t.dimensions,e[2]=l):l=e[2];const n=l,i=`minmax(0,1fr) 56px repeat(${t.metrics.length}, minmax(96px, 168px))`;let u;e[3]!==n?.label||e[4]!==t.dimensions?(u=t.dimensions.length>1&&s.jsx(ee,{value:n?.label??"",onValueChange:r,options:t.dimensions.map(rt)}),e[3]=n?.label,e[4]=t.dimensions,e[5]=u):u=e[5];let f;e[6]!==i||e[7]!==n||e[8]!==d||e[9]!==t.metrics||e[10]!==o?(f=!n||n.rows.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("div",{className:"text-meta grid items-center gap-4 border-b border-border/50 pb-2",style:{gridTemplateColumns:i},children:[s.jsx("span",{children:n.label}),s.jsx("span",{className:"text-right",children:o("taskBoard.analytics.tasks")}),t.metrics.map(at)]}),n.rows.map(m=>{const h=L(d,m.drill,m.label),p=h?"button":"div";return s.jsxs(p,{type:h?"button":void 0,onClick:h,className:O("grid h-11 items-center gap-4 border-b border-border/50 last:border-b-0",h&&O(F,"-mx-2 w-[calc(100%+1rem)] rounded-md px-2")),style:{gridTemplateColumns:i},children:[s.jsxs("span",{className:"flex min-w-0 items-center gap-2 text-sm text-foreground",children:[s.jsx(ce,{drill:m.drill}),s.jsx("span",{className:"truncate",children:m.label})]}),s.jsx("span",{className:"tnum text-right text-sm text-muted-foreground",children:m.count.toLocaleString()}),t.metrics.map(j=>s.jsx(nt,{value:m.values[j.key],metric:j,color:j.better==="up"?"var(--success)":"var(--destructive)"},j.key))]},m.label)})]}),e[6]=i,e[7]=n,e[8]=d,e[9]=t.metrics,e[10]=o,e[11]=f):f=e[11];let x;return e[12]!==t.title||e[13]!==u||e[14]!==f?(x=s.jsx(_,{title:t.title,aside:u,children:f}),e[12]=t.title,e[13]=u,e[14]=f,e[15]=x):x=e[15],x}function at(a){return s.jsx("span",{className:"text-right",children:a.label},a.key)}function rt(a){const e=st[a.label];return{value:a.label,label:a.label,icon:e?s.jsx(e,{}):void 0}}const de=3;function it(a){const e=w.c(26),{section:t,onDrill:d}=a,o=B(),[c,r]=Z.useState(t.metrics[0]?.key??"");let l;e[0]!==c||e[1]!==t.metrics?(l=t.metrics.find(k=>k.key===c)??t.metrics[0],e[0]=c,e[1]=t.metrics,e[2]=l):l=e[2];const n=l;if(!n)return null;const i=n.better==="up"?"var(--success)":"var(--destructive)";let u;e[3]!==t.cols||e[4]!==t.rows?(u=t.rows.length===t.cols.length&&t.rows.every((k,$)=>t.cols[$]===k),e[3]=t.cols,e[4]=t.rows,e[5]=u):u=e[5];const f=u,x=`minmax(96px, 1fr) repeat(${t.cols.length}, minmax(72px, 1fr))`,m=t.title;let h;e[6]!==o?(h=o("taskBoard.analytics.matrixCaption",{n:String(de)}),e[6]=o,e[7]=h):h=e[7];let p;e[8]!==h?(p=s.jsx("span",{className:"text-meta",children:h}),e[8]=h,e[9]=p):p=e[9];let j;e[10]!==n.key||e[11]!==t.metrics?(j=t.metrics.length>1&&s.jsx(ee,{value:n.key,onValueChange:r,options:t.metrics.map(ct)}),e[10]=n.key,e[11]=t.metrics,e[12]=j):j=e[12];let y;e[13]!==x||e[14]!==n||e[15]!==d||e[16]!==t||e[17]!==f||e[18]!==o||e[19]!==i?(y=t.rows.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("div",{className:"grid min-w-fit gap-1",style:{gridTemplateColumns:x},children:[s.jsxs("span",{className:"text-meta self-end pb-1",children:[t.rowLabel," / ",t.colLabel]}),t.cols.map(ot),t.rows.map((k,$)=>s.jsx(dt,{row:k,section:t,metric:n,tint:i,onDrill:d,upTo:f?$:void 0},k))]})}),e[13]=x,e[14]=n,e[15]=d,e[16]=t,e[17]=f,e[18]=o,e[19]=i,e[20]=y):y=e[20];let v;return e[21]!==t.title||e[22]!==p||e[23]!==j||e[24]!==y?(v=s.jsx(_,{title:m,caption:p,aside:j,children:y}),e[21]=t.title,e[22]=p,e[23]=j,e[24]=y,e[25]=v):v=e[25],v}function ot(a){return s.jsx("span",{className:"text-meta self-end pb-1 text-center",children:a},a)}function ct(a){return{value:a.key,label:a.label}}function dt(a){const e=w.c(22),{row:t,section:d,metric:o,tint:c,onDrill:r,upTo:l}=a,n=B();let i;e[0]!==t?(i=s.jsx("span",{className:"flex items-center truncate pr-2 text-sm text-foreground",children:t}),e[0]=t,e[1]=i):i=e[1];let u;if(e[2]!==o||e[3]!==r||e[4]!==t||e[5]!==d.cells||e[6]!==d.cols||e[7]!==n||e[8]!==c||e[9]!==l){let x;e[11]!==o||e[12]!==r||e[13]!==t||e[14]!==d.cells||e[15]!==n||e[16]!==c||e[17]!==l?(x=(m,h)=>{if(l!==void 0&&h>l)return s.jsx("span",{},m);const p=d.cells.find(k=>k.row===t&&k.col===m),j=p?.values[o.key]??null;if(!p)return s.jsx("span",{className:"flex h-14 items-center justify-center rounded-md bg-muted/40 text-sm text-muted-foreground",children:"—"},m);const y=j===null?0:Math.min(100,o.unit==="%"?j:0),v=L(r,p.drill,t===m?t:`${t} · ${m}`);return s.jsxs("button",{type:"button",onClick:v,disabled:!v,className:O("flex h-14 flex-col items-center justify-center rounded-md transition-opacity focus-ring",v&&"cursor-pointer hover:opacity-80",p.count<de&&"opacity-50"),style:{backgroundColor:`color-mix(in oklch, ${c} ${Math.round(8+y*.5)}%, var(--muted))`},children:[s.jsx("span",{className:"tnum text-sm font-medium text-foreground",children:M(j,o.unit)}),s.jsx("span",{className:"text-meta",children:p.count===1?n("taskBoard.analytics.drillCountOne"):n("taskBoard.analytics.drillCount",{n:String(p.count)})})]},m)},e[11]=o,e[12]=r,e[13]=t,e[14]=d.cells,e[15]=n,e[16]=c,e[17]=l,e[18]=x):x=e[18],u=d.cols.map(x),e[2]=o,e[3]=r,e[4]=t,e[5]=d.cells,e[6]=d.cols,e[7]=n,e[8]=c,e[9]=l,e[10]=u}else u=e[10];let f;return e[19]!==i||e[20]!==u?(f=s.jsxs(s.Fragment,{children:[i,u]}),e[19]=i,e[20]=u,e[21]=f):f=e[21],f}function ut(){const a=w.c(2),e=B();let t;return a[0]!==e?(t=d=>Object.hasOwn(Oe,d)?se(d,e).label:d,a[0]=e,a[1]=t):t=a[1],t}function ft(a){const e=w.c(21),{section:t,onDrill:d}=a,o=B(),c=ut(),r=t.unit??void 0,l=t.layout==="stacked";let n;if(e[0]!==c||e[1]!==d||e[2]!==t.baseline||e[3]!==t.categories||e[4]!==t.keys||e[5]!==t.title||e[6]!==l||e[7]!==o||e[8]!==r){let i;e[10]!==t.baseline?(i=g=>g!==t.baseline,e[10]=t.baseline,e[11]=i):i=e[11];const u=t.keys.filter(i),f=g=>g===t.baseline?"var(--border)":E[u.indexOf(g)%E.length]??"",x=Object.fromEntries(t.keys.map(g=>[g,{label:c(g),color:f(g)}]));let m;e[12]!==t.categories?(m=t.categories.map(xt),e[12]=t.categories,e[13]=m):m=e[13];const h=m;let p;e[14]!==d||e[15]!==t.categories?(p=g=>{const C=t.categories[g];C&&L(d,C.drill,C.label)?.()},e[14]=d,e[15]=t.categories,e[16]=p):p=e[16];const j=p,y=t.categories.some(mt)&&!!d,v=l?Math.max(120,t.categories.length*44+32):220;let k;e[17]===Symbol.for("react.memo_cache_sentinel")?(k={fill:"var(--muted)",opacity:.4},e[17]=k):k=e[17];let $;e[18]!==c||e[19]!==r?($=s.jsx(J,{cursor:k,content:g=>{const{active:C,payload:T}=g;return s.jsx(ie,{active:C,payload:T,unit:r,nameOf:c})}}),e[18]=c,e[19]=r,e[20]=$):$=e[20];const S=$;n=s.jsx(_,{title:t.title,aside:s.jsx("ul",{className:"flex flex-wrap justify-end gap-x-3 gap-y-1",children:t.keys.map(g=>s.jsxs("li",{className:"text-meta flex items-center gap-1.5",children:[s.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:f(g)}}),c(g)]},g))}),children:h.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx(q,{role:"img","aria-label":t.title,className:"w-full",style:{height:v},config:x,children:l?s.jsxs(U,{data:h,layout:"vertical",margin:{left:0,right:8,top:0},children:[s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,horizontal:!1}),s.jsx(V,{type:"number",axisLine:!1,tickLine:!1,tick:A,tickFormatter:g=>X(g,r)}),s.jsx(P,{type:"category",dataKey:"label",axisLine:!1,tickLine:!1,tick:A,width:72}),S,t.keys.map((g,C)=>s.jsx(G,{dataKey:g,stackId:"all",fill:f(g),maxBarSize:22,radius:C===t.keys.length-1?[0,4,4,0]:0,animationDuration:300},g))]}):s.jsxs(U,{data:h,margin:{left:0,right:0,top:8},barGap:4,barCategoryGap:"28%",children:[s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),s.jsx(V,{dataKey:"label",axisLine:!1,tickLine:!1,tick:A,tickMargin:8}),s.jsx(P,{orientation:"right",axisLine:!1,tickLine:!1,tick:A,allowDecimals:r!==void 0,tickFormatter:g=>X(g,r),width:48}),S,t.keys.map(g=>s.jsx(G,{dataKey:g,fill:f(g),maxBarSize:32,radius:[4,4,0,0],animationDuration:300,className:O(y&&"cursor-pointer"),onClick:(C,T)=>j(T)},g))]})})}),e[0]=c,e[1]=d,e[2]=t.baseline,e[3]=t.categories,e[4]=t.keys,e[5]=t.title,e[6]=l,e[7]=o,e[8]=r,e[9]=n}else n=e[9];return n}function mt(a){return a.drill}function xt(a){return{label:a.label,...a.values}}function Tt(a){return a.kind==="funnel"||a.kind==="bars"?"half":"full"}function It(a){const e=w.c(27),{section:t,threadLinks:d,showOrg:o,taskHref:c,range:r,onDrill:l}=a;switch(t.kind){case"stat":{let n;return e[0]!==l||e[1]!==t?(n=s.jsx(Re,{section:t,onDrill:l}),e[0]=l,e[1]=t,e[2]=n):n=e[2],n}case"series":{let n;return e[3]!==r||e[4]!==t?(n=s.jsx(Fe,{section:t,range:r}),e[3]=r,e[4]=t,e[5]=n):n=e[5],n}case"funnel":{let n;return e[6]!==l||e[7]!==t?(n=s.jsx(Ue,{section:t,onDrill:l}),e[6]=l,e[7]=t,e[8]=n):n=e[8],n}case"bars":{let n;return e[9]!==l||e[10]!==t?(n=s.jsx(Ge,{section:t,onDrill:l}),e[9]=l,e[10]=t,e[11]=n):n=e[11],n}case"breakdown":{let n;return e[12]!==l||e[13]!==t?(n=s.jsx(lt,{section:t,onDrill:l}),e[12]=l,e[13]=t,e[14]=n):n=e[14],n}case"matrix":{let n;return e[15]!==l||e[16]!==t?(n=s.jsx(it,{section:t,onDrill:l}),e[15]=l,e[16]=t,e[17]=n):n=e[17],n}case"categories":{let n;return e[18]!==l||e[19]!==t?(n=s.jsx(ft,{section:t,onDrill:l}),e[18]=l,e[19]=t,e[20]=n):n=e[20],n}case"table":{let n;return e[21]!==l||e[22]!==t||e[23]!==o||e[24]!==c||e[25]!==d?(n=s.jsx(We,{section:t,threadLinks:d,showOrg:o,taskHref:c,onDrill:l}),e[21]=l,e[22]=t,e[23]=o,e[24]=c,e[25]=d,e[26]=n):n=e[26],n}default:return t}}export{Ot as D,It as S,Tt as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as o,j as r}from"./index-Bm9FTdjr.js";import{O as e}from"./api-keys-JMxYvHms.js";import{R as m}from"./require-capability-Dm4XTD9Y.js";import"./AlertCircle-B5gBB9h_.js";import"./Copy01-CdRMK9o7.js";import"./Key01-DcSonP-G.js";import"./Plus-XYNDZJ4s.js";import"./Trash01-DZ8laRwu.js";import"./alert-dialog-BXEG2ySJ.js";import"./label-BL2W0Pcn.js";import"./use-mcp-client-Dh_4AZgb.js";import"./auth-Dwu4WH32.js";import"./access-gate-Cu8JZecz.js";import"./capability-load-error-yZzl8b80.js";function d(){const t=o.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(m,{capability:"api-keys:manage",area:"api-keys",children:r.jsx(e,{})}),t[0]=i):i=t[0],i}export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as A,a2 as Q,J as R,K as Y,m as ce,o as Z,e as U,j as i,fZ as de,b as F,r as O,et as me,ff as J,B as v,t as q,v as V,aK as W,s as X,I as ee,w as te,q as se,D as ie}from"./index-Bm9FTdjr.js";import{i as fe}from"./AlertCircle-B5gBB9h_.js";import{a as ue}from"./Copy01-CdRMK9o7.js";import{i as ne}from"./Key01-DcSonP-G.js";import{s as le}from"./Plus-XYNDZJ4s.js";import{s as ge}from"./Trash01-DZ8laRwu.js";import{f as pe,e as ye,b as xe,A as he,a as je,d as Ke,c as Ce,g as De}from"./alert-dialog-BXEG2ySJ.js";import{L as be}from"./label-BL2W0Pcn.js";import{u as H}from"./use-mcp-client-Dh_4AZgb.js";function M(t,e){if(t?.isError)throw new Error(t.content?.[0]?.text??e);if(!t.structuredContent)throw new Error(e);return t.structuredContent}function Ae(t){const e=A.c(11),{org:a}=Q();let r;e[0]!==a.id||e[1]!==a.slug?(r={connectionId:R,orgId:a.id,orgSlug:a.slug},e[0]=a.id,e[1]=a.slug,e[2]=r):r=e[2];const l=H(r);let s;e[3]!==a.id?(s=Y.apiKeysList(a.id),e[3]=a.id,e[4]=s):s=e[4];let n;e[5]!==l?(n=async()=>{const d=await l.callTool({name:"API_KEY_LIST",arguments:{}});return M(d,"Failed to list API keys").items},e[5]=l,e[6]=n):n=e[6];const c=t?.enabled??!0;let o;return e[7]!==s||e[8]!==n||e[9]!==c?(o={queryKey:s,queryFn:n,staleTime:3e4,enabled:c},e[7]=s,e[8]=n,e[9]=c,e[10]=o):o=e[10],ce(o)}function Se(){const t=A.c(11),{org:e}=Q();let a;t[0]!==e.id||t[1]!==e.slug?(a={connectionId:R,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=a):a=t[2];const r=H(a),l=Z();let s;t[3]!==r?(s=async o=>{const d=await r.callTool({name:"API_KEY_CREATE",arguments:{name:o.name,permissions:o.permissions??{"*":["*"]}}});return M(d,"Failed to create API key")},t[3]=r,t[4]=s):s=t[4];let n;t[5]!==e.id||t[6]!==l?(n=()=>{l.invalidateQueries({queryKey:Y.apiKeysList(e.id)})},t[5]=e.id,t[6]=l,t[7]=n):n=t[7];let c;return t[8]!==s||t[9]!==n?(c={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=c):c=t[10],U(c)}function ve(){const t=A.c(11),{org:e}=Q();let a;t[0]!==e.id||t[1]!==e.slug?(a={connectionId:R,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=a):a=t[2];const r=H(a),l=Z();let s;t[3]!==r?(s=async o=>{const d=await r.callTool({name:"API_KEY_DELETE",arguments:{keyId:o}});return M(d,"Failed to delete API key")},t[3]=r,t[4]=s):s=t[4];let n;t[5]!==e.id||t[6]!==l?(n=()=>{l.invalidateQueries({queryKey:Y.apiKeysList(e.id)})},t[5]=e.id,t[6]=l,t[7]=n):n=t[7];let c;return t[8]!==s||t[9]!==n?(c={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=c):c=t[10],U(c)}function ae(t){const e=A.c(6),{error:a}=t,r=F();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(fe,{size:16}),e[0]=l):l=e[0];let s;e[1]!==a.message||e[2]!==r?(s=r("settings.apiKeys.failedToLoadError",{error:a.message}),e[1]=a.message,e[2]=r,e[3]=s):s=e[3];let n;return e[4]!==s?(n=i.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[l,i.jsx("span",{className:"text-sm font-medium",children:s})]}),e[4]=s,e[5]=n):n=e[5],n}function Ne(t){const e=A.c(20),{apiKey:a,onDelete:r}=t,l=F();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:i.jsx(ne,{size:16,className:"text-muted-foreground"})}),e[0]=s):s=e[0];let n;e[1]!==a.name?(n=i.jsx("span",{className:"font-medium text-sm truncate block",children:a.name}),e[1]=a.name,e[2]=n):n=e[2];let c;e[3]!==a.createdAt||e[4]!==l?(c=l("settings.apiKeys.createdAt",{date:new Date(a.createdAt).toLocaleDateString()}),e[3]=a.createdAt,e[4]=l,e[5]=c):c=e[5];let o;e[6]!==c?(o=i.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:c}),e[6]=c,e[7]=o):o=e[7];let d;e[8]!==n||e[9]!==o?(d=i.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s,i.jsxs("div",{className:"min-w-0",children:[n,o]})]}),e[8]=n,e[9]=o,e[10]=d):d=e[10];let m;e[11]!==l?(m=l("settings.apiKeys.deleteKey"),e[11]=l,e[12]=m):m=e[12];let u;e[13]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(ge,{size:14}),e[13]=u):u=e[13];let g;e[14]!==r||e[15]!==m?(g=i.jsx(v,{variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-destructive shrink-0",onClick:r,"aria-label":m,children:u}),e[14]=r,e[15]=m,e[16]=g):g=e[16];let f;return e[17]!==d||e[18]!==g?(f=i.jsxs("li",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[d,g]}),e[17]=d,e[18]=g,e[19]=f):f=e[19],f}function we(t){const e=A.c(21),{onCreate:a}=t,r=F();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:i.jsx(ne,{size:20,className:"text-muted-foreground"})}),e[0]=l):l=e[0];let s;e[1]!==r?(s=r("settings.apiKeys.emptyTitle"),e[1]=r,e[2]=s):s=e[2];let n;e[3]!==s?(n=i.jsx("p",{className:"font-medium text-sm",children:s}),e[3]=s,e[4]=n):n=e[4];let c;e[5]!==r?(c=r("settings.apiKeys.emptyDescription"),e[5]=r,e[6]=c):c=e[6];let o;e[7]!==c?(o=i.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:c}),e[7]=c,e[8]=o):o=e[8];let d;e[9]!==n||e[10]!==o?(d=i.jsxs("div",{children:[n,o]}),e[9]=n,e[10]=o,e[11]=d):d=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(le,{size:14}),e[12]=m):m=e[12];let u;e[13]!==r?(u=r("settings.apiKeys.newKey"),e[13]=r,e[14]=u):u=e[14];let g;e[15]!==a||e[16]!==u?(g=i.jsxs(v,{onClick:a,size:"sm",className:"mt-2",children:[m,u]}),e[15]=a,e[16]=u,e[17]=g):g=e[17];let f;return e[18]!==d||e[19]!==g?(f=i.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[l,d,g]}),e[18]=d,e[19]=g,e[20]=f):f=e[20],f}function _e(t){const e=A.c(40),{createdKey:a,onClose:r}=t,l=F(),s=a!==null;let n;e[0]!==r?(n=S=>!S&&r(),e[0]=r,e[1]=n):n=e[1];let c;e[2]!==l?(c=l("settings.apiKeys.createdTitle"),e[2]=l,e[3]=c):c=e[3];let o;e[4]!==c?(o=i.jsx(V,{children:c}),e[4]=c,e[5]=o):o=e[5];let d;e[6]!==l?(d=l("settings.apiKeys.createdDescription"),e[6]=l,e[7]=d):d=e[7];let m;e[8]!==d?(m=i.jsx(W,{children:d}),e[8]=d,e[9]=m):m=e[9];let u;e[10]!==o||e[11]!==m?(u=i.jsxs(X,{children:[o,m]}),e[10]=o,e[11]=m,e[12]=u):u=e[12];const g=a?.key??"";let f;e[13]!==g?(f=i.jsx(ee,{readOnly:!0,value:g,className:"font-mono text-xs"}),e[13]=g,e[14]=f):f=e[14];let p;e[15]!==a||e[16]!==l?(p=()=>{a&&(navigator.clipboard?.writeText(a.key),q.success(l("settings.apiKeys.copied")))},e[15]=a,e[16]=l,e[17]=p):p=e[17];let y;e[18]!==l?(y=l("settings.apiKeys.copyKey"),e[18]=l,e[19]=y):y=e[19];let C;e[20]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx(ue,{size:14}),e[20]=C):C=e[20];let x;e[21]!==p||e[22]!==y?(x=i.jsx(v,{type:"button",variant:"outline",size:"icon",onClick:p,"aria-label":y,children:C}),e[21]=p,e[22]=y,e[23]=x):x=e[23];let h;e[24]!==x||e[25]!==f?(h=i.jsxs("div",{className:"flex items-center gap-2",children:[f,x]}),e[24]=x,e[25]=f,e[26]=h):h=e[26];let j;e[27]!==l?(j=l("settings.apiKeys.done"),e[27]=l,e[28]=j):j=e[28];let K;e[29]!==r||e[30]!==j?(K=i.jsx(te,{children:i.jsx(v,{onClick:r,children:j})}),e[29]=r,e[30]=j,e[31]=K):K=e[31];let D;e[32]!==h||e[33]!==K||e[34]!==u?(D=i.jsxs(se,{className:"sm:max-w-lg",children:[u,h,K]}),e[32]=h,e[33]=K,e[34]=u,e[35]=D):D=e[35];let b;return e[36]!==s||e[37]!==D||e[38]!==n?(b=i.jsx(ie,{open:s,onOpenChange:n,children:D}),e[36]=s,e[37]=D,e[38]=n,e[39]=b):b=e[39],b}function Pe(t){const e=A.c(64),{open:a,onOpenChange:r,onCreated:l}=t,s=F(),[n,c]=O.useState(""),o=Se();let d;e[0]!==r?(d=function(){c(""),r(!1)},e[0]=r,e[1]=d):d=e[1];const m=d;let u;e[2]!==o||e[3]!==m||e[4]!==n||e[5]!==l||e[6]!==s?(u=async function(oe){if(oe.preventDefault(),!!n.trim())try{const B=await o.mutateAsync({name:n.trim()});m(),l(B)}catch(B){const G=B;q.error(G instanceof Error?G.message:s("settings.apiKeys.failedToCreateKey"))}},e[2]=o,e[3]=m,e[4]=n,e[5]=l,e[6]=s,e[7]=u):u=e[7];const g=u;let f;e[8]!==m||e[9]!==r?(f=z=>{z?r(z):m()},e[8]=m,e[9]=r,e[10]=f):f=e[10];let p;e[11]!==s?(p=s("settings.apiKeys.newKeyTitle"),e[11]=s,e[12]=p):p=e[12];let y;e[13]!==p?(y=i.jsx(V,{children:p}),e[13]=p,e[14]=y):y=e[14];let C;e[15]!==s?(C=s("settings.apiKeys.newKeyDescription"),e[15]=s,e[16]=C):C=e[16];let x;e[17]!==C?(x=i.jsx(W,{children:C}),e[17]=C,e[18]=x):x=e[18];let h;e[19]!==y||e[20]!==x?(h=i.jsxs(X,{children:[y,x]}),e[19]=y,e[20]=x,e[21]=h):h=e[21];let j;e[22]!==s?(j=s("settings.apiKeys.nameLabel"),e[22]=s,e[23]=j):j=e[23];let K;e[24]!==j?(K=i.jsx(be,{htmlFor:"api-key-name",children:j}),e[24]=j,e[25]=K):K=e[25];let D;e[26]===Symbol.for("react.memo_cache_sentinel")?(D=z=>c(z.target.value),e[26]=D):D=e[26];let b;e[27]!==s?(b=s("settings.apiKeys.namePlaceholder"),e[27]=s,e[28]=b):b=e[28];let S;e[29]!==n||e[30]!==b?(S=i.jsx(ee,{id:"api-key-name",value:n,onChange:D,placeholder:b,autoComplete:"off",required:!0}),e[29]=n,e[30]=b,e[31]=S):S=e[31];let N;e[32]!==K||e[33]!==S?(N=i.jsxs("div",{className:"space-y-1.5",children:[K,S]}),e[32]=K,e[33]=S,e[34]=N):N=e[34];const re=o.isPending;let w;e[35]!==s?(w=s("settings.apiKeys.cancelButton"),e[35]=s,e[36]=w):w=e[36];let _;e[37]!==o.isPending||e[38]!==m||e[39]!==w?(_=i.jsx(v,{type:"button",variant:"outline",onClick:m,disabled:re,children:w}),e[37]=o.isPending,e[38]=m,e[39]=w,e[40]=_):_=e[40];let P;e[41]!==o.isPending||e[42]!==n?(P=o.isPending||!n.trim(),e[41]=o.isPending,e[42]=n,e[43]=P):P=e[43];let E;e[44]!==o.isPending||e[45]!==s?(E=o.isPending?s("settings.apiKeys.creatingButton"):s("settings.apiKeys.createButton"),e[44]=o.isPending,e[45]=s,e[46]=E):E=e[46];let T;e[47]!==P||e[48]!==E?(T=i.jsx(v,{type:"submit",disabled:P,children:E}),e[47]=P,e[48]=E,e[49]=T):T=e[49];let k;e[50]!==_||e[51]!==T?(k=i.jsxs(te,{children:[_,T]}),e[50]=_,e[51]=T,e[52]=k):k=e[52];let I;e[53]!==g||e[54]!==N||e[55]!==k?(I=i.jsxs("form",{onSubmit:g,className:"space-y-4",children:[N,k]}),e[53]=g,e[54]=N,e[55]=k,e[56]=I):I=e[56];let L;e[57]!==I||e[58]!==h?(L=i.jsxs(se,{className:"sm:max-w-lg",children:[h,I]}),e[57]=I,e[58]=h,e[59]=L):L=e[59];let $;return e[60]!==a||e[61]!==L||e[62]!==f?($=i.jsx(ie,{open:a,onOpenChange:f,children:L}),e[60]=a,e[61]=L,e[62]=f,e[63]=$):$=e[63],$}function Ee(){const t=F(),{data:e,isLoading:a,error:r}=Ae(),l=ve(),[s,n]=O.useState(!1),[c,o]=O.useState(null),[d,m]=O.useState(null),u=e??[];async function g(){if(d)try{await l.mutateAsync(d.id),q.success(t("settings.apiKeys.keyDeleted",{name:d.name}))}catch(f){q.error(f instanceof Error?f.message:t("settings.apiKeys.failedToDeleteKey"))}finally{m(null)}}return i.jsxs(me,{headerClassName:"px-0",title:t("settings.apiKeys.sectionTitle"),description:t("settings.apiKeys.sectionDescription"),actions:u.length>0?i.jsxs(v,{onClick:()=>n(!0),size:"sm",children:[i.jsx(le,{size:14}),t("settings.apiKeys.newKey")]}):void 0,children:[a?i.jsx(J,{className:"gap-0 overflow-hidden p-0",children:i.jsx("p",{className:"px-4 py-3 text-xs text-muted-foreground",children:t("settings.apiKeys.loading")})}):r&&u.length===0?i.jsx(ae,{error:r}):u.length===0?i.jsx(we,{onCreate:()=>n(!0)}):i.jsx(J,{className:"gap-0 overflow-hidden p-0",children:i.jsx("ul",{className:"divide-y divide-border",children:u.map(f=>i.jsx(Ne,{apiKey:f,onDelete:()=>m(f)},f.id))})}),i.jsx(Pe,{open:s,onOpenChange:n,onCreated:o}),i.jsx(_e,{createdKey:c,onClose:()=>o(null)}),i.jsx(pe,{open:d!==null,onOpenChange:f=>{f||m(null)},children:i.jsxs(ye,{children:[i.jsxs(xe,{children:[i.jsx(he,{children:t("settings.apiKeys.deleteTitle",{name:d?.name??""})}),i.jsx(je,{children:t("settings.apiKeys.deleteDescription")})]}),i.jsxs(Ke,{children:[i.jsx(Ce,{children:t("settings.apiKeys.cancelButton")}),i.jsx(De,{onClick:g,children:t("settings.apiKeys.deleteKey")})]})]})})]})}function Qe(){const t=A.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(de,{group:"connect",errorFallback:Te,children:i.jsx(Ee,{})}),t[0]=e):e=t[0],e}function Te(t){const{error:e}=t;return i.jsx(ae,{error:e??new Error("Failed to load API keys")})}export{Ee as A,Qe as O,Ae as a,Se as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as jt,b as Bt,r as E,j as o,at as _t,l as wt,h as Et,t as lt}from"./index-Bm9FTdjr.js";import{u as At}from"./chat-context-DJGYyGlB.js";import{S as Nt}from"./scroll-area-BT00diUA.js";import{u as Rt,A as Ct}from"./use-section-preview-base-DbQlCGNR.js";import{x as Kt}from"./claim-phase-copy-BnoHLlrM.js";import{j as Tt,u as Ft,C as Pt,av as Ot,D as Ut,d as $t,aw as It}from"./runnable-block-editor-xVvcrNA2.js";import{n as zt,r as Lt}from"./agent-site-editor-content-B64VGP55.js";import"./use-panel-navigate-A1obvdVI.js";import"./thread-route-mhniW_q8.js";import"./use-project-scope-BxCbtcTE.js";import"./repository-binding-D2wL-4Vr.js";import"./use-mcp-client-Dh_4AZgb.js";import"./auth-Dwu4WH32.js";import"./autosend-BaKgBZDQ.js";import"./thread-intent-DzHkd78g.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DmOqvBBq.js";import"./task-board-Bgw_xVJW.js";import"./schema-C_wSANSe.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-1iPDcTcf.js";import"./use-ai-providers-BP69qr77.js";import"./use-chat-navigation-BXZpM5MQ.js";import"./location-BjlyegC2.js";import"./use-organization-settings-xcc5-6DS.js";import"./index-BdQq_4o_.js";import"./UserSquare-CuRnLJZ6.js";import"./agent-icon-BewGjsar.js";import"./AlertCircle-B5gBB9h_.js";import"./Tool01-DQnW-zjg.js";import"./ArrowUp-CP6XCJnB.js";import"./ArrowLeft-B7455tPl.js";import"./LinkBroken01-BZFZ6N-h.js";import"./ShoppingBag01-Ci8H67G0.js";import"./ZoomOut-BggitXDv.js";import"./Building02-BZItaEYx.js";import"./CheckCircle-C3CiaCW4.js";import"./ChevronUp-nynZHATg.js";import"./ChevronSelectorVertical-DIPs2sw-.js";import"./Copy01-CdRMK9o7.js";import"./CreditCard01-DVQTLvKO.js";import"./DotsVertical-3XBYz4yU.js";import"./Image01-DdBetDCI.js";import"./Globe04-DoxNod_i.js";import"./SwitchHorizontal01-BHr8jCjb.js";import"./Key01-DcSonP-G.js";import"./Link01-3BacRGrf.js";import"./Monitor01-DU19-CHk.js";import"./Sun-D1Mdg8Cq.js";import"./Play-B7i_-ibU.js";import"./Plus-XYNDZJ4s.js";import"./SearchMd-BFitEH5z.js";import"./Trash01-DZ8laRwu.js";import"./Upload01-CrRTpeMX.js";import"./User01-9bZ-cKa7.js";import"./Users01-cUGZjxDe.js";import"./XClose-DjFCAP5F.js";import"./use-new-blocks-editor-nCMzaJ9Q.js";import"./section-preview-url-7zfngvgW.js";import"./input-BkQDO0Ef.js";import"./usage-stats-BihPbkIg.js";import"./tool-namespace-CYa7zzrf.js";import"./form-BCYpCYIL.js";import"./label-BL2W0Pcn.js";import"./utils-CVEq3hMx.js";import"./markdown-B3PJYX-4.js";import"./use-copy-B01v9eRq.js";import"./use-mobile-UYmsi-dp.js";import"./tooltip-XZmQWwgB.js";import"./index-D2iZ6syL.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-sHj7Q6Fp.js";import"./file-type-icon-DzYK4NqY.js";import"./shell-layout-Ckss0QqA.js";import"./avatar-BEl6nltF.js";import"./use-clock-tick-rPXqIJP8.js";import"./command-D2QlwSrW.js";import"./index-s6P2p4h7.js";import"./integration-icon-DoYtKqdf.js";import"./project-icon-D2vCEWQy.js";import"./new-project-dialog-C-thpPQ-.js";import"./repository-import-picker-DtM7QfYh.js";import"./use-navigate-to-agent-DDZo26Jw.js";import"./repository-picker-28zwGBgK.js";import"./useInfiniteQuery-vZqvTY4f.js";import"./infiniteQueryObserver-zxl9Rj5F.js";import"./collection-search-BC0JMMNp.js";import"./use-debounced-value-D5_QO1dT.js";import"./required-auth-layout-CbgA2xIU.js";import"./use-org-sso-DWtbATGD.js";import"./chat-draft-DbBgaLY_.js";import"./select-BVEgIanS.js";import"./tabs-CXsAC8nO.js";import"./use-deco-credits-DkZSWK0d.js";import"./toggle-group-5iPAspL-.js";import"./use-open-billing-url-C0JU6CzN.js";import"./index-CuOTEpMz.js";import"./checkbox-DmaIcPoL.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-jNB4XciF.js";import"./drawer-BPz4t5dt.js";import"./input-Bvc3OT4I.js";import"./suggestion-Bso4uBRF.js";import"./use-chat-layout-state-J-94EUwt.js";import"./use-file-configs-B8mqylSR.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-prompts-LJf01t7x.js";import"./use-org-fs-gQ0RuIPK.js";import"./question-004-sINsf4GQ.js";import"./use-members-DQe3FYGy.js";import"./use-org-auth-client-CPbs0OVW.js";import"./feature-paywall-CHcwEHRJ.js";import"./plan-ladder-BUDRjzbj.js";import"./add-connection-dialog-DBnkMFp9.js";import"./extract-connection-data-BTBLhbEe.js";import"./metadata-D72DunRR.js";import"./connection-BjzBHJVc.js";import"./url-slug-B-L2Z8me.js";import"./connection-card-BVD8Ppl9.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-bcNEcwC6.js";import"./use-connection-DUF3XC9E.js";import"./connection-form-helpers-5EXuPZ4G.js";import"./authenticate-and-persist-oauth-BEdNWkUl.js";import"./mcp-oauth-4gmyTyah.js";import"./mcp-oauth-BTa4N28L.js";import"./collection-tabs-DeQ7zbGh.js";import"./badge-DFdotQFQ.js";import"./use-infinite-scroll-DewChEmc.js";import"./useSuspenseInfiniteQuery-DdGuWYX3.js";import"./use-task-board-events-DHjlo-9e.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-DXTFiJNl.js";import"./collapsible-CgZ4-XuF.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BLT3VM-G.js";import"./types-2TlDAuAc.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-D-h-caij.js";import"./use-thread-outputs-7J4Ek_Zs.js";import"./utils-DAEMarMy.js";import"./monaco-editor-DANiMmsL.js";import"./editor-2jNHgdUN.js";import"./calendar-CT7cVD7N.js";import"./rich-text-link-control-CE4nCWAz.js";import"./switch-DZo6rAtc.js";import"./core.esm-Cvui6jds.js";import"./sortable.esm-DCsYtWcb.js";import"./combobox-DeXU4vSR.js";import"./alert-dialog-BXEG2ySJ.js";import"./sandbox-url-D3mC8qhT.js";import"./search-input-D-uP0R3f.js";import"./asset-utils-Euq8y8zU.js";import"./sandbox-git-api-C7JbVL7R.js";import"./agent-view-guard-CoiTTfLB.js";import"./use-main-panel-tabs-D7q-AygO.js";import"./use-mcp-tools-p8MJKmfB.js";import"./use-sandbox-events-CSN74_aC.js";import"./resolve-tab-icon-BEIojUgL.js";import"./use-task-metadata-DmWCG43J.js";import"./virtual-mcp-C54PVPPw.js";import"./feature-gate-Dhf-LwS1.js";import"./mustache-GMlXm0yl.js";import"./sandbox-lifecycle-context-BKjyczlw.js";import"./empty-state-D8iC8fkc.js";import"./empty-state-Zf0MeIMv.js";function Vt(c,t){const m=(c.title||c.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),i=/^[A-Za-z]/.test(m)&&m.length>0?m:"Section",s=zt(t,i);return{blockKey:s,data:{__resolveType:c.resolveType,name:s}}}function Xr(c){const t=jt.c(80),{orgSlug:m,virtualMcpId:i,branch:s,blockKey:a,block:x,meta:l,decofile:d,title:bt,excludeFields:M,schemaPending:ct,previewBaseUrl:dt}=c,Z=ct===void 0?!1:ct,H=dt===void 0?null:dt,G=At()?.taskId??null,p=Bt();let N;t[0]!==H||t[1]!==i?(N={virtualMcpId:i,sandboxUrl:H},t[0]=H,t[1]=i,t[2]=N):N=t[2];const h=Rt(N),v=typeof x?.__resolveType=="string"?x.__resolveType:"";let R;t[3]!==M||t[4]!==l||t[5]!==v?(R=Lt(v,l,M),t[3]=M,t[4]=l,t[5]=v,t[6]=R):R=t[6];const b=R;let C;t[7]!==b?(C=!!b&&Object.keys(b.properties??{}).length>0,t[7]=b,t[8]=C):C=t[8];const J=C,ut=bt??(x?Kt(a,x,l):a);let K;t[9]!==s||t[10]!==m||t[11]!==i?(K={orgSlug:m,virtualMcpId:i,branch:s},t[9]=s,t[10]=m,t[11]=i,t[12]=K):K=t[12];const{save:Q,flush:W,isPending:X}=Tt(K);let T;t[13]!==s||t[14]!==m||t[15]!==i?(T={orgSlug:m,virtualMcpId:i,branch:s},t[13]=s,t[14]=m,t[15]=i,t[16]=T):T=t[16];const S=Ft(T);let F;t[17]!==S||t[18]!==p?(F=$t((e,r)=>S.mutate({blockKey:e,data:r},{onError:n=>lt.error(p("sectionsEditor.sectionsEditor.saveFailed",{error:n.message}))})),t[17]=S,t[18]=p,t[19]=F):F=t[19];const Y=F,[vt,St]=E.useState(a),[tt,ft]=E.useState(null),[et,xt]=E.useState(0);let P;t[20]===Symbol.for("react.memo_cache_sentinel")?(P=[],t[20]=P):P=t[20];const[g,ht]=E.useState(P),[ot,u]=E.useState(!1),O=E.useRef(null);vt!==a&&(St(a),ft(null),xt(Dt),ht([]));let U;t[21]!==x?(U=x??{},t[21]=x,t[22]=U):U=t[22];const rt=U;let y;t[23]!==tt?(y=tt??{},t[23]=tt,t[24]=y):y=t[24];let $;t[25]!==rt||t[26]!==y?($={...rt,...y},t[25]=rt,t[26]=y,t[27]=$):$=t[27];const it=$;let I;t[28]!==a||t[29]!==v||t[30]!==Q?(I=e=>{const r=e;ft(r),Q(a,{...r,__resolveType:v})},t[28]=a,t[29]=v,t[30]=Q,t[31]=I):I=t[31];const mt=I;let z;t[32]===Symbol.for("react.memo_cache_sentinel")?(z=e=>{ht(e)},t[32]=z):z=t[32];const A=z;let L;t[33]!==d||t[34]!==W||t[35]!==S||t[36]!==p?(L=async(e,r)=>{try{const{blockKey:n,data:f}=Vt(e,d);await S.mutateAsync({blockKey:n,data:f}),lt.success(p("sandbox.appEditor.createdSection",{name:n})),r({__resolveType:n}),W()}catch(n){const f=n,kt=f instanceof Error?f.message:p("sandbox.appEditor.failedAddSection");throw lt.error(kt),f}},t[33]=d,t[34]=W,t[35]=S,t[36]=p,t[37]=L):L=t[37];const k=L;let V;t[38]!==u?(V=e=>{O.current=e.append,u(!0)},t[38]=u,t[39]=V):V=t[39];const st=V;let q;t[40]!==k||t[41]!==u?(q=async e=>{const r=O.current;if(r)try{await k(e,n=>{r(n),u(!1),O.current=null})}catch{}},t[40]=k,t[41]=u,t[42]=q):q=t[42];const pt=q,at=g.length>0?[ut,...g]:[],gt="flex h-full flex-col",yt="flex h-12 shrink-0 items-center justify-between border-b px-6",nt=at.length>0?o.jsx("nav",{"aria-label":p("sandbox.appEditor.editingBreadcrumb"),className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:at.map((e,r)=>{const n=r===at.length-1,f=Pt(e);return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[r>0&&o.jsx(_t,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>{A(r===0?[]:Ot(g,r)),xt(qt)},title:f,className:wt("min-w-0 truncate rounded-lg px-1 py-0.5 text-left transition-colors",n?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:f})]},`${f}-${r}`)})}):o.jsx("span",{className:"text-sm font-medium",children:ut});let j;t[43]!==X?(j=o.jsx(It,{isPending:X,isError:!1}),t[43]=X,t[44]=j):j=t[44];let B;t[45]!==nt||t[46]!==j?(B=o.jsxs("div",{className:yt,children:[nt,j]}),t[45]=nt,t[46]=j,t[47]=B):B=t[47];let _;t[48]!==a||t[49]!==s||t[50]!==g||t[51]!==d||t[52]!==it||t[53]!==et||t[54]!==k||t[55]!==A||t[56]!==mt||t[57]!==st||t[58]!==J||t[59]!==l||t[60]!==m||t[61]!==Y||t[62]!==b||t[63]!==Z||t[64]!==h||t[65]!==p||t[66]!==G||t[67]!==i?(_=o.jsx(Nt,{className:"min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-6 py-6",children:o.jsx("div",{className:"mx-auto max-w-xl",children:J?o.jsx(Ut,{schema:b,value:it,onChange:mt,basePath:"",breadcrumbPath:g,onBreadcrumbChange:A,decofile:d,meta:l,onSaveReferencedBlock:Y,previewBaseUrl:h,onAddSectionItem:k,onRequestAddSection:st,sandbox:{orgSlug:m,virtualMcpId:i,branch:s,threadId:G}},`${a}:${et}`):Z?o.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[o.jsx(Et,{className:"size-4"}),p("sandbox.appEditor.loadingSchema")]}):o.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:p("sandbox.appEditor.noEditableSchema")})})})}),t[48]=a,t[49]=s,t[50]=g,t[51]=d,t[52]=it,t[53]=et,t[54]=k,t[55]=A,t[56]=mt,t[57]=st,t[58]=J,t[59]=l,t[60]=m,t[61]=Y,t[62]=b,t[63]=Z,t[64]=h,t[65]=p,t[66]=G,t[67]=i,t[68]=_):_=t[68];let w;t[69]!==ot||t[70]!==d||t[71]!==pt||t[72]!==l||t[73]!==h||t[74]!==u?(w=h&&o.jsx(Ct,{open:ot,onOpenChange:e=>{u(e),e||(O.current=null)},meta:l,decofile:d,previewBaseUrl:h,onSelect:e=>{pt(e)}}),t[69]=ot,t[70]=d,t[71]=pt,t[72]=l,t[73]=h,t[74]=u,t[75]=w):w=t[75];let D;return t[76]!==B||t[77]!==_||t[78]!==w?(D=o.jsxs("div",{className:gt,children:[B,_,w]}),t[76]=B,t[77]=_,t[78]=w,t[79]=D):D=t[79],D}function qt(c){return c+1}function Dt(c){return c+1}export{Xr as AppEditor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as u,a2 as d,e as g,aa as m,K as I,o as O}from"./index-Bm9FTdjr.js";import{u as $}from"./useInfiniteQuery-vZqvTY4f.js";function T(e){const t=u.c(17),{org:s}=d(),c=m();let i,n,o,l;t[0]!==s.id||t[1]!==e.configId||t[2]!==e.imageOnly||t[3]!==e.search?(n=e.search?.trim()||void 0,i=e.imageOnly??!1,l=$,o=I.filePickerObjects(s.id,e.configId,n,i),t[0]=s.id,t[1]=e.configId,t[2]=e.imageOnly,t[3]=e.search,t[4]=i,t[5]=n,t[6]=o,t[7]=l):(i=t[4],n=t[5],o=t[6],l=t[7]);const r=e.enabled!==!1&&!!e.configId;let a;t[8]!==i||t[9]!==e.configId||t[10]!==n||t[11]!==c?(a=async y=>{const{pageParam:p}=y;return await c.call("FILE_OBJECTS_LIST",{configId:e.configId,cursor:p??void 0,search:n,imageOnly:i||void 0})},t[8]=i,t[9]=e.configId,t[10]=n,t[11]=c,t[12]=a):a=t[12];let f;return t[13]!==o||t[14]!==r||t[15]!==a?(f={queryKey:o,enabled:r,staleTime:3e4,initialPageParam:null,queryFn:a,getNextPageParam:h},t[13]=o,t[14]=r,t[15]=a,t[16]=f):f=t[16],l(f)}function h(e){return e.nextCursor??void 0}function E(){const e=u.c(2),{org:t}=d();let s;return e[0]!==t?(s={mutationFn:async c=>{const i=c.file.type||"application/octet-stream",n=await fetch(`/api/${encodeURIComponent(t.slug)}/file-configs/${encodeURIComponent(c.configId)}/upload?filename=${encodeURIComponent(c.file.name)}`,{method:"POST",headers:{"Content-Type":i},body:c.file});if(!n.ok){const o=await n.text().catch(x);let l=`${n.status} ${n.statusText}`;try{const r=JSON.parse(o);r.message&&(l=r.message)}catch{o&&(l=o.slice(0,200))}throw new Error(`Upload failed: ${l}`)}return await n.json()}},e[0]=t,e[1]=s):s=e[1],g(s)}function x(){return""}function F(){const e=u.c(8),{org:t}=d(),s=m(),c=O();let i;e[0]!==s?(i=l=>s.call("FILE_OBJECT_DELETE",l),e[0]=s,e[1]=i):i=e[1];let n;e[2]!==t||e[3]!==c?(n=(l,r)=>{c.invalidateQueries({queryKey:I.filePickerObjectsByConfig(t.id,r.configId)})},e[2]=t,e[3]=c,e[4]=n):n=e[4];let o;return e[5]!==i||e[6]!==n?(o={mutationFn:i,onSuccess:n},e[5]=i,e[6]=n,e[7]=o):o=e[7],g(o)}function w(e){return/\.(png|jpe?g|gif|webp|svg|avif|bmp)$/i.test(e)}function S(e){const t=e.lastIndexOf(".");return t<0||t===e.length-1?"file":e.slice(t+1).toLowerCase()}function v(e){const t=e.split("/");return t[t.length-1]??e}function _(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}export{E as a,v as b,F as c,S as e,_ as f,w as i,T as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a_ as $,a$ as v,b0 as W,b1 as H,b2 as D,b3 as y,b4 as V,b5 as x,b6 as b,b7 as q,b8 as j,b9 as N,ba as B,bb as Z,bc as F}from"./index-D_7jfHk6.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function Y(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function K(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Y(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Q(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function L(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=B.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=Z[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof $||n instanceof v)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof W)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await T(c,{fetchFn:i}),!o)try{o=await M(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new H(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(S),d=S}}const O=!e.redirectUrl;if(n!==void 0||O){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const k=await e.tokens();if(k?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:k.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof D)||l instanceof y))throw l}const C=e.state?await e.state():void 0,{authorizationUrl:z,codeVerifier:I}=await ue(c,{metadata:u,clientInformation:d,state:C,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(I),await e.redirectToAuthorization(z),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function M(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return q.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function E(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??b;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await E(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await E(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function T(e,{fetchFn:t=fetch,protocolVersion:n=b}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?V.parse(await o.json()):x.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await M(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await T(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await N(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function P(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=K(r,h);Q(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await L(u);return F.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=P(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=P(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await L(s);return j.parse(await s.json())}export{pe as U,T as a,_e as b,Ue as c,M as d,me as e};
|
|
1
|
+
import{ba as v,bb as $,bc as W,bd as H,be as D,bf as y,bg as V,bh as x,bi as E,bj as j,bk as q,bl as N,bm as B,bn as Z,bo as F}from"./index-Bm9FTdjr.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function Y(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function K(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Y(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Q(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function L(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=B.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=Z[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof v||n instanceof $)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof W)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await T(c,{fetchFn:i}),!o)try{o=await M(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new H(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(S),d=S}}const O=!e.redirectUrl;if(n!==void 0||O){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const k=await e.tokens();if(k?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:k.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof D)||l instanceof y))throw l}const C=e.state?await e.state():void 0,{authorizationUrl:z,codeVerifier:I}=await ue(c,{metadata:u,clientInformation:d,state:C,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(I),await e.redirectToAuthorization(z),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function M(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return j.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function b(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??E;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await b(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await b(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function T(e,{fetchFn:t=fetch,protocolVersion:n=E}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?V.parse(await o.json()):x.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await M(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await T(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await N(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function P(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=K(r,h);Q(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await L(u);return F.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=P(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=P(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await L(s);return q.parse(await s.json())}export{pe as U,T as a,_e as b,Ue as c,M as d,me as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,f as l,j as t,S as m,A as o,g as f,N as x}from"./index-
|
|
1
|
+
import{c as r,f as l,j as t,S as m,A as o,g as f,N as x}from"./index-Bm9FTdjr.js";function h(){const e=r.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(x,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function u(){const e=r.c(5);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=l(a);if(n==="accept-invitation"){let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(m,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(o,{pathname:"accept-invitation"})})}),e[1]=s):s=e[1];let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs(t.Fragment,{children:[s,t.jsx(f,{children:t.jsx(h,{})})]}),e[2]=i):i=e[2],i}let c;return e[3]!==n?(c=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(o,{pathname:n})}),e[3]=n,e[4]=c):c=e[4],c}export{u as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as $,$ as Ne,r as b,e as ae,y as M,j as t,l as f,B as X,I as G,c as Ie,b as Ce,h as Ue}from"./index-Bm9FTdjr.js";import{e as qe}from"./backoff-CrEUbyZT.js";import{d as De}from"./delay-CnY5UFtP.js";class Pe extends Error{constructor(e,o){super(`Retrying exceeded the maxAttempts (${o}).`),this.name="RetryError",this.cause=e}}async function ze(i,e){const{multiplier:o=2,maxTimeout:l=6e4,maxAttempts:v=5,minTimeout:g=1e3,jitter:r=1,isRetriable:u=()=>!0,signal:d}=e??{};if(!Number.isInteger(v)||v<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${v}`);if(!Number.isFinite(o)||o<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${o}`);if(Number.isNaN(l)||l<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${l}`);if(Number.isNaN(g)||g<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${g}`);if(g>l)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${g}', 'maxTimeout=${l}'`);if(Number.isNaN(r)||r<0||r>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${r}`);let P=0;for(;;){d?.throwIfAborted();try{return await i()}catch(A){if(!u(A))throw A;if(P+1>=v)throw new Pe(A,v);const O=qe(l,g,P,o,r);await De(O,d?{signal:d}:void 0)}P++}}const Ae={submitEmailPassword:({mode:i,email:e,password:o,name:l})=>i==="sign_up"?$.signUp.email({email:e,password:o,name:l||""}):$.signIn.email({email:e,password:o}),requestPasswordReset:({email:i,redirectTo:e})=>$.requestPasswordReset({email:i,redirectTo:e}),sendOtp:({email:i})=>$.emailOtp.sendVerificationOtp({email:i,type:"sign-in"}),submitOtp:({email:i,otp:e})=>$.signIn.emailOtp({email:i,otp:e}),socialSignIn:({provider:i,callbackURL:e})=>$.signIn.social({provider:i,callbackURL:e}),ssoSignIn:({providerId:i,callbackURL:e})=>$.signIn.sso({providerId:i,callbackURL:e}),onAuthenticated:i=>{window.location.href=i}},ie="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Be={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:i=>`Code sent to ${i}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:i=>`Continue with ${i}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Ve({redirectUrl:i,callbackUrl:e="/",title:o,subtitle:l,brand:v,copy:g,variant:r="default",allowedSocialProviders:u,allowPassword:d=!0,onAuthEvent:P,actions:A}){const{emailAndPassword:O,resetPassword:S,emailOtp:E,socialProviders:F}=Ne(),j={...Ae,...A},h=s=>{try{P?.(s)}catch{}},p=r==="compact",Z=u?F.providers.filter(s=>u.includes(s.name)):F.providers,ee=F.enabled&&Z.length>0,ne=O.enabled&&(d||!E.enabled&&!ee),te=F.enabled&&F.providers.length>0&&!ee&&!E.enabled&&!ne?F.providers:Z,I=F.enabled&&te.length>0,C=O.enabled&&(d||!E.enabled&&!I),[c,N]=b.useState(""),[_,x]=b.useState(""),[re,ge]=b.useState(""),[oe,le]=b.useState(""),[W,de]=b.useState(!1),[ce,_e]=b.useState(()=>E.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[y,U]=b.useState(""),[he,pe]=b.useState(!1),[ke,me]=b.useState(null),a={...Be,...g},Y=b.useId(),q=`${Y}-email`,D=`${Y}-email-error`,fe=`${Y}-name`,xe=`${Y}-password`,be=`${Y}-otp`,w=ce==="signUp",R=ce==="forgotPassword",k=ce==="emailOtp",J=ae({mutationFn:async({email:s,password:n,name:L})=>{try{const H=await j.submitEmailPassword({mode:w?"sign_up":"sign_in",email:s,password:n,name:L});if(H.error)throw new Error(H.error.message||(w?a.signUpFailed:a.signInFailed));return H}catch(H){throw H instanceof Error?H:new Error(a.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:w?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:w?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_password",mode:w?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),M(w?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),K=ae({mutationFn:async({email:s})=>{const n=await j.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(n.error)throw new Error(n.error.message||a.resetEmailFailed);return n},onSuccess:()=>{M("password_reset_requested"),pe(!0)},onError:s=>{M("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),z=ae({mutationFn:async({email:s})=>{const n=await j.sendOtp({email:s});if(n.error)throw new Error(n.error.message||a.otpSendFailed);return n},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),M("email_otp_sent"),de(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),M("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),B=ae({mutationFn:async({email:s,otp:n})=>{const L=await j.submitOtp({email:s,otp:n});if(L.error)throw new Error(L.error.message||a.invalidCode);return L},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),M("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),se=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),ue=()=>{c.trim()&&!se(c)&&U(a.invalidEmail)},Le=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_password",mode:w?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}J.mutate({email:c,password:_,name:re})},Oe=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail);return}K.mutate({email:c})},Re=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}z.mutate({email:c})},Te=s=>{s.preventDefault(),B.mutate({email:c,otp:oe})},V=s=>n=>{s(n.target.value),ve&&J.reset(),we&&K.reset(),ye&&(z.reset(),B.reset()),s===N&&y&&U("")},Q=s=>{_e(s),ge(""),le(""),de(!1),U(""),pe(!1),me(null),J.reset(),K.reset(),z.reset(),B.reset()},m=J.isPending||K.isPending||z.isPending||B.isPending,ve=J.error,we=K.error,ye=z.error||B.error,T=w?c.trim()&&_.trim()&&re.trim():R?c.trim():k?W?oe.trim():c.trim():c.trim()&&_.trim(),$e=s=>{if(!s)return null;const n=s.message.toLowerCase();return n.includes("unauthorized")||n.includes("401")?a.invalidEmailOrPassword:n.includes("already exists")||n.includes("409")?a.accountExists:n.includes("network")||n.includes("fetch")?a.networkError:n.includes("rate limit")||n.includes("429")?a.tooManyAttempts:n.includes("invalid")&&n.includes("otp")?a.invalidOrExpiredCode:s.message||a.genericError},Ee=ve||we||ye||ke,Me=async s=>{h({type:"started",method:"social",provider:s}),me(null);try{const n=await j.socialSignIn({provider:s,callbackURL:i??e});if(n.error)throw new Error(n.error.message||a.authenticationFailed)}catch(n){const L=n instanceof Error?n.message:String(n);h({type:"failed",method:"social",provider:s,stage:"redirect",error:L}),M("social_signin_failed",{provider:s,error:L}),me(n instanceof Error?n:new Error(L))}},We=R?a.resetPasswordTitle:k&&W?a.verificationCodeTitle:o??a.welcomeTitle,Se=R?a.resetPasswordSubtitle:k&&W?a.codeSentTo(c):l===void 0?a.defaultSubtitle:l;return t.jsxs("div",{className:f("grid w-full",p?"gap-5":"gap-10"),children:[v??t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:f("font-medium",p?"text-xl leading-7":"text-2xl leading-8"),children:We}),Se&&t.jsx("p",{className:f("text-muted-foreground",p?"text-sm leading-5":"text-base leading-6"),children:Se})]}),Ee&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:$e(Ee)}),he&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:a.resetEmailSent}),!R&&!(k&&W)&&I&&t.jsx("div",{className:"grid gap-2",children:te.map(s=>t.jsxs(X,{type:"button",variant:"outline",size:p?"lg":"xl",disabled:m,onClick:()=>{Me(s.name)},className:f("flex w-full items-center justify-center gap-3 bg-background px-3 text-sm font-medium text-foreground card-shadow transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50 rounded-lg",p?"h-11":"h-12"),children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:f("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),a.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!R&&!(k&&W)&&I&&(C||E.enabled)&&t.jsxs("div",{className:f("flex items-center gap-2.5",p?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:f("text-muted-foreground",p?"text-sm":"text-base"),children:a.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),k&&E.enabled&&t.jsx(t.Fragment,{children:W?t.jsxs("form",{onSubmit:Te,className:f("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:be,className:f("text-sm font-medium text-foreground",p&&"sr-only"),children:a.verificationCodeLabel}),t.jsx(G,{id:be,type:"text",placeholder:a.enterCodePlaceholder,value:oe,onChange:V(le),required:!0,disabled:m,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:f(p?"sm:w-auto":"w-full"),children:m?a.verifying:a.verify}),t.jsx("button",{type:"button",onClick:()=>{de(!1),le(""),z.reset(),B.reset()},disabled:m,className:f("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",p&&"sm:col-span-2"),children:a.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Re,className:f("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:q,className:f("text-sm font-medium text-foreground",p&&"sr-only"),children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:a.emailPlaceholder,value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11 rounded-lg"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive",children:y})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:f(p?"sm:w-auto":"w-full"),children:m?a.sending:a.sendCode})]})}),R&&C&&!he&&t.jsxs("form",{onSubmit:Oe,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11 rounded-lg"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsx(X,{type:"submit",disabled:m||!T,className:"w-full font-semibold",size:"xl",children:m?a.sending:a.sendResetLink})]}),!R&&!k&&C&&t.jsxs("form",{onSubmit:Le,className:"grid gap-5",children:[w&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:fe,className:"block text-sm font-medium text-foreground mb-2",children:a.nameLabel}),t.jsx(G,{id:fe,type:"text",placeholder:a.namePlaceholder,value:re,onChange:V(ge),required:!0,disabled:m,autoComplete:"name",className:"h-11 rounded-lg"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11 rounded-lg"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:xe,className:"block text-sm font-medium text-foreground",children:a.passwordLabel}),!w&&S.enabled&&t.jsx("button",{type:"button",onClick:()=>Q("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:a.forgotPassword})]}),t.jsx(G,{id:xe,type:"password",placeholder:"••••••••",value:_,onChange:V(x),required:!0,disabled:m,autoComplete:w?"new-password":"current-password",className:"h-11 rounded-lg"})]}),t.jsx("div",{className:f("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",T?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:f("p-1",!T&&"pointer-events-none"),children:t.jsx(X,{type:"submit",disabled:m||!T,className:f("w-full font-semibold"),size:"xl","aria-hidden":!T,children:m?w?a.creatingAccount:a.signingIn:a.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:R?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.backToSignIn}):k&&C?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.signInWithPassword}):!k&&C?t.jsxs(t.Fragment,{children:[w?a.alreadyHaveAccount:a.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>Q(w?"signIn":"signUp"),disabled:m,className:ie,children:w?a.signIn:a.signUp}),E.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>Q("emailOtp"),disabled:m,className:ie,children:a.signInWithEmailCode})]})]}):null})]})}class je{constructor(e){this.response=e}response}function He(i){return i.startsWith("/")&&!i.startsWith("//")?i:"/"}function Ge({redirectTo:i,onAuthEvent:e}){const o=Ce(),[l,v]=b.useState(null),g=b.useEffectEvent(r=>{try{e?.(r)}catch{}});return b.useEffect(()=>{let r=!1;return(async()=>{g({type:"started",method:"local"});try{let u;try{u=await ze(async()=>{const d=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(d.status>=500)throw new je(d);return d},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(d){if(d instanceof Pe&&d.cause instanceof je)u=d.cause.response;else throw d}if(!u.ok){const d=await u.json().catch(()=>({}));throw new Error(d?.error||o("common.authEntry.autoLoginFailed"))}r||(g({type:"succeeded",method:"local"}),window.location.href=He(i))}catch(u){r||(g({type:"failed",method:"local",stage:"authenticate",error:u instanceof Error?u.message:String(u)}),v(u instanceof Error?u.message:o("common.authEntry.autoLoginFailed")))}})(),()=>{r=!0}},[i]),l?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:o("common.authEntry.autoLoginFailedWithError",{error:l})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:o("common.authEntry.tryRestartingServer")})]})}):t.jsx(Fe,{})}function Fe(){const i=Ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(Ue,{size:"lg",label:"Signing in"})}),i[0]=e):e=i[0],e}function Ye({callbackURL:i,providerId:e,ssoSignIn:o,onAuthEvent:l}){const v=b.useEffectEvent(r=>{try{l?.(r)}catch{}}),g=b.useEffectEvent(o);return b.useEffect(()=>{(async()=>{v({type:"started",method:"sso",provider:e});try{const r=await g({providerId:e,callbackURL:i});if(r.error)throw new Error(r.error.message||"SSO redirect failed")}catch(r){v({type:"failed",method:"sso",provider:e,stage:"redirect",error:r instanceof Error?r.message:String(r)})}})()},[e,i]),t.jsx(Fe,{})}function Xe(i){const e=Ie.c(25),{callbackUrl:o,redirectUrl:l,allowAutoLogin:v,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,onAuthenticated:E}=i,F=v===void 0?!0:v,j=Ce(),{sso:h,emailAndPassword:p,magicLink:Z,emailOtp:ee,socialProviders:ne,localMode:te}=Ne(),I=l||o;let C;e[0]!==E?(C=E?{onAuthenticated:E}:void 0,e[0]=E,e[1]=C):C=e[1];const c=C;if(te&&F){let x;return e[2]!==S||e[3]!==I?(x=t.jsx(Ge,{redirectTo:I,onAuthEvent:S}),e[2]=S,e[3]=I,e[4]=x):x=e[4],x}if(h.enabled){let x;return e[5]!==S||e[6]!==I||e[7]!==h.providerId?(x=t.jsx(Ye,{callbackURL:I,providerId:h.providerId,ssoSignIn:Ae.ssoSignIn,onAuthEvent:S}),e[5]=S,e[6]=I,e[7]=h.providerId,e[8]=x):x=e[8],x}if(p.enabled||Z.enabled||ee.enabled||ne.enabled){let x;return e[9]!==O||e[10]!==A||e[11]!==u||e[12]!==o||e[13]!==c||e[14]!==d||e[15]!==S||e[16]!==l||e[17]!==r||e[18]!==g||e[19]!==P?(x=t.jsx(Ve,{redirectUrl:l,callbackUrl:o,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,actions:c}),e[9]=O,e[10]=A,e[11]=u,e[12]=o,e[13]=c,e[14]=d,e[15]=S,e[16]=l,e[17]=r,e[18]=g,e[19]=P,e[20]=x):x=e[20],x}let N;e[21]!==j?(N=j("common.authEntry.noLoginOptions"),e[21]=j,e[22]=N):N=e[22];let _;return e[23]!==N?(_=t.jsx("div",{children:N}),e[23]=N,e[24]=_):_=e[24],_}export{Fe as A,Xe as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,l as p,j as f}from"./index-
|
|
1
|
+
import{c as g,l as p,j as f}from"./index-Bm9FTdjr.js";function w(b){const e=g.c(20),{children:m,visual:r,align:j}=b,d=(j===void 0?"center":j)==="fill",x=d?"min-h-[100dvh] md:min-h-screen":"min-h-screen";let l;e[0]!==x?(l=p("flex w-full",x),e[0]=x,e[1]=l):l=e[1];const h=d?"h-[100dvh] justify-start pt-4 pb-8 md:h-auto":"justify-center py-6";let t;e[2]!==h?(t=p("flex flex-1 flex-col items-center bg-sidebar px-6 md:justify-center md:px-10 md:py-10",h),e[2]=h,e[3]=t):t=e[3];const u=d&&"flex min-h-0 flex-1 flex-col md:block md:flex-none";let s;e[4]!==u?(s=p("w-full max-w-[440px]",u),e[4]=u,e[5]=s):s=e[5];let i;e[6]!==m||e[7]!==s?(i=f.jsx("div",{className:s,children:m}),e[6]=m,e[7]=s,e[8]=i):i=e[8];let n;e[9]!==t||e[10]!==i?(n=f.jsx("section",{className:t,children:i}),e[9]=t,e[10]=i,e[11]=n):n=e[11];let c;e[12]!==r?(c=r??f.jsx("img",{src:"/onboarding-placeholder.png",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e[12]=r,e[13]=c):c=e[13];let a;e[14]!==c?(a=f.jsx("aside",{className:"relative hidden flex-1 overflow-hidden bg-muted md:flex",children:c}),e[14]=c,e[15]=a):a=e[15];let o;return e[16]!==a||e[17]!==l||e[18]!==n?(o=f.jsxs("main",{className:l,children:[n,a]}),e[16]=a,e[17]=l,e[18]=n,e[19]=o):o=e[19],o}export{w as A};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as u}from"./mcp-oauth-4gmyTyah.js";import{i as p}from"./mcp-oauth-BTa4N28L.js";async function k({connectionId:n,orgId:s,orgSlug:o,persistFallback:r}){const c=new URL(`/api/${o}/mcp/${n}`,window.location.origin),i=await p({url:c.href,token:null,orgId:s});if(!i.supportsOAuth||i.isAuthenticated)return{ran:!1,ok:!0,error:null};const{token:t,tokenInfo:e,error:a}=await u({connectionId:n,orgSlug:o,scope:"offline_access"});if(a||!t)return{ran:!0,ok:!1,error:a??"no token received"};if(e)try{(await fetch(`/api/${o}/connections/${n}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:e.accessToken,refreshToken:e.refreshToken,expiresIn:e.expiresIn,scope:e.scope,clientId:e.clientId,clientSecret:e.clientSecret,tokenEndpoint:e.tokenEndpoint})})).ok||await r(t)}catch{await r(t)}else await r(t);return{ran:!0,ok:!0,error:null}}export{k as a};
|
package/dist/client/assets/{automation-list-row-C9YrfX3o.js → automation-list-row-Du4blVfm.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as
|
|
1
|
+
import{c as W,b as Y,r as ee,l as Q,j as t,T as te,B as se,X as ie,V as ne,U as oe}from"./index-Bm9FTdjr.js";import{B as ae}from"./badge-DFdotQFQ.js";import{A as re,a as le,b as ce,c as me,g as ue,d as de,e as fe,f as ge}from"./alert-dialog-BXEG2ySJ.js";import{A as xe,M as pe}from"./agent-icon-BewGjsar.js";import{i as he}from"./DotsVertical-3XBYz4yU.js";import{s as je}from"./Trash01-DZ8laRwu.js";import{i as ve}from"./ZoomOut-BggitXDv.js";import{c as we}from"./repository-binding-D2wL-4Vr.js";import{a as _e}from"./use-automations-Biu6cV7d.js";function Be(c){const e=W.c(89),{automation:s,showAgent:a,onClick:n}=c,i=Y(),{remove:o}=_e(),[l,H]=ee.useState(!1),r=we(a?s.virtual_mcp_id:void 0);let F;e[0]!==s.id||e[1]!==o?(F=()=>{o.mutate(s.id),H(!1)},e[0]=s.id,e[1]=o,e[2]=F):F=e[2];const U=F;let $;e[3]!==n?($=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=$):$=e[4];const X=$,q=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==q?(u=Q("inline-block size-2 rounded-full shrink-0",q),e[5]=q,e[6]=u):u=e[6];const G=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==G?(d=i(G),e[7]=i,e[8]=G,e[9]=d):d=e[9];let f;e[10]!==u||e[11]!==d?(f=t.jsx("span",{className:u,"aria-label":d}),e[10]=u,e[11]=d,e[12]=f):f=e[12];let g;e[13]!==r?.icon||e[14]!==r?.title||e[15]!==s.name||e[16]!==a?(g=a&&t.jsx(xe,{icon:r?.icon??null,name:r?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=r?.icon,e[14]=r?.title,e[15]=s.name,e[16]=a,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==s.system_key||e[21]!==i?(p=s.system_key&&t.jsx(ae,{variant:"muted",children:i("automations.builtin.badge")}),e[20]=s.system_key,e[21]=i,e[22]=p):p=e[22];let h;e[23]!==r||e[24]!==a?(h=a&&r&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",r.title]}),e[23]=r,e[24]=a,e[25]=h):h=e[25];let j;e[26]!==p||e[27]!==h||e[28]!==x?(j=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p,h]}),e[26]=p,e[27]=h,e[28]=x,e[29]=j):j=e[29];let v;e[30]!==s.nearest_next_run_at||e[31]!==s.trigger_count?(v=t.jsx(Ae,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[30]=s.nearest_next_run_at,e[31]=s.trigger_count,e[32]=v):v=e[32];let w;e[33]!==j||e[34]!==v?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[j,v]}),e[33]=j,e[34]=v,e[35]=w):w=e[35];const J=s.system_key&&"invisible";let _;e[36]!==J?(_=Q("shrink-0",J),e[36]=J,e[37]=_):_=e[37];let K;e[38]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(te,{asChild:!0,children:t.jsx(se,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(he,{size:16})})}),e[38]=K):K=e[38];let O,I;e[39]===Symbol.for("react.memo_cache_sentinel")?(O=m=>{m.stopPropagation(),H(!0)},I=t.jsx(je,{size:16}),e[39]=O,e[40]=I):(O=e[39],I=e[40]);let b;e[41]!==i?(b=i("automations.automationListRow.delete"),e[41]=i,e[42]=b):b=e[42];let y;e[43]!==b?(y=t.jsxs(ie,{children:[K,t.jsx(ne,{align:"end",children:t.jsxs(oe,{variant:"destructive",onClick:O,children:[I,b]})})]}),e[43]=b,e[44]=y):y=e[44];let A;e[45]!==_||e[46]!==y?(A=t.jsx("div",{onClick:ye,onKeyDown:be,role:"presentation",className:_,children:y}),e[45]=_,e[46]=y,e[47]=A):A=e[47];let D;e[48]!==X||e[49]!==n||e[50]!==w||e[51]!==A||e[52]!==f||e[53]!==g?(D=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:X,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[f,g,w,A]}),e[48]=X,e[49]=n,e[50]=w,e[51]=A,e[52]=f,e[53]=g,e[54]=D):D=e[54];let N;e[55]!==i?(N=i("automations.automationListRow.deleteTitle"),e[55]=i,e[56]=N):N=e[56];let k;e[57]!==N?(k=t.jsx(re,{children:N}),e[57]=N,e[58]=k):k=e[58];let R;e[59]!==s.name||e[60]!==i?(R=i("automations.automationListRow.deleteDescription",{name:s.name}),e[59]=s.name,e[60]=i,e[61]=R):R=e[61];let C;e[62]!==R?(C=t.jsx(le,{children:R}),e[62]=R,e[63]=C):C=e[63];let L;e[64]!==k||e[65]!==C?(L=t.jsxs(ce,{children:[k,C]}),e[64]=k,e[65]=C,e[66]=L):L=e[66];let T;e[67]!==i?(T=i("automations.automationListRow.cancel"),e[67]=i,e[68]=T):T=e[68];let P;e[69]!==T?(P=t.jsx(me,{children:T}),e[69]=T,e[70]=P):P=e[70];const Z=o.isPending;let z;e[71]!==i?(z=i("automations.automationListRow.deleteButton"),e[71]=i,e[72]=z):z=e[72];let B;e[73]!==U||e[74]!==o.isPending||e[75]!==z?(B=t.jsx(ue,{onClick:U,disabled:Z,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:z}),e[73]=U,e[74]=o.isPending,e[75]=z,e[76]=B):B=e[76];let M;e[77]!==P||e[78]!==B?(M=t.jsxs(de,{children:[P,B]}),e[77]=P,e[78]=B,e[79]=M):M=e[79];let S;e[80]!==L||e[81]!==M?(S=t.jsxs(fe,{children:[L,M]}),e[80]=L,e[81]=M,e[82]=S):S=e[82];let E;e[83]!==l||e[84]!==S?(E=t.jsx(ge,{open:l,onOpenChange:H,children:S}),e[83]=l,e[84]=S,e[85]=E):E=e[85];let V;return e[86]!==D||e[87]!==E?(V=t.jsxs(t.Fragment,{children:[D,E]}),e[86]=D,e[87]=E,e[88]=V):V=e[88],V}function be(c){return c.stopPropagation()}function ye(c){return c.stopPropagation()}function Ae(c){const e=W.c(8),{triggerCount:s,nextRunAt:a}=c,n=Y();if(s===0){let o;e[0]!==n?(o=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=o):o=e[1];let l;return e[2]!==o?(l=t.jsx("span",{className:"text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=l):l=e[3],l}let i;return e[4]!==a||e[5]!==n||e[6]!==s?(i=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:a?t.jsxs(t.Fragment,{children:[t.jsx(pe,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(a).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(ve,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=a,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{Be as A};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as V,r as lt,b as X,a2 as it,J as rt,aa as ct,K as tt,j as s,l as ut,m as dt,ff as mt}from"./index-Bm9FTdjr.js";import{u as ft}from"./useInfiniteQuery-vZqvTY4f.js";import{u as xt}from"./use-connection-DUF3XC9E.js";import{u as pt}from"./use-mcp-client-Dh_4AZgb.js";import{b as gt}from"./repository-binding-D2wL-4Vr.js";import{b as ht,a as Rt}from"./sheet-D-h-caij.js";import{e as jt,a as Nt,b as st,T as G,d as bt,c as Q}from"./table-Gm-jWCpy.js";import{E as et}from"./empty-state-Zf0MeIMv.js";import{u as Tt}from"./use-infinite-scroll-DewChEmc.js";import{u as St}from"./use-members-DQe3FYGy.js";import{g as vt}from"./task-status-B92ESgef.js";import{e as wt}from"./use-automations-Biu6cV7d.js";import{T as Ct,f as at,a as nt}from"./thread-sheet-body-C1CJm0mZ.js";function It(c){const t=V.c(15),[i,r]=lt.useState(null);let e;t[0]!==c||t[1]!==i?(e=i!==null?c.findIndex(u=>u.id===i):-1,t[0]=c,t[1]=i,t[2]=e):e=t[2];const a=e,o=a!==-1?c[a]:null,n=o!==null;let l,w;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=u=>r(u),w=()=>r(null),t[3]=l,t[4]=w):(l=t[3],w=t[4]);let f,x;t[5]!==a||t[6]!==c?(f=()=>{const u=c[a-1];a>0&&u&&r(u.id)},x=()=>{const u=c[a+1];a!==-1&&u&&r(u.id)},t[5]=a,t[6]=c,t[7]=f,t[8]=x):(f=t[7],x=t[8]);let m;return t[9]!==a||t[10]!==o||t[11]!==n||t[12]!==f||t[13]!==x?(m={selected:o,index:a,isOpen:n,select:l,close:w,prev:f,next:x},t[9]=a,t[10]=o,t[11]=n,t[12]=f,t[13]=x,t[14]=m):m=t[14],m}const W=50;function Y(c){const t=V.c(10),{title:i,value:r,subtitle:e}=c;let a;t[0]!==i?(a=s.jsx("span",{className:"text-sm text-foreground/70",children:i}),t[0]=i,t[1]=a):a=t[1];let o;t[2]!==r?(o=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:r}),t[2]=r,t[3]=o):o=t[3];let n;t[4]!==e?(n=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=n):n=t[5];let l;return t[6]!==a||t[7]!==o||t[8]!==n?(l=s.jsxs(mt,{className:"pt-4 px-4 pb-5 gap-1",children:[a,o,n]}),t[6]=a,t[7]=o,t[8]=n,t[9]=l):l=t[9],l}function yt(c){const t=V.c(45),{automationId:i,range:r}=c,e=X(),{data:a,isLoading:o}=wt(i,r),n=a?.runs,l=a?.usage;let w;t[0]!==n?(w=n&&n.total>0?`${Math.round(n.completed/n.total*100)}%`:"—",t[0]=n,t[1]=w):w=t[1];const f=w;let x;t[2]!==e||t[3]!==l?(x=l&&l.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:l.sampledRuns}):void 0,t[2]=e,t[3]=l,t[4]=x):x=t[4];const m=x;let u;t[5]!==e?(u=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=u):u=t[6];let g;t[7]!==o||t[8]!==n?.total?(g=o?"…":n?.total.toLocaleString()??"0",t[7]=o,t[8]=n?.total,t[9]=g):g=t[9];let h;t[10]!==n||t[11]!==e?(h=n?`${n.completed} ${e("automations.automationRuns.ok")} · ${n.failed} ${e("automations.automationRuns.failed")}${n.inProgress>0?` · ${n.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=n,t[11]=e,t[12]=h):h=t[12];let R;t[13]!==u||t[14]!==g||t[15]!==h?(R=s.jsx(Y,{title:u,value:g,subtitle:h}),t[13]=u,t[14]=g,t[15]=h,t[16]=R):R=t[16];let T;t[17]!==e?(T=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=T):T=t[18];const y=o?"…":f;let C;t[19]!==T||t[20]!==y?(C=s.jsx(Y,{title:T,value:y}),t[19]=T,t[20]=y,t[21]=C):C=t[21];let S;t[22]!==e?(S=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=S):S=t[23];let p;t[24]!==o||t[25]!==l?.totalTokens?(p=o?"…":at(l?.totalTokens??0),t[24]=o,t[25]=l?.totalTokens,t[26]=p):p=t[26];let I;t[27]!==S||t[28]!==p||t[29]!==m?(I=s.jsx(Y,{title:S,value:p,subtitle:m}),t[27]=S,t[28]=p,t[29]=m,t[30]=I):I=t[30];let d;t[31]!==e?(d=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=d):d=t[32];let j;t[33]!==o||t[34]!==l?(j=o?"…":l&&l.costUsd>0?nt(l.costUsd):"—",t[33]=o,t[34]=l,t[35]=j):j=t[35];let v;t[36]!==d||t[37]!==j||t[38]!==m?(v=s.jsx(Y,{title:d,value:j,subtitle:m}),t[36]=d,t[37]=j,t[38]=m,t[39]=v):v=t[39];let N;return t[40]!==I||t[41]!==v||t[42]!==R||t[43]!==C?(N=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[R,C,I,v]}),t[40]=I,t[41]=v,t[42]=R,t[43]=C,t[44]=N):N=t[44],N}function kt(c){const t=V.c(57),{run:i,usage:r,onClick:e,lastRowRef:a}=c,o=X();let n,l;if(t[0]!==i.created_at){const P=new Date(i.created_at);n=P.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=P.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=i.created_at,t[1]=n,t[2]=l}else n=t[1],l=t[2];const w=l;let f,x,m,u,g,h,R,T,y,C,S;if(t[3]!==a||t[4]!==e||t[5]!==i.status||t[6]!==i.title||t[7]!==o){const P=vt(i.status),U=P.icon;x=st,y=a,C="h-14 cursor-pointer hover:bg-muted/40 transition-colors border-b-0",S=e,t[19]!==i.title?(m=s.jsx(Q,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:s.jsx("div",{className:"font-medium text-foreground truncate",children:i.title})}),t[19]=i.title,t[20]=m):m=t[20],f=Q,T="w-28 px-3",h="flex items-center gap-1.5",R=s.jsx(U,{size:14,className:P.iconClassName}),u=ut("text-sm",P.labelColor),g=o(P.labelKey),t[3]=a,t[4]=e,t[5]=i.status,t[6]=i.title,t[7]=o,t[8]=f,t[9]=x,t[10]=m,t[11]=u,t[12]=g,t[13]=h,t[14]=R,t[15]=T,t[16]=y,t[17]=C,t[18]=S}else f=t[8],x=t[9],m=t[10],u=t[11],g=t[12],h=t[13],R=t[14],T=t[15],y=t[16],C=t[17],S=t[18];let p;t[21]!==u||t[22]!==g?(p=s.jsx("span",{className:u,children:g}),t[21]=u,t[22]=g,t[23]=p):p=t[23];let I;t[24]!==p||t[25]!==h||t[26]!==R?(I=s.jsxs("div",{className:h,children:[R,p]}),t[24]=p,t[25]=h,t[26]=R,t[27]=I):I=t[27];let d;t[28]!==f||t[29]!==I||t[30]!==T?(d=s.jsx(f,{className:T,children:I}),t[28]=f,t[29]=I,t[30]=T,t[31]=d):d=t[31];let j;t[32]!==r?(j=r?at(r.totalTokens):"—",t[32]=r,t[33]=j):j=t[33];let v;t[34]!==j?(v=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:j}),t[34]=j,t[35]=v):v=t[35];let N;t[36]!==r?(N=r&&r.costUsd>0?nt(r.costUsd):"—",t[36]=r,t[37]=N):N=t[37];let k;t[38]!==N?(k=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:N}),t[38]=N,t[39]=k):k=t[39];let D;t[40]!==n?(D=s.jsx("div",{children:n}),t[40]=n,t[41]=D):D=t[41];let _;t[42]!==w?(_=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:w}),t[42]=w,t[43]=_):_=t[43];let E;t[44]!==D||t[45]!==_?(E=s.jsxs(Q,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,_]}),t[44]=D,t[45]=_,t[46]=E):E=t[46];let $;return t[47]!==x||t[48]!==m||t[49]!==d||t[50]!==v||t[51]!==k||t[52]!==E||t[53]!==y||t[54]!==C||t[55]!==S?($=s.jsxs(x,{ref:y,className:C,onClick:S,children:[m,d,v,k,E]}),t[47]=x,t[48]=m,t[49]=d,t[50]=v,t[51]=k,t[52]=E,t[53]=y,t[54]=C,t[55]=S,t[56]=$):$=t[56],$}function Bt(c){const t=V.c(73),{automationId:i,triggerIds:r,range:e}=c,a=X(),{org:o,locator:n}=it();let l;t[0]!==o.id||t[1]!==o.slug?(l={connectionId:rt,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=l):l=t[2];const w=pt(l),f=ct(),x=xt(),m=gt(),{data:u}=St(),g=r.length>0;let h;t[3]!==i||t[4]!==o.id||t[5]!==r?(h=tt.automationRuns(o.id,i,r),t[3]=i,t[4]=o.id,t[5]=r,t[6]=h):h=t[6];let R;t[7]!==f||t[8]!==r?(R=async M=>{const{pageParam:z}=M,ot=z===void 0?0:z;return await f.call("COLLECTION_THREADS_LIST",{limit:W,offset:ot,where:{trigger_ids:r}})},t[7]=f,t[8]=r,t[9]=R):R=t[9];let T;t[10]!==g||t[11]!==h||t[12]!==R?(T={queryKey:h,queryFn:R,initialPageParam:0,getNextPageParam:Et,enabled:g,staleTime:3e4},t[10]=g,t[11]=h,t[12]=R,t[13]=T):T=t[13];const{data:y,fetchNextPage:C,hasNextPage:S,isFetchingNextPage:p,isLoading:I}=ft(T);let d,j,v,N;t[14]!==y?.pages||t[15]!==n||t[16]!==e?(d=(y?.pages??[]).flatMap(Dt),N=d.map(Pt),v=dt,j=tt.monitoringThreadUsage(n,JSON.stringify({ids:N,...e})),t[14]=y?.pages,t[15]=n,t[16]=e,t[17]=d,t[18]=j,t[19]=v,t[20]=N):(d=t[17],j=t[18],v=t[19],N=t[20]);let k;t[21]!==e||t[22]!==f||t[23]!==N?(k=async()=>await f.call("MONITORING_THREAD_USAGE",{threadIds:N,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=f,t[23]=N,t[24]=k):k=t[24];const D=N.length>0;let _;t[25]!==j||t[26]!==k||t[27]!==D?(_={queryKey:j,queryFn:k,enabled:D,staleTime:3e4},t[25]=j,t[26]=k,t[27]=D,t[28]=_):_=t[28];const{data:E}=v(_);let $;t[29]!==E?.items?($=new Map((E?.items??[]).map(_t)),t[29]=E?.items,t[30]=$):$=t[30];const P=$;let U;t[31]!==C||t[32]!==S||t[33]!==p?(U=()=>{S&&!p&&C()},t[31]=C,t[32]=S,t[33]=p,t[34]=U):U=t[34];const Z=Tt(U,S??!1,p),b=It(d),B=b.selected;let L;t[35]!==i||t[36]!==e?(L=s.jsx(yt,{automationId:i,range:e}),t[35]=i,t[36]=e,t[37]=L):L=t[37];let O;t[38]!==g||t[39]!==I||t[40]!==Z||t[41]!==d||t[42]!==b||t[43]!==a||t[44]!==P?(O=g?I?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingRuns")}):d.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noRunsTitle"),description:a("automations.automationRuns.noRunsDescription")})}):s.jsxs(jt,{className:"w-full border-collapse",children:[s.jsx(Nt,{className:"border-b-0",children:s.jsxs(st,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(G,{className:"pl-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.startedHeader")})]})}),s.jsx(bt,{children:d.map((M,z)=>s.jsx(kt,{run:M,usage:P.get(M.id),onClick:()=>b.select(M.id),lastRowRef:z===d.length-1?Z:void 0},M.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noStartersTitle"),description:a("automations.automationRuns.noStartersDescription")})}),t[38]=g,t[39]=I,t[40]=Z,t[41]=d,t[42]=b,t[43]=a,t[44]=P,t[45]=O):O=t[45];let A;t[46]!==p||t[47]!==a?(A=p&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingMore")}),t[46]=p,t[47]=a,t[48]=A):A=t[48];let H;t[49]!==b?(H=M=>{M||b.close()},t[49]=b,t[50]=H):H=t[50];let K;t[51]!==x||t[52]!==m||t[53]!==w||t[54]!==n||t[55]!==u||t[56]!==d||t[57]!==B||t[58]!==b.index||t[59]!==b.next||t[60]!==b.prev?(K=B&&s.jsx(Ct,{thread:B,client:w,locator:n,connections:x,virtualMcps:m,members:u,nav:{index:b.index,total:d.length,onPrev:b.prev,onNext:b.next}}),t[51]=x,t[52]=m,t[53]=w,t[54]=n,t[55]=u,t[56]=d,t[57]=B,t[58]=b.index,t[59]=b.next,t[60]=b.prev,t[61]=K):K=t[61];let q;t[62]!==K?(q=s.jsx(Rt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:K}),t[62]=K,t[63]=q):q=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==q?(F=s.jsx(ht,{open:b.isOpen,onOpenChange:H,children:q}),t[64]=b.isOpen,t[65]=H,t[66]=q,t[67]=F):F=t[67];let J;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(J=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,O,A,F]}),t[68]=L,t[69]=O,t[70]=A,t[71]=F,t[72]=J):J=t[72],J}function _t(c){return[c.threadId,{calls:c.calls,inputTokens:c.inputTokens,outputTokens:c.outputTokens,totalTokens:c.totalTokens,costUsd:c.costUsd}]}function Pt(c){return c.id}function Dt(c){return c.items??[]}function Et(c,t){const i=c,r=t;if(!((i?.items?.length??0)<W))return r.length*W}export{Bt as A,It as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as k,j as e,b as $,a2 as D,d as M,r as q,n as d,B as V,fo as F,y as R}from"./index-Bm9FTdjr.js";import{s as G}from"./Plus-XYNDZJ4s.js";import{i as S}from"./ZoomOut-BggitXDv.js";import{S as H}from"./search-input-D-uP0R3f.js";import{E as T}from"./empty-state-Zf0MeIMv.js";import{u as J}from"./use-automations-Biu6cV7d.js";import{u as K}from"./use-navigate-to-agent-DDZo26Jw.js";import{A as O}from"./automation-list-row-Du4blVfm.js";import{b as Q}from"./repository-binding-D2wL-4Vr.js";import{R as U}from"./require-capability-Dm4XTD9Y.js";import"./SearchMd-BFitEH5z.js";import"./use-mcp-client-Dh_4AZgb.js";import"./auth-Dwu4WH32.js";import"./thread-intent-DzHkd78g.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DmOqvBBq.js";import"./task-board-Bgw_xVJW.js";import"./schema-C_wSANSe.js";import"./slugify-CEUa2lfQ.js";import"./badge-DFdotQFQ.js";import"./alert-dialog-BXEG2ySJ.js";import"./agent-icon-BewGjsar.js";import"./AlertCircle-B5gBB9h_.js";import"./Tool01-DQnW-zjg.js";import"./ArrowUp-CP6XCJnB.js";import"./ArrowLeft-B7455tPl.js";import"./LinkBroken01-BZFZ6N-h.js";import"./ShoppingBag01-Ci8H67G0.js";import"./Building02-BZItaEYx.js";import"./CheckCircle-C3CiaCW4.js";import"./ChevronUp-nynZHATg.js";import"./ChevronSelectorVertical-DIPs2sw-.js";import"./UserSquare-CuRnLJZ6.js";import"./Copy01-CdRMK9o7.js";import"./CreditCard01-DVQTLvKO.js";import"./DotsVertical-3XBYz4yU.js";import"./Image01-DdBetDCI.js";import"./Globe04-DoxNod_i.js";import"./SwitchHorizontal01-BHr8jCjb.js";import"./Key01-DcSonP-G.js";import"./Link01-3BacRGrf.js";import"./Monitor01-DU19-CHk.js";import"./Sun-D1Mdg8Cq.js";import"./Play-B7i_-ibU.js";import"./Trash01-DZ8laRwu.js";import"./Upload01-CrRTpeMX.js";import"./User01-9bZ-cKa7.js";import"./Users01-cUGZjxDe.js";import"./XClose-DjFCAP5F.js";import"./access-gate-Cu8JZecz.js";import"./capability-load-error-yZzl8b80.js";function W(){const t=k.c(20),o=$(),{org:p}=D(),{data:y}=J(void 0),g=y===void 0?[]:y,E=Q(),P=K(),f=M(),[x,z]=q.useState(""),h=x.toLowerCase(),b=new Map(E.map(X)),A=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const l=b.get(i.virtual_mcp_id);if(l&&l.title.toLowerCase().includes(h))return!0}return!1}),B=(i,l)=>{const N=l&&b.has(l)?l:F(p.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),P(N,{panel:`automation:${i}`})};let c;t[0]!==f||t[1]!==p.slug?(c=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/projects",params:{org:p.slug}})},t[0]=f,t[1]=p.slug,t[2]=c):c=t[2];const L=c,j=d,C=d,v=d;let s;t[3]!==o?(s=o("settings.automations.pageTitle"),t[3]=o,t[4]=s):s=t[4];let r;t[5]!==s?(r=e.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const w=g.length>0&&e.jsx(H,{value:x,onChange:z,placeholder:o("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let n;t[7]!==r||t[8]!==w?(n=e.jsxs("div",{className:"flex flex-col gap-6",children:[r,w]}),t[7]=r,t[8]=w,t[9]=n):n=t[9];const _=g.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.emptyTitle"),description:o("settings.automations.emptyDescription"),actions:e.jsxs(V,{size:"sm",onClick:L,children:[e.jsx(G,{size:14}),o("settings.automations.browseAgentsButton")]})})}):A.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.noResultsTitle"),description:o("settings.automations.noResultsDescription",{search:x})})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:A.map(i=>e.jsx(O,{automation:i,showAgent:!0,onClick:()=>B(i.id,i.virtual_mcp_id)},i.id))});let a;t[10]!==v.Container||t[11]!==n||t[12]!==_?(a=e.jsxs(v.Container,{children:[n,_]}),t[10]=v.Container,t[11]=n,t[12]=_,t[13]=a):a=t[13];let m;t[14]!==C.Content||t[15]!==a?(m=e.jsx(C.Content,{children:a}),t[14]=C.Content,t[15]=a,t[16]=m):m=t[16];let u;return t[17]!==j||t[18]!==m?(u=e.jsx(j,{children:m}),t[17]=j,t[18]=m,t[19]=u):u=t[19],u}function X(t){return[t.id,t]}function Wt(){const t=k.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(U,{capability:"automations:manage",area:"automations",children:e.jsx(W,{})}),t[0]=o):o=t[0],o}export{Wt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a1 as d}from"./index-Bm9FTdjr.js";const m=1e4,y="true",i=2;function a(t,n){return d.chatAutosend(t,n)}function l(t){return t==="pending"||t==="sending"}function f(t){if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!n||typeof n!="object")return null;const e=n;let o=0;e.status==="sending"?o=e.retryAt===void 0?1:i:e.retryAt!==void 0&&(o=1);const r=e.attempt===void 0?o:e.attempt;return typeof e.createdAt!="number"||typeof e.message!="object"||!l(e.status)||e.retryAt!==void 0&&typeof e.retryAt!="number"||typeof r!="number"||!Number.isInteger(r)||r<0||r>i?null:{...n,attempt:r}}function S(t,n,e,o,r=Date.now()){const s={message:o,createdAt:r,status:"pending",attempt:0};return t.setItem(a(n,e),JSON.stringify(s)),s}function p(t,n,e){const o=a(n,e),r=f(t.getItem(o));return r||(t.removeItem(o),null)}function g(t,n,e,o=Date.now()){const r=a(n,e),s=p(t,n,e);if(!s||s.status!=="pending")return null;if(s.attempt>=i)return t.removeItem(r),null;const c=s.retryAt??s.createdAt;if(o-c>=m)return t.removeItem(r),null;const u={...s,status:"sending",attempt:s.attempt+1};return t.setItem(r,JSON.stringify(u)),{message:u.message,createdAt:u.createdAt,attempt:u.attempt}}function T(t,n,e){t.removeItem(a(n,e))}export{y as A,T as a,g as c,S as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as i,l as f,
|
|
1
|
+
import{c as k,j as i,l as f,aS as R,bp as V,bq as I,br as $}from"./index-Bm9FTdjr.js";import{s as O}from"./User01-9bZ-cKa7.js";function U(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function E(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(V,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(I,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const S=R("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),_=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),D=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function W(r){const e=k.c(34);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const m=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g;let x;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],x=c;break e}x=t}const b=x;let y;e:{if(j){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;let q;e[13]!==l?(q=l?.startsWith("icon://"),e[13]=l,e[14]=q):q=e[14];const p=q;let N;e[15]!==p||e[16]!==l?(N=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=N):N=e[17];const F=N;let w;e[18]!==s||e[19]!==m||e[20]!==h?(w=f(S({shape:m,size:h}),s),e[18]=s,e[19]=m,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==b||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",z),children:i.jsx(O,{size:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(E,{src:l,loading:"lazy",alt:"Avatar",className:f(_({objectFit:u}))}),i.jsx(M,{className:f(z,"rounded-none"),delayMs:l?600:0,children:b})]}),e[22]=z,e[23]=b,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(U,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function B(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const m=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,x=h??"base";let b;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==m||e[15]!==x||e[16]!==l?(b=i.jsx(W,{shape:m,url:l,fallback:t,size:x,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=m,e[15]=x,e[16]=l,e[17]=b):b=e[17],b}B.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(S({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{B as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as
|
|
1
|
+
import{c as u,l as g,j as l,bs as v,aS as b}from"./index-Bm9FTdjr.js";const f=b("inline-flex items-center justify-center rounded-full border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",muted:"border-transparent bg-muted text-muted-foreground [a&]:hover:bg-muted/80"},size:{default:"px-2 py-0.5",icon:"size-5",segmented:"h-7 gap-0 rounded-lg border-transparent bg-card p-0 card-shadow"}},defaultVariants:{variant:"default",size:"default"}});function x(d){const e=u.c(14);let r,s,t,n,a;e[0]!==d?({className:r,variant:a,size:t,asChild:n,...s}=d,e[0]=d,e[1]=r,e[2]=s,e[3]=t,e[4]=n,e[5]=a):(r=e[1],s=e[2],t=e[3],n=e[4],a=e[5]);const c=(n===void 0?!1:n)?v:"span";let i;e[6]!==r||e[7]!==t||e[8]!==a?(i=g(f({variant:a,size:t}),r),e[6]=r,e[7]=t,e[8]=a,e[9]=i):i=e[9];let o;return e[10]!==c||e[11]!==s||e[12]!==i?(o=l.jsx(c,{"data-slot":"badge",className:i,...s}),e[10]=c,e[11]=s,e[12]=i,e[13]=o):o=e[13],o}export{x as B};
|