decocms 4.584.4 → 4.584.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-2biWQHtq.js → AlertCircle-mj0sz0gj.js} +1 -1
- package/dist/client/assets/{AreaChart-DvfrWxxt.js → AreaChart-DSUaBnyJ.js} +1 -1
- package/dist/client/assets/{ArrowLeft-stTwodlf.js → ArrowLeft--TSM2Ux3.js} +1 -1
- package/dist/client/assets/{ArrowRight-BThnPhTS.js → ArrowRight-BVFSrvKf.js} +1 -1
- package/dist/client/assets/{ArrowUp-BAWJsMTM.js → ArrowUp-D2bbOB2w.js} +1 -1
- package/dist/client/assets/{BookOpen01-D1Av52an.js → BookOpen01-CTUEdBiB.js} +1 -1
- package/dist/client/assets/{CartesianChart-C5LAC6aj.js → CartesianChart-DynFqoj3.js} +1 -1
- package/dist/client/assets/{CategoricalChart-DIEIRTlJ.js → CategoricalChart-_BlSk5IS.js} +1 -1
- package/dist/client/assets/{CheckCircle-BaFY7ptX.js → CheckCircle-BsBF4S8u.js} +1 -1
- package/dist/client/assets/{ChevronDown-D3VUgCNv.js → ChevronDown-CNlehUMA.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-Bk8Cwed4.js → ChevronSelectorVertical-BdBrg7yc.js} +1 -1
- package/dist/client/assets/{ChevronUp-Dj0hyz3c.js → ChevronUp-BIaMfxq-.js} +1 -1
- package/dist/client/assets/{CreditCard01-CHbf8a10.js → CreditCard01-gHUc2u28.js} +1 -1
- package/dist/client/assets/{Eye-Cf3Bk97P.js → Eye-Xo5rS9iJ.js} +1 -1
- package/dist/client/assets/{File02-B611JRAO.js → File02-uZRQiPOp.js} +1 -1
- package/dist/client/assets/{Globe04-DWyQ-g9h.js → Globe04-DhsnPBDD.js} +1 -1
- package/dist/client/assets/{Image01-B-xEsNge.js → Image01-C5Xqhwp5.js} +1 -1
- package/dist/client/assets/{Key01-Cdz7yQHR.js → Key01-h9Y3uaT_.js} +1 -1
- package/dist/client/assets/{LayoutLeft-LSMf02jr.js → LayoutLeft-CPMSR00X.js} +1 -1
- package/dist/client/assets/{LinkBroken01-D3lrBb-W.js → LinkBroken01-CxV1rDqL.js} +1 -1
- package/dist/client/assets/{Minimize01-DxOtSYxf.js → Minimize01-BIynG3Ze.js} +1 -1
- package/dist/client/assets/{Minus-CFKaTZ4w.js → Minus-D55MDhYc.js} +1 -1
- package/dist/client/assets/{Monitor01-BCnTCiJw.js → Monitor01-CBUOgSaC.js} +1 -1
- package/dist/client/assets/{Play-DSNCWaN5.js → Play-zsnTCnBK.js} +1 -1
- package/dist/client/assets/{Plus-DIi6CyTF.js → Plus-DAYIm6ow.js} +1 -1
- package/dist/client/assets/{ReferenceLine-BxF4v8QP.js → ReferenceLine-Ccilwreq.js} +1 -1
- package/dist/client/assets/{SearchMd-Da2IZb-Y.js → SearchMd-CTSUPag9.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-C5xu34HU.js → ShoppingBag01-CF4EYiC_.js} +1 -1
- package/dist/client/assets/{Sun-Co2EA9V9.js → Sun-B-xu6eHR.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-tHZa6eIg.js → SwitchHorizontal01-qTGCOGX6.js} +1 -1
- package/dist/client/assets/{Tool01-DaKVtiIV.js → Tool01-Bscrvuft.js} +1 -1
- package/dist/client/assets/{Tooltip-B9ytUqgf.js → Tooltip-EHWPdrLL.js} +1 -1
- package/dist/client/assets/{Trash01-DnGKoQaN.js → Trash01-CevYpZEM.js} +1 -1
- package/dist/client/assets/{TrendUp01-C3VEXl1_.js → TrendUp01-DMf7H3tv.js} +1 -1
- package/dist/client/assets/{Upload01-BOFi9m67.js → Upload01-C_8HEOMT.js} +1 -1
- package/dist/client/assets/{UserCheck01-c0aRTosj.js → UserCheck01-4mEtfdkD.js} +1 -1
- package/dist/client/assets/{UserSquare-BAoPnOeW.js → UserSquare-oo1b4ulW.js} +1 -1
- package/dist/client/assets/{Users01-ZvH6u4Ab.js → Users01-av_p4B03.js} +1 -1
- package/dist/client/assets/{XClose-DzMWv_Uv.js → XClose-WYCPZpkD.js} +1 -1
- package/dist/client/assets/{Zap-OKenL_oO.js → Zap-C-VVHO-P.js} +1 -1
- package/dist/client/assets/{access-gate-ClalGijg.js → access-gate-CBj6VxJ7.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-D--FCKqG.js → add-connection-dialog-CVC64Gmd.js} +1 -1
- package/dist/client/assets/agent-app-Ba7JDwY6.js +1 -0
- package/dist/client/assets/{agent-assets-CHUhHO2y.js → agent-assets-DlGJDJr0.js} +1 -1
- package/dist/client/assets/{agent-automation-B2cEM1Bc.js → agent-automation-e9KFVJPg.js} +1 -1
- package/dist/client/assets/{agent-automations-DNTIrqlq.js → agent-automations-DHP9-Rvp.js} +1 -1
- package/dist/client/assets/{agent-blog-DEeWSZUO.js → agent-blog-MchyO8b5.js} +2 -2
- package/dist/client/assets/{agent-blog-post-9adnE54u.js → agent-blog-post-DUN7iPWt.js} +2 -2
- package/dist/client/assets/{agent-calendar-DcxoJ9Pi.js → agent-calendar-De-Im46e.js} +1 -1
- package/dist/client/assets/{agent-capabilities-DzGi2WRP.js → agent-capabilities-DEMFK1PG.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-C_63Dtr4.js → agent-connect-sources-DkfqQk5b.js} +1 -1
- package/dist/client/assets/agent-deck-Cx2e4txV.js +1 -0
- package/dist/client/assets/{agent-e2e-74LJEPhr.js → agent-e2e-cuAg7vvT.js} +1 -1
- package/dist/client/assets/agent-experiments-CKleoVAf.js +1 -0
- package/dist/client/assets/agent-file-BrkmoibI.js +1 -0
- package/dist/client/assets/{agent-hosting-CQXdpYqU.js → agent-hosting-D__8hPs9.js} +1 -1
- package/dist/client/assets/{agent-icon-DVY218yy.js → agent-icon-Bq_Z7esB.js} +1 -1
- package/dist/client/assets/agent-library-BfblIp1v.js +1 -0
- package/dist/client/assets/agent-library-file-C7p2ZAks.js +1 -0
- package/dist/client/assets/agent-overview-NZBYrRRV.js +1 -0
- package/dist/client/assets/{agent-releases-Jb-DRZyT.js → agent-releases-D4ESN3iT.js} +1 -1
- package/dist/client/assets/agent-settings-iY554avh.js +1 -0
- package/dist/client/assets/{agent-site-editor-DX2RxC23.js → agent-site-editor-DBCTlamd.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-CaQ191md.js +2 -0
- package/dist/client/assets/agent-site-editor-content-4-gXvHBG.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-BE075svj.js +1 -0
- package/dist/client/assets/agent-view-D12VaGvy.js +1 -0
- package/dist/client/assets/{agent-view-guard-ByEe6Kbs.js → agent-view-guard-BZTSZPH3.js} +1 -1
- package/dist/client/assets/{ai-providers-CsmtApl_.js → ai-providers-Bd027SSh.js} +1 -1
- package/dist/client/assets/{alert-C2n5idj-.js → alert-fpttYoSQ.js} +1 -1
- package/dist/client/assets/{analytics-sections-DlfD83Jx.js → analytics-sections-BqryzJvo.js} +1 -1
- package/dist/client/assets/api-keys-CQkJKCWp.js +1 -0
- package/dist/client/assets/{api-keys-qOJKXTmv.js → api-keys-DLlJejJF.js} +1 -1
- package/dist/client/assets/{app-editor-IP-8XvhF.js → app-editor-CPq25Dfa.js} +1 -1
- package/dist/client/assets/{asset-utils-DbzM_DGD.js → asset-utils-C_CFQkKi.js} +1 -1
- package/dist/client/assets/{auth-YOK5D_Me.js → auth-BOZ5swZI.js} +1 -1
- package/dist/client/assets/{auth-catchall-Dn0xYuu6.js → auth-catchall-DXChUDcZ.js} +1 -1
- package/dist/client/assets/{auth-entry-DecLa6gE.js → auth-entry-DMbaj7KI.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CY03V6-t.js → auth-split-layout-DNd6b-pH.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DCLMPjbk.js → authenticate-and-persist-oauth-Cj46Ik0_.js} +1 -1
- package/dist/client/assets/{automation-list-row-BUrE2X7w.js → automation-list-row-Cpitkm-C.js} +1 -1
- package/dist/client/assets/{automation-runs-RS2kKrcP.js → automation-runs-BxBjhLC7.js} +1 -1
- package/dist/client/assets/{automations-CBxiSbjD.js → automations-DhtUKYcW.js} +1 -1
- package/dist/client/assets/{badge-u1zWRb7U.js → badge-CEYLDtOG.js} +1 -1
- package/dist/client/assets/{block-document-mOU9XugL.js → block-document-DJdZyw2U.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-CBRyPf2V.js → blocks-preview-workspace-context-LI4fVaaR.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-CYSIXRwV.js → blocks-tab-states-Bx0tgd5u.js} +1 -1
- package/dist/client/assets/{blog-preview-url-BYvjhK-J.js → blog-preview-url-6gNfi5Cv.js} +1 -1
- package/dist/client/assets/{blog-schema-BDvuqCPP.js → blog-schema-BKDvfgHw.js} +1 -1
- package/dist/client/assets/{blog-source-gate-BNd1aCij.js → blog-source-gate-BClmYTyo.js} +1 -1
- package/dist/client/assets/{blog-view-gate-C4By9o6e.js → blog-view-gate-eJ0uCj97.js} +1 -1
- package/dist/client/assets/{buckets-D-oIncWn.js → buckets-DWNc5IQi.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-B09vrLn2.js → build-improve-prompt-doc-CncoFUT6.js} +1 -1
- package/dist/client/assets/{calendar-Bl5tE3yL.js → calendar-B0VrIuVV.js} +1 -1
- package/dist/client/assets/{capability-load-error-CeNWEteQ.js → capability-load-error-D7_TKHDu.js} +1 -1
- package/dist/client/assets/{category-editor-CvfSwi7w.js → category-editor-Jfh1FEbD.js} +1 -1
- package/dist/client/assets/{category-tree-CT8tN9Wn.js → category-tree-T_JTuIiu.js} +1 -1
- package/dist/client/assets/{chart-mq3U8kNh.js → chart-Ef5OJL7Y.js} +1 -1
- package/dist/client/assets/{chat-context-CyKULgZO.js → chat-context-BUMEnIPW.js} +1 -1
- package/dist/client/assets/{chat-draft-BmMlo1Yn.js → chat-draft-B7hvjq7e.js} +1 -1
- package/dist/client/assets/{checkbox-B-Sq9kpD.js → checkbox-BUvWR-iD.js} +1 -1
- package/dist/client/assets/{choose-editor-DeP6veJd.js → choose-editor-C_rrZDqX.js} +1 -1
- package/dist/client/assets/{cli-auth-success-mJt-vwdZ.js → cli-auth-success-CIy6cPVO.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-BKYxd1EQ.js → cms-settings-editor-agl-pdfk.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-D3_QRIPZ.js → cms-store-drafts-BNAdDXxB.js} +1 -1
- package/dist/client/assets/{collapsible-DsJL4QmF.js → collapsible-DYCInqz3.js} +1 -1
- package/dist/client/assets/{collection-detail-BZyU8Aoo.js → collection-detail-BX7pAFmI.js} +1 -1
- package/dist/client/assets/{collection-display-button-LVg4n6c9.js → collection-display-button-C3xi0T_X.js} +1 -1
- package/dist/client/assets/{collection-search-oXbiEWDa.js → collection-search-CMlKHTQ0.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DMr9pz3m.js → collection-table-wrapper-DbIa5pBT.js} +1 -1
- package/dist/client/assets/{collection-tabs-DGdMH73g.js → collection-tabs-ZW6Qb_Ul.js} +1 -1
- package/dist/client/assets/{combobox-zphXryWn.js → combobox-CMR7JQ5s.js} +1 -1
- package/dist/client/assets/{command-C3TtnVDj.js → command-DAachgGl.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BiPf-hvx.js → companion-mcps-section-DFAviA9V.js} +1 -1
- package/dist/client/assets/{config-CCA1XEo0.js → config-CVrGKu1z.js} +1 -1
- package/dist/client/assets/{connect-CX-NL1If.js → connect-Dv780Ao_.js} +1 -1
- package/dist/client/assets/{connect-key-v6EnOAg0.js → connect-key-BcTw1Dit.js} +1 -1
- package/dist/client/assets/{connect-layout-_H7NkCcy.js → connect-layout-DVKIDoAk.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-DVHC7ciT.js → connect-source-dialog-DmvQjMo_.js} +1 -1
- package/dist/client/assets/{connection-DppgioJv.js → connection-CqG6Tj46.js} +1 -1
- package/dist/client/assets/{connection-card-CAubDaDo.js → connection-card-CMRGPAUW.js} +1 -1
- package/dist/client/assets/{connection-detail-CYXibOPP.js → connection-detail-B2bDZqoS.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CltjtabR.js → connection-form-helpers-BliOgdtt.js} +1 -1
- package/dist/client/assets/{connection-slug-Dmg7T7Vj.js → connection-slug-BMyTAhb7.js} +1 -1
- package/dist/client/assets/{connections-ZfeMu3GR.js → connections-osURCVgm.js} +1 -1
- package/dist/client/assets/{content-tab-C4SzMaJf.js → content-tab-B1BKIfBg.js} +3 -3
- package/dist/client/assets/{context-z0raRk55.js → context-SebnQ-fG.js} +1 -1
- package/dist/client/assets/{context-menu-E_hLRpwM.js → context-menu-dPQDOknl.js} +1 -1
- package/dist/client/assets/{context-shell-DTw_WONz.js → context-shell-CU-clPo7.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-DdX8AuBL.js → create-organization-dialog-BMVp8RKI.js} +1 -1
- package/dist/client/assets/{daily-pulse-BmoCtcCb.js → daily-pulse-BIfjhIvm.js} +1 -1
- package/dist/client/assets/{delete-copy-Bqhd3J4I.js → delete-copy-Dyr7i9lK.js} +1 -1
- package/dist/client/assets/{device-hint-i7B63ea7.js → device-hint-DBfDHhL1.js} +1 -1
- package/dist/client/assets/{discover-DJYVi1Vh.js → discover-4UiUWkTa.js} +1 -1
- package/dist/client/assets/{domain-settings-U9k6HRc-.js → domain-settings-l_JDVQfq.js} +1 -1
- package/dist/client/assets/{drawer-B0J2YUt9.js → drawer-BtNmmbgW.js} +1 -1
- package/dist/client/assets/{editor-C-kmJ80m.js → editor-DJNkhCaU.js} +1 -1
- package/dist/client/assets/{editor-classes-BqutBM91.js → editor-classes-D6VscvFm.js} +1 -1
- package/dist/client/assets/{empty-message-nc3IkvMJ.js → empty-message-BFHsH7_h.js} +1 -1
- package/dist/client/assets/{empty-state-BmyT_5Ud.js → empty-state-FI4NppsL.js} +1 -1
- package/dist/client/assets/{empty-state-DPbofsef.js → empty-state-Y9RPHES1.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-BbkulId3.js → experiments-tab-choice-Bp3jeDLT.js} +1 -1
- package/dist/client/assets/{extract-connection-data-PHmYu-pc.js → extract-connection-data-jaNfclWY.js} +1 -1
- package/dist/client/assets/{feature-gate-Cwsu0gDu.js → feature-gate-32y7GiUu.js} +1 -1
- package/dist/client/assets/{feature-paywall-Ds2ZQTiK.js → feature-paywall-nyy14OlO.js} +1 -1
- package/dist/client/assets/{file-explorer-DE0QMUIX.js → file-explorer-Berv-DjA.js} +1 -1
- package/dist/client/assets/{file-preview-DSm-7S4H.js → file-preview-DOlPWZsT.js} +1 -1
- package/dist/client/assets/{file-share-button-CYGVH_8S.js → file-share-button-fnsd2V0Q.js} +1 -1
- package/dist/client/assets/{file-type-icon-DZFXNty2.js → file-type-icon-Bw6tHUJI.js} +1 -1
- package/dist/client/assets/{folder-icon-4CTV3FlH.js → folder-icon-A6dxvF3y.js} +1 -1
- package/dist/client/assets/{form-DSjQLmYE.js → form-CE_i7Gc_.js} +1 -1
- package/dist/client/assets/{frame-navigation-BZExhlgL.js → frame-navigation-D0o7MHwc.js} +1 -1
- package/dist/client/assets/{gateway-client-CeYZgY-b.js → gateway-client-CuVQGtSK.js} +1 -1
- package/dist/client/assets/{general-CL3T6ERV.js → general-CF4LBOhX.js} +1 -1
- package/dist/client/assets/{github-icon-wM35FqKc.js → github-icon-BBtraw32.js} +1 -1
- package/dist/client/assets/{held-block-view-DSFOZetO.js → held-block-view-BCDffeao.js} +1 -1
- package/dist/client/assets/{home-BKgRVeZ6.js → home-D5e51VDk.js} +1 -1
- package/dist/client/assets/{home-overview-vUj_qJFl.js → home-overview-CvjbBnOC.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-BP36JFCJ.js → hosted-reconcile-BV7FtBoJ.js} +1 -1
- package/dist/client/assets/{icon-button-1KJ2Z_eZ.js → icon-button-vJpGdaXv.js} +1 -1
- package/dist/client/assets/{index-CYAyx9BI.js → index-BBKDsc5X.js} +1 -1
- package/dist/client/assets/{index-B2xscTM1.js → index-BDN2Il8W.js} +1 -1
- package/dist/client/assets/{index-cVlGSMYO.js → index-BFZAeRbT.js} +1 -1
- package/dist/client/assets/{index-CU3BImsY.js → index-BO5G51Y2.js} +1 -1
- package/dist/client/assets/{index-0lR5HspR.js → index-BfWp2Wnw.js} +3 -3
- package/dist/client/assets/{index-B3uhijXz.js → index-Bq8aKp2l.js} +1 -1
- package/dist/client/assets/{index-CdzvkAP5.js → index-C-SbeINf.js} +1 -1
- package/dist/client/assets/{index-C1phPALZ.js → index-CJvXv5nj.js} +1 -1
- package/dist/client/assets/{index-CDf54xNL.js → index-C_tC1dxx.js} +1 -1
- package/dist/client/assets/{index-DME8X3oK.js → index-CcEK8GbM.js} +1 -1
- package/dist/client/assets/{index-DkWUeYd8.js → index-Cu5PtngA.js} +1 -1
- package/dist/client/assets/{index-dlWHc2Bm.js → index-CvQo8gKP.js} +1 -1
- package/dist/client/assets/{index-8l9Qf34V.js → index-DN6wMhlh.js} +1 -1
- package/dist/client/assets/{index-Df5ES5Qh.js → index-DVC5Xh86.js} +1 -1
- package/dist/client/assets/{index-CUfLVsD2.js → index-DqFWx3BB.js} +1 -1
- package/dist/client/assets/{index-DyQTkyEx.js → index-DvdlZugw.js} +1 -1
- package/dist/client/assets/{index-D_CPaxcY.js → index-FE1RDBz7.js} +1 -1
- package/dist/client/assets/{index-redirect-Cw9DnSdB.js → index-redirect-Bl5G9WWk.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-D9dKA0TJ.js → infiniteQueryObserver-1nr0P0K0.js} +1 -1
- package/dist/client/assets/{infra-billing-Dwshyvx-.js → infra-billing-ho67U0rR.js} +1 -1
- package/dist/client/assets/{input-Bu6nOsrP.js → input-BJ5cUSYm.js} +3 -3
- package/dist/client/assets/{input-CQkDYPsU.js → input-BNlFS4tL.js} +1 -1
- package/dist/client/assets/{integration-icon-DHXcMFDo.js → integration-icon-C4zzzxaS.js} +1 -1
- package/dist/client/assets/{item-actions-DOzBfUoT.js → item-actions-B-wWhBMR.js} +1 -1
- package/dist/client/assets/{jira-icon-dtv6HIJ7.js → jira-icon-geKtCB2v.js} +1 -1
- package/dist/client/assets/{label-B79DRc98.js → label-CWaQ3ANC.js} +1 -1
- package/dist/client/assets/{layout-CbTYnQxl.js → layout-D8a54-AV.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-Tsfj3WHS.js → legacy-admin-welcome-dialog-BnEG9TvC.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DyaOvdyS.js → legacy-agents-deep-D40bR2el.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-Bkvx9ZOX.js → legacy-main-redirect-Fa4p1NoA.js} +1 -1
- package/dist/client/assets/library-OBxcrPA6.js +1 -0
- package/dist/client/assets/{library-tab-gR9RARZA.js → library-tab-Bxyd3n6f.js} +1 -1
- package/dist/client/assets/{login-12qDyxH0.js → login-Cdi7iEkU.js} +1 -1
- package/dist/client/assets/{markdown-CFFvPMSZ.js → markdown-NetMLX1B.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-QY2zjE8v.js → mcp-app-renderer-OOnse3pT.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CK5Wc-Cr.js → mcp-oauth-C138KPCE.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CVyeIX5s.js → mcp-oauth-DOaDVyhA.js} +1 -1
- package/dist/client/assets/{members-Dvtr2FPU.js → members-r0zAY-Qq.js} +1 -1
- package/dist/client/assets/{memory-C4CXLQtC.js → memory-aLB_WhbI.js} +1 -1
- package/dist/client/assets/{mock-board-BzC4_di4.js → mock-board-Dl0qBjh7.js} +3 -3
- package/dist/client/assets/{monaco-editor-BiU4o5qP.js → monaco-editor-BJmxWrxj.js} +1 -1
- package/dist/client/assets/{monitoring-DHlCLsXh.js → monitoring-Cd-32_wp.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-1uQ1lOlX.js → monitoring-stats-row-C4l9QgAZ.js} +1 -1
- package/dist/client/assets/{multi-select-9ybiRb1s.js → multi-select-B_L-qOo_.js} +1 -1
- package/dist/client/assets/{mustache-D0ICNUck.js → mustache-DsBc8nE5.js} +1 -1
- package/dist/client/assets/{named-rule-step-CaS0YbZS.js → named-rule-step-C6gSKxIZ.js} +1 -1
- package/dist/client/assets/{named-rule-view-C1l0e31z.js → named-rule-view-D6a00Kd0.js} +1 -1
- package/dist/client/assets/{new-project-dialog-cbFrLrDD.js → new-project-dialog-B6Lwo0Gj.js} +1 -1
- package/dist/client/assets/{new-project-store-BZX_mqKj.js → new-project-store-DQsI7Up8.js} +1 -1
- package/dist/client/assets/{oauth-callback-DToEz8H0.js → oauth-callback-ZiXhFHTL.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DgaGlvwN.js → oauth-callback-ai-provider-G3iL8oeJ.js} +1 -1
- package/dist/client/assets/{oauth-consent-rayKVJg0.js → oauth-consent-BXyh0gna.js} +1 -1
- package/dist/client/assets/{onboarding-Bj0uDDLU.js → onboarding-DAsPAll8.js} +1 -1
- package/dist/client/assets/{openai-conversation-C1W9BcXe.js → openai-conversation-BAjqwRPV.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-BEEdjpUv.js → optimistic-project-sidebar-views-DFcCZ-o3.js} +1 -1
- package/dist/client/assets/{order-monitor-day-BYGdz69-.js → order-monitor-day-C70gELqf.js} +1 -1
- package/dist/client/assets/{organization-choice-DDnhnBgH.js → organization-choice-DU0Iu2sl.js} +1 -1
- package/dist/client/assets/{orgs-DD7506p3.js → orgs-BX0lk0zT.js} +1 -1
- package/dist/client/assets/{own-accounts-section-CkIdcOP2.js → own-accounts-section-F5Hyapdn.js} +1 -1
- package/dist/client/assets/{pair-BbRBY2uh.js → pair-B9IOPXjq.js} +1 -1
- package/dist/client/assets/{parse-sections-ugwxBTr3.js → parse-sections--l6s_VwH.js} +2 -2
- package/dist/client/assets/{plan-ladder-CUsbmRUg.js → plan-ladder-NC686t6f.js} +1 -1
- package/dist/client/assets/{plan-usage-card-BUQKDhDq.js → plan-usage-card-WBfanqrN.js} +1 -1
- package/dist/client/assets/{plan-DKTGILlA.js → plan-vHZHG0_E.js} +1 -1
- package/dist/client/assets/{popover-Z7qjkGnd.js → popover-oFcDtUvN.js} +1 -1
- package/dist/client/assets/{post-calendar-MQRDpplQ.js → post-calendar-DzBDM3b2.js} +1 -1
- package/dist/client/assets/{post-editor-CWBXAOmA.js → post-editor-CcQmW5GV.js} +1 -1
- package/dist/client/assets/{preview-content-CVE5O8M2.js → preview-content-MbQf8RGA.js} +1 -1
- package/dist/client/assets/{preview-dialog-CC_aNvFo.js → preview-dialog-Cded3kAU.js} +1 -1
- package/dist/client/assets/{preview-panel-CxxQj4O0.js → preview-panel-rChZiu-N.js} +1 -1
- package/dist/client/assets/{preview-tab-DNrQIHI8.js → preview-tab-zxzhDMiQ.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-DBxUKTF9.js → product-picker-dialog-CX9KvtZh.js} +1 -1
- package/dist/client/assets/{profile-BrB3sruJ.js → profile-NWB9QWdA.js} +1 -1
- package/dist/client/assets/{project-app-view-Bgu6M3_t.js → project-app-view-gJDZKZ8F.js} +1 -1
- package/dist/client/assets/{project-apps-BwTy_4Nz.js → project-apps-D28U2fPi.js} +1 -1
- package/dist/client/assets/{project-icon-BTCpO9jF.js → project-icon-WyFXKdgN.js} +1 -1
- package/dist/client/assets/{project-index-BTtphIo6.js → project-index-COi5kduS.js} +1 -1
- package/dist/client/assets/project-reports-DFICoZ3P.js +1 -0
- package/dist/client/assets/project-tasks-DHsoMFaC.js +1 -0
- package/dist/client/assets/{projects-Bh4aF2uA.js → projects-Cm9td8_E.js} +1 -1
- package/dist/client/assets/{projects-empty-state-BRe70t7l.js → projects-empty-state-Dvqp2Zzy.js} +1 -1
- package/dist/client/assets/{prompts-BYNbnGqK.js → prompts-DhLlttmt.js} +1 -1
- package/dist/client/assets/record-editor-BaN-J3uT.js +1 -0
- package/dist/client/assets/{redirect-editor-BA975cBW.js → redirect-editor-Dk4GjAcP.js} +1 -1
- package/dist/client/assets/reports-BjhUDxT0.js +1 -0
- package/dist/client/assets/{reports-Cjo6EQGk.js → reports-CREVrO7v.js} +1 -1
- package/dist/client/assets/{reports-onboarding-BgHRgiL3.js → reports-onboarding-DlCteX2-.js} +1 -1
- package/dist/client/assets/{reports-tab-xXOU1_ij.js → reports-tab-C197xYdE.js} +2 -2
- package/dist/client/assets/{repositories-BT1F6Ro6.js → repositories-CWMzkWDA.js} +1 -1
- package/dist/client/assets/repositories-CpGjSRVu.js +1 -0
- package/dist/client/assets/{repository-binding-BbJCbkKW.js → repository-binding-BDu0tU0n.js} +1 -1
- package/dist/client/assets/{repository-picker-BVbH8azI.js → repository-picker-DKoD0HVQ.js} +1 -1
- package/dist/client/assets/{require-capability-mJTZoDrZ.js → require-capability-DXiZ0OON.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CmGTdZQW.js → required-auth-layout-ZTLOobSH.js} +1 -1
- package/dist/client/assets/{reset-password-wnxfyOln.js → reset-password-DiEnHrUJ.js} +1 -1
- package/dist/client/assets/{resizable-Q9JNFw76.js → resizable-BArMfXUk.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon--dWM7ImC.js → resolve-tab-icon-C99S9oDL.js} +1 -1
- package/dist/client/assets/{review-settings-ggSjEgPT.js → review-settings-Brit3pLv.js} +1 -1
- package/dist/client/assets/{role-color-DIwod_gv.js → role-color-Ddqyp0w6.js} +1 -1
- package/dist/client/assets/roles-C9wYF2gv.js +1 -0
- package/dist/client/assets/route-Bhee4AVm.js +1 -0
- package/dist/client/assets/{route-CmIIxuEN.js → route-C0X_ekZH.js} +1 -1
- package/dist/client/assets/{route-CNosFLeV.js → route-cMh_8Xc3.js} +1 -1
- package/dist/client/assets/{route-page-header-CFSeiSqP.js → route-page-header-BeG7kyQP.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-BG06NbhU.js → sandbox-git-api-Bwhb8cKq.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-BwF-JdS6.js → sandbox-lifecycle-context-Dq2ETPAf.js} +1 -1
- package/dist/client/assets/{save-status-DRPBK-H_.js → save-status-BXxefOdA.js} +1 -1
- package/dist/client/assets/{schema-DrjJ0xuK.js → schema-BJIhJXy6.js} +1 -1
- package/dist/client/assets/{schema-WZa17eyn.js → schema-CI1Jg9rW.js} +1 -1
- package/dist/client/assets/{scroll-area-BPsPck6f.js → scroll-area-Dt-NcLdT.js} +1 -1
- package/dist/client/assets/{search-input-DqPjHLOd.js → search-input-BjRiuWL9.js} +1 -1
- package/dist/client/assets/{search-toggle-CcUy6Dx6.js → search-toggle-BOD5VZ7W.js} +1 -1
- package/dist/client/assets/{secret-picker-DPrm62tz.js → secret-picker-CHt8ZrjG.js} +1 -1
- package/dist/client/assets/{secrets-C0MYrsyn.js → secrets-DGZeS_5r.js} +1 -1
- package/dist/client/assets/{section-array-field-C8Ft18JA.js → section-array-field-CYFq6Yfv.js} +1 -1
- package/dist/client/assets/{sections-Cjl6VnNs.js → sections-DBJ1YFK4.js} +1 -1
- package/dist/client/assets/{sections-editor-CKYx3zXJ.js → sections-editor--Z8msN1o.js} +1 -1
- package/dist/client/assets/{select-CwyDmqv5.js → select-BXZoshA8.js} +1 -1
- package/dist/client/assets/{select-model-CcIP7vKI.js → select-model-Corsllp1.js} +1 -1
- package/dist/client/assets/{seo-editor-CGdapT1Z.js → seo-editor-CG0nowoP.js} +1 -1
- package/dist/client/assets/{separator-D_pPa7cb.js → separator-Jij0j-j1.js} +1 -1
- package/dist/client/assets/{session-runtime-o7G6i_EW.js → session-runtime-DFmRKpVg.js} +1 -1
- package/dist/client/assets/settings-tab-PpyKi5jL.js +1 -0
- package/dist/client/assets/{sheet-Cg9RqTZP.js → sheet-DT44IVE2.js} +1 -1
- package/dist/client/assets/{shell-layout-B6tNQH76.js → shell-layout-CQs-sSUy.js} +1 -1
- package/dist/client/assets/{site-draft-actions-DSnrAPpv.js → site-draft-actions-ChPsoqte.js} +1 -1
- package/dist/client/assets/{site-draft-view-Bq6fbYE-.js → site-draft-view-CIc7HrWU.js} +1 -1
- package/dist/client/assets/site-editor-89VkH7GW.js +1 -0
- package/dist/client/assets/{site-editor-toast-BxmjYQsg.js → site-editor-toast-D2nHZREM.js} +1 -1
- package/dist/client/assets/{skills-DYDhInws.js → skills-CgUWJjrb.js} +1 -1
- package/dist/client/assets/{slider-B4psaiKN.js → slider-DCaB9Ine.js} +1 -1
- package/dist/client/assets/{sortable.esm-BX2eLIhp.js → sortable.esm-CfU7eu9S.js} +1 -1
- package/dist/client/assets/{sso-BiG8AHnh.js → sso-BEMT6JJw.js} +1 -1
- package/dist/client/assets/{suggestion-TAps9nbJ.js → suggestion-BO6GNdWk.js} +1 -1
- package/dist/client/assets/{super-agent-icon-CvQP5uLw.js → super-agent-icon-Cu5ZQ2qC.js} +1 -1
- package/dist/client/assets/{switch-Byyj-_s4.js → switch-CfCCzQdg.js} +1 -1
- package/dist/client/assets/{synced-repos-BooKX7J8.js → synced-repos-gHf8sPwV.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-Db3bDpxh.js → tab-icon-glyph-hPo-Gg9t.js} +1 -1
- package/dist/client/assets/{table-DotyfJjN.js → table-BG-lRGNn.js} +1 -1
- package/dist/client/assets/{tabs-DCkjYFxv.js → tabs-DQRKyhjY.js} +1 -1
- package/dist/client/assets/{task-board-D3W1ksfo.js → task-board-B-hxKp5U.js} +1 -1
- package/dist/client/assets/{task-key-h5EZIo5-.js → task-key-DjK7Kw8s.js} +1 -1
- package/dist/client/assets/{task-route-CmUL8AUw.js → task-route-BwC6Um2K.js} +1 -1
- package/dist/client/assets/{task-status-Bm1G3QGR.js → task-status-BiZeTmx1.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-CjgII2eZ.js → taskboard-analytics-C1hsIKyF.js} +1 -1
- package/dist/client/assets/tasks-Cvrxb3RD.js +1 -0
- package/dist/client/assets/{tasks-DP5ow9dB.js → tasks-Dac_YLSj.js} +1 -1
- package/dist/client/assets/{textarea-Du2m3jSM.js → textarea-DAZ3avm9.js} +1 -1
- package/dist/client/assets/{thread-analytics-CrLSbYuR.js → thread-analytics-DGVyUEMu.js} +1 -1
- package/dist/client/assets/{thread-button-BzL6IgWO.js → thread-button-Dy4pRky4.js} +1 -1
- package/dist/client/assets/{thread-intent-DHvySkdI.js → thread-intent-BtcwbxTJ.js} +1 -1
- package/dist/client/assets/{thread-route-CH91rvT9.js → thread-route-BKnIUDl3.js} +1 -1
- package/dist/client/assets/{thread-route-wSguGHHE.js → thread-route-Ds6Wombz.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-BUQUjcGl.js → thread-sheet-body-Kjk5YJ_A.js} +1 -1
- package/dist/client/assets/{time-range-picker-CHoH8N9M.js → time-range-picker-y-R1DMgB.js} +1 -1
- package/dist/client/assets/{toggle-group-D86mAn_-.js → toggle-group-BgBCZLaa.js} +1 -1
- package/dist/client/assets/{tool-set-selector-BBpYfu8R.js → tool-set-selector-tZKV1bCv.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CHq8HHsB.js → toolbar-icon-button-CaY1wsmY.js} +1 -1
- package/dist/client/assets/{tooltip-Ck_nh9Yl.js → tooltip-CqV-qcYU.js} +1 -1
- package/dist/client/assets/{tooltipContext-B7aWO9LL.js → tooltipContext-5-7GWaNH.js} +1 -1
- package/dist/client/assets/{track-CJ65-qhF.js → track-qijzY7O9.js} +1 -1
- package/dist/client/assets/{types-BuOEJdI6.js → types-DRaoZ_4I.js} +1 -1
- package/dist/client/assets/{url-slug-D1b3rdRU.js → url-slug-CTOX8lQF.js} +1 -1
- package/dist/client/assets/{usage-stats-4bhjzDAy.js → usage-stats-BXxRbW0f.js} +1 -1
- package/dist/client/assets/{use-ai-providers-srofbIvQ.js → use-ai-providers-DgsrHLV3.js} +1 -1
- package/dist/client/assets/{use-api-keys-CqWc5Y4J.js → use-api-keys-1S0yfr-w.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-DtD0oNUd.js → use-apply-named-rule-DK9k5f8X.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-CC9ew9W1.js +1 -0
- package/dist/client/assets/{use-automations-E5Kosa3m.js → use-automations-lWDVj-CU.js} +1 -1
- package/dist/client/assets/{use-autosave-DziUHask.js → use-autosave-CQIToQsM.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-DwTQhXO1.js +1 -0
- package/dist/client/assets/use-blog-view-9w6CHFwT.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-C90_Sb0Z.js → use-chat-layout-state-CS1wv5hl.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-DBfalq5m.js → use-cms-publish-actions-BoXieLUR.js} +1 -1
- package/dist/client/assets/{use-connect-companion-Npgg_RJp.js → use-connect-companion-C2Xf2qzV.js} +1 -1
- package/dist/client/assets/{use-connection-C0q-jSdh.js → use-connection-Df8_gpBB.js} +1 -1
- package/dist/client/assets/{use-content-sync-NtEmkl7u.js → use-content-sync-DzzCDnXY.js} +1 -1
- package/dist/client/assets/{use-copy-ByVIiaB6.js → use-copy-CCrC_M79.js} +1 -1
- package/dist/client/assets/{use-current-view-B4f33lr-.js → use-current-view-B5rf1h54.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-CyvDo0R-.js → use-date-fns-locale-Csnyj6_G.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CciezuN3.js → use-debounced-autosave-BNJwBoKC.js} +1 -1
- package/dist/client/assets/{use-debounced-value-0zlDzh2p.js → use-debounced-value-DFWDa0qH.js} +1 -1
- package/dist/client/assets/{use-deco-credits-zRLku8zm.js → use-deco-credits-CuB-vVK3.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DgWMESxX.js → use-decopilot-events-B7ke0MhO.js} +1 -1
- package/dist/client/assets/{use-delete-block-BDbPp1YD.js → use-delete-block-ZPB3I9Ns.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BciDeakv.js → use-delete-connection-Zvzh2eht.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-C2aIOPQg.js → use-deployment-admin-B4GqO2uv.js} +1 -1
- package/dist/client/assets/{use-entitlements-BKyi7ehM.js → use-entitlements-CQZj5lkl.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-J_CrZVRi.js → use-fast-preview-draft-url-DYyM21UT.js} +1 -1
- package/dist/client/assets/{use-file-configs-DVw17al7.js → use-file-configs-CyAC1Jn2.js} +1 -1
- package/dist/client/assets/{use-id-selection-CCNPU7pT.js → use-id-selection-CE2G3E6f.js} +1 -1
- package/dist/client/assets/{use-in-settings-CedVK5pZ.js → use-in-settings-CRUM5hPE.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-eisPu2tK.js → use-inbox-feed-uWC2MWJH.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Bv0m8I3M.js → use-infinite-scroll-Cz_t92ww.js} +1 -1
- package/dist/client/assets/{use-join-requests-DzlqppJC.js → use-join-requests-CS1fqgjk.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-DlfKa_g4.js → use-main-panel-tabs-DwCoiX2k.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CXorv-xo.js → use-mcp-auth-status-CyjIfVIk.js} +1 -1
- package/dist/client/assets/{use-mcp-client-fkOuyPSB.js → use-mcp-client-HASDr5yn.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-jY6jC3BV.js → use-mcp-prompts-CEtDj9VE.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Mwzjv5d5.js → use-mcp-tools-CLfN0BYV.js} +1 -1
- package/dist/client/assets/{use-mobile-CXjkLJXV.js → use-mobile-UoyYEGbQ.js} +1 -1
- package/dist/client/assets/{use-move-blocks-BezphGiA.js → use-move-blocks-CFb10aGP.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Ca0AM6dU.js → use-navigate-to-agent-C4y9eC4A.js} +1 -1
- package/dist/client/assets/{use-never-published-3e8P5w2U.js → use-never-published-D71BtZNY.js} +1 -1
- package/dist/client/assets/{use-org-fs-DJToHemI.js → use-org-fs-BAgR3Jkh.js} +1 -1
- package/dist/client/assets/{use-org-notice-CqRugXxv.js → use-org-notice-DQ7N3XWA.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-Dnk6X-sF.js → use-org-repo-syncs-C556S9To.js} +1 -1
- package/dist/client/assets/{use-org-sso-B9fQcdU5.js → use-org-sso-DrDj5K7f.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BXnCxXvc.js → use-organization-settings-BliP9B1t.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-DqHK2X0K.js → use-panel-navigate-db4k7dl4.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-C_zCk0Mn.js → use-project-native-view-presence-DPg5UqE1.js} +1 -1
- package/dist/client/assets/{use-project-scope-B8GBe8j5.js → use-project-scope-CFftAYVY.js} +1 -1
- package/dist/client/assets/{use-recent-apps-BXQ_yA3h.js → use-recent-apps-CS-hhWwQ.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-CzDDRLKl.js → use-reports-diagnostic-CYymDS51.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-mvMj89Hz.js → use-sandbox-events-rgvK0R-0.js} +1 -1
- package/dist/client/assets/{use-secrets-6QgXUAB1.js → use-secrets-Y_pjIaUL.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-CnRQgTii.js → use-section-preview-base-Bkq2jdsn.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-Bhjyugk_.js → use-sidebar-collapsed-BtrwP1AE.js} +1 -1
- package/dist/client/assets/{use-tags-C3m5Utp2.js → use-tags-CFlTqeDj.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-D-HdlATY.js → use-task-board-analytics-Bm2Eiqvn.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-Jj078C6N.js → use-task-board-item-prs-BCP6vVwh.js} +1 -1
- package/dist/client/assets/{use-task-board-items-BIdFRY0g.js → use-task-board-items-CQPrgy8Z.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-CVYzUDXL.js → use-task-board-prompts-CywAfsLX.js} +1 -1
- package/dist/client/assets/{use-task-metadata-wFPVfEVd.js → use-task-metadata-BIpPNwtn.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-Bgi0pYPV.js → use-thread-outputs-BMHx59-u.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-BAWxeU9h.js → use-view-draft-kind-DkapSxnZ.js} +1 -1
- package/dist/client/assets/{use-voice-input-Dw3q0_rk.js → use-voice-input-DyQL3diM.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-D5Avp4ip.js +1 -0
- package/dist/client/assets/{useQueries-xVTbcY2s.js → useQueries-Bay3GQsV.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BlIdZ7Pt.js +1 -0
- package/dist/client/assets/{users-jNR72ik_.js → users-DTrW9ZIm.js} +1 -1
- package/dist/client/assets/{utils-CKfi7wAo.js → utils-D1ABa-c2.js} +1 -1
- package/dist/client/assets/{variant-calendar-DdWtxg-c.js → variant-calendar-CK1882s5.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-BaB8G3CU.js → variant-matcher-override-y-sjVy0V.js} +1 -1
- package/dist/client/assets/{view-header-vZyp7GKr.js → view-header-CJ8vxIod.js} +1 -1
- package/dist/client/assets/{virtual-mcp-epGYXG_b.js → virtual-mcp-m1o-7tiO.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-DH6BdOFQ.js → watch-sse-pool-gEMXX-QL.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +626 -626
- package/package.json +1 -1
- package/dist/client/assets/agent-app-BWPeLsRO.js +0 -1
- package/dist/client/assets/agent-deck-TJWVLKHG.js +0 -1
- package/dist/client/assets/agent-experiments-DZPYs2jo.js +0 -1
- package/dist/client/assets/agent-file-BhEeotH0.js +0 -1
- package/dist/client/assets/agent-library-Br8kU4Bw.js +0 -1
- package/dist/client/assets/agent-library-file-RneUYp5m.js +0 -1
- package/dist/client/assets/agent-overview-Cr3VHGOr.js +0 -1
- package/dist/client/assets/agent-settings-CCVXOUdd.js +0 -1
- package/dist/client/assets/agent-site-editor-code-CC0tqUHv.js +0 -2
- package/dist/client/assets/agent-site-editor-content-DFS8PfaO.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-B8VaLdF7.js +0 -1
- package/dist/client/assets/agent-view-BtNkkNqE.js +0 -1
- package/dist/client/assets/api-keys-CbomE3sL.js +0 -1
- package/dist/client/assets/library-wlXXij9u.js +0 -1
- package/dist/client/assets/project-reports-CVc8aLqj.js +0 -1
- package/dist/client/assets/project-tasks-CRCq_bf1.js +0 -1
- package/dist/client/assets/record-editor-DzTdWm_J.js +0 -1
- package/dist/client/assets/reports-B2YHS-LL.js +0 -1
- package/dist/client/assets/repositories-Cy9WHEu1.js +0 -1
- package/dist/client/assets/roles-B2YZ-KtP.js +0 -1
- package/dist/client/assets/route-B5vGmg-f.js +0 -1
- package/dist/client/assets/settings-tab-CXM_5AKi.js +0 -1
- package/dist/client/assets/site-editor-B8tZmIJz.js +0 -1
- package/dist/client/assets/tasks-CIhUebQ4.js +0 -1
- package/dist/client/assets/use-ask-in-chat-zRlpEonj.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-DbMXPwlE.js +0 -1
- package/dist/client/assets/use-blog-view-lU9V3ZT8.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DQhOez7_.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CKEcGZqK.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,b as Z,J as X,a as q,r as z,j as r,aq as re,n as R,a4 as oe,h as ie}from"./index-0lR5HspR.js";import{ChatLayout as ne}from"./index-Df5ES5Qh.js";import{b as se}from"./input-Bu6nOsrP.js";import{D as ae,a as me}from"./chat-context-CyKULgZO.js";import{a as le}from"./use-organization-settings-BXnCxXvc.js";import{C as pe,u as ce,F as fe,R as ue,M as ge}from"./home-overview-vUj_qJFl.js";import{I as de}from"./icon-button-1KJ2Z_eZ.js";import{T as he,a as V}from"./toggle-group-D86mAn_-.js";import{a as xe}from"./Minimize01-DxOtSYxf.js";import{i as be}from"./sprints-C1z9xhcL.js";import{F as ye}from"./file-preview-DSm-7S4H.js";import{u as W,a as je}from"./use-org-fs-DJToHemI.js";import{L as Se}from"./preview-dialog-CC_aNvFo.js";import{t as _e,r as we,s as De}from"./daily-pulse-BmoCtcCb.js";import{N as ke}from"./new-project-dialog-cbFrLrDD.js";import{P as ve}from"./projects-empty-state-BRe70t7l.js";import{b as Be}from"./project-index-BTtphIo6.js";import{u as Ce}from"./use-inbox-feed-eisPu2tK.js";import{b as Ne}from"./use-recent-apps-BXQ_yA3h.js";import{s as Pe}from"./use-project-scope-B8GBe8j5.js";import{u as $e}from"./repository-binding-BbJCbkKW.js";import"./use-mobile-CXjkLJXV.js";import"./tooltip-Ck_nh9Yl.js";import"./index-dlWHc2Bm.js";import"./XClose-DzMWv_Uv.js";import"./thread-button-BzL6IgWO.js";import"./use-sidebar-collapsed-Bhjyugk_.js";import"./sheet-Cg9RqTZP.js";import"./use-chat-layout-state-C90_Sb0Z.js";import"./use-panel-navigate-DqHK2X0K.js";import"./thread-route-wSguGHHE.js";import"./toolbar-icon-button-CHq8HHsB.js";import"./use-in-settings-CedVK5pZ.js";import"./resizable-Q9JNFw76.js";import"./route-page-header-CFSeiSqP.js";import"./LayoutLeft-LSMf02jr.js";import"./use-current-view-B4f33lr-.js";import"./usage-stats-4bhjzDAy.js";import"./utils-CVEq3hMx.js";import"./markdown-CFFvPMSZ.js";import"./use-copy-ByVIiaB6.js";import"./agent-icon-DVY218yy.js";import"./AlertCircle-2biWQHtq.js";import"./UserCheck01-c0aRTosj.js";import"./Tool01-DaKVtiIV.js";import"./ArrowUp-BAWJsMTM.js";import"./ArrowLeft-stTwodlf.js";import"./ArrowRight-BThnPhTS.js";import"./BookOpen01-D1Av52an.js";import"./Globe04-DWyQ-g9h.js";import"./CheckCircle-BaFY7ptX.js";import"./TrendUp01-C3VEXl1_.js";import"./ChevronDown-D3VUgCNv.js";import"./ChevronSelectorVertical-Bk8Cwed4.js";import"./ChevronUp-Dj0hyz3c.js";import"./UserSquare-BAoPnOeW.js";import"./LinkBroken01-D3lrBb-W.js";import"./CreditCard01-CHbf8a10.js";import"./File02-B611JRAO.js";import"./SwitchHorizontal01-tHZa6eIg.js";import"./Eye-Cf3Bk97P.js";import"./Image01-B-xEsNge.js";import"./Key01-Cdz7yQHR.js";import"./Minus-CFKaTZ4w.js";import"./Monitor01-BCnTCiJw.js";import"./Sun-Co2EA9V9.js";import"./Play-DSNCWaN5.js";import"./Plus-DIi6CyTF.js";import"./SearchMd-Da2IZb-Y.js";import"./ShoppingBag01-C5xu34HU.js";import"./Trash01-DnGKoQaN.js";import"./Upload01-BOFi9m67.js";import"./Users01-ZvH6u4Ab.js";import"./Zap-OKenL_oO.js";import"./task-board-D3W1ksfo.js";import"./schema-DrjJ0xuK.js";import"./gateway-client-CeYZgY-b.js";import"./form-DSjQLmYE.js";import"./label-B79DRc98.js";import"./use-entitlements-BKyi7ehM.js";import"./file-type-icon-DZFXNty2.js";import"./use-view-draft-kind-BAWxeU9h.js";import"./use-blog-view-lU9V3ZT8.js";import"./thread-intent-DHvySkdI.js";import"./use-mcp-client-fkOuyPSB.js";import"./auth-YOK5D_Me.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DH6BdOFQ.js";import"./session-runtime-o7G6i_EW.js";import"./chat-draft-BmMlo1Yn.js";import"./use-voice-input-Dw3q0_rk.js";import"./popover-Z7qjkGnd.js";import"./drawer-B0J2YUt9.js";import"./use-ai-providers-srofbIvQ.js";import"./index-cVlGSMYO.js";import"./checkbox-B-Sq9kpD.js";import"./select-CwyDmqv5.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./tabs-DCkjYFxv.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-zRLku8zm.js";import"./input-CQkDYPsU.js";import"./suggestion-TAps9nbJ.js";import"./use-mcp-prompts-jY6jC3BV.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-Ds2ZQTiK.js";import"./plan-ladder-CUsbmRUg.js";import"./add-connection-dialog-D--FCKqG.js";import"./collection-search-oXbiEWDa.js";import"./extract-connection-data-PHmYu-pc.js";import"./metadata-D72DunRR.js";import"./connection-DppgioJv.js";import"./url-slug-D1b3rdRU.js";import"./connection-card-CAubDaDo.js";import"./useInfiniteQuery-DQhOez7_.js";import"./infiniteQueryObserver-D9dKA0TJ.js";import"./connection-slug-Dmg7T7Vj.js";import"./integration-icon-DHXcMFDo.js";import"./textarea-Du2m3jSM.js";import"./use-connection-C0q-jSdh.js";import"./schema-WZa17eyn.js";import"./connection-form-helpers-CltjtabR.js";import"./authenticate-and-persist-oauth-DCLMPjbk.js";import"./mcp-oauth-CVyeIX5s.js";import"./mcp-oauth-CK5Wc-Cr.js";import"./collection-tabs-DGdMH73g.js";import"./badge-u1zWRb7U.js";import"./use-infinite-scroll-Bv0m8I3M.js";import"./useSuspenseInfiniteQuery-CKEcGZqK.js";import"./use-task-board-items-BIdFRY0g.js";import"./use-decopilot-events-DgWMESxX.js";import"./connect-key-v6EnOAg0.js";import"./use-api-keys-CqWc5Y4J.js";import"./chart-mq3U8kNh.js";import"./CategoricalChart-DIEIRTlJ.js";import"./index-CYAyx9BI.js";import"./tooltipContext-B7aWO9LL.js";import"./CartesianChart-C5LAC6aj.js";import"./project-icon-BTCpO9jF.js";import"./project-apps-BwTy_4Nz.js";import"./config-CCA1XEo0.js";import"./task-key-h5EZIo5-.js";import"./task-route-CmUL8AUw.js";import"./ReferenceLine-BxF4v8QP.js";import"./utils-CKfi7wAo.js";import"./editor-C-kmJ80m.js";import"./preview-content-CVE5O8M2.js";import"./file-share-button-CYGVH_8S.js";import"./use-navigate-to-agent-Ca0AM6dU.js";import"./repository-picker-BVbH8azI.js";import"./github-icon-wM35FqKc.js";import"./use-debounced-value-0zlDzh2p.js";import"./new-project-store-BZX_mqKj.js";const O="home",Q="brief";function ee(e){return`users/${e}/brief`}function Ee(e,t){return`${e}/${t}.html`}function Fe(e){const t=String(e.getFullYear()).padStart(4,"0"),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}function Ie(e){if(!e.endsWith(".html"))return null;const t=e.slice(0,-5);return be(t)?t:null}const Te=7;function te(e,t){return Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/864e5)}function Me(e,t){let i=null;for(const s of e){const a=Ie(s);if(!a||i&&a<=i.day)continue;const n=te(a,t);n>=0&&n<Te&&(i={name:s,day:a})}return i}const K=e=>e.slice(e.lastIndexOf("/")+1);function J(e,t,i,s){const a=i.filter(o=>o.kind==="file"),n=Me(a.map(o=>K(o.path)),s),l=n&&a.find(o=>K(o.path)===n.name);return n&&l?{scope:e,path:Ee(t,n.day),filename:n.name,size:l.size,day:n.day,ageDays:te(n.day,s)}:null}function Ae({userId:e,personal:t,org:i,today:s}){return[e?J("personal",ee(e),t,s):null,J("org",Q,i,s)].filter(a=>a!==null)}function Le(e,t){return t===0?e("home.dailyBrief.today"):t===1?e("home.dailyBrief.yesterday"):e("home.dailyBrief.daysAgo",{count:t})}function He(e,t){return new Date(`${t}T12:00:00Z`).toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long",timeZone:"UTC"})}function Re(){const e=M.c(54),t=Z(),[i]=X(),{data:s}=q.useSession(),a=s?.user?.id,n=W(O,Q),l=a??"";let o;e[0]!==l?(o=ee(l),e[0]=l,e[1]=o):o=e[1];const D=!!a;let h;e[2]!==D?(h={enabled:D},e[2]=D,e[3]=h):h=e[3];const d=W(O,o,h),p=je(O),[k,v]=z.useState(null),[x,u]=z.useState(!1);let f,m,c,b,g,y,j,B,S,_;if(e[4]!==n.data||e[5]!==d.data||e[6]!==i||e[7]!==p||e[8]!==k||e[9]!==t||e[10]!==a){b=Symbol.for("react.early_return_sentinel");e:{const G=Ae({userId:a,personal:d.data??[],org:n.data??[],today:Fe(new Date)});if(m=G.find(T=>T.scope===k)??G[0],!m){b=null;break e}_="flex flex-col overflow-hidden surface";let A;e[21]!==t?(A=t("home.dailyBrief.title"),e[21]=t,e[22]=A):A=e[22];const U=r.jsxs("h2",{className:"flex min-w-0 items-baseline gap-2 text-[0.9rem] font-medium tracking-tight text-foreground",children:[A,r.jsxs("span",{className:"truncate text-xs font-normal text-muted-foreground",children:[Le(t,m.ageDays)," ·"," ",He(i.language,m.day)]})]}),Y=G.length>1&&r.jsxs(he,{type:"single",variant:"segmented",size:"sm",value:m.scope,onValueChange:T=>{(T==="personal"||T==="org")&&v(T)},children:[r.jsx(V,{value:"personal",className:"px-2.5 text-xs",children:t("home.dailyBrief.personal")}),r.jsx(V,{value:"org",className:"px-2.5 text-xs",children:t("home.dailyBrief.org")})]});let E;e[23]!==t?(E=t("home.dailyBrief.fullscreen"),e[23]=t,e[24]=E):E=e[24];let L,H;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=()=>u(!0),H=r.jsx(xe,{size:14}),e[25]=L,e[26]=H):(L=e[25],H=e[26]);let F;e[27]!==E?(F=r.jsx(de,{label:E,onClick:L,children:H}),e[27]=E,e[28]=F):F=e[28];let I;e[29]!==Y||e[30]!==F?(I=r.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[Y,F]}),e[29]=Y,e[30]=F,e[31]=I):I=e[31],e[32]!==U||e[33]!==I?(c=r.jsxs("div",{className:"flex h-12 items-center justify-between gap-3 border-b border-border/70 px-5",children:[U,I]}),e[32]=U,e[33]=I,e[34]=c):c=e[34],S="h-[32rem]",f=ye,g=m.path,y=m.filename,j=m.size,B=p(m.path)}e[4]=n.data,e[5]=d.data,e[6]=i,e[7]=p,e[8]=k,e[9]=t,e[10]=a,e[11]=f,e[12]=m,e[13]=c,e[14]=b,e[15]=g,e[16]=y,e[17]=j,e[18]=B,e[19]=S,e[20]=_}else f=e[11],m=e[12],c=e[13],b=e[14],g=e[15],y=e[16],j=e[17],B=e[18],S=e[19],_=e[20];if(b!==Symbol.for("react.early_return_sentinel"))return b;let w;e[35]!==g||e[36]!==y||e[37]!==j||e[38]!==B?(w={key:g,filename:y,size:j,downloadUrl:B},e[35]=g,e[36]=y,e[37]=j,e[38]=B,e[39]=w):w=e[39];let C;e[40]!==f||e[41]!==w?(C=r.jsx(f,{file:w}),e[40]=f,e[41]=w,e[42]=C):C=e[42];let N;e[43]!==C||e[44]!==S?(N=r.jsx("div",{className:S,children:C}),e[43]=C,e[44]=S,e[45]=N):N=e[45];let $;e[46]!==m||e[47]!==x?($=x&&r.jsx(Se,{previewPath:`${O}/${m.path}`,onClose:()=>u(!1),showSeeInLibrary:!0}),e[46]=m,e[47]=x,e[48]=$):$=e[48];let P;return e[49]!==c||e[50]!==N||e[51]!==$||e[52]!==_?(P=r.jsxs("section",{className:_,children:[c,N,$]}),e[49]=c,e[50]=N,e[51]=$,e[52]=_,e[53]=P):P=e[53],P}function Oe(e){return e<12?"morning":e<18?"afternoon":"evening"}function ze(e){const t=(e??"").trim().split(/\s+/)[0];return t||null}function Ge(e,t){return t.toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long"})}function Ue(e){return e==="morning"?"overnight":"today"}function Ye(e,t){const i=new Date(t);return i.setHours(0,0,0,0),e==="morning"&&i.setHours(-6),i.getTime()}const Ze={morning:{named:"home.orgHome.greetingMorning",bare:"home.orgHome.greetingMorningBare"},afternoon:{named:"home.orgHome.greetingAfternoon",bare:"home.orgHome.greetingAfternoonBare"},evening:{named:"home.orgHome.greetingEvening",bare:"home.orgHome.greetingEveningBare"}};function qe(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx("div",{className:"flex min-h-64 items-center justify-center",children:r.jsx(ie,{className:"size-5 text-muted-foreground"})}),e[0]=t):t=e[0],t}function Ve(e,t,i,s,a){const n=Ue(i)==="overnight",l=[];if(t>0){const o=e(t===1?"home.brief.changeOne":"home.brief.changeMany",{count:t});l.push(e(n?"home.brief.overnightShipped":"home.brief.todayShipped",{changes:o}))}else s===0&&l.push(e(a>0?"home.brief.working":n?"home.brief.quietNight":"home.brief.quietDay"));return l.push(s===0?e("home.brief.waitingNone"):e(s===1?"home.brief.waitingOne":"home.brief.waitingMany",{count:s})),l.join(" ")}function We(e){const t=M.c(41),{canManageProjects:i,eyebrow:s,greeting:a,slot:n}=e,l=Z(),{org:o}=oe(),{data:D}=q.useSession();let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h={pageSize:1e3},t[0]=h):h=t[0];const d=$e(h),p=ce(),k=Ce(),{recent:v}=Ne(o.slug);let x,u;if(t[1]!==d||t[2]!==i||t[3]!==o.id){u=Symbol.for("react.early_return_sentinel");e:{let N;t[6]!==o.id?(N=P=>P.id!==o.id,t[6]=o.id,t[7]=N):N=t[7];const $=Pe(d).filter(N);if($.length===0){let P;t[8]!==i?(P=r.jsx(ve,{canCreate:i}),t[8]=i,t[9]=P):P=t[9],u=P;break e}x=Be($)}t[1]=d,t[2]=i,t[3]=o.id,t[4]=x,t[5]=u}else x=t[4],u=t[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;const f=x;let m,c;t[10]!==D?.user?.id||t[11]!==n||t[12]!==l||t[13]!==p?(c=_e(p,D?.user?.id),m=Ve(l,De(p,Ye(n,new Date)),n,c.length,we(p).length),t[10]=D?.user?.id,t[11]=n,t[12]=l,t[13]=p,t[14]=m,t[15]=c):(m=t[14],c=t[15]);const b=m;let g;t[16]!==s?(g=r.jsx("span",{className:"text-xs text-muted-foreground",children:s}),t[16]=s,t[17]=g):g=t[17];let y;t[18]!==b||t[19]!==a?(y=r.jsxs("h1",{className:"max-w-[40ch] text-2xl font-medium text-balance text-foreground",children:[a," ",b]}),t[18]=b,t[19]=a,t[20]=y):y=t[20];let j;t[21]!==g||t[22]!==y?(j=r.jsxs("div",{className:"flex flex-col gap-1",children:[g,y]}),t[21]=g,t[22]=y,t[23]=j):j=t[23];let B;t[24]===Symbol.for("react.memo_cache_sentinel")?(B=r.jsx(Re,{}),t[24]=B):B=t[24];let S;t[25]!==k.updates||t[26]!==f||t[27]!==o.slug||t[28]!==p||t[29]!==c?(S=r.jsx(fe,{waiting:c,tasks:p,mentions:k.updates,index:f,orgSlug:o.slug}),t[25]=k.updates,t[26]=f,t[27]=o.slug,t[28]=p,t[29]=c,t[30]=S):S=t[30];let _;t[31]!==o.slug||t[32]!==v?(_=r.jsx(ue,{recent:v,orgSlug:o.slug}),t[31]=o.slug,t[32]=v,t[33]=_):_=t[33];let w;t[34]!==p?(w=r.jsx(ge,{tasks:p}),t[34]=p,t[35]=w):w=t[35];let C;return t[36]!==_||t[37]!==w||t[38]!==j||t[39]!==S?(C=r.jsxs("div",{className:"flex flex-col gap-8",children:[j,B,S,_,w]}),t[36]=_,t[37]=w,t[38]=j,t[39]=S,t[40]=C):C=t[40],C}function Ke(){const e=M.c(25),t=Z(),[i]=X(),s=le("home_task_intake_enabled"),{data:a}=q.useSession(),{granted:n}=re("agents:manage");let l,o,D;if(e[0]!==i.language||e[1]!==a?.user?.name||e[2]!==t){const c=new Date,b=ze(a?.user?.name);o=Oe(c.getHours());const g=Ze[o];l=Ge(i.language,c),D=b?t(g.named,{name:b}):t(g.bare),e[0]=i.language,e[1]=a?.user?.name,e[2]=t,e[3]=l,e[4]=o,e[5]=D}else l=e[3],o=e[4],D=e[5];const h=D;let d;e[6]!==n?(d=n&&r.jsx(ke,{source:"org_home_header"}),e[6]=n,e[7]=d):d=e[7];let p;e[8]!==d?(p=r.jsx(R.Actions,{children:d}),e[8]=d,e[9]=p):p=e[9];let k;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(pe,{}),e[10]=k):k=e[10];let v;e[11]!==s?(v=s&&r.jsx(z.Suspense,{fallback:null,children:r.jsx(ae,{children:r.jsx(me,{children:r.jsx(se,{homeTaskComposer:!0})})})}),e[11]=s,e[12]=v):v=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(qe,{}),e[13]=x):x=e[13];let u;e[14]!==n||e[15]!==l||e[16]!==h||e[17]!==o?(u=r.jsx(z.Suspense,{fallback:x,children:r.jsx(We,{canManageProjects:n,eyebrow:l,greeting:h,slot:o})}),e[14]=n,e[15]=l,e[16]=h,e[17]=o,e[18]=u):u=e[18];let f;e[19]!==v||e[20]!==u?(f=r.jsx(R.Content,{children:r.jsxs(R.Container,{width:"wide",className:"flex min-h-full flex-col gap-10",children:[k,v,u]})}),e[19]=v,e[20]=u,e[21]=f):f=e[21];let m;return e[22]!==p||e[23]!==f?(m=r.jsxs(R,{children:[p,f]}),e[22]=p,e[23]=f,e[24]=m):m=e[24],m}function Zo(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(ne.Content,{children:r.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{Zo as default};
|
|
1
|
+
import{c as M,b as Z,J as X,a as q,r as z,j as r,aq as re,n as R,a4 as oe,h as ie}from"./index-BfWp2Wnw.js";import{ChatLayout as ne}from"./index-DVC5Xh86.js";import{b as se}from"./input-BJ5cUSYm.js";import{D as ae,a as me}from"./chat-context-BUMEnIPW.js";import{a as le}from"./use-organization-settings-BliP9B1t.js";import{C as pe,u as ce,F as fe,R as ue,M as ge}from"./home-overview-CvjbBnOC.js";import{I as de}from"./icon-button-vJpGdaXv.js";import{T as he,a as V}from"./toggle-group-BgBCZLaa.js";import{a as xe}from"./Minimize01-BIynG3Ze.js";import{i as be}from"./sprints-C1z9xhcL.js";import{F as ye}from"./file-preview-DOlPWZsT.js";import{u as W,a as je}from"./use-org-fs-BAgR3Jkh.js";import{L as Se}from"./preview-dialog-Cded3kAU.js";import{t as _e,r as we,s as De}from"./daily-pulse-BIfjhIvm.js";import{N as ke}from"./new-project-dialog-B6Lwo0Gj.js";import{P as ve}from"./projects-empty-state-Dvqp2Zzy.js";import{b as Be}from"./project-index-COi5kduS.js";import{u as Ce}from"./use-inbox-feed-uWC2MWJH.js";import{b as Ne}from"./use-recent-apps-CS-hhWwQ.js";import{s as Pe}from"./use-project-scope-CFftAYVY.js";import{u as $e}from"./repository-binding-BDu0tU0n.js";import"./use-mobile-UoyYEGbQ.js";import"./tooltip-CqV-qcYU.js";import"./index-CvQo8gKP.js";import"./XClose-WYCPZpkD.js";import"./thread-button-Dy4pRky4.js";import"./use-sidebar-collapsed-BtrwP1AE.js";import"./sheet-DT44IVE2.js";import"./use-chat-layout-state-CS1wv5hl.js";import"./use-panel-navigate-db4k7dl4.js";import"./thread-route-Ds6Wombz.js";import"./toolbar-icon-button-CaY1wsmY.js";import"./use-in-settings-CRUM5hPE.js";import"./resizable-BArMfXUk.js";import"./route-page-header-BeG7kyQP.js";import"./LayoutLeft-CPMSR00X.js";import"./use-current-view-B5rf1h54.js";import"./usage-stats-BXxRbW0f.js";import"./utils-CVEq3hMx.js";import"./markdown-NetMLX1B.js";import"./use-copy-CCrC_M79.js";import"./agent-icon-Bq_Z7esB.js";import"./AlertCircle-mj0sz0gj.js";import"./UserCheck01-4mEtfdkD.js";import"./Tool01-Bscrvuft.js";import"./ArrowUp-D2bbOB2w.js";import"./ArrowLeft--TSM2Ux3.js";import"./ArrowRight-BVFSrvKf.js";import"./BookOpen01-CTUEdBiB.js";import"./Globe04-DhsnPBDD.js";import"./CheckCircle-BsBF4S8u.js";import"./TrendUp01-DMf7H3tv.js";import"./ChevronDown-CNlehUMA.js";import"./ChevronSelectorVertical-BdBrg7yc.js";import"./ChevronUp-BIaMfxq-.js";import"./UserSquare-oo1b4ulW.js";import"./LinkBroken01-CxV1rDqL.js";import"./CreditCard01-gHUc2u28.js";import"./File02-uZRQiPOp.js";import"./SwitchHorizontal01-qTGCOGX6.js";import"./Eye-Xo5rS9iJ.js";import"./Image01-C5Xqhwp5.js";import"./Key01-h9Y3uaT_.js";import"./Minus-D55MDhYc.js";import"./Monitor01-CBUOgSaC.js";import"./Sun-B-xu6eHR.js";import"./Play-zsnTCnBK.js";import"./Plus-DAYIm6ow.js";import"./SearchMd-CTSUPag9.js";import"./ShoppingBag01-CF4EYiC_.js";import"./Trash01-CevYpZEM.js";import"./Upload01-C_8HEOMT.js";import"./Users01-av_p4B03.js";import"./Zap-C-VVHO-P.js";import"./task-board-B-hxKp5U.js";import"./schema-BJIhJXy6.js";import"./gateway-client-CuVQGtSK.js";import"./form-CE_i7Gc_.js";import"./label-CWaQ3ANC.js";import"./use-entitlements-CQZj5lkl.js";import"./file-type-icon-Bw6tHUJI.js";import"./use-view-draft-kind-DkapSxnZ.js";import"./use-blog-view-9w6CHFwT.js";import"./thread-intent-BtcwbxTJ.js";import"./use-mcp-client-HASDr5yn.js";import"./auth-BOZ5swZI.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-gEMXX-QL.js";import"./session-runtime-DFmRKpVg.js";import"./chat-draft-B7hvjq7e.js";import"./use-voice-input-DyQL3diM.js";import"./popover-oFcDtUvN.js";import"./drawer-BtNmmbgW.js";import"./use-ai-providers-DgsrHLV3.js";import"./index-BFZAeRbT.js";import"./checkbox-BUvWR-iD.js";import"./select-BXZoshA8.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./tabs-DQRKyhjY.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-CuB-vVK3.js";import"./input-BNlFS4tL.js";import"./suggestion-BO6GNdWk.js";import"./use-mcp-prompts-CEtDj9VE.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-nyy14OlO.js";import"./plan-ladder-NC686t6f.js";import"./add-connection-dialog-CVC64Gmd.js";import"./collection-search-CMlKHTQ0.js";import"./extract-connection-data-jaNfclWY.js";import"./metadata-D72DunRR.js";import"./connection-CqG6Tj46.js";import"./url-slug-CTOX8lQF.js";import"./connection-card-CMRGPAUW.js";import"./useInfiniteQuery-D5Avp4ip.js";import"./infiniteQueryObserver-1nr0P0K0.js";import"./connection-slug-BMyTAhb7.js";import"./integration-icon-C4zzzxaS.js";import"./textarea-DAZ3avm9.js";import"./use-connection-Df8_gpBB.js";import"./schema-CI1Jg9rW.js";import"./connection-form-helpers-BliOgdtt.js";import"./authenticate-and-persist-oauth-Cj46Ik0_.js";import"./mcp-oauth-DOaDVyhA.js";import"./mcp-oauth-C138KPCE.js";import"./collection-tabs-ZW6Qb_Ul.js";import"./badge-CEYLDtOG.js";import"./use-infinite-scroll-Cz_t92ww.js";import"./useSuspenseInfiniteQuery-BlIdZ7Pt.js";import"./use-task-board-items-CQPrgy8Z.js";import"./use-decopilot-events-B7ke0MhO.js";import"./connect-key-BcTw1Dit.js";import"./use-api-keys-1S0yfr-w.js";import"./chart-Ef5OJL7Y.js";import"./CategoricalChart-_BlSk5IS.js";import"./index-BBKDsc5X.js";import"./tooltipContext-5-7GWaNH.js";import"./CartesianChart-DynFqoj3.js";import"./project-icon-WyFXKdgN.js";import"./project-apps-D28U2fPi.js";import"./config-CVrGKu1z.js";import"./task-key-DjK7Kw8s.js";import"./task-route-BwC6Um2K.js";import"./ReferenceLine-Ccilwreq.js";import"./utils-D1ABa-c2.js";import"./editor-DJNkhCaU.js";import"./preview-content-MbQf8RGA.js";import"./file-share-button-fnsd2V0Q.js";import"./use-navigate-to-agent-C4y9eC4A.js";import"./repository-picker-DKoD0HVQ.js";import"./github-icon-BBtraw32.js";import"./use-debounced-value-DFWDa0qH.js";import"./new-project-store-DQsI7Up8.js";const O="home",Q="brief";function ee(e){return`users/${e}/brief`}function Ee(e,t){return`${e}/${t}.html`}function Fe(e){const t=String(e.getFullYear()).padStart(4,"0"),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}function Ie(e){if(!e.endsWith(".html"))return null;const t=e.slice(0,-5);return be(t)?t:null}const Te=7;function te(e,t){return Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/864e5)}function Me(e,t){let i=null;for(const s of e){const a=Ie(s);if(!a||i&&a<=i.day)continue;const n=te(a,t);n>=0&&n<Te&&(i={name:s,day:a})}return i}const K=e=>e.slice(e.lastIndexOf("/")+1);function J(e,t,i,s){const a=i.filter(o=>o.kind==="file"),n=Me(a.map(o=>K(o.path)),s),l=n&&a.find(o=>K(o.path)===n.name);return n&&l?{scope:e,path:Ee(t,n.day),filename:n.name,size:l.size,day:n.day,ageDays:te(n.day,s)}:null}function Ae({userId:e,personal:t,org:i,today:s}){return[e?J("personal",ee(e),t,s):null,J("org",Q,i,s)].filter(a=>a!==null)}function Le(e,t){return t===0?e("home.dailyBrief.today"):t===1?e("home.dailyBrief.yesterday"):e("home.dailyBrief.daysAgo",{count:t})}function He(e,t){return new Date(`${t}T12:00:00Z`).toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long",timeZone:"UTC"})}function Re(){const e=M.c(54),t=Z(),[i]=X(),{data:s}=q.useSession(),a=s?.user?.id,n=W(O,Q),l=a??"";let o;e[0]!==l?(o=ee(l),e[0]=l,e[1]=o):o=e[1];const D=!!a;let h;e[2]!==D?(h={enabled:D},e[2]=D,e[3]=h):h=e[3];const d=W(O,o,h),p=je(O),[k,v]=z.useState(null),[x,u]=z.useState(!1);let f,m,c,b,g,y,j,B,S,_;if(e[4]!==n.data||e[5]!==d.data||e[6]!==i||e[7]!==p||e[8]!==k||e[9]!==t||e[10]!==a){b=Symbol.for("react.early_return_sentinel");e:{const G=Ae({userId:a,personal:d.data??[],org:n.data??[],today:Fe(new Date)});if(m=G.find(T=>T.scope===k)??G[0],!m){b=null;break e}_="flex flex-col overflow-hidden surface";let A;e[21]!==t?(A=t("home.dailyBrief.title"),e[21]=t,e[22]=A):A=e[22];const U=r.jsxs("h2",{className:"flex min-w-0 items-baseline gap-2 text-[0.9rem] font-medium tracking-tight text-foreground",children:[A,r.jsxs("span",{className:"truncate text-xs font-normal text-muted-foreground",children:[Le(t,m.ageDays)," ·"," ",He(i.language,m.day)]})]}),Y=G.length>1&&r.jsxs(he,{type:"single",variant:"segmented",size:"sm",value:m.scope,onValueChange:T=>{(T==="personal"||T==="org")&&v(T)},children:[r.jsx(V,{value:"personal",className:"px-2.5 text-xs",children:t("home.dailyBrief.personal")}),r.jsx(V,{value:"org",className:"px-2.5 text-xs",children:t("home.dailyBrief.org")})]});let E;e[23]!==t?(E=t("home.dailyBrief.fullscreen"),e[23]=t,e[24]=E):E=e[24];let L,H;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=()=>u(!0),H=r.jsx(xe,{size:14}),e[25]=L,e[26]=H):(L=e[25],H=e[26]);let F;e[27]!==E?(F=r.jsx(de,{label:E,onClick:L,children:H}),e[27]=E,e[28]=F):F=e[28];let I;e[29]!==Y||e[30]!==F?(I=r.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[Y,F]}),e[29]=Y,e[30]=F,e[31]=I):I=e[31],e[32]!==U||e[33]!==I?(c=r.jsxs("div",{className:"flex h-12 items-center justify-between gap-3 border-b border-border/70 px-5",children:[U,I]}),e[32]=U,e[33]=I,e[34]=c):c=e[34],S="h-[32rem]",f=ye,g=m.path,y=m.filename,j=m.size,B=p(m.path)}e[4]=n.data,e[5]=d.data,e[6]=i,e[7]=p,e[8]=k,e[9]=t,e[10]=a,e[11]=f,e[12]=m,e[13]=c,e[14]=b,e[15]=g,e[16]=y,e[17]=j,e[18]=B,e[19]=S,e[20]=_}else f=e[11],m=e[12],c=e[13],b=e[14],g=e[15],y=e[16],j=e[17],B=e[18],S=e[19],_=e[20];if(b!==Symbol.for("react.early_return_sentinel"))return b;let w;e[35]!==g||e[36]!==y||e[37]!==j||e[38]!==B?(w={key:g,filename:y,size:j,downloadUrl:B},e[35]=g,e[36]=y,e[37]=j,e[38]=B,e[39]=w):w=e[39];let C;e[40]!==f||e[41]!==w?(C=r.jsx(f,{file:w}),e[40]=f,e[41]=w,e[42]=C):C=e[42];let N;e[43]!==C||e[44]!==S?(N=r.jsx("div",{className:S,children:C}),e[43]=C,e[44]=S,e[45]=N):N=e[45];let $;e[46]!==m||e[47]!==x?($=x&&r.jsx(Se,{previewPath:`${O}/${m.path}`,onClose:()=>u(!1),showSeeInLibrary:!0}),e[46]=m,e[47]=x,e[48]=$):$=e[48];let P;return e[49]!==c||e[50]!==N||e[51]!==$||e[52]!==_?(P=r.jsxs("section",{className:_,children:[c,N,$]}),e[49]=c,e[50]=N,e[51]=$,e[52]=_,e[53]=P):P=e[53],P}function Oe(e){return e<12?"morning":e<18?"afternoon":"evening"}function ze(e){const t=(e??"").trim().split(/\s+/)[0];return t||null}function Ge(e,t){return t.toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long"})}function Ue(e){return e==="morning"?"overnight":"today"}function Ye(e,t){const i=new Date(t);return i.setHours(0,0,0,0),e==="morning"&&i.setHours(-6),i.getTime()}const Ze={morning:{named:"home.orgHome.greetingMorning",bare:"home.orgHome.greetingMorningBare"},afternoon:{named:"home.orgHome.greetingAfternoon",bare:"home.orgHome.greetingAfternoonBare"},evening:{named:"home.orgHome.greetingEvening",bare:"home.orgHome.greetingEveningBare"}};function qe(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx("div",{className:"flex min-h-64 items-center justify-center",children:r.jsx(ie,{className:"size-5 text-muted-foreground"})}),e[0]=t):t=e[0],t}function Ve(e,t,i,s,a){const n=Ue(i)==="overnight",l=[];if(t>0){const o=e(t===1?"home.brief.changeOne":"home.brief.changeMany",{count:t});l.push(e(n?"home.brief.overnightShipped":"home.brief.todayShipped",{changes:o}))}else s===0&&l.push(e(a>0?"home.brief.working":n?"home.brief.quietNight":"home.brief.quietDay"));return l.push(s===0?e("home.brief.waitingNone"):e(s===1?"home.brief.waitingOne":"home.brief.waitingMany",{count:s})),l.join(" ")}function We(e){const t=M.c(41),{canManageProjects:i,eyebrow:s,greeting:a,slot:n}=e,l=Z(),{org:o}=oe(),{data:D}=q.useSession();let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h={pageSize:1e3},t[0]=h):h=t[0];const d=$e(h),p=ce(),k=Ce(),{recent:v}=Ne(o.slug);let x,u;if(t[1]!==d||t[2]!==i||t[3]!==o.id){u=Symbol.for("react.early_return_sentinel");e:{let N;t[6]!==o.id?(N=P=>P.id!==o.id,t[6]=o.id,t[7]=N):N=t[7];const $=Pe(d).filter(N);if($.length===0){let P;t[8]!==i?(P=r.jsx(ve,{canCreate:i}),t[8]=i,t[9]=P):P=t[9],u=P;break e}x=Be($)}t[1]=d,t[2]=i,t[3]=o.id,t[4]=x,t[5]=u}else x=t[4],u=t[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;const f=x;let m,c;t[10]!==D?.user?.id||t[11]!==n||t[12]!==l||t[13]!==p?(c=_e(p,D?.user?.id),m=Ve(l,De(p,Ye(n,new Date)),n,c.length,we(p).length),t[10]=D?.user?.id,t[11]=n,t[12]=l,t[13]=p,t[14]=m,t[15]=c):(m=t[14],c=t[15]);const b=m;let g;t[16]!==s?(g=r.jsx("span",{className:"text-xs text-muted-foreground",children:s}),t[16]=s,t[17]=g):g=t[17];let y;t[18]!==b||t[19]!==a?(y=r.jsxs("h1",{className:"max-w-[40ch] text-2xl font-medium text-balance text-foreground",children:[a," ",b]}),t[18]=b,t[19]=a,t[20]=y):y=t[20];let j;t[21]!==g||t[22]!==y?(j=r.jsxs("div",{className:"flex flex-col gap-1",children:[g,y]}),t[21]=g,t[22]=y,t[23]=j):j=t[23];let B;t[24]===Symbol.for("react.memo_cache_sentinel")?(B=r.jsx(Re,{}),t[24]=B):B=t[24];let S;t[25]!==k.updates||t[26]!==f||t[27]!==o.slug||t[28]!==p||t[29]!==c?(S=r.jsx(fe,{waiting:c,tasks:p,mentions:k.updates,index:f,orgSlug:o.slug}),t[25]=k.updates,t[26]=f,t[27]=o.slug,t[28]=p,t[29]=c,t[30]=S):S=t[30];let _;t[31]!==o.slug||t[32]!==v?(_=r.jsx(ue,{recent:v,orgSlug:o.slug}),t[31]=o.slug,t[32]=v,t[33]=_):_=t[33];let w;t[34]!==p?(w=r.jsx(ge,{tasks:p}),t[34]=p,t[35]=w):w=t[35];let C;return t[36]!==_||t[37]!==w||t[38]!==j||t[39]!==S?(C=r.jsxs("div",{className:"flex flex-col gap-8",children:[j,B,S,_,w]}),t[36]=_,t[37]=w,t[38]=j,t[39]=S,t[40]=C):C=t[40],C}function Ke(){const e=M.c(25),t=Z(),[i]=X(),s=le("home_task_intake_enabled"),{data:a}=q.useSession(),{granted:n}=re("agents:manage");let l,o,D;if(e[0]!==i.language||e[1]!==a?.user?.name||e[2]!==t){const c=new Date,b=ze(a?.user?.name);o=Oe(c.getHours());const g=Ze[o];l=Ge(i.language,c),D=b?t(g.named,{name:b}):t(g.bare),e[0]=i.language,e[1]=a?.user?.name,e[2]=t,e[3]=l,e[4]=o,e[5]=D}else l=e[3],o=e[4],D=e[5];const h=D;let d;e[6]!==n?(d=n&&r.jsx(ke,{source:"org_home_header"}),e[6]=n,e[7]=d):d=e[7];let p;e[8]!==d?(p=r.jsx(R.Actions,{children:d}),e[8]=d,e[9]=p):p=e[9];let k;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(pe,{}),e[10]=k):k=e[10];let v;e[11]!==s?(v=s&&r.jsx(z.Suspense,{fallback:null,children:r.jsx(ae,{children:r.jsx(me,{children:r.jsx(se,{homeTaskComposer:!0})})})}),e[11]=s,e[12]=v):v=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(qe,{}),e[13]=x):x=e[13];let u;e[14]!==n||e[15]!==l||e[16]!==h||e[17]!==o?(u=r.jsx(z.Suspense,{fallback:x,children:r.jsx(We,{canManageProjects:n,eyebrow:l,greeting:h,slot:o})}),e[14]=n,e[15]=l,e[16]=h,e[17]=o,e[18]=u):u=e[18];let f;e[19]!==v||e[20]!==u?(f=r.jsx(R.Content,{children:r.jsxs(R.Container,{width:"wide",className:"flex min-h-full flex-col gap-10",children:[k,v,u]})}),e[19]=v,e[20]=u,e[21]=f):f=e[21];let m;return e[22]!==p||e[23]!==f?(m=r.jsxs(R,{children:[p,f]}),e[22]=p,e[23]=f,e[24]=m):m=e[24],m}function Zo(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(ne.Content,{children:r.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{Zo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as A,b as B,a4 as Q,aq as ne,j as o,m as K,L as P,E as V,ak as oe,V as re,h as ae,ae as ie,$ as le,o as ce}from"./index-0lR5HspR.js";import{i as Z}from"./ArrowRight-BThnPhTS.js";import{C as me,a as fe,b as de,c as ue}from"./connect-key-v6EnOAg0.js";import{u as xe}from"./use-api-keys-CqWc5Y4J.js";import{u as pe,t as ge}from"./use-task-board-items-BIdFRY0g.js";import{i as he}from"./AlertCircle-2biWQHtq.js";import{i as H}from"./CheckCircle-BaFY7ptX.js";import{s as je}from"./Eye-Cf3Bk97P.js";import{u as ve,A as ke}from"./agent-icon-DVY218yy.js";import{C as be,a as we,B as ye,b as Ne,c as _e}from"./chart-mq3U8kNh.js";import{P as Se}from"./project-icon-BTCpO9jF.js";import{T as X,P as Ce,A as Ie}from"./project-apps-BwTy_4Nz.js";import{a as Te}from"./config-CCA1XEo0.js";import{t as ze}from"./task-route-CmUL8AUw.js";import{p as $e}from"./project-index-BTtphIo6.js";import{a as Re,b as Ee,c as Ae,d as Me,R as F,f as G}from"./daily-pulse-BmoCtcCb.js";import{R as De}from"./ReferenceLine-BxF4v8QP.js";import{C as Le,X as Be,Y as Ke}from"./CartesianChart-C5LAC6aj.js";const ee=[{name:"Claude",Icon:me,size:[11,14],bg:"#D97757",fg:"#fff"},{name:"Cursor",Icon:fe,size:[10,12],bg:"#000",fg:"#fff"},{name:"Codex",Icon:de,size:[10,12],bg:"#4F46E5",fg:"#fff"}];function wt(t){const e=A.c(22),{dense:a}=t,s=a===void 0?!0:a,l=B(),{org:n}=Q();let i;e[0]!==n.slug?(i={org:n.slug},e[0]=n.slug,e[1]=i):i=e[1];const c=s?"h-7 shrink-0 gap-x-2 whitespace-nowrap pl-3 pr-1.5":"flex-wrap gap-x-3 gap-y-2 py-1.5 pl-4 pr-2.5";let r;e[2]!==c?(r=K("group hidden max-w-full @3xl/panel-header:inline-flex items-center justify-center rounded-full bg-card text-sm shadow-edge transition-colors hover:bg-accent",c),e[2]=c,e[3]=r):r=e[3];let m;e[4]!==l?(m=l("home.orgHome.connectPill"),e[4]=l,e[5]=m):m=e[5];let d;e[6]!==m?(d=o.jsx("span",{className:"font-medium text-foreground",children:m}),e[6]=m,e[7]=d):d=e[7];let f;e[8]!==s?(f=ee.map(j=>{const{name:v,Icon:z,size:_,bg:S,fg:$}=j;return o.jsx("span",{title:v,className:K("flex items-center justify-center rounded-full",s?"size-5":"size-6"),style:{backgroundColor:S,color:$},children:o.jsx(z,{size:s?_[0]:_[1]})},v)}),e[8]=s,e[9]=f):f=e[9];let u;e[10]!==f?(u=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:f}),e[10]=f,e[11]=u):u=e[11];const x=s?"size-3":"size-3.5";let p;e[12]!==x?(p=K(x,"shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"),e[12]=x,e[13]=p):p=e[13];let g;e[14]!==p?(g=o.jsx(Z,{className:p}),e[14]=p,e[15]=g):g=e[15];let h;return e[16]!==g||e[17]!==i||e[18]!==r||e[19]!==d||e[20]!==u?(h=o.jsxs(P,{to:"/$org/settings/connect",params:i,onClick:Oe,className:r,children:[d,u,g]}),e[16]=g,e[17]=i,e[18]=r,e[19]=d,e[20]=u,e[21]=h):h=e[21],h}function Oe(){return V("connect_clients_opened",{source:"org_home"})}function yt(){const t=A.c(13),e=B(),{org:a}=Q(),{granted:s}=ne("api-keys:manage");let l;t[0]!==s?(l={enabled:s},t[0]=s,t[1]=l):l=t[1];const{data:n}=xe(l);if(s&&!n||n?.some(Fe))return null;let i;t[2]!==a.slug?(i={org:a.slug},t[2]=a.slug,t[3]=i):i=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:ee.map(Ye)}),t[4]=c):c=t[4];let r;t[5]!==e?(r=e("home.orgHome.connectPill"),t[5]=e,t[6]=r):r=t[6];let m;t[7]!==r?(m=o.jsx("span",{className:"font-medium text-foreground",children:r}),t[7]=r,t[8]=m):m=t[8];let d;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Z,{className:"ml-auto size-3.5 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),t[9]=d):d=t[9];let f;return t[10]!==i||t[11]!==m?(f=o.jsxs(P,{to:"/$org/settings/connect",params:i,onClick:Pe,className:"group hidden items-center gap-3 rounded-xl bg-card px-4 py-2.5 text-sm shadow-edge transition-colors hover:bg-accent md:flex",children:[c,m,d]}),t[10]=i,t[11]=m,t[12]=f):f=t[12],f}function Ye(t){const{name:e,Icon:a,size:s,bg:l,fg:n}=t;return o.jsx("span",{className:"flex size-5 items-center justify-center rounded-full",style:{backgroundColor:l,color:n},children:o.jsx(a,{size:s[0]})},e)}function Pe(){return V("connect_clients_opened",{source:"org_home"})}function Fe(t){return t.name.startsWith(ue)}function Nt(){const t=A.c(3),{locator:e}=Q(),a=oe();pe();let s;t[0]!==e||t[1]!==a?(s=ge(e,a),t[0]=e,t[1]=a,t[2]=s):s=t[2];const{data:l}=re(s);return l.items}function _t(t){const e=A.c(16),{recent:a,orgSlug:s}=t,l=B();let n,i,c,r;if(e[0]!==s||e[1]!==a||e[2]!==l){r=Symbol.for("react.early_return_sentinel");e:{let d;e[7]!==s||e[8]!==l?(d=u=>{const x={org:s,agentId:u.projectId};if(u.connection){const{label:g,icon:h,id:j,toolName:v}=u.connection;return[{key:`${j}:${v}:${u.projectId}`,label:g,project:u.projectTitle,link:{to:le.app,params:{...x,connectionId:j,toolName:v}},glyph:o.jsx(ke,{icon:h,name:g,size:"md",className:X})}]}const p=Ce[u.app];return p?[{key:`${u.app}:${u.projectId}`,label:l(p.labelKey),project:u.projectTitle,link:{to:p.to,params:x},glyph:o.jsx("span",{className:K(X,"flex items-center",p.tone),children:o.jsx(p.Icon,{size:24})})}]:[]},e[7]=s,e[8]=l,e[9]=d):d=e[9];const f=a.slice(0,8).flatMap(d);if(f.length===0){r=null;break e}n=Ie,e[10]!==l?(i=l("home.overview.recentApps"),e[10]=l,e[11]=i):i=e[11],c=f.map(Ue)}e[0]=s,e[1]=a,e[2]=l,e[3]=n,e[4]=i,e[5]=c,e[6]=r}else n=e[3],i=e[4],c=e[5],r=e[6];if(r!==Symbol.for("react.early_return_sentinel"))return r;let m;return e[12]!==n||e[13]!==i||e[14]!==c?(m=o.jsx(n,{title:i,children:c}),e[12]=n,e[13]=i,e[14]=c,e[15]=m):m=e[15],m}function Ue(t){return o.jsxs(P,{to:t.link.to,params:t.link.params,className:"group flex shrink-0 flex-col items-center gap-2.5 rounded-xl p-3 text-center transition-[background-color,transform] duration-150 ease-out hover:bg-accent active:scale-[0.97]",children:[t.glyph,o.jsxs("span",{className:"flex w-full min-w-0 flex-col",children:[o.jsx("span",{className:"line-clamp-2 text-xs font-medium break-words text-foreground",children:t.label}),o.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.project})]})]},t.key)}function qe(t,e){return{to:ie.tasks,params:{org:t,taskKey:ze(t,e)}}}const He={answer:{Icon:ve,tone:"text-warning",reasonKey:"home.needsYou.reasonAnswer"},failed:{Icon:he,tone:"text-destructive",reasonKey:"home.overview.reasonFailed"},review:{Icon:je,tone:"text-warning",reasonKey:"home.needsYou.reasonReview"},running:{Icon:H,tone:"text-muted-foreground",reasonKey:"home.overview.reasonRunning"},assigned:{Icon:H,tone:"text-muted-foreground",reasonKey:"home.needsYou.reasonAssigned"}},J=["answer","failed","review","running","assigned"];function Qe(t,e){const a=new Set,s=[],l=(n,i)=>{a.has(n.id)||(a.add(n.id),s.push({task:n,kind:i}))};for(const n of t)l(n,Re(n));for(const n of e){if(n.status==="done"||n.status==="archived")continue;const i=Te(n);i==="failed"?l(n,"failed"):i==="running"&&l(n,"running")}return s.sort((n,i)=>J.indexOf(n.kind)-J.indexOf(i.kind))}function Xe(t,e){const a=new Map;for(const r of e){if(r.action!=="mentioned"&&r.action!=="commented")continue;const m=a.get(r.taskBoardItemId);(!m||m.action!=="mentioned"&&r.action==="mentioned")&&a.set(r.taskBoardItemId,r)}const s=new Set(t.map(r=>r.task.id)),l=[...a.values()].filter(r=>!s.has(r.taskBoardItemId)).map(r=>({kind:"mention",task:null,mention:r})),n=t.map(({task:r,kind:m})=>({kind:m,task:r,mention:a.get(r.id)??null})),i=n.filter(r=>r.kind==="answer"),c=n.filter(r=>r.kind!=="answer");return[...i,...l,...c]}const Ge=7;function W(t){const e=A.c(6),{mention:a}=t,s=B();let l;e[0]!==a.actorName||e[1]!==s?(l=a.actorName??s("home.overview.someone"),e[0]=a.actorName,e[1]=s,e[2]=l):l=e[2];const n=l,i=a.actorImage??void 0;let c;return e[3]!==n||e[4]!==i?(c=o.jsx(ce,{url:i,fallback:n,shape:"circle",size:"2xs"}),e[3]=n,e[4]=i,e[5]=c):c=e[5],c}function Je(t,e){const a=t.actorName??e("home.overview.someone");return e(t.action==="mentioned"?"home.overview.mentioned":"home.overview.commented",{actor:a})}function St(t){const e=A.c(12),{waiting:a,tasks:s,mentions:l,index:n,orgSlug:i}=t,c=B();let r;if(e[0]!==n||e[1]!==l||e[2]!==i||e[3]!==c||e[4]!==s||e[5]!==a){const m=Xe(Qe(a,s),l);let d;e[7]!==c?(d=c("home.overview.forYou"),e[7]=c,e[8]=d):d=e[8];const f=m.length>0&&o.jsx("span",{className:"text-muted-foreground tabular-nums",children:m.length});let u;e[9]!==d||e[10]!==f?(u=o.jsxs("h2",{className:"flex items-center gap-2 px-2 pt-1 pb-1 text-sm font-medium text-foreground",children:[d,f]}),e[9]=d,e[10]=f,e[11]=u):u=e[11],r=o.jsxs("section",{className:"flex flex-col gap-2 surface p-3",children:[u,m.length===0?o.jsxs("div",{className:"flex flex-col items-center gap-3 px-2 py-10 text-center",children:[o.jsx("span",{className:"flex size-10 items-center justify-center rounded-full bg-success/10 text-success",children:o.jsx(H,{size:20})}),o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("p",{className:"text-sm font-medium text-foreground",children:c("home.overview.allClearTitle")}),o.jsx("p",{className:"text-sm text-muted-foreground",children:c("home.overview.allClearDescription")})]})]}):o.jsx("div",{className:"flex flex-col",children:m.slice(0,Ge).map(x=>{const p=x.kind==="mention"?{id:x.mention.taskBoardItemId,keySeq:x.mention.taskKeySeq,title:x.mention.taskTitle}:x.task,g=x.task?$e(x.task,n):null,h=x.kind==="mention"?null:He[x.kind],j=x.mention?Je(x.mention,c):h?c(h.reasonKey):"";return o.jsxs(P,{...qe(i,p),className:"group flex h-10 items-center gap-3 rounded-lg px-2 transition-colors hover:bg-accent",children:[o.jsx("span",{className:K("flex size-4 shrink-0 items-center justify-center",h?.tone),children:x.kind==="mention"?o.jsx(W,{mention:x.mention}):x.kind==="running"?o.jsx(ae,{className:"size-3.5"}):h?o.jsx(h.Icon,{size:16}):null}),o.jsx("span",{className:"min-w-0 truncate text-sm text-foreground",children:p.title}),o.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 text-sm text-muted-foreground",children:[x.kind!=="mention"&&x.mention&&o.jsx(W,{mention:x.mention}),o.jsx("span",{className:"truncate",children:j})]}),g&&o.jsxs("span",{className:"hidden max-w-48 shrink-0 items-center gap-1.5 text-xs text-muted-foreground md:flex",children:[o.jsx(Se,{icon:g.icon,name:g.title}),o.jsx("span",{className:"truncate",children:g.title})]})]},p.id)})})]}),e[0]=n,e[1]=l,e[2]=i,e[3]=c,e[4]=s,e[5]=a,e[6]=r}else r=e[6];return r}function We(t){if(t<=0)return 1;const e=10**Math.floor(Math.log10(t));for(const a of[1,2,2.5,5,10])if(a*e>=t)return a*e;return 10*e}const Ve=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function U(t){const e=A.c(52),{series:a,start:s,format:l,label:n,averageLabel:i}=t,c=We(Math.max(...a,0));let r;e[0]!==a?(r=a.length===0?0:a.reduce(et,0)/a.length,e[0]=a,e[1]=r):r=e[1];const m=r;let d;if(e[2]!==a||e[3]!==s){let E;e[5]!==s?(E=(te,se)=>({day:Ve.format(new Date(s.getTime()+se*864e5)),value:te}),e[5]=s,e[6]=E):E=e[6],d=a.map(E),e[2]=a,e[3]=s,e[4]=d}else d=e[4];const f=d,u=Math.max(f.length-1,0),x=f[0]?.day;let p;e[7]!==u||e[8]!==f?(p=f[Math.round(u/2)]?.day,e[7]=u,e[8]=f,e[9]=p):p=e[9];const g=f[u]?.day;let h;e[10]!==x||e[11]!==p||e[12]!==g?(h=[x,p,g].filter(Ze),e[10]=x,e[11]=p,e[12]=g,e[13]=h):h=e[13];const j=h;let v;e[14]!==n?(v={value:{label:n,color:"var(--chart-1)"}},e[14]=n,e[15]=v):v=e[15];const z=v;let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_={top:8,right:0,bottom:0,left:0},e[16]=_):_=e[16];let S;e[17]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsx(Le,{vertical:!1,strokeDasharray:"4 4",stroke:"var(--border)"}),e[17]=S):S=e[17];let $,R;e[18]===Symbol.for("react.memo_cache_sentinel")?($={stroke:"var(--border)"},R={fontSize:12,fill:"var(--muted-foreground)"},e[18]=$,e[19]=R):($=e[18],R=e[19]);let b;e[20]!==j?(b=o.jsx(Be,{dataKey:"day",ticks:j,interval:"preserveStartEnd",tickLine:!1,axisLine:$,tick:R,tickMargin:8}),e[20]=j,e[21]=b):b=e[21];let I;e[22]!==c?(I=[0,c],e[22]=c,e[23]=I):I=e[23];const T=c/2;let w;e[24]!==c||e[25]!==T?(w=[0,T,c],e[24]=c,e[25]=T,e[26]=w):w=e[26];let y;e[27]!==l?(y=E=>E===0?"0":l(E),e[27]=l,e[28]=y):y=e[28];let M;e[29]===Symbol.for("react.memo_cache_sentinel")?(M={fontSize:12,fill:"var(--muted-foreground)"},e[29]=M):M=e[29];let N;e[30]!==I||e[31]!==w||e[32]!==y?(N=o.jsx(Ke,{orientation:"right",domain:I,ticks:w,tickFormatter:y,tickLine:!1,axisLine:!1,tick:M,width:44}),e[30]=I,e[31]=w,e[32]=y,e[33]=N):N=e[33];let C;e[34]===Symbol.for("react.memo_cache_sentinel")?(C={fill:"var(--muted)",opacity:.6},e[34]=C):C=e[34];let k;e[35]!==l||e[36]!==n?(k=o.jsx(be,{cursor:C,content:o.jsx(we,{indicator:"line",formatter:E=>o.jsxs("div",{className:"flex flex-1 items-center justify-between gap-3 leading-none",children:[o.jsx("span",{className:"text-muted-foreground",children:n}),o.jsx("span",{className:"font-medium text-foreground tabular-nums",children:l(Number(E))})]})})}),e[35]=l,e[36]=n,e[37]=k):k=e[37];let D;e[38]!==m||e[39]!==i||e[40]!==l?(D=m>0&&o.jsx(De,{y:m,stroke:"var(--foreground)",strokeOpacity:.6,strokeDasharray:"2 2",label:{value:i(l(m)),position:"insideBottomLeft",fontSize:12,fill:"var(--foreground)"}}),e[38]=m,e[39]=i,e[40]=l,e[41]=D):D=e[41];let O;e[42]===Symbol.for("react.memo_cache_sentinel")?(O=o.jsx(ye,{dataKey:"value",fill:"var(--color-value)",radius:[2,2,0,0],maxBarSize:4,animationDuration:300}),e[42]=O):O=e[42];let L;e[43]!==f||e[44]!==b||e[45]!==N||e[46]!==k||e[47]!==D?(L=o.jsxs(Ne,{data:f,margin:_,barCategoryGap:"30%",children:[S,b,N,k,D,O]}),e[43]=f,e[44]=b,e[45]=N,e[46]=k,e[47]=D,e[48]=L):L=e[48];let Y;return e[49]!==z||e[50]!==L?(Y=o.jsx(_e,{config:z,className:"aspect-auto h-[159px] w-full",children:L}),e[49]=z,e[50]=L,e[51]=Y):Y=e[51],Y}function Ze(t){return!!t}function et(t,e){return t+e}function q(t){const e=A.c(10),{label:a,value:s,chart:l}=t;let n;e[0]!==a?(n=o.jsx("span",{className:"text-sm font-medium text-foreground",children:a}),e[0]=a,e[1]=n):n=e[1];let i;e[2]!==s?(i=o.jsx("span",{className:"text-[32px] leading-none font-medium tracking-tight tabular-nums text-foreground",children:s}),e[2]=s,e[3]=i):i=e[3];let c;e[4]!==n||e[5]!==i?(c=o.jsxs("div",{className:"flex flex-col gap-2.5",children:[n,i]}),e[4]=n,e[5]=i,e[6]=c):c=e[6];let r;return e[7]!==l||e[8]!==c?(r=o.jsxs("section",{className:"flex flex-col gap-6 surface p-5",children:[c,l]}),e[7]=l,e[8]=c,e[9]=r):r=e[9],r}function Ct(t){const e=A.c(58),{tasks:a}=t,s=B();let l,n,i,c,r,m,d,f,u;if(e[0]!==s||e[1]!==a){const j=Ee(a,F),v=Ae(a,F);i=Me(a);const z=st;let _,S;if(e[11]===Symbol.for("react.memo_cache_sentinel")){const k=new Date;S=new Date(k.getFullYear(),k.getMonth(),k.getDate()-(F-1)),_=new Date(k.getFullYear(),k.getMonth(),1),e[11]=_,e[12]=S}else _=e[11],S=e[12];c=_;const $=tt;let R;e[13]!==s?(R=k=>s("home.overview.average",{value:k}),e[13]=s,e[14]=R):R=e[14],n=R,d="grid gap-4 md:grid-cols-3";let b;e[15]!==s?(b=s("home.overview.delivered"),e[15]=s,e[16]=b):b=e[16];const I=String(z(j));let T;e[17]!==s?(T=s("home.overview.delivered"),e[17]=s,e[18]=T):T=e[18];let w;e[19]!==n||e[20]!==j||e[21]!==T?(w=o.jsx(U,{label:T,series:j,start:S,format:$,averageLabel:n}),e[19]=n,e[20]=j,e[21]=T,e[22]=w):w=e[22],e[23]!==w||e[24]!==b||e[25]!==I?(f=o.jsx(q,{label:b,value:I,chart:w}),e[23]=w,e[24]=b,e[25]=I,e[26]=f):f=e[26];let y;e[27]!==s?(y=s("home.overview.agentRuns"),e[27]=s,e[28]=y):y=e[28];const M=String(z(v));let N;e[29]!==s?(N=s("home.overview.agentRuns"),e[29]=s,e[30]=N):N=e[30];let C;e[31]!==n||e[32]!==v||e[33]!==N?(C=o.jsx(U,{label:N,series:v,start:S,format:$,averageLabel:n}),e[31]=n,e[32]=v,e[33]=N,e[34]=C):C=e[34],e[35]!==y||e[36]!==M||e[37]!==C?(u=o.jsx(q,{label:y,value:M,chart:C}),e[35]=y,e[36]=M,e[37]=C,e[38]=u):u=e[38],l=q,e[39]!==s?(r=s("home.overview.agentCost"),e[39]=s,e[40]=r):r=e[40],m=G(z(i)),e[0]=s,e[1]=a,e[2]=l,e[3]=n,e[4]=i,e[5]=c,e[6]=r,e[7]=m,e[8]=d,e[9]=f,e[10]=u}else l=e[2],n=e[3],i=e[4],c=e[5],r=e[6],m=e[7],d=e[8],f=e[9],u=e[10];let x;e[41]!==s?(x=s("home.overview.agentCost"),e[41]=s,e[42]=x):x=e[42];let p;e[43]!==n||e[44]!==i||e[45]!==c||e[46]!==x?(p=o.jsx(U,{label:x,series:i,start:c,format:G,averageLabel:n}),e[43]=n,e[44]=i,e[45]=c,e[46]=x,e[47]=p):p=e[47];let g;e[48]!==l||e[49]!==r||e[50]!==m||e[51]!==p?(g=o.jsx(l,{label:r,value:m,chart:p}),e[48]=l,e[49]=r,e[50]=m,e[51]=p,e[52]=g):g=e[52];let h;return e[53]!==d||e[54]!==f||e[55]!==u||e[56]!==g?(h=o.jsxs("div",{className:d,children:[f,u,g]}),e[53]=d,e[54]=f,e[55]=u,e[56]=g,e[57]=h):h=e[57],h}function tt(t){return String(Math.round(t*10)/10)}function st(t){return t.reduce(nt,0)}function nt(t,e){return t+e}export{yt as C,St as F,Ct as M,_t as R,wt as a,Nt as u};
|
|
1
|
+
import{c as A,b as B,a4 as Q,aq as ne,j as o,m as K,L as P,E as V,ak as oe,V as re,h as ae,ae as ie,$ as le,o as ce}from"./index-BfWp2Wnw.js";import{i as Z}from"./ArrowRight-BVFSrvKf.js";import{C as me,a as fe,b as de,c as ue}from"./connect-key-BcTw1Dit.js";import{u as xe}from"./use-api-keys-1S0yfr-w.js";import{u as pe,t as ge}from"./use-task-board-items-CQPrgy8Z.js";import{i as he}from"./AlertCircle-mj0sz0gj.js";import{i as H}from"./CheckCircle-BsBF4S8u.js";import{s as je}from"./Eye-Xo5rS9iJ.js";import{u as ve,A as ke}from"./agent-icon-Bq_Z7esB.js";import{C as be,a as we,B as ye,b as Ne,c as _e}from"./chart-Ef5OJL7Y.js";import{P as Se}from"./project-icon-WyFXKdgN.js";import{T as X,P as Ce,A as Ie}from"./project-apps-D28U2fPi.js";import{a as Te}from"./config-CVrGKu1z.js";import{t as ze}from"./task-route-BwC6Um2K.js";import{p as $e}from"./project-index-COi5kduS.js";import{a as Re,b as Ee,c as Ae,d as Me,R as F,f as G}from"./daily-pulse-BIfjhIvm.js";import{R as De}from"./ReferenceLine-Ccilwreq.js";import{C as Le,X as Be,Y as Ke}from"./CartesianChart-DynFqoj3.js";const ee=[{name:"Claude",Icon:me,size:[11,14],bg:"#D97757",fg:"#fff"},{name:"Cursor",Icon:fe,size:[10,12],bg:"#000",fg:"#fff"},{name:"Codex",Icon:de,size:[10,12],bg:"#4F46E5",fg:"#fff"}];function wt(t){const e=A.c(22),{dense:a}=t,s=a===void 0?!0:a,l=B(),{org:n}=Q();let i;e[0]!==n.slug?(i={org:n.slug},e[0]=n.slug,e[1]=i):i=e[1];const c=s?"h-7 shrink-0 gap-x-2 whitespace-nowrap pl-3 pr-1.5":"flex-wrap gap-x-3 gap-y-2 py-1.5 pl-4 pr-2.5";let r;e[2]!==c?(r=K("group hidden max-w-full @3xl/panel-header:inline-flex items-center justify-center rounded-full bg-card text-sm shadow-edge transition-colors hover:bg-accent",c),e[2]=c,e[3]=r):r=e[3];let m;e[4]!==l?(m=l("home.orgHome.connectPill"),e[4]=l,e[5]=m):m=e[5];let d;e[6]!==m?(d=o.jsx("span",{className:"font-medium text-foreground",children:m}),e[6]=m,e[7]=d):d=e[7];let f;e[8]!==s?(f=ee.map(j=>{const{name:v,Icon:z,size:_,bg:S,fg:$}=j;return o.jsx("span",{title:v,className:K("flex items-center justify-center rounded-full",s?"size-5":"size-6"),style:{backgroundColor:S,color:$},children:o.jsx(z,{size:s?_[0]:_[1]})},v)}),e[8]=s,e[9]=f):f=e[9];let u;e[10]!==f?(u=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:f}),e[10]=f,e[11]=u):u=e[11];const x=s?"size-3":"size-3.5";let p;e[12]!==x?(p=K(x,"shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"),e[12]=x,e[13]=p):p=e[13];let g;e[14]!==p?(g=o.jsx(Z,{className:p}),e[14]=p,e[15]=g):g=e[15];let h;return e[16]!==g||e[17]!==i||e[18]!==r||e[19]!==d||e[20]!==u?(h=o.jsxs(P,{to:"/$org/settings/connect",params:i,onClick:Oe,className:r,children:[d,u,g]}),e[16]=g,e[17]=i,e[18]=r,e[19]=d,e[20]=u,e[21]=h):h=e[21],h}function Oe(){return V("connect_clients_opened",{source:"org_home"})}function yt(){const t=A.c(13),e=B(),{org:a}=Q(),{granted:s}=ne("api-keys:manage");let l;t[0]!==s?(l={enabled:s},t[0]=s,t[1]=l):l=t[1];const{data:n}=xe(l);if(s&&!n||n?.some(Fe))return null;let i;t[2]!==a.slug?(i={org:a.slug},t[2]=a.slug,t[3]=i):i=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:ee.map(Ye)}),t[4]=c):c=t[4];let r;t[5]!==e?(r=e("home.orgHome.connectPill"),t[5]=e,t[6]=r):r=t[6];let m;t[7]!==r?(m=o.jsx("span",{className:"font-medium text-foreground",children:r}),t[7]=r,t[8]=m):m=t[8];let d;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Z,{className:"ml-auto size-3.5 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),t[9]=d):d=t[9];let f;return t[10]!==i||t[11]!==m?(f=o.jsxs(P,{to:"/$org/settings/connect",params:i,onClick:Pe,className:"group hidden items-center gap-3 rounded-xl bg-card px-4 py-2.5 text-sm shadow-edge transition-colors hover:bg-accent md:flex",children:[c,m,d]}),t[10]=i,t[11]=m,t[12]=f):f=t[12],f}function Ye(t){const{name:e,Icon:a,size:s,bg:l,fg:n}=t;return o.jsx("span",{className:"flex size-5 items-center justify-center rounded-full",style:{backgroundColor:l,color:n},children:o.jsx(a,{size:s[0]})},e)}function Pe(){return V("connect_clients_opened",{source:"org_home"})}function Fe(t){return t.name.startsWith(ue)}function Nt(){const t=A.c(3),{locator:e}=Q(),a=oe();pe();let s;t[0]!==e||t[1]!==a?(s=ge(e,a),t[0]=e,t[1]=a,t[2]=s):s=t[2];const{data:l}=re(s);return l.items}function _t(t){const e=A.c(16),{recent:a,orgSlug:s}=t,l=B();let n,i,c,r;if(e[0]!==s||e[1]!==a||e[2]!==l){r=Symbol.for("react.early_return_sentinel");e:{let d;e[7]!==s||e[8]!==l?(d=u=>{const x={org:s,agentId:u.projectId};if(u.connection){const{label:g,icon:h,id:j,toolName:v}=u.connection;return[{key:`${j}:${v}:${u.projectId}`,label:g,project:u.projectTitle,link:{to:le.app,params:{...x,connectionId:j,toolName:v}},glyph:o.jsx(ke,{icon:h,name:g,size:"md",className:X})}]}const p=Ce[u.app];return p?[{key:`${u.app}:${u.projectId}`,label:l(p.labelKey),project:u.projectTitle,link:{to:p.to,params:x},glyph:o.jsx("span",{className:K(X,"flex items-center",p.tone),children:o.jsx(p.Icon,{size:24})})}]:[]},e[7]=s,e[8]=l,e[9]=d):d=e[9];const f=a.slice(0,8).flatMap(d);if(f.length===0){r=null;break e}n=Ie,e[10]!==l?(i=l("home.overview.recentApps"),e[10]=l,e[11]=i):i=e[11],c=f.map(Ue)}e[0]=s,e[1]=a,e[2]=l,e[3]=n,e[4]=i,e[5]=c,e[6]=r}else n=e[3],i=e[4],c=e[5],r=e[6];if(r!==Symbol.for("react.early_return_sentinel"))return r;let m;return e[12]!==n||e[13]!==i||e[14]!==c?(m=o.jsx(n,{title:i,children:c}),e[12]=n,e[13]=i,e[14]=c,e[15]=m):m=e[15],m}function Ue(t){return o.jsxs(P,{to:t.link.to,params:t.link.params,className:"group flex shrink-0 flex-col items-center gap-2.5 rounded-xl p-3 text-center transition-[background-color,transform] duration-150 ease-out hover:bg-accent active:scale-[0.97]",children:[t.glyph,o.jsxs("span",{className:"flex w-full min-w-0 flex-col",children:[o.jsx("span",{className:"line-clamp-2 text-xs font-medium break-words text-foreground",children:t.label}),o.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.project})]})]},t.key)}function qe(t,e){return{to:ie.tasks,params:{org:t,taskKey:ze(t,e)}}}const He={answer:{Icon:ve,tone:"text-warning",reasonKey:"home.needsYou.reasonAnswer"},failed:{Icon:he,tone:"text-destructive",reasonKey:"home.overview.reasonFailed"},review:{Icon:je,tone:"text-warning",reasonKey:"home.needsYou.reasonReview"},running:{Icon:H,tone:"text-muted-foreground",reasonKey:"home.overview.reasonRunning"},assigned:{Icon:H,tone:"text-muted-foreground",reasonKey:"home.needsYou.reasonAssigned"}},J=["answer","failed","review","running","assigned"];function Qe(t,e){const a=new Set,s=[],l=(n,i)=>{a.has(n.id)||(a.add(n.id),s.push({task:n,kind:i}))};for(const n of t)l(n,Re(n));for(const n of e){if(n.status==="done"||n.status==="archived")continue;const i=Te(n);i==="failed"?l(n,"failed"):i==="running"&&l(n,"running")}return s.sort((n,i)=>J.indexOf(n.kind)-J.indexOf(i.kind))}function Xe(t,e){const a=new Map;for(const r of e){if(r.action!=="mentioned"&&r.action!=="commented")continue;const m=a.get(r.taskBoardItemId);(!m||m.action!=="mentioned"&&r.action==="mentioned")&&a.set(r.taskBoardItemId,r)}const s=new Set(t.map(r=>r.task.id)),l=[...a.values()].filter(r=>!s.has(r.taskBoardItemId)).map(r=>({kind:"mention",task:null,mention:r})),n=t.map(({task:r,kind:m})=>({kind:m,task:r,mention:a.get(r.id)??null})),i=n.filter(r=>r.kind==="answer"),c=n.filter(r=>r.kind!=="answer");return[...i,...l,...c]}const Ge=7;function W(t){const e=A.c(6),{mention:a}=t,s=B();let l;e[0]!==a.actorName||e[1]!==s?(l=a.actorName??s("home.overview.someone"),e[0]=a.actorName,e[1]=s,e[2]=l):l=e[2];const n=l,i=a.actorImage??void 0;let c;return e[3]!==n||e[4]!==i?(c=o.jsx(ce,{url:i,fallback:n,shape:"circle",size:"2xs"}),e[3]=n,e[4]=i,e[5]=c):c=e[5],c}function Je(t,e){const a=t.actorName??e("home.overview.someone");return e(t.action==="mentioned"?"home.overview.mentioned":"home.overview.commented",{actor:a})}function St(t){const e=A.c(12),{waiting:a,tasks:s,mentions:l,index:n,orgSlug:i}=t,c=B();let r;if(e[0]!==n||e[1]!==l||e[2]!==i||e[3]!==c||e[4]!==s||e[5]!==a){const m=Xe(Qe(a,s),l);let d;e[7]!==c?(d=c("home.overview.forYou"),e[7]=c,e[8]=d):d=e[8];const f=m.length>0&&o.jsx("span",{className:"text-muted-foreground tabular-nums",children:m.length});let u;e[9]!==d||e[10]!==f?(u=o.jsxs("h2",{className:"flex items-center gap-2 px-2 pt-1 pb-1 text-sm font-medium text-foreground",children:[d,f]}),e[9]=d,e[10]=f,e[11]=u):u=e[11],r=o.jsxs("section",{className:"flex flex-col gap-2 surface p-3",children:[u,m.length===0?o.jsxs("div",{className:"flex flex-col items-center gap-3 px-2 py-10 text-center",children:[o.jsx("span",{className:"flex size-10 items-center justify-center rounded-full bg-success/10 text-success",children:o.jsx(H,{size:20})}),o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("p",{className:"text-sm font-medium text-foreground",children:c("home.overview.allClearTitle")}),o.jsx("p",{className:"text-sm text-muted-foreground",children:c("home.overview.allClearDescription")})]})]}):o.jsx("div",{className:"flex flex-col",children:m.slice(0,Ge).map(x=>{const p=x.kind==="mention"?{id:x.mention.taskBoardItemId,keySeq:x.mention.taskKeySeq,title:x.mention.taskTitle}:x.task,g=x.task?$e(x.task,n):null,h=x.kind==="mention"?null:He[x.kind],j=x.mention?Je(x.mention,c):h?c(h.reasonKey):"";return o.jsxs(P,{...qe(i,p),className:"group flex h-10 items-center gap-3 rounded-lg px-2 transition-colors hover:bg-accent",children:[o.jsx("span",{className:K("flex size-4 shrink-0 items-center justify-center",h?.tone),children:x.kind==="mention"?o.jsx(W,{mention:x.mention}):x.kind==="running"?o.jsx(ae,{className:"size-3.5"}):h?o.jsx(h.Icon,{size:16}):null}),o.jsx("span",{className:"min-w-0 truncate text-sm text-foreground",children:p.title}),o.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 text-sm text-muted-foreground",children:[x.kind!=="mention"&&x.mention&&o.jsx(W,{mention:x.mention}),o.jsx("span",{className:"truncate",children:j})]}),g&&o.jsxs("span",{className:"hidden max-w-48 shrink-0 items-center gap-1.5 text-xs text-muted-foreground md:flex",children:[o.jsx(Se,{icon:g.icon,name:g.title}),o.jsx("span",{className:"truncate",children:g.title})]})]},p.id)})})]}),e[0]=n,e[1]=l,e[2]=i,e[3]=c,e[4]=s,e[5]=a,e[6]=r}else r=e[6];return r}function We(t){if(t<=0)return 1;const e=10**Math.floor(Math.log10(t));for(const a of[1,2,2.5,5,10])if(a*e>=t)return a*e;return 10*e}const Ve=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function U(t){const e=A.c(52),{series:a,start:s,format:l,label:n,averageLabel:i}=t,c=We(Math.max(...a,0));let r;e[0]!==a?(r=a.length===0?0:a.reduce(et,0)/a.length,e[0]=a,e[1]=r):r=e[1];const m=r;let d;if(e[2]!==a||e[3]!==s){let E;e[5]!==s?(E=(te,se)=>({day:Ve.format(new Date(s.getTime()+se*864e5)),value:te}),e[5]=s,e[6]=E):E=e[6],d=a.map(E),e[2]=a,e[3]=s,e[4]=d}else d=e[4];const f=d,u=Math.max(f.length-1,0),x=f[0]?.day;let p;e[7]!==u||e[8]!==f?(p=f[Math.round(u/2)]?.day,e[7]=u,e[8]=f,e[9]=p):p=e[9];const g=f[u]?.day;let h;e[10]!==x||e[11]!==p||e[12]!==g?(h=[x,p,g].filter(Ze),e[10]=x,e[11]=p,e[12]=g,e[13]=h):h=e[13];const j=h;let v;e[14]!==n?(v={value:{label:n,color:"var(--chart-1)"}},e[14]=n,e[15]=v):v=e[15];const z=v;let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_={top:8,right:0,bottom:0,left:0},e[16]=_):_=e[16];let S;e[17]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsx(Le,{vertical:!1,strokeDasharray:"4 4",stroke:"var(--border)"}),e[17]=S):S=e[17];let $,R;e[18]===Symbol.for("react.memo_cache_sentinel")?($={stroke:"var(--border)"},R={fontSize:12,fill:"var(--muted-foreground)"},e[18]=$,e[19]=R):($=e[18],R=e[19]);let b;e[20]!==j?(b=o.jsx(Be,{dataKey:"day",ticks:j,interval:"preserveStartEnd",tickLine:!1,axisLine:$,tick:R,tickMargin:8}),e[20]=j,e[21]=b):b=e[21];let I;e[22]!==c?(I=[0,c],e[22]=c,e[23]=I):I=e[23];const T=c/2;let w;e[24]!==c||e[25]!==T?(w=[0,T,c],e[24]=c,e[25]=T,e[26]=w):w=e[26];let y;e[27]!==l?(y=E=>E===0?"0":l(E),e[27]=l,e[28]=y):y=e[28];let M;e[29]===Symbol.for("react.memo_cache_sentinel")?(M={fontSize:12,fill:"var(--muted-foreground)"},e[29]=M):M=e[29];let N;e[30]!==I||e[31]!==w||e[32]!==y?(N=o.jsx(Ke,{orientation:"right",domain:I,ticks:w,tickFormatter:y,tickLine:!1,axisLine:!1,tick:M,width:44}),e[30]=I,e[31]=w,e[32]=y,e[33]=N):N=e[33];let C;e[34]===Symbol.for("react.memo_cache_sentinel")?(C={fill:"var(--muted)",opacity:.6},e[34]=C):C=e[34];let k;e[35]!==l||e[36]!==n?(k=o.jsx(be,{cursor:C,content:o.jsx(we,{indicator:"line",formatter:E=>o.jsxs("div",{className:"flex flex-1 items-center justify-between gap-3 leading-none",children:[o.jsx("span",{className:"text-muted-foreground",children:n}),o.jsx("span",{className:"font-medium text-foreground tabular-nums",children:l(Number(E))})]})})}),e[35]=l,e[36]=n,e[37]=k):k=e[37];let D;e[38]!==m||e[39]!==i||e[40]!==l?(D=m>0&&o.jsx(De,{y:m,stroke:"var(--foreground)",strokeOpacity:.6,strokeDasharray:"2 2",label:{value:i(l(m)),position:"insideBottomLeft",fontSize:12,fill:"var(--foreground)"}}),e[38]=m,e[39]=i,e[40]=l,e[41]=D):D=e[41];let O;e[42]===Symbol.for("react.memo_cache_sentinel")?(O=o.jsx(ye,{dataKey:"value",fill:"var(--color-value)",radius:[2,2,0,0],maxBarSize:4,animationDuration:300}),e[42]=O):O=e[42];let L;e[43]!==f||e[44]!==b||e[45]!==N||e[46]!==k||e[47]!==D?(L=o.jsxs(Ne,{data:f,margin:_,barCategoryGap:"30%",children:[S,b,N,k,D,O]}),e[43]=f,e[44]=b,e[45]=N,e[46]=k,e[47]=D,e[48]=L):L=e[48];let Y;return e[49]!==z||e[50]!==L?(Y=o.jsx(_e,{config:z,className:"aspect-auto h-[159px] w-full",children:L}),e[49]=z,e[50]=L,e[51]=Y):Y=e[51],Y}function Ze(t){return!!t}function et(t,e){return t+e}function q(t){const e=A.c(10),{label:a,value:s,chart:l}=t;let n;e[0]!==a?(n=o.jsx("span",{className:"text-sm font-medium text-foreground",children:a}),e[0]=a,e[1]=n):n=e[1];let i;e[2]!==s?(i=o.jsx("span",{className:"text-[32px] leading-none font-medium tracking-tight tabular-nums text-foreground",children:s}),e[2]=s,e[3]=i):i=e[3];let c;e[4]!==n||e[5]!==i?(c=o.jsxs("div",{className:"flex flex-col gap-2.5",children:[n,i]}),e[4]=n,e[5]=i,e[6]=c):c=e[6];let r;return e[7]!==l||e[8]!==c?(r=o.jsxs("section",{className:"flex flex-col gap-6 surface p-5",children:[c,l]}),e[7]=l,e[8]=c,e[9]=r):r=e[9],r}function Ct(t){const e=A.c(58),{tasks:a}=t,s=B();let l,n,i,c,r,m,d,f,u;if(e[0]!==s||e[1]!==a){const j=Ee(a,F),v=Ae(a,F);i=Me(a);const z=st;let _,S;if(e[11]===Symbol.for("react.memo_cache_sentinel")){const k=new Date;S=new Date(k.getFullYear(),k.getMonth(),k.getDate()-(F-1)),_=new Date(k.getFullYear(),k.getMonth(),1),e[11]=_,e[12]=S}else _=e[11],S=e[12];c=_;const $=tt;let R;e[13]!==s?(R=k=>s("home.overview.average",{value:k}),e[13]=s,e[14]=R):R=e[14],n=R,d="grid gap-4 md:grid-cols-3";let b;e[15]!==s?(b=s("home.overview.delivered"),e[15]=s,e[16]=b):b=e[16];const I=String(z(j));let T;e[17]!==s?(T=s("home.overview.delivered"),e[17]=s,e[18]=T):T=e[18];let w;e[19]!==n||e[20]!==j||e[21]!==T?(w=o.jsx(U,{label:T,series:j,start:S,format:$,averageLabel:n}),e[19]=n,e[20]=j,e[21]=T,e[22]=w):w=e[22],e[23]!==w||e[24]!==b||e[25]!==I?(f=o.jsx(q,{label:b,value:I,chart:w}),e[23]=w,e[24]=b,e[25]=I,e[26]=f):f=e[26];let y;e[27]!==s?(y=s("home.overview.agentRuns"),e[27]=s,e[28]=y):y=e[28];const M=String(z(v));let N;e[29]!==s?(N=s("home.overview.agentRuns"),e[29]=s,e[30]=N):N=e[30];let C;e[31]!==n||e[32]!==v||e[33]!==N?(C=o.jsx(U,{label:N,series:v,start:S,format:$,averageLabel:n}),e[31]=n,e[32]=v,e[33]=N,e[34]=C):C=e[34],e[35]!==y||e[36]!==M||e[37]!==C?(u=o.jsx(q,{label:y,value:M,chart:C}),e[35]=y,e[36]=M,e[37]=C,e[38]=u):u=e[38],l=q,e[39]!==s?(r=s("home.overview.agentCost"),e[39]=s,e[40]=r):r=e[40],m=G(z(i)),e[0]=s,e[1]=a,e[2]=l,e[3]=n,e[4]=i,e[5]=c,e[6]=r,e[7]=m,e[8]=d,e[9]=f,e[10]=u}else l=e[2],n=e[3],i=e[4],c=e[5],r=e[6],m=e[7],d=e[8],f=e[9],u=e[10];let x;e[41]!==s?(x=s("home.overview.agentCost"),e[41]=s,e[42]=x):x=e[42];let p;e[43]!==n||e[44]!==i||e[45]!==c||e[46]!==x?(p=o.jsx(U,{label:x,series:i,start:c,format:G,averageLabel:n}),e[43]=n,e[44]=i,e[45]=c,e[46]=x,e[47]=p):p=e[47];let g;e[48]!==l||e[49]!==r||e[50]!==m||e[51]!==p?(g=o.jsx(l,{label:r,value:m,chart:p}),e[48]=l,e[49]=r,e[50]=m,e[51]=p,e[52]=g):g=e[52];let h;return e[53]!==d||e[54]!==f||e[55]!==u||e[56]!==g?(h=o.jsxs("div",{className:d,children:[f,u,g]}),e[53]=d,e[54]=f,e[55]=u,e[56]=g,e[57]=h):h=e[57],h}function tt(t){return String(Math.round(t*10)/10)}function st(t){return t.reduce(nt,0)}function nt(t,e){return t+e}export{yt as C,St as F,Ct as M,_t as R,wt as a,Nt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fV as B,ey as T,fW as J,c as U,r as Y,fL as N,fM as S,fR as K,fN as P,K as V,fO as z,fQ as G,fP as X,fJ as R}from"./index-
|
|
1
|
+
import{fV as B,ey as T,fW as J,c as U,r as Y,fL as N,fM as S,fR as K,fN as P,K as V,fO as z,fQ as G,fP as X,fJ as R}from"./index-BfWp2Wnw.js";import{ax as Z,au as x,aF as ee,av as te,aw as C,aJ as ne,ay as re,aA as se}from"./site-editor-toast-D2nHZREM.js";import{a5 as F,ak as oe,a8 as ie,a4 as ae}from"./blocks-tab-states-Bx0tgd5u.js";async function ce(e,t){return e.inDraft?e.value===void 0?T:J(e.value):await B(null,e.value,t)??null}class Ce{constructor(t){this.now=t,this.loaded=t()}now;copies=new Map;generations=new Map;loaded;settle(){this.loaded||(this.loaded=this.now())}get(t){const n=this.copies.get(t);if(n)return n;if(this.loaded)return{value:this.loaded.blocks[t],inDraft:this.loaded.versionOf(t)!==null}}generation(t){return this.generations.get(t)??0}edited(t){return{generation:this.generation(t),copy:this.get(t)}}guardOf(t,n){return n&&n.generation!==this.generation(t)?n.copy:this.get(t)}hold(t){this.generations.set(t,this.generation(t)+1);const n=this.now();!n||!Object.hasOwn(n.blocks,t)||this.copies.set(t,{value:n.blocks[t],inDraft:n.versionOf(t)!==null})}saved(t,n){this.copies.set(t,{value:n,inDraft:!0})}}const g=new Map,k=new Set,E=new Map;function ke(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function Ee(e,t){const n=new Map(g.get(e)??E);n.set(t,(n.get(t)??0)+1),g.set(e,n);for(const s of k)s()}function le(e){return k.add(e),()=>k.delete(e)}const A=new WeakMap;function fe(e){let t=A.get(e);return t||(t=n=>e.get(n)??0,A.set(e,t)),t}function De(e){const t=U.c(5);let n,s;t[0]!==e?(n=()=>g.get(e)??E,s=()=>g.get(e)??E,t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);const r=Y.useSyncExternalStore(le,n,s);let o;return t[3]!==r?(o=fe(r),t[3]=r,t[4]=o):o=t[4],o}class p extends Error{constructor(t){super("kept their version"),this.deleted=t,this.name="HostedKeptTheirsError"}deleted}const ue=3;function de(e,t,n,s){const r={},o={},i={};for(const a of e)t&&Object.hasOwn(t,a)&&(r[a]=t[a]),Object.hasOwn(n.writes,a)&&(o[a]=n.writes[a]),Object.hasOwn(s,a)&&(i[a]=s[a]);return z({ancestor:r,mine:o,theirs:i})}function he(e,t,n){const s={},r=[];for(const o of e){const i=t[o];W(i)?s[o]=i:Object.hasOwn(n,o)&&r.push(o)}return{writes:s,deletes:r}}function we(e,t){for(const[n,s]of Object.entries(e.writes))if(!Object.hasOwn(t,n)||R(t[n])!==R(s))return!1;return e.deletes.every(n=>!Object.hasOwn(t,n))}function Oe(e,t){if(!W(t))return null;if(F(e,t))return oe(t);const n=typeof t.name=="string"?t.name.trim():"";return n&&n!==e?n:I(e)}function I(e){const t=F(e);if(t)return ie(t);const n=e.split("/").pop()??e;return ae(n).trim()||n}function L(e,...t){for(const n of t){const s=Oe(e,n);if(s)return s}return I(e)}function H(e,t,n){return Object.keys(e.writes).some(r=>!t||!Object.hasOwn(t,r))?e.deletes.filter(r=>!Object.hasOwn(e.writes,r)&&n(r)):[]}async function q(e,t,n){const s=Object.keys(e.writes).filter(i=>!t||!Object.hasOwn(t,i)).map(i=>e.writes[i]),r=n[0];if(await P({kind:"theyDeleted",label:L(r,t?.[r],...s)})==="theirs")throw new p(!0);return{writes:e.writes,deletes:e.deletes.filter(i=>!n.includes(i))}}function Q(e){if(e.pointers.length!==1)return null;const t=e.pointers[0],n=t.split("/");if(n.length!==2)return null;const s=n[1].replaceAll("~1","/").replaceAll("~0","~"),r=e.mine[s],o=e.theirs[s];return r===void 0==(o===void 0)?null:{pointer:t,conflict:{kind:o===void 0?"theyDeleted":"youDeleted",label:L(s,r,o,e.ancestor[s])}}}async function pe(e,t,n,s){const r=Q(e);if(r)return{[r.pointer]:await P(r.conflict)};const o=G(e,t);return X(e,s?o.map(s):o,n?.author?{...n,author:{...n.author,keyed:!0}}:n)}function Me(e){const t=e.split("/")[1];return t?t.replaceAll("~1","/").replaceAll("~0","~"):null}function ge(e){const t=Object.values(e);return t.length>0&&t.every(n=>n==="theirs")}async function ve(e,t,n){const s=o=>se(e.queryClient,e.cacheKey,o,e.backend);if(t.some(o=>s(o)===void 0))try{await te(e.queryClient,e.backend,e.params,e.cacheKey)}catch{throw new C}const r={};for(const o of t){const i=s(o);if(i===void 0)throw new C;const a=n&&Object.hasOwn(n,o)?await B(i,n[o],N(e.queryClient,e.cacheKey,o)):i;if(a===void 0)throw new C;r[o]=a}return r}async function me(e,t,n,s){if(s&&w(e,t,r=>Object.hasOwn(s,r)?{value:s[r]}:null),!ne(e.queryClient,e.backend,e.cacheKey,n))for(const r of t)await re(e.queryClient,e.backend,e.params,e.cacheKey,r,n);return e.queryClient.getQueryData(V.decofile(e.cacheKey))??{}}async function Se(e,t,n,s){let r=t;const o=s?Object.keys(s):[];let i=o.length===0?n:{...n,...Object.fromEntries(o.map(a=>[a,s[a].value]))};for(let a=0;;a++){const v=r.deletes.filter(l=>!Object.hasOwn(r.writes,l)),d=[...Object.keys(r.writes),...v],O=await ve(e,d,a===0?i:void 0);if(a===0)for(const l of o)Object.hasOwn(O,l)&&(O[l]=await ce(s[l],N(e.queryClient,e.cacheKey,l)));const m=H(r,i,l=>O[l]===T);if(m.length>0){try{if(!S())throw new p(!0);r=await q(r,i,m)}catch(l){throw w(e,d,c=>m.includes(c)||!i||!Object.hasOwn(i,c)?null:{value:i[c]}),l}continue}try{const l=await Z(e.queryClient,e.backend,e.params,e.cacheKey,{set:r.writes,...v.length>0?{delete:v}:{}},O);return w(e,d,c=>Object.hasOwn(r.writes,c)?{value:r.writes[c]}:null),{...l,change:r}}catch(l){if(!x(l))throw l;const c=await me(e,d,l,i);if(a+1>=ue)throw new ee;if(!S())throw l;const D=Object.keys(r.writes).filter(u=>!i||!Object.hasOwn(i,u)),_=r;w(e,D,u=>({value:_.writes[u]}));const M=()=>w(e,D,u=>Object.hasOwn(c,u)?{value:c[u]}:null);try{const u=H(r,i,f=>!!i&&Object.hasOwn(i,f)&&!Object.hasOwn(c,f));if(u.length>0){r=await q(r,i,u),i=Object.fromEntries(d.filter(f=>Object.hasOwn(c,f)).map(f=>[f,c[f]]));continue}const h=de(d,i,r,c),b=h.pointers.length===0?{}:await pe(h),y=Q(h);if(y&&b[y.pointer]==="theirs")throw new p(y.conflict.kind==="theyDeleted");const $=h.pointers.length===0?h.merged:K(h,b),j=he(d,$,c);if(we(j,c)){if(ge(b))throw new p(d.some(f=>!Object.hasOwn(c,f)));return M(),{revision:"",versions:{},change:j}}r=j,i=Object.fromEntries(d.filter(f=>Object.hasOwn(c,f)).map(f=>[f,c[f]]))}catch(u){throw M(),u}}}}function w(e,t,n){e.queryClient.setQueryData(V.decofile(e.cacheKey),s=>{if(!s)return s;const r={...s};for(const o of t){const i=n(o);i?r[o]=i.value:delete r[o]}return r})}function W(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}export{p as H,ve as a,Ee as b,ke as c,ue as d,L as e,ge as f,Ce as g,ce as h,Se as i,pe as j,Me as k,he as l,we as m,de as p,De as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,j as p,B as h}from"./index-
|
|
1
|
+
import{c as f,j as p,B as h}from"./index-BfWp2Wnw.js";import{T as j,a as v,c as T}from"./tooltip-CqV-qcYU.js";function B(d){const t=f.c(19);let e,o,i,n,r,a;t[0]!==d?({label:o,tooltipSide:n,variant:r,size:a,children:e,...i}=d,t[0]=d,t[1]=e,t[2]=o,t[3]=i,t[4]=n,t[5]=r,t[6]=a):(e=t[1],o=t[2],i=t[3],n=t[4],r=t[5],a=t[6]);const m=n===void 0?"top":n,u=r===void 0?"ghost":r,x=a===void 0?"icon-sm":a;let s;t[7]!==e||t[8]!==o||t[9]!==i||t[10]!==x||t[11]!==u?(s=p.jsx(j,{asChild:!0,children:p.jsx(h,{"data-slot":"icon-button","aria-label":o,variant:u,size:x,...i,children:e})}),t[7]=e,t[8]=o,t[9]=i,t[10]=x,t[11]=u,t[12]=s):s=t[12];let l;t[13]!==o||t[14]!==m?(l=p.jsx(v,{side:m,children:o}),t[13]=o,t[14]=m,t[15]=l):l=t[15];let c;return t[16]!==s||t[17]!==l?(c=p.jsxs(T,{children:[s,l]}),t[16]=s,t[17]=l,t[18]=c):c=t[18],c}export{B as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d3 as _}from"./index-
|
|
1
|
+
import{d3 as _}from"./index-BfWp2Wnw.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as H,t as U,a9 as R,C as Z,aa as X,f as S,ab as J,ac as Q,o as z}from"./usage-stats-4bhjzDAy.js";import{gy as M,hi as C,gx as P,hj as x,hk as L,hl as V,hm as K,hn as _,gA as A,eR as N,r as p,c8 as $}from"./index-0lR5HspR.js";import{C as k}from"./index-CUfLVsD2.js";function tt(t,e){const i=Math.min(t.top,e.top),s=Math.max(t.bottom,e.bottom),l=Math.min(t.left,e.left),r=Math.max(t.right,e.right)-l,n=s-i;return new DOMRect(l,i,r,n)}var et=class{get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t,e;const{selection:i}=this.editor.state,s=(t=this.getReferencedVirtualElement)===null||t===void 0?void 0:t.call(this);if(s)return s;if(!(!((e=this.view)===null||e===void 0||(e=e.dom)===null||e===void 0)&&e.parentNode))return;const l=R(this.view,i.from,i.to);let r={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(i instanceof Z){let n=this.view.nodeDOM(i.from);const d=n.dataset.nodeViewWrapper?n:n.querySelector("[data-node-view-wrapper]");d&&(n=d),n&&(r={getBoundingClientRect:()=>n.getBoundingClientRect(),getClientRects:()=>[n.getBoundingClientRect()]})}if(i instanceof k){const{$anchorCell:n,$headCell:d}=i,g=n?n.pos:d.pos,f=d?d.pos:n.pos,u=this.view.nodeDOM(g),o=this.view.nodeDOM(f);if(!u||!o)return;const a=u===o?u.getBoundingClientRect():tt(u.getBoundingClientRect(),o.getBoundingClientRect());r={getBoundingClientRect:()=>a,getClientRects:()=>[a]}}return r}constructor({editor:t,element:e,view:i,pluginKey:s="bubbleMenu",updateDelay:l=250,resizeDelay:r=60,shouldShow:n,appendTo:d,getReferencedVirtualElement:g,options:f}){var u;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:o,state:a,from:h,to:c})=>{const{doc:m,selection:y}=a,{empty:O}=y,b=!m.textBetween(h,c).length&&X(a.selection),v=this.element.contains(document.activeElement);return!(!(o.hasFocus()||v)||O||b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var a;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}o?.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(o.relatedTarget))||o?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(o,a)=>{const h=!a?.selection.eq(o.state.selection),c=!a?.doc.eq(o.state.doc);!h&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(o,h,c,a)},this.updateDelay))},this.updateHandler=(o,a,h,c)=>{const{composing:m}=o;if(!(m||!a&&!h)){if(!this.getShouldShow(c)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:o})=>{const a=o.getMeta(this.pluginKey);a==="updatePosition"?this.updatePosition():a&&typeof a=="object"&&a.type==="updateOptions"?this.updateOptions(a.options):a==="hide"?this.hide():a==="show"&&(this.updatePosition(),this.show())},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(u=f?.scrollTarget)!==null&&u!==void 0?u:window,this.getReferencedVirtualElement=g,this.floatingUIOptions={...this.floatingUIOptions,...f},this.element.tabIndex=0,n&&(this.shouldShow=n),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}updatePosition(){if(!this.isVisible)return;const t=this.virtualElement;t&&A(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:i,strategy:s,middlewareData:l})=>{var r,n;if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(!((r=l.hide)===null||r===void 0)&&r.referenceHidden||!((n=l.hide)===null||n===void 0)&&n.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=s,this.element.style.left=`${e}px`,this.element.style.top=`${i}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(t,e){const{state:i}=t,s=i.selection.from!==i.selection.to;if(this.updateDelay>0&&s){this.handleDebouncedUpdate(t,e);return}const l=!e?.selection.eq(t.state.selection),r=!e?.doc.eq(t.state.doc);this.updateHandler(t,l,r,e)}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return((e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:i,oldState:t,from:r,to:n}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=t.getReferencedVirtualElement),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const B=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new et({view:e,...t})});S.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[B({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var it=class{getTextContent(t){return J(t,{textSerializers:Q(this.editor.schema)})}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}constructor({editor:t,element:e,view:i,pluginKey:s="floatingMenu",updateDelay:l=250,resizeDelay:r=60,options:n,appendTo:d,shouldShow:g}){var f;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:u,state:o})=>{const{selection:a}=o,{$anchor:h,empty:c}=a,m=h.depth===1,y=h.parent.isTextblock&&!h.parent.type.spec.code&&!h.parent.textContent&&h.parent.childCount===0&&!this.getTextContent(h.parent);return!(!u.hasFocus()||!c||!m||!y||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(u,o,a,h)=>{const{composing:c}=u;if(!(c||!o&&!a)){if(!this.getShouldShow(h)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var o;if(this.preventHide){this.preventHide=!1;return}u?.relatedTarget&&(!((o=this.element.parentNode)===null||o===void 0)&&o.contains(u.relatedTarget))||u?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:u})=>{const o=u.getMeta(this.pluginKey);o==="updatePosition"?this.updatePosition():o&&typeof o=="object"&&o.type==="updateOptions"?this.updateOptions(o.options):o==="hide"?this.hide():o==="show"&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(f=n?.scrollTarget)!==null&&f!==void 0?f:window,this.floatingUIOptions={...this.floatingUIOptions,...n},this.element.tabIndex=0,g&&(this.shouldShow=g),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return(e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,view:this.view,state:i,oldState:t,from:r,to:n})}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}updatePosition(){var t;if(!(!((t=this.view)===null||t===void 0||(t=t.dom)===null||t===void 0)&&t.parentNode))return;const{selection:e}=this.editor.state,i=R(this.view,e.from,e.to);A({getBoundingClientRect:()=>i,getClientRects:()=>[i]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:s,y:l,strategy:r,middlewareData:n})=>{var d,g;if(!((d=n.hide)===null||d===void 0)&&d.referenceHidden||!((g=n.hide)===null||g===void 0)&&g.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${s}px`,this.element.style.top=`${l}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){const i=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,i,s,e)}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const F=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new it({view:e,...t})});S.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:t,dispatch:e})=>(e&&t.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[F({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function W(t,e){return t??new U(e)}const st=typeof window<"u"?p.useLayoutEffect:p.useEffect,j=new Set(["left","opacity","position","top","visibility","width"]),nt=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),ot=new Set(["children","className","style"]),rt=new Set(["tabIndex"]),lt=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),at={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function T(t,e){return/^on[A-Z]/.test(t)&&typeof e=="function"}function dt(t){return t.startsWith("aria-")||t.startsWith("data-"),t}function ut(t){return t.startsWith("aria-")||t.startsWith("data-")||lt.has(t)}function q(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function ht(t){var e;const i=t.endsWith("Capture"),s=(i?t.slice(0,-7):t).slice(2);return{eventName:(e=at[s])!==null&&e!==void 0?e:s.toLowerCase(),options:i?{capture:!0}:void 0}}function ct(t,e){let i=e.defaultPrevented,s=!1;const l=Object.create(e);return Object.defineProperties(l,{nativeEvent:{value:e},currentTarget:{value:t},target:{value:e.target},persist:{value:()=>{}},isDefaultPrevented:{value:()=>i},isPropagationStopped:{value:()=>s},preventDefault:{value:()=>{i=!0,e.preventDefault()}},stopPropagation:{value:()=>{s=!0,e.stopPropagation()}}}),l}function E(t){return rt.has(t)}function D(t,e,i){if(e==="tabIndex"){t.tabIndex=Number(i);return}t[e]=i}function ft(t,e){if(e==="tabIndex"){t.removeAttribute("tabindex");return}const i=t[e];if(typeof i=="boolean"){t[e]=!1;return}if(typeof i=="number"){t[e]=0;return}t[e]=""}function pt(t,e){return typeof e!="number"||e===0||t.startsWith("--")||nt.has(t)?String(e):`${e}px`}function gt(t,e){j.has(e)||t.style.removeProperty(q(e))}function mt(t,e,i){j.has(e)||t.style.setProperty(q(e),pt(e,i))}function vt(t,e,i){new Set([...Object.keys(e),...Object.keys(i)]).forEach(s=>{if(ot.has(s)||!ut(s)||T(s,e[s])||T(s,i[s]))return;const l=e[s],r=i[s];if(l===r)return;const n=dt(s);if(r==null||r===!1){E(s)&&ft(t,s),t.removeAttribute(n);return}if(r===!0){E(s)&&D(t,s,!0),t.setAttribute(n,"");return}if(E(s)){D(t,s,r);return}t.setAttribute(n,String(r))})}function yt(t,e,i){if(e!==i){if(i){t.className=i;return}t.removeAttribute("class")}}function bt(t,e,i){const s=e??{},l=i??{};new Set([...Object.keys(s),...Object.keys(l)]).forEach(r=>{const n=s[r],d=l[r];if(n!==d){if(d==null){gt(t,r);return}mt(t,r,d)}})}function wt(t,e,i){e.forEach(({eventName:l,listener:r,options:n})=>{t.removeEventListener(l,r,n)});const s=[];return Object.entries(i).forEach(([l,r])=>{if(!T(l,r))return;const{eventName:n,options:d}=ht(l),g=f=>{r(ct(t,f))};t.addEventListener(n,g,d),s.push({eventName:n,listener:g,options:d})}),s}function Y(t,e){const i=p.useRef({}),s=p.useRef([]);st(()=>{const l=i.current;return yt(t,l.className,e.className),bt(t,l.style,e.style),vt(t,l,e),s.current=wt(t,s.current,e),i.current=e,()=>{s.current.forEach(({eventName:r,listener:n,options:d})=>{t.removeEventListener(r,n,d)}),s.current=[]}},[t,e])}const Tt=N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,getReferencedVirtualElement:n,options:d,children:g,...f},u)=>{const o=p.useRef(document.createElement("div")),a=p.useRef(W(t,"bubbleMenu")).current;Y(o.current,f),typeof u=="function"?u(o.current):u&&(u.current=o.current);const{editor:h}=z(),c=e||h,m={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:a,shouldShow:r,getReferencedVirtualElement:n,options:d},y=p.useRef(m);y.current=m;const[O,b]=p.useState(!1),v=p.useRef(!0);return p.useEffect(()=>{if(c?.isDestroyed)return;if(!c){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const w=o.current;w.style.visibility="hidden",w.style.position="absolute";const I=B({...y.current,editor:c,element:w});c.registerPlugin(I);const G=y.current.pluginKey;return v.current=!0,b(!0),()=>{b(!1),c.unregisterPlugin(G),window.requestAnimationFrame(()=>{w.parentNode&&w.parentNode.removeChild(w)})}},[c]),p.useEffect(()=>{if(!(!O||!c||c.isDestroyed)){if(v.current){v.current=!1;return}c.view.dispatch(c.state.tr.setMeta(a,{type:"updateOptions",options:y.current}))}},[O,c,i,s,r,d,l,n,a]),$.createPortal(g,o.current)});N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,options:n,children:d,...g},f)=>{const u=p.useRef(document.createElement("div")),o=p.useRef(W(t,"floatingMenu")).current;Y(u.current,g),typeof f=="function"?f(u.current):f&&(f.current=u.current);const{editor:a}=z(),h=e||a,c={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:o,shouldShow:r,options:n},m=p.useRef(c);m.current=c;const[y,O]=p.useState(!1),b=p.useRef(!0);return p.useEffect(()=>{if(h?.isDestroyed)return;if(!h){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}const v=u.current;v.style.visibility="hidden",v.style.position="absolute";const w=F({...m.current,editor:h,element:v});h.registerPlugin(w);const I=m.current.pluginKey;return b.current=!0,O(!0),()=>{O(!1),h.unregisterPlugin(I),window.requestAnimationFrame(()=>{v.parentNode&&v.parentNode.removeChild(v)})}},[h]),p.useEffect(()=>{if(!(!y||!h||h.isDestroyed)){if(b.current){b.current=!1;return}h.view.dispatch(h.state.tr.setMeta(o,{type:"updateOptions",options:m.current}))}},[y,h,i,s,r,n,l,o]),$.createPortal(d,u.current)});export{Tt as B};
|
|
1
|
+
import{A as H,t as U,a9 as R,C as Z,aa as X,f as S,ab as J,ac as Q,o as z}from"./usage-stats-BXxRbW0f.js";import{gy as M,hi as C,gx as P,hj as x,hk as L,hl as V,hm as K,hn as _,gA as A,eR as N,r as p,c8 as $}from"./index-BfWp2Wnw.js";import{C as k}from"./index-DqFWx3BB.js";function tt(t,e){const i=Math.min(t.top,e.top),s=Math.max(t.bottom,e.bottom),l=Math.min(t.left,e.left),r=Math.max(t.right,e.right)-l,n=s-i;return new DOMRect(l,i,r,n)}var et=class{get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t,e;const{selection:i}=this.editor.state,s=(t=this.getReferencedVirtualElement)===null||t===void 0?void 0:t.call(this);if(s)return s;if(!(!((e=this.view)===null||e===void 0||(e=e.dom)===null||e===void 0)&&e.parentNode))return;const l=R(this.view,i.from,i.to);let r={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(i instanceof Z){let n=this.view.nodeDOM(i.from);const d=n.dataset.nodeViewWrapper?n:n.querySelector("[data-node-view-wrapper]");d&&(n=d),n&&(r={getBoundingClientRect:()=>n.getBoundingClientRect(),getClientRects:()=>[n.getBoundingClientRect()]})}if(i instanceof k){const{$anchorCell:n,$headCell:d}=i,g=n?n.pos:d.pos,f=d?d.pos:n.pos,u=this.view.nodeDOM(g),o=this.view.nodeDOM(f);if(!u||!o)return;const a=u===o?u.getBoundingClientRect():tt(u.getBoundingClientRect(),o.getBoundingClientRect());r={getBoundingClientRect:()=>a,getClientRects:()=>[a]}}return r}constructor({editor:t,element:e,view:i,pluginKey:s="bubbleMenu",updateDelay:l=250,resizeDelay:r=60,shouldShow:n,appendTo:d,getReferencedVirtualElement:g,options:f}){var u;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:o,state:a,from:h,to:c})=>{const{doc:m,selection:y}=a,{empty:O}=y,b=!m.textBetween(h,c).length&&X(a.selection),v=this.element.contains(document.activeElement);return!(!(o.hasFocus()||v)||O||b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var a;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}o?.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(o.relatedTarget))||o?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(o,a)=>{const h=!a?.selection.eq(o.state.selection),c=!a?.doc.eq(o.state.doc);!h&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(o,h,c,a)},this.updateDelay))},this.updateHandler=(o,a,h,c)=>{const{composing:m}=o;if(!(m||!a&&!h)){if(!this.getShouldShow(c)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:o})=>{const a=o.getMeta(this.pluginKey);a==="updatePosition"?this.updatePosition():a&&typeof a=="object"&&a.type==="updateOptions"?this.updateOptions(a.options):a==="hide"?this.hide():a==="show"&&(this.updatePosition(),this.show())},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(u=f?.scrollTarget)!==null&&u!==void 0?u:window,this.getReferencedVirtualElement=g,this.floatingUIOptions={...this.floatingUIOptions,...f},this.element.tabIndex=0,n&&(this.shouldShow=n),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}updatePosition(){if(!this.isVisible)return;const t=this.virtualElement;t&&A(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:i,strategy:s,middlewareData:l})=>{var r,n;if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(!((r=l.hide)===null||r===void 0)&&r.referenceHidden||!((n=l.hide)===null||n===void 0)&&n.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=s,this.element.style.left=`${e}px`,this.element.style.top=`${i}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(t,e){const{state:i}=t,s=i.selection.from!==i.selection.to;if(this.updateDelay>0&&s){this.handleDebouncedUpdate(t,e);return}const l=!e?.selection.eq(t.state.selection),r=!e?.doc.eq(t.state.doc);this.updateHandler(t,l,r,e)}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return((e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:i,oldState:t,from:r,to:n}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=t.getReferencedVirtualElement),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const B=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new et({view:e,...t})});S.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[B({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var it=class{getTextContent(t){return J(t,{textSerializers:Q(this.editor.schema)})}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}constructor({editor:t,element:e,view:i,pluginKey:s="floatingMenu",updateDelay:l=250,resizeDelay:r=60,options:n,appendTo:d,shouldShow:g}){var f;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:u,state:o})=>{const{selection:a}=o,{$anchor:h,empty:c}=a,m=h.depth===1,y=h.parent.isTextblock&&!h.parent.type.spec.code&&!h.parent.textContent&&h.parent.childCount===0&&!this.getTextContent(h.parent);return!(!u.hasFocus()||!c||!m||!y||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(u,o,a,h)=>{const{composing:c}=u;if(!(c||!o&&!a)){if(!this.getShouldShow(h)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var o;if(this.preventHide){this.preventHide=!1;return}u?.relatedTarget&&(!((o=this.element.parentNode)===null||o===void 0)&&o.contains(u.relatedTarget))||u?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:u})=>{const o=u.getMeta(this.pluginKey);o==="updatePosition"?this.updatePosition():o&&typeof o=="object"&&o.type==="updateOptions"?this.updateOptions(o.options):o==="hide"?this.hide():o==="show"&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(f=n?.scrollTarget)!==null&&f!==void 0?f:window,this.floatingUIOptions={...this.floatingUIOptions,...n},this.element.tabIndex=0,g&&(this.shouldShow=g),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return(e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,view:this.view,state:i,oldState:t,from:r,to:n})}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}updatePosition(){var t;if(!(!((t=this.view)===null||t===void 0||(t=t.dom)===null||t===void 0)&&t.parentNode))return;const{selection:e}=this.editor.state,i=R(this.view,e.from,e.to);A({getBoundingClientRect:()=>i,getClientRects:()=>[i]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:s,y:l,strategy:r,middlewareData:n})=>{var d,g;if(!((d=n.hide)===null||d===void 0)&&d.referenceHidden||!((g=n.hide)===null||g===void 0)&&g.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${s}px`,this.element.style.top=`${l}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){const i=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,i,s,e)}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const F=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new it({view:e,...t})});S.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:t,dispatch:e})=>(e&&t.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[F({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function W(t,e){return t??new U(e)}const st=typeof window<"u"?p.useLayoutEffect:p.useEffect,j=new Set(["left","opacity","position","top","visibility","width"]),nt=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),ot=new Set(["children","className","style"]),rt=new Set(["tabIndex"]),lt=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),at={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function T(t,e){return/^on[A-Z]/.test(t)&&typeof e=="function"}function dt(t){return t.startsWith("aria-")||t.startsWith("data-"),t}function ut(t){return t.startsWith("aria-")||t.startsWith("data-")||lt.has(t)}function q(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function ht(t){var e;const i=t.endsWith("Capture"),s=(i?t.slice(0,-7):t).slice(2);return{eventName:(e=at[s])!==null&&e!==void 0?e:s.toLowerCase(),options:i?{capture:!0}:void 0}}function ct(t,e){let i=e.defaultPrevented,s=!1;const l=Object.create(e);return Object.defineProperties(l,{nativeEvent:{value:e},currentTarget:{value:t},target:{value:e.target},persist:{value:()=>{}},isDefaultPrevented:{value:()=>i},isPropagationStopped:{value:()=>s},preventDefault:{value:()=>{i=!0,e.preventDefault()}},stopPropagation:{value:()=>{s=!0,e.stopPropagation()}}}),l}function E(t){return rt.has(t)}function D(t,e,i){if(e==="tabIndex"){t.tabIndex=Number(i);return}t[e]=i}function ft(t,e){if(e==="tabIndex"){t.removeAttribute("tabindex");return}const i=t[e];if(typeof i=="boolean"){t[e]=!1;return}if(typeof i=="number"){t[e]=0;return}t[e]=""}function pt(t,e){return typeof e!="number"||e===0||t.startsWith("--")||nt.has(t)?String(e):`${e}px`}function gt(t,e){j.has(e)||t.style.removeProperty(q(e))}function mt(t,e,i){j.has(e)||t.style.setProperty(q(e),pt(e,i))}function vt(t,e,i){new Set([...Object.keys(e),...Object.keys(i)]).forEach(s=>{if(ot.has(s)||!ut(s)||T(s,e[s])||T(s,i[s]))return;const l=e[s],r=i[s];if(l===r)return;const n=dt(s);if(r==null||r===!1){E(s)&&ft(t,s),t.removeAttribute(n);return}if(r===!0){E(s)&&D(t,s,!0),t.setAttribute(n,"");return}if(E(s)){D(t,s,r);return}t.setAttribute(n,String(r))})}function yt(t,e,i){if(e!==i){if(i){t.className=i;return}t.removeAttribute("class")}}function bt(t,e,i){const s=e??{},l=i??{};new Set([...Object.keys(s),...Object.keys(l)]).forEach(r=>{const n=s[r],d=l[r];if(n!==d){if(d==null){gt(t,r);return}mt(t,r,d)}})}function wt(t,e,i){e.forEach(({eventName:l,listener:r,options:n})=>{t.removeEventListener(l,r,n)});const s=[];return Object.entries(i).forEach(([l,r])=>{if(!T(l,r))return;const{eventName:n,options:d}=ht(l),g=f=>{r(ct(t,f))};t.addEventListener(n,g,d),s.push({eventName:n,listener:g,options:d})}),s}function Y(t,e){const i=p.useRef({}),s=p.useRef([]);st(()=>{const l=i.current;return yt(t,l.className,e.className),bt(t,l.style,e.style),vt(t,l,e),s.current=wt(t,s.current,e),i.current=e,()=>{s.current.forEach(({eventName:r,listener:n,options:d})=>{t.removeEventListener(r,n,d)}),s.current=[]}},[t,e])}const Tt=N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,getReferencedVirtualElement:n,options:d,children:g,...f},u)=>{const o=p.useRef(document.createElement("div")),a=p.useRef(W(t,"bubbleMenu")).current;Y(o.current,f),typeof u=="function"?u(o.current):u&&(u.current=o.current);const{editor:h}=z(),c=e||h,m={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:a,shouldShow:r,getReferencedVirtualElement:n,options:d},y=p.useRef(m);y.current=m;const[O,b]=p.useState(!1),v=p.useRef(!0);return p.useEffect(()=>{if(c?.isDestroyed)return;if(!c){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const w=o.current;w.style.visibility="hidden",w.style.position="absolute";const I=B({...y.current,editor:c,element:w});c.registerPlugin(I);const G=y.current.pluginKey;return v.current=!0,b(!0),()=>{b(!1),c.unregisterPlugin(G),window.requestAnimationFrame(()=>{w.parentNode&&w.parentNode.removeChild(w)})}},[c]),p.useEffect(()=>{if(!(!O||!c||c.isDestroyed)){if(v.current){v.current=!1;return}c.view.dispatch(c.state.tr.setMeta(a,{type:"updateOptions",options:y.current}))}},[O,c,i,s,r,d,l,n,a]),$.createPortal(g,o.current)});N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,options:n,children:d,...g},f)=>{const u=p.useRef(document.createElement("div")),o=p.useRef(W(t,"floatingMenu")).current;Y(u.current,g),typeof f=="function"?f(u.current):f&&(f.current=u.current);const{editor:a}=z(),h=e||a,c={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:o,shouldShow:r,options:n},m=p.useRef(c);m.current=c;const[y,O]=p.useState(!1),b=p.useRef(!0);return p.useEffect(()=>{if(h?.isDestroyed)return;if(!h){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}const v=u.current;v.style.visibility="hidden",v.style.position="absolute";const w=F({...m.current,editor:h,element:v});h.registerPlugin(w);const I=m.current.pluginKey;return b.current=!0,O(!0),()=>{O(!1),h.unregisterPlugin(I),window.requestAnimationFrame(()=>{v.parentNode&&v.parentNode.removeChild(v)})}},[h]),p.useEffect(()=>{if(!(!y||!h||h.isDestroyed)){if(b.current){b.current=!1;return}h.view.dispatch(h.state.tr.setMeta(o,{type:"updateOptions",options:m.current}))}},[y,h,i,s,r,n,l,o]),$.createPortal(d,u.current)});export{Tt as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,c8 as nt,c as U,b as ie,j as i,gf as ke,o as lt,gg as rt,a4 as be,ak as we,q as _e,aD as We,aE as Ue,e as je,I as fe,aF as Be,aG as xe,K as pe,t as le,B as oe,y as Ve,E as ne,D as ot,v as at,w as ct,x as dt,h as Oe,m as ge,d_ as J,d as ht,R as ut,a5 as mt}from"./index-
|
|
1
|
+
import{r as $,c8 as nt,c as U,b as ie,j as i,gf as ke,o as lt,gg as rt,a4 as be,ak as we,q as _e,aD as We,aE as Ue,e as je,I as fe,aF as Be,aG as xe,K as pe,t as le,B as oe,y as Ve,E as ne,D as ot,v as at,w as ct,x as dt,h as Oe,m as ge,d_ as J,d as ht,R as ut,a5 as mt}from"./index-BfWp2Wnw.js";import{C as ft}from"./checkbox-BUvWR-iD.js";import{S as pt,b as xt,a as gt,d as vt,c as bt}from"./select-BXZoshA8.js";import{i as He}from"./ArrowLeft--TSM2Ux3.js";import{i as yt}from"./ChevronSelectorVertical-BdBrg7yc.js";import{i as jt}from"./Key01-h9Y3uaT_.js";import{i as qe,t as St,e as Nt,d as kt,c as wt,a as _t,s as It}from"./Tool01-Bscrvuft.js";import{i as Ye}from"./SearchMd-CTSUPag9.js";import{e as Ie,u as Ct,a as Mt,c as Et}from"./use-ai-providers-DgsrHLV3.js";import{d as Ot}from"./chat-context-BUMEnIPW.js";import{g as Ce}from"./ai-providers-logos-DD3qZ33J.js";import{g as ve}from"./openai-compatible-presets-BKGfVqEx.js";import{i as zt}from"./Monitor01-CBUOgSaC.js";import{i as Pt}from"./AlertCircle-mj0sz0gj.js";import{u as At}from"./use-entitlements-CQZj5lkl.js";import{s as Ge}from"./Eye-Xo5rS9iJ.js";import{t as ze}from"./ChevronDown-CNlehUMA.js";import{a as Ft}from"./Image01-C5Xqhwp5.js";function me(n,e,t){let s=t.initialDeps??[],l,r=!0;function a(){var c,h,d;let o;t.key&&((c=t.debug)!=null&&c.call(t))&&(o=Date.now());const m=n();if(!(m.length!==s.length||m.some((f,g)=>s[g]!==f)))return l;s=m;let u;if(t.key&&((h=t.debug)!=null&&h.call(t))&&(u=Date.now()),l=e(...m),t.key&&((d=t.debug)!=null&&d.call(t))){const f=Math.round((Date.now()-o)*100)/100,g=Math.round((Date.now()-u)*100)/100,I=g/16,S=(y,w)=>{for(y=String(y);y.length<w;)y=" "+y;return y};console.info(`%c⏱ ${S(g,5)} /${S(f,5)} ms`,`
|
|
2
2
|
font-size: .6rem;
|
|
3
3
|
font-weight: bold;
|
|
4
4
|
color: hsl(${Math.max(0,Math.min(120-120*I,120))}deg 100% 31%);`,t?.key)}return t?.onChange&&!(r&&t.skipInitialOnChange)&&t.onChange(l),r=!1,l}return a.updateDeps=c=>{s=c},a}function Pe(n,e){if(n===void 0)throw new Error("Unexpected undefined");return n}const Tt=(n,e)=>Math.abs(n-e)<1.01,Rt=(n,e,t)=>{let s;return function(...l){n.clearTimeout(s),s=n.setTimeout(()=>e.apply(this,l),t)}},Ae=n=>{const{offsetWidth:e,offsetHeight:t}=n;return{width:e,height:t}},Kt=n=>n,Lt=n=>{const e=Math.max(n.startIndex-n.overscan,0),t=Math.min(n.endIndex+n.overscan,n.count-1),s=[];for(let l=e;l<=t;l++)s.push(l);return s},Dt=(n,e)=>{const t=n.scrollElement;if(!t)return;const s=n.targetWindow;if(!s)return;const l=a=>{const{width:c,height:h}=a;e({width:Math.round(c),height:Math.round(h)})};if(l(Ae(t)),!s.ResizeObserver)return()=>{};const r=new s.ResizeObserver(a=>{const c=()=>{const h=a[0];if(h?.borderBoxSize){const d=h.borderBoxSize[0];if(d){l({width:d.inlineSize,height:d.blockSize});return}}l(Ae(t))};n.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return r.observe(t,{box:"border-box"}),()=>{r.unobserve(t)}},Fe={passive:!0},Te=typeof window>"u"?!0:"onscrollend"in window,$t=(n,e)=>{const t=n.scrollElement;if(!t)return;const s=n.targetWindow;if(!s)return;let l=0;const r=n.options.useScrollendEvent&&Te?()=>{}:Rt(s,()=>{e(l,!1)},n.options.isScrollingResetDelay),a=o=>()=>{const{horizontal:m,isRtl:p}=n.options;l=m?t.scrollLeft*(p&&-1||1):t.scrollTop,r(),e(l,o)},c=a(!0),h=a(!1);t.addEventListener("scroll",c,Fe);const d=n.options.useScrollendEvent&&Te;return d&&t.addEventListener("scrollend",h,Fe),()=>{t.removeEventListener("scroll",c),d&&t.removeEventListener("scrollend",h)}},Wt=(n,e,t)=>{if(e?.borderBoxSize){const s=e.borderBoxSize[0];if(s)return Math.round(s[t.options.horizontal?"inlineSize":"blockSize"])}return n[t.options.horizontal?"offsetWidth":"offsetHeight"]},Ut=(n,{adjustments:e=0,behavior:t},s)=>{var l,r;const a=n+e;(r=(l=s.scrollElement)==null?void 0:l.scrollTo)==null||r.call(l,{[s.options.horizontal?"left":"top"]:a,behavior:t})};class Bt{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var t,s,l;return((l=(s=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:s.now)==null?void 0:l.call(s))??Date.now()},this.observer=(()=>{let t=null;const s=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(l=>{l.forEach(r=>{const a=()=>{const c=r.target,h=this.indexFromElement(c);if(!c.isConnected){this.observer.unobserve(c);return}this.shouldMeasureDuringScroll(h)&&this.resizeItem(h,this.options.measureElement(c,r,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var l;(l=s())==null||l.disconnect(),t=null},observe:l=>{var r;return(r=s())==null?void 0:r.observe(l,{box:"border-box"})},unobserve:l=>{var r;return(r=s())==null?void 0:r.unobserve(l)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([s,l])=>{typeof l>"u"&&delete t[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Kt,rangeExtractor:Lt,onChange:()=>{},measureElement:Wt,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",...t}},this.notify=t=>{var s,l;(l=(s=this.options).onChange)==null||l.call(s,this,t)},this.maybeNotify=me(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.maybeNotify();return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(l=>{this.observer.observe(l)}),this.unsubs.push(this.options.observeElementRect(this,l=>{this.scrollRect=l,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(l,r)=>{this.scrollAdjustments=0,this.scrollDirection=r?this.getScrollOffset()<l?"forward":"backward":null,this.scrollOffset=l,this.isScrolling=r,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,s)=>{const l=new Map,r=new Map;for(let a=s-1;a>=0;a--){const c=t[a];if(l.has(c.lane))continue;const h=r.get(c.lane);if(h==null||c.end>h.end?r.set(c.lane,c):c.end<h.end&&l.set(c.lane,!0),l.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((a,c)=>a.end===c.end?a.index-c.index:a.end-c.end)[0]:void 0},this.getMeasurementOptions=me(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(t,s,l,r,a,c,h)=>(this.prevLanes!==void 0&&this.prevLanes!==c&&(this.lanesChangedFlag=!0),this.prevLanes=c,this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:s,scrollMargin:l,getItemKey:r,enabled:a,lanes:c,laneAssignmentMode:h}),{key:!1}),this.getMeasurements=me(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:s,scrollMargin:l,getItemKey:r,enabled:a,lanes:c,laneAssignmentMode:h},d)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const u of this.laneAssignments.keys())u>=t&&this.laneAssignments.delete(u);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));const o=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1);const m=this.measurementsCache.slice(0,o),p=new Array(c).fill(void 0);for(let u=0;u<o;u++){const f=m[u];f&&(p[f.lane]=u)}for(let u=o;u<t;u++){const f=r(u),g=this.laneAssignments.get(u);let I,S;const y=h==="estimate"||d.has(f);if(g!==void 0&&this.options.lanes>1){I=g;const N=p[I],x=N!==void 0?m[N]:void 0;S=x?x.end+this.options.gap:s+l}else{const N=this.options.lanes===1?m[u-1]:this.getFurthestMeasurement(m,u);S=N?N.end+this.options.gap:s+l,I=N?N.lane:u%this.options.lanes,this.options.lanes>1&&y&&this.laneAssignments.set(u,I)}const w=d.get(f),_=typeof w=="number"?w:this.options.estimateSize(u),C=S+_;m[u]={index:u,start:S,size:_,end:C,key:f,lane:I},p[I]=u}return this.measurementsCache=m,m},{key:!1,debug:()=>this.options.debug}),this.calculateRange=me(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,s,l,r)=>this.range=t.length>0&&s>0?Vt({measurements:t,outerSize:s,scrollOffset:l,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=me(()=>{let t=null,s=null;const l=this.calculateRange();return l&&(t=l.startIndex,s=l.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,s]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,s]},(t,s,l,r,a)=>r===null||a===null?[]:t({startIndex:r,endIndex:a,overscan:s,count:l}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const s=this.options.indexAttribute,l=t.getAttribute(s);return l?parseInt(l,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var s;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const l=this.scrollState.index??((s=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:s.index);if(l!==void 0&&this.range){const r=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,l-r),c=Math.min(this.options.count-1,l+r);return t>=a&&t<=c}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((a,c)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(c))});return}const s=this.indexFromElement(t),l=this.options.getItemKey(s),r=this.elementsCache.get(l);r!==t&&(r&&this.observer.unobserve(r),this.observer.observe(t),this.elementsCache.set(l,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(s)&&this.resizeItem(s,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,s)=>{var l;const r=this.measurementsCache[t];if(!r)return;const a=this.itemSizeCache.get(r.key)??r.size,c=s-a;c!==0&&(((l=this.scrollState)==null?void 0:l.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,c,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=c,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,s)),this.notify(!1))},this.getVirtualItems=me(()=>[this.getVirtualIndexes(),this.getMeasurements()],(t,s)=>{const l=[];for(let r=0,a=t.length;r<a;r++){const c=t[r],h=s[c];l.push(h)}return l},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const s=this.getMeasurements();if(s.length!==0)return Pe(s[Qe(0,s.length-1,l=>Pe(s[l]).start,t)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(t,s,l=0)=>{if(!this.scrollElement)return 0;const r=this.getSize(),a=this.getScrollOffset();s==="auto"&&(s=t>=a+r?"end":"start"),s==="center"?t+=(l-r)/2:s==="end"&&(t-=r);const c=this.getMaxScrollOffset();return Math.max(Math.min(c,t),0)},this.getOffsetForIndex=(t,s="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const l=this.getSize(),r=this.getScrollOffset(),a=this.measurementsCache[t];if(!a)return;if(s==="auto")if(a.end>=r+l-this.options.scrollPaddingEnd)s="end";else if(a.start<=r+this.options.scrollPaddingStart)s="start";else return[r,s];if(s==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),s];const c=s==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,s,a.size),s]},this.scrollToOffset=(t,{align:s="start",behavior:l="auto"}={})=>{const r=this.getOffsetForAlignment(t,s),a=this.now();this.scrollState={index:null,align:s,behavior:l,startedAt:a,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:l}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:s="auto",behavior:l="auto"}={})=>{t=Math.max(0,Math.min(t,this.options.count-1));const r=this.getOffsetForIndex(t,s);if(!r)return;const[a,c]=r,h=this.now();this.scrollState={index:t,align:c,behavior:l,startedAt:h,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:l}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:s="auto"}={})=>{const l=this.getScrollOffset()+t,r=this.now();this.scrollState={index:null,align:"start",behavior:s,startedAt:r,lastTargetOffset:l,stableFrames:0},this._scrollToOffset(l,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var t;const s=this.getMeasurements();let l;if(s.length===0)l=this.options.paddingStart;else if(this.options.lanes===1)l=((t=s[s.length-1])==null?void 0:t.end)??0;else{const r=Array(this.options.lanes).fill(null);let a=s.length-1;for(;a>=0&&r.some(c=>c===null);){const c=s[a];r[c.lane]===null&&(r[c.lane]=c.end),a--}l=Math.max(...r.filter(c=>c!==null))}return Math.max(l-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(t,{adjustments:s,behavior:l})=>{this.options.scrollToFn(t,{behavior:l,adjustments:s},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const s=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,l=s?s[0]:this.scrollState.lastTargetOffset,r=1,a=l!==this.scrollState.lastTargetOffset;if(!a&&Tt(l,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=r){this.scrollState=null;return}}else this.scrollState.stableFrames=0,a&&(this.scrollState.lastTargetOffset=l,this.scrollState.behavior="auto",this._scrollToOffset(l,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const Qe=(n,e,t,s)=>{for(;n<=e;){const l=(n+e)/2|0,r=t(l);if(r<s)n=l+1;else if(r>s)e=l-1;else return l}return n>0?n-1:0};function Vt({measurements:n,outerSize:e,scrollOffset:t,lanes:s}){const l=n.length-1,r=h=>n[h].start;if(n.length<=s)return{startIndex:0,endIndex:l};let a=Qe(0,l,r,t),c=a;if(s===1)for(;c<l&&n[c].end<t+e;)c++;else if(s>1){const h=Array(s).fill(0);for(;c<l&&h.some(o=>o<t+e);){const o=n[c];h[o.lane]=o.end,c++}const d=Array(s).fill(t+e);for(;a>=0&&d.some(o=>o>=t);){const o=n[a];d[o.lane]=o.start,a--}a=Math.max(0,a-a%s),c=Math.min(l,c+(s-1-c%s))}return{startIndex:a,endIndex:c}}const Re=typeof document<"u"?$.useLayoutEffect:$.useEffect;function Ht({useFlushSync:n=!0,...e}){const t=$.useReducer(()=>({}),{})[1],s={...e,onChange:(r,a)=>{var c;n&&a?nt.flushSync(t):t(),(c=e.onChange)==null||c.call(e,r,a)}},[l]=$.useState(()=>new Bt(s));return l.setOptions(s),Re(()=>l._didMount(),[]),Re(()=>l._willUpdate()),l}function qt(n){return Ht({observeElementRect:Dt,observeElementOffset:$t,scrollToFn:Ut,...n})}const Yt=["anthropic","openrouter"],Gt=["google"];function Ne(n){const e=U.c(8),{logo:t,name:s,description:l,onClick:r}=n;let a;e[0]!==t||e[1]!==s?(a=t?i.jsx("img",{src:t,alt:s,className:"size-5 object-contain"}):i.jsx(lt,{fallback:s.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[0]=t,e[1]=s,e[2]=a):a=e[2];let c;return e[3]!==l||e[4]!==s||e[5]!==r||e[6]!==a?(c=i.jsx(rt,{onClick:r,icon:a,title:s,description:l}),e[3]=l,e[4]=s,e[5]=r,e[6]=a,e[7]=c):c=e[7],c}function Ke(n){const e=U.c(7),{label:t,children:s}=n;let l;e[0]!==t?(l=i.jsx("span",{className:"px-1 text-meta",children:t}),e[0]=t,e[1]=l):l=e[1];let r;e[2]!==s?(r=i.jsx(ke,{children:s}),e[2]=s,e[3]=r):r=e[3];let a;return e[4]!==l||e[5]!==r?(a=i.jsxs("div",{className:"flex flex-col gap-2",children:[l,r]}),e[4]=l,e[5]=r,e[6]=a):a=e[6],a}function Xe(n){const e=U.c(45),{providers:t,onSelect:s}=n,l=ie(),r=At();let a;e[0]!==t?(a=S=>t.find(y=>y.id===S),e[0]=t,e[1]=a):a=e[1];const c=a;let h,d,o,m,p;if(e[2]!==c||e[3]!==s||e[4]!==r){const S=r?void 0:c("deco");let y;e[10]!==c?(y=c("openai-compatible"),e[10]=c,e[11]=y):y=e[11],o=y;let w;e[12]===Symbol.for("react.memo_cache_sentinel")?(w=ve("openai"),e[12]=w):w=e[12];const _=w;let C;e[13]!==s?(C=v=>i.jsx(Ne,{logo:v.logo,name:v.name,description:v.description,onClick:()=>s({kind:"provider",provider:v})},v.id),e[13]=s,e[14]=C):C=e[14];const N=C;if(e[15]!==c||e[16]!==s||e[17]!==o||e[18]!==N){let v;if(e[20]!==c||e[21]!==N?(v=j=>{const M=c(j);return M?[N(M)]:[]},e[20]=c,e[21]=N,e[22]=v):v=e[22],h=Yt.flatMap(v),o&&_){let j;e[23]!==s||e[24]!==o?(j=i.jsx(Ne,{logo:_.logo,name:_.name,description:_.description,onClick:()=>s({kind:"openai-compatible",provider:o,preset:_})},_.id),e[23]=s,e[24]=o,e[25]=j):j=e[25],h.push(j)}e[15]=c,e[16]=s,e[17]=o,e[18]=N,e[19]=h}else h=e[19];let x;e[26]!==c||e[27]!==N?(x=Gt.flatMap(v=>{const j=c(v);return j?[N(j)]:[]}),e[26]=c,e[27]=N,e[28]=x):x=e[28],d=x,m="flex flex-col gap-5",p=S&&i.jsx(ke,{children:N(S)}),e[2]=c,e[3]=s,e[4]=r,e[5]=h,e[6]=d,e[7]=o,e[8]=m,e[9]=p}else h=e[5],d=e[6],o=e[7],m=e[8],p=e[9];let u;e[29]!==h||e[30]!==l?(u=h.length>0&&i.jsx(Ke,{label:l("settings.aiProviders.groupChat"),children:h}),e[29]=h,e[30]=l,e[31]=u):u=e[31];let f;e[32]!==d||e[33]!==l?(f=d.length>0&&i.jsx(Ke,{label:l("settings.aiProviders.groupMedia"),children:d}),e[32]=d,e[33]=l,e[34]=f):f=e[34];let g;e[35]!==s||e[36]!==o||e[37]!==l?(g=o&&i.jsx(ke,{children:i.jsx(Ne,{logo:o.logo,name:l("settings.aiProviders.customOpenAiCompatible"),description:l("settings.aiProviders.customOpenAiDescription"),onClick:()=>s({kind:"openai-compatible",provider:o,preset:null})})}),e[35]=s,e[36]=o,e[37]=l,e[38]=g):g=e[38];let I;return e[39]!==m||e[40]!==p||e[41]!==u||e[42]!==f||e[43]!==g?(I=i.jsxs("div",{className:m,children:[p,u,f,g]}),e[39]=m,e[40]=p,e[41]=u,e[42]=f,e[43]=g,e[44]=I):I=e[44],I}function Qt(n){return Be({label:xe().optional(),apiKey:xe().min(1,n)})}function Xt(n){const e=U.c(91),{providerId:t,onCancel:s,onSuccess:l}=n,{org:r}=be(),a=we(),c=_e(),[h,d]=$.useState(!1),o=ie();let m;e[0]!==o?(m=We(Qt(o("settings.connectForms.apiKeyRequired"))),e[0]=o,e[1]=m):m=e[1];let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p={label:"",apiKey:""},e[2]=p):p=e[2];let u;e[3]!==m?(u={resolver:m,defaultValues:p},e[3]=m,e[4]=u):u=e[4];const{register:f,handleSubmit:g,formState:I}=Ue(u),{errors:S}=I;let y;e[5]!==t||e[6]!==a||e[7]!==o?(y=async se=>{await a.call("AI_PROVIDER_KEY_CREATE",{providerId:t,label:se.label||o("settings.connectForms.defaultKeyLabel"),apiKey:se.apiKey})},e[5]=t,e[6]=a,e[7]=o,e[8]=y):y=e[8];let w;e[9]!==l||e[10]!==r||e[11]!==c||e[12]!==o?(w=()=>{c.invalidateQueries({queryKey:pe.aiProviderKeys(r.id)}),c.invalidateQueries({queryKey:pe.aiProviders(r.id)}),le.success(o("settings.connectForms.keySavedSuccess")),l()},e[9]=l,e[10]=r,e[11]=c,e[12]=o,e[13]=w):w=e[13];let _;e[14]!==o?(_=se=>{le.error(o("settings.connectForms.failedSaveKey",{error:se.message}))},e[14]=o,e[15]=_):_=e[15];let C;e[16]!==y||e[17]!==w||e[18]!==_?(C={mutationFn:y,onSuccess:w,onError:_},e[16]=y,e[17]=w,e[18]=_,e[19]=C):C=e[19];const{mutate:N,isPending:x,error:v}=je(C);let j;e[20]!==N?(j=se=>N(se),e[20]=N,e[21]=j):j=e[21];let M;e[22]!==g||e[23]!==j?(M=g(j),e[22]=g,e[23]=j,e[24]=M):M=e[24];let E;e[25]!==o?(E=o("settings.connectForms.labelField"),e[25]=o,e[26]=E):E=e[26];let R;e[27]!==E?(R=i.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:E}),e[27]=E,e[28]=R):R=e[28];let A;e[29]!==o?(A=o("settings.connectForms.labelPlaceholder"),e[29]=o,e[30]=A):A=e[30];let b;e[31]!==f?(b=f("label"),e[31]=f,e[32]=b):b=e[32];let k;e[33]!==A||e[34]!==b?(k=i.jsx(fe,{placeholder:A,...b,size:"sm"}),e[33]=A,e[34]=b,e[35]=k):k=e[35];let z;e[36]!==R||e[37]!==k?(z=i.jsxs("div",{className:"space-y-1",children:[R,k]}),e[36]=R,e[37]=k,e[38]=z):z=e[38];let T;e[39]!==o?(T=o("settings.connectForms.apiKeyField"),e[39]=o,e[40]=T):T=e[40];let L;e[41]!==T?(L=i.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:T}),e[41]=T,e[42]=L):L=e[42];const W=h?"text":"password";let P;e[43]!==f?(P=f("apiKey"),e[43]=f,e[44]=P):P=e[44];let V;e[45]!==W||e[46]!==P?(V=i.jsx(fe,{type:W,placeholder:"sk-...",...P,size:"sm",className:"ph-no-capture pr-8"}),e[45]=W,e[46]=P,e[47]=V):V=e[47];let X;e[48]!==h?(X=()=>d(!h),e[48]=h,e[49]=X):X=e[49];let H;e[50]!==h||e[51]!==o?(H=o(h?"settings.connectForms.hideApiKey":"settings.connectForms.showApiKey"),e[50]=h,e[51]=o,e[52]=H):H=e[52];let q;e[53]!==h?(q=h?i.jsx(qe,{size:14}):i.jsx(Ge,{size:14}),e[53]=h,e[54]=q):q=e[54];let Y;e[55]!==X||e[56]!==H||e[57]!==q?(Y=i.jsx("button",{type:"button",onClick:X,"aria-label":H,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:q}),e[55]=X,e[56]=H,e[57]=q,e[58]=Y):Y=e[58];let ee;e[59]!==V||e[60]!==Y?(ee=i.jsxs("div",{className:"relative",children:[V,Y]}),e[59]=V,e[60]=Y,e[61]=ee):ee=e[61];let G;e[62]!==S.apiKey?(G=S.apiKey&&i.jsx("p",{className:"text-xs text-destructive",children:S.apiKey.message}),e[62]=S.apiKey,e[63]=G):G=e[63];let Q;e[64]!==L||e[65]!==ee||e[66]!==G?(Q=i.jsxs("div",{className:"space-y-1",children:[L,ee,G]}),e[64]=L,e[65]=ee,e[66]=G,e[67]=Q):Q=e[67];let Z;e[68]!==v?(Z=v&&i.jsx("p",{className:"text-xs text-destructive",children:v.message}),e[68]=v,e[69]=Z):Z=e[69];let O;e[70]!==o?(O=o("settings.connectForms.cancel"),e[70]=o,e[71]=O):O=e[71];let F;e[72]!==x||e[73]!==s||e[74]!==O?(F=i.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:s,disabled:x,children:O}),e[72]=x,e[73]=s,e[74]=O,e[75]=F):F=e[75];let K;e[76]!==x||e[77]!==o?(K=o(x?"settings.connectForms.saving":"settings.connectForms.saveKey"),e[76]=x,e[77]=o,e[78]=K):K=e[78];let D;e[79]!==x||e[80]!==K?(D=i.jsx(oe,{type:"submit",size:"sm",disabled:x,children:K}),e[79]=x,e[80]=K,e[81]=D):D=e[81];let B;e[82]!==F||e[83]!==D?(B=i.jsxs(Ve,{children:[F,D]}),e[82]=F,e[83]=D,e[84]=B):B=e[84];let te;return e[85]!==M||e[86]!==z||e[87]!==Q||e[88]!==Z||e[89]!==B?(te=i.jsxs("form",{onSubmit:M,className:"space-y-3",children:[z,Q,Z,B]}),e[85]=M,e[86]=z,e[87]=Q,e[88]=Z,e[89]=B,e[90]=te):te=e[90],te}function Jt(n){return Be({label:xe().optional(),baseUrl:xe().min(1,n),apiKey:xe().optional()})}function Zt(n){const e=U.c(109),{preset:t,onCancel:s,onSuccess:l}=n,{org:r}=be(),a=we(),c=_e(),[h,d]=$.useState(!1),o=ie();let m;e[0]!==o?(m=We(Jt(o("settings.connectForms.baseUrlRequired"))),e[0]=o,e[1]=m):m=e[1];const p=t?.defaultBaseUrl??"";let u;e[2]!==p?(u={label:"",baseUrl:p,apiKey:""},e[2]=p,e[3]=u):u=e[3];let f;e[4]!==m||e[5]!==u?(f={resolver:m,defaultValues:u},e[4]=m,e[5]=u,e[6]=f):f=e[6];const{register:g,handleSubmit:I,formState:S}=Ue(f),{errors:y}=S;let w;e[7]!==t||e[8]!==a?(w=async re=>{const it=JSON.stringify({baseUrl:re.baseUrl,apiKey:re.apiKey||""});await a.call("AI_PROVIDER_KEY_CREATE",{providerId:"openai-compatible",label:re.label||t?.name||re.baseUrl,apiKey:it,...t?{presetId:t.id}:{}})},e[7]=t,e[8]=a,e[9]=w):w=e[9];let _;e[10]!==l||e[11]!==r||e[12]!==c||e[13]!==o?(_=()=>{c.invalidateQueries({queryKey:pe.aiProviderKeys(r.id)}),c.invalidateQueries({queryKey:pe.aiProviders(r.id)}),le.success(o("settings.connectForms.connectionSavedSuccess")),l()},e[10]=l,e[11]=r,e[12]=c,e[13]=o,e[14]=_):_=e[14];let C;e[15]!==o?(C=re=>{le.error(o("settings.connectForms.failedSaveConnection",{error:re.message}))},e[15]=o,e[16]=C):C=e[16];let N;e[17]!==w||e[18]!==_||e[19]!==C?(N={mutationFn:w,onSuccess:_,onError:C},e[17]=w,e[18]=_,e[19]=C,e[20]=N):N=e[20];const{mutate:x,isPending:v,error:j}=je(N);let M;e[21]!==t||e[22]!==o?(M=t?o("settings.connectForms.labelPlaceholderPreset",{name:t.name}):o("settings.connectForms.labelPlaceholderOpenAiCompatible"),e[21]=t,e[22]=o,e[23]=M):M=e[23];const E=M;let R;e[24]!==t?.baseUrlPlaceholder||e[25]!==o?(R=t?.baseUrlPlaceholder??o("settings.connectForms.baseUrlPlaceholder"),e[24]=t?.baseUrlPlaceholder,e[25]=o,e[26]=R):R=e[26];const A=R;let b;e[27]!==x?(b=re=>x(re),e[27]=x,e[28]=b):b=e[28];let k;e[29]!==I||e[30]!==b?(k=I(b),e[29]=I,e[30]=b,e[31]=k):k=e[31];let z;e[32]!==o?(z=o("settings.connectForms.labelField"),e[32]=o,e[33]=z):z=e[33];let T;e[34]!==z?(T=i.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:z}),e[34]=z,e[35]=T):T=e[35];let L;e[36]!==g?(L=g("label"),e[36]=g,e[37]=L):L=e[37];let W;e[38]!==E||e[39]!==L?(W=i.jsx(fe,{placeholder:E,...L,size:"sm"}),e[38]=E,e[39]=L,e[40]=W):W=e[40];let P;e[41]!==T||e[42]!==W?(P=i.jsxs("div",{className:"space-y-1",children:[T,W]}),e[41]=T,e[42]=W,e[43]=P):P=e[43];let V;e[44]!==A||e[45]!==y||e[46]!==t?.defaultBaseUrl||e[47]!==g||e[48]!==o?(V=t?.defaultBaseUrl?i.jsx("input",{type:"hidden",...g("baseUrl")}):i.jsxs("div",{className:"space-y-1",children:[i.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:o("settings.connectForms.baseUrlField")}),i.jsx(fe,{type:"url",placeholder:A,...g("baseUrl"),size:"sm"}),y.baseUrl&&i.jsx("p",{className:"text-xs text-destructive",children:y.baseUrl.message})]}),e[44]=A,e[45]=y,e[46]=t?.defaultBaseUrl,e[47]=g,e[48]=o,e[49]=V):V=e[49];let X;e[50]!==o?(X=o("settings.connectForms.apiKeyField"),e[50]=o,e[51]=X):X=e[51];let H;e[52]!==t?.apiKeyRecommended||e[53]!==o?(H=t?.apiKeyRecommended?o("settings.connectForms.recommended"):o("settings.connectForms.optional"),e[52]=t?.apiKeyRecommended,e[53]=o,e[54]=H):H=e[54];let q;e[55]!==H?(q=i.jsxs("span",{className:"text-muted-foreground/60",children:["(",H,")"]}),e[55]=H,e[56]=q):q=e[56];let Y;e[57]!==X||e[58]!==q?(Y=i.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:[X," ",q]}),e[57]=X,e[58]=q,e[59]=Y):Y=e[59];const ee=h?"text":"password";let G;e[60]!==g?(G=g("apiKey"),e[60]=g,e[61]=G):G=e[61];let Q;e[62]!==ee||e[63]!==G?(Q=i.jsx(fe,{type:ee,placeholder:"sk-...",...G,size:"sm",className:"ph-no-capture pr-8"}),e[62]=ee,e[63]=G,e[64]=Q):Q=e[64];let Z;e[65]!==h?(Z=()=>d(!h),e[65]=h,e[66]=Z):Z=e[66];let O;e[67]!==h||e[68]!==o?(O=o(h?"settings.connectForms.hideApiKey":"settings.connectForms.showApiKey"),e[67]=h,e[68]=o,e[69]=O):O=e[69];let F;e[70]!==h?(F=h?i.jsx(qe,{size:14}):i.jsx(Ge,{size:14}),e[70]=h,e[71]=F):F=e[71];let K;e[72]!==Z||e[73]!==O||e[74]!==F?(K=i.jsx("button",{type:"button",onClick:Z,"aria-label":O,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:F}),e[72]=Z,e[73]=O,e[74]=F,e[75]=K):K=e[75];let D;e[76]!==Q||e[77]!==K?(D=i.jsxs("div",{className:"relative",children:[Q,K]}),e[76]=Q,e[77]=K,e[78]=D):D=e[78];let B;e[79]!==Y||e[80]!==D?(B=i.jsxs("div",{className:"space-y-1",children:[Y,D]}),e[79]=Y,e[80]=D,e[81]=B):B=e[81];let te;e[82]!==t?(te=t?.helpText&&i.jsx("p",{className:"text-xs text-muted-foreground",children:t.helpText}),e[82]=t,e[83]=te):te=e[83];let se;e[84]!==j?(se=j&&i.jsx("p",{className:"text-xs text-destructive",children:j.message}),e[84]=j,e[85]=se):se=e[85];let ae;e[86]!==o?(ae=o("settings.connectForms.cancel"),e[86]=o,e[87]=ae):ae=e[87];let ce;e[88]!==v||e[89]!==s||e[90]!==ae?(ce=i.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:s,disabled:v,children:ae}),e[88]=v,e[89]=s,e[90]=ae,e[91]=ce):ce=e[91];let de;e[92]!==v||e[93]!==o?(de=o(v?"settings.connectForms.saving":"settings.connectForms.saveConnection"),e[92]=v,e[93]=o,e[94]=de):de=e[94];let he;e[95]!==v||e[96]!==de?(he=i.jsx(oe,{type:"submit",size:"sm",disabled:v,children:de}),e[95]=v,e[96]=de,e[97]=he):he=e[97];let ue;e[98]!==ce||e[99]!==he?(ue=i.jsxs(Ve,{children:[ce,he]}),e[98]=ce,e[99]=he,e[100]=ue):ue=e[100];let ye;return e[101]!==k||e[102]!==P||e[103]!==V||e[104]!==B||e[105]!==te||e[106]!==se||e[107]!==ue?(ye=i.jsxs("form",{onSubmit:k,className:"space-y-3",children:[P,V,B,te,se,ue]}),e[101]=k,e[102]=P,e[103]=V,e[104]=B,e[105]=te,e[106]=se,e[107]=ue,e[108]=ye):ye=e[108],ye}const es={kind:"closed"};function ts(n,e){switch(e.type){case"open":return n.kind==="closed"?{kind:"grid"}:n;case"close":return{kind:"closed"};case"back":switch(n.kind){case"form":case"oauth-pending":case"provision-pending":case"provision-error":return{kind:"grid"};default:return n}case"select-form":return n.kind!=="grid"?n:{kind:"form",providerId:e.providerId,presetId:e.presetId};case"select-oauth":return n.kind!=="grid"?n:{kind:"oauth-pending",providerId:e.providerId,stateToken:e.stateToken};case"oauth-failed":return n.kind==="oauth-pending"?{kind:"grid"}:n;case"select-provision":return n.kind!=="grid"?n:{kind:"provision-pending",providerId:e.providerId};case"provision-error":return n.kind!=="provision-pending"?n:{kind:"provision-error",providerId:n.providerId,error:e.error};case"retry-provision":return n.kind!=="provision-error"?n:{kind:"provision-pending",providerId:n.providerId}}}function ss(n){switch(n.kind){case"form":case"oauth-pending":case"provision-pending":case"provision-error":return n.providerId;default:return null}}function is({open:n,onOpenChange:e,initialProvider:t}){const s=ie(),r=Ie()?.providers??[],{org:a}=be(),c=we(),h=_e(),[d,o]=$.useReducer(ts,es),m=$.useRef(!1);$.useEffect(()=>{n&&d.kind==="closed"?o({type:"open"}):!n&&d.kind!=="closed"&&o({type:"close"})},[n,d.kind]);const p=()=>{m.current=!1,o({type:"close"}),e(!1)},u=()=>{h.invalidateQueries({queryKey:pe.aiProviderKeys(a.id)}),h.invalidateQueries({queryKey:pe.aiProviders(a.id)})},{mutate:f}=je({mutationFn:async({providerId:b,code:k,stateToken:z,label:T})=>(await c.call("AI_PROVIDER_OAUTH_EXCHANGE",{providerId:b,code:k,stateToken:z,label:T}),b),onSuccess:b=>{ne("ai_provider_oauth_succeeded",{provider_id:b}),u();const k=r.find(z=>z.id===b);le.success(s("settings.connectProviderDialog.oauthSuccessMessage",{provider:k?.name??s("settings.connectProviderDialog.defaultProviderName")})),p()},onError:(b,k)=>{ne("ai_provider_oauth_failed",{provider_id:k.providerId,error:b.message}),le.error(s("settings.connectProviderDialog.oauthFailedMessage",{error:b.message})),o({type:"oauth-failed"})}}),{mutate:g}=je({mutationFn:async b=>(await c.call("AI_PROVIDER_PROVISION_KEY",{providerId:b}),b),onSuccess:b=>{ne("ai_provider_provision_succeeded",{provider_id:b}),u();const k=r.find(z=>z.id===b);le.success(s("settings.connectProviderDialog.provisionSuccessMessage",{provider:k?.name??s("settings.connectProviderDialog.defaultProviderName")})),p()},onError:(b,k)=>{ne("ai_provider_provision_failed",{provider_id:k,error:b.message}),o({type:"provision-error",error:b.message})}}),I=async b=>{const{provider:k}=b,z=b.kind==="openai-compatible"?b.preset?.id??null:null,T=k.supportedMethods.includes("oauth-pkce"),L=k.supportedMethods.includes("api-key");if(k.supportsProvision===!0){ne("ai_provider_connect_clicked",{provider_id:k.id,method:"provision"}),o({type:"select-provision",providerId:k.id}),g(k.id);return}if(T){ne("ai_provider_connect_clicked",{provider_id:k.id,method:"oauth-pkce"});try{const P=await c.call("AI_PROVIDER_OAUTH_URL",{providerId:k.id,callbackUrl:`${window.location.origin}/oauth/callback/ai-provider`});if(!P?.url)throw new Error("Invalid response from AI_PROVIDER_OAUTH_URL");o({type:"select-oauth",providerId:k.id,stateToken:P.stateToken}),window.open(P.url,"AiProviderOAuth","width=600,height=700")}catch(P){le.error(s("settings.connectProviderDialog.startOAuthFailedMessage",{error:P instanceof Error?P.message:String(P)}))}return}L&&(ne("ai_provider_connect_clicked",{provider_id:k.id,...z!==null?{preset_id:z}:{},method:"api-key"}),o({type:"select-form",providerId:k.id,presetId:z}))},S=$.useRef(I);S.current=I;const y=$.useRef(t);y.current=t,$.useEffect(()=>{!y.current||d.kind!=="grid"||m.current||(m.current=!0,S.current(y.current))},[d.kind]);const w=d.kind==="oauth-pending"?d.stateToken:null,_=d.kind==="oauth-pending"?d.providerId:null;$.useEffect(()=>{if(d.kind!=="oauth-pending")return;let b=!1;const k=d.stateToken,z=d.providerId,T=W=>{if(W.origin!==window.location.origin||W.data?.type!=="AI_PROVIDER_OAUTH_CALLBACK")return;const{code:P,stateToken:V}=W.data;if(V!==k){le.error(s("settings.connectProviderDialog.securityCheckFailedMessage")),o({type:"oauth-failed"});return}b=!0;const X=r.find(H=>H.id===z);f({providerId:z,code:P,stateToken:k,label:X?.name??z})};window.addEventListener("message",T);const L=setTimeout(()=>{b||(ne("ai_provider_oauth_timeout",{provider_id:z}),o({type:"oauth-failed"}),le.error(s("settings.connectProviderDialog.connectionTimedOutMessage")))},12e4);return()=>{window.removeEventListener("message",T),clearTimeout(L)}},[d.kind,w,_,f]);const[C,N]=$.useState(d);d.kind!=="closed"&&d!==C&&N(d);const x=d.kind==="closed"?C:d,v=ss(x),j=v?r.find(b=>b.id===v):null,E=(x.kind==="form"&&x.presetId?ve(x.presetId):null)?.name??j?.name??s("settings.connectProviderDialog.defaultTitle"),R=x.kind!=="grid"&&x.kind!=="closed",A=()=>{t?p():o({type:"back"})};return i.jsx(ot,{open:d.kind!=="closed",onOpenChange:b=>!b&&p(),children:i.jsxs(at,{className:"sm:max-w-md max-h-[90vh] overflow-y-auto",children:[i.jsx(ct,{children:i.jsxs("div",{className:"flex items-center gap-2",children:[R&&i.jsx(oe,{variant:"ghost",size:"icon-sm","aria-label":s("settings.connectProviderDialog.backButtonLabel"),onClick:A,children:i.jsx(He,{size:16})}),i.jsx(dt,{children:E})]})}),x.kind==="grid"&&!t&&i.jsx(Xe,{providers:r,onSelect:I}),x.kind==="form"&&(x.providerId==="openai-compatible"?i.jsx(Zt,{preset:x.presetId?ve(x.presetId):void 0,onCancel:()=>o({type:"back"}),onSuccess:()=>{u(),p()}}):i.jsx(Xt,{providerId:x.providerId,onCancel:()=>o({type:"back"}),onSuccess:()=>{u(),p()}})),x.kind==="oauth-pending"&&i.jsxs("div",{className:"flex flex-col items-center gap-4 py-8",children:[i.jsx(Oe,{size:"lg"}),i.jsx("p",{className:"text-sm text-muted-foreground text-center",children:s("settings.connectProviderDialog.oauthPendingMessage")})]}),x.kind==="provision-pending"&&i.jsxs("div",{className:"flex flex-col items-center gap-4 py-8",children:[i.jsx(Oe,{size:"lg"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:s("settings.connectProviderDialog.provisionPendingMessage")})]}),x.kind==="provision-error"&&i.jsxs("div",{className:"flex flex-col items-center gap-4 py-6",children:[i.jsx(Pt,{size:28,className:"text-destructive"}),i.jsx("p",{className:"text-sm text-foreground text-center",children:x.error}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(oe,{variant:"outline",size:"sm",onClick:()=>o({type:"back"}),children:s("settings.connectProviderDialog.backButton")}),i.jsx(oe,{size:"sm",onClick:()=>{o({type:"retry-provision"}),g(x.providerId)},children:s("settings.connectProviderDialog.retryButton")})]})]})]})})}function ns(n){const e=U.c(35);let t;e[0]!==n?(t=n===void 0?{}:n,e[0]=n,e[1]=t):t=e[1];const{title:s,description:l,providerFilter:r}=t,a=ie(),{org:c}=be(),[h,d]=$.useState(null),o=Ie();let m;e[2]!==o?.providers?(m=o?.providers??[],e[2]=o?.providers,e[3]=m):m=e[3];let p;if(e[4]!==r||e[5]!==m){let b;e[7]!==r?(b=k=>!r||r(k.id),e[7]=r,e[8]=b):b=e[8],p=m.filter(b),e[4]=r,e[5]=m,e[6]=p}else p=e[6];const u=p,f=c.name;let g;e[9]!==f||e[10]!==a||e[11]!==s?(g=s??(f?a("chat.noAiProviderEmptyState.headingWithOrg",{org:f}):a("chat.noAiProviderEmptyState.headingDefault")),e[9]=f,e[10]=a,e[11]=s,e[12]=g):g=e[12];const I=g;let S;e[13]!==l||e[14]!==a?(S=l??a("chat.noAiProviderEmptyState.subtitleDefault"),e[13]=l,e[14]=a,e[15]=S):S=e[15];const y=S;let w;e[16]===Symbol.for("react.memo_cache_sentinel")?(w=i.jsx("div",{className:"flex items-center justify-center size-14 rounded-2xl bg-muted border border-border",children:i.jsx(zt,{size:24,className:"text-muted-foreground"})}),e[16]=w):w=e[16];let _;e[17]!==I?(_=i.jsx("p",{className:"text-xl font-semibold text-foreground tracking-tight",children:I}),e[17]=I,e[18]=_):_=e[18];let C;e[19]!==y?(C=i.jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:y}),e[19]=y,e[20]=C):C=e[20];let N;e[21]!==_||e[22]!==C?(N=i.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[w,i.jsxs("div",{className:"space-y-2",children:[_,C]})]}),e[21]=_,e[22]=C,e[23]=N):N=e[23];let x;e[24]===Symbol.for("react.memo_cache_sentinel")?(x=b=>d(b),e[24]=x):x=e[24];let v;e[25]!==u?(v=i.jsx("div",{className:"w-full",children:i.jsx(Xe,{providers:u,onSelect:x})}),e[25]=u,e[26]=v):v=e[26];const j=h!==null;let M;e[27]===Symbol.for("react.memo_cache_sentinel")?(M=b=>{b||d(null)},e[27]=M):M=e[27];const E=h??void 0;let R;e[28]!==j||e[29]!==E?(R=i.jsx(is,{open:j,onOpenChange:M,initialProvider:E}),e[28]=j,e[29]=E,e[30]=R):R=e[30];let A;return e[31]!==v||e[32]!==R||e[33]!==N?(A=i.jsxs("div",{className:"flex flex-col items-center gap-8 w-full max-w-3xl px-4",children:[N,v,R]}),e[31]=v,e[32]=R,e[33]=N,e[34]=A):A=e[34],A}function Me(n){const e=n.title.includes(": ");return{provider:e?n.title.split(": ")[0]??"":n.modelId.split("/")[0]??"",displayName:e?n.title.split(": ").slice(1).join(": "):n.title}}function ls(n){return n<32e3?{level:1,labelKey:"chat.shared.contextLevelSmall",descriptionKey:"chat.shared.contextLevelSmallDesc"}:n<2e5?{level:2,labelKey:"chat.shared.contextLevelMedium",descriptionKey:"chat.shared.contextLevelMediumDesc"}:n<5e5?{level:3,labelKey:"chat.shared.contextLevelLarge",descriptionKey:"chat.shared.contextLevelLargeDesc"}:{level:4,labelKey:"chat.shared.contextLevelVeryLarge",descriptionKey:"chat.shared.contextLevelVeryLargeDesc"}}const rs=["bg-destructive","bg-warning","bg-success","bg-success"],os=["text-success","text-warning","text-warning","text-destructive"];function as(n,e){const t=Math.round(n*.75/1e3),s=t>=1?`${t}K`:`${Math.round(n*.75)}`;return e("chat.shared.approxWords",{wordCount:s})}function cs(n){return n<1?{level:1,labelKey:"chat.shared.costLevelCheap"}:n<5?{level:2,labelKey:"chat.shared.costLevelModerate"}:n<15?{level:3,labelKey:"chat.shared.costLevelHigh"}:{level:4,labelKey:"chat.shared.costLevelExpensive"}}const ds={text:{icon:i.jsx(wt,{className:"size-3.5"}),labelKey:"chat.shared.capabilityText"},vision:{icon:i.jsx(Ft,{className:"size-3.5"}),labelKey:"chat.shared.capabilityVision"},image:{icon:i.jsx(kt,{className:"size-3.5"}),labelKey:"chat.shared.capabilityImage"},tools:{icon:i.jsx(Nt,{className:"size-3.5"}),labelKey:"chat.shared.capabilityTools"},reasoning:{icon:i.jsx(St,{className:"size-3.5"}),labelKey:"chat.shared.capabilityReasoning"},"web-search":{icon:i.jsx(Ye,{className:"size-3.5"}),labelKey:"chat.shared.capabilityWebSearch"}};function hs(n){const e=U.c(10),{capability:t}=n,s=ie(),l=ds[t];if(l){const h=l.icon;let d;e[0]!==l.labelKey||e[1]!==s?(d=s(l.labelKey),e[0]=l.labelKey,e[1]=s,e[2]=d):d=e[2];let o;return e[3]!==l.icon||e[4]!==d?(o=i.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground border border-border rounded px-2 py-0.5",children:[h,d]}),e[3]=l.icon,e[4]=d,e[5]=o):o=e[5],o}let r;e[6]!==t?(r=t.charAt(0).toUpperCase(),e[6]=t,e[7]=r):r=e[7];const a=r+t.slice(1);let c;return e[8]!==a?(c=i.jsx("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground border border-border rounded px-2 py-0.5",children:a}),e[8]=a,e[9]=c):c=e[9],c}function us(n){const e=U.c(59),{model:t,compact:s}=n,l=s===void 0?!1:s,r=ie();if(!t){let x;e[0]!==r?(x=r("chat.shared.hoverToPreview"),e[0]=r,e[1]=x):x=e[1];let v;return e[2]!==x?(v=i.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:x}),e[2]=x,e[3]=v):v=e[3],v}const a=t.costs?.input!=null?t.costs.input*1e6:null,c=t.costs?.output!=null?t.costs.output*1e6:null;let h;e[4]!==t?(h=Me(t),e[4]=t,e[5]=h):h=e[5];const{provider:d,displayName:o}=h;if(l){let x;e[6]!==t.limits||e[7]!==r?(x=t.limits?.contextWindow&&i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-muted-foreground",children:r("chat.shared.context")}),i.jsxs("span",{className:"text-foreground font-medium",children:[t.limits.contextWindow.toLocaleString()," ",r("chat.shared.tokens")]})]}),e[6]=t.limits,e[7]=r,e[8]=x):x=e[8];let v;e[9]!==a||e[10]!==r?(v=a!=null&&i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-muted-foreground",children:r("chat.shared.input")}),i.jsxs("span",{className:"text-foreground font-medium",children:["$",a.toFixed(2)," / 1M"]})]}),e[9]=a,e[10]=r,e[11]=v):v=e[11];let j;e[12]!==c||e[13]!==r?(j=c!=null&&i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-muted-foreground",children:r("chat.shared.output")}),i.jsxs("span",{className:"text-foreground font-medium",children:["$",c.toFixed(2)," / 1M"]})]}),e[12]=c,e[13]=r,e[14]=j):j=e[14];let M;e[15]!==t.limits||e[16]!==r?(M=t.limits?.maxOutputTokens&&i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-muted-foreground",children:r("chat.shared.outputLimit")}),i.jsxs("span",{className:"text-foreground font-medium",children:[t.limits.maxOutputTokens.toLocaleString()," ",r("chat.shared.tokens")]})]}),e[15]=t.limits,e[16]=r,e[17]=M):M=e[17];let E;return e[18]!==x||e[19]!==v||e[20]!==j||e[21]!==M?(E=i.jsxs("div",{className:"flex flex-col gap-2 pt-3 pb-3 px-3 text-xs",children:[x,v,j,M]}),e[18]=x,e[19]=v,e[20]=j,e[21]=M,e[22]=E):E=e[22],E}let m;e[23]!==d?(m=i.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:d}),e[23]=d,e[24]=m):m=e[24];let p;e[25]!==t.logo||e[26]!==t.title?(p=t.logo&&i.jsx("img",{src:t.logo,className:"size-6 shrink-0 rounded-md dark:bg-white dark:rounded-sm dark:p-px",alt:t.title}),e[25]=t.logo,e[26]=t.title,e[27]=p):p=e[27];let u;e[28]!==o?(u=i.jsx("p",{className:"text-lg font-semibold leading-snug tracking-tight",children:o}),e[28]=o,e[29]=u):u=e[29];let f;e[30]!==p||e[31]!==u?(f=i.jsxs("div",{className:"flex items-center gap-2.5",children:[p,u]}),e[30]=p,e[31]=u,e[32]=f):f=e[32];let g;e[33]!==t.modelId?(g=i.jsx("p",{className:"text-xs text-muted-foreground/50 font-mono",children:t.modelId}),e[33]=t.modelId,e[34]=g):g=e[34];let I;e[35]!==m||e[36]!==f||e[37]!==g?(I=i.jsxs("div",{className:"flex flex-col gap-1 pt-1 pr-6",children:[m,f,g]}),e[35]=m,e[36]=f,e[37]=g,e[38]=I):I=e[38];let S;e[39]!==t.capabilities?(S=t.capabilities&&t.capabilities.length>0&&i.jsx("div",{className:"flex flex-wrap items-center gap-1.5 pb-4 border-b border-border",children:[...new Set(t.capabilities)].map(ms)}),e[39]=t.capabilities,e[40]=S):S=e[40];let y;e[41]!==t.limits||e[42]!==r?(y=t.limits?.contextWindow&&(()=>{const{level:x,labelKey:v,descriptionKey:j}=ls(t.limits.contextWindow);return i.jsxs("div",{className:"flex flex-col gap-1.5",children:[i.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:r("chat.shared.contextWindow")}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"flex items-center gap-0.5",children:[1,2,3,4].map(M=>i.jsx("div",{className:ge("w-2 h-2 rounded-full",M<=x?rs[x-1]:"bg-muted")},M))}),i.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:r(v)}),i.jsxs("span",{className:"text-xs text-muted-foreground",children:["— ",r(j)]})]}),i.jsxs("span",{className:"text-sm text-muted-foreground",children:[t.limits.contextWindow.toLocaleString()," ",r("chat.shared.tokens")]})]})})(),e[41]=t.limits,e[42]=r,e[43]=y):y=e[43];let w;e[44]!==t.limits||e[45]!==r?(w=t.limits?.maxOutputTokens&&i.jsxs("div",{className:"flex flex-col gap-1",children:[i.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:r("chat.shared.outputLimit")}),i.jsxs("div",{className:"flex items-baseline gap-2",children:[i.jsxs("span",{className:"text-sm text-foreground",children:[t.limits.maxOutputTokens.toLocaleString()," ",r("chat.shared.tokens")]}),i.jsx("span",{className:"text-sm text-muted-foreground",children:as(t.limits.maxOutputTokens,r)})]})]}),e[44]=t.limits,e[45]=r,e[46]=w):w=e[46];let _;e[47]!==a||e[48]!==c||e[49]!==r?(_=(a!=null||c!=null)&&(()=>{const{level:x,labelKey:v}=a!=null?cs(a):{level:0,labelKey:null};return i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:r("chat.shared.pricing")}),a!=null&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"flex items-center",children:[1,2,3,4].map(j=>i.jsx("span",{className:ge("text-sm font-semibold leading-none",j<=x?os[x-1]:"text-muted-foreground/20"),children:"$"},j))}),i.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:v?r(v):""})]}),i.jsxs("div",{className:"flex flex-col gap-1",children:[a!=null&&i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("span",{className:"text-xs text-muted-foreground",children:r("chat.shared.input")}),i.jsxs("span",{className:"text-xs text-foreground",children:["$",a.toFixed(2)," / 1M"," ",r("chat.shared.tokens")]})]}),c!=null&&i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("span",{className:"text-xs text-muted-foreground",children:r("chat.shared.output")}),i.jsxs("span",{className:"text-xs text-foreground",children:["$",c.toFixed(2)," / 1M"," ",r("chat.shared.tokens")]})]})]})]})})(),e[47]=a,e[48]=c,e[49]=r,e[50]=_):_=e[50];let C;e[51]!==y||e[52]!==w||e[53]!==_?(C=i.jsxs("div",{className:"flex flex-col gap-6",children:[y,w,_]}),e[51]=y,e[52]=w,e[53]=_,e[54]=C):C=e[54];let N;return e[55]!==C||e[56]!==I||e[57]!==S?(N=i.jsxs("div",{className:"flex flex-col gap-5 py-1 px-1.5",children:[I,S,C]}),e[55]=C,e[56]=I,e[57]=S,e[58]=N):N=e[58],N}function ms(n){return i.jsx(hs,{capability:n},n)}function ni(n){const e=U.c(22),{model:t,placeholder:s,isLoading:l}=n,r=l===void 0?!1:l,a=ie();let c;e[0]!==s||e[1]!==a?(c=s??a("chat.shared.selectModel"),e[0]=s,e[1]=a,e[2]=c):c=e[2];const h=c;if(r){let S;return e[3]===Symbol.for("react.memo_cache_sentinel")?(S=i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx(J,{className:"w-5 h-5 rounded-sm shrink-0"}),i.jsx(J,{className:"w-16 h-3 hidden md:block"})]}),e[3]=S):S=e[3],S}if(!t){let S;e[4]!==h?(S=i.jsx("span",{className:"text-sm text-muted-foreground",children:h}),e[4]=h,e[5]=S):S=e[5];let y;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=i.jsx(ze,{size:14,className:"text-muted-foreground opacity-50 shrink-0"}),e[6]=y):y=e[6];let w;return e[7]!==S?(w=i.jsxs("div",{className:"flex items-center gap-1.5",children:[S,y]}),e[7]=S,e[8]=w):w=e[8],w}let d;e[9]!==t?(d=Me(t),e[9]=t,e[10]=d):d=e[10];const{displayName:o}=d;let m;e[11]!==t?(m=Ce(t),e[11]=t,e[12]=m):m=e[12];const p=m;let u;e[13]!==t.title||e[14]!==p?(u=i.jsx("img",{src:p,className:"w-3.5 h-3.5 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px",alt:t.title}),e[13]=t.title,e[14]=p,e[15]=u):u=e[15];let f;e[16]!==o?(f=i.jsx("span",{className:"text-sm truncate whitespace-nowrap text-muted-foreground max-w-[100px] sm:max-w-none",children:o}),e[16]=o,e[17]=f):f=e[17];let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=i.jsx(ze,{size:14,className:"text-muted-foreground opacity-50 shrink-0"}),e[18]=g):g=e[18];let I;return e[19]!==u||e[20]!==f?(I=i.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 overflow-hidden",children:[u,f,g]}),e[19]=u,e[20]=f,e[21]=I):I=e[21],I}const fs=["vision","image","file","audio","video"],Je=["image/png","image/jpeg","image/gif","image/webp"],Ze=["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"];function Ee(n){const e=n?.capabilities;return e?fs.some(t=>e.includes(t)):!1}function li(n,e){if(!n)return!1;if(n.startsWith("text/"))return!0;const t=e?.capabilities??[],s=t.includes("vision")||t.includes("image"),l=t.includes("file"),r=t.includes("audio"),a=t.includes("video");return!!(s&&Je.includes(n)||l&&n==="application/pdf"||r&&n.startsWith("audio/")||a&&n.startsWith("video/")||Ee(e)&&Ze.includes(n))}function ri(n){const e=n?.capabilities??[],t=["text/*"];return(e.includes("vision")||e.includes("image"))&&t.push(...Je),e.includes("file")&&t.push("application/pdf"),e.includes("audio")&&t.push("audio/*"),e.includes("video")&&t.push("video/*"),Ee(n)&&t.push(...Ze),t.join(",")}function oi(n){const e=n?.capabilities??[],t=[];return(e.includes("vision")||e.includes("image"))&&t.push("chat.shared.fileTypeImages"),e.includes("file")&&t.push("chat.shared.fileTypePdfs"),e.includes("audio")&&t.push("chat.shared.fileTypeAudio"),e.includes("video")&&t.push("chat.shared.fileTypeVideo"),Ee(n)&&t.push("chat.shared.fileTypeOffice"),{parts:t,count:t.length}}const et=["smarter","faster","cheaper"],ps={smarter:"chat.decopilot.tierSmarter",faster:"chat.decopilot.tierFaster",cheaper:"chat.decopilot.tierCheaper"},xs=[{tier:"smarter",prefixes:["anthropic/claude-opus-4.8","anthropic/claude-sonnet-4.6","anthropic/claude-4.6-sonnet","openai/gpt-5.3-codex","google/gemini-3-pro","google/gemini-2.5-pro","cohere/command-r-plus","cohere/command-a"]},{tier:"faster",prefixes:["anthropic/claude-haiku-4.5","anthropic/claude-4.5-haiku","google/gemini-3-flash","openai/gpt-5.1-codex-mini","x-ai/grok-code-fast","x-ai/grok-3","mistralai/mistral-large","mistralai/codestral","mistralai/mistral-medium","minimax/minimax-m1"]},{tier:"cheaper",prefixes:["google/gemini-2.5-flash-lite","google/gemini-2.5-flash","google/gemini-2.0-flash","deepseek/deepseek-v3","openai/gpt-oss-120b","mistralai/mistral-small","mistralai/pixtral","cohere/command-r"]}],gs=xs.flatMap(({tier:n,prefixes:e})=>e.map(t=>({tier:n,prefix:t}))).sort((n,e)=>e.prefix.length-n.prefix.length),vs="google/gemini-2.5-pro",Le=new Map;function bs(n){const e=Le.get(n);if(e!==void 0)return e;let t=null;if(n.endsWith(":free"))t="cheaper";else for(const{tier:s,prefix:l}of gs)if(n.startsWith(l)){if(l===vs&&n.length>l.length&&n[l.length]==="-"){const a=n[l.length+1];if(!a||!/\d/.test(a))continue}t=s;break}return Le.set(n,t),t}function ys(n,e,t){if(t)return n;const s=n.filter(l=>e.has(l.modelId));return s.length>0?s:n}function De(n){const e={smarter:[],faster:[],cheaper:[],other:[]};for(const t of n){const s=bs(t.modelId);e[s??"other"].push(t)}for(const t of Object.keys(e))e[t].sort((s,l)=>s.title.localeCompare(l.title));return e}const tt="studio:model-shortlist:",js=new Set(["anthropic/claude-opus-4.8","anthropic/claude-sonnet-4.6","anthropic/claude-4.6-sonnet","anthropic/claude-sonnet-4.6:extended","openai/gpt-5.3-codex","google/gemini-3-pro-preview","google/gemini-2.5-pro","anthropic/claude-haiku-4.5","anthropic/claude-haiku-4.5-20251001","anthropic/claude-4.5-haiku","google/gemini-3-flash-preview","openai/gpt-5.1-codex-mini","x-ai/grok-code-fast-1","google/gemini-2.5-flash","deepseek/deepseek-v3.2","google/gemini-2.5-flash-lite","openai/gpt-oss-120b:free"]);function Ss(n){try{const e=localStorage.getItem(tt+n);return e?new Set(JSON.parse(e)):null}catch{return null}}function Ns(n,e){localStorage.setItem(tt+n,JSON.stringify([...e]))}function ks(n){const e=U.c(21),{model:t,onHover:s}=n;let l;e[0]!==t?(l=Me(t),e[0]=t,e[1]=l):l=e[1];const{displayName:r,provider:a}=l;let c;e[2]!==t?(c=Ce(t),e[2]=t,e[3]=c):c=e[3];const h=c;let d;e[4]!==t||e[5]!==s?(d=()=>s(t),e[4]=t,e[5]=s,e[6]=d):d=e[6];let o;e[7]!==t.title||e[8]!==h?(o=i.jsx("img",{src:h,className:"w-4 h-4 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px",alt:t.title}),e[7]=t.title,e[8]=h,e[9]=o):o=e[9];let m;e[10]!==r?(m=i.jsx("span",{className:"text-sm text-foreground leading-tight truncate",children:r}),e[10]=r,e[11]=m):m=e[11];let p;e[12]!==a?(p=i.jsx("span",{className:"text-xs text-muted-foreground/60 leading-tight",children:a}),e[12]=a,e[13]=p):p=e[13];let u;e[14]!==m||e[15]!==p?(u=i.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[m,p]}),e[14]=m,e[15]=p,e[16]=u):u=e[16];let f;return e[17]!==d||e[18]!==o||e[19]!==u?(f=i.jsxs("div",{className:"flex items-center gap-2.5 py-2 px-3 hover:bg-accent cursor-pointer rounded-lg",onMouseEnter:d,children:[o,u]}),e[17]=d,e[18]=o,e[19]=u,e[20]=f):f=e[20],f}function ws(n){const e=U.c(16),{error:t,onRetry:s}=n,l=ie();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("div",{className:"bg-destructive/10 p-2 rounded-full",children:i.jsx(mt,{className:"size-5 text-destructive"})}),e[0]=r):r=e[0];const a=l("chat.decopilot.failedToLoadModels");let c;e[1]!==a?(c=i.jsx("p",{className:"text-sm font-medium text-foreground",children:a}),e[1]=a,e[2]=c):c=e[2];const h=t?.message||l("chat.decopilot.couldNotFetchModels"),d=" "+l("chat.decopilot.tryAnotherProviderOrRetry");let o;e[3]!==h||e[4]!==d?(o=i.jsxs("p",{className:"text-xs text-muted-foreground max-w-[260px]",children:[h,d]}),e[3]=h,e[4]=d,e[5]=o):o=e[5];let m;e[6]!==c||e[7]!==o?(m=i.jsxs("div",{className:"flex flex-col gap-1",children:[c,o]}),e[6]=c,e[7]=o,e[8]=m):m=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx(It,{className:"size-3.5"}),e[9]=p):p=e[9];const u=l("chat.decopilot.retry");let f;e[10]!==s||e[11]!==u?(f=i.jsx("div",{className:"flex items-center gap-2",children:i.jsxs(oe,{variant:"outline",size:"sm",onClick:s,className:"gap-1.5",children:[p,u]})}),e[10]=s,e[11]=u,e[12]=f):f=e[12];let g;return e[13]!==f||e[14]!==m?(g=i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-4 py-8 text-center",children:[r,m,f]}),e[13]=f,e[14]=m,e[15]=g):g=e[15],g}function _s(){const n=U.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"flex-1 overflow-y-auto p-2 space-y-1",children:Array.from({length:6}).map(Is)}),n[0]=e):e=n[0],e}function Is(n,e){return i.jsxs("div",{className:"flex items-center gap-2 min-h-8 py-3 px-3 rounded-lg",children:[i.jsx(J,{className:"size-5 shrink-0 rounded-sm"}),i.jsx(J,{className:"flex-1 h-4"}),i.jsx(J,{className:"w-16 h-5 shrink-0 rounded-md"})]},e)}function $e(n){const e=U.c(12),{label:t,models:s,onSelect:l,onHover:r}=n;if(s.length===0)return null;let a;e[0]!==t?(a=i.jsx("div",{className:"text-xs font-medium text-muted-foreground px-3 pt-3 pb-1",children:t}),e[0]=t,e[1]=a):a=e[1];let c;if(e[2]!==s||e[3]!==r||e[4]!==l){let d;e[6]!==r||e[7]!==l?(d=o=>i.jsx("button",{type:"button",onClick:()=>l(o),onFocus:()=>r(o),className:"w-full text-left cursor-pointer",children:i.jsx(ks,{model:o,onHover:r})},o.modelId),e[6]=r,e[7]=l,e[8]=d):d=e[8],c=s.map(d),e[2]=s,e[3]=r,e[4]=l,e[5]=c}else c=e[5];let h;return e[9]!==a||e[10]!==c?(h=i.jsxs("div",{children:[a,c]}),e[9]=a,e[10]=c,e[11]=h):h=e[11],h}function Se(n,e){return e(n==="other"?"chat.decopilot.tierOther":ps[n])}function Cs(n){const e=U.c(21),{model:t,isChecked:s,onToggle:l,onHover:r}=n,[a,c]=$.useState(s);a!==s&&c(s);let h;e[0]!==t?(h=Ce(t),e[0]=t,e[1]=h):h=e[1];const d=h;let o;e[2]!==t||e[3]!==r?(o=()=>r(t),e[2]=t,e[3]=r,e[4]=o):o=e[4];let m;e[5]!==t.modelId||e[6]!==l?(m=()=>{c(Ms),l(t.modelId)},e[5]=t.modelId,e[6]=l,e[7]=m):m=e[7];let p;e[8]!==a||e[9]!==m?(p=i.jsx(ft,{checked:a,onCheckedChange:m}),e[8]=a,e[9]=m,e[10]=p):p=e[10];let u;e[11]!==d||e[12]!==t.title?(u=i.jsx("img",{src:d,className:"w-5 h-5 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px",alt:t.title}),e[11]=d,e[12]=t.title,e[13]=u):u=e[13];let f;e[14]!==t.title?(f=i.jsx("span",{className:"text-sm text-foreground flex-1 min-w-0 line-clamp-1",children:t.title}),e[14]=t.title,e[15]=f):f=e[15];let g;return e[16]!==o||e[17]!==p||e[18]!==u||e[19]!==f?(g=i.jsxs("label",{className:"flex items-center gap-3 min-h-8 py-2.5 px-3 hover:bg-accent cursor-pointer rounded-lg",onMouseEnter:o,children:[p,u,f]}),e[16]=o,e[17]=p,e[18]=u,e[19]=f,e[20]=g):g=e[20],g}function Ms(n){return!n}function Es(n,e){const t=[];for(const s of et)if(n[s].length>0){t.push({type:"header",label:Se(s,e)});for(const l of n[s])t.push({type:"model",model:l})}if(n.other.length>0){t.push({type:"header",label:Se("other",e)});for(const s of n.other)t.push({type:"model",model:s})}return t}function Os({items:n,shortlistSet:e,onToggle:t,onHover:s}){const l=$.useRef(null),r=qt({count:n.length,getScrollElement:()=>l.current,estimateSize:a=>n[a]?.type==="header"?36:44,overscan:6});return i.jsx("div",{ref:l,className:"flex-1 overflow-y-auto",children:i.jsx("div",{className:"relative",style:{height:r.getTotalSize()},children:r.getVirtualItems().map(a=>{const c=n[a.index];return c?i.jsx("div",{"data-index":a.index,ref:r.measureElement,className:"absolute left-0 right-0 top-0 px-0.5",style:{transform:`translateY(${a.start}px)`},children:c.type==="header"?i.jsx("div",{className:"text-xs font-medium text-muted-foreground px-3 pt-3 pb-1",children:c.label}):i.jsx(Cs,{model:c.model,isChecked:e.has(c.model.modelId),onToggle:t,onHover:s})},a.key):null})})})}function zs(n){const e=U.c(28),{keyId:t,searchTerm:s,onHover:l,onModelSelect:r,managing:a,onToggleManage:c,filterModels:h}=n,d=ie(),{models:o}=Mt(t),m=h?o.filter(h):o.filter(Et);let p;e[0]!==t?(p=()=>(t?Ss(t):null)??js,e[0]=t,e[1]=p):p=e[1];const[u,f]=$.useState(p),[,g]=$.useTransition();let I;e[2]!==t||e[3]!==g?(I=j=>{t&&g(()=>{f(M=>{const E=new Set(M);return E.has(j)?E.delete(j):E.add(j),Ns(t,E),E})})},e[2]=t,e[3]=g,e[4]=I):I=e[4];const S=I,y=s.toLowerCase().trim(),w=j=>y?j.filter(M=>M.title.toLowerCase().includes(y)||M.modelId.toLowerCase().includes(y)):j;if(a){const j=De(w(m)),M=Es(j,d);let E;e[5]!==u?(E=z=>u.has(z.modelId),e[5]=u,e[6]=E):E=e[6];const R=m.filter(E).length;let A;e[7]===Symbol.for("react.memo_cache_sentinel")?(A=i.jsx(He,{size:14}),e[7]=A):A=e[7];let b;e[8]!==d?(b=d("chat.decopilot.back"),e[8]=d,e[9]=b):b=e[9];let k;return e[10]!==c||e[11]!==b?(k=i.jsxs("button",{type:"button",onClick:c,className:"flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground cursor-pointer",children:[A,b]}),e[10]=c,e[11]=b,e[12]=k):k=e[12],i.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[i.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border",children:[k,i.jsx("span",{className:"text-xs text-muted-foreground",children:d("chat.decopilot.selectedCount",{count:R})})]}),i.jsx(Os,{items:M,shortlistSet:u,onToggle:S,onHover:l})]})}const _=De(w(ys(m,u,y)));let C;e[13]!==_||e[14]!==l||e[15]!==r||e[16]!==d?(C=et.map(j=>i.jsx($e,{label:Se(j,d),models:_[j],onSelect:r,onHover:l},j)),e[13]=_,e[14]=l,e[15]=r,e[16]=d,e[17]=C):C=e[17];let N;e[18]!==d?(N=Se("other",d),e[18]=d,e[19]=N):N=e[19];let x;e[20]!==_.other||e[21]!==l||e[22]!==r||e[23]!==N?(x=i.jsx($e,{label:N,models:_.other,onSelect:r,onHover:l}),e[20]=_.other,e[21]=l,e[22]=r,e[23]=N,e[24]=x):x=e[24];let v;return e[25]!==C||e[26]!==x?(v=i.jsxs("div",{className:"flex-1 overflow-y-auto px-0.5 pt-1 [touch-action:pan-y]",children:[C,x]}),e[25]=C,e[26]=x,e[27]=v):v=e[27],v}function ai(){const n=U.c(6);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"border-b border-border h-12 bg-background/95 backdrop-blur sticky top-0 z-10",children:i.jsxs("div",{className:"flex items-center gap-2.5 h-12 px-4",children:[i.jsx(J,{className:"size-4 shrink-0"}),i.jsx(J,{className:"flex-1 h-6"}),i.jsx(J,{className:"w-[140px] h-8 shrink-0"})]})}),n[0]=e):e=n[0];let t;n[1]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsxs("div",{className:"flex-1 flex flex-col md:border-r md:w-[420px] md:min-w-[420px] min-h-0 overflow-hidden",children:[e,i.jsx("div",{className:"flex-1 overflow-y-auto p-2 space-y-1",children:Array.from({length:8}).map(Ps)})]}),n[1]=t):t=n[1];let s;n[2]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[i.jsx(J,{className:"size-6 shrink-0"}),i.jsx(J,{className:"h-6 w-32"})]}),n[2]=s):s=n[2];let l;n[3]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsxs("div",{className:"flex flex-col gap-3 py-2 px-0",children:[s,i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(J,{className:"h-6 w-20 rounded-md"}),i.jsx(J,{className:"h-6 w-24 rounded-md"})]})]}),n[3]=l):l=n[3];let r;n[4]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsxs("div",{className:"flex flex-col gap-1.5",children:[i.jsx(J,{className:"h-4 w-24"}),i.jsx(J,{className:"h-4 w-32"})]}),n[4]=r):r=n[4];let a;return n[5]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsxs("div",{className:"flex flex-col md:flex-row h-full sm:h-[460px] min-h-0",children:[t,i.jsx("div",{className:"hidden md:block md:w-[320px] md:shrink-0 p-3",children:i.jsxs("div",{className:"flex flex-col gap-3 py-1 px-1.5",children:[l,i.jsxs("div",{className:"flex flex-col gap-4",children:[r,i.jsxs("div",{className:"flex flex-col gap-1.5",children:[i.jsx(J,{className:"h-4 w-16"}),i.jsx(J,{className:"h-4 w-40"})]})]})]})})]}),n[5]=a):a=n[5],a}function Ps(n,e){return i.jsxs("div",{className:"flex items-center gap-2 min-h-8 py-3 px-3 rounded-lg",children:[i.jsx(J,{className:"size-5 shrink-0 rounded-sm"}),i.jsx(J,{className:"flex-1 h-4"}),i.jsx(J,{className:"w-16 h-5 shrink-0 rounded-md"})]},e)}function st(n){const e=U.c(66),{onClose:t,credentialId:s,onCredentialChange:l,selectedModel:r,onModelChange:a,filterModels:c,compact:h}=n,d=ie(),[o,m]=$.useState(null),[p,u]=$.useState(""),[f,g]=$.useState(!1),I=Ie(),S=Ct();let y;e[0]!==I?.providers?(y=Object.fromEntries((I?.providers??[]).map(Ts)),e[0]=I?.providers,e[1]=y):y=e[1];const w=y,_=ht(),{org:C}=be();let N;e[2]!==l?(N=O=>{l(O),m(null)},e[2]=l,e[3]=N):N=e[3];const x=N;let v;e[4]!==s||e[5]!==t||e[6]!==a?(v=O=>{s&&(a(O),u(""),t())},e[4]=s,e[5]=t,e[6]=a,e[7]=v):v=e[7];const j=v;if(S.length===0){const O=!h&&"sm:w-[740px]";let F;e[8]!==O?(F=ge("flex items-center justify-center p-8 w-full",O),e[8]=O,e[9]=F):F=e[9];let K;e[10]===Symbol.for("react.memo_cache_sentinel")?(K=i.jsx(ns,{}),e[10]=K):K=e[10];let D;return e[11]!==F?(D=i.jsx("div",{className:F,children:K}),e[11]=F,e[12]=D):D=e[12],D}const M=h?"sm:h-[420px]":"sm:h-[460px]";let E;e[13]!==M?(E=ge("flex flex-col md:flex-row h-full min-h-0",M),e[13]=M,e[14]=E):E=e[14];const R=h?"w-full":"md:border-r md:w-[420px] md:min-w-[420px]";let A;e[15]!==R?(A=ge("flex-1 flex flex-col min-h-0 overflow-hidden",R),e[15]=R,e[16]=A):A=e[16];let b;e[17]===Symbol.for("react.memo_cache_sentinel")?(b=i.jsx(Ye,{size:16,className:"text-muted-foreground shrink-0"}),e[17]=b):b=e[17];let k;e[18]!==f||e[19]!==d?(k=d(f?"chat.decopilot.searchAllModels":"chat.decopilot.searchForModel"),e[18]=f,e[19]=d,e[20]=k):k=e[20];let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=O=>u(O.target.value),e[21]=z):z=e[21];let T;e[22]!==p||e[23]!==k?(T=i.jsx(fe,{autoFocus:!0,type:"text",placeholder:k,value:p,onChange:z,className:"flex-1 min-w-0 border-0 !shadow-none px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"}),e[22]=p,e[23]=k,e[24]=T):T=e[24];let L;e[25]!==s||e[26]!==x||e[27]!==S||e[28]!==w||e[29]!==d?(L=S.length>0&&i.jsxs(pt,{value:s??"",onValueChange:x,children:[i.jsxs(xt,{size:"sm",className:"w-auto max-w-[140px] h-8 shrink-0 gap-1.5 px-2 [&>svg:last-child]:hidden",onClick:Fs,children:[i.jsx(gt,{placeholder:d("chat.decopilot.key"),children:(()=>{const O=S.find(te=>te.id===s),F=O?w[O.providerId]:void 0,K=ve(O?.presetId),D=K?.logo??F?.logo,B=K?.name??F?.name??O?.providerId??"Key";return i.jsxs("span",{className:"flex items-center gap-1.5 min-w-0",children:[D?i.jsx("img",{src:D,alt:B,className:"w-4 h-4 rounded shrink-0 dark:bg-white dark:rounded-sm dark:p-px"}):i.jsx("div",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary shrink-0",children:B.slice(0,1).toUpperCase()}),i.jsx("span",{className:"text-xs truncate",children:B})]})})()}),i.jsx(yt,{className:"size-4 opacity-50 shrink-0 pointer-events-none"})]}),i.jsx(vt,{children:S.map(O=>{const F=w[O.providerId],K=ve(O.presetId),D=K?.logo??F?.logo,B=K?.name??F?.name??O.providerId;return i.jsx(bt,{value:O.id,children:i.jsxs("div",{className:"flex items-center gap-2",children:[D?i.jsx("img",{src:D,alt:B,className:"w-4 h-4 rounded dark:bg-white dark:rounded-sm dark:p-px"}):i.jsx("div",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:B.slice(0,1).toUpperCase()}),i.jsxs("span",{children:[B," — ",O.label]})]})},O.id)})})]}),e[25]=s,e[26]=x,e[27]=S,e[28]=w,e[29]=d,e[30]=L):L=e[30];let W;e[31]!==T||e[32]!==L?(W=i.jsx("div",{className:"border-b border-border h-12 bg-background/95 backdrop-blur sticky top-0 z-10",children:i.jsxs("label",{className:"flex items-center gap-2.5 h-12 px-4 pr-12 md:pr-4 cursor-text",children:[b,T,L]})}),e[31]=T,e[32]=L,e[33]=W):W=e[33];let P;e[34]!==s?(P=O=>{const{error:F,resetError:K}=O;return i.jsx(ws,{error:F,onRetry:K,credentialId:s??void 0})},e[34]=s,e[35]=P):P=e[35];let V;e[36]===Symbol.for("react.memo_cache_sentinel")?(V=i.jsx(_s,{}),e[36]=V):V=e[36];const X=s??void 0;let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=()=>g(As),e[37]=H):H=e[37];let q;e[38]!==c||e[39]!==j||e[40]!==f||e[41]!==p||e[42]!==X?(q=i.jsx($.Suspense,{fallback:V,children:i.jsx(zs,{keyId:X,searchTerm:p,onHover:m,onModelSelect:j,managing:f,onToggleManage:H,filterModels:c})}),e[38]=c,e[39]=j,e[40]=f,e[41]=p,e[42]=X,e[43]=q):q=e[43];let Y;e[44]!==s||e[45]!==P||e[46]!==q?(Y=i.jsx(ut,{fallback:P,children:q},s),e[44]=s,e[45]=P,e[46]=q,e[47]=Y):Y=e[47];let ee;e[48]!==f||e[49]!==_||e[50]!==C||e[51]!==d?(ee=!f&&i.jsxs("div",{className:"border-t border-border flex",children:[i.jsxs("button",{type:"button",onClick:()=>$.startTransition(()=>g(!0)),className:"flex items-center gap-2 flex-1 px-4 py-2.5 text-xs text-muted-foreground hover:text-foreground hover:bg-accent cursor-pointer",children:[i.jsx(_t,{className:"size-3.5 shrink-0"}),d("chat.decopilot.manageModels")]}),i.jsx("div",{className:"w-px bg-border shrink-0"}),i.jsxs("button",{type:"button",onClick:()=>_({to:"/$org/settings/ai-providers",params:{org:C.slug}}),className:"flex items-center gap-2 flex-1 px-4 py-2.5 text-xs text-muted-foreground hover:text-foreground hover:bg-accent cursor-pointer",children:[i.jsx(jt,{className:"size-3.5 shrink-0"}),d("chat.decopilot.manageApiKeys")]})]}),e[48]=f,e[49]=_,e[50]=C,e[51]=d,e[52]=ee):ee=e[52];let G;e[53]!==W||e[54]!==Y||e[55]!==ee||e[56]!==A?(G=i.jsxs("div",{className:A,children:[W,Y,ee]}),e[53]=W,e[54]=Y,e[55]=ee,e[56]=A,e[57]=G):G=e[57];let Q;e[58]!==h||e[59]!==o||e[60]!==r?(Q=!h&&i.jsx("div",{className:"hidden md:flex md:flex-col md:w-[320px] md:shrink-0 p-3",children:i.jsx(us,{model:o??r??null})}),e[58]=h,e[59]=o,e[60]=r,e[61]=Q):Q=e[61];let Z;return e[62]!==G||e[63]!==Q||e[64]!==E?(Z=i.jsxs("div",{className:E,children:[G,Q]}),e[62]=G,e[63]=Q,e[64]=E,e[65]=Z):Z=e[65],Z}function As(n){return!n}function Fs(n){return n.stopPropagation()}function Ts(n){return[n.id,n]}function Rs(n){const e=U.c(12),{onClose:t}=n,{credentialId:s,setCredentialId:l,selectedModel:r,setModel:a}=Ot();let c;e[0]!==l?(c=o=>{ne("chat_credential_changed",{credential_id:o}),l(o)},e[0]=l,e[1]=c):c=e[1];let h;e[2]!==s||e[3]!==r?.modelId||e[4]!==a?(h=o=>{s&&(ne("chat_model_changed",{from_model_id:r?.modelId??null,to_model_id:o.modelId,to_model_provider:o.providerId??null,credential_id:s}),a({...o,keyId:s}))},e[2]=s,e[3]=r?.modelId,e[4]=a,e[5]=h):h=e[5];let d;return e[6]!==s||e[7]!==t||e[8]!==r||e[9]!==c||e[10]!==h?(d=i.jsx(st,{onClose:t,credentialId:s,onCredentialChange:c,selectedModel:r,onModelChange:h}),e[6]=s,e[7]=t,e[8]=r,e[9]=c,e[10]=h,e[11]=d):d=e[11],d}function Ks(n){const e=U.c(2),{onClose:t}=n;let s;return e[0]!==t?(s=i.jsx(Rs,{onClose:t}),e[0]=t,e[1]=s):s=e[1],s}function Ls(n){const e=U.c(2);let t;return e[0]!==n?(t=i.jsx(st,{...n}),e[0]=n,e[1]=t):t=e[1],t}function ci(n){const e=U.c(2),{onClose:t}=n;let s;return e[0]!==t?(s=i.jsx(Ks,{onClose:t}),e[0]=t,e[1]=s):s=e[1],s}function di(n){const e=U.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(Ls,{...t}),e[2]=t,e[3]=s):s=e[3],s}export{is as C,di as M,ns as N,Xe as P,ni as S,ai as a,oi as b,ci as c,ri as g,li as i,Ee as m};
|