decocms 4.316.2 → 4.316.4
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-ukognKDh.js → AlertCircle-D9ruOTll.js} +1 -1
- package/dist/client/assets/{AreaChart-DkHEbMXa.js → AreaChart-BUzAG-sY.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CcY96p8V.js → ArrowLeft-Cy2wtHjp.js} +1 -1
- package/dist/client/assets/{ArrowUp-DsqDzR2M.js → ArrowUp-IHvMe877.js} +1 -1
- package/dist/client/assets/{Check-CjVb3A2B.js → Check-CQfeFG0J.js} +1 -1
- package/dist/client/assets/{CheckCircle-CNh0i1pk.js → CheckCircle-DixvvXRD.js} +1 -1
- package/dist/client/assets/{ChevronDown-CHzj-r-D.js → ChevronDown-Bbw5EPde.js} +1 -1
- package/dist/client/assets/{ChevronRight-DudsZLJR.js → ChevronRight-tjdYmgMU.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-D7B7y3yK.js → ChevronSelectorVertical-B4Cvz__S.js} +1 -1
- package/dist/client/assets/{ChevronUp-DXFUd2s_.js → ChevronUp-C1XvYJfE.js} +1 -1
- package/dist/client/assets/{Copy01-hygjHElI.js → Copy01-DSb-jNps.js} +1 -1
- package/dist/client/assets/{CreditCard01-Bia9U_rx.js → CreditCard01-BIiFCQ9F.js} +1 -1
- package/dist/client/assets/{DotsVertical-JglrDVpy.js → DotsVertical-CI2gmyko.js} +1 -1
- package/dist/client/assets/{Download01-CeGv-TTP.js → Download01-D-8foRIc.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-DoiEIJbH.js → ErrorBarContext-DVWqFofm.js} +1 -1
- package/dist/client/assets/{Eye-ca7Uforo.js → Eye-W4rwkQod.js} +1 -1
- package/dist/client/assets/{FilterLines-D4iwTIZp.js → FilterLines-BQjtHXf3.js} +1 -1
- package/dist/client/assets/{GitBranch01-Yp75Z6dK.js → GitBranch01-IBdYNZpQ.js} +1 -1
- package/dist/client/assets/{Globe01-4GdAAsZ6.js → Globe01-CG5k46z2.js} +1 -1
- package/dist/client/assets/{Globe04-xWUkTRMv.js → Globe04-Cpd4FTh9.js} +1 -1
- package/dist/client/assets/{HardDrive-D8k3PDhU.js → HardDrive-Dv0xaiIp.js} +1 -1
- package/dist/client/assets/{Image01-BN8vIwhD.js → Image01-CdbCiwl_.js} +1 -1
- package/dist/client/assets/{Key01-CIhmqSDX.js → Key01-qRuP-y6n.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BvvfOeIp.js → LinkExternal01-BoEtmXN6.js} +1 -1
- package/dist/client/assets/{LockUnlocked01-DqTQ7KJK.js → LockUnlocked01-C-NC7nce.js} +1 -1
- package/dist/client/assets/{LogOut01-B77dfaIF.js → LogOut01-OdlfriP6.js} +1 -1
- package/dist/client/assets/{Monitor01-DwsTIKx3.js → Monitor01-C7fqdG0G.js} +1 -1
- package/dist/client/assets/{Package-CIJxhw_5.js → Package-DaZUmOo6.js} +1 -1
- package/dist/client/assets/{Palette-BFUIY31j.js → Palette-DB3A9DRA.js} +1 -1
- package/dist/client/assets/{Play-tHtmJjQz.js → Play-1v7tfvf5.js} +1 -1
- package/dist/client/assets/{Plus-Dj4gBGXF.js → Plus-BmEJZgvj.js} +1 -1
- package/dist/client/assets/{SearchLg-B20iYteE.js → SearchLg-BzXCBCB7.js} +1 -1
- package/dist/client/assets/{SearchMd-CtNMeGZR.js → SearchMd-D_1cxfW2.js} +1 -1
- package/dist/client/assets/{Sector-DwEzkeD7.js → Sector-BNrI_A0-.js} +1 -1
- package/dist/client/assets/{Settings02-Cxm2-0JT.js → Settings02-BnXnky7g.js} +1 -1
- package/dist/client/assets/{Share07-BWbQUhmz.js → Share07-DFfisNQu.js} +1 -1
- package/dist/client/assets/{Shield01-BYEUTLgK.js → Shield01-QdmwV08k.js} +1 -1
- package/dist/client/assets/{Stars01-BOWdX_NA.js → Stars01-DwWfuZpa.js} +1 -1
- package/dist/client/assets/{Stars02-CK5d6rtJ.js → Stars02-C13c8s2f.js} +1 -1
- package/dist/client/assets/{Sun-BOCDllJr.js → Sun-th_JVwGQ.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-D8cwSMb8.js → SwitchHorizontal01-y0UkSoQd.js} +1 -1
- package/dist/client/assets/{Tool01-4xkLJUSv.js → Tool01-Cb3TWMVF.js} +1 -1
- package/dist/client/assets/{Tool02-D-w6cyH6.js → Tool02-BsQeYqfO.js} +1 -1
- package/dist/client/assets/{Trash01-BsmWnDfB.js → Trash01-D6D8Si9-.js} +1 -1
- package/dist/client/assets/{TrendUp01-DCdSMdfu.js → TrendUp01-B7XaqaFq.js} +1 -1
- package/dist/client/assets/{Upload01-CHZ_hcLs.js → Upload01-B5EcOFoA.js} +1 -1
- package/dist/client/assets/{User01-CcGanVet.js → User01-UWqtuaJ1.js} +1 -1
- package/dist/client/assets/{UserSquare-CsyWGh8Q.js → UserSquare-DpnVyAcN.js} +1 -1
- package/dist/client/assets/{Users01-CACEN1-A.js → Users01-BNVtip1D.js} +1 -1
- package/dist/client/assets/{Users03-DrLeEcSF.js → Users03-C5_CkqFZ.js} +1 -1
- package/dist/client/assets/{XCircle-DcCF0Qmy.js → XCircle-BUE5dbkT.js} +1 -1
- package/dist/client/assets/{XClose-N2W7BjwG.js → XClose-Dw9C8IS-.js} +1 -1
- package/dist/client/assets/{YAxis-7gm70yTQ.js → YAxis-CGQx5XiU.js} +1 -1
- package/dist/client/assets/{Zap-ZMuKnf_b.js → Zap-k5BPVmw8.js} +1 -1
- package/dist/client/assets/{ZapSquare-8WncvVef.js → ZapSquare-CnjOplZY.js} +1 -1
- package/dist/client/assets/{ZoomOut-2_RHySTp.js → ZoomOut-DNYRpGPR.js} +1 -1
- package/dist/client/assets/{access-gate-t8QwzogA.js → access-gate-rN8hJ2BC.js} +1 -1
- package/dist/client/assets/{agent-icon-DzcgZISF.js → agent-icon-DtPy5BOM.js} +1 -1
- package/dist/client/assets/{agents-list-CD2vMimE.js → agents-list-BrQraPPx.js} +1 -1
- package/dist/client/assets/{ai-providers-1fTRVYKn.js → ai-providers-CrntVWIC.js} +1 -1
- package/dist/client/assets/{alert-C8KqB0An.js → alert-B0iVoAxb.js} +1 -1
- package/dist/client/assets/{alert-dialog-CyCiIe9m.js → alert-dialog-CXRYD7aV.js} +1 -1
- package/dist/client/assets/{analytics-tab-mzb3p4nm.js → analytics-tab-D7wRpZzo.js} +1 -1
- package/dist/client/assets/{api-keys-fb3lgnAt.js → api-keys-DWNDpYDc.js} +1 -1
- package/dist/client/assets/{app-editor-BtTvc_E6.js → app-editor-DBX38jcA.js} +1 -1
- package/dist/client/assets/{auth-BfqvV0Kl.js → auth-Cvz6-6jE.js} +1 -1
- package/dist/client/assets/{auth-catchall-Dghc9v9N.js → auth-catchall-BXbrhXJG.js} +1 -1
- package/dist/client/assets/{auth-entry-DVFXeUEl.js → auth-entry-BWGtwPK9.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BYREjcVZ.js → auth-split-layout-DB6jRZmg.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BYRlNzhn.js → authenticate-and-persist-oauth-Coxv7Vgr.js} +1 -1
- package/dist/client/assets/{automation-list-row-u4dixA_X.js → automation-list-row-619aCxg1.js} +1 -1
- package/dist/client/assets/{automation-runs-CaiwOMRQ.js → automation-runs-DdeGywzL.js} +1 -1
- package/dist/client/assets/{automations-Ct8qgLN0.js → automations-DHrVclwA.js} +1 -1
- package/dist/client/assets/{avatar-CUVRGiTH.js → avatar-CYo7q3VJ.js} +1 -1
- package/dist/client/assets/{badge-DchiuaQb.js → badge-BGLxBEab.js} +1 -1
- package/dist/client/assets/{block-document-Cj1S02GF.js → block-document-DNl5B-YS.js} +1 -1
- package/dist/client/assets/{breadcrumb-H6XFubH4.js → breadcrumb-CN3dLk0-.js} +1 -1
- package/dist/client/assets/{buckets-s3P6S2Gc.js → buckets-Do_V2F4R.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-Dtthxiji.js → bulk-category-panel-D80J7KPy.js} +1 -1
- package/dist/client/assets/{capability-load-error-B--8rldE.js → capability-load-error-BMijKekw.js} +1 -1
- package/dist/client/assets/{cards-BHBvgwoA.js → cards-DqLJKsZM.js} +1 -1
- package/dist/client/assets/{category-editor-BwnvdrT6.js → category-editor-ARAi32T4.js} +1 -1
- package/dist/client/assets/{cdn-tab-BxYy_8P7.js → cdn-tab-Ci836QUi.js} +1 -1
- package/dist/client/assets/{chart-iu13iDg0.js → chart-DOy4LkLY.js} +1 -1
- package/dist/client/assets/{chat-context-Dn1mZ94t.js → chat-context-CLMgqExR.js} +1 -1
- package/dist/client/assets/{checkbox-aodUABDC.js → checkbox-CuJCy_Vf.js} +1 -1
- package/dist/client/assets/{choose-editor-DXqT5R0P.js → choose-editor-BJC-ZcCJ.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CseRolZO.js → cli-auth-success-iiKKuBLH.js} +1 -1
- package/dist/client/assets/{collection-detail-pl-XQBJp.js → collection-detail-BNSQJboW.js} +1 -1
- package/dist/client/assets/{collection-display-button-CzyH9kgb.js → collection-display-button-wnargDTj.js} +1 -1
- package/dist/client/assets/{collection-search-CpiiG4Lr.js → collection-search-BxDEVMuN.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-D8kHIIpR.js → collection-table-wrapper-BJML7SJ-.js} +1 -1
- package/dist/client/assets/{collection-tabs-d_LOzhOa.js → collection-tabs-DrZLYcAN.js} +1 -1
- package/dist/client/assets/{command-Nv1MkjwN.js → command-Bj6a9l8j.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-C2yEixPS.js → commerce-onboarding-_uSIdLHM.js} +1 -1
- package/dist/client/assets/{config-B8SV58WE.js → config-WuJBof9E.js} +1 -1
- package/dist/client/assets/{connect-DgtSOran.js → connect-CGkgA9mB.js} +1 -1
- package/dist/client/assets/{connection-Bzar3V1L.js → connection-CVX6uXJ8.js} +1 -1
- package/dist/client/assets/{connection-card-BL5y0IeG.js → connection-card-BiQLvfag.js} +1 -1
- package/dist/client/assets/{connection-detail-CS4o3N0x.js → connection-detail-BcopXxZm.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-D7UUIQKW.js → connection-form-helpers-DQWFVV9n.js} +1 -1
- package/dist/client/assets/{connections-BGvRtjpV.js → connections-BouBZ_Y0.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-BFt_KK89.js → decopilot-sse-pool-EZGaJkSr.js} +1 -1
- package/dist/client/assets/{dialog-BgJhJtVN.js → dialog-Dj-xdSDO.js} +1 -1
- package/dist/client/assets/{domain-settings-CZm1uT-N.js → domain-settings-BUD8ZX7E.js} +1 -1
- package/dist/client/assets/{drawer-Gicv2tUJ.js → drawer-ogyN5q_L.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CCrWFOmG.js → dropdown-menu-CF4GgpKK.js} +1 -1
- package/dist/client/assets/{e2e-tab-CTUU2jNF.js → e2e-tab-BA3Ae8jA.js} +1 -1
- package/dist/client/assets/{editor-Byabv8W3.js → editor-DFiYS9Mx.js} +1 -1
- package/dist/client/assets/{empty-state-Dxu66iOt.js → empty-state-Cmh4O3Bf.js} +1 -1
- package/dist/client/assets/{empty-state-Do1gpKft.js → empty-state-GMZSrtLl.js} +1 -1
- package/dist/client/assets/{extract-connection-data-YLS8fFS3.js → extract-connection-data-CFjodDOw.js} +1 -1
- package/dist/client/assets/{file-explorer-DEG3H_eA.js → file-explorer-Bz1Un3aB.js} +1 -1
- package/dist/client/assets/{file-type-icon-DN8Dyx_f.js → file-type-icon-4epoDao8.js} +1 -1
- package/dist/client/assets/{folder-icon-CzNoQyTw.js → folder-icon-0gqlHPg-.js} +1 -1
- package/dist/client/assets/{form-DWOhYoa9.js → form-DmDzWCLu.js} +1 -1
- package/dist/client/assets/{general-DAGtTpsS.js → general-Bfjie_IC.js} +1 -1
- package/dist/client/assets/{github-repo-picker-P_1xCNug.js → github-repo-picker-DShJABm7.js} +1 -1
- package/dist/client/assets/{hooks-CP6Ol70Q.js → hooks-C66yn5wp.js} +1 -1
- package/dist/client/assets/{hosting-tab-CLAXNRWB.js → hosting-tab-DdBy-5sn.js} +1 -1
- package/dist/client/assets/{index-BUd8b85A.js → index-B-W0HK2G.js} +1 -1
- package/dist/client/assets/{index-BIweQG5i.js → index-Bk8CYqch.js} +1 -1
- package/dist/client/assets/{index-Cyh9mrpT.js → index-BtI0C6KC.js} +1 -1
- package/dist/client/assets/{index-DVP1fkUg.js → index-CvxaZPo3.js} +12 -12
- package/dist/client/assets/{index-Q8qeC2BI.js → index-DJLuLHBf.js} +1 -1
- package/dist/client/assets/{index-DRlhDwmF.js → index-DYOslw5Q.js} +3 -3
- package/dist/client/assets/{index-bimFIVpu.js → index-DmSW6I6t.js} +1 -1
- package/dist/client/assets/{index-DP-mn9n7.js → index-DuWICrqj.js} +1 -1
- package/dist/client/assets/{index-fxdPvzVg.js → index-S3NJ2KFn.js} +1 -1
- package/dist/client/assets/{index-redirect-lEVmpUdR.js → index-redirect-D5pWJ_3h.js} +1 -1
- package/dist/client/assets/{infra-billing-IP8jHxXe.js → infra-billing-DozKOkUU.js} +1 -1
- package/dist/client/assets/{input-CQFSNlYy.js → input-D6L-RGRl.js} +1 -1
- package/dist/client/assets/{integration-icon-C3KN5GGn.js → integration-icon-DAy0CCoS.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-LHqVAZ1Z.js → invite-member-dialog-CziVCAHd.js} +1 -1
- package/dist/client/assets/{label-BZynR1Jd.js → label-Gnh2CI8N.js} +1 -1
- package/dist/client/assets/{layout-TAGJ9B6i.js → layout-DzRZvkRs.js} +1 -1
- package/dist/client/assets/{login-DmIFb0sy.js → login-DJ9OQQ-e.js} +1 -1
- package/dist/client/assets/{markdown-v-pW8lDf.js → markdown-CxLjyonQ.js} +1 -1
- package/dist/client/assets/{mcp-oauth-D-3pNvK6.js → mcp-oauth-CB5aGa3N.js} +1 -1
- package/dist/client/assets/{members-Ci7oFcAa.js → members-C8bOznoJ.js} +1 -1
- package/dist/client/assets/{monaco-editor-CVYKIIQt.js → monaco-editor-BbJQVKJI.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Cnd2U-gn.js → monitoring-stats-row-C7XOK4N2.js} +1 -1
- package/dist/client/assets/{multi-select-_zhW3pg7.js → multi-select-BN02TEni.js} +1 -1
- package/dist/client/assets/{oauth-callback-n3_0uM-5.js → oauth-callback-Bxt5SlC5.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-D3KDETxk.js → oauth-callback-ai-provider-CjshtBEO.js} +1 -1
- package/dist/client/assets/{onboarding-DgFR7Ppk.js → onboarding-Bx_EFLi9.js} +1 -1
- package/dist/client/assets/{org-layout-dlrzlu-k.js → org-layout-CQ-emg3u.js} +1 -1
- package/dist/client/assets/{organization-choice-Dw8RCndE.js → organization-choice-D5lfbPkS.js} +1 -1
- package/dist/client/assets/{orgs-Cez08CKA.js → orgs-Bl4egcU0.js} +1 -1
- package/dist/client/assets/{page-seo-form-mm5E5M14.js → page-seo-form-BJn1LVgT.js} +1 -1
- package/dist/client/assets/{popover-DWEa-l-I.js → popover-BktzUeKH.js} +1 -1
- package/dist/client/assets/{post-calendar-BIIomWFK.js → post-calendar-DA8iix9i.js} +1 -1
- package/dist/client/assets/{post-editor-DFUfXS7D.js → post-editor-BS10Oi9x.js} +1 -1
- package/dist/client/assets/{primitives-DHTJE_Fk.js → primitives-D3J-Nuxu.js} +1 -1
- package/dist/client/assets/{profile-s863hPEV.js → profile-Dat0KHTk.js} +1 -1
- package/dist/client/assets/{project-app-view-l0RQdvHy.js → project-app-view-D33TX7di.js} +1 -1
- package/dist/client/assets/{prompts-RiWjgr9B.js → prompts-Cxy99tGo.js} +1 -1
- package/dist/client/assets/record-editor-CmWPQ7VD.js +1 -0
- package/dist/client/assets/{redirect-editor-BLzbAzjo.js → redirect-editor-BgZFzhsI.js} +1 -1
- package/dist/client/assets/registry-BPwvnSbS.js +2 -0
- package/dist/client/assets/{registry-layout-CMO-BEYT.js → registry-layout-DCPGN-rN.js} +1 -1
- package/dist/client/assets/{reports-CU2MytK8.js → reports-DGRfHRjG.js} +1 -1
- package/dist/client/assets/{require-capability-CAKW-Imy.js → require-capability-DNyq9RmN.js} +1 -1
- package/dist/client/assets/{required-auth-layout-4sCcH8RO.js → required-auth-layout-CpMF_AWS.js} +1 -1
- package/dist/client/assets/{reset-password-DO8iXj0K.js → reset-password-BCzC1n62.js} +1 -1
- package/dist/client/assets/{review-settings-Da92qmSD.js → review-settings-OooYqKsc.js} +1 -1
- package/dist/client/assets/{roles-CowBxtKx.js → roles-89nxDOLN.js} +1 -1
- package/dist/client/assets/{scroll-area-C4qhJ2ay.js → scroll-area-BfiNt3Gu.js} +1 -1
- package/dist/client/assets/{search-input-BurCW-TF.js → search-input-Zbyq9Vp4.js} +1 -1
- package/dist/client/assets/{secrets-XpzwLc9y.js → secrets-DrBMI_m3.js} +1 -1
- package/dist/client/assets/{sections-editor-hbOz01Ij.js → sections-editor-dzEhDCcS.js} +1 -1
- package/dist/client/assets/{select-GYEYEz2x.js → select-Da9AG8Rq.js} +1 -1
- package/dist/client/assets/{select-model-BtRqeA4K.js → select-model-Dl-JD0uN.js} +1 -1
- package/dist/client/assets/{self-tool-result-CcwlwydA.js → self-tool-result-_t4OeQip.js} +1 -1
- package/dist/client/assets/{seo-editor-DQOz_uAA.js → seo-editor-D8ewu2vq.js} +1 -1
- package/dist/client/assets/{settings-layout-B6eoC9Mn.js → settings-layout-SQmMH0EL.js} +1 -1
- package/dist/client/assets/{shell-controls-DQEmxZaA.js → shell-controls-IwChUud1.js} +1 -1
- package/dist/client/assets/{shell-layout-D1aAw38L.js → shell-layout-Bi6zvURF.js} +1 -1
- package/dist/client/assets/{skill-preview-Ct_sY5fI.js → skill-preview-C4qvx_-G.js} +1 -1
- package/dist/client/assets/{skills-Cg2oSh2x.js → skills-CEK2BAC3.js} +1 -1
- package/dist/client/assets/{spinner-BIKUdEYt.js → spinner-aKyVW8uE.js} +1 -1
- package/dist/client/assets/{sso-D2eT1uab.js → sso-2tYjaeLG.js} +1 -1
- package/dist/client/assets/{store-lPf_gWqb.js → store-Dy-L7OLb.js} +1 -1
- package/dist/client/assets/store-registry-NbrAimu1.js +2 -0
- package/dist/client/assets/{super-agent-icon-CVSci4yr.js → super-agent-icon-PtmR11_R.js} +1 -1
- package/dist/client/assets/{switch-CYVZMode.js → switch-tH1yEGPj.js} +1 -1
- package/dist/client/assets/{synced-repos-HMq1SiwV.js → synced-repos-BINS4SYX.js} +1 -1
- package/dist/client/assets/{table-T6_TuVhR.js → table-DqB4exg1.js} +1 -1
- package/dist/client/assets/{tabs-BgVboAN8.js → tabs--rIfh7U4.js} +1 -1
- package/dist/client/assets/{task-board-CFKw9Ts8.js → task-board-DR8FTPNy.js} +1 -1
- package/dist/client/assets/{tasks-BGl-VcBo.js → tasks-Da9WUGdB.js} +1 -1
- package/dist/client/assets/{textarea-0OdC7eCe.js → textarea-B_aqpcss.js} +1 -1
- package/dist/client/assets/{thread-route-BaN9vKjp.js → thread-route-BycCvjGF.js} +1 -1
- package/dist/client/assets/{toggle-group-Ek3C8cSp.js → toggle-group-CeyxRJzP.js} +1 -1
- package/dist/client/assets/{toolbar-2Fc76jJu.js → toolbar-CEaUbMBR.js} +1 -1
- package/dist/client/assets/{track-DpZDIucl.js → track-BenJIghR.js} +1 -1
- package/dist/client/assets/{types-7zYPJtNY.js → types-B_dO6YrH.js} +1 -1
- package/dist/client/assets/{use-ai-providers-RMQnt6Y0.js → use-ai-providers-D3DFy95w.js} +1 -1
- package/dist/client/assets/{use-api-keys-BHZSETxe.js → use-api-keys-6EJlQz90.js} +1 -1
- package/dist/client/assets/{use-automations-DvPF_648.js → use-automations-DPRGvkjo.js} +1 -1
- package/dist/client/assets/{use-autosave-CVQg_Jv2.js → use-autosave-CZk6Nlxa.js} +1 -1
- package/dist/client/assets/{use-connection-DSYBFMA9.js → use-connection-BNx0jAMu.js} +1 -1
- package/dist/client/assets/{use-copy-Bc_erbUR.js → use-copy-ByAMMrM3.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-rFXZJMN4.js → use-create-virtual-mcp-BuyVIjmO.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DwmhgcOv.js → use-debounced-autosave-DA4ngFfM.js} +1 -1
- package/dist/client/assets/{use-debounced-value-dVsMzN7p.js → use-debounced-value-DM88ZEQe.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-D5OogoII.js → use-decopilot-events-BMclxq3p.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CLHOSvOA.js → use-delete-connection-DlJUpJgG.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-0Zba_6sn.js → use-deployment-admin-B8q5gs2q.js} +1 -1
- package/dist/client/assets/{use-destination-route-CTvXcFN7.js → use-destination-route-BVcGigft.js} +1 -1
- package/dist/client/assets/{use-file-configs-CL5Xe6_K.js → use-file-configs-BBiX_rW7.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Bb1PmkKV.js → use-infinite-scroll-wTVDLwdt.js} +1 -1
- package/dist/client/assets/{use-join-requests-37J93a-a.js → use-join-requests-CZ1Xzi2I.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CHbIu6Ep.js → use-mcp-auth-status-DiAuPZ9T.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Ba5JsOJ7.js → use-mcp-client-Ce3cfHbK.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Dq7LABeO.js → use-mcp-tools-WIUmxDJn.js} +1 -1
- package/dist/client/assets/{use-members-DOOwjg_w.js → use-members-32jU1kMZ.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-kG0Ohz9H.js → use-navigate-to-agent-C9f76ihW.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-152_2UKB.js → use-org-auth-client-BUE6zZ8l.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-DHoaFwoJ.js → use-org-repo-syncs-Bj3YOdNR.js} +1 -1
- package/dist/client/assets/{use-org-sso-DAk5xfss.js → use-org-sso-esXD-2bN.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BZ3eUPQP.js → use-organization-roles-DdTGnxZc.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BtyjwnJ-.js → use-organization-settings-cgMmvYyU.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-nTq9ShtY.js → use-panel-navigate-DlT-5qzN.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BOaDmveK.js → use-registry-connections-BQz0A_uq.js} +1 -1
- package/dist/client/assets/{use-secrets-BrMAin4Y.js → use-secrets-DFz4U8Qv.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-1m43Yo2K.js → use-section-preview-base-DatgoTcg.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DbPm7pYy.js → use-status-sounds-BI85ENEg.js} +1 -1
- package/dist/client/assets/{use-tags-BosO2WSN.js → use-tags-DFsaqCAq.js} +1 -1
- package/dist/client/assets/{use-view-mode-DKRIdYeH.js → use-view-mode-DjYB7S_h.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Cy3mnjy0.js → use-virtual-mcp-CsyLzuFI.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CWy6_EvT.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BNn8QDf2.js +1 -0
- package/dist/client/assets/{users-C0HxD0Xu.js → users-LZUPdPoK.js} +1 -1
- package/dist/client/assets/{variant-calendar-Bw0VDVyk.js → variant-calendar-BAXaau2d.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DwinQ6pP.js → view-mode-toggle-SbW-zKtZ.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +163 -163
- package/dist/server/server.js +158 -158
- package/package.json +1 -1
- package/dist/client/assets/record-editor-BaSZvQjU.js +0 -1
- package/dist/client/assets/registry-xFu_NNmU.js +0 -2
- package/dist/client/assets/store-registry-D-WGE8mI.js +0 -2
- package/dist/client/assets/useInfiniteQuery-DLU6odmE.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-UwLbiCMx.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{eN as It,eO as Et,ci as R,an as c,eP as de,cn as Je,eQ as Tt,ch as wt,ar as Mt,am as O,ap as G,al as oe,ak as S,at as m,au as F,as as At,eR as I,ao as Ot,t as ge,r as W,c as Ee,H as Ct,j as Rt}from"./index-
|
|
1
|
+
import{eN as It,eO as Et,ci as R,an as c,eP as de,cn as Je,eQ as Tt,ch as wt,ar as Mt,am as O,ap as G,al as oe,ak as S,at as m,au as F,as as At,eR as I,ao as Ot,t as ge,r as W,c as Ee,H as Ct,j as Rt}from"./index-DYOslw5Q.js";import{u as Nt}from"./use-mcp-client-Ce3cfHbK.js";import{S as xt}from"./constants-dLUUoWH7.js";import{d as Pt}from"./delay-CnY5UFtP.js";import{e as Dt}from"./backoff-CrEUbyZT.js";import{d as Lt,D as kt}from"./decopilot-sse-pool-EZGaJkSr.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},t.getValidEnumValues=s=>{const n=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(n){return s[n]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},t.find=(s,n)=>{for(const i of s)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=r,t.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(re||(re={}));var Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(a(i))):o[u]=o[u]||{_errors:[]},o=o[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));var We="vercel.ai.error",jt=Symbol.for(We),Ce,Re,Z=class Ge extends(Re=Error,Ce=jt,Re){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return Ge.hasMarker(e,We)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ye(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var He="AI_InvalidArgumentError",qe=`vercel.ai.error.${He}`,Zt=Symbol.for(qe),Ne,xe,$t=class extends(xe=Z,Ne=Zt,xe){constructor({message:t,cause:e,argument:a}){super({name:He,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,qe)}},Qe="AI_JSONParseError",Xe=`vercel.ai.error.${Qe}`,Ut=Symbol.for(Xe),Pe,De,Le=class extends(De=Z,Pe=Ut,De){constructor({text:t,cause:e}){super({name:Qe,message:`JSON parsing failed: Text: ${t}.
|
|
2
2
|
Error message: ${Ye(e)}`,cause:e}),this[Pe]=!0,this.text=t}static isInstance(t){return Z.hasMarker(t,Xe)}},Ke="AI_TypeValidationError",et=`vercel.ai.error.${Ke}`,Ft=Symbol.for(et),ke,je,q=class ve extends(je=Z,ke=Ft,je){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const n=[];r.entityName&&n.push(r.entityName),r.entityId&&n.push(`id: "${r.entityId}"`),s+=n.join(", "),s+=")"}super({name:Ke,message:`${s}: Value: ${JSON.stringify(e)}.
|
|
3
3
|
Error message: ${Ye(a)}`,cause:a}),this[ke]=!0,this.value=e,this.context=r}static isInstance(e){return Z.hasMarker(e,et)}static wrap({value:e,cause:a,context:r}){var s,n,i;return ve.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((n=a.context)==null?void 0:n.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ve({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const n=a.length,i=new Array(e);for(let o=0;o<e;o++)i[o]=a[Math.random()*n|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new $t({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Bt=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Vt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Ze(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Bt.test(t)===!1&&Vt.test(t)===!1?e:zt(e)}function zt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const n=r[s];n&&typeof n=="object"&&e.push(n)}}}return t}function Jt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return Ze(t)}try{return Ze(t)}finally{Error.stackTraceLimit=e}}function Te(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=z(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(z):z(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(z)),t.allOf!=null&&(t.allOf=t.allOf.map(z)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(z));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=z(e[a]);return t}function z(t){return typeof t=="boolean"?t:Te(t)}var Wt=Symbol("Let zodToJsonSchema decide on which parser to use"),$e={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Gt=t=>typeof t=="string"?{...$e,name:t}:{...$e,...t};function N(){return{}}function Yt(t,e){var a,r,s;const n={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==h.ZodAny&&(n.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(n.minItems=t.minLength.value),t.maxLength&&(n.maxItems=t.maxLength.value),t.exactLength&&(n.minItems=t.exactLength.value,n.maxItems=t.exactLength.value),n}function Ht(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function qt(){return{type:"boolean"}}function tt(t,e){return b(t.type._def,e)}var Qt=(t,e)=>b(t.innerType._def,e);function at(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,n)=>at(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Xt(t)}}var Xt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Kt(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function ea(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):N()}function ta(t){return{type:"string",enum:Array.from(t.values)}}var aa=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function ra(t,e){const a=[b(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),b(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(aa(s))r.push(...s.allOf);else{let n=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...o}=s;n=o}r.push(n)}}),r.length?{allOf:r}:void 0}function sa(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var me=void 0,P={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(me===void 0&&(me=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),me),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function rt(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":D(a,"email",r.message,e);break;case"format:idn-email":D(a,"idn-email",r.message,e);break;case"pattern:zod":A(a,P.email,r.message,e);break}break;case"url":D(a,"uri",r.message,e);break;case"uuid":D(a,"uuid",r.message,e);break;case"regex":A(a,r.regex,r.message,e);break;case"cuid":A(a,P.cuid,r.message,e);break;case"cuid2":A(a,P.cuid2,r.message,e);break;case"startsWith":A(a,RegExp(`^${he(r.value,e)}`),r.message,e);break;case"endsWith":A(a,RegExp(`${he(r.value,e)}$`),r.message,e);break;case"datetime":D(a,"date-time",r.message,e);break;case"date":D(a,"date",r.message,e);break;case"time":D(a,"time",r.message,e);break;case"duration":D(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{A(a,RegExp(he(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&D(a,"ipv4",r.message,e),r.version!=="v4"&&D(a,"ipv6",r.message,e);break}case"base64url":A(a,P.base64url,r.message,e);break;case"jwt":A(a,P.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&A(a,P.ipv4Cidr,r.message,e),r.version!=="v4"&&A(a,P.ipv6Cidr,r.message,e);break}case"emoji":A(a,P.emoji(),r.message,e);break;case"ulid":{A(a,P.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{D(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{A(a,P.base64,r.message,e);break}}break}case"nanoid":A(a,P.nanoid,r.message,e)}return a}function he(t,e){return e.patternStrategy==="escape"?oa(t):t}var na=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function oa(t){let e="";for(let a=0;a<t.length;a++)na.has(t[a])||(e+="\\"),e+=t[a];return e}function D(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(n=>n.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function A(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(n=>n.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Ue(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Ue(e,r)}function Ue(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let n="",i=!1,o=!1,p=!1;for(let u=0;u<s.length;u++){if(i){n+=s[u],i=!1;continue}if(r.i){if(o){if(s[u].match(/[a-z]/)){p?(n+=s[u],n+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(n+=s[u],p=!0):n+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){n+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){n+=`(^|(?<=[\r
|
|
4
4
|
]))`;continue}else if(s[u]==="$"){n+=`($|(?=[\r
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Ee,b as ct,H as as,o as dt,K as Ue,j as t,p as St,r as ne,e as at,B as ce,Y as Rt,t as me}from"./index-DRlhDwmF.js";import{i as os}from"./AlertCircle-ukognKDh.js";import{t as rs}from"./ChevronDown-CHzj-r-D.js";import{i as cs}from"./ChevronRight-DudsZLJR.js";import{s as is}from"./Stars02-CK5d6rtJ.js";import{a as ms}from"./Copy01-hygjHElI.js";import{aX as ds,aY as Ut,aq as fs,ax as hs,aK as us,aZ as gs,v as At}from"./agent-icon-DzcgZISF.js";import{i as Nt}from"./Globe01-4GdAAsZ6.js";import{n as es}from"./LinkExternal01-BvvfOeIp.js";import{s as Vt}from"./Plus-Dj4gBGXF.js";import{l as Bt}from"./UserSquare-CsyWGh8Q.js";import{s as Ot}from"./Trash01-BsmWnDfB.js";import{i as xs}from"./Zap-ZMuKnf_b.js";import{B as de}from"./badge-DchiuaQb.js";import{I as lt}from"./input-CQFSNlYy.js";import{L as ht}from"./label-BZynR1Jd.js";import{c as Ct,d as Dt,b as wt,f as $t,g as zt,e as Lt,a as _t,A as kt}from"./alert-dialog-CyCiIe9m.js";import{a as Ht,b as Mt,c as Wt,d as Kt,e as Qt}from"./dialog-BgJhJtVN.js";import{S as Yt,a as Xt,b as Zt,c as Gt,d as jt}from"./select-GYEYEz2x.js";import{c as tt,e as ot,a as ye,d as I,b as st,T as V}from"./table-T6_TuVhR.js";import{E as Pt}from"./empty-state-Do1gpKft.js";import{a as bs}from"./use-virtual-mcp-Cy3mnjy0.js";import{r as ps}from"./index-DVP1fkUg.js";import"./Tool01-4xkLJUSv.js";import"./ArrowUp-DsqDzR2M.js";import"./ArrowLeft-CcY96p8V.js";import"./Tool02-D-w6cyH6.js";import"./XCircle-DcCF0Qmy.js";import"./TrendUp01-DCdSMdfu.js";import"./ZapSquare-8WncvVef.js";import"./ZoomOut-2_RHySTp.js";import"./Users03-DrLeEcSF.js";import"./CheckCircle-CNh0i1pk.js";import"./Check-CjVb3A2B.js";import"./ChevronSelectorVertical-D7B7y3yK.js";import"./ChevronUp-DXFUd2s_.js";import"./DotsVertical-JglrDVpy.js";import"./CreditCard01-Bia9U_rx.js";import"./Download01-CeGv-TTP.js";import"./Settings02-Cxm2-0JT.js";import"./Eye-ca7Uforo.js";import"./FilterLines-D4iwTIZp.js";import"./Share07-BWbQUhmz.js";import"./GitBranch01-Yp75Z6dK.js";import"./Globe04-xWUkTRMv.js";import"./SwitchHorizontal01-D8cwSMb8.js";import"./HardDrive-D8k3PDhU.js";import"./Image01-BN8vIwhD.js";import"./Key01-CIhmqSDX.js";import"./LockUnlocked01-DqTQ7KJK.js";import"./LogOut01-B77dfaIF.js";import"./Monitor01-DwsTIKx3.js";import"./Sun-BOCDllJr.js";import"./Package-CIJxhw_5.js";import"./Palette-BFUIY31j.js";import"./Play-tHtmJjQz.js";import"./SearchLg-B20iYteE.js";import"./SearchMd-CtNMeGZR.js";import"./Shield01-BYEUTLgK.js";import"./Stars01-BOWdX_NA.js";import"./Upload01-CHZ_hcLs.js";import"./User01-CcGanVet.js";import"./Users01-CACEN1-A.js";import"./XClose-N2W7BjwG.js";import"./use-mcp-client-Ba5JsOJ7.js";import"./constants-dLUUoWH7.js";import"./auth-BfqvV0Kl.js";import"./chat-context-Dn1mZ94t.js";import"./use-panel-navigate-nTq9ShtY.js";import"./use-destination-route-CTvXcFN7.js";import"./thread-route-BaN9vKjp.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./hooks-CP6Ol70Q.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BFt_KK89.js";import"./task-board-CFKw9Ts8.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-RMQnt6Y0.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-D5OogoII.js";import"./use-organization-settings-BtyjwnJ-.js";import"./automation-runs-CaiwOMRQ.js";import"./useInfiniteQuery-DLU6odmE.js";import"./use-infinite-scroll-Bb1PmkKV.js";import"./use-connection-DSYBFMA9.js";import"./empty-state-Dxu66iOt.js";import"./use-members-DOOwjg_w.js";import"./use-org-auth-client-152_2UKB.js";import"./use-automations-DvPF_648.js";import"./useSuspenseInfiniteQuery-UwLbiCMx.js";import"./avatar-CUVRGiTH.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Bc_erbUR.js";import"./markdown-v-pW8lDf.js";import"./monaco-editor-CVYKIIQt.js";import"./spinner-BIKUdEYt.js";import"./editor-Byabv8W3.js";import"./types-7zYPJtNY.js";import"./shell-layout-D1aAw38L.js";import"./required-auth-layout-4sCcH8RO.js";import"./use-org-sso-DAk5xfss.js";import"./integration-icon-C3KN5GGn.js";import"./use-navigate-to-agent-kG0Ohz9H.js";import"./chart-iu13iDg0.js";import"./index-BUd8b85A.js";import"./AreaChart-DkHEbMXa.js";import"./form-DWOhYoa9.js";import"./file-type-icon-DN8Dyx_f.js";import"./drawer-Gicv2tUJ.js";import"./collection-search-CpiiG4Lr.js";import"./tabs-BgVboAN8.js";import"./toggle-group-Ek3C8cSp.js";import"./super-agent-icon-CVSci4yr.js";import"./self-tool-result-CcwlwydA.js";import"./extract-connection-data-YLS8fFS3.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-dVsMzN7p.js";import"./authenticate-and-persist-oauth-BYRlNzhn.js";import"./mcp-oauth-D-3pNvK6.js";import"./track-DpZDIucl.js";import"./popover-DWEa-l-I.js";import"./toolbar-2Fc76jJu.js";import"./github-repo-picker-P_1xCNug.js";import"./use-mcp-tools-Dq7LABeO.js";import"./agent-capabilities-B52k7xCe.js";import"./connection-card-BL5y0IeG.js";import"./use-registry-connections-BOaDmveK.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-0OdC7eCe.js";import"./connection-form-helpers-D7UUIQKW.js";import"./collection-tabs-d_LOzhOa.js";import"./select-model-BtRqeA4K.js";import"./checkbox-aodUABDC.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-CzNoQyTw.js";import"./dropdown-menu-CCrWFOmG.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DbPm7pYy.js";import"./skill-preview-Ct_sY5fI.js";import"./use-file-configs-CL5Xe6_K.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-DwmhgcOv.js";import"./scroll-area-C4qhJ2ay.js";import"./search-input-BurCW-TF.js";import"./use-mcp-auth-status-CHbIu6Ep.js";import"./switch-CYVZMode.js";import"./use-secrets-BrMAin4Y.js";import"./config-B8SV58WE.js";import"./command-Nv1MkjwN.js";import"./index-Cyh9mrpT.js";import"./get-initials-D-f_fDFw.js";import"./breadcrumb-H6XFubH4.js";import"./use-tags-BosO2WSN.js";import"./automation-list-row-u4dixA_X.js";import"./site-error--i37Vnuw.js";import"./use-org-repo-syncs-DHoaFwoJ.js";import"./cards-BHBvgwoA.js";function It(r,e){return r.name===e.name&&(r.scope??"runtime")===e.scope}function Tt(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 Jt(r){return r==="deco-deno"?"Deco Deno":r==="deco-tanstack"?"Deco TanStack":r??null}function Ts(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 ts(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"}),i=[["year",31536e3],["month",2592e3],["day",86400],["hour",3600],["minute",60]];for(const[a,c]of i)if(Math.abs(o)>=c)return l.format(-Math.round(o/c),a);return l.format(-o,"second")}function js(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.floor(e/60),l=Math.round(e%60);return`${o}m ${l}s`}function qt(r){const e=r instanceof Error?r.message.toLowerCase():"";return e.includes("unauthorized")||e.includes("401")}function mt(r){return r instanceof Error?r.message:String(r)}async function ft(r){const e=await fetch(r),o=await e.json().catch(()=>({}));if(!e.ok){const l=o&&typeof o=="object"&&"error"in o?String(o.error):`request failed (${e.status})`;throw new Error(l)}return o}async function rt(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}),i=await l.json().catch(()=>({}));if(!l.ok){const a=i&&typeof i=="object"&&"error"in i?String(i.error):`request failed (${l.status})`;throw new Error(a)}return i}function yt(r){const e=Ee.c(15),{title:o,count:l,action:i,children:a}=r;let c;e[0]!==o?(c=t.jsx("h3",{className:"text-sm font-medium text-foreground",children:o}),e[0]=o,e[1]=c):c=e[1];let m;e[2]!==l?(m=typeof l=="number"&&l>0&&t.jsx(de,{variant:"secondary",className:"tabular-nums",children:l}),e[2]=l,e[3]=m):m=e[3];let s;e[4]!==i?(s=i&&t.jsx("div",{className:"ml-auto",children:i}),e[4]=i,e[5]=s):s=e[5];let n;e[6]!==c||e[7]!==m||e[8]!==s?(n=t.jsxs("header",{className:"flex items-center gap-2 px-4 py-3 border-b border-border",children:[c,m,s]}),e[6]=c,e[7]=m,e[8]=s,e[9]=n):n=e[9];let u;e[10]!==a?(u=t.jsx("div",{className:"p-2",children:a}),e[10]=a,e[11]=u):u=e[11];let v;return e[12]!==n||e[13]!==u?(v=t.jsxs("section",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[n,u]}),e[12]=n,e[13]=u,e[14]=v):v=e[14],v}function vt(r){const e=Ee.c(3),{cols:o}=r;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[0,1,2],e[0]=l):l=e[0];let i;return e[1]!==o?(i=t.jsx("div",{className:"flex flex-col gap-2 p-2",children:l.map(a=>t.jsx("div",{className:"flex gap-3",children:Array.from({length:o}).map(Ps)},a))}),e[1]=o,e[2]=i):i=e[2],i}function Ps(r,e){return t.jsx(Rt,{className:"h-4 flex-1"},e)}function Ye(r){const e=Ee.c(2),{children:o}=r;let l;return e[0]!==o?(l=t.jsx("div",{className:"px-3 py-6 text-sm text-muted-foreground",children:o}),e[0]=o,e[1]=l):l=e[1],l}function ys(r){const e=Ee.c(54),{base:o,orgSlug:l,site:i}=r,a=ct(),c=St(),[m,s]=ne.useState(!1);let n;e[0]!==o?(n=()=>rt(`${o}/deploy`,"POST",{mode:"current"}),e[0]=o,e[1]=n):n=e[1];let u;e[2]!==l||e[3]!==c||e[4]!==i||e[5]!==a?(u=()=>{c.invalidateQueries({queryKey:Ue.hostingDeployments(l,i)}),c.invalidateQueries({queryKey:Ue.hostingDeploymentHistory(l,i)}),me.success(a("mainPanelTabs.hostingTab.toastDeployQueued")),s(!1)},e[2]=l,e[3]=c,e[4]=i,e[5]=a,e[6]=u):u=e[6];let v;e[7]!==n||e[8]!==u?(v={mutationFn:n,onSuccess:u,onError:vs},e[7]=n,e[8]=u,e[9]=v):v=e[9];const d=at(v);let N;e[10]===Symbol.for("react.memo_cache_sentinel")?(N=()=>s(!0),e[10]=N):N=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Bt,{className:"size-4"}),e[11]=g):g=e[11];let T;e[12]!==d.isPending||e[13]!==a?(T=d.isPending?a("mainPanelTabs.hostingTab.deploying"):a("mainPanelTabs.hostingTab.deploy"),e[12]=d.isPending,e[13]=a,e[14]=T):T=e[14];let h;e[15]!==d.isPending||e[16]!==T?(h=t.jsxs(ce,{size:"sm",onClick:N,disabled:d.isPending,children:[g,T]}),e[15]=d.isPending,e[16]=T,e[17]=h):h=e[17];let y;e[18]!==a?(y=a("mainPanelTabs.hostingTab.deployConfirmTitle"),e[18]=a,e[19]=y):y=e[19];let j;e[20]!==y?(j=t.jsx(Ct,{children:y}),e[20]=y,e[21]=j):j=e[21];let w;e[22]!==a?(w=a("mainPanelTabs.hostingTab.deployConfirmDescription"),e[22]=a,e[23]=w):w=e[23];let p;e[24]!==w?(p=t.jsx(Dt,{children:w}),e[24]=w,e[25]=p):p=e[25];let S;e[26]!==p||e[27]!==j?(S=t.jsxs(wt,{children:[j,p]}),e[26]=p,e[27]=j,e[28]=S):S=e[28];const $=d.isPending;let z;e[29]!==a?(z=a("mainPanelTabs.hostingTab.cancel"),e[29]=a,e[30]=z):z=e[30];let C;e[31]!==d.isPending||e[32]!==z?(C=t.jsx($t,{disabled:$,children:z}),e[31]=d.isPending,e[32]=z,e[33]=C):C=e[33];let x;e[34]!==d?(x=f=>{f.preventDefault(),d.mutate()},e[34]=d,e[35]=x):x=e[35];const P=d.isPending;let L;e[36]!==a?(L=a("mainPanelTabs.hostingTab.deploy"),e[36]=a,e[37]=L):L=e[37];let _;e[38]!==d.isPending||e[39]!==x||e[40]!==L?(_=t.jsx(zt,{onClick:x,disabled:P,children:L}),e[38]=d.isPending,e[39]=x,e[40]=L,e[41]=_):_=e[41];let b;e[42]!==C||e[43]!==_?(b=t.jsxs(Lt,{children:[C,_]}),e[42]=C,e[43]=_,e[44]=b):b=e[44];let B;e[45]!==S||e[46]!==b?(B=t.jsxs(_t,{children:[S,b]}),e[45]=S,e[46]=b,e[47]=B):B=e[47];let A;e[48]!==m||e[49]!==B?(A=t.jsx(kt,{open:m,onOpenChange:s,children:B}),e[48]=m,e[49]=B,e[50]=A):A=e[50];let q;return e[51]!==A||e[52]!==h?(q=t.jsxs(t.Fragment,{children:[h,A]}),e[51]=A,e[52]=h,e[53]=q):q=e[53],q}function vs(r){return me.error(mt(r))}function Ns(r,e){const o=(r??"").toLowerCase();return o.includes("rollback")?t.jsxs(de,{variant:"warning",children:[t.jsx(us,{className:"size-3"}),e("mainPanelTabs.hostingTab.actionRollback")]}):o.includes("redeploy")?t.jsxs(de,{variant:"secondary",children:[t.jsx(gs,{className:"size-3"}),e("mainPanelTabs.hostingTab.actionRedeploy")]}):t.jsxs(de,{variant:"secondary",children:[t.jsx(Bt,{className:"size-3"}),e("mainPanelTabs.hostingTab.actionDeploy")]})}function Ss(r,e,o){const l=(r??"").toLowerCase();return l==="build"?t.jsxs(de,{variant:"secondary",children:[t.jsx(Ut,{className:"size-3"}),o("mainPanelTabs.hostingTab.typeBuild")]}):l==="fast-deploy"?t.jsxs(de,{variant:"secondary",children:[t.jsx(xs,{className:"size-3"}),o("mainPanelTabs.hostingTab.typeFastDeploy")]}):l==="deploy"?t.jsxs(de,{variant:"secondary",children:[t.jsx(Bt,{className:"size-3"}),o("mainPanelTabs.hostingTab.typeDeploy")]}):Ns(e,o)}function Cs(r,e){const o=(r??"").toLowerCase();return o==="success"?t.jsx(de,{variant:"success",children:e("mainPanelTabs.hostingTab.outcomeSuccess")}):o==="failure"?t.jsx(de,{variant:"destructive",children:e("mainPanelTabs.hostingTab.outcomeFailure")}):o==="pending"?t.jsxs(de,{variant:"secondary",children:[t.jsx(is,{className:"size-3"}),e("mainPanelTabs.hostingTab.outcomePending")]}):null}function Ds(r){const e=Ee.c(35),{base:o,orgSlug:l,site:i,target:a,onOpenChange:c}=r,m=ct(),s=a!=null,n=a?.commit??"",u=a?.env??"";let v;e[0]!==n||e[1]!==u||e[2]!==l||e[3]!==i?(v=Ue.hostingBuildLogs(l,i,n,u),e[0]=n,e[1]=u,e[2]=l,e[3]=i,e[4]=v):v=e[4];let d;e[5]!==o||e[6]!==n||e[7]!==u?(d=()=>ft(`${o}/deployments/logs?commit=${encodeURIComponent(n)}&env=${encodeURIComponent(u)}`),e[5]=o,e[6]=n,e[7]=u,e[8]=d):d=e[8];const N=s&&!!n;let g;e[9]!==v||e[10]!==d||e[11]!==N?(g={queryKey:v,queryFn:d,enabled:N,retry:!1,staleTime:0,gcTime:0,refetchOnMount:"always"},e[9]=v,e[10]=d,e[11]=N,e[12]=g):g=e[12];const T=dt(g),h=T.data;let y;e[13]!==m?(y=m("mainPanelTabs.hostingTab.buildLogsTitle"),e[13]=m,e[14]=y):y=e[14];let j;e[15]!==y?(j=t.jsx(Ht,{children:t.jsx(Mt,{children:y})}),e[15]=y,e[16]=j):j=e[16];let w;e[17]!==n||e[18]!==m?(w=m("mainPanelTabs.hostingTab.buildLogsCommit",{commit:n.slice(0,7)}),e[17]=n,e[18]=m,e[19]=w):w=e[19];let p;e[20]!==w?(p=t.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:w}),e[20]=w,e[21]=p):p=e[21];let S;e[22]!==h||e[23]!==T.error||e[24]!==T.isLoading||e[25]!==m?(S=qt(T.error)?t.jsx(Pt,{icon:t.jsx(At,{className:"size-5"}),title:m("mainPanelTabs.hostingTab.notConnectedTitle"),description:m("mainPanelTabs.hostingTab.notConnectedDescription")}):T.isLoading?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(Rt,{className:"h-4 w-full"}),t.jsx(Rt,{className:"h-4 w-full"}),t.jsx(Rt,{className:"h-4 w-2/3"})]}):T.error?t.jsx(Ye,{children:m("mainPanelTabs.hostingTab.buildLogsError")}):h&&h.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(os,{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:h.reason??m("mainPanelTabs.hostingTab.buildLogsNotWiredDescription")})]}):h?.text?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("pre",{className:"max-h-[52vh] overflow-auto rounded-lg border border-border bg-muted/40 p-3 font-mono text-[11px] leading-relaxed text-foreground/80 whitespace-pre-wrap break-words",children:h.text}),h.truncated&&t.jsx("p",{className:"text-xs text-warning",children:m("mainPanelTabs.hostingTab.buildLogsTruncated")}),h.url&&t.jsxs("a",{href:h.url,target:"_blank",rel:"noreferrer",className:"inline-flex w-fit items-center gap-1.5 text-xs text-primary hover:underline",children:[t.jsx(es,{className:"size-3.5"}),m("mainPanelTabs.hostingTab.buildLogsOpenFull")]})]}):h?.url?t.jsxs("a",{href:h.url,target:"_blank",rel:"noreferrer",className:"inline-flex w-fit items-center gap-1.5 text-sm text-primary hover:underline",children:[t.jsx(es,{className:"size-4"}),m("mainPanelTabs.hostingTab.buildLogsOpenFull")]}):t.jsx(Ye,{children:m("mainPanelTabs.hostingTab.buildLogsEmpty")}),e[22]=h,e[23]=T.error,e[24]=T.isLoading,e[25]=m,e[26]=S):S=e[26];let $;e[27]!==j||e[28]!==p||e[29]!==S?($=t.jsxs(Kt,{className:"sm:max-w-2xl",children:[j,p,S]}),e[27]=j,e[28]=p,e[29]=S,e[30]=$):$=e[30];let z;return e[31]!==c||e[32]!==s||e[33]!==$?(z=t.jsx(Qt,{open:s,onOpenChange:c,children:$}),e[31]=c,e[32]=s,e[33]=$,e[34]=z):z=e[34],z}function ws(r){const e=Ee.c(52),{base:o,orgSlug:l,site:i,enabled:a,deployments:c,isLoading:m,error:s}=r,n=ct(),[u,v]=ne.useState(null),[d,N]=ne.useState(null);let g;e[0]!==l||e[1]!==i?(g=Ue.hostingDeploymentHistory(l,i),e[0]=l,e[1]=i,e[2]=g):g=e[2];let T;e[3]!==o?(T=()=>ft(`${o}/deployments/history?limit=50`),e[3]=o,e[4]=T):T=e[4];let h;e[5]!==a||e[6]!==g||e[7]!==T?(h={queryKey:g,queryFn:T,enabled:a,retry:!1,staleTime:3e4},e[5]=a,e[6]=g,e[7]=T,e[8]=h):h=e[8];const y=dt(h);let j,w,p,S,$;if(e[9]!==c||e[10]!==s||e[11]!==u||e[12]!==y.data||e[13]!==y.error||e[14]!==y.isLoading||e[15]!==m||e[16]!==n){const L=Tt(y.data,"items"),_=c.find(zs)?.commitSha??c.find($s)?.commitSha??null;let b;e[22]===Symbol.for("react.memo_cache_sentinel")?(b=(f,X)=>{f&&N({commit:f,env:X??"production"})},e[22]=b):b=e[22];const B=b;let A;e[23]!==n?(A=n("mainPanelTabs.hostingTab.deployments"),e[23]=n,e[24]=A):A=e[24];let q;e[25]!==c||e[26]!==s||e[27]!==u||e[28]!==m||e[29]!==n?(q=m?t.jsx(vt,{cols:5}):s?t.jsx(Ye,{children:n("mainPanelTabs.hostingTab.deploymentsError")}):c.length===0?t.jsx(Ye,{children:n("mainPanelTabs.hostingTab.noDeployments")}):t.jsxs(tt,{children:[t.jsx(ot,{children:t.jsxs(ye,{children:[t.jsx(I,{children:n("mainPanelTabs.hostingTab.colCommit")}),t.jsx(I,{children:n("mainPanelTabs.hostingTab.colStatus")}),t.jsx(I,{children:n("mainPanelTabs.hostingTab.colFramework")}),t.jsx(I,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDuration")}),t.jsx(I,{className:"text-right",children:n("mainPanelTabs.hostingTab.colUpdated")}),t.jsx(I,{className:"w-[1%]"})]})}),t.jsx(st,{children:c.map(f=>{const X=!!f.buildMessage,G=u===f.id;return t.jsxs(ne.Fragment,{children:[t.jsxs(ye,{children:[t.jsx(V,{className:"align-middle",children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[X?t.jsx("button",{type:"button",onClick:()=>v(G?null:f.id),"aria-label":n("mainPanelTabs.hostingTab.showBuildMessage"),className:"text-muted-foreground hover:text-foreground",children:G?t.jsx(rs,{className:"size-4"}):t.jsx(cs,{className:"size-4"})}):t.jsx(ds,{className:"size-4 text-muted-foreground/60"}),t.jsx("span",{className:"font-mono text-xs",children:f.shortCommit??f.commitSha?.slice(0,7)??"—"}),f.production===!0&&t.jsx(de,{variant:"outline",children:n("mainPanelTabs.hostingTab.production")})]})}),t.jsx(V,{className:"align-middle",children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(de,{variant:Ts(f.phase),children:f.phase??"—"}),f.up===!0&&t.jsx(de,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),t.jsx(V,{className:"align-middle text-xs text-muted-foreground",children:Jt(f.framework)??"—"}),t.jsx(V,{className:"text-right align-middle font-mono text-xs text-muted-foreground tabular-nums",children:js(f.durationMs)}),t.jsx(V,{className:"text-right align-middle text-xs text-muted-foreground whitespace-nowrap",children:ts(f.finishedAt??f.startedAt??f.createdAt)}),t.jsx(V,{className:"text-right align-middle",children:t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.buildLogs"),onClick:()=>B(f.commitSha,f.env),disabled:!f.commitSha,children:t.jsx(Ut,{className:"size-4"})})})]}),X&&G&&t.jsx(ye,{children:t.jsx(V,{colSpan:6,className:"bg-muted/10",children:t.jsx("p",{className:"whitespace-pre-wrap break-words px-2 py-1 font-mono text-xs text-muted-foreground",children:f.buildMessage})})})]},f.id)})})]}),e[25]=c,e[26]=s,e[27]=u,e[28]=m,e[29]=n,e[30]=q):q=e[30],e[31]!==c.length||e[32]!==q||e[33]!==A?($=t.jsx(yt,{title:A,count:c.length,children:q}),e[31]=c.length,e[32]=q,e[33]=A,e[34]=$):$=e[34],j=yt,e[35]!==n?(w=n("mainPanelTabs.hostingTab.deployHistory"),e[35]=n,e[36]=w):w=e[36],p=L.length,S=y.isLoading?t.jsx(vt,{cols:4}):y.error?t.jsx(Ye,{children:n("mainPanelTabs.hostingTab.deployHistoryError")}):L.length===0?t.jsx(Pt,{icon:t.jsx(Bt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDeployHistory")}):t.jsxs(tt,{children:[t.jsx(ot,{children:t.jsxs(ye,{children:[t.jsx(I,{children:n("mainPanelTabs.hostingTab.colAction")}),t.jsx(I,{children:n("mainPanelTabs.hostingTab.colCommit")}),t.jsx(I,{children:n("mainPanelTabs.hostingTab.colFramework")}),t.jsx(I,{children:n("mainPanelTabs.hostingTab.colActor")}),t.jsx(I,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDate")}),t.jsx(I,{className:"w-[1%]"})]})}),t.jsx(st,{children:L.map(f=>{const X=!!_&&f.commitSha===_;return t.jsxs(ye,{children:[t.jsx(V,{className:"align-middle",children:t.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[Ss(f.type,f.action,n),Cs(f.outcome,n)]})}),t.jsx(V,{className:"align-middle",children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("span",{className:"font-mono text-xs",children:f.commitSha?.slice(0,7)??"—"}),X&&t.jsx(de,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),t.jsx(V,{className:"align-middle text-xs text-muted-foreground",children:Jt(f.framework)??"—"}),t.jsx(V,{className:"align-middle text-xs text-muted-foreground",children:f.actor??"—"}),t.jsx(V,{className:"text-right align-middle text-xs text-muted-foreground whitespace-nowrap",children:t.jsxs("span",{className:"inline-flex items-center gap-1",children:[t.jsx(is,{className:"size-3"}),ts(f.createdAt)]})}),t.jsx(V,{className:"text-right align-middle",children:t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.buildLogs"),onClick:()=>B(f.commitSha,f.env),disabled:!f.commitSha,children:t.jsx(Ut,{className:"size-4"})})})]},f.id)})})]}),e[9]=c,e[10]=s,e[11]=u,e[12]=y.data,e[13]=y.error,e[14]=y.isLoading,e[15]=m,e[16]=n,e[17]=j,e[18]=w,e[19]=p,e[20]=S,e[21]=$}else j=e[17],w=e[18],p=e[19],S=e[20],$=e[21];let z;e[37]!==j||e[38]!==w||e[39]!==p||e[40]!==S?(z=t.jsx(j,{title:w,count:p,children:S}),e[37]=j,e[38]=w,e[39]=p,e[40]=S,e[41]=z):z=e[41];let C;e[42]===Symbol.for("react.memo_cache_sentinel")?(C=L=>{L||N(null)},e[42]=C):C=e[42];let x;e[43]!==o||e[44]!==d||e[45]!==l||e[46]!==i?(x=t.jsx(Ds,{base:o,orgSlug:l,site:i,target:d,onOpenChange:C}),e[43]=o,e[44]=d,e[45]=l,e[46]=i,e[47]=x):x=e[47];let P;return e[48]!==x||e[49]!==$||e[50]!==z?(P=t.jsxs(t.Fragment,{children:[$,z,x]}),e[48]=x,e[49]=$,e[50]=z,e[51]=P):P=e[51],P}function $s(r){return r.production===!0&&r.up}function zs(r){return r.up===!0}function Ls(r){const e=Ee.c(82),{base:o,orgSlug:l,site:i,envVars:a,codeVars:c,isLoading:m,error:s}=r,n=ct(),u=St(),[v,d]=ne.useState(""),[N,g]=ne.useState(""),[T,h]=ne.useState("runtime"),[y,j]=ne.useState(null),[w,p]=ne.useState(""),[S,$]=ne.useState(null);let z;e[0]!==o?(z=D=>rt(`${o}/env`,"PUT",{vars:D}),e[0]=o,e[1]=z):z=e[1];let C;e[2]!==l||e[3]!==u||e[4]!==i||e[5]!==n?(C=()=>{u.invalidateQueries({queryKey:Ue.hostingEnv(l,i)}),me.success(n("mainPanelTabs.hostingTab.toastEnvSaved"))},e[2]=l,e[3]=u,e[4]=i,e[5]=n,e[6]=C):C=e[6];let x;e[7]!==z||e[8]!==C?(x={mutationFn:z,onSuccess:C,onError:ks},e[7]=z,e[8]=C,e[9]=x):x=e[9];const P=at(x);let L;e[10]!==v||e[11]!==T||e[12]!==N||e[13]!==P||e[14]!==a||e[15]!==n?(L=()=>{const D=v.trim();if(!D){me.error(n("mainPanelTabs.hostingTab.errorEnvNameRequired"));return}if(a.some(O=>It(O,{name:D,scope:T}))){me.error(n("mainPanelTabs.hostingTab.errorEnvNameDuplicate"));return}P.mutate([...a,{name:D,value:N,scope:T}],{onSuccess:()=>{d(""),g(""),h("runtime")}})},e[10]=v,e[11]=T,e[12]=N,e[13]=P,e[14]=a,e[15]=n,e[16]=L):L=e[16];const _=L;let b;e[17]!==w||e[18]!==P||e[19]!==a?(b=D=>{P.mutate(a.map(O=>It(O,D)?{name:D.name,value:w,scope:D.scope}:O),{onSuccess:()=>j(null)})},e[17]=w,e[18]=P,e[19]=a,e[20]=b):b=e[20];const B=b;let A;e[21]!==S||e[22]!==P||e[23]!==a?(A=()=>{S&&P.mutate(a.filter(D=>!It(D,S)),{onSuccess:()=>$(null)})},e[21]=S,e[22]=P,e[23]=a,e[24]=A):A=e[24];const q=A;let f;e[25]!==n?(f=n("mainPanelTabs.hostingTab.env"),e[25]=n,e[26]=f):f=e[26];const X=a.length;let G;e[27]!==v||e[28]!==T||e[29]!==N||e[30]!==c||e[31]!==w||e[32]!==y?.name||e[33]!==y?.scope||e[34]!==P.isPending||e[35]!==a||e[36]!==s||e[37]!==_||e[38]!==B||e[39]!==m||e[40]!==n?(G=m?t.jsx(vt,{cols:2}):s?t.jsx(Ye,{children:n("mainPanelTabs.hostingTab.envError")}):t.jsxs("div",{className:"flex flex-col gap-2",children:[a.length===0?t.jsx(Ye,{children:n("mainPanelTabs.hostingTab.noEnv")}):t.jsxs(tt,{children:[t.jsx(ot,{children:t.jsxs(ye,{children:[t.jsx(I,{children:n("mainPanelTabs.hostingTab.colName")}),t.jsx(I,{children:n("mainPanelTabs.hostingTab.colValue")}),t.jsx(I,{className:"w-[1%]"})]})}),t.jsx(st,{children:a.map(D=>{const O=D.scope==="build"?"build":"runtime",ze=y?.name===D.name&&y?.scope===O;return t.jsxs(ye,{children:[t.jsx(V,{className:"font-mono text-xs align-middle",children:t.jsxs("span",{className:"inline-flex items-center gap-2",children:[D.name,t.jsx(de,{variant:O==="build"?"outline":"secondary",className:"font-sans text-[10px] capitalize",children:n(O==="build"?"mainPanelTabs.hostingTab.secretScopeBuild":"mainPanelTabs.hostingTab.secretScopeRuntime")})]})}),t.jsx(V,{className:"font-mono text-xs text-muted-foreground max-w-[360px] align-middle",children:ze?t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(lt,{value:w,onChange:fe=>p(fe.target.value),className:"h-7 font-mono text-xs"}),t.jsx(ce,{size:"xs",onClick:()=>B({name:D.name,scope:O}),disabled:P.isPending,children:n("mainPanelTabs.hostingTab.save")}),t.jsx(ce,{size:"xs",variant:"ghost",onClick:()=>j(null),disabled:P.isPending,children:n("mainPanelTabs.hostingTab.cancel")})]}):t.jsx("button",{type:"button",onClick:()=>{j({name:D.name,scope:O}),p(D.value)},className:"block w-full truncate text-left hover:underline","aria-label":n("mainPanelTabs.hostingTab.editValue"),children:D.value})}),t.jsx(V,{className:"text-right align-middle",children:t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.deleteVariable"),onClick:()=>$({name:D.name,scope:O}),disabled:P.isPending,children:t.jsx(Ot,{className:"size-4"})})})]},`${D.name}:${O}`)})})]}),t.jsxs("div",{className:"flex items-center gap-2 px-2 py-1",children:[t.jsx(lt,{placeholder:n("mainPanelTabs.hostingTab.envNamePlaceholder"),value:v,onChange:D=>d(D.target.value),className:"h-8 flex-1 font-mono text-xs"}),t.jsx(lt,{placeholder:n("mainPanelTabs.hostingTab.envValuePlaceholder"),value:N,onChange:D=>g(D.target.value),className:"h-8 flex-1 font-mono text-xs"}),t.jsxs(Yt,{value:T,onValueChange:D=>h(D==="build"?"build":"runtime"),disabled:P.isPending,children:[t.jsx(Xt,{className:"h-8 w-[110px]",children:t.jsx(Zt,{})}),t.jsxs(Gt,{children:[t.jsx(jt,{value:"runtime",children:n("mainPanelTabs.hostingTab.secretScopeRuntime")}),t.jsx(jt,{value:"build",children:n("mainPanelTabs.hostingTab.secretScopeBuild")})]})]}),t.jsxs(ce,{size:"sm","aria-label":n("mainPanelTabs.hostingTab.addVariable"),onClick:_,disabled:P.isPending||!v.trim(),children:[t.jsx(Vt,{className:"size-4"}),n("mainPanelTabs.hostingTab.add")]})]}),c.length>0&&t.jsxs("div",{className:"mt-3 flex flex-col gap-1.5 border-t border-border pt-3",children:[t.jsx("p",{className:"px-2 text-xs text-muted-foreground",children:n("mainPanelTabs.hostingTab.codeVarsHint")}),t.jsx(tt,{children:t.jsx(st,{children:c.map(_s)})})]})]}),e[27]=v,e[28]=T,e[29]=N,e[30]=c,e[31]=w,e[32]=y?.name,e[33]=y?.scope,e[34]=P.isPending,e[35]=a,e[36]=s,e[37]=_,e[38]=B,e[39]=m,e[40]=n,e[41]=G):G=e[41];const le=S!=null;let ae;e[42]===Symbol.for("react.memo_cache_sentinel")?(ae=D=>{D||$(null)},e[42]=ae):ae=e[42];let ve;e[43]!==n?(ve=n("mainPanelTabs.hostingTab.confirmDeleteVariableTitle"),e[43]=n,e[44]=ve):ve=e[44];let se;e[45]!==ve?(se=t.jsx(Ct,{children:ve}),e[45]=ve,e[46]=se):se=e[46];const re=S?.name??"";let M;e[47]!==n||e[48]!==re?(M=n("mainPanelTabs.hostingTab.confirmDeleteVariableDescription",{name:re}),e[47]=n,e[48]=re,e[49]=M):M=e[49];let U;e[50]!==M?(U=t.jsx(Dt,{children:M}),e[50]=M,e[51]=U):U=e[51];let Z;e[52]!==se||e[53]!==U?(Z=t.jsxs(wt,{children:[se,U]}),e[52]=se,e[53]=U,e[54]=Z):Z=e[54];const ee=P.isPending;let ie;e[55]!==n?(ie=n("mainPanelTabs.hostingTab.cancel"),e[55]=n,e[56]=ie):ie=e[56];let K;e[57]!==P.isPending||e[58]!==ie?(K=t.jsx($t,{disabled:ee,children:ie}),e[57]=P.isPending,e[58]=ie,e[59]=K):K=e[59];let J;e[60]!==q?(J=D=>{D.preventDefault(),q()},e[60]=q,e[61]=J):J=e[61];const te=P.isPending;let W;e[62]!==n?(W=n("mainPanelTabs.hostingTab.deleteVariable"),e[62]=n,e[63]=W):W=e[63];let E;e[64]!==P.isPending||e[65]!==J||e[66]!==W?(E=t.jsx(zt,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:J,disabled:te,children:W}),e[64]=P.isPending,e[65]=J,e[66]=W,e[67]=E):E=e[67];let k;e[68]!==K||e[69]!==E?(k=t.jsxs(Lt,{children:[K,E]}),e[68]=K,e[69]=E,e[70]=k):k=e[70];let F;e[71]!==Z||e[72]!==k?(F=t.jsxs(_t,{children:[Z,k]}),e[71]=Z,e[72]=k,e[73]=F):F=e[73];let Q;e[74]!==le||e[75]!==F?(Q=t.jsx(kt,{open:le,onOpenChange:ae,children:F}),e[74]=le,e[75]=F,e[76]=Q):Q=e[76];let Y;return e[77]!==a.length||e[78]!==Q||e[79]!==f||e[80]!==G?(Y=t.jsxs(yt,{title:f,count:X,children:[G,Q]}),e[77]=a.length,e[78]=Q,e[79]=f,e[80]=G,e[81]=Y):Y=e[81],Y}function _s(r){return t.jsxs(ye,{children:[t.jsx(V,{className:"font-mono text-xs align-middle",children:r.name}),t.jsx(V,{className:"font-mono text-xs text-muted-foreground max-w-[360px] truncate align-middle",children:r.value})]},r.name)}function ks(r){return me.error(mt(r))}function Es(r){const e=Ee.c(176),{base:o,orgSlug:l,site:i,secrets:a,isLoading:c,error:m}=r,s=ct(),n=St(),[u,v]=ne.useState(!1),[d,N]=ne.useState(""),[g,T]=ne.useState(""),[h,y]=ne.useState("runtime"),[j,w]=ne.useState(null);let p;e[0]!==l||e[1]!==n||e[2]!==i?(p=()=>n.invalidateQueries({queryKey:Ue.hostingSecrets(l,i)}),e[0]=l,e[1]=n,e[2]=i,e[3]=p):p=e[3];const S=p;let $;e[4]!==o?($=oe=>rt(`${o}/secrets`,"PUT",oe),e[4]=o,e[5]=$):$=e[5];let z;e[6]!==S||e[7]!==s?(z=()=>{S(),me.success(s("mainPanelTabs.hostingTab.toastSecretSaved")),v(!1),N(""),T(""),y("runtime")},e[6]=S,e[7]=s,e[8]=z):z=e[8];let C;e[9]!==$||e[10]!==z?(C={mutationFn:$,onSuccess:z,onError:Rs},e[9]=$,e[10]=z,e[11]=C):C=e[11];const x=at(C);let P;e[12]!==o?(P=oe=>rt(`${o}/secrets/${encodeURIComponent(oe.name)}?scope=${oe.scope}`,"DELETE"),e[12]=o,e[13]=P):P=e[13];let L;e[14]!==S||e[15]!==s?(L=()=>{S(),me.success(s("mainPanelTabs.hostingTab.toastSecretDeleted")),w(null)},e[14]=S,e[15]=s,e[16]=L):L=e[16];let _;e[17]!==P||e[18]!==L?(_={mutationFn:P,onSuccess:L,onError:Fs},e[17]=P,e[18]=L,e[19]=_):_=e[19];const b=at(_);let B;e[20]!==d||e[21]!==h||e[22]!==g||e[23]!==x||e[24]!==s?(B=()=>{const oe=d.trim();if(!oe){me.error(s("mainPanelTabs.hostingTab.errorSecretNameRequired"));return}if(!g){me.error(s("mainPanelTabs.hostingTab.errorSecretValueRequired"));return}x.mutate({name:oe,value:g,scope:h})},e[20]=d,e[21]=h,e[22]=g,e[23]=x,e[24]=s,e[25]=B):B=e[25];const A=B;let q,f;e[26]===Symbol.for("react.memo_cache_sentinel")?(f=()=>v(!0),q=t.jsx(Vt,{className:"size-4"}),e[26]=q,e[27]=f):(q=e[26],f=e[27]);let X;e[28]!==s?(X=s("mainPanelTabs.hostingTab.addSecret"),e[28]=s,e[29]=X):X=e[29];let G;e[30]!==X?(G=t.jsxs(ce,{size:"sm",variant:"secondary",onClick:f,children:[q,X]}),e[30]=X,e[31]=G):G=e[31];const le=G;let ae;e[32]!==s?(ae=s("mainPanelTabs.hostingTab.secrets"),e[32]=s,e[33]=ae):ae=e[33];const ve=a.length;let se;e[34]!==b.isPending||e[35]!==m||e[36]!==c||e[37]!==a||e[38]!==s?(se=c?t.jsx(vt,{cols:2}):m?t.jsx(Ye,{children:s("mainPanelTabs.hostingTab.secretsError")}):a.length===0?t.jsx(Ye,{children:s("mainPanelTabs.hostingTab.noSecrets")}):t.jsxs(tt,{children:[t.jsx(ot,{children:t.jsxs(ye,{children:[t.jsx(I,{children:s("mainPanelTabs.hostingTab.colName")}),t.jsx(I,{children:s("mainPanelTabs.hostingTab.colValue")}),t.jsx(I,{className:"w-[1%]"})]})}),t.jsx(st,{children:a.map(oe=>{const We=oe.scope==="build"?"build":"runtime";return t.jsxs(ye,{children:[t.jsx(V,{className:"font-mono text-xs align-middle",children:t.jsxs("span",{className:"inline-flex items-center gap-2",children:[oe.name,t.jsx(de,{variant:We==="build"?"outline":"secondary",className:"font-sans text-[10px] capitalize",children:s(We==="build"?"mainPanelTabs.hostingTab.secretScopeBuild":"mainPanelTabs.hostingTab.secretScopeRuntime")}),oe.origin==="worker"&&t.jsx(de,{variant:"secondary",className:"font-sans text-[10px]",children:s("mainPanelTabs.hostingTab.secretOnWorker")})]})}),t.jsx(V,{className:"font-mono text-xs text-muted-foreground align-middle",children:s("mainPanelTabs.hostingTab.secretValueHidden")}),t.jsx(V,{className:"text-right align-middle",children:t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":s("mainPanelTabs.hostingTab.deleteSecret"),onClick:()=>w({name:oe.name,scope:We}),disabled:b.isPending,children:t.jsx(Ot,{className:"size-4"})})})]},`${oe.name}:${We}`)})})]}),e[34]=b.isPending,e[35]=m,e[36]=c,e[37]=a,e[38]=s,e[39]=se):se=e[39];let re;e[40]!==s?(re=s("mainPanelTabs.hostingTab.addSecretTitle"),e[40]=s,e[41]=re):re=e[41];let M;e[42]!==re?(M=t.jsx(Ht,{children:t.jsx(Mt,{children:re})}),e[42]=re,e[43]=M):M=e[43];let U;e[44]!==s?(U=s("mainPanelTabs.hostingTab.colName"),e[44]=s,e[45]=U):U=e[45];let Z;e[46]!==U?(Z=t.jsx(ht,{htmlFor:"secret-name",children:U}),e[46]=U,e[47]=Z):Z=e[47];let ee;e[48]!==s?(ee=s("mainPanelTabs.hostingTab.secretNamePlaceholder"),e[48]=s,e[49]=ee):ee=e[49];let ie;e[50]===Symbol.for("react.memo_cache_sentinel")?(ie=oe=>N(oe.target.value),e[50]=ie):ie=e[50];let K;e[51]!==d||e[52]!==x.isPending||e[53]!==ee?(K=t.jsx(lt,{id:"secret-name",placeholder:ee,value:d,onChange:ie,className:"font-mono text-xs",disabled:x.isPending}),e[51]=d,e[52]=x.isPending,e[53]=ee,e[54]=K):K=e[54];let J;e[55]!==Z||e[56]!==K?(J=t.jsxs("div",{className:"flex flex-col gap-2",children:[Z,K]}),e[55]=Z,e[56]=K,e[57]=J):J=e[57];let te;e[58]!==s?(te=s("mainPanelTabs.hostingTab.colValue"),e[58]=s,e[59]=te):te=e[59];let W;e[60]!==te?(W=t.jsx(ht,{htmlFor:"secret-value",children:te}),e[60]=te,e[61]=W):W=e[61];let E;e[62]!==s?(E=s("mainPanelTabs.hostingTab.secretValuePlaceholder"),e[62]=s,e[63]=E):E=e[63];let k;e[64]===Symbol.for("react.memo_cache_sentinel")?(k=oe=>T(oe.target.value),e[64]=k):k=e[64];let F;e[65]!==g||e[66]!==x.isPending||e[67]!==E?(F=t.jsx(lt,{id:"secret-value",type:"password",placeholder:E,value:g,onChange:k,className:"font-mono text-xs",disabled:x.isPending}),e[65]=g,e[66]=x.isPending,e[67]=E,e[68]=F):F=e[68];let Q;e[69]!==W||e[70]!==F?(Q=t.jsxs("div",{className:"flex flex-col gap-2",children:[W,F]}),e[69]=W,e[70]=F,e[71]=Q):Q=e[71];let Y;e[72]!==s?(Y=s("mainPanelTabs.hostingTab.secretScope"),e[72]=s,e[73]=Y):Y=e[73];let D;e[74]!==Y?(D=t.jsx(ht,{children:Y}),e[74]=Y,e[75]=D):D=e[75];let O;e[76]===Symbol.for("react.memo_cache_sentinel")?(O=oe=>y(oe==="build"?"build":"runtime"),e[76]=O):O=e[76];const ze=x.isPending;let fe;e[77]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx(Xt,{className:"w-full",children:t.jsx(Zt,{})}),e[77]=fe):fe=e[77];let Ne;e[78]!==s?(Ne=s("mainPanelTabs.hostingTab.secretScopeRuntime"),e[78]=s,e[79]=Ne):Ne=e[79];let he;e[80]!==Ne?(he=t.jsx(jt,{value:"runtime",children:Ne}),e[80]=Ne,e[81]=he):he=e[81];let ue;e[82]!==s?(ue=s("mainPanelTabs.hostingTab.secretScopeBuild"),e[82]=s,e[83]=ue):ue=e[83];let Le;e[84]!==ue?(Le=t.jsx(jt,{value:"build",children:ue}),e[84]=ue,e[85]=Le):Le=e[85];let Se;e[86]!==he||e[87]!==Le?(Se=t.jsxs(Gt,{children:[he,Le]}),e[86]=he,e[87]=Le,e[88]=Se):Se=e[88];let Ce;e[89]!==h||e[90]!==x.isPending||e[91]!==Se?(Ce=t.jsxs(Yt,{value:h,onValueChange:O,disabled:ze,children:[fe,Se]}),e[89]=h,e[90]=x.isPending,e[91]=Se,e[92]=Ce):Ce=e[92];let Fe;e[93]!==h||e[94]!==s?(Fe=s(h==="build"?"mainPanelTabs.hostingTab.secretScopeBuildHint":"mainPanelTabs.hostingTab.secretScopeRuntimeHint"),e[93]=h,e[94]=s,e[95]=Fe):Fe=e[95];let Re;e[96]!==Fe?(Re=t.jsx("p",{className:"text-xs text-muted-foreground",children:Fe}),e[96]=Fe,e[97]=Re):Re=e[97];let ge;e[98]!==D||e[99]!==Ce||e[100]!==Re?(ge=t.jsxs("div",{className:"flex flex-col gap-2",children:[D,Ce,Re]}),e[98]=D,e[99]=Ce,e[100]=Re,e[101]=ge):ge=e[101];let xe;e[102]!==J||e[103]!==Q||e[104]!==ge?(xe=t.jsxs("div",{className:"flex flex-col gap-4",children:[J,Q,ge]}),e[102]=J,e[103]=Q,e[104]=ge,e[105]=xe):xe=e[105];let De;e[106]===Symbol.for("react.memo_cache_sentinel")?(De=()=>v(!1),e[106]=De):De=e[106];const Xe=x.isPending;let be;e[107]!==s?(be=s("mainPanelTabs.hostingTab.cancel"),e[107]=s,e[108]=be):be=e[108];let pe;e[109]!==x.isPending||e[110]!==be?(pe=t.jsx(ce,{variant:"outline",type:"button",onClick:De,disabled:Xe,children:be}),e[109]=x.isPending,e[110]=be,e[111]=pe):pe=e[111];let Te;e[112]!==d||e[113]!==g||e[114]!==x.isPending?(Te=x.isPending||!d.trim()||!g,e[112]=d,e[113]=g,e[114]=x.isPending,e[115]=Te):Te=e[115];let Ae;e[116]!==x.isPending||e[117]!==s?(Ae=x.isPending?s("mainPanelTabs.hostingTab.saving"):s("mainPanelTabs.hostingTab.add"),e[116]=x.isPending,e[117]=s,e[118]=Ae):Ae=e[118];let je;e[119]!==A||e[120]!==Te||e[121]!==Ae?(je=t.jsx(ce,{type:"button",onClick:A,disabled:Te,children:Ae}),e[119]=A,e[120]=Te,e[121]=Ae,e[122]=je):je=e[122];let we;e[123]!==pe||e[124]!==je?(we=t.jsxs(Wt,{children:[pe,je]}),e[123]=pe,e[124]=je,e[125]=we):we=e[125];let qe;e[126]!==M||e[127]!==xe||e[128]!==we?(qe=t.jsxs(Kt,{className:"sm:max-w-md",children:[M,xe,we]}),e[126]=M,e[127]=xe,e[128]=we,e[129]=qe):qe=e[129];let Pe;e[130]!==u||e[131]!==qe?(Pe=t.jsx(Qt,{open:u,onOpenChange:v,children:qe}),e[130]=u,e[131]=qe,e[132]=Pe):Pe=e[132];const _e=j!=null;let ke;e[133]===Symbol.for("react.memo_cache_sentinel")?(ke=oe=>{oe||w(null)},e[133]=ke):ke=e[133];let R;e[134]!==s?(R=s("mainPanelTabs.hostingTab.confirmDeleteSecretTitle"),e[134]=s,e[135]=R):R=e[135];let $e;e[136]!==R?($e=t.jsx(Ct,{children:R}),e[136]=R,e[137]=$e):$e=e[137];const Ze=j?.name??"";let Ve;e[138]!==s||e[139]!==Ze?(Ve=s("mainPanelTabs.hostingTab.confirmDeleteSecretDescription",{name:Ze}),e[138]=s,e[139]=Ze,e[140]=Ve):Ve=e[140];let Be;e[141]!==Ve?(Be=t.jsx(Dt,{children:Ve}),e[141]=Ve,e[142]=Be):Be=e[142];let Ge;e[143]!==$e||e[144]!==Be?(Ge=t.jsxs(wt,{children:[$e,Be]}),e[143]=$e,e[144]=Be,e[145]=Ge):Ge=e[145];const ut=b.isPending;let Oe;e[146]!==s?(Oe=s("mainPanelTabs.hostingTab.cancel"),e[146]=s,e[147]=Oe):Oe=e[147];let He;e[148]!==b.isPending||e[149]!==Oe?(He=t.jsx($t,{disabled:ut,children:Oe}),e[148]=b.isPending,e[149]=Oe,e[150]=He):He=e[150];let et;e[151]!==b||e[152]!==j?(et=oe=>{oe.preventDefault(),j&&b.mutate(j)},e[151]=b,e[152]=j,e[153]=et):et=e[153];const nt=b.isPending;let Me;e[154]!==s?(Me=s("mainPanelTabs.hostingTab.deleteSecret"),e[154]=s,e[155]=Me):Me=e[155];let Ke;e[156]!==b.isPending||e[157]!==et||e[158]!==Me?(Ke=t.jsx(zt,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:et,disabled:nt,children:Me}),e[156]=b.isPending,e[157]=et,e[158]=Me,e[159]=Ke):Ke=e[159];let it;e[160]!==He||e[161]!==Ke?(it=t.jsxs(Lt,{children:[He,Ke]}),e[160]=He,e[161]=Ke,e[162]=it):it=e[162];let Qe;e[163]!==Ge||e[164]!==it?(Qe=t.jsxs(_t,{children:[Ge,it]}),e[163]=Ge,e[164]=it,e[165]=Qe):Qe=e[165];let Ie;e[166]!==_e||e[167]!==Qe?(Ie=t.jsx(kt,{open:_e,onOpenChange:ke,children:Qe}),e[166]=_e,e[167]=Qe,e[168]=Ie):Ie=e[168];let Je;return e[169]!==le||e[170]!==a.length||e[171]!==ae||e[172]!==se||e[173]!==Pe||e[174]!==Ie?(Je=t.jsxs(yt,{title:ae,count:ve,action:le,children:[se,Pe,Ie]}),e[169]=le,e[170]=a.length,e[171]=ae,e[172]=se,e[173]=Pe,e[174]=Ie,e[175]=Je):Je=e[175],Je}function Fs(r){return me.error(mt(r))}function Rs(r){return me.error(mt(r))}const As=["16.148.147.194","52.32.122.94","52.35.156.199"];function qs(r){return r.replace(/\.$/,"").split(".").filter(Boolean).length===2}function Vs(r){return qs(r)?"@":r}function ls(r){const e=Ee.c(9),{value:o,t:l}=r;let i;e[0]!==l?(i=l("mainPanelTabs.hostingTab.dnsCopy"),e[0]=l,e[1]=i):i=e[1];let a;e[2]!==l||e[3]!==o?(a=()=>{navigator.clipboard?.writeText(o),me.success(l("mainPanelTabs.hostingTab.dnsCopied"))},e[2]=l,e[3]=o,e[4]=a):a=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(ms,{className:"size-3.5"}),e[5]=c):c=e[5];let m;return e[6]!==i||e[7]!==a?(m=t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":i,onClick:a,children:c}),e[6]=i,e[7]=a,e[8]=m):m=e[8],m}function ss(r){const e=Ee.c(64),{from:o,source:l,t:i}=r;let a,c,m,s,n,u,v;if(e[0]!==o||e[1]!==l||e[2]!==i){const L=o.trim().replace(/\.$/,"");c=L?Vs(L):"@",a=l==="both",n="flex flex-col gap-3 rounded-md border bg-muted/30 p-3";let _;e[10]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(Nt,{className:"size-4 text-muted-foreground"}),e[10]=_):_=e[10];let b;e[11]!==i?(b=i("mainPanelTabs.hostingTab.dnsSetupTitle"),e[11]=i,e[12]=b):b=e[12];let B;e[13]!==b?(B=t.jsx("span",{className:"text-xs font-medium",children:b}),e[13]=b,e[14]=B):B=e[14];const A=a?"secondary":"outline";let q;e[15]!==a||e[16]!==i?(q=i(a?"mainPanelTabs.hostingTab.dnsActive":"mainPanelTabs.hostingTab.dnsAwaiting"),e[15]=a,e[16]=i,e[17]=q):q=e[17];let f;e[18]!==q||e[19]!==A?(f=t.jsx(de,{variant:A,className:"ml-auto",children:q}),e[18]=q,e[19]=A,e[20]=f):f=e[20],e[21]!==f||e[22]!==B?(u=t.jsxs("div",{className:"flex items-center gap-2",children:[_,B,f]}),e[21]=f,e[22]=B,e[23]=u):u=e[23],v=t.jsx("p",{className:"text-xs text-muted-foreground",children:i("mainPanelTabs.hostingTab.dnsRedirectIntent",{from:L||"—"})}),m="text-xs text-muted-foreground",s=i("mainPanelTabs.hostingTab.dnsSetupDescription",{host:L||"—"}),e[0]=o,e[1]=l,e[2]=i,e[3]=a,e[4]=c,e[5]=m,e[6]=s,e[7]=n,e[8]=u,e[9]=v}else a=e[3],c=e[4],m=e[5],s=e[6],n=e[7],u=e[8],v=e[9];let d;e[24]!==m||e[25]!==s?(d=t.jsx("p",{className:m,children:s}),e[24]=m,e[25]=s,e[26]=d):d=e[26];let N;e[27]!==a||e[28]!==i?(N=i(a?"mainPanelTabs.hostingTab.dnsActiveHint":"mainPanelTabs.hostingTab.dnsAwaitingHint"),e[27]=a,e[28]=i,e[29]=N):N=e[29];let g;e[30]!==N?(g=t.jsx("p",{className:"text-xs text-muted-foreground",children:N}),e[30]=N,e[31]=g):g=e[31];let T;e[32]!==i?(T=i("mainPanelTabs.hostingTab.dnsColType"),e[32]=i,e[33]=T):T=e[33];let h;e[34]!==T?(h=t.jsx(I,{children:T}),e[34]=T,e[35]=h):h=e[35];let y;e[36]!==i?(y=i("mainPanelTabs.hostingTab.dnsColName"),e[36]=i,e[37]=y):y=e[37];let j;e[38]!==y?(j=t.jsx(I,{children:y}),e[38]=y,e[39]=j):j=e[39];let w;e[40]!==i?(w=i("mainPanelTabs.hostingTab.dnsColValue"),e[40]=i,e[41]=w):w=e[41];let p;e[42]!==w?(p=t.jsx(I,{children:w}),e[42]=w,e[43]=p):p=e[43];let S;e[44]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(I,{className:"w-[1%]"}),e[44]=S):S=e[44];let $;e[45]!==h||e[46]!==j||e[47]!==p?($=t.jsx(ot,{children:t.jsxs(ye,{children:[h,j,p,S]})}),e[45]=h,e[46]=j,e[47]=p,e[48]=$):$=e[48];let z;e[49]!==c||e[50]!==i?(z=As.map(L=>t.jsxs(ye,{children:[t.jsx(V,{className:"font-mono text-xs align-middle",children:"A"}),t.jsx(V,{className:"font-mono text-xs align-middle",children:c}),t.jsx(V,{className:"font-mono text-xs align-middle",children:L}),t.jsx(V,{className:"text-right align-middle",children:t.jsx(ls,{value:L,t:i})})]},L)),e[49]=c,e[50]=i,e[51]=z):z=e[51];let C;e[52]!==z?(C=t.jsx(st,{children:z}),e[52]=z,e[53]=C):C=e[53];let x;e[54]!==$||e[55]!==C?(x=t.jsxs(tt,{children:[$,C]}),e[54]=$,e[55]=C,e[56]=x):x=e[56];let P;return e[57]!==x||e[58]!==n||e[59]!==u||e[60]!==v||e[61]!==d||e[62]!==g?(P=t.jsxs("div",{className:n,children:[u,v,d,g,x]}),e[57]=x,e[58]=n,e[59]=u,e[60]=v,e[61]=d,e[62]=g,e[63]=P):P=e[63],P}function Bs(r){const e=Ee.c(6),{type:o,t:l}=r,i=o==="permanent"?"secondary":"outline";let a;e[0]!==l||e[1]!==o?(a=l(o==="permanent"?"mainPanelTabs.hostingTab.permanent":"mainPanelTabs.hostingTab.temporary"),e[0]=l,e[1]=o,e[2]=a):a=e[2];let c;return e[3]!==i||e[4]!==a?(c=t.jsx(de,{variant:i,children:a}),e[3]=i,e[4]=a,e[5]=c):c=e[5],c}function Os(r){const e=Ee.c(180),{base:o,orgSlug:l,site:i,redirects:a,isLoading:c,error:m}=r,s=ct(),n=St(),[u,v]=ne.useState(!1),[d,N]=ne.useState(null),[g,T]=ne.useState(""),[h,y]=ne.useState(""),[j,w]=ne.useState("permanent"),[p,S]=ne.useState(null),[$,z]=ne.useState(null);let C;e[0]!==l||e[1]!==n||e[2]!==i?(C=()=>n.invalidateQueries({queryKey:Ue.hostingRedirects(l,i)}),e[0]=l,e[1]=n,e[2]=i,e[3]=C):C=e[3];const x=C;let P;e[4]!==o?(P=H=>rt(`${o}/redirects`,"PUT",H),e[4]=o,e[5]=P):P=e[5];let L;e[6]!==x||e[7]!==s?(L=()=>{x(),me.success(s("mainPanelTabs.hostingTab.toastRedirectSaved")),v(!1)},e[6]=x,e[7]=s,e[8]=L):L=e[8];let _;e[9]!==P||e[10]!==L?(_={mutationFn:P,onSuccess:L,onError:Ms},e[9]=P,e[10]=L,e[11]=_):_=e[11];const b=at(_);let B;e[12]!==o?(B=H=>rt(`${o}/redirects/${encodeURIComponent(H)}`,"DELETE"),e[12]=o,e[13]=B):B=e[13];let A;e[14]!==x||e[15]!==s?(A=()=>{x(),me.success(s("mainPanelTabs.hostingTab.toastRedirectDeleted")),S(null)},e[14]=x,e[15]=s,e[16]=A):A=e[16];let q;e[17]!==B||e[18]!==A?(q={mutationFn:B,onSuccess:A,onError:Hs},e[17]=B,e[18]=A,e[19]=q):q=e[19];const f=at(q);let X;e[20]===Symbol.for("react.memo_cache_sentinel")?(X=()=>{N(null),T(""),y(""),w("permanent"),v(!0)},e[20]=X):X=e[20];const G=X;let le;e[21]===Symbol.for("react.memo_cache_sentinel")?(le=H=>{N(H.from),T(H.from),y(H.to),w(H.type==="temporary"?"temporary":"permanent"),v(!0)},e[21]=le):le=e[21];const ae=le;let ve;e[22]!==g||e[23]!==h||e[24]!==j||e[25]!==b||e[26]!==s?(ve=()=>{const H=g.trim(),Ft=h.trim();if(!H||!Ft){me.error(s("mainPanelTabs.hostingTab.errorRedirectFieldsRequired"));return}b.mutate({from:H,to:Ft,type:j})},e[22]=g,e[23]=h,e[24]=j,e[25]=b,e[26]=s,e[27]=ve):ve=e[27];const se=ve;let re;e[28]===Symbol.for("react.memo_cache_sentinel")?(re=t.jsx(Vt,{className:"size-4"}),e[28]=re):re=e[28];let M;e[29]!==s?(M=s("mainPanelTabs.hostingTab.addRedirect"),e[29]=s,e[30]=M):M=e[30];let U;e[31]!==M?(U=t.jsxs(ce,{size:"sm",variant:"secondary",onClick:G,children:[re,M]}),e[31]=M,e[32]=U):U=e[32];const Z=U;let ee;e[33]!==s?(ee=s("mainPanelTabs.hostingTab.redirects"),e[33]=s,e[34]=ee):ee=e[34];const ie=a.length;let K;e[35]!==f.isPending||e[36]!==$||e[37]!==m||e[38]!==c||e[39]!==b.isPending||e[40]!==a||e[41]!==s?(K=c?t.jsx(vt,{cols:3}):m?t.jsx(Ye,{children:s("mainPanelTabs.hostingTab.redirectsError")}):a.length===0?t.jsx(Pt,{icon:t.jsx(fs,{className:"size-5"}),title:s("mainPanelTabs.hostingTab.noRedirects")}):t.jsxs(tt,{children:[t.jsx(ot,{children:t.jsxs(ye,{children:[t.jsx(I,{children:s("mainPanelTabs.hostingTab.colFrom")}),t.jsx(I,{children:s("mainPanelTabs.hostingTab.colTo")}),t.jsx(I,{children:s("mainPanelTabs.hostingTab.colType")}),t.jsx(I,{className:"w-[1%]"})]})}),t.jsx(st,{children:a.map((H,Ft)=>t.jsxs(ne.Fragment,{children:[t.jsxs(ye,{children:[t.jsx(V,{className:"font-mono text-xs align-middle",children:H.from}),t.jsx(V,{className:"font-mono text-xs text-muted-foreground max-w-[280px] truncate align-middle",children:H.to}),t.jsx(V,{className:"align-middle",children:t.jsx(Bs,{type:H.type,t:s})}),t.jsxs(V,{className:"text-right align-middle whitespace-nowrap",children:[t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":s("mainPanelTabs.hostingTab.dnsSetup"),onClick:()=>z($===H.from?null:H.from),children:t.jsx(Nt,{className:"size-4"})}),t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":s("mainPanelTabs.hostingTab.editRedirect"),onClick:()=>ae(H),disabled:b.isPending,children:t.jsx(hs,{className:"size-4"})}),t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":s("mainPanelTabs.hostingTab.deleteRedirect"),onClick:()=>S(H.from),disabled:f.isPending,children:t.jsx(Ot,{className:"size-4"})})]})]}),$===H.from&&t.jsx(ye,{children:t.jsx(V,{colSpan:4,className:"bg-muted/10",children:t.jsx(ss,{from:H.from,source:H.source,t:s})})})]},H.id??`${H.from}-${Ft}`))})]}),e[35]=f.isPending,e[36]=$,e[37]=m,e[38]=c,e[39]=b.isPending,e[40]=a,e[41]=s,e[42]=K):K=e[42];let J;e[43]!==d||e[44]!==s?(J=d!=null?s("mainPanelTabs.hostingTab.editRedirectTitle"):s("mainPanelTabs.hostingTab.addRedirectTitle"),e[43]=d,e[44]=s,e[45]=J):J=e[45];let te;e[46]!==J?(te=t.jsx(Ht,{children:t.jsx(Mt,{children:J})}),e[46]=J,e[47]=te):te=e[47];let W;e[48]!==s?(W=s("mainPanelTabs.hostingTab.colFrom"),e[48]=s,e[49]=W):W=e[49];let E;e[50]!==W?(E=t.jsx(ht,{htmlFor:"redirect-from",children:W}),e[50]=W,e[51]=E):E=e[51];let k;e[52]!==s?(k=s("mainPanelTabs.hostingTab.redirectFromPlaceholder"),e[52]=s,e[53]=k):k=e[53];let F;e[54]===Symbol.for("react.memo_cache_sentinel")?(F=H=>T(H.target.value),e[54]=F):F=e[54];const Q=d!=null||b.isPending;let Y;e[55]!==g||e[56]!==k||e[57]!==Q?(Y=t.jsx(lt,{id:"redirect-from",placeholder:k,value:g,onChange:F,className:"font-mono text-xs",disabled:Q}),e[55]=g,e[56]=k,e[57]=Q,e[58]=Y):Y=e[58];let D;e[59]!==E||e[60]!==Y?(D=t.jsxs("div",{className:"flex flex-col gap-2",children:[E,Y]}),e[59]=E,e[60]=Y,e[61]=D):D=e[61];let O;e[62]!==s?(O=s("mainPanelTabs.hostingTab.colTo"),e[62]=s,e[63]=O):O=e[63];let ze;e[64]!==O?(ze=t.jsx(ht,{htmlFor:"redirect-to",children:O}),e[64]=O,e[65]=ze):ze=e[65];let fe;e[66]!==s?(fe=s("mainPanelTabs.hostingTab.redirectToPlaceholder"),e[66]=s,e[67]=fe):fe=e[67];let Ne;e[68]===Symbol.for("react.memo_cache_sentinel")?(Ne=H=>y(H.target.value),e[68]=Ne):Ne=e[68];let he;e[69]!==h||e[70]!==b.isPending||e[71]!==fe?(he=t.jsx(lt,{id:"redirect-to",placeholder:fe,value:h,onChange:Ne,className:"font-mono text-xs",disabled:b.isPending}),e[69]=h,e[70]=b.isPending,e[71]=fe,e[72]=he):he=e[72];let ue;e[73]!==ze||e[74]!==he?(ue=t.jsxs("div",{className:"flex flex-col gap-2",children:[ze,he]}),e[73]=ze,e[74]=he,e[75]=ue):ue=e[75];let Le;e[76]!==s?(Le=s("mainPanelTabs.hostingTab.colType"),e[76]=s,e[77]=Le):Le=e[77];let Se;e[78]!==Le?(Se=t.jsx(ht,{children:Le}),e[78]=Le,e[79]=Se):Se=e[79];let Ce;e[80]===Symbol.for("react.memo_cache_sentinel")?(Ce=H=>w(H==="temporary"?"temporary":"permanent"),e[80]=Ce):Ce=e[80];const Fe=b.isPending;let Re;e[81]===Symbol.for("react.memo_cache_sentinel")?(Re=t.jsx(Xt,{className:"w-full",children:t.jsx(Zt,{})}),e[81]=Re):Re=e[81];let ge;e[82]!==s?(ge=s("mainPanelTabs.hostingTab.permanent"),e[82]=s,e[83]=ge):ge=e[83];let xe;e[84]!==ge?(xe=t.jsx(jt,{value:"permanent",children:ge}),e[84]=ge,e[85]=xe):xe=e[85];let De;e[86]!==s?(De=s("mainPanelTabs.hostingTab.temporary"),e[86]=s,e[87]=De):De=e[87];let Xe;e[88]!==De?(Xe=t.jsx(jt,{value:"temporary",children:De}),e[88]=De,e[89]=Xe):Xe=e[89];let be;e[90]!==xe||e[91]!==Xe?(be=t.jsxs(Gt,{children:[xe,Xe]}),e[90]=xe,e[91]=Xe,e[92]=be):be=e[92];let pe;e[93]!==j||e[94]!==b.isPending||e[95]!==be?(pe=t.jsxs(Yt,{value:j,onValueChange:Ce,disabled:Fe,children:[Re,be]}),e[93]=j,e[94]=b.isPending,e[95]=be,e[96]=pe):pe=e[96];let Te;e[97]!==Se||e[98]!==pe?(Te=t.jsxs("div",{className:"flex flex-col gap-2",children:[Se,pe]}),e[97]=Se,e[98]=pe,e[99]=Te):Te=e[99];let Ae;e[100]!==d||e[101]!==g||e[102]!==a||e[103]!==s?(Ae=g.trim()&&t.jsx(ss,{from:g,source:a.find(H=>H.from===d)?.source,t:s}),e[100]=d,e[101]=g,e[102]=a,e[103]=s,e[104]=Ae):Ae=e[104];let je;e[105]!==D||e[106]!==ue||e[107]!==Te||e[108]!==Ae?(je=t.jsxs("div",{className:"flex flex-col gap-4",children:[D,ue,Te,Ae]}),e[105]=D,e[106]=ue,e[107]=Te,e[108]=Ae,e[109]=je):je=e[109];let we;e[110]===Symbol.for("react.memo_cache_sentinel")?(we=()=>v(!1),e[110]=we):we=e[110];const qe=b.isPending;let Pe;e[111]!==s?(Pe=s("mainPanelTabs.hostingTab.cancel"),e[111]=s,e[112]=Pe):Pe=e[112];let _e;e[113]!==b.isPending||e[114]!==Pe?(_e=t.jsx(ce,{variant:"outline",type:"button",onClick:we,disabled:qe,children:Pe}),e[113]=b.isPending,e[114]=Pe,e[115]=_e):_e=e[115];let ke;e[116]!==g||e[117]!==h||e[118]!==b.isPending?(ke=b.isPending||!g.trim()||!h.trim(),e[116]=g,e[117]=h,e[118]=b.isPending,e[119]=ke):ke=e[119];let R;e[120]!==b.isPending||e[121]!==s?(R=b.isPending?s("mainPanelTabs.hostingTab.saving"):s("mainPanelTabs.hostingTab.save"),e[120]=b.isPending,e[121]=s,e[122]=R):R=e[122];let $e;e[123]!==se||e[124]!==ke||e[125]!==R?($e=t.jsx(ce,{type:"button",onClick:se,disabled:ke,children:R}),e[123]=se,e[124]=ke,e[125]=R,e[126]=$e):$e=e[126];let Ze;e[127]!==_e||e[128]!==$e?(Ze=t.jsxs(Wt,{children:[_e,$e]}),e[127]=_e,e[128]=$e,e[129]=Ze):Ze=e[129];let Ve;e[130]!==te||e[131]!==je||e[132]!==Ze?(Ve=t.jsxs(Kt,{className:"sm:max-w-md",children:[te,je,Ze]}),e[130]=te,e[131]=je,e[132]=Ze,e[133]=Ve):Ve=e[133];let Be;e[134]!==u||e[135]!==Ve?(Be=t.jsx(Qt,{open:u,onOpenChange:v,children:Ve}),e[134]=u,e[135]=Ve,e[136]=Be):Be=e[136];const Ge=p!=null;let ut;e[137]===Symbol.for("react.memo_cache_sentinel")?(ut=H=>{H||S(null)},e[137]=ut):ut=e[137];let Oe;e[138]!==s?(Oe=s("mainPanelTabs.hostingTab.confirmDeleteRedirectTitle"),e[138]=s,e[139]=Oe):Oe=e[139];let He;e[140]!==Oe?(He=t.jsx(Ct,{children:Oe}),e[140]=Oe,e[141]=He):He=e[141];const et=p??"";let nt;e[142]!==s||e[143]!==et?(nt=s("mainPanelTabs.hostingTab.confirmDeleteRedirectDescription",{from:et}),e[142]=s,e[143]=et,e[144]=nt):nt=e[144];let Me;e[145]!==nt?(Me=t.jsx(Dt,{children:nt}),e[145]=nt,e[146]=Me):Me=e[146];let Ke;e[147]!==He||e[148]!==Me?(Ke=t.jsxs(wt,{children:[He,Me]}),e[147]=He,e[148]=Me,e[149]=Ke):Ke=e[149];const it=f.isPending;let Qe;e[150]!==s?(Qe=s("mainPanelTabs.hostingTab.cancel"),e[150]=s,e[151]=Qe):Qe=e[151];let Ie;e[152]!==f.isPending||e[153]!==Qe?(Ie=t.jsx($t,{disabled:it,children:Qe}),e[152]=f.isPending,e[153]=Qe,e[154]=Ie):Ie=e[154];let Je;e[155]!==f||e[156]!==p?(Je=H=>{H.preventDefault(),p&&f.mutate(p)},e[155]=f,e[156]=p,e[157]=Je):Je=e[157];const oe=f.isPending;let We;e[158]!==s?(We=s("mainPanelTabs.hostingTab.deleteRedirect"),e[158]=s,e[159]=We):We=e[159];let gt;e[160]!==f.isPending||e[161]!==Je||e[162]!==We?(gt=t.jsx(zt,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:Je,disabled:oe,children:We}),e[160]=f.isPending,e[161]=Je,e[162]=We,e[163]=gt):gt=e[163];let xt;e[164]!==Ie||e[165]!==gt?(xt=t.jsxs(Lt,{children:[Ie,gt]}),e[164]=Ie,e[165]=gt,e[166]=xt):xt=e[166];let bt;e[167]!==Ke||e[168]!==xt?(bt=t.jsxs(_t,{children:[Ke,xt]}),e[167]=Ke,e[168]=xt,e[169]=bt):bt=e[169];let pt;e[170]!==Ge||e[171]!==bt?(pt=t.jsx(kt,{open:Ge,onOpenChange:ut,children:bt}),e[170]=Ge,e[171]=bt,e[172]=pt):pt=e[172];let Et;return e[173]!==Z||e[174]!==a.length||e[175]!==ee||e[176]!==K||e[177]!==Be||e[178]!==pt?(Et=t.jsxs(yt,{title:ee,count:ie,action:Z,children:[K,Be,pt]}),e[173]=Z,e[174]=a.length,e[175]=ee,e[176]=K,e[177]=Be,e[178]=pt,e[179]=Et):Et=e[179],Et}function Hs(r){return me.error(mt(r))}function Ms(r){return me.error(mt(r))}function ns(r){const e=Ee.c(35),{records:o,t:l}=r;if(o.length===0)return null;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Nt,{className:"size-4 text-muted-foreground"}),e[0]=i):i=e[0];let a;e[1]!==l?(a=l("mainPanelTabs.hostingTab.dnsSetupTitle"),e[1]=l,e[2]=a):a=e[2];let c;e[3]!==a?(c=t.jsxs("div",{className:"flex items-center gap-2",children:[i,t.jsx("span",{className:"text-xs font-medium",children:a})]}),e[3]=a,e[4]=c):c=e[4];let m;e[5]!==l?(m=l("mainPanelTabs.hostingTab.dnsColType"),e[5]=l,e[6]=m):m=e[6];let s;e[7]!==m?(s=t.jsx(I,{className:"w-14",children:m}),e[7]=m,e[8]=s):s=e[8];let n;e[9]!==l?(n=l("mainPanelTabs.hostingTab.dnsColName"),e[9]=l,e[10]=n):n=e[10];let u;e[11]!==n?(u=t.jsx(I,{children:n}),e[11]=n,e[12]=u):u=e[12];let v;e[13]!==l?(v=l("mainPanelTabs.hostingTab.dnsColValue"),e[13]=l,e[14]=v):v=e[14];let d;e[15]!==v?(d=t.jsx(I,{children:v}),e[15]=v,e[16]=d):d=e[16];let N;e[17]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(I,{className:"w-8"}),e[17]=N):N=e[17];let g;e[18]!==s||e[19]!==u||e[20]!==d?(g=t.jsx(ot,{children:t.jsxs(ye,{children:[s,u,d,N]})}),e[18]=s,e[19]=u,e[20]=d,e[21]=g):g=e[21];let T;if(e[22]!==o||e[23]!==l){let w;e[25]!==l?(w=p=>t.jsxs(ye,{children:[t.jsx(V,{className:"font-mono text-xs align-top",children:p.type}),t.jsx(V,{className:"break-all font-mono text-xs align-top",children:p.name}),t.jsx(V,{className:"break-all font-mono text-xs align-top",children:p.value}),t.jsx(V,{className:"text-right align-top",children:t.jsx(ls,{value:p.value,t:l})})]},`${p.type}-${p.name}-${p.value}`),e[25]=l,e[26]=w):w=e[26],T=o.map(w),e[22]=o,e[23]=l,e[24]=T}else T=e[24];let h;e[27]!==T?(h=t.jsx(st,{children:T}),e[27]=T,e[28]=h):h=e[28];let y;e[29]!==g||e[30]!==h?(y=t.jsxs(tt,{className:"w-full table-fixed",children:[g,h]}),e[29]=g,e[30]=h,e[31]=y):y=e[31];let j;return e[32]!==y||e[33]!==c?(j=t.jsxs("div",{className:"flex min-w-0 flex-col gap-3 rounded-md border bg-muted/30 p-3",children:[c,y]}),e[32]=y,e[33]=c,e[34]=j):j=e[34],j}function Ks(r){const e=Ee.c(10),{domain:o,t:l}=r,i=o.status??"pending";let a;e[0]!==i||e[1]!==l?(a=l(i==="active"?"mainPanelTabs.hostingTab.statusActive":i==="action-required"?"mainPanelTabs.hostingTab.statusActionRequired":"mainPanelTabs.hostingTab.statusPending"),e[0]=i,e[1]=l,e[2]=a):a=e[2];const c=a;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=i==="active"?"secondary":"outline";let u;return e[6]!==s||e[7]!==c||e[8]!==n?(u=t.jsx(de,{variant:n,title:s,children:c}),e[6]=s,e[7]=c,e[8]=n,e[9]=u):u=e[9],u}function Qs(r){const e=Ee.c(138),{base:o,orgSlug:l,site:i,domains:a,dnsTemplate:c,isLoading:m,error:s}=r,n=ct(),u=St(),[v,d]=ne.useState(!1),[N,g]=ne.useState(""),[T,h]=ne.useState(null),[y,j]=ne.useState(null);let w;e[0]!==l||e[1]!==u||e[2]!==i?(w=()=>u.invalidateQueries({queryKey:Ue.hostingDomains(l,i)}),e[0]=l,e[1]=u,e[2]=i,e[3]=w):w=e[3];const p=w;let S;e[4]!==o?(S=R=>rt(`${o}/domains`,"PUT",R),e[4]=o,e[5]=S):S=e[5];let $;e[6]!==p||e[7]!==n?($=()=>{p(),me.success(n("mainPanelTabs.hostingTab.toastDomainSaved")),d(!1)},e[6]=p,e[7]=n,e[8]=$):$=e[8];let z;e[9]!==S||e[10]!==$?(z={mutationFn:S,onSuccess:$,onError:Us},e[9]=S,e[10]=$,e[11]=z):z=e[11];const C=at(z);let x;e[12]!==o?(x=R=>rt(`${o}/domains/${encodeURIComponent(R)}`,"DELETE"),e[12]=o,e[13]=x):x=e[13];let P;e[14]!==p||e[15]!==n?(P=()=>{p(),me.success(n("mainPanelTabs.hostingTab.toastDomainDeleted")),h(null)},e[14]=p,e[15]=n,e[16]=P):P=e[16];let L;e[17]!==x||e[18]!==P?(L={mutationFn:x,onSuccess:P,onError:Is},e[17]=x,e[18]=P,e[19]=L):L=e[19];const _=at(L);let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{g(""),d(!0)},e[20]=b):b=e[20];const B=b;let A;e[21]!==N||e[22]!==C||e[23]!==n?(A=()=>{const R=N.trim().toLowerCase();if(!R){me.error(n("mainPanelTabs.hostingTab.errorDomainHostRequired"));return}C.mutate({host:R})},e[21]=N,e[22]=C,e[23]=n,e[24]=A):A=e[24];const q=A;let f;if(e[25]!==c||e[26]!==N){let R;e[28]!==N?(R=$e=>({...$e,name:N.trim().toLowerCase()||$e.name}),e[28]=N,e[29]=R):R=e[29],f=c.map(R),e[25]=c,e[26]=N,e[27]=f}else f=e[27];const X=f;let G;e[30]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx(Vt,{className:"size-4"}),e[30]=G):G=e[30];let le;e[31]!==n?(le=n("mainPanelTabs.hostingTab.addDomain"),e[31]=n,e[32]=le):le=e[32];let ae;e[33]!==le?(ae=t.jsxs(ce,{size:"sm",variant:"secondary",onClick:B,children:[G,le]}),e[33]=le,e[34]=ae):ae=e[34];const ve=ae;let se;e[35]!==n?(se=n("mainPanelTabs.hostingTab.domains"),e[35]=n,e[36]=se):se=e[36];const re=a.length;let M;e[37]!==_.isPending||e[38]!==y||e[39]!==a||e[40]!==s||e[41]!==m||e[42]!==n?(M=m?t.jsx(vt,{cols:3}):s?t.jsx(Ye,{children:n("mainPanelTabs.hostingTab.domainsError")}):a.length===0?t.jsx(Pt,{icon:t.jsx(Nt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDomains")}):t.jsxs(tt,{children:[t.jsx(ot,{children:t.jsxs(ye,{children:[t.jsx(I,{children:n("mainPanelTabs.hostingTab.colHost")}),t.jsx(I,{children:n("mainPanelTabs.hostingTab.colStatus")}),t.jsx(I,{className:"w-[1%]"})]})}),t.jsx(st,{children:a.map((R,$e)=>t.jsxs(ne.Fragment,{children:[t.jsxs(ye,{children:[t.jsxs(V,{className:"font-mono text-xs align-middle",children:[R.host,R.canonical&&t.jsx(de,{variant:"outline",className:"ml-2",children:n("mainPanelTabs.hostingTab.canonical")})]}),t.jsx(V,{className:"align-middle",children:t.jsx(Ks,{domain:R,t:n})}),t.jsx(V,{className:"text-right align-middle whitespace-nowrap",children:!R.canonical&&t.jsxs(t.Fragment,{children:[t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.dnsSetup"),onClick:()=>j(y===R.host?null:R.host),children:t.jsx(Nt,{className:"size-4"})}),t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.deleteDomain"),onClick:()=>h(R.host),disabled:_.isPending,children:t.jsx(Ot,{className:"size-4"})})]})})]}),y===R.host&&t.jsx(ye,{children:t.jsx(V,{colSpan:3,className:"bg-muted/10",children:t.jsx(ns,{records:R.dns??[],t:n})})})]},`${R.host}-${$e}`))})]}),e[37]=_.isPending,e[38]=y,e[39]=a,e[40]=s,e[41]=m,e[42]=n,e[43]=M):M=e[43];let U;e[44]!==n?(U=n("mainPanelTabs.hostingTab.addDomainTitle"),e[44]=n,e[45]=U):U=e[45];let Z;e[46]!==U?(Z=t.jsx(Ht,{children:t.jsx(Mt,{children:U})}),e[46]=U,e[47]=Z):Z=e[47];let ee;e[48]!==n?(ee=n("mainPanelTabs.hostingTab.colHost"),e[48]=n,e[49]=ee):ee=e[49];let ie;e[50]!==ee?(ie=t.jsx(ht,{htmlFor:"domain-host",children:ee}),e[50]=ee,e[51]=ie):ie=e[51];let K;e[52]!==n?(K=n("mainPanelTabs.hostingTab.domainHostPlaceholder"),e[52]=n,e[53]=K):K=e[53];let J;e[54]===Symbol.for("react.memo_cache_sentinel")?(J=R=>g(R.target.value),e[54]=J):J=e[54];let te;e[55]!==N||e[56]!==C.isPending||e[57]!==K?(te=t.jsx(lt,{id:"domain-host",placeholder:K,value:N,onChange:J,className:"font-mono text-xs",disabled:C.isPending}),e[55]=N,e[56]=C.isPending,e[57]=K,e[58]=te):te=e[58];let W;e[59]!==ie||e[60]!==te?(W=t.jsxs("div",{className:"flex flex-col gap-2",children:[ie,te]}),e[59]=ie,e[60]=te,e[61]=W):W=e[61];let E;e[62]!==N||e[63]!==X||e[64]!==n?(E=N.trim()&&t.jsx(ns,{records:X,t:n}),e[62]=N,e[63]=X,e[64]=n,e[65]=E):E=e[65];let k;e[66]!==W||e[67]!==E?(k=t.jsxs("div",{className:"flex flex-col gap-4",children:[W,E]}),e[66]=W,e[67]=E,e[68]=k):k=e[68];let F;e[69]===Symbol.for("react.memo_cache_sentinel")?(F=()=>d(!1),e[69]=F):F=e[69];const Q=C.isPending;let Y;e[70]!==n?(Y=n("mainPanelTabs.hostingTab.cancel"),e[70]=n,e[71]=Y):Y=e[71];let D;e[72]!==C.isPending||e[73]!==Y?(D=t.jsx(ce,{variant:"outline",type:"button",onClick:F,disabled:Q,children:Y}),e[72]=C.isPending,e[73]=Y,e[74]=D):D=e[74];let O;e[75]!==N||e[76]!==C.isPending?(O=C.isPending||!N.trim(),e[75]=N,e[76]=C.isPending,e[77]=O):O=e[77];let ze;e[78]!==C.isPending||e[79]!==n?(ze=C.isPending?n("mainPanelTabs.hostingTab.saving"):n("mainPanelTabs.hostingTab.save"),e[78]=C.isPending,e[79]=n,e[80]=ze):ze=e[80];let fe;e[81]!==q||e[82]!==O||e[83]!==ze?(fe=t.jsx(ce,{type:"button",onClick:q,disabled:O,children:ze}),e[81]=q,e[82]=O,e[83]=ze,e[84]=fe):fe=e[84];let Ne;e[85]!==D||e[86]!==fe?(Ne=t.jsxs(Wt,{children:[D,fe]}),e[85]=D,e[86]=fe,e[87]=Ne):Ne=e[87];let he;e[88]!==Z||e[89]!==k||e[90]!==Ne?(he=t.jsxs(Kt,{className:"sm:max-w-md",children:[Z,k,Ne]}),e[88]=Z,e[89]=k,e[90]=Ne,e[91]=he):he=e[91];let ue;e[92]!==v||e[93]!==he?(ue=t.jsx(Qt,{open:v,onOpenChange:d,children:he}),e[92]=v,e[93]=he,e[94]=ue):ue=e[94];const Le=T!=null;let Se;e[95]===Symbol.for("react.memo_cache_sentinel")?(Se=R=>{R||h(null)},e[95]=Se):Se=e[95];let Ce;e[96]!==n?(Ce=n("mainPanelTabs.hostingTab.confirmDeleteDomainTitle"),e[96]=n,e[97]=Ce):Ce=e[97];let Fe;e[98]!==Ce?(Fe=t.jsx(Ct,{children:Ce}),e[98]=Ce,e[99]=Fe):Fe=e[99];const Re=T??"";let ge;e[100]!==n||e[101]!==Re?(ge=n("mainPanelTabs.hostingTab.confirmDeleteDomainDescription",{host:Re}),e[100]=n,e[101]=Re,e[102]=ge):ge=e[102];let xe;e[103]!==ge?(xe=t.jsx(Dt,{children:ge}),e[103]=ge,e[104]=xe):xe=e[104];let De;e[105]!==Fe||e[106]!==xe?(De=t.jsxs(wt,{children:[Fe,xe]}),e[105]=Fe,e[106]=xe,e[107]=De):De=e[107];const Xe=_.isPending;let be;e[108]!==n?(be=n("mainPanelTabs.hostingTab.cancel"),e[108]=n,e[109]=be):be=e[109];let pe;e[110]!==_.isPending||e[111]!==be?(pe=t.jsx($t,{disabled:Xe,children:be}),e[110]=_.isPending,e[111]=be,e[112]=pe):pe=e[112];let Te;e[113]!==_||e[114]!==T?(Te=R=>{R.preventDefault(),T&&_.mutate(T)},e[113]=_,e[114]=T,e[115]=Te):Te=e[115];const Ae=_.isPending;let je;e[116]!==n?(je=n("mainPanelTabs.hostingTab.deleteDomain"),e[116]=n,e[117]=je):je=e[117];let we;e[118]!==_.isPending||e[119]!==Te||e[120]!==je?(we=t.jsx(zt,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:Te,disabled:Ae,children:je}),e[118]=_.isPending,e[119]=Te,e[120]=je,e[121]=we):we=e[121];let qe;e[122]!==pe||e[123]!==we?(qe=t.jsxs(Lt,{children:[pe,we]}),e[122]=pe,e[123]=we,e[124]=qe):qe=e[124];let Pe;e[125]!==De||e[126]!==qe?(Pe=t.jsxs(_t,{children:[De,qe]}),e[125]=De,e[126]=qe,e[127]=Pe):Pe=e[127];let _e;e[128]!==Le||e[129]!==Pe?(_e=t.jsx(kt,{open:Le,onOpenChange:Se,children:Pe}),e[128]=Le,e[129]=Pe,e[130]=_e):_e=e[130];let ke;return e[131]!==ve||e[132]!==a.length||e[133]!==se||e[134]!==M||e[135]!==ue||e[136]!==_e?(ke=t.jsxs(yt,{title:se,count:re,action:ve,children:[M,ue,_e]}),e[131]=ve,e[132]=a.length,e[133]=se,e[134]=M,e[135]=ue,e[136]=_e,e[137]=ke):ke=e[137],ke}function Is(r){return me.error(mt(r))}function Us(r){return me.error(mt(r))}function Yl(r){const e=Ee.c(118),{virtualMcpId:o}=r,l=ct(),{org:i}=as(),a=bs(o),c=ps(a),m=!!c,s=c?`/api/${i.slug}/hosting/${encodeURIComponent(c)}`:"";let n;e[0]!==s?(n=()=>ft(`${s}/deployments`),e[0]=s,e[1]=n):n=e[1];const u=dt({queryKey:Ue.hostingDeployments(i.slug,c??""),queryFn:n,enabled:m,retry:!1,staleTime:3e4});let v;e[2]!==s?(v=()=>ft(`${s}/env`),e[2]=s,e[3]=v):v=e[3];const d=dt({queryKey:Ue.hostingEnv(i.slug,c??""),queryFn:v,enabled:m,retry:!1,staleTime:3e4});let N;e[4]!==s?(N=()=>ft(`${s}/secrets`),e[4]=s,e[5]=N):N=e[5];const g=dt({queryKey:Ue.hostingSecrets(i.slug,c??""),queryFn:N,enabled:m,retry:!1,staleTime:3e4});let T;e[6]!==s?(T=()=>ft(`${s}/redirects`),e[6]=s,e[7]=T):T=e[7];const h=dt({queryKey:Ue.hostingRedirects(i.slug,c??""),queryFn:T,enabled:m,retry:!1,staleTime:3e4});let y;e[8]!==s?(y=()=>ft(`${s}/domains`),e[8]=s,e[9]=y):y=e[9];const j=dt({queryKey:Ue.hostingDomains(i.slug,c??""),queryFn:y,enabled:m,retry:!1,staleTime:3e4});if(!c){let E;e[10]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(At,{className:"size-5"}),e[10]=E):E=e[10];let k;e[11]!==l?(k=l("mainPanelTabs.hostingTab.noSiteTitle"),e[11]=l,e[12]=k):k=e[12];let F;e[13]!==l?(F=l("mainPanelTabs.hostingTab.noSiteDescription"),e[13]=l,e[14]=F):F=e[14];let Q;return e[15]!==k||e[16]!==F?(Q=t.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:t.jsx(Pt,{icon:E,title:k,description:F})}),e[15]=k,e[16]=F,e[17]=Q):Q=e[17],Q}if(qt(u.error)&&qt(d.error)&&qt(h.error)){let E;e[18]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(At,{className:"size-5"}),e[18]=E):E=e[18];let k;e[19]!==l?(k=l("mainPanelTabs.hostingTab.notConnectedTitle"),e[19]=l,e[20]=k):k=e[20];let F;e[21]!==l?(F=l("mainPanelTabs.hostingTab.notConnectedDescription"),e[21]=l,e[22]=F):F=e[22];let Q;return e[23]!==k||e[24]!==F?(Q=t.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:t.jsx(Pt,{icon:E,title:k,description:F})}),e[23]=k,e[24]=F,e[25]=Q):Q=e[25],Q}let p,S,$,z,C,x,P,L;if(e[26]!==u.data||e[27]!==j.data||e[28]!==d.data||e[29]!==h.data||e[30]!==g.data){S=Tt(u.data,"items");let E;e[39]!==d.data?(E=Tt(d.data,"vars"),e[39]=d.data,e[40]=E):E=e[40],C=E;let k;e[41]!==d.data?(k=Tt(d.data,"codeVars"),e[41]=d.data,e[42]=k):k=e[42],p=k;let F;e[43]!==g.data?(F=Tt(g.data,"secrets"),e[43]=g.data,e[44]=F):F=e[44],P=F;let Q;e[45]!==h.data?(Q=Tt(h.data,"items"),e[45]=h.data,e[46]=Q):Q=e[46],x=Q;const Y=j.data;let D;e[47]!==Y?.items?(D=Y?.items??[],e[47]=Y?.items,e[48]=D):D=e[48],z=D;let O;e[49]!==Y?.dnsTemplate?(O=Y?.dnsTemplate??[],e[49]=Y?.dnsTemplate,e[50]=O):O=e[50],$=O,L=Jt(S.find(Js)?.framework),e[26]=u.data,e[27]=j.data,e[28]=d.data,e[29]=h.data,e[30]=g.data,e[31]=p,e[32]=S,e[33]=$,e[34]=z,e[35]=C,e[36]=x,e[37]=P,e[38]=L}else p=e[31],S=e[32],$=e[33],z=e[34],C=e[35],x=e[36],P=e[37],L=e[38];const _=L,b="h-full min-h-0 overflow-y-auto",B="mx-auto flex max-w-4xl flex-col gap-6 p-6",A="flex items-start justify-between gap-4",q="flex flex-col gap-1";let f;e[51]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(At,{className:"size-[18px] text-muted-foreground"}),e[51]=f):f=e[51];let X;e[52]!==l?(X=l("mainPanelTabs.hostingTab.title"),e[52]=l,e[53]=X):X=e[53];let G;e[54]!==X?(G=t.jsx("h2",{className:"text-base font-semibold text-foreground",children:X}),e[54]=X,e[55]=G):G=e[55];let le;e[56]!==_?(le=_&&t.jsx(de,{variant:"secondary",children:_}),e[56]=_,e[57]=le):le=e[57];let ae;e[58]!==G||e[59]!==le?(ae=t.jsxs("div",{className:"flex items-center gap-2",children:[f,G,le]}),e[58]=G,e[59]=le,e[60]=ae):ae=e[60];const ve="text-sm text-muted-foreground",se=l("mainPanelTabs.hostingTab.subtitle",{site:c});let re;e[61]!==se?(re=t.jsx("p",{className:ve,children:se}),e[61]=se,e[62]=re):re=e[62];let M;e[63]!==ae||e[64]!==re?(M=t.jsxs("div",{className:q,children:[ae,re]}),e[63]=ae,e[64]=re,e[65]=M):M=e[65];let U;e[66]!==s||e[67]!==i.slug||e[68]!==c?(U=t.jsx(ys,{base:s,orgSlug:i.slug,site:c}),e[66]=s,e[67]=i.slug,e[68]=c,e[69]=U):U=e[69];let Z;e[70]!==M||e[71]!==U?(Z=t.jsxs("div",{className:A,children:[M,U]}),e[70]=M,e[71]=U,e[72]=Z):Z=e[72];let ee;e[73]!==s||e[74]!==S||e[75]!==u.error||e[76]!==u.isLoading||e[77]!==m||e[78]!==i.slug||e[79]!==c?(ee=t.jsx(ws,{base:s,orgSlug:i.slug,site:c,enabled:m,deployments:S,isLoading:u.isLoading,error:u.error}),e[73]=s,e[74]=S,e[75]=u.error,e[76]=u.isLoading,e[77]=m,e[78]=i.slug,e[79]=c,e[80]=ee):ee=e[80];let ie;e[81]!==s||e[82]!==p||e[83]!==d.error||e[84]!==d.isLoading||e[85]!==C||e[86]!==i.slug||e[87]!==c?(ie=t.jsx(Ls,{base:s,orgSlug:i.slug,site:c,envVars:C,codeVars:p,isLoading:d.isLoading,error:d.error}),e[81]=s,e[82]=p,e[83]=d.error,e[84]=d.isLoading,e[85]=C,e[86]=i.slug,e[87]=c,e[88]=ie):ie=e[88];let K;e[89]!==s||e[90]!==i.slug||e[91]!==P||e[92]!==g.error||e[93]!==g.isLoading||e[94]!==c?(K=t.jsx(Es,{base:s,orgSlug:i.slug,site:c,secrets:P,isLoading:g.isLoading,error:g.error}),e[89]=s,e[90]=i.slug,e[91]=P,e[92]=g.error,e[93]=g.isLoading,e[94]=c,e[95]=K):K=e[95];let J;e[96]!==s||e[97]!==$||e[98]!==z||e[99]!==j.error||e[100]!==j.isLoading||e[101]!==i.slug||e[102]!==c?(J=t.jsx(Qs,{base:s,orgSlug:i.slug,site:c,domains:z,dnsTemplate:$,isLoading:j.isLoading,error:j.error}),e[96]=s,e[97]=$,e[98]=z,e[99]=j.error,e[100]=j.isLoading,e[101]=i.slug,e[102]=c,e[103]=J):J=e[103];let te;e[104]!==s||e[105]!==i.slug||e[106]!==x||e[107]!==h.error||e[108]!==h.isLoading||e[109]!==c?(te=t.jsx(Os,{base:s,orgSlug:i.slug,site:c,redirects:x,isLoading:h.isLoading,error:h.error}),e[104]=s,e[105]=i.slug,e[106]=x,e[107]=h.error,e[108]=h.isLoading,e[109]=c,e[110]=te):te=e[110];let W;return e[111]!==Z||e[112]!==ee||e[113]!==ie||e[114]!==K||e[115]!==J||e[116]!==te?(W=t.jsx("div",{className:b,children:t.jsxs("div",{className:B,children:[Z,ee,ie,K,J,te]})}),e[111]=Z,e[112]=ee,e[113]=ie,e[114]=K,e[115]=J,e[116]=te,e[117]=W):W=e[117],W}function Js(r){return r.framework}export{Yl as HostingTab};
|
|
1
|
+
import{c as Ee,b as ct,H as as,o as dt,K as Ue,j as t,p as St,r as ne,e as at,B as ce,Y as Rt,t as me}from"./index-DYOslw5Q.js";import{i as os}from"./AlertCircle-D9ruOTll.js";import{t as rs}from"./ChevronDown-Bbw5EPde.js";import{i as cs}from"./ChevronRight-tjdYmgMU.js";import{s as is}from"./Stars02-C13c8s2f.js";import{a as ms}from"./Copy01-DSb-jNps.js";import{aX as ds,aY as Ut,aq as fs,ax as hs,aK as us,aZ as gs,v as At}from"./agent-icon-DtPy5BOM.js";import{i as Nt}from"./Globe01-CG5k46z2.js";import{n as es}from"./LinkExternal01-BoEtmXN6.js";import{s as Vt}from"./Plus-BmEJZgvj.js";import{l as Bt}from"./UserSquare-DpnVyAcN.js";import{s as Ot}from"./Trash01-D6D8Si9-.js";import{i as xs}from"./Zap-k5BPVmw8.js";import{B as de}from"./badge-BGLxBEab.js";import{I as lt}from"./input-D6L-RGRl.js";import{L as ht}from"./label-Gnh2CI8N.js";import{c as Ct,d as Dt,b as wt,f as $t,g as zt,e as Lt,a as _t,A as kt}from"./alert-dialog-CXRYD7aV.js";import{a as Ht,b as Mt,c as Wt,d as Kt,e as Qt}from"./dialog-Dj-xdSDO.js";import{S as Yt,a as Xt,b as Zt,c as Gt,d as jt}from"./select-Da9AG8Rq.js";import{c as tt,e as ot,a as ye,d as I,b as st,T as V}from"./table-DqB4exg1.js";import{E as Pt}from"./empty-state-GMZSrtLl.js";import{a as bs}from"./use-virtual-mcp-CsyLzuFI.js";import{r as ps}from"./index-CvxaZPo3.js";import"./Tool01-Cb3TWMVF.js";import"./ArrowUp-IHvMe877.js";import"./ArrowLeft-Cy2wtHjp.js";import"./Tool02-BsQeYqfO.js";import"./XCircle-BUE5dbkT.js";import"./TrendUp01-B7XaqaFq.js";import"./ZapSquare-CnjOplZY.js";import"./ZoomOut-DNYRpGPR.js";import"./Users03-C5_CkqFZ.js";import"./CheckCircle-DixvvXRD.js";import"./Check-CQfeFG0J.js";import"./ChevronSelectorVertical-B4Cvz__S.js";import"./ChevronUp-C1XvYJfE.js";import"./DotsVertical-CI2gmyko.js";import"./CreditCard01-BIiFCQ9F.js";import"./Download01-D-8foRIc.js";import"./Settings02-BnXnky7g.js";import"./Eye-W4rwkQod.js";import"./FilterLines-BQjtHXf3.js";import"./Share07-DFfisNQu.js";import"./GitBranch01-IBdYNZpQ.js";import"./Globe04-Cpd4FTh9.js";import"./SwitchHorizontal01-y0UkSoQd.js";import"./HardDrive-Dv0xaiIp.js";import"./Image01-CdbCiwl_.js";import"./Key01-qRuP-y6n.js";import"./LockUnlocked01-C-NC7nce.js";import"./LogOut01-OdlfriP6.js";import"./Monitor01-C7fqdG0G.js";import"./Sun-th_JVwGQ.js";import"./Package-DaZUmOo6.js";import"./Palette-DB3A9DRA.js";import"./Play-1v7tfvf5.js";import"./SearchLg-BzXCBCB7.js";import"./SearchMd-D_1cxfW2.js";import"./Shield01-QdmwV08k.js";import"./Stars01-DwWfuZpa.js";import"./Upload01-B5EcOFoA.js";import"./User01-UWqtuaJ1.js";import"./Users01-BNVtip1D.js";import"./XClose-Dw9C8IS-.js";import"./use-mcp-client-Ce3cfHbK.js";import"./constants-dLUUoWH7.js";import"./auth-Cvz6-6jE.js";import"./chat-context-CLMgqExR.js";import"./use-panel-navigate-DlT-5qzN.js";import"./use-destination-route-BVcGigft.js";import"./thread-route-BycCvjGF.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./hooks-C66yn5wp.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-EZGaJkSr.js";import"./task-board-DR8FTPNy.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-D3DFy95w.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-BMclxq3p.js";import"./use-organization-settings-cgMmvYyU.js";import"./automation-runs-DdeGywzL.js";import"./useInfiniteQuery-CWy6_EvT.js";import"./use-infinite-scroll-wTVDLwdt.js";import"./use-connection-BNx0jAMu.js";import"./empty-state-Cmh4O3Bf.js";import"./use-members-32jU1kMZ.js";import"./use-org-auth-client-BUE6zZ8l.js";import"./use-automations-DPRGvkjo.js";import"./useSuspenseInfiniteQuery-BNn8QDf2.js";import"./avatar-CYo7q3VJ.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-ByAMMrM3.js";import"./markdown-CxLjyonQ.js";import"./monaco-editor-BbJQVKJI.js";import"./spinner-aKyVW8uE.js";import"./editor-DFiYS9Mx.js";import"./types-B_dO6YrH.js";import"./shell-layout-Bi6zvURF.js";import"./required-auth-layout-CpMF_AWS.js";import"./use-org-sso-esXD-2bN.js";import"./integration-icon-DAy0CCoS.js";import"./use-navigate-to-agent-C9f76ihW.js";import"./chart-DOy4LkLY.js";import"./index-B-W0HK2G.js";import"./AreaChart-BUzAG-sY.js";import"./form-DmDzWCLu.js";import"./file-type-icon-4epoDao8.js";import"./drawer-ogyN5q_L.js";import"./collection-search-BxDEVMuN.js";import"./tabs--rIfh7U4.js";import"./toggle-group-CeyxRJzP.js";import"./super-agent-icon-PtmR11_R.js";import"./self-tool-result-_t4OeQip.js";import"./extract-connection-data-CFjodDOw.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-DM88ZEQe.js";import"./authenticate-and-persist-oauth-Coxv7Vgr.js";import"./mcp-oauth-CB5aGa3N.js";import"./track-BenJIghR.js";import"./popover-BktzUeKH.js";import"./toolbar-CEaUbMBR.js";import"./github-repo-picker-DShJABm7.js";import"./use-mcp-tools-WIUmxDJn.js";import"./agent-capabilities-B52k7xCe.js";import"./connection-card-BiQLvfag.js";import"./use-registry-connections-BQz0A_uq.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-B_aqpcss.js";import"./connection-form-helpers-DQWFVV9n.js";import"./collection-tabs-DrZLYcAN.js";import"./select-model-Dl-JD0uN.js";import"./checkbox-CuJCy_Vf.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-0gqlHPg-.js";import"./dropdown-menu-CF4GgpKK.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BI85ENEg.js";import"./skill-preview-C4qvx_-G.js";import"./use-file-configs-BBiX_rW7.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-DA4ngFfM.js";import"./scroll-area-BfiNt3Gu.js";import"./search-input-Zbyq9Vp4.js";import"./use-mcp-auth-status-DiAuPZ9T.js";import"./switch-tH1yEGPj.js";import"./use-secrets-DFz4U8Qv.js";import"./config-WuJBof9E.js";import"./command-Bj6a9l8j.js";import"./index-BtI0C6KC.js";import"./get-initials-D-f_fDFw.js";import"./breadcrumb-CN3dLk0-.js";import"./use-tags-DFsaqCAq.js";import"./automation-list-row-619aCxg1.js";import"./site-error--i37Vnuw.js";import"./use-org-repo-syncs-Bj3YOdNR.js";import"./cards-DqLJKsZM.js";function It(r,e){return r.name===e.name&&(r.scope??"runtime")===e.scope}function Tt(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 Jt(r){return r==="deco-deno"?"Deco Deno":r==="deco-tanstack"?"Deco TanStack":r??null}function Ts(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 ts(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"}),i=[["year",31536e3],["month",2592e3],["day",86400],["hour",3600],["minute",60]];for(const[a,c]of i)if(Math.abs(o)>=c)return l.format(-Math.round(o/c),a);return l.format(-o,"second")}function js(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.floor(e/60),l=Math.round(e%60);return`${o}m ${l}s`}function qt(r){const e=r instanceof Error?r.message.toLowerCase():"";return e.includes("unauthorized")||e.includes("401")}function mt(r){return r instanceof Error?r.message:String(r)}async function ft(r){const e=await fetch(r),o=await e.json().catch(()=>({}));if(!e.ok){const l=o&&typeof o=="object"&&"error"in o?String(o.error):`request failed (${e.status})`;throw new Error(l)}return o}async function rt(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}),i=await l.json().catch(()=>({}));if(!l.ok){const a=i&&typeof i=="object"&&"error"in i?String(i.error):`request failed (${l.status})`;throw new Error(a)}return i}function yt(r){const e=Ee.c(15),{title:o,count:l,action:i,children:a}=r;let c;e[0]!==o?(c=t.jsx("h3",{className:"text-sm font-medium text-foreground",children:o}),e[0]=o,e[1]=c):c=e[1];let m;e[2]!==l?(m=typeof l=="number"&&l>0&&t.jsx(de,{variant:"secondary",className:"tabular-nums",children:l}),e[2]=l,e[3]=m):m=e[3];let s;e[4]!==i?(s=i&&t.jsx("div",{className:"ml-auto",children:i}),e[4]=i,e[5]=s):s=e[5];let n;e[6]!==c||e[7]!==m||e[8]!==s?(n=t.jsxs("header",{className:"flex items-center gap-2 px-4 py-3 border-b border-border",children:[c,m,s]}),e[6]=c,e[7]=m,e[8]=s,e[9]=n):n=e[9];let u;e[10]!==a?(u=t.jsx("div",{className:"p-2",children:a}),e[10]=a,e[11]=u):u=e[11];let v;return e[12]!==n||e[13]!==u?(v=t.jsxs("section",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[n,u]}),e[12]=n,e[13]=u,e[14]=v):v=e[14],v}function vt(r){const e=Ee.c(3),{cols:o}=r;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[0,1,2],e[0]=l):l=e[0];let i;return e[1]!==o?(i=t.jsx("div",{className:"flex flex-col gap-2 p-2",children:l.map(a=>t.jsx("div",{className:"flex gap-3",children:Array.from({length:o}).map(Ps)},a))}),e[1]=o,e[2]=i):i=e[2],i}function Ps(r,e){return t.jsx(Rt,{className:"h-4 flex-1"},e)}function Ye(r){const e=Ee.c(2),{children:o}=r;let l;return e[0]!==o?(l=t.jsx("div",{className:"px-3 py-6 text-sm text-muted-foreground",children:o}),e[0]=o,e[1]=l):l=e[1],l}function ys(r){const e=Ee.c(54),{base:o,orgSlug:l,site:i}=r,a=ct(),c=St(),[m,s]=ne.useState(!1);let n;e[0]!==o?(n=()=>rt(`${o}/deploy`,"POST",{mode:"current"}),e[0]=o,e[1]=n):n=e[1];let u;e[2]!==l||e[3]!==c||e[4]!==i||e[5]!==a?(u=()=>{c.invalidateQueries({queryKey:Ue.hostingDeployments(l,i)}),c.invalidateQueries({queryKey:Ue.hostingDeploymentHistory(l,i)}),me.success(a("mainPanelTabs.hostingTab.toastDeployQueued")),s(!1)},e[2]=l,e[3]=c,e[4]=i,e[5]=a,e[6]=u):u=e[6];let v;e[7]!==n||e[8]!==u?(v={mutationFn:n,onSuccess:u,onError:vs},e[7]=n,e[8]=u,e[9]=v):v=e[9];const d=at(v);let N;e[10]===Symbol.for("react.memo_cache_sentinel")?(N=()=>s(!0),e[10]=N):N=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Bt,{className:"size-4"}),e[11]=g):g=e[11];let T;e[12]!==d.isPending||e[13]!==a?(T=d.isPending?a("mainPanelTabs.hostingTab.deploying"):a("mainPanelTabs.hostingTab.deploy"),e[12]=d.isPending,e[13]=a,e[14]=T):T=e[14];let h;e[15]!==d.isPending||e[16]!==T?(h=t.jsxs(ce,{size:"sm",onClick:N,disabled:d.isPending,children:[g,T]}),e[15]=d.isPending,e[16]=T,e[17]=h):h=e[17];let y;e[18]!==a?(y=a("mainPanelTabs.hostingTab.deployConfirmTitle"),e[18]=a,e[19]=y):y=e[19];let j;e[20]!==y?(j=t.jsx(Ct,{children:y}),e[20]=y,e[21]=j):j=e[21];let w;e[22]!==a?(w=a("mainPanelTabs.hostingTab.deployConfirmDescription"),e[22]=a,e[23]=w):w=e[23];let p;e[24]!==w?(p=t.jsx(Dt,{children:w}),e[24]=w,e[25]=p):p=e[25];let S;e[26]!==p||e[27]!==j?(S=t.jsxs(wt,{children:[j,p]}),e[26]=p,e[27]=j,e[28]=S):S=e[28];const $=d.isPending;let z;e[29]!==a?(z=a("mainPanelTabs.hostingTab.cancel"),e[29]=a,e[30]=z):z=e[30];let C;e[31]!==d.isPending||e[32]!==z?(C=t.jsx($t,{disabled:$,children:z}),e[31]=d.isPending,e[32]=z,e[33]=C):C=e[33];let x;e[34]!==d?(x=f=>{f.preventDefault(),d.mutate()},e[34]=d,e[35]=x):x=e[35];const P=d.isPending;let L;e[36]!==a?(L=a("mainPanelTabs.hostingTab.deploy"),e[36]=a,e[37]=L):L=e[37];let _;e[38]!==d.isPending||e[39]!==x||e[40]!==L?(_=t.jsx(zt,{onClick:x,disabled:P,children:L}),e[38]=d.isPending,e[39]=x,e[40]=L,e[41]=_):_=e[41];let b;e[42]!==C||e[43]!==_?(b=t.jsxs(Lt,{children:[C,_]}),e[42]=C,e[43]=_,e[44]=b):b=e[44];let B;e[45]!==S||e[46]!==b?(B=t.jsxs(_t,{children:[S,b]}),e[45]=S,e[46]=b,e[47]=B):B=e[47];let A;e[48]!==m||e[49]!==B?(A=t.jsx(kt,{open:m,onOpenChange:s,children:B}),e[48]=m,e[49]=B,e[50]=A):A=e[50];let q;return e[51]!==A||e[52]!==h?(q=t.jsxs(t.Fragment,{children:[h,A]}),e[51]=A,e[52]=h,e[53]=q):q=e[53],q}function vs(r){return me.error(mt(r))}function Ns(r,e){const o=(r??"").toLowerCase();return o.includes("rollback")?t.jsxs(de,{variant:"warning",children:[t.jsx(us,{className:"size-3"}),e("mainPanelTabs.hostingTab.actionRollback")]}):o.includes("redeploy")?t.jsxs(de,{variant:"secondary",children:[t.jsx(gs,{className:"size-3"}),e("mainPanelTabs.hostingTab.actionRedeploy")]}):t.jsxs(de,{variant:"secondary",children:[t.jsx(Bt,{className:"size-3"}),e("mainPanelTabs.hostingTab.actionDeploy")]})}function Ss(r,e,o){const l=(r??"").toLowerCase();return l==="build"?t.jsxs(de,{variant:"secondary",children:[t.jsx(Ut,{className:"size-3"}),o("mainPanelTabs.hostingTab.typeBuild")]}):l==="fast-deploy"?t.jsxs(de,{variant:"secondary",children:[t.jsx(xs,{className:"size-3"}),o("mainPanelTabs.hostingTab.typeFastDeploy")]}):l==="deploy"?t.jsxs(de,{variant:"secondary",children:[t.jsx(Bt,{className:"size-3"}),o("mainPanelTabs.hostingTab.typeDeploy")]}):Ns(e,o)}function Cs(r,e){const o=(r??"").toLowerCase();return o==="success"?t.jsx(de,{variant:"success",children:e("mainPanelTabs.hostingTab.outcomeSuccess")}):o==="failure"?t.jsx(de,{variant:"destructive",children:e("mainPanelTabs.hostingTab.outcomeFailure")}):o==="pending"?t.jsxs(de,{variant:"secondary",children:[t.jsx(is,{className:"size-3"}),e("mainPanelTabs.hostingTab.outcomePending")]}):null}function Ds(r){const e=Ee.c(35),{base:o,orgSlug:l,site:i,target:a,onOpenChange:c}=r,m=ct(),s=a!=null,n=a?.commit??"",u=a?.env??"";let v;e[0]!==n||e[1]!==u||e[2]!==l||e[3]!==i?(v=Ue.hostingBuildLogs(l,i,n,u),e[0]=n,e[1]=u,e[2]=l,e[3]=i,e[4]=v):v=e[4];let d;e[5]!==o||e[6]!==n||e[7]!==u?(d=()=>ft(`${o}/deployments/logs?commit=${encodeURIComponent(n)}&env=${encodeURIComponent(u)}`),e[5]=o,e[6]=n,e[7]=u,e[8]=d):d=e[8];const N=s&&!!n;let g;e[9]!==v||e[10]!==d||e[11]!==N?(g={queryKey:v,queryFn:d,enabled:N,retry:!1,staleTime:0,gcTime:0,refetchOnMount:"always"},e[9]=v,e[10]=d,e[11]=N,e[12]=g):g=e[12];const T=dt(g),h=T.data;let y;e[13]!==m?(y=m("mainPanelTabs.hostingTab.buildLogsTitle"),e[13]=m,e[14]=y):y=e[14];let j;e[15]!==y?(j=t.jsx(Ht,{children:t.jsx(Mt,{children:y})}),e[15]=y,e[16]=j):j=e[16];let w;e[17]!==n||e[18]!==m?(w=m("mainPanelTabs.hostingTab.buildLogsCommit",{commit:n.slice(0,7)}),e[17]=n,e[18]=m,e[19]=w):w=e[19];let p;e[20]!==w?(p=t.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:w}),e[20]=w,e[21]=p):p=e[21];let S;e[22]!==h||e[23]!==T.error||e[24]!==T.isLoading||e[25]!==m?(S=qt(T.error)?t.jsx(Pt,{icon:t.jsx(At,{className:"size-5"}),title:m("mainPanelTabs.hostingTab.notConnectedTitle"),description:m("mainPanelTabs.hostingTab.notConnectedDescription")}):T.isLoading?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(Rt,{className:"h-4 w-full"}),t.jsx(Rt,{className:"h-4 w-full"}),t.jsx(Rt,{className:"h-4 w-2/3"})]}):T.error?t.jsx(Ye,{children:m("mainPanelTabs.hostingTab.buildLogsError")}):h&&h.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(os,{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:h.reason??m("mainPanelTabs.hostingTab.buildLogsNotWiredDescription")})]}):h?.text?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("pre",{className:"max-h-[52vh] overflow-auto rounded-lg border border-border bg-muted/40 p-3 font-mono text-[11px] leading-relaxed text-foreground/80 whitespace-pre-wrap break-words",children:h.text}),h.truncated&&t.jsx("p",{className:"text-xs text-warning",children:m("mainPanelTabs.hostingTab.buildLogsTruncated")}),h.url&&t.jsxs("a",{href:h.url,target:"_blank",rel:"noreferrer",className:"inline-flex w-fit items-center gap-1.5 text-xs text-primary hover:underline",children:[t.jsx(es,{className:"size-3.5"}),m("mainPanelTabs.hostingTab.buildLogsOpenFull")]})]}):h?.url?t.jsxs("a",{href:h.url,target:"_blank",rel:"noreferrer",className:"inline-flex w-fit items-center gap-1.5 text-sm text-primary hover:underline",children:[t.jsx(es,{className:"size-4"}),m("mainPanelTabs.hostingTab.buildLogsOpenFull")]}):t.jsx(Ye,{children:m("mainPanelTabs.hostingTab.buildLogsEmpty")}),e[22]=h,e[23]=T.error,e[24]=T.isLoading,e[25]=m,e[26]=S):S=e[26];let $;e[27]!==j||e[28]!==p||e[29]!==S?($=t.jsxs(Kt,{className:"sm:max-w-2xl",children:[j,p,S]}),e[27]=j,e[28]=p,e[29]=S,e[30]=$):$=e[30];let z;return e[31]!==c||e[32]!==s||e[33]!==$?(z=t.jsx(Qt,{open:s,onOpenChange:c,children:$}),e[31]=c,e[32]=s,e[33]=$,e[34]=z):z=e[34],z}function ws(r){const e=Ee.c(52),{base:o,orgSlug:l,site:i,enabled:a,deployments:c,isLoading:m,error:s}=r,n=ct(),[u,v]=ne.useState(null),[d,N]=ne.useState(null);let g;e[0]!==l||e[1]!==i?(g=Ue.hostingDeploymentHistory(l,i),e[0]=l,e[1]=i,e[2]=g):g=e[2];let T;e[3]!==o?(T=()=>ft(`${o}/deployments/history?limit=50`),e[3]=o,e[4]=T):T=e[4];let h;e[5]!==a||e[6]!==g||e[7]!==T?(h={queryKey:g,queryFn:T,enabled:a,retry:!1,staleTime:3e4},e[5]=a,e[6]=g,e[7]=T,e[8]=h):h=e[8];const y=dt(h);let j,w,p,S,$;if(e[9]!==c||e[10]!==s||e[11]!==u||e[12]!==y.data||e[13]!==y.error||e[14]!==y.isLoading||e[15]!==m||e[16]!==n){const L=Tt(y.data,"items"),_=c.find(zs)?.commitSha??c.find($s)?.commitSha??null;let b;e[22]===Symbol.for("react.memo_cache_sentinel")?(b=(f,X)=>{f&&N({commit:f,env:X??"production"})},e[22]=b):b=e[22];const B=b;let A;e[23]!==n?(A=n("mainPanelTabs.hostingTab.deployments"),e[23]=n,e[24]=A):A=e[24];let q;e[25]!==c||e[26]!==s||e[27]!==u||e[28]!==m||e[29]!==n?(q=m?t.jsx(vt,{cols:5}):s?t.jsx(Ye,{children:n("mainPanelTabs.hostingTab.deploymentsError")}):c.length===0?t.jsx(Ye,{children:n("mainPanelTabs.hostingTab.noDeployments")}):t.jsxs(tt,{children:[t.jsx(ot,{children:t.jsxs(ye,{children:[t.jsx(I,{children:n("mainPanelTabs.hostingTab.colCommit")}),t.jsx(I,{children:n("mainPanelTabs.hostingTab.colStatus")}),t.jsx(I,{children:n("mainPanelTabs.hostingTab.colFramework")}),t.jsx(I,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDuration")}),t.jsx(I,{className:"text-right",children:n("mainPanelTabs.hostingTab.colUpdated")}),t.jsx(I,{className:"w-[1%]"})]})}),t.jsx(st,{children:c.map(f=>{const X=!!f.buildMessage,G=u===f.id;return t.jsxs(ne.Fragment,{children:[t.jsxs(ye,{children:[t.jsx(V,{className:"align-middle",children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[X?t.jsx("button",{type:"button",onClick:()=>v(G?null:f.id),"aria-label":n("mainPanelTabs.hostingTab.showBuildMessage"),className:"text-muted-foreground hover:text-foreground",children:G?t.jsx(rs,{className:"size-4"}):t.jsx(cs,{className:"size-4"})}):t.jsx(ds,{className:"size-4 text-muted-foreground/60"}),t.jsx("span",{className:"font-mono text-xs",children:f.shortCommit??f.commitSha?.slice(0,7)??"—"}),f.production===!0&&t.jsx(de,{variant:"outline",children:n("mainPanelTabs.hostingTab.production")})]})}),t.jsx(V,{className:"align-middle",children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(de,{variant:Ts(f.phase),children:f.phase??"—"}),f.up===!0&&t.jsx(de,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),t.jsx(V,{className:"align-middle text-xs text-muted-foreground",children:Jt(f.framework)??"—"}),t.jsx(V,{className:"text-right align-middle font-mono text-xs text-muted-foreground tabular-nums",children:js(f.durationMs)}),t.jsx(V,{className:"text-right align-middle text-xs text-muted-foreground whitespace-nowrap",children:ts(f.finishedAt??f.startedAt??f.createdAt)}),t.jsx(V,{className:"text-right align-middle",children:t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.buildLogs"),onClick:()=>B(f.commitSha,f.env),disabled:!f.commitSha,children:t.jsx(Ut,{className:"size-4"})})})]}),X&&G&&t.jsx(ye,{children:t.jsx(V,{colSpan:6,className:"bg-muted/10",children:t.jsx("p",{className:"whitespace-pre-wrap break-words px-2 py-1 font-mono text-xs text-muted-foreground",children:f.buildMessage})})})]},f.id)})})]}),e[25]=c,e[26]=s,e[27]=u,e[28]=m,e[29]=n,e[30]=q):q=e[30],e[31]!==c.length||e[32]!==q||e[33]!==A?($=t.jsx(yt,{title:A,count:c.length,children:q}),e[31]=c.length,e[32]=q,e[33]=A,e[34]=$):$=e[34],j=yt,e[35]!==n?(w=n("mainPanelTabs.hostingTab.deployHistory"),e[35]=n,e[36]=w):w=e[36],p=L.length,S=y.isLoading?t.jsx(vt,{cols:4}):y.error?t.jsx(Ye,{children:n("mainPanelTabs.hostingTab.deployHistoryError")}):L.length===0?t.jsx(Pt,{icon:t.jsx(Bt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDeployHistory")}):t.jsxs(tt,{children:[t.jsx(ot,{children:t.jsxs(ye,{children:[t.jsx(I,{children:n("mainPanelTabs.hostingTab.colAction")}),t.jsx(I,{children:n("mainPanelTabs.hostingTab.colCommit")}),t.jsx(I,{children:n("mainPanelTabs.hostingTab.colFramework")}),t.jsx(I,{children:n("mainPanelTabs.hostingTab.colActor")}),t.jsx(I,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDate")}),t.jsx(I,{className:"w-[1%]"})]})}),t.jsx(st,{children:L.map(f=>{const X=!!_&&f.commitSha===_;return t.jsxs(ye,{children:[t.jsx(V,{className:"align-middle",children:t.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[Ss(f.type,f.action,n),Cs(f.outcome,n)]})}),t.jsx(V,{className:"align-middle",children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("span",{className:"font-mono text-xs",children:f.commitSha?.slice(0,7)??"—"}),X&&t.jsx(de,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),t.jsx(V,{className:"align-middle text-xs text-muted-foreground",children:Jt(f.framework)??"—"}),t.jsx(V,{className:"align-middle text-xs text-muted-foreground",children:f.actor??"—"}),t.jsx(V,{className:"text-right align-middle text-xs text-muted-foreground whitespace-nowrap",children:t.jsxs("span",{className:"inline-flex items-center gap-1",children:[t.jsx(is,{className:"size-3"}),ts(f.createdAt)]})}),t.jsx(V,{className:"text-right align-middle",children:t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.buildLogs"),onClick:()=>B(f.commitSha,f.env),disabled:!f.commitSha,children:t.jsx(Ut,{className:"size-4"})})})]},f.id)})})]}),e[9]=c,e[10]=s,e[11]=u,e[12]=y.data,e[13]=y.error,e[14]=y.isLoading,e[15]=m,e[16]=n,e[17]=j,e[18]=w,e[19]=p,e[20]=S,e[21]=$}else j=e[17],w=e[18],p=e[19],S=e[20],$=e[21];let z;e[37]!==j||e[38]!==w||e[39]!==p||e[40]!==S?(z=t.jsx(j,{title:w,count:p,children:S}),e[37]=j,e[38]=w,e[39]=p,e[40]=S,e[41]=z):z=e[41];let C;e[42]===Symbol.for("react.memo_cache_sentinel")?(C=L=>{L||N(null)},e[42]=C):C=e[42];let x;e[43]!==o||e[44]!==d||e[45]!==l||e[46]!==i?(x=t.jsx(Ds,{base:o,orgSlug:l,site:i,target:d,onOpenChange:C}),e[43]=o,e[44]=d,e[45]=l,e[46]=i,e[47]=x):x=e[47];let P;return e[48]!==x||e[49]!==$||e[50]!==z?(P=t.jsxs(t.Fragment,{children:[$,z,x]}),e[48]=x,e[49]=$,e[50]=z,e[51]=P):P=e[51],P}function $s(r){return r.production===!0&&r.up}function zs(r){return r.up===!0}function Ls(r){const e=Ee.c(82),{base:o,orgSlug:l,site:i,envVars:a,codeVars:c,isLoading:m,error:s}=r,n=ct(),u=St(),[v,d]=ne.useState(""),[N,g]=ne.useState(""),[T,h]=ne.useState("runtime"),[y,j]=ne.useState(null),[w,p]=ne.useState(""),[S,$]=ne.useState(null);let z;e[0]!==o?(z=D=>rt(`${o}/env`,"PUT",{vars:D}),e[0]=o,e[1]=z):z=e[1];let C;e[2]!==l||e[3]!==u||e[4]!==i||e[5]!==n?(C=()=>{u.invalidateQueries({queryKey:Ue.hostingEnv(l,i)}),me.success(n("mainPanelTabs.hostingTab.toastEnvSaved"))},e[2]=l,e[3]=u,e[4]=i,e[5]=n,e[6]=C):C=e[6];let x;e[7]!==z||e[8]!==C?(x={mutationFn:z,onSuccess:C,onError:ks},e[7]=z,e[8]=C,e[9]=x):x=e[9];const P=at(x);let L;e[10]!==v||e[11]!==T||e[12]!==N||e[13]!==P||e[14]!==a||e[15]!==n?(L=()=>{const D=v.trim();if(!D){me.error(n("mainPanelTabs.hostingTab.errorEnvNameRequired"));return}if(a.some(O=>It(O,{name:D,scope:T}))){me.error(n("mainPanelTabs.hostingTab.errorEnvNameDuplicate"));return}P.mutate([...a,{name:D,value:N,scope:T}],{onSuccess:()=>{d(""),g(""),h("runtime")}})},e[10]=v,e[11]=T,e[12]=N,e[13]=P,e[14]=a,e[15]=n,e[16]=L):L=e[16];const _=L;let b;e[17]!==w||e[18]!==P||e[19]!==a?(b=D=>{P.mutate(a.map(O=>It(O,D)?{name:D.name,value:w,scope:D.scope}:O),{onSuccess:()=>j(null)})},e[17]=w,e[18]=P,e[19]=a,e[20]=b):b=e[20];const B=b;let A;e[21]!==S||e[22]!==P||e[23]!==a?(A=()=>{S&&P.mutate(a.filter(D=>!It(D,S)),{onSuccess:()=>$(null)})},e[21]=S,e[22]=P,e[23]=a,e[24]=A):A=e[24];const q=A;let f;e[25]!==n?(f=n("mainPanelTabs.hostingTab.env"),e[25]=n,e[26]=f):f=e[26];const X=a.length;let G;e[27]!==v||e[28]!==T||e[29]!==N||e[30]!==c||e[31]!==w||e[32]!==y?.name||e[33]!==y?.scope||e[34]!==P.isPending||e[35]!==a||e[36]!==s||e[37]!==_||e[38]!==B||e[39]!==m||e[40]!==n?(G=m?t.jsx(vt,{cols:2}):s?t.jsx(Ye,{children:n("mainPanelTabs.hostingTab.envError")}):t.jsxs("div",{className:"flex flex-col gap-2",children:[a.length===0?t.jsx(Ye,{children:n("mainPanelTabs.hostingTab.noEnv")}):t.jsxs(tt,{children:[t.jsx(ot,{children:t.jsxs(ye,{children:[t.jsx(I,{children:n("mainPanelTabs.hostingTab.colName")}),t.jsx(I,{children:n("mainPanelTabs.hostingTab.colValue")}),t.jsx(I,{className:"w-[1%]"})]})}),t.jsx(st,{children:a.map(D=>{const O=D.scope==="build"?"build":"runtime",ze=y?.name===D.name&&y?.scope===O;return t.jsxs(ye,{children:[t.jsx(V,{className:"font-mono text-xs align-middle",children:t.jsxs("span",{className:"inline-flex items-center gap-2",children:[D.name,t.jsx(de,{variant:O==="build"?"outline":"secondary",className:"font-sans text-[10px] capitalize",children:n(O==="build"?"mainPanelTabs.hostingTab.secretScopeBuild":"mainPanelTabs.hostingTab.secretScopeRuntime")})]})}),t.jsx(V,{className:"font-mono text-xs text-muted-foreground max-w-[360px] align-middle",children:ze?t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(lt,{value:w,onChange:fe=>p(fe.target.value),className:"h-7 font-mono text-xs"}),t.jsx(ce,{size:"xs",onClick:()=>B({name:D.name,scope:O}),disabled:P.isPending,children:n("mainPanelTabs.hostingTab.save")}),t.jsx(ce,{size:"xs",variant:"ghost",onClick:()=>j(null),disabled:P.isPending,children:n("mainPanelTabs.hostingTab.cancel")})]}):t.jsx("button",{type:"button",onClick:()=>{j({name:D.name,scope:O}),p(D.value)},className:"block w-full truncate text-left hover:underline","aria-label":n("mainPanelTabs.hostingTab.editValue"),children:D.value})}),t.jsx(V,{className:"text-right align-middle",children:t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.deleteVariable"),onClick:()=>$({name:D.name,scope:O}),disabled:P.isPending,children:t.jsx(Ot,{className:"size-4"})})})]},`${D.name}:${O}`)})})]}),t.jsxs("div",{className:"flex items-center gap-2 px-2 py-1",children:[t.jsx(lt,{placeholder:n("mainPanelTabs.hostingTab.envNamePlaceholder"),value:v,onChange:D=>d(D.target.value),className:"h-8 flex-1 font-mono text-xs"}),t.jsx(lt,{placeholder:n("mainPanelTabs.hostingTab.envValuePlaceholder"),value:N,onChange:D=>g(D.target.value),className:"h-8 flex-1 font-mono text-xs"}),t.jsxs(Yt,{value:T,onValueChange:D=>h(D==="build"?"build":"runtime"),disabled:P.isPending,children:[t.jsx(Xt,{className:"h-8 w-[110px]",children:t.jsx(Zt,{})}),t.jsxs(Gt,{children:[t.jsx(jt,{value:"runtime",children:n("mainPanelTabs.hostingTab.secretScopeRuntime")}),t.jsx(jt,{value:"build",children:n("mainPanelTabs.hostingTab.secretScopeBuild")})]})]}),t.jsxs(ce,{size:"sm","aria-label":n("mainPanelTabs.hostingTab.addVariable"),onClick:_,disabled:P.isPending||!v.trim(),children:[t.jsx(Vt,{className:"size-4"}),n("mainPanelTabs.hostingTab.add")]})]}),c.length>0&&t.jsxs("div",{className:"mt-3 flex flex-col gap-1.5 border-t border-border pt-3",children:[t.jsx("p",{className:"px-2 text-xs text-muted-foreground",children:n("mainPanelTabs.hostingTab.codeVarsHint")}),t.jsx(tt,{children:t.jsx(st,{children:c.map(_s)})})]})]}),e[27]=v,e[28]=T,e[29]=N,e[30]=c,e[31]=w,e[32]=y?.name,e[33]=y?.scope,e[34]=P.isPending,e[35]=a,e[36]=s,e[37]=_,e[38]=B,e[39]=m,e[40]=n,e[41]=G):G=e[41];const le=S!=null;let ae;e[42]===Symbol.for("react.memo_cache_sentinel")?(ae=D=>{D||$(null)},e[42]=ae):ae=e[42];let ve;e[43]!==n?(ve=n("mainPanelTabs.hostingTab.confirmDeleteVariableTitle"),e[43]=n,e[44]=ve):ve=e[44];let se;e[45]!==ve?(se=t.jsx(Ct,{children:ve}),e[45]=ve,e[46]=se):se=e[46];const re=S?.name??"";let M;e[47]!==n||e[48]!==re?(M=n("mainPanelTabs.hostingTab.confirmDeleteVariableDescription",{name:re}),e[47]=n,e[48]=re,e[49]=M):M=e[49];let U;e[50]!==M?(U=t.jsx(Dt,{children:M}),e[50]=M,e[51]=U):U=e[51];let Z;e[52]!==se||e[53]!==U?(Z=t.jsxs(wt,{children:[se,U]}),e[52]=se,e[53]=U,e[54]=Z):Z=e[54];const ee=P.isPending;let ie;e[55]!==n?(ie=n("mainPanelTabs.hostingTab.cancel"),e[55]=n,e[56]=ie):ie=e[56];let K;e[57]!==P.isPending||e[58]!==ie?(K=t.jsx($t,{disabled:ee,children:ie}),e[57]=P.isPending,e[58]=ie,e[59]=K):K=e[59];let J;e[60]!==q?(J=D=>{D.preventDefault(),q()},e[60]=q,e[61]=J):J=e[61];const te=P.isPending;let W;e[62]!==n?(W=n("mainPanelTabs.hostingTab.deleteVariable"),e[62]=n,e[63]=W):W=e[63];let E;e[64]!==P.isPending||e[65]!==J||e[66]!==W?(E=t.jsx(zt,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:J,disabled:te,children:W}),e[64]=P.isPending,e[65]=J,e[66]=W,e[67]=E):E=e[67];let k;e[68]!==K||e[69]!==E?(k=t.jsxs(Lt,{children:[K,E]}),e[68]=K,e[69]=E,e[70]=k):k=e[70];let F;e[71]!==Z||e[72]!==k?(F=t.jsxs(_t,{children:[Z,k]}),e[71]=Z,e[72]=k,e[73]=F):F=e[73];let Q;e[74]!==le||e[75]!==F?(Q=t.jsx(kt,{open:le,onOpenChange:ae,children:F}),e[74]=le,e[75]=F,e[76]=Q):Q=e[76];let Y;return e[77]!==a.length||e[78]!==Q||e[79]!==f||e[80]!==G?(Y=t.jsxs(yt,{title:f,count:X,children:[G,Q]}),e[77]=a.length,e[78]=Q,e[79]=f,e[80]=G,e[81]=Y):Y=e[81],Y}function _s(r){return t.jsxs(ye,{children:[t.jsx(V,{className:"font-mono text-xs align-middle",children:r.name}),t.jsx(V,{className:"font-mono text-xs text-muted-foreground max-w-[360px] truncate align-middle",children:r.value})]},r.name)}function ks(r){return me.error(mt(r))}function Es(r){const e=Ee.c(176),{base:o,orgSlug:l,site:i,secrets:a,isLoading:c,error:m}=r,s=ct(),n=St(),[u,v]=ne.useState(!1),[d,N]=ne.useState(""),[g,T]=ne.useState(""),[h,y]=ne.useState("runtime"),[j,w]=ne.useState(null);let p;e[0]!==l||e[1]!==n||e[2]!==i?(p=()=>n.invalidateQueries({queryKey:Ue.hostingSecrets(l,i)}),e[0]=l,e[1]=n,e[2]=i,e[3]=p):p=e[3];const S=p;let $;e[4]!==o?($=oe=>rt(`${o}/secrets`,"PUT",oe),e[4]=o,e[5]=$):$=e[5];let z;e[6]!==S||e[7]!==s?(z=()=>{S(),me.success(s("mainPanelTabs.hostingTab.toastSecretSaved")),v(!1),N(""),T(""),y("runtime")},e[6]=S,e[7]=s,e[8]=z):z=e[8];let C;e[9]!==$||e[10]!==z?(C={mutationFn:$,onSuccess:z,onError:Rs},e[9]=$,e[10]=z,e[11]=C):C=e[11];const x=at(C);let P;e[12]!==o?(P=oe=>rt(`${o}/secrets/${encodeURIComponent(oe.name)}?scope=${oe.scope}`,"DELETE"),e[12]=o,e[13]=P):P=e[13];let L;e[14]!==S||e[15]!==s?(L=()=>{S(),me.success(s("mainPanelTabs.hostingTab.toastSecretDeleted")),w(null)},e[14]=S,e[15]=s,e[16]=L):L=e[16];let _;e[17]!==P||e[18]!==L?(_={mutationFn:P,onSuccess:L,onError:Fs},e[17]=P,e[18]=L,e[19]=_):_=e[19];const b=at(_);let B;e[20]!==d||e[21]!==h||e[22]!==g||e[23]!==x||e[24]!==s?(B=()=>{const oe=d.trim();if(!oe){me.error(s("mainPanelTabs.hostingTab.errorSecretNameRequired"));return}if(!g){me.error(s("mainPanelTabs.hostingTab.errorSecretValueRequired"));return}x.mutate({name:oe,value:g,scope:h})},e[20]=d,e[21]=h,e[22]=g,e[23]=x,e[24]=s,e[25]=B):B=e[25];const A=B;let q,f;e[26]===Symbol.for("react.memo_cache_sentinel")?(f=()=>v(!0),q=t.jsx(Vt,{className:"size-4"}),e[26]=q,e[27]=f):(q=e[26],f=e[27]);let X;e[28]!==s?(X=s("mainPanelTabs.hostingTab.addSecret"),e[28]=s,e[29]=X):X=e[29];let G;e[30]!==X?(G=t.jsxs(ce,{size:"sm",variant:"secondary",onClick:f,children:[q,X]}),e[30]=X,e[31]=G):G=e[31];const le=G;let ae;e[32]!==s?(ae=s("mainPanelTabs.hostingTab.secrets"),e[32]=s,e[33]=ae):ae=e[33];const ve=a.length;let se;e[34]!==b.isPending||e[35]!==m||e[36]!==c||e[37]!==a||e[38]!==s?(se=c?t.jsx(vt,{cols:2}):m?t.jsx(Ye,{children:s("mainPanelTabs.hostingTab.secretsError")}):a.length===0?t.jsx(Ye,{children:s("mainPanelTabs.hostingTab.noSecrets")}):t.jsxs(tt,{children:[t.jsx(ot,{children:t.jsxs(ye,{children:[t.jsx(I,{children:s("mainPanelTabs.hostingTab.colName")}),t.jsx(I,{children:s("mainPanelTabs.hostingTab.colValue")}),t.jsx(I,{className:"w-[1%]"})]})}),t.jsx(st,{children:a.map(oe=>{const We=oe.scope==="build"?"build":"runtime";return t.jsxs(ye,{children:[t.jsx(V,{className:"font-mono text-xs align-middle",children:t.jsxs("span",{className:"inline-flex items-center gap-2",children:[oe.name,t.jsx(de,{variant:We==="build"?"outline":"secondary",className:"font-sans text-[10px] capitalize",children:s(We==="build"?"mainPanelTabs.hostingTab.secretScopeBuild":"mainPanelTabs.hostingTab.secretScopeRuntime")}),oe.origin==="worker"&&t.jsx(de,{variant:"secondary",className:"font-sans text-[10px]",children:s("mainPanelTabs.hostingTab.secretOnWorker")})]})}),t.jsx(V,{className:"font-mono text-xs text-muted-foreground align-middle",children:s("mainPanelTabs.hostingTab.secretValueHidden")}),t.jsx(V,{className:"text-right align-middle",children:t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":s("mainPanelTabs.hostingTab.deleteSecret"),onClick:()=>w({name:oe.name,scope:We}),disabled:b.isPending,children:t.jsx(Ot,{className:"size-4"})})})]},`${oe.name}:${We}`)})})]}),e[34]=b.isPending,e[35]=m,e[36]=c,e[37]=a,e[38]=s,e[39]=se):se=e[39];let re;e[40]!==s?(re=s("mainPanelTabs.hostingTab.addSecretTitle"),e[40]=s,e[41]=re):re=e[41];let M;e[42]!==re?(M=t.jsx(Ht,{children:t.jsx(Mt,{children:re})}),e[42]=re,e[43]=M):M=e[43];let U;e[44]!==s?(U=s("mainPanelTabs.hostingTab.colName"),e[44]=s,e[45]=U):U=e[45];let Z;e[46]!==U?(Z=t.jsx(ht,{htmlFor:"secret-name",children:U}),e[46]=U,e[47]=Z):Z=e[47];let ee;e[48]!==s?(ee=s("mainPanelTabs.hostingTab.secretNamePlaceholder"),e[48]=s,e[49]=ee):ee=e[49];let ie;e[50]===Symbol.for("react.memo_cache_sentinel")?(ie=oe=>N(oe.target.value),e[50]=ie):ie=e[50];let K;e[51]!==d||e[52]!==x.isPending||e[53]!==ee?(K=t.jsx(lt,{id:"secret-name",placeholder:ee,value:d,onChange:ie,className:"font-mono text-xs",disabled:x.isPending}),e[51]=d,e[52]=x.isPending,e[53]=ee,e[54]=K):K=e[54];let J;e[55]!==Z||e[56]!==K?(J=t.jsxs("div",{className:"flex flex-col gap-2",children:[Z,K]}),e[55]=Z,e[56]=K,e[57]=J):J=e[57];let te;e[58]!==s?(te=s("mainPanelTabs.hostingTab.colValue"),e[58]=s,e[59]=te):te=e[59];let W;e[60]!==te?(W=t.jsx(ht,{htmlFor:"secret-value",children:te}),e[60]=te,e[61]=W):W=e[61];let E;e[62]!==s?(E=s("mainPanelTabs.hostingTab.secretValuePlaceholder"),e[62]=s,e[63]=E):E=e[63];let k;e[64]===Symbol.for("react.memo_cache_sentinel")?(k=oe=>T(oe.target.value),e[64]=k):k=e[64];let F;e[65]!==g||e[66]!==x.isPending||e[67]!==E?(F=t.jsx(lt,{id:"secret-value",type:"password",placeholder:E,value:g,onChange:k,className:"font-mono text-xs",disabled:x.isPending}),e[65]=g,e[66]=x.isPending,e[67]=E,e[68]=F):F=e[68];let Q;e[69]!==W||e[70]!==F?(Q=t.jsxs("div",{className:"flex flex-col gap-2",children:[W,F]}),e[69]=W,e[70]=F,e[71]=Q):Q=e[71];let Y;e[72]!==s?(Y=s("mainPanelTabs.hostingTab.secretScope"),e[72]=s,e[73]=Y):Y=e[73];let D;e[74]!==Y?(D=t.jsx(ht,{children:Y}),e[74]=Y,e[75]=D):D=e[75];let O;e[76]===Symbol.for("react.memo_cache_sentinel")?(O=oe=>y(oe==="build"?"build":"runtime"),e[76]=O):O=e[76];const ze=x.isPending;let fe;e[77]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx(Xt,{className:"w-full",children:t.jsx(Zt,{})}),e[77]=fe):fe=e[77];let Ne;e[78]!==s?(Ne=s("mainPanelTabs.hostingTab.secretScopeRuntime"),e[78]=s,e[79]=Ne):Ne=e[79];let he;e[80]!==Ne?(he=t.jsx(jt,{value:"runtime",children:Ne}),e[80]=Ne,e[81]=he):he=e[81];let ue;e[82]!==s?(ue=s("mainPanelTabs.hostingTab.secretScopeBuild"),e[82]=s,e[83]=ue):ue=e[83];let Le;e[84]!==ue?(Le=t.jsx(jt,{value:"build",children:ue}),e[84]=ue,e[85]=Le):Le=e[85];let Se;e[86]!==he||e[87]!==Le?(Se=t.jsxs(Gt,{children:[he,Le]}),e[86]=he,e[87]=Le,e[88]=Se):Se=e[88];let Ce;e[89]!==h||e[90]!==x.isPending||e[91]!==Se?(Ce=t.jsxs(Yt,{value:h,onValueChange:O,disabled:ze,children:[fe,Se]}),e[89]=h,e[90]=x.isPending,e[91]=Se,e[92]=Ce):Ce=e[92];let Fe;e[93]!==h||e[94]!==s?(Fe=s(h==="build"?"mainPanelTabs.hostingTab.secretScopeBuildHint":"mainPanelTabs.hostingTab.secretScopeRuntimeHint"),e[93]=h,e[94]=s,e[95]=Fe):Fe=e[95];let Re;e[96]!==Fe?(Re=t.jsx("p",{className:"text-xs text-muted-foreground",children:Fe}),e[96]=Fe,e[97]=Re):Re=e[97];let ge;e[98]!==D||e[99]!==Ce||e[100]!==Re?(ge=t.jsxs("div",{className:"flex flex-col gap-2",children:[D,Ce,Re]}),e[98]=D,e[99]=Ce,e[100]=Re,e[101]=ge):ge=e[101];let xe;e[102]!==J||e[103]!==Q||e[104]!==ge?(xe=t.jsxs("div",{className:"flex flex-col gap-4",children:[J,Q,ge]}),e[102]=J,e[103]=Q,e[104]=ge,e[105]=xe):xe=e[105];let De;e[106]===Symbol.for("react.memo_cache_sentinel")?(De=()=>v(!1),e[106]=De):De=e[106];const Xe=x.isPending;let be;e[107]!==s?(be=s("mainPanelTabs.hostingTab.cancel"),e[107]=s,e[108]=be):be=e[108];let pe;e[109]!==x.isPending||e[110]!==be?(pe=t.jsx(ce,{variant:"outline",type:"button",onClick:De,disabled:Xe,children:be}),e[109]=x.isPending,e[110]=be,e[111]=pe):pe=e[111];let Te;e[112]!==d||e[113]!==g||e[114]!==x.isPending?(Te=x.isPending||!d.trim()||!g,e[112]=d,e[113]=g,e[114]=x.isPending,e[115]=Te):Te=e[115];let Ae;e[116]!==x.isPending||e[117]!==s?(Ae=x.isPending?s("mainPanelTabs.hostingTab.saving"):s("mainPanelTabs.hostingTab.add"),e[116]=x.isPending,e[117]=s,e[118]=Ae):Ae=e[118];let je;e[119]!==A||e[120]!==Te||e[121]!==Ae?(je=t.jsx(ce,{type:"button",onClick:A,disabled:Te,children:Ae}),e[119]=A,e[120]=Te,e[121]=Ae,e[122]=je):je=e[122];let we;e[123]!==pe||e[124]!==je?(we=t.jsxs(Wt,{children:[pe,je]}),e[123]=pe,e[124]=je,e[125]=we):we=e[125];let qe;e[126]!==M||e[127]!==xe||e[128]!==we?(qe=t.jsxs(Kt,{className:"sm:max-w-md",children:[M,xe,we]}),e[126]=M,e[127]=xe,e[128]=we,e[129]=qe):qe=e[129];let Pe;e[130]!==u||e[131]!==qe?(Pe=t.jsx(Qt,{open:u,onOpenChange:v,children:qe}),e[130]=u,e[131]=qe,e[132]=Pe):Pe=e[132];const _e=j!=null;let ke;e[133]===Symbol.for("react.memo_cache_sentinel")?(ke=oe=>{oe||w(null)},e[133]=ke):ke=e[133];let R;e[134]!==s?(R=s("mainPanelTabs.hostingTab.confirmDeleteSecretTitle"),e[134]=s,e[135]=R):R=e[135];let $e;e[136]!==R?($e=t.jsx(Ct,{children:R}),e[136]=R,e[137]=$e):$e=e[137];const Ze=j?.name??"";let Ve;e[138]!==s||e[139]!==Ze?(Ve=s("mainPanelTabs.hostingTab.confirmDeleteSecretDescription",{name:Ze}),e[138]=s,e[139]=Ze,e[140]=Ve):Ve=e[140];let Be;e[141]!==Ve?(Be=t.jsx(Dt,{children:Ve}),e[141]=Ve,e[142]=Be):Be=e[142];let Ge;e[143]!==$e||e[144]!==Be?(Ge=t.jsxs(wt,{children:[$e,Be]}),e[143]=$e,e[144]=Be,e[145]=Ge):Ge=e[145];const ut=b.isPending;let Oe;e[146]!==s?(Oe=s("mainPanelTabs.hostingTab.cancel"),e[146]=s,e[147]=Oe):Oe=e[147];let He;e[148]!==b.isPending||e[149]!==Oe?(He=t.jsx($t,{disabled:ut,children:Oe}),e[148]=b.isPending,e[149]=Oe,e[150]=He):He=e[150];let et;e[151]!==b||e[152]!==j?(et=oe=>{oe.preventDefault(),j&&b.mutate(j)},e[151]=b,e[152]=j,e[153]=et):et=e[153];const nt=b.isPending;let Me;e[154]!==s?(Me=s("mainPanelTabs.hostingTab.deleteSecret"),e[154]=s,e[155]=Me):Me=e[155];let Ke;e[156]!==b.isPending||e[157]!==et||e[158]!==Me?(Ke=t.jsx(zt,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:et,disabled:nt,children:Me}),e[156]=b.isPending,e[157]=et,e[158]=Me,e[159]=Ke):Ke=e[159];let it;e[160]!==He||e[161]!==Ke?(it=t.jsxs(Lt,{children:[He,Ke]}),e[160]=He,e[161]=Ke,e[162]=it):it=e[162];let Qe;e[163]!==Ge||e[164]!==it?(Qe=t.jsxs(_t,{children:[Ge,it]}),e[163]=Ge,e[164]=it,e[165]=Qe):Qe=e[165];let Ie;e[166]!==_e||e[167]!==Qe?(Ie=t.jsx(kt,{open:_e,onOpenChange:ke,children:Qe}),e[166]=_e,e[167]=Qe,e[168]=Ie):Ie=e[168];let Je;return e[169]!==le||e[170]!==a.length||e[171]!==ae||e[172]!==se||e[173]!==Pe||e[174]!==Ie?(Je=t.jsxs(yt,{title:ae,count:ve,action:le,children:[se,Pe,Ie]}),e[169]=le,e[170]=a.length,e[171]=ae,e[172]=se,e[173]=Pe,e[174]=Ie,e[175]=Je):Je=e[175],Je}function Fs(r){return me.error(mt(r))}function Rs(r){return me.error(mt(r))}const As=["16.148.147.194","52.32.122.94","52.35.156.199"];function qs(r){return r.replace(/\.$/,"").split(".").filter(Boolean).length===2}function Vs(r){return qs(r)?"@":r}function ls(r){const e=Ee.c(9),{value:o,t:l}=r;let i;e[0]!==l?(i=l("mainPanelTabs.hostingTab.dnsCopy"),e[0]=l,e[1]=i):i=e[1];let a;e[2]!==l||e[3]!==o?(a=()=>{navigator.clipboard?.writeText(o),me.success(l("mainPanelTabs.hostingTab.dnsCopied"))},e[2]=l,e[3]=o,e[4]=a):a=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(ms,{className:"size-3.5"}),e[5]=c):c=e[5];let m;return e[6]!==i||e[7]!==a?(m=t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":i,onClick:a,children:c}),e[6]=i,e[7]=a,e[8]=m):m=e[8],m}function ss(r){const e=Ee.c(64),{from:o,source:l,t:i}=r;let a,c,m,s,n,u,v;if(e[0]!==o||e[1]!==l||e[2]!==i){const L=o.trim().replace(/\.$/,"");c=L?Vs(L):"@",a=l==="both",n="flex flex-col gap-3 rounded-md border bg-muted/30 p-3";let _;e[10]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(Nt,{className:"size-4 text-muted-foreground"}),e[10]=_):_=e[10];let b;e[11]!==i?(b=i("mainPanelTabs.hostingTab.dnsSetupTitle"),e[11]=i,e[12]=b):b=e[12];let B;e[13]!==b?(B=t.jsx("span",{className:"text-xs font-medium",children:b}),e[13]=b,e[14]=B):B=e[14];const A=a?"secondary":"outline";let q;e[15]!==a||e[16]!==i?(q=i(a?"mainPanelTabs.hostingTab.dnsActive":"mainPanelTabs.hostingTab.dnsAwaiting"),e[15]=a,e[16]=i,e[17]=q):q=e[17];let f;e[18]!==q||e[19]!==A?(f=t.jsx(de,{variant:A,className:"ml-auto",children:q}),e[18]=q,e[19]=A,e[20]=f):f=e[20],e[21]!==f||e[22]!==B?(u=t.jsxs("div",{className:"flex items-center gap-2",children:[_,B,f]}),e[21]=f,e[22]=B,e[23]=u):u=e[23],v=t.jsx("p",{className:"text-xs text-muted-foreground",children:i("mainPanelTabs.hostingTab.dnsRedirectIntent",{from:L||"—"})}),m="text-xs text-muted-foreground",s=i("mainPanelTabs.hostingTab.dnsSetupDescription",{host:L||"—"}),e[0]=o,e[1]=l,e[2]=i,e[3]=a,e[4]=c,e[5]=m,e[6]=s,e[7]=n,e[8]=u,e[9]=v}else a=e[3],c=e[4],m=e[5],s=e[6],n=e[7],u=e[8],v=e[9];let d;e[24]!==m||e[25]!==s?(d=t.jsx("p",{className:m,children:s}),e[24]=m,e[25]=s,e[26]=d):d=e[26];let N;e[27]!==a||e[28]!==i?(N=i(a?"mainPanelTabs.hostingTab.dnsActiveHint":"mainPanelTabs.hostingTab.dnsAwaitingHint"),e[27]=a,e[28]=i,e[29]=N):N=e[29];let g;e[30]!==N?(g=t.jsx("p",{className:"text-xs text-muted-foreground",children:N}),e[30]=N,e[31]=g):g=e[31];let T;e[32]!==i?(T=i("mainPanelTabs.hostingTab.dnsColType"),e[32]=i,e[33]=T):T=e[33];let h;e[34]!==T?(h=t.jsx(I,{children:T}),e[34]=T,e[35]=h):h=e[35];let y;e[36]!==i?(y=i("mainPanelTabs.hostingTab.dnsColName"),e[36]=i,e[37]=y):y=e[37];let j;e[38]!==y?(j=t.jsx(I,{children:y}),e[38]=y,e[39]=j):j=e[39];let w;e[40]!==i?(w=i("mainPanelTabs.hostingTab.dnsColValue"),e[40]=i,e[41]=w):w=e[41];let p;e[42]!==w?(p=t.jsx(I,{children:w}),e[42]=w,e[43]=p):p=e[43];let S;e[44]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(I,{className:"w-[1%]"}),e[44]=S):S=e[44];let $;e[45]!==h||e[46]!==j||e[47]!==p?($=t.jsx(ot,{children:t.jsxs(ye,{children:[h,j,p,S]})}),e[45]=h,e[46]=j,e[47]=p,e[48]=$):$=e[48];let z;e[49]!==c||e[50]!==i?(z=As.map(L=>t.jsxs(ye,{children:[t.jsx(V,{className:"font-mono text-xs align-middle",children:"A"}),t.jsx(V,{className:"font-mono text-xs align-middle",children:c}),t.jsx(V,{className:"font-mono text-xs align-middle",children:L}),t.jsx(V,{className:"text-right align-middle",children:t.jsx(ls,{value:L,t:i})})]},L)),e[49]=c,e[50]=i,e[51]=z):z=e[51];let C;e[52]!==z?(C=t.jsx(st,{children:z}),e[52]=z,e[53]=C):C=e[53];let x;e[54]!==$||e[55]!==C?(x=t.jsxs(tt,{children:[$,C]}),e[54]=$,e[55]=C,e[56]=x):x=e[56];let P;return e[57]!==x||e[58]!==n||e[59]!==u||e[60]!==v||e[61]!==d||e[62]!==g?(P=t.jsxs("div",{className:n,children:[u,v,d,g,x]}),e[57]=x,e[58]=n,e[59]=u,e[60]=v,e[61]=d,e[62]=g,e[63]=P):P=e[63],P}function Bs(r){const e=Ee.c(6),{type:o,t:l}=r,i=o==="permanent"?"secondary":"outline";let a;e[0]!==l||e[1]!==o?(a=l(o==="permanent"?"mainPanelTabs.hostingTab.permanent":"mainPanelTabs.hostingTab.temporary"),e[0]=l,e[1]=o,e[2]=a):a=e[2];let c;return e[3]!==i||e[4]!==a?(c=t.jsx(de,{variant:i,children:a}),e[3]=i,e[4]=a,e[5]=c):c=e[5],c}function Os(r){const e=Ee.c(180),{base:o,orgSlug:l,site:i,redirects:a,isLoading:c,error:m}=r,s=ct(),n=St(),[u,v]=ne.useState(!1),[d,N]=ne.useState(null),[g,T]=ne.useState(""),[h,y]=ne.useState(""),[j,w]=ne.useState("permanent"),[p,S]=ne.useState(null),[$,z]=ne.useState(null);let C;e[0]!==l||e[1]!==n||e[2]!==i?(C=()=>n.invalidateQueries({queryKey:Ue.hostingRedirects(l,i)}),e[0]=l,e[1]=n,e[2]=i,e[3]=C):C=e[3];const x=C;let P;e[4]!==o?(P=H=>rt(`${o}/redirects`,"PUT",H),e[4]=o,e[5]=P):P=e[5];let L;e[6]!==x||e[7]!==s?(L=()=>{x(),me.success(s("mainPanelTabs.hostingTab.toastRedirectSaved")),v(!1)},e[6]=x,e[7]=s,e[8]=L):L=e[8];let _;e[9]!==P||e[10]!==L?(_={mutationFn:P,onSuccess:L,onError:Ms},e[9]=P,e[10]=L,e[11]=_):_=e[11];const b=at(_);let B;e[12]!==o?(B=H=>rt(`${o}/redirects/${encodeURIComponent(H)}`,"DELETE"),e[12]=o,e[13]=B):B=e[13];let A;e[14]!==x||e[15]!==s?(A=()=>{x(),me.success(s("mainPanelTabs.hostingTab.toastRedirectDeleted")),S(null)},e[14]=x,e[15]=s,e[16]=A):A=e[16];let q;e[17]!==B||e[18]!==A?(q={mutationFn:B,onSuccess:A,onError:Hs},e[17]=B,e[18]=A,e[19]=q):q=e[19];const f=at(q);let X;e[20]===Symbol.for("react.memo_cache_sentinel")?(X=()=>{N(null),T(""),y(""),w("permanent"),v(!0)},e[20]=X):X=e[20];const G=X;let le;e[21]===Symbol.for("react.memo_cache_sentinel")?(le=H=>{N(H.from),T(H.from),y(H.to),w(H.type==="temporary"?"temporary":"permanent"),v(!0)},e[21]=le):le=e[21];const ae=le;let ve;e[22]!==g||e[23]!==h||e[24]!==j||e[25]!==b||e[26]!==s?(ve=()=>{const H=g.trim(),Ft=h.trim();if(!H||!Ft){me.error(s("mainPanelTabs.hostingTab.errorRedirectFieldsRequired"));return}b.mutate({from:H,to:Ft,type:j})},e[22]=g,e[23]=h,e[24]=j,e[25]=b,e[26]=s,e[27]=ve):ve=e[27];const se=ve;let re;e[28]===Symbol.for("react.memo_cache_sentinel")?(re=t.jsx(Vt,{className:"size-4"}),e[28]=re):re=e[28];let M;e[29]!==s?(M=s("mainPanelTabs.hostingTab.addRedirect"),e[29]=s,e[30]=M):M=e[30];let U;e[31]!==M?(U=t.jsxs(ce,{size:"sm",variant:"secondary",onClick:G,children:[re,M]}),e[31]=M,e[32]=U):U=e[32];const Z=U;let ee;e[33]!==s?(ee=s("mainPanelTabs.hostingTab.redirects"),e[33]=s,e[34]=ee):ee=e[34];const ie=a.length;let K;e[35]!==f.isPending||e[36]!==$||e[37]!==m||e[38]!==c||e[39]!==b.isPending||e[40]!==a||e[41]!==s?(K=c?t.jsx(vt,{cols:3}):m?t.jsx(Ye,{children:s("mainPanelTabs.hostingTab.redirectsError")}):a.length===0?t.jsx(Pt,{icon:t.jsx(fs,{className:"size-5"}),title:s("mainPanelTabs.hostingTab.noRedirects")}):t.jsxs(tt,{children:[t.jsx(ot,{children:t.jsxs(ye,{children:[t.jsx(I,{children:s("mainPanelTabs.hostingTab.colFrom")}),t.jsx(I,{children:s("mainPanelTabs.hostingTab.colTo")}),t.jsx(I,{children:s("mainPanelTabs.hostingTab.colType")}),t.jsx(I,{className:"w-[1%]"})]})}),t.jsx(st,{children:a.map((H,Ft)=>t.jsxs(ne.Fragment,{children:[t.jsxs(ye,{children:[t.jsx(V,{className:"font-mono text-xs align-middle",children:H.from}),t.jsx(V,{className:"font-mono text-xs text-muted-foreground max-w-[280px] truncate align-middle",children:H.to}),t.jsx(V,{className:"align-middle",children:t.jsx(Bs,{type:H.type,t:s})}),t.jsxs(V,{className:"text-right align-middle whitespace-nowrap",children:[t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":s("mainPanelTabs.hostingTab.dnsSetup"),onClick:()=>z($===H.from?null:H.from),children:t.jsx(Nt,{className:"size-4"})}),t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":s("mainPanelTabs.hostingTab.editRedirect"),onClick:()=>ae(H),disabled:b.isPending,children:t.jsx(hs,{className:"size-4"})}),t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":s("mainPanelTabs.hostingTab.deleteRedirect"),onClick:()=>S(H.from),disabled:f.isPending,children:t.jsx(Ot,{className:"size-4"})})]})]}),$===H.from&&t.jsx(ye,{children:t.jsx(V,{colSpan:4,className:"bg-muted/10",children:t.jsx(ss,{from:H.from,source:H.source,t:s})})})]},H.id??`${H.from}-${Ft}`))})]}),e[35]=f.isPending,e[36]=$,e[37]=m,e[38]=c,e[39]=b.isPending,e[40]=a,e[41]=s,e[42]=K):K=e[42];let J;e[43]!==d||e[44]!==s?(J=d!=null?s("mainPanelTabs.hostingTab.editRedirectTitle"):s("mainPanelTabs.hostingTab.addRedirectTitle"),e[43]=d,e[44]=s,e[45]=J):J=e[45];let te;e[46]!==J?(te=t.jsx(Ht,{children:t.jsx(Mt,{children:J})}),e[46]=J,e[47]=te):te=e[47];let W;e[48]!==s?(W=s("mainPanelTabs.hostingTab.colFrom"),e[48]=s,e[49]=W):W=e[49];let E;e[50]!==W?(E=t.jsx(ht,{htmlFor:"redirect-from",children:W}),e[50]=W,e[51]=E):E=e[51];let k;e[52]!==s?(k=s("mainPanelTabs.hostingTab.redirectFromPlaceholder"),e[52]=s,e[53]=k):k=e[53];let F;e[54]===Symbol.for("react.memo_cache_sentinel")?(F=H=>T(H.target.value),e[54]=F):F=e[54];const Q=d!=null||b.isPending;let Y;e[55]!==g||e[56]!==k||e[57]!==Q?(Y=t.jsx(lt,{id:"redirect-from",placeholder:k,value:g,onChange:F,className:"font-mono text-xs",disabled:Q}),e[55]=g,e[56]=k,e[57]=Q,e[58]=Y):Y=e[58];let D;e[59]!==E||e[60]!==Y?(D=t.jsxs("div",{className:"flex flex-col gap-2",children:[E,Y]}),e[59]=E,e[60]=Y,e[61]=D):D=e[61];let O;e[62]!==s?(O=s("mainPanelTabs.hostingTab.colTo"),e[62]=s,e[63]=O):O=e[63];let ze;e[64]!==O?(ze=t.jsx(ht,{htmlFor:"redirect-to",children:O}),e[64]=O,e[65]=ze):ze=e[65];let fe;e[66]!==s?(fe=s("mainPanelTabs.hostingTab.redirectToPlaceholder"),e[66]=s,e[67]=fe):fe=e[67];let Ne;e[68]===Symbol.for("react.memo_cache_sentinel")?(Ne=H=>y(H.target.value),e[68]=Ne):Ne=e[68];let he;e[69]!==h||e[70]!==b.isPending||e[71]!==fe?(he=t.jsx(lt,{id:"redirect-to",placeholder:fe,value:h,onChange:Ne,className:"font-mono text-xs",disabled:b.isPending}),e[69]=h,e[70]=b.isPending,e[71]=fe,e[72]=he):he=e[72];let ue;e[73]!==ze||e[74]!==he?(ue=t.jsxs("div",{className:"flex flex-col gap-2",children:[ze,he]}),e[73]=ze,e[74]=he,e[75]=ue):ue=e[75];let Le;e[76]!==s?(Le=s("mainPanelTabs.hostingTab.colType"),e[76]=s,e[77]=Le):Le=e[77];let Se;e[78]!==Le?(Se=t.jsx(ht,{children:Le}),e[78]=Le,e[79]=Se):Se=e[79];let Ce;e[80]===Symbol.for("react.memo_cache_sentinel")?(Ce=H=>w(H==="temporary"?"temporary":"permanent"),e[80]=Ce):Ce=e[80];const Fe=b.isPending;let Re;e[81]===Symbol.for("react.memo_cache_sentinel")?(Re=t.jsx(Xt,{className:"w-full",children:t.jsx(Zt,{})}),e[81]=Re):Re=e[81];let ge;e[82]!==s?(ge=s("mainPanelTabs.hostingTab.permanent"),e[82]=s,e[83]=ge):ge=e[83];let xe;e[84]!==ge?(xe=t.jsx(jt,{value:"permanent",children:ge}),e[84]=ge,e[85]=xe):xe=e[85];let De;e[86]!==s?(De=s("mainPanelTabs.hostingTab.temporary"),e[86]=s,e[87]=De):De=e[87];let Xe;e[88]!==De?(Xe=t.jsx(jt,{value:"temporary",children:De}),e[88]=De,e[89]=Xe):Xe=e[89];let be;e[90]!==xe||e[91]!==Xe?(be=t.jsxs(Gt,{children:[xe,Xe]}),e[90]=xe,e[91]=Xe,e[92]=be):be=e[92];let pe;e[93]!==j||e[94]!==b.isPending||e[95]!==be?(pe=t.jsxs(Yt,{value:j,onValueChange:Ce,disabled:Fe,children:[Re,be]}),e[93]=j,e[94]=b.isPending,e[95]=be,e[96]=pe):pe=e[96];let Te;e[97]!==Se||e[98]!==pe?(Te=t.jsxs("div",{className:"flex flex-col gap-2",children:[Se,pe]}),e[97]=Se,e[98]=pe,e[99]=Te):Te=e[99];let Ae;e[100]!==d||e[101]!==g||e[102]!==a||e[103]!==s?(Ae=g.trim()&&t.jsx(ss,{from:g,source:a.find(H=>H.from===d)?.source,t:s}),e[100]=d,e[101]=g,e[102]=a,e[103]=s,e[104]=Ae):Ae=e[104];let je;e[105]!==D||e[106]!==ue||e[107]!==Te||e[108]!==Ae?(je=t.jsxs("div",{className:"flex flex-col gap-4",children:[D,ue,Te,Ae]}),e[105]=D,e[106]=ue,e[107]=Te,e[108]=Ae,e[109]=je):je=e[109];let we;e[110]===Symbol.for("react.memo_cache_sentinel")?(we=()=>v(!1),e[110]=we):we=e[110];const qe=b.isPending;let Pe;e[111]!==s?(Pe=s("mainPanelTabs.hostingTab.cancel"),e[111]=s,e[112]=Pe):Pe=e[112];let _e;e[113]!==b.isPending||e[114]!==Pe?(_e=t.jsx(ce,{variant:"outline",type:"button",onClick:we,disabled:qe,children:Pe}),e[113]=b.isPending,e[114]=Pe,e[115]=_e):_e=e[115];let ke;e[116]!==g||e[117]!==h||e[118]!==b.isPending?(ke=b.isPending||!g.trim()||!h.trim(),e[116]=g,e[117]=h,e[118]=b.isPending,e[119]=ke):ke=e[119];let R;e[120]!==b.isPending||e[121]!==s?(R=b.isPending?s("mainPanelTabs.hostingTab.saving"):s("mainPanelTabs.hostingTab.save"),e[120]=b.isPending,e[121]=s,e[122]=R):R=e[122];let $e;e[123]!==se||e[124]!==ke||e[125]!==R?($e=t.jsx(ce,{type:"button",onClick:se,disabled:ke,children:R}),e[123]=se,e[124]=ke,e[125]=R,e[126]=$e):$e=e[126];let Ze;e[127]!==_e||e[128]!==$e?(Ze=t.jsxs(Wt,{children:[_e,$e]}),e[127]=_e,e[128]=$e,e[129]=Ze):Ze=e[129];let Ve;e[130]!==te||e[131]!==je||e[132]!==Ze?(Ve=t.jsxs(Kt,{className:"sm:max-w-md",children:[te,je,Ze]}),e[130]=te,e[131]=je,e[132]=Ze,e[133]=Ve):Ve=e[133];let Be;e[134]!==u||e[135]!==Ve?(Be=t.jsx(Qt,{open:u,onOpenChange:v,children:Ve}),e[134]=u,e[135]=Ve,e[136]=Be):Be=e[136];const Ge=p!=null;let ut;e[137]===Symbol.for("react.memo_cache_sentinel")?(ut=H=>{H||S(null)},e[137]=ut):ut=e[137];let Oe;e[138]!==s?(Oe=s("mainPanelTabs.hostingTab.confirmDeleteRedirectTitle"),e[138]=s,e[139]=Oe):Oe=e[139];let He;e[140]!==Oe?(He=t.jsx(Ct,{children:Oe}),e[140]=Oe,e[141]=He):He=e[141];const et=p??"";let nt;e[142]!==s||e[143]!==et?(nt=s("mainPanelTabs.hostingTab.confirmDeleteRedirectDescription",{from:et}),e[142]=s,e[143]=et,e[144]=nt):nt=e[144];let Me;e[145]!==nt?(Me=t.jsx(Dt,{children:nt}),e[145]=nt,e[146]=Me):Me=e[146];let Ke;e[147]!==He||e[148]!==Me?(Ke=t.jsxs(wt,{children:[He,Me]}),e[147]=He,e[148]=Me,e[149]=Ke):Ke=e[149];const it=f.isPending;let Qe;e[150]!==s?(Qe=s("mainPanelTabs.hostingTab.cancel"),e[150]=s,e[151]=Qe):Qe=e[151];let Ie;e[152]!==f.isPending||e[153]!==Qe?(Ie=t.jsx($t,{disabled:it,children:Qe}),e[152]=f.isPending,e[153]=Qe,e[154]=Ie):Ie=e[154];let Je;e[155]!==f||e[156]!==p?(Je=H=>{H.preventDefault(),p&&f.mutate(p)},e[155]=f,e[156]=p,e[157]=Je):Je=e[157];const oe=f.isPending;let We;e[158]!==s?(We=s("mainPanelTabs.hostingTab.deleteRedirect"),e[158]=s,e[159]=We):We=e[159];let gt;e[160]!==f.isPending||e[161]!==Je||e[162]!==We?(gt=t.jsx(zt,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:Je,disabled:oe,children:We}),e[160]=f.isPending,e[161]=Je,e[162]=We,e[163]=gt):gt=e[163];let xt;e[164]!==Ie||e[165]!==gt?(xt=t.jsxs(Lt,{children:[Ie,gt]}),e[164]=Ie,e[165]=gt,e[166]=xt):xt=e[166];let bt;e[167]!==Ke||e[168]!==xt?(bt=t.jsxs(_t,{children:[Ke,xt]}),e[167]=Ke,e[168]=xt,e[169]=bt):bt=e[169];let pt;e[170]!==Ge||e[171]!==bt?(pt=t.jsx(kt,{open:Ge,onOpenChange:ut,children:bt}),e[170]=Ge,e[171]=bt,e[172]=pt):pt=e[172];let Et;return e[173]!==Z||e[174]!==a.length||e[175]!==ee||e[176]!==K||e[177]!==Be||e[178]!==pt?(Et=t.jsxs(yt,{title:ee,count:ie,action:Z,children:[K,Be,pt]}),e[173]=Z,e[174]=a.length,e[175]=ee,e[176]=K,e[177]=Be,e[178]=pt,e[179]=Et):Et=e[179],Et}function Hs(r){return me.error(mt(r))}function Ms(r){return me.error(mt(r))}function ns(r){const e=Ee.c(35),{records:o,t:l}=r;if(o.length===0)return null;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Nt,{className:"size-4 text-muted-foreground"}),e[0]=i):i=e[0];let a;e[1]!==l?(a=l("mainPanelTabs.hostingTab.dnsSetupTitle"),e[1]=l,e[2]=a):a=e[2];let c;e[3]!==a?(c=t.jsxs("div",{className:"flex items-center gap-2",children:[i,t.jsx("span",{className:"text-xs font-medium",children:a})]}),e[3]=a,e[4]=c):c=e[4];let m;e[5]!==l?(m=l("mainPanelTabs.hostingTab.dnsColType"),e[5]=l,e[6]=m):m=e[6];let s;e[7]!==m?(s=t.jsx(I,{className:"w-14",children:m}),e[7]=m,e[8]=s):s=e[8];let n;e[9]!==l?(n=l("mainPanelTabs.hostingTab.dnsColName"),e[9]=l,e[10]=n):n=e[10];let u;e[11]!==n?(u=t.jsx(I,{children:n}),e[11]=n,e[12]=u):u=e[12];let v;e[13]!==l?(v=l("mainPanelTabs.hostingTab.dnsColValue"),e[13]=l,e[14]=v):v=e[14];let d;e[15]!==v?(d=t.jsx(I,{children:v}),e[15]=v,e[16]=d):d=e[16];let N;e[17]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(I,{className:"w-8"}),e[17]=N):N=e[17];let g;e[18]!==s||e[19]!==u||e[20]!==d?(g=t.jsx(ot,{children:t.jsxs(ye,{children:[s,u,d,N]})}),e[18]=s,e[19]=u,e[20]=d,e[21]=g):g=e[21];let T;if(e[22]!==o||e[23]!==l){let w;e[25]!==l?(w=p=>t.jsxs(ye,{children:[t.jsx(V,{className:"font-mono text-xs align-top",children:p.type}),t.jsx(V,{className:"break-all font-mono text-xs align-top",children:p.name}),t.jsx(V,{className:"break-all font-mono text-xs align-top",children:p.value}),t.jsx(V,{className:"text-right align-top",children:t.jsx(ls,{value:p.value,t:l})})]},`${p.type}-${p.name}-${p.value}`),e[25]=l,e[26]=w):w=e[26],T=o.map(w),e[22]=o,e[23]=l,e[24]=T}else T=e[24];let h;e[27]!==T?(h=t.jsx(st,{children:T}),e[27]=T,e[28]=h):h=e[28];let y;e[29]!==g||e[30]!==h?(y=t.jsxs(tt,{className:"w-full table-fixed",children:[g,h]}),e[29]=g,e[30]=h,e[31]=y):y=e[31];let j;return e[32]!==y||e[33]!==c?(j=t.jsxs("div",{className:"flex min-w-0 flex-col gap-3 rounded-md border bg-muted/30 p-3",children:[c,y]}),e[32]=y,e[33]=c,e[34]=j):j=e[34],j}function Ks(r){const e=Ee.c(10),{domain:o,t:l}=r,i=o.status??"pending";let a;e[0]!==i||e[1]!==l?(a=l(i==="active"?"mainPanelTabs.hostingTab.statusActive":i==="action-required"?"mainPanelTabs.hostingTab.statusActionRequired":"mainPanelTabs.hostingTab.statusPending"),e[0]=i,e[1]=l,e[2]=a):a=e[2];const c=a;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=i==="active"?"secondary":"outline";let u;return e[6]!==s||e[7]!==c||e[8]!==n?(u=t.jsx(de,{variant:n,title:s,children:c}),e[6]=s,e[7]=c,e[8]=n,e[9]=u):u=e[9],u}function Qs(r){const e=Ee.c(138),{base:o,orgSlug:l,site:i,domains:a,dnsTemplate:c,isLoading:m,error:s}=r,n=ct(),u=St(),[v,d]=ne.useState(!1),[N,g]=ne.useState(""),[T,h]=ne.useState(null),[y,j]=ne.useState(null);let w;e[0]!==l||e[1]!==u||e[2]!==i?(w=()=>u.invalidateQueries({queryKey:Ue.hostingDomains(l,i)}),e[0]=l,e[1]=u,e[2]=i,e[3]=w):w=e[3];const p=w;let S;e[4]!==o?(S=R=>rt(`${o}/domains`,"PUT",R),e[4]=o,e[5]=S):S=e[5];let $;e[6]!==p||e[7]!==n?($=()=>{p(),me.success(n("mainPanelTabs.hostingTab.toastDomainSaved")),d(!1)},e[6]=p,e[7]=n,e[8]=$):$=e[8];let z;e[9]!==S||e[10]!==$?(z={mutationFn:S,onSuccess:$,onError:Us},e[9]=S,e[10]=$,e[11]=z):z=e[11];const C=at(z);let x;e[12]!==o?(x=R=>rt(`${o}/domains/${encodeURIComponent(R)}`,"DELETE"),e[12]=o,e[13]=x):x=e[13];let P;e[14]!==p||e[15]!==n?(P=()=>{p(),me.success(n("mainPanelTabs.hostingTab.toastDomainDeleted")),h(null)},e[14]=p,e[15]=n,e[16]=P):P=e[16];let L;e[17]!==x||e[18]!==P?(L={mutationFn:x,onSuccess:P,onError:Is},e[17]=x,e[18]=P,e[19]=L):L=e[19];const _=at(L);let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{g(""),d(!0)},e[20]=b):b=e[20];const B=b;let A;e[21]!==N||e[22]!==C||e[23]!==n?(A=()=>{const R=N.trim().toLowerCase();if(!R){me.error(n("mainPanelTabs.hostingTab.errorDomainHostRequired"));return}C.mutate({host:R})},e[21]=N,e[22]=C,e[23]=n,e[24]=A):A=e[24];const q=A;let f;if(e[25]!==c||e[26]!==N){let R;e[28]!==N?(R=$e=>({...$e,name:N.trim().toLowerCase()||$e.name}),e[28]=N,e[29]=R):R=e[29],f=c.map(R),e[25]=c,e[26]=N,e[27]=f}else f=e[27];const X=f;let G;e[30]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx(Vt,{className:"size-4"}),e[30]=G):G=e[30];let le;e[31]!==n?(le=n("mainPanelTabs.hostingTab.addDomain"),e[31]=n,e[32]=le):le=e[32];let ae;e[33]!==le?(ae=t.jsxs(ce,{size:"sm",variant:"secondary",onClick:B,children:[G,le]}),e[33]=le,e[34]=ae):ae=e[34];const ve=ae;let se;e[35]!==n?(se=n("mainPanelTabs.hostingTab.domains"),e[35]=n,e[36]=se):se=e[36];const re=a.length;let M;e[37]!==_.isPending||e[38]!==y||e[39]!==a||e[40]!==s||e[41]!==m||e[42]!==n?(M=m?t.jsx(vt,{cols:3}):s?t.jsx(Ye,{children:n("mainPanelTabs.hostingTab.domainsError")}):a.length===0?t.jsx(Pt,{icon:t.jsx(Nt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDomains")}):t.jsxs(tt,{children:[t.jsx(ot,{children:t.jsxs(ye,{children:[t.jsx(I,{children:n("mainPanelTabs.hostingTab.colHost")}),t.jsx(I,{children:n("mainPanelTabs.hostingTab.colStatus")}),t.jsx(I,{className:"w-[1%]"})]})}),t.jsx(st,{children:a.map((R,$e)=>t.jsxs(ne.Fragment,{children:[t.jsxs(ye,{children:[t.jsxs(V,{className:"font-mono text-xs align-middle",children:[R.host,R.canonical&&t.jsx(de,{variant:"outline",className:"ml-2",children:n("mainPanelTabs.hostingTab.canonical")})]}),t.jsx(V,{className:"align-middle",children:t.jsx(Ks,{domain:R,t:n})}),t.jsx(V,{className:"text-right align-middle whitespace-nowrap",children:!R.canonical&&t.jsxs(t.Fragment,{children:[t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.dnsSetup"),onClick:()=>j(y===R.host?null:R.host),children:t.jsx(Nt,{className:"size-4"})}),t.jsx(ce,{size:"icon-sm",variant:"ghost","aria-label":n("mainPanelTabs.hostingTab.deleteDomain"),onClick:()=>h(R.host),disabled:_.isPending,children:t.jsx(Ot,{className:"size-4"})})]})})]}),y===R.host&&t.jsx(ye,{children:t.jsx(V,{colSpan:3,className:"bg-muted/10",children:t.jsx(ns,{records:R.dns??[],t:n})})})]},`${R.host}-${$e}`))})]}),e[37]=_.isPending,e[38]=y,e[39]=a,e[40]=s,e[41]=m,e[42]=n,e[43]=M):M=e[43];let U;e[44]!==n?(U=n("mainPanelTabs.hostingTab.addDomainTitle"),e[44]=n,e[45]=U):U=e[45];let Z;e[46]!==U?(Z=t.jsx(Ht,{children:t.jsx(Mt,{children:U})}),e[46]=U,e[47]=Z):Z=e[47];let ee;e[48]!==n?(ee=n("mainPanelTabs.hostingTab.colHost"),e[48]=n,e[49]=ee):ee=e[49];let ie;e[50]!==ee?(ie=t.jsx(ht,{htmlFor:"domain-host",children:ee}),e[50]=ee,e[51]=ie):ie=e[51];let K;e[52]!==n?(K=n("mainPanelTabs.hostingTab.domainHostPlaceholder"),e[52]=n,e[53]=K):K=e[53];let J;e[54]===Symbol.for("react.memo_cache_sentinel")?(J=R=>g(R.target.value),e[54]=J):J=e[54];let te;e[55]!==N||e[56]!==C.isPending||e[57]!==K?(te=t.jsx(lt,{id:"domain-host",placeholder:K,value:N,onChange:J,className:"font-mono text-xs",disabled:C.isPending}),e[55]=N,e[56]=C.isPending,e[57]=K,e[58]=te):te=e[58];let W;e[59]!==ie||e[60]!==te?(W=t.jsxs("div",{className:"flex flex-col gap-2",children:[ie,te]}),e[59]=ie,e[60]=te,e[61]=W):W=e[61];let E;e[62]!==N||e[63]!==X||e[64]!==n?(E=N.trim()&&t.jsx(ns,{records:X,t:n}),e[62]=N,e[63]=X,e[64]=n,e[65]=E):E=e[65];let k;e[66]!==W||e[67]!==E?(k=t.jsxs("div",{className:"flex flex-col gap-4",children:[W,E]}),e[66]=W,e[67]=E,e[68]=k):k=e[68];let F;e[69]===Symbol.for("react.memo_cache_sentinel")?(F=()=>d(!1),e[69]=F):F=e[69];const Q=C.isPending;let Y;e[70]!==n?(Y=n("mainPanelTabs.hostingTab.cancel"),e[70]=n,e[71]=Y):Y=e[71];let D;e[72]!==C.isPending||e[73]!==Y?(D=t.jsx(ce,{variant:"outline",type:"button",onClick:F,disabled:Q,children:Y}),e[72]=C.isPending,e[73]=Y,e[74]=D):D=e[74];let O;e[75]!==N||e[76]!==C.isPending?(O=C.isPending||!N.trim(),e[75]=N,e[76]=C.isPending,e[77]=O):O=e[77];let ze;e[78]!==C.isPending||e[79]!==n?(ze=C.isPending?n("mainPanelTabs.hostingTab.saving"):n("mainPanelTabs.hostingTab.save"),e[78]=C.isPending,e[79]=n,e[80]=ze):ze=e[80];let fe;e[81]!==q||e[82]!==O||e[83]!==ze?(fe=t.jsx(ce,{type:"button",onClick:q,disabled:O,children:ze}),e[81]=q,e[82]=O,e[83]=ze,e[84]=fe):fe=e[84];let Ne;e[85]!==D||e[86]!==fe?(Ne=t.jsxs(Wt,{children:[D,fe]}),e[85]=D,e[86]=fe,e[87]=Ne):Ne=e[87];let he;e[88]!==Z||e[89]!==k||e[90]!==Ne?(he=t.jsxs(Kt,{className:"sm:max-w-md",children:[Z,k,Ne]}),e[88]=Z,e[89]=k,e[90]=Ne,e[91]=he):he=e[91];let ue;e[92]!==v||e[93]!==he?(ue=t.jsx(Qt,{open:v,onOpenChange:d,children:he}),e[92]=v,e[93]=he,e[94]=ue):ue=e[94];const Le=T!=null;let Se;e[95]===Symbol.for("react.memo_cache_sentinel")?(Se=R=>{R||h(null)},e[95]=Se):Se=e[95];let Ce;e[96]!==n?(Ce=n("mainPanelTabs.hostingTab.confirmDeleteDomainTitle"),e[96]=n,e[97]=Ce):Ce=e[97];let Fe;e[98]!==Ce?(Fe=t.jsx(Ct,{children:Ce}),e[98]=Ce,e[99]=Fe):Fe=e[99];const Re=T??"";let ge;e[100]!==n||e[101]!==Re?(ge=n("mainPanelTabs.hostingTab.confirmDeleteDomainDescription",{host:Re}),e[100]=n,e[101]=Re,e[102]=ge):ge=e[102];let xe;e[103]!==ge?(xe=t.jsx(Dt,{children:ge}),e[103]=ge,e[104]=xe):xe=e[104];let De;e[105]!==Fe||e[106]!==xe?(De=t.jsxs(wt,{children:[Fe,xe]}),e[105]=Fe,e[106]=xe,e[107]=De):De=e[107];const Xe=_.isPending;let be;e[108]!==n?(be=n("mainPanelTabs.hostingTab.cancel"),e[108]=n,e[109]=be):be=e[109];let pe;e[110]!==_.isPending||e[111]!==be?(pe=t.jsx($t,{disabled:Xe,children:be}),e[110]=_.isPending,e[111]=be,e[112]=pe):pe=e[112];let Te;e[113]!==_||e[114]!==T?(Te=R=>{R.preventDefault(),T&&_.mutate(T)},e[113]=_,e[114]=T,e[115]=Te):Te=e[115];const Ae=_.isPending;let je;e[116]!==n?(je=n("mainPanelTabs.hostingTab.deleteDomain"),e[116]=n,e[117]=je):je=e[117];let we;e[118]!==_.isPending||e[119]!==Te||e[120]!==je?(we=t.jsx(zt,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:Te,disabled:Ae,children:je}),e[118]=_.isPending,e[119]=Te,e[120]=je,e[121]=we):we=e[121];let qe;e[122]!==pe||e[123]!==we?(qe=t.jsxs(Lt,{children:[pe,we]}),e[122]=pe,e[123]=we,e[124]=qe):qe=e[124];let Pe;e[125]!==De||e[126]!==qe?(Pe=t.jsxs(_t,{children:[De,qe]}),e[125]=De,e[126]=qe,e[127]=Pe):Pe=e[127];let _e;e[128]!==Le||e[129]!==Pe?(_e=t.jsx(kt,{open:Le,onOpenChange:Se,children:Pe}),e[128]=Le,e[129]=Pe,e[130]=_e):_e=e[130];let ke;return e[131]!==ve||e[132]!==a.length||e[133]!==se||e[134]!==M||e[135]!==ue||e[136]!==_e?(ke=t.jsxs(yt,{title:se,count:re,action:ve,children:[M,ue,_e]}),e[131]=ve,e[132]=a.length,e[133]=se,e[134]=M,e[135]=ue,e[136]=_e,e[137]=ke):ke=e[137],ke}function Is(r){return me.error(mt(r))}function Us(r){return me.error(mt(r))}function Yl(r){const e=Ee.c(118),{virtualMcpId:o}=r,l=ct(),{org:i}=as(),a=bs(o),c=ps(a),m=!!c,s=c?`/api/${i.slug}/hosting/${encodeURIComponent(c)}`:"";let n;e[0]!==s?(n=()=>ft(`${s}/deployments`),e[0]=s,e[1]=n):n=e[1];const u=dt({queryKey:Ue.hostingDeployments(i.slug,c??""),queryFn:n,enabled:m,retry:!1,staleTime:3e4});let v;e[2]!==s?(v=()=>ft(`${s}/env`),e[2]=s,e[3]=v):v=e[3];const d=dt({queryKey:Ue.hostingEnv(i.slug,c??""),queryFn:v,enabled:m,retry:!1,staleTime:3e4});let N;e[4]!==s?(N=()=>ft(`${s}/secrets`),e[4]=s,e[5]=N):N=e[5];const g=dt({queryKey:Ue.hostingSecrets(i.slug,c??""),queryFn:N,enabled:m,retry:!1,staleTime:3e4});let T;e[6]!==s?(T=()=>ft(`${s}/redirects`),e[6]=s,e[7]=T):T=e[7];const h=dt({queryKey:Ue.hostingRedirects(i.slug,c??""),queryFn:T,enabled:m,retry:!1,staleTime:3e4});let y;e[8]!==s?(y=()=>ft(`${s}/domains`),e[8]=s,e[9]=y):y=e[9];const j=dt({queryKey:Ue.hostingDomains(i.slug,c??""),queryFn:y,enabled:m,retry:!1,staleTime:3e4});if(!c){let E;e[10]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(At,{className:"size-5"}),e[10]=E):E=e[10];let k;e[11]!==l?(k=l("mainPanelTabs.hostingTab.noSiteTitle"),e[11]=l,e[12]=k):k=e[12];let F;e[13]!==l?(F=l("mainPanelTabs.hostingTab.noSiteDescription"),e[13]=l,e[14]=F):F=e[14];let Q;return e[15]!==k||e[16]!==F?(Q=t.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:t.jsx(Pt,{icon:E,title:k,description:F})}),e[15]=k,e[16]=F,e[17]=Q):Q=e[17],Q}if(qt(u.error)&&qt(d.error)&&qt(h.error)){let E;e[18]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(At,{className:"size-5"}),e[18]=E):E=e[18];let k;e[19]!==l?(k=l("mainPanelTabs.hostingTab.notConnectedTitle"),e[19]=l,e[20]=k):k=e[20];let F;e[21]!==l?(F=l("mainPanelTabs.hostingTab.notConnectedDescription"),e[21]=l,e[22]=F):F=e[22];let Q;return e[23]!==k||e[24]!==F?(Q=t.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:t.jsx(Pt,{icon:E,title:k,description:F})}),e[23]=k,e[24]=F,e[25]=Q):Q=e[25],Q}let p,S,$,z,C,x,P,L;if(e[26]!==u.data||e[27]!==j.data||e[28]!==d.data||e[29]!==h.data||e[30]!==g.data){S=Tt(u.data,"items");let E;e[39]!==d.data?(E=Tt(d.data,"vars"),e[39]=d.data,e[40]=E):E=e[40],C=E;let k;e[41]!==d.data?(k=Tt(d.data,"codeVars"),e[41]=d.data,e[42]=k):k=e[42],p=k;let F;e[43]!==g.data?(F=Tt(g.data,"secrets"),e[43]=g.data,e[44]=F):F=e[44],P=F;let Q;e[45]!==h.data?(Q=Tt(h.data,"items"),e[45]=h.data,e[46]=Q):Q=e[46],x=Q;const Y=j.data;let D;e[47]!==Y?.items?(D=Y?.items??[],e[47]=Y?.items,e[48]=D):D=e[48],z=D;let O;e[49]!==Y?.dnsTemplate?(O=Y?.dnsTemplate??[],e[49]=Y?.dnsTemplate,e[50]=O):O=e[50],$=O,L=Jt(S.find(Js)?.framework),e[26]=u.data,e[27]=j.data,e[28]=d.data,e[29]=h.data,e[30]=g.data,e[31]=p,e[32]=S,e[33]=$,e[34]=z,e[35]=C,e[36]=x,e[37]=P,e[38]=L}else p=e[31],S=e[32],$=e[33],z=e[34],C=e[35],x=e[36],P=e[37],L=e[38];const _=L,b="h-full min-h-0 overflow-y-auto",B="mx-auto flex max-w-4xl flex-col gap-6 p-6",A="flex items-start justify-between gap-4",q="flex flex-col gap-1";let f;e[51]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(At,{className:"size-[18px] text-muted-foreground"}),e[51]=f):f=e[51];let X;e[52]!==l?(X=l("mainPanelTabs.hostingTab.title"),e[52]=l,e[53]=X):X=e[53];let G;e[54]!==X?(G=t.jsx("h2",{className:"text-base font-semibold text-foreground",children:X}),e[54]=X,e[55]=G):G=e[55];let le;e[56]!==_?(le=_&&t.jsx(de,{variant:"secondary",children:_}),e[56]=_,e[57]=le):le=e[57];let ae;e[58]!==G||e[59]!==le?(ae=t.jsxs("div",{className:"flex items-center gap-2",children:[f,G,le]}),e[58]=G,e[59]=le,e[60]=ae):ae=e[60];const ve="text-sm text-muted-foreground",se=l("mainPanelTabs.hostingTab.subtitle",{site:c});let re;e[61]!==se?(re=t.jsx("p",{className:ve,children:se}),e[61]=se,e[62]=re):re=e[62];let M;e[63]!==ae||e[64]!==re?(M=t.jsxs("div",{className:q,children:[ae,re]}),e[63]=ae,e[64]=re,e[65]=M):M=e[65];let U;e[66]!==s||e[67]!==i.slug||e[68]!==c?(U=t.jsx(ys,{base:s,orgSlug:i.slug,site:c}),e[66]=s,e[67]=i.slug,e[68]=c,e[69]=U):U=e[69];let Z;e[70]!==M||e[71]!==U?(Z=t.jsxs("div",{className:A,children:[M,U]}),e[70]=M,e[71]=U,e[72]=Z):Z=e[72];let ee;e[73]!==s||e[74]!==S||e[75]!==u.error||e[76]!==u.isLoading||e[77]!==m||e[78]!==i.slug||e[79]!==c?(ee=t.jsx(ws,{base:s,orgSlug:i.slug,site:c,enabled:m,deployments:S,isLoading:u.isLoading,error:u.error}),e[73]=s,e[74]=S,e[75]=u.error,e[76]=u.isLoading,e[77]=m,e[78]=i.slug,e[79]=c,e[80]=ee):ee=e[80];let ie;e[81]!==s||e[82]!==p||e[83]!==d.error||e[84]!==d.isLoading||e[85]!==C||e[86]!==i.slug||e[87]!==c?(ie=t.jsx(Ls,{base:s,orgSlug:i.slug,site:c,envVars:C,codeVars:p,isLoading:d.isLoading,error:d.error}),e[81]=s,e[82]=p,e[83]=d.error,e[84]=d.isLoading,e[85]=C,e[86]=i.slug,e[87]=c,e[88]=ie):ie=e[88];let K;e[89]!==s||e[90]!==i.slug||e[91]!==P||e[92]!==g.error||e[93]!==g.isLoading||e[94]!==c?(K=t.jsx(Es,{base:s,orgSlug:i.slug,site:c,secrets:P,isLoading:g.isLoading,error:g.error}),e[89]=s,e[90]=i.slug,e[91]=P,e[92]=g.error,e[93]=g.isLoading,e[94]=c,e[95]=K):K=e[95];let J;e[96]!==s||e[97]!==$||e[98]!==z||e[99]!==j.error||e[100]!==j.isLoading||e[101]!==i.slug||e[102]!==c?(J=t.jsx(Qs,{base:s,orgSlug:i.slug,site:c,domains:z,dnsTemplate:$,isLoading:j.isLoading,error:j.error}),e[96]=s,e[97]=$,e[98]=z,e[99]=j.error,e[100]=j.isLoading,e[101]=i.slug,e[102]=c,e[103]=J):J=e[103];let te;e[104]!==s||e[105]!==i.slug||e[106]!==x||e[107]!==h.error||e[108]!==h.isLoading||e[109]!==c?(te=t.jsx(Os,{base:s,orgSlug:i.slug,site:c,redirects:x,isLoading:h.isLoading,error:h.error}),e[104]=s,e[105]=i.slug,e[106]=x,e[107]=h.error,e[108]=h.isLoading,e[109]=c,e[110]=te):te=e[110];let W;return e[111]!==Z||e[112]!==ee||e[113]!==ie||e[114]!==K||e[115]!==J||e[116]!==te?(W=t.jsx("div",{className:b,children:t.jsxs("div",{className:B,children:[Z,ee,ie,K,J,te]})}),e[111]=Z,e[112]=ee,e[113]=ie,e[114]=K,e[115]=J,e[116]=te,e[117]=W):W=e[117],W}function Js(r){return r.framework}export{Yl as HostingTab};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cw as _}from"./index-
|
|
1
|
+
import{cw as _}from"./index-DYOslw5Q.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const M=_(g);export{M as R,g as r};
|