decocms 4.92.3 → 4.94.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-B9GlbKHh.js → AlertCircle-C1QMMByE.js} +1 -1
- package/dist/client/assets/{AreaChart-DHN9bK0l.js → AreaChart-q7Xrveeh.js} +1 -1
- package/dist/client/assets/ArrowRight-CMDrgznR.js +1 -0
- package/dist/client/assets/{ArrowUp-DNZsq7Zt.js → ArrowUp-DH3o_6rV.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DZZygrAi.js → ArrowUpRight-ChAriHcE.js} +1 -1
- package/dist/client/assets/Check-CfdDVvTz.js +1 -0
- package/dist/client/assets/{CheckCircle-BEcdXH7-.js → CheckCircle-DLrShk9W.js} +1 -1
- package/dist/client/assets/{ChevronDown-BSRiDjXd.js → ChevronDown-BRbMyZ1B.js} +1 -1
- package/dist/client/assets/{ChevronRight-YmTewr_B.js → ChevronRight-Ck0jEpLN.js} +1 -1
- package/dist/client/assets/ChevronUp-BT9WG4FQ.js +1 -0
- package/dist/client/assets/{Copy01-BkGYkmm-.js → Copy01-Du_h2a2a.js} +1 -1
- package/dist/client/assets/{DotsVertical-BmTi7wpl.js → DotsVertical-DuorjQq1.js} +1 -1
- package/dist/client/assets/{Eye-B-ZfWIGj.js → Eye-IdG-7KTy.js} +1 -1
- package/dist/client/assets/{FilterLines-BwWG7tAk.js → FilterLines-VrXrRt9f.js} +1 -1
- package/dist/client/assets/{Globe01-D3vBqhI7.js → Globe01-FT_j78GO.js} +1 -1
- package/dist/client/assets/{Globe04-pvxBukgJ.js → Globe04-BktKmpI1.js} +1 -1
- package/dist/client/assets/{HardDrive-DutZPQFL.js → HardDrive-y6RDSyxS.js} +1 -1
- package/dist/client/assets/{Image01-PIeYnf-K.js → Image01-jwttKGpp.js} +1 -1
- package/dist/client/assets/{Key01-DhLD806C.js → Key01-CTHo646W.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BI-sXAac.js → LayoutLeft-DDdEDKm1.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DO3QnLus.js → LinkExternal01-Dw89NskH.js} +1 -1
- package/dist/client/assets/{Monitor01-BOILvS2u.js → Monitor01-D8aw2U1c.js} +1 -1
- package/dist/client/assets/{Package-DbEcG94t.js → Package-Bl4wI6gQ.js} +1 -1
- package/dist/client/assets/{Palette-CyZvWKmI.js → Palette-Bb5lq-lb.js} +1 -1
- package/dist/client/assets/{Play-B8fWmOst.js → Play-h_GYgW2i.js} +1 -1
- package/dist/client/assets/{Plus-2c1jULco.js → Plus-DW8HTiM4.js} +1 -1
- package/dist/client/assets/{SearchLg-XmvudKlH.js → SearchLg-CuxPI6CH.js} +1 -1
- package/dist/client/assets/{SearchMd-lwIiBODG.js → SearchMd-B_vHLGSV.js} +1 -1
- package/dist/client/assets/{Settings02-DMpqOK24.js → Settings02-DkDTX6wF.js} +1 -1
- package/dist/client/assets/{Shield01-gTFc9c17.js → Shield01-BTjWMfyt.js} +1 -1
- package/dist/client/assets/{Star01-DoUbKevt.js → Star01-IywRndO8.js} +1 -1
- package/dist/client/assets/{Stars01-CJsm_THn.js → Stars01-awBCSC7p.js} +1 -1
- package/dist/client/assets/{Stars02-B08FvcHQ.js → Stars02-CWszz6x7.js} +1 -1
- package/dist/client/assets/{Sun-nDXz4jeM.js → Sun-CKE25B6W.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Rgis0XWf.js → SwitchHorizontal01-mvedp9Fy.js} +1 -1
- package/dist/client/assets/{Tool01-BR3IBeV9.js → Tool01-CiB1AgGO.js} +1 -1
- package/dist/client/assets/{Tool02-B0-a0UMl.js → Tool02-DatlcCMD.js} +1 -1
- package/dist/client/assets/{Trash01-Ba6bCbNY.js → Trash01-BFrDxOoF.js} +1 -1
- package/dist/client/assets/{TrendUp01-CeRF_789.js → TrendUp01-CtjoH8ZL.js} +1 -1
- package/dist/client/assets/{Upload01-B14IruoN.js → Upload01-BbY627dR.js} +1 -1
- package/dist/client/assets/{User01-ByIE6k8L.js → User01-JYrKFpRC.js} +1 -1
- package/dist/client/assets/{Users01-BdldAr7H.js → Users01-C_vPeB-O.js} +1 -1
- package/dist/client/assets/{Users03-Bx4g7VTC.js → Users03-uSqerTaX.js} +1 -1
- package/dist/client/assets/{X-Dif5I5BD.js → X-BWhzmnUU.js} +1 -1
- package/dist/client/assets/XCircle-C1KpQxmr.js +1 -0
- package/dist/client/assets/{XClose-DomD4542.js → XClose-CVT1rN5P.js} +1 -1
- package/dist/client/assets/{Zap-CEUVQQOc.js → Zap-yAX2Kmmw.js} +1 -1
- package/dist/client/assets/{ZapSquare-EvC2T9CP.js → ZapSquare-BrF3B-Lj.js} +1 -1
- package/dist/client/assets/{ZoomOut-BprgOfkE.js → ZoomOut-HpkK_jz9.js} +1 -1
- package/dist/client/assets/{access-gate-NCJKEJqO.js → access-gate-DNuevEtG.js} +1 -1
- package/dist/client/assets/add-section-modal-WI9lCqFk.js +1 -0
- package/dist/client/assets/agent-icon-C6bqiv4x.js +1 -0
- package/dist/client/assets/agents-list-CE_MFd_Q.js +1 -0
- package/dist/client/assets/ai-providers-Mqj9mjNl.js +1 -0
- package/dist/client/assets/{alert-C_4AvGUo.js → alert-C26tfGUe.js} +1 -1
- package/dist/client/assets/{alert-dialog-DDtUbhoS.js → alert-dialog-BeSbCM7Y.js} +2 -2
- package/dist/client/assets/app-editor-YNDE1p_g.js +1 -0
- package/dist/client/assets/{auth-CsHQFHV_.js → auth-C9enaQvD.js} +1 -1
- package/dist/client/assets/{auth-catchall-_TQy6GDd.js → auth-catchall-v4deh7e8.js} +1 -1
- package/dist/client/assets/{auth-entry-_ePf9_J1.js → auth-entry-C5zoJOD9.js} +1 -1
- package/dist/client/assets/{auth-split-layout-D9UYTbxy.js → auth-split-layout-Fi3vrH81.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CEv4KtcH.js → authenticate-and-persist-oauth-pF30Ku2c.js} +1 -1
- package/dist/client/assets/{automation-list-row-CyDHI_uf.js → automation-list-row-CAdX-w7a.js} +1 -1
- package/dist/client/assets/{automation-runs-D8v8nlly.js → automation-runs-CA0Zbin0.js} +5 -5
- package/dist/client/assets/automations-B-DWN4QS.js +1 -0
- package/dist/client/assets/{autosend-BgYoPuWD.js → autosend-CxPf5RKw.js} +1 -1
- package/dist/client/assets/{avatar-BVdHZbMN.js → avatar-CMlDI2D-.js} +1 -1
- package/dist/client/assets/{badge-C_9mnuBd.js → badge-BIKuZNrQ.js} +1 -1
- package/dist/client/assets/{block-document-CcMdXbqY.js → block-document-BioV5ZZf.js} +1 -1
- package/dist/client/assets/{brand-context-B-nZCoNx.js → brand-context-BphHJ3m4.js} +1 -1
- package/dist/client/assets/buckets-DhtwEFa3.js +1 -0
- package/dist/client/assets/bulk-category-panel-ChriKUsA.js +1 -0
- package/dist/client/assets/{calendar-Bxkf6gvE.js → calendar-CcmR6PZG.js} +1 -1
- package/dist/client/assets/{capability-load-error-i6NCyxxk.js → capability-load-error-Bn3urkKl.js} +1 -1
- package/dist/client/assets/{card-C3gg1LtP.js → card-Dd8gUiG_.js} +1 -1
- package/dist/client/assets/category-editor-DI3VJHNG.js +1 -0
- package/dist/client/assets/{chat-context-DSveBxCg.js → chat-context-Bn6Q6CeX.js} +12 -12
- package/dist/client/assets/checkbox-D0oew71k.js +1 -0
- package/dist/client/assets/{cli-auth-success-Cc2B25iW.js → cli-auth-success-ejQ9leoQ.js} +1 -1
- package/dist/client/assets/collection-detail-BwkpwNjs.js +1 -0
- package/dist/client/assets/collection-display-button-C1K9dOzY.js +1 -0
- package/dist/client/assets/{collection-search-TcSAZpqK.js → collection-search-B_OixFPO.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-H4bzUKoO.js → collection-table-wrapper-CKE2AAdw.js} +1 -1
- package/dist/client/assets/{collection-tabs-CIRa_M2W.js → collection-tabs-BbylyFFO.js} +1 -1
- package/dist/client/assets/{command-3z1R7bvy.js → command-CBlINdWQ.js} +1 -1
- package/dist/client/assets/commerce-onboarding-DOHVN1dn.js +1 -0
- package/dist/client/assets/{companions-core-C68sN4Wc.js → companions-core-CBtA8C2P.js} +1 -1
- package/dist/client/assets/connect-B_w51Pf2.js +8 -0
- package/dist/client/assets/connect-desktop-dialog-CS8xcpUf.js +1 -0
- package/dist/client/assets/{connection-card-D_K36Swx.js → connection-card-DgbR5Mwx.js} +1 -1
- package/dist/client/assets/connection-detail-BOoPBRpC.js +1 -0
- package/dist/client/assets/{connection-form-helpers-DyOAEqE9.js → connection-form-helpers-DKOWpJ-1.js} +1 -1
- package/dist/client/assets/connections-C4oqxMQG.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-CEQrv8Fn.js → decopilot-sse-pool-D92X3fNc.js} +1 -1
- package/dist/client/assets/{dialog-DUqhzGiD.js → dialog-a73gSkG2.js} +1 -1
- package/dist/client/assets/{domain-settings-CRIqu0Bs.js → domain-settings-DkMlfYSa.js} +1 -1
- package/dist/client/assets/{drawer-DvhdIHph.js → drawer-BU_sOAKq.js} +1 -1
- package/dist/client/assets/dropdown-menu-QheVZMJA.js +1 -0
- package/dist/client/assets/{empty-state-BHuw6cM9.js → empty-state-CMGZe-XE.js} +1 -1
- package/dist/client/assets/{extract-connection-data-_NDoBHMa.js → extract-connection-data-DB1JAVkl.js} +1 -1
- package/dist/client/assets/file-explorer-BjIj9REP.js +2 -0
- package/dist/client/assets/{file-type-icon-BOCZKON3.js → file-type-icon-D7Qv-wcj.js} +1 -1
- package/dist/client/assets/{files-CelFf8dg.js → files-BSWFZOxo.js} +1 -1
- package/dist/client/assets/{form-C9InGmo4.js → form-hOrojcOx.js} +1 -1
- package/dist/client/assets/general-CNP1ZbZe.js +1 -0
- package/dist/client/assets/{github-repo-picker-Biy9UFu8.js → github-repo-picker-BlPGLfgP.js} +1 -1
- package/dist/client/assets/{hooks-DU-2h9eZ.js → hooks-Ck4NS0BB.js} +1 -1
- package/dist/client/assets/index-B5Jok_EG.js +1 -0
- package/dist/client/assets/index-B7jBuFkn.css +1 -0
- package/dist/client/assets/index-BK8i2815.js +1 -0
- package/dist/client/assets/{index-f6gbzJ8b.js → index-BPUUTwje.js} +1 -1
- package/dist/client/assets/{index-DBhNC4I_.js → index-BZIMlfJW.js} +1 -1
- package/dist/client/assets/{index-DnrPO2j2.js → index-Bm76WXPR.js} +1 -1
- package/dist/client/assets/{index-DmhdwAgP.js → index-CIFSbzEF.js} +14 -14
- package/dist/client/assets/{index-BOgwoJjn.js → index-CISUQ4JK.js} +1 -1
- package/dist/client/assets/{index-CbhDnqOu.js → index-CSvkeXqd.js} +1 -1
- package/dist/client/assets/{index-Du80fsxC.js → index-Cotl-Dca.js} +5 -5
- package/dist/client/assets/index-CufVwosA.js +8 -0
- package/dist/client/assets/{index-CO3868Cu.js → index-D1R93mn_.js} +1 -1
- package/dist/client/assets/{index-DivFugQC.js → index-DPgVKNjM.js} +1 -1
- package/dist/client/assets/{index-nNhZx5bw.js → index-QQfVHF6c.js} +14 -14
- package/dist/client/assets/{index-Cs6hIS7C.js → index-UORAMw49.js} +3 -3
- package/dist/client/assets/{index-redirect-hJFu02mm.js → index-redirect-B3FtJ7Sm.js} +1 -1
- package/dist/client/assets/{input-TkvVVsQL.js → input-COKCWjWn.js} +1 -1
- package/dist/client/assets/{integration-icon-CWb3OXTV.js → integration-icon-8ogu7iqA.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BA1mFY2X.js → invite-member-dialog-BSRSJdKr.js} +1 -1
- package/dist/client/assets/{label-CB2o7dZ2.js → label-BCtHDi1-.js} +1 -1
- package/dist/client/assets/{layout-CqMMMVMm.js → layout-D82AWRF8.js} +1 -1
- package/dist/client/assets/{login-B0EX352Z.js → login-CmLx6gdY.js} +1 -1
- package/dist/client/assets/{mcp-oauth-B5rKpHdd.js → mcp-oauth-C4qKLSfa.js} +1 -1
- package/dist/client/assets/members-CdsfSF6n.js +1 -0
- package/dist/client/assets/{monaco-editor-DfuNvLfy.js → monaco-editor-1CxGfHM9.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-B43TP1bq.js → monitoring-stats-row-CJ1mx9EI.js} +1 -1
- package/dist/client/assets/{multi-select-DhXl88EK.js → multi-select-vlgbaYWz.js} +1 -1
- package/dist/client/assets/{oauth-callback-CZ8I3e9V.js → oauth-callback-Dd9QqvGA.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BiKjtCpj.js → oauth-callback-ai-provider-LKEqTcag.js} +1 -1
- package/dist/client/assets/{onboarding-U4YqP9I9.js → onboarding-Nyzpe9OQ.js} +1 -1
- package/dist/client/assets/{org-install-BYDat95r.js → org-install-CAemO7c_.js} +1 -1
- package/dist/client/assets/{org-layout-CVqWtNQa.js → org-layout-CYeMTDG5.js} +1 -1
- package/dist/client/assets/{organization-choice-CkG6QFWH.js → organization-choice-Bzsmy-ch.js} +1 -1
- package/dist/client/assets/orgs-C7gQBiuA.js +1 -0
- package/dist/client/assets/{page-seo-form-8ToiuKnD.js → page-seo-form-DPU2cMFP.js} +1 -1
- package/dist/client/assets/page-seo-sheet-Cxffc7Ri.js +1 -0
- package/dist/client/assets/{popover-DwV6WXHS.js → popover-MfTivQME.js} +1 -1
- package/dist/client/assets/post-editor-CzEfCRc6.js +1 -0
- package/dist/client/assets/{primitives-RdkZFzQM.js → primitives-CVKcZIrh.js} +1 -1
- package/dist/client/assets/profile-CZryQHJW.js +1 -0
- package/dist/client/assets/project-app-view-KvrG1kMx.js +1 -0
- package/dist/client/assets/record-editor-DXTrMUwZ.js +1 -0
- package/dist/client/assets/redirect-editor-Dk0CLnfu.js +1 -0
- package/dist/client/assets/{registry-layout-C2NoRJs0.js → registry-layout-t2McDRi7.js} +3 -3
- package/dist/client/assets/registry-tfN1hupx.js +2 -0
- package/dist/client/assets/{reports-J4B5GOoc.js → reports-C-ToD_ro.js} +2 -2
- package/dist/client/assets/{require-capability-DnfzULDW.js → require-capability-rAgzBn6-.js} +1 -1
- package/dist/client/assets/{required-auth-layout-ABsqitxw.js → required-auth-layout-KO0-1qXO.js} +1 -1
- package/dist/client/assets/{reset-password-CbrThkFS.js → reset-password-D1ZwK8Ps.js} +1 -1
- package/dist/client/assets/roles-B_p27MMh.js +1 -0
- package/dist/client/assets/{search-input-B-RkAjzQ.js → search-input-U68dcFxI.js} +1 -1
- package/dist/client/assets/secrets-Dw7rULfb.js +1 -0
- package/dist/client/assets/{sections-editor-BW9cZUKJ.js → sections-editor-BG6Wp1nc.js} +2 -2
- package/dist/client/assets/select-mGmKPAXK.js +1 -0
- package/dist/client/assets/{select-model-BAk08l-M.js → select-model-DTW46aHa.js} +1 -1
- package/dist/client/assets/self-tool-result-DYhJcSqy.js +1 -0
- package/dist/client/assets/seo-editor-BGid8G-R.js +1 -0
- package/dist/client/assets/settings-layout-BZgySvrP.js +1 -0
- package/dist/client/assets/{settings-section-CNVe03BK.js → settings-section-BrZlvNfy.js} +1 -1
- package/dist/client/assets/{shell-controls-5d4ZCRmi.js → shell-controls-nL7hKmbL.js} +1 -1
- package/dist/client/assets/{shell-layout-6KUu0MA6.js → shell-layout-wwtr-wuO.js} +1 -1
- package/dist/client/assets/{sidebar-DnKMI8jz.js → sidebar-BssgvH2v.js} +1 -1
- package/dist/client/assets/{skeleton-xDZ5Iwb8.js → skeleton-bahy-09d.js} +1 -1
- package/dist/client/assets/sso-lxqjliao.js +1 -0
- package/dist/client/assets/{store-BoCHTDSB.js → store-Cu8mkiNg.js} +1 -1
- package/dist/client/assets/store-registry-_FBAHxHd.js +2 -0
- package/dist/client/assets/{studio-tools-DIWsVaKg.js → studio-tools-DvzlcJzu.js} +1 -1
- package/dist/client/assets/{switch-DS9vYGS-.js → switch-ChtDpIb1.js} +1 -1
- package/dist/client/assets/{table-DnoPpUup.js → table-ClDYVeNV.js} +1 -1
- package/dist/client/assets/{tabs-2srR2H7A.js → tabs-Byd14nsc.js} +1 -1
- package/dist/client/assets/{textarea-DjtAtA2l.js → textarea-Duro92xh.js} +1 -1
- package/dist/client/assets/{toggle-group-DGvoaiio.js → toggle-group--i6PYyQg.js} +1 -1
- package/dist/client/assets/{toolbar-CvkbyWaX.js → toolbar-C7-EzPT_.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Cr-N30KB.js → toolbar-icon-button-VdYqoEpj.js} +1 -1
- package/dist/client/assets/{tooltip-cvFTpZ9W.js → tooltip-B6N5kQd7.js} +1 -1
- package/dist/client/assets/{use-ai-providers-ZLuBEaKb.js → use-ai-providers-kGXTar-o.js} +1 -1
- package/dist/client/assets/use-api-keys-DFJm_Sct.js +1 -0
- package/dist/client/assets/{use-automations-COcieFX-.js → use-automations-lLiWCOOl.js} +1 -1
- package/dist/client/assets/{use-autosave-C46oRXRb.js → use-autosave-BHdnAdy7.js} +1 -1
- package/dist/client/assets/{use-capability-3dRU8tE2.js → use-capability-n8ljqiDB.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BzcS25hV.js → use-clock-tick-CEJuEsd_.js} +1 -1
- package/dist/client/assets/{use-collections-DaXoNaLL.js → use-collections-B-IkeUFK.js} +1 -1
- package/dist/client/assets/{use-connection-DM1ROgj3.js → use-connection-DpPEk8aM.js} +1 -1
- package/dist/client/assets/{use-copy-DC217syR.js → use-copy-DkMO92nk.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Clu62lnk.js → use-create-virtual-mcp-DCIBpgEW.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DYog9M6N.js → use-debounced-autosave-bRNiU42w.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CSp0_yRg.js → use-debounced-value-DMJgrRLy.js} +1 -1
- package/dist/client/assets/use-deco-credits-CipyX0UT.js +1 -0
- package/dist/client/assets/{use-decopilot-events-CX_EuT5c.js → use-decopilot-events-BlazccAI.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CxGr7t4A.js → use-delete-connection-BvPMAZ_W.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-C6-1CBki.js → use-deployment-admin-CXmYBDRU.js} +1 -1
- package/dist/client/assets/{use-file-configs-DASxzk9O.js → use-file-configs-39QQNDS5.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-XidGSyic.js → use-infinite-scroll-DVSx3Rq1.js} +1 -1
- package/dist/client/assets/{use-join-requests-CjypbTMc.js → use-join-requests-DAnhRtlt.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BpAt0IbR.js → use-mcp-auth-status-BMkT9EZ9.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DseZ3Mea.js → use-mcp-client-CJ_CTOi-.js} +4 -4
- package/dist/client/assets/{use-mcp-tools-DJGNLf9H.js → use-mcp-tools-CS9HoteL.js} +1 -1
- package/dist/client/assets/{use-members-CncY3QG2.js → use-members-CgnYyzxD.js} +1 -1
- package/dist/client/assets/{use-mobile-D8w2xyip.js → use-mobile-48jgjwiy.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-YScxPu5L.js → use-navigate-to-agent-BuwUdTe3.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DjREcL_I.js → use-org-auth-client-C7loj_lF.js} +1 -1
- package/dist/client/assets/{use-org-sso-diAgeADE.js → use-org-sso-Bs00unXo.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BuFi-QNO.js → use-organization-roles-DZJy3wYG.js} +1 -1
- package/dist/client/assets/{use-organization-settings-bBY4klS6.js → use-organization-settings-lcyinZ9M.js} +1 -1
- package/dist/client/assets/{use-registry-app-Cy7ipz7c.js → use-registry-app-MQ7-Pl5L.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BZ0Z0jCg.js → use-registry-connections-By2otvi-.js} +1 -1
- package/dist/client/assets/{use-secrets-q_kPvC5B.js → use-secrets-BgDsFD4-.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DG0Zyz9B.js → use-status-sounds-Lt_bZnJO.js} +1 -1
- package/dist/client/assets/{use-t-BjZG1zRp.js → use-t-DfEf5oHx.js} +1 -1
- package/dist/client/assets/{use-view-mode-B02hzmMj.js → use-view-mode-DAFf8-q-.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-urYy02xb.js → use-virtual-mcp-GqxJcvwl.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-2fWwANBn.js +1 -0
- package/dist/client/assets/{useRouterState-C7tRHRC7.js → useRouterState-C7j1zaEX.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BFB3UBwe.js +1 -0
- package/dist/client/assets/{users-CZVOiXsq.js → users-WIzFyPzI.js} +1 -1
- package/dist/client/assets/variant-calendar-BmeiXwwQ.js +1 -0
- package/dist/client/assets/{view-mode-toggle-DziN7a9n.js → view-mode-toggle-zUY6pa7X.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +488 -488
- package/dist/server/server.js +313 -313
- package/package.json +1 -1
- package/dist/client/assets/ChevronUp-D5F6V6Tm.js +0 -1
- package/dist/client/assets/XCircle-C0OdV3N_.js +0 -1
- package/dist/client/assets/add-section-modal-DBjaDtzc.js +0 -1
- package/dist/client/assets/agent-icon-DicjSkHu.js +0 -1
- package/dist/client/assets/agents-list-Bt1R4ueI.js +0 -1
- package/dist/client/assets/ai-providers-TK1CCOpK.js +0 -1
- package/dist/client/assets/app-editor-ptKJtHHM.js +0 -1
- package/dist/client/assets/automations-BoSNNWPc.js +0 -1
- package/dist/client/assets/buckets-DcRE1RUQ.js +0 -1
- package/dist/client/assets/bulk-category-panel-BkJQrEio.js +0 -1
- package/dist/client/assets/category-editor-CaGAyBNX.js +0 -1
- package/dist/client/assets/checkbox-Ba2-hx8r.js +0 -1
- package/dist/client/assets/collection-detail-D9ZCPDhA.js +0 -1
- package/dist/client/assets/collection-display-button-D_kIgil2.js +0 -1
- package/dist/client/assets/commerce-onboarding-DbQ0hYyA.js +0 -1
- package/dist/client/assets/connect-desktop-dialog-DEEL81vf.js +0 -1
- package/dist/client/assets/connection-detail-CKGrDl_p.js +0 -1
- package/dist/client/assets/connections-BJO0R_-8.js +0 -1
- package/dist/client/assets/dropdown-menu-D5BTIZvH.js +0 -1
- package/dist/client/assets/file-explorer-CUr9mfMv.js +0 -2
- package/dist/client/assets/general-DlHL1tW3.js +0 -1
- package/dist/client/assets/index-629FAmzK.js +0 -1
- package/dist/client/assets/index-BQK4XWOD.js +0 -2
- package/dist/client/assets/index-Cb_X1LK0.js +0 -1
- package/dist/client/assets/index-oE__K1ye.css +0 -1
- package/dist/client/assets/members-Ds_Onv02.js +0 -1
- package/dist/client/assets/orgs-B4DrO8iC.js +0 -1
- package/dist/client/assets/page-seo-sheet-BTyypxho.js +0 -1
- package/dist/client/assets/post-editor-j9JAXwQN.js +0 -1
- package/dist/client/assets/profile-DwVJzm_R.js +0 -1
- package/dist/client/assets/project-app-view-e40sJb24.js +0 -1
- package/dist/client/assets/record-editor-BBPLTix7.js +0 -1
- package/dist/client/assets/redirect-editor-C8EDxpmx.js +0 -1
- package/dist/client/assets/registry-CFSvMZwJ.js +0 -2
- package/dist/client/assets/roles-BqueMkJJ.js +0 -1
- package/dist/client/assets/secrets-CEZOniOS.js +0 -1
- package/dist/client/assets/select-AzuoAc3H.js +0 -1
- package/dist/client/assets/self-tool-result-C94YNykg.js +0 -1
- package/dist/client/assets/seo-editor-CR8P7sfk.js +0 -1
- package/dist/client/assets/settings-layout-9yQD_m0n.js +0 -1
- package/dist/client/assets/sso-DNsZ7Hie.js +0 -1
- package/dist/client/assets/store-registry-WZUtBjlh.js +0 -2
- package/dist/client/assets/use-deco-credits-Bm6Hzrca.js +0 -1
- package/dist/client/assets/useInfiniteQuery-nK_JPgM8.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-_ObcRUnC.js +0 -1
- package/dist/client/assets/variant-calendar-DibyF3zD.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Z as Nt,_ as $e,$ as wt,a0 as Et,a1 as lt,n as he,a2 as It,a3 as Tt,r as Q,a4 as Ot,a5 as Rt,a6 as kt,a7 as At,a8 as it,a9 as Lt,aa as Dt,ab as Pt,c as H,l as ie,j as s,B,d as Oe,K as Y,H as be,I as ae,J as Ce,M as ve,i as Ie,m as me,ac as $t,t as Re,v as Pe,p as oe,Q as zt,E as qt,a as Ft}from"./index-DmhdwAgP.js";import{W as ct,g as Kt,u as ze,S as Ut}from"./use-mcp-client-DseZ3Mea.js";import{I as qe}from"./integration-icon-CWb3OXTV.js";import{c as fe,a as dt,h as ut,D as mt,d as ft,e as pt}from"./dialog-DUqhzGiD.js";import{b as Fe,T as Ke,a as Ue}from"./tooltip-cvFTpZ9W.js";import{i as Me}from"./CheckCircle-BEcdXH7-.js";import{e as ht,g as Mt,h as gt}from"./agent-icon-DicjSkHu.js";import{u as J,t as Qt,m as Gt,s as Ht,g as Vt,p as Bt,F as Wt,b as Yt,a as Zt,c as Xt}from"./companions-core-C68sN4Wc.js";import{F as re,a as je,b as le,c as Ee,d as ce,f as de,e as Jt}from"./form-C9InGmo4.js";import{I as _e}from"./input-TkvVVsQL.js";import{i as es}from"./ChevronUp-D5F6V6Tm.js";import{a as xt}from"./Copy01-BkGYkmm-.js";import{i as ts}from"./Settings02-DMpqOK24.js";import{s as ss}from"./Eye-B-ZfWIGj.js";import{u as ns}from"./use-debounced-value-CSp0_yRg.js";import{f as yt,a as os,p as is}from"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import{c as as,e as rs}from"./extract-connection-data-_NDoBHMa.js";import{a as ls}from"./authenticate-and-persist-oauth-CEv4KtcH.js";import{i as bt}from"./ArrowUpRight-DZZygrAi.js";function at(o,e){const t=new Set(e);return o.filter(n=>!t.has(n))}function cs(o,e,t){const n=o.slice(0);return n[e]=t,n}var ds=class extends Nt{#o;#e;#i;#n;#t;#s;#a;#r;#l;#c=[];constructor(o,e,t){super(),this.#o=o,this.#n=t,this.#i=[],this.#t=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#t.forEach(o=>{o.subscribe(e=>{this.#f(o,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#t.forEach(o=>{o.destroy()})}setQueries(o,e){this.#i=o,this.#n=e,$e.batch(()=>{const t=this.#t,n=this.#m(this.#i);n.forEach(r=>r.observer.setOptions(r.defaultedQueryOptions));const i=n.map(r=>r.observer),a=i.map(r=>r.getCurrentResult()),l=t.length!==i.length,c=i.some((r,f)=>r!==t[f]),u=l||c,p=u?!0:a.some((r,f)=>{const m=this.#e[f];return!m||!wt(r,m)});!u&&!p||(u&&(this.#c=n,this.#t=i),this.#e=a,this.hasListeners()&&(u&&(at(t,i).forEach(r=>{r.destroy()}),at(i,t).forEach(r=>{r.subscribe(f=>{this.#f(r,f)})})),this.#p()))})}getCurrentResult(){return this.#e}getQueries(){return this.#t.map(o=>o.getCurrentQuery())}getObservers(){return this.#t}getOptimisticResult(o,e){const t=this.#m(o),n=t.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),i=t.map(a=>a.defaultedQueryOptions.queryHash);return[n,a=>this.#u(a??n,e,i),()=>this.#d(n,t)]}#d(o,e){return e.map((t,n)=>{const i=o[n];return t.defaultedQueryOptions.notifyOnChangeProps?i:t.observer.trackResult(i,a=>{e.forEach(l=>{l.observer.trackProp(a)})})})}#u(o,e,t){if(e){const n=this.#l,i=t!==void 0&&n!==void 0&&(n.length!==t.length||t.some((a,l)=>a!==n[l]));return(!this.#s||this.#e!==this.#r||i||e!==this.#a)&&(this.#a=e,this.#r=this.#e,t!==void 0&&(this.#l=t),this.#s=Et(this.#s,e(o))),this.#s}return o}#h(){return this.#n?.combine!==void 0&&this.#t.some((o,e)=>o.options.suspense&&this.#e[e]?.data===void 0)}#m(o){const e=new Map;this.#t.forEach(n=>{const i=n.options.queryHash;if(!i)return;const a=e.get(i);a?a.push(n):e.set(i,[n])});const t=[];return o.forEach(n=>{const i=this.#o.defaultQueryOptions(n),l=e.get(i.queryHash)?.shift()??new lt(this.#o,i);t.push({defaultedQueryOptions:i,observer:l})}),t}#f(o,e){const t=this.#t.indexOf(o);t!==-1&&(this.#e=cs(this.#e,t,e),this.#p())}#p(){if(this.hasListeners()){const o=this.#d(this.#e,this.#c),e=this.#h(),t=this.#s,n=e?t:this.#u(o,this.#n?.combine);(e||t!==n)&&$e.batch(()=>{this.listeners.forEach(i=>{i(this.#e)})})}}};function us({queries:o,...e},t){const n=he(t),i=It(),a=Tt(),l=Q.useMemo(()=>o.map(C=>{const g=n.defaultQueryOptions(C);return g._optimisticResults=i?"isRestoring":"optimistic",g}),[o,n,i]);l.forEach(C=>{Ot(C);const g=n.getQueryCache().get(C.queryHash);Rt(C,a,g)}),kt(a);const[c]=Q.useState(()=>new ds(n,l,e)),[u,p,r]=c.getOptimisticResult(l,e.combine),f=!i&&e.subscribed!==!1;Q.useSyncExternalStore(Q.useCallback(C=>f?c.subscribe($e.batchCalls(C)):At,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),Q.useEffect(()=>{c.setQueries(l,e)},[l,e,c]);const h=u.some((C,g)=>it(l[g],C))?u.flatMap((C,g)=>{const d=l[g];if(d&&it(d,C)){const y=new lt(n,d);return Lt(d,y,a)}return[]}):[];if(h.length>0)throw Promise.all(h);const _=u.find((C,g)=>{const d=l[g];return d&&Dt({result:C,errorResetBoundary:a,throwOnError:d.throwOnError,query:n.getQueryCache().get(d.queryHash),suspense:d.suspense})});if(_?.error)throw _.error;return p(r())}function ms(o,e){return us({...o,queries:o.queries.map(t=>({...t,suspense:!0,throwOnError:Pt,enabled:!0,placeholderData:void 0}))},e)}const fs=/^[a-zA-Z][a-zA-Z\d+.-]*:/,ps=/^[a-zA-Z][a-zA-Z\d+.-]*:\/\//,hs=/^[^\s/:?#]+\.[^\s/:?#]+:\d+(?:[/?#]|$)/,gs=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function Te(o){const e=o.trim();if(!e)return{ok:!1,error:"Enter a website URL."};const t=fs.test(e),n=ps.test(e),i=hs.test(e);if(t&&!n&&!i)return{ok:!1,error:"Use an HTTP or HTTPS website URL."};const a=n?e:`https://${e}`;let l;try{l=new URL(a)}catch{return{ok:!1,error:"Enter a valid website URL."}}if(l.protocol!=="http:"&&l.protocol!=="https:")return{ok:!1,error:"Use an HTTP or HTTPS website URL."};const c=l.hostname.split(".");return c.length<2||c.some(u=>!u||!gs.test(u))?{ok:!1,error:"Enter a valid website URL."}:(l.protocol="https:",{ok:!0,value:l.origin})}function Qn(o,e){if(!o.trim())return!0;const t=Te(o);if(!t.ok||!e)return!1;const n=Te(e);return n.ok&&n.value===t.value}function Gn(o){if(!o)return null;const e=Te(o);return e.ok?new URL(e.value).hostname:null}function xs(o){const e=H.c(14),{children:t,className:n,wrapperClassName:i}=o,[a,l]=Q.useState(!0);let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=C=>{if(!C)return;const g=()=>{const y=C.scrollHeight-C.scrollTop-C.clientHeight<8;l(y)};g(),C.addEventListener("scroll",g,{passive:!0});const d=new ResizeObserver(g);d.observe(C);for(const y of Array.from(C.children))d.observe(y);return()=>{C.removeEventListener("scroll",g),d.disconnect()}},e[0]=c):c=e[0];const u=c;let p;e[1]!==i?(p=ie("relative",i),e[1]=i,e[2]=p):p=e[2];let r;e[3]!==t||e[4]!==n?(r=s.jsx("div",{ref:u,className:n,children:t}),e[3]=t,e[4]=n,e[5]=r):r=e[5];const f=a?"opacity-0":"opacity-100";let m;e[6]!==f?(m=ie("pointer-events-none absolute inset-x-0 -bottom-px h-[72px]","bg-gradient-to-t from-sidebar from-[6px] to-transparent","backdrop-blur-[1px] [mask-image:linear-gradient(to_top,black_6px,transparent)]","transition-opacity duration-200",f),e[6]=f,e[7]=m):m=e[7];let h;e[8]!==m?(h=s.jsx("div",{"aria-hidden":!0,className:m}),e[8]=m,e[9]=h):h=e[9];let _;return e[10]!==p||e[11]!==r||e[12]!==h?(_=s.jsxs("div",{className:p,children:[r,h]}),e[10]=p,e[11]=r,e[12]=h,e[13]=_):_=e[13],_}function rt(o){const e=H.c(38);let t,n,i,a,l;e[0]!==o?({value:l,onChange:n,placeholder:i,className:t,...a}=o,e[0]=o,e[1]=t,e[2]=n,e[3]=i,e[4]=a,e[5]=l):(t=e[1],n=e[2],i=e[3],a=e[4],l=e[5]);const[c,u]=Q.useState(!1),[p,r]=Q.useState(!1);let f;e[6]!==l?(f=async()=>{if(l)try{await navigator.clipboard.writeText(l),r(!0),setTimeout(()=>r(!1),2e3)}catch(R){console.error("Failed to copy text: ",R)}},e[6]=l,e[7]=f):f=e[7];const m=f;let h;e[8]!==c?(h=()=>{u(!c)},e[8]=c,e[9]=h):h=e[9];const _=h,C=c?"text":"password";let g;e[10]!==t?(g=ie("pr-20",t),e[10]=t,e[11]=g):g=e[11];let d;e[12]!==n||e[13]!==i||e[14]!==a||e[15]!==C||e[16]!==g||e[17]!==l?(d=s.jsx(_e,{type:C,value:l,onChange:n,placeholder:i,className:g,...a}),e[12]=n,e[13]=i,e[14]=a,e[15]=C,e[16]=g,e[17]=l,e[18]=d):d=e[18];const y=c?"Hide password":"Show password";let v;e[19]!==c?(v=c?s.jsx(ts,{size:16}):s.jsx(ss,{size:16}),e[19]=c,e[20]=v):v=e[20];let x;e[21]!==y||e[22]!==v||e[23]!==_?(x=s.jsx(B,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:_,title:y,children:v}),e[21]=y,e[22]=v,e[23]=_,e[24]=x):x=e[24];const E=!l,S=p?"Copied!":"Copy token";let j;e[25]!==p?(j=p?s.jsx(es,{size:16}):s.jsx(xt,{size:16}),e[25]=p,e[26]=j):j=e[26];let b;e[27]!==m||e[28]!==S||e[29]!==j||e[30]!==E?(b=s.jsx(B,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:m,disabled:E,title:S,children:j}),e[27]=m,e[28]=S,e[29]=j,e[30]=E,e[31]=b):b=e[31];let N;e[32]!==b||e[33]!==x?(N=s.jsxs("div",{className:"absolute right-1 top-1 flex items-center gap-1 h-8",children:[x,b]}),e[32]=b,e[33]=x,e[34]=N):N=e[34];let O;return e[35]!==N||e[36]!==d?(O=s.jsxs("div",{className:"relative",children:[d,N]}),e[35]=N,e[36]=d,e[37]=O):O=e[37],O}function Qe(o){const e=H.c(19),{card:t,selfClient:n,org:i,onDone:a,onError:l}=o,c=he();let u;e[0]!==t||e[1]!==n?(u=async g=>{const d={...t.configurationState??{},...g};await n.callTool({name:"COLLECTION_CONNECTIONS_UPDATE",arguments:{id:t.linkedConnectionId||t.candidateConnectionId,data:{configuration_state:d}}})},e[0]=t,e[1]=n,e[2]=u):u=e[2];let p;e[3]!==a||e[4]!==i||e[5]!==c?(p=async()=>{await c.invalidateQueries({queryKey:Y.commerceDiscoveryCompanionConnectionsPrefix(i.id)}),a()},e[3]=a,e[4]=i,e[5]=c,e[6]=p):p=e[6];let r;e[7]!==l?(r=g=>{l?.(g)},e[7]=l,e[8]=r):r=e[8];let f;e[9]!==u||e[10]!==p||e[11]!==r?(f={mutationFn:u,onSuccess:p,onError:r},e[9]=u,e[10]=p,e[11]=r,e[12]=f):f=e[12];const m=Oe(f);let h;e[13]!==m?(h=g=>m.mutate(g),e[13]=m,e[14]=h):h=e[14];const _=h;let C;return e[15]!==m.error||e[16]!==m.isPending||e[17]!==_?(C={save:_,isPending:m.isPending,error:m.error},e[15]=m.error,e[16]=m.isPending,e[17]=_,e[18]=C):C=e[18],C}const ys=be({accountName:ae().min(1,"Informe o nome da conta"),appKey:ae().optional(),appToken:ae().optional()});function bs(o){const e=H.c(63),{card:t,selfClient:n,org:i,onDone:a,onIsPendingChange:l}=o;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=Ce(ys),e[0]=c):c=e[0];const u=t.configurationState?.accountName||"",p=t.configurationState?.appKey||"",r=t.configurationState?.appToken||"";let f;e[1]!==u||e[2]!==p||e[3]!==r?(f={resolver:c,defaultValues:{accountName:u,appKey:p,appToken:r}},e[1]=u,e[2]=p,e[3]=r,e[4]=f):f=e[4];const m=ve(f);let h;e[5]!==t.configurationState?.accountName||e[6]!==t.configurationState?.appKey||e[7]!==t.configurationState?.appToken||e[8]!==m?(h=()=>{m.reset({accountName:t.configurationState?.accountName||"",appKey:t.configurationState?.appKey||"",appToken:t.configurationState?.appToken||""})},e[5]=t.configurationState?.accountName,e[6]=t.configurationState?.appKey,e[7]=t.configurationState?.appToken,e[8]=m,e[9]=h):h=e[9];let _;e[10]!==t.configurationState||e[11]!==m?(_=[t.configurationState,m],e[10]=t.configurationState,e[11]=m,e[12]=_):_=e[12],Q.useEffect(h,_);let C;e[13]!==t||e[14]!==a||e[15]!==i||e[16]!==n?(C={card:t,selfClient:n,org:i,onDone:a},e[13]=t,e[14]=a,e[15]=i,e[16]=n,e[17]=C):C=e[17];const{save:g,isPending:d,error:y}=Qe(C);let v,x;e[18]!==d||e[19]!==l?(x=()=>{l?.(d)},v=[d,l],e[18]=d,e[19]=l,e[20]=v,e[21]=x):(v=e[20],x=e[21]),Q.useEffect(x,v);let E;if(e[22]!==m||e[23]!==g){let D;e[25]!==g?(D=async F=>{g(F)},e[25]=g,e[26]=D):D=e[26],E=m.handleSubmit(D),e[22]=m,e[23]=g,e[24]=E}else E=e[24];const S=E;let j;e[27]!==d?(j=D=>{const{field:F}=D;return s.jsxs(le,{children:[s.jsx(Ee,{children:"Nome da conta"}),s.jsx(ce,{children:s.jsx(_e,{placeholder:"Nome da sua conta VTEX",...F,disabled:d})}),s.jsx(de,{})]})},e[27]=d,e[28]=j):j=e[28];let b;e[29]!==m.control||e[30]!==j?(b=s.jsx(re,{control:m.control,name:"accountName",render:j}),e[29]=m.control,e[30]=j,e[31]=b):b=e[31];let N;e[32]!==d?(N=D=>{const{field:F}=D;return s.jsxs(le,{children:[s.jsx(Ee,{children:"App Key (opcional)"}),s.jsx(ce,{children:s.jsx(rt,{placeholder:"App Key da VTEX",...F,disabled:d})}),s.jsx(de,{})]})},e[32]=d,e[33]=N):N=e[33];let O;e[34]!==m.control||e[35]!==N?(O=s.jsx(re,{control:m.control,name:"appKey",render:N}),e[34]=m.control,e[35]=N,e[36]=O):O=e[36];let R;e[37]!==d?(R=D=>{const{field:F}=D;return s.jsxs(le,{children:[s.jsx(Ee,{children:"App Token (opcional)"}),s.jsx(ce,{children:s.jsx(rt,{placeholder:"App Token da VTEX",...F,disabled:d})}),s.jsx(de,{})]})},e[37]=d,e[38]=R):R=e[38];let w;e[39]!==m.control||e[40]!==R?(w=s.jsx(re,{control:m.control,name:"appToken",render:R}),e[39]=m.control,e[40]=R,e[41]=w):w=e[41];let T;e[42]!==m||e[43]!==b||e[44]!==O||e[45]!==w?(T=s.jsxs(je,{...m,children:[b,O,w]}),e[42]=m,e[43]=b,e[44]=O,e[45]=w,e[46]=T):T=e[46];let L;e[47]!==y?(L=y&&s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:y instanceof Error?y.message:"Não foi possível salvar a configuração"}),e[47]=y,e[48]=L):L=e[48];let P;e[49]!==d||e[50]!==a?(P=s.jsx(B,{type:"button",variant:"outline",onClick:a,disabled:d,children:"Cancelar"}),e[49]=d,e[50]=a,e[51]=P):P=e[51];const K=d?"Salvando...":"Salvar";let $;e[52]!==d||e[53]!==K?($=s.jsx(B,{type:"submit",disabled:d,children:K}),e[52]=d,e[53]=K,e[54]=$):$=e[54];let q;e[55]!==P||e[56]!==$?(q=s.jsxs(fe,{className:"pt-4",children:[P,$]}),e[55]=P,e[56]=$,e[57]=q):q=e[57];let M;return e[58]!==S||e[59]!==T||e[60]!==L||e[61]!==q?(M=s.jsxs("form",{onSubmit:S,className:"space-y-4",children:[T,L,q]}),e[58]=S,e[59]=T,e[60]=L,e[61]=q,e[62]=M):M=e[62],M}function Ge(o){const e=H.c(29),{options:t,value:n,onChange:i,disabled:a,ariaLabel:l,searchPlaceholder:c,hideSearch:u}=o,p=c===void 0?"Buscar...":c,r=u===void 0?!1:u,[f,m]=Q.useState("");let h,_,C;if(e[0]!==t||e[1]!==f||e[2]!==n){const j=f.trim().toLowerCase();h=j?t.filter(b=>b.label.toLowerCase().includes(j)):t,_=h.map(Cs),C=_.includes(n)?n:_[0]??"",e[0]=t,e[1]=f,e[2]=n,e[3]=h,e[4]=_,e[5]=C}else h=e[3],_=e[4],C=e[5];const g=C;let d;e[6]!==a||e[7]!==_||e[8]!==i?(d=function(b){if(a||!["ArrowDown","ArrowRight","ArrowUp","ArrowLeft","Home","End"].includes(b.key))return;b.preventDefault();const O=b.currentTarget.dataset.value,R=_.indexOf(O),w=_.length;if(w===0)return;let T;b.key==="ArrowDown"||b.key==="ArrowRight"?T=(R+1)%w:b.key==="ArrowUp"||b.key==="ArrowLeft"?T=(R-1+w)%w:b.key==="Home"?T=0:T=w-1;const L=_[T];i(L),b.currentTarget.closest('[role="radiogroup"]')?.querySelector(`[data-value="${CSS.escape(L)}"]`)?.focus()},e[6]=a,e[7]=_,e[8]=i,e[9]=d):d=e[9];const y=d;let v;e[10]!==l||e[11]!==a||e[12]!==r||e[13]!==f||e[14]!==p?(v=r?null:s.jsxs("div",{className:"relative",children:[s.jsx(ht,{size:16,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx(_e,{type:"text",value:f,onChange:j=>m(j.target.value),disabled:a,placeholder:p,"aria-label":`Buscar ${l}`,className:"h-8 pl-8"})]}),e[10]=l,e[11]=a,e[12]=r,e[13]=f,e[14]=p,e[15]=v):v=e[15];let x;e[16]!==a||e[17]!==h||e[18]!==y||e[19]!==i||e[20]!==g||e[21]!==n?(x=h.length===0?s.jsx("div",{className:"px-2 py-2 text-sm text-muted-foreground",children:"Nenhum resultado"}):h.map(j=>{const b=j.value===n;return s.jsxs("button",{type:"button",role:"radio","aria-checked":b,disabled:a,"data-value":j.value,tabIndex:j.value===g?0:-1,onClick:()=>i(j.value),onKeyDown:y,className:ie("flex w-full items-center justify-between gap-2 rounded-sm px-2 py-2 text-left text-sm","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50",b?"bg-muted font-medium text-foreground":"text-foreground hover:bg-muted/50"),children:[s.jsx("span",{className:"truncate",children:j.label}),b?s.jsx(Me,{size:16,className:"shrink-0 text-primary"}):null]},j.value)}),e[16]=a,e[17]=h,e[18]=y,e[19]=i,e[20]=g,e[21]=n,e[22]=x):x=e[22];let E;e[23]!==l||e[24]!==x?(E=s.jsx("div",{role:"radiogroup","aria-label":l,className:"max-h-[280px] overflow-y-auto",children:x}),e[23]=l,e[24]=x,e[25]=E):E=e[25];let S;return e[26]!==v||e[27]!==E?(S=s.jsxs("div",{className:"space-y-2",children:[v,E]}),e[26]=v,e[27]=E,e[28]=S):S=e[28],S}function Cs(o){return o.value}function He(o){const e=H.c(16),{label:t,iconSize:n,className:i,iconClassName:a,labelClassName:l}=o,c=n===void 0?14:n;let u;e[0]!==i?(u=ie("inline-flex items-center gap-2",i),e[0]=i,e[1]=u):u=e[1];let p;e[2]!==a?(p=ie("shrink-0 animate-spin",a),e[2]=a,e[3]=p):p=e[3];let r;e[4]!==c||e[5]!==p?(r=s.jsx(Ie,{size:c,className:p}),e[4]=c,e[5]=p,e[6]=r):r=e[6];let f;e[7]!==l?(f=ie("text-sm",l),e[7]=l,e[8]=f):f=e[8];let m;e[9]!==t||e[10]!==f?(m=s.jsx("span",{className:f,children:t}),e[9]=t,e[10]=f,e[11]=m):m=e[11];let h;return e[12]!==u||e[13]!==r||e[14]!==m?(h=s.jsxs("span",{className:u,children:[r,m]}),e[12]=u,e[13]=r,e[14]=m,e[15]=h):h=e[15],h}const vs=be({propertyId:ae().min(1,"Selecione uma propriedade")});function js(o){const e=H.c(68),{card:t,connectionId:n,companionClient:i,selfClient:a,org:l,onDone:c,onDisconnect:u,onIsPendingChange:p}=o;let r;e[0]!==n||e[1]!==l.id?(r=Y.commerceDiscoveryCompanionGaProperties(l.id,n),e[0]=n,e[1]=l.id,e[2]=r):r=e[2];let f;e[3]!==i?(f=async()=>{const k=await i.callTool({name:"get-account-summaries",arguments:{}}),I=J(k);return Qt(I)},e[3]=i,e[4]=f):f=e[4];let m;e[5]!==r||e[6]!==f?(m={queryKey:r,queryFn:f},e[5]=r,e[6]=f,e[7]=m):m=e[7];const h=me(m);let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=Ce(vs),e[8]=_):_=e[8];const C=t.configurationState?.propertyId||"";let g;e[9]!==C?(g={resolver:_,defaultValues:{propertyId:C}},e[9]=C,e[10]=g):g=e[10];const d=ve(g);let y;e[11]!==t||e[12]!==c||e[13]!==l||e[14]!==a?(y={card:t,selfClient:a,org:l,onDone:c},e[11]=t,e[12]=c,e[13]=l,e[14]=a,e[15]=y):y=e[15];const{save:v,isPending:x,error:E}=Qe(y);let S,j;e[16]!==x||e[17]!==p?(S=()=>{p?.(x)},j=[x,p],e[16]=x,e[17]=p,e[18]=S,e[19]=j):(S=e[18],j=e[19]),Q.useEffect(S,j);let b;if(e[20]!==d||e[21]!==v){let k;e[23]!==v?(k=async I=>{v(I)},e[23]=v,e[24]=k):k=e[24],b=d.handleSubmit(k),e[20]=d,e[21]=v,e[22]=b}else b=e[22];const N=b;if(h.isLoading){let k;return e[25]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"flex min-h-[200px] items-center justify-center",children:s.jsx(He,{label:"Carregando propriedades..."})}),e[25]=k):k=e[25],k}if(h.isError){let k;return e[26]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"space-y-4",children:s.jsx("p",{className:"text-sm text-destructive",children:"Não foi possível carregar as propriedades do Google Analytics."})}),e[26]=k):k=e[26],k}let O;e[27]!==h.data?(O=h.data||[],e[27]=h.data,e[28]=O):O=e[28];const R=O;if(R.flatMap(Ss).length===0){let k;e[29]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("p",{className:"text-sm text-muted-foreground",children:"Nenhuma propriedade do Google Analytics foi encontrada. Conecte uma conta do Google Analytics com propriedades."}),e[29]=k):k=e[29];let I;e[30]!==u?(I=u?s.jsx("button",{type:"button",onClick:u,className:"text-xs text-muted-foreground underline underline-offset-2 hover:text-destructive",children:"Desconectar conta"}):s.jsx("span",{}),e[30]=u,e[31]=I):I=e[31];let G;e[32]!==c?(G=s.jsx(B,{type:"button",variant:"outline",onClick:c,children:"Fechar"}),e[32]=c,e[33]=G):G=e[33];let Z;return e[34]!==I||e[35]!==G?(Z=s.jsxs("div",{className:"space-y-4",children:[k,s.jsxs(fe,{className:"flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[I,G]})]}),e[34]=I,e[35]=G,e[36]=Z):Z=e[36],Z}let T;e[37]!==x||e[38]!==R?(T=k=>{const{field:I}=k;return s.jsxs(le,{children:[s.jsx(ce,{children:s.jsx(Ge,{options:R.flatMap(_s),value:I.value,onChange:I.onChange,disabled:x,ariaLabel:"Propriedade do Google Analytics"})}),s.jsx(de,{})]})},e[37]=x,e[38]=R,e[39]=T):T=e[39];let L;e[40]!==d.control||e[41]!==T?(L=s.jsx(re,{control:d.control,name:"propertyId",render:T}),e[40]=d.control,e[41]=T,e[42]=L):L=e[42];let P;e[43]!==d||e[44]!==L?(P=s.jsx(je,{...d,children:L}),e[43]=d,e[44]=L,e[45]=P):P=e[45];let K;e[46]!==E?(K=E&&s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:E instanceof Error?E.message:"Não foi possível salvar a configuração"}),e[46]=E,e[47]=K):K=e[47];let $;e[48]!==x||e[49]!==u?($=u?s.jsx("button",{type:"button",onClick:u,disabled:x,className:"text-xs text-muted-foreground underline underline-offset-2 hover:text-destructive disabled:opacity-50",children:"Desconectar conta"}):s.jsx("span",{}),e[48]=x,e[49]=u,e[50]=$):$=e[50];let q;e[51]!==x||e[52]!==c?(q=s.jsx(B,{type:"button",variant:"outline",onClick:c,disabled:x,children:"Cancelar"}),e[51]=x,e[52]=c,e[53]=q):q=e[53];const M=x?"Salvando...":"Salvar";let D;e[54]!==x||e[55]!==M?(D=s.jsx(B,{type:"submit",disabled:x,children:M}),e[54]=x,e[55]=M,e[56]=D):D=e[56];let F;e[57]!==q||e[58]!==D?(F=s.jsxs("div",{className:"flex gap-2",children:[q,D]}),e[57]=q,e[58]=D,e[59]=F):F=e[59];let z;e[60]!==$||e[61]!==F?(z=s.jsxs(fe,{className:"flex-col gap-2 pt-4 sm:flex-row sm:items-center sm:justify-between",children:[$,F]}),e[60]=$,e[61]=F,e[62]=z):z=e[62];let U;return e[63]!==N||e[64]!==P||e[65]!==K||e[66]!==z?(U=s.jsxs("form",{onSubmit:N,className:"space-y-4",children:[P,K,z]}),e[63]=N,e[64]=P,e[65]=K,e[66]=z,e[67]=U):U=e[67],U}function _s(o){return o.options}function Ss(o){return o.options}const Ns=be({siteUrl:ae().min(1,"Selecione um site")});function ws(o){const e=H.c(62),{card:t,connectionId:n,companionClient:i,selfClient:a,org:l,contextSiteUrl:c,onDone:u,onIsPendingChange:p}=o;let r;e[0]!==n||e[1]!==l.id?(r=Y.commerceDiscoveryCompanionGscSites(l.id,n),e[0]=n,e[1]=l.id,e[2]=r):r=e[2];let f;e[3]!==i?(f=async()=>{const I=await i.callTool({name:"list_sites",arguments:{}});return J(I).sites||[]},e[3]=i,e[4]=f):f=e[4];let m;e[5]!==r||e[6]!==f?(m={queryKey:r,queryFn:f},e[5]=r,e[6]=f,e[7]=m):m=e[7];const h=me(m);let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=Ce(Ns),e[8]=_):_=e[8];const C=t.configurationState?.siteUrl||"";let g;e[9]!==C?(g={resolver:_,defaultValues:{siteUrl:C}},e[9]=C,e[10]=g):g=e[10];const d=ve(g);let y;e[11]!==t||e[12]!==u||e[13]!==l||e[14]!==a?(y={card:t,selfClient:a,org:l,onDone:u},e[11]=t,e[12]=u,e[13]=l,e[14]=a,e[15]=y):y=e[15];const{save:v,isPending:x,error:E}=Qe(y),S=Q.useRef(!1),j=t.configurationState?.siteUrl;let b,N;e[16]!==x||e[17]!==p?(b=()=>{p?.(x)},N=[x,p],e[16]=x,e[17]=p,e[18]=b,e[19]=N):(b=e[18],N=e[19]),Q.useEffect(b,N);let O,R;e[20]!==c||e[21]!==d||e[22]!==j||e[23]!==h.data||e[24]!==h.isSuccess?(O=()=>{if(!(S.current||!h.isSuccess)){if(S.current=!0,j){d.getValues("siteUrl")!==j&&d.setValue("siteUrl",j);return}if(!d.getValues("siteUrl")){const I=Gt(c,h.data??[]);I&&d.setValue("siteUrl",I)}}},R=[h.isSuccess,h.data,j,c,d],e[20]=c,e[21]=d,e[22]=j,e[23]=h.data,e[24]=h.isSuccess,e[25]=O,e[26]=R):(O=e[25],R=e[26]),Q.useEffect(O,R);let w;if(e[27]!==d||e[28]!==v){let I;e[30]!==v?(I=async G=>{v(G)},e[30]=v,e[31]=I):I=e[31],w=d.handleSubmit(I),e[27]=d,e[28]=v,e[29]=w}else w=e[29];const T=w;if(h.isLoading){let I;return e[32]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx("div",{className:"flex min-h-[200px] items-center justify-center",children:s.jsx(He,{label:"Carregando sites..."})}),e[32]=I):I=e[32],I}if(h.isError){let I;return e[33]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx("div",{className:"space-y-4",children:s.jsx("p",{className:"text-sm text-destructive",children:"Não foi possível carregar os sites do Google Search Console."})}),e[33]=I):I=e[33],I}let L;e[34]!==h.data?(L=h.data||[],e[34]=h.data,e[35]=L):L=e[35];const P=L;if(P.length===0){let I;return e[36]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx("div",{className:"space-y-4",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:"Nenhum site verificado foi encontrado. Verifique um site no Google Search Console."})}),e[36]=I):I=e[36],I}let K;e[37]!==x||e[38]!==P?(K=I=>{const{field:G}=I;return s.jsxs(le,{children:[s.jsx(ce,{children:s.jsx(Ge,{options:P.map(Es),value:G.value,onChange:G.onChange,disabled:x,ariaLabel:"Site verificado"})}),s.jsx(de,{})]})},e[37]=x,e[38]=P,e[39]=K):K=e[39];let $;e[40]!==d.control||e[41]!==K?($=s.jsx(re,{control:d.control,name:"siteUrl",render:K}),e[40]=d.control,e[41]=K,e[42]=$):$=e[42];let q;e[43]!==d||e[44]!==$?(q=s.jsx(je,{...d,children:$}),e[43]=d,e[44]=$,e[45]=q):q=e[45];let M;e[46]!==E?(M=E&&s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:E instanceof Error?E.message:"Não foi possível salvar a configuração"}),e[46]=E,e[47]=M):M=e[47];let D;e[48]!==x||e[49]!==u?(D=s.jsx(B,{type:"button",variant:"outline",onClick:u,disabled:x,children:"Cancelar"}),e[48]=x,e[49]=u,e[50]=D):D=e[50];const F=x?"Salvando...":"Salvar";let z;e[51]!==x||e[52]!==F?(z=s.jsx(B,{type:"submit",disabled:x,children:F}),e[51]=x,e[52]=F,e[53]=z):z=e[53];let U;e[54]!==D||e[55]!==z?(U=s.jsxs(fe,{className:"pt-4",children:[D,z]}),e[54]=D,e[55]=z,e[56]=U):U=e[56];let k;return e[57]!==T||e[58]!==q||e[59]!==M||e[60]!==U?(k=s.jsxs("form",{onSubmit:T,className:"space-y-4",children:[q,M,U]}),e[57]=T,e[58]=q,e[59]=M,e[60]=U,e[61]=k):k=e[61],k}function Es(o){return{value:o.siteUrl,label:o.siteUrl}}function Is(o){const[e,t]=o.split("/");return!e||!t?null:{owner:e,name:t}}function Ts(o){const{existingRepo:e,owner:t,name:n}=o;return e?.connectionId&&e.owner.toLowerCase()===t.toLowerCase()&&e.name.toLowerCase()===n.toLowerCase()?{connectionId:e.connectionId,installationId:e.installationId}:null}function Os(o){const{existingRepo:e,existingConnections:t,repoConnectionId:n}=o,i=e?.connectionId&&e.connectionId!==n?e.connectionId:void 0,a=[...t.filter(l=>l.connection_id!==n&&l.connection_id!==i),{connection_id:n,selected_tools:[]}];return{staleConnectionId:i,mergedConnections:a}}const Rs=be({githubRepo:ae().min(1,"Selecione um repositório")}),ks=15e3,As=/^[\w.-]+\/[\w.-]+$/;async function Ls(o,e,t,n){const{installations:i}=await yt(o,t),a=n.trim(),l=await Promise.allSettled(i.map(async r=>{const f=r.type==="User"?"user":"org",m=a?`${f}:${r.login} ${a} in:name`:`${f}:${r.login}`,_=await e.callTool({name:"search_repositories",arguments:{query:m,page:1,perPage:50}},void 0,{signal:AbortSignal.timeout(ks)}),C=_.content?.[0]?.text;if(_.isError)throw new Error(C??"search_repositories failed");if(!C)throw new Error("empty search_repositories response");return JSON.parse(C).items??[]})),c=new Map;let u=0;for(const r of l){if(r.status==="rejected"){u+=1;continue}for(const f of r.value)f.full_name&&!c.has(f.full_name)&&c.set(f.full_name,f)}return{repos:Array.from(c.values()).sort((r,f)=>(f.updated_at??"").localeCompare(r.updated_at??"")).map(r=>r.full_name),failed:u,total:i.length}}function Ds(o){const e=H.c(89),{connectionId:t,companionClient:n,selfClient:i,org:a,onDone:l,onIsPendingChange:c}=o,u=he();let p;e[0]!==a.id?(p=ct.COMMERCE_DISCOVERY(a.id),e[0]=a.id,e[1]=p):p=e[1];const r=p,[f,m]=Q.useState(""),h=ns(f,300),_=Q.useRef(!1);let C;e[2]!==t||e[3]!==a.id?(C=Y.commerceDiscoveryCompanionGithubSelected(a.id,t),e[2]=t,e[3]=a.id,e[4]=C):C=e[4];let g;e[5]!==r||e[6]!==i?(g=async()=>{const W=await i.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:r}}),se=J(W).item?.configuration_state??null;return typeof se?.github_repo=="string"?se.github_repo:""},e[5]=r,e[6]=i,e[7]=g):g=e[7];let d;e[8]!==C||e[9]!==g?(d={queryKey:C,queryFn:g},e[8]=C,e[9]=g,e[10]=d):d=e[10];const y=me(d);let v;e[11]!==t||e[12]!==h||e[13]!==a.id?(v=Y.commerceDiscoveryCompanionGithubRepos(a.id,t,h.trim()),e[11]=t,e[12]=h,e[13]=a.id,e[14]=v):v=e[14];let x;e[15]!==n||e[16]!==t||e[17]!==h||e[18]!==i?(x=()=>Ls(W=>i.callTool(W),n,t,h),e[15]=n,e[16]=t,e[17]=h,e[18]=i,e[19]=x):x=e[19];let E;e[20]!==v||e[21]!==x?(E={queryKey:v,queryFn:x},e[20]=v,e[21]=x,e[22]=E):E=e[22];const S=me(E);let j;e[23]===Symbol.for("react.memo_cache_sentinel")?(j={resolver:Ce(Rs),defaultValues:{githubRepo:""}},e[23]=j):j=e[23];const b=ve(j);let N;e[24]!==r||e[25]!==n||e[26]!==t||e[27]!==a.id||e[28]!==a.slug||e[29]!==i?(N=async W=>{const se=await i.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:r}}),jt={...J(se).item?.configuration_state??null??{},github_repo:W};await i.callTool({name:"COLLECTION_CONNECTIONS_UPDATE",arguments:{id:r,data:{configuration_state:jt}}});const Ze=Is(W);if(!Ze)throw new Error(`Repositório inválido: "${W}". Use o formato owner/nome.`);const{owner:ge,name:ke}=Ze,Xe=Kt(a.id),Je=J(await i.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:Xe}})).item,et=Je?.metadata?.githubRepo,_t=Je?.connections??[],tt=Ts({existingRepo:et,owner:ge,name:ke});let Ne=tt?.connectionId,Ae=tt?.installationId,Le;if(!Ne){const{installations:De}=await yt(xe=>i.callTool(xe),t),we=os(De,ge);if(!we)throw new Error(`Nenhuma instalação do GitHub encontrada para "${ge}".`);Ae=we.installationId;const nt=J(await i.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:t}})).item;if(!nt)throw new Error("Conexão do GitHub não encontrada.");const{childConnectionId:ot}=await is({orgSlug:a.slug,sourceConnection:nt,installationId:Ae,owner:ge,repo:ke,githubCallTool:xe=>n.callTool(xe),selfCallTool:xe=>i.callTool(xe)});Ne=ot,Le=ot}const{staleConnectionId:st,mergedConnections:St}=Os({existingRepo:et,existingConnections:_t,repoConnectionId:Ne});try{await i.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:Xe,data:{connections:St,metadata:{githubRepo:{owner:ge,name:ke,url:`https://github.com/${W}`,installationId:Ae,connectionId:Ne}}}}}),st&&await i.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:st,force:!0}}).catch(zs)}catch(De){const we=De;throw Le&&await i.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:Le,force:!0}}).catch($s),we}},e[24]=r,e[25]=n,e[26]=t,e[27]=a.id,e[28]=a.slug,e[29]=i,e[30]=N):N=e[30];let O;e[31]!==r||e[32]!==l||e[33]!==a.id||e[34]!==u?(O=async()=>{await u.invalidateQueries({queryKey:Y.commerceDiscoveryConnection(a.id,r)}),await u.invalidateQueries({queryKey:Y.commerceDiscoveryCompanionConnectionsPrefix(a.id)}),$t(u,a.id),l()},e[31]=r,e[32]=l,e[33]=a.id,e[34]=u,e[35]=O):O=e[35];let R;e[36]!==O||e[37]!==N?(R={mutationFn:N,onSuccess:O},e[36]=O,e[37]=N,e[38]=R):R=e[38];const w=Oe(R),T=w.isPending;let L,P;e[39]!==T||e[40]!==c?(L=()=>{c?.(T)},P=[T,c],e[39]=T,e[40]=c,e[41]=L,e[42]=P):(L=e[41],P=e[42]),Q.useEffect(L,P);const K=y.data??"";let $,q;e[43]!==b||e[44]!==y.data||e[45]!==y.isSuccess?($=()=>{!y.isSuccess||_.current||(_.current=!0,y.data&&b.setValue("githubRepo",y.data))},q=[y.isSuccess,y.data,b],e[43]=b,e[44]=y.data,e[45]=y.isSuccess,e[46]=$,e[47]=q):($=e[46],q=e[47]),Q.useEffect($,q);let M;if(e[48]!==b||e[49]!==w){let W;e[51]!==w?(W=async se=>{w.mutate(se.githubRepo)},e[51]=w,e[52]=W):W=e[52],M=b.handleSubmit(W),e[48]=b,e[49]=w,e[50]=M}else M=e[50];const D=M;let F,z,U;if(e[53]!==h||e[54]!==S.data?.failed||e[55]!==S.data?.repos||e[56]!==S.data?.total||e[57]!==K){const W=S.data?.repos??[];F=S.data?.failed??0,U=S.data?.total??0;const se=h.trim();z=[...W],se&&As.test(se)&&!z.includes(se)&&z.unshift(se),K&&!z.includes(K)&&z.push(K),e[53]=h,e[54]=S.data?.failed,e[55]=S.data?.repos,e[56]=S.data?.total,e[57]=K,e[58]=F,e[59]=z,e[60]=U}else F=e[58],z=e[59],U=e[60];const k=U>0&&F===U,I=S.isError||k?"Não foi possível buscar os repositórios (erro ou tempo esgotado). Tente novamente ou digite o repositório no formato owner/nome.":F>0?"Parte da busca falhou — alguns repositórios podem não ter aparecido. Tente novamente ou digite owner/nome.":null;let G;e[61]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(ht,{size:16,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[61]=G):G=e[61];let Z;e[62]===Symbol.for("react.memo_cache_sentinel")?(Z=W=>m(W.target.value),e[62]=Z):Z=e[62];let X;e[63]!==T||e[64]!==f?(X=s.jsxs("div",{className:"relative",children:[G,s.jsx(_e,{type:"text",value:f,onChange:Z,disabled:T,placeholder:"Buscar repositório","aria-label":"Buscar repositório",className:"h-8 pl-8"})]}),e[63]=T,e[64]=f,e[65]=X):X=e[65];let ee;e[66]!==b||e[67]!==T||e[68]!==z||e[69]!==S.isLoading||e[70]!==I?(ee=S.isLoading?s.jsx("div",{className:"flex min-h-[160px] items-center justify-center",children:s.jsx(He,{label:"Carregando repositórios..."})}):s.jsxs(s.Fragment,{children:[I&&s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:I}),z.length===0?!I&&s.jsx("p",{className:"text-sm text-muted-foreground",children:"Nenhum repositório encontrado. Digite o nome do repositório (owner/nome) para buscar."}):s.jsx(je,{...b,children:s.jsx(re,{control:b.control,name:"githubRepo",render:W=>{const{field:se}=W;return s.jsxs(le,{children:[s.jsx(ce,{children:s.jsx(Ge,{options:z.map(Ps),value:se.value,onChange:se.onChange,disabled:T,ariaLabel:"Repositório",hideSearch:!0})}),s.jsx(de,{})]})}})})]}),e[66]=b,e[67]=T,e[68]=z,e[69]=S.isLoading,e[70]=I,e[71]=ee):ee=e[71];let V;e[72]!==w.error?(V=w.error&&s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:w.error instanceof Error?w.error.message:"Não foi possível salvar a configuração"}),e[72]=w.error,e[73]=V):V=e[73];let A;e[74]!==T||e[75]!==l?(A=s.jsx(B,{type:"button",variant:"outline",onClick:l,disabled:T,children:"Cancelar"}),e[74]=T,e[75]=l,e[76]=A):A=e[76];const te=T?"Salvando...":"Salvar";let ne;e[77]!==T||e[78]!==te?(ne=s.jsx(B,{type:"submit",disabled:T,children:te}),e[77]=T,e[78]=te,e[79]=ne):ne=e[79];let ue;e[80]!==A||e[81]!==ne?(ue=s.jsxs(fe,{className:"pt-4",children:[A,ne]}),e[80]=A,e[81]=ne,e[82]=ue):ue=e[82];let Se;return e[83]!==D||e[84]!==X||e[85]!==ee||e[86]!==V||e[87]!==ue?(Se=s.jsxs("form",{onSubmit:D,className:"space-y-4",children:[X,ee,V,ue]}),e[83]=D,e[84]=X,e[85]=ee,e[86]=V,e[87]=ue,e[88]=Se):Se=e[88],Se}function Ps(o){return{value:o,label:o}}function $s(){}function zs(){}const qs={vtex:bs,"google-analytics":js,"google-search-console":ws,github:Ds},pe="deco-reader@decocms.iam.gserviceaccount.com",Ct={"google-analytics":"ga4","google-search-console":"gsc"},vt={ga4:{label:"Google Analytics",resourceLabel:"ID da propriedade",resourcePlaceholder:"ex: 123456789",resourceHint:"No GA4: Admin → Detalhes da propriedade → ID da propriedade (só números).",connectSteps:["Abra o Google Analytics (GA4) da sua loja.","Vá em Admin → Acesso à propriedade (Gerenciamento de acesso).",`Clique em + → Adicionar usuários, cole ${pe} e conceda o papel Leitor.`,"Copie o ID da propriedade (Admin → Detalhes da propriedade) e cole abaixo."]},gsc:{label:"Google Search Console",resourceLabel:"Site / propriedade",resourcePlaceholder:"ex: sc-domain:sualoja.com.br",resourceHint:"Use o mesmo formato que aparece no Search Console: sc-domain:sualoja.com.br ou https://www.sualoja.com.br/.",connectSteps:["Abra o Google Search Console da sua loja.","Vá em Configurações → Usuários e permissões.",`Clique em Adicionar usuário, cole ${pe} e escolha permissão Completa.`,"Copie o endereço do site como aparece no seletor de propriedades e cole abaixo."]}};function Fs(o,e){const t=vt[o].label;switch(e){case"no-access":return{title:`Ainda não conseguimos acessar este recurso no ${t}.`,steps:o==="ga4"?[`Confirme que ${pe} foi adicionado em Admin → Acesso à propriedade com o papel Leitor.`,"Confira se o ID da propriedade está correto (só números, sem o prefixo 'properties/').","A concessão de acesso pode levar alguns segundos — tente novamente."]:[`Confirme que ${pe} foi adicionado em Configurações → Usuários e permissões.`,"A permissão precisa ser Completa ou Restrita — 'Não verificado' não funciona.","Confira se o endereço do site está exatamente como aparece no Search Console."]};case"no-web-stream":return{title:"Esta propriedade do GA4 não tem um fluxo de dados da Web (site) configurado.",steps:["No GA4, vá em Admin → Fluxos de dados.","Clique em Adicionar fluxo → Web.","Informe a URL do site da sua loja e salve o fluxo.","Volte aqui e tente vincular de novo. (Propriedades só de app precisam de vínculo manual — fale com o suporte.)"]};case"no-match":return{title:"O recurso informado não corresponde ao domínio desta loja.",steps:o==="ga4"?["Verifique se digitou o ID da propriedade certa — provavelmente é de outro site.","No GA4, o site medido aparece em Admin → Fluxos de dados → (seu fluxo Web) → URL do stream."]:["Verifique se selecionou a propriedade do Search Console referente a esta loja.","O endereço precisa cobrir o mesmo domínio do diagnóstico."]};case"resource_already_bound":return{title:"Este recurso já está vinculado a outra loja.",steps:["Se este recurso é realmente desta loja, fale com o suporte para uma revisão manual.","Caso tenha digitado o id errado, confira e tente novamente."]};default:return{title:"Não foi possível verificar o acesso a este recurso.",steps:["Revise os passos de acesso acima e tente novamente.","Se persistir, fale com o suporte."]}}}function Ks(o){const e=H.c(76),{provider:t,siteUrl:n,selfClient:i,org:a,initialResourceId:l,onDone:c,onIsPendingChange:u,onOAuthInstead:p}=o,r=vt[t],f=he(),[m,h]=Q.useState(null);let _,C;if(e[0]!==r.resourceLabel){const V=be({resourceId:ae().trim().min(1,`Informe o ${r.resourceLabel.toLowerCase()}`)});C=ve,_=Ce(V),e[0]=r.resourceLabel,e[1]=_,e[2]=C}else _=e[1],C=e[2];const g=l??"";let d;e[3]!==g?(d={resourceId:g},e[3]=g,e[4]=d):d=e[4];let y;e[5]!==_||e[6]!==d?(y={resolver:_,defaultValues:d},e[5]=_,e[6]=d,e[7]=y):y=e[7];const v=C(y);let x;e[8]!==t||e[9]!==i||e[10]!==n?(x=async V=>{if(!n)throw new Error("URL da loja indisponível — recarregue a página.");const A=await i.callTool({name:"COMMERCE_DISCOVERY_BIND",arguments:{siteUrl:n,provider:t,resourceId:V.resourceId}});return J(A)},e[8]=t,e[9]=i,e[10]=n,e[11]=x):x=e[11];let E,S;e[12]!==u?(E=()=>u?.(!0),S=()=>u?.(!1),e[12]=u,e[13]=E,e[14]=S):(E=e[13],S=e[14]);let j;e[15]!==r.label||e[16]!==c||e[17]!==a||e[18]!==t||e[19]!==f||e[20]!==n?(j=async V=>{if(V.ok){h(null),Re.success(`${r.label} conectado`),n&&await f.invalidateQueries({queryKey:Y.commerceDiscoveryConnectionStatus(a.id,n)}),c();return}h({...Fs(t,V.reason??"unknown"),detail:V.detail})},e[15]=r.label,e[16]=c,e[17]=a,e[18]=t,e[19]=f,e[20]=n,e[21]=j):j=e[21];let b;e[22]!==x||e[23]!==E||e[24]!==S||e[25]!==j?(b={mutationFn:x,onMutate:E,onSettled:S,onSuccess:j},e[22]=x,e[23]=E,e[24]=S,e[25]=j,e[26]=b):b=e[26];const N=Oe(b);let O;if(e[27]!==v||e[28]!==N){let V;e[30]!==N?(V=A=>N.mutate(A),e[30]=N,e[31]=V):V=e[31],O=v.handleSubmit(V),e[27]=v,e[28]=N,e[29]=O}else O=e[29];const R=O,w=N.isPending,T=Qs;let L;e[32]!==r.connectSteps?(L=r.connectSteps.map(Ms),e[32]=r.connectSteps,e[33]=L):L=e[33];let P;e[34]!==L?(P=s.jsx("ol",{className:"space-y-2 text-sm text-muted-foreground",children:L}),e[34]=L,e[35]=P):P=e[35];let K;e[36]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx("code",{className:"min-w-0 flex-1 truncate text-xs text-foreground",children:pe}),e[36]=K):K=e[36];let $;e[37]===Symbol.for("react.memo_cache_sentinel")?($=s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-muted/40 p-2",children:[K,s.jsx(B,{type:"button",variant:"ghost",size:"icon-sm",onClick:T,"aria-label":"Copiar e-mail do service account",children:s.jsx(xt,{size:16})})]}),e[37]=$):$=e[37];let q;e[38]!==r.resourceHint||e[39]!==r.resourceLabel||e[40]!==r.resourcePlaceholder||e[41]!==w?(q=V=>{const{field:A}=V;return s.jsxs(le,{children:[s.jsx(Ee,{children:r.resourceLabel}),s.jsx(ce,{children:s.jsx(_e,{...A,placeholder:r.resourcePlaceholder,disabled:w,autoComplete:"off"})}),s.jsx(Jt,{children:r.resourceHint}),s.jsx(de,{})]})},e[38]=r.resourceHint,e[39]=r.resourceLabel,e[40]=r.resourcePlaceholder,e[41]=w,e[42]=q):q=e[42];let M;e[43]!==v.control||e[44]!==q?(M=s.jsx(re,{control:v.control,name:"resourceId",render:q}),e[43]=v.control,e[44]=q,e[45]=M):M=e[45];let D;e[46]!==v||e[47]!==M?(D=s.jsx(je,{...v,children:M}),e[46]=v,e[47]=M,e[48]=D):D=e[48];let F;e[49]!==m?(F=m&&s.jsxs("div",{role:"alert",className:"space-y-2 rounded-lg border border-destructive/40 bg-destructive/5 p-3",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:m.title}),s.jsx("ol",{className:"space-y-1 text-sm text-muted-foreground",children:m.steps.map(Us)})]}),e[49]=m,e[50]=F):F=e[50];let z;e[51]!==N.error||e[52]!==N.isError?(z=N.isError&&s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:N.error instanceof Error?N.error.message:"Não foi possível vincular."}),e[51]=N.error,e[52]=N.isError,e[53]=z):z=e[53];let U;e[54]!==w||e[55]!==p?(U=p?s.jsx("button",{type:"button",onClick:p,disabled:w,className:"text-xs text-muted-foreground underline underline-offset-2 hover:text-foreground disabled:opacity-50",children:"autorizar via login do Google"}):s.jsx("span",{}),e[54]=w,e[55]=p,e[56]=U):U=e[56];let k;e[57]!==w||e[58]!==c?(k=s.jsx(B,{type:"button",variant:"outline",onClick:c,disabled:w,children:"Cancelar"}),e[57]=w,e[58]=c,e[59]=k):k=e[59];const I=w?"Verificando...":"Vincular";let G;e[60]!==w||e[61]!==I?(G=s.jsx(B,{type:"submit",disabled:w,children:I}),e[60]=w,e[61]=I,e[62]=G):G=e[62];let Z;e[63]!==k||e[64]!==G?(Z=s.jsxs("div",{className:"flex gap-2",children:[k,G]}),e[63]=k,e[64]=G,e[65]=Z):Z=e[65];let X;e[66]!==U||e[67]!==Z?(X=s.jsxs(fe,{className:"flex-col gap-2 pt-2 sm:flex-row sm:items-center sm:justify-between",children:[U,Z]}),e[66]=U,e[67]=Z,e[68]=X):X=e[68];let ee;return e[69]!==R||e[70]!==P||e[71]!==D||e[72]!==F||e[73]!==z||e[74]!==X?(ee=s.jsxs("form",{onSubmit:R,className:"space-y-4",children:[P,$,D,F,z,X]}),e[69]=R,e[70]=P,e[71]=D,e[72]=F,e[73]=z,e[74]=X,e[75]=ee):ee=e[75],ee}function Us(o){return s.jsxs("li",{className:"flex gap-2",children:[s.jsx("span",{"aria-hidden":!0,children:"•"}),s.jsx("span",{children:o})]},o)}function Ms(o,e){return s.jsxs("li",{className:"flex gap-2",children:[s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-medium text-foreground",children:e+1}),s.jsx("span",{children:o})]},o)}function Qs(){navigator.clipboard?.writeText(pe),Re.success("E-mail copiado")}function Gs(){const o=H.c(2);let e;o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"size-9 shrink-0 animate-pulse rounded-lg bg-muted/60"}),o[0]=e):e=o[0];let t;return o[1]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-border bg-card p-3 sm:h-full sm:flex-col sm:items-stretch sm:p-4",children:[e,s.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[s.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted/60"}),s.jsx("div",{className:"hidden h-3 w-full animate-pulse rounded bg-muted/60 sm:block"})]}),s.jsx("div",{className:"h-8 w-20 shrink-0 animate-pulse rounded-lg bg-muted/60 sm:mt-auto sm:w-full"})]}),o[1]=t):t=o[1],t}const Hs="rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground";function Vs(o){const e=H.c(36),{card:t,connecting:n,disconnecting:i,disabled:a,onConnect:l,onDisconnect:c,org:u,selfClient:p,siteUrl:r,autoOpenConfigFieldKey:f,onAutoOpenConfigHandled:m}=o,h=t.linkedConnectionId,_=Ct[t.bindingType],C=!!_&&t.boundVia!=="oauth";let g;e[0]!==f||e[1]!==t||e[2]!==n||e[3]!==a||e[4]!==i||e[5]!==h||e[6]!==m||e[7]!==l||e[8]!==c||e[9]!==u||e[10]!==_||e[11]!==p||e[12]!==r||e[13]!==C?(g=C&&_?s.jsx(Bs,{card:t,provider:_,org:u,selfClient:p,siteUrl:r,onOAuthInstead:l,disabled:a,connecting:n}):t.satisfied&&h?s.jsxs("div",{className:"flex items-center justify-end gap-1 sm:justify-start",children:[s.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[s.jsx(Me,{size:16,className:"text-success"})," Conectado"]}),s.jsx(Q.Suspense,{fallback:s.jsx(Ws,{}),children:s.jsx(Ys,{card:t,org:u,selfClient:p,connectionId:h,contextSiteUrl:r,autoOpen:Ht({autoOpenFieldKey:f,card:t}),onAutoOpenHandled:m})}),s.jsxs(Fe,{children:[s.jsx(Ke,{asChild:!0,children:s.jsx(B,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0 text-muted-foreground hover:text-destructive",disabled:a||i,onClick:c,"aria-label":`Desconectar ${t.title}`,children:i?s.jsx(Ie,{size:16,className:"animate-spin"}):s.jsx(Mt,{size:16})})}),s.jsx(Ue,{children:"Desconectar"})]})]}):s.jsx(B,{type:"button",variant:"outline",size:"sm",className:"sm:w-full",disabled:a||n,onClick:l,"aria-label":`Conectar ${t.title}`,children:n?s.jsx(Ie,{size:16,className:"animate-spin"}):"Conectar"}),e[0]=f,e[1]=t,e[2]=n,e[3]=a,e[4]=i,e[5]=h,e[6]=m,e[7]=l,e[8]=c,e[9]=u,e[10]=_,e[11]=p,e[12]=r,e[13]=C,e[14]=g):g=e[14];const d=g;let y;e[15]!==t.icon||e[16]!==t.title?(y=s.jsx(qe,{icon:t.icon,name:t.title,size:"sm",fit:"contain",className:"shrink-0 p-1.5"}),e[15]=t.icon,e[16]=t.title,e[17]=y):y=e[17];let v;e[18]!==t.area?(v=t.area&&s.jsx("span",{className:ie("hidden sm:inline-block",Hs),children:t.area}),e[18]=t.area,e[19]=v):v=e[19];let x;e[20]!==y||e[21]!==v?(x=s.jsxs("div",{className:"shrink-0 sm:flex sm:w-full sm:items-center sm:justify-between sm:gap-2",children:[y,v]}),e[20]=y,e[21]=v,e[22]=x):x=e[22];let E;e[23]!==t.title?(E=s.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),e[23]=t.title,e[24]=E):E=e[24];let S;e[25]!==t.headline?(S=t.headline&&s.jsx("p",{className:"hidden text-sm leading-5 text-muted-foreground sm:mt-0.5 sm:line-clamp-2 sm:block",children:t.headline}),e[25]=t.headline,e[26]=S):S=e[26];let j;e[27]!==E||e[28]!==S?(j=s.jsxs("div",{className:"min-w-0 flex-1",children:[E,S]}),e[27]=E,e[28]=S,e[29]=j):j=e[29];let b;e[30]!==d?(b=s.jsx("div",{className:"shrink-0 sm:mt-auto sm:w-full sm:pt-1",children:d}),e[30]=d,e[31]=b):b=e[31];let N;return e[32]!==x||e[33]!==j||e[34]!==b?(N=s.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-border bg-card p-3 sm:h-full sm:flex-col sm:items-stretch sm:p-4",children:[x,j,b]}),e[32]=x,e[33]=j,e[34]=b,e[35]=N):N=e[35],N}function Bs(o){const e=H.c(39),{card:t,provider:n,org:i,selfClient:a,siteUrl:l,onOAuthInstead:c,disabled:u,connecting:p}=o,[r,f]=Q.useState(!1),[m,h]=Q.useState(!1);let _;e[0]!==m?(_=T=>{!T&&m||f(T)},e[0]=m,e[1]=_):_=e[1];const C=_;let g;e[2]!==t.satisfied||e[3]!==t.title||e[4]!==p||e[5]!==u?(g=t.satisfied?s.jsxs("div",{className:"flex items-center justify-end gap-1 sm:justify-start",children:[s.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[s.jsx(Me,{size:16,className:"text-success"})," Conectado"]}),s.jsxs(Fe,{children:[s.jsx(Ke,{asChild:!0,children:s.jsx(B,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0",onClick:()=>f(!0),"aria-label":`Configurar ${t.title}`,children:s.jsx(gt,{size:16})})}),s.jsx(Ue,{children:"Editar configuração"})]})]}):s.jsx(B,{type:"button",variant:"outline",size:"sm",className:"sm:w-full",disabled:u||p,onClick:()=>f(!0),"aria-label":`Conectar ${t.title}`,children:p?s.jsx(Ie,{size:16,className:"animate-spin"}):"Conectar"}),e[2]=t.satisfied,e[3]=t.title,e[4]=p,e[5]=u,e[6]=g):g=e[6];let d;e[7]!==t.icon||e[8]!==t.title?(d=s.jsx(qe,{icon:t.icon,name:t.title,size:"md",fit:"contain",className:"p-1.5"}),e[7]=t.icon,e[8]=t.title,e[9]=d):d=e[9];let y;e[10]!==t.title?(y=s.jsx(dt,{children:t.title}),e[10]=t.title,e[11]=y):y=e[11];let v;e[12]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(ut,{children:"Conceda acesso ao nosso leitor e informe o identificador"}),e[12]=v):v=e[12];let x;e[13]!==y?(x=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[y,v]}),e[13]=y,e[14]=x):x=e[14];let E;e[15]!==d||e[16]!==x?(E=s.jsxs(mt,{className:"flex-row items-center gap-3 space-y-0 text-left",children:[d,x]}),e[15]=d,e[16]=x,e[17]=E):E=e[17];const S=t.boundResource??void 0;let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f(!1),e[18]=j):j=e[18];let b;e[19]!==t.satisfied||e[20]!==c?(b=t.satisfied?void 0:()=>{f(!1),c()},e[19]=t.satisfied,e[20]=c,e[21]=b):b=e[21];let N;e[22]!==i||e[23]!==n||e[24]!==a||e[25]!==l||e[26]!==b||e[27]!==S?(N=s.jsx(Ks,{provider:n,siteUrl:l,selfClient:a,org:i,initialResourceId:S,onDone:j,onIsPendingChange:h,onOAuthInstead:b}),e[22]=i,e[23]=n,e[24]=a,e[25]=l,e[26]=b,e[27]=S,e[28]=N):N=e[28];let O;e[29]!==N||e[30]!==E?(O=s.jsxs(ft,{className:"sm:max-w-lg",children:[E,N]}),e[29]=N,e[30]=E,e[31]=O):O=e[31];let R;e[32]!==C||e[33]!==r||e[34]!==O?(R=s.jsx(pt,{open:r,onOpenChange:C,children:O}),e[32]=C,e[33]=r,e[34]=O,e[35]=R):R=e[35];let w;return e[36]!==R||e[37]!==g?(w=s.jsxs(s.Fragment,{children:[g,R]}),e[36]=R,e[37]=g,e[38]=w):w=e[38],w}function Ws(){const o=H.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"size-8 shrink-0 animate-pulse rounded-lg bg-muted/60"}),o[0]=e):e=o[0],e}function Ys(o){const e=H.c(60),{card:t,org:n,selfClient:i,connectionId:a,contextSiteUrl:l,autoOpen:c,onAutoOpenHandled:u}=o;let p;e[0]!==a||e[1]!==n.id||e[2]!==n.slug?(p={connectionId:a,orgId:n.id,orgSlug:n.slug},e[0]=a,e[1]=n.id,e[2]=n.slug,e[3]=p):p=e[3];const r=ze(p),[f,m]=Q.useState(c),[h,_]=Q.useState(!1),C=he(),g=qs[t.bindingType],d=Vt(t.configurationState);let y;e[4]!==c||e[5]!==u?(y=()=>{m(!1),c&&u()},e[4]=c,e[5]=u,e[6]=y):y=e[6];const v=y;let x;e[7]!==v||e[8]!==h?(x=I=>{if(!(!I&&h)){if(!I){v();return}m(!0)}},e[7]=v,e[8]=h,e[9]=x):x=e[9];const E=x;let S;e[10]!==a||e[11]!==i?(S=async()=>{await i.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:a,force:!0}})},e[10]=a,e[11]=i,e[12]=S):S=e[12];let j;e[13]!==t.title||e[14]!==v||e[15]!==n.id||e[16]!==C?(j=async()=>{await C.invalidateQueries({queryKey:Y.commerceDiscoveryCompanionConnectionsPrefix(n.id)}),Re.success(`${t.title} desconectado`),v()},e[13]=t.title,e[14]=v,e[15]=n.id,e[16]=C,e[17]=j):j=e[17];let b;e[18]!==S||e[19]!==j?(b={mutationFn:S,onSuccess:j,onError:Zs},e[18]=S,e[19]=j,e[20]=b):b=e[20];const N=Oe(b);if(!g)return null;let O;e[21]===Symbol.for("react.memo_cache_sentinel")?(O=()=>m(!0),e[21]=O):O=e[21];const R=`Configurar ${t.title}`;let w;e[22]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(gt,{size:16}),e[22]=w):w=e[22];let T;e[23]!==R?(T=s.jsx(Ke,{asChild:!0,children:s.jsx(B,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0",onClick:O,"aria-label":R,children:w})}),e[23]=R,e[24]=T):T=e[24];const L=d.length>0?"Editar configuração":"Configurar";let P;e[25]!==L?(P=s.jsx(Ue,{children:L}),e[25]=L,e[26]=P):P=e[26];let K;e[27]!==T||e[28]!==P?(K=s.jsxs(Fe,{children:[T,P]}),e[27]=T,e[28]=P,e[29]=K):K=e[29];let $;e[30]!==t.icon||e[31]!==t.title?($=s.jsx(qe,{icon:t.icon,name:t.title,size:"md",fit:"contain",className:"p-1.5"}),e[30]=t.icon,e[31]=t.title,e[32]=$):$=e[32];let q;e[33]!==t.title?(q=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[s.jsx(dt,{children:t.title}),s.jsxs(ut,{children:["Configure o ",t.title," para enriquecer os dados"]})]}),e[33]=t.title,e[34]=q):q=e[34];let M;e[35]!==$||e[36]!==q?(M=s.jsxs(mt,{className:"flex-row items-center gap-3 space-y-0 text-left",children:[$,q]}),e[35]=$,e[36]=q,e[37]=M):M=e[37];let D;e[38]!==N?(D=()=>N.mutate(),e[38]=N,e[39]=D):D=e[39];let F;e[40]!==g||e[41]!==t||e[42]!==v||e[43]!==r||e[44]!==a||e[45]!==l||e[46]!==n||e[47]!==i||e[48]!==D?(F=s.jsx(g,{card:t,connectionId:a,companionClient:r,selfClient:i,org:n,contextSiteUrl:l,onDone:v,onDisconnect:D,onIsPendingChange:_}),e[40]=g,e[41]=t,e[42]=v,e[43]=r,e[44]=a,e[45]=l,e[46]=n,e[47]=i,e[48]=D,e[49]=F):F=e[49];let z;e[50]!==M||e[51]!==F?(z=s.jsxs(ft,{className:"sm:max-w-lg",children:[M,F]}),e[50]=M,e[51]=F,e[52]=z):z=e[52];let U;e[53]!==f||e[54]!==E||e[55]!==z?(U=s.jsx(pt,{open:f,onOpenChange:E,children:z}),e[53]=f,e[54]=E,e[55]=z,e[56]=U):U=e[56];let k;return e[57]!==K||e[58]!==U?(k=s.jsxs(s.Fragment,{children:[K,U]}),e[57]=K,e[58]=U,e[59]=k):k=e[59],k}function Zs(){Re.error("Não foi possível desconectar. Tente novamente.")}const Ve={vtex:{registryAppId:"deco/vtex",area:"Catálogo",headline:"Rupturas e PDPs que travam suas vendas."},"google-analytics":{registryAppId:"deco/google-analytics",area:"Funil",headline:"Onde a receita vaza no seu funil."},"google-search-console":{registryAppId:"deco/google-search-console",area:"Busca",headline:"O tráfego de busca que você deixa na mesa."},github:{registryAppId:"deco/mcp-github",area:"Engenharia",headline:"A saúde da entrega de código por trás da sua loja."}};function Xs(o){const e=H.c(40),{selfClient:t,org:n,cdConnectionId:i,siteUrl:a}=o;let l;e[0]!==i||e[1]!==n.id||e[2]!==n.slug?(l={connectionId:i,orgId:n.id,orgSlug:n.slug},e[0]=i,e[1]=n.id,e[2]=n.slug,e[3]=l):l=e[3];const c=ze(l);let u;e[4]!==i||e[5]!==n.id?(u=Y.commerceDiscoveryCompanionSchema(n.id,i),e[4]=i,e[5]=n.id,e[6]=u):u=e[6];let p;e[7]!==c?(p=async()=>{const A=await c.callTool({name:"MCP_CONFIGURATION",arguments:{}});return J(A)},e[7]=c,e[8]=p):p=e[8];let r;e[9]!==u||e[10]!==p?(r={queryKey:u,queryFn:p,retry:!1},e[9]=u,e[10]=p,e[11]=r):r=e[11];const f=me(r),m=f.data?.stateSchema?Bt(f.data.stateSchema):null,h=m&&m.length>0?m:Wt,_=h.map(cn),C=h.map(ln).filter(rn),g=h.filter(an).map(on),d=[...C,...g].sort().join(",");let y;e[12]!==i||e[13]!==n.id?(y=Y.commerceDiscoveryConnection(n.id,i),e[12]=i,e[13]=n.id,e[14]=y):y=e[14];let v;e[15]!==i||e[16]!==t?(v=async()=>{const A=await t.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:i}});return J(A)},e[15]=i,e[16]=t,e[17]=v):v=e[17];let x;e[18]!==y||e[19]!==v?(x={queryKey:y,queryFn:v},e[18]=y,e[19]=v,e[20]=x):x=e[20];const S=Pe(x).data?.item?.configuration_state??null;let j;e[21]!==S?(j=A=>S?.[A.fieldKey]?.value,e[21]=S,e[22]=j):j=e[22];const b=h.map(j).filter(nn),N=[..._.map(sn),...C.map(tn),...b.map(en)].sort().join(","),R=Pe({queryKey:Y.commerceDiscoveryCompanionConnections(n.id,N),queryFn:async()=>{if(h.length===0)return{items:[]};const A=[{field:["app_name"],operator:"in",value:_},{field:["app_id"],operator:"in",value:C}];b.length>0&&A.push({field:["id"],operator:"in",value:b});const te=await t.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{operator:"or",conditions:A},limit:1e3}});return J(te)}}).data?.items??[],w=new Set(b),T=R.filter(A=>w.has(A.id)),L=T.filter(Js);let P;e[23]!==n.id||e[24]!==n.slug?(P=A=>({queryKey:Y.commerceDiscoveryCompanionOAuthStatus(n.id,A.id),queryFn:async()=>{try{const te=await fetch(`/api/${encodeURIComponent(n.slug)}/connections/${encodeURIComponent(A.id)}/oauth-token/status`,{credentials:"include"});return te.ok?{hasToken:(await te.json()).hasToken===!0}:{hasToken:!1}}catch{return{hasToken:!1}}},retry:!1}),e[23]=n.id,e[24]=n.slug,e[25]=P):P=e[25];const K=ms({queries:L.map(P)});let $;e[26]!==K?($=(A,te)=>[A.id,K[te]?.data?.hasToken===!0],e[26]=K,e[27]=$):$=e[27];const q=new Map(L.map($)),M={};for(const A of T)M[A.id]=!A.oauth_config||!!A.connection_token||q.get(A.id)===!0;const D=Pe({queryKey:Y.commerceDiscoveryCompanionRegistry(n.id,d),queryFn:async()=>{if(h.length===0)return{items:[]};const A=Yt(C,g),te=await as(ct.REGISTRY(n.id),n.id,n.slug,"COLLECTION_REGISTRY_APP_LIST",{...A?{where:A}:{},limit:1e3});return J(te)}}),F={},z={};for(const A of D.data?.items??[])F[A.id]=A,A.server?.name&&(z[A.server.name]=A);let U;e[28]!==n.id||e[29]!==a?(U=Y.commerceDiscoveryConnectionStatus(n.id,a??""),e[28]=n.id,e[29]=a,e[30]=U):U=e[30];const k=!!a;let I;e[31]!==t||e[32]!==a?(I=async()=>{const A=await t.callTool({name:"COMMERCE_DISCOVERY_CONNECTION_STATUS",arguments:{siteUrl:a}});return J(A)},e[31]=t,e[32]=a,e[33]=I):I=e[33];let G;e[34]!==U||e[35]!==k||e[36]!==I?(G={queryKey:U,enabled:k,queryFn:I},e[34]=U,e[35]=k,e[36]=I,e[37]=G):G=e[37];const Z=me(G),X={};for(const[A,te]of Object.entries(Ct)){const ne=Z.data?.providers?.[te];ne?.connected&&ne.via==="sa"&&(X[A]={resource:ne.resource??null})}const ee=Zt({requirements:h,itemsById:F,itemsByName:z,connections:R,connectionReadiness:M,configurationState:S,curated:Ve,saBindings:X});let V;return e[38]!==ee?(V={cards:ee},e[38]=ee,e[39]=V):V=e[39],V}function Js(o){return o.oauth_config&&!o.connection_token}function en(o){return`linked:${o}`}function tn(o){return`app:${o}`}function sn(o){return`binding:${o}`}function nn(o){return typeof o=="string"&&o.length>0}function on(o){return o.bindingType}function an(o){return!Ve[o.bindingType]}function rn(o){return!!o}function ln(o){return Ve[o.bindingType]?.registryAppId}function cn(o){return o.bindingType}function dn({selfClient:o,org:e,userId:t,cdConnectionId:n,domain:i,siteUrl:a}){const l=he(),[c,u]=Q.useState(null),[p,r]=Q.useState(null),[f,m]=Q.useState(null),h=async(g,d)=>{const y=await o.callTool({name:"COLLECTION_CONNECTIONS_UPDATE",arguments:{id:g,data:d}});return J(y)};async function _(g){u(g.fieldKey),m(null);const d={app_name:g.title,field_key:g.fieldKey,organization_id:e.id,domain:i,site_url:a};oe("commerce_onboarding_companion_connect_clicked",d);try{let y=g.candidateConnectionId;if(!y){const b=rs(g.registryItem,e.id,t,{remoteIndex:0}),N=b.connection_type==="STDIO",O=!!b.connection_url,R=N&&b.connection_headers&&typeof b.connection_headers=="object"&&"command"in b.connection_headers;if(!O&&!R)return oe("commerce_onboarding_companion_connect_failed",{...d,error:"no_connection_method"}),m(`${g.title} cannot be connected: no connection method available`),!1;const w=await o.callTool({name:"COLLECTION_CONNECTIONS_CREATE",arguments:{data:b}});y=J(w).item.id}const v=y,x=await ls({connectionId:v,orgId:e.id,orgSlug:e.slug,persistFallback:b=>h(v,{connection_token:b}).then(()=>{})});if(!x.ok)return oe("commerce_onboarding_companion_connect_failed",{...d,error:x.error}),m(`Couldn't sign in to ${g.title}: ${x.error}`),!1;const E=await o.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:n}}),S=J(E).item?.configuration_state??null,j=Xt(S,g.fieldKey,g.bindingType,v);return g.bindingType==="github"&&delete j.github_repo,await h(n,{configuration_state:j}),await l.invalidateQueries({queryKey:Y.commerceDiscoveryConnection(e.id,n)}),await l.invalidateQueries({queryKey:Y.commerceDiscoveryCompanionConnectionsPrefix(e.id)}),oe("commerce_onboarding_companion_connected",d),!0}catch(y){return oe("commerce_onboarding_companion_connect_failed",{...d,error:y instanceof Error?y.message:String(y)}),m(y instanceof Error?y.message:String(y)),!1}finally{u(null)}}async function C(g){r(g.fieldKey),m(null);const d={app_name:g.title,field_key:g.fieldKey,organization_id:e.id,domain:i,site_url:a};oe("commerce_onboarding_companion_disconnect_clicked",d);try{const y=await o.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:n}}),x={...J(y).item?.configuration_state??null??{}};return delete x[g.fieldKey],g.bindingType==="github"&&delete x.github_repo,await h(n,{configuration_state:x}),await l.invalidateQueries({queryKey:Y.commerceDiscoveryConnection(e.id,n)}),await l.invalidateQueries({queryKey:Y.commerceDiscoveryCompanionConnectionsPrefix(e.id)}),oe("commerce_onboarding_companion_disconnected",d),!0}catch(y){return oe("commerce_onboarding_companion_disconnect_failed",{...d,error:y instanceof Error?y.message:String(y)}),m(y instanceof Error?y.message:String(y)),!1}finally{r(null)}}return{connect:_,connectingFieldKey:c,disconnect:C,disconnectingFieldKey:p,error:f}}const Be="flex min-h-0 flex-1 flex-col gap-4 md:grid md:flex-none md:gap-4";function We(){const o=H.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("h1",{className:"text-lg font-medium leading-6 text-foreground lg:text-2xl lg:leading-8",children:"Conecte suas ferramentas para ver o diagnóstico completo"}),o[0]=e):e=o[0],e}function un(){const o=H.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[0,1,2,3].map(mn)}),o[0]=e):e=o[0],e}function mn(o){return s.jsx(Gs,{},o)}function fn(){const o=H.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:Be,children:[s.jsx(We,{}),s.jsx(un,{})]}),o[0]=e):e=o[0],e}function pn(o){const e=H.c(5),{onRetry:t}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(We,{}),e[0]=n):n=e[0];let i,a;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("p",{className:"text-sm text-foreground",children:"Não foi possível carregar as integrações complementares."}),a=s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Algo deu errado ao carregar suas integrações."}),e[1]=i,e[2]=a):(i=e[1],a=e[2]);let l;return e[3]!==t?(l=s.jsxs("div",{className:Be,children:[n,s.jsxs("div",{role:"alert",className:"rounded-2xl border border-border bg-card p-4",children:[i,a,s.jsx(B,{type:"button",variant:"outline",size:"sm",className:"mt-3",onClick:t,children:"Tentar novamente"})]})]}),e[3]=t,e[4]=l):l=e[4],l}function Hn(o){const e=H.c(2);let t;return e[0]!==o?(t=s.jsx(zt,{children:n=>{const{reset:i}=n;return s.jsx(qt,{fallback:a=>{const{resetError:l}=a;return s.jsx(pn,{onRetry:()=>{i(),l()}})},children:s.jsx(Q.Suspense,{fallback:s.jsx(fn,{}),children:s.jsx(hn,{...o})})})}}),e[0]=o,e[1]=t):t=e[1],t}function hn(o){const e=H.c(46),{org:t,cdConnectionId:n,siteUrl:i,onReadinessChange:a}=o,{data:l}=Ft.useSession(),c=l?.user?.id??"";let u;if(e[0]!==i){const R=i?Te(i):null;if(R?.ok)try{u=new URL(R.value).hostname}catch{u=void 0}e[0]=i,e[1]=u}else u=e[1];let p;e[2]!==t.id||e[3]!==t.slug?(p={connectionId:Ut,orgId:t.id,orgSlug:t.slug},e[2]=t.id,e[3]=t.slug,e[4]=p):p=e[4];const r=ze(p);let f;e[5]!==n||e[6]!==t||e[7]!==r||e[8]!==i?(f={selfClient:r,org:t,cdConnectionId:n,siteUrl:i},e[5]=n,e[6]=t,e[7]=r,e[8]=i,e[9]=f):f=e[9];const{cards:m}=Xs(f);let h;e[10]!==n||e[11]!==t||e[12]!==r||e[13]!==u||e[14]!==i||e[15]!==c?(h={selfClient:r,org:t,userId:c,cdConnectionId:n,domain:u,siteUrl:i},e[10]=n,e[11]=t,e[12]=r,e[13]=u,e[14]=i,e[15]=c,e[16]=h):h=e[16];const{connect:_,connectingFieldKey:C,disconnect:g,disconnectingFieldKey:d,error:y}=dn(h),[v,x]=Q.useState(null);if(a?.(m.length===0||m.some(gn)),m.length===0)return null;const E=C!==null||d!==null;let S;e[17]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(We,{}),e[17]=S):S=e[17];let j;e[18]!==y?(j=y&&s.jsx("p",{role:"alert",className:"mb-3 text-sm text-destructive",children:y}),e[18]=y,e[19]=j):j=e[19];let b;if(e[20]!==v||e[21]!==E||e[22]!==m||e[23]!==_||e[24]!==C||e[25]!==g||e[26]!==d||e[27]!==t||e[28]!==r||e[29]!==i){let R;e[31]!==v||e[32]!==E||e[33]!==_||e[34]!==C||e[35]!==g||e[36]!==d||e[37]!==t||e[38]!==r||e[39]!==i?(R=w=>{const T=async()=>{await _(w)&&x(w.fieldKey)};return s.jsx(Vs,{card:w,connecting:C===w.fieldKey,disconnecting:d===w.fieldKey,disabled:E&&C!==w.fieldKey&&d!==w.fieldKey,org:t,selfClient:r,siteUrl:i,autoOpenConfigFieldKey:v,onAutoOpenConfigHandled:()=>x(L=>L===w.fieldKey?null:L),onConnect:()=>{T()},onDisconnect:()=>{g(w)}},w.fieldKey)},e[31]=v,e[32]=E,e[33]=_,e[34]=C,e[35]=g,e[36]=d,e[37]=t,e[38]=r,e[39]=i,e[40]=R):R=e[40],b=m.map(R),e[20]=v,e[21]=E,e[22]=m,e[23]=_,e[24]=C,e[25]=g,e[26]=d,e[27]=t,e[28]=r,e[29]=i,e[30]=b}else b=e[30];let N;e[41]!==b?(N=s.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:b}),e[41]=b,e[42]=N):N=e[42];let O;return e[43]!==j||e[44]!==N?(O=s.jsxs("div",{className:Be,children:[S,s.jsxs(xs,{wrapperClassName:"flex min-h-0 flex-1 flex-col md:block",className:"-mx-1 min-h-0 flex-1 overflow-y-auto px-1 md:max-h-[min(60vh,calc(100dvh-330px))] md:flex-none",children:[j,N]})]}),e[43]=j,e[44]=N,e[45]=O):O=e[45],O}function gn(o){return o.satisfied}const Ye="https://decocms.com/agendar",xn="Precisa de ajuda? Fale conosco",yn="Agende uma chamada e ajudamos você a conectar suas ferramentas.",ye=[{photo:"https://decoims.com/image?src=decocms%2Fb07a1c19-0cd6-49c8-b326-86055ee78605%2Fauthor-1763423987973-baby.jpeg&quality=original&fit=cover&width=200&height=200",alt:"Especialista da deco"},{photo:"https://decoims.com/decocms/07c2daf4-a3c2-485e-a1a8-341585a06e3b/cecilia.png",alt:"Especialista da deco"},{photo:"https://decoims.com/decocms/48013ca2-3277-464b-b0f1-dd5f1f08d986/tavano.png",alt:"Especialista da deco"}],bn="var(--brand-green-dark)";function Vn({siteUrl:o,email:e}){const t=new URL(Ye);return o&&t.searchParams.set("siteUrl",o),e&&t.searchParams.set("email",e),t.toString()}function Cn(o){const e=H.c(12),{href:t,size:n,className:i,orgId:a}=o,l=t===void 0?Ye:t,c=n===void 0?"lg":n;let u;e[0]!==i?(u=ie("w-full",i),e[0]=i,e[1]=u):u=e[1];let p;e[2]!==a?(p=()=>oe("commerce_onboarding_meeting_cta_clicked",{placement:"visual_card",organization_id:a}),e[2]=a,e[3]=p):p=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(bt,{size:16}),e[4]=r):r=e[4];let f;e[5]!==l||e[6]!==p?(f=s.jsxs("a",{href:l,target:"_blank",rel:"noreferrer",onClick:p,children:["Agendar uma reunião",r]}),e[5]=l,e[6]=p,e[7]=f):f=e[7];let m;return e[8]!==c||e[9]!==u||e[10]!==f?(m=s.jsx(B,{asChild:!0,variant:"outline",size:c,className:u,children:f}),e[8]=c,e[9]=u,e[10]=f,e[11]=m):m=e[11],m}function vn(o){const e=H.c(10),{size:t}=o,n=t===void 0?72:t;let i;e[0]!==n?(i=Math.round(n*.3),e[0]=n,e[1]=i):i=e[1];const a=i;let l;e[2]!==n?(l={height:n},e[2]=n,e[3]=l):l=e[3];let c;e[4]!==a||e[5]!==n?(c=ye.map((p,r)=>s.jsxs("div",{className:"relative shrink-0",style:{width:n,height:n,marginLeft:r===0?0:-a,zIndex:ye.length-r},children:[s.jsx("div",{className:"h-full w-full overflow-hidden rounded-full border-4 border-card bg-muted",children:s.jsx("img",{src:p.photo,alt:p.alt,className:"h-full w-full object-cover",loading:"lazy"})}),r===0&&s.jsxs("span",{className:"absolute bottom-1.5 right-1.5 flex h-3.5 w-3.5",children:[s.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-success opacity-60 motion-safe:animate-ping","aria-hidden":!0}),s.jsx("span",{className:"relative inline-flex h-3.5 w-3.5 rounded-full border-2 border-card bg-success"})]})]},p.photo)),e[4]=a,e[5]=n,e[6]=c):c=e[6];let u;return e[7]!==l||e[8]!==c?(u=s.jsx("div",{className:"flex items-end",style:l,children:c}),e[7]=l,e[8]=c,e[9]=u):u=e[9],u}function Bn(o){const e=H.c(6),{href:t,orgId:n}=o;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"h-20",style:{backgroundColor:bn}}),e[0]=i):i=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"-mt-9 mb-4",children:s.jsx(vn,{})}),e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx("h2",{className:"text-lg font-medium leading-6 text-foreground",children:xn}),s.jsx("p",{className:"text-sm leading-5 text-muted-foreground",children:yn})]}),e[2]=l):l=e[2];let c;return e[3]!==t||e[4]!==n?(c=s.jsx("div",{className:"relative flex h-full w-full items-center justify-center p-10",children:s.jsxs("div",{className:"w-full max-w-[440px] overflow-hidden rounded-3xl border border-border bg-card card-shadow",children:[i,s.jsxs("div",{className:"px-8 pb-8",children:[a,l,s.jsx(Cn,{href:t,size:"lg",className:"mt-6",orgId:n})]})]})}),e[3]=t,e[4]=n,e[5]=c):c=e[5],c}function Wn(o){const e=H.c(13),{className:t,href:n,orgId:i}=o,a=n===void 0?Ye:n;let l;e[0]!==i?(l=()=>oe("commerce_onboarding_meeting_cta_clicked",{placement:"mobile_banner",organization_id:i}),e[0]=i,e[1]=l):l=e[1];let c;e[2]!==t?(c=ie("flex items-center gap-3 rounded-xl border border-border bg-card p-3 card-shadow transition-colors hover:bg-accent",t),e[2]=t,e[3]=c):c=e[3];let u,p;e[4]===Symbol.for("react.memo_cache_sentinel")?(u={height:32,width:32+2*Math.round(22.4)},p=ye.map(jn),e[4]=u,e[5]=p):(u=e[4],p=e[5]);let r,f,m;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("span",{className:"relative flex shrink-0 items-center",style:u,children:[p,s.jsx("span",{className:"absolute -right-0.5 -top-0.5 h-2.5 w-2.5 rounded-full border-2 border-card bg-success","aria-hidden":!0,style:{zIndex:ye.length+1}})]}),f=s.jsx("span",{className:"flex-1 text-sm font-medium leading-tight text-foreground",children:"Precisa de ajuda? Fale conosco"}),m=s.jsx(bt,{size:16,className:"shrink-0 text-muted-foreground"}),e[6]=r,e[7]=f,e[8]=m):(r=e[6],f=e[7],m=e[8]);let h;return e[9]!==a||e[10]!==l||e[11]!==c?(h=s.jsxs("a",{href:a,target:"_blank",rel:"noreferrer",onClick:l,className:c,children:[r,f,m]}),e[9]=a,e[10]=l,e[11]=c,e[12]=h):h=e[12],h}function jn(o,e){return s.jsx("span",{className:"absolute block h-8 w-8 overflow-hidden rounded-full border-2 border-card",style:{left:e*Math.round(22.4),zIndex:ye.length-e},children:s.jsx("img",{src:o.photo,alt:o.alt,className:"h-full w-full object-cover",loading:"lazy"})},o.photo)}function Yn(o){const e=H.c(10),{host:t}=o,n=`https://www.google.com/s2/favicons?domain=${t}&sz=128`;let i,a,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-7 w-7 dark:hidden"}),a=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-7 w-7 hidden dark:block"}),l=s.jsx("div",{className:"h-6 w-px rotate-12 bg-border","aria-hidden":"true"}),e[0]=i,e[1]=a,e[2]=l):(i=e[0],a=e[1],l=e[2]);let c;e[3]!==n?(c=s.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-white",children:s.jsx("img",{src:n,alt:"",className:"h-5 w-5",loading:"lazy"})}),e[3]=n,e[4]=c):c=e[4];let u;e[5]!==t?(u=s.jsx("span",{className:"text-lg font-medium text-foreground",children:t}),e[5]=t,e[6]=u):u=e[6];let p;return e[7]!==c||e[8]!==u?(p=s.jsxs("div",{className:"flex items-center gap-3",children:[i,a,l,c,u]}),e[7]=c,e[8]=u,e[9]=p):p=e[9],p}function _n(o){return o.content?.find(e=>e.text)?.text??"A configuração do Commerce Discovery falhou."}function Zn(o){const e=o;if(e.isError)throw new Error(_n(e));return e.structuredContent??o}export{fn as C,He as L,Yn as S,xs as a,Vn as b,Bn as c,Hn as d,Wn as e,Qn as i,Te as n,Zn as p,Gn as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as T,j as t,r as Q,B as je,i as be}from"./index-DmhdwAgP.js";import{i as Se}from"./ChevronRight-YmTewr_B.js";import{$ as fe}from"./agent-icon-DicjSkHu.js";import{m as ue}from"./automation-runs-D8v8nlly.js";import{r as Ne,u as ke,a as _e,b as we,i as Ce,d as Te,f as Fe,P as Re,S as Ee}from"./page-seo-form-8ToiuKnD.js";import{a3 as xe,r as ze}from"./index-nNhZx5bw.js";import{a as ge}from"./Image01-PIeYnf-K.js";import"./AlertCircle-B9GlbKHh.js";import"./Tool01-BR3IBeV9.js";import"./ArrowUp-DNZsq7Zt.js";import"./Settings02-DMpqOK24.js";import"./Tool02-B0-a0UMl.js";import"./XCircle-C0OdV3N_.js";import"./ArrowUpRight-DZZygrAi.js";import"./TrendUp01-CeRF_789.js";import"./ZapSquare-EvC2T9CP.js";import"./ZoomOut-BprgOfkE.js";import"./Users03-Bx4g7VTC.js";import"./CheckCircle-BEcdXH7-.js";import"./ChevronUp-D5F6V6Tm.js";import"./ChevronDown-BSRiDjXd.js";import"./DotsVertical-BmTi7wpl.js";import"./Stars02-B08FvcHQ.js";import"./Copy01-BkGYkmm-.js";import"./Globe01-D3vBqhI7.js";import"./Eye-B-ZfWIGj.js";import"./FilterLines-BwWG7tAk.js";import"./Star01-DoUbKevt.js";import"./Globe04-pvxBukgJ.js";import"./SwitchHorizontal01-Rgis0XWf.js";import"./HardDrive-DutZPQFL.js";import"./Key01-DhLD806C.js";import"./LayoutLeft-BI-sXAac.js";import"./LinkExternal01-DO3QnLus.js";import"./Monitor01-BOILvS2u.js";import"./Sun-nDXz4jeM.js";import"./Package-DbEcG94t.js";import"./Palette-CyZvWKmI.js";import"./Play-B8fWmOst.js";import"./Plus-2c1jULco.js";import"./SearchLg-XmvudKlH.js";import"./SearchMd-lwIiBODG.js";import"./Shield01-gTFc9c17.js";import"./Stars01-CJsm_THn.js";import"./Trash01-Ba6bCbNY.js";import"./Upload01-B14IruoN.js";import"./User01-ByIE6k8L.js";import"./Users01-BdldAr7H.js";import"./XClose-DomD4542.js";import"./X-Dif5I5BD.js";import"./Zap-CEUVQQOc.js";import"./select-AzuoAc3H.js";import"./tooltip-cvFTpZ9W.js";import"./useInfiniteQuery-nK_JPgM8.js";import"./use-infinite-scroll-XidGSyic.js";import"./use-connection-DM1ROgj3.js";import"./use-collections-DaXoNaLL.js";import"./use-mcp-client-DseZ3Mea.js";import"./auth-CsHQFHV_.js";import"./use-virtual-mcp-urYy02xb.js";import"./card-C3gg1LtP.js";import"./sidebar-DnKMI8jz.js";import"./use-mobile-D8w2xyip.js";import"./table-DnoPpUup.js";import"./empty-state-BHuw6cM9.js";import"./use-members-CncY3QG2.js";import"./use-org-auth-client-DjREcL_I.js";import"./use-clock-tick-BzcS25hV.js";import"./use-automations-COcieFX-.js";import"./studio-tools-DIWsVaKg.js";import"./useSuspenseInfiniteQuery-_ObcRUnC.js";import"./avatar-BVdHZbMN.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DC217syR.js";import"./file-type-icon-BOCZKON3.js";import"./dialog-DUqhzGiD.js";import"./tab-id-BijBBRwE.js";import"./hooks-DU-2h9eZ.js";import"./decopilot-sse-pool-CEQrv8Fn.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-DSveBxCg.js";import"./autosend-BgYoPuWD.js";import"./use-ai-providers-ZLuBEaKb.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-CX_EuT5c.js";import"./use-organization-settings-bBY4klS6.js";import"./monaco-editor-DfuNvLfy.js";import"./index-DnrPO2j2.js";import"./index-f6gbzJ8b.js";import"./calendar-Bxkf6gvE.js";import"./use-t-BjZG1zRp.js";import"./shell-layout-6KUu0MA6.js";import"./required-auth-layout-ABsqitxw.js";import"./use-org-sso-diAgeADE.js";import"./integration-icon-CWb3OXTV.js";import"./use-navigate-to-agent-YScxPu5L.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-DHN9bK0l.js";import"./form-C9InGmo4.js";import"./label-CB2o7dZ2.js";import"./input-TkvVVsQL.js";import"./switch-DS9vYGS-.js";import"./drawer-DvhdIHph.js";import"./collection-search-TcSAZpqK.js";import"./index-BQK4XWOD.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-Cy7ipz7c.js";import"./use-mcp-tools-DJGNLf9H.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-CEv4KtcH.js";import"./mcp-oauth-B5rKpHdd.js";import"./extract-connection-data-_NDoBHMa.js";import"./dropdown-menu-D5BTIZvH.js";import"./popover-DwV6WXHS.js";import"./command-3z1R7bvy.js";import"./index-CO3868Cu.js";import"./companions-core-C68sN4Wc.js";import"./tabs-2srR2H7A.js";import"./toggle-group-DGvoaiio.js";import"./use-deco-credits-Bm6Hzrca.js";import"./connection-card-D_K36Swx.js";import"./use-registry-connections-BZ0Z0jCg.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-DjtAtA2l.js";import"./connection-form-helpers-DyOAEqE9.js";import"./collection-tabs-CIRa_M2W.js";import"./badge-C_9mnuBd.js";import"./connect-desktop-dialog-DEEL81vf.js";import"./select-model-BAk08l-M.js";import"./checkbox-Ba2-hx8r.js";import"./skeleton-xDZ5Iwb8.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CNVe03BK.js";import"./index-Du80fsxC.js";import"./alert-dialog-DDtUbhoS.js";import"./toolbar-CvkbyWaX.js";import"./use-debounced-value-CSp0_yRg.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DG0Zyz9B.js";import"./use-capability-3dRU8tE2.js";import"./toolbar-icon-button-Cr-N30KB.js";import"./use-debounced-autosave-DYog9M6N.js";import"./index-DBhNC4I_.js";import"./search-input-B-RkAjzQ.js";import"./use-mcp-auth-status-BpAt0IbR.js";import"./github-repo-picker-Biy9UFu8.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-q_kPvC5B.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./use-file-configs-DASxzk9O.js";import"./automation-list-row-CyDHI_uf.js";function U(n){return typeof n=="string"&&n.trim()?n:void 0}function he(n,e){if(n){if(e)try{const i=new URL(n,e).href;return xe(i)}catch{return}return xe(n)}}function Pe(n){if(!n)return{};const e=U(n.title),i=U(n.titleTemplate);return{title:e&&i?.includes("%s")?i.replace(/%s/g,e):e,description:U(n.description),image:U(n.image),favicon:U(n.favicon)}}function Oe(n){if(!n)return"example.com";try{return new URL(n).host}catch{return"example.com"}}const Z="Your page title",ee="Your meta description will appear here.",$e=[{id:"google",label:"Google",color:"#4285F4",layout:"search"},{id:"facebook",label:"Facebook",color:"#1877F2",layout:"card"},{id:"twitter",label:"X (Twitter)",color:"#0f1419",layout:"card"},{id:"linkedin",label:"LinkedIn",color:"#0A66C2",layout:"card"},{id:"whatsapp",label:"WhatsApp",color:"#25D366",layout:"chat"},{id:"telegram",label:"Telegram",color:"#229ED9",layout:"chat"},{id:"slack",label:"Slack",color:"#611f69",layout:"attachment"},{id:"discord",label:"Discord",color:"#5865F2",layout:"attachment"}];function pe(n){const e=T.c(10),{src:i,className:r,iconSize:h}=n,a=h===void 0?20:h;if(i){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==r||e[2]!==i?(p=t.jsx("img",{src:i,alt:"",referrerPolicy:"no-referrer",className:r,style:m}),e[1]=r,e[2]=i,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let o;e[5]!==a?(o=t.jsx(ge,{size:a}),e[5]=a,e[6]=o):o=e[6];let l;return e[7]!==r||e[8]!==o?(l=t.jsx("div",{className:r,style:s,children:o}),e[7]=r,e[8]=o,e[9]=l):l=e[9],l}function Le(n){const e=T.c(27),{seo:i,host:r,path:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#fff",border:"1px solid #dadce0"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f1f3f4"},e[1]=s):s=e[1];let o;e[2]!==i.favicon?(o=t.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:s,children:i.favicon?t.jsx("img",{src:i.favicon,alt:"",className:"size-full object-cover"}):t.jsx(ge,{size:12,color:"#9aa0a6"})}),e[2]=i.favicon,e[3]=o):o=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={color:"#202124"},e[4]=l):l=e[4];let m;e[5]!==r?(m=t.jsx("div",{className:"truncate text-[13px] leading-tight",style:l,children:r}),e[5]=r,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#4d5156"},e[7]=p):p=e[7];let d;e[8]!==r||e[9]!==h?(d=t.jsxs("div",{className:"truncate text-[12px] leading-tight",style:p,children:[r,h]}),e[8]=r,e[9]=h,e[10]=d):d=e[10];let c;e[11]!==m||e[12]!==d?(c=t.jsxs("div",{className:"min-w-0",children:[m,d]}),e[11]=m,e[12]=d,e[13]=c):c=e[13];let g;e[14]!==o||e[15]!==c?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[o,c]}),e[14]=o,e[15]=c,e[16]=g):g=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#1a0dab"},e[17]=f):f=e[17];const x=i.title??Z;let u;e[18]!==x?(u=t.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:f,children:x}),e[18]=x,e[19]=u):u=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j={color:"#4d5156"},e[20]=j):j=e[20];const v=i.description??ee;let y;e[21]!==v?(y=t.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:j,children:v}),e[21]=v,e[22]=y):y=e[22];let b;return e[23]!==u||e[24]!==y||e[25]!==g?(b=t.jsxs("div",{className:"rounded-lg p-3 text-left",style:a,children:[g,u,y]}),e[23]=u,e[24]=y,e[25]=g,e[26]=b):b=e[26],b}function De(n){const e=T.c(20),{seo:i,host:r}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={background:"#fff",border:"1px solid #e2e8f0"},e[0]=h):h=e[0];let a;e[1]!==i.image?(a=t.jsx(pe,{src:i.image,className:"h-40 w-full"}),e[1]=i.image,e[2]=a):a=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={borderTop:"1px solid #e2e8f0"},e[3]=s):s=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={color:"#8a9099"},e[4]=o):o=e[4];let l;e[5]!==r?(l=t.jsx("div",{className:"truncate text-[11px]",style:o,children:r}),e[5]=r,e[6]=l):l=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#1c2024"},e[7]=m):m=e[7];const p=i.title??Z;let d;e[8]!==p?(d=t.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:m,children:p}),e[8]=p,e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[10]=c):c=e[10];const g=i.description??ee;let f;e[11]!==g?(f=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:g}),e[11]=g,e[12]=f):f=e[12];let x;e[13]!==f||e[14]!==l||e[15]!==d?(x=t.jsxs("div",{className:"px-3 py-2",style:s,children:[l,d,f]}),e[13]=f,e[14]=l,e[15]=d,e[16]=x):x=e[16];let u;return e[17]!==x||e[18]!==a?(u=t.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:h,children:[a,x]}),e[17]=x,e[18]=a,e[19]=u):u=e[19],u}function Ie(n){const e=T.c(23),{seo:i,host:r,accent:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#f0f2f5"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:{color:"#3b4045"},children:"Here's a post you might write with the link of your website:"}),e[1]=s):s=e[1];const o=`3px solid ${h}`;let l;e[2]!==o?(l={background:"#fff",borderLeft:o},e[2]=o,e[3]=l):l=e[3];let m;e[4]!==i.image?(m=t.jsx(pe,{src:i.image,className:"h-28 w-full",iconSize:18}),e[4]=i.image,e[5]=m):m=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[6]=p):p=e[6];const d=i.title??Z;let c;e[7]!==d?(c=t.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:p,children:d}),e[7]=d,e[8]=c):c=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g={color:"#60666c"},e[9]=g):g=e[9];const f=i.description??ee;let x;e[10]!==f?(x=t.jsx("div",{className:"line-clamp-2 text-[11px]",style:g,children:f}),e[10]=f,e[11]=x):x=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#8a9099"},e[12]=u):u=e[12];let j;e[13]!==r?(j=t.jsx("div",{className:"mt-0.5 text-[10px]",style:u,children:r}),e[13]=r,e[14]=j):j=e[14];let v;e[15]!==x||e[16]!==j||e[17]!==c?(v=t.jsxs("div",{className:"px-2.5 py-1.5",children:[c,x,j]}),e[15]=x,e[16]=j,e[17]=c,e[18]=v):v=e[18];let y;return e[19]!==v||e[20]!==l||e[21]!==m?(y=t.jsxs("div",{className:"rounded-lg p-2 text-left",style:a,children:[s,t.jsxs("div",{className:"overflow-hidden rounded-md",style:l,children:[m,v]})]}),e[19]=v,e[20]=l,e[21]=m,e[22]=y):y=e[22],y}function Ae(n){const e=T.c(33),{seo:i,host:r,accent:h,dark:a}=n,s=a?"#2b2d31":"#fff",o=a?"#00a8fc":"#1264a3",l=a?"#dbdee1":"#3b4045",m=a?"#949ba4":"#8a9099",p=a?"none":"1px solid #e2e8f0";let d;e[0]!==s||e[1]!==p?(d={background:s,border:p},e[0]=s,e[1]=p,e[2]=d):d=e[2];const c=`3px solid ${h}`;let g;e[3]!==c?(g={borderLeft:c,borderRadius:2},e[3]=c,e[4]=g):g=e[4];let f;e[5]!==m?(f={color:m},e[5]=m,e[6]=f):f=e[6];let x;e[7]!==r||e[8]!==f?(x=t.jsx("div",{className:"text-[10px]",style:f,children:r}),e[7]=r,e[8]=f,e[9]=x):x=e[9];let u;e[10]!==o?(u={color:o},e[10]=o,e[11]=u):u=e[11];const j=i.title??Z;let v;e[12]!==u||e[13]!==j?(v=t.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:u,children:j}),e[12]=u,e[13]=j,e[14]=v):v=e[14];let y;e[15]!==l?(y={color:l},e[15]=l,e[16]=y):y=e[16];const b=i.description??ee;let _;e[17]!==y||e[18]!==b?(_=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:y,children:b}),e[17]=y,e[18]=b,e[19]=_):_=e[19];let N;e[20]!==_||e[21]!==x||e[22]!==v?(N=t.jsxs("div",{className:"min-w-0 flex-1",children:[x,v,_]}),e[20]=_,e[21]=x,e[22]=v,e[23]=N):N=e[23];let S;e[24]!==i.image?(S=t.jsx(pe,{src:i.image,className:"size-14 shrink-0 rounded",iconSize:16}),e[24]=i.image,e[25]=S):S=e[25];let k;e[26]!==N||e[27]!==S||e[28]!==g?(k=t.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:g,children:[N,S]}),e[26]=N,e[27]=S,e[28]=g,e[29]=k):k=e[29];let C;return e[30]!==k||e[31]!==d?(C=t.jsx("div",{className:"rounded-lg p-2.5 text-left",style:d,children:k}),e[30]=k,e[31]=d,e[32]=C):C=e[32],C}function Be(n){const e=T.c(17),{platform:i,seo:r,host:h,path:a}=n;let s;e[0]!==h||e[1]!==a||e[2]!==i.color||e[3]!==i.id||e[4]!==i.layout||e[5]!==r?(s=i.layout==="search"?t.jsx(Le,{seo:r,host:h,path:a}):i.layout==="card"?t.jsx(De,{seo:r,host:h,path:a}):i.layout==="chat"?t.jsx(Ie,{seo:r,host:h,path:a,accent:i.color}):t.jsx(Ae,{seo:r,host:h,path:a,accent:i.color,dark:i.id==="discord"}),e[0]=h,e[1]=a,e[2]=i.color,e[3]=i.id,e[4]=i.layout,e[5]=r,e[6]=s):s=e[6];const o=s;let l;e[7]!==i.color?(l=t.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:i.color}}),e[7]=i.color,e[8]=l):l=e[8];let m;e[9]!==i.label?(m=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:i.label}),e[9]=i.label,e[10]=m):m=e[10];let p;e[11]!==l||e[12]!==m?(p=t.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[l,m]}),e[11]=l,e[12]=m,e[13]=p):p=e[13];let d;return e[14]!==o||e[15]!==p?(d=t.jsxs("div",{children:[p,o]}),e[14]=o,e[15]=p,e[16]=d):d=e[16],d}function Ue(n){const e=T.c(17),{seo:i,url:r,path:h}=n,a=h===void 0?"/":h;let s,o,l;if(e[0]!==i||e[1]!==r){const u=Pe(i);s=u,o=he(u.image,r),l=he(u.favicon,r),e[0]=i,e[1]=r,e[2]=s,e[3]=o,e[4]=l}else s=e[2],o=e[3],l=e[4];let m;e[5]!==s||e[6]!==o||e[7]!==l?(m={...s,image:o,favicon:l},e[5]=s,e[6]=o,e[7]=l,e[8]=m):m=e[8];const p=m;let d;e[9]!==r?(d=Oe(r),e[9]=r,e[10]=d):d=e[10];const c=d,g=a==="/"?"":a;let f;e[11]!==g||e[12]!==c||e[13]!==p?(f=$e.map(u=>t.jsx(Be,{platform:u,seo:p,host:c,path:g},u.id)),e[11]=g,e[12]=c,e[13]=p,e[14]=f):f=e[14];let x;return e[15]!==f?(x=t.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:f}),e[15]=f,e[16]=x):x=e[16],x}function Ai(n){const e=T.c(63),{orgSlug:i,virtualMcpId:r,branch:h,decofile:a,meta:s,target:o,previewBaseUrl:l,onSaved:m,onEditDefaultSeo:p,onBack:d}=n,c=Ne(a,o,s),g=c?.seoData,f=o.kind==="site"?"site":o.pageKey,[x,u]=Q.useState(f),[j,v]=Q.useState(null),[y,b]=Q.useState(0),[_,N]=Q.useState(void 0);x!==f&&(u(f),v(null),N(void 0),b(Me));const{persistSeo:S,persistRawSeo:k,flush:C,isPending:te}=ke({orgSlug:i,virtualMcpId:r,branch:h,target:o,resolved:c,onSaved:m}),K=o.kind==="page",ve=K?c?.rawSeoData:void 0,B=_!==void 0?_:ve,ye=K?_e(B)??void 0:void 0,w=j??ye??g??{},F=c?we(w,c):null,z=F&&(!K||Ce(B))?ze(F,s):null;let M;e[0]!==s?(M=Te(s),e[0]=s,e[1]=M):M=e[1];const oe=M;let R,G;e[2]!==a||e[3]!==w||e[4]!==s||e[5]!==o.kind?(R=o.kind==="page"?Fe(a,s)?.seoData??{}:{},G=o.kind==="page"?Ve(R,w):w,e[2]=a,e[3]=w,e[4]=s,e[5]=o.kind,e[6]=R,e[7]=G):(R=e[6],G=e[7]);const ie=G;let V;e[8]!==S||e[9]!==c||e[10]!==v?(V=E=>{if(!c)return;const de=E;v(de),S(de)},e[8]=S,e[9]=c,e[10]=v,e[11]=V):V=e[11];const se=V;let Y;e[12]!==v?(Y=()=>v(null),e[12]=v,e[13]=Y):Y=e[13];const le=Y;let H;e[14]!==b?(H=()=>b(Ke),e[14]=b,e[15]=H):H=e[15];const re=H;let W;e[16]!==C||e[17]!==d?(W=()=>{C(),d?.()},e[16]=C,e[17]=d,e[18]=W):W=e[18];const ae=W,P=o.kind==="page"?o.path:"/";let X;e[19]!==P||e[20]!==l||e[21]!==o.kind?(X=o.kind==="page"&&l?Ge(P,l):l??null,e[19]=P,e[20]=l,e[21]=o.kind,e[22]=X):X=e[22];const ne=X,ce=o.kind==="site"?"No site-level SEO block found.":c?"SEO schema not found for this page.":"Could not load page SEO.",q=K&&c,me=o.kind==="site"&&c&&z;let O;e[23]!==ae||e[24]!==o.kind||e[25]!==o.pageName?(O=o.kind==="page"?t.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[t.jsx("button",{type:"button",onClick:ae,title:o.pageName,className:"min-w-0 truncate rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:o.pageName}),t.jsx(Se,{className:"size-3 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(fe,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm font-medium",children:"Default SEO"}),t.jsx("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:"· applied to every page unless overridden"})]}),e[23]=ae,e[24]=o.kind,e[25]=o.pageName,e[26]=O):O=e[26];let $;e[27]!==te?($=te&&t.jsx(be,{size:14,className:"animate-spin text-muted-foreground"}),e[27]=te,e[28]=$):$=e[28];let L;e[29]!==p||e[30]!==o.kind?(L=o.kind==="page"&&p&&t.jsxs(je,{type:"button",variant:"outline",size:"sm",onClick:p,children:[t.jsx(fe,{size:14}),"Edit default SEO"]}),e[29]=p,e[30]=o.kind,e[31]=L):L=e[31];let D;e[32]!==L||e[33]!==$?(D=t.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[$,L]}),e[32]=L,e[33]=$,e[34]=D):D=e[34];let I;e[35]!==D||e[36]!==O?(I=t.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[O,D]}),e[35]=D,e[36]=O,e[37]=I):I=e[37];let A;e[38]!==F||e[39]!==re||e[40]!==le||e[41]!==oe||e[42]!==B||e[43]!==w||e[44]!==ce||e[45]!==y||e[46]!==se||e[47]!==P||e[48]!==k||e[49]!==S||e[50]!==ie||e[51]!==ne||e[52]!==c||e[53]!==z||e[54]!==v||e[55]!==N||e[56]!==q||e[57]!==me||e[58]!==R?(A=!c||!q&&!me?t.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ce}):t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsx(ue,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"px-5 py-4",children:q?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Empty fields inherit the default SEO. The preview shows the resolved result."}),t.jsx(Re,{rawSeo:B,innerSeo:w,defaultResolveType:oe,seoSchema:z,activeResolveType:F,seoTypeOptions:c.seoTypeOptions,formResetKey:y,siteDefaultSeo:R,onPersistRaw:E=>{N(E),k(E)},onInnerChange:E=>{v(E),S(E)},onClearForm:le,onBumpFormKey:re})]}):z&&F&&t.jsx(Ee,{schema:z,resolveType:F,value:w,formResetKey:y,onChange:se})})}),t.jsx(ue,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"@container px-5 py-4",children:t.jsx(Ue,{seo:ie,url:ne,path:P})})})]}),e[38]=F,e[39]=re,e[40]=le,e[41]=oe,e[42]=B,e[43]=w,e[44]=ce,e[45]=y,e[46]=se,e[47]=P,e[48]=k,e[49]=S,e[50]=ie,e[51]=ne,e[52]=c,e[53]=z,e[54]=v,e[55]=N,e[56]=q,e[57]=me,e[58]=R,e[59]=A):A=e[59];let J;return e[60]!==I||e[61]!==A?(J=t.jsxs("div",{className:"flex h-full w-full flex-col",children:[I,A]}),e[60]=I,e[61]=A,e[62]=J):J=e[62],J}function Ke(n){return n+1}function Me(n){return n+1}function Ge(n,e){try{return new URL(n,e).href}catch{return e}}function Ve(n,e){const i=e.__resolveType,r=n.__resolveType;if(typeof i=="string"&&typeof r=="string"&&i!==r)return{...e};const h={...n};for(const[a,s]of Object.entries(e))a!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(h[a]=s));return h}export{Ai as SeoEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as j,j as t,e as D,C as F,l as $,w as K,L as A,p as T,W as E,a as G,i as U,r as V,O as X}from"./index-DmhdwAgP.js";import{u as Y}from"./useRouterState-C7tRHRC7.js";import{j as Z,k as ee,l as se,S as P,a as M,b as O,d as L,c as I,g as te,h as ie}from"./sidebar-DnKMI8jz.js";import{a as ne}from"./index-DBhNC4I_.js";import{n as le,c as re,a as oe,d as ae,b as ce,i as B}from"./ZapSquare-EvC2T9CP.js";import{t as me,a as R}from"./Users03-Bx4g7VTC.js";import{i as fe}from"./HardDrive-DutZPQFL.js";import{i as de}from"./Key01-DhLD806C.js";import{i as xe}from"./Shield01-gTFc9c17.js";import{s as ue}from"./User01-ByIE6k8L.js";import{i as be}from"./Zap-CEUVQQOc.js";import{u as C}from"./use-t-BjZG1zRp.js";import{a as ge}from"./use-capability-3dRU8tE2.js";import{u as pe}from"./use-join-requests-CjypbTMc.js";import{u as W}from"./use-mobile-D8w2xyip.js";import{u as he}from"./use-status-sounds-DG0Zyz9B.js";import{T as _}from"./toolbar-CvkbyWaX.js";import{S as je,M as ye}from"./shell-controls-5d4ZCRmi.js";import"./LayoutLeft-BI-sXAac.js";import"./X-Dif5I5BD.js";import"./tooltip-cvFTpZ9W.js";import"./studio-tools-DIWsVaKg.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-CX_EuT5c.js";import"./decopilot-sse-pool-CEQrv8Fn.js";import"./backoff-CrEUbyZT.js";import"./toolbar-icon-button-Cr-N30KB.js";function H(){const e=j.c(22),s=C(),{capabilities:o,isPrivileged:n,loading:i,error:l}=ge(),a=pe().length;let r,c;if(e[0]!==o||e[1]!==l||e[2]!==n||e[3]!==a||e[4]!==i||e[5]!==s){c=Symbol.for("react.early_return_sentinel");e:{let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(me,{size:14}),e[8]=m):m=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(le,{size:14}),e[9]=f):f=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(re,{size:14}),e[10]=d):d=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(de,{size:14}),e[11]=x):x=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(fe,{size:14}),e[12]=u):u=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(oe,{size:14}),e[13]=g):g=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(R,{size:14}),e[14]=p):p=e[14];let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(be,{size:14}),e[15]=b):b=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(ae,{size:14}),e[16]=y):y=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(ce,{size:14}),e[17]=h):h=e[17];let v;e[18]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(R,{size:14}),e[18]=v):v=e[18];let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(xe,{size:14}),e[19]=S):S=e[19];let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(K,{size:14}),e[20]=k):k=e[20];let N;e[21]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(ue,{size:14}),e[21]=N):N=e[21];const q=[{key:"organization",label:s("settings.nav.organization"),items:[{key:"general",label:s("settings.nav.general"),icon:m,to:"/$org/settings/general",requires:"org:manage"},{key:"brand-context",label:s("settings.nav.brandContext"),icon:f,to:"/$org/settings/brand-context",requires:"org:manage"},{key:"ai-providers",label:s("settings.nav.aiProviders"),icon:d,to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"secrets",label:s("settings.nav.secrets"),icon:x,to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"buckets",label:s("settings.nav.buckets"),icon:u,to:"/$org/settings/buckets",requires:"file-configs:manage"}]},{key:"build",label:s("settings.nav.build"),items:[{key:"connections",label:s("settings.nav.connections"),icon:g,to:"/$org/settings/connections"},{key:"agents",label:s("settings.nav.agents"),icon:p,to:"/$org/settings/agents"},{key:"automations",label:s("settings.nav.automations"),icon:b,to:"/$org/settings/automations",requires:"automations:manage"},{key:"store",label:s("settings.nav.store"),icon:y,to:"/$org/settings/store",requires:"registry:manage"}]},{key:"manage",label:s("settings.nav.manage"),items:[{key:"monitor",label:s("settings.nav.monitor"),icon:h,to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:s("settings.nav.members"),icon:v,to:"/$org/settings/members",requires:"members:manage",badge:a},{key:"roles",label:s("settings.nav.roles"),icon:S,to:"/$org/settings/roles",privilegedOnly:!0},{key:"sso",label:s("settings.nav.security"),icon:k,to:"/$org/settings/sso",requires:"org:manage"}]},{key:"account",label:s("settings.nav.account"),items:[{key:"profile",label:s("settings.nav.profile"),icon:N,to:"/$org/settings/profile"}]}];if(i||l){c=q;break e}r=q.map(w=>({...w,items:w.items.filter(z=>z.privilegedOnly?n:z.requires?n||o[z.requires]:!0)})).filter(_e)}e[0]=o,e[1]=l,e[2]=n,e[3]=a,e[4]=i,e[5]=s,e[6]=r,e[7]=c}else r=e[6],c=e[7];return c!==Symbol.for("react.early_return_sentinel")?c:r}function _e(e){return e.items.length>0}function J(e){const s=j.c(5),{icon:o,badge:n}=e;let i;s[0]!==n?(i=n?t.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,s[0]=n,s[1]=i):i=s[1];let l;return s[2]!==o||s[3]!==i?(l=t.jsxs("span",{className:"relative shrink-0",children:[o,i]}),s[2]=o,s[3]=i,s[4]=l):l=s[4],l}function Q(){const e=j.c(8);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=D(s);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={select:ve},e[1]=n):n=e[1];const i=Y(n);let l;e[2]!==o||e[3]!==i?(l=c=>{const m=c.replace("$org",o);return i.startsWith(m)},e[2]=o,e[3]=i,e[4]=l):l=e[4];const a=l;let r;return e[5]!==a||e[6]!==o?(r={org:o,isActive:a},e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function ve(e){return e.location.pathname}function Se(){const e=j.c(19),s=C(),o=H(),{org:n,isActive:i}=Q();let l;if(e[0]!==o||e[1]!==i||e[2]!==n){let u;e[4]!==i||e[5]!==n?(u=(g,p)=>t.jsxs(P,{className:"pt-0 pr-0 pb-0 pl-0",children:[g.label&&t.jsx("p",{className:$("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",p>0&&"mt-3"),children:g.label}),t.jsx(M,{children:t.jsx(O,{className:"gap-0.5",children:g.items.map(b=>t.jsx(L,{children:t.jsx(I,{asChild:!0,isActive:i(b.to),children:t.jsxs(A,{to:b.to,params:{org:n},onClick:()=>T("settings_nav_clicked",{section_key:b.key,group_key:g.key}),className:"flex items-center gap-2.5 text-sm",children:[t.jsx(J,{icon:b.icon,badge:b.badge}),t.jsx("span",{className:"truncate",children:b.label})]})})},b.key))})})]},g.key),e[4]=i,e[5]=n,e[6]=u):u=e[6],l=o.map(u),e[0]=o,e[1]=i,e[2]=n,e[3]=l}else l=e[3];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[7]=a):a=e[7];let r;e[8]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("span",{className:"shrink-0",children:t.jsx(B,{size:14})}),e[8]=r):r=e[8];let c;e[9]!==s?(c=s("settings.nav.signOut"),e[9]=s,e[10]=c):c=e[10];let m;e[11]!==c?(m=t.jsxs(P,{className:"pt-0 pr-0 pb-0 pl-0",children:[a,t.jsx(M,{children:t.jsx(O,{className:"gap-0.5",children:t.jsx(L,{children:t.jsxs(I,{onClick:ke,className:"flex items-center gap-2.5 text-sm",children:[r,t.jsx("span",{className:"truncate",children:c})]})})})})]}),e[11]=c,e[12]=m):m=e[12];let f;e[13]!==l||e[14]!==m?(f=t.jsxs(te,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[l,m]}),e[13]=l,e[14]=m,e[15]=f):f=e[15];let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"mt-auto px-4 pb-1",children:t.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.92.3"]})}),e[16]=d):d=e[16];let x;return e[17]!==f?(x=t.jsxs(ie,{variant:"sidebar",children:[f,d]}),e[17]=f,e[18]=x):x=e[18],x}function ke(){T("signed_out",{source:"settings_sidebar"}),E(),G.signOut()}function Ne(e){const s=j.c(21),{onClose:o}=e,n=C(),i=H(),{org:l,isActive:a}=Q();let r;if(s[0]!==i||s[1]!==a||s[2]!==o||s[3]!==l){let p;s[5]!==a||s[6]!==o||s[7]!==l?(p=(b,y)=>t.jsxs("div",{className:"flex flex-col gap-0.5",children:[b.label&&t.jsx("p",{className:$("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",y>0&&"mt-3"),children:b.label}),b.items.map(h=>t.jsxs(A,{to:h.to,params:{org:l},onClick:o,className:$("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",a(h.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[t.jsx(J,{icon:h.icon,badge:h.badge}),t.jsx("span",{className:"truncate",children:h.label})]},h.key))]},b.key),s[5]=a,s[6]=o,s[7]=l,s[8]=p):p=s[8],r=i.map(p),s[0]=i,s[1]=a,s[2]=o,s[3]=l,s[4]=r}else r=s[4];let c;s[9]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"h-px bg-border/50 my-2"}),s[9]=c):c=s[9];let m;s[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("span",{className:"shrink-0",children:t.jsx(B,{size:14})}),s[10]=m):m=s[10];let f;s[11]!==n?(f=n("settings.nav.signOut"),s[11]=n,s[12]=f):f=s[12];let d;s[13]!==f?(d=t.jsxs("div",{className:"flex flex-col gap-0.5",children:[c,t.jsxs("button",{type:"button",onClick:$e,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[m,t.jsx("span",{className:"truncate",children:f})]})]}),s[13]=f,s[14]=d):d=s[14];let x;s[15]!==r||s[16]!==d?(x=t.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[r,d]}),s[15]=r,s[16]=d,s[17]=x):x=s[17];let u;s[18]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:t.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.92.3"]})}),s[18]=u):u=s[18];let g;return s[19]!==x?(g=t.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[x,u]}),s[19]=x,s[20]=g):g=s[20],g}function $e(){E(),G.signOut()}function ze(){const e=j.c(4),s=W(),{org:o}=F();he(o.slug);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(U,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=n):n=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(V.Suspense,{fallback:n,children:t.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:t.jsx(ne,{value:"p-0",children:t.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:t.jsx(X,{})})})})}),e[1]=i):i=e[1];const l=i;if(s){let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:l}),e[2]=r):r=e[2],r}let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex-1 min-h-0 p-1",children:t.jsx("div",{className:$("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:l})}),e[3]=a):a=e[3],a}function ts(){const e=j.c(21),s=W();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(_.LogoLink,{}),e[0]=o):o=e[0];let n;e[1]!==s?(n=s&&t.jsx(je,{}),e[1]=s,e[2]=n):n=e[2];let i;e[3]!==n?(i=t.jsxs(_.LeftColumn,{children:[o,n]}),e[3]=n,e[4]=i):i=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(_.CenterSlot,{}),e[5]=l):l=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(_.RightColumn,{children:t.jsx("span",{})}),e[6]=a):a=e[6];let r;e[7]!==i?(r=t.jsxs(_.Header,{children:[i,l,a]}),e[7]=i,e[8]=r):r=e[8];let c;e[9]===Symbol.for("react.memo_cache_sentinel")?(c={"--sidebar-width-icon":"3.125rem"},e[9]=c):c=e[9];let m;e[10]!==s?(m=!s&&t.jsx(Se,{}),e[10]=s,e[11]=m):m=e[11];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(Z,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:t.jsx(ze,{})}),e[12]=f):f=e[12];let d;e[13]!==m?(d=t.jsxs(ee,{className:"flex-1 bg-sidebar min-h-0",style:c,children:[m,f]}),e[13]=m,e[14]=d):d=e[14];let x;e[15]!==s?(x=s&&t.jsx(ye,{renderSidebar:Ce}),e[15]=s,e[16]=x):x=e[16];let u;return e[17]!==x||e[18]!==r||e[19]!==d?(u=t.jsx(_.Provider,{children:t.jsx(se,{defaultOpen:!0,children:t.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[r,d,x]})})}),e[17]=x,e[18]=r,e[19]=d,e[20]=u):u=e[20],u}function Ce(e){const{onClose:s}=e;return t.jsx(Ne,{onClose:s})}export{Se as SettingsSidebar,Ne as SettingsSidebarMobile,ts as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as B,r as v,j as e,B as u,p as C,t as c,c as L}from"./index-DmhdwAgP.js";import{D as k}from"./domain-settings-CRIqu0Bs.js";import{P as x}from"./index-DBhNC4I_.js";import{f as z,a as T,b as O,c as R,e as F,A as q,g as M}from"./alert-dialog-DDtUbhoS.js";import{I as d}from"./input-TkvVVsQL.js";import{S as U}from"./switch-DS9vYGS-.js";import{u as $}from"./use-t-BjZG1zRp.js";import{a as H,b as G,c as J,d as K}from"./use-org-sso-diAgeADE.js";import{c as Q,S as y,a as E,b as a,d as D}from"./settings-section-CNVe03BK.js";import{s as V}from"./Trash01-Ba6bCbNY.js";import{R as W}from"./require-capability-DnfzULDW.js";import"./studio-tools-DIWsVaKg.js";import"./badge-C_9mnuBd.js";import"./select-AzuoAc3H.js";import"./tooltip-cvFTpZ9W.js";import"./ChevronUp-D5F6V6Tm.js";import"./ChevronDown-BSRiDjXd.js";import"./sidebar-DnKMI8jz.js";import"./LayoutLeft-BI-sXAac.js";import"./use-mobile-D8w2xyip.js";import"./X-Dif5I5BD.js";import"./card-C3gg1LtP.js";import"./ArrowUpRight-DZZygrAi.js";import"./use-capability-3dRU8tE2.js";import"./access-gate-NCJKEJqO.js";import"./capability-load-error-i6NCyxxk.js";function X(){const s=$(),{org:o}=B(),{data:f,isLoading:P}=H(o.id,o.slug),h=G(o.id,o.slug),p=J(o.id,o.slug),b=K(o.id,o.slug),[i,l]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[g,S]=v.useState(!1),[I,j]=v.useState(!1),m=f?.configured&&f.config,n=f?.config,N=()=>{n&&l({issuer:n.issuer,clientId:n.clientId,clientSecret:"",discoveryEndpoint:n.discoveryEndpoint??"",domain:n.domain,scopes:n.scopes.join(" ")}),S(!0)},_=async()=>{if(!i.issuer||!i.clientId||!i.domain){c.error(s("settings.orgSso.requiredFieldsError"));return}if(!m&&!i.clientSecret){c.error(s("settings.orgSso.clientSecretRequiredError"));return}try{await h.mutateAsync({issuer:i.issuer,clientId:i.clientId,clientSecret:i.clientSecret,discoveryEndpoint:i.discoveryEndpoint||void 0,scopes:i.scopes.split(/\s+/).filter(Boolean),domain:i.domain,enforced:n?.enforced??!1}),C(m?"sso_config_updated":"sso_configured",{organization_id:o.id,email_domain:i.domain}),c.success(s("settings.orgSso.configurationSavedSuccess")),S(!1)}catch(t){c.error(t instanceof Error?t.message:s("settings.orgSso.saveSsoConfigError"))}},w=async()=>{try{await p.mutateAsync(),C("sso_config_removed",{organization_id:o.id}),c.success(s("settings.orgSso.configurationRemovedSuccess")),S(!1),j(!1)}catch{c.error(s("settings.orgSso.removeSsoConfigError"))}},A=async t=>{try{await b.mutateAsync(t),C("sso_enforcement_toggled",{organization_id:o.id,enforced:t}),c.success(s(t?"settings.orgSso.enforcementEnabledSuccess":"settings.orgSso.enforcementDisabledSuccess"))}catch{c.error(s("settings.orgSso.toggleEnforcementError"))}};return e.jsxs(x,{children:[e.jsx(x.Content,{children:e.jsx(x.Body,{children:e.jsxs(Q,{children:[e.jsx(x.Title,{children:s("settings.orgSso.securityTitle")}),e.jsx(k,{}),P?e.jsx("div",{className:"text-sm text-muted-foreground",children:s("settings.orgSso.loading")}):e.jsxs(e.Fragment,{children:[m&&!g&&e.jsx(y,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(E,{children:[e.jsx(a,{title:s("settings.orgSso.providerLabel"),action:e.jsx("span",{className:"font-medium",children:n.issuer})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.clientId})}),e.jsx(a,{title:s("settings.orgSso.domainLabel"),action:e.jsx("span",{className:"font-medium",children:n.domain})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(a,{title:s("settings.orgSso.enforceSsoLabel"),description:s("settings.orgSso.enforceSsoDescription"),action:e.jsx(U,{checked:n.enforced,onCheckedChange:A,disabled:b.isPending})}),e.jsxs(D,{children:[e.jsxs(u,{variant:"ghost",size:"sm",onClick:()=>j(!0),disabled:p.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(V,{size:14}),s("settings.orgSso.removeButton")]}),e.jsx(u,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${o.slug}/sso/authorize`,"_blank")},children:s("settings.orgSso.testSsoButton")}),e.jsx(u,{variant:"outline",size:"sm",onClick:N,children:s("settings.orgSso.editConfigButton")})]})]})}),(!m||g)&&e.jsx(y,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(E,{children:[e.jsx(a,{title:s("settings.orgSso.issuerUrlLabel"),description:s("settings.orgSso.issuerUrlDescription"),action:e.jsx(d,{id:"sso-issuer",placeholder:s("settings.orgSso.issuerUrlPlaceholder"),value:i.issuer,onChange:t=>l(r=>({...r,issuer:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx(d,{id:"sso-client-id",placeholder:s("settings.orgSso.clientIdPlaceholder"),value:i.clientId,onChange:t=>l(r=>({...r,clientId:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientSecretLabel"),description:g&&m?s("settings.orgSso.clientSecretEditDescription"):void 0,action:e.jsx(d,{id:"sso-client-secret",type:"password",placeholder:s("settings.orgSso.clientSecretPlaceholder"),value:i.clientSecret,onChange:t=>l(r=>({...r,clientSecret:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.emailDomainLabel"),description:s("settings.orgSso.emailDomainDescription"),action:e.jsx(d,{id:"sso-domain",placeholder:s("settings.orgSso.emailDomainPlaceholder"),value:i.domain,onChange:t=>l(r=>({...r,domain:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx(d,{id:"sso-scopes",placeholder:s("settings.orgSso.scopesPlaceholder"),value:i.scopes,onChange:t=>l(r=>({...r,scopes:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.discoveryEndpointLabel"),description:s("settings.orgSso.discoveryEndpointDescription"),action:e.jsx(d,{id:"sso-discovery",placeholder:s("settings.orgSso.discoveryEndpointPlaceholder"),value:i.discoveryEndpoint,onChange:t=>l(r=>({...r,discoveryEndpoint:t.target.value})),className:"w-[280px]"})}),e.jsxs(D,{children:[g&&e.jsx(u,{variant:"outline",size:"sm",onClick:()=>S(!1),children:s("settings.orgSso.cancelButton")}),e.jsx(u,{onClick:_,disabled:h.isPending,size:"sm",children:h.isPending?s("settings.orgSso.savingButton"):s(g?"settings.orgSso.updateButton":"settings.orgSso.configureSsoButton")})]})]})})]})]})})}),e.jsx(z,{open:I,onOpenChange:j,children:e.jsxs(T,{children:[e.jsx(O,{children:e.jsx(R,{children:s("settings.orgSso.removeConfirmation")})}),e.jsxs(F,{children:[e.jsx(q,{disabled:p.isPending,children:s("settings.orgSso.cancelButton")}),e.jsx(M,{onClick:w,disabled:p.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.orgSso.removeButton")})]})]})})]})}function Ee(){const s=L.c(1);let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(W,{capability:"org:manage",area:"security",children:e.jsx(X,{})}),s[0]=o):o=s[0],o}export{Ee as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-C2NoRJs0.js","assets/index-DmhdwAgP.js","assets/index-oE__K1ye.css","assets/Tool02-B0-a0UMl.js","assets/CheckCircle-BEcdXH7-.js","assets/Settings02-DMpqOK24.js","assets/use-mcp-client-DseZ3Mea.js","assets/auth-CsHQFHV_.js","assets/useInfiniteQuery-nK_JPgM8.js","assets/use-infinite-scroll-XidGSyic.js","assets/studio-tools-DIWsVaKg.js","assets/badge-C_9mnuBd.js","assets/input-TkvVVsQL.js","assets/dropdown-menu-D5BTIZvH.js","assets/ChevronUp-D5F6V6Tm.js","assets/ChevronRight-YmTewr_B.js","assets/DotsVertical-BmTi7wpl.js","assets/table-DnoPpUup.js","assets/toggle-group-DGvoaiio.js","assets/use-view-mode-B02hzmMj.js","assets/use-mobile-D8w2xyip.js","assets/FilterLines-BwWG7tAk.js","assets/Globe01-D3vBqhI7.js","assets/SearchMd-lwIiBODG.js","assets/dialog-DUqhzGiD.js","assets/X-Dif5I5BD.js","assets/AlertCircle-B9GlbKHh.js","assets/Upload01-B14IruoN.js","assets/alert-dialog-DDtUbhoS.js","assets/card-C3gg1LtP.js","assets/Trash01-Ba6bCbNY.js","assets/label-CB2o7dZ2.js","assets/select-AzuoAc3H.js","assets/tooltip-cvFTpZ9W.js","assets/ChevronDown-BSRiDjXd.js","assets/switch-DS9vYGS-.js","assets/textarea-DjtAtA2l.js","assets/XCircle-C0OdV3N_.js","assets/checkbox-Ba2-hx8r.js","assets/Eye-B-ZfWIGj.js","assets/LinkExternal01-DO3QnLus.js","assets/use-copy-DC217syR.js","assets/Copy01-BkGYkmm-.js","assets/Key01-DhLD806C.js","assets/Plus-2c1jULco.js","assets/mcp-oauth-B5rKpHdd.js","assets/Play-B8fWmOst.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as m,b as n,e as c,j as t,i as p,r as l,aX as f}from"./index-DmhdwAgP.js";import{R as u}from"./require-capability-DnfzULDW.js";import"./use-capability-3dRU8tE2.js";import"./access-gate-NCJKEJqO.js";import"./capability-load-error-i6NCyxxk.js";const g=l.lazy(()=>f(()=>import("./registry-layout-C2NoRJs0.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(p,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as Ie,a as en,z as un,M as mn,J as pn,j as e,B as J,t as U,c as hn,r as de,G as fn,D as xn,K as Ke,l as gn,i as we,p as S,n as jn,b as vn,m as yn}from"./index-DmhdwAgP.js";import{C as _n}from"./collection-search-TcSAZpqK.js";import{g as Cn,a as bn,b as Nn,e as wn}from"./extract-connection-data-_NDoBHMa.js";import{u as nn,a as tn,g as Sn,C as Me}from"./connection-card-D_K36Swx.js";import{e as sn,d as on,D as an,a as rn,h as In,c as kn}from"./dialog-DUqhzGiD.js";import{D as An,a as Dn,c as Tn,b as Pn,d as Fn,e as Vn,f as Bn}from"./drawer-DvhdIHph.js";import{u as On}from"./use-mobile-D8w2xyip.js";import{F as O,b as M,c as L,d as E,f as z,a as We}from"./form-C9InGmo4.js";import{I as Y}from"./input-TkvVVsQL.js";import{S as Mn,a as Ln,b as En,c as zn,d as pe}from"./select-AzuoAc3H.js";import{T as Rn}from"./textarea-DjtAtA2l.js";import{b as cn}from"./use-connection-DM1ROgj3.js";import{n as Se,i as Le}from"./Tool02-B0-a0UMl.js";import{s as Ee}from"./Star01-DoUbKevt.js";import{ap as $n}from"./agent-icon-DicjSkHu.js";import{s as Hn}from"./XClose-DomD4542.js";import{c as Kn,i as be,a as Qe,E as Un,p as Xn,b as Gn,d as qn}from"./connection-form-helpers-DyOAEqE9.js";import{a as ze}from"./authenticate-and-persist-oauth-CEv4KtcH.js";import{g as Wn}from"./connection-slug-eyAPH6o3.js";import{C as Qn}from"./collection-tabs-CIRa_M2W.js";import{u as Ye}from"./use-infinite-scroll-XidGSyic.js";import{B as Ne}from"./badge-C_9mnuBd.js";import{b as Re,T as $e,a as He}from"./tooltip-cvFTpZ9W.js";import{u as Yn}from"./useSuspenseInfiniteQuery-_ObcRUnC.js";import{S as Jn,u as Zn}from"./use-mcp-client-DseZ3Mea.js";import{i as Je}from"./ChevronUp-D5F6V6Tm.js";import{s as et}from"./Plus-2c1jULco.js";import{u as nt}from"./studio-tools-DIWsVaKg.js";import{u as tt}from"./use-ai-providers-ZLuBEaKb.js";function Ue(s){const n=s?.metadata?.githubRepo;if(!n?.url)return{status:"none"};const u=n.connectionId;return!!u&&!!s?.connections?.some(N=>N.connection_id===u)?{status:"attached",repo:n,connectionId:u}:!!u||n.installationId!=null?{status:"detached",repo:n}:{status:"public-clone",repo:n}}function $t(s){const n=Ue(s);return n.status==="attached"||n.status==="public-clone"?n.repo:null}function Ht(s){if(typeof s!="object"||s===null)return!1;const u=s.githubRepo?.url;return typeof u=="string"&&u.length>0}function Kt(s){return Ue(s).status==="attached"}function Ut(s){const n=Ue(s).status;return n==="attached"||n==="detached"}function Xt(s){const n=new Set;for(const u of s??[]){const v=u.metadata?.liveAgentId;typeof v=="string"&&v&&n.add(u.id)}return n}function Gt(s,n){if(!s)return null;const u=s.metadata?.liveAgentId;if(typeof u=="string"&&u)return{mode:"dev",targetId:u};const v=(n??[]).find(h=>h.metadata?.liveAgentId===s.id);return v?{mode:"live",targetId:v.id}:null}function st({open:s,onOpenChange:n,onCreated:u}){const{org:v}=Ie(),{data:h}=en.useSession(),{stdioEnabled:N}=un(),k=On(),R=cn(),l=nn(),A=tn(l,"").items,o=mn({resolver:pn(Kn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),f=o.watch("ui_type"),w=o.watch("connection_url"),F=o.watch("npx_package"),j=be({uiType:f,connectionUrl:w??"",npxPackage:F??""})??Qe({uiType:f,connectionUrl:w??"",registryItems:A}),c=t=>{const d=t.trim();if(!d)return;const x=!!o.formState.dirtyFields.title,i=!!o.formState.dirtyFields.description,r=!!o.formState.dirtyFields.env_vars,g=m=>{if(m&&(!x&&!o.getValues("title").trim()&&m.title&&o.setValue("title",m.title,{shouldDirty:!1}),!i&&!(o.getValues("description")??"").trim()&&m.description&&o.setValue("description",m.description,{shouldDirty:!1}),!r&&m.envVarKeys?.length)){const y=o.getValues("env_vars")??[],T=new Set(y.map(V=>V.key)),Z=m.envVarKeys.filter(V=>!T.has(V));Z.length>0&&o.setValue("env_vars",[...y,...Z.map(V=>({key:V,value:""}))],{shouldDirty:!0})}},G=Xn(d);if(G&&N){o.setValue("ui_type","NPX",{shouldDirty:!0}),o.setValue("npx_package",G.packageName,{shouldDirty:!0}),o.setValue("connection_url","",{shouldDirty:!0}),o.setValue("connection_token",null,{shouldDirty:!0}),g(be({uiType:"NPX",npxPackage:G.packageName}));return}if(d.startsWith("http://")||d.startsWith("https://")){const m=f==="HTTP"||f==="SSE"||f==="Websocket"?f:"HTTP";o.setValue("ui_type",m,{shouldDirty:!0}),o.setValue("connection_url",d,{shouldDirty:!0}),g(be({uiType:m,connectionUrl:d})??Qe({uiType:m,connectionUrl:d,registryItems:A}));return}f==="NPX"&&g(be({uiType:"NPX",npxPackage:d}))},$=t=>{t||o.reset(),n(t)},b=async t=>{let d,x=null,i=null,r=null;t.ui_type==="NPX"?(d="STDIO",x="",r=Gn(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(d="STDIO",x="",r=qn(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(d=t.ui_type,x=t.connection_url||"",i=t.connection_token||null);const g=Cn("conn");try{await R.create.mutateAsync({id:g,title:t.title,description:t.description||null,connection_type:d,connection_url:x,connection_token:i,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:h?.user?.id||"system",organization_id:v.id,icon:t.icon??null,app_name:null,app_id:null,connection_headers:r,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),o.reset(),n(!1),u?.(g)}catch{U.error("Failed to create connection")}},D="Create Connection",H="Create a custom connection in your organization. Fill in the details below.",C=o.formState.isSubmitting?"Saving...":"Create Connection",X=e.jsxs("div",{className:"grid gap-4",children:[e.jsx(O,{control:o.control,name:"ui_type",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Type *"}),e.jsxs(Mn,{value:t.value,onValueChange:t.onChange,children:[e.jsx(E,{children:e.jsx(Ln,{children:e.jsx(En,{})})}),e.jsxs(zn,{children:[e.jsx(pe,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),"HTTP"]})}),e.jsx(pe,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),"SSE"]})}),e.jsx(pe,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),"Websocket"]})}),N&&e.jsxs(e.Fragment,{children:[e.jsx(pe,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Se,{className:"w-4 h-4"}),"NPX Package"]})}),e.jsx(pe,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($n,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),e.jsx(z,{})]})}),f==="NPX"&&e.jsx(O,{control:o.control,name:"npx_package",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"NPM Package *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"@perplexity-ai/mcp-server",...t,value:t.value??"",onPaste:d=>{const x=d.clipboardData.getData("text");x&&(d.preventDefault(),o.setValue("npx_package",x.trim(),{shouldDirty:!0}),c(x))},onBlur:d=>{c(d.target.value),t.onBlur()}})}),e.jsx(z,{})]})}),f==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(O,{control:o.control,name:"stdio_command",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Command *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"node, bun, python...",...t,value:t.value??""})}),e.jsx(z,{})]})}),e.jsx(O,{control:o.control,name:"stdio_args",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Arguments"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"arg1 arg2 --flag value",...t,value:t.value??""})}),e.jsx(z,{})]})})]}),e.jsx(O,{control:o.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Working Directory"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"/path/to/project (optional)",...t,value:t.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),e.jsx(z,{})]})})]}),(f==="NPX"||f==="STDIO")&&e.jsx(O,{control:o.control,name:"env_vars",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Environment Variables"}),e.jsx(E,{children:e.jsx(Un,{value:t.value??[],onChange:t.onChange})}),e.jsx(z,{})]})}),f!=="NPX"&&f!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(O,{control:o.control,name:"connection_url",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"URL *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"https://example.com/mcp",...t,value:t.value??"",onPaste:d=>{const x=d.clipboardData.getData("text");x&&(d.preventDefault(),o.setValue("connection_url",x.trim(),{shouldDirty:!0}),c(x))},onBlur:d=>{c(d.target.value),t.onBlur()}})}),e.jsx(z,{})]})}),e.jsx(O,{control:o.control,name:"connection_token",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:j?.token?.label??"Token (optional)"}),e.jsx(E,{children:e.jsx(Y,{type:"password",placeholder:j?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...t,value:t.value??""})}),j?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[j.token.helperText,j.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),e.jsx(z,{})]})})]}),e.jsx(O,{control:o.control,name:"title",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Name *"}),e.jsx(E,{children:e.jsx(Y,{placeholder:"My Connection",...t})}),e.jsx(z,{})]})}),e.jsx(O,{control:o.control,name:"description",render:({field:t})=>e.jsxs(M,{children:[e.jsx(L,{children:"Description"}),e.jsx(E,{children:e.jsx(Rn,{placeholder:"A brief description of this connection",rows:3,...t,value:t.value??""})}),e.jsx(z,{})]})})]});return k?e.jsx(An,{open:s,onOpenChange:$,children:e.jsxs(Dn,{className:"max-h-[90vh]",children:[e.jsx(Tn,{className:"pb-2",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx(Pn,{children:D}),e.jsx(Fn,{className:"mt-1",children:H})]}),e.jsx(Vn,{asChild:!0,children:e.jsx(J,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:e.jsx(Hn,{size:16})})})]})}),e.jsx(We,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(b),children:[e.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:X}),e.jsx(Bn,{children:e.jsx(J,{type:"submit",disabled:o.formState.isSubmitting,className:"w-full",children:C})})]})})]})}):e.jsx(sn,{open:s,onOpenChange:$,children:e.jsxs(on,{className:"sm:max-w-[525px]",children:[e.jsxs(an,{children:[e.jsx(rn,{children:D}),e.jsx(In,{children:H})]}),e.jsx(We,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(b),children:[e.jsx("div",{className:"py-4",children:X}),e.jsxs(kn,{children:[e.jsx(J,{type:"button",variant:"outline",onClick:()=>$(!1),children:"Cancel"}),e.jsx(J,{type:"submit",disabled:o.formState.isSubmitting,className:"min-w-40",children:C})]})]})})]})})}function ot(s){const n=hn.c(68),{mode:u,agentId:v,addedConnectionIds:h,onAdd:N,onCloneAndAdd:k,onConnectAndAdd:R,connectingItemId:l,search:_,onCreateConnection:A,onBrowseNavigate:o,defaultTab:f}=s,w=u===void 0?"add":u,F=f===void 0?"connected":f,{org:j}=Ie(),c=de.useDeferredValue(_),$=_!==c;let b;n[0]!==c?(b=c.trim().toLowerCase(),n[0]=c,n[1]=b):b=n[1];const D=b;let H;n[2]!==F?(H=a=>a??F,n[2]=F,n[3]=H):H=n[3];const[C,X]=fn(xn.connectionsTab(j.slug)+(F==="all"?":home-modal":":agent-modal"),H);let t;n[4]!==C||n[5]!==X?(t=a=>{a!==C&&S("connections_dialog_tab_changed",{to_tab:a}),X(a)},n[4]=C,n[5]=X,n[6]=t):t=n[6];const d=t;let x;n[7]!==j.id||n[8]!==j.slug?(x={connectionId:Jn,orgId:j.id,orgSlug:j.slug},n[7]=j.id,n[8]=j.slug,n[9]=x):x=n[9];const i=Zn(x),r=c?.trim().split(/\s+/).filter(Boolean)??[],g=r.length>0?{operator:"or",conditions:r.flatMap(mt)}:void 0,G={...g&&{where:g},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},m=JSON.stringify(G),{data:y,fetchNextPage:T,hasNextPage:Z,isFetchingNextPage:V}=Yn({queryKey:Ke.collectionListInfinite(i,j.id,"","CONNECTIONS",m),queryFn:async a=>{const{pageParam:p}=a,K=p===void 0?0:p;return(await i.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...g&&{where:g},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:K}})).structuredContent},initialPageParam:0,getNextPageParam:dt,staleTime:3e4}),Xe=y?.pages.flatMap(lt)??[],he=Sn(Xe),ln=new Set(Xe.filter(ct).map(rt)),fe=nn(),q=tn(fe,c),ke=Ye(q.loadMore,q.hasMore,q.isLoadingMore),Ae=Ye(T,Z??!1,V),P=C==="all"||!!D,Ge=P?q.items.filter(a=>{const p=bn(a);if(p&&ln.has(p))return!1;if(!D)return!0;const K=a._meta?.["mcp.mesh"],W=[a.title,a.description,a.name,a.server?.title,a.server?.description,a.server?.name,K?.friendly_name,K?.friendlyName].filter(Boolean).join(" ").toLowerCase();return r.some(B=>W.includes(B.toLowerCase()))}):[],ue=Ge.filter(it),me=Ge.filter(at);let xe;n[10]!==h?(xe=a=>a.some(p=>h.has(p.id)),n[10]=h,n[11]=xe):xe=n[11];const De=xe;let ge;n[12]!==h||n[13]!==v||n[14]!==l||n[15]!==De||n[16]!==w||n[17]!==N||n[18]!==o||n[19]!==k?(ge=(a,p,K,W,B)=>{const Ce=De(B),le=B.find(Q=>!h.has(Q.id)),I=B[0];if(w==="browse"){const Q=Wn(I);return e.jsx(Me,{connection:{title:p,icon:K,description:B.length>1?`${B.length} instances`:W??void 0},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs(Ne,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Je,{size:11})," Connected"]}),onClick:()=>{S("connection_browse_clicked",{app_name:I.app_name??null,connection_id:I.id,instances_count:B.length}),o?.(Q)}},a)}return e.jsx(Me,{connection:{title:p,icon:K,description:W},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[Ce&&e.jsxs(Ne,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Je,{size:11})," Added"]}),e.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:Q=>{Q.stopPropagation(),le?(S("connection_add_clicked",{action:"use_existing",app_name:I.app_name??null,connection_id:le.id}),v&&S("agent_connection_attached",{agent_id:v,connection_id:le.id,app_name:I.app_name??null,mode:"existing"}),N(le.id)):(S("connection_add_clicked",{action:"clone",app_name:I.app_name??null,base_connection_id:I.id}),k(I))},children:"Add"})]})},a)},n[12]=h,n[13]=v,n[14]=l,n[15]=De,n[16]=w,n[17]=N,n[18]=o,n[19]=k,n[20]=ge):ge=n[20];const je=ge;let ve;n[21]!==l||n[22]!==w||n[23]!==R?(ve=a=>{const p=a._meta?.["mcp.mesh"],K=p?.friendlyName||p?.friendly_name||a.server?.title||a.title||a.server?.name||a.name||a.id||"",W=a.server?.description||a.description||null,B=a.server?.icons?.[0]?.src||Nn(a.server?.repository)||null,Ce=p?.official===!0,le=p?.verified===!0,I=p?.owner==="deco";return e.jsx(Me,{connection:{title:K,description:W,icon:B},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[I&&e.jsxs(Re,{children:[e.jsx($e,{asChild:!0,children:e.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),e.jsx(He,{children:"Built and maintained by Deco"})]}),!I&&Ce&&e.jsxs(Re,{children:[e.jsx($e,{asChild:!0,children:e.jsx(Ne,{variant:"outline",size:"icon",children:e.jsx(Le,{})})}),e.jsx(He,{children:"Built and maintained by the official vendor"})]}),!I&&!Ce&&le&&e.jsxs(Re,{children:[e.jsx($e,{asChild:!0,children:e.jsx(Ne,{variant:"outline",size:"icon",children:e.jsx(Le,{})})}),e.jsx(He,{children:"Verified by the Deco team"})]}),e.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:Q=>{Q.stopPropagation(),S("connection_add_clicked",{action:"connect_new",registry_item_id:a.id,app_name:p?.friendlyName||a.server?.name||a.name||null}),R(a)},children:l===a.id?e.jsx(we,{size:14,className:"animate-spin"}):w==="browse"?"Connect":"Add"})]})},`catalog-${a.id}`)},n[21]=l,n[22]=w,n[23]=R,n[24]=ve):ve=n[24];const qe=ve;let ee;n[25]!==C||n[26]!==d||n[27]!==A||n[28]!==D?(ee=!D&&e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[e.jsx(Qn,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:C,onTabChange:a=>d(a)}),e.jsxs(J,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{S("connections_dialog_custom_clicked"),A()},children:[e.jsx(et,{size:12}),"Custom Connection"]})]}),n[25]=C,n[26]=d,n[27]=A,n[28]=D,n[29]=ee):ee=n[29];const Te=$&&"opacity-50 pointer-events-none";let ne;n[30]!==Te?(ne=gn("flex-1 overflow-auto p-5 transition-opacity duration-150",Te),n[30]=Te,n[31]=ne):ne=n[31];const dn="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ye;n[32]!==je?(ye=a=>{if(a.type==="group")return je(a.key,a.title,a.icon,null,a.connections);const p=a.connection;return je(p.id,p.title,p.icon,p.description??null,[p])},n[32]=je,n[33]=ye):ye=n[33];const Pe=he.map(ye);let te;n[34]!==Ae?(te=e.jsx("div",{ref:Ae,className:"col-span-full h-1"}),n[34]=Ae,n[35]=te):te=n[35];let se;n[36]!==V?(se=V&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),n[36]=V,n[37]=se):se=n[37];const Fe=P&&ue.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx(Le,{size:13,className:"text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Ve=P&&ue.map(qe),Be=P&&me.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Oe=P&&me.map(qe);let oe;n[38]!==ke||n[39]!==fe||n[40]!==P?(oe=P&&fe.length>0&&e.jsx("div",{ref:ke,className:"col-span-full h-1"}),n[38]=ke,n[39]=fe,n[40]=P,n[41]=oe):oe=n[41];let ae;n[42]!==q.isLoadingMore||n[43]!==P?(ae=P&&q.isLoadingMore&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),n[42]=q.isLoadingMore,n[43]=P,n[44]=ae):ae=n[44];let ie;n[45]!==Pe||n[46]!==te||n[47]!==se||n[48]!==Fe||n[49]!==Ve||n[50]!==Be||n[51]!==Oe||n[52]!==oe||n[53]!==ae?(ie=e.jsxs("div",{className:dn,children:[Pe,te,se,Fe,Ve,Be,Oe,oe,ae]}),n[45]=Pe,n[46]=te,n[47]=se,n[48]=Fe,n[49]=Ve,n[50]=Be,n[51]=Oe,n[52]=oe,n[53]=ae,n[54]=ie):ie=n[54];let re;n[55]!==C||n[56]!==he.length||n[57]!==me||n[58]!==_||n[59]!==ue?(re=he.length===0&&ue.length===0&&me.length===0&&e.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:_?`No connections match "${_}"`:C==="connected"?"No connections yet":"No connections available"}),n[55]=C,n[56]=he.length,n[57]=me,n[58]=_,n[59]=ue,n[60]=re):re=n[60];let ce;n[61]!==ne||n[62]!==ie||n[63]!==re?(ce=e.jsxs("div",{className:ne,children:[ie,re]}),n[61]=ne,n[62]=ie,n[63]=re,n[64]=ce):ce=n[64];let _e;return n[65]!==ee||n[66]!==ce?(_e=e.jsxs(e.Fragment,{children:[ee,ce]}),n[65]=ee,n[66]=ce,n[67]=_e):_e=n[67],_e}function at(s){return!s.verified&&!s._meta?.["mcp.mesh"]?.verified&&!s.meta?.verified}function it(s){return s.verified||s._meta?.["mcp.mesh"]?.verified||s.meta?.verified}function rt(s){return s.app_name}function ct(s){return s.app_name}function lt(s){return s?.items??[]}function dt(s,n){if(s?.hasMore)return n.reduce(ut,0)}function ut(s,n){return s+(n?.items?.length??0)}function mt(s){return[{field:["title"],operator:"contains",value:s},{field:["description"],operator:"contains",value:s}]}function qt({open:s,onOpenChange:n,defaultTab:u,initialSearch:v="",...h}){const N=h.mode??"add",k="agentId"in h?h.agentId:void 0,R="addedConnectionIds"in h?h.addedConnectionIds??new Set:new Set,l="onAdd"in h&&h.onAdd?h.onAdd:i=>{},_=(i,r,g)=>{k&&S("agent_connection_attached",{agent_id:k,connection_id:i,app_name:r,mode:g})},[A,o]=de.useState(null),[f,w]=de.useState(v),[F,j]=de.useState(!1),{org:c}=Ie(),{data:$}=en.useSession(),b=cn(),D=jn(),H=vn(),C=i=>{n(!1),H({to:"/$org/settings/connections/$appSlug",params:{org:c.slug,appSlug:i}})},X=()=>{D.invalidateQueries({predicate:i=>{const r=i.queryKey;return r[1]===c.id&&r[3]==="collection"&&r[4]==="CONNECTIONS"}})},t=async(i,r)=>{S("connection_oauth_succeeded",{connection_id:i,flow:r});const g=new URL(`/api/${c.slug}/mcp/${i}`,window.location.origin);await D.invalidateQueries({queryKey:Ke.isMCPAuthenticated(g.href,null)}),X()},d=async i=>{o(i.app_name??i.id);try{const g=`${i.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,m=(await b.create.mutateAsync({title:g,description:i.description??null,connection_type:i.connection_type,connection_url:i.connection_url??null,connection_token:null,icon:i.icon??null,app_name:i.app_name??null,app_id:i.app_id??null,connection_headers:i.connection_headers??null})).id,y=await ze({connectionId:m,orgId:c.id,orgSlug:c.slug,persistFallback:T=>b.update.mutateAsync({id:m,data:{connection_token:T}}).then(()=>{})});if(y.ran&&!y.ok){S("connection_oauth_failed",{connection_id:m,flow:"clone",error:y.error??"no_token"}),U.error(`Authentication failed: ${y.error??"no token received"}`),await b.delete.mutateAsync(m);return}y.ran&&await t(m,"clone"),_(m,i.app_name??null,"clone"),l(m)}catch(r){console.error("Failed to add connection:",r),U.error("Failed to add connection")}finally{o(null)}},x=async i=>{if(!(!c||!$?.user?.id)){o(i.id);try{const r=wn(i,c.id,$.user.id,{remoteIndex:0}),g=r.connection_type==="STDIO",G=!!r.connection_url,m=g&&r.connection_headers&&typeof r.connection_headers=="object"&&"command"in r.connection_headers;if(!G&&!m){U.error("This MCP Server cannot be connected: no connection method available"),o(null);return}const{id:y}=await b.create.mutateAsync(r),T=await ze({connectionId:y,orgId:c.id,orgSlug:c.slug,persistFallback:Z=>b.update.mutateAsync({id:y,data:{connection_token:Z}}).then(()=>{})});if(T.ran&&!T.ok){S("connection_oauth_failed",{connection_id:y,flow:"connect_new",error:T.error??"no_token"}),U.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${T.error??"no token received"})`}),_(y,r.app_name??null,"new"),l(y);return}T.ran?(await t(y,"connect_new"),U.success("Connected and authenticated")):U.success("Connected"),_(y,r.app_name??null,"new"),l(y)}catch(r){console.error("Failed to connect:",r),U.error("Failed to connect")}finally{o(null)}}};return e.jsxs(sn,{open:s,onOpenChange:n,children:[e.jsxs(on,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[e.jsx(an,{className:"px-6 pt-5 pb-0 shrink-0",children:e.jsx(rn,{className:"text-base font-semibold",children:N==="browse"?"Connections":"Add Connection"})}),e.jsx("div",{className:"pt-3 shrink-0",children:e.jsx(_n,{value:f,onChange:w,placeholder:"Search connections..."})}),e.jsx(de.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),children:e.jsx(ot,{mode:N,agentId:k,addedConnectionIds:R,onAdd:l,onCloneAndAdd:d,onConnectAndAdd:x,connectingItemId:A,search:f,onCreateConnection:()=>j(!0),onBrowseNavigate:C,defaultTab:u})})]}),e.jsx(st,{open:F,onOpenChange:j,onCreated:async i=>{j(!1);const r=await ze({connectionId:i,orgId:c.id,orgSlug:c.slug,persistFallback:g=>b.update.mutateAsync({id:i,data:{connection_token:g}}).then(()=>{})});if(r.ran&&!r.ok){S("connection_oauth_failed",{connection_id:i,flow:"custom_create",error:r.error??"no_token"}),U.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${r.error??"no token received"})`}),_(i,null,"custom"),l(i),n(!1);return}r.ran&&await t(i,"custom_create"),_(i,null,"custom"),l(i),n(!1)}})]})}const Ze=new Map;function Wt(){const{org:s}=Ie(),n=nt(),u=tt(),v=u.find(c=>c.providerId==="deco"),{data:h,isLoading:N,refetch:k,isFetching:R}=yn({queryKey:Ke.aiProviderCredits(s.id,"deco"),enabled:!!v,staleTime:6e4,queryFn:async()=>{try{return await n.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=h?.balanceCents??null,_=l!=null?l/100:null,A=de.useRef(new Map);if(l!=null){const c=Ze.get(s.id);A.current.get(s.id)&&c!=null&&l>c&&S("credits_topped_up_detected",{organization_id:s.id,delta_cents:l-c,previous_balance_cents:c,new_balance_cents:l}),Ze.set(s.id,l),A.current.set(s.id,!0)}const o=!!v,f=l!=null&&l>0,w=l!=null&&l===0,F=l!=null&&l===200,j=u.length>0&&u.every(c=>c.providerId==="deco");return{hasDecoKey:o,decoKeyId:v?.id??null,balanceCents:l,balanceDollars:_,hasCredits:f,isZeroBalance:w,isInitialFreeCredit:F,hasOnlyDecoProvider:j,isLoading:N,isFetching:R,refetch:k}}export{qt as A,Ht as a,$t as b,Kt as c,Ut as d,Gt as f,Xt as g,Ue as r,Wt as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./use-infinite-scroll-XidGSyic.js";import{dK as i}from"./index-DmhdwAgP.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as s}from"./use-infinite-scroll-XidGSyic.js";import{dK as u,ab as n}from"./index-DmhdwAgP.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as V,r as U,j as o,l as J,B as Y}from"./index-DmhdwAgP.js";import{x as ct,W as et,f as mt}from"./agent-icon-DicjSkHu.js";import{i as pt}from"./ChevronRight-YmTewr_B.js";import{L as dt}from"./label-CB2o7dZ2.js";import{m as nt}from"./automation-runs-D8v8nlly.js";import{S as ft}from"./switch-DS9vYGS-.js";import{T as ut,b as ht,a as gt}from"./tooltip-cvFTpZ9W.js";import{V as xt}from"./view-mode-toggle-DziN7a9n.js";import"./AlertCircle-B9GlbKHh.js";import"./Tool01-BR3IBeV9.js";import"./ArrowUp-DNZsq7Zt.js";import"./Settings02-DMpqOK24.js";import"./Tool02-B0-a0UMl.js";import"./XCircle-C0OdV3N_.js";import"./ArrowUpRight-DZZygrAi.js";import"./TrendUp01-CeRF_789.js";import"./ZapSquare-EvC2T9CP.js";import"./ZoomOut-BprgOfkE.js";import"./Users03-Bx4g7VTC.js";import"./CheckCircle-BEcdXH7-.js";import"./ChevronUp-D5F6V6Tm.js";import"./ChevronDown-BSRiDjXd.js";import"./DotsVertical-BmTi7wpl.js";import"./Stars02-B08FvcHQ.js";import"./Copy01-BkGYkmm-.js";import"./Globe01-D3vBqhI7.js";import"./Eye-B-ZfWIGj.js";import"./FilterLines-BwWG7tAk.js";import"./Star01-DoUbKevt.js";import"./Globe04-pvxBukgJ.js";import"./SwitchHorizontal01-Rgis0XWf.js";import"./HardDrive-DutZPQFL.js";import"./Image01-PIeYnf-K.js";import"./Key01-DhLD806C.js";import"./LayoutLeft-BI-sXAac.js";import"./LinkExternal01-DO3QnLus.js";import"./Monitor01-BOILvS2u.js";import"./Sun-nDXz4jeM.js";import"./Package-DbEcG94t.js";import"./Palette-CyZvWKmI.js";import"./Play-B8fWmOst.js";import"./Plus-2c1jULco.js";import"./SearchLg-XmvudKlH.js";import"./SearchMd-lwIiBODG.js";import"./Shield01-gTFc9c17.js";import"./Stars01-CJsm_THn.js";import"./Trash01-Ba6bCbNY.js";import"./Upload01-B14IruoN.js";import"./User01-ByIE6k8L.js";import"./Users01-BdldAr7H.js";import"./XClose-DomD4542.js";import"./X-Dif5I5BD.js";import"./Zap-CEUVQQOc.js";import"./select-AzuoAc3H.js";import"./useInfiniteQuery-nK_JPgM8.js";import"./use-infinite-scroll-XidGSyic.js";import"./use-connection-DM1ROgj3.js";import"./use-collections-DaXoNaLL.js";import"./use-mcp-client-DseZ3Mea.js";import"./auth-CsHQFHV_.js";import"./use-virtual-mcp-urYy02xb.js";import"./card-C3gg1LtP.js";import"./sidebar-DnKMI8jz.js";import"./use-mobile-D8w2xyip.js";import"./table-DnoPpUup.js";import"./empty-state-BHuw6cM9.js";import"./use-members-CncY3QG2.js";import"./use-org-auth-client-DjREcL_I.js";import"./use-clock-tick-BzcS25hV.js";import"./use-automations-COcieFX-.js";import"./studio-tools-DIWsVaKg.js";import"./useSuspenseInfiniteQuery-_ObcRUnC.js";import"./avatar-BVdHZbMN.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DC217syR.js";import"./file-type-icon-BOCZKON3.js";import"./dialog-DUqhzGiD.js";import"./tab-id-BijBBRwE.js";import"./hooks-DU-2h9eZ.js";import"./decopilot-sse-pool-CEQrv8Fn.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-DSveBxCg.js";import"./autosend-BgYoPuWD.js";import"./use-ai-providers-ZLuBEaKb.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-CX_EuT5c.js";import"./use-organization-settings-bBY4klS6.js";import"./monaco-editor-DfuNvLfy.js";import"./index-DnrPO2j2.js";import"./index-f6gbzJ8b.js";import"./calendar-Bxkf6gvE.js";import"./use-t-BjZG1zRp.js";import"./shell-layout-6KUu0MA6.js";import"./required-auth-layout-ABsqitxw.js";import"./use-org-sso-diAgeADE.js";import"./integration-icon-CWb3OXTV.js";import"./use-navigate-to-agent-YScxPu5L.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-DHN9bK0l.js";import"./form-C9InGmo4.js";import"./input-TkvVVsQL.js";const bt=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),yt=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Tt=new Date(-864e13),vt=new Date(864e13),jt=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,Nt=/\/flags\/multivariate\.ts$/;function wt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function kt(e){if(!e||typeof e!="object")return null;const{start:t,end:n}=e,r=typeof t=="string",l=typeof n=="string";if(!r&&!l)return null;const s=r?new Date(t):Tt,m=l?new Date(n):vt;return Number.isNaN(s.getTime())||Number.isNaN(m.getTime())||r&&l&&m.getTime()<=s.getTime()?null:{start:s,end:m,openStart:!r,openEnd:!l}}function rt(e,t){if(!e||typeof e!="object")return;const n=e.__resolveType;if(typeof n=="string"){if(bt.has(n)){const r=kt(e);r&&t.push(r);return}if(yt.has(n)){const r=e.matchers;if(Array.isArray(r))for(const l of r)rt(l,t)}}}function _t(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!jt.test(t))return!1;const n=e.variants;return Array.isArray(n)}function Mt(e){if(typeof e=="string"){const a=e.trim();if(a.length===0)return null;try{const i=new URL(a).pathname.split("/").filter(Boolean),p=i[i.length-1];if(p)return decodeURIComponent(p)}catch{}return a.length>80?`${a.slice(0,77)}…`:a}if(!e||typeof e!="object")return null;const t=e,n=t.config,l=t.desktop?.media,s=[t.title,t.name,t.label,t.alt,n?.title,n?.name,n?.typeAlert?.message,l?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const a of s)if(typeof a=="string"&&a.trim().length>0)return a.trim();const m=t.__resolveType;if(typeof m=="string"){const c=(m.split("/").pop()??m).replace(/\.(tsx?|jsx?)$/i,"");if(c.length>0)return c}return null}function Et(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];typeof r=="number"?t.length>0?t[t.length-1]+=`[${r}]`:t.push(`[${r}]`):t.push(r)}return t.join(" · ")}function W(e,t,n,r,l){if(_t(e)){const s=e.variants,m=e.__resolveType,a=Nt.test(m)?"":Et(r);s.forEach((c,i)=>{if(!c||typeof c!="object")return;const p=c,d=[];if(rt(p.rule,d),d.length===0)return;const x=Mt(p.value)??(a||n);for(const h of d)l.push({blockKey:t,blockLabel:n,innerPath:a,variantIndex:i,start:h.start,end:h.end,openStart:h.openStart,openEnd:h.openEnd,label:x,flagResolveType:m})});for(let c=0;c<s.length;c++){const i=s[c];i&&typeof i=="object"&&W(i.value,t,n,[...r,"variants",c,"value"],l)}return}if(Array.isArray(e)){for(let s=0;s<e.length;s++)W(e[s],t,n,[...r,s],l);return}if(e&&typeof e=="object")for(const[s,m]of Object.entries(e))s!=="__resolveType"&&W(m,t,n,[...r,s],l)}function St(e){if(!e)return[];const t=[];for(const[n,r]of Object.entries(e))W(r,n,wt(n),[],t);return t.sort((n,r)=>n.start.getTime()-r.start.getTime())}function At(e){const t=[...new Set(e)].sort(),n=new Map;return t.forEach((r,l)=>{const s=l*137.508%360;n.set(r,{bg:`oklch(0.62 0.14 ${s})`,text:"white",border:`oklch(0.50 0.14 ${s})`})}),n}const Dt={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function st(e,t){return e.get(t)??Dt}const $t=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ot=["January","February","March","April","May","June","July","August","September","October","November","December"],it=1440*60*1e3;function P(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function at(e){return new Date(e.getFullYear(),e.getMonth(),1)}function F(e,t){return new Date(e.getFullYear(),e.getMonth()+t,1)}function z(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function K(e,t){return Math.round((P(e).getTime()-P(t).getTime())/it)}function Ct(e){const t=(e.getTime()-P(e).getTime())/it;return Math.min(Math.max(t,0),1)}function q(e,t){return K(e,t)+Ct(e)}function Rt(e){const t=z(e,-e.getDay()),n=[];for(let r=0;r<6;r++){const l=[];for(let s=0;s<7;s++)l.push(z(t,r*7+s));n.push(l)}for(;n.length>0&&n[n.length-1].every(r=>r.getMonth()!==e.getMonth());)n.pop();return n}function Lt(e,t){const n=P(e[0]),r=z(n,7),l=n.getTime(),s=r.getTime(),m=[];for(const i of t){const p=P(i.start),d=P(i.end);if(d.getTime()<n.getTime()||p.getTime()>=r.getTime())continue;const u=p.getTime()<n.getTime()?n:p,x=d.getTime()>=r.getTime()?z(r,-1):d,h=K(u,n),g=K(x,u)+1;if(g<=0)continue;const b=Math.max(i.start.getTime(),l),y=Math.min(i.end.getTime(),s),T=q(new Date(b),n),f=Math.max(q(new Date(y),n)-T,0);f<=0||m.push({variant:i,startCol:h,span:g,leftUnits:T,widthUnits:f})}m.sort((i,p)=>i.startCol-p.startCol||p.span-i.span||i.variant.blockKey.localeCompare(p.variant.blockKey));const a=[],c=[];for(const i of m){let p=a.findIndex(d=>d<=i.startCol);p===-1&&(p=a.length,a.push(0)),a[p]=i.startCol+i.span,c.push({...i,lane:p})}return c}const Q=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Ot(e){const t=e.openStart?"Always":Q.format(e.start),n=e.openEnd?"Ongoing":Q.format(e.end);return`${t} → ${n}`}function Pt(e){const t=V.c(17),{variant:n}=e;let r;t[0]!==n.blockLabel?(r=o.jsx("div",{className:"font-semibold",children:n.blockLabel}),t[0]=n.blockLabel,t[1]=r):r=t[1];let l;t[2]!==n.innerPath?(l=n.innerPath&&o.jsx("div",{className:"text-muted-foreground",children:n.innerPath}),t[2]=n.innerPath,t[3]=l):l=t[3];let s;t[4]!==n.blockLabel||t[5]!==n.innerPath||t[6]!==n.label?(s=n.label!==n.blockLabel&&n.label!==n.innerPath&&o.jsx("div",{className:"text-muted-foreground",children:n.label}),t[4]=n.blockLabel,t[5]=n.innerPath,t[6]=n.label,t[7]=s):s=t[7];let m;t[8]!==n?(m=Ot(n),t[8]=n,t[9]=m):m=t[9];let a;t[10]!==m?(a=o.jsx("div",{className:"mt-1",children:m}),t[10]=m,t[11]=a):a=t[11];let c;return t[12]!==r||t[13]!==l||t[14]!==s||t[15]!==a?(c=o.jsx(gt,{children:o.jsxs("div",{className:"text-xs",children:[r,l,s,a]})}),t[12]=r,t[13]=l,t[14]=s,t[15]=a,t[16]=c):c=t[16],c}const X=16;function It(e,t){const n=e?"transparent":"#000 0",r=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${n}, #000 ${X}px, #000 calc(100% - ${X}px), ${r})`}function lt(e){const t=V.c(26),{variant:n,color:r,style:l,children:s,fadeStart:m,fadeEnd:a}=e,c=m===void 0?!1:m,i=a===void 0?!1:a;let p;t[0]!==i||t[1]!==c?(p=It(c,i),t[0]=i,t[1]=c,t[2]=p):p=t[2];const d=p;let u;t[3]!==c?(u=c&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=c,t[4]=u):u=t[4];let x;t[5]!==i?(x=i&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=i,t[6]=x):x=t[6];let h;t[7]!==d?(h=d&&{maskImage:d,WebkitMaskImage:d},t[7]=d,t[8]=h):h=t[8];let g;t[9]!==r.bg||t[10]!==r.text||t[11]!==l||t[12]!==u||t[13]!==x||t[14]!==h?(g={background:r.bg,color:r.text,borderRadius:4,...u,...x,...h,...l},t[9]=r.bg,t[10]=r.text,t[11]=l,t[12]=u,t[13]=x,t[14]=h,t[15]=g):g=t[15];let b;t[16]!==s?(b=o.jsx("span",{className:"truncate",children:s}),t[16]=s,t[17]=b):b=t[17];let y;t[18]!==g||t[19]!==b?(y=o.jsx(ut,{asChild:!0,children:o.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:g,children:b})}),t[18]=g,t[19]=b,t[20]=y):y=t[20];let T;t[21]!==n?(T=o.jsx(Pt,{variant:n}),t[21]=n,t[22]=T):T=t[22];let f;return t[23]!==T||t[24]!==y?(f=o.jsxs(ht,{children:[y,T]}),t[23]=T,t[24]=y,t[25]=f):f=t[25],f}function Jn(e){const t=V.c(49),{decofile:n}=e,[r,l]=U.useState("calendar"),[s,m]=U.useState(Bt),[a,c]=U.useState(!1);let i,p,d;if(t[0]!==n||t[1]!==a){const S=St(n);i=S.filter(Ht).length,d=a?S:S.filter(Vt),p=At(d.map(Ft)),t[0]=n,t[1]=a,t[2]=i,t[3]=p,t[4]=d}else i=t[2],p=t[3],d=t[4];const u=p;let x;t[5]===Symbol.for("react.memo_cache_sentinel")?(x=()=>m(at(new Date)),t[5]=x):x=t[5];const h=x;let g;t[6]!==r?(g=()=>m(S=>r==="calendar"?F(S,-1):F(S,-3)),t[6]=r,t[7]=g):g=t[7];const b=g;let y;t[8]!==r?(y=()=>m(S=>r==="calendar"?F(S,1):F(S,3)),t[8]=r,t[9]=y):y=t[9];const T=y;let f;t[10]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(Y,{variant:"outline",size:"sm",onClick:h,children:"Today"}),t[10]=f):f=t[10];let w;t[11]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(ct,{size:16}),t[11]=w):w=t[11];let k;t[12]!==b?(k=o.jsx(Y,{variant:"ghost",size:"icon",className:"size-8",onClick:b,"aria-label":"Previous",children:w}),t[12]=b,t[13]=k):k=t[13];let _;t[14]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(pt,{size:16}),t[14]=_):_=t[14];let M;t[15]!==T?(M=o.jsx(Y,{variant:"ghost",size:"icon",className:"size-8",onClick:T,"aria-label":"Next",children:_}),t[15]=T,t[16]=M):M=t[16];const A=ot[s.getMonth()];let E;t[17]!==s?(E=s.getFullYear(),t[17]=s,t[18]=E):E=t[18];let v;t[19]!==A||t[20]!==E?(v=o.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[A," ",E]}),t[19]=A,t[20]=E,t[21]=v):v=t[21];let j;t[22]!==v||t[23]!==k||t[24]!==M?(j=o.jsxs("div",{className:"flex items-center gap-2",children:[f,k,M,v]}),t[22]=v,t[23]=k,t[24]=M,t[25]=j):j=t[25];let D;t[26]!==i||t[27]!==a?(D=i>0&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ft,{id:"show-ongoing",checked:a,onCheckedChange:c}),o.jsxs(dt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:["Show ongoing (",i,")"]})]}),t[26]=i,t[27]=a,t[28]=D):D=t[28];let L;t[29]===Symbol.for("react.memo_cache_sentinel")?(L={value:"calendar",icon:o.jsx(et,{}),label:"Calendar"},t[29]=L):L=t[29];let I;t[30]===Symbol.for("react.memo_cache_sentinel")?(I=[L,{value:"timeline",icon:o.jsx(mt,{}),label:"Timeline"}],t[30]=I):I=t[30];let N;t[31]!==r?(N=o.jsx(xt,{value:r,onValueChange:l,options:I}),t[31]=r,t[32]=N):N=t[32];let R;t[33]!==D||t[34]!==N?(R=o.jsxs("div",{className:"flex items-center gap-4",children:[D,N]}),t[33]=D,t[34]=N,t[35]=R):R=t[35];let $;t[36]!==j||t[37]!==R?($=o.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,R]}),t[36]=j,t[37]=R,t[38]=$):$=t[38];let C;t[39]!==u||t[40]!==s||t[41]!==i||t[42]!==a||t[43]!==d||t[44]!==r?(C=d.length===0?o.jsx(Wt,{hiddenOngoing:a?0:i}):r==="calendar"?o.jsx(Ut,{monthStart:s,variants:d,colorMap:u}):o.jsx(Jt,{monthStart:s,variants:d,colorMap:u}),t[39]=u,t[40]=s,t[41]=i,t[42]=a,t[43]=d,t[44]=r,t[45]=C):C=t[45];let O;return t[46]!==$||t[47]!==C?(O=o.jsxs("div",{className:"flex h-full w-full flex-col",children:[$,C]}),t[46]=$,t[47]=C,t[48]=O):O=t[48],O}function Ft(e){return e.blockKey}function Vt(e){return!e.openEnd}function Ht(e){return e.openEnd}function Bt(){return at(new Date)}function Wt(e){const t=V.c(3),{hiddenOngoing:n}=e,r=n===void 0?0:n;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(et,{size:24,className:"text-muted-foreground/60"}),t[0]=l):l=t[0];let s;return t[1]!==r?(s=o.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[l,r>0?o.jsxs(o.Fragment,{children:[o.jsx("div",{children:"No dated variants in view."}),o.jsxs("div",{className:"text-xs text-muted-foreground/80",children:[r," ongoing"," ",r===1?"variant is":"variants are"," hidden — enable “Show ongoing” to view."]})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{children:"No scheduled variants."}),o.jsx("div",{className:"text-xs text-muted-foreground/80",children:"Variants gated by a date matcher appear here."})]})]}),t[1]=r,t[2]=s):s=t[2],s}const G=20,Z=2,tt=28,zt=6;function Ut(e){const t=V.c(17),{monthStart:n,variants:r,colorMap:l}=e;let s,m,a,c,i;if(t[0]!==l||t[1]!==n||t[2]!==r){const u=Rt(n),x=P(new Date);s=nt,i="flex-1 min-h-0",m="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:$t.map(Gt)}),t[8]=a):a=t[8],c=u.map((h,g)=>{const b=Lt(h,r),y=b.reduce(Yt,0),T=tt+y*(G+Z)+8;return o.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[h.map((f,w)=>{const k=f.getMonth()===n.getMonth(),_=f.getTime()===x.getTime();return o.jsx("div",{className:J("border-r last:border-r-0 px-2 pt-1.5 text-xs",k?"bg-background":"bg-muted/30 text-muted-foreground"),children:o.jsx("span",{className:J("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",_&&"bg-primary text-primary-foreground font-semibold"),children:f.getDate()})},w)}),b.map((f,w)=>{const k=st(l,f.variant.blockKey),_=tt+f.lane*(G+Z),M=f.leftUnits/7*100,A=f.widthUnits/7*100,E=f.variant.openStart&&g===0,v=f.variant.openEnd&&g===u.length-1;return o.jsxs(lt,{variant:f.variant,color:k,fadeStart:E,fadeEnd:v,style:{top:_,left:`calc(${M}% + 2px)`,width:`calc(${A}% - 4px)`,minWidth:zt,height:G},children:[f.variant.blockLabel,f.variant.label!==f.variant.blockLabel&&o.jsxs("span",{className:"opacity-70",children:[" · ",f.variant.label]})]},`${g}-${w}`)})]},g)}),t[0]=l,t[1]=n,t[2]=r,t[3]=s,t[4]=m,t[5]=a,t[6]=c,t[7]=i}else s=t[3],m=t[4],a=t[5],c=t[6],i=t[7];let p;t[9]!==m||t[10]!==a||t[11]!==c?(p=o.jsxs("div",{className:m,children:[a,c]}),t[9]=m,t[10]=a,t[11]=c,t[12]=p):p=t[12];let d;return t[13]!==s||t[14]!==i||t[15]!==p?(d=o.jsx(s,{className:i,children:p}),t[13]=s,t[14]=i,t[15]=p,t[16]=d):d=t[16],d}function Yt(e,t){return Math.max(e,t.lane+1)}function Gt(e){return o.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const B=4,Kt=32,H=240;function Jt(e){const t=V.c(27),{monthStart:n,variants:r,colorMap:l}=e,s=n;let m,a,c,i,p,d;if(t[0]!==l||t[1]!==n||t[2]!==s||t[3]!==r){const h=F(n,B),g=new Date,b=new Map;for(const v of r){const j=b.get(v.blockKey)??[];j.push(v),b.set(v.blockKey,j)}const y=Array.from(b.entries()).sort(Xt),T=h.getTime()-s.getTime(),f=v=>(Math.max(s.getTime(),Math.min(h.getTime(),v.getTime()))-s.getTime())/T*100;let w;t[10]!==s?(w=(v,j)=>F(s,j),t[10]=s,t[11]=w):w=t[11];const k=Array.from({length:B},w),_=g.getTime()>=s.getTime()&&g.getTime()<=h.getTime()?f(g):null;m=nt,d="flex-1 min-h-0",a="min-w-[900px] relative";let M;t[12]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:{width:H},children:"Variant / Block"}),t[12]=M):M=t[12];let A;t[13]===Symbol.for("react.memo_cache_sentinel")?(A={gridTemplateColumns:`repeat(${B}, minmax(0, 1fr))`},t[13]=A):A=t[13];const E=k.map(Qt);t[14]!==E?(c=o.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[M,o.jsx("div",{className:"flex-1 grid",style:A,children:E})]}),t[14]=E,t[15]=c):c=t[15],t[16]!==_?(i=_!==null&&o.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${H}px + (100% - ${H}px) * ${_} / 100)`},children:o.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:"Today"})}),t[16]=_,t[17]=i):i=t[17],p=y.map(v=>{const[j,D]=v,L=st(l,j),I=D[0]?.blockLabel??j;return o.jsxs("div",{children:[o.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:o.jsx("div",{className:"px-3 truncate",style:{width:H},children:I})}),D.map((N,R)=>o.jsxs("div",{className:"flex border-b items-center",style:{height:Kt},children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:H},children:[o.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:L.bg}}),o.jsx("span",{className:"truncate text-foreground/80",children:N.label})]}),o.jsxs("div",{className:"relative flex-1 h-full",children:[o.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${B}, minmax(0, 1fr))`},children:k.map(qt)}),(()=>{const $=Math.max(N.start.getTime(),s.getTime()),C=Math.min(N.end.getTime(),h.getTime());if(C<=$)return null;const O=f(new Date($)),S=f(new Date(C))-O;return o.jsx(lt,{variant:N,color:L,fadeStart:N.openStart,fadeEnd:N.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${O}%`,width:`calc(${S}% - 2px)`,height:22},children:N.label})})()]})]},R))]},j)}),t[0]=l,t[1]=n,t[2]=s,t[3]=r,t[4]=m,t[5]=a,t[6]=c,t[7]=i,t[8]=p,t[9]=d}else m=t[4],a=t[5],c=t[6],i=t[7],p=t[8],d=t[9];let u;t[18]!==a||t[19]!==c||t[20]!==i||t[21]!==p?(u=o.jsxs("div",{className:a,children:[c,i,p]}),t[18]=a,t[19]=c,t[20]=i,t[21]=p,t[22]=u):u=t[22];let x;return t[23]!==m||t[24]!==d||t[25]!==u?(x=o.jsx(m,{className:d,children:u}),t[23]=m,t[24]=d,t[25]=u,t[26]=x):x=t[26],x}function qt(e,t){return o.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function Qt(e,t){return o.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ot[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function Xt(e,t){return e[0].localeCompare(t[0])}export{Jn as VariantCalendar};
|