decocms 4.362.0 → 4.363.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-D4NuvoWF.js → AlertCircle-Df7Uu4Sr.js} +1 -1
- package/dist/client/assets/{AreaChart-D9hVjusk.js → AreaChart-BRLjJaJt.js} +1 -1
- package/dist/client/assets/{ArrowLeft-Crsru-zt.js → ArrowLeft-Ce4LVTaQ.js} +1 -1
- package/dist/client/assets/{ArrowRight-CwW3g0To.js → ArrowRight-CuO69upc.js} +1 -1
- package/dist/client/assets/{ArrowUp-CE0XaPst.js → ArrowUp-DmWBbOjK.js} +1 -1
- package/dist/client/assets/{Check-Dr5PXVFV.js → Check-C1wq38_E.js} +1 -1
- package/dist/client/assets/{CheckCircle-DuLvoNqZ.js → CheckCircle-DWvslkKl.js} +1 -1
- package/dist/client/assets/{ChevronRight-DQ3KAw-I.js → ChevronRight-B76sbAXC.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-PMZDp115.js → ChevronSelectorVertical-C4wJ3zDR.js} +1 -1
- package/dist/client/assets/{ChevronUp--7-Trc-f.js → ChevronUp-B0KEDz5f.js} +1 -1
- package/dist/client/assets/{Copy01-C8ycq1Gx.js → Copy01-rsN5AnPv.js} +1 -1
- package/dist/client/assets/{CreditCard01-D-KFkcCL.js → CreditCard01-Cqs_Biv7.js} +1 -1
- package/dist/client/assets/{DotsVertical-CNAofflT.js → DotsVertical-CBmzJDPB.js} +1 -1
- package/dist/client/assets/{Download01-DKB5sfo3.js → Download01-zZEPtQ0U.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-CN2s2rmB.js → ErrorBarContext-CQj5vlL8.js} +1 -1
- package/dist/client/assets/{Eye-DbSPBsRj.js → Eye-DFgd5114.js} +1 -1
- package/dist/client/assets/{GitBranch01-5T0_iaaf.js → GitBranch01-B7iymaqC.js} +1 -1
- package/dist/client/assets/{Globe01-BKjZm6l_.js → Globe01-Df6dZmsR.js} +1 -1
- package/dist/client/assets/{HardDrive-Dj7xHhpl.js → HardDrive-CiahcooN.js} +1 -1
- package/dist/client/assets/{Image01-BQnSt7zb.js → Image01-CMpSR3RQ.js} +1 -1
- package/dist/client/assets/{Key01-D57xvqGH.js → Key01-t3bX5YI3.js} +1 -1
- package/dist/client/assets/{Link01-C9WOmTZf.js → Link01-pX5C3rEv.js} +1 -1
- package/dist/client/assets/{LinkExternal01-D5AszrfH.js → LinkExternal01-CzRiacvQ.js} +1 -1
- package/dist/client/assets/{Monitor01-AZBV0Kfj.js → Monitor01-jzbehxNG.js} +1 -1
- package/dist/client/assets/{Package-Clxh7ot3.js → Package-CiAH049d.js} +1 -1
- package/dist/client/assets/{Palette-CtewWm3m.js → Palette-CmMvG40G.js} +1 -1
- package/dist/client/assets/{Play-BpAIVQBv.js → Play-k9_JCuZW.js} +1 -1
- package/dist/client/assets/{Plus-ItHVPkbK.js → Plus-Bac7Bl-V.js} +1 -1
- package/dist/client/assets/{SearchLg-CM7dyzZH.js → SearchLg-iYej-M-S.js} +1 -1
- package/dist/client/assets/{SearchMd-BMT9SPzv.js → SearchMd-hxPQERkg.js} +1 -1
- package/dist/client/assets/{Sector-D7CcfR9e.js → Sector-CD1ykt0B.js} +1 -1
- package/dist/client/assets/{Settings02-CaRMlhts.js → Settings02-t15FjJbr.js} +1 -1
- package/dist/client/assets/{Share07-Bqjrc_Dp.js → Share07-CJrTonmW.js} +1 -1
- package/dist/client/assets/{Shield01-n9IgLqRT.js → Shield01-DS-tpugO.js} +1 -1
- package/dist/client/assets/{Stars01-BBKM6KGw.js → Stars01-ByE0-f1z.js} +1 -1
- package/dist/client/assets/{Sun-D001M5nI.js → Sun-vdviKSpi.js} +1 -1
- package/dist/client/assets/{Tool01-B3Urh0ia.js → Tool01-CmpQe3MS.js} +1 -1
- package/dist/client/assets/{Tool02-CHSvTEdf.js → Tool02-BAA6OFl0.js} +1 -1
- package/dist/client/assets/{Trash01-PyL_fMv9.js → Trash01-C6vCLvEw.js} +1 -1
- package/dist/client/assets/{TrendUp01-BJ3iMwlw.js → TrendUp01-fHRYAiew.js} +1 -1
- package/dist/client/assets/{Upload01-D-aUPc1o.js → Upload01-lE597uPz.js} +1 -1
- package/dist/client/assets/{User01-B_C1ZTyQ.js → User01-BPodfm7s.js} +1 -1
- package/dist/client/assets/{UserSquare-CvMDO_ZO.js → UserSquare-CXhk4rLY.js} +1 -1
- package/dist/client/assets/{Users01-i0DLC5lP.js → Users01-Dgbd4CM_.js} +1 -1
- package/dist/client/assets/{Users03-CYnDP3qH.js → Users03-B4Km0_9u.js} +1 -1
- package/dist/client/assets/{XCircle-ChtZovJc.js → XCircle-BK1898xU.js} +1 -1
- package/dist/client/assets/{XClose-DsVxNFfh.js → XClose-DvenHyNp.js} +1 -1
- package/dist/client/assets/{Zap-DA8trGp5.js → Zap-nPZGKdXf.js} +1 -1
- package/dist/client/assets/{ZoomOut-DNkO_pWo.js → ZoomOut-DhJWoynj.js} +1 -1
- package/dist/client/assets/{access-gate-DAl73Zl2.js → access-gate-OgewzCmd.js} +1 -1
- package/dist/client/assets/{agent-icon-WARhM7M2.js → agent-icon-6EllA70W.js} +1 -1
- package/dist/client/assets/{agents-list-Ds_XjA_4.js → agents-list-BY0vT0Wn.js} +1 -1
- package/dist/client/assets/{ai-providers-N9ENYWwN.js → ai-providers-vUA1qSht.js} +1 -1
- package/dist/client/assets/{alert-jqVvdehT.js → alert-D8igu3TO.js} +1 -1
- package/dist/client/assets/{alert-dialog-CaVjuOTA.js → alert-dialog-CFCsKBpN.js} +1 -1
- package/dist/client/assets/{analytics-tab-BfTj7u-S.js → analytics-tab-Do-IciVD.js} +1 -1
- package/dist/client/assets/{api-keys-BybjToyv.js → api-keys-BIjM5sVA.js} +1 -1
- package/dist/client/assets/api-keys-pPtOUmL_.js +1 -0
- package/dist/client/assets/{app-editor-wNzSmN7g.js → app-editor-CSGywsTY.js} +1 -1
- package/dist/client/assets/{auth-5paz2QAy.js → auth-DeD0YpKg.js} +1 -1
- package/dist/client/assets/{auth-catchall-CIsnW36B.js → auth-catchall-E5QBtigN.js} +1 -1
- package/dist/client/assets/{auth-entry-5d_-zxd2.js → auth-entry-C91RF11H.js} +1 -1
- package/dist/client/assets/{auth-split-layout-e2oB7hQo.js → auth-split-layout-BFF9n_Qv.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DJ7TJH5a.js → authenticate-and-persist-oauth-6UYdTwrd.js} +1 -1
- package/dist/client/assets/{automation-list-row-B4KH_FM2.js → automation-list-row-Ba1cMA4W.js} +1 -1
- package/dist/client/assets/{automation-runs-xlurwpxY.js → automation-runs-CoIkXCsB.js} +1 -1
- package/dist/client/assets/{automations-B2sAEhYo.js → automations-CJ2EIlox.js} +1 -1
- package/dist/client/assets/{autosend-Bvrla74y.js → autosend-DI1ZpOT0.js} +1 -1
- package/dist/client/assets/{avatar-bR8EiQIx.js → avatar-CfO1mReu.js} +1 -1
- package/dist/client/assets/{badge-By_bksNf.js → badge-GP_pc1i_.js} +1 -1
- package/dist/client/assets/{block-document-dZN1Xc_e.js → block-document-B_vPvGLi.js} +1 -1
- package/dist/client/assets/{breadcrumb-eMqpAKkg.js → breadcrumb-CAKgWNOZ.js} +1 -1
- package/dist/client/assets/{buckets-CujsT489.js → buckets-BeX-azQt.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-COlkC-_i.js → bulk-category-panel-BenSOwl7.js} +1 -1
- package/dist/client/assets/{capability-load-error-ChEhHT5B.js → capability-load-error-BoR9RbMs.js} +1 -1
- package/dist/client/assets/{cards-CXYuNEAz.js → cards-m7YgOjsz.js} +1 -1
- package/dist/client/assets/{category-editor-DvM9a003.js → category-editor-iK-flfht.js} +1 -1
- package/dist/client/assets/{cdn-tab-CiuUtcC3.js → cdn-tab-Ck8xjhCA.js} +1 -1
- package/dist/client/assets/{chart-BARIzgFt.js → chart-BanyRqbL.js} +1 -1
- package/dist/client/assets/{chat-context-DUhIY1vi.js → chat-context-C6UT7ht1.js} +1 -1
- package/dist/client/assets/{checkbox-CsdUeGbl.js → checkbox-ZsR1Bced.js} +1 -1
- package/dist/client/assets/{choose-editor-CGFebAME.js → choose-editor-B8v8x2gP.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CkHl--GH.js → cli-auth-success-sB1yOlRg.js} +1 -1
- package/dist/client/assets/{client-icons-aUBb1SVV.js → client-icons-DHLFDmNu.js} +1 -1
- package/dist/client/assets/{collection-detail-BEM0Yh7O.js → collection-detail-CZicQp0E.js} +1 -1
- package/dist/client/assets/{collection-display-button-WEUaSDxl.js → collection-display-button-BiBiEJPp.js} +1 -1
- package/dist/client/assets/{collection-search-BxDajREA.js → collection-search-7NUVJQfN.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Bd903CQJ.js → collection-table-wrapper-D0kCJcbB.js} +1 -1
- package/dist/client/assets/{collection-tabs-DhsuK8J7.js → collection-tabs-MvaIz7gt.js} +1 -1
- package/dist/client/assets/{command-oGPXXyFx.js → command-CF7nzIN2.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CSRr8SWS.js → commerce-onboarding-DKWZMrBI.js} +1 -1
- package/dist/client/assets/{connect-D7BX2V6s.js → connect-G-ytX-wq.js} +1 -1
- package/dist/client/assets/{connect-layout-DtPpA6mQ.js → connect-layout-BLwdQBWt.js} +1 -1
- package/dist/client/assets/{connection-B7uvnVAy.js → connection-D885aDuM.js} +1 -1
- package/dist/client/assets/{connection-card-02FESqWH.js → connection-card-Nc1w-XCq.js} +1 -1
- package/dist/client/assets/{connection-detail-jDxoRiuu.js → connection-detail-BboxJXTl.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Do3Fl1Ot.js → connection-form-helpers-B4IwDJJQ.js} +1 -1
- package/dist/client/assets/{connections-CknzPAKv.js → connections-H_c0ER6v.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CqTZz8UB.js → create-organization-dialog-gO5G25gp.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-B7r8i7-b.js → decopilot-sse-pool-Bm_3HC4t.js} +1 -1
- package/dist/client/assets/{dialog-BKxFfNHJ.js → dialog-CyDGwxcX.js} +1 -1
- package/dist/client/assets/{domain-settings-qwM3T6LI.js → domain-settings-Cx6UibuZ.js} +1 -1
- package/dist/client/assets/{drawer-nL9pyZUk.js → drawer-CqSEztKC.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BPwOHqUK.js → dropdown-menu-CgwRqOnX.js} +1 -1
- package/dist/client/assets/{e2e-tab-BXcWXchI.js → e2e-tab-DbA_PByD.js} +1 -1
- package/dist/client/assets/{editor-D6b33Kp6.js → editor-D7S6MtwI.js} +1 -1
- package/dist/client/assets/{empty-state-C0ObmmPq.js → empty-state-DfBha5W6.js} +1 -1
- package/dist/client/assets/{empty-state-CbrQclh4.js → empty-state-SN5mEPhX.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BAAFx1zB.js → extract-connection-data-DkL3Oqhk.js} +1 -1
- package/dist/client/assets/{file-explorer-C3y910g-.js → file-explorer-paPAvOUA.js} +1 -1
- package/dist/client/assets/{file-type-icon-Cv9Au12Q.js → file-type-icon--TvA6C0i.js} +1 -1
- package/dist/client/assets/{folder-icon-BZl6dN4h.js → folder-icon-C46JPU0-.js} +1 -1
- package/dist/client/assets/{form-2ui1swsD.js → form-BnUN8JhF.js} +1 -1
- package/dist/client/assets/{general-BcCdMWJs.js → general-DhiseHhA.js} +1 -1
- package/dist/client/assets/{github-icon-Dp3f4rNP.js → github-icon-7BmoW2Y2.js} +1 -1
- package/dist/client/assets/{hooks-CD4utilj.js → hooks-Bv30myGB.js} +1 -1
- package/dist/client/assets/{index-DfoDjjAA.js → index-9Wn-1DpE.js} +1 -1
- package/dist/client/assets/{index-SrUwf1Ba.js → index-BEyFhSeZ.js} +6 -6
- package/dist/client/assets/{index-Cj7oCSuC.js → index-B_j4TgZF.js} +1 -1
- package/dist/client/assets/{index-D7-hSjOp.js → index-C2fs5Fhc.js} +1 -1
- package/dist/client/assets/{index-BYjLUKTi.js → index-Cf5RfBo5.js} +1 -1
- package/dist/client/assets/{index-h3OZsv9i.js → index-CnV8Y6tV.js} +1 -1
- package/dist/client/assets/{index-JpslP_qS.js → index-DD_a39Sy.js} +1 -1
- package/dist/client/assets/{index-LaRjWpFJ.js → index-DHHqS3nT.js} +1 -1
- package/dist/client/assets/{index-i7rdTwSq.js → index-DR6uwZdc.js} +1 -1
- package/dist/client/assets/{index-BBglL91g.js → index-I7v7d4v2.js} +1 -1
- package/dist/client/assets/{index-DbI2Hv2w.js → index-SmsG_b1w.js} +1 -1
- package/dist/client/assets/{index-redirect-NfAxqUQL.js → index-redirect-C3gwJ6Fh.js} +1 -1
- package/dist/client/assets/{index-CVgPrRAu.js → index-y6Z5iMfg.js} +2 -2
- package/dist/client/assets/{infiniteQueryObserver-BiLjJICa.js → infiniteQueryObserver-CvFtTJPb.js} +1 -1
- package/dist/client/assets/{infra-billing-qLfx8zKm.js → infra-billing-Ch_WWq-u.js} +1 -1
- package/dist/client/assets/{input-CHsDtwWV.js → input-DRjCNSPN.js} +1 -1
- package/dist/client/assets/{integration-icon-Dn1NYpCz.js → integration-icon-CFGOsRgH.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-wvsrz2Q7.js → invite-member-dialog-qtYgFNfF.js} +1 -1
- package/dist/client/assets/{label-eEghsgAb.js → label-DGsSvY2I.js} +1 -1
- package/dist/client/assets/{layout-D7ynLVKO.js → layout-C7iOarOb.js} +1 -1
- package/dist/client/assets/{login-BBcJFURc.js → login-B4RHcX-Z.js} +1 -1
- package/dist/client/assets/{markdown-CLDluQaT.js → markdown-Y6owwpHy.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-B4tmwKSu.js → mcp-app-renderer-Cy31bAY0.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DTC0gHPR.js → mcp-oauth-Bm9ijvfC.js} +1 -1
- package/dist/client/assets/{members-C4gmjQhy.js → members-ypEfbto9.js} +1 -1
- package/dist/client/assets/{monaco-editor-DiA7Y8Jp.js → monaco-editor-D3QSLeam.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CaQrcEmq.js → monitoring-stats-row--wR3KC6f.js} +1 -1
- package/dist/client/assets/{multi-select-BkOxj3ov.js → multi-select-kzt94BG4.js} +1 -1
- package/dist/client/assets/{oauth-callback-BPd_sQVy.js → oauth-callback-CsYpPVhX.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BQKu7zD0.js → oauth-callback-ai-provider-CkroR0wl.js} +1 -1
- package/dist/client/assets/{onboarding-BJ_ns7qX.js → onboarding-DN_VeGxV.js} +1 -1
- package/dist/client/assets/{org-layout-BwMmAJfR.js → org-layout-DzsJ720P.js} +1 -1
- package/dist/client/assets/{organization-choice-BvHglAm0.js → organization-choice-Bugd-m5W.js} +1 -1
- package/dist/client/assets/{orgs-C_BOLG6a.js → orgs-Bv7LuXwC.js} +1 -1
- package/dist/client/assets/{page-seo-form-BNsMvTQk.js → page-seo-form-DPrfWQ94.js} +1 -1
- package/dist/client/assets/{popover-DynDf0Y2.js → popover-DrJcYe9C.js} +1 -1
- package/dist/client/assets/{post-calendar-u57HdUd0.js → post-calendar-DyncB6BE.js} +1 -1
- package/dist/client/assets/{post-editor-C25p-zKu.js → post-editor-FfaApBeX.js} +1 -1
- package/dist/client/assets/{primitives-B1r2rfKZ.js → primitives-DZEMS67c.js} +1 -1
- package/dist/client/assets/{profile-aCtFkIP8.js → profile-Bs-irLLH.js} +1 -1
- package/dist/client/assets/{project-app-view-BRfCXTCA.js → project-app-view-C1W5Uv5V.js} +1 -1
- package/dist/client/assets/{project-icon-gggHkzMG.js → project-icon-DQTfNALl.js} +1 -1
- package/dist/client/assets/{prompts-CIw6eJ0v.js → prompts-wjQ-EFKj.js} +1 -1
- package/dist/client/assets/record-editor-DaGE-E4Q.js +1 -0
- package/dist/client/assets/redirect-editor-BgylW9YL.js +1 -0
- package/dist/client/assets/registry-YIdSAHGV.js +2 -0
- package/dist/client/assets/{registry-layout-Cr-MMVN3.js → registry-layout-DHYm94rU.js} +1 -1
- package/dist/client/assets/{reports-Br0pq8t5.js → reports-D4elpaqK.js} +1 -1
- package/dist/client/assets/{repositories-DVTi9Kwt.js → repositories-3ia_V4sE.js} +1 -1
- package/dist/client/assets/{repository-import-picker-wHQKR8Kw.js → repository-import-picker-DN9Nn9yd.js} +1 -1
- package/dist/client/assets/{repository-picker-D3OBdHwL.js → repository-picker-s01uE4_E.js} +1 -1
- package/dist/client/assets/{require-capability-DkU4FWOX.js → require-capability-BVMwcBeZ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-OhBecawP.js → required-auth-layout-mSUodrzA.js} +1 -1
- package/dist/client/assets/{reset-password-DOJCzDSl.js → reset-password-B_-cD_PK.js} +1 -1
- package/dist/client/assets/{review-settings-ChEMWHBQ.js → review-settings-BN9py8rz.js} +1 -1
- package/dist/client/assets/roles-CGT8NKA4.js +1 -0
- package/dist/client/assets/{schema-CKRAjfV3.js → schema-BDy_4D7A.js} +1 -1
- package/dist/client/assets/{scroll-area-BLzS-vgd.js → scroll-area-C18Y2v3L.js} +1 -1
- package/dist/client/assets/{search-input-DUNiddyY.js → search-input-L0lrukmF.js} +1 -1
- package/dist/client/assets/{secrets-B13mykI_.js → secrets-CdpkfmHa.js} +1 -1
- package/dist/client/assets/{sections-editor-DmIhdm8M.js → sections-editor-BIoyRz1G.js} +1 -1
- package/dist/client/assets/{select-BGVsYDSA.js → select-BGnwGqnU.js} +1 -1
- package/dist/client/assets/{select-model-muziHS9O.js → select-model-BNDe5FJr.js} +1 -1
- package/dist/client/assets/{self-tool-result-D4msOfWc.js → self-tool-result-DM7xixxP.js} +1 -1
- package/dist/client/assets/{seo-editor-B656h6Cg.js → seo-editor-EIeTDSnb.js} +1 -1
- package/dist/client/assets/settings-layout-CwJp96nZ.js +1 -0
- package/dist/client/assets/{settings-sidebar-BENAKAud.js → settings-sidebar-BvIIdmkC.js} +1 -1
- package/dist/client/assets/{shell-controls-DHSX7Oie.js → shell-controls-nVElTnLJ.js} +1 -1
- package/dist/client/assets/{shell-layout-1uU5_7BX.js → shell-layout-CTNVA2t4.js} +1 -1
- package/dist/client/assets/{skill-preview-o9AQ2UPW.js → skill-preview-BswJw8Eb.js} +1 -1
- package/dist/client/assets/{skills-D5zdkTx0.js → skills-DXWVIfB4.js} +1 -1
- package/dist/client/assets/{sso-_8FGqmaq.js → sso-CVpMpJ2m.js} +1 -1
- package/dist/client/assets/{store-DxG9gdXY.js → store-BUUS-eER.js} +1 -1
- package/dist/client/assets/store-registry-DxfEOZiI.js +2 -0
- package/dist/client/assets/{switch-DuHhcJev.js → switch-CPLM-IZy.js} +1 -1
- package/dist/client/assets/{synced-repos-BtnEXIEk.js → synced-repos-Bl-1vG4K.js} +1 -1
- package/dist/client/assets/{table-B66a0gGd.js → table-DSIbUmyY.js} +1 -1
- package/dist/client/assets/{tabs-_02ZWusW.js → tabs-BVFMEVzk.js} +1 -1
- package/dist/client/assets/{task-board-ByqLYcCu.js → task-board-By8eCqZc.js} +1 -1
- package/dist/client/assets/{task-route-hsiwBWRZ.js → task-route-B8aecmdq.js} +1 -1
- package/dist/client/assets/{tasks-EvBLDy3C.js → tasks-kFCSziTb.js} +1 -1
- package/dist/client/assets/{textarea-C9uMkekO.js → textarea-CuF3aDTE.js} +1 -1
- package/dist/client/assets/{thread-intent-BiDrvdHg.js → thread-intent-q_RVjRN0.js} +1 -1
- package/dist/client/assets/{thread-route-D8Eq3R6j.js → thread-route-jI9qvJe_.js} +1 -1
- package/dist/client/assets/{toggle-group-myzsC-Lp.js → toggle-group-WfRpP-dB.js} +1 -1
- package/dist/client/assets/{toolbar-XLAZ4nIL.js → toolbar-B5cewwJb.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DtvUaK_c.js → toolbar-icon-button-BtBUZ8nA.js} +1 -1
- package/dist/client/assets/{track-tHAt17X6.js → track-BYunSel2.js} +1 -1
- package/dist/client/assets/{types-CuWNS8vt.js → types-BB_Up-3A.js} +1 -1
- package/dist/client/assets/{use-ai-providers-D_JedBy2.js → use-ai-providers-BMexfNaB.js} +1 -1
- package/dist/client/assets/{use-automations-C6jbYtnf.js → use-automations-BgzAjzua.js} +1 -1
- package/dist/client/assets/{use-autosave-CoYYA6m6.js → use-autosave-D70NA0HD.js} +1 -1
- package/dist/client/assets/{use-connection-C1ecoleA.js → use-connection-ClORxmw4.js} +1 -1
- package/dist/client/assets/{use-copy-BTelEbhT.js → use-copy-DUxpBqXm.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-B61uI4_6.js → use-create-virtual-mcp-DBeldBRq.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BCKbIA7e.js → use-date-fns-locale-40K6SzJD.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CG8BVYzb.js → use-debounced-autosave-kf66WQZj.js} +1 -1
- package/dist/client/assets/{use-debounced-value-sSKOFDpK.js → use-debounced-value-v41IOreQ.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-srvX3vGm.js → use-decopilot-events-C0NWoSQc.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BDAP12He.js → use-delete-connection-qmqqgsKa.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DXV8y9Nh.js → use-deployment-admin-C7c9x0vv.js} +1 -1
- package/dist/client/assets/{use-destination-route-fVj57v1h.js → use-destination-route-CY15sZqw.js} +1 -1
- package/dist/client/assets/{use-file-configs-SZklVed1.js → use-file-configs-Dm3fOdMk.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CmFvAp0p.js → use-infinite-scroll-Bw5rNIGx.js} +1 -1
- package/dist/client/assets/{use-join-requests-CevmG6yf.js → use-join-requests-DbtrL0Pl.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DrwYsNoW.js → use-mcp-auth-status-kHe3lJRg.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DZ5gIGKb.js → use-mcp-client-Cw1fcLqm.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BBEL6YyI.js → use-mcp-prompts-CtjkJFfg.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DxC2B6PA.js → use-mcp-tools-DRBItGTD.js} +1 -1
- package/dist/client/assets/{use-members-B-Y4lNam.js → use-members-C23rfxcZ.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-aR3BeJQ6.js → use-navigate-to-agent-COVw0ub8.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Bbec5sHg.js → use-org-auth-client-DvlpnDFO.js} +1 -1
- package/dist/client/assets/{use-org-notice-jGCEZdyy.js → use-org-notice-DlsdC1WA.js} +1 -1
- package/dist/client/assets/{use-org-sso-6s1RthKS.js → use-org-sso-xd-5IiLc.js} +1 -1
- package/dist/client/assets/{use-organization-roles-z_F4y8Y9.js → use-organization-roles-B3neE_6D.js} +1 -1
- package/dist/client/assets/{use-organization-settings-B1MpzKFj.js → use-organization-settings-DucmPYOE.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-C8j4-ljJ.js → use-panel-navigate-C6Ga2vR8.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BWopj3Tx.js → use-registry-connections-DBp-MS3e.js} +1 -1
- package/dist/client/assets/{use-secrets-fOwwXRc4.js → use-secrets-PkTonlJ_.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-CsObqeNI.js → use-section-preview-base-B4s2_IK6.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Dbq0lvbe.js → use-status-sounds-C-6LEj0t.js} +1 -1
- package/dist/client/assets/{use-tags-CWFm6kXB.js → use-tags-BuxETA7b.js} +1 -1
- package/dist/client/assets/{use-view-mode-BBNo8GIm.js → use-view-mode-BGsTNFK8.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CiaAtDR5.js → use-virtual-mcp-Bnfc4yEo.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DThUrotQ.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-Dsg0_SX3.js +1 -0
- package/dist/client/assets/{users-CsTqlTR0.js → users-CuqlxLsH.js} +1 -1
- package/dist/client/assets/{variant-calendar-DEwH1kCM.js → variant-calendar-BhJlQ5r6.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-D3_8gJvE.js → view-mode-toggle-BlEO3gFJ.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +764 -663
- package/dist/server/migrate.js +314 -213
- package/dist/server/server.js +420 -420
- package/package.json +1 -1
- package/dist/client/assets/api-keys-CQDdYZVX.js +0 -1
- package/dist/client/assets/record-editor-N3NtWbcx.js +0 -1
- package/dist/client/assets/redirect-editor-rd1042zn.js +0 -1
- package/dist/client/assets/registry-Dgy_-6F7.js +0 -2
- package/dist/client/assets/roles-BsJdJQ0M.js +0 -1
- package/dist/client/assets/settings-layout-C76G79MQ.js +0 -1
- package/dist/client/assets/store-registry-BPKRFlOD.js +0 -2
- package/dist/client/assets/useInfiniteQuery-Cu_EdRgj.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BJrugfeG.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cx as _}from"./index-
|
|
1
|
+
import{cx as _}from"./index-y6Z5iMfg.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),v=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case v:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var x;function C(){return x||(x=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as he,r as ce,d as ms,G as Lt,b as Ke,j as t,B as ge,t as xt,a4 as Ot,a1 as $t,a2 as zt,l as Ve,a7 as us,K as Tt,m as Bt,C as Gs,b6 as Fs,a3 as Qs,bl as Xs,bm as Ws,h as Ys,bo as Os,bn as $s,u as Zs,P as yt,o as ts,E as el}from"./index-
|
|
1
|
+
import{c as he,r as ce,d as ms,G as Lt,b as Ke,j as t,B as ge,t as xt,a4 as Ot,a1 as $t,a2 as zt,l as Ve,a7 as us,K as Tt,m as Bt,C as Gs,b6 as Fs,a3 as Qs,bl as Xs,bm as Ws,h as Ys,bo as Os,bn as $s,u as Zs,P as yt,o as ts,E as el}from"./index-y6Z5iMfg.js";import{S as tl}from"./search-input-L0lrukmF.js";import{E as es}from"./empty-state-DfBha5W6.js";import{R as sl}from"./require-capability-BVMwcBeZ.js";import{az as Ss,ak as ll,aA as rl,aB as Is,aC as It,aD as ss,aE as fs,aF as ol,aG as Ts,aH as il,aI as xs,aJ as zs,aj as nl,aK as al,aL as cl,aM as dl,aw as ml,av as ul}from"./automation-runs-CoIkXCsB.js";import{u as is}from"./use-connection-ClORxmw4.js";import{g as Es}from"./connection-slug-CITJ0kGN.js";import{B as Et}from"./badge-GP_pc1i_.js";import{P as Jt,a as Gt,b as Qt}from"./popover-DrJcYe9C.js";import{i as ls}from"./Check-C1wq38_E.js";import{a as Wt}from"./Copy01-rsN5AnPv.js";import{n as ks}from"./Download01-zZEPtQ0U.js";import{i as ps,n as At}from"./Tool02-BAA6OFl0.js";import{i as fl}from"./Key01-t3bX5YI3.js";import{i as xl}from"./Play-k9_JCuZW.js";import{a$ as pl,a8 as gl,aD as hl,w as vl}from"./agent-icon-6EllA70W.js";import{M as Cs}from"./monaco-editor-D3QSLeam.js";import{a as jl}from"./use-members-C23rfxcZ.js";import{S as Nl,u as bl,W as wl}from"./use-mcp-client-Cw1fcLqm.js";import{a as yl}from"./use-virtual-mcp-Bnfc4yEo.js";import{c as Sl}from"./XClose-DvenHyNp.js";import{s as Il}from"./Plus-Bac7Bl-V.js";import{s as Tl}from"./Trash01-C6vCLvEw.js";import{I as Ht}from"./input-DRjCNSPN.js";import{M as qt}from"./multi-select-kzt94BG4.js";import{b as kt,a as Ct,c as Ee,d as Mt,S as Dt}from"./select-BGnwGqnU.js";import{S as kl}from"./scroll-area-C18Y2v3L.js";import{t as Zt,n as ns}from"./ChevronUp-B0KEDz5f.js";import{T as Cl}from"./textarea-CuF3aDTE.js";import{C as As}from"./collection-tabs-MvaIz7gt.js";import{S as Ml}from"./switch-CPLM-IZy.js";import{L as Dl}from"./label-DGsSvY2I.js";import{I as _t}from"./integration-icon-CFGOsRgH.js";import{A as gs}from"./avatar-CfO1mReu.js";import{A as _l,a as Ll,b as Rl}from"./alert-D8igu3TO.js";import{K as wt}from"./monitoring-stats-row--wR3KC6f.js";import{u as Pl}from"./useSuspenseInfiniteQuery-Dsg0_SX3.js";import{T as Ue,a as Ut,b as hs,c as vs,d as je,e as js}from"./table-DSIbUmyY.js";import{u as Us}from"./use-infinite-scroll-Bw5rNIGx.js";import{u as Fl}from"./useInfiniteQuery-DThUrotQ.js";import{c as Ol,b as $l}from"./use-automations-BgzAjzua.js";import"./SearchMd-hxPQERkg.js";import"./access-gate-OgewzCmd.js";import"./capability-load-error-BoR9RbMs.js";import"./ChevronRight-B76sbAXC.js";import"./AlertCircle-Df7Uu4Sr.js";import"./CheckCircle-DWvslkKl.js";import"./DotsVertical-CBmzJDPB.js";import"./XCircle-BK1898xU.js";import"./Stars01-ByE0-f1z.js";import"./ArrowRight-CuO69upc.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-copy-DUxpBqXm.js";import"./markdown-Y6owwpHy.js";import"./dialog-CyDGwxcX.js";import"./ZoomOut-DhJWoynj.js";import"./use-panel-navigate-C6Ga2vR8.js";import"./use-destination-route-CY15sZqw.js";import"./hooks-Bv30myGB.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-Bm_3HC4t.js";import"./task-board-By8eCqZc.js";import"./schema-BDy_4D7A.js";import"./chat-context-C6UT7ht1.js";import"./autosend-DI1ZpOT0.js";import"./thread-intent-q_RVjRN0.js";import"./slugify-CEUa2lfQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-BMexfNaB.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-C0NWoSQc.js";import"./thread-route-jI9qvJe_.js";import"./use-organization-settings-DucmPYOE.js";import"./mcp-app-renderer-Cy31bAY0.js";import"./types-BB_Up-3A.js";import"./Eye-DFgd5114.js";import"./Tool01-CmpQe3MS.js";import"./Share07-CJrTonmW.js";import"./shell-layout-CTNVA2t4.js";import"./Users03-B4Km0_9u.js";import"./SearchLg-iYej-M-S.js";import"./anchors-yqDzZN4K.js";import"./project-icon-DQTfNALl.js";import"./github-repo-CTPv5ZM2.js";import"./source-system-tabs-CnEGUb4r.js";import"./Monitor01-jzbehxNG.js";import"./Zap-nPZGKdXf.js";import"./Settings02-t15FjJbr.js";import"./command-CF7nzIN2.js";import"./index-B_j4TgZF.js";import"./required-auth-layout-mSUodrzA.js";import"./use-org-sso-xd-5IiLc.js";import"./use-org-notice-DlsdC1WA.js";import"./Image01-CMpSR3RQ.js";import"./LinkExternal01-CzRiacvQ.js";import"./Palette-CmMvG40G.js";import"./use-navigate-to-agent-COVw0ub8.js";import"./Link01-pX5C3rEv.js";import"./use-mcp-prompts-CtjkJFfg.js";import"./form-BnUN8JhF.js";import"./Globe01-Df6dZmsR.js";import"./file-type-icon--TvA6C0i.js";import"./ArrowUp-DmWBbOjK.js";import"./ArrowLeft-Ce4LVTaQ.js";import"./TrendUp01-fHRYAiew.js";import"./ChevronSelectorVertical-C4wJ3zDR.js";import"./UserSquare-CXhk4rLY.js";import"./CreditCard01-Cqs_Biv7.js";import"./GitBranch01-B7iymaqC.js";import"./HardDrive-CiahcooN.js";import"./Sun-vdviKSpi.js";import"./Package-CiAH049d.js";import"./Shield01-DS-tpugO.js";import"./Upload01-lE597uPz.js";import"./User01-BPodfm7s.js";import"./Users01-Dgbd4CM_.js";import"./editor-D7S6MtwI.js";import"./use-org-auth-client-DvlpnDFO.js";import"./auth-DeD0YpKg.js";import"./checkbox-ZsR1Bced.js";import"./chart-BanyRqbL.js";import"./index-CnV8Y6tV.js";import"./AreaChart-BRLjJaJt.js";import"./ErrorBarContext-CQj5vlL8.js";import"./Sector-CD1ykt0B.js";import"./infiniteQueryObserver-CvFtTJPb.js";const as={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},zl=["eq","contains","exists","in"];function El(s){return zl.includes(s)}function St(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),o=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${o}`}).join(",")}function Al(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,o,...a]=e.split(":"),n=l?decodeURIComponent(l):"";if(n.trim())return{key:n,operator:o&&El(o)?o:"eq",value:decodeURIComponent(a.join(":")||"")}}).filter(e=>e!==void 0)}function Yt(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
|
|
2
2
|
`)}function Ms(s){return s.trim()?s.split(`
|
|
3
3
|
`).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[l,...o]=e.split("=");return{key:l||"",operator:"eq",value:o.join("=")}}if(e.includes("~")){const[l,...o]=e.split("~");return{key:l||"",operator:"contains",value:o.join("~")}}if(e.includes("@")){const[l,...o]=e.split("@");return{key:l||"",operator:"in",value:o.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Ul(s){const e={},l={},o=[],a={};for(const n of s)if(n.key.trim())switch(n.operator){case"eq":n.value&&(e[n.key]=n.value);break;case"contains":n.value&&(l[n.key]=`%${n.value}%`);break;case"exists":o.push(n.key);break;case"in":n.value&&(a[n.key]=n.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(l).length>0?l:void 0,propertyKeys:o.length>0?o:void 0,propertyInValues:Object.keys(a).length>0?a:void 0}}function Ds(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};const e=s._decocms_truncated;if(typeof e=="string"&&e.length>0)return{content:e,isTruncated:!0,originalSize:e.length};let l;try{l=JSON.stringify(s,null,2)}catch{return{content:"[Unable to serialize JSON]",isTruncated:!1,originalSize:0}}const o=l.length;return o<=as.maxJsonRenderSize?{content:l,isTruncated:!1,originalSize:o}:{content:l.slice(0,as.maxJsonRenderSize)+`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,bw as L,bu as B,j as d,dv as q,br as x,bv as E,dt as K,bx as C,du as w,cJ as T,bt as _,e4 as U,ee as V}from"./index-
|
|
1
|
+
import{r as s,bw as L,bu as B,j as d,dv as q,br as x,bv as E,dt as K,bx as C,du as w,cJ as T,bt as _,e4 as U,ee as V}from"./index-y6Z5iMfg.js";var I="Radio",[z,P]=_(I),[H,J]=z(I),k=s.forwardRef((t,c)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:a,value:l="on",onCheck:f,form:R,...v}=t,[p,m]=s.useState(null),i=E(c,h=>m(h)),u=s.useRef(!1),b=p?R||!!p.closest("form"):!0;return d.jsxs(H,{scope:o,checked:e,disabled:a,children:[d.jsx(x.button,{type:"button",role:"radio","aria-checked":e,"data-state":A(e),"data-disabled":a?"":void 0,disabled:a,value:l,...v,ref:i,onClick:C(t.onClick,h=>{e||f?.(),b&&(u.current=h.isPropagationStopped(),u.current||h.stopPropagation())})}),b&&d.jsx(S,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:a,form:R,style:{transform:"translateX(-100%)"}})]})});k.displayName=I;var g="RadioIndicator",G=s.forwardRef((t,c)=>{const{__scopeRadio:o,forceMount:n,...e}=t,r=J(g,o);return d.jsx(T,{present:n||r.checked,children:d.jsx(x.span,{"data-state":A(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:c})})});G.displayName=g;var W="RadioBubbleInput",S=s.forwardRef(({__scopeRadio:t,control:c,checked:o,bubbles:n=!0,...e},r)=>{const a=s.useRef(null),l=E(a,r),f=U(o),R=V(c);return s.useEffect(()=>{const v=a.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),d.jsx(x.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});S.displayName=W;function A(t){return t?"checked":"unchecked"}var X=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],y="RadioGroup",[Y]=_(y,[w,P]),j=w(),N=P(),[Q,Z]=Y(y),D=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:a=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=t,i=j(o),u=L(R),[b,h]=B({prop:r,defaultProp:e??null,onChange:p,caller:y});return d.jsx(Q,{scope:o,name:n,required:a,disabled:l,value:b,onValueChange:h,children:d.jsx(q,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:d.jsx(x.div,{role:"radiogroup","aria-required":a,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:c})})})});D.displayName=y;var M="RadioGroupItem",O=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,disabled:n,...e}=t,r=Z(M,o),a=r.disabled||n,l=j(o),f=N(o),R=s.useRef(null),v=E(c,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=b=>{X.includes(b.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),d.jsx(K,{asChild:!0,...l,focusable:!a,active:p,children:d.jsx(k,{disabled:a,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:C(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:C(e.onFocus,()=>{m.current&&R.current?.click()})})})});O.displayName=M;var $="RadioGroupIndicator",F=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,...n}=t,e=N(o);return d.jsx(G,{...e,...n,ref:c})});F.displayName=$;var oe=D,re=O,te=F;export{re as I,oe as R,te as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as ee,j as t,a1 as ns,B as Ie,a2 as is,a4 as ls,l as xt,b as Ae,b8 as dt,b6 as Ps,b1 as vs,t as ce,n as bt,r as Z,e as lt,m as ct,K as Ye,bm as ys,bl as Ss,bn as Ns,bo as Cs,z as Wt,G as Ds,P as Jt,b5 as ws}from"./index-CVgPrRAu.js";import{n as _t}from"./LinkExternal01-D5AszrfH.js";import{be as $s,bf as as,aD as Ls,aY as _s,bg as ks,k as kt,C as Yt,av as Gt,aF as Es}from"./agent-icon-WARhM7M2.js";import{B as Re}from"./badge-By_bksNf.js";import{E as Ze}from"./empty-state-CbrQclh4.js";import{u as Rs}from"./use-virtual-mcp-CiaAtDR5.js";import{r as Fs}from"./site-slug-uya6Wp4-.js";import{i as As}from"./AlertCircle-D4NuvoWF.js";import{d as gt}from"./UserSquare-CvMDO_ZO.js";import{i as zs}from"./Zap-DA8trGp5.js";import{c as os,d as rs,b as cs,f as ms,g as ds,e as fs,a as us,A as hs}from"./alert-dialog-CaVjuOTA.js";import{d as Vs,a as nt,T as Fe,c as Et,e as Rt,b as Ft}from"./table-B66a0gGd.js";import{i as xs}from"./ChevronRight-DQ3KAw-I.js";import{a as Hs}from"./Copy01-C8ycq1Gx.js";import{am as Vt,an as Ht,al as Bs}from"./automation-runs-xlurwpxY.js";import{i as At}from"./Globe01-BKjZm6l_.js";import{s as Pt}from"./Plus-ItHVPkbK.js";import{s as vt}from"./Trash01-PyL_fMv9.js";import{c as yt,d as St,e as Nt,b as Ct,D as Dt}from"./dialog-BKxFfNHJ.js";import{I as it}from"./input-CHsDtwWV.js";import{L as Xe}from"./label-eEghsgAb.js";import{i as Os}from"./Settings02-CaRMlhts.js";import{s as qs}from"./Eye-DbSPBsRj.js";import{a as Bt,b as Ot,c as ft,d as qt,S as Mt}from"./select-BGVsYDSA.js";import{i as Ms}from"./ArrowRight-CwW3g0To.js";import"./Tool01-B3Urh0ia.js";import"./ArrowUp-CE0XaPst.js";import"./ArrowLeft-Crsru-zt.js";import"./Tool02-CHSvTEdf.js";import"./TrendUp01-BJ3iMwlw.js";import"./ZoomOut-DNkO_pWo.js";import"./Users03-CYnDP3qH.js";import"./CheckCircle-DuLvoNqZ.js";import"./Check-Dr5PXVFV.js";import"./ChevronUp--7-Trc-f.js";import"./ChevronSelectorVertical-PMZDp115.js";import"./DotsVertical-CNAofflT.js";import"./CreditCard01-D-KFkcCL.js";import"./Download01-DKB5sfo3.js";import"./Share07-Bqjrc_Dp.js";import"./GitBranch01-5T0_iaaf.js";import"./XClose-DsVxNFfh.js";import"./HardDrive-Dj7xHhpl.js";import"./Image01-BQnSt7zb.js";import"./Key01-D57xvqGH.js";import"./Link01-C9WOmTZf.js";import"./Monitor01-AZBV0Kfj.js";import"./Sun-D001M5nI.js";import"./Package-Clxh7ot3.js";import"./Palette-CtewWm3m.js";import"./Play-BpAIVQBv.js";import"./SearchLg-CM7dyzZH.js";import"./SearchMd-BMT9SPzv.js";import"./Shield01-n9IgLqRT.js";import"./Stars01-BBKM6KGw.js";import"./Upload01-D-aUPc1o.js";import"./User01-B_C1ZTyQ.js";import"./Users01-i0DLC5lP.js";import"./XCircle-ChtZovJc.js";import"./use-mcp-client-DZ5gIGKb.js";import"./auth-5paz2QAy.js";import"./useInfiniteQuery-Cu_EdRgj.js";import"./infiniteQueryObserver-BiLjJICa.js";import"./use-connection-C1ecoleA.js";import"./empty-state-C0ObmmPq.js";import"./use-infinite-scroll-CmFvAp0p.js";import"./use-members-B-Y4lNam.js";import"./use-org-auth-client-Bbec5sHg.js";import"./use-automations-C6jbYtnf.js";import"./useSuspenseInfiniteQuery-BJrugfeG.js";import"./avatar-bR8EiQIx.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-copy-BTelEbhT.js";import"./markdown-CLDluQaT.js";import"./use-panel-navigate-C8j4-ljJ.js";import"./use-destination-route-fVj57v1h.js";import"./hooks-CD4utilj.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-B7r8i7-b.js";import"./task-board-ByqLYcCu.js";import"./schema-CKRAjfV3.js";import"./chat-context-DUhIY1vi.js";import"./autosend-Bvrla74y.js";import"./thread-intent-BiDrvdHg.js";import"./slugify-CEUa2lfQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-D_JedBy2.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-srvX3vGm.js";import"./thread-route-D8Eq3R6j.js";import"./use-organization-settings-B1MpzKFj.js";import"./monaco-editor-DiA7Y8Jp.js";import"./editor-D6b33Kp6.js";import"./mcp-app-renderer-B4tmwKSu.js";import"./types-CuWNS8vt.js";import"./shell-layout-1uU5_7BX.js";import"./anchors-yqDzZN4K.js";import"./project-icon-gggHkzMG.js";import"./github-repo-CTPv5ZM2.js";import"./source-system-tabs-CnEGUb4r.js";import"./command-oGPXXyFx.js";import"./index-Cj7oCSuC.js";import"./integration-icon-Dn1NYpCz.js";import"./required-auth-layout-OhBecawP.js";import"./use-org-sso-6s1RthKS.js";import"./use-org-notice-jGCEZdyy.js";import"./use-navigate-to-agent-aR3BeJQ6.js";import"./use-mcp-prompts-BBEL6YyI.js";import"./form-2ui1swsD.js";import"./file-type-icon-Cv9Au12Q.js";function Lt(r,e){return r.name===e.name&&(r.scope??"runtime")===e.scope}function mt(r,e){if(Array.isArray(r))return r;if(r&&typeof r=="object"){const o=r[e];if(Array.isArray(o))return o}return[]}function zt(r){return r==="deco-deno"?"Deco Deno":r==="deco-tanstack"?"Deco TanStack":r??null}function Is(r){const e=(r??"").toLowerCase();return e.includes("ready")||e.includes("success")||e.includes("active")?"success":e.includes("fail")||e.includes("error")?"destructive":e.includes("build")||e.includes("pend")||e.includes("progress")?"warning":"secondary"}function Xt(r){if(!r)return"—";const e=new Date(r).getTime();if(Number.isNaN(e))return"—";const o=Math.round((Date.now()-e)/1e3),l=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),a=[["year",31536e3],["month",2592e3],["day",86400],["hour",3600],["minute",60]];for(const[i,c]of a)if(Math.abs(o)>=c)return l.format(-Math.round(o/c),i);return l.format(-o,"second")}function Qs(r){if(r==null||!Number.isFinite(r))return"—";if(r<1e3)return`${Math.round(r)}ms`;const e=r/1e3;if(e<60)return`${e.toFixed(e>=10?0:1)}s`;const o=Math.round(e);return`${Math.floor(o/60)}m ${o%60}s`}class It extends Error{constructor(e,o){super(e),this.status=o}status}function jt(r){return r instanceof It&&r.status===401}function rt(r){return r instanceof Error?r.message:String(r)}function Us(r){const e=r.trim();if(!e)return null;const l=(e.endsWith(".")?e.slice(0,-1):e).split(".");if(l.length<2)return"Domain must include a TLD (e.g., example.com)";if(e.length>253)return"Domain name is too long (max 253 characters)";for(const i of l){if(i.length>63)return`Label "${i}" is too long (max 63 characters)`;if(!/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/i.test(i))return`Label "${i}" has invalid characters or format`}const a=l[l.length-1]??"";return/^[0-9]+$/.test(a)?"Domain must include a valid TLD, not a number":null}function gs(r,e){return r&&typeof r=="object"&&"error"in r?String(r.error):`request failed (${e})`}async function Qt(r){const e=await fetch(r),o=await e.json().catch(()=>({}));if(!e.ok)throw new It(gs(o,e.status),e.status);return o}async function at(r,e,o){const l=await fetch(r,{method:e,headers:o!==void 0?{"Content-Type":"application/json"}:{},body:o!==void 0?JSON.stringify(o):void 0}),a=await l.json().catch(()=>({}));if(!l.ok)throw new It(gs(a,l.status),l.status);return a}function et(r){const e=ee.c(19);let o,l,a,i,c,m;e[0]!==r?({label:l,tooltipSide:i,variant:c,size:m,children:o,...a}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=a,e[4]=i,e[5]=c,e[6]=m):(o=e[1],l=e[2],a=e[3],i=e[4],c=e[5],m=e[6]);const s=i===void 0?"top":i,n=c===void 0?"ghost":c,h=m===void 0?"icon-sm":m;let g;e[7]!==o||e[8]!==l||e[9]!==a||e[10]!==h||e[11]!==n?(g=t.jsx(ns,{asChild:!0,children:t.jsx(Ie,{"data-slot":"icon-button","aria-label":l,variant:n,size:h,...a,children:o})}),e[7]=o,e[8]=l,e[9]=a,e[10]=h,e[11]=n,e[12]=g):g=e[12];let d;e[13]!==l||e[14]!==s?(d=t.jsx(is,{side:s,children:l}),e[13]=l,e[14]=s,e[15]=d):d=e[15];let f;return e[16]!==g||e[17]!==d?(f=t.jsxs(ls,{children:[g,d]}),e[16]=g,e[17]=d,e[18]=f):f=e[18],f}function ut(r){const e=ee.c(4),{title:o,actions:l,children:a}=r;let i;return e[0]!==l||e[1]!==a||e[2]!==o?(i=t.jsx(vs,{title:o,actions:l,children:a}),e[0]=l,e[1]=a,e[2]=o,e[3]=i):i=e[3],i}function Qe(r){const e=ee.c(5),{className:o,children:l}=r;let a;e[0]!==o?(a=xt("gap-0 overflow-hidden p-0 divide-y divide-border",o),e[0]=o,e[1]=a):a=e[1];let i;return e[2]!==l||e[3]!==a?(i=t.jsx(Ps,{className:a,children:l}),e[2]=l,e[3]=a,e[4]=i):i=e[4],i}function pt(r){const e=ee.c(5),{className:o,children:l}=r;let a;e[0]!==o?(a=xt("flex min-h-12 items-center gap-3 px-4 py-2",o),e[0]=o,e[1]=a):a=e[1];let i;return e[2]!==l||e[3]!==a?(i=t.jsx("div",{className:a,children:l}),e[2]=l,e[3]=a,e[4]=i):i=e[4],i}function ot(r){const e=ee.c(2),{children:o}=r;let l;return e[0]!==o?(l=t.jsx("p",{className:"px-4 py-6 text-sm text-muted-foreground",children:o}),e[0]=o,e[1]=l):l=e[1],l}function ht(r){const e=ee.c(2),{rows:o}=r,l=o===void 0?3:o;let a;return e[0]!==l?(a=t.jsx(Qe,{children:Array.from({length:l},Ks)}),e[0]=l,e[1]=a):a=e[1],a}function Ks(r,e){return t.jsxs(pt,{children:[t.jsx(dt,{className:"h-4 w-40"}),t.jsx(dt,{className:"h-4 flex-1"}),t.jsx(dt,{className:"size-7 rounded-lg"})]},e)}function Me(r){const e=ee.c(5),{className:o,children:l}=r;let a;e[0]!==o?(a=xt("text-xs font-medium text-muted-foreground",o),e[0]=o,e[1]=a):a=e[1];let i;return e[2]!==l||e[3]!==a?(i=t.jsx(Vs,{className:a,children:l}),e[2]=l,e[3]=a,e[4]=i):i=e[4],i}function Ut(r){const e=ee.c(12),{open:o,onClick:l}=r,a=Ae();let i;e[0]!==o||e[1]!==a?(i=a(o?"mainPanelTabs.hostingTab.hideDetails":"mainPanelTabs.hostingTab.showDetails"),e[0]=o,e[1]=a,e[2]=i):i=e[2];const c=o&&"rotate-90";let m;e[3]!==c?(m=xt("transition-transform duration-200 motion-reduce:transition-none",c),e[3]=c,e[4]=m):m=e[4];let s;e[5]!==m?(s=t.jsx(xs,{className:m}),e[5]=m,e[6]=s):s=e[6];let n;return e[7]!==l||e[8]!==o||e[9]!==i||e[10]!==s?(n=t.jsx(et,{label:i,size:"icon-sm",className:"-ml-1.5 text-muted-foreground","aria-expanded":o,onClick:l,children:s}),e[7]=l,e[8]=o,e[9]=i,e[10]=s,e[11]=n):n=e[11],n}function Ws(r){const e=ee.c(8),{open:o,colSpan:l,children:a}=r;let i;e[0]!==a?(i=t.jsx(Vt,{children:t.jsx("div",{className:"border-b border-border bg-muted/30 px-4 py-3",children:a})}),e[0]=a,e[1]=i):i=e[1];let c;e[2]!==o||e[3]!==i?(c=t.jsx(Ht,{open:o,children:i}),e[2]=o,e[3]=i,e[4]=c):c=e[4];let m;return e[5]!==l||e[6]!==c?(m=t.jsx(nt,{className:"border-0 hover:bg-transparent",children:t.jsx(Fe,{colSpan:l,className:"p-0 whitespace-normal",children:c})}),e[5]=l,e[6]=c,e[7]=m):m=e[7],m}function bs(r){const e=ee.c(5),{open:o,children:l}=r;let a;e[0]!==l?(a=t.jsx(Vt,{children:t.jsx("div",{className:"border-t border-border bg-muted/30 px-4 py-3",children:l})}),e[0]=l,e[1]=a):a=e[1];let i;return e[2]!==o||e[3]!==a?(i=t.jsx(Ht,{open:o,children:a}),e[2]=o,e[3]=a,e[4]=i):i=e[4],i}function ps(r){const e=ee.c(6),{scope:o}=r,l=Ae(),a=o==="build"?"outline":"secondary";let i;e[0]!==o||e[1]!==l?(i=l(o==="build"?"mainPanelTabs.hostingTab.secretScopeBuild":"mainPanelTabs.hostingTab.secretScopeRuntime"),e[0]=o,e[1]=l,e[2]=i):i=e[2];let c;return e[3]!==a||e[4]!==i?(c=t.jsx(Re,{variant:a,children:i}),e[3]=a,e[4]=i,e[5]=c):c=e[5],c}function Js(r){const e=ee.c(9),{value:o}=r,l=Ae();let a;e[0]!==l?(a=l("mainPanelTabs.hostingTab.dnsCopy"),e[0]=l,e[1]=a):a=e[1];let i;e[2]!==l||e[3]!==o?(i=()=>{if(!navigator.clipboard){ce.error(l("mainPanelTabs.hostingTab.dnsCopyError"));return}navigator.clipboard.writeText(o).then(()=>ce.success(l("mainPanelTabs.hostingTab.dnsCopied")),()=>ce.error(l("mainPanelTabs.hostingTab.dnsCopyError")))},e[2]=l,e[3]=o,e[4]=i):i=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Hs,{className:"size-3.5"}),e[5]=c):c=e[5];let m;return e[6]!==a||e[7]!==i?(m=t.jsx(et,{label:a,onClick:i,children:c}),e[6]=a,e[7]=i,e[8]=m):m=e[8],m}function wt(r){const e=ee.c(28),{open:o,onOpenChange:l,title:a,description:i,confirmLabel:c,pending:m,onConfirm:s}=r,n=Ae();let h;e[0]!==a?(h=t.jsx(os,{children:a}),e[0]=a,e[1]=h):h=e[1];let g;e[2]!==i?(g=t.jsx(rs,{children:i}),e[2]=i,e[3]=g):g=e[3];let d;e[4]!==h||e[5]!==g?(d=t.jsxs(cs,{children:[h,g]}),e[4]=h,e[5]=g,e[6]=d):d=e[6];let f;e[7]!==n?(f=n("mainPanelTabs.hostingTab.cancel"),e[7]=n,e[8]=f):f=e[8];let u;e[9]!==m||e[10]!==f?(u=t.jsx(ms,{disabled:m,children:f}),e[9]=m,e[10]=f,e[11]=u):u=e[11];let b;e[12]!==s?(b=S=>{S.preventDefault(),s()},e[12]=s,e[13]=b):b=e[13];let x;e[14]!==c||e[15]!==m||e[16]!==b?(x=t.jsx(ds,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:b,disabled:m,children:c}),e[14]=c,e[15]=m,e[16]=b,e[17]=x):x=e[17];let N;e[18]!==u||e[19]!==x?(N=t.jsxs(fs,{children:[u,x]}),e[18]=u,e[19]=x,e[20]=N):N=e[20];let C;e[21]!==d||e[22]!==N?(C=t.jsxs(us,{children:[d,N]}),e[21]=d,e[22]=N,e[23]=C):C=e[23];let P;return e[24]!==l||e[25]!==o||e[26]!==C?(P=t.jsx(hs,{open:o,onOpenChange:l,children:C}),e[24]=l,e[25]=o,e[26]=C,e[27]=P):P=e[27],P}const Ys=8;function Gs(r){const e=ee.c(54),{base:o,orgSlug:l,site:a}=r,i=Ae(),c=bt(),[m,s]=Z.useState(!1);let n;e[0]!==o?(n=()=>at(`${o}/deploy`,"POST",{mode:"current"}),e[0]=o,e[1]=n):n=e[1];let h;e[2]!==l||e[3]!==c||e[4]!==a||e[5]!==i?(h=()=>{c.invalidateQueries({queryKey:Ye.hostingDeployments(l,a)}),c.invalidateQueries({queryKey:Ye.hostingDeploymentHistory(l,a)}),ce.success(i("mainPanelTabs.hostingTab.toastDeployQueued")),s(!1)},e[2]=l,e[3]=c,e[4]=a,e[5]=i,e[6]=h):h=e[6];let g;e[7]!==n||e[8]!==h?(g={mutationFn:n,onSuccess:h,onError:Xs},e[7]=n,e[8]=h,e[9]=g):g=e[9];const d=lt(g);let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=()=>s(!0),e[10]=f):f=e[10];let u;e[11]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(gt,{}),e[11]=u):u=e[11];let b;e[12]!==d.isPending||e[13]!==i?(b=d.isPending?i("mainPanelTabs.hostingTab.deploying"):i("mainPanelTabs.hostingTab.deploy"),e[12]=d.isPending,e[13]=i,e[14]=b):b=e[14];let x;e[15]!==d.isPending||e[16]!==b?(x=t.jsxs(Ie,{size:"sm",onClick:f,disabled:d.isPending,children:[u,b]}),e[15]=d.isPending,e[16]=b,e[17]=x):x=e[17];let N;e[18]!==i?(N=i("mainPanelTabs.hostingTab.deployConfirmTitle"),e[18]=i,e[19]=N):N=e[19];let C;e[20]!==N?(C=t.jsx(os,{children:N}),e[20]=N,e[21]=C):C=e[21];let P;e[22]!==i?(P=i("mainPanelTabs.hostingTab.deployConfirmDescription"),e[22]=i,e[23]=P):P=e[23];let S;e[24]!==P?(S=t.jsx(rs,{children:P}),e[24]=P,e[25]=S):S=e[25];let y;e[26]!==S||e[27]!==C?(y=t.jsxs(cs,{children:[C,S]}),e[26]=S,e[27]=C,e[28]=y):y=e[28];const R=d.isPending;let w;e[29]!==i?(w=i("mainPanelTabs.hostingTab.cancel"),e[29]=i,e[30]=w):w=e[30];let j;e[31]!==d.isPending||e[32]!==w?(j=t.jsx(ms,{disabled:R,children:w}),e[31]=d.isPending,e[32]=w,e[33]=j):j=e[33];let T;e[34]!==d?(T=_=>{_.preventDefault(),d.mutate()},e[34]=d,e[35]=T):T=e[35];const V=d.isPending;let q;e[36]!==i?(q=i("mainPanelTabs.hostingTab.deploy"),e[36]=i,e[37]=q):q=e[37];let F;e[38]!==d.isPending||e[39]!==T||e[40]!==q?(F=t.jsx(ds,{onClick:T,disabled:V,children:q}),e[38]=d.isPending,e[39]=T,e[40]=q,e[41]=F):F=e[41];let v;e[42]!==j||e[43]!==F?(v=t.jsxs(fs,{children:[j,F]}),e[42]=j,e[43]=F,e[44]=v):v=e[44];let H;e[45]!==y||e[46]!==v?(H=t.jsxs(us,{children:[y,v]}),e[45]=y,e[46]=v,e[47]=H):H=e[47];let A;e[48]!==m||e[49]!==H?(A=t.jsx(hs,{open:m,onOpenChange:s,children:H}),e[48]=m,e[49]=H,e[50]=A):A=e[50];let Q;return e[51]!==A||e[52]!==x?(Q=t.jsxs(t.Fragment,{children:[x,A]}),e[51]=A,e[52]=x,e[53]=Q):Q=e[53],Q}function Xs(r){return ce.error(rt(r))}function Zs(r,e){const o=(r??"").toLowerCase();return o.includes("rollback")?t.jsxs(Re,{variant:"warning",children:[t.jsx(_s,{}),e("mainPanelTabs.hostingTab.actionRollback")]}):o.includes("redeploy")?t.jsxs(Re,{variant:"secondary",children:[t.jsx(ks,{}),e("mainPanelTabs.hostingTab.actionRedeploy")]}):t.jsxs(Re,{variant:"secondary",children:[t.jsx(gt,{}),e("mainPanelTabs.hostingTab.actionDeploy")]})}function en(r,e,o){const l=(r??"").toLowerCase();return l==="build"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(as,{}),o("mainPanelTabs.hostingTab.typeBuild")]}):l==="fast-deploy"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(zs,{}),o("mainPanelTabs.hostingTab.typeFastDeploy")]}):l==="deploy"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(gt,{}),o("mainPanelTabs.hostingTab.typeDeploy")]}):Zs(e,o)}function tn(r,e){const o=(r??"").toLowerCase();return o==="success"?t.jsx(Re,{variant:"success",children:e("mainPanelTabs.hostingTab.outcomeSuccess")}):o==="failure"?t.jsx(Re,{variant:"destructive",children:e("mainPanelTabs.hostingTab.outcomeFailure")}):o==="pending"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(Ls,{}),e("mainPanelTabs.hostingTab.outcomePending")]}):null}function Zt(r){const e=ee.c(7),{commit:o,onClick:l}=r,a=Ae();let i;e[0]!==a?(i=a("mainPanelTabs.hostingTab.buildLogs"),e[0]=a,e[1]=i):i=e[1];const c=!o;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(as,{}),e[2]=m):m=e[2];let s;return e[3]!==l||e[4]!==i||e[5]!==c?(s=t.jsx(et,{label:i,onClick:l,disabled:c,children:m}),e[3]=l,e[4]=i,e[5]=c,e[6]=s):s=e[6],s}function sn(r){const e=ee.c(37),{base:o,orgSlug:l,site:a,target:i,onOpenChange:c}=r,m=Ae(),s=i!=null,n=i?.commit??"",h=i?.env??"";let g;e[0]!==n||e[1]!==h||e[2]!==l||e[3]!==a?(g=Ye.hostingBuildLogs(l,a,n,h),e[0]=n,e[1]=h,e[2]=l,e[3]=a,e[4]=g):g=e[4];let d;e[5]!==o||e[6]!==n||e[7]!==h?(d=()=>Qt(`${o}/deployments/logs?commit=${encodeURIComponent(n)}&env=${encodeURIComponent(h)}`),e[5]=o,e[6]=n,e[7]=h,e[8]=d):d=e[8];const f=s&&!!n;let u;e[9]!==g||e[10]!==d||e[11]!==f?(u={queryKey:g,queryFn:d,enabled:f,retry:!1,staleTime:0,gcTime:0,refetchOnMount:"always"},e[9]=g,e[10]=d,e[11]=f,e[12]=u):u=e[12];const b=ct(u),x=b.data;let N;e[13]!==m?(N=m("mainPanelTabs.hostingTab.buildLogsTitle"),e[13]=m,e[14]=N):N=e[14];let C;e[15]!==N?(C=t.jsx(ys,{children:N}),e[15]=N,e[16]=C):C=e[16];let P;e[17]!==n||e[18]!==m?(P=m("mainPanelTabs.hostingTab.buildLogsCommit",{commit:n.slice(0,7)}),e[17]=n,e[18]=m,e[19]=P):P=e[19];let S;e[20]!==P?(S=t.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:P}),e[20]=P,e[21]=S):S=e[21];let y;e[22]!==C||e[23]!==S?(y=t.jsxs(Ss,{className:"shrink-0 border-b border-border px-5 py-5 md:px-6",children:[C,S]}),e[22]=C,e[23]=S,e[24]=y):y=e[24];let R;e[25]!==x||e[26]!==b.error||e[27]!==b.isLoading||e[28]!==m?(R=t.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-5 md:px-6",children:jt(b.error)?t.jsx(Ze,{icon:t.jsx(kt,{className:"size-5"}),title:m("mainPanelTabs.hostingTab.notConnectedTitle"),description:m("mainPanelTabs.hostingTab.notConnectedDescription")}):b.isLoading?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(dt,{className:"h-4 w-full"}),t.jsx(dt,{className:"h-4 w-full"}),t.jsx(dt,{className:"h-4 w-2/3"})]}):b.error?t.jsx(ot,{children:m("mainPanelTabs.hostingTab.buildLogsError")}):x&&x.configured===!1?t.jsxs("div",{className:"flex flex-col items-center gap-2 rounded-lg border border-border bg-muted/30 px-4 py-8 text-center",children:[t.jsx(As,{className:"size-5 text-muted-foreground"}),t.jsx("p",{className:"text-sm font-medium text-foreground",children:m("mainPanelTabs.hostingTab.buildLogsNotWiredTitle")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:x.reason??m("mainPanelTabs.hostingTab.buildLogsNotWiredDescription")})]}):x?.text?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("pre",{className:"overflow-auto font-mono text-[11px] leading-relaxed text-foreground/80 whitespace-pre-wrap break-words",children:x.text}),x.truncated&&t.jsx("p",{className:"text-xs text-warning",children:m("mainPanelTabs.hostingTab.buildLogsTruncated")}),x.url&&t.jsxs("a",{href:x.url,target:"_blank",rel:"noreferrer",className:"inline-flex w-fit items-center gap-1.5 text-xs text-primary hover:underline",children:[t.jsx(_t,{className:"size-3.5"}),m("mainPanelTabs.hostingTab.buildLogsOpenFull")]})]}):x?.url?t.jsxs("a",{href:x.url,target:"_blank",rel:"noreferrer",className:"inline-flex w-fit items-center gap-1.5 text-sm text-primary hover:underline",children:[t.jsx(_t,{className:"size-4"}),m("mainPanelTabs.hostingTab.buildLogsOpenFull")]}):t.jsx(ot,{children:m("mainPanelTabs.hostingTab.buildLogsEmpty")})}),e[25]=x,e[26]=b.error,e[27]=b.isLoading,e[28]=m,e[29]=R):R=e[29];let w;e[30]!==R||e[31]!==y?(w=t.jsxs(Ns,{className:"flex flex-col gap-0 p-0 sm:max-w-2xl",children:[y,R]}),e[30]=R,e[31]=y,e[32]=w):w=e[32];let j;return e[33]!==c||e[34]!==s||e[35]!==w?(j=t.jsx(Cs,{open:s,onOpenChange:c,children:w}),e[33]=c,e[34]=s,e[35]=w,e[36]=j):j=e[36],j}function nn(r){const e=ee.c(52),{base:o,orgSlug:l,site:a,enabled:i,deployments:c,isLoading:m,error:s}=r,n=Ae(),[h,g]=Z.useState(null),[d,f]=Z.useState(Ys),[u,b]=Z.useState(null);let x;e[0]!==l||e[1]!==a?(x=Ye.hostingDeploymentHistory(l,a),e[0]=l,e[1]=a,e[2]=x):x=e[2];let N;e[3]!==o?(N=()=>Qt(`${o}/deployments/history?limit=50`),e[3]=o,e[4]=N):N=e[4];let C;e[5]!==i||e[6]!==x||e[7]!==N?(C={queryKey:x,queryFn:N,enabled:i,retry:!1,staleTime:3e4},e[5]=i,e[6]=x,e[7]=N,e[8]=C):C=e[8];const P=ct(C);let S,y,R,w;if(e[9]!==c||e[10]!==s||e[11]!==h||e[12]!==d||e[13]!==P.data||e[14]!==P.error||e[15]!==P.isLoading||e[16]!==m||e[17]!==n){const F=mt(P.data,"items"),v=F.slice(0,d),H=F.length-v.length;let A;e[22]!==c?(A=c.find(on)?.commitSha??c.find(an)?.commitSha??null,e[22]=c,e[23]=A):A=e[23];const Q=A;let _;e[24]===Symbol.for("react.memo_cache_sentinel")?(_=(p,I)=>{p&&b({commit:p,env:I??"production"})},e[24]=_):_=e[24];const W=_;let J;e[25]!==n?(J=n("mainPanelTabs.hostingTab.deployments"),e[25]=n,e[26]=J):J=e[26];let U;e[27]!==c||e[28]!==s||e[29]!==h||e[30]!==m||e[31]!==n?(U=m?t.jsx(ht,{}):s?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.deploymentsError")})}):c.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(gt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDeployments"),className:"py-10"})}):t.jsxs(Et,{children:[t.jsx(Rt,{children:t.jsxs(nt,{children:[t.jsx(Me,{className:"pl-4",children:n("mainPanelTabs.hostingTab.colCommit")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colStatus")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colFramework")}),t.jsx(Me,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDuration")}),t.jsx(Me,{className:"text-right",children:n("mainPanelTabs.hostingTab.colUpdated")}),t.jsx(Me,{className:"w-[1%]"})]})}),t.jsx(Ft,{children:c.map(p=>{const I=!!p.buildMessage,Y=h===p.id;return t.jsxs(Z.Fragment,{children:[t.jsxs(nt,{className:xt(I&&"cursor-pointer hover:bg-muted/40"),onClick:I?()=>g(Y?null:p.id):void 0,children:[t.jsx(Fe,{className:"px-4",children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[I?t.jsx(Ut,{open:Y,onClick:()=>g(Y?null:p.id)}):t.jsx($s,{className:"size-4 text-muted-foreground/60"}),t.jsx("span",{className:"font-mono text-xs",children:p.shortCommit??p.commitSha?.slice(0,7)??"—"}),p.production===!0&&t.jsx(Re,{variant:"outline",children:n("mainPanelTabs.hostingTab.production")})]})}),t.jsx(Fe,{children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(Re,{variant:Is(p.phase),children:p.phase??"—"}),p.up===!0&&t.jsx(Re,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),t.jsx(Fe,{className:"text-xs text-muted-foreground",children:zt(p.framework)??"—"}),t.jsx(Fe,{className:"text-right font-mono text-xs text-muted-foreground tabular-nums",children:Qs(p.durationMs)}),t.jsx(Fe,{className:"text-right text-xs text-muted-foreground",children:Xt(p.finishedAt??p.startedAt??p.createdAt)}),t.jsx(Fe,{className:"pr-3 text-right",onClick:ln,children:t.jsx(Zt,{commit:p.commitSha,onClick:()=>W(p.commitSha,p.env)})})]}),I&&t.jsx(Ws,{open:Y,colSpan:6,children:t.jsx("p",{className:"whitespace-pre-wrap break-words font-mono text-xs text-muted-foreground",children:p.buildMessage})})]},p.id)})})]}),e[27]=c,e[28]=s,e[29]=h,e[30]=m,e[31]=n,e[32]=U):U=e[32],e[33]!==U||e[34]!==J?(w=t.jsx(ut,{title:J,children:U}),e[33]=U,e[34]=J,e[35]=w):w=e[35],S=ut,e[36]!==n?(y=n("mainPanelTabs.hostingTab.deployHistory"),e[36]=n,e[37]=y):y=e[37],R=P.isLoading?t.jsx(ht,{}):P.error?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.deployHistoryError")})}):F.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(gt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDeployHistory"),className:"py-10"})}):t.jsxs(Et,{children:[t.jsx(Rt,{children:t.jsxs(nt,{children:[t.jsx(Me,{className:"pl-4",children:n("mainPanelTabs.hostingTab.colAction")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colStatus")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colCommit")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colFramework")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colActor")}),t.jsx(Me,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDate")}),t.jsx(Me,{className:"w-[1%]"})]})}),t.jsxs(Ft,{children:[v.map(p=>{const I=!!Q&&p.commitSha===Q;return t.jsxs(nt,{children:[t.jsx(Fe,{className:"pl-4",children:en(p.type,p.action,n)}),t.jsx(Fe,{children:tn(p.outcome,n)}),t.jsx(Fe,{children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("span",{className:"font-mono text-xs",children:p.commitSha?.slice(0,7)??"—"}),I&&t.jsx(Re,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),t.jsx(Fe,{className:"text-xs text-muted-foreground",children:zt(p.framework)??"—"}),t.jsx(Fe,{className:"text-xs text-muted-foreground",children:p.actor??"—"}),t.jsx(Fe,{className:"text-right text-xs text-muted-foreground",children:Xt(p.createdAt)}),t.jsx(Fe,{className:"pr-3 text-right",children:t.jsx(Zt,{commit:p.commitSha,onClick:()=>W(p.commitSha,p.env)})})]},p.id)}),H>0&&t.jsx(nt,{className:"hover:bg-transparent",children:t.jsx(Fe,{colSpan:7,className:"p-2 text-center",children:t.jsx(Ie,{variant:"ghost",size:"sm",onClick:()=>f(F.length),children:n("mainPanelTabs.hostingTab.showMoreHistory",{count:String(H)})})})})]})]}),e[9]=c,e[10]=s,e[11]=h,e[12]=d,e[13]=P.data,e[14]=P.error,e[15]=P.isLoading,e[16]=m,e[17]=n,e[18]=S,e[19]=y,e[20]=R,e[21]=w}else S=e[18],y=e[19],R=e[20],w=e[21];let j;e[38]!==S||e[39]!==y||e[40]!==R?(j=t.jsx(S,{title:y,children:R}),e[38]=S,e[39]=y,e[40]=R,e[41]=j):j=e[41];let T;e[42]===Symbol.for("react.memo_cache_sentinel")?(T=F=>{F||b(null)},e[42]=T):T=e[42];let V;e[43]!==o||e[44]!==u||e[45]!==l||e[46]!==a?(V=t.jsx(sn,{base:o,orgSlug:l,site:a,target:u,onOpenChange:T}),e[43]=o,e[44]=u,e[45]=l,e[46]=a,e[47]=V):V=e[47];let q;return e[48]!==w||e[49]!==j||e[50]!==V?(q=t.jsxs(t.Fragment,{children:[w,j,V]}),e[48]=w,e[49]=j,e[50]=V,e[51]=q):q=e[51],q}function ln(r){return r.stopPropagation()}function an(r){return r.production===!0&&r.up}function on(r){return r.up===!0}const rn=["16.148.147.194","52.32.122.94","52.35.156.199"];function cn(r){return r.replace(/\.$/,"").split(".").filter(Boolean).length===2}function es(r){const e=r.trim();return e.length>0&&!e.startsWith("/")&&e.includes(".")}function Ts(r){const e=ee.c(24),{records:o}=r,l=Ae();let a;e[0]!==l?(a=l("mainPanelTabs.hostingTab.dnsColType"),e[0]=l,e[1]=a):a=e[1];let i;e[2]!==a?(i=t.jsx(Me,{className:"w-16",children:a}),e[2]=a,e[3]=i):i=e[3];let c;e[4]!==l?(c=l("mainPanelTabs.hostingTab.dnsColName"),e[4]=l,e[5]=c):c=e[5];let m;e[6]!==c?(m=t.jsx(Me,{children:c}),e[6]=c,e[7]=m):m=e[7];let s;e[8]!==l?(s=l("mainPanelTabs.hostingTab.dnsColValue"),e[8]=l,e[9]=s):s=e[9];let n;e[10]!==s?(n=t.jsx(Me,{children:s}),e[10]=s,e[11]=n):n=e[11];let h;e[12]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(Me,{className:"w-10"}),e[12]=h):h=e[12];let g;e[13]!==i||e[14]!==m||e[15]!==n?(g=t.jsx(Rt,{children:t.jsxs(nt,{children:[i,m,n,h]})}),e[13]=i,e[14]=m,e[15]=n,e[16]=g):g=e[16];let d;e[17]!==o?(d=o.map(mn),e[17]=o,e[18]=d):d=e[18];let f;e[19]!==d?(f=t.jsx(Ft,{children:d}),e[19]=d,e[20]=f):f=e[20];let u;return e[21]!==f||e[22]!==g?(u=t.jsxs(Et,{className:"table-fixed",children:[g,f]}),e[21]=f,e[22]=g,e[23]=u):u=e[23],u}function mn(r){return t.jsxs(nt,{children:[t.jsx(Fe,{className:"font-mono text-xs",children:r.type}),t.jsx(Fe,{className:"break-all whitespace-normal font-mono text-xs",children:r.name}),t.jsx(Fe,{className:"break-all whitespace-normal font-mono text-xs text-muted-foreground",children:r.value}),t.jsx(Fe,{className:"text-right",children:t.jsx(Js,{value:r.value})})]},`${r.type}-${r.name}-${r.value}`)}function js(r){const e=ee.c(14),{status:o,children:l}=r,a=Ae();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(At,{className:"size-4 text-muted-foreground"}),e[0]=i):i=e[0];let c;e[1]!==a?(c=a("mainPanelTabs.hostingTab.dnsSetupTitle"),e[1]=a,e[2]=c):c=e[2];let m;e[3]!==c?(m=t.jsx("span",{className:"text-sm font-medium",children:c}),e[3]=c,e[4]=m):m=e[4];let s;e[5]!==o||e[6]!==a?(s=o&&t.jsx(Re,{variant:o.active?"success":"outline",className:"ml-auto",children:o.active?a("mainPanelTabs.hostingTab.dnsActive"):a("mainPanelTabs.hostingTab.dnsAwaiting")}),e[5]=o,e[6]=a,e[7]=s):s=e[7];let n;e[8]!==m||e[9]!==s?(n=t.jsxs("div",{className:"flex items-center gap-2",children:[i,m,s]}),e[8]=m,e[9]=s,e[10]=n):n=e[10];let h;return e[11]!==l||e[12]!==n?(h=t.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[n,l]}),e[11]=l,e[12]=n,e[13]=h):h=e[13],h}function ts(r){const e=ee.c(21),{from:o,source:l}=r,a=Ae();let i,c,m,s,n;if(e[0]!==o||e[1]!==l||e[2]!==a){const d=o.trim().replace(/\.$/,""),f=d?cn(d)?"@":d:"@",u=l==="both";c=js,e[8]!==u?(s={active:u},e[8]=u,e[9]=s):s=e[9];let b;e[10]!==u||e[11]!==a?(b=a(u?"mainPanelTabs.hostingTab.dnsActiveHint":"mainPanelTabs.hostingTab.dnsAwaitingHint"),e[10]=u,e[11]=a,e[12]=b):b=e[12],n=t.jsxs("p",{className:"text-xs text-muted-foreground",children:[a("mainPanelTabs.hostingTab.dnsRedirectIntent",{from:d||"—"})," ",b]}),i=Ts,m=rn.map(x=>({type:"A",name:f,value:x})),e[0]=o,e[1]=l,e[2]=a,e[3]=i,e[4]=c,e[5]=m,e[6]=s,e[7]=n}else i=e[3],c=e[4],m=e[5],s=e[6],n=e[7];let h;e[13]!==i||e[14]!==m?(h=t.jsx(i,{records:m}),e[13]=i,e[14]=m,e[15]=h):h=e[15];let g;return e[16]!==c||e[17]!==s||e[18]!==n||e[19]!==h?(g=t.jsxs(c,{status:s,children:[n,h]}),e[16]=c,e[17]=s,e[18]=n,e[19]=h,e[20]=g):g=e[20],g}function ss(r){const e=ee.c(2),{records:o}=r;if(o.length===0)return null;let l;return e[0]!==o?(l=t.jsx(js,{children:t.jsx(Ts,{records:o})}),e[0]=o,e[1]=l):l=e[1],l}function dn(r){const e=ee.c(16),{domain:o}=r,l=Ae(),a=o.status??"pending";let i;e[0]!==a||e[1]!==l?(i=l(a==="active"?"mainPanelTabs.hostingTab.statusActive":a==="action-required"?"mainPanelTabs.hostingTab.statusActionRequired":"mainPanelTabs.hostingTab.statusPending"),e[0]=a,e[1]=l,e[2]=i):i=e[2];const c=i;let m;e[3]!==o.detail||e[4]!==l?(m=o.detail==="zone-not-onboarded"?l("mainPanelTabs.hostingTab.detailZoneNotOnboarded"):void 0,e[3]=o.detail,e[4]=l,e[5]=m):m=e[5];const s=m,n=a==="active"?"success":a==="action-required"?"warning":"outline";let h;e[6]!==c||e[7]!==n?(h=t.jsx(Re,{variant:n,children:c}),e[6]=c,e[7]=n,e[8]=h):h=e[8];const g=h;if(!s)return g;let d;e[9]!==g?(d=t.jsx(ns,{asChild:!0,children:g}),e[9]=g,e[10]=d):d=e[10];let f;e[11]!==s?(f=t.jsx(is,{className:"max-w-xs",children:s}),e[11]=s,e[12]=f):f=e[12];let u;return e[13]!==d||e[14]!==f?(u=t.jsxs(ls,{children:[d,f]}),e[13]=d,e[14]=f,e[15]=u):u=e[15],u}function fn(r){const e=ee.c(121),{base:o,orgSlug:l,site:a,domains:i,dnsTemplate:c,isLoading:m,error:s}=r,n=Ae(),h=bt(),[g,d]=Z.useState(!1),[f,u]=Z.useState(""),[b,x]=Z.useState(null),[N,C]=Z.useState(null);let P;e[0]!==l||e[1]!==h||e[2]!==a?(P=()=>h.invalidateQueries({queryKey:Ye.hostingDomains(l,a)}),e[0]=l,e[1]=h,e[2]=a,e[3]=P):P=e[3];const S=P;let y;e[4]!==o?(y=$=>at(`${o}/domains`,"PUT",$),e[4]=o,e[5]=y):y=e[5];let R;e[6]!==S||e[7]!==n?(R=()=>{S(),ce.success(n("mainPanelTabs.hostingTab.toastDomainSaved")),d(!1)},e[6]=S,e[7]=n,e[8]=R):R=e[8];let w;e[9]!==y||e[10]!==R?(w={mutationFn:y,onSuccess:R,onError:hn},e[9]=y,e[10]=R,e[11]=w):w=e[11];const j=lt(w);let T;e[12]!==o?(T=$=>at(`${o}/domains/${encodeURIComponent($)}`,"DELETE"),e[12]=o,e[13]=T):T=e[13];let V;e[14]!==S||e[15]!==n?(V=()=>{S(),ce.success(n("mainPanelTabs.hostingTab.toastDomainDeleted")),x(null)},e[14]=S,e[15]=n,e[16]=V):V=e[16];let q;e[17]!==T||e[18]!==V?(q={mutationFn:T,onSuccess:V,onError:un},e[17]=T,e[18]=V,e[19]=q):q=e[19];const F=lt(q);let v;e[20]!==f||e[21]!==j||e[22]!==n?(v=()=>{const $=f.trim().toLowerCase();if(!$){ce.error(n("mainPanelTabs.hostingTab.errorDomainHostRequired"));return}const se=Us($);if(se){ce.error(se);return}j.mutate({host:$})},e[20]=f,e[21]=j,e[22]=n,e[23]=v):v=e[23];const H=v;let A;if(e[24]!==c||e[25]!==f){let $;e[27]!==f?($=se=>({...se,name:f.trim().toLowerCase()||se.name}),e[27]=f,e[28]=$):$=e[28],A=c.map($),e[24]=c,e[25]=f,e[26]=A}else A=e[26];const Q=A;let _,W;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{u(""),d(!0)},W=t.jsx(Pt,{}),e[29]=_,e[30]=W):(_=e[29],W=e[30]);let J;e[31]!==n?(J=n("mainPanelTabs.hostingTab.addDomain"),e[31]=n,e[32]=J):J=e[32];let U;e[33]!==J?(U=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:_,children:[W,J]}),e[33]=J,e[34]=U):U=e[34];const p=U;let I;e[35]!==n?(I=n("mainPanelTabs.hostingTab.domains"),e[35]=n,e[36]=I):I=e[36];const Y=i.length>0?p:void 0;let D;e[37]!==p||e[38]!==F.isPending||e[39]!==N||e[40]!==i||e[41]!==s||e[42]!==m||e[43]!==n?(D=m?t.jsx(ht,{}):s?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.domainsError")})}):i.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(At,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDomains"),className:"py-10",buttonComponent:p})}):t.jsx(Qe,{children:i.map(($,se)=>{const Se=!$.canonical&&($.dns?.length??0)>0,je=N===$.host;return t.jsxs("div",{children:[t.jsxs(pt,{children:[Se?t.jsx(Ut,{open:je,onClick:()=>C(je?null:$.host)}):t.jsx(At,{className:"size-4 shrink-0 text-muted-foreground/60"}),t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[t.jsx("span",{className:"truncate font-mono text-xs",children:$.host}),$.canonical&&t.jsx(Re,{variant:"outline",children:n("mainPanelTabs.hostingTab.canonical")})]}),t.jsx(dn,{domain:$}),!$.canonical&&t.jsx(et,{label:n("mainPanelTabs.hostingTab.deleteDomain"),onClick:()=>x($.host),disabled:F.isPending,className:"text-muted-foreground",children:t.jsx(vt,{})})]}),Se&&t.jsx(bs,{open:je,children:t.jsx(ss,{records:$.dns??[]})})]},`${$.host}-${se}`)})}),e[37]=p,e[38]=F.isPending,e[39]=N,e[40]=i,e[41]=s,e[42]=m,e[43]=n,e[44]=D):D=e[44];let G;e[45]!==n?(G=n("mainPanelTabs.hostingTab.addDomainTitle"),e[45]=n,e[46]=G):G=e[46];let O;e[47]!==G?(O=t.jsx(yt,{children:t.jsx(St,{children:G})}),e[47]=G,e[48]=O):O=e[48];let k;e[49]!==H?(k=$=>{$.preventDefault(),H()},e[49]=H,e[50]=k):k=e[50];let E;e[51]!==n?(E=n("mainPanelTabs.hostingTab.colHost"),e[51]=n,e[52]=E):E=e[52];let B;e[53]!==E?(B=t.jsx(Xe,{htmlFor:"domain-host",children:E}),e[53]=E,e[54]=B):B=e[54];let X;e[55]!==n?(X=n("mainPanelTabs.hostingTab.domainHostPlaceholder"),e[55]=n,e[56]=X):X=e[56];let te;e[57]===Symbol.for("react.memo_cache_sentinel")?(te=$=>u($.target.value),e[57]=te):te=e[57];let K;e[58]!==f||e[59]!==j.isPending||e[60]!==X?(K=t.jsx(it,{id:"domain-host",placeholder:X,value:f,onChange:te,className:"font-mono text-xs",autoComplete:"off",disabled:j.isPending}),e[58]=f,e[59]=j.isPending,e[60]=X,e[61]=K):K=e[61];let ne;e[62]!==B||e[63]!==K?(ne=t.jsxs("div",{className:"flex flex-col gap-2",children:[B,K]}),e[62]=B,e[63]=K,e[64]=ne):ne=e[64];let ie;e[65]!==f||e[66]!==Q?(ie=f.trim()&&t.jsx("div",{className:"rounded-lg border border-border bg-muted/30 p-3",children:t.jsx(ss,{records:Q})}),e[65]=f,e[66]=Q,e[67]=ie):ie=e[67];let Pe;e[68]===Symbol.for("react.memo_cache_sentinel")?(Pe=()=>d(!1),e[68]=Pe):Pe=e[68];const Ce=j.isPending;let me;e[69]!==n?(me=n("mainPanelTabs.hostingTab.cancel"),e[69]=n,e[70]=me):me=e[70];let pe;e[71]!==j.isPending||e[72]!==me?(pe=t.jsx(Ie,{variant:"outline",type:"button",onClick:Pe,disabled:Ce,children:me}),e[71]=j.isPending,e[72]=me,e[73]=pe):pe=e[73];let le;e[74]!==f||e[75]!==j.isPending?(le=j.isPending||!f.trim(),e[74]=f,e[75]=j.isPending,e[76]=le):le=e[76];let ae;e[77]!==j.isPending||e[78]!==n?(ae=j.isPending?n("mainPanelTabs.hostingTab.saving"):n("mainPanelTabs.hostingTab.save"),e[77]=j.isPending,e[78]=n,e[79]=ae):ae=e[79];let de;e[80]!==le||e[81]!==ae?(de=t.jsx(Ie,{type:"submit",disabled:le,children:ae}),e[80]=le,e[81]=ae,e[82]=de):de=e[82];let De;e[83]!==pe||e[84]!==de?(De=t.jsxs(Nt,{children:[pe,de]}),e[83]=pe,e[84]=de,e[85]=De):De=e[85];let fe;e[86]!==k||e[87]!==ne||e[88]!==ie||e[89]!==De?(fe=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:k,children:[ne,ie,De]}),e[86]=k,e[87]=ne,e[88]=ie,e[89]=De,e[90]=fe):fe=e[90];let ue;e[91]!==O||e[92]!==fe?(ue=t.jsxs(Ct,{className:"sm:max-w-md",children:[O,fe]}),e[91]=O,e[92]=fe,e[93]=ue):ue=e[93];let oe;e[94]!==g||e[95]!==ue?(oe=t.jsx(Dt,{open:g,onOpenChange:d,children:ue}),e[94]=g,e[95]=ue,e[96]=oe):oe=e[96];const Te=b!=null;let he;e[97]===Symbol.for("react.memo_cache_sentinel")?(he=$=>{$||x(null)},e[97]=he):he=e[97];let xe;e[98]!==n?(xe=n("mainPanelTabs.hostingTab.confirmDeleteDomainTitle"),e[98]=n,e[99]=xe):xe=e[99];const ve=b??"";let ye;e[100]!==n||e[101]!==ve?(ye=n("mainPanelTabs.hostingTab.confirmDeleteDomainDescription",{host:ve}),e[100]=n,e[101]=ve,e[102]=ye):ye=e[102];let ge;e[103]!==n?(ge=n("mainPanelTabs.hostingTab.deleteDomain"),e[103]=n,e[104]=ge):ge=e[104];let re;e[105]!==F||e[106]!==b?(re=()=>{b&&F.mutate(b)},e[105]=F,e[106]=b,e[107]=re):re=e[107];let be;e[108]!==F.isPending||e[109]!==Te||e[110]!==xe||e[111]!==ye||e[112]!==ge||e[113]!==re?(be=t.jsx(wt,{open:Te,onOpenChange:he,title:xe,description:ye,confirmLabel:ge,pending:F.isPending,onConfirm:re}),e[108]=F.isPending,e[109]=Te,e[110]=xe,e[111]=ye,e[112]=ge,e[113]=re,e[114]=be):be=e[114];let we;return e[115]!==I||e[116]!==Y||e[117]!==D||e[118]!==oe||e[119]!==be?(we=t.jsxs(ut,{title:I,actions:Y,children:[D,oe,be]}),e[115]=I,e[116]=Y,e[117]=D,e[118]=oe,e[119]=be,e[120]=we):we=e[120],we}function un(r){return ce.error(rt(r))}function hn(r){return ce.error(rt(r))}function xn(r){const e=ee.c(24),{value:o,onChange:l,disabled:a,className:i}=r,c=Ae();let m;e[0]!==l?(m=N=>l(N==="build"?"build":"runtime"),e[0]=l,e[1]=m):m=e[1];let s;e[2]!==i?(s=xt("h-8",i),e[2]=i,e[3]=s):s=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Bt,{}),e[4]=n):n=e[4];let h;e[5]!==s?(h=t.jsx(Ot,{className:s,children:n}),e[5]=s,e[6]=h):h=e[6];let g;e[7]!==c?(g=c("mainPanelTabs.hostingTab.secretScopeRuntime"),e[7]=c,e[8]=g):g=e[8];let d;e[9]!==g?(d=t.jsx(ft,{value:"runtime",children:g}),e[9]=g,e[10]=d):d=e[10];let f;e[11]!==c?(f=c("mainPanelTabs.hostingTab.secretScopeBuild"),e[11]=c,e[12]=f):f=e[12];let u;e[13]!==f?(u=t.jsx(ft,{value:"build",children:f}),e[13]=f,e[14]=u):u=e[14];let b;e[15]!==d||e[16]!==u?(b=t.jsxs(qt,{children:[d,u]}),e[15]=d,e[16]=u,e[17]=b):b=e[17];let x;return e[18]!==a||e[19]!==m||e[20]!==h||e[21]!==b||e[22]!==o?(x=t.jsxs(Mt,{value:o,onValueChange:m,disabled:a,children:[h,b]}),e[18]=a,e[19]=m,e[20]=h,e[21]=b,e[22]=o,e[23]=x):x=e[23],x}function gn(r){const e=ee.c(151),{base:o,orgSlug:l,site:a,envVars:i,codeVars:c,isLoading:m,error:s}=r,n=Ae(),h=bt(),[g,d]=Z.useState(!1),[f,u]=Z.useState(""),[b,x]=Z.useState(""),[N,C]=Z.useState("runtime"),[P,S]=Z.useState(null),[y,R]=Z.useState(""),[w,j]=Z.useState(null);let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=new Set,e[0]=T):T=e[0];const[V,q]=Z.useState(T);let F;e[1]===Symbol.for("react.memo_cache_sentinel")?(F=L=>{q(Ne=>{const We=new Set(Ne);return We.has(L)?We.delete(L):We.add(L),We})},e[1]=F):F=e[1];const v=F;let H;e[2]!==o?(H=L=>at(`${o}/env`,"PUT",{vars:L}),e[2]=o,e[3]=H):H=e[3];let A;e[4]!==l||e[5]!==h||e[6]!==a||e[7]!==n?(A=()=>{h.invalidateQueries({queryKey:Ye.hostingEnv(l,a)}),ce.success(n("mainPanelTabs.hostingTab.toastEnvSaved"))},e[4]=l,e[5]=h,e[6]=a,e[7]=n,e[8]=A):A=e[8];let Q;e[9]!==H||e[10]!==A?(Q={mutationFn:H,onSuccess:A,onError:pn},e[9]=H,e[10]=A,e[11]=Q):Q=e[11];const _=lt(Q);let W;e[12]!==f||e[13]!==N||e[14]!==b||e[15]!==_||e[16]!==i||e[17]!==n?(W=()=>{const L=f.trim();if(!L){ce.error(n("mainPanelTabs.hostingTab.errorEnvNameRequired"));return}if(i.some(Ne=>Lt(Ne,{name:L,scope:N}))){ce.error(n("mainPanelTabs.hostingTab.errorEnvNameDuplicate"));return}_.mutate([...i,{name:L,value:b,scope:N}],{onSuccess:()=>{d(!1),u(""),x(""),C("runtime")}})},e[12]=f,e[13]=N,e[14]=b,e[15]=_,e[16]=i,e[17]=n,e[18]=W):W=e[18];const J=W;let U;e[19]!==y||e[20]!==_||e[21]!==i?(U=L=>{_.mutate(i.map(Ne=>Lt(Ne,L)?{name:L.name,value:y,scope:L.scope}:Ne),{onSuccess:()=>S(null)})},e[19]=y,e[20]=_,e[21]=i,e[22]=U):U=e[22];const p=U;let I;e[23]!==w||e[24]!==_||e[25]!==i?(I=()=>{w&&_.mutate(i.filter(L=>!Lt(L,w)),{onSuccess:()=>j(null)})},e[23]=w,e[24]=_,e[25]=i,e[26]=I):I=e[26];const Y=I,D=_.isPending;let G;e[27]===Symbol.for("react.memo_cache_sentinel")?(G=()=>{u(""),x(""),C("runtime")},e[27]=G):G=e[27];const O=G;let k,E;e[28]===Symbol.for("react.memo_cache_sentinel")?(k=()=>d(!0),E=t.jsx(Pt,{}),e[28]=k,e[29]=E):(k=e[28],E=e[29]);let B;e[30]!==n?(B=n("mainPanelTabs.hostingTab.addVariable"),e[30]=n,e[31]=B):B=e[31];let X;e[32]!==B?(X=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:k,children:[E,B]}),e[32]=B,e[33]=X):X=e[33];const te=X;let K;e[34]!==n?(K=n("mainPanelTabs.hostingTab.env"),e[34]=n,e[35]=K):K=e[35];const ne=i.length>0||c.length>0?te:void 0;let ie;e[36]!==te||e[37]!==c||e[38]!==y||e[39]!==P?.name||e[40]!==P?.scope||e[41]!==i||e[42]!==s||e[43]!==p||e[44]!==m||e[45]!==D||e[46]!==V||e[47]!==n?(ie=m?t.jsx(ht,{}):s?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.envError")})}):i.length===0&&c.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(Yt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noEnv"),className:"py-10",buttonComponent:te})}):t.jsxs(Qe,{children:[i.map(L=>{const Ne=L.scope==="build"?"build":"runtime",We=`${L.name}:${Ne}`,tt=P?.name===L.name&&P?.scope===Ne,st=V.has(We);return t.jsxs(pt,{children:[t.jsxs("div",{className:"flex min-w-0 flex-1 basis-0 items-center gap-2",children:[t.jsx("div",{className:"w-20 shrink-0",children:t.jsx(ps,{scope:Ne})}),t.jsx("span",{className:"truncate font-mono text-xs",children:L.name})]}),t.jsx("div",{className:"flex min-w-0 flex-1 basis-0 items-center justify-end gap-2",children:tt?t.jsxs(t.Fragment,{children:[t.jsx(it,{value:y,onChange:z=>R(z.target.value),onKeyDown:z=>{z.key==="Enter"&&p({name:L.name,scope:Ne}),z.key==="Escape"&&S(null)},autoFocus:!0,className:"h-8 font-mono text-xs"}),t.jsx(Ie,{size:"sm",onClick:()=>p({name:L.name,scope:Ne}),disabled:D,children:n("mainPanelTabs.hostingTab.save")}),t.jsx(Ie,{size:"sm",variant:"ghost",onClick:()=>S(null),disabled:D,children:n("mainPanelTabs.hostingTab.cancel")})]}):t.jsxs(t.Fragment,{children:[t.jsx(et,{label:n(st?"mainPanelTabs.hostingTab.hideValue":"mainPanelTabs.hostingTab.showValue"),onClick:()=>v(We),className:"text-muted-foreground",children:st?t.jsx(Os,{}):t.jsx(qs,{})}),st?t.jsx("button",{type:"button",onClick:()=>{S({name:L.name,scope:Ne}),R(L.value)},title:n("mainPanelTabs.hostingTab.editValue"),className:"min-w-0 truncate rounded px-1.5 py-0.5 text-right font-mono text-xs text-muted-foreground hover:bg-muted hover:text-foreground",children:L.value||"—"}):t.jsx("span",{className:"min-w-0 truncate px-1.5 py-0.5 text-right font-mono text-xs text-muted-foreground/60",children:L.value?"••••••••••":"—"})]})}),t.jsx(et,{label:n("mainPanelTabs.hostingTab.deleteVariable"),onClick:()=>j({name:L.name,scope:Ne}),disabled:D,className:"text-muted-foreground",children:t.jsx(vt,{})})]},We)}),c.length>0&&t.jsxs(Ht,{children:[t.jsx(Bs,{asChild:!0,children:t.jsxs("button",{type:"button",className:"group flex w-full items-center gap-2 px-4 py-2.5 text-left text-xs text-muted-foreground hover:bg-muted/40",children:[t.jsx(xs,{className:"size-4 transition-transform duration-200 group-data-[state=open]:rotate-90 motion-reduce:transition-none"}),t.jsx(Yt,{className:"size-4"}),n("mainPanelTabs.hostingTab.codeVarsToggle",{count:String(c.length)})]})}),t.jsx(Vt,{children:t.jsx("div",{className:"divide-y divide-border/60 border-t border-border bg-muted/30",children:c.map(bn)})})]})]}),e[36]=te,e[37]=c,e[38]=y,e[39]=P?.name,e[40]=P?.scope,e[41]=i,e[42]=s,e[43]=p,e[44]=m,e[45]=D,e[46]=V,e[47]=n,e[48]=ie):ie=e[48];let Pe;e[49]===Symbol.for("react.memo_cache_sentinel")?(Pe=L=>{d(L),L||O()},e[49]=Pe):Pe=e[49];let Ce;e[50]!==n?(Ce=n("mainPanelTabs.hostingTab.addVariable"),e[50]=n,e[51]=Ce):Ce=e[51];let me;e[52]!==Ce?(me=t.jsx(yt,{children:t.jsx(St,{children:Ce})}),e[52]=Ce,e[53]=me):me=e[53];let pe;e[54]!==J?(pe=L=>{L.preventDefault(),J()},e[54]=J,e[55]=pe):pe=e[55];let le;e[56]!==n?(le=n("mainPanelTabs.hostingTab.colName"),e[56]=n,e[57]=le):le=e[57];let ae;e[58]!==le?(ae=t.jsx(Xe,{htmlFor:"env-name",children:le}),e[58]=le,e[59]=ae):ae=e[59];let de;e[60]!==n?(de=n("mainPanelTabs.hostingTab.envNamePlaceholder"),e[60]=n,e[61]=de):de=e[61];let De;e[62]===Symbol.for("react.memo_cache_sentinel")?(De=L=>u(L.target.value),e[62]=De):De=e[62];let fe;e[63]!==f||e[64]!==D||e[65]!==de?(fe=t.jsx(it,{id:"env-name",placeholder:de,value:f,onChange:De,className:"font-mono text-xs",autoComplete:"off",disabled:D}),e[63]=f,e[64]=D,e[65]=de,e[66]=fe):fe=e[66];let ue;e[67]!==ae||e[68]!==fe?(ue=t.jsxs("div",{className:"flex flex-col gap-2",children:[ae,fe]}),e[67]=ae,e[68]=fe,e[69]=ue):ue=e[69];let oe;e[70]!==n?(oe=n("mainPanelTabs.hostingTab.colValue"),e[70]=n,e[71]=oe):oe=e[71];let Te;e[72]!==oe?(Te=t.jsx(Xe,{htmlFor:"env-value",children:oe}),e[72]=oe,e[73]=Te):Te=e[73];let he;e[74]!==n?(he=n("mainPanelTabs.hostingTab.envValuePlaceholder"),e[74]=n,e[75]=he):he=e[75];let xe;e[76]===Symbol.for("react.memo_cache_sentinel")?(xe=L=>x(L.target.value),e[76]=xe):xe=e[76];let ve;e[77]!==b||e[78]!==D||e[79]!==he?(ve=t.jsx(it,{id:"env-value",placeholder:he,value:b,onChange:xe,className:"font-mono text-xs",autoComplete:"off",disabled:D}),e[77]=b,e[78]=D,e[79]=he,e[80]=ve):ve=e[80];let ye;e[81]!==Te||e[82]!==ve?(ye=t.jsxs("div",{className:"flex flex-col gap-2",children:[Te,ve]}),e[81]=Te,e[82]=ve,e[83]=ye):ye=e[83];let ge;e[84]!==n?(ge=n("mainPanelTabs.hostingTab.secretScope"),e[84]=n,e[85]=ge):ge=e[85];let re;e[86]!==ge?(re=t.jsx(Xe,{children:ge}),e[86]=ge,e[87]=re):re=e[87];let be;e[88]!==N||e[89]!==D?(be=t.jsx(xn,{value:N,onChange:C,disabled:D,className:"w-full"}),e[88]=N,e[89]=D,e[90]=be):be=e[90];let we;e[91]!==N||e[92]!==n?(we=n(N==="build"?"mainPanelTabs.hostingTab.secretScopeBuildHint":"mainPanelTabs.hostingTab.secretScopeRuntimeHint"),e[91]=N,e[92]=n,e[93]=we):we=e[93];let $;e[94]!==we?($=t.jsx("p",{className:"text-xs text-muted-foreground",children:we}),e[94]=we,e[95]=$):$=e[95];let se;e[96]!==re||e[97]!==be||e[98]!==$?(se=t.jsxs("div",{className:"flex flex-col gap-2",children:[re,be,$]}),e[96]=re,e[97]=be,e[98]=$,e[99]=se):se=e[99];let Se;e[100]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>{d(!1),O()},e[100]=Se):Se=e[100];let je;e[101]!==n?(je=n("mainPanelTabs.hostingTab.cancel"),e[101]=n,e[102]=je):je=e[102];let $e;e[103]!==D||e[104]!==je?($e=t.jsx(Ie,{variant:"outline",type:"button",onClick:Se,disabled:D,children:je}),e[103]=D,e[104]=je,e[105]=$e):$e=e[105];let ze;e[106]!==f||e[107]!==D?(ze=D||!f.trim(),e[106]=f,e[107]=D,e[108]=ze):ze=e[108];let Ke;e[109]!==D||e[110]!==n?(Ke=n(D?"mainPanelTabs.hostingTab.saving":"mainPanelTabs.hostingTab.add"),e[109]=D,e[110]=n,e[111]=Ke):Ke=e[111];let Le;e[112]!==ze||e[113]!==Ke?(Le=t.jsx(Ie,{type:"submit",disabled:ze,children:Ke}),e[112]=ze,e[113]=Ke,e[114]=Le):Le=e[114];let _e;e[115]!==$e||e[116]!==Le?(_e=t.jsxs(Nt,{children:[$e,Le]}),e[115]=$e,e[116]=Le,e[117]=_e):_e=e[117];let Be;e[118]!==pe||e[119]!==ue||e[120]!==ye||e[121]!==se||e[122]!==_e?(Be=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:pe,children:[ue,ye,se,_e]}),e[118]=pe,e[119]=ue,e[120]=ye,e[121]=se,e[122]=_e,e[123]=Be):Be=e[123];let Ve;e[124]!==me||e[125]!==Be?(Ve=t.jsxs(Ct,{className:"sm:max-w-md",children:[me,Be]}),e[124]=me,e[125]=Be,e[126]=Ve):Ve=e[126];let ke;e[127]!==g||e[128]!==Ve?(ke=t.jsx(Dt,{open:g,onOpenChange:Pe,children:Ve}),e[127]=g,e[128]=Ve,e[129]=ke):ke=e[129];const Je=w!=null;let He;e[130]===Symbol.for("react.memo_cache_sentinel")?(He=L=>{L||j(null)},e[130]=He):He=e[130];let Ee;e[131]!==n?(Ee=n("mainPanelTabs.hostingTab.confirmDeleteVariableTitle"),e[131]=n,e[132]=Ee):Ee=e[132];const Oe=w?.name??"";let qe;e[133]!==n||e[134]!==Oe?(qe=n("mainPanelTabs.hostingTab.confirmDeleteVariableDescription",{name:Oe}),e[133]=n,e[134]=Oe,e[135]=qe):qe=e[135];let Ue;e[136]!==n?(Ue=n("mainPanelTabs.hostingTab.deleteVariable"),e[136]=n,e[137]=Ue):Ue=e[137];let M;e[138]!==Y||e[139]!==D||e[140]!==Je||e[141]!==Ee||e[142]!==qe||e[143]!==Ue?(M=t.jsx(wt,{open:Je,onOpenChange:He,title:Ee,description:qe,confirmLabel:Ue,pending:D,onConfirm:Y}),e[138]=Y,e[139]=D,e[140]=Je,e[141]=Ee,e[142]=qe,e[143]=Ue,e[144]=M):M=e[144];let Ge;return e[145]!==K||e[146]!==ne||e[147]!==ie||e[148]!==ke||e[149]!==M?(Ge=t.jsxs(ut,{title:K,actions:ne,children:[ie,ke,M]}),e[145]=K,e[146]=ne,e[147]=ie,e[148]=ke,e[149]=M,e[150]=Ge):Ge=e[150],Ge}function bn(r){return t.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 font-mono text-xs",children:[t.jsx("span",{className:"flex-1 basis-0 truncate",children:r.name}),t.jsx("span",{className:"flex-1 basis-0 truncate text-right text-muted-foreground",children:r.value})]},r.name)}function pn(r){return ce.error(rt(r))}function Tn(r){const e=ee.c(6),{type:o}=r,l=Ae(),a=o==="permanent"?"secondary":"outline";let i;e[0]!==l||e[1]!==o?(i=l(o==="permanent"?"mainPanelTabs.hostingTab.permanent":"mainPanelTabs.hostingTab.temporary"),e[0]=l,e[1]=o,e[2]=i):i=e[2];let c;return e[3]!==a||e[4]!==i?(c=t.jsx(Re,{variant:a,children:i}),e[3]=a,e[4]=i,e[5]=c):c=e[5],c}function jn(r){const e=ee.c(163),{base:o,orgSlug:l,site:a,redirects:i,isLoading:c,error:m}=r,s=Ae(),n=bt(),[h,g]=Z.useState(!1),[d,f]=Z.useState(null),[u,b]=Z.useState(""),[x,N]=Z.useState(""),[C,P]=Z.useState("permanent"),[S,y]=Z.useState(null),[R,w]=Z.useState(null);let j;e[0]!==l||e[1]!==n||e[2]!==a?(j=()=>n.invalidateQueries({queryKey:Ye.hostingRedirects(l,a)}),e[0]=l,e[1]=n,e[2]=a,e[3]=j):j=e[3];const T=j;let V;e[4]!==o?(V=z=>at(`${o}/redirects`,"PUT",z),e[4]=o,e[5]=V):V=e[5];let q;e[6]!==T||e[7]!==s?(q=()=>{T(),ce.success(s("mainPanelTabs.hostingTab.toastRedirectSaved")),g(!1)},e[6]=T,e[7]=s,e[8]=q):q=e[8];let F;e[9]!==V||e[10]!==q?(F={mutationFn:V,onSuccess:q,onError:vn},e[9]=V,e[10]=q,e[11]=F):F=e[11];const v=lt(F);let H;e[12]!==o?(H=z=>at(`${o}/redirects/${encodeURIComponent(z)}`,"DELETE"),e[12]=o,e[13]=H):H=e[13];let A;e[14]!==T||e[15]!==s?(A=()=>{T(),ce.success(s("mainPanelTabs.hostingTab.toastRedirectDeleted")),y(null)},e[14]=T,e[15]=s,e[16]=A):A=e[16];let Q;e[17]!==H||e[18]!==A?(Q={mutationFn:H,onSuccess:A,onError:Pn},e[17]=H,e[18]=A,e[19]=Q):Q=e[19];const _=lt(Q);let W;e[20]===Symbol.for("react.memo_cache_sentinel")?(W=()=>{f(null),b(""),N(""),P("permanent"),g(!0)},e[20]=W):W=e[20];const J=W;let U;e[21]===Symbol.for("react.memo_cache_sentinel")?(U=z=>{f(z.from),b(z.from),N(z.to),P(z.type==="temporary"?"temporary":"permanent"),g(!0)},e[21]=U):U=e[21];const p=U;let I;e[22]!==u||e[23]!==x||e[24]!==C||e[25]!==v||e[26]!==s?(I=()=>{const z=u.trim(),Tt=x.trim();if(!z||!Tt){ce.error(s("mainPanelTabs.hostingTab.errorRedirectFieldsRequired"));return}v.mutate({from:z,to:Tt,type:C})},e[22]=u,e[23]=x,e[24]=C,e[25]=v,e[26]=s,e[27]=I):I=e[27];const Y=I;let D;e[28]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(Pt,{}),e[28]=D):D=e[28];let G;e[29]!==s?(G=s("mainPanelTabs.hostingTab.addRedirect"),e[29]=s,e[30]=G):G=e[30];let O;e[31]!==G?(O=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:J,children:[D,G]}),e[31]=G,e[32]=O):O=e[32];const k=O;let E;e[33]!==s?(E=s("mainPanelTabs.hostingTab.redirects"),e[33]=s,e[34]=E):E=e[34];const B=i.length>0?k:void 0;let X;e[35]!==k||e[36]!==_.isPending||e[37]!==R||e[38]!==m||e[39]!==c||e[40]!==v.isPending||e[41]!==i||e[42]!==s?(X=c?t.jsx(ht,{}):m?t.jsx(Qe,{children:t.jsx(ot,{children:s("mainPanelTabs.hostingTab.redirectsError")})}):i.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(Gt,{className:"size-5"}),title:s("mainPanelTabs.hostingTab.noRedirects"),className:"py-10",buttonComponent:k})}):t.jsx(Qe,{children:i.map((z,Tt)=>{const Kt=es(z.from),$t=R===z.from;return t.jsxs("div",{children:[t.jsxs(pt,{children:[Kt?t.jsx(Ut,{open:$t,onClick:()=>w($t?null:z.from)}):t.jsx(Gt,{className:"size-4 shrink-0 text-muted-foreground/60"}),t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 font-mono text-xs",children:[t.jsx("span",{className:"truncate",children:z.from}),t.jsx(Ms,{className:"size-3.5 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"truncate text-muted-foreground",children:z.to})]}),t.jsx(Tn,{type:z.type}),t.jsx(et,{label:s("mainPanelTabs.hostingTab.editRedirect"),onClick:()=>p(z),disabled:v.isPending,className:"text-muted-foreground",children:t.jsx(Es,{})}),t.jsx(et,{label:s("mainPanelTabs.hostingTab.deleteRedirect"),onClick:()=>y(z.from),disabled:_.isPending,className:"-ml-1 text-muted-foreground",children:t.jsx(vt,{})})]}),Kt&&t.jsx(bs,{open:$t,children:t.jsx(ts,{from:z.from,source:z.source})})]},z.id??`${z.from}-${Tt}`)})}),e[35]=k,e[36]=_.isPending,e[37]=R,e[38]=m,e[39]=c,e[40]=v.isPending,e[41]=i,e[42]=s,e[43]=X):X=e[43];let te;e[44]!==d||e[45]!==s?(te=d!=null?s("mainPanelTabs.hostingTab.editRedirectTitle"):s("mainPanelTabs.hostingTab.addRedirectTitle"),e[44]=d,e[45]=s,e[46]=te):te=e[46];let K;e[47]!==te?(K=t.jsx(yt,{children:t.jsx(St,{children:te})}),e[47]=te,e[48]=K):K=e[48];let ne;e[49]!==Y?(ne=z=>{z.preventDefault(),Y()},e[49]=Y,e[50]=ne):ne=e[50];let ie;e[51]!==s?(ie=s("mainPanelTabs.hostingTab.colFrom"),e[51]=s,e[52]=ie):ie=e[52];let Pe;e[53]!==ie?(Pe=t.jsx(Xe,{htmlFor:"redirect-from",children:ie}),e[53]=ie,e[54]=Pe):Pe=e[54];let Ce;e[55]!==s?(Ce=s("mainPanelTabs.hostingTab.redirectFromPlaceholder"),e[55]=s,e[56]=Ce):Ce=e[56];let me;e[57]===Symbol.for("react.memo_cache_sentinel")?(me=z=>b(z.target.value),e[57]=me):me=e[57];const pe=d!=null||v.isPending;let le;e[58]!==u||e[59]!==Ce||e[60]!==pe?(le=t.jsx(it,{id:"redirect-from",placeholder:Ce,value:u,onChange:me,className:"font-mono text-xs",disabled:pe}),e[58]=u,e[59]=Ce,e[60]=pe,e[61]=le):le=e[61];let ae;e[62]!==Pe||e[63]!==le?(ae=t.jsxs("div",{className:"flex flex-col gap-2",children:[Pe,le]}),e[62]=Pe,e[63]=le,e[64]=ae):ae=e[64];let de;e[65]!==s?(de=s("mainPanelTabs.hostingTab.colTo"),e[65]=s,e[66]=de):de=e[66];let De;e[67]!==de?(De=t.jsx(Xe,{htmlFor:"redirect-to",children:de}),e[67]=de,e[68]=De):De=e[68];let fe;e[69]!==s?(fe=s("mainPanelTabs.hostingTab.redirectToPlaceholder"),e[69]=s,e[70]=fe):fe=e[70];let ue;e[71]===Symbol.for("react.memo_cache_sentinel")?(ue=z=>N(z.target.value),e[71]=ue):ue=e[71];let oe;e[72]!==x||e[73]!==v.isPending||e[74]!==fe?(oe=t.jsx(it,{id:"redirect-to",placeholder:fe,value:x,onChange:ue,className:"font-mono text-xs",disabled:v.isPending}),e[72]=x,e[73]=v.isPending,e[74]=fe,e[75]=oe):oe=e[75];let Te;e[76]!==De||e[77]!==oe?(Te=t.jsxs("div",{className:"flex flex-col gap-2",children:[De,oe]}),e[76]=De,e[77]=oe,e[78]=Te):Te=e[78];let he;e[79]!==s?(he=s("mainPanelTabs.hostingTab.colType"),e[79]=s,e[80]=he):he=e[80];let xe;e[81]!==he?(xe=t.jsx(Xe,{children:he}),e[81]=he,e[82]=xe):xe=e[82];let ve;e[83]===Symbol.for("react.memo_cache_sentinel")?(ve=z=>P(z==="temporary"?"temporary":"permanent"),e[83]=ve):ve=e[83];const ye=v.isPending;let ge;e[84]===Symbol.for("react.memo_cache_sentinel")?(ge=t.jsx(Ot,{className:"w-full",children:t.jsx(Bt,{})}),e[84]=ge):ge=e[84];let re;e[85]!==s?(re=s("mainPanelTabs.hostingTab.permanent"),e[85]=s,e[86]=re):re=e[86];let be;e[87]!==re?(be=t.jsx(ft,{value:"permanent",children:re}),e[87]=re,e[88]=be):be=e[88];let we;e[89]!==s?(we=s("mainPanelTabs.hostingTab.temporary"),e[89]=s,e[90]=we):we=e[90];let $;e[91]!==we?($=t.jsx(ft,{value:"temporary",children:we}),e[91]=we,e[92]=$):$=e[92];let se;e[93]!==be||e[94]!==$?(se=t.jsxs(qt,{children:[be,$]}),e[93]=be,e[94]=$,e[95]=se):se=e[95];let Se;e[96]!==C||e[97]!==v.isPending||e[98]!==se?(Se=t.jsxs(Mt,{value:C,onValueChange:ve,disabled:ye,children:[ge,se]}),e[96]=C,e[97]=v.isPending,e[98]=se,e[99]=Se):Se=e[99];let je;e[100]!==xe||e[101]!==Se?(je=t.jsxs("div",{className:"flex flex-col gap-2",children:[xe,Se]}),e[100]=xe,e[101]=Se,e[102]=je):je=e[102];let $e;e[103]!==d||e[104]!==u||e[105]!==i?($e=es(u)&&t.jsx("div",{className:"rounded-lg border border-border bg-muted/30 p-3",children:t.jsx(ts,{from:u,source:i.find(z=>z.from===d)?.source})}),e[103]=d,e[104]=u,e[105]=i,e[106]=$e):$e=e[106];let ze;e[107]===Symbol.for("react.memo_cache_sentinel")?(ze=()=>g(!1),e[107]=ze):ze=e[107];const Ke=v.isPending;let Le;e[108]!==s?(Le=s("mainPanelTabs.hostingTab.cancel"),e[108]=s,e[109]=Le):Le=e[109];let _e;e[110]!==v.isPending||e[111]!==Le?(_e=t.jsx(Ie,{variant:"outline",type:"button",onClick:ze,disabled:Ke,children:Le}),e[110]=v.isPending,e[111]=Le,e[112]=_e):_e=e[112];let Be;e[113]!==u||e[114]!==x||e[115]!==v.isPending?(Be=v.isPending||!u.trim()||!x.trim(),e[113]=u,e[114]=x,e[115]=v.isPending,e[116]=Be):Be=e[116];let Ve;e[117]!==v.isPending||e[118]!==s?(Ve=v.isPending?s("mainPanelTabs.hostingTab.saving"):s("mainPanelTabs.hostingTab.save"),e[117]=v.isPending,e[118]=s,e[119]=Ve):Ve=e[119];let ke;e[120]!==Be||e[121]!==Ve?(ke=t.jsx(Ie,{type:"submit",disabled:Be,children:Ve}),e[120]=Be,e[121]=Ve,e[122]=ke):ke=e[122];let Je;e[123]!==_e||e[124]!==ke?(Je=t.jsxs(Nt,{children:[_e,ke]}),e[123]=_e,e[124]=ke,e[125]=Je):Je=e[125];let He;e[126]!==ne||e[127]!==ae||e[128]!==Te||e[129]!==je||e[130]!==$e||e[131]!==Je?(He=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:ne,children:[ae,Te,je,$e,Je]}),e[126]=ne,e[127]=ae,e[128]=Te,e[129]=je,e[130]=$e,e[131]=Je,e[132]=He):He=e[132];let Ee;e[133]!==K||e[134]!==He?(Ee=t.jsxs(Ct,{className:"sm:max-w-md",children:[K,He]}),e[133]=K,e[134]=He,e[135]=Ee):Ee=e[135];let Oe;e[136]!==h||e[137]!==Ee?(Oe=t.jsx(Dt,{open:h,onOpenChange:g,children:Ee}),e[136]=h,e[137]=Ee,e[138]=Oe):Oe=e[138];const qe=S!=null;let Ue;e[139]===Symbol.for("react.memo_cache_sentinel")?(Ue=z=>{z||y(null)},e[139]=Ue):Ue=e[139];let M;e[140]!==s?(M=s("mainPanelTabs.hostingTab.confirmDeleteRedirectTitle"),e[140]=s,e[141]=M):M=e[141];const Ge=S??"";let L;e[142]!==s||e[143]!==Ge?(L=s("mainPanelTabs.hostingTab.confirmDeleteRedirectDescription",{from:Ge}),e[142]=s,e[143]=Ge,e[144]=L):L=e[144];let Ne;e[145]!==s?(Ne=s("mainPanelTabs.hostingTab.deleteRedirect"),e[145]=s,e[146]=Ne):Ne=e[146];let We;e[147]!==_||e[148]!==S?(We=()=>{S&&_.mutate(S)},e[147]=_,e[148]=S,e[149]=We):We=e[149];let tt;e[150]!==_.isPending||e[151]!==qe||e[152]!==M||e[153]!==L||e[154]!==Ne||e[155]!==We?(tt=t.jsx(wt,{open:qe,onOpenChange:Ue,title:M,description:L,confirmLabel:Ne,pending:_.isPending,onConfirm:We}),e[150]=_.isPending,e[151]=qe,e[152]=M,e[153]=L,e[154]=Ne,e[155]=We,e[156]=tt):tt=e[156];let st;return e[157]!==E||e[158]!==B||e[159]!==X||e[160]!==Oe||e[161]!==tt?(st=t.jsxs(ut,{title:E,actions:B,children:[X,Oe,tt]}),e[157]=E,e[158]=B,e[159]=X,e[160]=Oe,e[161]=tt,e[162]=st):st=e[162],st}function Pn(r){return ce.error(rt(r))}function vn(r){return ce.error(rt(r))}function yn(r){const e=ee.c(160),{base:o,orgSlug:l,site:a,secrets:i,isLoading:c,error:m}=r,s=Ae(),n=bt(),[h,g]=Z.useState(!1),[d,f]=Z.useState(""),[u,b]=Z.useState(""),[x,N]=Z.useState("runtime"),[C,P]=Z.useState(null);let S;e[0]!==l||e[1]!==n||e[2]!==a?(S=()=>n.invalidateQueries({queryKey:Ye.hostingSecrets(l,a)}),e[0]=l,e[1]=n,e[2]=a,e[3]=S):S=e[3];const y=S;let R;e[4]!==o?(R=M=>at(`${o}/secrets`,"PUT",M),e[4]=o,e[5]=R):R=e[5];let w;e[6]!==y||e[7]!==s?(w=()=>{y(),ce.success(s("mainPanelTabs.hostingTab.toastSecretSaved")),g(!1),f(""),b(""),N("runtime")},e[6]=y,e[7]=s,e[8]=w):w=e[8];let j;e[9]!==R||e[10]!==w?(j={mutationFn:R,onSuccess:w,onError:Nn},e[9]=R,e[10]=w,e[11]=j):j=e[11];const T=lt(j);let V;e[12]!==o?(V=M=>at(`${o}/secrets/${encodeURIComponent(M.name)}?scope=${M.scope}`,"DELETE"),e[12]=o,e[13]=V):V=e[13];let q;e[14]!==y||e[15]!==s?(q=()=>{y(),ce.success(s("mainPanelTabs.hostingTab.toastSecretDeleted")),P(null)},e[14]=y,e[15]=s,e[16]=q):q=e[16];let F;e[17]!==V||e[18]!==q?(F={mutationFn:V,onSuccess:q,onError:Sn},e[17]=V,e[18]=q,e[19]=F):F=e[19];const v=lt(F);let H;e[20]!==d||e[21]!==x||e[22]!==u||e[23]!==T||e[24]!==s?(H=()=>{const M=d.trim();if(!M){ce.error(s("mainPanelTabs.hostingTab.errorSecretNameRequired"));return}if(!u){ce.error(s("mainPanelTabs.hostingTab.errorSecretValueRequired"));return}T.mutate({name:M,value:u,scope:x})},e[20]=d,e[21]=x,e[22]=u,e[23]=T,e[24]=s,e[25]=H):H=e[25];const A=H;let Q,_;e[26]===Symbol.for("react.memo_cache_sentinel")?(_=()=>g(!0),Q=t.jsx(Pt,{}),e[26]=Q,e[27]=_):(Q=e[26],_=e[27]);let W;e[28]!==s?(W=s("mainPanelTabs.hostingTab.addSecret"),e[28]=s,e[29]=W):W=e[29];let J;e[30]!==W?(J=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:_,children:[Q,W]}),e[30]=W,e[31]=J):J=e[31];const U=J;let p;e[32]!==s?(p=s("mainPanelTabs.hostingTab.secrets"),e[32]=s,e[33]=p):p=e[33];const I=i.length>0?U:void 0;let Y;e[34]!==U||e[35]!==v.isPending||e[36]!==m||e[37]!==c||e[38]!==i||e[39]!==s?(Y=c?t.jsx(ht,{}):m?t.jsx(Qe,{children:t.jsx(ot,{children:s("mainPanelTabs.hostingTab.secretsError")})}):i.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(Wt,{className:"size-5"}),title:s("mainPanelTabs.hostingTab.noSecrets"),className:"py-10",buttonComponent:U})}):t.jsx(Qe,{children:i.map(M=>{const Ge=M.scope==="build"?"build":"runtime";return t.jsxs(pt,{children:[t.jsx(Wt,{className:"size-4 shrink-0 text-muted-foreground/60"}),t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[t.jsx("div",{className:"w-20 shrink-0",children:t.jsx(ps,{scope:Ge})}),t.jsx("span",{className:"truncate font-mono text-xs",children:M.name}),M.origin==="worker"&&t.jsx(Re,{variant:"secondary",children:s("mainPanelTabs.hostingTab.secretOnWorker")})]}),t.jsx("span",{className:"font-mono text-xs text-muted-foreground/60",children:s("mainPanelTabs.hostingTab.secretValueHidden")}),t.jsx(et,{label:s("mainPanelTabs.hostingTab.deleteSecret"),onClick:()=>P({name:M.name,scope:Ge}),disabled:v.isPending,className:"text-muted-foreground",children:t.jsx(vt,{})})]},`${M.name}:${Ge}`)})}),e[34]=U,e[35]=v.isPending,e[36]=m,e[37]=c,e[38]=i,e[39]=s,e[40]=Y):Y=e[40];let D;e[41]!==s?(D=s("mainPanelTabs.hostingTab.addSecretTitle"),e[41]=s,e[42]=D):D=e[42];let G;e[43]!==D?(G=t.jsx(yt,{children:t.jsx(St,{children:D})}),e[43]=D,e[44]=G):G=e[44];let O;e[45]!==A?(O=M=>{M.preventDefault(),A()},e[45]=A,e[46]=O):O=e[46];let k;e[47]!==s?(k=s("mainPanelTabs.hostingTab.colName"),e[47]=s,e[48]=k):k=e[48];let E;e[49]!==k?(E=t.jsx(Xe,{htmlFor:"secret-name",children:k}),e[49]=k,e[50]=E):E=e[50];let B;e[51]!==s?(B=s("mainPanelTabs.hostingTab.secretNamePlaceholder"),e[51]=s,e[52]=B):B=e[52];let X;e[53]===Symbol.for("react.memo_cache_sentinel")?(X=M=>f(M.target.value),e[53]=X):X=e[53];let te;e[54]!==d||e[55]!==T.isPending||e[56]!==B?(te=t.jsx(it,{id:"secret-name",placeholder:B,value:d,onChange:X,className:"font-mono text-xs",autoComplete:"off",disabled:T.isPending}),e[54]=d,e[55]=T.isPending,e[56]=B,e[57]=te):te=e[57];let K;e[58]!==E||e[59]!==te?(K=t.jsxs("div",{className:"flex flex-col gap-2",children:[E,te]}),e[58]=E,e[59]=te,e[60]=K):K=e[60];let ne;e[61]!==s?(ne=s("mainPanelTabs.hostingTab.colValue"),e[61]=s,e[62]=ne):ne=e[62];let ie;e[63]!==ne?(ie=t.jsx(Xe,{htmlFor:"secret-value",children:ne}),e[63]=ne,e[64]=ie):ie=e[64];let Pe;e[65]!==s?(Pe=s("mainPanelTabs.hostingTab.secretValuePlaceholder"),e[65]=s,e[66]=Pe):Pe=e[66];let Ce;e[67]===Symbol.for("react.memo_cache_sentinel")?(Ce=M=>b(M.target.value),e[67]=Ce):Ce=e[67];let me;e[68]!==u||e[69]!==T.isPending||e[70]!==Pe?(me=t.jsx(it,{id:"secret-value",type:"password",placeholder:Pe,value:u,onChange:Ce,className:"font-mono text-xs",autoComplete:"new-password",disabled:T.isPending}),e[68]=u,e[69]=T.isPending,e[70]=Pe,e[71]=me):me=e[71];let pe;e[72]!==ie||e[73]!==me?(pe=t.jsxs("div",{className:"flex flex-col gap-2",children:[ie,me]}),e[72]=ie,e[73]=me,e[74]=pe):pe=e[74];let le;e[75]!==s?(le=s("mainPanelTabs.hostingTab.secretScope"),e[75]=s,e[76]=le):le=e[76];let ae;e[77]!==le?(ae=t.jsx(Xe,{children:le}),e[77]=le,e[78]=ae):ae=e[78];let de;e[79]===Symbol.for("react.memo_cache_sentinel")?(de=M=>N(M==="build"?"build":"runtime"),e[79]=de):de=e[79];const De=T.isPending;let fe;e[80]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx(Ot,{className:"w-full",children:t.jsx(Bt,{})}),e[80]=fe):fe=e[80];let ue;e[81]!==s?(ue=s("mainPanelTabs.hostingTab.secretScopeRuntime"),e[81]=s,e[82]=ue):ue=e[82];let oe;e[83]!==ue?(oe=t.jsx(ft,{value:"runtime",children:ue}),e[83]=ue,e[84]=oe):oe=e[84];let Te;e[85]!==s?(Te=s("mainPanelTabs.hostingTab.secretScopeBuild"),e[85]=s,e[86]=Te):Te=e[86];let he;e[87]!==Te?(he=t.jsx(ft,{value:"build",children:Te}),e[87]=Te,e[88]=he):he=e[88];let xe;e[89]!==oe||e[90]!==he?(xe=t.jsxs(qt,{children:[oe,he]}),e[89]=oe,e[90]=he,e[91]=xe):xe=e[91];let ve;e[92]!==x||e[93]!==T.isPending||e[94]!==xe?(ve=t.jsxs(Mt,{value:x,onValueChange:de,disabled:De,children:[fe,xe]}),e[92]=x,e[93]=T.isPending,e[94]=xe,e[95]=ve):ve=e[95];let ye;e[96]!==x||e[97]!==s?(ye=s(x==="build"?"mainPanelTabs.hostingTab.secretScopeBuildHint":"mainPanelTabs.hostingTab.secretScopeRuntimeHint"),e[96]=x,e[97]=s,e[98]=ye):ye=e[98];let ge;e[99]!==ye?(ge=t.jsx("p",{className:"text-xs text-muted-foreground",children:ye}),e[99]=ye,e[100]=ge):ge=e[100];let re;e[101]!==ae||e[102]!==ve||e[103]!==ge?(re=t.jsxs("div",{className:"flex flex-col gap-2",children:[ae,ve,ge]}),e[101]=ae,e[102]=ve,e[103]=ge,e[104]=re):re=e[104];let be;e[105]===Symbol.for("react.memo_cache_sentinel")?(be=()=>g(!1),e[105]=be):be=e[105];const we=T.isPending;let $;e[106]!==s?($=s("mainPanelTabs.hostingTab.cancel"),e[106]=s,e[107]=$):$=e[107];let se;e[108]!==T.isPending||e[109]!==$?(se=t.jsx(Ie,{variant:"outline",type:"button",onClick:be,disabled:we,children:$}),e[108]=T.isPending,e[109]=$,e[110]=se):se=e[110];let Se;e[111]!==d||e[112]!==u||e[113]!==T.isPending?(Se=T.isPending||!d.trim()||!u,e[111]=d,e[112]=u,e[113]=T.isPending,e[114]=Se):Se=e[114];let je;e[115]!==T.isPending||e[116]!==s?(je=T.isPending?s("mainPanelTabs.hostingTab.saving"):s("mainPanelTabs.hostingTab.add"),e[115]=T.isPending,e[116]=s,e[117]=je):je=e[117];let $e;e[118]!==Se||e[119]!==je?($e=t.jsx(Ie,{type:"submit",disabled:Se,children:je}),e[118]=Se,e[119]=je,e[120]=$e):$e=e[120];let ze;e[121]!==se||e[122]!==$e?(ze=t.jsxs(Nt,{children:[se,$e]}),e[121]=se,e[122]=$e,e[123]=ze):ze=e[123];let Ke;e[124]!==O||e[125]!==K||e[126]!==pe||e[127]!==re||e[128]!==ze?(Ke=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:O,children:[K,pe,re,ze]}),e[124]=O,e[125]=K,e[126]=pe,e[127]=re,e[128]=ze,e[129]=Ke):Ke=e[129];let Le;e[130]!==G||e[131]!==Ke?(Le=t.jsxs(Ct,{className:"sm:max-w-md",children:[G,Ke]}),e[130]=G,e[131]=Ke,e[132]=Le):Le=e[132];let _e;e[133]!==h||e[134]!==Le?(_e=t.jsx(Dt,{open:h,onOpenChange:g,children:Le}),e[133]=h,e[134]=Le,e[135]=_e):_e=e[135];const Be=C!=null;let Ve;e[136]===Symbol.for("react.memo_cache_sentinel")?(Ve=M=>{M||P(null)},e[136]=Ve):Ve=e[136];let ke;e[137]!==s?(ke=s("mainPanelTabs.hostingTab.confirmDeleteSecretTitle"),e[137]=s,e[138]=ke):ke=e[138];const Je=C?.name??"";let He;e[139]!==s||e[140]!==Je?(He=s("mainPanelTabs.hostingTab.confirmDeleteSecretDescription",{name:Je}),e[139]=s,e[140]=Je,e[141]=He):He=e[141];let Ee;e[142]!==s?(Ee=s("mainPanelTabs.hostingTab.deleteSecret"),e[142]=s,e[143]=Ee):Ee=e[143];let Oe;e[144]!==v||e[145]!==C?(Oe=()=>{C&&v.mutate(C)},e[144]=v,e[145]=C,e[146]=Oe):Oe=e[146];let qe;e[147]!==v.isPending||e[148]!==Be||e[149]!==ke||e[150]!==He||e[151]!==Ee||e[152]!==Oe?(qe=t.jsx(wt,{open:Be,onOpenChange:Ve,title:ke,description:He,confirmLabel:Ee,pending:v.isPending,onConfirm:Oe}),e[147]=v.isPending,e[148]=Be,e[149]=ke,e[150]=He,e[151]=Ee,e[152]=Oe,e[153]=qe):qe=e[153];let Ue;return e[154]!==p||e[155]!==I||e[156]!==Y||e[157]!==_e||e[158]!==qe?(Ue=t.jsxs(ut,{title:p,actions:I,children:[Y,_e,qe]}),e[154]=p,e[155]=I,e[156]=Y,e[157]=_e,e[158]=qe,e[159]=Ue):Ue=e[159],Ue}function Sn(r){return ce.error(rt(r))}function Nn(r){return ce.error(rt(r))}const Cn=3e4;function El(r){const e=ee.c(111),{virtualMcpId:o}=r,l=Ae(),{org:a}=Ds(),i=Rs(o),c=Fs(i),m=!!c,s=c?`/api/${a.slug}/hosting/${encodeURIComponent(c)}`:"";let n;e[0]!==s||e[1]!==m?(n=(O,k)=>({queryKey:O,queryFn:()=>Qt(`${s}${k}`),enabled:m,retry:!1,staleTime:Cn}),e[0]=s,e[1]=m,e[2]=n):n=e[2];const h=n,g=c??"",d=ct(h(Ye.hostingDeployments(a.slug,g),"/deployments")),f=ct(h(Ye.hostingEnv(a.slug,g),"/env")),u=ct(h(Ye.hostingSecrets(a.slug,g),"/secrets")),b=ct(h(Ye.hostingRedirects(a.slug,g),"/redirects")),x=ct(h(Ye.hostingDomains(a.slug,g),"/domains"));if(!c){let O;e[3]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(kt,{className:"size-5"}),e[3]=O):O=e[3];let k;e[4]!==l?(k=l("mainPanelTabs.hostingTab.noSiteTitle"),e[4]=l,e[5]=k):k=e[5];let E;e[6]!==l?(E=l("mainPanelTabs.hostingTab.noSiteDescription"),e[6]=l,e[7]=E):E=e[7];let B;return e[8]!==k||e[9]!==E?(B=t.jsx("div",{className:"flex flex-1 items-center justify-center p-6",children:t.jsx(Ze,{icon:O,title:k,description:E})}),e[8]=k,e[9]=E,e[10]=B):B=e[10],B}if(jt(d.error)&&jt(f.error)&&jt(b.error)){let O;e[11]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(kt,{className:"size-5"}),e[11]=O):O=e[11];let k;e[12]!==l?(k=l("mainPanelTabs.hostingTab.notConnectedTitle"),e[12]=l,e[13]=k):k=e[13];let E;e[14]!==l?(E=l("mainPanelTabs.hostingTab.notConnectedDescription"),e[14]=l,e[15]=E):E=e[15];let B;return e[16]!==k||e[17]!==E?(B=t.jsx("div",{className:"flex flex-1 items-center justify-center p-6",children:t.jsx(Ze,{icon:O,title:k,description:E})}),e[16]=k,e[17]=E,e[18]=B):B=e[18],B}let C,P,S,y,R,w,j,T,V,q;if(e[19]!==d.data||e[20]!==x.data||e[21]!==f.data||e[22]!==b.data||e[23]!==u.data){P=mt(d.data,"items");let O;e[34]!==f.data?(O=mt(f.data,"vars"),e[34]=f.data,e[35]=O):O=e[35],R=O;let k;e[36]!==f.data?(k=mt(f.data,"codeVars"),e[36]=f.data,e[37]=k):k=e[37],C=k;let E;e[38]!==u.data?(E=mt(u.data,"secrets"),e[38]=u.data,e[39]=E):E=e[39],V=E;let B;e[40]!==b.data?(B=mt(b.data,"items"),e[40]=b.data,e[41]=B):B=e[41],T=B;const X=x.data;let te;e[42]!==X?.items?(te=X?.items??[],e[42]=X?.items,e[43]=te):te=e[43],y=te;let K;e[44]!==X?.dnsTemplate?(K=X?.dnsTemplate??[],e[44]=X?.dnsTemplate,e[45]=K):K=e[45],S=K;const ne=P.find(wn);w=zt((ne??P.find(Dn))?.framework),j=ne?.servingUrl??null,q=j?j.replace(/^https?:\/\//,"").replace(/\/$/,""):null,e[19]=d.data,e[20]=x.data,e[21]=f.data,e[22]=b.data,e[23]=u.data,e[24]=C,e[25]=P,e[26]=S,e[27]=y,e[28]=R,e[29]=w,e[30]=j,e[31]=T,e[32]=V,e[33]=q}else C=e[24],P=e[25],S=e[26],y=e[27],R=e[28],w=e[29],j=e[30],T=e[31],V=e[32],q=e[33];const F=q;let v;e[46]!==s||e[47]!==a.slug||e[48]!==c?(v=t.jsx(Gs,{base:s,orgSlug:a.slug,site:c}),e[46]=s,e[47]=a.slug,e[48]=c,e[49]=v):v=e[49];let H;e[50]!==l?(H=l("mainPanelTabs.hostingTab.title"),e[50]=l,e[51]=H):H=e[51];let A;e[52]!==w?(A=w&&t.jsx(Re,{variant:"secondary",children:w}),e[52]=w,e[53]=A):A=e[53];let Q;e[54]!==H||e[55]!==A?(Q=t.jsxs("span",{className:"inline-flex items-center gap-2.5",children:[H,A]}),e[54]=H,e[55]=A,e[56]=Q):Q=e[56];let _;e[57]!==v||e[58]!==Q?(_=t.jsx(Jt.Title,{actions:v,children:Q}),e[57]=v,e[58]=Q,e[59]=_):_=e[59];let W;e[60]!==F||e[61]!==j?(W=j&&F&&t.jsx("p",{className:"flex flex-wrap items-center gap-x-1.5 text-sm text-muted-foreground",children:t.jsxs("a",{href:j,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 font-mono text-xs text-foreground hover:underline",children:[F,t.jsx(_t,{className:"size-3"})]})}),e[60]=F,e[61]=j,e[62]=W):W=e[62];let J;e[63]!==_||e[64]!==W?(J=t.jsxs("div",{className:"flex flex-col gap-2",children:[_,W]}),e[63]=_,e[64]=W,e[65]=J):J=e[65];let U;e[66]!==s||e[67]!==P||e[68]!==d.error||e[69]!==d.isLoading||e[70]!==m||e[71]!==a.slug||e[72]!==c?(U=t.jsx(nn,{base:s,orgSlug:a.slug,site:c,enabled:m,deployments:P,isLoading:d.isLoading,error:d.error}),e[66]=s,e[67]=P,e[68]=d.error,e[69]=d.isLoading,e[70]=m,e[71]=a.slug,e[72]=c,e[73]=U):U=e[73];let p;e[74]!==s||e[75]!==C||e[76]!==f.error||e[77]!==f.isLoading||e[78]!==R||e[79]!==a.slug||e[80]!==c?(p=t.jsx(gn,{base:s,orgSlug:a.slug,site:c,envVars:R,codeVars:C,isLoading:f.isLoading,error:f.error}),e[74]=s,e[75]=C,e[76]=f.error,e[77]=f.isLoading,e[78]=R,e[79]=a.slug,e[80]=c,e[81]=p):p=e[81];let I;e[82]!==s||e[83]!==a.slug||e[84]!==V||e[85]!==u.error||e[86]!==u.isLoading||e[87]!==c?(I=t.jsx(yn,{base:s,orgSlug:a.slug,site:c,secrets:V,isLoading:u.isLoading,error:u.error}),e[82]=s,e[83]=a.slug,e[84]=V,e[85]=u.error,e[86]=u.isLoading,e[87]=c,e[88]=I):I=e[88];let Y;e[89]!==s||e[90]!==S||e[91]!==y||e[92]!==x.error||e[93]!==x.isLoading||e[94]!==a.slug||e[95]!==c?(Y=t.jsx(fn,{base:s,orgSlug:a.slug,site:c,domains:y,dnsTemplate:S,isLoading:x.isLoading,error:x.error}),e[89]=s,e[90]=S,e[91]=y,e[92]=x.error,e[93]=x.isLoading,e[94]=a.slug,e[95]=c,e[96]=Y):Y=e[96];let D;e[97]!==s||e[98]!==a.slug||e[99]!==T||e[100]!==b.error||e[101]!==b.isLoading||e[102]!==c?(D=t.jsx(jn,{base:s,orgSlug:a.slug,site:c,redirects:T,isLoading:b.isLoading,error:b.error}),e[97]=s,e[98]=a.slug,e[99]=T,e[100]=b.error,e[101]=b.isLoading,e[102]=c,e[103]=D):D=e[103];let G;return e[104]!==U||e[105]!==p||e[106]!==I||e[107]!==Y||e[108]!==D||e[109]!==J?(G=t.jsx("div",{className:"h-full min-h-0 overflow-y-auto",children:t.jsx(Jt.Body,{maxWidth:"max-w-5xl",children:t.jsxs(ws,{children:[J,U,p,I,Y,D]})})}),e[104]=U,e[105]=p,e[106]=I,e[107]=Y,e[108]=D,e[109]=J,e[110]=G):G=e[110],G}function Dn(r){return r.framework}function wn(r){return r.up===!0}export{El as HostingTab};
|
|
1
|
+
import{c as ee,j as t,a1 as ns,B as Ie,a2 as is,a4 as ls,l as xt,b as Ae,b8 as dt,b6 as Ps,b1 as vs,t as ce,n as bt,r as Z,e as lt,m as ct,K as Ye,bm as ys,bl as Ss,bn as Ns,bo as Cs,z as Wt,G as Ds,P as Jt,b5 as ws}from"./index-y6Z5iMfg.js";import{n as _t}from"./LinkExternal01-CzRiacvQ.js";import{be as $s,bf as as,aD as Ls,aY as _s,bg as ks,k as kt,C as Yt,av as Gt,aF as Es}from"./agent-icon-6EllA70W.js";import{B as Re}from"./badge-GP_pc1i_.js";import{E as Ze}from"./empty-state-SN5mEPhX.js";import{u as Rs}from"./use-virtual-mcp-Bnfc4yEo.js";import{r as Fs}from"./site-slug-uya6Wp4-.js";import{i as As}from"./AlertCircle-Df7Uu4Sr.js";import{d as gt}from"./UserSquare-CXhk4rLY.js";import{i as zs}from"./Zap-nPZGKdXf.js";import{c as os,d as rs,b as cs,f as ms,g as ds,e as fs,a as us,A as hs}from"./alert-dialog-CFCsKBpN.js";import{d as Vs,a as nt,T as Fe,c as Et,e as Rt,b as Ft}from"./table-DSIbUmyY.js";import{i as xs}from"./ChevronRight-B76sbAXC.js";import{a as Hs}from"./Copy01-rsN5AnPv.js";import{am as Vt,an as Ht,al as Bs}from"./automation-runs-CoIkXCsB.js";import{i as At}from"./Globe01-Df6dZmsR.js";import{s as Pt}from"./Plus-Bac7Bl-V.js";import{s as vt}from"./Trash01-C6vCLvEw.js";import{c as yt,d as St,e as Nt,b as Ct,D as Dt}from"./dialog-CyDGwxcX.js";import{I as it}from"./input-DRjCNSPN.js";import{L as Xe}from"./label-DGsSvY2I.js";import{i as Os}from"./Settings02-t15FjJbr.js";import{s as qs}from"./Eye-DFgd5114.js";import{a as Bt,b as Ot,c as ft,d as qt,S as Mt}from"./select-BGnwGqnU.js";import{i as Ms}from"./ArrowRight-CuO69upc.js";import"./Tool01-CmpQe3MS.js";import"./ArrowUp-DmWBbOjK.js";import"./ArrowLeft-Ce4LVTaQ.js";import"./Tool02-BAA6OFl0.js";import"./TrendUp01-fHRYAiew.js";import"./ZoomOut-DhJWoynj.js";import"./Users03-B4Km0_9u.js";import"./CheckCircle-DWvslkKl.js";import"./Check-C1wq38_E.js";import"./ChevronUp-B0KEDz5f.js";import"./ChevronSelectorVertical-C4wJ3zDR.js";import"./DotsVertical-CBmzJDPB.js";import"./CreditCard01-Cqs_Biv7.js";import"./Download01-zZEPtQ0U.js";import"./Share07-CJrTonmW.js";import"./GitBranch01-B7iymaqC.js";import"./XClose-DvenHyNp.js";import"./HardDrive-CiahcooN.js";import"./Image01-CMpSR3RQ.js";import"./Key01-t3bX5YI3.js";import"./Link01-pX5C3rEv.js";import"./Monitor01-jzbehxNG.js";import"./Sun-vdviKSpi.js";import"./Package-CiAH049d.js";import"./Palette-CmMvG40G.js";import"./Play-k9_JCuZW.js";import"./SearchLg-iYej-M-S.js";import"./SearchMd-hxPQERkg.js";import"./Shield01-DS-tpugO.js";import"./Stars01-ByE0-f1z.js";import"./Upload01-lE597uPz.js";import"./User01-BPodfm7s.js";import"./Users01-Dgbd4CM_.js";import"./XCircle-BK1898xU.js";import"./use-mcp-client-Cw1fcLqm.js";import"./auth-DeD0YpKg.js";import"./useInfiniteQuery-DThUrotQ.js";import"./infiniteQueryObserver-CvFtTJPb.js";import"./use-connection-ClORxmw4.js";import"./empty-state-DfBha5W6.js";import"./use-infinite-scroll-Bw5rNIGx.js";import"./use-members-C23rfxcZ.js";import"./use-org-auth-client-DvlpnDFO.js";import"./use-automations-BgzAjzua.js";import"./useSuspenseInfiniteQuery-Dsg0_SX3.js";import"./avatar-CfO1mReu.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-copy-DUxpBqXm.js";import"./markdown-Y6owwpHy.js";import"./use-panel-navigate-C6Ga2vR8.js";import"./use-destination-route-CY15sZqw.js";import"./hooks-Bv30myGB.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-Bm_3HC4t.js";import"./task-board-By8eCqZc.js";import"./schema-BDy_4D7A.js";import"./chat-context-C6UT7ht1.js";import"./autosend-DI1ZpOT0.js";import"./thread-intent-q_RVjRN0.js";import"./slugify-CEUa2lfQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-BMexfNaB.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-C0NWoSQc.js";import"./thread-route-jI9qvJe_.js";import"./use-organization-settings-DucmPYOE.js";import"./monaco-editor-D3QSLeam.js";import"./editor-D7S6MtwI.js";import"./mcp-app-renderer-Cy31bAY0.js";import"./types-BB_Up-3A.js";import"./shell-layout-CTNVA2t4.js";import"./anchors-yqDzZN4K.js";import"./project-icon-DQTfNALl.js";import"./github-repo-CTPv5ZM2.js";import"./source-system-tabs-CnEGUb4r.js";import"./command-CF7nzIN2.js";import"./index-B_j4TgZF.js";import"./integration-icon-CFGOsRgH.js";import"./required-auth-layout-mSUodrzA.js";import"./use-org-sso-xd-5IiLc.js";import"./use-org-notice-DlsdC1WA.js";import"./use-navigate-to-agent-COVw0ub8.js";import"./use-mcp-prompts-CtjkJFfg.js";import"./form-BnUN8JhF.js";import"./file-type-icon--TvA6C0i.js";function Lt(r,e){return r.name===e.name&&(r.scope??"runtime")===e.scope}function mt(r,e){if(Array.isArray(r))return r;if(r&&typeof r=="object"){const o=r[e];if(Array.isArray(o))return o}return[]}function zt(r){return r==="deco-deno"?"Deco Deno":r==="deco-tanstack"?"Deco TanStack":r??null}function Is(r){const e=(r??"").toLowerCase();return e.includes("ready")||e.includes("success")||e.includes("active")?"success":e.includes("fail")||e.includes("error")?"destructive":e.includes("build")||e.includes("pend")||e.includes("progress")?"warning":"secondary"}function Xt(r){if(!r)return"—";const e=new Date(r).getTime();if(Number.isNaN(e))return"—";const o=Math.round((Date.now()-e)/1e3),l=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),a=[["year",31536e3],["month",2592e3],["day",86400],["hour",3600],["minute",60]];for(const[i,c]of a)if(Math.abs(o)>=c)return l.format(-Math.round(o/c),i);return l.format(-o,"second")}function Qs(r){if(r==null||!Number.isFinite(r))return"—";if(r<1e3)return`${Math.round(r)}ms`;const e=r/1e3;if(e<60)return`${e.toFixed(e>=10?0:1)}s`;const o=Math.round(e);return`${Math.floor(o/60)}m ${o%60}s`}class It extends Error{constructor(e,o){super(e),this.status=o}status}function jt(r){return r instanceof It&&r.status===401}function rt(r){return r instanceof Error?r.message:String(r)}function Us(r){const e=r.trim();if(!e)return null;const l=(e.endsWith(".")?e.slice(0,-1):e).split(".");if(l.length<2)return"Domain must include a TLD (e.g., example.com)";if(e.length>253)return"Domain name is too long (max 253 characters)";for(const i of l){if(i.length>63)return`Label "${i}" is too long (max 63 characters)`;if(!/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/i.test(i))return`Label "${i}" has invalid characters or format`}const a=l[l.length-1]??"";return/^[0-9]+$/.test(a)?"Domain must include a valid TLD, not a number":null}function gs(r,e){return r&&typeof r=="object"&&"error"in r?String(r.error):`request failed (${e})`}async function Qt(r){const e=await fetch(r),o=await e.json().catch(()=>({}));if(!e.ok)throw new It(gs(o,e.status),e.status);return o}async function at(r,e,o){const l=await fetch(r,{method:e,headers:o!==void 0?{"Content-Type":"application/json"}:{},body:o!==void 0?JSON.stringify(o):void 0}),a=await l.json().catch(()=>({}));if(!l.ok)throw new It(gs(a,l.status),l.status);return a}function et(r){const e=ee.c(19);let o,l,a,i,c,m;e[0]!==r?({label:l,tooltipSide:i,variant:c,size:m,children:o,...a}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=a,e[4]=i,e[5]=c,e[6]=m):(o=e[1],l=e[2],a=e[3],i=e[4],c=e[5],m=e[6]);const s=i===void 0?"top":i,n=c===void 0?"ghost":c,h=m===void 0?"icon-sm":m;let g;e[7]!==o||e[8]!==l||e[9]!==a||e[10]!==h||e[11]!==n?(g=t.jsx(ns,{asChild:!0,children:t.jsx(Ie,{"data-slot":"icon-button","aria-label":l,variant:n,size:h,...a,children:o})}),e[7]=o,e[8]=l,e[9]=a,e[10]=h,e[11]=n,e[12]=g):g=e[12];let d;e[13]!==l||e[14]!==s?(d=t.jsx(is,{side:s,children:l}),e[13]=l,e[14]=s,e[15]=d):d=e[15];let f;return e[16]!==g||e[17]!==d?(f=t.jsxs(ls,{children:[g,d]}),e[16]=g,e[17]=d,e[18]=f):f=e[18],f}function ut(r){const e=ee.c(4),{title:o,actions:l,children:a}=r;let i;return e[0]!==l||e[1]!==a||e[2]!==o?(i=t.jsx(vs,{title:o,actions:l,children:a}),e[0]=l,e[1]=a,e[2]=o,e[3]=i):i=e[3],i}function Qe(r){const e=ee.c(5),{className:o,children:l}=r;let a;e[0]!==o?(a=xt("gap-0 overflow-hidden p-0 divide-y divide-border",o),e[0]=o,e[1]=a):a=e[1];let i;return e[2]!==l||e[3]!==a?(i=t.jsx(Ps,{className:a,children:l}),e[2]=l,e[3]=a,e[4]=i):i=e[4],i}function pt(r){const e=ee.c(5),{className:o,children:l}=r;let a;e[0]!==o?(a=xt("flex min-h-12 items-center gap-3 px-4 py-2",o),e[0]=o,e[1]=a):a=e[1];let i;return e[2]!==l||e[3]!==a?(i=t.jsx("div",{className:a,children:l}),e[2]=l,e[3]=a,e[4]=i):i=e[4],i}function ot(r){const e=ee.c(2),{children:o}=r;let l;return e[0]!==o?(l=t.jsx("p",{className:"px-4 py-6 text-sm text-muted-foreground",children:o}),e[0]=o,e[1]=l):l=e[1],l}function ht(r){const e=ee.c(2),{rows:o}=r,l=o===void 0?3:o;let a;return e[0]!==l?(a=t.jsx(Qe,{children:Array.from({length:l},Ks)}),e[0]=l,e[1]=a):a=e[1],a}function Ks(r,e){return t.jsxs(pt,{children:[t.jsx(dt,{className:"h-4 w-40"}),t.jsx(dt,{className:"h-4 flex-1"}),t.jsx(dt,{className:"size-7 rounded-lg"})]},e)}function Me(r){const e=ee.c(5),{className:o,children:l}=r;let a;e[0]!==o?(a=xt("text-xs font-medium text-muted-foreground",o),e[0]=o,e[1]=a):a=e[1];let i;return e[2]!==l||e[3]!==a?(i=t.jsx(Vs,{className:a,children:l}),e[2]=l,e[3]=a,e[4]=i):i=e[4],i}function Ut(r){const e=ee.c(12),{open:o,onClick:l}=r,a=Ae();let i;e[0]!==o||e[1]!==a?(i=a(o?"mainPanelTabs.hostingTab.hideDetails":"mainPanelTabs.hostingTab.showDetails"),e[0]=o,e[1]=a,e[2]=i):i=e[2];const c=o&&"rotate-90";let m;e[3]!==c?(m=xt("transition-transform duration-200 motion-reduce:transition-none",c),e[3]=c,e[4]=m):m=e[4];let s;e[5]!==m?(s=t.jsx(xs,{className:m}),e[5]=m,e[6]=s):s=e[6];let n;return e[7]!==l||e[8]!==o||e[9]!==i||e[10]!==s?(n=t.jsx(et,{label:i,size:"icon-sm",className:"-ml-1.5 text-muted-foreground","aria-expanded":o,onClick:l,children:s}),e[7]=l,e[8]=o,e[9]=i,e[10]=s,e[11]=n):n=e[11],n}function Ws(r){const e=ee.c(8),{open:o,colSpan:l,children:a}=r;let i;e[0]!==a?(i=t.jsx(Vt,{children:t.jsx("div",{className:"border-b border-border bg-muted/30 px-4 py-3",children:a})}),e[0]=a,e[1]=i):i=e[1];let c;e[2]!==o||e[3]!==i?(c=t.jsx(Ht,{open:o,children:i}),e[2]=o,e[3]=i,e[4]=c):c=e[4];let m;return e[5]!==l||e[6]!==c?(m=t.jsx(nt,{className:"border-0 hover:bg-transparent",children:t.jsx(Fe,{colSpan:l,className:"p-0 whitespace-normal",children:c})}),e[5]=l,e[6]=c,e[7]=m):m=e[7],m}function bs(r){const e=ee.c(5),{open:o,children:l}=r;let a;e[0]!==l?(a=t.jsx(Vt,{children:t.jsx("div",{className:"border-t border-border bg-muted/30 px-4 py-3",children:l})}),e[0]=l,e[1]=a):a=e[1];let i;return e[2]!==o||e[3]!==a?(i=t.jsx(Ht,{open:o,children:a}),e[2]=o,e[3]=a,e[4]=i):i=e[4],i}function ps(r){const e=ee.c(6),{scope:o}=r,l=Ae(),a=o==="build"?"outline":"secondary";let i;e[0]!==o||e[1]!==l?(i=l(o==="build"?"mainPanelTabs.hostingTab.secretScopeBuild":"mainPanelTabs.hostingTab.secretScopeRuntime"),e[0]=o,e[1]=l,e[2]=i):i=e[2];let c;return e[3]!==a||e[4]!==i?(c=t.jsx(Re,{variant:a,children:i}),e[3]=a,e[4]=i,e[5]=c):c=e[5],c}function Js(r){const e=ee.c(9),{value:o}=r,l=Ae();let a;e[0]!==l?(a=l("mainPanelTabs.hostingTab.dnsCopy"),e[0]=l,e[1]=a):a=e[1];let i;e[2]!==l||e[3]!==o?(i=()=>{if(!navigator.clipboard){ce.error(l("mainPanelTabs.hostingTab.dnsCopyError"));return}navigator.clipboard.writeText(o).then(()=>ce.success(l("mainPanelTabs.hostingTab.dnsCopied")),()=>ce.error(l("mainPanelTabs.hostingTab.dnsCopyError")))},e[2]=l,e[3]=o,e[4]=i):i=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Hs,{className:"size-3.5"}),e[5]=c):c=e[5];let m;return e[6]!==a||e[7]!==i?(m=t.jsx(et,{label:a,onClick:i,children:c}),e[6]=a,e[7]=i,e[8]=m):m=e[8],m}function wt(r){const e=ee.c(28),{open:o,onOpenChange:l,title:a,description:i,confirmLabel:c,pending:m,onConfirm:s}=r,n=Ae();let h;e[0]!==a?(h=t.jsx(os,{children:a}),e[0]=a,e[1]=h):h=e[1];let g;e[2]!==i?(g=t.jsx(rs,{children:i}),e[2]=i,e[3]=g):g=e[3];let d;e[4]!==h||e[5]!==g?(d=t.jsxs(cs,{children:[h,g]}),e[4]=h,e[5]=g,e[6]=d):d=e[6];let f;e[7]!==n?(f=n("mainPanelTabs.hostingTab.cancel"),e[7]=n,e[8]=f):f=e[8];let u;e[9]!==m||e[10]!==f?(u=t.jsx(ms,{disabled:m,children:f}),e[9]=m,e[10]=f,e[11]=u):u=e[11];let b;e[12]!==s?(b=S=>{S.preventDefault(),s()},e[12]=s,e[13]=b):b=e[13];let x;e[14]!==c||e[15]!==m||e[16]!==b?(x=t.jsx(ds,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:b,disabled:m,children:c}),e[14]=c,e[15]=m,e[16]=b,e[17]=x):x=e[17];let N;e[18]!==u||e[19]!==x?(N=t.jsxs(fs,{children:[u,x]}),e[18]=u,e[19]=x,e[20]=N):N=e[20];let C;e[21]!==d||e[22]!==N?(C=t.jsxs(us,{children:[d,N]}),e[21]=d,e[22]=N,e[23]=C):C=e[23];let P;return e[24]!==l||e[25]!==o||e[26]!==C?(P=t.jsx(hs,{open:o,onOpenChange:l,children:C}),e[24]=l,e[25]=o,e[26]=C,e[27]=P):P=e[27],P}const Ys=8;function Gs(r){const e=ee.c(54),{base:o,orgSlug:l,site:a}=r,i=Ae(),c=bt(),[m,s]=Z.useState(!1);let n;e[0]!==o?(n=()=>at(`${o}/deploy`,"POST",{mode:"current"}),e[0]=o,e[1]=n):n=e[1];let h;e[2]!==l||e[3]!==c||e[4]!==a||e[5]!==i?(h=()=>{c.invalidateQueries({queryKey:Ye.hostingDeployments(l,a)}),c.invalidateQueries({queryKey:Ye.hostingDeploymentHistory(l,a)}),ce.success(i("mainPanelTabs.hostingTab.toastDeployQueued")),s(!1)},e[2]=l,e[3]=c,e[4]=a,e[5]=i,e[6]=h):h=e[6];let g;e[7]!==n||e[8]!==h?(g={mutationFn:n,onSuccess:h,onError:Xs},e[7]=n,e[8]=h,e[9]=g):g=e[9];const d=lt(g);let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=()=>s(!0),e[10]=f):f=e[10];let u;e[11]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(gt,{}),e[11]=u):u=e[11];let b;e[12]!==d.isPending||e[13]!==i?(b=d.isPending?i("mainPanelTabs.hostingTab.deploying"):i("mainPanelTabs.hostingTab.deploy"),e[12]=d.isPending,e[13]=i,e[14]=b):b=e[14];let x;e[15]!==d.isPending||e[16]!==b?(x=t.jsxs(Ie,{size:"sm",onClick:f,disabled:d.isPending,children:[u,b]}),e[15]=d.isPending,e[16]=b,e[17]=x):x=e[17];let N;e[18]!==i?(N=i("mainPanelTabs.hostingTab.deployConfirmTitle"),e[18]=i,e[19]=N):N=e[19];let C;e[20]!==N?(C=t.jsx(os,{children:N}),e[20]=N,e[21]=C):C=e[21];let P;e[22]!==i?(P=i("mainPanelTabs.hostingTab.deployConfirmDescription"),e[22]=i,e[23]=P):P=e[23];let S;e[24]!==P?(S=t.jsx(rs,{children:P}),e[24]=P,e[25]=S):S=e[25];let y;e[26]!==S||e[27]!==C?(y=t.jsxs(cs,{children:[C,S]}),e[26]=S,e[27]=C,e[28]=y):y=e[28];const R=d.isPending;let w;e[29]!==i?(w=i("mainPanelTabs.hostingTab.cancel"),e[29]=i,e[30]=w):w=e[30];let j;e[31]!==d.isPending||e[32]!==w?(j=t.jsx(ms,{disabled:R,children:w}),e[31]=d.isPending,e[32]=w,e[33]=j):j=e[33];let T;e[34]!==d?(T=_=>{_.preventDefault(),d.mutate()},e[34]=d,e[35]=T):T=e[35];const V=d.isPending;let q;e[36]!==i?(q=i("mainPanelTabs.hostingTab.deploy"),e[36]=i,e[37]=q):q=e[37];let F;e[38]!==d.isPending||e[39]!==T||e[40]!==q?(F=t.jsx(ds,{onClick:T,disabled:V,children:q}),e[38]=d.isPending,e[39]=T,e[40]=q,e[41]=F):F=e[41];let v;e[42]!==j||e[43]!==F?(v=t.jsxs(fs,{children:[j,F]}),e[42]=j,e[43]=F,e[44]=v):v=e[44];let H;e[45]!==y||e[46]!==v?(H=t.jsxs(us,{children:[y,v]}),e[45]=y,e[46]=v,e[47]=H):H=e[47];let A;e[48]!==m||e[49]!==H?(A=t.jsx(hs,{open:m,onOpenChange:s,children:H}),e[48]=m,e[49]=H,e[50]=A):A=e[50];let Q;return e[51]!==A||e[52]!==x?(Q=t.jsxs(t.Fragment,{children:[x,A]}),e[51]=A,e[52]=x,e[53]=Q):Q=e[53],Q}function Xs(r){return ce.error(rt(r))}function Zs(r,e){const o=(r??"").toLowerCase();return o.includes("rollback")?t.jsxs(Re,{variant:"warning",children:[t.jsx(_s,{}),e("mainPanelTabs.hostingTab.actionRollback")]}):o.includes("redeploy")?t.jsxs(Re,{variant:"secondary",children:[t.jsx(ks,{}),e("mainPanelTabs.hostingTab.actionRedeploy")]}):t.jsxs(Re,{variant:"secondary",children:[t.jsx(gt,{}),e("mainPanelTabs.hostingTab.actionDeploy")]})}function en(r,e,o){const l=(r??"").toLowerCase();return l==="build"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(as,{}),o("mainPanelTabs.hostingTab.typeBuild")]}):l==="fast-deploy"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(zs,{}),o("mainPanelTabs.hostingTab.typeFastDeploy")]}):l==="deploy"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(gt,{}),o("mainPanelTabs.hostingTab.typeDeploy")]}):Zs(e,o)}function tn(r,e){const o=(r??"").toLowerCase();return o==="success"?t.jsx(Re,{variant:"success",children:e("mainPanelTabs.hostingTab.outcomeSuccess")}):o==="failure"?t.jsx(Re,{variant:"destructive",children:e("mainPanelTabs.hostingTab.outcomeFailure")}):o==="pending"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(Ls,{}),e("mainPanelTabs.hostingTab.outcomePending")]}):null}function Zt(r){const e=ee.c(7),{commit:o,onClick:l}=r,a=Ae();let i;e[0]!==a?(i=a("mainPanelTabs.hostingTab.buildLogs"),e[0]=a,e[1]=i):i=e[1];const c=!o;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(as,{}),e[2]=m):m=e[2];let s;return e[3]!==l||e[4]!==i||e[5]!==c?(s=t.jsx(et,{label:i,onClick:l,disabled:c,children:m}),e[3]=l,e[4]=i,e[5]=c,e[6]=s):s=e[6],s}function sn(r){const e=ee.c(37),{base:o,orgSlug:l,site:a,target:i,onOpenChange:c}=r,m=Ae(),s=i!=null,n=i?.commit??"",h=i?.env??"";let g;e[0]!==n||e[1]!==h||e[2]!==l||e[3]!==a?(g=Ye.hostingBuildLogs(l,a,n,h),e[0]=n,e[1]=h,e[2]=l,e[3]=a,e[4]=g):g=e[4];let d;e[5]!==o||e[6]!==n||e[7]!==h?(d=()=>Qt(`${o}/deployments/logs?commit=${encodeURIComponent(n)}&env=${encodeURIComponent(h)}`),e[5]=o,e[6]=n,e[7]=h,e[8]=d):d=e[8];const f=s&&!!n;let u;e[9]!==g||e[10]!==d||e[11]!==f?(u={queryKey:g,queryFn:d,enabled:f,retry:!1,staleTime:0,gcTime:0,refetchOnMount:"always"},e[9]=g,e[10]=d,e[11]=f,e[12]=u):u=e[12];const b=ct(u),x=b.data;let N;e[13]!==m?(N=m("mainPanelTabs.hostingTab.buildLogsTitle"),e[13]=m,e[14]=N):N=e[14];let C;e[15]!==N?(C=t.jsx(ys,{children:N}),e[15]=N,e[16]=C):C=e[16];let P;e[17]!==n||e[18]!==m?(P=m("mainPanelTabs.hostingTab.buildLogsCommit",{commit:n.slice(0,7)}),e[17]=n,e[18]=m,e[19]=P):P=e[19];let S;e[20]!==P?(S=t.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:P}),e[20]=P,e[21]=S):S=e[21];let y;e[22]!==C||e[23]!==S?(y=t.jsxs(Ss,{className:"shrink-0 border-b border-border px-5 py-5 md:px-6",children:[C,S]}),e[22]=C,e[23]=S,e[24]=y):y=e[24];let R;e[25]!==x||e[26]!==b.error||e[27]!==b.isLoading||e[28]!==m?(R=t.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-5 md:px-6",children:jt(b.error)?t.jsx(Ze,{icon:t.jsx(kt,{className:"size-5"}),title:m("mainPanelTabs.hostingTab.notConnectedTitle"),description:m("mainPanelTabs.hostingTab.notConnectedDescription")}):b.isLoading?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(dt,{className:"h-4 w-full"}),t.jsx(dt,{className:"h-4 w-full"}),t.jsx(dt,{className:"h-4 w-2/3"})]}):b.error?t.jsx(ot,{children:m("mainPanelTabs.hostingTab.buildLogsError")}):x&&x.configured===!1?t.jsxs("div",{className:"flex flex-col items-center gap-2 rounded-lg border border-border bg-muted/30 px-4 py-8 text-center",children:[t.jsx(As,{className:"size-5 text-muted-foreground"}),t.jsx("p",{className:"text-sm font-medium text-foreground",children:m("mainPanelTabs.hostingTab.buildLogsNotWiredTitle")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:x.reason??m("mainPanelTabs.hostingTab.buildLogsNotWiredDescription")})]}):x?.text?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("pre",{className:"overflow-auto font-mono text-[11px] leading-relaxed text-foreground/80 whitespace-pre-wrap break-words",children:x.text}),x.truncated&&t.jsx("p",{className:"text-xs text-warning",children:m("mainPanelTabs.hostingTab.buildLogsTruncated")}),x.url&&t.jsxs("a",{href:x.url,target:"_blank",rel:"noreferrer",className:"inline-flex w-fit items-center gap-1.5 text-xs text-primary hover:underline",children:[t.jsx(_t,{className:"size-3.5"}),m("mainPanelTabs.hostingTab.buildLogsOpenFull")]})]}):x?.url?t.jsxs("a",{href:x.url,target:"_blank",rel:"noreferrer",className:"inline-flex w-fit items-center gap-1.5 text-sm text-primary hover:underline",children:[t.jsx(_t,{className:"size-4"}),m("mainPanelTabs.hostingTab.buildLogsOpenFull")]}):t.jsx(ot,{children:m("mainPanelTabs.hostingTab.buildLogsEmpty")})}),e[25]=x,e[26]=b.error,e[27]=b.isLoading,e[28]=m,e[29]=R):R=e[29];let w;e[30]!==R||e[31]!==y?(w=t.jsxs(Ns,{className:"flex flex-col gap-0 p-0 sm:max-w-2xl",children:[y,R]}),e[30]=R,e[31]=y,e[32]=w):w=e[32];let j;return e[33]!==c||e[34]!==s||e[35]!==w?(j=t.jsx(Cs,{open:s,onOpenChange:c,children:w}),e[33]=c,e[34]=s,e[35]=w,e[36]=j):j=e[36],j}function nn(r){const e=ee.c(52),{base:o,orgSlug:l,site:a,enabled:i,deployments:c,isLoading:m,error:s}=r,n=Ae(),[h,g]=Z.useState(null),[d,f]=Z.useState(Ys),[u,b]=Z.useState(null);let x;e[0]!==l||e[1]!==a?(x=Ye.hostingDeploymentHistory(l,a),e[0]=l,e[1]=a,e[2]=x):x=e[2];let N;e[3]!==o?(N=()=>Qt(`${o}/deployments/history?limit=50`),e[3]=o,e[4]=N):N=e[4];let C;e[5]!==i||e[6]!==x||e[7]!==N?(C={queryKey:x,queryFn:N,enabled:i,retry:!1,staleTime:3e4},e[5]=i,e[6]=x,e[7]=N,e[8]=C):C=e[8];const P=ct(C);let S,y,R,w;if(e[9]!==c||e[10]!==s||e[11]!==h||e[12]!==d||e[13]!==P.data||e[14]!==P.error||e[15]!==P.isLoading||e[16]!==m||e[17]!==n){const F=mt(P.data,"items"),v=F.slice(0,d),H=F.length-v.length;let A;e[22]!==c?(A=c.find(on)?.commitSha??c.find(an)?.commitSha??null,e[22]=c,e[23]=A):A=e[23];const Q=A;let _;e[24]===Symbol.for("react.memo_cache_sentinel")?(_=(p,I)=>{p&&b({commit:p,env:I??"production"})},e[24]=_):_=e[24];const W=_;let J;e[25]!==n?(J=n("mainPanelTabs.hostingTab.deployments"),e[25]=n,e[26]=J):J=e[26];let U;e[27]!==c||e[28]!==s||e[29]!==h||e[30]!==m||e[31]!==n?(U=m?t.jsx(ht,{}):s?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.deploymentsError")})}):c.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(gt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDeployments"),className:"py-10"})}):t.jsxs(Et,{children:[t.jsx(Rt,{children:t.jsxs(nt,{children:[t.jsx(Me,{className:"pl-4",children:n("mainPanelTabs.hostingTab.colCommit")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colStatus")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colFramework")}),t.jsx(Me,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDuration")}),t.jsx(Me,{className:"text-right",children:n("mainPanelTabs.hostingTab.colUpdated")}),t.jsx(Me,{className:"w-[1%]"})]})}),t.jsx(Ft,{children:c.map(p=>{const I=!!p.buildMessage,Y=h===p.id;return t.jsxs(Z.Fragment,{children:[t.jsxs(nt,{className:xt(I&&"cursor-pointer hover:bg-muted/40"),onClick:I?()=>g(Y?null:p.id):void 0,children:[t.jsx(Fe,{className:"px-4",children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[I?t.jsx(Ut,{open:Y,onClick:()=>g(Y?null:p.id)}):t.jsx($s,{className:"size-4 text-muted-foreground/60"}),t.jsx("span",{className:"font-mono text-xs",children:p.shortCommit??p.commitSha?.slice(0,7)??"—"}),p.production===!0&&t.jsx(Re,{variant:"outline",children:n("mainPanelTabs.hostingTab.production")})]})}),t.jsx(Fe,{children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(Re,{variant:Is(p.phase),children:p.phase??"—"}),p.up===!0&&t.jsx(Re,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),t.jsx(Fe,{className:"text-xs text-muted-foreground",children:zt(p.framework)??"—"}),t.jsx(Fe,{className:"text-right font-mono text-xs text-muted-foreground tabular-nums",children:Qs(p.durationMs)}),t.jsx(Fe,{className:"text-right text-xs text-muted-foreground",children:Xt(p.finishedAt??p.startedAt??p.createdAt)}),t.jsx(Fe,{className:"pr-3 text-right",onClick:ln,children:t.jsx(Zt,{commit:p.commitSha,onClick:()=>W(p.commitSha,p.env)})})]}),I&&t.jsx(Ws,{open:Y,colSpan:6,children:t.jsx("p",{className:"whitespace-pre-wrap break-words font-mono text-xs text-muted-foreground",children:p.buildMessage})})]},p.id)})})]}),e[27]=c,e[28]=s,e[29]=h,e[30]=m,e[31]=n,e[32]=U):U=e[32],e[33]!==U||e[34]!==J?(w=t.jsx(ut,{title:J,children:U}),e[33]=U,e[34]=J,e[35]=w):w=e[35],S=ut,e[36]!==n?(y=n("mainPanelTabs.hostingTab.deployHistory"),e[36]=n,e[37]=y):y=e[37],R=P.isLoading?t.jsx(ht,{}):P.error?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.deployHistoryError")})}):F.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(gt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDeployHistory"),className:"py-10"})}):t.jsxs(Et,{children:[t.jsx(Rt,{children:t.jsxs(nt,{children:[t.jsx(Me,{className:"pl-4",children:n("mainPanelTabs.hostingTab.colAction")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colStatus")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colCommit")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colFramework")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colActor")}),t.jsx(Me,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDate")}),t.jsx(Me,{className:"w-[1%]"})]})}),t.jsxs(Ft,{children:[v.map(p=>{const I=!!Q&&p.commitSha===Q;return t.jsxs(nt,{children:[t.jsx(Fe,{className:"pl-4",children:en(p.type,p.action,n)}),t.jsx(Fe,{children:tn(p.outcome,n)}),t.jsx(Fe,{children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("span",{className:"font-mono text-xs",children:p.commitSha?.slice(0,7)??"—"}),I&&t.jsx(Re,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),t.jsx(Fe,{className:"text-xs text-muted-foreground",children:zt(p.framework)??"—"}),t.jsx(Fe,{className:"text-xs text-muted-foreground",children:p.actor??"—"}),t.jsx(Fe,{className:"text-right text-xs text-muted-foreground",children:Xt(p.createdAt)}),t.jsx(Fe,{className:"pr-3 text-right",children:t.jsx(Zt,{commit:p.commitSha,onClick:()=>W(p.commitSha,p.env)})})]},p.id)}),H>0&&t.jsx(nt,{className:"hover:bg-transparent",children:t.jsx(Fe,{colSpan:7,className:"p-2 text-center",children:t.jsx(Ie,{variant:"ghost",size:"sm",onClick:()=>f(F.length),children:n("mainPanelTabs.hostingTab.showMoreHistory",{count:String(H)})})})})]})]}),e[9]=c,e[10]=s,e[11]=h,e[12]=d,e[13]=P.data,e[14]=P.error,e[15]=P.isLoading,e[16]=m,e[17]=n,e[18]=S,e[19]=y,e[20]=R,e[21]=w}else S=e[18],y=e[19],R=e[20],w=e[21];let j;e[38]!==S||e[39]!==y||e[40]!==R?(j=t.jsx(S,{title:y,children:R}),e[38]=S,e[39]=y,e[40]=R,e[41]=j):j=e[41];let T;e[42]===Symbol.for("react.memo_cache_sentinel")?(T=F=>{F||b(null)},e[42]=T):T=e[42];let V;e[43]!==o||e[44]!==u||e[45]!==l||e[46]!==a?(V=t.jsx(sn,{base:o,orgSlug:l,site:a,target:u,onOpenChange:T}),e[43]=o,e[44]=u,e[45]=l,e[46]=a,e[47]=V):V=e[47];let q;return e[48]!==w||e[49]!==j||e[50]!==V?(q=t.jsxs(t.Fragment,{children:[w,j,V]}),e[48]=w,e[49]=j,e[50]=V,e[51]=q):q=e[51],q}function ln(r){return r.stopPropagation()}function an(r){return r.production===!0&&r.up}function on(r){return r.up===!0}const rn=["16.148.147.194","52.32.122.94","52.35.156.199"];function cn(r){return r.replace(/\.$/,"").split(".").filter(Boolean).length===2}function es(r){const e=r.trim();return e.length>0&&!e.startsWith("/")&&e.includes(".")}function Ts(r){const e=ee.c(24),{records:o}=r,l=Ae();let a;e[0]!==l?(a=l("mainPanelTabs.hostingTab.dnsColType"),e[0]=l,e[1]=a):a=e[1];let i;e[2]!==a?(i=t.jsx(Me,{className:"w-16",children:a}),e[2]=a,e[3]=i):i=e[3];let c;e[4]!==l?(c=l("mainPanelTabs.hostingTab.dnsColName"),e[4]=l,e[5]=c):c=e[5];let m;e[6]!==c?(m=t.jsx(Me,{children:c}),e[6]=c,e[7]=m):m=e[7];let s;e[8]!==l?(s=l("mainPanelTabs.hostingTab.dnsColValue"),e[8]=l,e[9]=s):s=e[9];let n;e[10]!==s?(n=t.jsx(Me,{children:s}),e[10]=s,e[11]=n):n=e[11];let h;e[12]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(Me,{className:"w-10"}),e[12]=h):h=e[12];let g;e[13]!==i||e[14]!==m||e[15]!==n?(g=t.jsx(Rt,{children:t.jsxs(nt,{children:[i,m,n,h]})}),e[13]=i,e[14]=m,e[15]=n,e[16]=g):g=e[16];let d;e[17]!==o?(d=o.map(mn),e[17]=o,e[18]=d):d=e[18];let f;e[19]!==d?(f=t.jsx(Ft,{children:d}),e[19]=d,e[20]=f):f=e[20];let u;return e[21]!==f||e[22]!==g?(u=t.jsxs(Et,{className:"table-fixed",children:[g,f]}),e[21]=f,e[22]=g,e[23]=u):u=e[23],u}function mn(r){return t.jsxs(nt,{children:[t.jsx(Fe,{className:"font-mono text-xs",children:r.type}),t.jsx(Fe,{className:"break-all whitespace-normal font-mono text-xs",children:r.name}),t.jsx(Fe,{className:"break-all whitespace-normal font-mono text-xs text-muted-foreground",children:r.value}),t.jsx(Fe,{className:"text-right",children:t.jsx(Js,{value:r.value})})]},`${r.type}-${r.name}-${r.value}`)}function js(r){const e=ee.c(14),{status:o,children:l}=r,a=Ae();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(At,{className:"size-4 text-muted-foreground"}),e[0]=i):i=e[0];let c;e[1]!==a?(c=a("mainPanelTabs.hostingTab.dnsSetupTitle"),e[1]=a,e[2]=c):c=e[2];let m;e[3]!==c?(m=t.jsx("span",{className:"text-sm font-medium",children:c}),e[3]=c,e[4]=m):m=e[4];let s;e[5]!==o||e[6]!==a?(s=o&&t.jsx(Re,{variant:o.active?"success":"outline",className:"ml-auto",children:o.active?a("mainPanelTabs.hostingTab.dnsActive"):a("mainPanelTabs.hostingTab.dnsAwaiting")}),e[5]=o,e[6]=a,e[7]=s):s=e[7];let n;e[8]!==m||e[9]!==s?(n=t.jsxs("div",{className:"flex items-center gap-2",children:[i,m,s]}),e[8]=m,e[9]=s,e[10]=n):n=e[10];let h;return e[11]!==l||e[12]!==n?(h=t.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[n,l]}),e[11]=l,e[12]=n,e[13]=h):h=e[13],h}function ts(r){const e=ee.c(21),{from:o,source:l}=r,a=Ae();let i,c,m,s,n;if(e[0]!==o||e[1]!==l||e[2]!==a){const d=o.trim().replace(/\.$/,""),f=d?cn(d)?"@":d:"@",u=l==="both";c=js,e[8]!==u?(s={active:u},e[8]=u,e[9]=s):s=e[9];let b;e[10]!==u||e[11]!==a?(b=a(u?"mainPanelTabs.hostingTab.dnsActiveHint":"mainPanelTabs.hostingTab.dnsAwaitingHint"),e[10]=u,e[11]=a,e[12]=b):b=e[12],n=t.jsxs("p",{className:"text-xs text-muted-foreground",children:[a("mainPanelTabs.hostingTab.dnsRedirectIntent",{from:d||"—"})," ",b]}),i=Ts,m=rn.map(x=>({type:"A",name:f,value:x})),e[0]=o,e[1]=l,e[2]=a,e[3]=i,e[4]=c,e[5]=m,e[6]=s,e[7]=n}else i=e[3],c=e[4],m=e[5],s=e[6],n=e[7];let h;e[13]!==i||e[14]!==m?(h=t.jsx(i,{records:m}),e[13]=i,e[14]=m,e[15]=h):h=e[15];let g;return e[16]!==c||e[17]!==s||e[18]!==n||e[19]!==h?(g=t.jsxs(c,{status:s,children:[n,h]}),e[16]=c,e[17]=s,e[18]=n,e[19]=h,e[20]=g):g=e[20],g}function ss(r){const e=ee.c(2),{records:o}=r;if(o.length===0)return null;let l;return e[0]!==o?(l=t.jsx(js,{children:t.jsx(Ts,{records:o})}),e[0]=o,e[1]=l):l=e[1],l}function dn(r){const e=ee.c(16),{domain:o}=r,l=Ae(),a=o.status??"pending";let i;e[0]!==a||e[1]!==l?(i=l(a==="active"?"mainPanelTabs.hostingTab.statusActive":a==="action-required"?"mainPanelTabs.hostingTab.statusActionRequired":"mainPanelTabs.hostingTab.statusPending"),e[0]=a,e[1]=l,e[2]=i):i=e[2];const c=i;let m;e[3]!==o.detail||e[4]!==l?(m=o.detail==="zone-not-onboarded"?l("mainPanelTabs.hostingTab.detailZoneNotOnboarded"):void 0,e[3]=o.detail,e[4]=l,e[5]=m):m=e[5];const s=m,n=a==="active"?"success":a==="action-required"?"warning":"outline";let h;e[6]!==c||e[7]!==n?(h=t.jsx(Re,{variant:n,children:c}),e[6]=c,e[7]=n,e[8]=h):h=e[8];const g=h;if(!s)return g;let d;e[9]!==g?(d=t.jsx(ns,{asChild:!0,children:g}),e[9]=g,e[10]=d):d=e[10];let f;e[11]!==s?(f=t.jsx(is,{className:"max-w-xs",children:s}),e[11]=s,e[12]=f):f=e[12];let u;return e[13]!==d||e[14]!==f?(u=t.jsxs(ls,{children:[d,f]}),e[13]=d,e[14]=f,e[15]=u):u=e[15],u}function fn(r){const e=ee.c(121),{base:o,orgSlug:l,site:a,domains:i,dnsTemplate:c,isLoading:m,error:s}=r,n=Ae(),h=bt(),[g,d]=Z.useState(!1),[f,u]=Z.useState(""),[b,x]=Z.useState(null),[N,C]=Z.useState(null);let P;e[0]!==l||e[1]!==h||e[2]!==a?(P=()=>h.invalidateQueries({queryKey:Ye.hostingDomains(l,a)}),e[0]=l,e[1]=h,e[2]=a,e[3]=P):P=e[3];const S=P;let y;e[4]!==o?(y=$=>at(`${o}/domains`,"PUT",$),e[4]=o,e[5]=y):y=e[5];let R;e[6]!==S||e[7]!==n?(R=()=>{S(),ce.success(n("mainPanelTabs.hostingTab.toastDomainSaved")),d(!1)},e[6]=S,e[7]=n,e[8]=R):R=e[8];let w;e[9]!==y||e[10]!==R?(w={mutationFn:y,onSuccess:R,onError:hn},e[9]=y,e[10]=R,e[11]=w):w=e[11];const j=lt(w);let T;e[12]!==o?(T=$=>at(`${o}/domains/${encodeURIComponent($)}`,"DELETE"),e[12]=o,e[13]=T):T=e[13];let V;e[14]!==S||e[15]!==n?(V=()=>{S(),ce.success(n("mainPanelTabs.hostingTab.toastDomainDeleted")),x(null)},e[14]=S,e[15]=n,e[16]=V):V=e[16];let q;e[17]!==T||e[18]!==V?(q={mutationFn:T,onSuccess:V,onError:un},e[17]=T,e[18]=V,e[19]=q):q=e[19];const F=lt(q);let v;e[20]!==f||e[21]!==j||e[22]!==n?(v=()=>{const $=f.trim().toLowerCase();if(!$){ce.error(n("mainPanelTabs.hostingTab.errorDomainHostRequired"));return}const se=Us($);if(se){ce.error(se);return}j.mutate({host:$})},e[20]=f,e[21]=j,e[22]=n,e[23]=v):v=e[23];const H=v;let A;if(e[24]!==c||e[25]!==f){let $;e[27]!==f?($=se=>({...se,name:f.trim().toLowerCase()||se.name}),e[27]=f,e[28]=$):$=e[28],A=c.map($),e[24]=c,e[25]=f,e[26]=A}else A=e[26];const Q=A;let _,W;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{u(""),d(!0)},W=t.jsx(Pt,{}),e[29]=_,e[30]=W):(_=e[29],W=e[30]);let J;e[31]!==n?(J=n("mainPanelTabs.hostingTab.addDomain"),e[31]=n,e[32]=J):J=e[32];let U;e[33]!==J?(U=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:_,children:[W,J]}),e[33]=J,e[34]=U):U=e[34];const p=U;let I;e[35]!==n?(I=n("mainPanelTabs.hostingTab.domains"),e[35]=n,e[36]=I):I=e[36];const Y=i.length>0?p:void 0;let D;e[37]!==p||e[38]!==F.isPending||e[39]!==N||e[40]!==i||e[41]!==s||e[42]!==m||e[43]!==n?(D=m?t.jsx(ht,{}):s?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.domainsError")})}):i.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(At,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDomains"),className:"py-10",buttonComponent:p})}):t.jsx(Qe,{children:i.map(($,se)=>{const Se=!$.canonical&&($.dns?.length??0)>0,je=N===$.host;return t.jsxs("div",{children:[t.jsxs(pt,{children:[Se?t.jsx(Ut,{open:je,onClick:()=>C(je?null:$.host)}):t.jsx(At,{className:"size-4 shrink-0 text-muted-foreground/60"}),t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[t.jsx("span",{className:"truncate font-mono text-xs",children:$.host}),$.canonical&&t.jsx(Re,{variant:"outline",children:n("mainPanelTabs.hostingTab.canonical")})]}),t.jsx(dn,{domain:$}),!$.canonical&&t.jsx(et,{label:n("mainPanelTabs.hostingTab.deleteDomain"),onClick:()=>x($.host),disabled:F.isPending,className:"text-muted-foreground",children:t.jsx(vt,{})})]}),Se&&t.jsx(bs,{open:je,children:t.jsx(ss,{records:$.dns??[]})})]},`${$.host}-${se}`)})}),e[37]=p,e[38]=F.isPending,e[39]=N,e[40]=i,e[41]=s,e[42]=m,e[43]=n,e[44]=D):D=e[44];let G;e[45]!==n?(G=n("mainPanelTabs.hostingTab.addDomainTitle"),e[45]=n,e[46]=G):G=e[46];let O;e[47]!==G?(O=t.jsx(yt,{children:t.jsx(St,{children:G})}),e[47]=G,e[48]=O):O=e[48];let k;e[49]!==H?(k=$=>{$.preventDefault(),H()},e[49]=H,e[50]=k):k=e[50];let E;e[51]!==n?(E=n("mainPanelTabs.hostingTab.colHost"),e[51]=n,e[52]=E):E=e[52];let B;e[53]!==E?(B=t.jsx(Xe,{htmlFor:"domain-host",children:E}),e[53]=E,e[54]=B):B=e[54];let X;e[55]!==n?(X=n("mainPanelTabs.hostingTab.domainHostPlaceholder"),e[55]=n,e[56]=X):X=e[56];let te;e[57]===Symbol.for("react.memo_cache_sentinel")?(te=$=>u($.target.value),e[57]=te):te=e[57];let K;e[58]!==f||e[59]!==j.isPending||e[60]!==X?(K=t.jsx(it,{id:"domain-host",placeholder:X,value:f,onChange:te,className:"font-mono text-xs",autoComplete:"off",disabled:j.isPending}),e[58]=f,e[59]=j.isPending,e[60]=X,e[61]=K):K=e[61];let ne;e[62]!==B||e[63]!==K?(ne=t.jsxs("div",{className:"flex flex-col gap-2",children:[B,K]}),e[62]=B,e[63]=K,e[64]=ne):ne=e[64];let ie;e[65]!==f||e[66]!==Q?(ie=f.trim()&&t.jsx("div",{className:"rounded-lg border border-border bg-muted/30 p-3",children:t.jsx(ss,{records:Q})}),e[65]=f,e[66]=Q,e[67]=ie):ie=e[67];let Pe;e[68]===Symbol.for("react.memo_cache_sentinel")?(Pe=()=>d(!1),e[68]=Pe):Pe=e[68];const Ce=j.isPending;let me;e[69]!==n?(me=n("mainPanelTabs.hostingTab.cancel"),e[69]=n,e[70]=me):me=e[70];let pe;e[71]!==j.isPending||e[72]!==me?(pe=t.jsx(Ie,{variant:"outline",type:"button",onClick:Pe,disabled:Ce,children:me}),e[71]=j.isPending,e[72]=me,e[73]=pe):pe=e[73];let le;e[74]!==f||e[75]!==j.isPending?(le=j.isPending||!f.trim(),e[74]=f,e[75]=j.isPending,e[76]=le):le=e[76];let ae;e[77]!==j.isPending||e[78]!==n?(ae=j.isPending?n("mainPanelTabs.hostingTab.saving"):n("mainPanelTabs.hostingTab.save"),e[77]=j.isPending,e[78]=n,e[79]=ae):ae=e[79];let de;e[80]!==le||e[81]!==ae?(de=t.jsx(Ie,{type:"submit",disabled:le,children:ae}),e[80]=le,e[81]=ae,e[82]=de):de=e[82];let De;e[83]!==pe||e[84]!==de?(De=t.jsxs(Nt,{children:[pe,de]}),e[83]=pe,e[84]=de,e[85]=De):De=e[85];let fe;e[86]!==k||e[87]!==ne||e[88]!==ie||e[89]!==De?(fe=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:k,children:[ne,ie,De]}),e[86]=k,e[87]=ne,e[88]=ie,e[89]=De,e[90]=fe):fe=e[90];let ue;e[91]!==O||e[92]!==fe?(ue=t.jsxs(Ct,{className:"sm:max-w-md",children:[O,fe]}),e[91]=O,e[92]=fe,e[93]=ue):ue=e[93];let oe;e[94]!==g||e[95]!==ue?(oe=t.jsx(Dt,{open:g,onOpenChange:d,children:ue}),e[94]=g,e[95]=ue,e[96]=oe):oe=e[96];const Te=b!=null;let he;e[97]===Symbol.for("react.memo_cache_sentinel")?(he=$=>{$||x(null)},e[97]=he):he=e[97];let xe;e[98]!==n?(xe=n("mainPanelTabs.hostingTab.confirmDeleteDomainTitle"),e[98]=n,e[99]=xe):xe=e[99];const ve=b??"";let ye;e[100]!==n||e[101]!==ve?(ye=n("mainPanelTabs.hostingTab.confirmDeleteDomainDescription",{host:ve}),e[100]=n,e[101]=ve,e[102]=ye):ye=e[102];let ge;e[103]!==n?(ge=n("mainPanelTabs.hostingTab.deleteDomain"),e[103]=n,e[104]=ge):ge=e[104];let re;e[105]!==F||e[106]!==b?(re=()=>{b&&F.mutate(b)},e[105]=F,e[106]=b,e[107]=re):re=e[107];let be;e[108]!==F.isPending||e[109]!==Te||e[110]!==xe||e[111]!==ye||e[112]!==ge||e[113]!==re?(be=t.jsx(wt,{open:Te,onOpenChange:he,title:xe,description:ye,confirmLabel:ge,pending:F.isPending,onConfirm:re}),e[108]=F.isPending,e[109]=Te,e[110]=xe,e[111]=ye,e[112]=ge,e[113]=re,e[114]=be):be=e[114];let we;return e[115]!==I||e[116]!==Y||e[117]!==D||e[118]!==oe||e[119]!==be?(we=t.jsxs(ut,{title:I,actions:Y,children:[D,oe,be]}),e[115]=I,e[116]=Y,e[117]=D,e[118]=oe,e[119]=be,e[120]=we):we=e[120],we}function un(r){return ce.error(rt(r))}function hn(r){return ce.error(rt(r))}function xn(r){const e=ee.c(24),{value:o,onChange:l,disabled:a,className:i}=r,c=Ae();let m;e[0]!==l?(m=N=>l(N==="build"?"build":"runtime"),e[0]=l,e[1]=m):m=e[1];let s;e[2]!==i?(s=xt("h-8",i),e[2]=i,e[3]=s):s=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Bt,{}),e[4]=n):n=e[4];let h;e[5]!==s?(h=t.jsx(Ot,{className:s,children:n}),e[5]=s,e[6]=h):h=e[6];let g;e[7]!==c?(g=c("mainPanelTabs.hostingTab.secretScopeRuntime"),e[7]=c,e[8]=g):g=e[8];let d;e[9]!==g?(d=t.jsx(ft,{value:"runtime",children:g}),e[9]=g,e[10]=d):d=e[10];let f;e[11]!==c?(f=c("mainPanelTabs.hostingTab.secretScopeBuild"),e[11]=c,e[12]=f):f=e[12];let u;e[13]!==f?(u=t.jsx(ft,{value:"build",children:f}),e[13]=f,e[14]=u):u=e[14];let b;e[15]!==d||e[16]!==u?(b=t.jsxs(qt,{children:[d,u]}),e[15]=d,e[16]=u,e[17]=b):b=e[17];let x;return e[18]!==a||e[19]!==m||e[20]!==h||e[21]!==b||e[22]!==o?(x=t.jsxs(Mt,{value:o,onValueChange:m,disabled:a,children:[h,b]}),e[18]=a,e[19]=m,e[20]=h,e[21]=b,e[22]=o,e[23]=x):x=e[23],x}function gn(r){const e=ee.c(151),{base:o,orgSlug:l,site:a,envVars:i,codeVars:c,isLoading:m,error:s}=r,n=Ae(),h=bt(),[g,d]=Z.useState(!1),[f,u]=Z.useState(""),[b,x]=Z.useState(""),[N,C]=Z.useState("runtime"),[P,S]=Z.useState(null),[y,R]=Z.useState(""),[w,j]=Z.useState(null);let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=new Set,e[0]=T):T=e[0];const[V,q]=Z.useState(T);let F;e[1]===Symbol.for("react.memo_cache_sentinel")?(F=L=>{q(Ne=>{const We=new Set(Ne);return We.has(L)?We.delete(L):We.add(L),We})},e[1]=F):F=e[1];const v=F;let H;e[2]!==o?(H=L=>at(`${o}/env`,"PUT",{vars:L}),e[2]=o,e[3]=H):H=e[3];let A;e[4]!==l||e[5]!==h||e[6]!==a||e[7]!==n?(A=()=>{h.invalidateQueries({queryKey:Ye.hostingEnv(l,a)}),ce.success(n("mainPanelTabs.hostingTab.toastEnvSaved"))},e[4]=l,e[5]=h,e[6]=a,e[7]=n,e[8]=A):A=e[8];let Q;e[9]!==H||e[10]!==A?(Q={mutationFn:H,onSuccess:A,onError:pn},e[9]=H,e[10]=A,e[11]=Q):Q=e[11];const _=lt(Q);let W;e[12]!==f||e[13]!==N||e[14]!==b||e[15]!==_||e[16]!==i||e[17]!==n?(W=()=>{const L=f.trim();if(!L){ce.error(n("mainPanelTabs.hostingTab.errorEnvNameRequired"));return}if(i.some(Ne=>Lt(Ne,{name:L,scope:N}))){ce.error(n("mainPanelTabs.hostingTab.errorEnvNameDuplicate"));return}_.mutate([...i,{name:L,value:b,scope:N}],{onSuccess:()=>{d(!1),u(""),x(""),C("runtime")}})},e[12]=f,e[13]=N,e[14]=b,e[15]=_,e[16]=i,e[17]=n,e[18]=W):W=e[18];const J=W;let U;e[19]!==y||e[20]!==_||e[21]!==i?(U=L=>{_.mutate(i.map(Ne=>Lt(Ne,L)?{name:L.name,value:y,scope:L.scope}:Ne),{onSuccess:()=>S(null)})},e[19]=y,e[20]=_,e[21]=i,e[22]=U):U=e[22];const p=U;let I;e[23]!==w||e[24]!==_||e[25]!==i?(I=()=>{w&&_.mutate(i.filter(L=>!Lt(L,w)),{onSuccess:()=>j(null)})},e[23]=w,e[24]=_,e[25]=i,e[26]=I):I=e[26];const Y=I,D=_.isPending;let G;e[27]===Symbol.for("react.memo_cache_sentinel")?(G=()=>{u(""),x(""),C("runtime")},e[27]=G):G=e[27];const O=G;let k,E;e[28]===Symbol.for("react.memo_cache_sentinel")?(k=()=>d(!0),E=t.jsx(Pt,{}),e[28]=k,e[29]=E):(k=e[28],E=e[29]);let B;e[30]!==n?(B=n("mainPanelTabs.hostingTab.addVariable"),e[30]=n,e[31]=B):B=e[31];let X;e[32]!==B?(X=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:k,children:[E,B]}),e[32]=B,e[33]=X):X=e[33];const te=X;let K;e[34]!==n?(K=n("mainPanelTabs.hostingTab.env"),e[34]=n,e[35]=K):K=e[35];const ne=i.length>0||c.length>0?te:void 0;let ie;e[36]!==te||e[37]!==c||e[38]!==y||e[39]!==P?.name||e[40]!==P?.scope||e[41]!==i||e[42]!==s||e[43]!==p||e[44]!==m||e[45]!==D||e[46]!==V||e[47]!==n?(ie=m?t.jsx(ht,{}):s?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.envError")})}):i.length===0&&c.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(Yt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noEnv"),className:"py-10",buttonComponent:te})}):t.jsxs(Qe,{children:[i.map(L=>{const Ne=L.scope==="build"?"build":"runtime",We=`${L.name}:${Ne}`,tt=P?.name===L.name&&P?.scope===Ne,st=V.has(We);return t.jsxs(pt,{children:[t.jsxs("div",{className:"flex min-w-0 flex-1 basis-0 items-center gap-2",children:[t.jsx("div",{className:"w-20 shrink-0",children:t.jsx(ps,{scope:Ne})}),t.jsx("span",{className:"truncate font-mono text-xs",children:L.name})]}),t.jsx("div",{className:"flex min-w-0 flex-1 basis-0 items-center justify-end gap-2",children:tt?t.jsxs(t.Fragment,{children:[t.jsx(it,{value:y,onChange:z=>R(z.target.value),onKeyDown:z=>{z.key==="Enter"&&p({name:L.name,scope:Ne}),z.key==="Escape"&&S(null)},autoFocus:!0,className:"h-8 font-mono text-xs"}),t.jsx(Ie,{size:"sm",onClick:()=>p({name:L.name,scope:Ne}),disabled:D,children:n("mainPanelTabs.hostingTab.save")}),t.jsx(Ie,{size:"sm",variant:"ghost",onClick:()=>S(null),disabled:D,children:n("mainPanelTabs.hostingTab.cancel")})]}):t.jsxs(t.Fragment,{children:[t.jsx(et,{label:n(st?"mainPanelTabs.hostingTab.hideValue":"mainPanelTabs.hostingTab.showValue"),onClick:()=>v(We),className:"text-muted-foreground",children:st?t.jsx(Os,{}):t.jsx(qs,{})}),st?t.jsx("button",{type:"button",onClick:()=>{S({name:L.name,scope:Ne}),R(L.value)},title:n("mainPanelTabs.hostingTab.editValue"),className:"min-w-0 truncate rounded px-1.5 py-0.5 text-right font-mono text-xs text-muted-foreground hover:bg-muted hover:text-foreground",children:L.value||"—"}):t.jsx("span",{className:"min-w-0 truncate px-1.5 py-0.5 text-right font-mono text-xs text-muted-foreground/60",children:L.value?"••••••••••":"—"})]})}),t.jsx(et,{label:n("mainPanelTabs.hostingTab.deleteVariable"),onClick:()=>j({name:L.name,scope:Ne}),disabled:D,className:"text-muted-foreground",children:t.jsx(vt,{})})]},We)}),c.length>0&&t.jsxs(Ht,{children:[t.jsx(Bs,{asChild:!0,children:t.jsxs("button",{type:"button",className:"group flex w-full items-center gap-2 px-4 py-2.5 text-left text-xs text-muted-foreground hover:bg-muted/40",children:[t.jsx(xs,{className:"size-4 transition-transform duration-200 group-data-[state=open]:rotate-90 motion-reduce:transition-none"}),t.jsx(Yt,{className:"size-4"}),n("mainPanelTabs.hostingTab.codeVarsToggle",{count:String(c.length)})]})}),t.jsx(Vt,{children:t.jsx("div",{className:"divide-y divide-border/60 border-t border-border bg-muted/30",children:c.map(bn)})})]})]}),e[36]=te,e[37]=c,e[38]=y,e[39]=P?.name,e[40]=P?.scope,e[41]=i,e[42]=s,e[43]=p,e[44]=m,e[45]=D,e[46]=V,e[47]=n,e[48]=ie):ie=e[48];let Pe;e[49]===Symbol.for("react.memo_cache_sentinel")?(Pe=L=>{d(L),L||O()},e[49]=Pe):Pe=e[49];let Ce;e[50]!==n?(Ce=n("mainPanelTabs.hostingTab.addVariable"),e[50]=n,e[51]=Ce):Ce=e[51];let me;e[52]!==Ce?(me=t.jsx(yt,{children:t.jsx(St,{children:Ce})}),e[52]=Ce,e[53]=me):me=e[53];let pe;e[54]!==J?(pe=L=>{L.preventDefault(),J()},e[54]=J,e[55]=pe):pe=e[55];let le;e[56]!==n?(le=n("mainPanelTabs.hostingTab.colName"),e[56]=n,e[57]=le):le=e[57];let ae;e[58]!==le?(ae=t.jsx(Xe,{htmlFor:"env-name",children:le}),e[58]=le,e[59]=ae):ae=e[59];let de;e[60]!==n?(de=n("mainPanelTabs.hostingTab.envNamePlaceholder"),e[60]=n,e[61]=de):de=e[61];let De;e[62]===Symbol.for("react.memo_cache_sentinel")?(De=L=>u(L.target.value),e[62]=De):De=e[62];let fe;e[63]!==f||e[64]!==D||e[65]!==de?(fe=t.jsx(it,{id:"env-name",placeholder:de,value:f,onChange:De,className:"font-mono text-xs",autoComplete:"off",disabled:D}),e[63]=f,e[64]=D,e[65]=de,e[66]=fe):fe=e[66];let ue;e[67]!==ae||e[68]!==fe?(ue=t.jsxs("div",{className:"flex flex-col gap-2",children:[ae,fe]}),e[67]=ae,e[68]=fe,e[69]=ue):ue=e[69];let oe;e[70]!==n?(oe=n("mainPanelTabs.hostingTab.colValue"),e[70]=n,e[71]=oe):oe=e[71];let Te;e[72]!==oe?(Te=t.jsx(Xe,{htmlFor:"env-value",children:oe}),e[72]=oe,e[73]=Te):Te=e[73];let he;e[74]!==n?(he=n("mainPanelTabs.hostingTab.envValuePlaceholder"),e[74]=n,e[75]=he):he=e[75];let xe;e[76]===Symbol.for("react.memo_cache_sentinel")?(xe=L=>x(L.target.value),e[76]=xe):xe=e[76];let ve;e[77]!==b||e[78]!==D||e[79]!==he?(ve=t.jsx(it,{id:"env-value",placeholder:he,value:b,onChange:xe,className:"font-mono text-xs",autoComplete:"off",disabled:D}),e[77]=b,e[78]=D,e[79]=he,e[80]=ve):ve=e[80];let ye;e[81]!==Te||e[82]!==ve?(ye=t.jsxs("div",{className:"flex flex-col gap-2",children:[Te,ve]}),e[81]=Te,e[82]=ve,e[83]=ye):ye=e[83];let ge;e[84]!==n?(ge=n("mainPanelTabs.hostingTab.secretScope"),e[84]=n,e[85]=ge):ge=e[85];let re;e[86]!==ge?(re=t.jsx(Xe,{children:ge}),e[86]=ge,e[87]=re):re=e[87];let be;e[88]!==N||e[89]!==D?(be=t.jsx(xn,{value:N,onChange:C,disabled:D,className:"w-full"}),e[88]=N,e[89]=D,e[90]=be):be=e[90];let we;e[91]!==N||e[92]!==n?(we=n(N==="build"?"mainPanelTabs.hostingTab.secretScopeBuildHint":"mainPanelTabs.hostingTab.secretScopeRuntimeHint"),e[91]=N,e[92]=n,e[93]=we):we=e[93];let $;e[94]!==we?($=t.jsx("p",{className:"text-xs text-muted-foreground",children:we}),e[94]=we,e[95]=$):$=e[95];let se;e[96]!==re||e[97]!==be||e[98]!==$?(se=t.jsxs("div",{className:"flex flex-col gap-2",children:[re,be,$]}),e[96]=re,e[97]=be,e[98]=$,e[99]=se):se=e[99];let Se;e[100]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>{d(!1),O()},e[100]=Se):Se=e[100];let je;e[101]!==n?(je=n("mainPanelTabs.hostingTab.cancel"),e[101]=n,e[102]=je):je=e[102];let $e;e[103]!==D||e[104]!==je?($e=t.jsx(Ie,{variant:"outline",type:"button",onClick:Se,disabled:D,children:je}),e[103]=D,e[104]=je,e[105]=$e):$e=e[105];let ze;e[106]!==f||e[107]!==D?(ze=D||!f.trim(),e[106]=f,e[107]=D,e[108]=ze):ze=e[108];let Ke;e[109]!==D||e[110]!==n?(Ke=n(D?"mainPanelTabs.hostingTab.saving":"mainPanelTabs.hostingTab.add"),e[109]=D,e[110]=n,e[111]=Ke):Ke=e[111];let Le;e[112]!==ze||e[113]!==Ke?(Le=t.jsx(Ie,{type:"submit",disabled:ze,children:Ke}),e[112]=ze,e[113]=Ke,e[114]=Le):Le=e[114];let _e;e[115]!==$e||e[116]!==Le?(_e=t.jsxs(Nt,{children:[$e,Le]}),e[115]=$e,e[116]=Le,e[117]=_e):_e=e[117];let Be;e[118]!==pe||e[119]!==ue||e[120]!==ye||e[121]!==se||e[122]!==_e?(Be=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:pe,children:[ue,ye,se,_e]}),e[118]=pe,e[119]=ue,e[120]=ye,e[121]=se,e[122]=_e,e[123]=Be):Be=e[123];let Ve;e[124]!==me||e[125]!==Be?(Ve=t.jsxs(Ct,{className:"sm:max-w-md",children:[me,Be]}),e[124]=me,e[125]=Be,e[126]=Ve):Ve=e[126];let ke;e[127]!==g||e[128]!==Ve?(ke=t.jsx(Dt,{open:g,onOpenChange:Pe,children:Ve}),e[127]=g,e[128]=Ve,e[129]=ke):ke=e[129];const Je=w!=null;let He;e[130]===Symbol.for("react.memo_cache_sentinel")?(He=L=>{L||j(null)},e[130]=He):He=e[130];let Ee;e[131]!==n?(Ee=n("mainPanelTabs.hostingTab.confirmDeleteVariableTitle"),e[131]=n,e[132]=Ee):Ee=e[132];const Oe=w?.name??"";let qe;e[133]!==n||e[134]!==Oe?(qe=n("mainPanelTabs.hostingTab.confirmDeleteVariableDescription",{name:Oe}),e[133]=n,e[134]=Oe,e[135]=qe):qe=e[135];let Ue;e[136]!==n?(Ue=n("mainPanelTabs.hostingTab.deleteVariable"),e[136]=n,e[137]=Ue):Ue=e[137];let M;e[138]!==Y||e[139]!==D||e[140]!==Je||e[141]!==Ee||e[142]!==qe||e[143]!==Ue?(M=t.jsx(wt,{open:Je,onOpenChange:He,title:Ee,description:qe,confirmLabel:Ue,pending:D,onConfirm:Y}),e[138]=Y,e[139]=D,e[140]=Je,e[141]=Ee,e[142]=qe,e[143]=Ue,e[144]=M):M=e[144];let Ge;return e[145]!==K||e[146]!==ne||e[147]!==ie||e[148]!==ke||e[149]!==M?(Ge=t.jsxs(ut,{title:K,actions:ne,children:[ie,ke,M]}),e[145]=K,e[146]=ne,e[147]=ie,e[148]=ke,e[149]=M,e[150]=Ge):Ge=e[150],Ge}function bn(r){return t.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 font-mono text-xs",children:[t.jsx("span",{className:"flex-1 basis-0 truncate",children:r.name}),t.jsx("span",{className:"flex-1 basis-0 truncate text-right text-muted-foreground",children:r.value})]},r.name)}function pn(r){return ce.error(rt(r))}function Tn(r){const e=ee.c(6),{type:o}=r,l=Ae(),a=o==="permanent"?"secondary":"outline";let i;e[0]!==l||e[1]!==o?(i=l(o==="permanent"?"mainPanelTabs.hostingTab.permanent":"mainPanelTabs.hostingTab.temporary"),e[0]=l,e[1]=o,e[2]=i):i=e[2];let c;return e[3]!==a||e[4]!==i?(c=t.jsx(Re,{variant:a,children:i}),e[3]=a,e[4]=i,e[5]=c):c=e[5],c}function jn(r){const e=ee.c(163),{base:o,orgSlug:l,site:a,redirects:i,isLoading:c,error:m}=r,s=Ae(),n=bt(),[h,g]=Z.useState(!1),[d,f]=Z.useState(null),[u,b]=Z.useState(""),[x,N]=Z.useState(""),[C,P]=Z.useState("permanent"),[S,y]=Z.useState(null),[R,w]=Z.useState(null);let j;e[0]!==l||e[1]!==n||e[2]!==a?(j=()=>n.invalidateQueries({queryKey:Ye.hostingRedirects(l,a)}),e[0]=l,e[1]=n,e[2]=a,e[3]=j):j=e[3];const T=j;let V;e[4]!==o?(V=z=>at(`${o}/redirects`,"PUT",z),e[4]=o,e[5]=V):V=e[5];let q;e[6]!==T||e[7]!==s?(q=()=>{T(),ce.success(s("mainPanelTabs.hostingTab.toastRedirectSaved")),g(!1)},e[6]=T,e[7]=s,e[8]=q):q=e[8];let F;e[9]!==V||e[10]!==q?(F={mutationFn:V,onSuccess:q,onError:vn},e[9]=V,e[10]=q,e[11]=F):F=e[11];const v=lt(F);let H;e[12]!==o?(H=z=>at(`${o}/redirects/${encodeURIComponent(z)}`,"DELETE"),e[12]=o,e[13]=H):H=e[13];let A;e[14]!==T||e[15]!==s?(A=()=>{T(),ce.success(s("mainPanelTabs.hostingTab.toastRedirectDeleted")),y(null)},e[14]=T,e[15]=s,e[16]=A):A=e[16];let Q;e[17]!==H||e[18]!==A?(Q={mutationFn:H,onSuccess:A,onError:Pn},e[17]=H,e[18]=A,e[19]=Q):Q=e[19];const _=lt(Q);let W;e[20]===Symbol.for("react.memo_cache_sentinel")?(W=()=>{f(null),b(""),N(""),P("permanent"),g(!0)},e[20]=W):W=e[20];const J=W;let U;e[21]===Symbol.for("react.memo_cache_sentinel")?(U=z=>{f(z.from),b(z.from),N(z.to),P(z.type==="temporary"?"temporary":"permanent"),g(!0)},e[21]=U):U=e[21];const p=U;let I;e[22]!==u||e[23]!==x||e[24]!==C||e[25]!==v||e[26]!==s?(I=()=>{const z=u.trim(),Tt=x.trim();if(!z||!Tt){ce.error(s("mainPanelTabs.hostingTab.errorRedirectFieldsRequired"));return}v.mutate({from:z,to:Tt,type:C})},e[22]=u,e[23]=x,e[24]=C,e[25]=v,e[26]=s,e[27]=I):I=e[27];const Y=I;let D;e[28]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(Pt,{}),e[28]=D):D=e[28];let G;e[29]!==s?(G=s("mainPanelTabs.hostingTab.addRedirect"),e[29]=s,e[30]=G):G=e[30];let O;e[31]!==G?(O=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:J,children:[D,G]}),e[31]=G,e[32]=O):O=e[32];const k=O;let E;e[33]!==s?(E=s("mainPanelTabs.hostingTab.redirects"),e[33]=s,e[34]=E):E=e[34];const B=i.length>0?k:void 0;let X;e[35]!==k||e[36]!==_.isPending||e[37]!==R||e[38]!==m||e[39]!==c||e[40]!==v.isPending||e[41]!==i||e[42]!==s?(X=c?t.jsx(ht,{}):m?t.jsx(Qe,{children:t.jsx(ot,{children:s("mainPanelTabs.hostingTab.redirectsError")})}):i.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(Gt,{className:"size-5"}),title:s("mainPanelTabs.hostingTab.noRedirects"),className:"py-10",buttonComponent:k})}):t.jsx(Qe,{children:i.map((z,Tt)=>{const Kt=es(z.from),$t=R===z.from;return t.jsxs("div",{children:[t.jsxs(pt,{children:[Kt?t.jsx(Ut,{open:$t,onClick:()=>w($t?null:z.from)}):t.jsx(Gt,{className:"size-4 shrink-0 text-muted-foreground/60"}),t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 font-mono text-xs",children:[t.jsx("span",{className:"truncate",children:z.from}),t.jsx(Ms,{className:"size-3.5 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"truncate text-muted-foreground",children:z.to})]}),t.jsx(Tn,{type:z.type}),t.jsx(et,{label:s("mainPanelTabs.hostingTab.editRedirect"),onClick:()=>p(z),disabled:v.isPending,className:"text-muted-foreground",children:t.jsx(Es,{})}),t.jsx(et,{label:s("mainPanelTabs.hostingTab.deleteRedirect"),onClick:()=>y(z.from),disabled:_.isPending,className:"-ml-1 text-muted-foreground",children:t.jsx(vt,{})})]}),Kt&&t.jsx(bs,{open:$t,children:t.jsx(ts,{from:z.from,source:z.source})})]},z.id??`${z.from}-${Tt}`)})}),e[35]=k,e[36]=_.isPending,e[37]=R,e[38]=m,e[39]=c,e[40]=v.isPending,e[41]=i,e[42]=s,e[43]=X):X=e[43];let te;e[44]!==d||e[45]!==s?(te=d!=null?s("mainPanelTabs.hostingTab.editRedirectTitle"):s("mainPanelTabs.hostingTab.addRedirectTitle"),e[44]=d,e[45]=s,e[46]=te):te=e[46];let K;e[47]!==te?(K=t.jsx(yt,{children:t.jsx(St,{children:te})}),e[47]=te,e[48]=K):K=e[48];let ne;e[49]!==Y?(ne=z=>{z.preventDefault(),Y()},e[49]=Y,e[50]=ne):ne=e[50];let ie;e[51]!==s?(ie=s("mainPanelTabs.hostingTab.colFrom"),e[51]=s,e[52]=ie):ie=e[52];let Pe;e[53]!==ie?(Pe=t.jsx(Xe,{htmlFor:"redirect-from",children:ie}),e[53]=ie,e[54]=Pe):Pe=e[54];let Ce;e[55]!==s?(Ce=s("mainPanelTabs.hostingTab.redirectFromPlaceholder"),e[55]=s,e[56]=Ce):Ce=e[56];let me;e[57]===Symbol.for("react.memo_cache_sentinel")?(me=z=>b(z.target.value),e[57]=me):me=e[57];const pe=d!=null||v.isPending;let le;e[58]!==u||e[59]!==Ce||e[60]!==pe?(le=t.jsx(it,{id:"redirect-from",placeholder:Ce,value:u,onChange:me,className:"font-mono text-xs",disabled:pe}),e[58]=u,e[59]=Ce,e[60]=pe,e[61]=le):le=e[61];let ae;e[62]!==Pe||e[63]!==le?(ae=t.jsxs("div",{className:"flex flex-col gap-2",children:[Pe,le]}),e[62]=Pe,e[63]=le,e[64]=ae):ae=e[64];let de;e[65]!==s?(de=s("mainPanelTabs.hostingTab.colTo"),e[65]=s,e[66]=de):de=e[66];let De;e[67]!==de?(De=t.jsx(Xe,{htmlFor:"redirect-to",children:de}),e[67]=de,e[68]=De):De=e[68];let fe;e[69]!==s?(fe=s("mainPanelTabs.hostingTab.redirectToPlaceholder"),e[69]=s,e[70]=fe):fe=e[70];let ue;e[71]===Symbol.for("react.memo_cache_sentinel")?(ue=z=>N(z.target.value),e[71]=ue):ue=e[71];let oe;e[72]!==x||e[73]!==v.isPending||e[74]!==fe?(oe=t.jsx(it,{id:"redirect-to",placeholder:fe,value:x,onChange:ue,className:"font-mono text-xs",disabled:v.isPending}),e[72]=x,e[73]=v.isPending,e[74]=fe,e[75]=oe):oe=e[75];let Te;e[76]!==De||e[77]!==oe?(Te=t.jsxs("div",{className:"flex flex-col gap-2",children:[De,oe]}),e[76]=De,e[77]=oe,e[78]=Te):Te=e[78];let he;e[79]!==s?(he=s("mainPanelTabs.hostingTab.colType"),e[79]=s,e[80]=he):he=e[80];let xe;e[81]!==he?(xe=t.jsx(Xe,{children:he}),e[81]=he,e[82]=xe):xe=e[82];let ve;e[83]===Symbol.for("react.memo_cache_sentinel")?(ve=z=>P(z==="temporary"?"temporary":"permanent"),e[83]=ve):ve=e[83];const ye=v.isPending;let ge;e[84]===Symbol.for("react.memo_cache_sentinel")?(ge=t.jsx(Ot,{className:"w-full",children:t.jsx(Bt,{})}),e[84]=ge):ge=e[84];let re;e[85]!==s?(re=s("mainPanelTabs.hostingTab.permanent"),e[85]=s,e[86]=re):re=e[86];let be;e[87]!==re?(be=t.jsx(ft,{value:"permanent",children:re}),e[87]=re,e[88]=be):be=e[88];let we;e[89]!==s?(we=s("mainPanelTabs.hostingTab.temporary"),e[89]=s,e[90]=we):we=e[90];let $;e[91]!==we?($=t.jsx(ft,{value:"temporary",children:we}),e[91]=we,e[92]=$):$=e[92];let se;e[93]!==be||e[94]!==$?(se=t.jsxs(qt,{children:[be,$]}),e[93]=be,e[94]=$,e[95]=se):se=e[95];let Se;e[96]!==C||e[97]!==v.isPending||e[98]!==se?(Se=t.jsxs(Mt,{value:C,onValueChange:ve,disabled:ye,children:[ge,se]}),e[96]=C,e[97]=v.isPending,e[98]=se,e[99]=Se):Se=e[99];let je;e[100]!==xe||e[101]!==Se?(je=t.jsxs("div",{className:"flex flex-col gap-2",children:[xe,Se]}),e[100]=xe,e[101]=Se,e[102]=je):je=e[102];let $e;e[103]!==d||e[104]!==u||e[105]!==i?($e=es(u)&&t.jsx("div",{className:"rounded-lg border border-border bg-muted/30 p-3",children:t.jsx(ts,{from:u,source:i.find(z=>z.from===d)?.source})}),e[103]=d,e[104]=u,e[105]=i,e[106]=$e):$e=e[106];let ze;e[107]===Symbol.for("react.memo_cache_sentinel")?(ze=()=>g(!1),e[107]=ze):ze=e[107];const Ke=v.isPending;let Le;e[108]!==s?(Le=s("mainPanelTabs.hostingTab.cancel"),e[108]=s,e[109]=Le):Le=e[109];let _e;e[110]!==v.isPending||e[111]!==Le?(_e=t.jsx(Ie,{variant:"outline",type:"button",onClick:ze,disabled:Ke,children:Le}),e[110]=v.isPending,e[111]=Le,e[112]=_e):_e=e[112];let Be;e[113]!==u||e[114]!==x||e[115]!==v.isPending?(Be=v.isPending||!u.trim()||!x.trim(),e[113]=u,e[114]=x,e[115]=v.isPending,e[116]=Be):Be=e[116];let Ve;e[117]!==v.isPending||e[118]!==s?(Ve=v.isPending?s("mainPanelTabs.hostingTab.saving"):s("mainPanelTabs.hostingTab.save"),e[117]=v.isPending,e[118]=s,e[119]=Ve):Ve=e[119];let ke;e[120]!==Be||e[121]!==Ve?(ke=t.jsx(Ie,{type:"submit",disabled:Be,children:Ve}),e[120]=Be,e[121]=Ve,e[122]=ke):ke=e[122];let Je;e[123]!==_e||e[124]!==ke?(Je=t.jsxs(Nt,{children:[_e,ke]}),e[123]=_e,e[124]=ke,e[125]=Je):Je=e[125];let He;e[126]!==ne||e[127]!==ae||e[128]!==Te||e[129]!==je||e[130]!==$e||e[131]!==Je?(He=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:ne,children:[ae,Te,je,$e,Je]}),e[126]=ne,e[127]=ae,e[128]=Te,e[129]=je,e[130]=$e,e[131]=Je,e[132]=He):He=e[132];let Ee;e[133]!==K||e[134]!==He?(Ee=t.jsxs(Ct,{className:"sm:max-w-md",children:[K,He]}),e[133]=K,e[134]=He,e[135]=Ee):Ee=e[135];let Oe;e[136]!==h||e[137]!==Ee?(Oe=t.jsx(Dt,{open:h,onOpenChange:g,children:Ee}),e[136]=h,e[137]=Ee,e[138]=Oe):Oe=e[138];const qe=S!=null;let Ue;e[139]===Symbol.for("react.memo_cache_sentinel")?(Ue=z=>{z||y(null)},e[139]=Ue):Ue=e[139];let M;e[140]!==s?(M=s("mainPanelTabs.hostingTab.confirmDeleteRedirectTitle"),e[140]=s,e[141]=M):M=e[141];const Ge=S??"";let L;e[142]!==s||e[143]!==Ge?(L=s("mainPanelTabs.hostingTab.confirmDeleteRedirectDescription",{from:Ge}),e[142]=s,e[143]=Ge,e[144]=L):L=e[144];let Ne;e[145]!==s?(Ne=s("mainPanelTabs.hostingTab.deleteRedirect"),e[145]=s,e[146]=Ne):Ne=e[146];let We;e[147]!==_||e[148]!==S?(We=()=>{S&&_.mutate(S)},e[147]=_,e[148]=S,e[149]=We):We=e[149];let tt;e[150]!==_.isPending||e[151]!==qe||e[152]!==M||e[153]!==L||e[154]!==Ne||e[155]!==We?(tt=t.jsx(wt,{open:qe,onOpenChange:Ue,title:M,description:L,confirmLabel:Ne,pending:_.isPending,onConfirm:We}),e[150]=_.isPending,e[151]=qe,e[152]=M,e[153]=L,e[154]=Ne,e[155]=We,e[156]=tt):tt=e[156];let st;return e[157]!==E||e[158]!==B||e[159]!==X||e[160]!==Oe||e[161]!==tt?(st=t.jsxs(ut,{title:E,actions:B,children:[X,Oe,tt]}),e[157]=E,e[158]=B,e[159]=X,e[160]=Oe,e[161]=tt,e[162]=st):st=e[162],st}function Pn(r){return ce.error(rt(r))}function vn(r){return ce.error(rt(r))}function yn(r){const e=ee.c(160),{base:o,orgSlug:l,site:a,secrets:i,isLoading:c,error:m}=r,s=Ae(),n=bt(),[h,g]=Z.useState(!1),[d,f]=Z.useState(""),[u,b]=Z.useState(""),[x,N]=Z.useState("runtime"),[C,P]=Z.useState(null);let S;e[0]!==l||e[1]!==n||e[2]!==a?(S=()=>n.invalidateQueries({queryKey:Ye.hostingSecrets(l,a)}),e[0]=l,e[1]=n,e[2]=a,e[3]=S):S=e[3];const y=S;let R;e[4]!==o?(R=M=>at(`${o}/secrets`,"PUT",M),e[4]=o,e[5]=R):R=e[5];let w;e[6]!==y||e[7]!==s?(w=()=>{y(),ce.success(s("mainPanelTabs.hostingTab.toastSecretSaved")),g(!1),f(""),b(""),N("runtime")},e[6]=y,e[7]=s,e[8]=w):w=e[8];let j;e[9]!==R||e[10]!==w?(j={mutationFn:R,onSuccess:w,onError:Nn},e[9]=R,e[10]=w,e[11]=j):j=e[11];const T=lt(j);let V;e[12]!==o?(V=M=>at(`${o}/secrets/${encodeURIComponent(M.name)}?scope=${M.scope}`,"DELETE"),e[12]=o,e[13]=V):V=e[13];let q;e[14]!==y||e[15]!==s?(q=()=>{y(),ce.success(s("mainPanelTabs.hostingTab.toastSecretDeleted")),P(null)},e[14]=y,e[15]=s,e[16]=q):q=e[16];let F;e[17]!==V||e[18]!==q?(F={mutationFn:V,onSuccess:q,onError:Sn},e[17]=V,e[18]=q,e[19]=F):F=e[19];const v=lt(F);let H;e[20]!==d||e[21]!==x||e[22]!==u||e[23]!==T||e[24]!==s?(H=()=>{const M=d.trim();if(!M){ce.error(s("mainPanelTabs.hostingTab.errorSecretNameRequired"));return}if(!u){ce.error(s("mainPanelTabs.hostingTab.errorSecretValueRequired"));return}T.mutate({name:M,value:u,scope:x})},e[20]=d,e[21]=x,e[22]=u,e[23]=T,e[24]=s,e[25]=H):H=e[25];const A=H;let Q,_;e[26]===Symbol.for("react.memo_cache_sentinel")?(_=()=>g(!0),Q=t.jsx(Pt,{}),e[26]=Q,e[27]=_):(Q=e[26],_=e[27]);let W;e[28]!==s?(W=s("mainPanelTabs.hostingTab.addSecret"),e[28]=s,e[29]=W):W=e[29];let J;e[30]!==W?(J=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:_,children:[Q,W]}),e[30]=W,e[31]=J):J=e[31];const U=J;let p;e[32]!==s?(p=s("mainPanelTabs.hostingTab.secrets"),e[32]=s,e[33]=p):p=e[33];const I=i.length>0?U:void 0;let Y;e[34]!==U||e[35]!==v.isPending||e[36]!==m||e[37]!==c||e[38]!==i||e[39]!==s?(Y=c?t.jsx(ht,{}):m?t.jsx(Qe,{children:t.jsx(ot,{children:s("mainPanelTabs.hostingTab.secretsError")})}):i.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(Wt,{className:"size-5"}),title:s("mainPanelTabs.hostingTab.noSecrets"),className:"py-10",buttonComponent:U})}):t.jsx(Qe,{children:i.map(M=>{const Ge=M.scope==="build"?"build":"runtime";return t.jsxs(pt,{children:[t.jsx(Wt,{className:"size-4 shrink-0 text-muted-foreground/60"}),t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[t.jsx("div",{className:"w-20 shrink-0",children:t.jsx(ps,{scope:Ge})}),t.jsx("span",{className:"truncate font-mono text-xs",children:M.name}),M.origin==="worker"&&t.jsx(Re,{variant:"secondary",children:s("mainPanelTabs.hostingTab.secretOnWorker")})]}),t.jsx("span",{className:"font-mono text-xs text-muted-foreground/60",children:s("mainPanelTabs.hostingTab.secretValueHidden")}),t.jsx(et,{label:s("mainPanelTabs.hostingTab.deleteSecret"),onClick:()=>P({name:M.name,scope:Ge}),disabled:v.isPending,className:"text-muted-foreground",children:t.jsx(vt,{})})]},`${M.name}:${Ge}`)})}),e[34]=U,e[35]=v.isPending,e[36]=m,e[37]=c,e[38]=i,e[39]=s,e[40]=Y):Y=e[40];let D;e[41]!==s?(D=s("mainPanelTabs.hostingTab.addSecretTitle"),e[41]=s,e[42]=D):D=e[42];let G;e[43]!==D?(G=t.jsx(yt,{children:t.jsx(St,{children:D})}),e[43]=D,e[44]=G):G=e[44];let O;e[45]!==A?(O=M=>{M.preventDefault(),A()},e[45]=A,e[46]=O):O=e[46];let k;e[47]!==s?(k=s("mainPanelTabs.hostingTab.colName"),e[47]=s,e[48]=k):k=e[48];let E;e[49]!==k?(E=t.jsx(Xe,{htmlFor:"secret-name",children:k}),e[49]=k,e[50]=E):E=e[50];let B;e[51]!==s?(B=s("mainPanelTabs.hostingTab.secretNamePlaceholder"),e[51]=s,e[52]=B):B=e[52];let X;e[53]===Symbol.for("react.memo_cache_sentinel")?(X=M=>f(M.target.value),e[53]=X):X=e[53];let te;e[54]!==d||e[55]!==T.isPending||e[56]!==B?(te=t.jsx(it,{id:"secret-name",placeholder:B,value:d,onChange:X,className:"font-mono text-xs",autoComplete:"off",disabled:T.isPending}),e[54]=d,e[55]=T.isPending,e[56]=B,e[57]=te):te=e[57];let K;e[58]!==E||e[59]!==te?(K=t.jsxs("div",{className:"flex flex-col gap-2",children:[E,te]}),e[58]=E,e[59]=te,e[60]=K):K=e[60];let ne;e[61]!==s?(ne=s("mainPanelTabs.hostingTab.colValue"),e[61]=s,e[62]=ne):ne=e[62];let ie;e[63]!==ne?(ie=t.jsx(Xe,{htmlFor:"secret-value",children:ne}),e[63]=ne,e[64]=ie):ie=e[64];let Pe;e[65]!==s?(Pe=s("mainPanelTabs.hostingTab.secretValuePlaceholder"),e[65]=s,e[66]=Pe):Pe=e[66];let Ce;e[67]===Symbol.for("react.memo_cache_sentinel")?(Ce=M=>b(M.target.value),e[67]=Ce):Ce=e[67];let me;e[68]!==u||e[69]!==T.isPending||e[70]!==Pe?(me=t.jsx(it,{id:"secret-value",type:"password",placeholder:Pe,value:u,onChange:Ce,className:"font-mono text-xs",autoComplete:"new-password",disabled:T.isPending}),e[68]=u,e[69]=T.isPending,e[70]=Pe,e[71]=me):me=e[71];let pe;e[72]!==ie||e[73]!==me?(pe=t.jsxs("div",{className:"flex flex-col gap-2",children:[ie,me]}),e[72]=ie,e[73]=me,e[74]=pe):pe=e[74];let le;e[75]!==s?(le=s("mainPanelTabs.hostingTab.secretScope"),e[75]=s,e[76]=le):le=e[76];let ae;e[77]!==le?(ae=t.jsx(Xe,{children:le}),e[77]=le,e[78]=ae):ae=e[78];let de;e[79]===Symbol.for("react.memo_cache_sentinel")?(de=M=>N(M==="build"?"build":"runtime"),e[79]=de):de=e[79];const De=T.isPending;let fe;e[80]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx(Ot,{className:"w-full",children:t.jsx(Bt,{})}),e[80]=fe):fe=e[80];let ue;e[81]!==s?(ue=s("mainPanelTabs.hostingTab.secretScopeRuntime"),e[81]=s,e[82]=ue):ue=e[82];let oe;e[83]!==ue?(oe=t.jsx(ft,{value:"runtime",children:ue}),e[83]=ue,e[84]=oe):oe=e[84];let Te;e[85]!==s?(Te=s("mainPanelTabs.hostingTab.secretScopeBuild"),e[85]=s,e[86]=Te):Te=e[86];let he;e[87]!==Te?(he=t.jsx(ft,{value:"build",children:Te}),e[87]=Te,e[88]=he):he=e[88];let xe;e[89]!==oe||e[90]!==he?(xe=t.jsxs(qt,{children:[oe,he]}),e[89]=oe,e[90]=he,e[91]=xe):xe=e[91];let ve;e[92]!==x||e[93]!==T.isPending||e[94]!==xe?(ve=t.jsxs(Mt,{value:x,onValueChange:de,disabled:De,children:[fe,xe]}),e[92]=x,e[93]=T.isPending,e[94]=xe,e[95]=ve):ve=e[95];let ye;e[96]!==x||e[97]!==s?(ye=s(x==="build"?"mainPanelTabs.hostingTab.secretScopeBuildHint":"mainPanelTabs.hostingTab.secretScopeRuntimeHint"),e[96]=x,e[97]=s,e[98]=ye):ye=e[98];let ge;e[99]!==ye?(ge=t.jsx("p",{className:"text-xs text-muted-foreground",children:ye}),e[99]=ye,e[100]=ge):ge=e[100];let re;e[101]!==ae||e[102]!==ve||e[103]!==ge?(re=t.jsxs("div",{className:"flex flex-col gap-2",children:[ae,ve,ge]}),e[101]=ae,e[102]=ve,e[103]=ge,e[104]=re):re=e[104];let be;e[105]===Symbol.for("react.memo_cache_sentinel")?(be=()=>g(!1),e[105]=be):be=e[105];const we=T.isPending;let $;e[106]!==s?($=s("mainPanelTabs.hostingTab.cancel"),e[106]=s,e[107]=$):$=e[107];let se;e[108]!==T.isPending||e[109]!==$?(se=t.jsx(Ie,{variant:"outline",type:"button",onClick:be,disabled:we,children:$}),e[108]=T.isPending,e[109]=$,e[110]=se):se=e[110];let Se;e[111]!==d||e[112]!==u||e[113]!==T.isPending?(Se=T.isPending||!d.trim()||!u,e[111]=d,e[112]=u,e[113]=T.isPending,e[114]=Se):Se=e[114];let je;e[115]!==T.isPending||e[116]!==s?(je=T.isPending?s("mainPanelTabs.hostingTab.saving"):s("mainPanelTabs.hostingTab.add"),e[115]=T.isPending,e[116]=s,e[117]=je):je=e[117];let $e;e[118]!==Se||e[119]!==je?($e=t.jsx(Ie,{type:"submit",disabled:Se,children:je}),e[118]=Se,e[119]=je,e[120]=$e):$e=e[120];let ze;e[121]!==se||e[122]!==$e?(ze=t.jsxs(Nt,{children:[se,$e]}),e[121]=se,e[122]=$e,e[123]=ze):ze=e[123];let Ke;e[124]!==O||e[125]!==K||e[126]!==pe||e[127]!==re||e[128]!==ze?(Ke=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:O,children:[K,pe,re,ze]}),e[124]=O,e[125]=K,e[126]=pe,e[127]=re,e[128]=ze,e[129]=Ke):Ke=e[129];let Le;e[130]!==G||e[131]!==Ke?(Le=t.jsxs(Ct,{className:"sm:max-w-md",children:[G,Ke]}),e[130]=G,e[131]=Ke,e[132]=Le):Le=e[132];let _e;e[133]!==h||e[134]!==Le?(_e=t.jsx(Dt,{open:h,onOpenChange:g,children:Le}),e[133]=h,e[134]=Le,e[135]=_e):_e=e[135];const Be=C!=null;let Ve;e[136]===Symbol.for("react.memo_cache_sentinel")?(Ve=M=>{M||P(null)},e[136]=Ve):Ve=e[136];let ke;e[137]!==s?(ke=s("mainPanelTabs.hostingTab.confirmDeleteSecretTitle"),e[137]=s,e[138]=ke):ke=e[138];const Je=C?.name??"";let He;e[139]!==s||e[140]!==Je?(He=s("mainPanelTabs.hostingTab.confirmDeleteSecretDescription",{name:Je}),e[139]=s,e[140]=Je,e[141]=He):He=e[141];let Ee;e[142]!==s?(Ee=s("mainPanelTabs.hostingTab.deleteSecret"),e[142]=s,e[143]=Ee):Ee=e[143];let Oe;e[144]!==v||e[145]!==C?(Oe=()=>{C&&v.mutate(C)},e[144]=v,e[145]=C,e[146]=Oe):Oe=e[146];let qe;e[147]!==v.isPending||e[148]!==Be||e[149]!==ke||e[150]!==He||e[151]!==Ee||e[152]!==Oe?(qe=t.jsx(wt,{open:Be,onOpenChange:Ve,title:ke,description:He,confirmLabel:Ee,pending:v.isPending,onConfirm:Oe}),e[147]=v.isPending,e[148]=Be,e[149]=ke,e[150]=He,e[151]=Ee,e[152]=Oe,e[153]=qe):qe=e[153];let Ue;return e[154]!==p||e[155]!==I||e[156]!==Y||e[157]!==_e||e[158]!==qe?(Ue=t.jsxs(ut,{title:p,actions:I,children:[Y,_e,qe]}),e[154]=p,e[155]=I,e[156]=Y,e[157]=_e,e[158]=qe,e[159]=Ue):Ue=e[159],Ue}function Sn(r){return ce.error(rt(r))}function Nn(r){return ce.error(rt(r))}const Cn=3e4;function El(r){const e=ee.c(111),{virtualMcpId:o}=r,l=Ae(),{org:a}=Ds(),i=Rs(o),c=Fs(i),m=!!c,s=c?`/api/${a.slug}/hosting/${encodeURIComponent(c)}`:"";let n;e[0]!==s||e[1]!==m?(n=(O,k)=>({queryKey:O,queryFn:()=>Qt(`${s}${k}`),enabled:m,retry:!1,staleTime:Cn}),e[0]=s,e[1]=m,e[2]=n):n=e[2];const h=n,g=c??"",d=ct(h(Ye.hostingDeployments(a.slug,g),"/deployments")),f=ct(h(Ye.hostingEnv(a.slug,g),"/env")),u=ct(h(Ye.hostingSecrets(a.slug,g),"/secrets")),b=ct(h(Ye.hostingRedirects(a.slug,g),"/redirects")),x=ct(h(Ye.hostingDomains(a.slug,g),"/domains"));if(!c){let O;e[3]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(kt,{className:"size-5"}),e[3]=O):O=e[3];let k;e[4]!==l?(k=l("mainPanelTabs.hostingTab.noSiteTitle"),e[4]=l,e[5]=k):k=e[5];let E;e[6]!==l?(E=l("mainPanelTabs.hostingTab.noSiteDescription"),e[6]=l,e[7]=E):E=e[7];let B;return e[8]!==k||e[9]!==E?(B=t.jsx("div",{className:"flex flex-1 items-center justify-center p-6",children:t.jsx(Ze,{icon:O,title:k,description:E})}),e[8]=k,e[9]=E,e[10]=B):B=e[10],B}if(jt(d.error)&&jt(f.error)&&jt(b.error)){let O;e[11]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(kt,{className:"size-5"}),e[11]=O):O=e[11];let k;e[12]!==l?(k=l("mainPanelTabs.hostingTab.notConnectedTitle"),e[12]=l,e[13]=k):k=e[13];let E;e[14]!==l?(E=l("mainPanelTabs.hostingTab.notConnectedDescription"),e[14]=l,e[15]=E):E=e[15];let B;return e[16]!==k||e[17]!==E?(B=t.jsx("div",{className:"flex flex-1 items-center justify-center p-6",children:t.jsx(Ze,{icon:O,title:k,description:E})}),e[16]=k,e[17]=E,e[18]=B):B=e[18],B}let C,P,S,y,R,w,j,T,V,q;if(e[19]!==d.data||e[20]!==x.data||e[21]!==f.data||e[22]!==b.data||e[23]!==u.data){P=mt(d.data,"items");let O;e[34]!==f.data?(O=mt(f.data,"vars"),e[34]=f.data,e[35]=O):O=e[35],R=O;let k;e[36]!==f.data?(k=mt(f.data,"codeVars"),e[36]=f.data,e[37]=k):k=e[37],C=k;let E;e[38]!==u.data?(E=mt(u.data,"secrets"),e[38]=u.data,e[39]=E):E=e[39],V=E;let B;e[40]!==b.data?(B=mt(b.data,"items"),e[40]=b.data,e[41]=B):B=e[41],T=B;const X=x.data;let te;e[42]!==X?.items?(te=X?.items??[],e[42]=X?.items,e[43]=te):te=e[43],y=te;let K;e[44]!==X?.dnsTemplate?(K=X?.dnsTemplate??[],e[44]=X?.dnsTemplate,e[45]=K):K=e[45],S=K;const ne=P.find(wn);w=zt((ne??P.find(Dn))?.framework),j=ne?.servingUrl??null,q=j?j.replace(/^https?:\/\//,"").replace(/\/$/,""):null,e[19]=d.data,e[20]=x.data,e[21]=f.data,e[22]=b.data,e[23]=u.data,e[24]=C,e[25]=P,e[26]=S,e[27]=y,e[28]=R,e[29]=w,e[30]=j,e[31]=T,e[32]=V,e[33]=q}else C=e[24],P=e[25],S=e[26],y=e[27],R=e[28],w=e[29],j=e[30],T=e[31],V=e[32],q=e[33];const F=q;let v;e[46]!==s||e[47]!==a.slug||e[48]!==c?(v=t.jsx(Gs,{base:s,orgSlug:a.slug,site:c}),e[46]=s,e[47]=a.slug,e[48]=c,e[49]=v):v=e[49];let H;e[50]!==l?(H=l("mainPanelTabs.hostingTab.title"),e[50]=l,e[51]=H):H=e[51];let A;e[52]!==w?(A=w&&t.jsx(Re,{variant:"secondary",children:w}),e[52]=w,e[53]=A):A=e[53];let Q;e[54]!==H||e[55]!==A?(Q=t.jsxs("span",{className:"inline-flex items-center gap-2.5",children:[H,A]}),e[54]=H,e[55]=A,e[56]=Q):Q=e[56];let _;e[57]!==v||e[58]!==Q?(_=t.jsx(Jt.Title,{actions:v,children:Q}),e[57]=v,e[58]=Q,e[59]=_):_=e[59];let W;e[60]!==F||e[61]!==j?(W=j&&F&&t.jsx("p",{className:"flex flex-wrap items-center gap-x-1.5 text-sm text-muted-foreground",children:t.jsxs("a",{href:j,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 font-mono text-xs text-foreground hover:underline",children:[F,t.jsx(_t,{className:"size-3"})]})}),e[60]=F,e[61]=j,e[62]=W):W=e[62];let J;e[63]!==_||e[64]!==W?(J=t.jsxs("div",{className:"flex flex-col gap-2",children:[_,W]}),e[63]=_,e[64]=W,e[65]=J):J=e[65];let U;e[66]!==s||e[67]!==P||e[68]!==d.error||e[69]!==d.isLoading||e[70]!==m||e[71]!==a.slug||e[72]!==c?(U=t.jsx(nn,{base:s,orgSlug:a.slug,site:c,enabled:m,deployments:P,isLoading:d.isLoading,error:d.error}),e[66]=s,e[67]=P,e[68]=d.error,e[69]=d.isLoading,e[70]=m,e[71]=a.slug,e[72]=c,e[73]=U):U=e[73];let p;e[74]!==s||e[75]!==C||e[76]!==f.error||e[77]!==f.isLoading||e[78]!==R||e[79]!==a.slug||e[80]!==c?(p=t.jsx(gn,{base:s,orgSlug:a.slug,site:c,envVars:R,codeVars:C,isLoading:f.isLoading,error:f.error}),e[74]=s,e[75]=C,e[76]=f.error,e[77]=f.isLoading,e[78]=R,e[79]=a.slug,e[80]=c,e[81]=p):p=e[81];let I;e[82]!==s||e[83]!==a.slug||e[84]!==V||e[85]!==u.error||e[86]!==u.isLoading||e[87]!==c?(I=t.jsx(yn,{base:s,orgSlug:a.slug,site:c,secrets:V,isLoading:u.isLoading,error:u.error}),e[82]=s,e[83]=a.slug,e[84]=V,e[85]=u.error,e[86]=u.isLoading,e[87]=c,e[88]=I):I=e[88];let Y;e[89]!==s||e[90]!==S||e[91]!==y||e[92]!==x.error||e[93]!==x.isLoading||e[94]!==a.slug||e[95]!==c?(Y=t.jsx(fn,{base:s,orgSlug:a.slug,site:c,domains:y,dnsTemplate:S,isLoading:x.isLoading,error:x.error}),e[89]=s,e[90]=S,e[91]=y,e[92]=x.error,e[93]=x.isLoading,e[94]=a.slug,e[95]=c,e[96]=Y):Y=e[96];let D;e[97]!==s||e[98]!==a.slug||e[99]!==T||e[100]!==b.error||e[101]!==b.isLoading||e[102]!==c?(D=t.jsx(jn,{base:s,orgSlug:a.slug,site:c,redirects:T,isLoading:b.isLoading,error:b.error}),e[97]=s,e[98]=a.slug,e[99]=T,e[100]=b.error,e[101]=b.isLoading,e[102]=c,e[103]=D):D=e[103];let G;return e[104]!==U||e[105]!==p||e[106]!==I||e[107]!==Y||e[108]!==D||e[109]!==J?(G=t.jsx("div",{className:"h-full min-h-0 overflow-y-auto",children:t.jsx(Jt.Body,{maxWidth:"max-w-5xl",children:t.jsxs(ws,{children:[J,U,p,I,Y,D]})})}),e[104]=U,e[105]=p,e[106]=I,e[107]=Y,e[108]=D,e[109]=J,e[110]=G):G=e[110],G}function Dn(r){return r.framework}function wn(r){return r.up===!0}export{El as HostingTab};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as E,d as U,G as N,b as w,M as k,j as o,B as R,r as y,E as P,X as z,x as F,K as L,e as O,o as _,J as A,u as B,Y,O as H}from"./index-CVgPrRAu.js";import{C as K,p as j,s as G,a as V,n as W}from"./self-tool-result-D4msOfWc.js";import{f as Q,d as $,D as q,g as J}from"./dialog-BKxFfNHJ.js";import{c as X,C as Z,a as ee}from"./connect-layout-DtPpA6mQ.js";import{W as T,u as te,S as oe}from"./use-mcp-client-DZ5gIGKb.js";import{i as D}from"./ArrowRight-CwW3g0To.js";import{u as re}from"./use-organization-settings-B1MpzKFj.js";import{a as ie}from"./index-DfoDjjAA.js";import{C as ne}from"./chat-context-DUhIY1vi.js";import{T as ae}from"./hooks-CD4utilj.js";import{T as S}from"./toolbar-XLAZ4nIL.js";import{S as se,M as me}from"./shell-controls-DHSX7Oie.js";import"./integration-icon-Dn1NYpCz.js";import"./Tool02-CHSvTEdf.js";import"./agent-icon-WARhM7M2.js";import"./AlertCircle-D4NuvoWF.js";import"./Tool01-B3Urh0ia.js";import"./ArrowUp-CE0XaPst.js";import"./ArrowLeft-Crsru-zt.js";import"./TrendUp01-BJ3iMwlw.js";import"./ZoomOut-DNkO_pWo.js";import"./Users03-CYnDP3qH.js";import"./CheckCircle-DuLvoNqZ.js";import"./Check-Dr5PXVFV.js";import"./ChevronUp--7-Trc-f.js";import"./ChevronRight-DQ3KAw-I.js";import"./ChevronSelectorVertical-PMZDp115.js";import"./DotsVertical-CNAofflT.js";import"./UserSquare-CvMDO_ZO.js";import"./Copy01-C8ycq1Gx.js";import"./CreditCard01-D-KFkcCL.js";import"./Download01-DKB5sfo3.js";import"./Settings02-CaRMlhts.js";import"./Eye-DbSPBsRj.js";import"./Share07-Bqjrc_Dp.js";import"./GitBranch01-5T0_iaaf.js";import"./Globe01-BKjZm6l_.js";import"./XClose-DsVxNFfh.js";import"./HardDrive-Dj7xHhpl.js";import"./Image01-BQnSt7zb.js";import"./Key01-D57xvqGH.js";import"./Link01-C9WOmTZf.js";import"./LinkExternal01-D5AszrfH.js";import"./Monitor01-AZBV0Kfj.js";import"./Sun-D001M5nI.js";import"./Package-Clxh7ot3.js";import"./Palette-CtewWm3m.js";import"./Play-BpAIVQBv.js";import"./Plus-ItHVPkbK.js";import"./SearchLg-CM7dyzZH.js";import"./SearchMd-BMT9SPzv.js";import"./Shield01-n9IgLqRT.js";import"./Stars01-BBKM6KGw.js";import"./Trash01-PyL_fMv9.js";import"./Upload01-D-aUPc1o.js";import"./User01-B_C1ZTyQ.js";import"./Users01-i0DLC5lP.js";import"./XCircle-ChtZovJc.js";import"./Zap-DA8trGp5.js";import"./extract-connection-data-BAAFx1zB.js";import"./metadata-dUsYcpuu.js";import"./connection-B7uvnVAy.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./form-2ui1swsD.js";import"./label-eEghsgAb.js";import"./input-CHsDtwWV.js";import"./use-debounced-value-sSKOFDpK.js";import"./authenticate-and-persist-oauth-DJ7TJH5a.js";import"./mcp-oauth-DTC0gHPR.js";import"./auth-5paz2QAy.js";import"./track-tHAt17X6.js";import"./use-destination-route-fVj57v1h.js";import"./schema-CKRAjfV3.js";import"./task-board-ByqLYcCu.js";import"./project-icon-gggHkzMG.js";import"./use-virtual-mcp-CiaAtDR5.js";import"./github-repo-CTPv5ZM2.js";import"./thread-route-D8Eq3R6j.js";import"./settings-sidebar-BENAKAud.js";import"./toolbar-icon-button-DtvUaK_c.js";import"./command-oGPXXyFx.js";import"./index-Cj7oCSuC.js";import"./drawer-nL9pyZUk.js";import"./popover-DynDf0Y2.js";import"./create-organization-dialog-CqTZz8UB.js";import"./alert-dialog-CaVjuOTA.js";import"./anchors-yqDzZN4K.js";import"./use-join-requests-CevmG6yf.js";import"./avatar-bR8EiQIx.js";import"./use-deployment-admin-DXV8y9Nh.js";import"./use-is-desktop-app-BNujXJc_.js";import"./invite-member-dialog-wvsrz2Q7.js";import"./select-BGVsYDSA.js";import"./textarea-C9uMkekO.js";import"./use-org-auth-client-Bbec5sHg.js";import"./use-organization-roles-z_F4y8Y9.js";import"./task-route-hsiwBWRZ.js";import"./collection-search-BxDajREA.js";import"./connection-card-02FESqWH.js";import"./use-registry-connections-BWopj3Tx.js";import"./use-connection-C1ecoleA.js";import"./useInfiniteQuery-Cu_EdRgj.js";import"./infiniteQueryObserver-BiLjJICa.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-CITJ0kGN.js";import"./slugify-CEUa2lfQ.js";import"./connection-form-helpers-Do3Fl1Ot.js";import"./collection-tabs-DhsuK8J7.js";import"./badge-By_bksNf.js";import"./use-infinite-scroll-CmFvAp0p.js";import"./useSuspenseInfiniteQuery-BJrugfeG.js";import"./use-ai-providers-D_JedBy2.js";import"./use-file-configs-SZklVed1.js";import"./site-slug-uya6Wp4-.js";import"./decopilot-sse-pool-B7r8i7-b.js";import"./use-decopilot-events-srvX3vGm.js";import"./dropdown-menu-BPwOHqUK.js";import"./github-icon-Dp3f4rNP.js";import"./get-initials-D-f_fDFw.js";import"./scroll-area-BLzS-vgd.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-navigate-to-agent-aR3BeJQ6.js";import"./thread-intent-BiDrvdHg.js";import"./use-panel-navigate-C8j4-ljJ.js";import"./source-system-tabs-CnEGUb4r.js";import"./autosend-Bvrla74y.js";import"./location-oTTXFrSF.js";function le(t){const e=E.c(21),{siteUrl:c}=t,n=U(),{org:u}=N(),a=w();let h;e[0]!==n||e[1]!==u?(h=()=>{localStorage.setItem(k.sidebarOpen(),JSON.stringify(!1));const x=X(u,T.COMMERCE_DISCOVERY(u.id));n({...x,search:{...x.search,sidepanel:!1}})},e[0]=n,e[1]=u,e[2]=h):h=e[2];const p=h;let C;e[3]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsx(Q,{className:"bg-black/15 backdrop-blur-sm"}),e[3]=C):C=e[3];let s;e[4]!==a?(s=a("routes.commerceOnboarding.connectModal.dialogTitle"),e[4]=a,e[5]=s):s=e[5];let r;e[6]!==s?(r=o.jsx($,{className:"sr-only",children:s}),e[6]=s,e[7]=r):r=e[7];let m;e[8]!==p||e[9]!==a?(m=()=>o.jsxs("div",{className:"grid gap-4 p-6",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:a("routes.commerceOnboarding.connectModal.loadError")}),o.jsxs(R,{type:"button",size:"xl",className:"w-full",onClick:p,children:[a("routes.commerceOnboarding.connectModal.continueButton"),o.jsx(D,{size:18})]})]}),e[8]=p,e[9]=a,e[10]=m):m=e[10];let d;e[11]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(K,{}),e[11]=d):d=e[11];let i;e[12]!==p||e[13]!==c?(i=o.jsx(y.Suspense,{fallback:d,children:o.jsx(ue,{siteUrlFromUrl:c,onComplete:p})}),e[12]=p,e[13]=c,e[14]=i):i=e[14];let l;e[15]!==m||e[16]!==i?(l=o.jsx(P,{fallback:m,children:i}),e[15]=m,e[16]=i,e[17]=l):l=e[17];let b;return e[18]!==r||e[19]!==l?(b=o.jsx(q,{open:!0,children:o.jsxs(J,{children:[C,o.jsxs(z,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:de,onPointerDownOutside:pe,onInteractOutside:ce,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[r,l]})]})}),e[18]=r,e[19]=l,e[20]=b):b=e[20],b}function ce(t){return t.preventDefault()}function pe(t){return t.preventDefault()}function de(t){return t.preventDefault()}function ue({siteUrlFromUrl:t,onComplete:e}){const c=w(),{org:n}=N(),u=T.COMMERCE_DISCOVERY(n.id),a=te({connectionId:oe,orgId:n.id,orgSlug:n.slug}),p=F({queryKey:L.commerceDiscoveryConnection(n.id,u),queryFn:async()=>{const f=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:u}});return j(f)},retry:!1}).data.item,C=typeof p?.metadata?.siteUrl=="string"?p.metadata.siteUrl:void 0,s=t||C,r=G(s),[m,d]=y.useState(!0),[i,l]=y.useState(null),b=O({mutationFn:async f=>j(await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:f}})),retry:!1}),x=O({mutationFn:async f=>j(await a.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:f}})),retry:!1}),v=async()=>{l(null),_("commerce_onboarding_open_report_clicked",{domain:r??void 0,organization_id:n.id});const f=s?W(s):null;if(f?.ok)try{let g=await x.mutateAsync(f.value);if(g.triggered||(_("commerce_onboarding_run_reclaim",{domain:r??void 0,organization_id:n.id,reason:g.reason??"not_upgraded"}),await b.mutateAsync(f.value),g=await x.mutateAsync(f.value)),!g.triggered){_("commerce_onboarding_run_failed",{domain:r??void 0,organization_id:n.id,error:g.reason??"not_triggered"}),l(c("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(g){_("commerce_onboarding_run_failed",{domain:r??void 0,organization_id:n.id,error:g instanceof Error?g.message:String(g)}),l(c("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()},I=re("demo_mode"),M=m||I;return o.jsx(Z,{siteHost:r,footer:o.jsxs(o.Fragment,{children:[i?o.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:i}):null,o.jsxs("div",{className:"flex gap-3",children:[o.jsx("div",{className:"min-w-0 flex-1",children:o.jsx(ee,{ready:M,pending:x.isPending,label:x.isPending?c("routes.commerceOnboarding.connectModal.openingReport"):c("routes.commerceOnboarding.connectModal.viewDiagnostic"),onClick:()=>{v()},children:o.jsx(D,{size:18})})}),M?null:o.jsx(R,{type:"button",variant:"secondary",size:"lg",className:"h-auto min-h-12 shrink-0 rounded-lg py-3 text-base font-medium leading-tight",disabled:x.isPending,onClick:()=>{v()},children:c("routes.commerceOnboarding.connectModal.skip")})]})]}),children:o.jsx(V,{org:n,cdConnectionId:u,siteUrl:s,onReadinessChange:d})})}function Fo(){const t=E.c(14),e=A();let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},t[0]=c):c=t[0];const{connect:n,siteUrl:u}=B(c),a=n==="1",h=e;let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(S.Header,{className:"grid-cols-1 px-1",children:o.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[o.jsx(se,{}),o.jsx(S.TogglesSlot,{}),o.jsx(S.TabsSlot,{className:"shrink-0"}),o.jsx(S.CenterSlot,{}),o.jsx(S.RightSlot,{})]})}),t[1]=p):p=t[1];const s=h&&p;let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:o.jsx(Y,{children:o.jsx(H,{})})}),t[2]=r):r=t[2];let m;t[3]!==s?(m=o.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[s,r]}),t[3]=s,t[4]=m):m=t[4];let d;t[5]!==e?(d=e&&o.jsx(me,{renderSidebar:fe}),t[5]=e,t[6]=d):d=t[6];let i;t[7]!==u||t[8]!==a?(i=a&&o.jsx(le,{siteUrl:u}),t[7]=u,t[8]=a,t[9]=i):i=t[9];let l;return t[10]!==m||t[11]!==d||t[12]!==i?(l=o.jsx(ae,{children:o.jsx(S.Provider,{children:o.jsxs(ne,{children:[m,d,i]})})}),t[10]=m,t[11]=d,t[12]=i,t[13]=l):l=t[13],l}function fe(t){const{onClose:e}=t;return o.jsx("div",{className:"flex h-full",children:o.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:o.jsx(ie,{onClose:e})})})}export{Fo as default};
|
|
1
|
+
import{c as E,d as U,G as N,b as w,M as k,j as o,B as R,r as y,E as P,X as z,x as F,K as L,e as O,o as _,J as A,u as B,Y,O as H}from"./index-y6Z5iMfg.js";import{C as K,p as j,s as G,a as V,n as W}from"./self-tool-result-DM7xixxP.js";import{f as Q,d as $,D as q,g as J}from"./dialog-CyDGwxcX.js";import{c as X,C as Z,a as ee}from"./connect-layout-BLwdQBWt.js";import{W as T,u as te,S as oe}from"./use-mcp-client-Cw1fcLqm.js";import{i as D}from"./ArrowRight-CuO69upc.js";import{u as re}from"./use-organization-settings-DucmPYOE.js";import{a as ie}from"./index-9Wn-1DpE.js";import{C as ne}from"./chat-context-C6UT7ht1.js";import{T as ae}from"./hooks-Bv30myGB.js";import{T as S}from"./toolbar-B5cewwJb.js";import{S as se,M as me}from"./shell-controls-nVElTnLJ.js";import"./integration-icon-CFGOsRgH.js";import"./Tool02-BAA6OFl0.js";import"./agent-icon-6EllA70W.js";import"./AlertCircle-Df7Uu4Sr.js";import"./Tool01-CmpQe3MS.js";import"./ArrowUp-DmWBbOjK.js";import"./ArrowLeft-Ce4LVTaQ.js";import"./TrendUp01-fHRYAiew.js";import"./ZoomOut-DhJWoynj.js";import"./Users03-B4Km0_9u.js";import"./CheckCircle-DWvslkKl.js";import"./Check-C1wq38_E.js";import"./ChevronUp-B0KEDz5f.js";import"./ChevronRight-B76sbAXC.js";import"./ChevronSelectorVertical-C4wJ3zDR.js";import"./DotsVertical-CBmzJDPB.js";import"./UserSquare-CXhk4rLY.js";import"./Copy01-rsN5AnPv.js";import"./CreditCard01-Cqs_Biv7.js";import"./Download01-zZEPtQ0U.js";import"./Settings02-t15FjJbr.js";import"./Eye-DFgd5114.js";import"./Share07-CJrTonmW.js";import"./GitBranch01-B7iymaqC.js";import"./Globe01-Df6dZmsR.js";import"./XClose-DvenHyNp.js";import"./HardDrive-CiahcooN.js";import"./Image01-CMpSR3RQ.js";import"./Key01-t3bX5YI3.js";import"./Link01-pX5C3rEv.js";import"./LinkExternal01-CzRiacvQ.js";import"./Monitor01-jzbehxNG.js";import"./Sun-vdviKSpi.js";import"./Package-CiAH049d.js";import"./Palette-CmMvG40G.js";import"./Play-k9_JCuZW.js";import"./Plus-Bac7Bl-V.js";import"./SearchLg-iYej-M-S.js";import"./SearchMd-hxPQERkg.js";import"./Shield01-DS-tpugO.js";import"./Stars01-ByE0-f1z.js";import"./Trash01-C6vCLvEw.js";import"./Upload01-lE597uPz.js";import"./User01-BPodfm7s.js";import"./Users01-Dgbd4CM_.js";import"./XCircle-BK1898xU.js";import"./Zap-nPZGKdXf.js";import"./extract-connection-data-DkL3Oqhk.js";import"./metadata-dUsYcpuu.js";import"./connection-D885aDuM.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./form-BnUN8JhF.js";import"./label-DGsSvY2I.js";import"./input-DRjCNSPN.js";import"./use-debounced-value-v41IOreQ.js";import"./authenticate-and-persist-oauth-6UYdTwrd.js";import"./mcp-oauth-Bm9ijvfC.js";import"./auth-DeD0YpKg.js";import"./track-BYunSel2.js";import"./use-destination-route-CY15sZqw.js";import"./schema-BDy_4D7A.js";import"./task-board-By8eCqZc.js";import"./project-icon-DQTfNALl.js";import"./use-virtual-mcp-Bnfc4yEo.js";import"./github-repo-CTPv5ZM2.js";import"./thread-route-jI9qvJe_.js";import"./settings-sidebar-BvIIdmkC.js";import"./toolbar-icon-button-BtBUZ8nA.js";import"./command-CF7nzIN2.js";import"./index-B_j4TgZF.js";import"./drawer-CqSEztKC.js";import"./popover-DrJcYe9C.js";import"./create-organization-dialog-gO5G25gp.js";import"./alert-dialog-CFCsKBpN.js";import"./anchors-yqDzZN4K.js";import"./use-join-requests-DbtrL0Pl.js";import"./avatar-CfO1mReu.js";import"./use-deployment-admin-C7c9x0vv.js";import"./use-is-desktop-app-BNujXJc_.js";import"./invite-member-dialog-qtYgFNfF.js";import"./select-BGnwGqnU.js";import"./textarea-CuF3aDTE.js";import"./use-org-auth-client-DvlpnDFO.js";import"./use-organization-roles-B3neE_6D.js";import"./task-route-B8aecmdq.js";import"./collection-search-7NUVJQfN.js";import"./connection-card-Nc1w-XCq.js";import"./use-registry-connections-DBp-MS3e.js";import"./use-connection-ClORxmw4.js";import"./useInfiniteQuery-DThUrotQ.js";import"./infiniteQueryObserver-CvFtTJPb.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-CITJ0kGN.js";import"./slugify-CEUa2lfQ.js";import"./connection-form-helpers-B4IwDJJQ.js";import"./collection-tabs-MvaIz7gt.js";import"./badge-GP_pc1i_.js";import"./use-infinite-scroll-Bw5rNIGx.js";import"./useSuspenseInfiniteQuery-Dsg0_SX3.js";import"./use-ai-providers-BMexfNaB.js";import"./use-file-configs-Dm3fOdMk.js";import"./site-slug-uya6Wp4-.js";import"./decopilot-sse-pool-Bm_3HC4t.js";import"./use-decopilot-events-C0NWoSQc.js";import"./dropdown-menu-CgwRqOnX.js";import"./github-icon-7BmoW2Y2.js";import"./get-initials-D-f_fDFw.js";import"./scroll-area-C18Y2v3L.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-navigate-to-agent-COVw0ub8.js";import"./thread-intent-q_RVjRN0.js";import"./use-panel-navigate-C6Ga2vR8.js";import"./source-system-tabs-CnEGUb4r.js";import"./autosend-DI1ZpOT0.js";import"./location-oTTXFrSF.js";function le(t){const e=E.c(21),{siteUrl:c}=t,n=U(),{org:u}=N(),a=w();let h;e[0]!==n||e[1]!==u?(h=()=>{localStorage.setItem(k.sidebarOpen(),JSON.stringify(!1));const x=X(u,T.COMMERCE_DISCOVERY(u.id));n({...x,search:{...x.search,sidepanel:!1}})},e[0]=n,e[1]=u,e[2]=h):h=e[2];const p=h;let C;e[3]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsx(Q,{className:"bg-black/15 backdrop-blur-sm"}),e[3]=C):C=e[3];let s;e[4]!==a?(s=a("routes.commerceOnboarding.connectModal.dialogTitle"),e[4]=a,e[5]=s):s=e[5];let r;e[6]!==s?(r=o.jsx($,{className:"sr-only",children:s}),e[6]=s,e[7]=r):r=e[7];let m;e[8]!==p||e[9]!==a?(m=()=>o.jsxs("div",{className:"grid gap-4 p-6",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:a("routes.commerceOnboarding.connectModal.loadError")}),o.jsxs(R,{type:"button",size:"xl",className:"w-full",onClick:p,children:[a("routes.commerceOnboarding.connectModal.continueButton"),o.jsx(D,{size:18})]})]}),e[8]=p,e[9]=a,e[10]=m):m=e[10];let d;e[11]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(K,{}),e[11]=d):d=e[11];let i;e[12]!==p||e[13]!==c?(i=o.jsx(y.Suspense,{fallback:d,children:o.jsx(ue,{siteUrlFromUrl:c,onComplete:p})}),e[12]=p,e[13]=c,e[14]=i):i=e[14];let l;e[15]!==m||e[16]!==i?(l=o.jsx(P,{fallback:m,children:i}),e[15]=m,e[16]=i,e[17]=l):l=e[17];let b;return e[18]!==r||e[19]!==l?(b=o.jsx(q,{open:!0,children:o.jsxs(J,{children:[C,o.jsxs(z,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:de,onPointerDownOutside:pe,onInteractOutside:ce,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[r,l]})]})}),e[18]=r,e[19]=l,e[20]=b):b=e[20],b}function ce(t){return t.preventDefault()}function pe(t){return t.preventDefault()}function de(t){return t.preventDefault()}function ue({siteUrlFromUrl:t,onComplete:e}){const c=w(),{org:n}=N(),u=T.COMMERCE_DISCOVERY(n.id),a=te({connectionId:oe,orgId:n.id,orgSlug:n.slug}),p=F({queryKey:L.commerceDiscoveryConnection(n.id,u),queryFn:async()=>{const f=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:u}});return j(f)},retry:!1}).data.item,C=typeof p?.metadata?.siteUrl=="string"?p.metadata.siteUrl:void 0,s=t||C,r=G(s),[m,d]=y.useState(!0),[i,l]=y.useState(null),b=O({mutationFn:async f=>j(await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:f}})),retry:!1}),x=O({mutationFn:async f=>j(await a.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:f}})),retry:!1}),v=async()=>{l(null),_("commerce_onboarding_open_report_clicked",{domain:r??void 0,organization_id:n.id});const f=s?W(s):null;if(f?.ok)try{let g=await x.mutateAsync(f.value);if(g.triggered||(_("commerce_onboarding_run_reclaim",{domain:r??void 0,organization_id:n.id,reason:g.reason??"not_upgraded"}),await b.mutateAsync(f.value),g=await x.mutateAsync(f.value)),!g.triggered){_("commerce_onboarding_run_failed",{domain:r??void 0,organization_id:n.id,error:g.reason??"not_triggered"}),l(c("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(g){_("commerce_onboarding_run_failed",{domain:r??void 0,organization_id:n.id,error:g instanceof Error?g.message:String(g)}),l(c("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()},I=re("demo_mode"),M=m||I;return o.jsx(Z,{siteHost:r,footer:o.jsxs(o.Fragment,{children:[i?o.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:i}):null,o.jsxs("div",{className:"flex gap-3",children:[o.jsx("div",{className:"min-w-0 flex-1",children:o.jsx(ee,{ready:M,pending:x.isPending,label:x.isPending?c("routes.commerceOnboarding.connectModal.openingReport"):c("routes.commerceOnboarding.connectModal.viewDiagnostic"),onClick:()=>{v()},children:o.jsx(D,{size:18})})}),M?null:o.jsx(R,{type:"button",variant:"secondary",size:"lg",className:"h-auto min-h-12 shrink-0 rounded-lg py-3 text-base font-medium leading-tight",disabled:x.isPending,onClick:()=>{v()},children:c("routes.commerceOnboarding.connectModal.skip")})]})]}),children:o.jsx(V,{org:n,cdConnectionId:u,siteUrl:s,onReadinessChange:d})})}function Fo(){const t=E.c(14),e=A();let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},t[0]=c):c=t[0];const{connect:n,siteUrl:u}=B(c),a=n==="1",h=e;let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(S.Header,{className:"grid-cols-1 px-1",children:o.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[o.jsx(se,{}),o.jsx(S.TogglesSlot,{}),o.jsx(S.TabsSlot,{className:"shrink-0"}),o.jsx(S.CenterSlot,{}),o.jsx(S.RightSlot,{})]})}),t[1]=p):p=t[1];const s=h&&p;let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:o.jsx(Y,{children:o.jsx(H,{})})}),t[2]=r):r=t[2];let m;t[3]!==s?(m=o.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[s,r]}),t[3]=s,t[4]=m):m=t[4];let d;t[5]!==e?(d=e&&o.jsx(me,{renderSidebar:fe}),t[5]=e,t[6]=d):d=t[6];let i;t[7]!==u||t[8]!==a?(i=a&&o.jsx(le,{siteUrl:u}),t[7]=u,t[8]=a,t[9]=i):i=t[9];let l;return t[10]!==m||t[11]!==d||t[12]!==i?(l=o.jsx(ae,{children:o.jsx(S.Provider,{children:o.jsxs(ne,{children:[m,d,i]})})}),t[10]=m,t[11]=d,t[12]=i,t[13]=l):l=t[13],l}function fe(t){const{onClose:e}=t;return o.jsx("div",{className:"flex h-full",children:o.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:o.jsx(ie,{onClose:e})})})}export{Fo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,G as _,u as E,j,N}from"./index-
|
|
1
|
+
import{c as v,G as _,u as E,j,N}from"./index-y6Z5iMfg.js";import{D as f}from"./use-destination-route-CY15sZqw.js";const T={board:f.tasks,files:f.library,reports:f.reports,overview:f.home};function I(e){return!!e&&e in T}function O(){const e=v.c(34),{org:l}=_();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={strict:!1},e[0]=m):m=e[0];const{connect:o,siteUrl:a,main:c,task:h,sidepanel:i,virtualmcpid:p}=E(m);if(I(c)){const r=T[c];let t;e[1]!==l.slug?(t={org:l.slug},e[1]=l.slug,e[2]=t):t=e[2];let s;e[3]!==o||e[4]!==i||e[5]!==a||e[6]!==h?(s={connect:o,siteUrl:a,task:h,sidepanel:i},e[3]=o,e[4]=i,e[5]=a,e[6]=h,e[7]=s):s=e[7];let d;return e[8]!==r||e[9]!==t||e[10]!==s?(d=j.jsx(N,{to:r,params:t,search:s,replace:!0}),e[8]=r,e[9]=t,e[10]=s,e[11]=d):d=e[11],d}const g=p??null;if(g){let r;e[12]!==l.slug?(r={org:l.slug,panel:void 0},e[12]=l.slug,e[13]=r):r=e[13];let t;e[14]!==o||e[15]!==c||e[16]!==g||e[17]!==i||e[18]!==a?(t={virtualmcpid:g,connect:o,siteUrl:a,sidepanel:i,main:c},e[14]=o,e[15]=c,e[16]=g,e[17]=i,e[18]=a,e[19]=t):t=e[19];let s;return e[20]!==r||e[21]!==t?(s=j.jsx(N,{to:f.agents,params:r,search:t,replace:!0}),e[20]=r,e[21]=t,e[22]=s):s=e[22],s}let n;e[23]!==l.slug?(n={org:l.slug},e[23]=l.slug,e[24]=n):n=e[24];let u;e[25]!==o||e[26]!==c||e[27]!==i||e[28]!==a||e[29]!==p?(u={connect:o,siteUrl:a,sidepanel:i,main:c,virtualmcpid:p},e[25]=o,e[26]=c,e[27]=i,e[28]=a,e[29]=p,e[30]=u):u=e[30];let x;return e[31]!==n||e[32]!==u?(x=j.jsx(N,{to:f.home,params:n,search:u,replace:!0}),e[31]=n,e[32]=u,e[33]=x):x=e[33],x}export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,f as p,c2 as u,j as s,bA as x,N as a}from"./index-
|
|
1
|
+
import{c as f,f as p,c2 as u,j as s,bA as x,N as a}from"./index-y6Z5iMfg.js";import{C as j}from"./capability-load-error-BoR9RbMs.js";function d(){const t=f.c(21);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:g,error:c}=u();if(g){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(x,{}),t[1]=e):e=t[1],e}if(c){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("registry:manage")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/store",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("monitoring:view")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}if(i("members:manage")){let e;return t[17]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[17]=r,t[18]=e):e=t[18],e}let n;return t[19]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[19]=r,t[20]=n):n=t[20],n}export{d as default};
|